diff options
author | Andrea Corallo <akrl@sdf.org> | 2020-02-04 11:40:12 +0000 |
---|---|---|
committer | Andrea Corallo <akrl@sdf.org> | 2020-02-04 15:11:20 +0100 |
commit | 15aedf3e3d7814aff980098f9290396222c0ff8d (patch) | |
tree | 1a3b1287cc72b7ecb2703761ad03dfc75f4dbe2e /lisp/emacs-lisp/lisp-mnt.el | |
parent | ea56b58098d78b242bc0c51cf1d8b1d21962c130 (diff) | |
parent | b641c178ce3d022a9fca1d44ecb60f3878a989bd (diff) | |
download | emacs-15aedf3e3d7814aff980098f9290396222c0ff8d.tar.gz emacs-15aedf3e3d7814aff980098f9290396222c0ff8d.tar.bz2 emacs-15aedf3e3d7814aff980098f9290396222c0ff8d.zip |
Merge remote-tracking branch 'savannah/master' into HEAD
Diffstat (limited to 'lisp/emacs-lisp/lisp-mnt.el')
-rw-r--r-- | lisp/emacs-lisp/lisp-mnt.el | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/lisp/emacs-lisp/lisp-mnt.el b/lisp/emacs-lisp/lisp-mnt.el index ceb9b6bea5f..0d57bc16a3a 100644 --- a/lisp/emacs-lisp/lisp-mnt.el +++ b/lisp/emacs-lisp/lisp-mnt.el @@ -485,7 +485,18 @@ absent, return nil." (lm-with-file file (let ((start (lm-commentary-start))) (when start - (buffer-substring-no-properties start (lm-commentary-end)))))) + (replace-regexp-in-string ; Get rid of... + "[[:blank:]]*$" "" ; trailing white-space + (replace-regexp-in-string + (format "%s\\|%s\\|%s" + ;; commentary header + (concat "^;;;[[:blank:]]*\\(" + lm-commentary-header + "\\):[[:blank:]\n]*") + "^;;[[:blank:]]*" ; double semicolon prefix + "[[:blank:]\n]*\\'") ; trailing new-lines + "" (buffer-substring-no-properties + start (lm-commentary-end)))))))) (defun lm-homepage (&optional file) "Return the homepage in file FILE, or current buffer if FILE is nil." |