]> git.eshelyaron.com Git - emacs.git/commitdiff
Prefer setq-local in most files
authorStefan Kangas <stefan@marxist.se>
Wed, 9 Dec 2020 08:44:38 +0000 (09:44 +0100)
committerStefan Kangas <stefan@marxist.se>
Wed, 9 Dec 2020 10:58:38 +0000 (11:58 +0100)
* lisp/apropos.el (apropos-print):
* lisp/buff-menu.el (Buffer-menu-mode):
* lisp/calc/calc.el (calc-trail-buffer):
* lisp/chistory.el (command-history-mode):
* lisp/dabbrev.el:
* lisp/dframe.el (dframe-frame-mode):
* lisp/doc-view.el (doc-view-presentation-mode):
* lisp/ebuff-menu.el (electric-buffer-menu-mode)
(electric-buffer-update-highlight):
* lisp/edmacro.el (edit-kbd-macro):
* lisp/face-remap.el (buffer-face-set, buffer-face-toggle):
* lisp/files.el:
(find-file-noselect-1, hack-local-variables-confirm)
(set-visited-file-name, revert-buffer--default):
* lisp/filesets.el (filesets-spawn-external-viewer):
* lisp/find-dired.el (find-dired):
* lisp/find-lisp.el (find-lisp-find-dired-internal):
* lisp/finder.el (finder-mode):
* lisp/font-core.el (font-lock-default-function):
* lisp/format.el (format-annotate-function):
* lisp/help-fns.el (describe-variable):
* lisp/help-mode.el (help-mode):
* lisp/icomplete.el (icomplete-minibuffer-setup)
(icomplete--in-region-setup):
* lisp/ido.el (ido-completion-help, ido-tidy):
* lisp/international/robin.el (robin-activate):
* lisp/leim/quail/hangul.el (hangul-input-method-activate):
* lisp/leim/quail/uni-input.el (ucs-input-activate):
* lisp/man.el (Man-mode):
* lisp/master.el (master-set-slave):
* lisp/minibuffer.el (minibuffer-completion-help)
(read-file-name-default):
* lisp/outline.el (outline-minor-mode):
* lisp/pcomplete.el (pcomplete-comint-setup):
* lisp/proced.el (proced-mode):
* lisp/recentf.el (recentf-edit-list, recentf-open-files-items):
* lisp/replace.el (occur-1):
* lisp/reveal.el (reveal-mode):
* lisp/ruler-mode.el (ruler--save-header-line-format):
* lisp/scroll-lock.el (scroll-lock-mode):
* lisp/startup.el (normal-top-level, normal-splash-screen):
* lisp/strokes.el (strokes-list-strokes):
* lisp/thumbs.el (thumbs-insert-image, thumbs-show-thumbs-list):
* lisp/tree-widget.el (tree-widget-set-theme):
* lisp/window.el (read-buffer-to-switch):
* lisp/xwidget.el (xwidget-webkit-begin-edit-textarea): Prefer
setq-local.

41 files changed:
lisp/apropos.el
lisp/buff-menu.el
lisp/calc/calc.el
lisp/chistory.el
lisp/dabbrev.el
lisp/dframe.el
lisp/doc-view.el
lisp/ebuff-menu.el
lisp/edmacro.el
lisp/face-remap.el
lisp/files.el
lisp/filesets.el
lisp/find-dired.el
lisp/find-lisp.el
lisp/finder.el
lisp/font-core.el
lisp/format.el
lisp/help-fns.el
lisp/help-mode.el
lisp/icomplete.el
lisp/ido.el
lisp/international/robin.el
lisp/leim/quail/hangul.el
lisp/leim/quail/uni-input.el
lisp/man.el
lisp/master.el
lisp/minibuffer.el
lisp/outline.el
lisp/pcomplete.el
lisp/proced.el
lisp/recentf.el
lisp/replace.el
lisp/reveal.el
lisp/ruler-mode.el
lisp/scroll-lock.el
lisp/startup.el
lisp/strokes.el
lisp/thumbs.el
lisp/tree-widget.el
lisp/window.el
lisp/xwidget.el

index 595db1d2f8e3da79bb2d0df713b7dcd63469cb21..97314cc489fb01461ff055851604bcd7b40bc513 100644 (file)
@@ -1225,8 +1225,8 @@ as a heading."
          (apropos-print-doc 6 'apropos-face t)
          (apropos-print-doc 5 'apropos-widget t)
          (apropos-print-doc 4 'apropos-plist nil))
-        (set (make-local-variable 'truncate-partial-width-windows) t)
-        (set (make-local-variable 'truncate-lines) t))))
+        (setq-local truncate-partial-width-windows t)
+        (setq-local truncate-lines t))))
   (prog1 apropos-accumulator
     (setq apropos-accumulator ())))    ; permit gc
 
index d06ba287879a3eaa304836076e9fb221a7441318..5392519d7181dbd76c6b0303bc5d3ce292830409 100644 (file)
@@ -269,8 +269,8 @@ In Buffer Menu mode, the following commands are defined:
 \\[revert-buffer]    Update the list of buffers.
 \\[Buffer-menu-toggle-files-only]    Toggle whether the menu displays only file buffers.
 \\[Buffer-menu-bury]    Bury the buffer listed on this line."
-  (set (make-local-variable 'buffer-stale-function)
-       (lambda (&optional _noconfirm) 'fast))
+  (setq-local buffer-stale-function
+              (lambda (&optional _noconfirm) 'fast))
   (add-hook 'tabulated-list-revert-hook 'list-buffers--refresh nil t))
 
 (defun buffer-menu (&optional arg)
index 9d869f359bce8418e15b572dbebeea6e672ce955..bb02281111f552ea13322be95f385654240daafa 100644 (file)
@@ -2100,7 +2100,7 @@ the United States."
           (set-buffer calc-trail-buffer)
           (unless (derived-mode-p 'calc-trail-mode)
              (calc-trail-mode)
-             (set (make-local-variable 'calc-main-buffer) buf)))))
+             (setq-local calc-main-buffer buf)))))
   (or (and calc-trail-pointer
           (eq (marker-buffer calc-trail-pointer) calc-trail-buffer))
       (with-current-buffer calc-trail-buffer
index c9aa927b94f4863497115ace268de18fce450609..98443bfa88ff2d95a48f95266ae26dc169663736 100644 (file)
@@ -140,7 +140,7 @@ The buffer is left in Command History mode."
 Keybindings:
 \\{command-history-mode-map}"
   (lisp-mode-variables nil)
-  (set (make-local-variable 'revert-buffer-function) 'command-history-revert)
+  (setq-local revert-buffer-function 'command-history-revert)
   (set-syntax-table emacs-lisp-mode-syntax-table))
 
 (defcustom command-history-hook nil
index a9df031421548263028a655f80f250824a40cd52..c8bb749eb3808e357c441c1deef4a1b49cd1f17a 100644 (file)
@@ -45,7 +45,7 @@
 ;; dabbrev-case-replace                nil             t
 ;;
 ;; Set the variables you want special for your mode like this:
-;; (set (make-local-variable 'dabbrev-case-replace) nil)
+;; (setq-local dabbrev-case-replace nil)
 ;; Then you don't interfere with other modes.
 ;;
 ;; If your mode handles buffers that refers to other buffers
 
 ;; Example for GNUS (when we write a reply, we want dabbrev to look in
 ;; the article for expansion):
-;; (set (make-local-variable 'dabbrev-friend-buffer-function)
-;;      (lambda (buffer)
-;;         (with-current-buffer buffer
-;;           (memq major-mode '(news-reply-mode gnus-article-mode)))))
+;; (setq-local dabbrev-friend-buffer-function
+;;             (lambda (buffer)
+;;                (with-current-buffer buffer
+;;                  (memq major-mode '(news-reply-mode gnus-article-mode)))))
 
 
 ;; Known bugs and limitations.
index 417477be27bf0fb0209eddfbe98f854d7c663c07..31e571410bc61a2841a8ea0e284327d864efabc4 100644 (file)
@@ -280,7 +280,7 @@ CREATE-HOOK is a hook to run after creating a frame."
 
       ;; Enable mouse tracking in emacs
       (if dframe-track-mouse-function
-         (set (make-local-variable 'track-mouse) t)) ;this could be messy.
+          (setq-local track-mouse t)) ;this could be messy.
 
       ;; Override `temp-buffer-show-hook' so that help and such
       ;; put their stuff into a frame other than our own.
@@ -290,10 +290,8 @@ CREATE-HOOK is a hook to run after creating a frame."
          ;; FIXME: Doesn't this get us into an inf-loop when the
           ;; `temp-buffer-show-function' runs `temp-buffer-show-hook'
           ;; (as is normally the case)?
-         (progn (make-local-variable 'temp-buffer-show-hook)
-                (setq temp-buffer-show-hook temp-buffer-show-function)))
-      (make-local-variable 'temp-buffer-show-function)
-      (setq temp-buffer-show-function 'dframe-temp-buffer-show-function)
+          (setq-local temp-buffer-show-hook temp-buffer-show-function))
+      (setq-local temp-buffer-show-function 'dframe-temp-buffer-show-function)
       ;; If this buffer is killed, we must make sure that we destroy
       ;; the frame the dedicated window is in.
       (add-hook 'kill-buffer-hook (lambda ()
index 9997c1ae7b80adfd8201ff55d9e22d33cdf1c3c9..f7a7be96b3d8a7ea5b1558c05934bd9cd9cc1604 100644 (file)
@@ -2055,7 +2055,7 @@ See the command `doc-view-mode' for more information on this mode."
   :init-value nil :keymap doc-view-presentation-mode-map
   (if doc-view-presentation-mode
       (progn
-        (set (make-local-variable 'mode-line-format) nil)
+        (setq-local mode-line-format nil)
         (doc-view-fit-page-to-window)
         ;; (doc-view-convert-all-pages)
         )
index 079fce88defd93aa19b42b4d7df53f747a32b1cd..cf7b28a1e80ee9874cc38f4ef79f94726d8982a4 100644 (file)
@@ -202,8 +202,7 @@ Electric Buffer Menu mode is a minor mode which is automatically
 enabled and disabled by the \\[electric-buffer-list] command.
 See the documentation of `electric-buffer-list' for details."
   (setq mode-line-buffer-identification "Electric Buffer List")
-  (set (make-local-variable 'Helper-return-blurb)
-       "return to buffer editing"))
+  (setq-local Helper-return-blurb "return to buffer editing"))
 
 (define-obsolete-function-alias 'Electric-buffer-menu-mode
   'electric-buffer-menu-mode "24.3")
@@ -270,8 +269,8 @@ Return to Electric Buffer Menu when done."
   (when (derived-mode-p 'electric-buffer-menu-mode)
     ;; Make sure we have an overlay to use.
     (or electric-buffer-overlay
-       (set (make-local-variable 'electric-buffer-overlay)
-            (make-overlay (point) (point))))
+        (setq-local electric-buffer-overlay
+                    (make-overlay (point) (point))))
     (move-overlay electric-buffer-overlay
                  (line-beginning-position)
                  (line-end-position))
index 44cf5aad387886ac3264cdaaa6f156720371a699..8ff766cee99bb3c2ccf3d6d8c5cc049d59ac66da 100644 (file)
@@ -151,9 +151,9 @@ With a prefix argument, format the macro in a more concise way."
        (setq buffer-read-only nil)
        (setq major-mode 'edmacro-mode)
        (setq mode-name "Edit Macro")
-       (set (make-local-variable 'edmacro-original-buffer) oldbuf)
-       (set (make-local-variable 'edmacro-finish-hook) finish-hook)
-       (set (make-local-variable 'edmacro-store-hook) store-hook)
+        (setq-local edmacro-original-buffer oldbuf)
+        (setq-local edmacro-finish-hook finish-hook)
+        (setq-local edmacro-store-hook store-hook)
        (erase-buffer)
        (insert ";; Keyboard Macro Editor.  Press C-c C-c to finish; "
                "press C-x k RET to cancel.\n")
index 4ccd463aff22d1e6a87923c783bf6a43dd944805..13bbb5284a3222e89620d99f919b8bb3f7cb4682 100644 (file)
@@ -446,7 +446,7 @@ local, and sets it to FACE."
     (setq specs (car specs)))
   (if (null specs)
       (buffer-face-mode 0)
-    (set (make-local-variable 'buffer-face-mode-face) specs)
+    (setq-local buffer-face-mode-face specs)
     (buffer-face-mode t)))
 
 ;;;###autoload
@@ -470,7 +470,7 @@ buffer local, and set it to SPECS."
   (if (or (null specs)
          (and buffer-face-mode (equal buffer-face-mode-face specs)))
       (buffer-face-mode 0)
-    (set (make-local-variable 'buffer-face-mode-face) specs)
+    (setq-local buffer-face-mode-face specs)
     (buffer-face-mode t)))
 
 (defun buffer-face-mode-invoke (specs arg &optional interactive)
index 2cf77d5d7e9830de354eebe912356bcaa989c496..a89d39e784de3ff5d7e8a041c7d7f7b426ef8a22 100644 (file)
@@ -597,7 +597,7 @@ settings being applied, but still respect file-local ones.")
 
 ;; This is an odd variable IMO.
 ;; You might wonder why it is needed, when we could just do:
-;; (set (make-local-variable 'enable-local-variables) nil)
+;; (setq-local enable-local-variables nil)
 ;; These two are not precisely the same.
 ;; Setting this variable does not cause -*- mode settings to be
 ;; ignored, whereas setting enable-local-variables does.
@@ -2419,9 +2419,7 @@ Do you want to revisit the file normally now? ")))
       ;; this is a permanent local, the major mode won't eliminate it.
       (and backup-enable-predicate
           (not (funcall backup-enable-predicate buffer-file-name))
-          (progn
-            (make-local-variable 'backup-inhibited)
-            (setq backup-inhibited t)))
+           (setq-local backup-inhibited t))
       (if rawfile
          (progn
            (set-buffer-multibyte nil)
@@ -3520,7 +3518,7 @@ n  -- to ignore the local variables list.")
          (let ((print-escape-newlines t))
            (prin1 (cdr elt) buf))
          (insert "\n"))
-       (set (make-local-variable 'cursor-type) nil)
+        (setq-local cursor-type nil)
        (set-buffer-modified-p nil)
        (goto-char (point-min)))
 
@@ -4492,9 +4490,7 @@ the old visited file has been renamed to the new name FILENAME."
     (and buffer-file-name
         backup-enable-predicate
         (not (funcall backup-enable-predicate buffer-file-name))
-        (progn
-          (make-local-variable 'backup-inhibited)
-          (setq backup-inhibited t)))
+         (setq-local backup-inhibited t))
     (let ((oauto buffer-auto-save-file-name))
       (cond ((null filename)
             (setq buffer-auto-save-file-name nil))
@@ -6219,7 +6215,7 @@ Non-file buffers need a custom function."
                ;; Run after-revert-hook as it was before we reverted.
                (setq-default revert-buffer-internal-hook global-hook)
                (if local-hook
-                   (set (make-local-variable 'revert-buffer-internal-hook)
+                   (setq-local revert-buffer-internal-hook
                         local-hook)
                  (kill-local-variable 'revert-buffer-internal-hook))
                (run-hooks 'revert-buffer-internal-hook))
index 883871c4d804bd5b86bc82066f24b97c5bf422ab..62dc5a54d5310ee48ee54dae88df0e9a246a688d 100644 (file)
@@ -1336,8 +1336,7 @@ Use the viewer defined in EV-ENTRY (a valid element of
              (progn
                (switch-to-buffer (format "Filesets: %s %s" vwr file))
                (insert output)
-               (make-local-variable 'filesets-output-buffer-flag)
-               (setq filesets-output-buffer-flag t)
+                (setq-local filesets-output-buffer-flag t)
                (set-visited-file-name file t)
                (when oh
                  (run-hooks 'oh))
index 18330d821ce9c7c45333c5f157bd96b9e0f58a3a..d2b82bdd51c8e12ee3ded9add3af2ac34784fd47 100644 (file)
@@ -223,11 +223,10 @@ it finishes, type \\[kill-find]."
       (set-keymap-parent map (current-local-map))
       (define-key map "\C-c\C-k" 'kill-find)
       (use-local-map map))
-    (make-local-variable 'dired-sort-inhibit)
-    (setq dired-sort-inhibit t)
-    (set (make-local-variable 'revert-buffer-function)
-        `(lambda (ignore-auto noconfirm)
-           (find-dired ,dir ,find-args)))
+    (setq-local dired-sort-inhibit t)
+    (setq-local revert-buffer-function
+                `(lambda (ignore-auto noconfirm)
+                   (find-dired ,dir ,find-args)))
     ;; Set subdir-alist so that Tree Dired will work:
     (if (fboundp 'dired-simple-subdir-alist)
        ;; will work even with nested dired format (dired-nstd.el,v 1.15
@@ -235,9 +234,9 @@ it finishes, type \\[kill-find]."
        (dired-simple-subdir-alist)
       ;; else we have an ancient tree dired (or classic dired, where
       ;; this does no harm)
-      (set (make-local-variable 'dired-subdir-alist)
-          (list (cons default-directory (point-min-marker)))))
-    (set (make-local-variable 'dired-subdir-switches) find-ls-subdir-switches)
+      (setq-local dired-subdir-alist
+                  (list (cons default-directory (point-min-marker)))))
+    (setq-local dired-subdir-switches find-ls-subdir-switches)
     (setq buffer-read-only nil)
     ;; Subdir headlerline must come first because the first marker in
     ;; subdir-alist points there.
index c1be5ff403d152b39748f3b2c9d3fcb3e5a83b02..44a2e6d7371c75299e828ac48066be1898002414 100644 (file)
@@ -212,21 +212,17 @@ It is a function which takes two arguments, the directory and its parent."
 
     (use-local-map (append (make-sparse-keymap) (current-local-map)))
 
-    (make-local-variable 'find-lisp-file-predicate)
-    (setq find-lisp-file-predicate file-predicate)
-    (make-local-variable 'find-lisp-directory-predicate)
-    (setq find-lisp-directory-predicate directory-predicate)
-    (make-local-variable 'find-lisp-regexp)
-    (setq find-lisp-regexp regexp)
-
-    (make-local-variable 'revert-buffer-function)
-    (setq revert-buffer-function
-          (lambda (_ignore1 _ignore2)
-            (find-lisp-insert-directory
-             default-directory
-             find-lisp-file-predicate
-             find-lisp-directory-predicate
-             'ignore)))
+    (setq-local find-lisp-file-predicate file-predicate)
+    (setq-local find-lisp-directory-predicate directory-predicate)
+    (setq-local find-lisp-regexp regexp)
+
+    (setq-local revert-buffer-function
+                (lambda (_ignore1 _ignore2)
+                  (find-lisp-insert-directory
+                   default-directory
+                   find-lisp-file-predicate
+                   find-lisp-directory-predicate
+                   'ignore)))
 
     ;; Set subdir-alist so that Tree Dired will work:
     (if (fboundp 'dired-simple-subdir-alist)
@@ -235,8 +231,8 @@ It is a function which takes two arguments, the directory and its parent."
        (dired-simple-subdir-alist)
       ;; else we have an ancient tree dired (or classic dired, where
       ;; this does no harm)
-      (set (make-local-variable 'dired-subdir-alist)
-          (list (cons default-directory (point-min-marker)))))
+      (setq-local dired-subdir-alist
+                  (list (cons default-directory (point-min-marker)))))
     (find-lisp-insert-directory
      dir file-predicate directory-predicate 'ignore)
     (goto-char (point-min))
index a59a185cc9b263b99a492fa2de085183fefc2050..98859f6a3954f056bde4bae2fdcee53d20fdd174 100644 (file)
@@ -448,7 +448,7 @@ FILE should be in a form suitable for passing to `locate-library'."
   :syntax-table finder-mode-syntax-table
   (setq buffer-read-only t
        buffer-undo-list t)
-  (set (make-local-variable 'finder-headmark) nil))
+  (setq-local finder-headmark nil))
 
 (defun finder-summary ()
   "Summarize basic Finder commands."
index 098253eb1626be5a07427dda294a8888cea1bb85..1b15d8cd30e38d506dd972b25bcb4f1710be8e3d 100644 (file)
@@ -160,8 +160,8 @@ this function onto `change-major-mode-hook'."
 (defun font-lock-default-function (mode)
   ;; Turn on Font Lock mode.
   (when mode
-    (set (make-local-variable 'char-property-alias-alist)
-        (copy-tree char-property-alias-alist))
+    (setq-local char-property-alias-alist
+                (copy-tree char-property-alias-alist))
     ;; Add `font-lock-face' as an alias for the `face' property.
     (let ((elt (assq 'face char-property-alias-alist)))
       (if elt
@@ -171,8 +171,8 @@ this function onto `change-major-mode-hook'."
   ;; Turn off Font Lock mode.
   (unless mode
     ;; Remove `font-lock-face' as an alias for the `face' property.
-    (set (make-local-variable 'char-property-alias-alist)
-        (copy-tree char-property-alias-alist))
+    (setq-local char-property-alias-alist
+                (copy-tree char-property-alias-alist))
     (let ((elt (assq 'face char-property-alias-alist)))
       (when elt
        (setcdr elt (remq 'font-lock-face (cdr elt)))
index 905ca2d9ec97c41bd6f931ecccc1d1923a3b08be..16456eb5877f3e6f01f334aacf4d366f1767db9a 100644 (file)
@@ -237,9 +237,8 @@ For most purposes, consider using `format-encode-region' instead."
                   ;; delete the buffer once the write is done, but do
                   ;; it after running to-fn so it doesn't affect
                   ;; write-region calls in to-fn.
-                  (set (make-local-variable
-                        'write-region-post-annotation-function)
-                       'kill-buffer)))
+                  (setq-local write-region-post-annotation-function
+                              #'kill-buffer)))
              nil)
          ;; Otherwise just call function, it will return annotations.
          (funcall to-fn from to orig-buf)))))
index 1c55d0ed79a76de28b14e12b3f99b2ba26c9f2f5..043c79f39004a4eae683bba49728620a36476c3a 100644 (file)
@@ -1137,8 +1137,7 @@ it is displayed along with the global value."
                (when (looking-at "value is") (replace-match ""))
                (save-excursion
                  (insert "\n\nValue:")
-                 (set (make-local-variable 'help-button-cache)
-                      (point-marker)))
+                  (setq-local help-button-cache (point-marker)))
                (insert "value is shown ")
                (insert-button "below"
                               'action help-button-cache
index 732e6cc28dd38f3ade03eb2fbe78b7ccffe98bf6..025a67016b63b3b63cae6508c1af6ae33b415d4c 100644 (file)
@@ -319,10 +319,10 @@ The format is (FUNCTION ARGS...).")
 Entry to this mode runs the normal hook `help-mode-hook'.
 Commands:
 \\{help-mode-map}"
-  (set (make-local-variable 'revert-buffer-function)
-       'help-mode-revert-buffer)
-  (set (make-local-variable 'bookmark-make-record-function)
-       'help-bookmark-make-record))
+  (setq-local revert-buffer-function
+              #'help-mode-revert-buffer)
+  (setq-local bookmark-make-record-function
+              #'help-bookmark-make-record))
 
 ;;;###autoload
 (defun help-mode-setup ()
index 676917b9da53a0bf066a262f6f344d6025d66b5e..0fdacd0a3c6f0987207e64afa05999797b827cf3 100644 (file)
@@ -441,7 +441,7 @@ Conditions are:
   "Run in minibuffer on activation to establish incremental completion.
 Usually run by inclusion in `minibuffer-setup-hook'."
   (when (and icomplete-mode (icomplete-simple-completing-p))
-    (set (make-local-variable 'completion-show-inline-help) nil)
+    (setq-local completion-show-inline-help nil)
     (use-local-map (make-composed-keymap icomplete-minibuffer-map
                                         (current-local-map)))
     (add-hook 'pre-command-hook  #'icomplete-pre-command-hook  nil t)
@@ -464,7 +464,7 @@ Usually run by inclusion in `minibuffer-setup-hook'."
   (when (and completion-in-region-mode
             icomplete-mode (icomplete-simple-completing-p))
     (setq icomplete--in-region-buffer (current-buffer))
-    (set (make-local-variable 'completion-show-inline-help) nil)
+    (setq-local completion-show-inline-help nil)
     (let ((tem (assq 'completion-in-region-mode
                     minor-mode-overriding-map-alist)))
       (unless (memq icomplete-minibuffer-map (cdr tem))
index c83b700e656dc94432d98fa831d73a2c5d0645a7..5758d3fdeacb6ccb5a32737c490f91331c57813c 100644 (file)
@@ -3966,7 +3966,7 @@ If `ido-change-word-sub' cannot be found in WORD, return nil."
                      (boundp 'ido-completion-buffer-full))
                  (set-window-start win (point-min))
                (with-no-warnings
-                 (set (make-local-variable 'ido-completion-buffer-full) t))
+                  (setq-local ido-completion-buffer-full t))
                (setq full-list t
                      display-it t))
            (scroll-other-window))
@@ -4810,8 +4810,7 @@ Modified from `icomplete-completions'."
            (delete-region ido-eoinput (point-max))))
 
       ;; Reestablish the local variable 'cause minibuffer-setup is weird:
-      (make-local-variable 'ido-eoinput)
-      (setq ido-eoinput 1))))
+      (setq-local ido-eoinput 1))))
 
 (defun ido-summary-buffers-to-end ()
   ;; Move the summaries to the end of the buffer list.
index 94d2bf180889a6d7bd6c3d4cf8980251dfa16290..16cac07c773c51ffbcc74e8b44cfe66cd3f330b4 100644 (file)
@@ -424,8 +424,7 @@ While this input method is active, the variable
        (add-hook 'minibuffer-exit-hook 'robin-exit-from-minibuffer))
     (run-hooks 'input-method-activate-hook
               'robin-activate-hook)
-    (set (make-local-variable 'input-method-function)
-        'robin-input-method)))
+    (setq-local input-method-function 'robin-input-method)))
 
 (define-obsolete-variable-alias
   'robin-inactivate-hook
index b8562556eff3fc9b9684340418a38aac7ab42b05..16f8de9cfbef1b366134b843878df740073c5407 100644 (file)
@@ -525,7 +525,7 @@ HELP-TEXT is a text set in `hangul-input-method-help-text'."
   (quail-delete-overlays)
   (if (eq (selected-window) (minibuffer-window))
       (add-hook 'minibuffer-exit-hook 'quail-exit-from-minibuffer))
-  (set (make-local-variable 'input-method-function) func))
+  (setq-local input-method-function func))
 
 (defun hangul-input-method-deactivate ()
   "Deactivate the current Hangul input method."
index 6f1fbcc9e5a40605c1ccf87b90a210304ac75f90..bee73d8e743ff08052fae0361d4abe08093c0953 100644 (file)
@@ -105,8 +105,7 @@ While this input method is active, the variable
     (quail-delete-overlays)
     (if (eq (selected-window) (minibuffer-window))
        (add-hook 'minibuffer-exit-hook 'quail-exit-from-minibuffer))
-    (set (make-local-variable 'input-method-function)
-        'ucs-input-method)))
+    (setq-local input-method-function 'ucs-input-method)))
 
 (defun ucs-input-deactivate ()
   "Deactivate UCS input method."
index 991b1bb60e599ac6e99e21a2451cf33cab2ef908..8430201c562572147cf8271022463e1feec56da9 100644 (file)
@@ -1583,10 +1583,10 @@ The following key bindings are currently in effect in the buffer:
   (auto-fill-mode -1)
   (setq imenu-generic-expression (list (list nil Man-heading-regexp 0)))
   (imenu-add-to-menubar man-imenu-title)
-  (set (make-local-variable 'outline-regexp) Man-heading-regexp)
-  (set (make-local-variable 'outline-level) (lambda () 1))
-  (set (make-local-variable 'bookmark-make-record-function)
-       'Man-bookmark-make-record)
+  (setq-local outline-regexp Man-heading-regexp)
+  (setq-local outline-level (lambda () 1))
+  (setq-local bookmark-make-record-function
+              #'Man-bookmark-make-record)
   (add-hook 'window-state-change-functions #'Man--window-state-change nil t))
 
 (defun Man-build-section-list ()
index 32556a535f31561fa669995e94daf56c190bcadb..88baa1f82186f6ba355464025d7e3ac04a668a94 100644 (file)
@@ -96,8 +96,7 @@ yourself the value of `master-of' by calling `master-show-slave'."
   "Makes BUFFER the slave of the current buffer.
 Use \\[master-mode] to toggle control of the slave buffer."
   (interactive "bSlave: ")
-  (make-local-variable 'master-of)
-  (setq master-of buffer)
+  (setq-local master-of buffer)
   (run-hooks 'master-set-slave-hook))
 
 (defun master-show-slave ()
index d44d89682216e3e085d3ab311547bddfdf7bff9b..456193d52e1141b14de374cc6f93535f8cde5696 100644 (file)
@@ -2067,14 +2067,14 @@ variables.")
                               (funcall aff-fun completions)))
 
                       (with-current-buffer standard-output
-                        (set (make-local-variable 'completion-base-position)
+                        (setq-local completion-base-position
                              (list (+ start base-size)
                                    ;; FIXME: We should pay attention to completion
                                    ;; boundaries here, but currently
                                    ;; completion-all-completions does not give us the
                                    ;; necessary information.
                                    end))
-                        (set (make-local-variable 'completion-list-insert-choice-function)
+                        (setq-local completion-list-insert-choice-function
                              (let ((ctable minibuffer-completion-table)
                                    (cpred minibuffer-completion-predicate)
                                    (cprops completion-extra-properties))
@@ -2866,7 +2866,7 @@ See `read-file-name' for the meaning of the arguments."
                           ;; On the first request on `M-n' fill
                           ;; `minibuffer-default' with a list of defaults
                           ;; relevant for file-name reading.
-                          (set (make-local-variable 'minibuffer-default-add-function)
+                          (setq-local minibuffer-default-add-function
                                (lambda ()
                                  (with-current-buffer
                                      (window-buffer (minibuffer-selected-window))
index 9b11b86b9d20531e5fbd20733e560fd362888a97..85f9de4e1b4532f93a2b460ae8c79b2a5f0c0c21 100644 (file)
@@ -318,7 +318,7 @@ See the command `outline-mode' for more information on this mode."
        (add-hook 'change-major-mode-hook
                  (lambda () (outline-minor-mode -1))
                  nil t)
-       (set (make-local-variable 'line-move-ignore-invisible) t)
+        (setq-local line-move-ignore-invisible t)
        ;; Cause use of ellipses for invisible text.
        (add-to-invisibility-spec '(outline . t)))
     (setq line-move-ignore-invisible nil)
index a744165e0d5ec973acb3740e91a5c068ba15bf67..a24df93a82892535ca288ed5fd24d0e75793d236 100644 (file)
@@ -738,12 +738,12 @@ user actually typed in."
 COMPLETEF-SYM should be the symbol where the
 dynamic-complete-functions are kept.  For comint mode itself,
 this is `comint-dynamic-complete-functions'."
-  (set (make-local-variable 'pcomplete-parse-arguments-function)
-       #'pcomplete-parse-comint-arguments)
+  (setq-local pcomplete-parse-arguments-function
+              #'pcomplete-parse-comint-arguments)
   (add-hook 'completion-at-point-functions
             #'pcomplete-completions-at-point nil 'local)
-  (set (make-local-variable completef-sym)
-       (copy-sequence (symbol-value completef-sym)))
+  (setq-local ompletef-sym
+              (copy-sequence (symbol-value completef-sym)))
   (let* ((funs (symbol-value completef-sym))
         (elem (or (memq 'comint-filename-completion funs)
                    (memq 'shell-filename-completion funs)
index 203d70331ce8be610e947637e2ebc4f5121c3129..5d4318d81f6665b8302de113af3cc726148be44c 100644 (file)
@@ -664,9 +664,9 @@ After displaying or updating a Proced buffer, Proced runs the normal hook
         truncate-lines t
         header-line-format '(:eval (proced-header-line)))
   (add-hook 'post-command-hook #'force-mode-line-update nil t)  ;; FIXME: Why?
-  (set (make-local-variable 'revert-buffer-function) #'proced-revert)
-  (set (make-local-variable 'font-lock-defaults)
-       '(proced-font-lock-keywords t nil nil beginning-of-line))
+  (setq-local revert-buffer-function #'proced-revert)
+  (setq-local font-lock-defaults
+              '(proced-font-lock-keywords t nil nil beginning-of-line))
   (if (and (not proced-auto-update-timer) proced-auto-update-interval)
       (setq proced-auto-update-timer
             (run-at-time t proced-auto-update-interval
index 61c39de12b2955403a42056af363d51d93222ee8..746363728b0e152ae95c41d5d79e8b9d31f31575 100644 (file)
@@ -1127,7 +1127,7 @@ IGNORE arguments."
   (unless recentf-list
     (error "The list of recent files is empty"))
   (recentf-dialog (format "*%s - Edit list*" recentf-menu-title)
-    (set (make-local-variable 'recentf-edit-list) nil)
+    (setq-local recentf-edit-list nil)
     (widget-insert
      (format-message
       "Click on OK to delete selected files from the recent list.
@@ -1196,8 +1196,8 @@ IGNORE other arguments."
 
 (defun recentf-open-files-items (files)
   "Return a list of widgets to display FILES in a dialog buffer."
-  (set (make-local-variable 'recentf--files-with-key)
-       (recentf-trunc-list files 10))
+  (setq-local recentf--files-with-key
+              (recentf-trunc-list files 10))
   (mapcar 'recentf-open-files-item
           (append
            ;; When requested group the files with shortcuts together
index 3a2ab1d24c81e4f36b1ae9d7f6125775acad1539..5ebc5493012ca6a4c01761b46210b5b496fc93e5 100644 (file)
@@ -1706,7 +1706,7 @@ See also `multi-occur'."
            (buffer-undo-list t)
            (occur--final-pos nil))
        (erase-buffer)
-        (set (make-local-variable 'occur-highlight-regexp) regexp)
+        (setq-local occur-highlight-regexp regexp)
        (let ((count
               (if (stringp nlines)
                    ;; Treat nlines as a regexp to collect.
index f9e386463491f117c8310ced6095d88f0a3159d8..b4558e1bebb38b8e66572d3ed5302ad9db8c36b0 100644 (file)
@@ -233,7 +233,7 @@ Also see the `reveal-auto-hide' variable."
   :keymap reveal-mode-map
   (if reveal-mode
       (progn
-       (set (make-local-variable 'search-invisible) t)
+        (setq-local search-invisible t)
        (add-hook 'post-command-hook 'reveal-post-command nil t))
     (kill-local-variable 'search-invisible)
     (remove-hook 'post-command-hook 'reveal-post-command t)))
index 82e6178da149906297d55ac8472294a2fe4d4b0f..d97abca9ee7c845e9a467fd6a14298a0199e7651 100644 (file)
@@ -584,8 +584,8 @@ format first."
   (when (and (not ruler-mode)
             (local-variable-p 'header-line-format)
             (not (local-variable-p 'ruler-mode-header-line-format-old)))
-    (set (make-local-variable 'ruler-mode-header-line-format-old)
-        header-line-format))
+    (setq-local ruler-mode-header-line-format-old
+                header-line-format))
   (setq header-line-format ruler-mode-header-line-format))
 
 ;;;###autoload
index f20ea1bcc8766dce56feda300b2792fcea719594..31808be4372f3188bbd7e77e34b144e6053e5b21 100644 (file)
@@ -64,7 +64,7 @@ MS-Windows systems if `w32-scroll-lock-modifier' is non-nil."
       (progn
        (setq scroll-lock-preserve-screen-pos-save
              scroll-preserve-screen-position)
-       (set (make-local-variable 'scroll-preserve-screen-position) 'always))
+        (setq-local scroll-preserve-screen-position 'always))
     (setq scroll-preserve-screen-position
          scroll-lock-preserve-screen-pos-save)))
 
index 9f67dfde12478887063f2e40736b584e7d808d27..b652977798a3012f642016344ce9a4582d51945b 100644 (file)
@@ -633,7 +633,7 @@ It is the default value of the variable `top-level'."
       (with-current-buffer "*Messages*"
         (messages-buffer-mode)
         ;; Make it easy to do like "tail -f".
-        (set (make-local-variable 'window-point-insertion-type) t)
+        (setq-local window-point-insertion-type t)
         ;; Give *Messages* the same default-directory as *scratch*,
         ;; just to keep things predictable.
        (setq default-directory (or dir (expand-file-name "~/")))))
@@ -1999,7 +1999,7 @@ splash screen in another window."
       (setq buffer-read-only nil)
       (erase-buffer)
       (setq default-directory command-line-default-directory)
-      (set (make-local-variable 'tab-width) 8)
+      (setq-local tab-width 8)
 
       (if pure-space-overflow
          (insert pure-space-overflow-message))
index 11bc07a29ccf21d34845f6e3361985d46f0a557d..044872068f4b4381f57b820f3462910403f5223d 100644 (file)
@@ -1231,8 +1231,8 @@ the stroke as a character in some language."
 ;;     mode-popup-menu edit-strokes-menu) ; what about extent-specific stuff?
 ;;  (and (featurep 'menubar)
 ;;       current-menubar
-;;       (set (make-local-variable 'current-menubar)
-;;         (copy-sequence current-menubar))
+;;       (setq-local current-menubar
+;;                   (copy-sequence current-menubar))
 ;;       (add-submenu nil edit-strokes-menu)))
 
 ;;(let ((map edit-strokes-mode-map))
@@ -1363,13 +1363,13 @@ If STROKES-MAP is not given, `strokes-global-map' will be used instead."
      finally do (unless (eobp)
                   (kill-region (1+ (point)) (point-max))))
     (view-buffer "*Strokes List*" nil)
-    (set (make-local-variable 'view-mode-map)
-        (let ((map (copy-keymap view-mode-map)))
-          (define-key map "q" `(lambda ()
-                                 (interactive)
-                                 (View-quit)
-                                 (set-window-configuration ,config)))
-          map))
+    (setq-local view-mode-map
+                (let ((map (copy-keymap view-mode-map)))
+                  (define-key map "q" `(lambda ()
+                                         (interactive)
+                                         (View-quit)
+                                         (set-window-configuration ,config)))
+                  map))
     (goto-char (point-min))))
 
 (defun strokes-alphabetic-lessp (stroke1 stroke2)
index 3aa7ff0836bc9569c1a969873824b9cc9ffe21d2..93b7c08d62f35f5ff55b545ac988f2d3101b3c2e 100644 (file)
@@ -347,8 +347,7 @@ If MARKED is non-nil, the image is marked."
                   :conversion ,(if marked 'disabled)
                   :margin ,thumbs-margin)))
     (insert-image i)
-    (set (make-local-variable 'thumbs-current-image-size)
-         (image-size i t))))
+    (setq-local thumbs-current-image-size (image-size i t))))
 
 (defun thumbs-insert-thumb (img &optional marked)
   "Insert the thumbnail for IMG at point.
@@ -387,7 +386,7 @@ If MARKED is non-nil, the image is marked."
     (if dir (setq default-directory dir))
     (thumbs-do-thumbs-insertion list)
     (goto-char (point-min))
-    (set (make-local-variable 'thumbs-current-dir) default-directory)))
+    (setq-local thumbs-current-dir default-directory)))
 
 ;;;###autoload
 (defun thumbs-show-from-dir (dir &optional reg same-window)
index 45d3f28ea078a55536244cb198b9794b29406f98..e8a71a38df6ca994dd3e09eee9d8137bba8e52d0 100644 (file)
@@ -260,10 +260,9 @@ Typically it should contain something like this:
      \\='(:ascent center :mask (heuristic t)))"
   (or name (setq name (or tree-widget-theme "default")))
   (unless (string-equal name (tree-widget-theme-name))
-    (set (make-local-variable 'tree-widget--theme)
-         (make-vector 4 nil))
-      (tree-widget-set-parent-theme name)
-      (tree-widget-set-parent-theme "default")))
+    (setq-local tree-widget--theme (make-vector 4 nil))
+    (tree-widget-set-parent-theme name)
+    (tree-widget-set-parent-theme "default")))
 
 (defun tree-widget--locate-sub-directory (name path)
   "Locate all occurrences of the sub-directory NAME in PATH.
index daa5c67df8be2170eddf58bc207c07c1622b9eba..67c3992c3f972cc62927852e20c23d8764588873 100644 (file)
@@ -8390,9 +8390,9 @@ from the list of completions and default values."
           ;; here manually.
           (if (and (boundp 'icomplete-with-completion-tables)
                    (listp icomplete-with-completion-tables))
-              (set (make-local-variable 'icomplete-with-completion-tables)
-                   (cons rbts-completion-table
-                         icomplete-with-completion-tables))))
+              (setq-local icomplete-with-completion-tables
+                          (cons rbts-completion-table
+                                icomplete-with-completion-tables))))
       (read-buffer prompt (other-buffer (current-buffer))
                    (confirm-nonexistent-file-or-buffer)))))
 
index caf57ae43fe6d7b1b288eae13186dd01584b8137..9d502d772bde8fdf481c78e45eb9646f06955616 100644 (file)
@@ -451,7 +451,7 @@ function findactiveelement(doc){
 XW is the xwidget identifier, TEXT is retrieved from the webkit."
   (switch-to-buffer
    (generate-new-buffer "textarea"))
-  (set (make-local-variable 'xwidget-xwbl) xw)
+  (setq-local xwidget-xwbl xw)
   (insert text))
 
 (defun xwidget-webkit-end-edit-textarea ()