(setq-local comment-start-skip
"\\(\\(^\\|[^\\\n]\\)\\(\\\\\\\\\\)*\\);+ *")
(buffer-disable-undo)
- (set (make-local-variable 'font-lock-global-modes) nil)
- (font-lock-mode -1)
- )
+ (setq-local font-lock-global-modes nil)
+ (font-lock-mode -1))
;;;###autoload
(defun data-debug-new-buffer (name)
(let* ((ov (oref (ede-current-project) local-variables))
(cp (ede-current-project)))
(ede-customize cp)
- (make-local-variable 'eieio-ede-old-variables)
- (setq eieio-ede-old-variables ov)))
+ (setq-local eieio-ede-old-variables ov)))
;;;###autoload
(defalias 'customize-project 'ede-customize-project)
:file fn)))
(oset ampf directory (file-name-directory fn))
(oset ampf configureoutputfiles cof)
- (make-local-variable 'ede-object)
- (setq ede-object ampf)
+ (setq-local ede-object ampf)
;; Move the rescan after we set ede-object to prevent recursion
(project-rescan ampf)
ampf))))
;; Do the normal thing.
(let (modes table old-locals)
(unless mode
- (set (make-local-variable 'mode-local--init-mode) major-mode)
+ (setq-local mode-local--init-mode major-mode)
(setq mode major-mode))
;; Get MODE's parents & MODE in the right order.
(while mode
(setq semantic--buffer-cache tagtable
semantic-unmatched-syntax-cache-check nil)
;; This is specific to the bovine parser.
- (set (make-local-variable 'semantic-bovinate-nonterminal-check-obarray)
- nil)
+ (setq-local semantic-bovinate-nonterminal-check-obarray nil)
(semantic-parse-tree-set-up-to-date)
(add-hook 'after-change-functions 'semantic-change-function nil t)
(run-hook-with-args 'semantic-after-toplevel-cache-change-hook
(with-current-buffer "*Help*"
(let ((inhibit-read-only t))
(goto-char (point-min))
- (set (make-local-variable 'semantic-analyzer-debug-orig) orig-buffer)
+ (setq-local semantic-analyzer-debug-orig orig-buffer)
;; First, add do-in buttons to recommendations.
(while (re-search-forward "^\\s-*M-x \\(\\(\\w\\|\\s_\\)+\\) " nil t)
(let ((fcn (match-string 1)))
"Initialize a buffer for editing Semantic grammars.
\\{semantic-grammar-mode-map}"
- (set (make-local-variable 'parse-sexp-ignore-comments) t)
- (set (make-local-variable 'comment-start) ";;")
+ (setq-local parse-sexp-ignore-comments t)
+ (setq-local comment-start ";;")
;; Look within the line for a ; following an even number of backslashes
;; after either a non-backslash or the line beginning.
- (set (make-local-variable 'comment-start-skip)
- "\\(\\(^\\|[^\\\n]\\)\\(\\\\\\\\\\)*\\);+ *")
- (set (make-local-variable 'indent-line-function)
- 'semantic-grammar-indent)
- (set (make-local-variable 'fill-paragraph-function)
- 'lisp-fill-paragraph)
- (set (make-local-variable 'font-lock-multiline)
- 'undecided)
- (set (make-local-variable 'font-lock-defaults)
- '((semantic-grammar-mode-keywords
- semantic-grammar-mode-keywords-1
- semantic-grammar-mode-keywords-2
- semantic-grammar-mode-keywords-3)
- nil ;; perform string/comment fontification
- nil ;; keywords are case sensitive.
- ;; This puts _ & - as a word constituent,
- ;; simplifying our keywords significantly
- ((?_ . "w") (?- . "w"))))
+ (setq-local comment-start-skip
+ "\\(\\(^\\|[^\\\n]\\)\\(\\\\\\\\\\)*\\);+ *")
+ (setq-local indent-line-function #'semantic-grammar-indent)
+ (setq-local fill-paragraph-function #'lisp-fill-paragraph)
+ (setq-local font-lock-multiline 'undecided)
+ (setq-local font-lock-defaults
+ '((semantic-grammar-mode-keywords
+ semantic-grammar-mode-keywords-1
+ semantic-grammar-mode-keywords-2
+ semantic-grammar-mode-keywords-3)
+ nil ;; perform string/comment fontification
+ nil ;; keywords are case sensitive.
+ ;; This puts _ & - as a word constituent,
+ ;; simplifying our keywords significantly
+ ((?_ . "w") (?- . "w"))))
;; Setup Semantic to parse grammar
(semantic-grammar-wy--install-parser)
(setq semantic-lex-comment-regex ";;"
(nonterminal . "Nonterminal")
(rule . "Rule")
))
- (set (make-local-variable 'semantic-format-face-alist)
- '(
- (code . default)
- (keyword . font-lock-keyword-face)
- (token . font-lock-type-face)
- (nonterminal . font-lock-function-name-face)
- (rule . default)
- ))
- (set (make-local-variable 'semantic-stickyfunc-sticky-classes)
- '(nonterminal))
+ (setq-local semantic-format-face-alist
+ '((code . default)
+ (keyword . font-lock-keyword-face)
+ (token . font-lock-type-face)
+ (nonterminal . font-lock-function-name-face)
+ (rule . default)))
+ (setq-local semantic-stickyfunc-sticky-classes
+ '(nonterminal))
;; Before each change, clear the cached regexp used to highlight
;; macros local in this grammar.
(add-hook 'before-change-functions
(if classes
(let ((tag (make-symbol "tag"))
(names (mapconcat 'symbol-name classes "', `")))
- (set (make-local-variable 'senator--search-filter)
- `(lambda (,tag)
- (memq (semantic-tag-class ,tag) ',classes)))
+ (setq-local senator--search-filter
+ `(lambda (,tag)
+ (memq (semantic-tag-class ,tag) ',classes)))
(add-hook 'senator-search-tag-filter-functions
senator--search-filter nil t)
(message "Limit search to `%s' tags" names))
;; senator one.
(when (and (local-variable-p 'isearch-search-fun-function)
(not (local-variable-p 'senator-old-isearch-search-fun)))
- (set (make-local-variable 'senator-old-isearch-search-fun)
- isearch-search-fun-function))
- (set (make-local-variable 'isearch-search-fun-function)
- 'senator-isearch-search-fun))
+ (setq-local senator-old-isearch-search-fun
+ isearch-search-fun-function))
+ (setq-local isearch-search-fun-function
+ 'senator-isearch-search-fun))
;; When `senator-isearch-semantic-mode' is off restore the
;; previous `isearch-search-fun-function'.
(when (eq isearch-search-fun-function 'senator-isearch-search-fun)
(if (local-variable-p 'senator-old-isearch-search-fun)
(progn
- (set (make-local-variable 'isearch-search-fun-function)
- senator-old-isearch-search-fun)
+ (setq-local isearch-search-fun-function
+ senator-old-isearch-search-fun)
(kill-local-variable 'senator-old-isearch-search-fun))
(kill-local-variable 'isearch-search-fun-function)))))
(switch-to-buffer-other-window buff)
(set-buffer buff)
(semantic-symref-results-mode)
- (set (make-local-variable 'semantic-symref-current-results) res)
+ (setq-local semantic-symref-current-results res)
(semantic-symref-results-dump res)
(goto-char (point-min))))
"Major-mode for displaying Semantic Symbol Reference results."
(buffer-disable-undo)
;; FIXME: Why bother turning off font-lock?
- (set (make-local-variable 'font-lock-global-modes) nil)
+ (setq-local font-lock-global-modes nil)
(font-lock-mode -1))
(defcustom semantic-symref-results-summary-function 'semantic-format-tag-prototype
(when (and (local-variable-p 'header-line-format (current-buffer))
(not (eq header-line-format
semantic-stickyfunc-header-line-format)))
- (set (make-local-variable 'semantic-stickyfunc-old-hlf)
- header-line-format))
+ (setq-local semantic-stickyfunc-old-hlf
+ header-line-format))
(setq header-line-format semantic-stickyfunc-header-line-format))
;; Disable sticky func mode
;; Restore previous buffer local value of header line format if
(defun wisent-python-default-setup ()
"Setup buffer for parse."
(wisent-python-wy--install-parser)
- (set (make-local-variable 'parse-sexp-ignore-comments) t)
+ (setq-local parse-sexp-ignore-comments t)
;; Give python modes the possibility to overwrite this:
(if (not comment-start-skip)
- (set (make-local-variable 'comment-start-skip) "#+\\s-*"))
+ (setq-local comment-start-skip "#+\\s-*"))
(setq
;; Character used to separation a parent/child relationship
semantic-type-relation-separator-character '(".")
(define-derived-mode srecode-template-mode fundamental-mode "SRecode"
;; FIXME: Shouldn't it derive from prog-mode?
"Major-mode for writing SRecode macros."
- (set (make-local-variable 'comment-start) ";;")
- (set (make-local-variable 'comment-end) "")
- (set (make-local-variable 'parse-sexp-ignore-comments) t)
- (set (make-local-variable 'comment-start-skip)
- "\\(\\(^\\|[^\\\n]\\)\\(\\\\\\\\\\)*\\);+ *")
- (set (make-local-variable 'font-lock-defaults)
- '(srecode-font-lock-keywords
- nil ;; perform string/comment fontification
- nil ;; keywords are case sensitive.
- ;; This puts _ & - as a word constituent,
- ;; simplifying our keywords significantly
- ((?_ . "w") (?- . "w")))))
+ (setq-local comment-start ";;")
+ (setq-local comment-end "")
+ (setq-local parse-sexp-ignore-comments t)
+ (setq-local comment-start-skip
+ "\\(\\(^\\|[^\\\n]\\)\\(\\\\\\\\\\)*\\);+ *")
+ (setq-local font-lock-defaults
+ '(srecode-font-lock-keywords
+ nil ;; perform string/comment fontification
+ nil ;; keywords are case sensitive.
+ ;; This puts _ & - as a word constituent,
+ ;; simplifying our keywords significantly
+ ((?_ . "w") (?- . "w")))))
;;;###autoload
(defalias 'srt-mode 'srecode-template-mode)