Commit 4d985ac2 authored by Glenn Morris's avatar Glenn Morris

(diary-list-entries, diary-goto-entry)

(diary-show-all-entries, diary-mark-entries, diary-make-entry):
Use default-value of major-mode rather than default-major-mode.
parent b5a46fa6
2009-08-28 Glenn Morris <rgm@gnu.org>
* calendar/diary-lib.el (diary-list-entries, diary-goto-entry)
(diary-show-all-entries, diary-mark-entries, diary-make-entry):
Use default-value of major-mode rather than default-major-mode.
2009-08-27 Stefan Monnier <monnier@iro.umontreal.ca>
* Makefile.in (update-elcfiles): Report left over elc files.
......
......@@ -757,7 +757,7 @@ LIST-ONLY is non-nil, in which case it just returns the list."
(or (verify-visited-file-modtime diary-buffer)
(revert-buffer t t)))
;; Setup things like the header-line-format and invisibility-spec.
(if (eq major-mode default-major-mode)
(if (eq major-mode (default-value 'major-mode))
(diary-mode)
;; This kludge is to make customizations to
;; diary-header-line-flag after diary has been displayed
......@@ -934,7 +934,7 @@ in the mode line. This is an option for `diary-display-function'."
(file-exists-p file)
(find-file-other-window file)
(progn
(when (eq major-mode default-major-mode) (diary-mode))
(when (eq major-mode (default-value 'major-mode)) (diary-mode))
(goto-char (point-min))
(if (re-search-forward (format "%s.*\\(%s\\)"
(regexp-quote (nth 2 locator))
......@@ -1094,7 +1094,7 @@ is created."
(window-dedicated-p (selected-window)))))
(with-current-buffer (or (find-buffer-visiting d-file)
(find-file-noselect d-file t))
(when (eq major-mode default-major-mode) (diary-mode))
(when (eq major-mode (default-value 'major-mode)) (diary-mode))
(diary-unhide-everything)
(display-buffer (current-buffer)))))
......@@ -1289,7 +1289,7 @@ diary entries."
file-glob-attrs)
(with-current-buffer (find-file-noselect (diary-check-diary-file) t)
(save-excursion
(when (eq major-mode default-major-mode) (diary-mode))
(when (eq major-mode (default-value 'major-mode)) (diary-mode))
(setq calendar-mark-diary-entries-flag t)
(message "Marking diary entries...")
(setq file-glob-attrs (nth 1 (diary-pull-attrs nil '())))
......@@ -1983,7 +1983,7 @@ If omitted, NONMARKING defaults to nil and FILE defaults to
(let ((pop-up-frames (or pop-up-frames
(window-dedicated-p (selected-window)))))
(find-file-other-window (substitute-in-file-name (or file diary-file))))
(when (eq major-mode default-major-mode) (diary-mode))
(when (eq major-mode (default-value 'major-mode)) (diary-mode))
(widen)
(diary-unhide-everything)
(goto-char (point-max))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment