Prefer setq-local in calendar/*.el
* lisp/calendar/calendar.el (calendar-mode): * lisp/calendar/diary-lib.el (diary-list-entries, diary-mode): (diary-fancy-display-mode): Prefer setq-local.
This commit is contained in:
parent
d174a2bb23
commit
60cf0aa21c
2 changed files with 12 additions and 13 deletions
|
@ -1788,7 +1788,7 @@ For a complete description, see the info node `Calendar/Diary'.
|
|||
(setq buffer-read-only t
|
||||
buffer-undo-list t
|
||||
indent-tabs-mode nil)
|
||||
(set (make-local-variable 'scroll-margin) 0) ; bug#10379
|
||||
(setq-local scroll-margin 0) ; bug#10379
|
||||
(calendar-update-mode-line)
|
||||
(make-local-variable 'calendar-mark-ring)
|
||||
(make-local-variable 'displayed-month) ; month in middle of window
|
||||
|
|
|
@ -839,7 +839,7 @@ LIST-ONLY is non-nil, in which case it just returns the list."
|
|||
(goto-char (point-min))
|
||||
(unless list-only
|
||||
(let ((ol (make-overlay (point-min) (point-max) nil t nil)))
|
||||
(set (make-local-variable 'diary-selective-display) t)
|
||||
(setq-local diary-selective-display t)
|
||||
(overlay-put ol 'invisible 'diary)
|
||||
(overlay-put ol 'evaporate t)))
|
||||
(dotimes (_ number)
|
||||
|
@ -2381,10 +2381,9 @@ return a font-lock pattern matching array of MONTHS and marking SYMBOL."
|
|||
;;;###autoload
|
||||
(define-derived-mode diary-mode fundamental-mode "Diary"
|
||||
"Major mode for editing the diary file."
|
||||
(set (make-local-variable 'font-lock-defaults)
|
||||
'(diary-font-lock-keywords t))
|
||||
(set (make-local-variable 'comment-start) diary-comment-start)
|
||||
(set (make-local-variable 'comment-end) diary-comment-end)
|
||||
(setq-local font-lock-defaults '(diary-font-lock-keywords t))
|
||||
(setq-local comment-start diary-comment-start)
|
||||
(setq-local comment-end diary-comment-end)
|
||||
(add-to-invisibility-spec '(diary . nil))
|
||||
(add-hook 'after-save-hook #'diary-redraw-calendar nil t)
|
||||
;; In case the file was modified externally, refresh the calendar
|
||||
|
@ -2465,13 +2464,13 @@ Fontify the region between BEG and END, quietly unless VERBOSE is non-nil."
|
|||
(define-derived-mode diary-fancy-display-mode special-mode
|
||||
"Diary"
|
||||
"Major mode used while displaying diary entries using Fancy Display."
|
||||
(set (make-local-variable 'font-lock-defaults)
|
||||
'(diary-fancy-font-lock-keywords
|
||||
t nil nil nil
|
||||
(font-lock-fontify-region-function
|
||||
. diary-fancy-font-lock-fontify-region-function)))
|
||||
(set (make-local-variable 'minor-mode-overriding-map-alist)
|
||||
(list (cons t diary-fancy-overriding-map)))
|
||||
(setq-local font-lock-defaults
|
||||
'(diary-fancy-font-lock-keywords
|
||||
t nil nil nil
|
||||
(font-lock-fontify-region-function
|
||||
. diary-fancy-font-lock-fontify-region-function)))
|
||||
(setq-local minor-mode-overriding-map-alist
|
||||
(list (cons t diary-fancy-overriding-map)))
|
||||
(view-mode 1))
|
||||
|
||||
;; Following code from Dave Love <fx@gnu.org>.
|
||||
|
|
Loading…
Add table
Reference in a new issue