]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/emacs-lisp/lisp-mnt.el (lm-version): Don't burp in a non-file buffer.
authorStefan Monnier <monnier@iro.umontreal.ca>
Thu, 2 Apr 2015 13:59:47 +0000 (09:59 -0400)
committerStefan Monnier <monnier@iro.umontreal.ca>
Thu, 2 Apr 2015 13:59:47 +0000 (09:59 -0400)
lisp/ChangeLog
lisp/emacs-lisp/lisp-mnt.el

index 2092447fbccf3f65cbc1fb4a8fa6b290dcf6e957..96732ec37ef19f87f998224b92327206bd678205 100644 (file)
@@ -1,9 +1,13 @@
+2015-04-02  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * emacs-lisp/lisp-mnt.el (lm-version): Don't burp in a non-file buffer.
+
 2015-04-01  Alan Mackenzie  <acm@muc.de>
 
        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.
 
index f9874d83bb3a66913a7696dc7bf2c4e7d0d49b67..fec172d05ca7a8bf0b6c56a731af520fb93f6836 100644 (file)
@@ -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)))))))