* emacs-lisp/lisp-mnt.el (lm-header): save-excursion
This commit is contained in:
parent
197f280042
commit
bf3f6a961f
1 changed files with 11 additions and 10 deletions
|
@ -265,16 +265,17 @@ a section."
|
|||
|
||||
(defun lm-header (header)
|
||||
"Return the contents of the header named HEADER."
|
||||
(goto-char (point-min))
|
||||
(let ((case-fold-search t))
|
||||
(when (and (re-search-forward (lm-get-header-re header) (lm-code-mark) t)
|
||||
;; RCS ident likes format "$identifier: data$"
|
||||
(looking-at
|
||||
(if (save-excursion
|
||||
(skip-chars-backward "^$" (match-beginning 0))
|
||||
(= (point) (match-beginning 0)))
|
||||
"[^\n]+" "[^$\n]+")))
|
||||
(match-string-no-properties 0))))
|
||||
(save-excursion
|
||||
(goto-char (point-min))
|
||||
(let ((case-fold-search t))
|
||||
(when (and (re-search-forward (lm-get-header-re header) (lm-code-mark) t)
|
||||
;; RCS ident likes format "$identifier: data$"
|
||||
(looking-at
|
||||
(if (save-excursion
|
||||
(skip-chars-backward "^$" (match-beginning 0))
|
||||
(= (point) (match-beginning 0)))
|
||||
"[^\n]+" "[^$\n]+")))
|
||||
(match-string-no-properties 0)))))
|
||||
|
||||
(defun lm-header-multiline (header)
|
||||
"Return the contents of the header named HEADER, with continuation lines.
|
||||
|
|
Loading…
Add table
Reference in a new issue