There is some minimal font-lock support (see vars
`dcl-font-lock-defaults' and `dcl-font-lock-keywords')."
- (set (make-local-variable 'indent-line-function) 'dcl-indent-line)
- (set (make-local-variable 'comment-start) "!")
- (set (make-local-variable 'comment-end) "")
- (set (make-local-variable 'comment-multi-line) nil)
+ (setq-local indent-line-function 'dcl-indent-line)
+ (setq-local comment-start "!")
+ (setq-local comment-end "")
+ (setq-local comment-multi-line nil)
;; This used to be "^\\$[ \t]*![ \t]*" which looks more correct.
;; The drawback was that you couldn't make empty comment lines by pressing
;; C-M-j repeatedly - only the first line became a comment line.
;; This version has the drawback that the "$" can be anywhere in the line,
;; and something inappropriate might be interpreted as a comment.
- (set (make-local-variable 'comment-start-skip) "\\$[ \t]*![ \t]*")
+ (setq-local comment-start-skip "\\$[ \t]*![ \t]*")
(if (boundp 'imenu-generic-expression)
(progn (setq imenu-generic-expression dcl-imenu-generic-expression)
(make-local-variable 'dcl-electric-reindent-regexps)
;; font lock
- (set (make-local-variable 'font-lock-defaults) dcl-font-lock-defaults)
+ (setq-local font-lock-defaults dcl-font-lock-defaults)
(tempo-use-tag-list 'dcl-tempo-tags))
;; We can still simulate the behavior of older hideif versions (i.e.
;; `hide-ifdef-env' being buffer local) by clearing this variable
;; (C-c @ C) every time before hiding current buffer.
-;; (set (make-local-variable 'hide-ifdef-env)
+;; (setq-local hide-ifdef-env
;; (default-value 'hide-ifdef-env))
(set 'hide-ifdef-env (default-value 'hide-ifdef-env))
;; Some C/C++ headers might have other ways to prevent reinclusion and
;; thus would like `hide-ifdef-expand-reinclusion-protection' to be nil.
- (set (make-local-variable 'hide-ifdef-expand-reinclusion-protection)
- (default-value 'hide-ifdef-expand-reinclusion-protection))
- (set (make-local-variable 'hide-ifdef-hiding)
- (default-value 'hide-ifdef-hiding))
- (set (make-local-variable 'hif-outside-read-only) buffer-read-only)
- (set (make-local-variable 'line-move-ignore-invisible) t)
+ (setq-local hide-ifdef-expand-reinclusion-protection
+ (default-value 'hide-ifdef-expand-reinclusion-protection))
+ (setq-local hide-ifdef-hiding
+ (default-value 'hide-ifdef-hiding))
+ (setq-local hif-outside-read-only buffer-read-only)
+ (setq-local line-move-ignore-invisible t)
(add-hook 'change-major-mode-hook
(lambda () (hide-ifdef-mode -1)) nil t)
(defun hide-ifdef-toggle-shadowing ()
"Toggle shadowing."
(interactive)
- (set (make-local-variable 'hide-ifdef-shadow) (not hide-ifdef-shadow))
+ (setq-local hide-ifdef-shadow (not hide-ifdef-shadow))
(message "Shadowing %s" (if hide-ifdef-shadow "ON" "OFF"))
(save-restriction
(widen)
to the interpreter was sent from that window.
Typing \\<ps-run-mode-map>\\[ps-run-goto-error] when the cursor is at the number has the same effect."
(setq-local syntax-propertize-function #'ps-mode-syntax-propertize)
- (set (make-local-variable 'font-lock-defaults)
- '((ps-mode-font-lock-keywords
- ps-mode-font-lock-keywords-1
- ps-mode-font-lock-keywords-2
- ps-mode-font-lock-keywords-3)
- nil))
+ (setq-local font-lock-defaults
+ '((ps-mode-font-lock-keywords
+ ps-mode-font-lock-keywords-1
+ ps-mode-font-lock-keywords-2
+ ps-mode-font-lock-keywords-3)
+ nil))
(smie-setup nil #'ps-mode-smie-rules)
(setq-local electric-indent-chars
(append '(?> ?\] ?\}) electric-indent-chars))
- (set (make-local-variable 'comment-start) "%")
+ (setq-local comment-start "%")
;; NOTE: `\' has a special meaning in strings only
- (set (make-local-variable 'comment-start-skip) "%+[ \t]*")
+ (setq-local comment-start-skip "%+[ \t]*")
;; enable doc-view-minor-mode => C-c C-c starts viewing the current ps file
;; with doc-view-mode.
(doc-view-minor-mode 1))
(define-derived-mode ps-run-mode comint-mode "Interactive PS"
"Major mode in interactive PostScript window.
This mode is invoked from `ps-mode' and should not be called directly."
- (set (make-local-variable 'font-lock-defaults)
- '((ps-run-font-lock-keywords
- ps-run-font-lock-keywords-1
- ps-run-font-lock-keywords-2)
- t))
+ (setq-local font-lock-defaults
+ '((ps-run-font-lock-keywords
+ ps-run-font-lock-keywords-1
+ ps-run-font-lock-keywords-2)
+ t))
(setq mode-line-process '(":%s")))
(defun ps-run-running ()
(setq-default xscheme-process-command-line command-line)
(switch-to-buffer
(xscheme-start-process command-line process-name buffer-name))
- (set (make-local-variable 'xscheme-process-command-line) command-line))
+ (setq-local xscheme-process-command-line command-line))
(defun xscheme-read-command-line (arg)
(let ((default
xscheme-buffer-name
t)))
(let ((process-name (verify-xscheme-buffer buffer-name t)))
- (set (make-local-variable 'xscheme-buffer-name) buffer-name)
- (set (make-local-variable 'xscheme-process-name) process-name)
- (set (make-local-variable 'xscheme-runlight)
- (with-current-buffer buffer-name
- xscheme-runlight))))
+ (setq-local xscheme-buffer-name buffer-name)
+ (setq-local xscheme-process-name process-name)
+ (setq-local xscheme-runlight
+ (with-current-buffer buffer-name
+ xscheme-runlight))))
(defun local-clear-scheme-interaction-buffer ()
"Make the current buffer use the default scheme interaction buffer."
(kill-all-local-variables)
(make-local-variable 'xscheme-runlight-string)
(make-local-variable 'xscheme-runlight)
- (set (make-local-variable 'xscheme-previous-mode) previous-mode)
+ (setq-local xscheme-previous-mode previous-mode)
(let ((buffer (current-buffer)))
- (set (make-local-variable 'xscheme-buffer-name) (buffer-name buffer))
- (set (make-local-variable 'xscheme-last-input-end) (make-marker))
+ (setq-local xscheme-buffer-name (buffer-name buffer))
+ (setq-local xscheme-last-input-end (make-marker))
(let ((process (get-buffer-process buffer)))
(when process
(setq-local xscheme-process-name (process-name process))