; Revert "* emacs-lisp/lisp-mnt.el (lm-header): save-excursion"

This reverts commit bf3f6a961f.

(Bug#22616)
This commit is contained in:
Dmitry Gutov 2016-05-12 01:18:38 +03:00
parent f79c352335
commit 9596ea1534

View file

@ -265,17 +265,16 @@ a section."
(defun lm-header (header) (defun lm-header (header)
"Return the contents of the header named HEADER." "Return the contents of the header named HEADER."
(save-excursion (goto-char (point-min))
(goto-char (point-min)) (let ((case-fold-search t))
(let ((case-fold-search t)) (when (and (re-search-forward (lm-get-header-re header) (lm-code-mark) t)
(when (and (re-search-forward (lm-get-header-re header) (lm-code-mark) t) ;; RCS ident likes format "$identifier: data$"
;; RCS ident likes format "$identifier: data$" (looking-at
(looking-at (if (save-excursion
(if (save-excursion (skip-chars-backward "^$" (match-beginning 0))
(skip-chars-backward "^$" (match-beginning 0)) (= (point) (match-beginning 0)))
(= (point) (match-beginning 0))) "[^\n]+" "[^$\n]+")))
"[^\n]+" "[^$\n]+"))) (match-string-no-properties 0))))
(match-string-no-properties 0)))))
(defun lm-header-multiline (header) (defun lm-header-multiline (header)
"Return the contents of the header named HEADER, with continuation lines. "Return the contents of the header named HEADER, with continuation lines.