From 5e41a51e5cc45ca7289fc120f26ad90f45eb2682 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Thu, 2 Apr 2015 09:59:47 -0400 Subject: * lisp/emacs-lisp/lisp-mnt.el (lm-version): Don't burp in a non-file buffer. --- lisp/emacs-lisp/lisp-mnt.el | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'lisp/emacs-lisp/lisp-mnt.el') 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))))))) -- cgit v1.2.3