summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChong Yidong <cyd@gnu.org>2012-05-05 13:13:27 +0800
committerChong Yidong <cyd@gnu.org>2012-05-05 13:13:27 +0800
commitf677562b6c90b283d338725992d87a2770848560 (patch)
treecd621292afcb1518be1029333f04cd77cce24c83
parent3d53ee1b2d06098527f983756fcfdfc2a5ecce16 (diff)
downloademacs-f677562b6c90b283d338725992d87a2770848560.tar.gz
Fix package.el handling of local variables on first line.
* lisp/emacs-lisp/package.el (package-buffer-info): Avoid putting local variables into description.
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/emacs-lisp/package.el2
2 files changed, 6 insertions, 1 deletions
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 <cyd@gnu.org>
+
+ * emacs-lisp/package.el (package-buffer-info): Avoid putting local
+ variables into description.
+
2012-05-05 Stefan Monnier <monnier@iro.umontreal.ca>
* 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))