X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/eada086196ccb005ded188ac2e58d41f3682a125..265c2fbf11cb8bf9b805df63ecb9508631f08e35:/lisp/progmodes/make-mode.el diff --git a/lisp/progmodes/make-mode.el b/lisp/progmodes/make-mode.el index 2f4419ba2e..8e8cd74c7b 100644 --- a/lisp/progmodes/make-mode.el +++ b/lisp/progmodes/make-mode.el @@ -879,41 +879,42 @@ Makefile mode can be configured by modifying the following variables: (make-local-variable 'makefile-need-macro-pickup) ;; Font lock. - (set (make-local-variable 'font-lock-defaults) - ;; SYNTAX-BEGIN set to backward-paragraph to avoid slow-down - ;; near the end of a large buffer, due to parse-partial-sexp's - ;; trying to parse all the way till the beginning of buffer. - '(makefile-font-lock-keywords - nil nil - ((?$ . ".")) - backward-paragraph)) - (set (make-local-variable 'syntax-propertize-function) - makefile-syntax-propertize-function) + (setq-local font-lock-defaults + ;; Set SYNTAX-BEGIN to backward-paragraph to avoid + ;; slow-down near the end of a large buffer, due to + ;; `parse-partial-sexp' trying to parse all the way till + ;; the beginning of buffer. + '(makefile-font-lock-keywords + nil nil + ((?$ . ".")) + backward-paragraph)) + (setq-local syntax-propertize-function + makefile-syntax-propertize-function) ;; Add-log. - (set (make-local-variable 'add-log-current-defun-function) - 'makefile-add-log-defun) + (setq-local add-log-current-defun-function + 'makefile-add-log-defun) ;; Imenu. - (set (make-local-variable 'imenu-generic-expression) - makefile-imenu-generic-expression) + (setq-local imenu-generic-expression + makefile-imenu-generic-expression) ;; Dabbrev. - (set (make-local-variable 'dabbrev-abbrev-skip-leading-regexp) "\\$") + (setq-local dabbrev-abbrev-skip-leading-regexp "\\$") ;; Other abbrevs. (setq local-abbrev-table makefile-mode-abbrev-table) ;; Filling. - (set (make-local-variable 'fill-paragraph-function) 'makefile-fill-paragraph) + (setq-local fill-paragraph-function 'makefile-fill-paragraph) ;; Comment stuff. - (set (make-local-variable 'comment-start) "#") - (set (make-local-variable 'comment-end) "") - (set (make-local-variable 'comment-start-skip) "#+[ \t]*") + (setq-local comment-start "#") + (setq-local comment-end "") + (setq-local comment-start-skip "#+[ \t]*") ;; Make sure TAB really inserts \t. - (set (make-local-variable 'indent-line-function) 'indent-to-left-margin) + (setq-local indent-line-function 'indent-to-left-margin) ;; Real TABs are important in makefiles (setq indent-tabs-mode t)) @@ -934,8 +935,7 @@ Makefile mode can be configured by modifying the following variables: ;;;###autoload (define-derived-mode makefile-makepp-mode makefile-mode "Makeppfile" "An adapted `makefile-mode' that knows about makepp." - (set (make-local-variable 'makefile-rule-action-regex) - makefile-makepp-rule-action-regex) + (setq-local makefile-rule-action-regex makefile-makepp-rule-action-regex) (setq font-lock-defaults `(makefile-makepp-font-lock-keywords ,@(cdr font-lock-defaults)) imenu-generic-expression @@ -945,11 +945,9 @@ Makefile mode can be configured by modifying the following variables: ;;;###autoload (define-derived-mode makefile-bsdmake-mode makefile-mode "BSDmakefile" "An adapted `makefile-mode' that knows about BSD make." - (set (make-local-variable 'makefile-dependency-regex) - makefile-bsdmake-dependency-regex) - (set (make-local-variable 'makefile-dependency-skip) "^:!") - (set (make-local-variable 'makefile-rule-action-regex) - makefile-bsdmake-rule-action-regex) + (setq-local makefile-dependency-regex makefile-bsdmake-dependency-regex) + (setq-local makefile-dependency-skip "^:!") + (setq-local makefile-rule-action-regex makefile-bsdmake-rule-action-regex) (setq font-lock-defaults `(makefile-bsdmake-font-lock-keywords ,@(cdr font-lock-defaults)))) @@ -957,7 +955,7 @@ Makefile mode can be configured by modifying the following variables: (define-derived-mode makefile-imake-mode makefile-mode "Imakefile" "An adapted `makefile-mode' that knows about imake." :syntax-table makefile-imake-mode-syntax-table - (set (make-local-variable 'syntax-propertize-function) nil) + (setq-local syntax-propertize-function nil) (setq font-lock-defaults `(makefile-imake-font-lock-keywords ,@(cdr font-lock-defaults)))) @@ -1501,8 +1499,8 @@ Insertion takes place at point." (pop-to-buffer browser-buffer) (makefile-browser-fill targets macros) (shrink-window-if-larger-than-buffer) - (set (make-local-variable 'makefile-browser-selection-vector) - (make-vector (+ (length targets) (length macros)) nil)) + (setq-local makefile-browser-selection-vector + (make-vector (+ (length targets) (length macros)) nil)) (makefile-browser-start-interaction)))) (defun makefile-switch-to-browser ()