(define-derived-mode chart-mode special-mode "Chart"
"Define a mode in Emacs for displaying a chart."
(buffer-disable-undo)
- (set (make-local-variable 'font-lock-global-modes) nil)
+ (setq-local font-lock-global-modes nil)
(font-lock-mode -1) ;Isn't it off already? --Stef
)
(match-string-no-properties 1)
copyright-current-gpl-version)))))
(replace-match copyright-current-gpl-version t t nil 1))))
- (set (make-local-variable 'copyright-update) nil)))
+ (setq-local copyright-update nil)))
;; If a write-file-hook returns non-nil, the file is presumed to be written.
nil))
(widget-insert "\n\n")
(widget-insert "Edit object " (eieio-object-name obj) "\n\n")
;; Create the widget editing the object.
- (make-local-variable 'eieio-wo)
- (setq eieio-wo (eieio-custom-widget-insert obj :eieio-group g))
+ (setq-local eieio-wo (eieio-custom-widget-insert obj :eieio-group g))
;;Now generate the apply buttons
(widget-insert "\n")
(eieio-custom-object-apply-reset obj)
;;(widget-minor-mode)
(goto-char (point-min))
(widget-forward 3)
- (make-local-variable 'eieio-co)
- (setq eieio-co obj)
- (make-local-variable 'eieio-cog)
- (setq eieio-cog g)))
+ (setq-local eieio-co obj)
+ (setq-local eieio-cog g)))
(cl-defmethod eieio-custom-object-apply-reset ((_obj eieio-default-superclass))
"Insert an Apply and Reset button into the object editor.
;; Env is up to date
elint-buffer-forms
;; Remake env
- (set (make-local-variable 'elint-buffer-forms) (elint-get-top-forms))
- (set (make-local-variable 'elint-features) nil)
- (set (make-local-variable 'elint-buffer-env)
- (elint-init-env elint-buffer-forms))
+ (setq-local elint-buffer-forms (elint-get-top-forms))
+ (setq-local elint-features nil)
+ (setq-local elint-buffer-env (elint-init-env elint-buffer-forms))
(if elint-preloaded-env
;; FIXME: This doesn't do anything! Should we setq the result to
;; elint-buffer-env?
(elint-env-add-env elint-preloaded-env elint-buffer-env))
- (set (make-local-variable 'elint-last-env-time) (buffer-modified-tick))
+ (setq-local elint-last-env-time (buffer-modified-tick))
elint-buffer-forms))
(defun elint-get-top-forms ()
(= 4 (length form))
(eq (car-safe (cadr form)) 'quote)
(equal (nth 2 form) '(quote error-conditions)))
- (set (make-local-variable 'elint-extra-errors)
- (cons (cadr (cadr form)) elint-extra-errors)))
+ (setq-local elint-extra-errors
+ (cons (cadr (cadr form)) elint-extra-errors)))
((eq (car form) 'provide)
(add-to-list 'elint-features (eval (cadr form))))
;; Import variable definitions
;; `progress-bar-button-begin' will be the right position
;; even in the results buffer.
(with-current-buffer results-buffer
- (set (make-local-variable 'ert--results-progress-bar-button-begin)
- progress-bar-button-begin))))
+ (setq-local ert--results-progress-bar-button-begin
+ progress-bar-button-begin))))
(insert "\n\n")
(buffer-string))
;; footer
;; from ert-results-mode to ert-results-mode when
;; font-lock-mode turns itself off in change-major-mode-hook.)
(erase-buffer)
- (set (make-local-variable 'font-lock-function)
- 'ert--results-font-lock-function)
+ (setq-local font-lock-function
+ 'ert--results-font-lock-function)
(let ((ewoc (ewoc-create 'ert--print-test-for-ewoc nil nil t)))
- (set (make-local-variable 'ert--results-ewoc) ewoc)
- (set (make-local-variable 'ert--results-stats) stats)
- (set (make-local-variable 'ert--results-progress-bar-string)
- (make-string (ert-stats-total stats)
- (ert-char-for-test-result nil t)))
- (set (make-local-variable 'ert--results-listener) listener)
+ (setq-local ert--results-ewoc ewoc)
+ (setq-local ert--results-stats stats)
+ (setq-local ert--results-progress-bar-string
+ (make-string (ert-stats-total stats)
+ (ert-char-for-test-result nil t)))
+ (setq-local ert--results-listener listener)
(cl-loop for test across (ert--stats-tests stats) do
(ewoc-enter-last ewoc
(make-ert--ewoc-entry :test test
;; and should make no difference for explicit fill
;; because lisp-fill-paragraph should do the job.
;; I believe that newcomment's auto-fill code properly deals with it -stef
- ;;(set (make-local-variable 'adaptive-fill-mode) nil)
+ ;;(setq-local adaptive-fill-mode nil)
(setq-local indent-line-function 'lisp-indent-line)
(setq-local indent-region-function 'lisp-indent-region)
(setq-local comment-indent-function #'lisp-comment-indent)
(with-current-buffer standard-output
(emacs-lisp-mode)
(setq buffer-read-only nil)
- (set (make-local-variable 'font-lock-verbose) nil)))))
+ (setq-local font-lock-verbose nil)))))
;;;###autoload
(defun pp-eval-expression (expression)
(define-derived-mode reb-mode nil "RE Builder"
"Major mode for interactively building Regular Expressions."
- (set (make-local-variable 'blink-matching-paren) nil)
+ (setq-local blink-matching-paren nil)
(reb-mode-common))
(defvar reb-lisp-mode-map
(let ((font-lock-is-on font-lock-mode))
(font-lock-mode -1)
(kill-local-variable 'font-lock-set-defaults)
- ;;(set (make-local-variable 'reb-re-syntax) 'string)
- ;;(set (make-local-variable 'reb-re-syntax) 'rx)
+ ;;(setq-local reb-re-syntax 'string)
+ ;;(setq-local reb-re-syntax 'rx)
(setq font-lock-defaults
(cond
((memq reb-re-syntax '(read string))
(define-derived-mode load-path-shadows-mode fundamental-mode "LP-Shadows"
"Major mode for load-path shadows buffer."
- (set (make-local-variable 'font-lock-defaults)
- '((load-path-shadows-font-lock-keywords)))
+ (setq-local font-lock-defaults
+ '((load-path-shadows-font-lock-keywords)))
(setq buffer-undo-list t
buffer-read-only t))
(v (pop keywords)))
(pcase k
(:forward-token
- (set (make-local-variable 'smie-forward-token-function) v))
+ (setq-local smie-forward-token-function v))
(:backward-token
- (set (make-local-variable 'smie-backward-token-function) v))
+ (setq-local smie-backward-token-function v))
(_ (message "smie-setup: ignoring unknown keyword %s" k)))))
(let ((ca (cdr (assq :smie-closer-alist grammar))))
(when ca
(setq syntax-propertize--done (max (point-max) pos))
;; (message "Needs to syntax-propertize from %s to %s"
;; syntax-propertize--done pos)
- (set (make-local-variable 'parse-sexp-lookup-properties) t)
+ (setq-local parse-sexp-lookup-properties t)
(when (< syntax-propertize--done (point-min))
;; *Usually* syntax-propertize is called via syntax-ppss which
;; takes care of adding syntax-ppss-flush-cache to b-c-f, but this
(ctx (funcall context)))
(unless inhibit-trace
(with-current-buffer trace-buffer
- (set (make-local-variable 'window-point-insertion-type) t)
+ (setq-local window-point-insertion-type t)
(unless background (trace--display-buffer trace-buffer))
(goto-char (point-max))
;; Insert a separator from previous trace output: