(list
(minibuffer-with-setup-hook
(lambda ()
- (set (make-local-variable 'minibuffer-default-add-function) nil)
+ (setq-local minibuffer-default-add-function nil)
(setq minibuffer-default defaults))
(read-file-name (format-prompt "Diff %s with" default current)
target-dir default t))
(defaults (dired-dwim-target-defaults nil target-dir)))
(minibuffer-with-setup-hook
(lambda ()
- (set (make-local-variable 'minibuffer-default-add-function) nil)
+ (setq-local minibuffer-default-add-function nil)
(setq minibuffer-default defaults))
(read-directory-name (format "Compare %s with: "
(dired-current-directory))
(target (expand-file-name ; fluid variable inside dired-create-files
(minibuffer-with-setup-hook
(lambda ()
- (set (make-local-variable 'minibuffer-default-add-function) nil)
+ (setq-local minibuffer-default-add-function nil)
(setq minibuffer-default defaults))
(dired-mark-read-file-name
(format "%s %%s %s: "
(defun dired-isearch-filenames ()
"Search for a string using Isearch only in file names in the Dired buffer."
(interactive)
- (set (make-local-variable 'dired-isearch-filenames) t)
+ (setq-local dired-isearch-filenames t)
(isearch-forward nil t))
;;;###autoload
(defun dired-isearch-filenames-regexp ()
"Search for a regexp using Isearch only in file names in the Dired buffer."
(interactive)
- (set (make-local-variable 'dired-isearch-filenames) t)
+ (setq-local dired-isearch-filenames t)
(isearch-forward-regexp nil t))
\f
(dired-mode dirname (or switches dired-listing-switches))
(setq mode-name "Virtual Dired"
revert-buffer-function 'dired-virtual-revert)
- (set (make-local-variable 'dired-subdir-alist) nil)
+ (setq-local dired-subdir-alist nil)
(dired-build-subdir-alist)
(goto-char (point-min))
(dired-initial-position dirname))
(and dired-vm-read-only-folders
(not (file-writable-p fil)))))
;; So that pressing `v' inside VM does prompt within current directory:
- (set (make-local-variable 'vm-folder-directory) dir)))
+ (setq-local vm-folder-directory dir)))
(defun dired-rmail ()
"Run RMAIL on this file."
(interactive)
(unless (derived-mode-p 'dired-mode)
(error "Not a Dired buffer"))
- (set (make-local-variable 'wdired-old-content)
- (buffer-substring (point-min) (point-max)))
- (set (make-local-variable 'wdired-old-marks)
- (dired-remember-marks (point-min) (point-max)))
- (set (make-local-variable 'wdired-old-point) (point))
- (set (make-local-variable 'query-replace-skip-read-only) t)
+ (setq-local wdired-old-content
+ (buffer-substring (point-min) (point-max)))
+ (setq-local wdired-old-marks
+ (dired-remember-marks (point-min) (point-max)))
+ (setq-local wdired-old-point (point))
+ (setq-local query-replace-skip-read-only t)
(add-function :after-while (local 'isearch-filter-predicate)
#'wdired-isearch-filter-read-only)
(use-local-map wdired-mode-map)
(dired-advertise)
(remove-hook 'kill-buffer-hook 'wdired-check-kill-buffer t)
(remove-hook 'after-change-functions 'wdired--restore-properties t)
- (set (make-local-variable 'revert-buffer-function) 'dired-revert))
+ (setq-local revert-buffer-function 'dired-revert))
(defun wdired-abort-changes ()
;; original name and permissions as a property
(defun wdired-preprocess-perms ()
(let ((inhibit-read-only t))
- (set (make-local-variable 'wdired-col-perm) nil)
+ (setq-local wdired-col-perm nil)
(save-excursion
(goto-char (point-min))
(while (not (eobp))