]> git.eshelyaron.com Git - emacs.git/commitdiff
Prefer setq-local in vc/*.el
authorStefan Kangas <stefan@marxist.se>
Sat, 5 Dec 2020 07:58:12 +0000 (08:58 +0100)
committerStefan Kangas <stefan@marxist.se>
Sat, 5 Dec 2020 07:58:12 +0000 (08:58 +0100)
* lisp/vc/add-log.el (find-change-log, change-log-mode):
* lisp/vc/cvs-status.el (cvs-status-mode):
* lisp/vc/diff-mode.el (diff-restrict-view, diff-find-file-name):
(diff-mode, diff-setup-whitespace, diff-apply-hunk):
* lisp/vc/diff.el (diff-no-select):
* lisp/vc/ediff-util.el (ediff-setup):
* lisp/vc/log-edit.el (log-edit, log-edit-mode):
* lisp/vc/log-view.el (log-view-mode):
* lisp/vc/pcvs.el (cvs-temp-buffer, cvs-make-cvs-buffer):
(cvs-update-filter, cvs-mode, cvs-mode-commit)
(cvs-mode-edit-log, cvs-vc-command-advice):
* lisp/vc/smerge-mode.el (smerge-match-conflict):
(smerge-ediff, smerge-mode):
* lisp/vc/vc-annotate.el (vc-annotate-mode):
(vc-annotate, vc-annotate-display):
* lisp/vc/vc-bzr.el (vc-bzr-log-view-mode):
* lisp/vc/vc-dir.el (vc-dir-mode):
* lisp/vc/vc-dispatcher.el (vc-setup-buffer):
(vc-compilation-mode, vc-start-logentry):
* lisp/vc/vc-git.el (vc-git-log-view-mode):
* lisp/vc/vc-hg.el (vc-hg-log-view-mode):
* lisp/vc/vc-hooks.el (vc-refresh-state):
* lisp/vc/vc-mtn.el (vc-mtn-log-view-mode):
* lisp/vc/vc-svn.el (vc-svn-log-view-mode):
* lisp/vc/vc.el (vc-register, vc-diff-internal):
(vc-find-revision-save, vc-find-revision-no-save):
(vc-log-internal-common, vc-region-history): Prefer setq-local.

19 files changed:
lisp/vc/add-log.el
lisp/vc/cvs-status.el
lisp/vc/diff-mode.el
lisp/vc/diff.el
lisp/vc/ediff-util.el
lisp/vc/log-edit.el
lisp/vc/log-view.el
lisp/vc/pcvs.el
lisp/vc/smerge-mode.el
lisp/vc/vc-annotate.el
lisp/vc/vc-bzr.el
lisp/vc/vc-dir.el
lisp/vc/vc-dispatcher.el
lisp/vc/vc-git.el
lisp/vc/vc-hg.el
lisp/vc/vc-hooks.el
lisp/vc/vc-mtn.el
lisp/vc/vc-svn.el
lisp/vc/vc.el

index 54bb3569788331b913c05db75d5fbe49a18439d2..e177a5a57d90d81b3a3d29062bc6eec1a617aaf0 100644 (file)
@@ -779,7 +779,7 @@ Optional arg BUFFER-FILE overrides `buffer-file-name'."
                             found)))))))
            (if root (setq file-name (expand-file-name cbase root))))))
     ;; Make a local variable in this buffer so we needn't search again.
-    (set (make-local-variable 'change-log-default-name) file-name))
+    (setq-local change-log-default-name file-name))
   file-name)
 
 (defun add-log-file-name (buffer-file log-file)
@@ -1134,40 +1134,40 @@ Runs `change-log-mode-hook'.
        indent-tabs-mode t
        tab-width 8
        show-trailing-whitespace t)
-  (set (make-local-variable 'fill-forward-paragraph-function)
-       'change-log-fill-forward-paragraph)
-  (set (make-local-variable 'comment-start) nil)
+  (setq-local fill-forward-paragraph-function
+              'change-log-fill-forward-paragraph)
+  (setq-local comment-start nil)
   ;; Make sure we call `change-log-indent' when filling.
-  (set (make-local-variable 'fill-indent-according-to-mode) t)
+  (setq-local fill-indent-according-to-mode t)
   ;; Avoid that filling leaves behind a single "*" on a line.
   (add-hook 'fill-nobreak-predicate
            (lambda ()
               (looking-back "^\\s *\\*\\s *" (line-beginning-position)))
            nil t)
-  (set (make-local-variable 'indent-line-function) 'change-log-indent)
-  (set (make-local-variable 'tab-always-indent) nil)
-  (set (make-local-variable 'copyright-at-end-flag) t)
+  (setq-local indent-line-function 'change-log-indent)
+  (setq-local tab-always-indent nil)
+  (setq-local copyright-at-end-flag t)
   ;; We really do want "^" in paragraph-start below: it is only the
   ;; lines that begin at column 0 (despite the left-margin of 8) that
   ;; we are looking for.  Adding `* ' allows eliding the blank line
   ;; between entries for different files.
-  (set (make-local-variable 'paragraph-start) "\\s *$\\|\f\\|^\\<")
-  (set (make-local-variable 'paragraph-separate) paragraph-start)
+  (setq-local paragraph-start "\\s *$\\|\f\\|^\\<")
+  (setq-local paragraph-separate paragraph-start)
   ;; Match null string on the date-line so that the date-line
   ;; is grouped with what follows.
-  (set (make-local-variable 'page-delimiter) "^\\<\\|^\f")
-  (set (make-local-variable 'version-control) 'never)
-  (set (make-local-variable 'smerge-resolve-function)
-       'change-log-resolve-conflict)
-  (set (make-local-variable 'adaptive-fill-regexp) "\\s *")
-  (set (make-local-variable 'font-lock-defaults)
-       '(change-log-font-lock-keywords t nil nil backward-paragraph))
-  (set (make-local-variable 'multi-isearch-next-buffer-function)
-       'change-log-next-buffer)
-  (set (make-local-variable 'beginning-of-defun-function)
-       'change-log-beginning-of-defun)
-  (set (make-local-variable 'end-of-defun-function)
-       'change-log-end-of-defun)
+  (setq-local page-delimiter "^\\<\\|^\f")
+  (setq-local version-control 'never)
+  (setq-local smerge-resolve-function
+              'change-log-resolve-conflict)
+  (setq-local adaptive-fill-regexp "\\s *")
+  (setq-local font-lock-defaults
+              '(change-log-font-lock-keywords t nil nil backward-paragraph))
+  (setq-local multi-isearch-next-buffer-function
+              'change-log-next-buffer)
+  (setq-local beginning-of-defun-function
+              'change-log-beginning-of-defun)
+  (setq-local end-of-defun-function
+              'change-log-end-of-defun)
   ;; next-error function glue
   (setq next-error-function 'change-log-next-error))
 
index 6192b934cb1d96a91a9fb682040bf57a52225fe9..093c17b8cc328f960ed0ea8c9b4d2341d99773aa 100644 (file)
@@ -92,8 +92,8 @@
 ;;;###autoload
 (define-derived-mode cvs-status-mode fundamental-mode "CVS-Status"
   "Mode used for cvs status output."
-  (set (make-local-variable 'font-lock-defaults) cvs-status-font-lock-defaults)
-  (set (make-local-variable 'cvs-minor-wrap-function) 'cvs-status-minor-wrap))
+  (setq-local font-lock-defaults cvs-status-font-lock-defaults)
+  (setq-local cvs-minor-wrap-function #'cvs-status-minor-wrap))
 
 ;; Define cvs-status-next and cvs-status-prev
 (easy-mmode-define-navigation cvs-status cvs-status-entry-leader-re "entry")
index 51f418031699d7c920e098066a3708a7e11eb368..bf83601083160cb0592041936ba609f4d434e464 100644 (file)
@@ -741,7 +741,7 @@ If the prefix ARG is given, restrict the view to the current file instead."
   (interactive "P")
   (apply 'narrow-to-region
         (if arg (diff-bounds-of-file) (diff-bounds-of-hunk)))
-  (set (make-local-variable 'diff-narrowed-to) (if arg 'file 'hunk)))
+  (setq-local diff-narrowed-to (if arg 'file 'hunk)))
 
 (defun diff--some-hunks-p ()
   (save-excursion
@@ -969,8 +969,8 @@ Non-nil NOPROMPT means to prefer returning nil than to prompt the user.
 PREFIX is only used internally: don't use it."
   (unless (equal diff-remembered-defdir default-directory)
     ;; Flush diff-remembered-files-alist if the default-directory is changed.
-    (set (make-local-variable 'diff-remembered-defdir) default-directory)
-    (set (make-local-variable 'diff-remembered-files-alist) nil))
+    (setq-local diff-remembered-defdir default-directory)
+    (setq-local diff-remembered-files-alist nil))
   (save-excursion
     (save-restriction
       (widen)
@@ -1016,8 +1016,8 @@ PREFIX is only used internally: don't use it."
                   (read-file-name (format "Use file %s: " file)
                                   (file-name-directory file) file t
                                   (file-name-nondirectory file)))
-             (set (make-local-variable 'diff-remembered-files-alist)
-                  (cons (cons fs file) diff-remembered-files-alist))
+             (setq-local diff-remembered-files-alist
+                         (cons (cons fs file) diff-remembered-files-alist))
              file)))))))
 
 
@@ -1475,27 +1475,25 @@ a diff with \\[diff-reverse-direction].
 
 \\{diff-mode-map}"
 
-  (set (make-local-variable 'font-lock-defaults) diff-font-lock-defaults)
+  (setq-local font-lock-defaults diff-font-lock-defaults)
   (add-hook 'font-lock-mode-hook #'diff--font-lock-cleanup nil 'local)
-  (set (make-local-variable 'outline-regexp) diff-outline-regexp)
-  (set (make-local-variable 'imenu-generic-expression)
-       diff-imenu-generic-expression)
+  (setq-local outline-regexp diff-outline-regexp)
+  (setq-local imenu-generic-expression
+              diff-imenu-generic-expression)
   ;; These are not perfect.  They would be better done separately for
   ;; context diffs and unidiffs.
-  ;; (set (make-local-variable 'paragraph-start)
+  ;; (setq-local paragraph-start
   ;;        (concat "@@ "                      ; unidiff hunk
   ;;          "\\|\\*\\*\\* "          ; context diff hunk or file start
   ;;          "\\|--- [^\t]+\t"))      ; context or unidiff file
   ;;                                   ; start (first or second line)
-  ;;   (set (make-local-variable 'paragraph-separate) paragraph-start)
-  ;;   (set (make-local-variable 'page-delimiter) "--- [^\t]+\t")
+  ;;   (setq-local paragraph-separate paragraph-start)
+  ;;   (setq-local page-delimiter "--- [^\t]+\t")
   ;; compile support
-  (set (make-local-variable 'next-error-function) #'diff-next-error)
+  (setq-local next-error-function #'diff-next-error)
 
-  (set (make-local-variable 'beginning-of-defun-function)
-       #'diff-beginning-of-file-and-junk)
-  (set (make-local-variable 'end-of-defun-function)
-       #'diff-end-of-file)
+  (setq-local beginning-of-defun-function #'diff-beginning-of-file-and-junk)
+  (setq-local end-of-defun-function #'diff-end-of-file)
 
   (diff-setup-whitespace)
 
@@ -1517,10 +1515,9 @@ a diff with \\[diff-reverse-direction].
                      (delq ro-bind minor-mode-overriding-map-alist)))
              nil t))
   ;; add-log support
-  (set (make-local-variable 'add-log-current-defun-function)
-       #'diff-current-defun)
-  (set (make-local-variable 'add-log-buffer-file-name-function)
-       (lambda () (diff-find-file-name nil 'noprompt)))
+  (setq-local add-log-current-defun-function #'diff-current-defun)
+  (setq-local add-log-buffer-file-name-function
+              (lambda () (diff-find-file-name nil 'noprompt)))
   (add-function :filter-return (local 'filter-buffer-substring-function)
                 #'diff--filter-substring)
   (unless buffer-file-name
@@ -1552,7 +1549,7 @@ a diff with \\[diff-reverse-direction].
 This sets `whitespace-style' and `whitespace-trailing-regexp' so
 that Whitespace mode shows trailing whitespace problems on the
 modified lines of the diff."
-  (set (make-local-variable 'whitespace-style) '(face trailing))
+  (setq-local whitespace-style '(face trailing))
   (let ((style (save-excursion
                 (goto-char (point-min))
                  ;; FIXME: For buffers filled from async processes, this search
@@ -1560,10 +1557,10 @@ modified lines of the diff."
                 (when (re-search-forward diff-hunk-header-re nil t)
                   (goto-char (match-beginning 0))
                   (diff-hunk-style)))))
-    (set (make-local-variable 'whitespace-trailing-regexp)
-        (if (eq style 'context)
-            "^[-+!] .*?\\([\t ]+\\)$"
-          "^[-+!<>].*?\\([\t ]+\\)$"))))
+    (setq-local whitespace-trailing-regexp
+                (if (eq style 'context)
+                    "^[-+!] .*?\\([\t ]+\\)$"
+                  "^[-+!<>].*?\\([\t ]+\\)$"))))
 
 (defun diff-delete-if-empty ()
   ;; An empty diff file means there's no more diffs to integrate, so we
@@ -1936,10 +1933,10 @@ With a prefix argument, REVERSE the hunk."
         (and buffer-file-name
              (backup-file-name-p buffer-file-name)
              (not diff-apply-hunk-to-backup-file)
-             (not (set (make-local-variable 'diff-apply-hunk-to-backup-file)
-                       (yes-or-no-p (format "Really apply this hunk to %s? "
-                                            (file-name-nondirectory
-                                             buffer-file-name)))))))
+             (not (setq-local diff-apply-hunk-to-backup-file
+                              (yes-or-no-p (format "Really apply this hunk to %s? "
+                                                   (file-name-nondirectory
+                                                    buffer-file-name)))))))
       (error "%s"
             (substitute-command-keys
               (format "Use %s\\[diff-apply-hunk] to apply it to the other file"
index b7f17bf3c73de579f3dea101220bc74864c1af1e..e43801a1a02d71ffbcc43371db94d86ac0026fed 100644 (file)
@@ -190,9 +190,9 @@ returns the buffer used."
        (erase-buffer))
       (buffer-enable-undo (current-buffer))
       (diff-mode)
-      (set (make-local-variable 'revert-buffer-function)
-           (lambda (_ignore-auto _noconfirm)
-             (diff-no-select old new switches no-async (current-buffer))))
+      (setq-local revert-buffer-function
+                  (lambda (_ignore-auto _noconfirm)
+                    (diff-no-select old new switches no-async (current-buffer))))
       (setq default-directory thisdir)
       (setq diff-default-directory default-directory)
       (let ((inhibit-read-only t))
index e28d8574b1c9d12af21ab146b4dddcd6a19d9002..73c39b651975dd233f0b661970d392ed3a3e7385 100644 (file)
@@ -275,8 +275,7 @@ to invocation.")
       (make-local-variable 'ediff-window-setup-function)
       (make-local-variable 'ediff-keep-variants)
 
-      (make-local-variable 'window-min-height)
-      (setq window-min-height 2)
+      (setq-local window-min-height 2)
 
       ;; unwrap set up parameters passed as argument
       (while setup-parameters
index 1c69bdf4135bf5f9418f5ae32d80adf987fc7593..feafe5f5f0a3f989e2fa25ef143ce4450e56e88f 100644 (file)
@@ -463,16 +463,16 @@ done.  Otherwise, it uses the current buffer."
     (if mode
        (funcall mode)
       (log-edit-mode))
-    (set (make-local-variable 'log-edit-callback) callback)
+    (setq-local log-edit-callback callback)
     (if (listp params)
        (dolist (crt params)
          (set (make-local-variable (car crt)) (cdr crt)))
       ;; For backward compatibility with log-edit up to version 22.2
       ;; accept non-list PARAMS to mean `log-edit-list'.
-      (set (make-local-variable 'log-edit-listfun) params))
+      (setq-local log-edit-listfun params))
 
-    (if buffer (set (make-local-variable 'log-edit-parent-buffer) parent))
-    (set (make-local-variable 'log-edit-initial-files) (log-edit-files))
+    (if buffer (setq-local log-edit-parent-buffer parent))
+    (setq-local log-edit-initial-files (log-edit-files))
     (when setup
       (erase-buffer)
       (run-hooks 'log-edit-hook))
@@ -489,8 +489,7 @@ the package from which this is used might also provide additional
 commands (under C-x v for VC, for example).
 
 \\{log-edit-mode-map}"
-  (set (make-local-variable 'font-lock-defaults)
-       '(log-edit-font-lock-keywords t))
+  (setq-local font-lock-defaults '(log-edit-font-lock-keywords t))
   (setq-local jit-lock-contextually t)  ;For the "first line is summary".
   (setq-local fill-paragraph-function #'log-edit-fill-entry)
   (make-local-variable 'log-edit-comment-ring-index)
index e7b6eea807c873566eb662601e960d25f5796457..87e662ce1cc17ec6e1de729e1f7f76c12e741b53 100644 (file)
@@ -265,12 +265,10 @@ The match group number 1 should match the revision number itself.")
 (define-derived-mode log-view-mode special-mode "Log-View"
   "Major mode for browsing CVS log output."
   (setq buffer-read-only t)
-  (set (make-local-variable 'font-lock-defaults) log-view-font-lock-defaults)
-  (set (make-local-variable 'beginning-of-defun-function)
-       'log-view-beginning-of-defun)
-  (set (make-local-variable 'end-of-defun-function)
-       'log-view-end-of-defun)
-  (set (make-local-variable 'cvs-minor-wrap-function) 'log-view-minor-wrap)
+  (setq-local font-lock-defaults log-view-font-lock-defaults)
+  (setq-local beginning-of-defun-function #'log-view-beginning-of-defun)
+  (setq-local end-of-defun-function #'log-view-end-of-defun)
+  (setq-local cvs-minor-wrap-function #'log-view-minor-wrap)
   (hack-dir-local-variables-non-file-buffer))
 
 ;;;;
index 1e4343cc6bef18462162a9003a9ad7862853f1a0..0fd5ceed56260016d846bae65aed0f41fa09b505 100644 (file)
@@ -356,10 +356,10 @@ from the current buffer."
               ((and (bufferp cvs-temp-buffer) (buffer-live-p cvs-temp-buffer))
                cvs-temp-buffer)
               (t
-               (set (make-local-variable 'cvs-temp-buffer)
-                    (cvs-get-buffer-create
-                     (eval cvs-temp-buffer-name `((dir . ,dir)))
-                      'noreuse))))))
+                (setq-local cvs-temp-buffer
+                            (cvs-get-buffer-create
+                             (eval cvs-temp-buffer-name `((dir . ,dir)))
+                             'noreuse))))))
 
     ;; Handle the potential pre-existing process.
     (let ((proc (get-buffer-process buf)))
@@ -381,7 +381,7 @@ from the current buffer."
       (unless nosetup (save-excursion (display-buffer buf)))
       ;; FIXME: this doesn't do the right thing if the user later on
       ;; does a `find-file-other-window' and `scroll-other-window'
-      (set (make-local-variable 'other-window-scroll-buffer) buf))
+      (setq-local other-window-scroll-buffer buf))
 
     (add-to-list 'cvs-temp-buffers buf)
 
@@ -393,13 +393,13 @@ from the current buffer."
         ;; a very large and unwanted undo record.
         (buffer-disable-undo)
         (erase-buffer))
-      (set (make-local-variable 'cvs-buffer) cvs-buf)
+      (setq-local cvs-buffer cvs-buf)
       ;;(cvs-minor-mode 1)
       (let ((lbd list-buffers-directory))
        (if (fboundp mode) (funcall mode) (fundamental-mode))
        (when lbd (setq list-buffers-directory lbd)))
       (cvs-minor-mode 1)
-      ;;(set (make-local-variable 'cvs-buffer) cvs-buf)
+      ;;(setq-local cvs-buffer cvs-buf)
       (if normal
           (buffer-enable-undo)
        (setq buffer-read-only t)
@@ -466,10 +466,10 @@ If non-nil, NEW means to create a new buffer no matter what."
                 "\n")
         (setq buffer-read-only t)
         (cvs-mode)
-        (set (make-local-variable 'list-buffers-directory) buffer-name)
-        ;;(set (make-local-variable 'cvs-temp-buffer) (cvs-temp-buffer))
+         (setq-local list-buffers-directory buffer-name)
+         ;;(setq-local cvs-temp-buffer (cvs-temp-buffer))
         (let ((cookies (ewoc-create 'cvs-fileinfo-pp "\n\n" "\n" t)))
-          (set (make-local-variable 'cvs-cookies) cookies)
+           (setq-local cvs-cookies cookies)
           (add-hook 'kill-buffer-hook
                     (lambda ()
                       (ignore-errors (kill-buffer cvs-temp-buffer)))
@@ -1103,7 +1103,7 @@ for a lock file.  If so, it inserts a message cookie in the *cvs* buffer."
            (let ((msg (match-string 1))
                  (lock (match-string 2)))
              (with-current-buffer cvs-buffer
-               (set (make-local-variable 'cvs-lock-file) lock)
+                (setq-local cvs-lock-file lock)
                ;; display the lock situation in the *cvs* buffer:
                (ewoc-enter-last
                 cvs-cookies
@@ -1146,8 +1146,8 @@ Full documentation is in the Texinfo file."
   (if buffer-file-name
       (error "Use M-x cvs-quickdir to get a *cvs* buffer"))
   (buffer-disable-undo)
-  ;;(set (make-local-variable 'goal-column) cvs-cursor-column)
-  (set (make-local-variable 'revert-buffer-function) 'cvs-mode-revert-buffer)
+  ;;(setq-local goal-column cvs-cursor-column)
+  (setq-local revert-buffer-function 'cvs-mode-revert-buffer)
   (setq truncate-lines t)
   (cvs-prefix-make-local 'cvs-branch-prefix)
   (cvs-prefix-make-local 'cvs-secondary-branch-prefix)
@@ -1464,7 +1464,7 @@ The POSTPROC specified there (typically `log-edit') is then called,
     (funcall setupfun 'cvs-do-commit setup
             '((log-edit-listfun . cvs-commit-filelist)
               (log-edit-diff-function . cvs-mode-diff)) buf)
-    (set (make-local-variable 'cvs-minor-wrap-function) 'cvs-commit-minor-wrap)
+    (setq-local cvs-minor-wrap-function 'cvs-commit-minor-wrap)
     (run-hooks 'cvs-mode-commit-hook)))
 
 (defun cvs-commit-minor-wrap (_buf f)
@@ -1525,15 +1525,14 @@ This is best called from a `log-view-mode' buffer."
     (with-current-buffer buf
       ;; Set the filename before, so log-edit can correctly setup its
       ;; log-edit-initial-files variable.
-      (set (make-local-variable 'cvs-edit-log-files) (list file)))
+      (setq-local cvs-edit-log-files (list file)))
     (funcall setupfun 'cvs-do-edit-log nil
             '((log-edit-listfun . cvs-edit-log-filelist)
               (log-edit-diff-function . cvs-mode-diff))
             buf)
     (when text (erase-buffer) (insert text))
-    (set (make-local-variable 'cvs-edit-log-revision) rev)
-    (set (make-local-variable 'cvs-minor-wrap-function)
-         'cvs-edit-log-minor-wrap)
+    (setq-local cvs-edit-log-revision rev)
+    (setq-local cvs-minor-wrap-function 'cvs-edit-log-minor-wrap)
     ;; (run-hooks 'cvs-mode-commit-hook)
     ))
 
@@ -2396,7 +2395,7 @@ The exact behavior is determined also by `cvs-dired-use-hook'."
                     (string-prefix-p default-directory dir))
            (let ((subdir (substring dir (length default-directory))))
              (set-buffer buffer)
-             (set (make-local-variable 'cvs-buffer) cvs-buf)
+              (setq-local cvs-buffer cvs-buf)
              ;; `cvs -q add file' produces no useful output :-(
              (when (and (equal (car flags) "add")
                         (goto-char (point-min))
index fe7724d90270e6a3a8417118f6659e547dfe3b3c..13f875b1920d4c9190fd61f712a1b0475601e74e 100644 (file)
@@ -827,7 +827,7 @@ An error is raised if not inside a conflict."
 
           ((re-search-backward smerge-base-re start t)
            ;; a 3-parts conflict
-           (set (make-local-variable 'smerge-conflict-style) 'diff3-A)
+            (setq-local smerge-conflict-style 'diff3-A)
            (setq base-end upper-end)
            (setq upper-end (match-beginning 0))
            (setq base-start (match-end 0)))
@@ -835,7 +835,7 @@ An error is raised if not inside a conflict."
           ((string= filename (file-name-nondirectory
                               (or buffer-file-name "")))
            ;; a 2-parts conflict
-           (set (make-local-variable 'smerge-conflict-style) 'diff3-E))
+            (setq-local smerge-conflict-style 'diff3-E))
 
           ((and (not base-start)
                 (or (eq smerge-conflict-style 'diff3-A)
@@ -1350,8 +1350,8 @@ buffer names."
 
     ;; Ediff is now set up, and we are in the control buffer.
     ;; Do a few further adjustments and take precautions for exit.
-    (set (make-local-variable 'smerge-ediff-windows) config)
-    (set (make-local-variable 'smerge-ediff-buf) buf)
+    (setq-local smerge-ediff-windows config)
+    (setq-local smerge-ediff-buf buf)
     (add-hook 'ediff-quit-hook
              (lambda ()
                (let ((buffer-A ediff-buffer-A)
@@ -1422,11 +1422,11 @@ with a \\[universal-argument] prefix, makes up a 3-way conflict."
          (font-lock-fontify-region (match-beginning 0) (match-end 0) nil)))))
   (if (string-match (regexp-quote smerge-parsep-re) paragraph-separate)
       (unless smerge-mode
-        (set (make-local-variable 'paragraph-separate)
-             (replace-match "" t t paragraph-separate)))
+        (setq-local paragraph-separate
+                    (replace-match "" t t paragraph-separate)))
     (when smerge-mode
-        (set (make-local-variable 'paragraph-separate)
-             (concat smerge-parsep-re paragraph-separate))))
+        (setq-local paragraph-separate
+                    (concat smerge-parsep-re paragraph-separate))))
   (unless smerge-mode
     (smerge-remove-props (point-min) (point-max))))
 
index 5198bccf846c4ee513efbc53aa3c45aa9e3557ce..43d43e9c6424cd049d7c78714989db12e484481b 100644 (file)
@@ -208,9 +208,8 @@ menu items."
   ;; it will become a list, to avoid initial annotations being invisible.
   (add-to-invisibility-spec 'foo)
   (remove-from-invisibility-spec 'foo)
-  (set (make-local-variable 'truncate-lines) t)
-  (set (make-local-variable 'font-lock-defaults)
-       '(vc-annotate-font-lock-keywords t))
+  (setq-local truncate-lines t)
+  (setq-local font-lock-defaults '(vc-annotate-font-lock-keywords t))
   (hack-dir-local-variables-non-file-buffer))
 
 (defun vc-annotate-toggle-annotation-visibility ()
@@ -449,11 +448,10 @@ should be applied to the background or to the foreground."
         (with-current-buffer temp-buffer-name
           (unless (equal major-mode 'vc-annotate-mode)
             (vc-annotate-mode))
-          (set (make-local-variable 'vc-annotate-backend) backend)
-          (set (make-local-variable 'vc-annotate-parent-file) file)
-          (set (make-local-variable 'vc-annotate-parent-rev) rev)
-          (set (make-local-variable 'vc-annotate-parent-display-mode)
-               display-mode))))
+          (setq-local vc-annotate-backend backend)
+          (setq-local vc-annotate-parent-file file)
+          (setq-local vc-annotate-parent-rev rev)
+          (setq-local vc-annotate-parent-display-mode display-mode))))
 
     (with-current-buffer temp-buffer-name
       (vc-run-delayed
@@ -702,10 +700,10 @@ or OFFSET if present."
 RATIO is the expansion that should be applied to `vc-annotate-color-map'.
 The annotations are relative to the current time, unless overridden by OFFSET."
   (when (/= ratio 1.0)
-    (set (make-local-variable 'vc-annotate-color-map)
+    (setq-local vc-annotate-color-map
         (mapcar (lambda (elem) (cons (* (car elem) ratio) (cdr elem)))
                 vc-annotate-color-map)))
-  (set (make-local-variable 'vc-annotate-offset) offset)
+  (setq-local vc-annotate-offset offset)
   (font-lock-mode 1))
 
 (defun vc-annotate-lines (limit)
index e2d0ca69a20505ba683662ab4d7f1f035f26d917..5eee7f632771a53465f01c2727156b3c5fab99c4 100644 (file)
@@ -701,18 +701,18 @@ or a superior directory.")
 (define-derived-mode vc-bzr-log-view-mode log-view-mode "Bzr-Log-View"
   (remove-hook 'log-view-mode-hook 'vc-bzr-log-view-mode) ;Deactivate the hack.
   (require 'add-log)
-  (set (make-local-variable 'log-view-per-file-logs) nil)
-  (set (make-local-variable 'log-view-file-re) regexp-unmatchable)
-  (set (make-local-variable 'log-view-message-re)
+  (setq-local log-view-per-file-logs nil)
+  (setq-local log-view-file-re regexp-unmatchable)
+  (setq-local log-view-message-re
        (if (eq vc-log-view-type 'short)
           "^ *\\([0-9.]+\\): \\(.*?\\)[ \t]+\\([0-9]\\{4\\}-[0-9]\\{2\\}-[0-9]\\{2\\}\\)\\( \\[merge\\]\\)?"
         "^ *\\(?:revno: \\([0-9.]+\\)\\|merged: .+\\)"))
   ;; Allow expanding short log entries
   (when (eq vc-log-view-type 'short)
     (setq truncate-lines t)
-    (set (make-local-variable 'log-view-expanded-log-entry-function)
-        'vc-bzr-expanded-log-entry))
-  (set (make-local-variable 'log-view-font-lock-keywords)
+    (setq-local log-view-expanded-log-entry-function
+                'vc-bzr-expanded-log-entry))
+  (setq-local log-view-font-lock-keywords
        ;; log-view-font-lock-keywords is careful to use the buffer-local
        ;; value of log-view-message-re only since Emacs-23.
        (if (eq vc-log-view-type 'short)
index cdf8ab984e8697e7bc6d6374c59cdc3aa887f3bb..f576fcfb9fcb413392865d6e8d39af20762d5b76 100644 (file)
@@ -1103,19 +1103,17 @@ commands act on the child files of that directory that are displayed in
 the *vc-dir* buffer.
 
 \\{vc-dir-mode-map}"
-  (set (make-local-variable 'vc-dir-backend) use-vc-backend)
-  (set (make-local-variable 'desktop-save-buffer)
-       'vc-dir-desktop-buffer-misc-data)
+  (setq-local vc-dir-backend use-vc-backend)
+  (setq-local desktop-save-buffer 'vc-dir-desktop-buffer-misc-data)
   (setq-local bookmark-make-record-function #'vc-dir-bookmark-make-record)
   (setq buffer-read-only t)
   (when (boundp 'tool-bar-map)
-    (set (make-local-variable 'tool-bar-map) vc-dir-tool-bar-map))
+    (setq-local tool-bar-map vc-dir-tool-bar-map))
   (let ((buffer-read-only nil))
     (erase-buffer)
-    (set (make-local-variable 'vc-dir-process-buffer) nil)
-    (set (make-local-variable 'vc-ewoc) (ewoc-create #'vc-dir-printer))
-    (set (make-local-variable 'revert-buffer-function)
-        'vc-dir-revert-buffer-function)
+    (setq-local vc-dir-process-buffer nil)
+    (setq-local vc-ewoc (ewoc-create #'vc-dir-printer))
+    (setq-local revert-buffer-function 'vc-dir-revert-buffer-function)
     (setq list-buffers-directory (expand-file-name "*vc-dir*" default-directory))
     (add-to-list 'vc-dir-buffers (current-buffer))
     ;; Make sure that if the directory buffer is killed, the update
index 932b9158f2bf3a33d0b733ab6da4f283b69ddd5b..4cc6fddd7b5a48755ea53a41ccf5cbbf5a9c9927 100644 (file)
@@ -179,9 +179,9 @@ Another is that undo information is not kept."
       ;; want any of its output to appear from now on.
       (when oldproc (delete-process oldproc)))
     (kill-all-local-variables)
-    (set (make-local-variable 'vc-parent-buffer) camefrom)
-    (set (make-local-variable 'vc-parent-buffer-name)
-        (concat " from " (buffer-name camefrom)))
+    (setq-local vc-parent-buffer camefrom)
+    (setq-local vc-parent-buffer-name
+                (concat " from " (buffer-name camefrom)))
     (setq default-directory olddir)
     (let ((buffer-undo-list t)
           (inhibit-read-only t))
@@ -411,8 +411,8 @@ Display the buffer in some window, but don't select it."
                                  (symbol-value error-regexp-alist))))
     (let ((compilation-error-regexp-alist error-regexp-alist))
       (compilation-mode))
-    (set (make-local-variable 'compilation-error-regexp-alist)
-        error-regexp-alist)))
+    (setq-local compilation-error-regexp-alist
+                error-regexp-alist)))
 
 (declare-function vc-dir-refresh "vc-dir" ())
 
@@ -678,14 +678,14 @@ BACKEND, if non-nil, specifies a VC backend for the Log Edit buffer."
     (if (and comment (not initial-contents))
        (set-buffer (get-buffer-create logbuf))
       (pop-to-buffer (get-buffer-create logbuf)))
-    (set (make-local-variable 'vc-parent-buffer) parent)
-    (set (make-local-variable 'vc-parent-buffer-name)
-        (concat " from " (buffer-name vc-parent-buffer)))
+    (setq-local vc-parent-buffer parent)
+    (setq-local vc-parent-buffer-name
+                (concat " from " (buffer-name vc-parent-buffer)))
     (vc-log-edit files mode backend)
     (make-local-variable 'vc-log-after-operation-hook)
     (when after-hook
       (setq vc-log-after-operation-hook after-hook))
-    (set (make-local-variable 'vc-log-operation) action)
+    (setq-local vc-log-operation action)
     (when comment
       (erase-buffer)
       (when (stringp comment) (insert comment)))
index 91554bb6d835cbeac8ee4142a12e88eb3df58e94..0da4509670a4973543ee025b2536918fc22c68d4 100644 (file)
@@ -1242,18 +1242,18 @@ log entries."
 (define-derived-mode vc-git-log-view-mode log-view-mode "Git-Log-View"
   (require 'add-log) ;; We need the faces add-log.
   ;; Don't have file markers, so use impossible regexp.
-  (set (make-local-variable 'log-view-file-re) regexp-unmatchable)
-  (set (make-local-variable 'log-view-per-file-logs) nil)
-  (set (make-local-variable 'log-view-message-re)
-       (if (not (memq vc-log-view-type '(long log-search with-diff)))
-          (cadr vc-git-root-log-format)
-        "^commit +\\([0-9a-z]+\\)"))
+  (setq-local log-view-file-re regexp-unmatchable)
+  (setq-local log-view-per-file-logs nil)
+  (setq-local log-view-message-re
+              (if (not (memq vc-log-view-type '(long log-search with-diff)))
+                  (cadr vc-git-root-log-format)
+                "^commit +\\([0-9a-z]+\\)"))
   ;; Allow expanding short log entries.
   (when (memq vc-log-view-type '(short log-outgoing log-incoming mergebase))
     (setq truncate-lines t)
-    (set (make-local-variable 'log-view-expanded-log-entry-function)
-        'vc-git-expanded-log-entry))
-  (set (make-local-variable 'log-view-font-lock-keywords)
+    (setq-local log-view-expanded-log-entry-function
+                'vc-git-expanded-log-entry))
+  (setq-local log-view-font-lock-keywords
        (if (not (memq vc-log-view-type '(long log-search with-diff)))
           (list (cons (nth 1 vc-git-root-log-format)
                       (nth 2 vc-git-root-log-format)))
index 67e129044c0d4359e86d82a85ba66a2a8962ac65..e7f67e90eeff8616ed894eec8f5a5ee56ce649f0 100644 (file)
@@ -464,19 +464,19 @@ If LIMIT is non-nil, show no more than this many entries."
 
 (define-derived-mode vc-hg-log-view-mode log-view-mode "Hg-Log-View"
   (require 'add-log) ;; we need the add-log faces
-  (set (make-local-variable 'log-view-file-re) regexp-unmatchable)
-  (set (make-local-variable 'log-view-per-file-logs) nil)
-  (set (make-local-variable 'log-view-message-re)
-       (if (eq vc-log-view-type 'short)
-          (cadr vc-hg-root-log-format)
-         "^changeset:[ \t]*\\([0-9]+\\):\\(.+\\)"))
-  (set (make-local-variable 'tab-width) 2)
+  (setq-local log-view-file-re regexp-unmatchable)
+  (setq-local log-view-per-file-logs nil)
+  (setq-local log-view-message-re
+              (if (eq vc-log-view-type 'short)
+                  (cadr vc-hg-root-log-format)
+                "^changeset:[ \t]*\\([0-9]+\\):\\(.+\\)"))
+  (setq-local tab-width 2)
   ;; Allow expanding short log entries
   (when (eq vc-log-view-type 'short)
     (setq truncate-lines t)
-    (set (make-local-variable 'log-view-expanded-log-entry-function)
-        'vc-hg-expanded-log-entry))
-  (set (make-local-variable 'log-view-font-lock-keywords)
+    (setq-local log-view-expanded-log-entry-function
+                'vc-hg-expanded-log-entry))
+  (setq-local log-view-font-lock-keywords
        (if (eq vc-log-view-type 'short)
           (list (cons (nth 1 vc-hg-root-log-format)
                       (nth 2 vc-hg-root-log-format)))
index f09ceddcb3729e7464eda8f80665e55731d26781..07bec8e0877c64506d9fd2c639c63b0983e1b0bd 100644 (file)
@@ -814,7 +814,7 @@ In the latter case, VC mode is deactivated for this buffer."
        (unless vc-make-backup-files
          ;; Use this variable, not make-backup-files,
          ;; because this is for things that depend on the file name.
-          (set (make-local-variable 'backup-inhibited) t)))
+          (setq-local backup-inhibited t)))
        ((let* ((truename (and buffer-file-truename
                              (expand-file-name buffer-file-truename)))
               (link-type (and truename
index 3c26ffc0e587780fea6469e6e53bf7b35fc02e5b..7797d1943266e5b23d1e84448c2e0811b668b7e8 100644 (file)
@@ -239,14 +239,14 @@ If LIMIT is non-nil, show no more than this many entries."
 
 (define-derived-mode vc-mtn-log-view-mode log-view-mode "Mtn-Log-View"
   ;; Don't match anything.
-  (set (make-local-variable 'log-view-file-re) regexp-unmatchable)
-  (set (make-local-variable 'log-view-per-file-logs) nil)
+  (setq-local log-view-file-re regexp-unmatchable)
+  (setq-local log-view-per-file-logs nil)
   ;; TODO: Use a more precise regexp than "[ |/]+" to avoid false positives
   ;; in the ChangeLog text.
-  (set (make-local-variable 'log-view-message-re)
-       "^[ |/]+Revision: \\([0-9a-f]+\\)")
+  (setq-local log-view-message-re
+              "^[ |/]+Revision: \\([0-9a-f]+\\)")
   (require 'add-log)                    ;For change-log faces.
-  (set (make-local-variable 'log-view-font-lock-keywords)
+  (setq-local log-view-font-lock-keywords
        (append log-view-font-lock-keywords
                '(("^[ |]+Author: \\(.*\\)" (1 'change-log-email))
                  ("^[ |]+Date: \\(.*\\)" (1 'change-log-date))))))
index 06dd09490d2151642fb6905bcfb162f905a7c090..5ea2a41fe11ef2a063a18734ba8ecfda921bc9e2 100644 (file)
@@ -548,7 +548,7 @@ or svn+ssh://."
 
 (define-derived-mode vc-svn-log-view-mode log-view-mode "SVN-Log-View"
   (require 'add-log)
-  (set (make-local-variable 'log-view-per-file-logs) nil))
+  (setq-local log-view-per-file-logs nil))
 
 (autoload 'vc-setup-buffer "vc-dispatcher")
 
index 1a246119a694732ad6126a03b4bcc56b27832b07..f268f912fe72a815440cfa4467b2e86c51fc45a8 100644 (file)
@@ -1411,8 +1411,7 @@ first backend that could register the file is used."
        ;; the buffers visiting files affected by this `vc-register', not
        ;; in the current-buffer.
        ;; (unless vc-make-backup-files
-       ;;   (make-local-variable 'backup-inhibited)
-       ;;   (setq backup-inhibited t))
+       ;;   (setq-local backup-inhibited t))
 
        (vc-resynch-buffer file t t))
      files)
@@ -1779,11 +1778,11 @@ Return t if the buffer had changes, nil otherwise."
     (vc-call-backend (car vc-fileset) 'diff files rev1 rev2 buffer async)
     (set-buffer buffer)
     (diff-mode)
-    (set (make-local-variable 'diff-vc-backend) (car vc-fileset))
-    (set (make-local-variable 'diff-vc-revisions) (list rev1 rev2))
-    (set (make-local-variable 'revert-buffer-function)
-        (lambda (_ignore-auto _noconfirm)
-           (vc-diff-internal async vc-fileset rev1 rev2 verbose)))
+    (setq-local diff-vc-backend (car vc-fileset))
+    (setq-local diff-vc-revisions (list rev1 rev2))
+    (setq-local revert-buffer-function
+                (lambda (_ignore-auto _noconfirm)
+                  (vc-diff-internal async vc-fileset rev1 rev2 verbose)))
     ;; Make the *vc-diff* buffer read only, the diff-mode key
     ;; bindings are nicer for read only buffers. pcl-cvs does the
     ;; same thing.
@@ -2118,7 +2117,7 @@ Saves the buffer to the file."
       (with-current-buffer result-buf
        ;; Set the parent buffer so that things like
        ;; C-x v g, C-x v l, ... etc work.
-       (set (make-local-variable 'vc-parent-buffer) filebuf))
+        (setq-local vc-parent-buffer filebuf))
       result-buf)))
 
 (defun vc-find-revision-no-save (file revision &optional backend buffer)
@@ -2165,7 +2164,7 @@ Unlike `vc-find-revision-save', doesn't save the buffer to the file."
                           (get-file-buffer filename)
                           (find-file-noselect filename))))
       (with-current-buffer result-buf
-       (set (make-local-variable 'vc-parent-buffer) filebuf))
+        (setq-local vc-parent-buffer filebuf))
       result-buf)))
 
 ;; Header-insertion code
@@ -2466,7 +2465,7 @@ earlier revisions.  Show up to LIMIT entries (non-nil means unlimited)."
                               rev-buff-func)
   (let (retval (buffer (get-buffer-create buffer-name)))
     (with-current-buffer buffer
-      (set (make-local-variable 'vc-log-view-type) type))
+      (setq-local vc-log-view-type type))
     (setq retval (funcall backend-func backend buffer-name type files))
     (with-current-buffer buffer
       (let ((inhibit-read-only t))
@@ -2478,10 +2477,9 @@ earlier revisions.  Show up to LIMIT entries (non-nil means unlimited)."
                                    backend 'region-history-mode))
                              'region-history-mode
                            'log-view-mode))
-       (set (make-local-variable 'log-view-vc-backend) backend)
-       (set (make-local-variable 'log-view-vc-fileset) files)
-       (set (make-local-variable 'revert-buffer-function)
-            rev-buff-func)))
+        (setq-local log-view-vc-backend backend)
+        (setq-local log-view-vc-fileset files)
+        (setq-local revert-buffer-function rev-buff-func)))
     ;; Display after setting up major-mode, so display-buffer-alist can know
     ;; the major-mode.
     (pop-to-buffer buffer)
@@ -2679,13 +2677,13 @@ mark."
     (vc-call region-history file buf lfrom lto)
     (with-current-buffer buf
       (vc-call-backend backend 'region-history-mode)
-      (set (make-local-variable 'log-view-vc-backend) backend)
-      (set (make-local-variable 'log-view-vc-fileset) (list file))
-      (set (make-local-variable 'revert-buffer-function)
-          (lambda (_ignore-auto _noconfirm)
-             (with-current-buffer buf
-               (let ((inhibit-read-only t)) (erase-buffer)))
-             (vc-call region-history file buf lfrom lto))))
+      (setq-local log-view-vc-backend backend)
+      (setq-local log-view-vc-fileset (list file))
+      (setq-local revert-buffer-function
+                  (lambda (_ignore-auto _noconfirm)
+                    (with-current-buffer buf
+                      (let ((inhibit-read-only t)) (erase-buffer)))
+                    (vc-call region-history file buf lfrom lto))))
     (display-buffer buf)))
 
 ;;;###autoload