diff options
| author | Dmitry Gutov | 2016-05-12 01:18:38 +0300 |
|---|---|---|
| committer | Dmitry Gutov | 2016-05-12 01:18:38 +0300 |
| commit | 9596ea1534d0c5146be5c1a58d0c5a70f56b44c3 (patch) | |
| tree | aff347195f6bcbcb1ce3d838f20e3b9b8f9eae70 | |
| parent | f79c3523354e45e2dbc97bb92718c9941c1a1a3b (diff) | |
| download | emacs-9596ea1534d0c5146be5c1a58d0c5a70f56b44c3.tar.gz emacs-9596ea1534d0c5146be5c1a58d0c5a70f56b44c3.zip | |
; Revert "* emacs-lisp/lisp-mnt.el (lm-header): save-excursion"
This reverts commit bf3f6a961f378f35a292c41c0bfbdae88ee1b1b9.
(Bug#22616)
| -rw-r--r-- | lisp/emacs-lisp/lisp-mnt.el | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/lisp/emacs-lisp/lisp-mnt.el b/lisp/emacs-lisp/lisp-mnt.el index 7d5b7dc749d..46373da5eb9 100644 --- a/lisp/emacs-lisp/lisp-mnt.el +++ b/lisp/emacs-lisp/lisp-mnt.el | |||
| @@ -265,17 +265,16 @@ a section." | |||
| 265 | 265 | ||
| 266 | (defun lm-header (header) | 266 | (defun lm-header (header) |
| 267 | "Return the contents of the header named HEADER." | 267 | "Return the contents of the header named HEADER." |
| 268 | (save-excursion | 268 | (goto-char (point-min)) |
| 269 | (goto-char (point-min)) | 269 | (let ((case-fold-search t)) |
| 270 | (let ((case-fold-search t)) | 270 | (when (and (re-search-forward (lm-get-header-re header) (lm-code-mark) t) |
| 271 | (when (and (re-search-forward (lm-get-header-re header) (lm-code-mark) t) | 271 | ;; RCS ident likes format "$identifier: data$" |
| 272 | ;; RCS ident likes format "$identifier: data$" | 272 | (looking-at |
| 273 | (looking-at | 273 | (if (save-excursion |
| 274 | (if (save-excursion | 274 | (skip-chars-backward "^$" (match-beginning 0)) |
| 275 | (skip-chars-backward "^$" (match-beginning 0)) | 275 | (= (point) (match-beginning 0))) |
| 276 | (= (point) (match-beginning 0))) | 276 | "[^\n]+" "[^$\n]+"))) |
| 277 | "[^\n]+" "[^$\n]+"))) | 277 | (match-string-no-properties 0)))) |
| 278 | (match-string-no-properties 0))))) | ||
| 279 | 278 | ||
| 280 | (defun lm-header-multiline (header) | 279 | (defun lm-header-multiline (header) |
| 281 | "Return the contents of the header named HEADER, with continuation lines. | 280 | "Return the contents of the header named HEADER, with continuation lines. |