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)
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))
;;;###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")
(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
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)
(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)))))))
\\{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)
(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
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
(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
(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"
(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))
(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
(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))
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)
(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))
;;;;
((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)))
(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)
;; 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)
"\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)))
(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
(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)
(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)
(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)
))
(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))
((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)))
((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)
;; 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)
(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))))
;; 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 ()
(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
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)
(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)
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
;; 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))
(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" ())
(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)))
(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)))
(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)))
(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
(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))))))
(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")
;; 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)
(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.
(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)
(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
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))
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)
(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