diff options
author | Spencer Baugh <sbaugh@catern.com> | 2023-07-09 12:59:50 -0400 |
---|---|---|
committer | Philip Kaludercic <philipk@posteo.net> | 2023-07-16 00:27:40 +0200 |
commit | 17073af84d7eaedc81d84fc16f8aa0db215c6a31 (patch) | |
tree | 0fad17944e2e530c38ee55bb871a48f6b458dfd7 | |
parent | 16f3a09e8dba33b2e3d7505862e7fc99952edcae (diff) | |
download | emacs-17073af84d7eaedc81d84fc16f8aa0db215c6a31.tar.gz |
; Improve robustness of package-report-bug
* lisp/emacs-lisp/package.el (package-report-bug): Do not assume that
every entry in 'custom-current-group-alist' has a non-nil entry for a
filename.
It is possible for a group to not be associated with any file, e.g. when
a 'defgroup' form is evaluated using 'eval-expression'. (bug#64543)
-rw-r--r-- | lisp/emacs-lisp/package.el | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el index 3e6acd9b388..58ca19f7fe2 100644 --- a/lisp/emacs-lisp/package.el +++ b/lisp/emacs-lisp/package.el @@ -4637,13 +4637,14 @@ DESC must be a `package-desc' object." vars) (dolist-with-progress-reporter (group custom-current-group-alist) "Scanning for modified user options..." - (dolist (ent (get (cdr group) 'custom-group)) - (when (and (custom-variable-p (car ent)) - (boundp (car ent)) - (not (eq (custom--standard-value (car ent)) - (default-toplevel-value (car ent)))) - (file-in-directory-p (car group) (package-desc-dir desc))) - (push (car ent) vars)))) + (when (and (car group) + (file-in-directory-p (car group) (package-desc-dir desc))) + (dolist (ent (get (cdr group) 'custom-group)) + (when (and (custom-variable-p (car ent)) + (boundp (car ent)) + (not (eq (custom--standard-value (car ent)) + (default-toplevel-value (car ent))))) + (push (car ent) vars))))) (dlet ((reporter-prompt-for-summary-p t)) (reporter-submit-bug-report maint name vars)))) |