From f677562b6c90b283d338725992d87a2770848560 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Sat, 5 May 2012 13:13:27 +0800 Subject: [PATCH] Fix package.el handling of local variables on first line. * lisp/emacs-lisp/package.el (package-buffer-info): Avoid putting local variables into description. --- lisp/ChangeLog | 5 +++++ lisp/emacs-lisp/package.el | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 7a83c95ec3a..2442582114d 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2012-05-05 Chong Yidong + + * emacs-lisp/package.el (package-buffer-info): Avoid putting local + variables into description. + 2012-05-05 Stefan Monnier * shell.el (shell-completion-vars): Set pcomplete-arg-quote-list like diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el index 5b158eb994f..73afdb82509 100644 --- a/lisp/emacs-lisp/package.el +++ b/lisp/emacs-lisp/package.el @@ -943,7 +943,7 @@ If the buffer does not contain a conforming package, signal an error. If there is a package, narrow the buffer to the file's boundaries." (goto-char (point-min)) - (unless (re-search-forward "^;;; \\([^ ]*\\)\\.el --- \\(.*\\)$" nil t) + (unless (re-search-forward "^;;; \\([^ ]*\\)\\.el ---[ \t]*\\(.*?\\)[ \t]*\\(-\\*-.*-\\*-[ \t]*\\)?$" nil t) (error "Packages lacks a file header")) (let ((file-name (match-string-no-properties 1)) (desc (match-string-no-properties 2)) -- 2.39.2