diff options
| author | Artur Malabarba | 2015-08-12 08:52:42 +0100 |
|---|---|---|
| committer | Artur Malabarba | 2015-08-12 08:55:38 +0100 |
| commit | bf3f6a961f378f35a292c41c0bfbdae88ee1b1b9 (patch) | |
| tree | 06dd276e7c3eabdf1d2528eb0b1a6523e3fbf8a7 /lisp | |
| parent | 197f280042a4d901ea94acdf10f1dc544fae4750 (diff) | |
| download | emacs-bf3f6a961f378f35a292c41c0bfbdae88ee1b1b9.tar.gz emacs-bf3f6a961f378f35a292c41c0bfbdae88ee1b1b9.zip | |
* emacs-lisp/lisp-mnt.el (lm-header): save-excursion
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/emacs-lisp/lisp-mnt.el | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/lisp/emacs-lisp/lisp-mnt.el b/lisp/emacs-lisp/lisp-mnt.el index 104c23c2102..01ba656450a 100644 --- a/lisp/emacs-lisp/lisp-mnt.el +++ b/lisp/emacs-lisp/lisp-mnt.el | |||
| @@ -265,16 +265,17 @@ 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 | (goto-char (point-min)) | 268 | (save-excursion |
| 269 | (let ((case-fold-search t)) | 269 | (goto-char (point-min)) |
| 270 | (when (and (re-search-forward (lm-get-header-re header) (lm-code-mark) t) | 270 | (let ((case-fold-search t)) |
| 271 | ;; RCS ident likes format "$identifier: data$" | 271 | (when (and (re-search-forward (lm-get-header-re header) (lm-code-mark) t) |
| 272 | (looking-at | 272 | ;; RCS ident likes format "$identifier: data$" |
| 273 | (if (save-excursion | 273 | (looking-at |
| 274 | (skip-chars-backward "^$" (match-beginning 0)) | 274 | (if (save-excursion |
| 275 | (= (point) (match-beginning 0))) | 275 | (skip-chars-backward "^$" (match-beginning 0)) |
| 276 | "[^\n]+" "[^$\n]+"))) | 276 | (= (point) (match-beginning 0))) |
| 277 | (match-string-no-properties 0)))) | 277 | "[^\n]+" "[^$\n]+"))) |
| 278 | (match-string-no-properties 0))))) | ||
| 278 | 279 | ||
| 279 | (defun lm-header-multiline (header) | 280 | (defun lm-header-multiline (header) |
| 280 | "Return the contents of the header named HEADER, with continuation lines. | 281 | "Return the contents of the header named HEADER, with continuation lines. |