diff options
author | Stefan Kangas <stefan@marxist.se> | 2020-12-07 16:27:50 +0100 |
---|---|---|
committer | Stefan Kangas <stefan@marxist.se> | 2020-12-07 16:45:33 +0100 |
commit | d174a2bb23e9a4a47bcc6d6558bae8cbf81d4e46 (patch) | |
tree | a61a444daf2bc6cf1c41bce76d91af9bdfacdebf | |
parent | 3ee94cc7bb657f0d3186d344fb1236b50edd5f69 (diff) | |
download | emacs-d174a2bb23e9a4a47bcc6d6558bae8cbf81d4e46.tar.gz emacs-d174a2bb23e9a4a47bcc6d6558bae8cbf81d4e46.tar.bz2 emacs-d174a2bb23e9a4a47bcc6d6558bae8cbf81d4e46.zip |
Prefer setq-local in gnus/*.el
* lisp/gnus/gnus-agent.el (gnus-agent-mode)
(gnus-agent-get-undownloaded-list, gnus-agent-open-history):
* lisp/gnus/gnus-art.el (gnus-article-setup-highlight-words)
(gnus-article-mode, gnus-article-setup-buffer, defsubst)
(gnus-article-describe-bindings, gnus-article-edit-mode):
* lisp/gnus/gnus-cus.el (gnus-custom-mode, gnus-group-customize)
(gnus-score-customize, gnus-agent-customize-category):
* lisp/gnus/gnus-group.el (gnus-group-make-tool-bar):
* lisp/gnus/gnus-msg.el (gnus-setup-message)
(gnus-summary-news-other-window, gnus-configure-posting-styles):
* lisp/gnus/gnus-salt.el (gnus-pick-mode, gnus-binary-mode):
* lisp/gnus/gnus-score.el (gnus-score-edit-current-scores)
(gnus-score-edit-file):
* lisp/gnus/gnus-srvr.el (gnus-server-mode):
* lisp/gnus/gnus-start.el (gnus-no-server-1)
(gnus-dribble-read-file, gnus-save-newsrc-file)
(gnus-gnus-to-newsrc-format):
* lisp/gnus/gnus-sum.el (gnus-summary-make-tool-bar)
(gnus-summary-mode, gnus-summary-setup-buffer)
(gnus-select-newsgroup, gnus-summary-edit-article)
(gnus-summary-setup-default-charset):
* lisp/gnus/gnus-topic.el (gnus-topic-mode):
* lisp/gnus/gnus-undo.el (gnus-undo-mode):
* lisp/gnus/gnus.el (gnus-simplify-mode-line):
* lisp/gnus/message.el (message-cite-reply-position)
(message-cite-style, message-mode, message-setup-fill-variables):
* lisp/gnus/mm-view.el (mm-display-inline-fontify):
* lisp/gnus/mml.el (mml-mode):
* lisp/gnus/nndiary.el (nndiary-open-nov):
* lisp/gnus/nnfolder.el (nnfolder-save-buffer)
(nnfolder-open-nov):
* lisp/gnus/nnheader.el (nnheader-init-server-buffer):
* lisp/gnus/nnimap.el (nnimap-make-process-buffer):
* lisp/gnus/nnml.el (nnml-get-nov-buffer): Prefer setq-local.
-rw-r--r-- | lisp/gnus/gnus-agent.el | 8 | ||||
-rw-r--r-- | lisp/gnus/gnus-art.el | 35 | ||||
-rw-r--r-- | lisp/gnus/gnus-cus.el | 34 | ||||
-rw-r--r-- | lisp/gnus/gnus-group.el | 2 | ||||
-rw-r--r-- | lisp/gnus/gnus-msg.el | 21 | ||||
-rw-r--r-- | lisp/gnus/gnus-salt.el | 10 | ||||
-rw-r--r-- | lisp/gnus/gnus-score.el | 6 | ||||
-rw-r--r-- | lisp/gnus/gnus-srvr.el | 3 | ||||
-rw-r--r-- | lisp/gnus/gnus-start.el | 13 | ||||
-rw-r--r-- | lisp/gnus/gnus-sum.el | 17 | ||||
-rw-r--r-- | lisp/gnus/gnus-topic.el | 23 | ||||
-rw-r--r-- | lisp/gnus/gnus-undo.el | 4 | ||||
-rw-r--r-- | lisp/gnus/gnus.el | 3 | ||||
-rw-r--r-- | lisp/gnus/message.el | 91 | ||||
-rw-r--r-- | lisp/gnus/mm-view.el | 2 | ||||
-rw-r--r-- | lisp/gnus/mml.el | 4 | ||||
-rw-r--r-- | lisp/gnus/nndiary.el | 8 | ||||
-rw-r--r-- | lisp/gnus/nnfolder.el | 6 | ||||
-rw-r--r-- | lisp/gnus/nnheader.el | 2 | ||||
-rw-r--r-- | lisp/gnus/nnimap.el | 8 | ||||
-rw-r--r-- | lisp/gnus/nnml.el | 4 |
21 files changed, 138 insertions, 166 deletions
diff --git a/lisp/gnus/gnus-agent.el b/lisp/gnus/gnus-agent.el index 053e7ea1f6b..d6802a35d0c 100644 --- a/lisp/gnus/gnus-agent.el +++ b/lisp/gnus/gnus-agent.el @@ -454,7 +454,7 @@ manipulated as follows: (symbol-name major-mode)) (match-string 1 (symbol-name major-mode)))) (mode (intern (format "gnus-agent-%s-mode" buffer)))) - (set (make-local-variable 'gnus-agent-mode) t) + (setq-local gnus-agent-mode t) (set mode nil) (set (make-local-variable mode) t) ;; Set up the menu. @@ -1056,8 +1056,8 @@ article's mark is toggled." (defun gnus-agent-get-undownloaded-list () "Construct list of articles that have not been downloaded." (let ((gnus-command-method (gnus-find-method-for-group gnus-newsgroup-name))) - (when (set (make-local-variable 'gnus-newsgroup-agentized) - (gnus-agent-method-p gnus-command-method)) + (when (setq-local gnus-newsgroup-agentized + (gnus-agent-method-p gnus-command-method)) (let* ((alist (gnus-agent-load-alist gnus-newsgroup-name)) (headers (sort (mapcar (lambda (h) (mail-header-number h)) @@ -1440,7 +1440,7 @@ downloaded into the agent." (let ((file (gnus-agent-lib-file "history"))) (when (file-exists-p file) (nnheader-insert-file-contents file)) - (set (make-local-variable 'gnus-agent-file-name) file)))) + (setq-local gnus-agent-file-name file)))) (defun gnus-agent-close-history () (when (gnus-buffer-live-p gnus-agent-current-history) diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el index 7f594c9c360..5b50bcbbe1f 100644 --- a/lisp/gnus/gnus-art.el +++ b/lisp/gnus/gnus-art.el @@ -3850,8 +3850,7 @@ This format is defined by the `gnus-article-time-format' variable." (unless gnus-article-emphasis-alist (let ((name (and gnus-newsgroup-name (gnus-group-real-name gnus-newsgroup-name)))) - (make-local-variable 'gnus-article-emphasis-alist) - (setq gnus-article-emphasis-alist + (setq-local gnus-article-emphasis-alist (nconc (let ((alist gnus-group-highlight-words-alist) elem highlight) (while (setq elem (pop alist)) @@ -4495,10 +4494,10 @@ commands: (when (gnus-visual-p 'article-menu 'menu) (gnus-article-make-menu-bar) (when gnus-summary-tool-bar-map - (set (make-local-variable 'tool-bar-map) gnus-summary-tool-bar-map))) + (setq-local tool-bar-map gnus-summary-tool-bar-map))) (gnus-update-format-specifications nil 'article-mode) - (set (make-local-variable 'page-delimiter) gnus-page-delimiter) - (set (make-local-variable 'gnus-page-broken) nil) + (setq-local page-delimiter gnus-page-delimiter) + (setq-local gnus-page-broken nil) (make-local-variable 'gnus-article-current-summary) (make-local-variable 'gnus-article-mime-handles) (make-local-variable 'gnus-article-decoded-p) @@ -4507,13 +4506,12 @@ commands: (make-local-variable 'gnus-article-image-alist) (make-local-variable 'gnus-article-charset) (make-local-variable 'gnus-article-ignored-charsets) - (set (make-local-variable 'bookmark-make-record-function) - 'gnus-summary-bookmark-make-record) + (setq-local bookmark-make-record-function 'gnus-summary-bookmark-make-record) ;; Prevent Emacs from displaying non-break space with ;; `nobreak-space' face. - (set (make-local-variable 'nobreak-char-display) nil) + (setq-local nobreak-char-display nil) ;; Enable `gnus-article-remove-images' to delete images shr.el renders. - (set (make-local-variable 'shr-put-image-function) 'gnus-shr-put-image) + (setq-local shr-put-image-function 'gnus-shr-put-image) (unless gnus-article-show-cursor (setq cursor-in-non-selected-windows nil)) (gnus-set-default-directory) @@ -4557,7 +4555,7 @@ commands: t))) (let ((summary gnus-summary-buffer)) (with-current-buffer name - (set (make-local-variable 'gnus-article-edit-mode) nil) + (setq-local gnus-article-edit-mode nil) (gnus-article-stop-animations) (when gnus-article-mime-handles (mm-destroy-parts gnus-article-mime-handles) @@ -4568,14 +4566,14 @@ commands: (setq buffer-read-only t) (unless (derived-mode-p 'gnus-article-mode) (gnus-article-mode)) - (set (make-local-variable 'gnus-summary-buffer) summary) + (setq-local gnus-summary-buffer summary) (setq truncate-lines gnus-article-truncate-lines) (current-buffer))) (let ((summary gnus-summary-buffer)) (with-current-buffer (gnus-get-buffer-create name) (gnus-article-mode) (setq truncate-lines gnus-article-truncate-lines) - (set (make-local-variable 'gnus-summary-buffer) summary) + (setq-local gnus-summary-buffer summary) (gnus-summary-set-local-parameters gnus-newsgroup-name) (when article-lapsed-timer (gnus-stop-date-timer)) @@ -5036,7 +5034,7 @@ and `gnus-mime-delete-part', and not provided at run-time normally." (setq gnus-article-mime-handles nil) (let ((mbl1 mml-buffer-list)) (setq mml-buffer-list mbl) - (set (make-local-variable 'mml-buffer-list) mbl1)) + (setq-local mml-buffer-list mbl1)) (add-hook 'kill-buffer-hook 'mml-destroy-buffers t t))) `(lambda (no-highlight) (let ((mail-parse-charset (or gnus-article-charset @@ -6902,8 +6900,8 @@ then we display only bindings that start with that prefix." (setq draft gnus-draft-mode))) (with-temp-buffer (use-local-map keymap) - (set (make-local-variable 'gnus-agent-summary-mode) agent) - (set (make-local-variable 'gnus-draft-mode) draft) + (setq-local gnus-agent-summary-mode agent) + (setq-local gnus-draft-mode draft) (describe-bindings prefix)) (let ((item `((lambda (prefix) (with-current-buffer ,(current-buffer) @@ -7247,10 +7245,9 @@ This is an extended text-mode. \\{gnus-article-edit-mode-map}" (make-local-variable 'gnus-article-edit-done-function) (make-local-variable 'gnus-prev-winconf) - (set (make-local-variable 'font-lock-defaults) - '(message-font-lock-keywords t)) - (set (make-local-variable 'mail-header-separator) "") - (set (make-local-variable 'gnus-article-edit-mode) t) + (setq-local font-lock-defaults '(message-font-lock-keywords t)) + (setq-local mail-header-separator "") + (setq-local gnus-article-edit-mode t) (mml-mode) (setq buffer-read-only nil) (buffer-enable-undo) diff --git a/lisp/gnus/gnus-cus.el b/lisp/gnus/gnus-cus.el index f0c4d07ca93..d832d0ebae1 100644 --- a/lisp/gnus/gnus-cus.el +++ b/lisp/gnus/gnus-cus.el @@ -49,18 +49,15 @@ if that value is non-nil." ;; Emacs stuff: (when (and (facep 'custom-button-face) (facep 'custom-button-pressed-face)) - (set (make-local-variable 'widget-button-face) - 'custom-button-face) - (set (make-local-variable 'widget-button-pressed-face) - 'custom-button-pressed-face) - (set (make-local-variable 'widget-mouse-face) - 'custom-button-pressed-face)) + (setq-local widget-button-face 'custom-button-face) + (setq-local widget-button-pressed-face 'custom-button-pressed-face) + (setq-local widget-mouse-face 'custom-button-pressed-face)) (when (and (boundp 'custom-raised-buttons) (symbol-value 'custom-raised-buttons)) - (set (make-local-variable 'widget-push-button-prefix) "") - (set (make-local-variable 'widget-push-button-suffix) "") - (set (make-local-variable 'widget-link-prefix) "") - (set (make-local-variable 'widget-link-suffix) ""))) + (setq-local widget-push-button-prefix "") + (setq-local widget-push-button-suffix "") + (setq-local widget-link-prefix "") + (setq-local widget-link-suffix ""))) ;;; Group Customization: @@ -380,10 +377,8 @@ category.")) (gnus-kill-buffer "*Gnus Customize*") (switch-to-buffer (gnus-get-buffer-create "*Gnus Customize*")) (gnus-custom-mode) - (make-local-variable 'gnus-custom-group) - (setq gnus-custom-group group) - (make-local-variable 'gnus-custom-topic) - (setq gnus-custom-topic topic) + (setq-local gnus-custom-group group) + (setq-local gnus-custom-topic topic) (buffer-disable-undo) (widget-insert "Customize the ") (if group @@ -848,8 +843,7 @@ This can be changed using the `\\[gnus-score-change-score-file]' command." (kill-buffer (gnus-get-buffer-create "*Gnus Customize*")) (switch-to-buffer (gnus-get-buffer-create "*Gnus Customize*")) (gnus-custom-mode) - (make-local-variable 'gnus-custom-score-alist) - (setq gnus-custom-score-alist scores) + (setq-local gnus-custom-score-alist scores) (widget-insert "Customize the ") (widget-create 'info-link :help-echo "Push me to learn more." @@ -867,8 +861,7 @@ Check the [ ] for the entries you want to apply to this score file, then edit the value to suit your taste. Don't forget to mark the checkbox, if you do all your changes will be lost. ") (widget-insert "\n\n") - (make-local-variable 'gnus-custom-scores) - (setq gnus-custom-scores + (setq-local gnus-custom-scores (widget-create 'group :value scores `(checklist :inline t @@ -1052,10 +1045,9 @@ articles in the thread. "\n Note: Empty fields default to the customizable global\ variables.\n\n") - (set (make-local-variable 'gnus-agent-cat-name) - name)) + (setq-local gnus-agent-cat-name name)) - (set (make-local-variable 'category-fields) nil) + (setq-local category-fields nil) (gnus-agent-cat-prepare-category-field agent-predicate) (gnus-agent-cat-prepare-category-field agent-score) diff --git a/lisp/gnus/gnus-group.el b/lisp/gnus/gnus-group.el index 73fda66fb6b..a0f27c1937b 100644 --- a/lisp/gnus/gnus-group.el +++ b/lisp/gnus/gnus-group.el @@ -1098,7 +1098,7 @@ When FORCE, rebuild the tool bar." gnus-group-tool-bar-zap-list 'gnus-group-mode-map))) (if map - (set (make-local-variable 'tool-bar-map) map)))) + (setq-local tool-bar-map map)))) gnus-group-tool-bar-map) (define-derived-mode gnus-group-mode gnus-mode "Group" diff --git a/lisp/gnus/gnus-msg.el b/lisp/gnus/gnus-msg.el index 465871eafbd..3733babfe0f 100644 --- a/lisp/gnus/gnus-msg.el +++ b/lisp/gnus/gnus-msg.el @@ -464,8 +464,7 @@ only affect the Gcc copy, but not the original message." (gnus-inews-add-send-actions ,winconf ,buffer ,oarticle ,config ,yanked ,winconf-name) (setq gnus-message-buffer (current-buffer)) - (set (make-local-variable 'gnus-message-group-art) - (cons ,group ,article)) + (setq-local gnus-message-group-art (cons ,group ,article)) ;; Enable highlighting of different citation levels (when gnus-message-highlight-citation (gnus-message-citation-mode 1)) @@ -473,7 +472,7 @@ only affect the Gcc copy, but not the original message." (if (eq major-mode 'message-mode) (let ((mbl1 mml-buffer-list)) (setq mml-buffer-list mbl) ;; Global value - (set (make-local-variable 'mml-buffer-list) mbl1);; Local value + (setq-local mml-buffer-list mbl1) ;; Local value (add-hook 'change-major-mode-hook 'mml-destroy-buffers nil t) (add-hook 'kill-buffer-hook 'mml-destroy-buffers t t)) (mml-destroy-buffers) @@ -724,10 +723,10 @@ network. The corresponding back end must have a `request-post' method." (gnus-setup-message 'message (progn (message-news (gnus-group-real-name gnus-newsgroup-name)) - (set (make-local-variable 'gnus-discouraged-post-methods) - (remove - (car (gnus-find-method-for-group gnus-newsgroup-name)) - gnus-discouraged-post-methods))))))))) + (setq-local gnus-discouraged-post-methods + (remove + (car (gnus-find-method-for-group gnus-newsgroup-name)) + gnus-discouraged-post-methods))))))))) (defun gnus-summary-post-news (&optional arg) "Start composing a message. Post to the current group by default. @@ -1926,8 +1925,8 @@ this is a reply." (message-goto-body) (insert ,(cdr result))))) ((eq 'signature (car result)) - (set (make-local-variable 'message-signature) nil) - (set (make-local-variable 'message-signature-file) nil) + (setq-local message-signature nil) + (setq-local message-signature-file nil) (if (not (cdr result)) 'ignore `(lambda () @@ -1953,8 +1952,8 @@ this is a reply." (when (or name address) (add-hook 'message-setup-hook `(lambda () - (set (make-local-variable 'user-mail-address) - ,(or (cdr address) user-mail-address)) + (setq-local user-mail-address + ,(or (cdr address) user-mail-address)) (let ((user-full-name ,(or (cdr name) (user-full-name))) (user-mail-address ,(or (cdr address) user-mail-address))) diff --git a/lisp/gnus/gnus-salt.el b/lisp/gnus/gnus-salt.el index 8d58cd59e45..f19678a634a 100644 --- a/lisp/gnus/gnus-salt.el +++ b/lisp/gnus/gnus-salt.el @@ -106,7 +106,7 @@ It accepts the same format specs that `gnus-summary-line-format' does." (remove-hook 'gnus-message-setup-hook 'gnus-pick-setup-message)) (t ;; Make sure that we don't select any articles upon group entry. - (set (make-local-variable 'gnus-auto-select-first) nil) + (setq-local gnus-auto-select-first nil) ;; Change line format. (setq gnus-summary-line-format gnus-summary-pick-line-format) (setq gnus-summary-line-format-spec nil) @@ -114,7 +114,7 @@ It accepts the same format specs that `gnus-summary-line-format' does." (gnus-update-summary-mark-positions) ;; FIXME: a buffer-local minor mode adding globally to a hook?? (add-hook 'gnus-message-setup-hook 'gnus-pick-setup-message) - (set (make-local-variable 'gnus-summary-goto-unread) 'never) + (setq-local gnus-summary-goto-unread 'never) ;; Set up the menu. (when (gnus-visual-p 'pick-menu 'menu) (gnus-pick-make-menu-bar))))) @@ -333,10 +333,8 @@ This must be bound to a button-down mouse event." ((not (derived-mode-p 'gnus-summary-mode)) (setq gnus-binary-mode nil)) (gnus-binary-mode ;; Make sure that we don't select any articles upon group entry. - (make-local-variable 'gnus-auto-select-first) - (setq gnus-auto-select-first nil) - (make-local-variable 'gnus-summary-display-article-function) - (setq gnus-summary-display-article-function 'gnus-binary-display-article) + (setq-local gnus-auto-select-first nil) + (setq-local gnus-summary-display-article-function 'gnus-binary-display-article) ;; Set up the menu. (when (gnus-visual-p 'binary-menu 'menu) (gnus-binary-make-menu-bar))))) diff --git a/lisp/gnus/gnus-score.el b/lisp/gnus/gnus-score.el index 2e3abe7832d..94f2cc310fa 100644 --- a/lisp/gnus/gnus-score.el +++ b/lisp/gnus/gnus-score.el @@ -1117,8 +1117,7 @@ EXTRA is the possible non-standard header." (gnus-configure-windows 'edit-score) (gnus-score-mode) (setq gnus-score-edit-exit-function 'gnus-score-edit-done) - (make-local-variable 'gnus-prev-winconf) - (setq gnus-prev-winconf winconf)) + (setq-local gnus-prev-winconf winconf)) (gnus-message 4 "%s" (substitute-command-keys "\\<gnus-score-mode-map>\\[gnus-score-edit-exit] to save edits")))) @@ -1145,8 +1144,7 @@ EXTRA is the possible non-standard header." (gnus-configure-windows 'edit-score) (gnus-score-mode) (setq gnus-score-edit-exit-function 'gnus-score-edit-done) - (make-local-variable 'gnus-prev-winconf) - (setq gnus-prev-winconf winconf)) + (setq-local gnus-prev-winconf winconf)) (gnus-message 4 "%s" (substitute-command-keys "\\<gnus-score-mode-map>\\[gnus-score-edit-exit] to save edits"))) diff --git a/lisp/gnus/gnus-srvr.el b/lisp/gnus/gnus-srvr.el index 6beb543e5a1..ba15f1a04cc 100644 --- a/lisp/gnus/gnus-srvr.el +++ b/lisp/gnus/gnus-srvr.el @@ -262,8 +262,7 @@ The following commands are available: (setq mode-line-process nil) (buffer-disable-undo) (setq truncate-lines t) - (set (make-local-variable 'font-lock-defaults) - '(gnus-server-font-lock-keywords t))) + (setq-local font-lock-defaults '(gnus-server-font-lock-keywords t))) (defun gnus-server-insert-server-line (name method) diff --git a/lisp/gnus/gnus-start.el b/lisp/gnus/gnus-start.el index 615f8dfa877..d15fc8217ab 100644 --- a/lisp/gnus/gnus-start.el +++ b/lisp/gnus/gnus-start.el @@ -741,8 +741,7 @@ of an NNTP server to use. As opposed to \\[gnus], this command will not connect to the local server." (let ((val (or arg (1- gnus-level-default-subscribed)))) (gnus val t child) - (make-local-variable 'gnus-group-use-permanent-levels) - (setq gnus-group-use-permanent-levels val))) + (setq-local gnus-group-use-permanent-levels val))) (defun gnus-1 (&optional arg dont-connect child) "Read network news. @@ -875,13 +874,13 @@ If REGEXP is given, lines that match it will be deleted." (with-current-buffer (setq gnus-dribble-buffer (gnus-get-buffer-create (file-name-nondirectory dribble-file))) - (set (make-local-variable 'file-precious-flag) t) + (setq-local file-precious-flag t) (setq buffer-save-without-query t) (erase-buffer) (setq buffer-file-name dribble-file) ;; The buffer may be shrunk a lot when deleting old entries. ;; It caused the auto-saving to stop. - (set (make-local-variable 'auto-save-include-big-deletions) t) + (setq-local auto-save-include-big-deletions t) (auto-save-mode t) (buffer-disable-undo) (bury-buffer (current-buffer)) @@ -2763,8 +2762,7 @@ values from `gnus-newsrc-hashtb', and write a new value of ;; Save .newsrc.eld. (set-buffer (gnus-get-buffer-create " *Gnus-newsrc*")) - (make-local-variable 'version-control) - (setq version-control gnus-backup-startup-file) + (setq-local version-control gnus-backup-startup-file) (setq buffer-file-name (concat gnus-current-startup-file ".eld")) (setq default-directory (file-name-directory buffer-file-name)) @@ -2973,8 +2971,7 @@ SPECIFIC-VARIABLES, or those in `gnus-variable-list'." (when ranges (insert ","))))) (insert "\n"))) - (make-local-variable 'version-control) - (setq version-control 'never) + (setq-local version-control 'never) ;; It has been reported that sometime the modtime on the .newsrc ;; file seems to be off. We really do want to overwrite it, so ;; we clear the modtime here before saving. It's a bit odd, diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el index 469fa36fb77..8c826e88c73 100644 --- a/lisp/gnus/gnus-sum.el +++ b/lisp/gnus/gnus-sum.el @@ -3038,7 +3038,7 @@ When FORCE, rebuild the tool bar." ;; Need to set `gnus-summary-tool-bar-map' because `gnus-article-mode' ;; uses its value. (setq gnus-summary-tool-bar-map map)))) - (set (make-local-variable 'tool-bar-map) gnus-summary-tool-bar-map)) + (setq-local tool-bar-map gnus-summary-tool-bar-map)) (defun gnus-make-score-map (type) "Make a summary score map of type TYPE." @@ -3174,8 +3174,8 @@ The following commands are available: (make-local-variable 'gnus-original-article-buffer) (add-hook 'pre-command-hook #'gnus-set-global-variables nil t) (mm-enable-multibyte) - (set (make-local-variable 'bookmark-make-record-function) - #'gnus-summary-bookmark-make-record)) + (setq-local bookmark-make-record-function + #'gnus-summary-bookmark-make-record)) (defun gnus-summary-make-local-variables () "Make all the local summary buffer variables." @@ -3547,7 +3547,7 @@ Returns non-nil if the setup was successful." (let ((gnus-summary-mode-group group)) (gnus-summary-mode)) (when (gnus-group-quit-config group) - (set (make-local-variable 'gnus-single-article-buffer) nil)) + (setq-local gnus-single-article-buffer nil)) (turn-on-gnus-mailing-list-mode) ;; These functions don't currently depend on GROUP, but might in ;; the future. @@ -5670,8 +5670,8 @@ If SELECT-ARTICLES, only select those articles from GROUP." articles fetched-articles cached) (unless (gnus-check-server - (set (make-local-variable 'gnus-current-select-method) - (gnus-find-method-for-group group))) + (setq-local gnus-current-select-method + (gnus-find-method-for-group group))) (error "Couldn't open server")) (or (and entry (not (eq (car entry) t))) ; Either it's active... @@ -10638,7 +10638,7 @@ groups." (mime-to-mml current-handles)) (let ((mbl1 mml-buffer-list)) (setq mml-buffer-list mbl) - (set (make-local-variable 'mml-buffer-list) mbl1)) + (setq-local mml-buffer-list mbl1)) (add-hook 'kill-buffer-hook #'mml-destroy-buffers t t)))) `(lambda (no-highlight) (let ((mail-parse-charset ',gnus-newsgroup-charset) @@ -12846,8 +12846,7 @@ UNREAD is a sorted list." (and gnus-newsgroup-name (gnus-parameter-charset gnus-newsgroup-name)) gnus-default-charset)) - (set (make-local-variable 'gnus-newsgroup-ignored-charsets) - ignored-charsets)))) + (setq-local gnus-newsgroup-ignored-charsets ignored-charsets)))) ;;; ;;; Mime Commands diff --git a/lisp/gnus/gnus-topic.el b/lisp/gnus/gnus-topic.el index c913002f70b..75de1e031c3 100644 --- a/lisp/gnus/gnus-topic.el +++ b/lisp/gnus/gnus-topic.el @@ -1129,18 +1129,17 @@ articles in the topic and its subtopics." (gnus-topic-make-menu-bar)) (gnus-set-format 'topic t) (add-hook 'gnus-group-catchup-group-hook 'gnus-topic-update-topic) - (set (make-local-variable 'gnus-group-prepare-function) - 'gnus-group-prepare-topics) - (set (make-local-variable 'gnus-group-get-parameter-function) - 'gnus-group-topic-parameters) - (set (make-local-variable 'gnus-group-goto-next-group-function) - 'gnus-topic-goto-next-group) - (set (make-local-variable 'gnus-group-indentation-function) - 'gnus-topic-group-indentation) - (set (make-local-variable 'gnus-group-update-group-function) - 'gnus-topic-update-topics-containing-group) - (set (make-local-variable 'gnus-group-sort-alist-function) - 'gnus-group-sort-topic) + (setq-local gnus-group-prepare-function + 'gnus-group-prepare-topics) + (setq-local gnus-group-get-parameter-function + 'gnus-group-topic-parameters) + (setq-local gnus-group-goto-next-group-function + 'gnus-topic-goto-next-group) + (setq-local gnus-group-indentation-function + 'gnus-topic-group-indentation) + (setq-local gnus-group-update-group-function + 'gnus-topic-update-topics-containing-group) + (setq-local gnus-group-sort-alist-function 'gnus-group-sort-topic) (setq gnus-group-change-level-function 'gnus-topic-change-level) (setq gnus-goto-missing-group-function 'gnus-topic-goto-missing-group) (add-hook 'gnus-check-bogus-groups-hook 'gnus-topic-clean-alist diff --git a/lisp/gnus/gnus-undo.el b/lisp/gnus/gnus-undo.el index 3f2b5768db2..a852f20109e 100644 --- a/lisp/gnus/gnus-undo.el +++ b/lisp/gnus/gnus-undo.el @@ -100,8 +100,8 @@ \\{gnus-undo-mode-map}" :keymap gnus-undo-mode-map - (set (make-local-variable 'gnus-undo-actions) nil) - (set (make-local-variable 'gnus-undo-boundary) t) + (setq-local gnus-undo-actions nil) + (setq-local gnus-undo-boundary t) (when gnus-undo-mode ;; Set up the menu. (when (gnus-visual-p 'undo-menu 'menu) diff --git a/lisp/gnus/gnus.el b/lisp/gnus/gnus.el index c1cfddc87b3..2edda5f1fef 100644 --- a/lisp/gnus/gnus.el +++ b/lisp/gnus/gnus.el @@ -3175,8 +3175,7 @@ that that variable is buffer-local to the summary buffers." "Make mode lines a bit simpler." (setq mode-line-modified "--") (when (listp mode-line-format) - (make-local-variable 'mode-line-format) - (setq mode-line-format (copy-sequence mode-line-format)) + (setq-local mode-line-format (copy-sequence mode-line-format)) (when (equal (nth 3 mode-line-format) " ") (setcar (nthcdr 3 mode-line-format) " ")))) diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el index 2ab3eb62120..b6c1c0b0713 100644 --- a/lisp/gnus/message.el +++ b/lisp/gnus/message.el @@ -1155,7 +1155,7 @@ Note: Many newsgroups frown upon nontraditional reply styles. You probably want to set this variable only for specific groups, e.g. using `gnus-posting-styles': - (eval (set (make-local-variable \\='message-cite-reply-position) \\='above))" + (eval (setq-local message-cite-reply-position \\='above))" :version "24.1" :type '(choice (const :tag "Reply inline" traditional) (const :tag "Reply above" above) @@ -1172,7 +1172,7 @@ Presets to impersonate popular mail agents are found in the message-cite-style-* variables. This variable is intended for use in `gnus-posting-styles', such as: - ((posting-from-work-p) (eval (set (make-local-variable \\='message-cite-style) message-cite-style-outlook)))" + ((posting-from-work-p) (eval (setq-local message-cite-style message-cite-style-outlook)))" :version "24.1" :group 'message-insertion :type '(choice (const :tag "Do not override variables" :value nil) @@ -3078,44 +3078,43 @@ See also `message-forbidden-properties'." Like `text-mode', but with these additional commands: \\{message-mode-map}" - (set (make-local-variable 'message-reply-buffer) nil) - (set (make-local-variable 'message-inserted-headers) nil) - (set (make-local-variable 'message-send-actions) nil) - (set (make-local-variable 'message-return-action) nil) - (set (make-local-variable 'message-exit-actions) nil) - (set (make-local-variable 'message-kill-actions) nil) - (set (make-local-variable 'message-postpone-actions) nil) - (set (make-local-variable 'message-draft-article) nil) + (setq-local message-reply-buffer nil) + (setq-local message-inserted-headers nil) + (setq-local message-send-actions nil) + (setq-local message-return-action nil) + (setq-local message-exit-actions nil) + (setq-local message-kill-actions nil) + (setq-local message-postpone-actions nil) + (setq-local message-draft-article nil) (setq buffer-offer-save t) - (set (make-local-variable 'facemenu-add-face-function) + (setq-local facemenu-add-face-function (lambda (face end) (let ((face-fun (cdr (assq face message-face-alist)))) (if face-fun (funcall face-fun (point) end) (error "Face %s not configured for %s mode" face mode-name))) "")) - (set (make-local-variable 'facemenu-remove-face-function) t) - (set (make-local-variable 'message-reply-headers) nil) + (setq-local facemenu-remove-face-function t) + (setq-local message-reply-headers nil) (make-local-variable 'message-newsreader) (make-local-variable 'message-mailer) (make-local-variable 'message-post-method) - (set (make-local-variable 'message-sent-message-via) nil) - (set (make-local-variable 'message-checksum) nil) - (set (make-local-variable 'message-mime-part) 0) + (setq-local message-sent-message-via nil) + (setq-local message-checksum nil) + (setq-local message-mime-part 0) (message-setup-fill-variables) (when message-fill-column (setq fill-column message-fill-column) (turn-on-auto-fill)) ;; Allow using comment commands to add/remove quoting. - ;; (set (make-local-variable 'comment-start) message-yank-prefix) + ;; (setq-local comment-start message-yank-prefix) (when message-yank-prefix - (set (make-local-variable 'comment-start) message-yank-prefix) - (set (make-local-variable 'comment-start-skip) - (concat "^" (regexp-quote message-yank-prefix) "[ \t]*"))) - (set (make-local-variable 'font-lock-defaults) - '(message-font-lock-keywords t)) + (setq-local comment-start message-yank-prefix) + (setq-local comment-start-skip + (concat "^" (regexp-quote message-yank-prefix) "[ \t]*"))) + (setq-local font-lock-defaults '(message-font-lock-keywords t)) (if (boundp 'tool-bar-map) - (set (make-local-variable 'tool-bar-map) (message-make-tool-bar))) + (setq-local tool-bar-map (message-make-tool-bar))) ;; Mmmm... Forbidden properties... (add-hook 'after-change-functions #'message-strip-forbidden-properties nil 'local) @@ -3134,45 +3133,41 @@ Like `text-mode', but with these additional commands: ;; Don't enable multibyte on an indirect buffer. Maybe enabling ;; multibyte is not necessary at all. -- zsh (mm-enable-multibyte)) - (set (make-local-variable 'indent-tabs-mode) nil) ;No tabs for indentation. + (setq-local indent-tabs-mode nil) ; No tabs for indentation. (mml-mode) ;; Syntactic fontification. Helps `show-paren-mode', ;; `electric-pair-mode', and C-M-* navigation by syntactically ;; excluding citations and other artifacts. ;; - (set (make-local-variable 'syntax-propertize-function) 'message--syntax-propertize) - (set (make-local-variable 'parse-sexp-ignore-comments) t) + (setq-local syntax-propertize-function 'message--syntax-propertize) + (setq-local parse-sexp-ignore-comments t) (setq-local message-encoded-mail-cache nil)) (defun message-setup-fill-variables () "Setup message fill variables." - (set (make-local-variable 'fill-paragraph-function) - 'message-fill-paragraph) - (make-local-variable 'paragraph-separate) - (make-local-variable 'paragraph-start) - (make-local-variable 'adaptive-fill-regexp) + (setq-local fill-paragraph-function 'message-fill-paragraph) (make-local-variable 'adaptive-fill-first-line-regexp) (let ((quote-prefix-regexp ;; User should change message-cite-prefix-regexp if ;; message-yank-prefix is set to an abnormal value. (concat "\\(" message-cite-prefix-regexp "\\)[ \t]*"))) - (setq paragraph-start - (concat - (regexp-quote mail-header-separator) "$\\|" - "[ \t]*$\\|" ; blank lines - "-- $\\|" ; signature delimiter - "---+$\\|" ; delimiters for forwarded messages - page-delimiter "$\\|" ; spoiler warnings - ".*wrote:$\\|" ; attribution lines - quote-prefix-regexp "$\\|" ; empty lines in quoted text - ; mml tags - "<#!*/?\\(multipart\\|part\\|external\\|mml\\|secure\\)")) - (setq paragraph-separate paragraph-start) - (setq adaptive-fill-regexp - (concat quote-prefix-regexp "\\|" adaptive-fill-regexp)) - (setq adaptive-fill-first-line-regexp - (concat quote-prefix-regexp "\\|" - adaptive-fill-first-line-regexp))) + (setq-local paragraph-start + (concat + (regexp-quote mail-header-separator) "$\\|" + "[ \t]*$\\|" ; blank lines + "-- $\\|" ; signature delimiter + "---+$\\|" ; delimiters for forwarded messages + page-delimiter "$\\|" ; spoiler warnings + ".*wrote:$\\|" ; attribution lines + quote-prefix-regexp "$\\|" ; empty lines in quoted text + ; mml tags + "<#!*/?\\(multipart\\|part\\|external\\|mml\\|secure\\)")) + (setq-local paragraph-separate paragraph-start) + (setq-local adaptive-fill-regexp + (concat quote-prefix-regexp "\\|" adaptive-fill-regexp)) + (setq-local adaptive-fill-first-line-regexp + (concat quote-prefix-regexp "\\|" + adaptive-fill-first-line-regexp))) (setq-local auto-fill-inhibit-regexp nil) (setq-local normal-auto-fill-function 'message-do-auto-fill)) diff --git a/lisp/gnus/mm-view.el b/lisp/gnus/mm-view.el index ca610010917..015bc79f455 100644 --- a/lisp/gnus/mm-view.el +++ b/lisp/gnus/mm-view.el @@ -486,7 +486,7 @@ If MODE is not set, try to find mode automatically." ;; support modes, but now that we use font-lock-ensure, support modes ;; aren't a problem any more. So we could probably get rid of this ;; setting now, but it seems harmless and potentially still useful. - (set (make-local-variable 'font-lock-mode-hook) nil) + (setq-local font-lock-mode-hook nil) (setq buffer-file-name (mm-handle-filename handle)) (with-demoted-errors (if mode diff --git a/lisp/gnus/mml.el b/lisp/gnus/mml.el index 067396fc2a6..47dcb54562c 100644 --- a/lisp/gnus/mml.el +++ b/lisp/gnus/mml.el @@ -1266,8 +1266,8 @@ See Info node `(emacs-mime)Composing'. :lighter " MML" :keymap mml-mode-map (when mml-mode (when (boundp 'dnd-protocol-alist) - (set (make-local-variable 'dnd-protocol-alist) - (append mml-dnd-protocol-alist dnd-protocol-alist))))) + (setq-local dnd-protocol-alist + (append mml-dnd-protocol-alist dnd-protocol-alist))))) ;;; ;;; Helper functions for reading MIME stuff from the minibuffer and diff --git a/lisp/gnus/nndiary.el b/lisp/gnus/nndiary.el index ccd17744993..ef520704123 100644 --- a/lisp/gnus/nndiary.el +++ b/lisp/gnus/nndiary.el @@ -1002,10 +1002,10 @@ all. This may very well take some time.") (let ((buffer (gnus-get-buffer-create (format " *nndiary overview %s*" group)))) (with-current-buffer buffer - (set (make-local-variable 'nndiary-nov-buffer-file-name) - (expand-file-name - nndiary-nov-file-name - (nnmail-group-pathname group nndiary-directory))) + (setq-local nndiary-nov-buffer-file-name + (expand-file-name + nndiary-nov-file-name + (nnmail-group-pathname group nndiary-directory))) (erase-buffer) (when (file-exists-p nndiary-nov-buffer-file-name) (nnheader-insert-file-contents nndiary-nov-buffer-file-name))) diff --git a/lisp/gnus/nnfolder.el b/lisp/gnus/nnfolder.el index 6ff99056d84..b7bfd9afd05 100644 --- a/lisp/gnus/nnfolder.el +++ b/lisp/gnus/nnfolder.el @@ -1083,7 +1083,7 @@ This command does not work if you use short group names." (let ((coding-system-for-write (or nnfolder-file-coding-system-for-write nnfolder-file-coding-system))) - (set (make-local-variable 'copyright-update) nil) + (setq-local copyright-update nil) (save-buffer))) (unless (or gnus-nov-is-evil nnfolder-nov-is-evil) (nnfolder-save-nov)))) @@ -1098,8 +1098,8 @@ This command does not work if you use short group names." (or (cdr (assoc group nnfolder-nov-buffer-alist)) (let ((buffer (gnus-get-buffer-create (format " *nnfolder overview %s*" group)))) (with-current-buffer buffer - (set (make-local-variable 'nnfolder-nov-buffer-file-name) - (nnfolder-group-nov-pathname group)) + (setq-local nnfolder-nov-buffer-file-name + (nnfolder-group-nov-pathname group)) (erase-buffer) (when (file-exists-p nnfolder-nov-buffer-file-name) (nnheader-insert-file-contents nnfolder-nov-buffer-file-name))) diff --git a/lisp/gnus/nnheader.el b/lisp/gnus/nnheader.el index 2952e20928b..c97622114dc 100644 --- a/lisp/gnus/nnheader.el +++ b/lisp/gnus/nnheader.el @@ -568,7 +568,7 @@ the line could be found." (mm-enable-multibyte) (kill-all-local-variables) (setq case-fold-search t) ;Should ignore case. - (set (make-local-variable 'nntp-process-response) nil) + (setq-local nntp-process-response nil) t)) ;;; Various functions the backends use. diff --git a/lisp/gnus/nnimap.el b/lisp/gnus/nnimap.el index c8b700ebcc6..61693a08b98 100644 --- a/lisp/gnus/nnimap.el +++ b/lisp/gnus/nnimap.el @@ -376,10 +376,10 @@ during splitting, which may be slow." (mm-disable-multibyte) (buffer-disable-undo) (gnus-add-buffer) - (set (make-local-variable 'after-change-functions) nil) ;FIXME: Why? - (set (make-local-variable 'nnimap-object) - (make-nnimap :server (nnoo-current-server 'nnimap) - :initial-resync 0)) + (setq-local after-change-functions nil) ;FIXME: Why? + (setq-local nnimap-object + (make-nnimap :server (nnoo-current-server 'nnimap) + :initial-resync 0)) (push (list buffer (current-buffer)) nnimap-connection-alist) (push (current-buffer) nnimap-process-buffers) (current-buffer))) diff --git a/lisp/gnus/nnml.el b/lisp/gnus/nnml.el index ad608b6575e..c648e3aae7c 100644 --- a/lisp/gnus/nnml.el +++ b/lisp/gnus/nnml.el @@ -778,8 +778,8 @@ article number. This function is called narrowed to an article." group))) (file-name-coding-system nnmail-pathname-coding-system)) (with-current-buffer buffer - (set (make-local-variable 'nnml-nov-buffer-file-name) - (nnmail-group-pathname group nnml-directory nnml-nov-file-name)) + (setq-local nnml-nov-buffer-file-name + (nnmail-group-pathname group nnml-directory nnml-nov-file-name)) (erase-buffer) (when (and (not incrementalp) (file-exists-p nnml-nov-buffer-file-name)) |