summaryrefslogtreecommitdiff
path: root/lisp/mail/emacsbug.el
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2021-03-11 14:32:42 -0500
committerStefan Monnier <monnier@iro.umontreal.ca>2021-03-11 14:32:42 -0500
commitd9c94e93b7013d575aeb2a8e8077564a80b04f7c (patch)
tree0eb0b9d2c5263c1d6a1665e17774b846a802405a /lisp/mail/emacsbug.el
parentb90c658492a2548f183bf072be50f4a57a2b5f0b (diff)
downloademacs-d9c94e93b7013d575aeb2a8e8077564a80b04f7c.tar.gz
emacs-d9c94e93b7013d575aeb2a8e8077564a80b04f7c.tar.bz2
emacs-d9c94e93b7013d575aeb2a8e8077564a80b04f7c.zip
* lisp/mail/: Use lexical-binding
Remove some redundant `:group` args as well. * lisp/mail/supercite.el: Use lexical-binding. (completer-disable): Declare var. (sc-set-variable): Don't rely on dynbind to access `help` variable. * lisp/mail/mail-extr.el: Use lexical-binding. (mail-extract-address-components): Avoid use of dynamic scoping to refer to local vars. * lisp/mail/mailabbrev.el: Use lexical-binding. (mail-abbrev-make-syntax-table): Rename `_` variable to `syntax-_`. * lisp/mail/mailheader.el: Use lexical-binding. (headers): Don't declare as dynbound globally. (mail-header-set, mail-header-merge): Declare `headers` as dynbound locally, instead. Mark those functions as obsolete. (mail-header-format): Use `alist-get` instead of `mail-header`. * lisp/mail/binhex.el (binhex-decode-region-external): Remove always-nil var `firstline`. * lisp/mail/emacsbug.el: Use lexical-binding. (report-emacs-bug): Remove always-nil var `message-end-point`. * lisp/mail/rmail-spam-filter.el: Use lexical-binding. (bbdb/mail_auto_create_p): Declare variable. * lisp/mail/rmail.el (rmail-get-new-mail): Remove always-nil var `delete-files`. * lisp/mail/rmailout.el: Use lexical-binding. (rmail-output-read-file-name): Remove unused var `err`. (rmail-convert-to-babyl-format): Remove unused var `count`. (rmail-output-as-mbox): Remove unused vars `from` and `date`. * lisp/mail/rmailsort.el: Use lexical-binding. (rmail-sort-messages): Remove unused var `msginfo`. * lisp/mail/rfc822.el: Use lexical-binding. * lisp/mail/rmailedit.el: Use lexical-binding. * lisp/mail/mailclient.el: Use lexical-binding. * lisp/mail/blessmail.el: Use lexical-binding. * lisp/mail/mail-hist.el: Use lexical-binding. * lisp/mail/rmailkwd.el: Use lexical-binding. * lisp/mail/rmailmsc.el: Use lexical-binding. * lisp/mail/uce.el: Use lexical-binding. * lisp/mail/unrmail.el: Use lexical-binding.
Diffstat (limited to 'lisp/mail/emacsbug.el')
-rw-r--r--lisp/mail/emacsbug.el28
1 files changed, 13 insertions, 15 deletions
diff --git a/lisp/mail/emacsbug.el b/lisp/mail/emacsbug.el
index 815ff4339eb..5f3d75ecc71 100644
--- a/lisp/mail/emacsbug.el
+++ b/lisp/mail/emacsbug.el
@@ -1,4 +1,4 @@
-;;; emacsbug.el --- command to report Emacs bugs to appropriate mailing list
+;;; emacsbug.el --- command to report Emacs bugs to appropriate mailing list -*- lexical-binding: t; -*-
;; Copyright (C) 1985, 1994, 1997-1998, 2000-2021 Free Software
;; Foundation, Inc.
@@ -45,12 +45,10 @@
(defcustom report-emacs-bug-no-confirmation nil
"If non-nil, suppress the confirmations asked for the sake of novice users."
- :group 'emacsbug
:type 'boolean)
(defcustom report-emacs-bug-no-explanations nil
"If non-nil, suppress the explanations given for the sake of novice users."
- :group 'emacsbug
:type 'boolean)
;; User options end here.
@@ -204,7 +202,7 @@ This requires either the macOS \"open\" command, or the freedesktop
(defvar message-sendmail-envelope-from)
;;;###autoload
-(defun report-emacs-bug (topic &optional unused)
+(defun report-emacs-bug (topic &optional _unused)
"Report a bug in GNU Emacs.
Prompts for bug subject. Leaves you in a mail buffer.
@@ -219,10 +217,10 @@ Already submitted bugs can be found in the Emacs bug tracker:
(let ((from-buffer (current-buffer))
(can-insert-mail (or (report-emacs-bug-can-use-xdg-email)
(report-emacs-bug-can-use-osx-open)))
- user-point message-end-point)
- (setq message-end-point
- (with-current-buffer (messages-buffer)
- (point-max-marker)))
+ user-point) ;; message-end-point
+ ;; (setq message-end-point
+ ;; (with-current-buffer (messages-buffer)
+ ;; (point-max-marker)))
(condition-case nil
;; For the novice user make sure there's always enough space for
;; the mail and the warnings buffer on this frame (Bug#10873).
@@ -263,7 +261,7 @@ Already submitted bugs can be found in the Emacs bug tracker:
"Bug-GNU-Emacs"
'face 'link
'help-echo (concat "mouse-2, RET: Follow this link")
- 'action (lambda (button)
+ 'action (lambda (_button)
(browse-url "https://lists.gnu.org/r/bug-gnu-emacs/"))
'follow-link t)
(insert " mailing list\nand the GNU bug tracker at ")
@@ -271,7 +269,7 @@ Already submitted bugs can be found in the Emacs bug tracker:
"debbugs.gnu.org"
'face 'link
'help-echo (concat "mouse-2, RET: Follow this link")
- 'action (lambda (button)
+ 'action (lambda (_button)
(browse-url "https://debbugs.gnu.org/cgi/pkgreport.cgi?package=emacs;max-bugs=100;base-order=1;bug-rev=1"))
'follow-link t)
@@ -347,10 +345,10 @@ usually do not have translators for other languages.\n\n")))
;; This is so the user has to type something in order to send easily.
(use-local-map (nconc (make-sparse-keymap) (current-local-map)))
- (define-key (current-local-map) "\C-c\C-i" 'info-emacs-bug)
+ (define-key (current-local-map) "\C-c\C-i" #'info-emacs-bug)
(if can-insert-mail
(define-key (current-local-map) "\C-c\M-i"
- 'report-emacs-bug-insert-to-mailer))
+ #'report-emacs-bug-insert-to-mailer))
(setq report-emacs-bug-send-command (get mail-user-agent 'sendfunc)
report-emacs-bug-send-hook (get mail-user-agent 'hookvar))
(if report-emacs-bug-send-command
@@ -376,7 +374,7 @@ usually do not have translators for other languages.\n\n")))
(shrink-window-if-larger-than-buffer (get-buffer-window "*Bug Help*")))
;; Make it less likely people will send empty messages.
(if report-emacs-bug-send-hook
- (add-hook report-emacs-bug-send-hook 'report-emacs-bug-hook nil t))
+ (add-hook report-emacs-bug-send-hook #'report-emacs-bug-hook nil t))
(goto-char (point-max))
(skip-chars-backward " \t\n")
(setq-local report-emacs-bug-orig-text
@@ -398,7 +396,7 @@ usually do not have translators for other languages.\n\n")))
;; This is used not only for X11 but also W32 and others.
(insert "Windowing system distributor '" (x-server-vendor)
"', version "
- (mapconcat 'number-to-string (x-server-version) ".") "\n")
+ (mapconcat #'number-to-string (x-server-version) ".") "\n")
(error t)))
(let ((os (ignore-errors (report-emacs-bug--os-description))))
(if (stringp os)
@@ -409,7 +407,7 @@ usually do not have translators for other languages.\n\n")))
system-configuration-options "'\n\n")
(fill-region (line-beginning-position -1) (point))))
-(define-obsolete-function-alias 'report-emacs-bug-info 'info-emacs-bug "24.3")
+(define-obsolete-function-alias 'report-emacs-bug-info #'info-emacs-bug "24.3")
(defun report-emacs-bug-hook ()
"Do some checking before sending a bug report."