(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)
;;;###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
(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>.