From: Stefan Monnier Date: Thu, 2 Apr 2015 13:59:47 +0000 (-0400) Subject: * lisp/emacs-lisp/lisp-mnt.el (lm-version): Don't burp in a non-file buffer. X-Git-Tag: emacs-25.0.90~2564^2~21 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=5e41a51e5cc45ca7289fc120f26ad90f45eb2682;p=emacs.git * lisp/emacs-lisp/lisp-mnt.el (lm-version): Don't burp in a non-file buffer. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 2092447fbcc..96732ec37ef 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,9 +1,13 @@ +2015-04-02 Stefan Monnier + + * emacs-lisp/lisp-mnt.el (lm-version): Don't burp in a non-file buffer. + 2015-04-01 Alan Mackenzie Fix the CC Mode fixes from 2015-03-30. Fixes debbugs#20240. - * progmodes/cc-mode.el (c-extend-after-change-region): Widen - before applying text properties. + * progmodes/cc-mode.el (c-extend-after-change-region): + Widen before applying text properties. * progmodes/cc-langs.el (c-before-font-lock-functions): Update an entry to a new function name. diff --git a/lisp/emacs-lisp/lisp-mnt.el b/lisp/emacs-lisp/lisp-mnt.el index f9874d83bb3..fec172d05ca 100644 --- a/lisp/emacs-lisp/lisp-mnt.el +++ b/lisp/emacs-lisp/lisp-mnt.el @@ -436,8 +436,10 @@ This can be found in an RCS or SCCS header." ;; Look for an SCCS header ((re-search-forward (concat - (regexp-quote "@(#)") - (regexp-quote (file-name-nondirectory (buffer-file-name))) + "@(#)" + (if buffer-file-name + (regexp-quote (file-name-nondirectory buffer-file-name)) + "[^\t\n]*") "\t\\([012345679.]*\\)") header-max t) (match-string-no-properties 1)))))))