2017-12-04 22:03:32 +00:00
|
|
|
|
;;; diary-lib.el --- diary functions -*- lexical-binding:t -*-
|
1995-09-21 03:11:06 +00:00
|
|
|
|
|
2021-01-01 09:13:56 +00:00
|
|
|
|
;; Copyright (C) 1989-1990, 1992-1995, 2001-2021 Free Software
|
2015-01-01 22:26:41 +00:00
|
|
|
|
;; Foundation, Inc.
|
1995-09-21 03:11:06 +00:00
|
|
|
|
|
|
|
|
|
;; Author: Edward M. Reingold <reingold@cs.uiuc.edu>
|
2019-06-01 19:11:55 +00:00
|
|
|
|
;; Maintainer: emacs-devel@gnu.org
|
1995-09-21 03:11:06 +00:00
|
|
|
|
;; Keywords: calendar
|
|
|
|
|
|
|
|
|
|
;; This file is part of GNU Emacs.
|
|
|
|
|
|
2008-05-06 03:07:58 +00:00
|
|
|
|
;; GNU Emacs is free software: you can redistribute it and/or modify
|
1995-09-21 03:11:06 +00:00
|
|
|
|
;; it under the terms of the GNU General Public License as published by
|
2008-05-06 03:07:58 +00:00
|
|
|
|
;; the Free Software Foundation, either version 3 of the License, or
|
|
|
|
|
;; (at your option) any later version.
|
1995-09-21 03:11:06 +00:00
|
|
|
|
|
|
|
|
|
;; GNU Emacs is distributed in the hope that it will be useful,
|
|
|
|
|
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
;; GNU General Public License for more details.
|
|
|
|
|
|
|
|
|
|
;; You should have received a copy of the GNU General Public License
|
2017-09-13 22:52:52 +00:00
|
|
|
|
;; along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>.
|
1995-09-21 03:11:06 +00:00
|
|
|
|
|
|
|
|
|
;;; Commentary:
|
|
|
|
|
|
2008-04-01 02:47:05 +00:00
|
|
|
|
;; See calendar.el.
|
1995-09-21 03:11:06 +00:00
|
|
|
|
|
|
|
|
|
;;; Code:
|
|
|
|
|
|
|
|
|
|
(require 'calendar)
|
2009-11-05 03:22:18 +00:00
|
|
|
|
(eval-and-compile (load "diary-loaddefs" nil t))
|
2008-03-13 05:54:57 +00:00
|
|
|
|
|
2008-04-11 03:46:35 +00:00
|
|
|
|
(defgroup diary nil
|
|
|
|
|
"Emacs diary."
|
|
|
|
|
:prefix "diary-"
|
|
|
|
|
:group 'calendar)
|
|
|
|
|
|
Move defcustoms to start.
(diary-include-string, diary-list-include-blanks)
(diary-glob-file-regexp-prefix, diary-face, diary-face-attrs)
(diary-file-name-prefix, diary-file-name-prefix-function)
(sexp-diary-entry-symbol, list-diary-entries-hook)
(mark-diary-entries-hook, nongregorian-diary-listing-hook)
(nongregorian-diary-marking-hook, print-diary-entries-hook):
Move here from calendar.el.
(diary-face): Make it a defcustom, and mark as obsolete.
(top-level): No need to require cal-hebrew, cal-islam when compiling.
(calendar-hebrew-month-name-array-leap-year)
(calendar-islamic-month-name-array, calendar-bahai-month-name-array):
Define for compiler.
(diary-font-lock-keywords): Use format rather than concat. Add
bahai-diary-entry-symbol.
2008-03-08 03:47:36 +00:00
|
|
|
|
(defcustom diary-include-string "#include"
|
|
|
|
|
"The string indicating inclusion of another file of diary entries.
|
(diary-sexp-entry-symbol): Rename sexp-diary-entry-symbol.
Keep old name as alias, update users.
(diary-list-entries-hook): Rename list-diary-entries-hook.
Keep old name as alias, update users.
(diary-mark-entries-hook): Rename mark-diary-entries-hook.
Keep old name as alias, update users.
(diary-nongregorian-listing-hook): Rename nongregorian-diary-listing-hook.
Keep old name as alias, update users.
(diary-nongregorian-marking-hook): Rename nongregorian-diary-marking-hook.
Keep old name as alias, update users.
(diary-print-entries-hook): Rename print-diary-entries-hook.
Keep old name as alias, update users.
(diary-abbreviated-year-flag): Rename abbreviated-calendar-year.
Keep old name as alias, update users.
(diary-number-of-entries): Rename number-of-diary-entries.
Keep old name as alias, update users.
(view-diary-entries, list-diary-entries, show-all-diary-entries):
Give version of obsolescence.
(diary-view-other-diary-entries): Rename view-other-diary-entries.
Keep old name as alias, update callers.
(diary-add-to-list): Rename add-to-diary-list. Keep old name as alias,
update callers.
(diary-include-other-diary-files): Rename include-other-diary-files.
Keep old name as alias, update callers.
(diary-simple-display): Rename simple-diary-display. Keep old name as alias,
update callers.
(diary-fancy-display): Rename fancy-diary-display. Keep old name as alias,
update callers.
(diary-print-entries): Rename print-diary-entries. Keep old name as alias,
update callers.
(diary-marking-entries-flag): Rename marking-diary-entries. Update users.
(diary-marking-entry-flag): Rename marking-diary-entry. Update users.
(diary-mark-entries): Rename mark-diary-entries. Keep old name as alias,
update callers.
(diary-mark-sexp-entries): Rename mark-sexp-diary-entries.
Keep old name as alias, update callers.
(diary-mark-included-diary-files): Rename mark-included-diary-files.
Keep old name as alias, update callers.
(calendar-mark-days-named): Rename mark-calendar-days-named.
Keep old name as alias, update callers.
(calendar-mark-month): Rename mark-calendar-month. Keep old name as alias,
update callers.
(calendar-mark-date-pattern): Rename mark-calendar-date-pattern.
Keep old name as alias, update callers.
(diary-sort-entries): Rename sort-diary-entries. Keep old name as alias,
update callers.
(diary-list-sexp-entries): Rename list-sexp-diary-entries.
Keep old name as alias, update callers.
(diary-make-entry): Rename make-diary-entry. Keep old name as alias,
update callers.
(diary-insert-entry): Rename insert-diary-entry. Keep old name as alias.
(diary-insert-weekly-entry): Rename insert-weekly-diary-entry.
Keep old name as alias.
(diary-insert-monthly-entry): Rename insert-monthly-diary-entry.
Keep old name as alias.
(diary-insert-yearly-entry): Rename insert-yearly-diary-entry.
Keep old name as alias.
(diary-insert-anniversary-entry): Rename insert-anniversary-diary-entry.
Keep old name as alias.
(diary-insert-block-entry): Rename insert-block-diary-entry.
Keep old name as alias.
(diary-insert-cyclic-entry): Rename insert-cyclic-diary-entry.
Keep old name as alias.
(diary-fancy-font-lock-keywords): Rename fancy-diary-font-lock-keywords.
Keep old name as alias, update users.
(diary-fancy-display-mode): Rename fancy-diary-display-mode.
Keep old name as alias, update callers.
2008-04-06 20:53:14 +00:00
|
|
|
|
See the documentation for the function `diary-include-other-diary-files'."
|
Move defcustoms to start.
(diary-include-string, diary-list-include-blanks)
(diary-glob-file-regexp-prefix, diary-face, diary-face-attrs)
(diary-file-name-prefix, diary-file-name-prefix-function)
(sexp-diary-entry-symbol, list-diary-entries-hook)
(mark-diary-entries-hook, nongregorian-diary-listing-hook)
(nongregorian-diary-marking-hook, print-diary-entries-hook):
Move here from calendar.el.
(diary-face): Make it a defcustom, and mark as obsolete.
(top-level): No need to require cal-hebrew, cal-islam when compiling.
(calendar-hebrew-month-name-array-leap-year)
(calendar-islamic-month-name-array, calendar-bahai-month-name-array):
Define for compiler.
(diary-font-lock-keywords): Use format rather than concat. Add
bahai-diary-entry-symbol.
2008-03-08 03:47:36 +00:00
|
|
|
|
:type 'string
|
|
|
|
|
:group 'diary)
|
|
|
|
|
|
|
|
|
|
(defcustom diary-list-include-blanks nil
|
|
|
|
|
"If nil, do not include days with no diary entry in the list of diary entries.
|
|
|
|
|
Such days will then not be shown in the fancy diary buffer, even if they
|
|
|
|
|
are holidays."
|
|
|
|
|
:type 'boolean
|
|
|
|
|
:group 'diary)
|
|
|
|
|
|
2008-03-17 02:33:49 +00:00
|
|
|
|
(defface diary-anniversary '((t :inherit font-lock-keyword-face))
|
|
|
|
|
"Face used for anniversaries in the fancy diary display."
|
|
|
|
|
:version "22.1"
|
2008-04-12 03:11:49 +00:00
|
|
|
|
:group 'calendar-faces)
|
2008-03-17 02:33:49 +00:00
|
|
|
|
|
|
|
|
|
(defface diary-time '((t :inherit font-lock-variable-name-face))
|
2008-04-12 03:11:49 +00:00
|
|
|
|
"Face used for times of day in the fancy diary display."
|
2008-03-17 02:33:49 +00:00
|
|
|
|
:version "22.1"
|
2008-04-12 03:11:49 +00:00
|
|
|
|
:group 'calendar-faces)
|
2008-03-17 02:33:49 +00:00
|
|
|
|
|
|
|
|
|
(defface diary-button '((((type pc) (class color))
|
|
|
|
|
(:foreground "lightblue")))
|
2008-04-12 03:11:49 +00:00
|
|
|
|
"Face used for buttons in the fancy diary display."
|
2008-03-17 02:33:49 +00:00
|
|
|
|
:version "22.1"
|
2008-04-12 03:11:49 +00:00
|
|
|
|
:group 'calendar-faces)
|
2009-08-31 01:33:58 +00:00
|
|
|
|
|
(diary-face-attrs): Fix custom :type.
(diary-face-attrs, diary-glob-file-regexp-prefix, diary-unknown-time)
(diary-pull-attrs, diary-header-line-flag, diary-list-entries)
(diary-unhide-everything, include-other-diary-files, diary-goto-entry)
(mark-included-diary-files, mark-calendar-days-named)
(mark-calendar-date-pattern, mark-calendar-month, diary-entry-compare)
(diary-remind, insert-diary-entry, insert-weekly-diary-entry)
(insert-monthly-diary-entry, insert-yearly-diary-entry)
(insert-anniversary-diary-entry, insert-block-diary-entry)
(insert-cyclic-diary-entry, fancy-diary-font-lock-keywords)
(diary-font-lock-sexps): Doc fixes.
(diary-remind-message, mark-calendar-month): Use zerop.
(diary-attrtype-convert, diary-pull-attrs): Simplify.
(diary-list-entries): Revert let to let* (previous change).
2008-03-10 02:44:51 +00:00
|
|
|
|
;; Face markup of calendar and diary displays: Any entry line that
|
|
|
|
|
;; ends with [foo:value] where foo is a face attribute (except :box
|
|
|
|
|
;; :stipple) or with [face:blah] tags, will have these values applied
|
|
|
|
|
;; to the calendar and fancy diary displays. These attributes "stack"
|
|
|
|
|
;; on calendar displays. File-wide attributes can be defined as
|
|
|
|
|
;; follows: the first line matching "^# [tag:value]" defines the value
|
|
|
|
|
;; for that particular tag.
|
Move defcustoms to start.
(diary-include-string, diary-list-include-blanks)
(diary-glob-file-regexp-prefix, diary-face, diary-face-attrs)
(diary-file-name-prefix, diary-file-name-prefix-function)
(sexp-diary-entry-symbol, list-diary-entries-hook)
(mark-diary-entries-hook, nongregorian-diary-listing-hook)
(nongregorian-diary-marking-hook, print-diary-entries-hook):
Move here from calendar.el.
(diary-face): Make it a defcustom, and mark as obsolete.
(top-level): No need to require cal-hebrew, cal-islam when compiling.
(calendar-hebrew-month-name-array-leap-year)
(calendar-islamic-month-name-array, calendar-bahai-month-name-array):
Define for compiler.
(diary-font-lock-keywords): Use format rather than concat. Add
bahai-diary-entry-symbol.
2008-03-08 03:47:36 +00:00
|
|
|
|
(defcustom diary-face-attrs
|
2020-12-29 01:01:57 +00:00
|
|
|
|
'((" *\\[foreground:\\([-a-z]+\\)\\] *" 1 :foreground string)
|
|
|
|
|
(" *\\[background:\\([-a-z]+\\)\\] *" 1 :background string)
|
|
|
|
|
(" *\\[width:\\([-a-z]+\\)\\] *" 1 :width symbol)
|
|
|
|
|
(" *\\[height:\\([.0-9]+\\)\\] *" 1 :height int)
|
|
|
|
|
(" *\\[weight:\\([-a-z]+\\)\\] *" 1 :weight symbol)
|
|
|
|
|
(" *\\[slant:\\([-a-z]+\\)\\] *" 1 :slant symbol)
|
|
|
|
|
(" *\\[underline:\\([-a-z]+\\)\\] *" 1 :underline stringtnil)
|
|
|
|
|
(" *\\[overline:\\([-a-z]+\\)\\] *" 1 :overline stringtnil)
|
|
|
|
|
(" *\\[strike-through:\\([-a-z]+\\)\\] *" 1 :strike-through stringtnil)
|
|
|
|
|
(" *\\[inverse-video:\\([-a-z]+\\)\\] *" 1 :inverse-video tnil)
|
|
|
|
|
(" *\\[face:\\([-0-9a-z]+\\)\\] *" 1 :face string)
|
|
|
|
|
(" *\\[font:\\([-a-z0-9]+\\)\\] *" 1 :font string)
|
Move defcustoms to start.
(diary-include-string, diary-list-include-blanks)
(diary-glob-file-regexp-prefix, diary-face, diary-face-attrs)
(diary-file-name-prefix, diary-file-name-prefix-function)
(sexp-diary-entry-symbol, list-diary-entries-hook)
(mark-diary-entries-hook, nongregorian-diary-listing-hook)
(nongregorian-diary-marking-hook, print-diary-entries-hook):
Move here from calendar.el.
(diary-face): Make it a defcustom, and mark as obsolete.
(top-level): No need to require cal-hebrew, cal-islam when compiling.
(calendar-hebrew-month-name-array-leap-year)
(calendar-islamic-month-name-array, calendar-bahai-month-name-array):
Define for compiler.
(diary-font-lock-keywords): Use format rather than concat. Add
bahai-diary-entry-symbol.
2008-03-08 03:47:36 +00:00
|
|
|
|
;; Unsupported.
|
|
|
|
|
;;; (" *\\[box:\\([-a-z]+\\)\\]$" 1 :box)
|
|
|
|
|
;;; (" *\\[stipple:\\([-a-z]+\\)\\]$" 1 :stipple)
|
|
|
|
|
)
|
(diary-face-attrs): Fix custom :type.
(diary-face-attrs, diary-glob-file-regexp-prefix, diary-unknown-time)
(diary-pull-attrs, diary-header-line-flag, diary-list-entries)
(diary-unhide-everything, include-other-diary-files, diary-goto-entry)
(mark-included-diary-files, mark-calendar-days-named)
(mark-calendar-date-pattern, mark-calendar-month, diary-entry-compare)
(diary-remind, insert-diary-entry, insert-weekly-diary-entry)
(insert-monthly-diary-entry, insert-yearly-diary-entry)
(insert-anniversary-diary-entry, insert-block-diary-entry)
(insert-cyclic-diary-entry, fancy-diary-font-lock-keywords)
(diary-font-lock-sexps): Doc fixes.
(diary-remind-message, mark-calendar-month): Use zerop.
(diary-attrtype-convert, diary-pull-attrs): Simplify.
(diary-list-entries): Revert let to let* (previous change).
2008-03-10 02:44:51 +00:00
|
|
|
|
"Alist of (REGEXP SUBEXP ATTRIBUTE TYPE) elements.
|
|
|
|
|
This is used by `diary-pull-attrs' to fontify certain diary
|
|
|
|
|
elements. REGEXP is a regular expression to for, and SUBEXP is
|
|
|
|
|
the numbered sub-expression to extract. `diary-glob-file-regexp-prefix'
|
(diary-face-attrs, diary-glob-file-regexp-prefix, diary-selective-display)
(number-of-diary-entries, diary-list-entries, diary-goto-entry):
(list-sexp-diary-entries, diary-date, diary-block, diary-float)
(diary-anniversary, diary-cyclic)
(diary-fancy-font-lock-fontify-region-function): Doc fixes.
(diary-header-line-format): Change wording.
(diary-list-entries): Set `date-start' in let.
(include-other-diary-files, mark-included-diary-files): Use format.
(simple-diary-display, fancy-diary-display): Use cadr, unless.
(mark-diary-entries): Use 1+.
(mark-sexp-diary-entries, list-sexp-diary-entries): Use when.
(mark-calendar-month): Use dotimes.
(diary-list-entries-1, diary-mark-entries-1): New functions.
2008-03-15 03:03:08 +00:00
|
|
|
|
is pre-pended to REGEXP for file-wide specifiers. ATTRIBUTE
|
(diary-face-attrs): Fix custom :type.
(diary-face-attrs, diary-glob-file-regexp-prefix, diary-unknown-time)
(diary-pull-attrs, diary-header-line-flag, diary-list-entries)
(diary-unhide-everything, include-other-diary-files, diary-goto-entry)
(mark-included-diary-files, mark-calendar-days-named)
(mark-calendar-date-pattern, mark-calendar-month, diary-entry-compare)
(diary-remind, insert-diary-entry, insert-weekly-diary-entry)
(insert-monthly-diary-entry, insert-yearly-diary-entry)
(insert-anniversary-diary-entry, insert-block-diary-entry)
(insert-cyclic-diary-entry, fancy-diary-font-lock-keywords)
(diary-font-lock-sexps): Doc fixes.
(diary-remind-message, mark-calendar-month): Use zerop.
(diary-attrtype-convert, diary-pull-attrs): Simplify.
(diary-list-entries): Revert let to let* (previous change).
2008-03-10 02:44:51 +00:00
|
|
|
|
specifies which face attribute (e.g. `:foreground') to modify, or
|
|
|
|
|
that this is a face (`:face') to apply. TYPE is the type of
|
|
|
|
|
attribute being applied. Available TYPES (see `diary-attrtype-convert')
|
lisp/*.el, src/*.c: Fix typos in docstrings
* lisp/apropos.el (apropos-do-all):
* lisp/auth-source-pass.el (auth-source-pass--select-from-entries):
* lisp/auth-source.el (auth-source-user-or-password):
* lisp/calc/calc-forms.el (math-tzone-names):
* lisp/calendar/diary-lib.el (diary-face-attrs)
(diary-mark-entries-1):
* lisp/cedet/cedet-files.el (cedet-files-list-recursively):
* lisp/cedet/ede.el (ede-constructing, ede-deep-rescan):
* lisp/cedet/ede/cpp-root.el (ede-cpp-root-header-file-p):
* lisp/cedet/ede/proj.el (ede-proj-target-makefile):
* lisp/cedet/inversion.el (inversion-check-version)
(inversion-test):
* lisp/cedet/mode-local.el (mode-local-map-file-buffers):
* lisp/cedet/semantic/complete.el (semantic-displayer-ghost):
* lisp/cedet/semantic/db-find.el (semanticdb-find-translate-path-default):
* lisp/cedet/semantic/db.el (semanticdb-table)
(semanticdb-search-system-databases):
* lisp/cedet/semantic/imenu.el (semantic-imenu-index-directory):
* lisp/cedet/semantic/java.el (semantic-java-doc-keywords-map):
* lisp/cedet/semantic/lex-spp.el (semantic-lex-spp-use-headers-flag):
* lisp/cedet/semantic/lex.el (semantic-lex-make-keyword-table)
(semantic-lex-make-type-table, semantic-lex-debug-analyzers):
* lisp/cedet/semantic/tag-ls.el (semantic-tag-abstract-p)
(semantic-tag-leaf-p, semantic-tag-static-p)
(semantic-tag-prototype-p):
* lisp/dnd.el (dnd-open-remote-file-function, dnd-open-local-file):
* lisp/emacs-lisp/eieio-opt.el (eieio-build-class-alist)
(eieio-read-class, eieio-read-subclass):
* lisp/emacs-lisp/generator.el (cps--replace-variable-references)
(cps--handle-loop-for):
* lisp/erc/erc-dcc.el (erc-dcc-list, erc-dcc-member, erc-dcc-server)
(erc-dcc-auto-mask-p, erc-dcc-get-file, erc-dcc-chat-accept):
* lisp/eshell/em-pred.el (eshell-pred-file-type):
* lisp/faces.el (defined-colors-with-face-attributes):
* lisp/font-core.el (font-lock-mode):
* lisp/frame.el (frame-restack):
* lisp/net/shr.el (shr-image-animate):
* lisp/org/org-agenda.el (org-agenda-change-all-lines)
(org-agenda-today-p):
* lisp/org/org-id.el (org-id-get):
* lisp/org/org.el (org-highlight-latex-and-related)
(org--valid-property-p):
* lisp/org/ox-beamer.el (org-beamer--get-label):
* lisp/org/ox-latex.el (org-latex--caption-above-p):
* lisp/org/ox-odt.el (org-odt--copy-image-file)
(org-odt--copy-formula-file):
* lisp/org/ox.el (org-export-with-timestamps):
* lisp/progmodes/verilog-mode.el (verilog-indent-declaration-macros):
* lisp/ses.el (ses-file-format-extend-parameter-list):
* lisp/term.el (ansi-term):
* lisp/textmodes/bibtex.el (bibtex-no-opt-remove-re)
(bibtex-beginning-of-first-entry, bibtex-autokey-get-title)
(bibtex-read-key, bibtex-initialize):
* lisp/textmodes/flyspell.el (flyspell-word):
* lisp/view.el (view-mode-exit):
* src/composite.c:
* src/floatfns.c (Fisnan): Fix typos in docstrings.
2019-09-19 02:32:25 +00:00
|
|
|
|
are: `string', `symbol', `int', `tnil', `stringtnil'."
|
2019-12-21 17:52:06 +00:00
|
|
|
|
:type '(repeat (list (regexp :tag "Regular expression")
|
2008-03-13 06:29:28 +00:00
|
|
|
|
(integer :tag "Sub-expression")
|
|
|
|
|
(symbol :tag "Attribute (e.g. :foreground)")
|
|
|
|
|
(choice (const string :tag "A string")
|
|
|
|
|
(const symbol :tag "A symbol")
|
|
|
|
|
(const int :tag "An integer")
|
2015-05-21 17:04:45 +00:00
|
|
|
|
(const tnil :tag "t or nil")
|
2008-03-13 06:29:28 +00:00
|
|
|
|
(const stringtnil
|
2015-05-21 17:04:45 +00:00
|
|
|
|
:tag "A string, t, or nil"))))
|
(diary-face-attrs): Fix custom :type.
(diary-face-attrs, diary-glob-file-regexp-prefix, diary-unknown-time)
(diary-pull-attrs, diary-header-line-flag, diary-list-entries)
(diary-unhide-everything, include-other-diary-files, diary-goto-entry)
(mark-included-diary-files, mark-calendar-days-named)
(mark-calendar-date-pattern, mark-calendar-month, diary-entry-compare)
(diary-remind, insert-diary-entry, insert-weekly-diary-entry)
(insert-monthly-diary-entry, insert-yearly-diary-entry)
(insert-anniversary-diary-entry, insert-block-diary-entry)
(insert-cyclic-diary-entry, fancy-diary-font-lock-keywords)
(diary-font-lock-sexps): Doc fixes.
(diary-remind-message, mark-calendar-month): Use zerop.
(diary-attrtype-convert, diary-pull-attrs): Simplify.
(diary-list-entries): Revert let to let* (previous change).
2008-03-10 02:44:51 +00:00
|
|
|
|
:group 'diary)
|
|
|
|
|
|
2019-08-04 18:39:03 +00:00
|
|
|
|
(defcustom diary-glob-file-regexp-prefix "^#"
|
(diary-face-attrs, diary-glob-file-regexp-prefix, diary-selective-display)
(number-of-diary-entries, diary-list-entries, diary-goto-entry):
(list-sexp-diary-entries, diary-date, diary-block, diary-float)
(diary-anniversary, diary-cyclic)
(diary-fancy-font-lock-fontify-region-function): Doc fixes.
(diary-header-line-format): Change wording.
(diary-list-entries): Set `date-start' in let.
(include-other-diary-files, mark-included-diary-files): Use format.
(simple-diary-display, fancy-diary-display): Use cadr, unless.
(mark-diary-entries): Use 1+.
(mark-sexp-diary-entries, list-sexp-diary-entries): Use when.
(mark-calendar-month): Use dotimes.
(diary-list-entries-1, diary-mark-entries-1): New functions.
2008-03-15 03:03:08 +00:00
|
|
|
|
"Regular expression pre-pended to `diary-face-attrs' for file-wide specifiers."
|
(diary-face-attrs): Fix custom :type.
(diary-face-attrs, diary-glob-file-regexp-prefix, diary-unknown-time)
(diary-pull-attrs, diary-header-line-flag, diary-list-entries)
(diary-unhide-everything, include-other-diary-files, diary-goto-entry)
(mark-included-diary-files, mark-calendar-days-named)
(mark-calendar-date-pattern, mark-calendar-month, diary-entry-compare)
(diary-remind, insert-diary-entry, insert-weekly-diary-entry)
(insert-monthly-diary-entry, insert-yearly-diary-entry)
(insert-anniversary-diary-entry, insert-block-diary-entry)
(insert-cyclic-diary-entry, fancy-diary-font-lock-keywords)
(diary-font-lock-sexps): Doc fixes.
(diary-remind-message, mark-calendar-month): Use zerop.
(diary-attrtype-convert, diary-pull-attrs): Simplify.
(diary-list-entries): Revert let to let* (previous change).
2008-03-10 02:44:51 +00:00
|
|
|
|
:type 'regexp
|
Move defcustoms to start.
(diary-include-string, diary-list-include-blanks)
(diary-glob-file-regexp-prefix, diary-face, diary-face-attrs)
(diary-file-name-prefix, diary-file-name-prefix-function)
(sexp-diary-entry-symbol, list-diary-entries-hook)
(mark-diary-entries-hook, nongregorian-diary-listing-hook)
(nongregorian-diary-marking-hook, print-diary-entries-hook):
Move here from calendar.el.
(diary-face): Make it a defcustom, and mark as obsolete.
(top-level): No need to require cal-hebrew, cal-islam when compiling.
(calendar-hebrew-month-name-array-leap-year)
(calendar-islamic-month-name-array, calendar-bahai-month-name-array):
Define for compiler.
(diary-font-lock-keywords): Use format rather than concat. Add
bahai-diary-entry-symbol.
2008-03-08 03:47:36 +00:00
|
|
|
|
:group 'diary)
|
|
|
|
|
|
|
|
|
|
(defcustom diary-file-name-prefix nil
|
|
|
|
|
"Non-nil means prefix each diary entry with the name of the file defining it."
|
|
|
|
|
:type 'boolean
|
|
|
|
|
:group 'diary)
|
|
|
|
|
|
2017-12-04 22:03:32 +00:00
|
|
|
|
(defcustom diary-file-name-prefix-function #'identity
|
Move defcustoms to start.
(diary-include-string, diary-list-include-blanks)
(diary-glob-file-regexp-prefix, diary-face, diary-face-attrs)
(diary-file-name-prefix, diary-file-name-prefix-function)
(sexp-diary-entry-symbol, list-diary-entries-hook)
(mark-diary-entries-hook, nongregorian-diary-listing-hook)
(nongregorian-diary-marking-hook, print-diary-entries-hook):
Move here from calendar.el.
(diary-face): Make it a defcustom, and mark as obsolete.
(top-level): No need to require cal-hebrew, cal-islam when compiling.
(calendar-hebrew-month-name-array-leap-year)
(calendar-islamic-month-name-array, calendar-bahai-month-name-array):
Define for compiler.
(diary-font-lock-keywords): Use format rather than concat. Add
bahai-diary-entry-symbol.
2008-03-08 03:47:36 +00:00
|
|
|
|
"The function that will take a diary file name and return the desired prefix."
|
|
|
|
|
:type 'function
|
|
|
|
|
:group 'diary)
|
|
|
|
|
|
(diary-sexp-entry-symbol): Rename sexp-diary-entry-symbol.
Keep old name as alias, update users.
(diary-list-entries-hook): Rename list-diary-entries-hook.
Keep old name as alias, update users.
(diary-mark-entries-hook): Rename mark-diary-entries-hook.
Keep old name as alias, update users.
(diary-nongregorian-listing-hook): Rename nongregorian-diary-listing-hook.
Keep old name as alias, update users.
(diary-nongregorian-marking-hook): Rename nongregorian-diary-marking-hook.
Keep old name as alias, update users.
(diary-print-entries-hook): Rename print-diary-entries-hook.
Keep old name as alias, update users.
(diary-abbreviated-year-flag): Rename abbreviated-calendar-year.
Keep old name as alias, update users.
(diary-number-of-entries): Rename number-of-diary-entries.
Keep old name as alias, update users.
(view-diary-entries, list-diary-entries, show-all-diary-entries):
Give version of obsolescence.
(diary-view-other-diary-entries): Rename view-other-diary-entries.
Keep old name as alias, update callers.
(diary-add-to-list): Rename add-to-diary-list. Keep old name as alias,
update callers.
(diary-include-other-diary-files): Rename include-other-diary-files.
Keep old name as alias, update callers.
(diary-simple-display): Rename simple-diary-display. Keep old name as alias,
update callers.
(diary-fancy-display): Rename fancy-diary-display. Keep old name as alias,
update callers.
(diary-print-entries): Rename print-diary-entries. Keep old name as alias,
update callers.
(diary-marking-entries-flag): Rename marking-diary-entries. Update users.
(diary-marking-entry-flag): Rename marking-diary-entry. Update users.
(diary-mark-entries): Rename mark-diary-entries. Keep old name as alias,
update callers.
(diary-mark-sexp-entries): Rename mark-sexp-diary-entries.
Keep old name as alias, update callers.
(diary-mark-included-diary-files): Rename mark-included-diary-files.
Keep old name as alias, update callers.
(calendar-mark-days-named): Rename mark-calendar-days-named.
Keep old name as alias, update callers.
(calendar-mark-month): Rename mark-calendar-month. Keep old name as alias,
update callers.
(calendar-mark-date-pattern): Rename mark-calendar-date-pattern.
Keep old name as alias, update callers.
(diary-sort-entries): Rename sort-diary-entries. Keep old name as alias,
update callers.
(diary-list-sexp-entries): Rename list-sexp-diary-entries.
Keep old name as alias, update callers.
(diary-make-entry): Rename make-diary-entry. Keep old name as alias,
update callers.
(diary-insert-entry): Rename insert-diary-entry. Keep old name as alias.
(diary-insert-weekly-entry): Rename insert-weekly-diary-entry.
Keep old name as alias.
(diary-insert-monthly-entry): Rename insert-monthly-diary-entry.
Keep old name as alias.
(diary-insert-yearly-entry): Rename insert-yearly-diary-entry.
Keep old name as alias.
(diary-insert-anniversary-entry): Rename insert-anniversary-diary-entry.
Keep old name as alias.
(diary-insert-block-entry): Rename insert-block-diary-entry.
Keep old name as alias.
(diary-insert-cyclic-entry): Rename insert-cyclic-diary-entry.
Keep old name as alias.
(diary-fancy-font-lock-keywords): Rename fancy-diary-font-lock-keywords.
Keep old name as alias, update users.
(diary-fancy-display-mode): Rename fancy-diary-display-mode.
Keep old name as alias, update callers.
2008-04-06 20:53:14 +00:00
|
|
|
|
(defcustom diary-sexp-entry-symbol "%%"
|
Move defcustoms to start.
(diary-include-string, diary-list-include-blanks)
(diary-glob-file-regexp-prefix, diary-face, diary-face-attrs)
(diary-file-name-prefix, diary-file-name-prefix-function)
(sexp-diary-entry-symbol, list-diary-entries-hook)
(mark-diary-entries-hook, nongregorian-diary-listing-hook)
(nongregorian-diary-marking-hook, print-diary-entries-hook):
Move here from calendar.el.
(diary-face): Make it a defcustom, and mark as obsolete.
(top-level): No need to require cal-hebrew, cal-islam when compiling.
(calendar-hebrew-month-name-array-leap-year)
(calendar-islamic-month-name-array, calendar-bahai-month-name-array):
Define for compiler.
(diary-font-lock-keywords): Use format rather than concat. Add
bahai-diary-entry-symbol.
2008-03-08 03:47:36 +00:00
|
|
|
|
"The string used to indicate a sexp diary entry in `diary-file'.
|
(diary-sexp-entry-symbol): Rename sexp-diary-entry-symbol.
Keep old name as alias, update users.
(diary-list-entries-hook): Rename list-diary-entries-hook.
Keep old name as alias, update users.
(diary-mark-entries-hook): Rename mark-diary-entries-hook.
Keep old name as alias, update users.
(diary-nongregorian-listing-hook): Rename nongregorian-diary-listing-hook.
Keep old name as alias, update users.
(diary-nongregorian-marking-hook): Rename nongregorian-diary-marking-hook.
Keep old name as alias, update users.
(diary-print-entries-hook): Rename print-diary-entries-hook.
Keep old name as alias, update users.
(diary-abbreviated-year-flag): Rename abbreviated-calendar-year.
Keep old name as alias, update users.
(diary-number-of-entries): Rename number-of-diary-entries.
Keep old name as alias, update users.
(view-diary-entries, list-diary-entries, show-all-diary-entries):
Give version of obsolescence.
(diary-view-other-diary-entries): Rename view-other-diary-entries.
Keep old name as alias, update callers.
(diary-add-to-list): Rename add-to-diary-list. Keep old name as alias,
update callers.
(diary-include-other-diary-files): Rename include-other-diary-files.
Keep old name as alias, update callers.
(diary-simple-display): Rename simple-diary-display. Keep old name as alias,
update callers.
(diary-fancy-display): Rename fancy-diary-display. Keep old name as alias,
update callers.
(diary-print-entries): Rename print-diary-entries. Keep old name as alias,
update callers.
(diary-marking-entries-flag): Rename marking-diary-entries. Update users.
(diary-marking-entry-flag): Rename marking-diary-entry. Update users.
(diary-mark-entries): Rename mark-diary-entries. Keep old name as alias,
update callers.
(diary-mark-sexp-entries): Rename mark-sexp-diary-entries.
Keep old name as alias, update callers.
(diary-mark-included-diary-files): Rename mark-included-diary-files.
Keep old name as alias, update callers.
(calendar-mark-days-named): Rename mark-calendar-days-named.
Keep old name as alias, update callers.
(calendar-mark-month): Rename mark-calendar-month. Keep old name as alias,
update callers.
(calendar-mark-date-pattern): Rename mark-calendar-date-pattern.
Keep old name as alias, update callers.
(diary-sort-entries): Rename sort-diary-entries. Keep old name as alias,
update callers.
(diary-list-sexp-entries): Rename list-sexp-diary-entries.
Keep old name as alias, update callers.
(diary-make-entry): Rename make-diary-entry. Keep old name as alias,
update callers.
(diary-insert-entry): Rename insert-diary-entry. Keep old name as alias.
(diary-insert-weekly-entry): Rename insert-weekly-diary-entry.
Keep old name as alias.
(diary-insert-monthly-entry): Rename insert-monthly-diary-entry.
Keep old name as alias.
(diary-insert-yearly-entry): Rename insert-yearly-diary-entry.
Keep old name as alias.
(diary-insert-anniversary-entry): Rename insert-anniversary-diary-entry.
Keep old name as alias.
(diary-insert-block-entry): Rename insert-block-diary-entry.
Keep old name as alias.
(diary-insert-cyclic-entry): Rename insert-cyclic-diary-entry.
Keep old name as alias.
(diary-fancy-font-lock-keywords): Rename fancy-diary-font-lock-keywords.
Keep old name as alias, update users.
(diary-fancy-display-mode): Rename fancy-diary-display-mode.
Keep old name as alias, update callers.
2008-04-06 20:53:14 +00:00
|
|
|
|
See the documentation for the function `diary-list-sexp-entries'."
|
Move defcustoms to start.
(diary-include-string, diary-list-include-blanks)
(diary-glob-file-regexp-prefix, diary-face, diary-face-attrs)
(diary-file-name-prefix, diary-file-name-prefix-function)
(sexp-diary-entry-symbol, list-diary-entries-hook)
(mark-diary-entries-hook, nongregorian-diary-listing-hook)
(nongregorian-diary-marking-hook, print-diary-entries-hook):
Move here from calendar.el.
(diary-face): Make it a defcustom, and mark as obsolete.
(top-level): No need to require cal-hebrew, cal-islam when compiling.
(calendar-hebrew-month-name-array-leap-year)
(calendar-islamic-month-name-array, calendar-bahai-month-name-array):
Define for compiler.
(diary-font-lock-keywords): Use format rather than concat. Add
bahai-diary-entry-symbol.
2008-03-08 03:47:36 +00:00
|
|
|
|
:type 'string
|
|
|
|
|
:group 'diary)
|
|
|
|
|
|
2011-05-06 04:28:53 +00:00
|
|
|
|
(defcustom diary-comment-start nil
|
|
|
|
|
"String marking the start of a comment in the diary, or nil.
|
|
|
|
|
Nil means there are no comments. The diary does not display
|
|
|
|
|
parts of entries that are inside comments. You can use comments
|
|
|
|
|
for whatever you like, e.g. for meta-data that packages such as
|
2011-11-20 02:29:42 +00:00
|
|
|
|
`appt.el' can use. Comments may not span multiple lines, and there
|
2011-05-07 01:20:47 +00:00
|
|
|
|
can be only one comment on any line.
|
2011-05-06 04:28:53 +00:00
|
|
|
|
See also `diary-comment-end'."
|
|
|
|
|
:version "24.1"
|
|
|
|
|
:type '(choice (const :tag "No comment" nil) string)
|
|
|
|
|
:group 'diary)
|
|
|
|
|
|
|
|
|
|
(defcustom diary-comment-end ""
|
|
|
|
|
"String marking the end of a comment in the diary.
|
|
|
|
|
The empty string means comments finish at the end of a line.
|
|
|
|
|
See also `diary-comment-start'."
|
|
|
|
|
:version "24.1"
|
|
|
|
|
:type 'string
|
|
|
|
|
:group 'diary)
|
|
|
|
|
|
2008-04-10 03:45:26 +00:00
|
|
|
|
(defcustom diary-hook nil
|
2018-01-10 16:40:21 +00:00
|
|
|
|
"Hook run after displaying the diary.
|
|
|
|
|
Used for example by the appointment package - see `appt-activate'.
|
|
|
|
|
The variables `number' and `original-date' are dynamically bound around
|
|
|
|
|
the call."
|
2008-04-10 03:45:26 +00:00
|
|
|
|
:type 'hook
|
|
|
|
|
:group 'diary)
|
|
|
|
|
|
2017-12-04 22:03:32 +00:00
|
|
|
|
(defcustom diary-display-function #'diary-fancy-display
|
2008-05-30 02:57:27 +00:00
|
|
|
|
"Function used to display the diary.
|
2009-09-15 02:34:54 +00:00
|
|
|
|
The two standard options are `diary-fancy-display' and `diary-simple-display'.
|
2008-05-30 02:57:27 +00:00
|
|
|
|
|
|
|
|
|
When this function is called, the variable `diary-entries-list'
|
|
|
|
|
is a list, in order by date, of all relevant diary entries in the
|
|
|
|
|
form of ((MONTH DAY YEAR) STRING), where string is the diary
|
|
|
|
|
entry for the given date. This can be used, for example, to
|
|
|
|
|
produce a different buffer for display (perhaps combined with
|
|
|
|
|
holidays), or hard copy output."
|
2009-09-15 02:34:54 +00:00
|
|
|
|
:type '(choice (const diary-fancy-display :tag "Fancy display")
|
|
|
|
|
(const diary-simple-display :tag "Basic display")
|
2014-10-11 02:54:11 +00:00
|
|
|
|
(const :tag "No display" ignore)
|
|
|
|
|
(function :tag "User-specified function"))
|
2008-04-10 03:45:26 +00:00
|
|
|
|
:initialize 'custom-initialize-default
|
|
|
|
|
:set 'diary-set-maybe-redraw
|
2009-09-15 02:34:54 +00:00
|
|
|
|
:version "23.2" ; simple->fancy
|
2008-04-10 03:45:26 +00:00
|
|
|
|
:group 'diary)
|
|
|
|
|
|
(diary-sexp-entry-symbol): Rename sexp-diary-entry-symbol.
Keep old name as alias, update users.
(diary-list-entries-hook): Rename list-diary-entries-hook.
Keep old name as alias, update users.
(diary-mark-entries-hook): Rename mark-diary-entries-hook.
Keep old name as alias, update users.
(diary-nongregorian-listing-hook): Rename nongregorian-diary-listing-hook.
Keep old name as alias, update users.
(diary-nongregorian-marking-hook): Rename nongregorian-diary-marking-hook.
Keep old name as alias, update users.
(diary-print-entries-hook): Rename print-diary-entries-hook.
Keep old name as alias, update users.
(diary-abbreviated-year-flag): Rename abbreviated-calendar-year.
Keep old name as alias, update users.
(diary-number-of-entries): Rename number-of-diary-entries.
Keep old name as alias, update users.
(view-diary-entries, list-diary-entries, show-all-diary-entries):
Give version of obsolescence.
(diary-view-other-diary-entries): Rename view-other-diary-entries.
Keep old name as alias, update callers.
(diary-add-to-list): Rename add-to-diary-list. Keep old name as alias,
update callers.
(diary-include-other-diary-files): Rename include-other-diary-files.
Keep old name as alias, update callers.
(diary-simple-display): Rename simple-diary-display. Keep old name as alias,
update callers.
(diary-fancy-display): Rename fancy-diary-display. Keep old name as alias,
update callers.
(diary-print-entries): Rename print-diary-entries. Keep old name as alias,
update callers.
(diary-marking-entries-flag): Rename marking-diary-entries. Update users.
(diary-marking-entry-flag): Rename marking-diary-entry. Update users.
(diary-mark-entries): Rename mark-diary-entries. Keep old name as alias,
update callers.
(diary-mark-sexp-entries): Rename mark-sexp-diary-entries.
Keep old name as alias, update callers.
(diary-mark-included-diary-files): Rename mark-included-diary-files.
Keep old name as alias, update callers.
(calendar-mark-days-named): Rename mark-calendar-days-named.
Keep old name as alias, update callers.
(calendar-mark-month): Rename mark-calendar-month. Keep old name as alias,
update callers.
(calendar-mark-date-pattern): Rename mark-calendar-date-pattern.
Keep old name as alias, update callers.
(diary-sort-entries): Rename sort-diary-entries. Keep old name as alias,
update callers.
(diary-list-sexp-entries): Rename list-sexp-diary-entries.
Keep old name as alias, update callers.
(diary-make-entry): Rename make-diary-entry. Keep old name as alias,
update callers.
(diary-insert-entry): Rename insert-diary-entry. Keep old name as alias.
(diary-insert-weekly-entry): Rename insert-weekly-diary-entry.
Keep old name as alias.
(diary-insert-monthly-entry): Rename insert-monthly-diary-entry.
Keep old name as alias.
(diary-insert-yearly-entry): Rename insert-yearly-diary-entry.
Keep old name as alias.
(diary-insert-anniversary-entry): Rename insert-anniversary-diary-entry.
Keep old name as alias.
(diary-insert-block-entry): Rename insert-block-diary-entry.
Keep old name as alias.
(diary-insert-cyclic-entry): Rename insert-cyclic-diary-entry.
Keep old name as alias.
(diary-fancy-font-lock-keywords): Rename fancy-diary-font-lock-keywords.
Keep old name as alias, update users.
(diary-fancy-display-mode): Rename fancy-diary-display-mode.
Keep old name as alias, update callers.
2008-04-06 20:53:14 +00:00
|
|
|
|
(defcustom diary-list-entries-hook nil
|
2012-09-17 05:41:04 +00:00
|
|
|
|
"Hook run after diary file is culled for relevant entries.
|
|
|
|
|
|
|
|
|
|
If you add `diary-include-other-diary-files' to this hook, you
|
|
|
|
|
will probably also want to add `diary-mark-included-diary-files'
|
|
|
|
|
to `diary-mark-entries-hook'. For example, to cause the fancy
|
|
|
|
|
diary buffer to be displayed with diary entries from various
|
|
|
|
|
included files, each day's entries sorted into lexicographic
|
|
|
|
|
order, add the following to your init file:
|
Move defcustoms to start.
(diary-include-string, diary-list-include-blanks)
(diary-glob-file-regexp-prefix, diary-face, diary-face-attrs)
(diary-file-name-prefix, diary-file-name-prefix-function)
(sexp-diary-entry-symbol, list-diary-entries-hook)
(mark-diary-entries-hook, nongregorian-diary-listing-hook)
(nongregorian-diary-marking-hook, print-diary-entries-hook):
Move here from calendar.el.
(diary-face): Make it a defcustom, and mark as obsolete.
(top-level): No need to require cal-hebrew, cal-islam when compiling.
(calendar-hebrew-month-name-array-leap-year)
(calendar-islamic-month-name-array, calendar-bahai-month-name-array):
Define for compiler.
(diary-font-lock-keywords): Use format rather than concat. Add
bahai-diary-entry-symbol.
2008-03-08 03:47:36 +00:00
|
|
|
|
|
2017-12-04 22:03:32 +00:00
|
|
|
|
(setq diary-display-function #\\='diary-fancy-display)
|
|
|
|
|
(add-hook \\='diary-list-entries-hook #\\='diary-include-other-diary-files)
|
|
|
|
|
(add-hook \\='diary-list-entries-hook #\\='diary-sort-entries t)
|
Move defcustoms to start.
(diary-include-string, diary-list-include-blanks)
(diary-glob-file-regexp-prefix, diary-face, diary-face-attrs)
(diary-file-name-prefix, diary-file-name-prefix-function)
(sexp-diary-entry-symbol, list-diary-entries-hook)
(mark-diary-entries-hook, nongregorian-diary-listing-hook)
(nongregorian-diary-marking-hook, print-diary-entries-hook):
Move here from calendar.el.
(diary-face): Make it a defcustom, and mark as obsolete.
(top-level): No need to require cal-hebrew, cal-islam when compiling.
(calendar-hebrew-month-name-array-leap-year)
(calendar-islamic-month-name-array, calendar-bahai-month-name-array):
Define for compiler.
(diary-font-lock-keywords): Use format rather than concat. Add
bahai-diary-entry-symbol.
2008-03-08 03:47:36 +00:00
|
|
|
|
|
2012-09-17 05:41:04 +00:00
|
|
|
|
Note how the sort function is placed last, so that it can sort
|
|
|
|
|
the entries included from other files.
|
2011-05-10 02:22:55 +00:00
|
|
|
|
|
|
|
|
|
This hook runs after `diary-nongregorian-listing-hook'. These two hooks
|
|
|
|
|
differ only if you are using included diary files. In that case,
|
|
|
|
|
`diary-nongregorian-listing-hook' runs for each file, whereas
|
|
|
|
|
`diary-list-entries-hook' only runs once, for the main diary file.
|
|
|
|
|
So for example, to sort the complete list of diary entries you would
|
|
|
|
|
use the list-entries hook, whereas to process e.g. Islamic entries in
|
|
|
|
|
the main file and all included files, you would use the nongregorian hook."
|
Move defcustoms to start.
(diary-include-string, diary-list-include-blanks)
(diary-glob-file-regexp-prefix, diary-face, diary-face-attrs)
(diary-file-name-prefix, diary-file-name-prefix-function)
(sexp-diary-entry-symbol, list-diary-entries-hook)
(mark-diary-entries-hook, nongregorian-diary-listing-hook)
(nongregorian-diary-marking-hook, print-diary-entries-hook):
Move here from calendar.el.
(diary-face): Make it a defcustom, and mark as obsolete.
(top-level): No need to require cal-hebrew, cal-islam when compiling.
(calendar-hebrew-month-name-array-leap-year)
(calendar-islamic-month-name-array, calendar-bahai-month-name-array):
Define for compiler.
(diary-font-lock-keywords): Use format rather than concat. Add
bahai-diary-entry-symbol.
2008-03-08 03:47:36 +00:00
|
|
|
|
:type 'hook
|
(diary-sexp-entry-symbol): Rename sexp-diary-entry-symbol.
Keep old name as alias, update users.
(diary-list-entries-hook): Rename list-diary-entries-hook.
Keep old name as alias, update users.
(diary-mark-entries-hook): Rename mark-diary-entries-hook.
Keep old name as alias, update users.
(diary-nongregorian-listing-hook): Rename nongregorian-diary-listing-hook.
Keep old name as alias, update users.
(diary-nongregorian-marking-hook): Rename nongregorian-diary-marking-hook.
Keep old name as alias, update users.
(diary-print-entries-hook): Rename print-diary-entries-hook.
Keep old name as alias, update users.
(diary-abbreviated-year-flag): Rename abbreviated-calendar-year.
Keep old name as alias, update users.
(diary-number-of-entries): Rename number-of-diary-entries.
Keep old name as alias, update users.
(view-diary-entries, list-diary-entries, show-all-diary-entries):
Give version of obsolescence.
(diary-view-other-diary-entries): Rename view-other-diary-entries.
Keep old name as alias, update callers.
(diary-add-to-list): Rename add-to-diary-list. Keep old name as alias,
update callers.
(diary-include-other-diary-files): Rename include-other-diary-files.
Keep old name as alias, update callers.
(diary-simple-display): Rename simple-diary-display. Keep old name as alias,
update callers.
(diary-fancy-display): Rename fancy-diary-display. Keep old name as alias,
update callers.
(diary-print-entries): Rename print-diary-entries. Keep old name as alias,
update callers.
(diary-marking-entries-flag): Rename marking-diary-entries. Update users.
(diary-marking-entry-flag): Rename marking-diary-entry. Update users.
(diary-mark-entries): Rename mark-diary-entries. Keep old name as alias,
update callers.
(diary-mark-sexp-entries): Rename mark-sexp-diary-entries.
Keep old name as alias, update callers.
(diary-mark-included-diary-files): Rename mark-included-diary-files.
Keep old name as alias, update callers.
(calendar-mark-days-named): Rename mark-calendar-days-named.
Keep old name as alias, update callers.
(calendar-mark-month): Rename mark-calendar-month. Keep old name as alias,
update callers.
(calendar-mark-date-pattern): Rename mark-calendar-date-pattern.
Keep old name as alias, update callers.
(diary-sort-entries): Rename sort-diary-entries. Keep old name as alias,
update callers.
(diary-list-sexp-entries): Rename list-sexp-diary-entries.
Keep old name as alias, update callers.
(diary-make-entry): Rename make-diary-entry. Keep old name as alias,
update callers.
(diary-insert-entry): Rename insert-diary-entry. Keep old name as alias.
(diary-insert-weekly-entry): Rename insert-weekly-diary-entry.
Keep old name as alias.
(diary-insert-monthly-entry): Rename insert-monthly-diary-entry.
Keep old name as alias.
(diary-insert-yearly-entry): Rename insert-yearly-diary-entry.
Keep old name as alias.
(diary-insert-anniversary-entry): Rename insert-anniversary-diary-entry.
Keep old name as alias.
(diary-insert-block-entry): Rename insert-block-diary-entry.
Keep old name as alias.
(diary-insert-cyclic-entry): Rename insert-cyclic-diary-entry.
Keep old name as alias.
(diary-fancy-font-lock-keywords): Rename fancy-diary-font-lock-keywords.
Keep old name as alias, update users.
(diary-fancy-display-mode): Rename fancy-diary-display-mode.
Keep old name as alias, update callers.
2008-04-06 20:53:14 +00:00
|
|
|
|
:options '(diary-include-other-diary-files diary-sort-entries)
|
Move defcustoms to start.
(diary-include-string, diary-list-include-blanks)
(diary-glob-file-regexp-prefix, diary-face, diary-face-attrs)
(diary-file-name-prefix, diary-file-name-prefix-function)
(sexp-diary-entry-symbol, list-diary-entries-hook)
(mark-diary-entries-hook, nongregorian-diary-listing-hook)
(nongregorian-diary-marking-hook, print-diary-entries-hook):
Move here from calendar.el.
(diary-face): Make it a defcustom, and mark as obsolete.
(top-level): No need to require cal-hebrew, cal-islam when compiling.
(calendar-hebrew-month-name-array-leap-year)
(calendar-islamic-month-name-array, calendar-bahai-month-name-array):
Define for compiler.
(diary-font-lock-keywords): Use format rather than concat. Add
bahai-diary-entry-symbol.
2008-03-08 03:47:36 +00:00
|
|
|
|
:group 'diary)
|
|
|
|
|
|
(diary-sexp-entry-symbol): Rename sexp-diary-entry-symbol.
Keep old name as alias, update users.
(diary-list-entries-hook): Rename list-diary-entries-hook.
Keep old name as alias, update users.
(diary-mark-entries-hook): Rename mark-diary-entries-hook.
Keep old name as alias, update users.
(diary-nongregorian-listing-hook): Rename nongregorian-diary-listing-hook.
Keep old name as alias, update users.
(diary-nongregorian-marking-hook): Rename nongregorian-diary-marking-hook.
Keep old name as alias, update users.
(diary-print-entries-hook): Rename print-diary-entries-hook.
Keep old name as alias, update users.
(diary-abbreviated-year-flag): Rename abbreviated-calendar-year.
Keep old name as alias, update users.
(diary-number-of-entries): Rename number-of-diary-entries.
Keep old name as alias, update users.
(view-diary-entries, list-diary-entries, show-all-diary-entries):
Give version of obsolescence.
(diary-view-other-diary-entries): Rename view-other-diary-entries.
Keep old name as alias, update callers.
(diary-add-to-list): Rename add-to-diary-list. Keep old name as alias,
update callers.
(diary-include-other-diary-files): Rename include-other-diary-files.
Keep old name as alias, update callers.
(diary-simple-display): Rename simple-diary-display. Keep old name as alias,
update callers.
(diary-fancy-display): Rename fancy-diary-display. Keep old name as alias,
update callers.
(diary-print-entries): Rename print-diary-entries. Keep old name as alias,
update callers.
(diary-marking-entries-flag): Rename marking-diary-entries. Update users.
(diary-marking-entry-flag): Rename marking-diary-entry. Update users.
(diary-mark-entries): Rename mark-diary-entries. Keep old name as alias,
update callers.
(diary-mark-sexp-entries): Rename mark-sexp-diary-entries.
Keep old name as alias, update callers.
(diary-mark-included-diary-files): Rename mark-included-diary-files.
Keep old name as alias, update callers.
(calendar-mark-days-named): Rename mark-calendar-days-named.
Keep old name as alias, update callers.
(calendar-mark-month): Rename mark-calendar-month. Keep old name as alias,
update callers.
(calendar-mark-date-pattern): Rename mark-calendar-date-pattern.
Keep old name as alias, update callers.
(diary-sort-entries): Rename sort-diary-entries. Keep old name as alias,
update callers.
(diary-list-sexp-entries): Rename list-sexp-diary-entries.
Keep old name as alias, update callers.
(diary-make-entry): Rename make-diary-entry. Keep old name as alias,
update callers.
(diary-insert-entry): Rename insert-diary-entry. Keep old name as alias.
(diary-insert-weekly-entry): Rename insert-weekly-diary-entry.
Keep old name as alias.
(diary-insert-monthly-entry): Rename insert-monthly-diary-entry.
Keep old name as alias.
(diary-insert-yearly-entry): Rename insert-yearly-diary-entry.
Keep old name as alias.
(diary-insert-anniversary-entry): Rename insert-anniversary-diary-entry.
Keep old name as alias.
(diary-insert-block-entry): Rename insert-block-diary-entry.
Keep old name as alias.
(diary-insert-cyclic-entry): Rename insert-cyclic-diary-entry.
Keep old name as alias.
(diary-fancy-font-lock-keywords): Rename fancy-diary-font-lock-keywords.
Keep old name as alias, update users.
(diary-fancy-display-mode): Rename fancy-diary-display-mode.
Keep old name as alias, update callers.
2008-04-06 20:53:14 +00:00
|
|
|
|
(defcustom diary-mark-entries-hook nil
|
Move defcustoms to start.
(diary-include-string, diary-list-include-blanks)
(diary-glob-file-regexp-prefix, diary-face, diary-face-attrs)
(diary-file-name-prefix, diary-file-name-prefix-function)
(sexp-diary-entry-symbol, list-diary-entries-hook)
(mark-diary-entries-hook, nongregorian-diary-listing-hook)
(nongregorian-diary-marking-hook, print-diary-entries-hook):
Move here from calendar.el.
(diary-face): Make it a defcustom, and mark as obsolete.
(top-level): No need to require cal-hebrew, cal-islam when compiling.
(calendar-hebrew-month-name-array-leap-year)
(calendar-islamic-month-name-array, calendar-bahai-month-name-array):
Define for compiler.
(diary-font-lock-keywords): Use format rather than concat. Add
bahai-diary-entry-symbol.
2008-03-08 03:47:36 +00:00
|
|
|
|
"List of functions called after marking diary entries in the calendar.
|
(diary-sexp-entry-symbol): Rename sexp-diary-entry-symbol.
Keep old name as alias, update users.
(diary-list-entries-hook): Rename list-diary-entries-hook.
Keep old name as alias, update users.
(diary-mark-entries-hook): Rename mark-diary-entries-hook.
Keep old name as alias, update users.
(diary-nongregorian-listing-hook): Rename nongregorian-diary-listing-hook.
Keep old name as alias, update users.
(diary-nongregorian-marking-hook): Rename nongregorian-diary-marking-hook.
Keep old name as alias, update users.
(diary-print-entries-hook): Rename print-diary-entries-hook.
Keep old name as alias, update users.
(diary-abbreviated-year-flag): Rename abbreviated-calendar-year.
Keep old name as alias, update users.
(diary-number-of-entries): Rename number-of-diary-entries.
Keep old name as alias, update users.
(view-diary-entries, list-diary-entries, show-all-diary-entries):
Give version of obsolescence.
(diary-view-other-diary-entries): Rename view-other-diary-entries.
Keep old name as alias, update callers.
(diary-add-to-list): Rename add-to-diary-list. Keep old name as alias,
update callers.
(diary-include-other-diary-files): Rename include-other-diary-files.
Keep old name as alias, update callers.
(diary-simple-display): Rename simple-diary-display. Keep old name as alias,
update callers.
(diary-fancy-display): Rename fancy-diary-display. Keep old name as alias,
update callers.
(diary-print-entries): Rename print-diary-entries. Keep old name as alias,
update callers.
(diary-marking-entries-flag): Rename marking-diary-entries. Update users.
(diary-marking-entry-flag): Rename marking-diary-entry. Update users.
(diary-mark-entries): Rename mark-diary-entries. Keep old name as alias,
update callers.
(diary-mark-sexp-entries): Rename mark-sexp-diary-entries.
Keep old name as alias, update callers.
(diary-mark-included-diary-files): Rename mark-included-diary-files.
Keep old name as alias, update callers.
(calendar-mark-days-named): Rename mark-calendar-days-named.
Keep old name as alias, update callers.
(calendar-mark-month): Rename mark-calendar-month. Keep old name as alias,
update callers.
(calendar-mark-date-pattern): Rename mark-calendar-date-pattern.
Keep old name as alias, update callers.
(diary-sort-entries): Rename sort-diary-entries. Keep old name as alias,
update callers.
(diary-list-sexp-entries): Rename list-sexp-diary-entries.
Keep old name as alias, update callers.
(diary-make-entry): Rename make-diary-entry. Keep old name as alias,
update callers.
(diary-insert-entry): Rename insert-diary-entry. Keep old name as alias.
(diary-insert-weekly-entry): Rename insert-weekly-diary-entry.
Keep old name as alias.
(diary-insert-monthly-entry): Rename insert-monthly-diary-entry.
Keep old name as alias.
(diary-insert-yearly-entry): Rename insert-yearly-diary-entry.
Keep old name as alias.
(diary-insert-anniversary-entry): Rename insert-anniversary-diary-entry.
Keep old name as alias.
(diary-insert-block-entry): Rename insert-block-diary-entry.
Keep old name as alias.
(diary-insert-cyclic-entry): Rename insert-cyclic-diary-entry.
Keep old name as alias.
(diary-fancy-font-lock-keywords): Rename fancy-diary-font-lock-keywords.
Keep old name as alias, update users.
(diary-fancy-display-mode): Rename fancy-diary-display-mode.
Keep old name as alias, update callers.
2008-04-06 20:53:14 +00:00
|
|
|
|
You might wish to add `diary-mark-included-diary-files', in which case
|
|
|
|
|
you will probably also want to add `diary-include-other-diary-files' to
|
2011-05-10 02:22:55 +00:00
|
|
|
|
`diary-list-entries-hook'.
|
|
|
|
|
|
|
|
|
|
This hook runs after `diary-nongregorian-marking-hook'. These two hooks
|
|
|
|
|
differ only if you are using included diary files. In that case,
|
|
|
|
|
`diary-nongregorian-marking-hook' runs for each file, whereas
|
2019-10-12 05:06:54 +00:00
|
|
|
|
`diary-mark-entries-hook' only runs once, for the main diary file.
|
|
|
|
|
|
|
|
|
|
`displayed-year' and `displayed-month' are dynamically bound when
|
|
|
|
|
this hook is called."
|
Move defcustoms to start.
(diary-include-string, diary-list-include-blanks)
(diary-glob-file-regexp-prefix, diary-face, diary-face-attrs)
(diary-file-name-prefix, diary-file-name-prefix-function)
(sexp-diary-entry-symbol, list-diary-entries-hook)
(mark-diary-entries-hook, nongregorian-diary-listing-hook)
(nongregorian-diary-marking-hook, print-diary-entries-hook):
Move here from calendar.el.
(diary-face): Make it a defcustom, and mark as obsolete.
(top-level): No need to require cal-hebrew, cal-islam when compiling.
(calendar-hebrew-month-name-array-leap-year)
(calendar-islamic-month-name-array, calendar-bahai-month-name-array):
Define for compiler.
(diary-font-lock-keywords): Use format rather than concat. Add
bahai-diary-entry-symbol.
2008-03-08 03:47:36 +00:00
|
|
|
|
:type 'hook
|
(diary-sexp-entry-symbol): Rename sexp-diary-entry-symbol.
Keep old name as alias, update users.
(diary-list-entries-hook): Rename list-diary-entries-hook.
Keep old name as alias, update users.
(diary-mark-entries-hook): Rename mark-diary-entries-hook.
Keep old name as alias, update users.
(diary-nongregorian-listing-hook): Rename nongregorian-diary-listing-hook.
Keep old name as alias, update users.
(diary-nongregorian-marking-hook): Rename nongregorian-diary-marking-hook.
Keep old name as alias, update users.
(diary-print-entries-hook): Rename print-diary-entries-hook.
Keep old name as alias, update users.
(diary-abbreviated-year-flag): Rename abbreviated-calendar-year.
Keep old name as alias, update users.
(diary-number-of-entries): Rename number-of-diary-entries.
Keep old name as alias, update users.
(view-diary-entries, list-diary-entries, show-all-diary-entries):
Give version of obsolescence.
(diary-view-other-diary-entries): Rename view-other-diary-entries.
Keep old name as alias, update callers.
(diary-add-to-list): Rename add-to-diary-list. Keep old name as alias,
update callers.
(diary-include-other-diary-files): Rename include-other-diary-files.
Keep old name as alias, update callers.
(diary-simple-display): Rename simple-diary-display. Keep old name as alias,
update callers.
(diary-fancy-display): Rename fancy-diary-display. Keep old name as alias,
update callers.
(diary-print-entries): Rename print-diary-entries. Keep old name as alias,
update callers.
(diary-marking-entries-flag): Rename marking-diary-entries. Update users.
(diary-marking-entry-flag): Rename marking-diary-entry. Update users.
(diary-mark-entries): Rename mark-diary-entries. Keep old name as alias,
update callers.
(diary-mark-sexp-entries): Rename mark-sexp-diary-entries.
Keep old name as alias, update callers.
(diary-mark-included-diary-files): Rename mark-included-diary-files.
Keep old name as alias, update callers.
(calendar-mark-days-named): Rename mark-calendar-days-named.
Keep old name as alias, update callers.
(calendar-mark-month): Rename mark-calendar-month. Keep old name as alias,
update callers.
(calendar-mark-date-pattern): Rename mark-calendar-date-pattern.
Keep old name as alias, update callers.
(diary-sort-entries): Rename sort-diary-entries. Keep old name as alias,
update callers.
(diary-list-sexp-entries): Rename list-sexp-diary-entries.
Keep old name as alias, update callers.
(diary-make-entry): Rename make-diary-entry. Keep old name as alias,
update callers.
(diary-insert-entry): Rename insert-diary-entry. Keep old name as alias.
(diary-insert-weekly-entry): Rename insert-weekly-diary-entry.
Keep old name as alias.
(diary-insert-monthly-entry): Rename insert-monthly-diary-entry.
Keep old name as alias.
(diary-insert-yearly-entry): Rename insert-yearly-diary-entry.
Keep old name as alias.
(diary-insert-anniversary-entry): Rename insert-anniversary-diary-entry.
Keep old name as alias.
(diary-insert-block-entry): Rename insert-block-diary-entry.
Keep old name as alias.
(diary-insert-cyclic-entry): Rename insert-cyclic-diary-entry.
Keep old name as alias.
(diary-fancy-font-lock-keywords): Rename fancy-diary-font-lock-keywords.
Keep old name as alias, update users.
(diary-fancy-display-mode): Rename fancy-diary-display-mode.
Keep old name as alias, update callers.
2008-04-06 20:53:14 +00:00
|
|
|
|
:options '(diary-mark-included-diary-files)
|
Move defcustoms to start.
(diary-include-string, diary-list-include-blanks)
(diary-glob-file-regexp-prefix, diary-face, diary-face-attrs)
(diary-file-name-prefix, diary-file-name-prefix-function)
(sexp-diary-entry-symbol, list-diary-entries-hook)
(mark-diary-entries-hook, nongregorian-diary-listing-hook)
(nongregorian-diary-marking-hook, print-diary-entries-hook):
Move here from calendar.el.
(diary-face): Make it a defcustom, and mark as obsolete.
(top-level): No need to require cal-hebrew, cal-islam when compiling.
(calendar-hebrew-month-name-array-leap-year)
(calendar-islamic-month-name-array, calendar-bahai-month-name-array):
Define for compiler.
(diary-font-lock-keywords): Use format rather than concat. Add
bahai-diary-entry-symbol.
2008-03-08 03:47:36 +00:00
|
|
|
|
:group 'diary)
|
|
|
|
|
|
(diary-sexp-entry-symbol): Rename sexp-diary-entry-symbol.
Keep old name as alias, update users.
(diary-list-entries-hook): Rename list-diary-entries-hook.
Keep old name as alias, update users.
(diary-mark-entries-hook): Rename mark-diary-entries-hook.
Keep old name as alias, update users.
(diary-nongregorian-listing-hook): Rename nongregorian-diary-listing-hook.
Keep old name as alias, update users.
(diary-nongregorian-marking-hook): Rename nongregorian-diary-marking-hook.
Keep old name as alias, update users.
(diary-print-entries-hook): Rename print-diary-entries-hook.
Keep old name as alias, update users.
(diary-abbreviated-year-flag): Rename abbreviated-calendar-year.
Keep old name as alias, update users.
(diary-number-of-entries): Rename number-of-diary-entries.
Keep old name as alias, update users.
(view-diary-entries, list-diary-entries, show-all-diary-entries):
Give version of obsolescence.
(diary-view-other-diary-entries): Rename view-other-diary-entries.
Keep old name as alias, update callers.
(diary-add-to-list): Rename add-to-diary-list. Keep old name as alias,
update callers.
(diary-include-other-diary-files): Rename include-other-diary-files.
Keep old name as alias, update callers.
(diary-simple-display): Rename simple-diary-display. Keep old name as alias,
update callers.
(diary-fancy-display): Rename fancy-diary-display. Keep old name as alias,
update callers.
(diary-print-entries): Rename print-diary-entries. Keep old name as alias,
update callers.
(diary-marking-entries-flag): Rename marking-diary-entries. Update users.
(diary-marking-entry-flag): Rename marking-diary-entry. Update users.
(diary-mark-entries): Rename mark-diary-entries. Keep old name as alias,
update callers.
(diary-mark-sexp-entries): Rename mark-sexp-diary-entries.
Keep old name as alias, update callers.
(diary-mark-included-diary-files): Rename mark-included-diary-files.
Keep old name as alias, update callers.
(calendar-mark-days-named): Rename mark-calendar-days-named.
Keep old name as alias, update callers.
(calendar-mark-month): Rename mark-calendar-month. Keep old name as alias,
update callers.
(calendar-mark-date-pattern): Rename mark-calendar-date-pattern.
Keep old name as alias, update callers.
(diary-sort-entries): Rename sort-diary-entries. Keep old name as alias,
update callers.
(diary-list-sexp-entries): Rename list-sexp-diary-entries.
Keep old name as alias, update callers.
(diary-make-entry): Rename make-diary-entry. Keep old name as alias,
update callers.
(diary-insert-entry): Rename insert-diary-entry. Keep old name as alias.
(diary-insert-weekly-entry): Rename insert-weekly-diary-entry.
Keep old name as alias.
(diary-insert-monthly-entry): Rename insert-monthly-diary-entry.
Keep old name as alias.
(diary-insert-yearly-entry): Rename insert-yearly-diary-entry.
Keep old name as alias.
(diary-insert-anniversary-entry): Rename insert-anniversary-diary-entry.
Keep old name as alias.
(diary-insert-block-entry): Rename insert-block-diary-entry.
Keep old name as alias.
(diary-insert-cyclic-entry): Rename insert-cyclic-diary-entry.
Keep old name as alias.
(diary-fancy-font-lock-keywords): Rename fancy-diary-font-lock-keywords.
Keep old name as alias, update users.
(diary-fancy-display-mode): Rename fancy-diary-display-mode.
Keep old name as alias, update callers.
2008-04-06 20:53:14 +00:00
|
|
|
|
(defcustom diary-nongregorian-listing-hook nil
|
Move defcustoms to start.
(diary-include-string, diary-list-include-blanks)
(diary-glob-file-regexp-prefix, diary-face, diary-face-attrs)
(diary-file-name-prefix, diary-file-name-prefix-function)
(sexp-diary-entry-symbol, list-diary-entries-hook)
(mark-diary-entries-hook, nongregorian-diary-listing-hook)
(nongregorian-diary-marking-hook, print-diary-entries-hook):
Move here from calendar.el.
(diary-face): Make it a defcustom, and mark as obsolete.
(top-level): No need to require cal-hebrew, cal-islam when compiling.
(calendar-hebrew-month-name-array-leap-year)
(calendar-islamic-month-name-array, calendar-bahai-month-name-array):
Define for compiler.
(diary-font-lock-keywords): Use format rather than concat. Add
bahai-diary-entry-symbol.
2008-03-08 03:47:36 +00:00
|
|
|
|
"List of functions called for listing diary file and included files.
|
|
|
|
|
As the files are processed for diary entries, these functions are used
|
2008-03-17 02:33:49 +00:00
|
|
|
|
to cull relevant entries. You can use any or all of
|
2008-04-05 20:58:26 +00:00
|
|
|
|
`diary-bahai-list-entries', `diary-hebrew-list-entries', and
|
|
|
|
|
`diary-islamic-list-entries'. The documentation for these functions
|
2011-05-10 02:22:55 +00:00
|
|
|
|
describes the style of such diary entries.
|
|
|
|
|
|
|
|
|
|
You can use this hook for other functions as well, if you want them to
|
|
|
|
|
be run on the main diary file and any included diary files. Otherwise,
|
|
|
|
|
use `diary-list-entries-hook', which runs only for the main diary file."
|
Move defcustoms to start.
(diary-include-string, diary-list-include-blanks)
(diary-glob-file-regexp-prefix, diary-face, diary-face-attrs)
(diary-file-name-prefix, diary-file-name-prefix-function)
(sexp-diary-entry-symbol, list-diary-entries-hook)
(mark-diary-entries-hook, nongregorian-diary-listing-hook)
(nongregorian-diary-marking-hook, print-diary-entries-hook):
Move here from calendar.el.
(diary-face): Make it a defcustom, and mark as obsolete.
(top-level): No need to require cal-hebrew, cal-islam when compiling.
(calendar-hebrew-month-name-array-leap-year)
(calendar-islamic-month-name-array, calendar-bahai-month-name-array):
Define for compiler.
(diary-font-lock-keywords): Use format rather than concat. Add
bahai-diary-entry-symbol.
2008-03-08 03:47:36 +00:00
|
|
|
|
:type 'hook
|
2008-04-05 20:58:26 +00:00
|
|
|
|
:options '(diary-bahai-list-entries
|
|
|
|
|
diary-hebrew-list-entries
|
|
|
|
|
diary-islamic-list-entries)
|
Move defcustoms to start.
(diary-include-string, diary-list-include-blanks)
(diary-glob-file-regexp-prefix, diary-face, diary-face-attrs)
(diary-file-name-prefix, diary-file-name-prefix-function)
(sexp-diary-entry-symbol, list-diary-entries-hook)
(mark-diary-entries-hook, nongregorian-diary-listing-hook)
(nongregorian-diary-marking-hook, print-diary-entries-hook):
Move here from calendar.el.
(diary-face): Make it a defcustom, and mark as obsolete.
(top-level): No need to require cal-hebrew, cal-islam when compiling.
(calendar-hebrew-month-name-array-leap-year)
(calendar-islamic-month-name-array, calendar-bahai-month-name-array):
Define for compiler.
(diary-font-lock-keywords): Use format rather than concat. Add
bahai-diary-entry-symbol.
2008-03-08 03:47:36 +00:00
|
|
|
|
:group 'diary)
|
|
|
|
|
|
(diary-sexp-entry-symbol): Rename sexp-diary-entry-symbol.
Keep old name as alias, update users.
(diary-list-entries-hook): Rename list-diary-entries-hook.
Keep old name as alias, update users.
(diary-mark-entries-hook): Rename mark-diary-entries-hook.
Keep old name as alias, update users.
(diary-nongregorian-listing-hook): Rename nongregorian-diary-listing-hook.
Keep old name as alias, update users.
(diary-nongregorian-marking-hook): Rename nongregorian-diary-marking-hook.
Keep old name as alias, update users.
(diary-print-entries-hook): Rename print-diary-entries-hook.
Keep old name as alias, update users.
(diary-abbreviated-year-flag): Rename abbreviated-calendar-year.
Keep old name as alias, update users.
(diary-number-of-entries): Rename number-of-diary-entries.
Keep old name as alias, update users.
(view-diary-entries, list-diary-entries, show-all-diary-entries):
Give version of obsolescence.
(diary-view-other-diary-entries): Rename view-other-diary-entries.
Keep old name as alias, update callers.
(diary-add-to-list): Rename add-to-diary-list. Keep old name as alias,
update callers.
(diary-include-other-diary-files): Rename include-other-diary-files.
Keep old name as alias, update callers.
(diary-simple-display): Rename simple-diary-display. Keep old name as alias,
update callers.
(diary-fancy-display): Rename fancy-diary-display. Keep old name as alias,
update callers.
(diary-print-entries): Rename print-diary-entries. Keep old name as alias,
update callers.
(diary-marking-entries-flag): Rename marking-diary-entries. Update users.
(diary-marking-entry-flag): Rename marking-diary-entry. Update users.
(diary-mark-entries): Rename mark-diary-entries. Keep old name as alias,
update callers.
(diary-mark-sexp-entries): Rename mark-sexp-diary-entries.
Keep old name as alias, update callers.
(diary-mark-included-diary-files): Rename mark-included-diary-files.
Keep old name as alias, update callers.
(calendar-mark-days-named): Rename mark-calendar-days-named.
Keep old name as alias, update callers.
(calendar-mark-month): Rename mark-calendar-month. Keep old name as alias,
update callers.
(calendar-mark-date-pattern): Rename mark-calendar-date-pattern.
Keep old name as alias, update callers.
(diary-sort-entries): Rename sort-diary-entries. Keep old name as alias,
update callers.
(diary-list-sexp-entries): Rename list-sexp-diary-entries.
Keep old name as alias, update callers.
(diary-make-entry): Rename make-diary-entry. Keep old name as alias,
update callers.
(diary-insert-entry): Rename insert-diary-entry. Keep old name as alias.
(diary-insert-weekly-entry): Rename insert-weekly-diary-entry.
Keep old name as alias.
(diary-insert-monthly-entry): Rename insert-monthly-diary-entry.
Keep old name as alias.
(diary-insert-yearly-entry): Rename insert-yearly-diary-entry.
Keep old name as alias.
(diary-insert-anniversary-entry): Rename insert-anniversary-diary-entry.
Keep old name as alias.
(diary-insert-block-entry): Rename insert-block-diary-entry.
Keep old name as alias.
(diary-insert-cyclic-entry): Rename insert-cyclic-diary-entry.
Keep old name as alias.
(diary-fancy-font-lock-keywords): Rename fancy-diary-font-lock-keywords.
Keep old name as alias, update users.
(diary-fancy-display-mode): Rename fancy-diary-display-mode.
Keep old name as alias, update callers.
2008-04-06 20:53:14 +00:00
|
|
|
|
(defcustom diary-nongregorian-marking-hook nil
|
Move defcustoms to start.
(diary-include-string, diary-list-include-blanks)
(diary-glob-file-regexp-prefix, diary-face, diary-face-attrs)
(diary-file-name-prefix, diary-file-name-prefix-function)
(sexp-diary-entry-symbol, list-diary-entries-hook)
(mark-diary-entries-hook, nongregorian-diary-listing-hook)
(nongregorian-diary-marking-hook, print-diary-entries-hook):
Move here from calendar.el.
(diary-face): Make it a defcustom, and mark as obsolete.
(top-level): No need to require cal-hebrew, cal-islam when compiling.
(calendar-hebrew-month-name-array-leap-year)
(calendar-islamic-month-name-array, calendar-bahai-month-name-array):
Define for compiler.
(diary-font-lock-keywords): Use format rather than concat. Add
bahai-diary-entry-symbol.
2008-03-08 03:47:36 +00:00
|
|
|
|
"List of functions called for marking diary file and included files.
|
|
|
|
|
As the files are processed for diary entries, these functions are used
|
2008-03-17 02:33:49 +00:00
|
|
|
|
to cull relevant entries. You can use any or all of
|
2008-04-05 20:58:26 +00:00
|
|
|
|
`diary-bahai-mark-entries', `diary-hebrew-mark-entries' and
|
|
|
|
|
`diary-islamic-mark-entries'. The documentation for these functions
|
2011-05-10 02:22:55 +00:00
|
|
|
|
describes the style of such diary entries.
|
|
|
|
|
|
|
|
|
|
You can use this hook for other functions as well, if you want them to
|
|
|
|
|
be run on the main diary file and any included diary files. Otherwise,
|
|
|
|
|
use `diary-mark-entries-hook', which runs only for the main diary file."
|
Move defcustoms to start.
(diary-include-string, diary-list-include-blanks)
(diary-glob-file-regexp-prefix, diary-face, diary-face-attrs)
(diary-file-name-prefix, diary-file-name-prefix-function)
(sexp-diary-entry-symbol, list-diary-entries-hook)
(mark-diary-entries-hook, nongregorian-diary-listing-hook)
(nongregorian-diary-marking-hook, print-diary-entries-hook):
Move here from calendar.el.
(diary-face): Make it a defcustom, and mark as obsolete.
(top-level): No need to require cal-hebrew, cal-islam when compiling.
(calendar-hebrew-month-name-array-leap-year)
(calendar-islamic-month-name-array, calendar-bahai-month-name-array):
Define for compiler.
(diary-font-lock-keywords): Use format rather than concat. Add
bahai-diary-entry-symbol.
2008-03-08 03:47:36 +00:00
|
|
|
|
:type 'hook
|
2008-04-05 20:58:26 +00:00
|
|
|
|
:options '(diary-bahai-mark-entries
|
|
|
|
|
diary-hebrew-mark-entries
|
|
|
|
|
diary-islamic-mark-entries)
|
Move defcustoms to start.
(diary-include-string, diary-list-include-blanks)
(diary-glob-file-regexp-prefix, diary-face, diary-face-attrs)
(diary-file-name-prefix, diary-file-name-prefix-function)
(sexp-diary-entry-symbol, list-diary-entries-hook)
(mark-diary-entries-hook, nongregorian-diary-listing-hook)
(nongregorian-diary-marking-hook, print-diary-entries-hook):
Move here from calendar.el.
(diary-face): Make it a defcustom, and mark as obsolete.
(top-level): No need to require cal-hebrew, cal-islam when compiling.
(calendar-hebrew-month-name-array-leap-year)
(calendar-islamic-month-name-array, calendar-bahai-month-name-array):
Define for compiler.
(diary-font-lock-keywords): Use format rather than concat. Add
bahai-diary-entry-symbol.
2008-03-08 03:47:36 +00:00
|
|
|
|
:group 'diary)
|
|
|
|
|
|
2017-12-04 22:03:32 +00:00
|
|
|
|
(defcustom diary-print-entries-hook #'lpr-buffer
|
(diary-sexp-entry-symbol): Rename sexp-diary-entry-symbol.
Keep old name as alias, update users.
(diary-list-entries-hook): Rename list-diary-entries-hook.
Keep old name as alias, update users.
(diary-mark-entries-hook): Rename mark-diary-entries-hook.
Keep old name as alias, update users.
(diary-nongregorian-listing-hook): Rename nongregorian-diary-listing-hook.
Keep old name as alias, update users.
(diary-nongregorian-marking-hook): Rename nongregorian-diary-marking-hook.
Keep old name as alias, update users.
(diary-print-entries-hook): Rename print-diary-entries-hook.
Keep old name as alias, update users.
(diary-abbreviated-year-flag): Rename abbreviated-calendar-year.
Keep old name as alias, update users.
(diary-number-of-entries): Rename number-of-diary-entries.
Keep old name as alias, update users.
(view-diary-entries, list-diary-entries, show-all-diary-entries):
Give version of obsolescence.
(diary-view-other-diary-entries): Rename view-other-diary-entries.
Keep old name as alias, update callers.
(diary-add-to-list): Rename add-to-diary-list. Keep old name as alias,
update callers.
(diary-include-other-diary-files): Rename include-other-diary-files.
Keep old name as alias, update callers.
(diary-simple-display): Rename simple-diary-display. Keep old name as alias,
update callers.
(diary-fancy-display): Rename fancy-diary-display. Keep old name as alias,
update callers.
(diary-print-entries): Rename print-diary-entries. Keep old name as alias,
update callers.
(diary-marking-entries-flag): Rename marking-diary-entries. Update users.
(diary-marking-entry-flag): Rename marking-diary-entry. Update users.
(diary-mark-entries): Rename mark-diary-entries. Keep old name as alias,
update callers.
(diary-mark-sexp-entries): Rename mark-sexp-diary-entries.
Keep old name as alias, update callers.
(diary-mark-included-diary-files): Rename mark-included-diary-files.
Keep old name as alias, update callers.
(calendar-mark-days-named): Rename mark-calendar-days-named.
Keep old name as alias, update callers.
(calendar-mark-month): Rename mark-calendar-month. Keep old name as alias,
update callers.
(calendar-mark-date-pattern): Rename mark-calendar-date-pattern.
Keep old name as alias, update callers.
(diary-sort-entries): Rename sort-diary-entries. Keep old name as alias,
update callers.
(diary-list-sexp-entries): Rename list-sexp-diary-entries.
Keep old name as alias, update callers.
(diary-make-entry): Rename make-diary-entry. Keep old name as alias,
update callers.
(diary-insert-entry): Rename insert-diary-entry. Keep old name as alias.
(diary-insert-weekly-entry): Rename insert-weekly-diary-entry.
Keep old name as alias.
(diary-insert-monthly-entry): Rename insert-monthly-diary-entry.
Keep old name as alias.
(diary-insert-yearly-entry): Rename insert-yearly-diary-entry.
Keep old name as alias.
(diary-insert-anniversary-entry): Rename insert-anniversary-diary-entry.
Keep old name as alias.
(diary-insert-block-entry): Rename insert-block-diary-entry.
Keep old name as alias.
(diary-insert-cyclic-entry): Rename insert-cyclic-diary-entry.
Keep old name as alias.
(diary-fancy-font-lock-keywords): Rename fancy-diary-font-lock-keywords.
Keep old name as alias, update users.
(diary-fancy-display-mode): Rename fancy-diary-display-mode.
Keep old name as alias, update callers.
2008-04-06 20:53:14 +00:00
|
|
|
|
"Run by `diary-print-entries' after preparing a temporary diary buffer.
|
2008-03-28 02:47:59 +00:00
|
|
|
|
The buffer shows only the diary entries currently visible in the
|
|
|
|
|
diary buffer. The default just does the printing. Other uses
|
|
|
|
|
might include, for example, rearranging the lines into order by
|
|
|
|
|
day and time, saving the buffer instead of deleting it, or
|
|
|
|
|
changing the function used to do the printing."
|
Move defcustoms to start.
(diary-include-string, diary-list-include-blanks)
(diary-glob-file-regexp-prefix, diary-face, diary-face-attrs)
(diary-file-name-prefix, diary-file-name-prefix-function)
(sexp-diary-entry-symbol, list-diary-entries-hook)
(mark-diary-entries-hook, nongregorian-diary-listing-hook)
(nongregorian-diary-marking-hook, print-diary-entries-hook):
Move here from calendar.el.
(diary-face): Make it a defcustom, and mark as obsolete.
(top-level): No need to require cal-hebrew, cal-islam when compiling.
(calendar-hebrew-month-name-array-leap-year)
(calendar-islamic-month-name-array, calendar-bahai-month-name-array):
Define for compiler.
(diary-font-lock-keywords): Use format rather than concat. Add
bahai-diary-entry-symbol.
2008-03-08 03:47:36 +00:00
|
|
|
|
:type 'hook
|
|
|
|
|
:group 'diary)
|
|
|
|
|
|
|
|
|
|
(defcustom diary-unknown-time -9999
|
(diary-face-attrs): Fix custom :type.
(diary-face-attrs, diary-glob-file-regexp-prefix, diary-unknown-time)
(diary-pull-attrs, diary-header-line-flag, diary-list-entries)
(diary-unhide-everything, include-other-diary-files, diary-goto-entry)
(mark-included-diary-files, mark-calendar-days-named)
(mark-calendar-date-pattern, mark-calendar-month, diary-entry-compare)
(diary-remind, insert-diary-entry, insert-weekly-diary-entry)
(insert-monthly-diary-entry, insert-yearly-diary-entry)
(insert-anniversary-diary-entry, insert-block-diary-entry)
(insert-cyclic-diary-entry, fancy-diary-font-lock-keywords)
(diary-font-lock-sexps): Doc fixes.
(diary-remind-message, mark-calendar-month): Use zerop.
(diary-attrtype-convert, diary-pull-attrs): Simplify.
(diary-list-entries): Revert let to let* (previous change).
2008-03-10 02:44:51 +00:00
|
|
|
|
"Value returned by `diary-entry-time' when no time is found.
|
2008-03-28 02:47:59 +00:00
|
|
|
|
The default value -9999 causes entries with no recognizable time
|
|
|
|
|
to be placed before those with times; 9999 would place entries
|
|
|
|
|
with no recognizable time after those with times."
|
Move defcustoms to start.
(diary-include-string, diary-list-include-blanks)
(diary-glob-file-regexp-prefix, diary-face, diary-face-attrs)
(diary-file-name-prefix, diary-file-name-prefix-function)
(sexp-diary-entry-symbol, list-diary-entries-hook)
(mark-diary-entries-hook, nongregorian-diary-listing-hook)
(nongregorian-diary-marking-hook, print-diary-entries-hook):
Move here from calendar.el.
(diary-face): Make it a defcustom, and mark as obsolete.
(top-level): No need to require cal-hebrew, cal-islam when compiling.
(calendar-hebrew-month-name-array-leap-year)
(calendar-islamic-month-name-array, calendar-bahai-month-name-array):
Define for compiler.
(diary-font-lock-keywords): Use format rather than concat. Add
bahai-diary-entry-symbol.
2008-03-08 03:47:36 +00:00
|
|
|
|
:type 'integer
|
|
|
|
|
:group 'diary
|
|
|
|
|
:version "20.3")
|
|
|
|
|
|
|
|
|
|
(defcustom diary-mail-addr
|
2008-04-03 03:33:37 +00:00
|
|
|
|
(or (bound-and-true-p user-mail-address) "")
|
Move defcustoms to start.
(diary-include-string, diary-list-include-blanks)
(diary-glob-file-regexp-prefix, diary-face, diary-face-attrs)
(diary-file-name-prefix, diary-file-name-prefix-function)
(sexp-diary-entry-symbol, list-diary-entries-hook)
(mark-diary-entries-hook, nongregorian-diary-listing-hook)
(nongregorian-diary-marking-hook, print-diary-entries-hook):
Move here from calendar.el.
(diary-face): Make it a defcustom, and mark as obsolete.
(top-level): No need to require cal-hebrew, cal-islam when compiling.
(calendar-hebrew-month-name-array-leap-year)
(calendar-islamic-month-name-array, calendar-bahai-month-name-array):
Define for compiler.
(diary-font-lock-keywords): Use format rather than concat. Add
bahai-diary-entry-symbol.
2008-03-08 03:47:36 +00:00
|
|
|
|
"Email address that `diary-mail-entries' will send email to."
|
|
|
|
|
:group 'diary
|
|
|
|
|
:type 'string
|
|
|
|
|
:version "20.3")
|
|
|
|
|
|
|
|
|
|
(defcustom diary-mail-days 7
|
|
|
|
|
"Default number of days for `diary-mail-entries' to check."
|
|
|
|
|
:group 'diary
|
|
|
|
|
:type 'integer
|
|
|
|
|
:version "20.3")
|
|
|
|
|
|
|
|
|
|
(defcustom diary-remind-message
|
|
|
|
|
'("Reminder: Only "
|
(diary-face-attrs): Fix custom :type.
(diary-face-attrs, diary-glob-file-regexp-prefix, diary-unknown-time)
(diary-pull-attrs, diary-header-line-flag, diary-list-entries)
(diary-unhide-everything, include-other-diary-files, diary-goto-entry)
(mark-included-diary-files, mark-calendar-days-named)
(mark-calendar-date-pattern, mark-calendar-month, diary-entry-compare)
(diary-remind, insert-diary-entry, insert-weekly-diary-entry)
(insert-monthly-diary-entry, insert-yearly-diary-entry)
(insert-anniversary-diary-entry, insert-block-diary-entry)
(insert-cyclic-diary-entry, fancy-diary-font-lock-keywords)
(diary-font-lock-sexps): Doc fixes.
(diary-remind-message, mark-calendar-month): Use zerop.
(diary-attrtype-convert, diary-pull-attrs): Simplify.
(diary-list-entries): Revert let to let* (previous change).
2008-03-10 02:44:51 +00:00
|
|
|
|
(if (zerop (% days 7))
|
2008-03-16 01:27:15 +00:00
|
|
|
|
(format "%d week%s" (/ days 7) (if (= 7 days) "" "s"))
|
|
|
|
|
(format "%d day%s" days (if (= 1 days) "" "s")))
|
Move defcustoms to start.
(diary-include-string, diary-list-include-blanks)
(diary-glob-file-regexp-prefix, diary-face, diary-face-attrs)
(diary-file-name-prefix, diary-file-name-prefix-function)
(sexp-diary-entry-symbol, list-diary-entries-hook)
(mark-diary-entries-hook, nongregorian-diary-listing-hook)
(nongregorian-diary-marking-hook, print-diary-entries-hook):
Move here from calendar.el.
(diary-face): Make it a defcustom, and mark as obsolete.
(top-level): No need to require cal-hebrew, cal-islam when compiling.
(calendar-hebrew-month-name-array-leap-year)
(calendar-islamic-month-name-array, calendar-bahai-month-name-array):
Define for compiler.
(diary-font-lock-keywords): Use format rather than concat. Add
bahai-diary-entry-symbol.
2008-03-08 03:47:36 +00:00
|
|
|
|
" until "
|
|
|
|
|
diary-entry)
|
|
|
|
|
"Pseudo-pattern giving form of reminder messages in the fancy diary display.
|
|
|
|
|
|
|
|
|
|
Used by the function `diary-remind', a pseudo-pattern is a list of
|
2008-11-30 01:01:18 +00:00
|
|
|
|
expressions that can involve the keywords `days' (a number), `date'
|
|
|
|
|
\(a list of month, day, year), and `diary-entry' (a string)."
|
Move defcustoms to start.
(diary-include-string, diary-list-include-blanks)
(diary-glob-file-regexp-prefix, diary-face, diary-face-attrs)
(diary-file-name-prefix, diary-file-name-prefix-function)
(sexp-diary-entry-symbol, list-diary-entries-hook)
(mark-diary-entries-hook, nongregorian-diary-listing-hook)
(nongregorian-diary-marking-hook, print-diary-entries-hook):
Move here from calendar.el.
(diary-face): Make it a defcustom, and mark as obsolete.
(top-level): No need to require cal-hebrew, cal-islam when compiling.
(calendar-hebrew-month-name-array-leap-year)
(calendar-islamic-month-name-array, calendar-bahai-month-name-array):
Define for compiler.
(diary-font-lock-keywords): Use format rather than concat. Add
bahai-diary-entry-symbol.
2008-03-08 03:47:36 +00:00
|
|
|
|
:type 'sexp
|
2016-02-02 01:53:44 +00:00
|
|
|
|
:risky t
|
Move defcustoms to start.
(diary-include-string, diary-list-include-blanks)
(diary-glob-file-regexp-prefix, diary-face, diary-face-attrs)
(diary-file-name-prefix, diary-file-name-prefix-function)
(sexp-diary-entry-symbol, list-diary-entries-hook)
(mark-diary-entries-hook, nongregorian-diary-listing-hook)
(nongregorian-diary-marking-hook, print-diary-entries-hook):
Move here from calendar.el.
(diary-face): Make it a defcustom, and mark as obsolete.
(top-level): No need to require cal-hebrew, cal-islam when compiling.
(calendar-hebrew-month-name-array-leap-year)
(calendar-islamic-month-name-array, calendar-bahai-month-name-array):
Define for compiler.
(diary-font-lock-keywords): Use format rather than concat. Add
bahai-diary-entry-symbol.
2008-03-08 03:47:36 +00:00
|
|
|
|
:group 'diary)
|
|
|
|
|
|
(diary-sexp-entry-symbol): Rename sexp-diary-entry-symbol.
Keep old name as alias, update users.
(diary-list-entries-hook): Rename list-diary-entries-hook.
Keep old name as alias, update users.
(diary-mark-entries-hook): Rename mark-diary-entries-hook.
Keep old name as alias, update users.
(diary-nongregorian-listing-hook): Rename nongregorian-diary-listing-hook.
Keep old name as alias, update users.
(diary-nongregorian-marking-hook): Rename nongregorian-diary-marking-hook.
Keep old name as alias, update users.
(diary-print-entries-hook): Rename print-diary-entries-hook.
Keep old name as alias, update users.
(diary-abbreviated-year-flag): Rename abbreviated-calendar-year.
Keep old name as alias, update users.
(diary-number-of-entries): Rename number-of-diary-entries.
Keep old name as alias, update users.
(view-diary-entries, list-diary-entries, show-all-diary-entries):
Give version of obsolescence.
(diary-view-other-diary-entries): Rename view-other-diary-entries.
Keep old name as alias, update callers.
(diary-add-to-list): Rename add-to-diary-list. Keep old name as alias,
update callers.
(diary-include-other-diary-files): Rename include-other-diary-files.
Keep old name as alias, update callers.
(diary-simple-display): Rename simple-diary-display. Keep old name as alias,
update callers.
(diary-fancy-display): Rename fancy-diary-display. Keep old name as alias,
update callers.
(diary-print-entries): Rename print-diary-entries. Keep old name as alias,
update callers.
(diary-marking-entries-flag): Rename marking-diary-entries. Update users.
(diary-marking-entry-flag): Rename marking-diary-entry. Update users.
(diary-mark-entries): Rename mark-diary-entries. Keep old name as alias,
update callers.
(diary-mark-sexp-entries): Rename mark-sexp-diary-entries.
Keep old name as alias, update callers.
(diary-mark-included-diary-files): Rename mark-included-diary-files.
Keep old name as alias, update callers.
(calendar-mark-days-named): Rename mark-calendar-days-named.
Keep old name as alias, update callers.
(calendar-mark-month): Rename mark-calendar-month. Keep old name as alias,
update callers.
(calendar-mark-date-pattern): Rename mark-calendar-date-pattern.
Keep old name as alias, update callers.
(diary-sort-entries): Rename sort-diary-entries. Keep old name as alias,
update callers.
(diary-list-sexp-entries): Rename list-sexp-diary-entries.
Keep old name as alias, update callers.
(diary-make-entry): Rename make-diary-entry. Keep old name as alias,
update callers.
(diary-insert-entry): Rename insert-diary-entry. Keep old name as alias.
(diary-insert-weekly-entry): Rename insert-weekly-diary-entry.
Keep old name as alias.
(diary-insert-monthly-entry): Rename insert-monthly-diary-entry.
Keep old name as alias.
(diary-insert-yearly-entry): Rename insert-yearly-diary-entry.
Keep old name as alias.
(diary-insert-anniversary-entry): Rename insert-anniversary-diary-entry.
Keep old name as alias.
(diary-insert-block-entry): Rename insert-block-diary-entry.
Keep old name as alias.
(diary-insert-cyclic-entry): Rename insert-cyclic-diary-entry.
Keep old name as alias.
(diary-fancy-font-lock-keywords): Rename fancy-diary-font-lock-keywords.
Keep old name as alias, update users.
(diary-fancy-display-mode): Rename fancy-diary-display-mode.
Keep old name as alias, update callers.
2008-04-06 20:53:14 +00:00
|
|
|
|
(defcustom diary-abbreviated-year-flag t
|
2008-03-28 02:47:59 +00:00
|
|
|
|
"Interpret a two-digit year DD in a diary entry as either 19DD or 20DD.
|
2015-09-03 22:31:12 +00:00
|
|
|
|
This applies to the Gregorian, Hebrew, Islamic, and Bahá’í calendars.
|
2008-03-28 02:47:59 +00:00
|
|
|
|
When the current century is added to a two-digit year, if the result
|
|
|
|
|
is more than 50 years in the future, the previous century is assumed.
|
|
|
|
|
If the result is more than 50 years in the past, the next century is assumed.
|
|
|
|
|
If this variable is nil, years must be written in full."
|
|
|
|
|
:type 'boolean
|
|
|
|
|
:group 'diary)
|
|
|
|
|
|
2010-11-26 03:10:16 +00:00
|
|
|
|
(defun diary-outlook-format-1 (body)
|
|
|
|
|
"Return a replace-match template for an element of `diary-outlook-formats'.
|
|
|
|
|
Returns a string using match elements 1-5, where:
|
|
|
|
|
1 = month name, 2 = day, 3 = year, 4 = time, 5 = location; also uses
|
2010-11-26 03:14:03 +00:00
|
|
|
|
%s = message subject. BODY is the string from which the matches derive."
|
|
|
|
|
(let* ((monthname (match-string 1 body))
|
|
|
|
|
(day (match-string 2 body))
|
|
|
|
|
(year (match-string 3 body))
|
2010-11-26 03:10:16 +00:00
|
|
|
|
;; Blech.
|
|
|
|
|
(month (catch 'found
|
|
|
|
|
(dotimes (i (length calendar-month-name-array))
|
|
|
|
|
(if (string-equal (aref calendar-month-name-array i)
|
|
|
|
|
monthname)
|
|
|
|
|
(throw 'found (1+ i))))
|
|
|
|
|
nil)))
|
|
|
|
|
;; If we could convert the monthname to a numeric month, we can
|
|
|
|
|
;; use the standard function calendar-date-string.
|
|
|
|
|
(concat (if month
|
2010-11-26 03:19:58 +00:00
|
|
|
|
(calendar-date-string (list month (string-to-number day)
|
2017-12-04 22:03:32 +00:00
|
|
|
|
(string-to-number year))
|
|
|
|
|
nil t)
|
2010-11-26 03:10:16 +00:00
|
|
|
|
(cond ((eq calendar-date-style 'iso) "\\3 \\1 \\2") ; YMD
|
|
|
|
|
((eq calendar-date-style 'european) "\\2 \\1 \\3") ; DMY
|
|
|
|
|
(t "\\1 \\2 \\3"))) ; MDY
|
|
|
|
|
"\n \\4 %s, \\5")))
|
|
|
|
|
;; TODO Sometimes the time is in a different time-zone to the one you
|
|
|
|
|
;; are in. Eg in PST, you might still get an email referring to:
|
|
|
|
|
;; "7:00 PM-8:00 PM. Greenwich Standard Time".
|
|
|
|
|
;; Note that it doesn't use a standard abbreviation for the timezone,
|
|
|
|
|
;; or anything helpful like that.
|
|
|
|
|
;; Sigh, this could cause the meeting to even be on a different day
|
|
|
|
|
;; to that given in the When: string.
|
|
|
|
|
;; These things seem to come in a multipart mail with a calendar part,
|
|
|
|
|
;; it's probably better to use that rather than this whole thing.
|
|
|
|
|
;; So this is unlikely to get improved.
|
|
|
|
|
|
|
|
|
|
;; TODO Is the format of these messages actually documented anywhere?
|
Move defcustoms to start.
(diary-include-string, diary-list-include-blanks)
(diary-glob-file-regexp-prefix, diary-face, diary-face-attrs)
(diary-file-name-prefix, diary-file-name-prefix-function)
(sexp-diary-entry-symbol, list-diary-entries-hook)
(mark-diary-entries-hook, nongregorian-diary-listing-hook)
(nongregorian-diary-marking-hook, print-diary-entries-hook):
Move here from calendar.el.
(diary-face): Make it a defcustom, and mark as obsolete.
(top-level): No need to require cal-hebrew, cal-islam when compiling.
(calendar-hebrew-month-name-array-leap-year)
(calendar-islamic-month-name-array, calendar-bahai-month-name-array):
Define for compiler.
(diary-font-lock-keywords): Use format rather than concat. Add
bahai-diary-entry-symbol.
2008-03-08 03:47:36 +00:00
|
|
|
|
(defcustom diary-outlook-formats
|
2010-11-26 03:10:16 +00:00
|
|
|
|
'(;; When: Tuesday, November 9, 2010 7:00 PM-8:00 PM. Greenwich Standard Time
|
|
|
|
|
;; Where: Meeting room B
|
|
|
|
|
("[ \t\n]*When: [[:alpha:]]+, \\([[:alpha:]]+\\) \\([0-9][0-9]*\\), \
|
|
|
|
|
\\([0-9]\\{4\\}\\),? \\(.+\\)\n\
|
2010-11-26 03:22:49 +00:00
|
|
|
|
\\(?:Where: \\(.+\n\\)\\)?" . diary-outlook-format-1))
|
Move defcustoms to start.
(diary-include-string, diary-list-include-blanks)
(diary-glob-file-regexp-prefix, diary-face, diary-face-attrs)
(diary-file-name-prefix, diary-file-name-prefix-function)
(sexp-diary-entry-symbol, list-diary-entries-hook)
(mark-diary-entries-hook, nongregorian-diary-listing-hook)
(nongregorian-diary-marking-hook, print-diary-entries-hook):
Move here from calendar.el.
(diary-face): Make it a defcustom, and mark as obsolete.
(top-level): No need to require cal-hebrew, cal-islam when compiling.
(calendar-hebrew-month-name-array-leap-year)
(calendar-islamic-month-name-array, calendar-bahai-month-name-array):
Define for compiler.
(diary-font-lock-keywords): Use format rather than concat. Add
bahai-diary-entry-symbol.
2008-03-08 03:47:36 +00:00
|
|
|
|
"Alist of regexps matching message text and replacement text.
|
|
|
|
|
|
|
|
|
|
The regexp must match the start of the message text containing an
|
|
|
|
|
appointment, but need not include a leading `^'. If it matches the
|
|
|
|
|
current message, a diary entry is made from the corresponding
|
|
|
|
|
template. If the template is a string, it should be suitable for
|
|
|
|
|
passing to `replace-match', and so will have occurrences of `\\D' to
|
|
|
|
|
substitute the match for the Dth subexpression. It must also contain
|
|
|
|
|
a single `%s' which will be replaced with the text of the message's
|
|
|
|
|
Subject field. Any other `%' characters must be doubled, so that the
|
|
|
|
|
template can be passed to `format'.
|
|
|
|
|
|
|
|
|
|
If the template is actually a function, it is called with the message
|
|
|
|
|
body text as argument, and may use `match-string' etc. to make a
|
|
|
|
|
template following the rules above."
|
|
|
|
|
:type '(alist :key-type (regexp :tag "Regexp matching time/place")
|
2008-03-13 06:29:28 +00:00
|
|
|
|
:value-type (choice
|
|
|
|
|
(string :tag "Template for entry")
|
|
|
|
|
(function :tag
|
|
|
|
|
"Unary function providing template")))
|
Move defcustoms to start.
(diary-include-string, diary-list-include-blanks)
(diary-glob-file-regexp-prefix, diary-face, diary-face-attrs)
(diary-file-name-prefix, diary-file-name-prefix-function)
(sexp-diary-entry-symbol, list-diary-entries-hook)
(mark-diary-entries-hook, nongregorian-diary-listing-hook)
(nongregorian-diary-marking-hook, print-diary-entries-hook):
Move here from calendar.el.
(diary-face): Make it a defcustom, and mark as obsolete.
(top-level): No need to require cal-hebrew, cal-islam when compiling.
(calendar-hebrew-month-name-array-leap-year)
(calendar-islamic-month-name-array, calendar-bahai-month-name-array):
Define for compiler.
(diary-font-lock-keywords): Use format rather than concat. Add
bahai-diary-entry-symbol.
2008-03-08 03:47:36 +00:00
|
|
|
|
:version "22.1"
|
|
|
|
|
:group 'diary)
|
|
|
|
|
|
2008-03-28 02:47:59 +00:00
|
|
|
|
(defvar diary-header-line-flag)
|
|
|
|
|
(defvar diary-header-line-format)
|
2008-03-26 03:26:43 +00:00
|
|
|
|
|
2008-03-27 02:50:38 +00:00
|
|
|
|
(defun diary-set-header (symbol value)
|
|
|
|
|
"Set SYMBOL's value to VALUE, and redraw the diary header if necessary."
|
|
|
|
|
(let ((oldvalue (symbol-value symbol))
|
2009-09-03 06:34:19 +00:00
|
|
|
|
(dbuff (and diary-file (find-buffer-visiting diary-file))))
|
2008-03-27 02:50:38 +00:00
|
|
|
|
(custom-set-default symbol value)
|
|
|
|
|
(and dbuff
|
|
|
|
|
(not (equal value oldvalue))
|
|
|
|
|
(with-current-buffer dbuff
|
|
|
|
|
(if (eq major-mode 'diary-mode)
|
|
|
|
|
(setq header-line-format (and diary-header-line-flag
|
|
|
|
|
diary-header-line-format)))))))
|
|
|
|
|
|
|
|
|
|
;; This can be removed once the kill/yank treatment of invisible text
|
|
|
|
|
;; (see etc/TODO) is fixed. -- gm
|
|
|
|
|
(defcustom diary-header-line-flag t
|
(diary-sexp-entry-symbol): Rename sexp-diary-entry-symbol.
Keep old name as alias, update users.
(diary-list-entries-hook): Rename list-diary-entries-hook.
Keep old name as alias, update users.
(diary-mark-entries-hook): Rename mark-diary-entries-hook.
Keep old name as alias, update users.
(diary-nongregorian-listing-hook): Rename nongregorian-diary-listing-hook.
Keep old name as alias, update users.
(diary-nongregorian-marking-hook): Rename nongregorian-diary-marking-hook.
Keep old name as alias, update users.
(diary-print-entries-hook): Rename print-diary-entries-hook.
Keep old name as alias, update users.
(diary-abbreviated-year-flag): Rename abbreviated-calendar-year.
Keep old name as alias, update users.
(diary-number-of-entries): Rename number-of-diary-entries.
Keep old name as alias, update users.
(view-diary-entries, list-diary-entries, show-all-diary-entries):
Give version of obsolescence.
(diary-view-other-diary-entries): Rename view-other-diary-entries.
Keep old name as alias, update callers.
(diary-add-to-list): Rename add-to-diary-list. Keep old name as alias,
update callers.
(diary-include-other-diary-files): Rename include-other-diary-files.
Keep old name as alias, update callers.
(diary-simple-display): Rename simple-diary-display. Keep old name as alias,
update callers.
(diary-fancy-display): Rename fancy-diary-display. Keep old name as alias,
update callers.
(diary-print-entries): Rename print-diary-entries. Keep old name as alias,
update callers.
(diary-marking-entries-flag): Rename marking-diary-entries. Update users.
(diary-marking-entry-flag): Rename marking-diary-entry. Update users.
(diary-mark-entries): Rename mark-diary-entries. Keep old name as alias,
update callers.
(diary-mark-sexp-entries): Rename mark-sexp-diary-entries.
Keep old name as alias, update callers.
(diary-mark-included-diary-files): Rename mark-included-diary-files.
Keep old name as alias, update callers.
(calendar-mark-days-named): Rename mark-calendar-days-named.
Keep old name as alias, update callers.
(calendar-mark-month): Rename mark-calendar-month. Keep old name as alias,
update callers.
(calendar-mark-date-pattern): Rename mark-calendar-date-pattern.
Keep old name as alias, update callers.
(diary-sort-entries): Rename sort-diary-entries. Keep old name as alias,
update callers.
(diary-list-sexp-entries): Rename list-sexp-diary-entries.
Keep old name as alias, update callers.
(diary-make-entry): Rename make-diary-entry. Keep old name as alias,
update callers.
(diary-insert-entry): Rename insert-diary-entry. Keep old name as alias.
(diary-insert-weekly-entry): Rename insert-weekly-diary-entry.
Keep old name as alias.
(diary-insert-monthly-entry): Rename insert-monthly-diary-entry.
Keep old name as alias.
(diary-insert-yearly-entry): Rename insert-yearly-diary-entry.
Keep old name as alias.
(diary-insert-anniversary-entry): Rename insert-anniversary-diary-entry.
Keep old name as alias.
(diary-insert-block-entry): Rename insert-block-diary-entry.
Keep old name as alias.
(diary-insert-cyclic-entry): Rename insert-cyclic-diary-entry.
Keep old name as alias.
(diary-fancy-font-lock-keywords): Rename fancy-diary-font-lock-keywords.
Keep old name as alias, update users.
(diary-fancy-display-mode): Rename fancy-diary-display-mode.
Keep old name as alias, update callers.
2008-04-06 20:53:14 +00:00
|
|
|
|
"Non-nil means `diary-simple-display' will show a header line.
|
2008-03-27 02:50:38 +00:00
|
|
|
|
The format of the header is specified by `diary-header-line-format'."
|
|
|
|
|
:group 'diary
|
|
|
|
|
:type 'boolean
|
|
|
|
|
:initialize 'custom-initialize-default
|
|
|
|
|
:set 'diary-set-header
|
|
|
|
|
:version "22.1")
|
|
|
|
|
|
|
|
|
|
(defvar diary-selective-display nil
|
|
|
|
|
"Internal diary variable; non-nil if some diary text is hidden.")
|
|
|
|
|
|
|
|
|
|
(defcustom diary-header-line-format
|
|
|
|
|
'(:eval (calendar-string-spread
|
|
|
|
|
(list (if diary-selective-display
|
2012-11-27 15:40:49 +00:00
|
|
|
|
"Some text is hidden - press \"C-c C-s\" before edit/copy"
|
2008-03-27 02:50:38 +00:00
|
|
|
|
"Diary"))
|
2010-08-14 01:56:35 +00:00
|
|
|
|
?\s (window-width)))
|
(diary-sexp-entry-symbol): Rename sexp-diary-entry-symbol.
Keep old name as alias, update users.
(diary-list-entries-hook): Rename list-diary-entries-hook.
Keep old name as alias, update users.
(diary-mark-entries-hook): Rename mark-diary-entries-hook.
Keep old name as alias, update users.
(diary-nongregorian-listing-hook): Rename nongregorian-diary-listing-hook.
Keep old name as alias, update users.
(diary-nongregorian-marking-hook): Rename nongregorian-diary-marking-hook.
Keep old name as alias, update users.
(diary-print-entries-hook): Rename print-diary-entries-hook.
Keep old name as alias, update users.
(diary-abbreviated-year-flag): Rename abbreviated-calendar-year.
Keep old name as alias, update users.
(diary-number-of-entries): Rename number-of-diary-entries.
Keep old name as alias, update users.
(view-diary-entries, list-diary-entries, show-all-diary-entries):
Give version of obsolescence.
(diary-view-other-diary-entries): Rename view-other-diary-entries.
Keep old name as alias, update callers.
(diary-add-to-list): Rename add-to-diary-list. Keep old name as alias,
update callers.
(diary-include-other-diary-files): Rename include-other-diary-files.
Keep old name as alias, update callers.
(diary-simple-display): Rename simple-diary-display. Keep old name as alias,
update callers.
(diary-fancy-display): Rename fancy-diary-display. Keep old name as alias,
update callers.
(diary-print-entries): Rename print-diary-entries. Keep old name as alias,
update callers.
(diary-marking-entries-flag): Rename marking-diary-entries. Update users.
(diary-marking-entry-flag): Rename marking-diary-entry. Update users.
(diary-mark-entries): Rename mark-diary-entries. Keep old name as alias,
update callers.
(diary-mark-sexp-entries): Rename mark-sexp-diary-entries.
Keep old name as alias, update callers.
(diary-mark-included-diary-files): Rename mark-included-diary-files.
Keep old name as alias, update callers.
(calendar-mark-days-named): Rename mark-calendar-days-named.
Keep old name as alias, update callers.
(calendar-mark-month): Rename mark-calendar-month. Keep old name as alias,
update callers.
(calendar-mark-date-pattern): Rename mark-calendar-date-pattern.
Keep old name as alias, update callers.
(diary-sort-entries): Rename sort-diary-entries. Keep old name as alias,
update callers.
(diary-list-sexp-entries): Rename list-sexp-diary-entries.
Keep old name as alias, update callers.
(diary-make-entry): Rename make-diary-entry. Keep old name as alias,
update callers.
(diary-insert-entry): Rename insert-diary-entry. Keep old name as alias.
(diary-insert-weekly-entry): Rename insert-weekly-diary-entry.
Keep old name as alias.
(diary-insert-monthly-entry): Rename insert-monthly-diary-entry.
Keep old name as alias.
(diary-insert-yearly-entry): Rename insert-yearly-diary-entry.
Keep old name as alias.
(diary-insert-anniversary-entry): Rename insert-anniversary-diary-entry.
Keep old name as alias.
(diary-insert-block-entry): Rename insert-block-diary-entry.
Keep old name as alias.
(diary-insert-cyclic-entry): Rename insert-cyclic-diary-entry.
Keep old name as alias.
(diary-fancy-font-lock-keywords): Rename fancy-diary-font-lock-keywords.
Keep old name as alias, update users.
(diary-fancy-display-mode): Rename fancy-diary-display-mode.
Keep old name as alias, update callers.
2008-04-06 20:53:14 +00:00
|
|
|
|
"Format of the header line displayed by `diary-simple-display'.
|
2008-03-27 02:50:38 +00:00
|
|
|
|
Only used if `diary-header-line-flag' is non-nil."
|
|
|
|
|
:group 'diary
|
|
|
|
|
:type 'sexp
|
2016-02-02 01:53:44 +00:00
|
|
|
|
:risky t
|
2008-03-27 02:50:38 +00:00
|
|
|
|
:initialize 'custom-initialize-default
|
|
|
|
|
:set 'diary-set-header
|
2010-08-14 02:23:56 +00:00
|
|
|
|
:version "23.3") ; frame-width -> window-width
|
2008-03-27 02:50:38 +00:00
|
|
|
|
|
2008-03-26 03:26:43 +00:00
|
|
|
|
;; The first version of this also checked for diary-selective-display
|
|
|
|
|
;; in the non-fancy case. This was an attempt to distinguish between
|
|
|
|
|
;; displaying the diary and just visiting the diary file. However,
|
|
|
|
|
;; when using fancy diary, calling diary when there are no entries to
|
|
|
|
|
;; display does not create the fancy buffer, nor does it set
|
|
|
|
|
;; diary-selective-display in the diary buffer. This means some
|
|
|
|
|
;; customizations will not take effect, eg:
|
2017-11-26 06:45:41 +00:00
|
|
|
|
;; https://lists.gnu.org/r/emacs-pretest-bug/2007-03/msg00466.html
|
2008-03-26 03:26:43 +00:00
|
|
|
|
;; So the check for diary-selective-display was dropped. This means the
|
|
|
|
|
;; diary will be displayed if one customizes a diary variable while
|
|
|
|
|
;; just visiting the diary-file. This is i) unlikely, and ii) no great loss.
|
|
|
|
|
;;;###cal-autoload
|
|
|
|
|
(defun diary-live-p ()
|
2014-09-08 06:03:19 +00:00
|
|
|
|
"Return non-nil if the diary is being displayed.
|
|
|
|
|
The actual return value is a diary buffer."
|
2008-04-07 01:59:37 +00:00
|
|
|
|
(or (get-buffer diary-fancy-buffer)
|
2009-09-03 06:34:19 +00:00
|
|
|
|
(and diary-file (find-buffer-visiting diary-file))))
|
2008-03-26 03:26:43 +00:00
|
|
|
|
|
|
|
|
|
;;;###cal-autoload
|
|
|
|
|
(defun diary-set-maybe-redraw (symbol value)
|
|
|
|
|
"Set SYMBOL's value to VALUE, and redraw the diary if necessary.
|
|
|
|
|
Redraws the diary if it is being displayed (note this is not the same as
|
|
|
|
|
just visiting the `diary-file'), and SYMBOL's value is to be changed."
|
2008-03-27 02:50:38 +00:00
|
|
|
|
(let ((oldvalue (symbol-value symbol)))
|
2008-03-26 03:26:43 +00:00
|
|
|
|
(custom-set-default symbol value)
|
|
|
|
|
(and (not (equal value oldvalue))
|
|
|
|
|
(diary-live-p)
|
|
|
|
|
;; Note this assumes diary was called without prefix arg.
|
|
|
|
|
(diary))))
|
|
|
|
|
|
(diary-sexp-entry-symbol): Rename sexp-diary-entry-symbol.
Keep old name as alias, update users.
(diary-list-entries-hook): Rename list-diary-entries-hook.
Keep old name as alias, update users.
(diary-mark-entries-hook): Rename mark-diary-entries-hook.
Keep old name as alias, update users.
(diary-nongregorian-listing-hook): Rename nongregorian-diary-listing-hook.
Keep old name as alias, update users.
(diary-nongregorian-marking-hook): Rename nongregorian-diary-marking-hook.
Keep old name as alias, update users.
(diary-print-entries-hook): Rename print-diary-entries-hook.
Keep old name as alias, update users.
(diary-abbreviated-year-flag): Rename abbreviated-calendar-year.
Keep old name as alias, update users.
(diary-number-of-entries): Rename number-of-diary-entries.
Keep old name as alias, update users.
(view-diary-entries, list-diary-entries, show-all-diary-entries):
Give version of obsolescence.
(diary-view-other-diary-entries): Rename view-other-diary-entries.
Keep old name as alias, update callers.
(diary-add-to-list): Rename add-to-diary-list. Keep old name as alias,
update callers.
(diary-include-other-diary-files): Rename include-other-diary-files.
Keep old name as alias, update callers.
(diary-simple-display): Rename simple-diary-display. Keep old name as alias,
update callers.
(diary-fancy-display): Rename fancy-diary-display. Keep old name as alias,
update callers.
(diary-print-entries): Rename print-diary-entries. Keep old name as alias,
update callers.
(diary-marking-entries-flag): Rename marking-diary-entries. Update users.
(diary-marking-entry-flag): Rename marking-diary-entry. Update users.
(diary-mark-entries): Rename mark-diary-entries. Keep old name as alias,
update callers.
(diary-mark-sexp-entries): Rename mark-sexp-diary-entries.
Keep old name as alias, update callers.
(diary-mark-included-diary-files): Rename mark-included-diary-files.
Keep old name as alias, update callers.
(calendar-mark-days-named): Rename mark-calendar-days-named.
Keep old name as alias, update callers.
(calendar-mark-month): Rename mark-calendar-month. Keep old name as alias,
update callers.
(calendar-mark-date-pattern): Rename mark-calendar-date-pattern.
Keep old name as alias, update callers.
(diary-sort-entries): Rename sort-diary-entries. Keep old name as alias,
update callers.
(diary-list-sexp-entries): Rename list-sexp-diary-entries.
Keep old name as alias, update callers.
(diary-make-entry): Rename make-diary-entry. Keep old name as alias,
update callers.
(diary-insert-entry): Rename insert-diary-entry. Keep old name as alias.
(diary-insert-weekly-entry): Rename insert-weekly-diary-entry.
Keep old name as alias.
(diary-insert-monthly-entry): Rename insert-monthly-diary-entry.
Keep old name as alias.
(diary-insert-yearly-entry): Rename insert-yearly-diary-entry.
Keep old name as alias.
(diary-insert-anniversary-entry): Rename insert-anniversary-diary-entry.
Keep old name as alias.
(diary-insert-block-entry): Rename insert-block-diary-entry.
Keep old name as alias.
(diary-insert-cyclic-entry): Rename insert-cyclic-diary-entry.
Keep old name as alias.
(diary-fancy-font-lock-keywords): Rename fancy-diary-font-lock-keywords.
Keep old name as alias, update users.
(diary-fancy-display-mode): Rename fancy-diary-display-mode.
Keep old name as alias, update callers.
2008-04-06 20:53:14 +00:00
|
|
|
|
(defcustom diary-number-of-entries 1
|
2008-03-26 03:26:43 +00:00
|
|
|
|
"Specifies how many days of diary entries are to be displayed initially.
|
2008-11-30 01:01:18 +00:00
|
|
|
|
This variable affects the diary display when the command \\[diary] is
|
|
|
|
|
used, or if the value of the variable `calendar-view-diary-initially-flag'
|
|
|
|
|
is non-nil. For example, if the default value 1 is used, then only the
|
|
|
|
|
current day's diary entries will be displayed. If the value 2 is used,
|
|
|
|
|
then both the current day's and the next day's entries will be displayed.
|
|
|
|
|
|
|
|
|
|
The value can also be a vector such as [0 2 2 2 2 4 1]; this value says
|
|
|
|
|
to display no diary entries on Sunday, the entries for the current date
|
|
|
|
|
and the day after on Monday through Thursday, Friday through Monday's
|
|
|
|
|
entries on Friday, and only Saturday's entries on Saturday.
|
2008-03-26 03:26:43 +00:00
|
|
|
|
|
|
|
|
|
This variable does not affect the diary display with the `d' command
|
2008-11-30 01:01:18 +00:00
|
|
|
|
from the calendar; in that case, the prefix argument controls the number
|
|
|
|
|
of days of diary entries displayed."
|
2008-03-26 03:26:43 +00:00
|
|
|
|
:type '(choice (integer :tag "Entries")
|
|
|
|
|
(vector :value [0 0 0 0 0 0 0]
|
|
|
|
|
(integer :tag "Sunday")
|
|
|
|
|
(integer :tag "Monday")
|
|
|
|
|
(integer :tag "Tuesday")
|
|
|
|
|
(integer :tag "Wednesday")
|
|
|
|
|
(integer :tag "Thursday")
|
|
|
|
|
(integer :tag "Friday")
|
|
|
|
|
(integer :tag "Saturday")))
|
|
|
|
|
:initialize 'custom-initialize-default
|
|
|
|
|
:set 'diary-set-maybe-redraw
|
|
|
|
|
:group 'diary)
|
|
|
|
|
|
2008-04-12 03:11:49 +00:00
|
|
|
|
;;; More user options in calendar.el, holidays.el.
|
Move defcustoms to start.
(diary-include-string, diary-list-include-blanks)
(diary-glob-file-regexp-prefix, diary-face, diary-face-attrs)
(diary-file-name-prefix, diary-file-name-prefix-function)
(sexp-diary-entry-symbol, list-diary-entries-hook)
(mark-diary-entries-hook, nongregorian-diary-listing-hook)
(nongregorian-diary-marking-hook, print-diary-entries-hook):
Move here from calendar.el.
(diary-face): Make it a defcustom, and mark as obsolete.
(top-level): No need to require cal-hebrew, cal-islam when compiling.
(calendar-hebrew-month-name-array-leap-year)
(calendar-islamic-month-name-array, calendar-bahai-month-name-array):
Define for compiler.
(diary-font-lock-keywords): Use format rather than concat. Add
bahai-diary-entry-symbol.
2008-03-08 03:47:36 +00:00
|
|
|
|
|
|
|
|
|
|
(diary-check-diary-file): New function.
(diary, view-diary-entries, show-all-diary-entries)
(mark-diary-entries): Use it.
(view-other-diary-entries): Doc fix. Use `prefix-numeric-value'.
(diary-syntax-table, diary-attrtype-convert, diary-mail-days): Doc fix.
(diary-modified, d-file): No need to defvar (for compiler).
(list-diary-entries): No need for `let*' so use `let'.
(simple-diary-display): Use `diary-file' directly rather than
inheriting `d-file' from `list-diary-entries' caller.
(make-fancy-diary-buffer, show-all-diary-entries): `mode-line-format'
already buffer-local.
(diary-mail-addr): Set to the empty string (rather than nil) if
undefined, as per `user-mail-address'.
(diary-mail-entries): Doc fix. Error if `diary-mail-address' unset.
(mark-sexp-diary-entries): Don't regexp-quote sexp-mark twice.
Remove an un-needed `if'.
(list-sexp-diary-entries): Remove local vars mark and s-entry, and
use `let' rather than `let*'.
(diary-date, insert-monthly-diary-entry)
(insert-yearly-diary-entry, insert-anniversary-diary-entry)
(insert-block-diary-entry, insert-cyclic-diary-entry)
(font-lock-diary-date-forms): No need for `let*' so use `let'.
(make-diary-entry): Doc fix. Use `or' rather than `if'.
(diary-font-lock-keywords): Use `when'. `cal-islam' is required
feature, not `cal-islamic'.
`calendar-islamic-month-name-array-leap-year' does not exist - use
`calendar-islamic-month-name-array'.
2003-06-22 01:02:22 +00:00
|
|
|
|
(defun diary-check-diary-file ()
|
|
|
|
|
"Check that the file specified by `diary-file' exists and is readable.
|
|
|
|
|
If so, return the expanded file name, otherwise signal an error."
|
2009-09-03 06:34:19 +00:00
|
|
|
|
(if (and diary-file (file-exists-p diary-file))
|
|
|
|
|
(if (file-readable-p diary-file)
|
|
|
|
|
diary-file
|
Go back to grave quoting in source-code docstrings etc.
This reverts almost all my recent changes to use curved quotes
in docstrings and/or strings used for error diagnostics.
There are a few exceptions, e.g., Bahá’í proper names.
* admin/unidata/unidata-gen.el (unidata-gen-table):
* lisp/abbrev.el (expand-region-abbrevs):
* lisp/align.el (align-region):
* lisp/allout.el (allout-mode, allout-solicit-alternate-bullet)
(outlineify-sticky):
* lisp/apropos.el (apropos-library):
* lisp/bookmark.el (bookmark-default-annotation-text):
* lisp/button.el (button-category-symbol, button-put)
(make-text-button):
* lisp/calc/calc-aent.el (math-read-if, math-read-factor):
* lisp/calc/calc-embed.el (calc-do-embedded):
* lisp/calc/calc-ext.el (calc-user-function-list):
* lisp/calc/calc-graph.el (calc-graph-show-dumb):
* lisp/calc/calc-help.el (calc-describe-key)
(calc-describe-thing, calc-full-help):
* lisp/calc/calc-lang.el (calc-c-language)
(math-parse-fortran-vector-end, math-parse-tex-sum)
(math-parse-eqn-matrix, math-parse-eqn-prime)
(calc-yacas-language, calc-maxima-language, calc-giac-language)
(math-read-giac-subscr, math-read-math-subscr)
(math-read-big-rec, math-read-big-balance):
* lisp/calc/calc-misc.el (calc-help, report-calc-bug):
* lisp/calc/calc-mode.el (calc-auto-why, calc-save-modes)
(calc-auto-recompute):
* lisp/calc/calc-prog.el (calc-fix-token-name)
(calc-read-parse-table-part, calc-user-define-invocation)
(math-do-arg-check):
* lisp/calc/calc-store.el (calc-edit-variable):
* lisp/calc/calc-units.el (math-build-units-table-buffer):
* lisp/calc/calc-vec.el (math-read-brackets):
* lisp/calc/calc-yank.el (calc-edit-mode):
* lisp/calc/calc.el (calc, calc-do, calc-user-invocation):
* lisp/calendar/appt.el (appt-display-message):
* lisp/calendar/diary-lib.el (diary-check-diary-file)
(diary-mail-entries, diary-from-outlook):
* lisp/calendar/icalendar.el (icalendar-export-region)
(icalendar--convert-float-to-ical)
(icalendar--convert-date-to-ical)
(icalendar--convert-ical-to-diary)
(icalendar--convert-recurring-to-diary)
(icalendar--add-diary-entry):
* lisp/calendar/time-date.el (format-seconds):
* lisp/calendar/timeclock.el (timeclock-mode-line-display)
(timeclock-make-hours-explicit, timeclock-log-data):
* lisp/calendar/todo-mode.el (todo-prefix, todo-delete-category)
(todo-item-mark, todo-check-format)
(todo-insert-item--next-param, todo-edit-item--next-key)
(todo-mode):
* lisp/cedet/ede/pmake.el (ede-proj-makefile-insert-dist-rules):
* lisp/cedet/mode-local.el (describe-mode-local-overload)
(mode-local-print-binding, mode-local-describe-bindings-2):
* lisp/cedet/semantic/complete.el (semantic-displayor-show-request):
* lisp/cedet/srecode/srt-mode.el (srecode-macro-help):
* lisp/cus-start.el (standard):
* lisp/cus-theme.el (describe-theme-1):
* lisp/custom.el (custom-add-dependencies, custom-check-theme)
(custom--sort-vars-1, load-theme):
* lisp/descr-text.el (describe-text-properties-1, describe-char):
* lisp/dired-x.el (dired-do-run-mail):
* lisp/dired.el (dired-log):
* lisp/emacs-lisp/advice.el (ad-read-advised-function)
(ad-read-advice-class, ad-read-advice-name, ad-enable-advice)
(ad-disable-advice, ad-remove-advice, ad-set-argument)
(ad-set-arguments, ad--defalias-fset, ad-activate)
(ad-deactivate):
* lisp/emacs-lisp/byte-opt.el (byte-compile-inline-expand)
(byte-compile-unfold-lambda, byte-optimize-form-code-walker)
(byte-optimize-while, byte-optimize-apply):
* lisp/emacs-lisp/byte-run.el (defun, defsubst):
* lisp/emacs-lisp/bytecomp.el (byte-compile-lapcode)
(byte-compile-log-file, byte-compile-format-warn)
(byte-compile-nogroup-warn, byte-compile-arglist-warn)
(byte-compile-cl-warn)
(byte-compile-warn-about-unresolved-functions)
(byte-compile-file, byte-compile--declare-var)
(byte-compile-file-form-defmumble, byte-compile-form)
(byte-compile-normal-call, byte-compile-check-variable)
(byte-compile-variable-ref, byte-compile-variable-set)
(byte-compile-subr-wrong-args, byte-compile-setq-default)
(byte-compile-negation-optimizer)
(byte-compile-condition-case--old)
(byte-compile-condition-case--new, byte-compile-save-excursion)
(byte-compile-defvar, byte-compile-autoload)
(byte-compile-lambda-form)
(byte-compile-make-variable-buffer-local, display-call-tree)
(batch-byte-compile):
* lisp/emacs-lisp/cconv.el (cconv-convert, cconv--analyze-use):
* lisp/emacs-lisp/chart.el (chart-space-usage):
* lisp/emacs-lisp/check-declare.el (check-declare-scan)
(check-declare-warn, check-declare-file)
(check-declare-directory):
* lisp/emacs-lisp/checkdoc.el (checkdoc-this-string-valid-engine)
(checkdoc-message-text-engine):
* lisp/emacs-lisp/cl-extra.el (cl-parse-integer)
(cl--describe-class):
* lisp/emacs-lisp/cl-generic.el (cl-defgeneric)
(cl--generic-describe, cl-generic-generalizers):
* lisp/emacs-lisp/cl-macs.el (cl--parse-loop-clause, cl-tagbody)
(cl-symbol-macrolet):
* lisp/emacs-lisp/cl.el (cl-unload-function, flet):
* lisp/emacs-lisp/copyright.el (copyright)
(copyright-update-directory):
* lisp/emacs-lisp/edebug.el (edebug-read-list):
* lisp/emacs-lisp/eieio-base.el (eieio-persistent-read):
* lisp/emacs-lisp/eieio-core.el (eieio--slot-override)
(eieio-oref):
* lisp/emacs-lisp/eieio-opt.el (eieio-help-constructor):
* lisp/emacs-lisp/eieio-speedbar.el:
(eieio-speedbar-child-make-tag-lines)
(eieio-speedbar-child-description):
* lisp/emacs-lisp/eieio.el (defclass, change-class):
* lisp/emacs-lisp/elint.el (elint-file, elint-get-top-forms)
(elint-init-form, elint-check-defalias-form)
(elint-check-let-form):
* lisp/emacs-lisp/ert.el (ert-get-test, ert-results-mode-menu)
(ert-results-pop-to-backtrace-for-test-at-point)
(ert-results-pop-to-messages-for-test-at-point)
(ert-results-pop-to-should-forms-for-test-at-point)
(ert-describe-test):
* lisp/emacs-lisp/find-func.el (find-function-search-for-symbol)
(find-function-library):
* lisp/emacs-lisp/generator.el (iter-yield):
* lisp/emacs-lisp/gv.el (gv-define-simple-setter):
* lisp/emacs-lisp/lisp-mnt.el (lm-verify):
* lisp/emacs-lisp/macroexp.el (macroexp--obsolete-warning):
* lisp/emacs-lisp/map-ynp.el (map-y-or-n-p):
* lisp/emacs-lisp/nadvice.el (advice--make-docstring)
(advice--make, define-advice):
* lisp/emacs-lisp/package-x.el (package-upload-file):
* lisp/emacs-lisp/package.el (package-version-join)
(package-disabled-p, package-activate-1, package-activate)
(package--download-one-archive)
(package--download-and-read-archives)
(package-compute-transaction, package-install-from-archive)
(package-install, package-install-selected-packages)
(package-delete, package-autoremove, describe-package-1)
(package-install-button-action, package-delete-button-action)
(package-menu-hide-package, package-menu--list-to-prompt)
(package-menu--perform-transaction)
(package-menu--find-and-notify-upgrades):
* lisp/emacs-lisp/pcase.el (pcase-exhaustive, pcase--u1):
* lisp/emacs-lisp/re-builder.el (reb-enter-subexp-mode):
* lisp/emacs-lisp/ring.el (ring-previous, ring-next):
* lisp/emacs-lisp/rx.el (rx-check, rx-anything)
(rx-check-any-string, rx-check-any, rx-check-not, rx-=)
(rx-repeat, rx-check-backref, rx-syntax, rx-check-category)
(rx-form):
* lisp/emacs-lisp/smie.el (smie-config-save):
* lisp/emacs-lisp/subr-x.el (internal--check-binding):
* lisp/emacs-lisp/tabulated-list.el (tabulated-list-put-tag):
* lisp/emacs-lisp/testcover.el (testcover-1value):
* lisp/emacs-lisp/timer.el (timer-event-handler):
* lisp/emulation/viper-cmd.el (viper-toggle-parse-sexp-ignore-comments)
(viper-toggle-search-style, viper-kill-buffer)
(viper-brac-function):
* lisp/emulation/viper-macs.el (viper-record-kbd-macro):
* lisp/env.el (setenv):
* lisp/erc/erc-button.el (erc-nick-popup):
* lisp/erc/erc.el (erc-cmd-LOAD, erc-handle-login, english):
* lisp/eshell/em-dirs.el (eshell/cd):
* lisp/eshell/em-glob.el (eshell-glob-regexp)
(eshell-glob-entries):
* lisp/eshell/em-pred.el (eshell-parse-modifiers):
* lisp/eshell/esh-opt.el (eshell-show-usage):
* lisp/facemenu.el (facemenu-add-new-face)
(facemenu-add-new-color):
* lisp/faces.el (read-face-name, read-face-font, describe-face)
(x-resolve-font-name):
* lisp/files-x.el (modify-file-local-variable):
* lisp/files.el (locate-user-emacs-file, find-alternate-file)
(set-auto-mode, hack-one-local-variable--obsolete)
(dir-locals-set-directory-class, write-file, basic-save-buffer)
(delete-directory, copy-directory, recover-session)
(recover-session-finish, insert-directory)
(file-modes-char-to-who, file-modes-symbolic-to-number)
(move-file-to-trash):
* lisp/filesets.el (filesets-add-buffer, filesets-remove-buffer):
* lisp/find-cmd.el (find-generic, find-to-string):
* lisp/finder.el (finder-commentary):
* lisp/font-lock.el (font-lock-fontify-buffer):
* lisp/format.el (format-write-file, format-find-file)
(format-insert-file):
* lisp/frame.el (get-device-terminal, select-frame-by-name):
* lisp/fringe.el (fringe--check-style):
* lisp/gnus/nnmairix.el (nnmairix-widget-create-query):
* lisp/help-fns.el (help-fns--key-bindings)
(help-fns--compiler-macro, help-fns--parent-mode)
(help-fns--obsolete, help-fns--interactive-only)
(describe-function-1, describe-variable):
* lisp/help.el (describe-mode)
(describe-minor-mode-from-indicator):
* lisp/image.el (image-type):
* lisp/international/ccl.el (ccl-dump):
* lisp/international/fontset.el (x-must-resolve-font-name):
* lisp/international/mule-cmds.el (prefer-coding-system)
(select-safe-coding-system-interactively)
(select-safe-coding-system, activate-input-method)
(toggle-input-method, describe-current-input-method)
(describe-language-environment):
* lisp/international/mule-conf.el (code-offset):
* lisp/international/mule-diag.el (describe-character-set)
(list-input-methods-1):
* lisp/mail/feedmail.el (feedmail-run-the-queue):
* lisp/mouse.el (minor-mode-menu-from-indicator):
* lisp/mpc.el (mpc-playlist-rename):
* lisp/msb.el (msb--choose-menu):
* lisp/net/ange-ftp.el (ange-ftp-shell-command):
* lisp/net/imap.el (imap-interactive-login):
* lisp/net/mairix.el (mairix-widget-create-query):
* lisp/net/newst-backend.el (newsticker--sentinel-work):
* lisp/net/newst-treeview.el (newsticker--treeview-load):
* lisp/net/rlogin.el (rlogin):
* lisp/obsolete/iswitchb.el (iswitchb-possible-new-buffer):
* lisp/obsolete/otodo-mode.el (todo-more-important-p):
* lisp/obsolete/pgg-gpg.el (pgg-gpg-process-region):
* lisp/obsolete/pgg-pgp.el (pgg-pgp-process-region):
* lisp/obsolete/pgg-pgp5.el (pgg-pgp5-process-region):
* lisp/org/ob-core.el (org-babel-goto-named-src-block)
(org-babel-goto-named-result):
* lisp/org/ob-fortran.el (org-babel-fortran-ensure-main-wrap):
* lisp/org/ob-ref.el (org-babel-ref-resolve):
* lisp/org/org-agenda.el (org-agenda-prepare):
* lisp/org/org-clock.el (org-clock-notify-once-if-expired)
(org-clock-resolve):
* lisp/org/org-ctags.el (org-ctags-ask-rebuild-tags-file-then-find-tag):
* lisp/org/org-feed.el (org-feed-parse-atom-entry):
* lisp/org/org-habit.el (org-habit-parse-todo):
* lisp/org/org-mouse.el (org-mouse-popup-global-menu)
(org-mouse-context-menu):
* lisp/org/org-table.el (org-table-edit-formulas):
* lisp/org/ox.el (org-export-async-start):
* lisp/proced.el (proced-log):
* lisp/progmodes/ada-mode.el (ada-get-indent-case)
(ada-check-matching-start, ada-goto-matching-start):
* lisp/progmodes/ada-prj.el (ada-prj-display-page):
* lisp/progmodes/ada-xref.el (ada-find-executable):
* lisp/progmodes/ebrowse.el (ebrowse-tags-apropos):
* lisp/progmodes/etags.el (etags-tags-apropos-additional):
* lisp/progmodes/flymake.el (flymake-parse-err-lines)
(flymake-start-syntax-check-process):
* lisp/progmodes/python.el (python-shell-get-process-or-error)
(python-define-auxiliary-skeleton):
* lisp/progmodes/sql.el (sql-comint):
* lisp/progmodes/verilog-mode.el (verilog-load-file-at-point):
* lisp/progmodes/vhdl-mode.el (vhdl-widget-directory-validate):
* lisp/recentf.el (recentf-open-files):
* lisp/replace.el (query-replace-read-from)
(occur-after-change-function, occur-1):
* lisp/scroll-bar.el (scroll-bar-columns):
* lisp/server.el (server-get-auth-key):
* lisp/simple.el (execute-extended-command)
(undo-outer-limit-truncate, list-processes--refresh)
(compose-mail, set-variable, choose-completion-string)
(define-alternatives):
* lisp/startup.el (site-run-file, tty-handle-args, command-line)
(command-line-1):
* lisp/subr.el (noreturn, define-error, add-to-list)
(read-char-choice, version-to-list):
* lisp/term/common-win.el (x-handle-xrm-switch)
(x-handle-name-switch, x-handle-args):
* lisp/term/x-win.el (x-handle-parent-id, x-handle-smid):
* lisp/textmodes/reftex-ref.el (reftex-label):
* lisp/textmodes/reftex-toc.el (reftex-toc-rename-label):
* lisp/textmodes/two-column.el (2C-split):
* lisp/tutorial.el (tutorial--describe-nonstandard-key)
(tutorial--find-changed-keys):
* lisp/type-break.el (type-break-noninteractive-query):
* lisp/wdired.el (wdired-do-renames, wdired-do-symlink-changes)
(wdired-do-perm-changes):
* lisp/whitespace.el (whitespace-report-region):
Prefer grave quoting in source-code strings used to generate help
and diagnostics.
* lisp/faces.el (face-documentation):
No need to convert quotes, since the result is a docstring.
* lisp/info.el (Info-virtual-index-find-node)
(Info-virtual-index, info-apropos):
Simplify by generating only curved quotes, since info files are
typically that ways nowadays anyway.
* lisp/international/mule-diag.el (list-input-methods):
Don’t assume text quoting style is curved.
* lisp/org/org-bibtex.el (org-bibtex-fields):
Revert my recent changes, going back to the old quoting style.
2015-09-07 15:41:44 +00:00
|
|
|
|
(error "Diary file `%s' is not readable" diary-file))
|
|
|
|
|
(error "Diary file `%s' does not exist" diary-file)))
|
(diary-check-diary-file): New function.
(diary, view-diary-entries, show-all-diary-entries)
(mark-diary-entries): Use it.
(view-other-diary-entries): Doc fix. Use `prefix-numeric-value'.
(diary-syntax-table, diary-attrtype-convert, diary-mail-days): Doc fix.
(diary-modified, d-file): No need to defvar (for compiler).
(list-diary-entries): No need for `let*' so use `let'.
(simple-diary-display): Use `diary-file' directly rather than
inheriting `d-file' from `list-diary-entries' caller.
(make-fancy-diary-buffer, show-all-diary-entries): `mode-line-format'
already buffer-local.
(diary-mail-addr): Set to the empty string (rather than nil) if
undefined, as per `user-mail-address'.
(diary-mail-entries): Doc fix. Error if `diary-mail-address' unset.
(mark-sexp-diary-entries): Don't regexp-quote sexp-mark twice.
Remove an un-needed `if'.
(list-sexp-diary-entries): Remove local vars mark and s-entry, and
use `let' rather than `let*'.
(diary-date, insert-monthly-diary-entry)
(insert-yearly-diary-entry, insert-anniversary-diary-entry)
(insert-block-diary-entry, insert-cyclic-diary-entry)
(font-lock-diary-date-forms): No need for `let*' so use `let'.
(make-diary-entry): Doc fix. Use `or' rather than `if'.
(diary-font-lock-keywords): Use `when'. `cal-islam' is required
feature, not `cal-islamic'.
`calendar-islamic-month-name-array-leap-year' does not exist - use
`calendar-islamic-month-name-array'.
2003-06-22 01:02:22 +00:00
|
|
|
|
|
1995-09-21 03:11:06 +00:00
|
|
|
|
;;;###autoload
|
|
|
|
|
(defun diary (&optional arg)
|
|
|
|
|
"Generate the diary window for ARG days starting with the current date.
|
|
|
|
|
If no argument is provided, the number of days of diary entries is governed
|
(diary-sexp-entry-symbol): Rename sexp-diary-entry-symbol.
Keep old name as alias, update users.
(diary-list-entries-hook): Rename list-diary-entries-hook.
Keep old name as alias, update users.
(diary-mark-entries-hook): Rename mark-diary-entries-hook.
Keep old name as alias, update users.
(diary-nongregorian-listing-hook): Rename nongregorian-diary-listing-hook.
Keep old name as alias, update users.
(diary-nongregorian-marking-hook): Rename nongregorian-diary-marking-hook.
Keep old name as alias, update users.
(diary-print-entries-hook): Rename print-diary-entries-hook.
Keep old name as alias, update users.
(diary-abbreviated-year-flag): Rename abbreviated-calendar-year.
Keep old name as alias, update users.
(diary-number-of-entries): Rename number-of-diary-entries.
Keep old name as alias, update users.
(view-diary-entries, list-diary-entries, show-all-diary-entries):
Give version of obsolescence.
(diary-view-other-diary-entries): Rename view-other-diary-entries.
Keep old name as alias, update callers.
(diary-add-to-list): Rename add-to-diary-list. Keep old name as alias,
update callers.
(diary-include-other-diary-files): Rename include-other-diary-files.
Keep old name as alias, update callers.
(diary-simple-display): Rename simple-diary-display. Keep old name as alias,
update callers.
(diary-fancy-display): Rename fancy-diary-display. Keep old name as alias,
update callers.
(diary-print-entries): Rename print-diary-entries. Keep old name as alias,
update callers.
(diary-marking-entries-flag): Rename marking-diary-entries. Update users.
(diary-marking-entry-flag): Rename marking-diary-entry. Update users.
(diary-mark-entries): Rename mark-diary-entries. Keep old name as alias,
update callers.
(diary-mark-sexp-entries): Rename mark-sexp-diary-entries.
Keep old name as alias, update callers.
(diary-mark-included-diary-files): Rename mark-included-diary-files.
Keep old name as alias, update callers.
(calendar-mark-days-named): Rename mark-calendar-days-named.
Keep old name as alias, update callers.
(calendar-mark-month): Rename mark-calendar-month. Keep old name as alias,
update callers.
(calendar-mark-date-pattern): Rename mark-calendar-date-pattern.
Keep old name as alias, update callers.
(diary-sort-entries): Rename sort-diary-entries. Keep old name as alias,
update callers.
(diary-list-sexp-entries): Rename list-sexp-diary-entries.
Keep old name as alias, update callers.
(diary-make-entry): Rename make-diary-entry. Keep old name as alias,
update callers.
(diary-insert-entry): Rename insert-diary-entry. Keep old name as alias.
(diary-insert-weekly-entry): Rename insert-weekly-diary-entry.
Keep old name as alias.
(diary-insert-monthly-entry): Rename insert-monthly-diary-entry.
Keep old name as alias.
(diary-insert-yearly-entry): Rename insert-yearly-diary-entry.
Keep old name as alias.
(diary-insert-anniversary-entry): Rename insert-anniversary-diary-entry.
Keep old name as alias.
(diary-insert-block-entry): Rename insert-block-diary-entry.
Keep old name as alias.
(diary-insert-cyclic-entry): Rename insert-cyclic-diary-entry.
Keep old name as alias.
(diary-fancy-font-lock-keywords): Rename fancy-diary-font-lock-keywords.
Keep old name as alias, update users.
(diary-fancy-display-mode): Rename fancy-diary-display-mode.
Keep old name as alias, update callers.
2008-04-06 20:53:14 +00:00
|
|
|
|
by the variable `diary-number-of-entries'. A value of ARG less than 1
|
2012-09-17 05:41:04 +00:00
|
|
|
|
does nothing. This function is suitable for execution in an init file."
|
1995-09-21 03:11:06 +00:00
|
|
|
|
(interactive "P")
|
(diary-check-diary-file): New function.
(diary, view-diary-entries, show-all-diary-entries)
(mark-diary-entries): Use it.
(view-other-diary-entries): Doc fix. Use `prefix-numeric-value'.
(diary-syntax-table, diary-attrtype-convert, diary-mail-days): Doc fix.
(diary-modified, d-file): No need to defvar (for compiler).
(list-diary-entries): No need for `let*' so use `let'.
(simple-diary-display): Use `diary-file' directly rather than
inheriting `d-file' from `list-diary-entries' caller.
(make-fancy-diary-buffer, show-all-diary-entries): `mode-line-format'
already buffer-local.
(diary-mail-addr): Set to the empty string (rather than nil) if
undefined, as per `user-mail-address'.
(diary-mail-entries): Doc fix. Error if `diary-mail-address' unset.
(mark-sexp-diary-entries): Don't regexp-quote sexp-mark twice.
Remove an un-needed `if'.
(list-sexp-diary-entries): Remove local vars mark and s-entry, and
use `let' rather than `let*'.
(diary-date, insert-monthly-diary-entry)
(insert-yearly-diary-entry, insert-anniversary-diary-entry)
(insert-block-diary-entry, insert-cyclic-diary-entry)
(font-lock-diary-date-forms): No need for `let*' so use `let'.
(make-diary-entry): Doc fix. Use `or' rather than `if'.
(diary-font-lock-keywords): Use `when'. `cal-islam' is required
feature, not `cal-islamic'.
`calendar-islamic-month-name-array-leap-year' does not exist - use
`calendar-islamic-month-name-array'.
2003-06-22 01:02:22 +00:00
|
|
|
|
(diary-check-diary-file)
|
2008-03-16 01:27:15 +00:00
|
|
|
|
(diary-list-entries (calendar-current-date)
|
|
|
|
|
(if arg (prefix-numeric-value arg))))
|
2005-09-12 21:21:42 +00:00
|
|
|
|
|
2008-03-13 05:54:57 +00:00
|
|
|
|
;;;###cal-autoload
|
2005-09-12 21:21:42 +00:00
|
|
|
|
(defun diary-view-entries (&optional arg)
|
1995-09-21 03:11:06 +00:00
|
|
|
|
"Prepare and display a buffer with diary entries.
|
2008-11-30 01:01:18 +00:00
|
|
|
|
Searches the file named in `diary-file' for entries that match
|
|
|
|
|
ARG days starting with the date indicated by the cursor position
|
1995-09-21 03:11:06 +00:00
|
|
|
|
in the displayed three-month calendar."
|
|
|
|
|
(interactive "p")
|
(diary-check-diary-file): New function.
(diary, view-diary-entries, show-all-diary-entries)
(mark-diary-entries): Use it.
(view-other-diary-entries): Doc fix. Use `prefix-numeric-value'.
(diary-syntax-table, diary-attrtype-convert, diary-mail-days): Doc fix.
(diary-modified, d-file): No need to defvar (for compiler).
(list-diary-entries): No need for `let*' so use `let'.
(simple-diary-display): Use `diary-file' directly rather than
inheriting `d-file' from `list-diary-entries' caller.
(make-fancy-diary-buffer, show-all-diary-entries): `mode-line-format'
already buffer-local.
(diary-mail-addr): Set to the empty string (rather than nil) if
undefined, as per `user-mail-address'.
(diary-mail-entries): Doc fix. Error if `diary-mail-address' unset.
(mark-sexp-diary-entries): Don't regexp-quote sexp-mark twice.
Remove an un-needed `if'.
(list-sexp-diary-entries): Remove local vars mark and s-entry, and
use `let' rather than `let*'.
(diary-date, insert-monthly-diary-entry)
(insert-yearly-diary-entry, insert-anniversary-diary-entry)
(insert-block-diary-entry, insert-cyclic-diary-entry)
(font-lock-diary-date-forms): No need for `let*' so use `let'.
(make-diary-entry): Doc fix. Use `or' rather than `if'.
(diary-font-lock-keywords): Use `when'. `cal-islam' is required
feature, not `cal-islamic'.
`calendar-islamic-month-name-array-leap-year' does not exist - use
`calendar-islamic-month-name-array'.
2003-06-22 01:02:22 +00:00
|
|
|
|
(diary-check-diary-file)
|
2005-09-12 21:21:42 +00:00
|
|
|
|
(diary-list-entries (calendar-cursor-to-date t) arg))
|
1995-09-21 03:11:06 +00:00
|
|
|
|
|
2008-03-26 03:26:43 +00:00
|
|
|
|
|
2008-03-13 05:54:57 +00:00
|
|
|
|
;;;###cal-autoload
|
(diary-sexp-entry-symbol): Rename sexp-diary-entry-symbol.
Keep old name as alias, update users.
(diary-list-entries-hook): Rename list-diary-entries-hook.
Keep old name as alias, update users.
(diary-mark-entries-hook): Rename mark-diary-entries-hook.
Keep old name as alias, update users.
(diary-nongregorian-listing-hook): Rename nongregorian-diary-listing-hook.
Keep old name as alias, update users.
(diary-nongregorian-marking-hook): Rename nongregorian-diary-marking-hook.
Keep old name as alias, update users.
(diary-print-entries-hook): Rename print-diary-entries-hook.
Keep old name as alias, update users.
(diary-abbreviated-year-flag): Rename abbreviated-calendar-year.
Keep old name as alias, update users.
(diary-number-of-entries): Rename number-of-diary-entries.
Keep old name as alias, update users.
(view-diary-entries, list-diary-entries, show-all-diary-entries):
Give version of obsolescence.
(diary-view-other-diary-entries): Rename view-other-diary-entries.
Keep old name as alias, update callers.
(diary-add-to-list): Rename add-to-diary-list. Keep old name as alias,
update callers.
(diary-include-other-diary-files): Rename include-other-diary-files.
Keep old name as alias, update callers.
(diary-simple-display): Rename simple-diary-display. Keep old name as alias,
update callers.
(diary-fancy-display): Rename fancy-diary-display. Keep old name as alias,
update callers.
(diary-print-entries): Rename print-diary-entries. Keep old name as alias,
update callers.
(diary-marking-entries-flag): Rename marking-diary-entries. Update users.
(diary-marking-entry-flag): Rename marking-diary-entry. Update users.
(diary-mark-entries): Rename mark-diary-entries. Keep old name as alias,
update callers.
(diary-mark-sexp-entries): Rename mark-sexp-diary-entries.
Keep old name as alias, update callers.
(diary-mark-included-diary-files): Rename mark-included-diary-files.
Keep old name as alias, update callers.
(calendar-mark-days-named): Rename mark-calendar-days-named.
Keep old name as alias, update callers.
(calendar-mark-month): Rename mark-calendar-month. Keep old name as alias,
update callers.
(calendar-mark-date-pattern): Rename mark-calendar-date-pattern.
Keep old name as alias, update callers.
(diary-sort-entries): Rename sort-diary-entries. Keep old name as alias,
update callers.
(diary-list-sexp-entries): Rename list-sexp-diary-entries.
Keep old name as alias, update callers.
(diary-make-entry): Rename make-diary-entry. Keep old name as alias,
update callers.
(diary-insert-entry): Rename insert-diary-entry. Keep old name as alias.
(diary-insert-weekly-entry): Rename insert-weekly-diary-entry.
Keep old name as alias.
(diary-insert-monthly-entry): Rename insert-monthly-diary-entry.
Keep old name as alias.
(diary-insert-yearly-entry): Rename insert-yearly-diary-entry.
Keep old name as alias.
(diary-insert-anniversary-entry): Rename insert-anniversary-diary-entry.
Keep old name as alias.
(diary-insert-block-entry): Rename insert-block-diary-entry.
Keep old name as alias.
(diary-insert-cyclic-entry): Rename insert-cyclic-diary-entry.
Keep old name as alias.
(diary-fancy-font-lock-keywords): Rename fancy-diary-font-lock-keywords.
Keep old name as alias, update users.
(diary-fancy-display-mode): Rename fancy-diary-display-mode.
Keep old name as alias, update callers.
2008-04-06 20:53:14 +00:00
|
|
|
|
(defun diary-view-other-diary-entries (arg dfile)
|
1995-09-21 03:11:06 +00:00
|
|
|
|
"Prepare and display buffer of diary entries from an alternative diary file.
|
(diary-check-diary-file): New function.
(diary, view-diary-entries, show-all-diary-entries)
(mark-diary-entries): Use it.
(view-other-diary-entries): Doc fix. Use `prefix-numeric-value'.
(diary-syntax-table, diary-attrtype-convert, diary-mail-days): Doc fix.
(diary-modified, d-file): No need to defvar (for compiler).
(list-diary-entries): No need for `let*' so use `let'.
(simple-diary-display): Use `diary-file' directly rather than
inheriting `d-file' from `list-diary-entries' caller.
(make-fancy-diary-buffer, show-all-diary-entries): `mode-line-format'
already buffer-local.
(diary-mail-addr): Set to the empty string (rather than nil) if
undefined, as per `user-mail-address'.
(diary-mail-entries): Doc fix. Error if `diary-mail-address' unset.
(mark-sexp-diary-entries): Don't regexp-quote sexp-mark twice.
Remove an un-needed `if'.
(list-sexp-diary-entries): Remove local vars mark and s-entry, and
use `let' rather than `let*'.
(diary-date, insert-monthly-diary-entry)
(insert-yearly-diary-entry, insert-anniversary-diary-entry)
(insert-block-diary-entry, insert-cyclic-diary-entry)
(font-lock-diary-date-forms): No need for `let*' so use `let'.
(make-diary-entry): Doc fix. Use `or' rather than `if'.
(diary-font-lock-keywords): Use `when'. `cal-islam' is required
feature, not `cal-islamic'.
`calendar-islamic-month-name-array-leap-year' does not exist - use
`calendar-islamic-month-name-array'.
2003-06-22 01:02:22 +00:00
|
|
|
|
Searches for entries that match ARG days, starting with the date indicated
|
|
|
|
|
by the cursor position in the displayed three-month calendar.
|
2008-03-16 01:27:15 +00:00
|
|
|
|
DFILE specifies the file to use as the diary file."
|
1995-09-21 03:11:06 +00:00
|
|
|
|
(interactive
|
2004-12-20 18:09:22 +00:00
|
|
|
|
(list (prefix-numeric-value current-prefix-arg)
|
1998-06-09 21:50:58 +00:00
|
|
|
|
(read-file-name "Enter diary file name: " default-directory nil t)))
|
2008-03-16 01:27:15 +00:00
|
|
|
|
(let ((diary-file dfile))
|
2006-04-22 00:11:11 +00:00
|
|
|
|
(diary-view-entries arg)))
|
1995-09-21 03:11:06 +00:00
|
|
|
|
|
2005-09-12 21:21:42 +00:00
|
|
|
|
(defvar diary-syntax-table
|
|
|
|
|
(let ((st (copy-syntax-table (standard-syntax-table))))
|
|
|
|
|
(modify-syntax-entry ?* "w" st)
|
|
|
|
|
(modify-syntax-entry ?: "w" st)
|
|
|
|
|
st)
|
1995-09-21 03:11:06 +00:00
|
|
|
|
"The syntax table used when parsing dates in the diary file.
|
|
|
|
|
It is the standard syntax table used in Fundamental mode, but with the
|
(diary-check-diary-file): New function.
(diary, view-diary-entries, show-all-diary-entries)
(mark-diary-entries): Use it.
(view-other-diary-entries): Doc fix. Use `prefix-numeric-value'.
(diary-syntax-table, diary-attrtype-convert, diary-mail-days): Doc fix.
(diary-modified, d-file): No need to defvar (for compiler).
(list-diary-entries): No need for `let*' so use `let'.
(simple-diary-display): Use `diary-file' directly rather than
inheriting `d-file' from `list-diary-entries' caller.
(make-fancy-diary-buffer, show-all-diary-entries): `mode-line-format'
already buffer-local.
(diary-mail-addr): Set to the empty string (rather than nil) if
undefined, as per `user-mail-address'.
(diary-mail-entries): Doc fix. Error if `diary-mail-address' unset.
(mark-sexp-diary-entries): Don't regexp-quote sexp-mark twice.
Remove an un-needed `if'.
(list-sexp-diary-entries): Remove local vars mark and s-entry, and
use `let' rather than `let*'.
(diary-date, insert-monthly-diary-entry)
(insert-yearly-diary-entry, insert-anniversary-diary-entry)
(insert-block-diary-entry, insert-cyclic-diary-entry)
(font-lock-diary-date-forms): No need for `let*' so use `let'.
(make-diary-entry): Doc fix. Use `or' rather than `if'.
(diary-font-lock-keywords): Use `when'. `cal-islam' is required
feature, not `cal-islamic'.
`calendar-islamic-month-name-array-leap-year' does not exist - use
`calendar-islamic-month-name-array'.
2003-06-22 01:02:22 +00:00
|
|
|
|
syntax of `*' and `:' changed to be word constituents.")
|
1995-09-21 03:11:06 +00:00
|
|
|
|
|
(diary-attrtype-convert): Convert an attribute value string to the desired type.
(diary-pull-attrs): New function that pulls the attributes off a diary entry,
merges with file-global attributes, and returns the (possibly modified) entry
and a list of attribute/values using diary-attrtype-convert above.
(list-diary-entries, fancy-diary-display, show-all-diary-entries)
(mark-diary-entries, mark-sexp-diary-entries, list-sexp-diary-entries): Add
handling of file-global attributes, add handling of entry attributes using
diary-pull-attrs above.
(mark-calendar-days-named, mark-calendar-days-named, mark-calendar-date-pattern)
(mark-calendar-month, add-to-diary-list): Add optional paramater `color' for
passing face attribute info through the callchain. Pass this parameter around.
2003-02-11 23:26:55 +00:00
|
|
|
|
(defun diary-attrtype-convert (attrvalue type)
|
(diary-check-diary-file): New function.
(diary, view-diary-entries, show-all-diary-entries)
(mark-diary-entries): Use it.
(view-other-diary-entries): Doc fix. Use `prefix-numeric-value'.
(diary-syntax-table, diary-attrtype-convert, diary-mail-days): Doc fix.
(diary-modified, d-file): No need to defvar (for compiler).
(list-diary-entries): No need for `let*' so use `let'.
(simple-diary-display): Use `diary-file' directly rather than
inheriting `d-file' from `list-diary-entries' caller.
(make-fancy-diary-buffer, show-all-diary-entries): `mode-line-format'
already buffer-local.
(diary-mail-addr): Set to the empty string (rather than nil) if
undefined, as per `user-mail-address'.
(diary-mail-entries): Doc fix. Error if `diary-mail-address' unset.
(mark-sexp-diary-entries): Don't regexp-quote sexp-mark twice.
Remove an un-needed `if'.
(list-sexp-diary-entries): Remove local vars mark and s-entry, and
use `let' rather than `let*'.
(diary-date, insert-monthly-diary-entry)
(insert-yearly-diary-entry, insert-anniversary-diary-entry)
(insert-block-diary-entry, insert-cyclic-diary-entry)
(font-lock-diary-date-forms): No need for `let*' so use `let'.
(make-diary-entry): Doc fix. Use `or' rather than `if'.
(diary-font-lock-keywords): Use `when'. `cal-islam' is required
feature, not `cal-islamic'.
`calendar-islamic-month-name-array-leap-year' does not exist - use
`calendar-islamic-month-name-array'.
2003-06-22 01:02:22 +00:00
|
|
|
|
"Convert string ATTRVALUE to TYPE appropriate for a face description.
|
|
|
|
|
Valid TYPEs are: string, symbol, int, stringtnil, tnil."
|
(diary-face-attrs): Fix custom :type.
(diary-face-attrs, diary-glob-file-regexp-prefix, diary-unknown-time)
(diary-pull-attrs, diary-header-line-flag, diary-list-entries)
(diary-unhide-everything, include-other-diary-files, diary-goto-entry)
(mark-included-diary-files, mark-calendar-days-named)
(mark-calendar-date-pattern, mark-calendar-month, diary-entry-compare)
(diary-remind, insert-diary-entry, insert-weekly-diary-entry)
(insert-monthly-diary-entry, insert-yearly-diary-entry)
(insert-anniversary-diary-entry, insert-block-diary-entry)
(insert-cyclic-diary-entry, fancy-diary-font-lock-keywords)
(diary-font-lock-sexps): Doc fixes.
(diary-remind-message, mark-calendar-month): Use zerop.
(diary-attrtype-convert, diary-pull-attrs): Simplify.
(diary-list-entries): Revert let to let* (previous change).
2008-03-10 02:44:51 +00:00
|
|
|
|
(cond ((eq type 'string) attrvalue)
|
2008-03-27 02:50:38 +00:00
|
|
|
|
((eq type 'symbol) (intern-soft attrvalue))
|
2008-03-13 06:29:28 +00:00
|
|
|
|
((eq type 'int) (string-to-number attrvalue))
|
|
|
|
|
((eq type 'stringtnil)
|
|
|
|
|
(cond ((string-equal "t" attrvalue) t)
|
|
|
|
|
((string-equal "nil" attrvalue) nil)
|
|
|
|
|
(t attrvalue)))
|
|
|
|
|
((eq type 'tnil) (string-equal "t" attrvalue))))
|
(diary-attrtype-convert): Convert an attribute value string to the desired type.
(diary-pull-attrs): New function that pulls the attributes off a diary entry,
merges with file-global attributes, and returns the (possibly modified) entry
and a list of attribute/values using diary-attrtype-convert above.
(list-diary-entries, fancy-diary-display, show-all-diary-entries)
(mark-diary-entries, mark-sexp-diary-entries, list-sexp-diary-entries): Add
handling of file-global attributes, add handling of entry attributes using
diary-pull-attrs above.
(mark-calendar-days-named, mark-calendar-days-named, mark-calendar-date-pattern)
(mark-calendar-month, add-to-diary-list): Add optional paramater `color' for
passing face attribute info through the callchain. Pass this parameter around.
2003-02-11 23:26:55 +00:00
|
|
|
|
|
|
|
|
|
(defun diary-pull-attrs (entry fileglobattrs)
|
(diary-face-attrs): Fix custom :type.
(diary-face-attrs, diary-glob-file-regexp-prefix, diary-unknown-time)
(diary-pull-attrs, diary-header-line-flag, diary-list-entries)
(diary-unhide-everything, include-other-diary-files, diary-goto-entry)
(mark-included-diary-files, mark-calendar-days-named)
(mark-calendar-date-pattern, mark-calendar-month, diary-entry-compare)
(diary-remind, insert-diary-entry, insert-weekly-diary-entry)
(insert-monthly-diary-entry, insert-yearly-diary-entry)
(insert-anniversary-diary-entry, insert-block-diary-entry)
(insert-cyclic-diary-entry, fancy-diary-font-lock-keywords)
(diary-font-lock-sexps): Doc fixes.
(diary-remind-message, mark-calendar-month): Use zerop.
(diary-attrtype-convert, diary-pull-attrs): Simplify.
(diary-list-entries): Revert let to let* (previous change).
2008-03-10 02:44:51 +00:00
|
|
|
|
"Search for matches for regexps from `diary-face-attrs'.
|
|
|
|
|
If ENTRY is nil, searches from the start of the current buffer, and
|
|
|
|
|
prepends all regexps with `diary-glob-file-regexp-prefix'.
|
|
|
|
|
If ENTRY is a string, search for matches in that string, and remove them.
|
|
|
|
|
Returns a list of ENTRY followed by (ATTRIBUTE VALUE) pairs.
|
|
|
|
|
When ENTRY is non-nil, FILEGLOBATTRS forms the start of the (ATTRIBUTE VALUE)
|
|
|
|
|
pairs."
|
2017-12-04 22:03:32 +00:00
|
|
|
|
(let (ret-attr)
|
(diary-face-attrs): Fix custom :type.
(diary-face-attrs, diary-glob-file-regexp-prefix, diary-unknown-time)
(diary-pull-attrs, diary-header-line-flag, diary-list-entries)
(diary-unhide-everything, include-other-diary-files, diary-goto-entry)
(mark-included-diary-files, mark-calendar-days-named)
(mark-calendar-date-pattern, mark-calendar-month, diary-entry-compare)
(diary-remind, insert-diary-entry, insert-weekly-diary-entry)
(insert-monthly-diary-entry, insert-yearly-diary-entry)
(insert-anniversary-diary-entry, insert-block-diary-entry)
(insert-cyclic-diary-entry, fancy-diary-font-lock-keywords)
(diary-font-lock-sexps): Doc fixes.
(diary-remind-message, mark-calendar-month): Use zerop.
(diary-attrtype-convert, diary-pull-attrs): Simplify.
(diary-list-entries): Revert let to let* (previous change).
2008-03-10 02:44:51 +00:00
|
|
|
|
(if (null entry)
|
2008-03-13 06:29:28 +00:00
|
|
|
|
(save-excursion
|
|
|
|
|
(dolist (attr diary-face-attrs)
|
|
|
|
|
;; FIXME inefficient searching.
|
|
|
|
|
(goto-char (point-min))
|
2017-12-04 22:03:32 +00:00
|
|
|
|
(let* ((regexp (concat diary-glob-file-regexp-prefix (car attr)))
|
|
|
|
|
(regnum (cadr attr))
|
|
|
|
|
(attrname (nth 2 attr))
|
|
|
|
|
(type (nth 3 attr))
|
|
|
|
|
(attrvalue (if (re-search-forward regexp nil t)
|
|
|
|
|
(match-string-no-properties regnum))))
|
|
|
|
|
(and attrvalue
|
|
|
|
|
(setq attrvalue (diary-attrtype-convert attrvalue type))
|
|
|
|
|
(setq ret-attr (append ret-attr
|
|
|
|
|
(list attrname attrvalue)))))))
|
(diary-face-attrs): Fix custom :type.
(diary-face-attrs, diary-glob-file-regexp-prefix, diary-unknown-time)
(diary-pull-attrs, diary-header-line-flag, diary-list-entries)
(diary-unhide-everything, include-other-diary-files, diary-goto-entry)
(mark-included-diary-files, mark-calendar-days-named)
(mark-calendar-date-pattern, mark-calendar-month, diary-entry-compare)
(diary-remind, insert-diary-entry, insert-weekly-diary-entry)
(insert-monthly-diary-entry, insert-yearly-diary-entry)
(insert-anniversary-diary-entry, insert-block-diary-entry)
(insert-cyclic-diary-entry, fancy-diary-font-lock-keywords)
(diary-font-lock-sexps): Doc fixes.
(diary-remind-message, mark-calendar-month): Use zerop.
(diary-attrtype-convert, diary-pull-attrs): Simplify.
(diary-list-entries): Revert let to let* (previous change).
2008-03-10 02:44:51 +00:00
|
|
|
|
(setq ret-attr fileglobattrs)
|
|
|
|
|
(dolist (attr diary-face-attrs)
|
2017-12-04 22:03:32 +00:00
|
|
|
|
(let ((regexp (car attr))
|
|
|
|
|
(regnum (cadr attr))
|
|
|
|
|
(attrname (nth 2 attr))
|
|
|
|
|
(type (nth 3 attr))
|
|
|
|
|
(attrvalue nil))
|
|
|
|
|
;; If multiple matches, replace all, use the last (which may
|
|
|
|
|
;; be the first instance in the line, if the regexp is
|
|
|
|
|
;; anchored with $).
|
|
|
|
|
(while (string-match regexp entry)
|
|
|
|
|
(setq attrvalue (match-string-no-properties regnum entry)
|
|
|
|
|
entry (replace-match "" t t entry)))
|
|
|
|
|
(and attrvalue
|
|
|
|
|
(setq attrvalue (diary-attrtype-convert attrvalue type))
|
|
|
|
|
(setq ret-attr (append ret-attr (list attrname attrvalue)))))))
|
(diary-face-attrs): Fix custom :type.
(diary-face-attrs, diary-glob-file-regexp-prefix, diary-unknown-time)
(diary-pull-attrs, diary-header-line-flag, diary-list-entries)
(diary-unhide-everything, include-other-diary-files, diary-goto-entry)
(mark-included-diary-files, mark-calendar-days-named)
(mark-calendar-date-pattern, mark-calendar-month, diary-entry-compare)
(diary-remind, insert-diary-entry, insert-weekly-diary-entry)
(insert-monthly-diary-entry, insert-yearly-diary-entry)
(insert-anniversary-diary-entry, insert-block-diary-entry)
(insert-cyclic-diary-entry, fancy-diary-font-lock-keywords)
(diary-font-lock-sexps): Doc fixes.
(diary-remind-message, mark-calendar-month): Use zerop.
(diary-attrtype-convert, diary-pull-attrs): Simplify.
(diary-list-entries): Revert let to let* (previous change).
2008-03-10 02:44:51 +00:00
|
|
|
|
(list entry ret-attr)))
|
2003-04-25 01:58:49 +00:00
|
|
|
|
|
2006-05-19 08:24:51 +00:00
|
|
|
|
(defvar diary-modify-entry-list-string-function nil
|
|
|
|
|
"Function applied to entry string before putting it into the entries list.
|
|
|
|
|
Can be used by programs integrating a diary list into other buffers (e.g.
|
|
|
|
|
org.el and planner.el) to modify the string or add properties to it.
|
|
|
|
|
The function takes a string argument and must return a string.")
|
|
|
|
|
|
2008-03-13 06:29:28 +00:00
|
|
|
|
(defvar diary-entries-list) ; bound in diary-list-entries
|
(diary-face-attrs): Fix custom :type.
(diary-face-attrs, diary-glob-file-regexp-prefix, diary-unknown-time)
(diary-pull-attrs, diary-header-line-flag, diary-list-entries)
(diary-unhide-everything, include-other-diary-files, diary-goto-entry)
(mark-included-diary-files, mark-calendar-days-named)
(mark-calendar-date-pattern, mark-calendar-month, diary-entry-compare)
(diary-remind, insert-diary-entry, insert-weekly-diary-entry)
(insert-monthly-diary-entry, insert-yearly-diary-entry)
(insert-anniversary-diary-entry, insert-block-diary-entry)
(insert-cyclic-diary-entry, fancy-diary-font-lock-keywords)
(diary-font-lock-sexps): Doc fixes.
(diary-remind-message, mark-calendar-month): Use zerop.
(diary-attrtype-convert, diary-pull-attrs): Simplify.
(diary-list-entries): Revert let to let* (previous change).
2008-03-10 02:44:51 +00:00
|
|
|
|
|
(diary-sexp-entry-symbol): Rename sexp-diary-entry-symbol.
Keep old name as alias, update users.
(diary-list-entries-hook): Rename list-diary-entries-hook.
Keep old name as alias, update users.
(diary-mark-entries-hook): Rename mark-diary-entries-hook.
Keep old name as alias, update users.
(diary-nongregorian-listing-hook): Rename nongregorian-diary-listing-hook.
Keep old name as alias, update users.
(diary-nongregorian-marking-hook): Rename nongregorian-diary-marking-hook.
Keep old name as alias, update users.
(diary-print-entries-hook): Rename print-diary-entries-hook.
Keep old name as alias, update users.
(diary-abbreviated-year-flag): Rename abbreviated-calendar-year.
Keep old name as alias, update users.
(diary-number-of-entries): Rename number-of-diary-entries.
Keep old name as alias, update users.
(view-diary-entries, list-diary-entries, show-all-diary-entries):
Give version of obsolescence.
(diary-view-other-diary-entries): Rename view-other-diary-entries.
Keep old name as alias, update callers.
(diary-add-to-list): Rename add-to-diary-list. Keep old name as alias,
update callers.
(diary-include-other-diary-files): Rename include-other-diary-files.
Keep old name as alias, update callers.
(diary-simple-display): Rename simple-diary-display. Keep old name as alias,
update callers.
(diary-fancy-display): Rename fancy-diary-display. Keep old name as alias,
update callers.
(diary-print-entries): Rename print-diary-entries. Keep old name as alias,
update callers.
(diary-marking-entries-flag): Rename marking-diary-entries. Update users.
(diary-marking-entry-flag): Rename marking-diary-entry. Update users.
(diary-mark-entries): Rename mark-diary-entries. Keep old name as alias,
update callers.
(diary-mark-sexp-entries): Rename mark-sexp-diary-entries.
Keep old name as alias, update callers.
(diary-mark-included-diary-files): Rename mark-included-diary-files.
Keep old name as alias, update callers.
(calendar-mark-days-named): Rename mark-calendar-days-named.
Keep old name as alias, update callers.
(calendar-mark-month): Rename mark-calendar-month. Keep old name as alias,
update callers.
(calendar-mark-date-pattern): Rename mark-calendar-date-pattern.
Keep old name as alias, update callers.
(diary-sort-entries): Rename sort-diary-entries. Keep old name as alias,
update callers.
(diary-list-sexp-entries): Rename list-sexp-diary-entries.
Keep old name as alias, update callers.
(diary-make-entry): Rename make-diary-entry. Keep old name as alias,
update callers.
(diary-insert-entry): Rename insert-diary-entry. Keep old name as alias.
(diary-insert-weekly-entry): Rename insert-weekly-diary-entry.
Keep old name as alias.
(diary-insert-monthly-entry): Rename insert-monthly-diary-entry.
Keep old name as alias.
(diary-insert-yearly-entry): Rename insert-yearly-diary-entry.
Keep old name as alias.
(diary-insert-anniversary-entry): Rename insert-anniversary-diary-entry.
Keep old name as alias.
(diary-insert-block-entry): Rename insert-block-diary-entry.
Keep old name as alias.
(diary-insert-cyclic-entry): Rename insert-cyclic-diary-entry.
Keep old name as alias.
(diary-fancy-font-lock-keywords): Rename fancy-diary-font-lock-keywords.
Keep old name as alias, update users.
(diary-fancy-display-mode): Rename fancy-diary-display-mode.
Keep old name as alias, update callers.
2008-04-06 20:53:14 +00:00
|
|
|
|
(defun diary-add-to-list (date string specifier &optional marker
|
2006-05-19 08:24:51 +00:00
|
|
|
|
globcolor literal)
|
|
|
|
|
"Add an entry to `diary-entries-list'.
|
2008-11-30 01:01:18 +00:00
|
|
|
|
Do nothing if DATE or STRING are nil. DATE is the (MONTH DAY
|
2006-05-19 08:24:51 +00:00
|
|
|
|
YEAR) for which the entry applies; STRING is the text of the
|
|
|
|
|
entry as it will appear in the diary (i.e. with any format
|
2006-05-19 08:42:50 +00:00
|
|
|
|
strings such as \"%d\" expanded); SPECIFIER is the date part of
|
2006-05-19 08:24:51 +00:00
|
|
|
|
the entry as it appears in the diary-file; LITERAL is the entry
|
2008-11-30 01:01:18 +00:00
|
|
|
|
as it appears in the diary-file (i.e. before expansion).
|
|
|
|
|
If LITERAL is nil, it is taken to be the same as STRING.
|
2006-05-19 08:24:51 +00:00
|
|
|
|
|
|
|
|
|
The entry is added to the list as (DATE STRING SPECIFIER LOCATOR
|
|
|
|
|
GLOBCOLOR), where LOCATOR has the form (MARKER FILENAME LITERAL),
|
2011-05-06 04:28:53 +00:00
|
|
|
|
FILENAME being the file containing the diary entry.
|
|
|
|
|
|
|
|
|
|
Modifies STRING using `diary-modify-entry-list-string-function', if non-nil.
|
|
|
|
|
Also removes the region between `diary-comment-start' and
|
|
|
|
|
`diary-comment-end', if the former is non-nil."
|
2006-05-19 08:24:51 +00:00
|
|
|
|
(when (and date string)
|
2010-09-29 04:19:30 +00:00
|
|
|
|
;; b-f-n is nil if we are visiting an include file in a temp-buffer.
|
2011-05-06 04:28:53 +00:00
|
|
|
|
(let ((dfile (or (buffer-file-name) diary-file))
|
|
|
|
|
cstart)
|
2010-09-29 04:19:30 +00:00
|
|
|
|
(if diary-file-name-prefix
|
|
|
|
|
(let ((prefix (funcall diary-file-name-prefix-function dfile)))
|
|
|
|
|
(or (string-equal prefix "")
|
|
|
|
|
(setq string (format "[%s] %s" prefix string)))))
|
|
|
|
|
(and diary-modify-entry-list-string-function
|
|
|
|
|
(setq string (funcall diary-modify-entry-list-string-function
|
|
|
|
|
string)))
|
2011-05-06 04:28:53 +00:00
|
|
|
|
(when (and diary-comment-start
|
|
|
|
|
(string-match (setq cstart (regexp-quote diary-comment-start))
|
|
|
|
|
string))
|
|
|
|
|
;; Preserve the value with the comments.
|
|
|
|
|
(or literal (setq literal string))
|
2011-05-07 01:20:47 +00:00
|
|
|
|
;; Handles multiple comments per entry, so long as each is on
|
|
|
|
|
;; a single line, and each line has no more than one comment.
|
2011-05-06 04:28:53 +00:00
|
|
|
|
(setq string (replace-regexp-in-string
|
2011-05-06 07:30:20 +00:00
|
|
|
|
(format "%s.*%s" cstart (regexp-quote diary-comment-end))
|
2011-05-06 04:28:53 +00:00
|
|
|
|
"" string)))
|
2010-09-29 04:19:30 +00:00
|
|
|
|
(setq diary-entries-list
|
|
|
|
|
(append diary-entries-list
|
|
|
|
|
(list (list date string specifier
|
|
|
|
|
(list marker dfile literal)
|
|
|
|
|
globcolor)))))))
|
2006-05-19 08:24:51 +00:00
|
|
|
|
|
2008-03-16 01:27:15 +00:00
|
|
|
|
(defun diary-list-entries-2 (date mark globattr list-only
|
2008-06-11 02:57:35 +00:00
|
|
|
|
&optional months symbol gdate)
|
2008-03-16 01:27:15 +00:00
|
|
|
|
"Internal subroutine of `diary-list-entries'.
|
|
|
|
|
Find diary entries applying to DATE, by searching from point-min for
|
|
|
|
|
each element of `diary-date-forms'. MARK indicates an entry is non-marking.
|
|
|
|
|
GLOBATTR is the list of global file attributes. If LIST-ONLY is
|
|
|
|
|
non-nil, don't change the buffer, only return a list of entries.
|
|
|
|
|
Optional array MONTHS replaces `calendar-month-name-array', and
|
|
|
|
|
means months cannot be abbreviated. Optional string SYMBOL marks diary
|
2008-06-11 02:57:35 +00:00
|
|
|
|
entries of the desired type. If DATE is not Gregorian, then the
|
|
|
|
|
Gregorian equivalent should be provided via GDATE. Returns non-nil if
|
|
|
|
|
any entries were found."
|
2008-04-07 01:59:37 +00:00
|
|
|
|
(let* ((month (calendar-extract-month date))
|
|
|
|
|
(day (calendar-extract-day date))
|
|
|
|
|
(year (calendar-extract-year date))
|
2008-03-16 01:27:15 +00:00
|
|
|
|
(calendar-month-name-array (or months calendar-month-name-array))
|
2017-12-04 22:03:32 +00:00
|
|
|
|
(case-fold-search t)
|
|
|
|
|
entry-found)
|
|
|
|
|
(calendar-dlet*
|
|
|
|
|
((dayname (format "%s\\|%s\\.?" (calendar-day-name date)
|
|
|
|
|
(calendar-day-name date 'abbrev)))
|
2008-03-16 01:27:15 +00:00
|
|
|
|
(monthname (format "\\*\\|%s%s" (calendar-month-name month)
|
|
|
|
|
(if months ""
|
|
|
|
|
(format "\\|%s\\.?"
|
|
|
|
|
(calendar-month-name month 'abbrev)))))
|
|
|
|
|
(month (format "\\*\\|0*%d" month))
|
|
|
|
|
(day (format "\\*\\|0*%d" day))
|
|
|
|
|
(year (format "\\*\\|0*%d%s" year
|
(diary-sexp-entry-symbol): Rename sexp-diary-entry-symbol.
Keep old name as alias, update users.
(diary-list-entries-hook): Rename list-diary-entries-hook.
Keep old name as alias, update users.
(diary-mark-entries-hook): Rename mark-diary-entries-hook.
Keep old name as alias, update users.
(diary-nongregorian-listing-hook): Rename nongregorian-diary-listing-hook.
Keep old name as alias, update users.
(diary-nongregorian-marking-hook): Rename nongregorian-diary-marking-hook.
Keep old name as alias, update users.
(diary-print-entries-hook): Rename print-diary-entries-hook.
Keep old name as alias, update users.
(diary-abbreviated-year-flag): Rename abbreviated-calendar-year.
Keep old name as alias, update users.
(diary-number-of-entries): Rename number-of-diary-entries.
Keep old name as alias, update users.
(view-diary-entries, list-diary-entries, show-all-diary-entries):
Give version of obsolescence.
(diary-view-other-diary-entries): Rename view-other-diary-entries.
Keep old name as alias, update callers.
(diary-add-to-list): Rename add-to-diary-list. Keep old name as alias,
update callers.
(diary-include-other-diary-files): Rename include-other-diary-files.
Keep old name as alias, update callers.
(diary-simple-display): Rename simple-diary-display. Keep old name as alias,
update callers.
(diary-fancy-display): Rename fancy-diary-display. Keep old name as alias,
update callers.
(diary-print-entries): Rename print-diary-entries. Keep old name as alias,
update callers.
(diary-marking-entries-flag): Rename marking-diary-entries. Update users.
(diary-marking-entry-flag): Rename marking-diary-entry. Update users.
(diary-mark-entries): Rename mark-diary-entries. Keep old name as alias,
update callers.
(diary-mark-sexp-entries): Rename mark-sexp-diary-entries.
Keep old name as alias, update callers.
(diary-mark-included-diary-files): Rename mark-included-diary-files.
Keep old name as alias, update callers.
(calendar-mark-days-named): Rename mark-calendar-days-named.
Keep old name as alias, update callers.
(calendar-mark-month): Rename mark-calendar-month. Keep old name as alias,
update callers.
(calendar-mark-date-pattern): Rename mark-calendar-date-pattern.
Keep old name as alias, update callers.
(diary-sort-entries): Rename sort-diary-entries. Keep old name as alias,
update callers.
(diary-list-sexp-entries): Rename list-sexp-diary-entries.
Keep old name as alias, update callers.
(diary-make-entry): Rename make-diary-entry. Keep old name as alias,
update callers.
(diary-insert-entry): Rename insert-diary-entry. Keep old name as alias.
(diary-insert-weekly-entry): Rename insert-weekly-diary-entry.
Keep old name as alias.
(diary-insert-monthly-entry): Rename insert-monthly-diary-entry.
Keep old name as alias.
(diary-insert-yearly-entry): Rename insert-yearly-diary-entry.
Keep old name as alias.
(diary-insert-anniversary-entry): Rename insert-anniversary-diary-entry.
Keep old name as alias.
(diary-insert-block-entry): Rename insert-block-diary-entry.
Keep old name as alias.
(diary-insert-cyclic-entry): Rename insert-cyclic-diary-entry.
Keep old name as alias.
(diary-fancy-font-lock-keywords): Rename fancy-diary-font-lock-keywords.
Keep old name as alias, update users.
(diary-fancy-display-mode): Rename fancy-diary-display-mode.
Keep old name as alias, update callers.
2008-04-06 20:53:14 +00:00
|
|
|
|
(if diary-abbreviated-year-flag
|
2008-03-16 01:27:15 +00:00
|
|
|
|
(format "\\|%02d" (% year 100))
|
2017-12-04 22:03:32 +00:00
|
|
|
|
""))))
|
|
|
|
|
(dolist (date-form diary-date-forms)
|
|
|
|
|
(let ((backup (when (eq (car date-form) 'backup)
|
|
|
|
|
(setq date-form (cdr date-form))
|
|
|
|
|
t))
|
|
|
|
|
;; date-form uses day etc as set above.
|
|
|
|
|
(regexp (format "^%s?%s\\(%s\\)" (regexp-quote mark)
|
|
|
|
|
(if symbol (regexp-quote symbol) "")
|
|
|
|
|
(mapconcat #'eval date-form "\\)\\(?:")))
|
|
|
|
|
entry-start date-start temp)
|
|
|
|
|
(goto-char (point-min))
|
|
|
|
|
(while (re-search-forward regexp nil t)
|
|
|
|
|
(if backup (re-search-backward "\\<" nil t))
|
|
|
|
|
;; regexp moves us past the end of date, onto the next line.
|
|
|
|
|
;; Trailing whitespace after date not allowed (see diary-file).
|
|
|
|
|
(if (and (bolp) (not (looking-at "[ \t]")))
|
|
|
|
|
;; Diary entry that consists only of date.
|
|
|
|
|
(backward-char 1)
|
|
|
|
|
;; Found a nonempty diary entry--make it
|
|
|
|
|
;; visible and add it to the list.
|
|
|
|
|
(setq date-start (line-end-position 0))
|
|
|
|
|
;; Actual entry starts on the next-line?
|
|
|
|
|
(if (looking-at "[ \t]*\n[ \t]") (forward-line 1))
|
|
|
|
|
(setq entry-found t
|
|
|
|
|
entry-start (point))
|
|
|
|
|
(forward-line 1)
|
|
|
|
|
(while (looking-at "[ \t]") ; continued entry
|
|
|
|
|
(forward-line 1))
|
|
|
|
|
(unless (and (eobp) (not (bolp)))
|
|
|
|
|
(backward-char 1))
|
|
|
|
|
(unless list-only
|
|
|
|
|
(remove-overlays date-start (point) 'invisible 'diary))
|
|
|
|
|
(setq temp (diary-pull-attrs
|
|
|
|
|
(buffer-substring-no-properties
|
|
|
|
|
entry-start (point))
|
|
|
|
|
globattr))
|
|
|
|
|
(diary-add-to-list
|
|
|
|
|
(or gdate date) (car temp)
|
|
|
|
|
(buffer-substring-no-properties
|
|
|
|
|
(1+ date-start) (1- entry-start))
|
|
|
|
|
(copy-marker entry-start) (cadr temp))))))
|
|
|
|
|
entry-found)))
|
2008-03-16 01:27:15 +00:00
|
|
|
|
|
|
|
|
|
(defvar original-date) ; from diary-list-entries
|
|
|
|
|
(defvar file-glob-attrs)
|
(diary-face-attrs, diary-glob-file-regexp-prefix, diary-selective-display)
(number-of-diary-entries, diary-list-entries, diary-goto-entry):
(list-sexp-diary-entries, diary-date, diary-block, diary-float)
(diary-anniversary, diary-cyclic)
(diary-fancy-font-lock-fontify-region-function): Doc fixes.
(diary-header-line-format): Change wording.
(diary-list-entries): Set `date-start' in let.
(include-other-diary-files, mark-included-diary-files): Use format.
(simple-diary-display, fancy-diary-display): Use cadr, unless.
(mark-diary-entries): Use 1+.
(mark-sexp-diary-entries, list-sexp-diary-entries): Use when.
(mark-calendar-month): Use dotimes.
(diary-list-entries-1, diary-mark-entries-1): New functions.
2008-03-15 03:03:08 +00:00
|
|
|
|
|
|
|
|
|
(defun diary-list-entries-1 (months symbol absfunc)
|
|
|
|
|
"List diary entries of a certain type.
|
|
|
|
|
MONTHS is an array of month names. SYMBOL marks diary entries of the type
|
|
|
|
|
in question. ABSFUNC is a function that converts absolute dates to dates
|
|
|
|
|
of the appropriate type."
|
2017-12-04 22:03:32 +00:00
|
|
|
|
(with-no-warnings (defvar number) (defvar list-only))
|
2008-03-16 01:27:15 +00:00
|
|
|
|
(let ((gdate original-date))
|
2017-12-04 22:03:32 +00:00
|
|
|
|
(dotimes (_ number)
|
2008-03-16 01:27:15 +00:00
|
|
|
|
(diary-list-entries-2
|
|
|
|
|
(funcall absfunc (calendar-absolute-from-gregorian gdate))
|
2008-06-11 02:57:35 +00:00
|
|
|
|
diary-nonmarking-symbol file-glob-attrs list-only months symbol gdate)
|
2008-03-16 01:27:15 +00:00
|
|
|
|
(setq gdate
|
|
|
|
|
(calendar-gregorian-from-absolute
|
|
|
|
|
(1+ (calendar-absolute-from-gregorian gdate))))))
|
|
|
|
|
(goto-char (point-min)))
|
(diary-face-attrs, diary-glob-file-regexp-prefix, diary-selective-display)
(number-of-diary-entries, diary-list-entries, diary-goto-entry):
(list-sexp-diary-entries, diary-date, diary-block, diary-float)
(diary-anniversary, diary-cyclic)
(diary-fancy-font-lock-fontify-region-function): Doc fixes.
(diary-header-line-format): Change wording.
(diary-list-entries): Set `date-start' in let.
(include-other-diary-files, mark-included-diary-files): Use format.
(simple-diary-display, fancy-diary-display): Use cadr, unless.
(mark-diary-entries): Use 1+.
(mark-sexp-diary-entries, list-sexp-diary-entries): Use when.
(mark-calendar-month): Use dotimes.
(diary-list-entries-1, diary-mark-entries-1): New functions.
2008-03-15 03:03:08 +00:00
|
|
|
|
|
2010-09-14 07:15:06 +00:00
|
|
|
|
(defvar diary-included-files nil
|
2011-06-25 22:22:47 +00:00
|
|
|
|
"List of any diary files included in the last call to `diary-list-entries'.
|
|
|
|
|
Or to `diary-mark-entries'.")
|
2010-09-14 07:15:06 +00:00
|
|
|
|
|
2017-12-04 22:03:32 +00:00
|
|
|
|
(defvar diary-saved-point) ; bound in diary-list-entries
|
|
|
|
|
(defvar diary-including)
|
2018-01-19 04:01:35 +00:00
|
|
|
|
(defvar diary--date-string) ; bound in diary-list-entries
|
2017-12-04 22:03:32 +00:00
|
|
|
|
|
2005-10-06 16:22:13 +00:00
|
|
|
|
(defun diary-list-entries (date number &optional list-only)
|
2005-09-12 21:21:42 +00:00
|
|
|
|
"Create and display a buffer containing the relevant lines in `diary-file'.
|
2011-05-10 02:22:55 +00:00
|
|
|
|
Selects entries for NUMBER days starting with date DATE. Hides any
|
|
|
|
|
other entries using overlays. If NUMBER is less than 1, this function
|
|
|
|
|
does nothing.
|
1995-09-21 03:11:06 +00:00
|
|
|
|
|
2010-09-15 02:34:39 +00:00
|
|
|
|
Returns a list of all relevant diary entries found.
|
2005-10-06 16:22:13 +00:00
|
|
|
|
The list entries have the form ((MONTH DAY YEAR) STRING SPECIFIER) where
|
|
|
|
|
\(MONTH DAY YEAR) is the date of the entry, STRING is the entry text, and
|
|
|
|
|
SPECIFIER is the applicability. If the variable `diary-list-include-blanks'
|
(diary-face-attrs, diary-glob-file-regexp-prefix, diary-selective-display)
(number-of-diary-entries, diary-list-entries, diary-goto-entry):
(list-sexp-diary-entries, diary-date, diary-block, diary-float)
(diary-anniversary, diary-cyclic)
(diary-fancy-font-lock-fontify-region-function): Doc fixes.
(diary-header-line-format): Change wording.
(diary-list-entries): Set `date-start' in let.
(include-other-diary-files, mark-included-diary-files): Use format.
(simple-diary-display, fancy-diary-display): Use cadr, unless.
(mark-diary-entries): Use 1+.
(mark-sexp-diary-entries, list-sexp-diary-entries): Use when.
(mark-calendar-month): Use dotimes.
(diary-list-entries-1, diary-mark-entries-1): New functions.
2008-03-15 03:03:08 +00:00
|
|
|
|
is non-nil, this list includes a dummy diary entry consisting of the empty
|
|
|
|
|
string for a date with no diary entries.
|
1995-09-21 03:11:06 +00:00
|
|
|
|
|
2011-05-10 02:22:55 +00:00
|
|
|
|
If producing entries for multiple dates (i.e., NUMBER > 1), then
|
|
|
|
|
this function normally returns the entries from any given diary
|
|
|
|
|
file in date order. The entries for any given day are in the
|
|
|
|
|
order in which they were found in the file, not necessarily in
|
|
|
|
|
time-of-day order. Note that any functions present on the
|
2010-09-15 02:34:39 +00:00
|
|
|
|
hooks (see below) may add entries, or change the order. For
|
|
|
|
|
example, `diary-include-other-diary-files' adds entries from any
|
|
|
|
|
include files that it finds to the end of the original list. The
|
|
|
|
|
entries from each file will be in date order, but the overall
|
2011-05-10 02:22:55 +00:00
|
|
|
|
list will not be. If you want the entire list to be in time
|
|
|
|
|
order, add `diary-sort-entries' to the end of `diary-list-entries-hook'.
|
2010-09-15 02:34:39 +00:00
|
|
|
|
|
2011-05-10 02:22:55 +00:00
|
|
|
|
After preparing the initial list, hooks run in this order:
|
1995-09-21 03:11:06 +00:00
|
|
|
|
|
2011-05-10 02:22:55 +00:00
|
|
|
|
`diary-nongregorian-listing-hook' runs for the main diary file,
|
|
|
|
|
and each included file. For example, this is the appropriate hook
|
|
|
|
|
to process Islamic entries in all diary files.
|
1995-09-21 03:11:06 +00:00
|
|
|
|
|
2011-05-10 02:22:55 +00:00
|
|
|
|
`diary-list-entries-hook' runs once only, for the main diary file.
|
|
|
|
|
For example, this is appropriate for sorting all the entries.
|
|
|
|
|
If not using include files, there is no difference from the previous
|
|
|
|
|
hook.
|
1995-09-21 03:11:06 +00:00
|
|
|
|
|
2011-05-10 02:22:55 +00:00
|
|
|
|
`diary-hook' runs last, after the diary is displayed.
|
2008-05-30 02:57:27 +00:00
|
|
|
|
This is used e.g. by `appt-check'.
|
2005-10-06 16:22:13 +00:00
|
|
|
|
|
2018-01-10 16:40:21 +00:00
|
|
|
|
Functions called by these hooks may use the variables `original-date'
|
|
|
|
|
and `number', which are the arguments with which this function was called.
|
|
|
|
|
Note that hook functions should _not_ use `date', but `original-date'.
|
|
|
|
|
\(Sexp diary entries may use `date' - see `diary-list-sexp-entries'.)
|
2008-03-09 03:42:20 +00:00
|
|
|
|
|
2008-05-30 02:57:27 +00:00
|
|
|
|
This function displays the list using `diary-display-function', unless
|
|
|
|
|
LIST-ONLY is non-nil, in which case it just returns the list."
|
2005-09-12 21:21:42 +00:00
|
|
|
|
(unless number
|
(diary-sexp-entry-symbol): Rename sexp-diary-entry-symbol.
Keep old name as alias, update users.
(diary-list-entries-hook): Rename list-diary-entries-hook.
Keep old name as alias, update users.
(diary-mark-entries-hook): Rename mark-diary-entries-hook.
Keep old name as alias, update users.
(diary-nongregorian-listing-hook): Rename nongregorian-diary-listing-hook.
Keep old name as alias, update users.
(diary-nongregorian-marking-hook): Rename nongregorian-diary-marking-hook.
Keep old name as alias, update users.
(diary-print-entries-hook): Rename print-diary-entries-hook.
Keep old name as alias, update users.
(diary-abbreviated-year-flag): Rename abbreviated-calendar-year.
Keep old name as alias, update users.
(diary-number-of-entries): Rename number-of-diary-entries.
Keep old name as alias, update users.
(view-diary-entries, list-diary-entries, show-all-diary-entries):
Give version of obsolescence.
(diary-view-other-diary-entries): Rename view-other-diary-entries.
Keep old name as alias, update callers.
(diary-add-to-list): Rename add-to-diary-list. Keep old name as alias,
update callers.
(diary-include-other-diary-files): Rename include-other-diary-files.
Keep old name as alias, update callers.
(diary-simple-display): Rename simple-diary-display. Keep old name as alias,
update callers.
(diary-fancy-display): Rename fancy-diary-display. Keep old name as alias,
update callers.
(diary-print-entries): Rename print-diary-entries. Keep old name as alias,
update callers.
(diary-marking-entries-flag): Rename marking-diary-entries. Update users.
(diary-marking-entry-flag): Rename marking-diary-entry. Update users.
(diary-mark-entries): Rename mark-diary-entries. Keep old name as alias,
update callers.
(diary-mark-sexp-entries): Rename mark-sexp-diary-entries.
Keep old name as alias, update callers.
(diary-mark-included-diary-files): Rename mark-included-diary-files.
Keep old name as alias, update callers.
(calendar-mark-days-named): Rename mark-calendar-days-named.
Keep old name as alias, update callers.
(calendar-mark-month): Rename mark-calendar-month. Keep old name as alias,
update callers.
(calendar-mark-date-pattern): Rename mark-calendar-date-pattern.
Keep old name as alias, update callers.
(diary-sort-entries): Rename sort-diary-entries. Keep old name as alias,
update callers.
(diary-list-sexp-entries): Rename list-sexp-diary-entries.
Keep old name as alias, update callers.
(diary-make-entry): Rename make-diary-entry. Keep old name as alias,
update callers.
(diary-insert-entry): Rename insert-diary-entry. Keep old name as alias.
(diary-insert-weekly-entry): Rename insert-weekly-diary-entry.
Keep old name as alias.
(diary-insert-monthly-entry): Rename insert-monthly-diary-entry.
Keep old name as alias.
(diary-insert-yearly-entry): Rename insert-yearly-diary-entry.
Keep old name as alias.
(diary-insert-anniversary-entry): Rename insert-anniversary-diary-entry.
Keep old name as alias.
(diary-insert-block-entry): Rename insert-block-diary-entry.
Keep old name as alias.
(diary-insert-cyclic-entry): Rename insert-cyclic-diary-entry.
Keep old name as alias.
(diary-fancy-font-lock-keywords): Rename fancy-diary-font-lock-keywords.
Keep old name as alias, update users.
(diary-fancy-display-mode): Rename fancy-diary-display-mode.
Keep old name as alias, update callers.
2008-04-06 20:53:14 +00:00
|
|
|
|
(setq number (if (vectorp diary-number-of-entries)
|
|
|
|
|
(aref diary-number-of-entries (calendar-day-of-week date))
|
|
|
|
|
diary-number-of-entries)))
|
2004-01-11 22:25:33 +00:00
|
|
|
|
(when (> number 0)
|
2008-04-02 03:34:23 +00:00
|
|
|
|
(let* ((original-date date) ; save for possible use in the hooks
|
2018-01-19 04:01:35 +00:00
|
|
|
|
(diary--date-string (calendar-date-string date))
|
2009-09-03 06:34:19 +00:00
|
|
|
|
(diary-buffer (find-buffer-visiting diary-file))
|
2011-06-25 22:33:29 +00:00
|
|
|
|
;; Dynamically bound in diary-include-files.
|
2010-09-29 04:10:34 +00:00
|
|
|
|
(d-incp (and (boundp 'diary-including) diary-including))
|
2010-09-29 04:19:30 +00:00
|
|
|
|
diary-entries-list file-glob-attrs temp-buff)
|
2010-09-29 04:10:34 +00:00
|
|
|
|
(unless d-incp
|
|
|
|
|
(setq diary-included-files nil)
|
|
|
|
|
(message "Preparing diary..."))
|
2010-09-29 04:19:30 +00:00
|
|
|
|
(unwind-protect
|
|
|
|
|
(with-current-buffer (or diary-buffer
|
|
|
|
|
(if list-only
|
|
|
|
|
(setq temp-buff (generate-new-buffer
|
|
|
|
|
" *diary-temp*"))
|
|
|
|
|
(find-file-noselect diary-file t)))
|
|
|
|
|
(if diary-buffer
|
|
|
|
|
(or (verify-visited-file-modtime diary-buffer)
|
|
|
|
|
(revert-buffer t t)))
|
|
|
|
|
(if temp-buff
|
|
|
|
|
;; If including, caller has already verified it is readable.
|
|
|
|
|
(insert-file-contents diary-file)
|
|
|
|
|
;; Setup things like the header-line-format and invisibility-spec.
|
|
|
|
|
(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
|
|
|
|
|
;; take effect. Unconditionally calling (diary-mode)
|
|
|
|
|
;; clobbers file local variables.
|
2017-11-26 06:45:41 +00:00
|
|
|
|
;; https://lists.gnu.org/r/emacs-pretest-bug/2007-03/msg00363.html
|
|
|
|
|
;; https://lists.gnu.org/r/emacs-pretest-bug/2007-04/msg00404.html
|
2010-09-29 04:19:30 +00:00
|
|
|
|
(if (eq major-mode 'diary-mode)
|
|
|
|
|
(setq header-line-format (and diary-header-line-flag
|
|
|
|
|
diary-header-line-format)))))
|
|
|
|
|
;; d-s-p is passed to the diary display function.
|
|
|
|
|
(let ((diary-saved-point (point)))
|
|
|
|
|
(save-excursion
|
|
|
|
|
(save-restriction
|
|
|
|
|
(widen) ; bug#5093
|
|
|
|
|
(setq file-glob-attrs (cadr (diary-pull-attrs nil "")))
|
|
|
|
|
(with-syntax-table diary-syntax-table
|
|
|
|
|
(goto-char (point-min))
|
|
|
|
|
(unless list-only
|
|
|
|
|
(let ((ol (make-overlay (point-min) (point-max) nil t nil)))
|
2020-12-07 15:45:46 +00:00
|
|
|
|
(setq-local diary-selective-display t)
|
2010-09-29 04:19:30 +00:00
|
|
|
|
(overlay-put ol 'invisible 'diary)
|
|
|
|
|
(overlay-put ol 'evaporate t)))
|
2017-12-04 22:03:32 +00:00
|
|
|
|
(dotimes (_ number)
|
2010-09-29 04:19:30 +00:00
|
|
|
|
(let ((sexp-found (diary-list-sexp-entries date))
|
|
|
|
|
(entry-found (diary-list-entries-2
|
|
|
|
|
date diary-nonmarking-symbol
|
|
|
|
|
file-glob-attrs list-only)))
|
|
|
|
|
(if diary-list-include-blanks
|
|
|
|
|
(or sexp-found entry-found
|
|
|
|
|
(diary-add-to-list date "" "" "" "")))
|
|
|
|
|
(setq date
|
|
|
|
|
(calendar-gregorian-from-absolute
|
|
|
|
|
(1+ (calendar-absolute-from-gregorian date)))))))
|
|
|
|
|
(goto-char (point-min))
|
2011-05-10 02:22:55 +00:00
|
|
|
|
;; Although it looks like list-entries-hook runs
|
|
|
|
|
;; every time, diary-include-other-diary-files
|
|
|
|
|
;; binds it to nil (essentially) when it runs
|
|
|
|
|
;; in included files.
|
2017-12-04 22:03:32 +00:00
|
|
|
|
(calendar-dlet* ((number number)
|
|
|
|
|
(list-only list-only))
|
|
|
|
|
(run-hooks 'diary-nongregorian-listing-hook
|
|
|
|
|
'diary-list-entries-hook))
|
2011-05-10 02:22:55 +00:00
|
|
|
|
;; We could make this explicit:
|
|
|
|
|
;;; (run-hooks 'diary-nongregorian-listing-hook)
|
|
|
|
|
;;; (if d-incp
|
|
|
|
|
;;; (diary-include-other-diary-files) ; recurse
|
|
|
|
|
;;; (run-hooks 'diary-list-entries-hook))
|
2010-09-29 04:19:30 +00:00
|
|
|
|
(unless list-only
|
2014-09-09 18:09:54 +00:00
|
|
|
|
;; Avoid M-x diary; M-x calendar; M-x diary
|
|
|
|
|
;; clobbering the calendar window.
|
|
|
|
|
;; FIXME this is not the right solution.
|
|
|
|
|
(let ((display-buffer-fallback-action
|
|
|
|
|
(list (delq
|
|
|
|
|
'display-buffer-in-previous-window
|
|
|
|
|
(copy-sequence
|
|
|
|
|
(car display-buffer-fallback-action))))))
|
2014-10-11 02:54:11 +00:00
|
|
|
|
(funcall diary-display-function)))
|
2018-01-10 16:40:21 +00:00
|
|
|
|
(calendar-dlet* ((number number)
|
|
|
|
|
(original-date original-date))
|
|
|
|
|
(run-hooks 'diary-hook))))))
|
2010-09-29 04:19:30 +00:00
|
|
|
|
(and temp-buff (buffer-name temp-buff) (kill-buffer temp-buff)))
|
|
|
|
|
(or d-incp (message "Preparing diary...done"))
|
|
|
|
|
diary-entries-list)))
|
1995-09-21 03:11:06 +00:00
|
|
|
|
|
2005-09-12 21:21:42 +00:00
|
|
|
|
(defun diary-unhide-everything ()
|
(diary-face-attrs): Fix custom :type.
(diary-face-attrs, diary-glob-file-regexp-prefix, diary-unknown-time)
(diary-pull-attrs, diary-header-line-flag, diary-list-entries)
(diary-unhide-everything, include-other-diary-files, diary-goto-entry)
(mark-included-diary-files, mark-calendar-days-named)
(mark-calendar-date-pattern, mark-calendar-month, diary-entry-compare)
(diary-remind, insert-diary-entry, insert-weekly-diary-entry)
(insert-monthly-diary-entry, insert-yearly-diary-entry)
(insert-anniversary-diary-entry, insert-block-diary-entry)
(insert-cyclic-diary-entry, fancy-diary-font-lock-keywords)
(diary-font-lock-sexps): Doc fixes.
(diary-remind-message, mark-calendar-month): Use zerop.
(diary-attrtype-convert, diary-pull-attrs): Simplify.
(diary-list-entries): Revert let to let* (previous change).
2008-03-10 02:44:51 +00:00
|
|
|
|
"Show all invisible text in the diary."
|
2005-10-06 16:22:13 +00:00
|
|
|
|
(kill-local-variable 'diary-selective-display)
|
2010-01-27 04:00:54 +00:00
|
|
|
|
(save-restriction ; bug#5477
|
|
|
|
|
(widen)
|
|
|
|
|
(remove-overlays (point-min) (point-max) 'invisible 'diary))
|
2005-09-12 21:21:42 +00:00
|
|
|
|
(kill-local-variable 'mode-line-format))
|
|
|
|
|
|
(diary-face-attrs): Fix custom :type.
(diary-face-attrs, diary-glob-file-regexp-prefix, diary-unknown-time)
(diary-pull-attrs, diary-header-line-flag, diary-list-entries)
(diary-unhide-everything, include-other-diary-files, diary-goto-entry)
(mark-included-diary-files, mark-calendar-days-named)
(mark-calendar-date-pattern, mark-calendar-month, diary-entry-compare)
(diary-remind, insert-diary-entry, insert-weekly-diary-entry)
(insert-monthly-diary-entry, insert-yearly-diary-entry)
(insert-anniversary-diary-entry, insert-block-diary-entry)
(insert-cyclic-diary-entry, fancy-diary-font-lock-keywords)
(diary-font-lock-sexps): Doc fixes.
(diary-remind-message, mark-calendar-month): Use zerop.
(diary-attrtype-convert, diary-pull-attrs): Simplify.
(diary-list-entries): Revert let to let* (previous change).
2008-03-10 02:44:51 +00:00
|
|
|
|
|
2011-06-25 22:22:47 +00:00
|
|
|
|
(defun diary-include-files (&optional mark)
|
|
|
|
|
"Process diary entries from included diary files.
|
|
|
|
|
By default, lists included entries, but if optional argument MARK is non-nil
|
|
|
|
|
marks entries instead.
|
2011-05-10 02:22:55 +00:00
|
|
|
|
For example, this enables you to share common diary files.
|
|
|
|
|
Specify include files using lines matching `diary-include-string', e.g.
|
|
|
|
|
#include \"filename\"
|
2011-06-25 22:22:47 +00:00
|
|
|
|
This is recursive; that is, included files may include other files."
|
1995-09-21 03:11:06 +00:00
|
|
|
|
(goto-char (point-min))
|
|
|
|
|
(while (re-search-forward
|
(diary-face-attrs, diary-glob-file-regexp-prefix, diary-selective-display)
(number-of-diary-entries, diary-list-entries, diary-goto-entry):
(list-sexp-diary-entries, diary-date, diary-block, diary-float)
(diary-anniversary, diary-cyclic)
(diary-fancy-font-lock-fontify-region-function): Doc fixes.
(diary-header-line-format): Change wording.
(diary-list-entries): Set `date-start' in let.
(include-other-diary-files, mark-included-diary-files): Use format.
(simple-diary-display, fancy-diary-display): Use cadr, unless.
(mark-diary-entries): Use 1+.
(mark-sexp-diary-entries, list-sexp-diary-entries): Use when.
(mark-calendar-month): Use dotimes.
(diary-list-entries-1, diary-mark-entries-1): New functions.
2008-03-15 03:03:08 +00:00
|
|
|
|
(format "^%s \"\\([^\"]*\\)\"" (regexp-quote diary-include-string))
|
1995-09-21 03:11:06 +00:00
|
|
|
|
nil t)
|
2009-09-03 06:34:19 +00:00
|
|
|
|
(let ((diary-file (match-string-no-properties 1))
|
2017-12-04 22:03:32 +00:00
|
|
|
|
(diary-mark-entries-hook #'diary-mark-included-diary-files)
|
|
|
|
|
(diary-list-entries-hook #'diary-include-other-diary-files)
|
2010-09-14 07:15:06 +00:00
|
|
|
|
(diary-including t)
|
2010-09-29 04:00:50 +00:00
|
|
|
|
diary-hook diary-list-include-blanks efile)
|
1995-09-21 03:11:06 +00:00
|
|
|
|
(if (file-exists-p diary-file)
|
|
|
|
|
(if (file-readable-p diary-file)
|
2010-09-29 04:10:34 +00:00
|
|
|
|
(if (member (setq efile (expand-file-name diary-file))
|
|
|
|
|
diary-included-files)
|
|
|
|
|
(error "Recursive diary include for %s" diary-file)
|
|
|
|
|
(setq diary-included-files
|
2011-06-25 22:22:47 +00:00
|
|
|
|
(append diary-included-files (list efile)))
|
|
|
|
|
(if mark
|
|
|
|
|
(diary-mark-entries)
|
2017-12-04 22:03:32 +00:00
|
|
|
|
;; FIXME: `diary-include-files' can be run from
|
|
|
|
|
;; diary-mark-entries-hook (via
|
|
|
|
|
;; diary-mark-included-diary-files) or from
|
|
|
|
|
;; diary-list-entries-hook (via
|
|
|
|
|
;; diary-include-other-diary-files). In the "list" case,
|
|
|
|
|
;; `number' is dynamically bound, but not in the "mark" case!
|
|
|
|
|
(with-no-warnings (defvar number))
|
2011-06-25 22:22:47 +00:00
|
|
|
|
(setq diary-entries-list
|
|
|
|
|
(append diary-entries-list
|
|
|
|
|
(diary-list-entries original-date number t)))))
|
2012-08-20 18:13:03 +00:00
|
|
|
|
(display-warning
|
2015-12-08 07:28:18 +00:00
|
|
|
|
'diary
|
2015-08-29 05:24:10 +00:00
|
|
|
|
(format-message "Can't read included diary file %s\n"
|
2015-12-08 07:28:18 +00:00
|
|
|
|
diary-file)
|
|
|
|
|
:error))
|
2012-08-20 18:13:03 +00:00
|
|
|
|
(display-warning
|
2015-12-08 07:28:18 +00:00
|
|
|
|
'diary
|
2015-08-29 05:24:10 +00:00
|
|
|
|
(format-message "Can't find included diary file %s\n"
|
2015-12-08 07:28:18 +00:00
|
|
|
|
diary-file)
|
|
|
|
|
:error))))
|
2008-03-13 06:29:28 +00:00
|
|
|
|
(goto-char (point-min)))
|
1995-09-21 03:11:06 +00:00
|
|
|
|
|
2011-06-25 22:22:47 +00:00
|
|
|
|
(defun diary-include-other-diary-files ()
|
|
|
|
|
"Add diary entries from included diary files to `diary-entries-list'.
|
|
|
|
|
To use, add this function to `diary-list-entries-hook'.
|
|
|
|
|
For details, see `diary-include-files'.
|
|
|
|
|
See also `diary-mark-included-diary-files'."
|
|
|
|
|
(diary-include-files))
|
|
|
|
|
|
2008-03-27 02:50:38 +00:00
|
|
|
|
(defun diary-display-no-entries ()
|
(diary-sexp-entry-symbol): Rename sexp-diary-entry-symbol.
Keep old name as alias, update users.
(diary-list-entries-hook): Rename list-diary-entries-hook.
Keep old name as alias, update users.
(diary-mark-entries-hook): Rename mark-diary-entries-hook.
Keep old name as alias, update users.
(diary-nongregorian-listing-hook): Rename nongregorian-diary-listing-hook.
Keep old name as alias, update users.
(diary-nongregorian-marking-hook): Rename nongregorian-diary-marking-hook.
Keep old name as alias, update users.
(diary-print-entries-hook): Rename print-diary-entries-hook.
Keep old name as alias, update users.
(diary-abbreviated-year-flag): Rename abbreviated-calendar-year.
Keep old name as alias, update users.
(diary-number-of-entries): Rename number-of-diary-entries.
Keep old name as alias, update users.
(view-diary-entries, list-diary-entries, show-all-diary-entries):
Give version of obsolescence.
(diary-view-other-diary-entries): Rename view-other-diary-entries.
Keep old name as alias, update callers.
(diary-add-to-list): Rename add-to-diary-list. Keep old name as alias,
update callers.
(diary-include-other-diary-files): Rename include-other-diary-files.
Keep old name as alias, update callers.
(diary-simple-display): Rename simple-diary-display. Keep old name as alias,
update callers.
(diary-fancy-display): Rename fancy-diary-display. Keep old name as alias,
update callers.
(diary-print-entries): Rename print-diary-entries. Keep old name as alias,
update callers.
(diary-marking-entries-flag): Rename marking-diary-entries. Update users.
(diary-marking-entry-flag): Rename marking-diary-entry. Update users.
(diary-mark-entries): Rename mark-diary-entries. Keep old name as alias,
update callers.
(diary-mark-sexp-entries): Rename mark-sexp-diary-entries.
Keep old name as alias, update callers.
(diary-mark-included-diary-files): Rename mark-included-diary-files.
Keep old name as alias, update callers.
(calendar-mark-days-named): Rename mark-calendar-days-named.
Keep old name as alias, update callers.
(calendar-mark-month): Rename mark-calendar-month. Keep old name as alias,
update callers.
(calendar-mark-date-pattern): Rename mark-calendar-date-pattern.
Keep old name as alias, update callers.
(diary-sort-entries): Rename sort-diary-entries. Keep old name as alias,
update callers.
(diary-list-sexp-entries): Rename list-sexp-diary-entries.
Keep old name as alias, update callers.
(diary-make-entry): Rename make-diary-entry. Keep old name as alias,
update callers.
(diary-insert-entry): Rename insert-diary-entry. Keep old name as alias.
(diary-insert-weekly-entry): Rename insert-weekly-diary-entry.
Keep old name as alias.
(diary-insert-monthly-entry): Rename insert-monthly-diary-entry.
Keep old name as alias.
(diary-insert-yearly-entry): Rename insert-yearly-diary-entry.
Keep old name as alias.
(diary-insert-anniversary-entry): Rename insert-anniversary-diary-entry.
Keep old name as alias.
(diary-insert-block-entry): Rename insert-block-diary-entry.
Keep old name as alias.
(diary-insert-cyclic-entry): Rename insert-cyclic-diary-entry.
Keep old name as alias.
(diary-fancy-font-lock-keywords): Rename fancy-diary-font-lock-keywords.
Keep old name as alias, update users.
(diary-fancy-display-mode): Rename fancy-diary-display-mode.
Keep old name as alias, update callers.
2008-04-06 20:53:14 +00:00
|
|
|
|
"Common subroutine of `diary-simple-display' and `diary-fancy-display'.
|
2008-03-27 02:50:38 +00:00
|
|
|
|
Handles the case where there are no diary entries.
|
|
|
|
|
Returns a cons (NOENTRIES . HOLIDAY-STRING)."
|
2008-04-07 01:59:37 +00:00
|
|
|
|
(let* ((holiday-list (if diary-show-holidays-flag
|
2008-03-27 02:50:38 +00:00
|
|
|
|
(calendar-check-holidays original-date)))
|
|
|
|
|
(hol-string (format "%s%s%s"
|
2018-01-19 04:01:35 +00:00
|
|
|
|
diary--date-string
|
2008-03-27 02:50:38 +00:00
|
|
|
|
(if holiday-list ": " "")
|
2017-12-04 22:03:32 +00:00
|
|
|
|
(mapconcat #'identity holiday-list "; ")))
|
2008-03-27 02:50:38 +00:00
|
|
|
|
(msg (format "No diary entries for %s" hol-string))
|
|
|
|
|
;; Empty list, or single item with no text.
|
|
|
|
|
;; FIXME multiple items with no text?
|
|
|
|
|
(noentries (or (not diary-entries-list)
|
|
|
|
|
(and (not (cdr diary-entries-list))
|
|
|
|
|
(string-equal "" (cadr
|
|
|
|
|
(car diary-entries-list)))))))
|
|
|
|
|
;; Inconsistency: whether or not the holidays are displayed in a
|
|
|
|
|
;; separate buffer depends on if there are diary entries.
|
|
|
|
|
(when noentries
|
|
|
|
|
(if (or (< (length msg) (frame-width))
|
|
|
|
|
(not holiday-list))
|
1996-01-25 00:52:17 +00:00
|
|
|
|
(message "%s" msg)
|
2008-03-27 02:50:38 +00:00
|
|
|
|
;; holiday-list which is too wide for a message gets a buffer.
|
2008-03-17 02:33:49 +00:00
|
|
|
|
(calendar-in-read-only-buffer holiday-buffer
|
2018-01-19 04:01:35 +00:00
|
|
|
|
(calendar-set-mode-line (format "Holidays for %s"
|
|
|
|
|
diary--date-string))
|
2017-12-04 22:03:32 +00:00
|
|
|
|
(insert (mapconcat #'identity holiday-list "\n")))
|
2018-01-19 04:01:35 +00:00
|
|
|
|
(message "No diary entries for %s" diary--date-string)))
|
2008-03-27 02:50:38 +00:00
|
|
|
|
(cons noentries hol-string)))
|
|
|
|
|
|
|
|
|
|
|
(diary-sexp-entry-symbol): Rename sexp-diary-entry-symbol.
Keep old name as alias, update users.
(diary-list-entries-hook): Rename list-diary-entries-hook.
Keep old name as alias, update users.
(diary-mark-entries-hook): Rename mark-diary-entries-hook.
Keep old name as alias, update users.
(diary-nongregorian-listing-hook): Rename nongregorian-diary-listing-hook.
Keep old name as alias, update users.
(diary-nongregorian-marking-hook): Rename nongregorian-diary-marking-hook.
Keep old name as alias, update users.
(diary-print-entries-hook): Rename print-diary-entries-hook.
Keep old name as alias, update users.
(diary-abbreviated-year-flag): Rename abbreviated-calendar-year.
Keep old name as alias, update users.
(diary-number-of-entries): Rename number-of-diary-entries.
Keep old name as alias, update users.
(view-diary-entries, list-diary-entries, show-all-diary-entries):
Give version of obsolescence.
(diary-view-other-diary-entries): Rename view-other-diary-entries.
Keep old name as alias, update callers.
(diary-add-to-list): Rename add-to-diary-list. Keep old name as alias,
update callers.
(diary-include-other-diary-files): Rename include-other-diary-files.
Keep old name as alias, update callers.
(diary-simple-display): Rename simple-diary-display. Keep old name as alias,
update callers.
(diary-fancy-display): Rename fancy-diary-display. Keep old name as alias,
update callers.
(diary-print-entries): Rename print-diary-entries. Keep old name as alias,
update callers.
(diary-marking-entries-flag): Rename marking-diary-entries. Update users.
(diary-marking-entry-flag): Rename marking-diary-entry. Update users.
(diary-mark-entries): Rename mark-diary-entries. Keep old name as alias,
update callers.
(diary-mark-sexp-entries): Rename mark-sexp-diary-entries.
Keep old name as alias, update callers.
(diary-mark-included-diary-files): Rename mark-included-diary-files.
Keep old name as alias, update callers.
(calendar-mark-days-named): Rename mark-calendar-days-named.
Keep old name as alias, update callers.
(calendar-mark-month): Rename mark-calendar-month. Keep old name as alias,
update callers.
(calendar-mark-date-pattern): Rename mark-calendar-date-pattern.
Keep old name as alias, update callers.
(diary-sort-entries): Rename sort-diary-entries. Keep old name as alias,
update callers.
(diary-list-sexp-entries): Rename list-sexp-diary-entries.
Keep old name as alias, update callers.
(diary-make-entry): Rename make-diary-entry. Keep old name as alias,
update callers.
(diary-insert-entry): Rename insert-diary-entry. Keep old name as alias.
(diary-insert-weekly-entry): Rename insert-weekly-diary-entry.
Keep old name as alias.
(diary-insert-monthly-entry): Rename insert-monthly-diary-entry.
Keep old name as alias.
(diary-insert-yearly-entry): Rename insert-yearly-diary-entry.
Keep old name as alias.
(diary-insert-anniversary-entry): Rename insert-anniversary-diary-entry.
Keep old name as alias.
(diary-insert-block-entry): Rename insert-block-diary-entry.
Keep old name as alias.
(diary-insert-cyclic-entry): Rename insert-cyclic-diary-entry.
Keep old name as alias.
(diary-fancy-font-lock-keywords): Rename fancy-diary-font-lock-keywords.
Keep old name as alias, update users.
(diary-fancy-display-mode): Rename fancy-diary-display-mode.
Keep old name as alias, update callers.
2008-04-06 20:53:14 +00:00
|
|
|
|
(defun diary-simple-display ()
|
2008-05-30 02:57:27 +00:00
|
|
|
|
"Display the diary buffer if there are any relevant entries or holidays.
|
|
|
|
|
Entries that do not apply are made invisible. Holidays are shown
|
|
|
|
|
in the mode line. This is an option for `diary-display-function'."
|
2008-03-27 02:50:38 +00:00
|
|
|
|
;; If selected window is dedicated (to the calendar), need a new one
|
|
|
|
|
;; to display the diary.
|
Do not call to `selected-window' where it is assumed by default.
Affected functions are `window-minibuffer-p', `window-dedicated-p',
`window-hscroll', `window-width', `window-height', `window-buffer',
`window-frame', `window-start', `window-point', `next-window'
and `window-display-table'.
* abbrev.el (abbrev--default-expand):
* bs.el (bs--show-with-configuration):
* buff-menu.el (Buffer-menu-mouse-select):
* calc/calc.el (calc):
* calendar/calendar.el (calendar-generate-window):
* calendar/diary-lib.el (diary-simple-display, diary-show-all-entries)
(diary-make-entry):
* comint.el (send-invisible, comint-dynamic-complete-filename)
(comint-dynamic-simple-complete, comint-dynamic-list-completions):
* completion.el (complete):
* dabbrev.el (dabbrev-expand, dabbrev--make-friend-buffer-list):
* disp-table.el (describe-current-display-table):
* doc-view.el (doc-view-insert-image):
* ebuff-menu.el (Electric-buffer-menu-mouse-select):
* ehelp.el (with-electric-help):
* emacs-lisp/easy-mmode.el (easy-mmode-define-navigation):
* emacs-lisp/edebug.el (edebug-two-window-p, edebug-pop-to-buffer):
* emacs-lisp/helper.el (Helper-help-scroller):
* emulation/cua-base.el (cua--post-command-handler-1):
* eshell/esh-mode.el (eshell-output-filter):
* ffap.el (ffap-gnus-wrapper):
* help-macro.el (make-help-screen):
* hilit-chg.el (highlight-compare-buffers):
* hippie-exp.el (hippie-expand, try-expand-dabbrev-visible):
* hl-line.el (global-hl-line-highlight):
* icomplete.el (icomplete-simple-completing-p):
* isearch.el (isearch-done):
* jit-lock.el (jit-lock-stealth-fontify):
* mail/rmailsum.el (rmail-summary-scroll-msg-up):
* lisp/mouse-drag.el (mouse-drag-should-do-col-scrolling):
* mpc.el (mpc-tagbrowser, mpc):
* net/rcirc.el (rcirc-any-buffer):
* play/gomoku.el (gomoku-max-width, gomoku-max-height):
* play/landmark.el (landmark-max-width, landmark-max-height):
* play/zone.el (zone):
* progmodes/compile.el (compilation-goto-locus):
* progmodes/ebrowse.el (ebrowse-view/find-file-and-search-pattern):
* progmodes/etags.el (find-tag-other-window):
* progmodes/fortran.el (fortran-column-ruler):
* progmodes/gdb-mi.el (gdb-mouse-toggle-breakpoint-fringe):
* progmodes/verilog-mode.el (verilog-point-text):
* reposition.el (reposition-window):
* rot13.el (toggle-rot13-mode):
* server.el (server-switch-buffer):
* shell.el (shell-dynamic-complete-command)
(shell-dynamic-complete-environment-variable):
* simple.el (insert-buffer, set-selective-display)
(delete-completion-window):
* speedbar.el (speedbar-timer-fn, speedbar-center-buffer-smartly)
(speedbar-recenter):
* startup.el (fancy-splash-head):
* textmodes/ispell.el (ispell-command-loop):
* textmodes/makeinfo.el (makeinfo-compilation-sentinel-region):
* tutorial.el (help-with-tutorial):
* vc/add-log.el (add-change-log-entry):
* vc/compare-w.el (compare-windows):
* vc/ediff-help.el (ediff-indent-help-message):
* vc/ediff-util.el (ediff-setup-control-buffer, ediff-position-region):
* vc/ediff-wind.el (ediff-skip-unsuitable-frames)
(ediff-setup-control-frame):
* vc/emerge.el (emerge-position-region):
* vc/pcvs-util.el (cvs-bury-buffer):
* window.el (walk-windows, mouse-autoselect-window-select):
* winner.el (winner-set-conf, winner-undo): Related users changed.
2013-08-05 14:26:57 +00:00
|
|
|
|
(let* ((pop-up-frames (or pop-up-frames (window-dedicated-p)))
|
2009-09-03 06:34:19 +00:00
|
|
|
|
(dbuff (find-buffer-visiting diary-file))
|
2008-03-27 02:50:38 +00:00
|
|
|
|
(empty (diary-display-no-entries)))
|
|
|
|
|
;; This may be too wide, but when simple diary is used there is
|
|
|
|
|
;; nowhere else for the holidays to go. Also, it is documented in
|
2008-04-07 01:59:37 +00:00
|
|
|
|
;; diary-show-holidays-flag that the holidays go in the mode-line.
|
2008-03-27 02:50:38 +00:00
|
|
|
|
;; FIXME however if there are no diary entries a separate buffer
|
|
|
|
|
;; is displayed - this is inconsistent.
|
|
|
|
|
(with-current-buffer dbuff
|
|
|
|
|
(calendar-set-mode-line (format "Diary for %s" (cdr empty))))
|
|
|
|
|
(unless (car empty) ; no entries
|
|
|
|
|
(with-current-buffer dbuff
|
2004-09-28 22:24:47 +00:00
|
|
|
|
(let ((window (display-buffer (current-buffer))))
|
(diary-face-attrs): Fix custom :type.
(diary-face-attrs, diary-glob-file-regexp-prefix, diary-unknown-time)
(diary-pull-attrs, diary-header-line-flag, diary-list-entries)
(diary-unhide-everything, include-other-diary-files, diary-goto-entry)
(mark-included-diary-files, mark-calendar-days-named)
(mark-calendar-date-pattern, mark-calendar-month, diary-entry-compare)
(diary-remind, insert-diary-entry, insert-weekly-diary-entry)
(insert-monthly-diary-entry, insert-yearly-diary-entry)
(insert-anniversary-diary-entry, insert-block-diary-entry)
(insert-cyclic-diary-entry, fancy-diary-font-lock-keywords)
(diary-font-lock-sexps): Doc fixes.
(diary-remind-message, mark-calendar-month): Use zerop.
(diary-attrtype-convert, diary-pull-attrs): Simplify.
(diary-list-entries): Revert let to let* (previous change).
2008-03-10 02:44:51 +00:00
|
|
|
|
;; d-s-p is passed from diary-list-entries.
|
2004-09-28 22:24:47 +00:00
|
|
|
|
(set-window-point window diary-saved-point)
|
2010-09-29 04:10:34 +00:00
|
|
|
|
(set-window-start window (point-min)))))))
|
1995-09-21 03:11:06 +00:00
|
|
|
|
|
2017-12-04 22:03:32 +00:00
|
|
|
|
(defvar diary-goto-entry-function #'diary-goto-entry
|
2013-06-18 16:05:01 +00:00
|
|
|
|
"Function called to jump to a diary entry.
|
|
|
|
|
Modes that require special handling of the included file
|
|
|
|
|
containing the diary entry can assign a suitable function to this
|
|
|
|
|
variable.")
|
|
|
|
|
|
|
|
|
|
(define-button-type 'diary-entry
|
|
|
|
|
'action (lambda (button) (funcall diary-goto-entry-function button))
|
2009-09-05 21:11:34 +00:00
|
|
|
|
'face 'diary-button 'help-echo "Find this diary entry"
|
|
|
|
|
'follow-link t)
|
2002-11-16 19:17:20 +00:00
|
|
|
|
|
|
|
|
|
(defun diary-goto-entry (button)
|
(diary-face-attrs, diary-glob-file-regexp-prefix, diary-selective-display)
(number-of-diary-entries, diary-list-entries, diary-goto-entry):
(list-sexp-diary-entries, diary-date, diary-block, diary-float)
(diary-anniversary, diary-cyclic)
(diary-fancy-font-lock-fontify-region-function): Doc fixes.
(diary-header-line-format): Change wording.
(diary-list-entries): Set `date-start' in let.
(include-other-diary-files, mark-included-diary-files): Use format.
(simple-diary-display, fancy-diary-display): Use cadr, unless.
(mark-diary-entries): Use 1+.
(mark-sexp-diary-entries, list-sexp-diary-entries): Use when.
(mark-calendar-month): Use dotimes.
(diary-list-entries-1, diary-mark-entries-1): New functions.
2008-03-15 03:03:08 +00:00
|
|
|
|
"Jump to the diary entry for the BUTTON at point."
|
2006-05-19 08:24:51 +00:00
|
|
|
|
(let* ((locator (button-get button 'locator))
|
|
|
|
|
(marker (car locator))
|
|
|
|
|
markbuf file)
|
|
|
|
|
;; If marker pointing to diary location is valid, use that.
|
|
|
|
|
(if (and marker (setq markbuf (marker-buffer marker)))
|
|
|
|
|
(progn
|
|
|
|
|
(pop-to-buffer markbuf)
|
|
|
|
|
(goto-char (marker-position marker)))
|
|
|
|
|
;; Marker is invalid (eg buffer has been killed).
|
|
|
|
|
(or (and (setq file (cadr locator))
|
|
|
|
|
(file-exists-p file)
|
|
|
|
|
(find-file-other-window file)
|
|
|
|
|
(progn
|
2009-08-28 03:18:49 +00:00
|
|
|
|
(when (eq major-mode (default-value 'major-mode)) (diary-mode))
|
2006-05-19 08:24:51 +00:00
|
|
|
|
(goto-char (point-min))
|
|
|
|
|
(if (re-search-forward (format "%s.*\\(%s\\)"
|
|
|
|
|
(regexp-quote (nth 2 locator))
|
|
|
|
|
(regexp-quote (nth 3 locator)))
|
|
|
|
|
nil t)
|
|
|
|
|
(goto-char (match-beginning 1)))))
|
|
|
|
|
(message "Unable to locate this diary entry")))))
|
2002-11-16 19:17:20 +00:00
|
|
|
|
|
2017-12-04 22:03:32 +00:00
|
|
|
|
(defvar displayed-year) ; bound in calendar-generate
|
|
|
|
|
(defvar displayed-month)
|
|
|
|
|
|
(diary-sexp-entry-symbol): Rename sexp-diary-entry-symbol.
Keep old name as alias, update users.
(diary-list-entries-hook): Rename list-diary-entries-hook.
Keep old name as alias, update users.
(diary-mark-entries-hook): Rename mark-diary-entries-hook.
Keep old name as alias, update users.
(diary-nongregorian-listing-hook): Rename nongregorian-diary-listing-hook.
Keep old name as alias, update users.
(diary-nongregorian-marking-hook): Rename nongregorian-diary-marking-hook.
Keep old name as alias, update users.
(diary-print-entries-hook): Rename print-diary-entries-hook.
Keep old name as alias, update users.
(diary-abbreviated-year-flag): Rename abbreviated-calendar-year.
Keep old name as alias, update users.
(diary-number-of-entries): Rename number-of-diary-entries.
Keep old name as alias, update users.
(view-diary-entries, list-diary-entries, show-all-diary-entries):
Give version of obsolescence.
(diary-view-other-diary-entries): Rename view-other-diary-entries.
Keep old name as alias, update callers.
(diary-add-to-list): Rename add-to-diary-list. Keep old name as alias,
update callers.
(diary-include-other-diary-files): Rename include-other-diary-files.
Keep old name as alias, update callers.
(diary-simple-display): Rename simple-diary-display. Keep old name as alias,
update callers.
(diary-fancy-display): Rename fancy-diary-display. Keep old name as alias,
update callers.
(diary-print-entries): Rename print-diary-entries. Keep old name as alias,
update callers.
(diary-marking-entries-flag): Rename marking-diary-entries. Update users.
(diary-marking-entry-flag): Rename marking-diary-entry. Update users.
(diary-mark-entries): Rename mark-diary-entries. Keep old name as alias,
update callers.
(diary-mark-sexp-entries): Rename mark-sexp-diary-entries.
Keep old name as alias, update callers.
(diary-mark-included-diary-files): Rename mark-included-diary-files.
Keep old name as alias, update callers.
(calendar-mark-days-named): Rename mark-calendar-days-named.
Keep old name as alias, update callers.
(calendar-mark-month): Rename mark-calendar-month. Keep old name as alias,
update callers.
(calendar-mark-date-pattern): Rename mark-calendar-date-pattern.
Keep old name as alias, update callers.
(diary-sort-entries): Rename sort-diary-entries. Keep old name as alias,
update callers.
(diary-list-sexp-entries): Rename list-sexp-diary-entries.
Keep old name as alias, update callers.
(diary-make-entry): Rename make-diary-entry. Keep old name as alias,
update callers.
(diary-insert-entry): Rename insert-diary-entry. Keep old name as alias.
(diary-insert-weekly-entry): Rename insert-weekly-diary-entry.
Keep old name as alias.
(diary-insert-monthly-entry): Rename insert-monthly-diary-entry.
Keep old name as alias.
(diary-insert-yearly-entry): Rename insert-yearly-diary-entry.
Keep old name as alias.
(diary-insert-anniversary-entry): Rename insert-anniversary-diary-entry.
Keep old name as alias.
(diary-insert-block-entry): Rename insert-block-diary-entry.
Keep old name as alias.
(diary-insert-cyclic-entry): Rename insert-cyclic-diary-entry.
Keep old name as alias.
(diary-fancy-font-lock-keywords): Rename fancy-diary-font-lock-keywords.
Keep old name as alias, update users.
(diary-fancy-display-mode): Rename fancy-diary-display-mode.
Keep old name as alias, update callers.
2008-04-06 20:53:14 +00:00
|
|
|
|
(defun diary-fancy-display ()
|
1995-09-21 03:11:06 +00:00
|
|
|
|
"Prepare a diary buffer with relevant entries in a fancy, noneditable form.
|
2008-05-30 02:57:27 +00:00
|
|
|
|
Holidays are shown unless `diary-show-holidays-flag' is nil.
|
|
|
|
|
Days with no diary entries are not shown (even if that day is a
|
|
|
|
|
holiday), unless `diary-list-include-blanks' is non-nil.
|
|
|
|
|
|
|
|
|
|
This is an option for `diary-display-function'."
|
(diary-face-attrs): Fix custom :type.
(diary-face-attrs, diary-glob-file-regexp-prefix, diary-unknown-time)
(diary-pull-attrs, diary-header-line-flag, diary-list-entries)
(diary-unhide-everything, include-other-diary-files, diary-goto-entry)
(mark-included-diary-files, mark-calendar-days-named)
(mark-calendar-date-pattern, mark-calendar-month, diary-entry-compare)
(diary-remind, insert-diary-entry, insert-weekly-diary-entry)
(insert-monthly-diary-entry, insert-yearly-diary-entry)
(insert-anniversary-diary-entry, insert-block-diary-entry)
(insert-cyclic-diary-entry, fancy-diary-font-lock-keywords)
(diary-font-lock-sexps): Doc fixes.
(diary-remind-message, mark-calendar-month): Use zerop.
(diary-attrtype-convert, diary-pull-attrs): Simplify.
(diary-list-entries): Revert let to let* (previous change).
2008-03-10 02:44:51 +00:00
|
|
|
|
;; Turn off selective-display in the diary file's buffer.
|
2009-09-03 06:34:19 +00:00
|
|
|
|
(with-current-buffer (find-buffer-visiting diary-file)
|
2005-09-12 21:21:42 +00:00
|
|
|
|
(diary-unhide-everything))
|
2008-03-27 02:50:38 +00:00
|
|
|
|
(unless (car (diary-display-no-entries)) ; no entries
|
(diary-face-attrs): Fix custom :type.
(diary-face-attrs, diary-glob-file-regexp-prefix, diary-unknown-time)
(diary-pull-attrs, diary-header-line-flag, diary-list-entries)
(diary-unhide-everything, include-other-diary-files, diary-goto-entry)
(mark-included-diary-files, mark-calendar-days-named)
(mark-calendar-date-pattern, mark-calendar-month, diary-entry-compare)
(diary-remind, insert-diary-entry, insert-weekly-diary-entry)
(insert-monthly-diary-entry, insert-yearly-diary-entry)
(insert-anniversary-diary-entry, insert-block-diary-entry)
(insert-cyclic-diary-entry, fancy-diary-font-lock-keywords)
(diary-font-lock-sexps): Doc fixes.
(diary-remind-message, mark-calendar-month): Use zerop.
(diary-attrtype-convert, diary-pull-attrs): Simplify.
(diary-list-entries): Revert let to let* (previous change).
2008-03-10 02:44:51 +00:00
|
|
|
|
;; Prepare the fancy diary buffer.
|
2008-04-07 01:59:37 +00:00
|
|
|
|
(calendar-in-read-only-buffer diary-fancy-buffer
|
2008-03-17 02:33:49 +00:00
|
|
|
|
(calendar-set-mode-line "Diary Entries")
|
2008-03-27 02:50:38 +00:00
|
|
|
|
(let ((holiday-list-last-month 1)
|
1995-09-21 03:11:06 +00:00
|
|
|
|
(holiday-list-last-year 1)
|
2008-03-27 02:50:38 +00:00
|
|
|
|
(date (list 0 0 0))
|
|
|
|
|
holiday-list)
|
|
|
|
|
(dolist (entry diary-entries-list)
|
(diary-face-attrs, diary-glob-file-regexp-prefix, diary-selective-display)
(number-of-diary-entries, diary-list-entries, diary-goto-entry):
(list-sexp-diary-entries, diary-date, diary-block, diary-float)
(diary-anniversary, diary-cyclic)
(diary-fancy-font-lock-fontify-region-function): Doc fixes.
(diary-header-line-format): Change wording.
(diary-list-entries): Set `date-start' in let.
(include-other-diary-files, mark-included-diary-files): Use format.
(simple-diary-display, fancy-diary-display): Use cadr, unless.
(mark-diary-entries): Use 1+.
(mark-sexp-diary-entries, list-sexp-diary-entries): Use when.
(mark-calendar-month): Use dotimes.
(diary-list-entries-1, diary-mark-entries-1): New functions.
2008-03-15 03:03:08 +00:00
|
|
|
|
(unless (calendar-date-equal date (car entry))
|
|
|
|
|
(setq date (car entry))
|
2008-04-07 01:59:37 +00:00
|
|
|
|
(and diary-show-holidays-flag
|
(diary-face-attrs, diary-glob-file-regexp-prefix, diary-selective-display)
(number-of-diary-entries, diary-list-entries, diary-goto-entry):
(list-sexp-diary-entries, diary-date, diary-block, diary-float)
(diary-anniversary, diary-cyclic)
(diary-fancy-font-lock-fontify-region-function): Doc fixes.
(diary-header-line-format): Change wording.
(diary-list-entries): Set `date-start' in let.
(include-other-diary-files, mark-included-diary-files): Use format.
(simple-diary-display, fancy-diary-display): Use cadr, unless.
(mark-diary-entries): Use 1+.
(mark-sexp-diary-entries, list-sexp-diary-entries): Use when.
(mark-calendar-month): Use dotimes.
(diary-list-entries-1, diary-mark-entries-1): New functions.
2008-03-15 03:03:08 +00:00
|
|
|
|
(calendar-date-compare
|
|
|
|
|
(list (list holiday-list-last-month
|
|
|
|
|
(calendar-last-day-of-month
|
|
|
|
|
holiday-list-last-month
|
|
|
|
|
holiday-list-last-year)
|
|
|
|
|
holiday-list-last-year))
|
|
|
|
|
(list date))
|
|
|
|
|
;; We need to get the holidays for the next 3 months.
|
|
|
|
|
(setq holiday-list-last-month
|
2008-04-07 01:59:37 +00:00
|
|
|
|
(calendar-extract-month date)
|
(diary-face-attrs, diary-glob-file-regexp-prefix, diary-selective-display)
(number-of-diary-entries, diary-list-entries, diary-goto-entry):
(list-sexp-diary-entries, diary-date, diary-block, diary-float)
(diary-anniversary, diary-cyclic)
(diary-fancy-font-lock-fontify-region-function): Doc fixes.
(diary-header-line-format): Change wording.
(diary-list-entries): Set `date-start' in let.
(include-other-diary-files, mark-included-diary-files): Use format.
(simple-diary-display, fancy-diary-display): Use cadr, unless.
(mark-diary-entries): Use 1+.
(mark-sexp-diary-entries, list-sexp-diary-entries): Use when.
(mark-calendar-month): Use dotimes.
(diary-list-entries-1, diary-mark-entries-1): New functions.
2008-03-15 03:03:08 +00:00
|
|
|
|
holiday-list-last-year
|
2008-04-07 01:59:37 +00:00
|
|
|
|
(calendar-extract-year date))
|
(diary-face-attrs, diary-glob-file-regexp-prefix, diary-selective-display)
(number-of-diary-entries, diary-list-entries, diary-goto-entry):
(list-sexp-diary-entries, diary-date, diary-block, diary-float)
(diary-anniversary, diary-cyclic)
(diary-fancy-font-lock-fontify-region-function): Doc fixes.
(diary-header-line-format): Change wording.
(diary-list-entries): Set `date-start' in let.
(include-other-diary-files, mark-included-diary-files): Use format.
(simple-diary-display, fancy-diary-display): Use cadr, unless.
(mark-diary-entries): Use 1+.
(mark-sexp-diary-entries, list-sexp-diary-entries): Use when.
(mark-calendar-month): Use dotimes.
(diary-list-entries-1, diary-mark-entries-1): New functions.
2008-03-15 03:03:08 +00:00
|
|
|
|
(progn
|
2008-04-07 01:59:37 +00:00
|
|
|
|
(calendar-increment-month
|
(diary-face-attrs, diary-glob-file-regexp-prefix, diary-selective-display)
(number-of-diary-entries, diary-list-entries, diary-goto-entry):
(list-sexp-diary-entries, diary-date, diary-block, diary-float)
(diary-anniversary, diary-cyclic)
(diary-fancy-font-lock-fontify-region-function): Doc fixes.
(diary-header-line-format): Change wording.
(diary-list-entries): Set `date-start' in let.
(include-other-diary-files, mark-included-diary-files): Use format.
(simple-diary-display, fancy-diary-display): Use cadr, unless.
(mark-diary-entries): Use 1+.
(mark-sexp-diary-entries, list-sexp-diary-entries): Use when.
(mark-calendar-month): Use dotimes.
(diary-list-entries-1, diary-mark-entries-1): New functions.
2008-03-15 03:03:08 +00:00
|
|
|
|
holiday-list-last-month holiday-list-last-year 1)
|
|
|
|
|
t)
|
|
|
|
|
(setq holiday-list
|
|
|
|
|
(let ((displayed-month holiday-list-last-month)
|
|
|
|
|
(displayed-year holiday-list-last-year))
|
|
|
|
|
(calendar-holiday-list)))
|
2008-04-07 01:59:37 +00:00
|
|
|
|
(calendar-increment-month
|
(diary-face-attrs, diary-glob-file-regexp-prefix, diary-selective-display)
(number-of-diary-entries, diary-list-entries, diary-goto-entry):
(list-sexp-diary-entries, diary-date, diary-block, diary-float)
(diary-anniversary, diary-cyclic)
(diary-fancy-font-lock-fontify-region-function): Doc fixes.
(diary-header-line-format): Change wording.
(diary-list-entries): Set `date-start' in let.
(include-other-diary-files, mark-included-diary-files): Use format.
(simple-diary-display, fancy-diary-display): Use cadr, unless.
(mark-diary-entries): Use 1+.
(mark-sexp-diary-entries, list-sexp-diary-entries): Use when.
(mark-calendar-month): Use dotimes.
(diary-list-entries-1, diary-mark-entries-1): New functions.
2008-03-15 03:03:08 +00:00
|
|
|
|
holiday-list-last-month holiday-list-last-year 1))
|
2008-04-02 03:34:23 +00:00
|
|
|
|
(let ((longest 0)
|
|
|
|
|
date-holiday-list cc)
|
(diary-face-attrs, diary-glob-file-regexp-prefix, diary-selective-display)
(number-of-diary-entries, diary-list-entries, diary-goto-entry):
(list-sexp-diary-entries, diary-date, diary-block, diary-float)
(diary-anniversary, diary-cyclic)
(diary-fancy-font-lock-fontify-region-function): Doc fixes.
(diary-header-line-format): Change wording.
(diary-list-entries): Set `date-start' in let.
(include-other-diary-files, mark-included-diary-files): Use format.
(simple-diary-display, fancy-diary-display): Use cadr, unless.
(mark-diary-entries): Use 1+.
(mark-sexp-diary-entries, list-sexp-diary-entries): Use when.
(mark-calendar-month): Use dotimes.
(diary-list-entries-1, diary-mark-entries-1): New functions.
2008-03-15 03:03:08 +00:00
|
|
|
|
;; Make a list of all holidays for date.
|
|
|
|
|
(dolist (h holiday-list)
|
|
|
|
|
(if (calendar-date-equal date (car h))
|
|
|
|
|
(setq date-holiday-list (append date-holiday-list
|
|
|
|
|
(cdr h)))))
|
2020-10-13 02:10:43 +00:00
|
|
|
|
(insert (if (bobp) "" ?\n)
|
|
|
|
|
(propertize (calendar-date-string date)
|
|
|
|
|
'font-lock-face 'diary))
|
(diary-face-attrs, diary-glob-file-regexp-prefix, diary-selective-display)
(number-of-diary-entries, diary-list-entries, diary-goto-entry):
(list-sexp-diary-entries, diary-date, diary-block, diary-float)
(diary-anniversary, diary-cyclic)
(diary-fancy-font-lock-fontify-region-function): Doc fixes.
(diary-header-line-format): Change wording.
(diary-list-entries): Set `date-start' in let.
(include-other-diary-files, mark-included-diary-files): Use format.
(simple-diary-display, fancy-diary-display): Use cadr, unless.
(mark-diary-entries): Use 1+.
(mark-sexp-diary-entries, list-sexp-diary-entries): Use when.
(mark-calendar-month): Use dotimes.
(diary-list-entries-1, diary-mark-entries-1): New functions.
2008-03-15 03:03:08 +00:00
|
|
|
|
(if date-holiday-list (insert ": "))
|
2008-04-02 03:34:23 +00:00
|
|
|
|
(setq cc (current-column))
|
|
|
|
|
(insert (mapconcat (lambda (x)
|
|
|
|
|
(setq longest (max longest (length x)))
|
|
|
|
|
x)
|
|
|
|
|
date-holiday-list
|
|
|
|
|
(concat "\n" (make-string cc ?\s))))
|
2020-10-13 02:10:43 +00:00
|
|
|
|
(insert ?\n
|
|
|
|
|
(propertize (make-string (+ cc longest) ?=)
|
|
|
|
|
'font-lock-face 'diary)
|
|
|
|
|
?\n)))
|
2008-03-13 06:29:28 +00:00
|
|
|
|
(let ((this-entry (cadr entry))
|
2008-04-02 03:34:23 +00:00
|
|
|
|
this-loc marks temp-face)
|
2008-03-13 06:29:28 +00:00
|
|
|
|
(unless (zerop (length this-entry))
|
|
|
|
|
(if (setq this-loc (nth 3 entry))
|
2009-09-05 21:11:34 +00:00
|
|
|
|
(insert-button this-entry
|
2008-03-13 06:29:28 +00:00
|
|
|
|
;; (MARKER FILENAME SPECIFIER LITERAL)
|
|
|
|
|
'locator (list (car this-loc)
|
|
|
|
|
(cadr this-loc)
|
|
|
|
|
(nth 2 entry)
|
|
|
|
|
(or (nth 2 this-loc)
|
|
|
|
|
(nth 1 entry)))
|
|
|
|
|
:type 'diary-entry)
|
2009-09-05 21:11:34 +00:00
|
|
|
|
(insert this-entry))
|
|
|
|
|
(insert ?\n)
|
2009-02-08 01:52:26 +00:00
|
|
|
|
;; Doesn't make sense to check font-lock-mode - see
|
|
|
|
|
;; comments above diary-entry-marker in calendar.el.
|
|
|
|
|
(and ; font-lock-mode
|
2008-04-02 03:34:23 +00:00
|
|
|
|
(setq marks (nth 4 entry))
|
|
|
|
|
(save-excursion
|
|
|
|
|
(setq temp-face (calendar-make-temp-face marks))
|
|
|
|
|
(search-backward this-entry)
|
|
|
|
|
(overlay-put
|
|
|
|
|
(make-overlay (match-beginning 0) (match-end 0))
|
|
|
|
|
'face temp-face)))))))
|
2009-09-24 03:26:51 +00:00
|
|
|
|
;; FIXME can't remember what this check was for.
|
|
|
|
|
;; To prevent something looping, or a minor optimization?
|
|
|
|
|
(if (eq major-mode 'diary-fancy-display-mode)
|
|
|
|
|
(run-hooks 'diary-fancy-display-mode-hook)
|
|
|
|
|
(diary-fancy-display-mode))
|
2018-01-19 04:01:35 +00:00
|
|
|
|
(calendar-set-mode-line diary--date-string))))
|
1995-09-21 03:11:06 +00:00
|
|
|
|
|
2008-03-17 02:33:49 +00:00
|
|
|
|
;; FIXME modernize?
|
(diary-sexp-entry-symbol): Rename sexp-diary-entry-symbol.
Keep old name as alias, update users.
(diary-list-entries-hook): Rename list-diary-entries-hook.
Keep old name as alias, update users.
(diary-mark-entries-hook): Rename mark-diary-entries-hook.
Keep old name as alias, update users.
(diary-nongregorian-listing-hook): Rename nongregorian-diary-listing-hook.
Keep old name as alias, update users.
(diary-nongregorian-marking-hook): Rename nongregorian-diary-marking-hook.
Keep old name as alias, update users.
(diary-print-entries-hook): Rename print-diary-entries-hook.
Keep old name as alias, update users.
(diary-abbreviated-year-flag): Rename abbreviated-calendar-year.
Keep old name as alias, update users.
(diary-number-of-entries): Rename number-of-diary-entries.
Keep old name as alias, update users.
(view-diary-entries, list-diary-entries, show-all-diary-entries):
Give version of obsolescence.
(diary-view-other-diary-entries): Rename view-other-diary-entries.
Keep old name as alias, update callers.
(diary-add-to-list): Rename add-to-diary-list. Keep old name as alias,
update callers.
(diary-include-other-diary-files): Rename include-other-diary-files.
Keep old name as alias, update callers.
(diary-simple-display): Rename simple-diary-display. Keep old name as alias,
update callers.
(diary-fancy-display): Rename fancy-diary-display. Keep old name as alias,
update callers.
(diary-print-entries): Rename print-diary-entries. Keep old name as alias,
update callers.
(diary-marking-entries-flag): Rename marking-diary-entries. Update users.
(diary-marking-entry-flag): Rename marking-diary-entry. Update users.
(diary-mark-entries): Rename mark-diary-entries. Keep old name as alias,
update callers.
(diary-mark-sexp-entries): Rename mark-sexp-diary-entries.
Keep old name as alias, update callers.
(diary-mark-included-diary-files): Rename mark-included-diary-files.
Keep old name as alias, update callers.
(calendar-mark-days-named): Rename mark-calendar-days-named.
Keep old name as alias, update callers.
(calendar-mark-month): Rename mark-calendar-month. Keep old name as alias,
update callers.
(calendar-mark-date-pattern): Rename mark-calendar-date-pattern.
Keep old name as alias, update callers.
(diary-sort-entries): Rename sort-diary-entries. Keep old name as alias,
update callers.
(diary-list-sexp-entries): Rename list-sexp-diary-entries.
Keep old name as alias, update callers.
(diary-make-entry): Rename make-diary-entry. Keep old name as alias,
update callers.
(diary-insert-entry): Rename insert-diary-entry. Keep old name as alias.
(diary-insert-weekly-entry): Rename insert-weekly-diary-entry.
Keep old name as alias.
(diary-insert-monthly-entry): Rename insert-monthly-diary-entry.
Keep old name as alias.
(diary-insert-yearly-entry): Rename insert-yearly-diary-entry.
Keep old name as alias.
(diary-insert-anniversary-entry): Rename insert-anniversary-diary-entry.
Keep old name as alias.
(diary-insert-block-entry): Rename insert-block-diary-entry.
Keep old name as alias.
(diary-insert-cyclic-entry): Rename insert-cyclic-diary-entry.
Keep old name as alias.
(diary-fancy-font-lock-keywords): Rename fancy-diary-font-lock-keywords.
Keep old name as alias, update users.
(diary-fancy-display-mode): Rename fancy-diary-display-mode.
Keep old name as alias, update callers.
2008-04-06 20:53:14 +00:00
|
|
|
|
(defun diary-print-entries ()
|
1995-09-21 03:11:06 +00:00
|
|
|
|
"Print a hard copy of the diary display.
|
|
|
|
|
|
|
|
|
|
If the simple diary display is being used, prepare a temp buffer with the
|
|
|
|
|
visible lines of the diary buffer, add a heading line composed from the mode
|
|
|
|
|
line, print the temp buffer, and destroy it.
|
|
|
|
|
|
|
|
|
|
If the fancy diary display is being used, just print the buffer.
|
|
|
|
|
|
(diary-sexp-entry-symbol): Rename sexp-diary-entry-symbol.
Keep old name as alias, update users.
(diary-list-entries-hook): Rename list-diary-entries-hook.
Keep old name as alias, update users.
(diary-mark-entries-hook): Rename mark-diary-entries-hook.
Keep old name as alias, update users.
(diary-nongregorian-listing-hook): Rename nongregorian-diary-listing-hook.
Keep old name as alias, update users.
(diary-nongregorian-marking-hook): Rename nongregorian-diary-marking-hook.
Keep old name as alias, update users.
(diary-print-entries-hook): Rename print-diary-entries-hook.
Keep old name as alias, update users.
(diary-abbreviated-year-flag): Rename abbreviated-calendar-year.
Keep old name as alias, update users.
(diary-number-of-entries): Rename number-of-diary-entries.
Keep old name as alias, update users.
(view-diary-entries, list-diary-entries, show-all-diary-entries):
Give version of obsolescence.
(diary-view-other-diary-entries): Rename view-other-diary-entries.
Keep old name as alias, update callers.
(diary-add-to-list): Rename add-to-diary-list. Keep old name as alias,
update callers.
(diary-include-other-diary-files): Rename include-other-diary-files.
Keep old name as alias, update callers.
(diary-simple-display): Rename simple-diary-display. Keep old name as alias,
update callers.
(diary-fancy-display): Rename fancy-diary-display. Keep old name as alias,
update callers.
(diary-print-entries): Rename print-diary-entries. Keep old name as alias,
update callers.
(diary-marking-entries-flag): Rename marking-diary-entries. Update users.
(diary-marking-entry-flag): Rename marking-diary-entry. Update users.
(diary-mark-entries): Rename mark-diary-entries. Keep old name as alias,
update callers.
(diary-mark-sexp-entries): Rename mark-sexp-diary-entries.
Keep old name as alias, update callers.
(diary-mark-included-diary-files): Rename mark-included-diary-files.
Keep old name as alias, update callers.
(calendar-mark-days-named): Rename mark-calendar-days-named.
Keep old name as alias, update callers.
(calendar-mark-month): Rename mark-calendar-month. Keep old name as alias,
update callers.
(calendar-mark-date-pattern): Rename mark-calendar-date-pattern.
Keep old name as alias, update callers.
(diary-sort-entries): Rename sort-diary-entries. Keep old name as alias,
update callers.
(diary-list-sexp-entries): Rename list-sexp-diary-entries.
Keep old name as alias, update callers.
(diary-make-entry): Rename make-diary-entry. Keep old name as alias,
update callers.
(diary-insert-entry): Rename insert-diary-entry. Keep old name as alias.
(diary-insert-weekly-entry): Rename insert-weekly-diary-entry.
Keep old name as alias.
(diary-insert-monthly-entry): Rename insert-monthly-diary-entry.
Keep old name as alias.
(diary-insert-yearly-entry): Rename insert-yearly-diary-entry.
Keep old name as alias.
(diary-insert-anniversary-entry): Rename insert-anniversary-diary-entry.
Keep old name as alias.
(diary-insert-block-entry): Rename insert-block-diary-entry.
Keep old name as alias.
(diary-insert-cyclic-entry): Rename insert-cyclic-diary-entry.
Keep old name as alias.
(diary-fancy-font-lock-keywords): Rename fancy-diary-font-lock-keywords.
Keep old name as alias, update users.
(diary-fancy-display-mode): Rename fancy-diary-display-mode.
Keep old name as alias, update callers.
2008-04-06 20:53:14 +00:00
|
|
|
|
The hooks given by the variable `diary-print-entries-hook' are called to do
|
1995-09-21 03:11:06 +00:00
|
|
|
|
the actual printing."
|
|
|
|
|
(interactive)
|
2008-04-07 01:59:37 +00:00
|
|
|
|
(let ((diary-buffer (get-buffer diary-fancy-buffer))
|
2008-04-02 03:34:23 +00:00
|
|
|
|
temp-buffer heading start end)
|
|
|
|
|
(if diary-buffer
|
|
|
|
|
(with-current-buffer diary-buffer
|
(diary-sexp-entry-symbol): Rename sexp-diary-entry-symbol.
Keep old name as alias, update users.
(diary-list-entries-hook): Rename list-diary-entries-hook.
Keep old name as alias, update users.
(diary-mark-entries-hook): Rename mark-diary-entries-hook.
Keep old name as alias, update users.
(diary-nongregorian-listing-hook): Rename nongregorian-diary-listing-hook.
Keep old name as alias, update users.
(diary-nongregorian-marking-hook): Rename nongregorian-diary-marking-hook.
Keep old name as alias, update users.
(diary-print-entries-hook): Rename print-diary-entries-hook.
Keep old name as alias, update users.
(diary-abbreviated-year-flag): Rename abbreviated-calendar-year.
Keep old name as alias, update users.
(diary-number-of-entries): Rename number-of-diary-entries.
Keep old name as alias, update users.
(view-diary-entries, list-diary-entries, show-all-diary-entries):
Give version of obsolescence.
(diary-view-other-diary-entries): Rename view-other-diary-entries.
Keep old name as alias, update callers.
(diary-add-to-list): Rename add-to-diary-list. Keep old name as alias,
update callers.
(diary-include-other-diary-files): Rename include-other-diary-files.
Keep old name as alias, update callers.
(diary-simple-display): Rename simple-diary-display. Keep old name as alias,
update callers.
(diary-fancy-display): Rename fancy-diary-display. Keep old name as alias,
update callers.
(diary-print-entries): Rename print-diary-entries. Keep old name as alias,
update callers.
(diary-marking-entries-flag): Rename marking-diary-entries. Update users.
(diary-marking-entry-flag): Rename marking-diary-entry. Update users.
(diary-mark-entries): Rename mark-diary-entries. Keep old name as alias,
update callers.
(diary-mark-sexp-entries): Rename mark-sexp-diary-entries.
Keep old name as alias, update callers.
(diary-mark-included-diary-files): Rename mark-included-diary-files.
Keep old name as alias, update callers.
(calendar-mark-days-named): Rename mark-calendar-days-named.
Keep old name as alias, update callers.
(calendar-mark-month): Rename mark-calendar-month. Keep old name as alias,
update callers.
(calendar-mark-date-pattern): Rename mark-calendar-date-pattern.
Keep old name as alias, update callers.
(diary-sort-entries): Rename sort-diary-entries. Keep old name as alias,
update callers.
(diary-list-sexp-entries): Rename list-sexp-diary-entries.
Keep old name as alias, update callers.
(diary-make-entry): Rename make-diary-entry. Keep old name as alias,
update callers.
(diary-insert-entry): Rename insert-diary-entry. Keep old name as alias.
(diary-insert-weekly-entry): Rename insert-weekly-diary-entry.
Keep old name as alias.
(diary-insert-monthly-entry): Rename insert-monthly-diary-entry.
Keep old name as alias.
(diary-insert-yearly-entry): Rename insert-yearly-diary-entry.
Keep old name as alias.
(diary-insert-anniversary-entry): Rename insert-anniversary-diary-entry.
Keep old name as alias.
(diary-insert-block-entry): Rename insert-block-diary-entry.
Keep old name as alias.
(diary-insert-cyclic-entry): Rename insert-cyclic-diary-entry.
Keep old name as alias.
(diary-fancy-font-lock-keywords): Rename fancy-diary-font-lock-keywords.
Keep old name as alias, update users.
(diary-fancy-display-mode): Rename fancy-diary-display-mode.
Keep old name as alias, update callers.
2008-04-06 20:53:14 +00:00
|
|
|
|
(run-hooks 'diary-print-entries-hook))
|
2009-09-03 06:34:19 +00:00
|
|
|
|
(or (setq diary-buffer (find-buffer-visiting diary-file))
|
2008-04-02 03:34:23 +00:00
|
|
|
|
(error "You don't have a diary buffer!"))
|
|
|
|
|
;; Name affects printing?
|
|
|
|
|
(setq temp-buffer (get-buffer-create " *Printable Diary Entries*"))
|
|
|
|
|
(with-current-buffer diary-buffer
|
|
|
|
|
(setq heading
|
|
|
|
|
(if (not (stringp mode-line-format))
|
|
|
|
|
"All Diary Entries"
|
|
|
|
|
(string-match "^-*\\([^-].*[^-]\\)-*$" mode-line-format)
|
|
|
|
|
(match-string 1 mode-line-format))
|
|
|
|
|
start (point-min))
|
|
|
|
|
(while
|
|
|
|
|
(progn
|
|
|
|
|
(setq end (next-single-char-property-change start 'invisible))
|
|
|
|
|
(unless (get-char-property start 'invisible)
|
|
|
|
|
(with-current-buffer temp-buffer
|
|
|
|
|
(insert-buffer-substring diary-buffer start end)))
|
|
|
|
|
(setq start end)
|
|
|
|
|
(and end (< end (point-max))))))
|
|
|
|
|
(set-buffer temp-buffer)
|
|
|
|
|
(goto-char (point-min))
|
|
|
|
|
(insert heading "\n"
|
|
|
|
|
(make-string (length heading) ?=) "\n")
|
(diary-sexp-entry-symbol): Rename sexp-diary-entry-symbol.
Keep old name as alias, update users.
(diary-list-entries-hook): Rename list-diary-entries-hook.
Keep old name as alias, update users.
(diary-mark-entries-hook): Rename mark-diary-entries-hook.
Keep old name as alias, update users.
(diary-nongregorian-listing-hook): Rename nongregorian-diary-listing-hook.
Keep old name as alias, update users.
(diary-nongregorian-marking-hook): Rename nongregorian-diary-marking-hook.
Keep old name as alias, update users.
(diary-print-entries-hook): Rename print-diary-entries-hook.
Keep old name as alias, update users.
(diary-abbreviated-year-flag): Rename abbreviated-calendar-year.
Keep old name as alias, update users.
(diary-number-of-entries): Rename number-of-diary-entries.
Keep old name as alias, update users.
(view-diary-entries, list-diary-entries, show-all-diary-entries):
Give version of obsolescence.
(diary-view-other-diary-entries): Rename view-other-diary-entries.
Keep old name as alias, update callers.
(diary-add-to-list): Rename add-to-diary-list. Keep old name as alias,
update callers.
(diary-include-other-diary-files): Rename include-other-diary-files.
Keep old name as alias, update callers.
(diary-simple-display): Rename simple-diary-display. Keep old name as alias,
update callers.
(diary-fancy-display): Rename fancy-diary-display. Keep old name as alias,
update callers.
(diary-print-entries): Rename print-diary-entries. Keep old name as alias,
update callers.
(diary-marking-entries-flag): Rename marking-diary-entries. Update users.
(diary-marking-entry-flag): Rename marking-diary-entry. Update users.
(diary-mark-entries): Rename mark-diary-entries. Keep old name as alias,
update callers.
(diary-mark-sexp-entries): Rename mark-sexp-diary-entries.
Keep old name as alias, update callers.
(diary-mark-included-diary-files): Rename mark-included-diary-files.
Keep old name as alias, update callers.
(calendar-mark-days-named): Rename mark-calendar-days-named.
Keep old name as alias, update callers.
(calendar-mark-month): Rename mark-calendar-month. Keep old name as alias,
update callers.
(calendar-mark-date-pattern): Rename mark-calendar-date-pattern.
Keep old name as alias, update callers.
(diary-sort-entries): Rename sort-diary-entries. Keep old name as alias,
update callers.
(diary-list-sexp-entries): Rename list-sexp-diary-entries.
Keep old name as alias, update callers.
(diary-make-entry): Rename make-diary-entry. Keep old name as alias,
update callers.
(diary-insert-entry): Rename insert-diary-entry. Keep old name as alias.
(diary-insert-weekly-entry): Rename insert-weekly-diary-entry.
Keep old name as alias.
(diary-insert-monthly-entry): Rename insert-monthly-diary-entry.
Keep old name as alias.
(diary-insert-yearly-entry): Rename insert-yearly-diary-entry.
Keep old name as alias.
(diary-insert-anniversary-entry): Rename insert-anniversary-diary-entry.
Keep old name as alias.
(diary-insert-block-entry): Rename insert-block-diary-entry.
Keep old name as alias.
(diary-insert-cyclic-entry): Rename insert-cyclic-diary-entry.
Keep old name as alias.
(diary-fancy-font-lock-keywords): Rename fancy-diary-font-lock-keywords.
Keep old name as alias, update users.
(diary-fancy-display-mode): Rename fancy-diary-display-mode.
Keep old name as alias, update callers.
2008-04-06 20:53:14 +00:00
|
|
|
|
(run-hooks 'diary-print-entries-hook)
|
2008-04-02 03:34:23 +00:00
|
|
|
|
(kill-buffer temp-buffer))))
|
1995-09-21 03:11:06 +00:00
|
|
|
|
|
2008-03-13 05:54:57 +00:00
|
|
|
|
;;;###cal-autoload
|
2005-09-12 21:21:42 +00:00
|
|
|
|
(defun diary-show-all-entries ()
|
1995-09-21 03:11:06 +00:00
|
|
|
|
"Show all of the diary entries in the diary file.
|
|
|
|
|
This function gets rid of the selective display of the diary file so that
|
|
|
|
|
all entries, not just some, are visible. If there is no diary buffer, one
|
|
|
|
|
is created."
|
|
|
|
|
(interactive)
|
2009-10-05 05:39:48 +00:00
|
|
|
|
(let* ((d-file (diary-check-diary-file))
|
Do not call to `selected-window' where it is assumed by default.
Affected functions are `window-minibuffer-p', `window-dedicated-p',
`window-hscroll', `window-width', `window-height', `window-buffer',
`window-frame', `window-start', `window-point', `next-window'
and `window-display-table'.
* abbrev.el (abbrev--default-expand):
* bs.el (bs--show-with-configuration):
* buff-menu.el (Buffer-menu-mouse-select):
* calc/calc.el (calc):
* calendar/calendar.el (calendar-generate-window):
* calendar/diary-lib.el (diary-simple-display, diary-show-all-entries)
(diary-make-entry):
* comint.el (send-invisible, comint-dynamic-complete-filename)
(comint-dynamic-simple-complete, comint-dynamic-list-completions):
* completion.el (complete):
* dabbrev.el (dabbrev-expand, dabbrev--make-friend-buffer-list):
* disp-table.el (describe-current-display-table):
* doc-view.el (doc-view-insert-image):
* ebuff-menu.el (Electric-buffer-menu-mouse-select):
* ehelp.el (with-electric-help):
* emacs-lisp/easy-mmode.el (easy-mmode-define-navigation):
* emacs-lisp/edebug.el (edebug-two-window-p, edebug-pop-to-buffer):
* emacs-lisp/helper.el (Helper-help-scroller):
* emulation/cua-base.el (cua--post-command-handler-1):
* eshell/esh-mode.el (eshell-output-filter):
* ffap.el (ffap-gnus-wrapper):
* help-macro.el (make-help-screen):
* hilit-chg.el (highlight-compare-buffers):
* hippie-exp.el (hippie-expand, try-expand-dabbrev-visible):
* hl-line.el (global-hl-line-highlight):
* icomplete.el (icomplete-simple-completing-p):
* isearch.el (isearch-done):
* jit-lock.el (jit-lock-stealth-fontify):
* mail/rmailsum.el (rmail-summary-scroll-msg-up):
* lisp/mouse-drag.el (mouse-drag-should-do-col-scrolling):
* mpc.el (mpc-tagbrowser, mpc):
* net/rcirc.el (rcirc-any-buffer):
* play/gomoku.el (gomoku-max-width, gomoku-max-height):
* play/landmark.el (landmark-max-width, landmark-max-height):
* play/zone.el (zone):
* progmodes/compile.el (compilation-goto-locus):
* progmodes/ebrowse.el (ebrowse-view/find-file-and-search-pattern):
* progmodes/etags.el (find-tag-other-window):
* progmodes/fortran.el (fortran-column-ruler):
* progmodes/gdb-mi.el (gdb-mouse-toggle-breakpoint-fringe):
* progmodes/verilog-mode.el (verilog-point-text):
* reposition.el (reposition-window):
* rot13.el (toggle-rot13-mode):
* server.el (server-switch-buffer):
* shell.el (shell-dynamic-complete-command)
(shell-dynamic-complete-environment-variable):
* simple.el (insert-buffer, set-selective-display)
(delete-completion-window):
* speedbar.el (speedbar-timer-fn, speedbar-center-buffer-smartly)
(speedbar-recenter):
* startup.el (fancy-splash-head):
* textmodes/ispell.el (ispell-command-loop):
* textmodes/makeinfo.el (makeinfo-compilation-sentinel-region):
* tutorial.el (help-with-tutorial):
* vc/add-log.el (add-change-log-entry):
* vc/compare-w.el (compare-windows):
* vc/ediff-help.el (ediff-indent-help-message):
* vc/ediff-util.el (ediff-setup-control-buffer, ediff-position-region):
* vc/ediff-wind.el (ediff-skip-unsuitable-frames)
(ediff-setup-control-frame):
* vc/emerge.el (emerge-position-region):
* vc/pcvs-util.el (cvs-bury-buffer):
* window.el (walk-windows, mouse-autoselect-window-select):
* winner.el (winner-set-conf, winner-undo): Related users changed.
2013-08-05 14:26:57 +00:00
|
|
|
|
(pop-up-frames (or pop-up-frames (window-dedicated-p)))
|
2009-10-05 05:39:48 +00:00
|
|
|
|
(win (selected-window))
|
|
|
|
|
(height (window-height)))
|
2005-09-12 21:21:42 +00:00
|
|
|
|
(with-current-buffer (or (find-buffer-visiting d-file)
|
|
|
|
|
(find-file-noselect d-file t))
|
2009-08-28 03:18:49 +00:00
|
|
|
|
(when (eq major-mode (default-value 'major-mode)) (diary-mode))
|
2005-09-14 15:22:25 +00:00
|
|
|
|
(diary-unhide-everything)
|
2009-10-05 05:39:48 +00:00
|
|
|
|
(display-buffer (current-buffer))
|
|
|
|
|
(when (and (/= height (window-height win))
|
|
|
|
|
(with-current-buffer (window-buffer win)
|
|
|
|
|
(derived-mode-p 'calendar-mode)))
|
|
|
|
|
(fit-window-to-buffer win)))))
|
1997-11-25 04:00:20 +00:00
|
|
|
|
|
1998-05-06 07:38:44 +00:00
|
|
|
|
;;;###autoload
|
1997-11-25 04:00:20 +00:00
|
|
|
|
(defun diary-mail-entries (&optional ndays)
|
|
|
|
|
"Send a mail message showing diary entries for next NDAYS days.
|
|
|
|
|
If no prefix argument is given, NDAYS is set to `diary-mail-days'.
|
(diary-check-diary-file): New function.
(diary, view-diary-entries, show-all-diary-entries)
(mark-diary-entries): Use it.
(view-other-diary-entries): Doc fix. Use `prefix-numeric-value'.
(diary-syntax-table, diary-attrtype-convert, diary-mail-days): Doc fix.
(diary-modified, d-file): No need to defvar (for compiler).
(list-diary-entries): No need for `let*' so use `let'.
(simple-diary-display): Use `diary-file' directly rather than
inheriting `d-file' from `list-diary-entries' caller.
(make-fancy-diary-buffer, show-all-diary-entries): `mode-line-format'
already buffer-local.
(diary-mail-addr): Set to the empty string (rather than nil) if
undefined, as per `user-mail-address'.
(diary-mail-entries): Doc fix. Error if `diary-mail-address' unset.
(mark-sexp-diary-entries): Don't regexp-quote sexp-mark twice.
Remove an un-needed `if'.
(list-sexp-diary-entries): Remove local vars mark and s-entry, and
use `let' rather than `let*'.
(diary-date, insert-monthly-diary-entry)
(insert-yearly-diary-entry, insert-anniversary-diary-entry)
(insert-block-diary-entry, insert-cyclic-diary-entry)
(font-lock-diary-date-forms): No need for `let*' so use `let'.
(make-diary-entry): Doc fix. Use `or' rather than `if'.
(diary-font-lock-keywords): Use `when'. `cal-islam' is required
feature, not `cal-islamic'.
`calendar-islamic-month-name-array-leap-year' does not exist - use
`calendar-islamic-month-name-array'.
2003-06-22 01:02:22 +00:00
|
|
|
|
Mail is sent to the address specified by `diary-mail-addr'.
|
1997-11-25 04:00:20 +00:00
|
|
|
|
|
2008-03-27 08:26:17 +00:00
|
|
|
|
Here is an example of a script to call `diary-mail-entries',
|
|
|
|
|
suitable for regular scheduling using cron (or at). Note that
|
2012-09-17 05:41:04 +00:00
|
|
|
|
since `emacs -script' does not load your init file, you should
|
|
|
|
|
ensure that all relevant variables are set.
|
2008-03-27 08:26:17 +00:00
|
|
|
|
|
|
|
|
|
#!/usr/bin/emacs -script
|
|
|
|
|
;; diary-rem.el - run the Emacs diary-reminder
|
|
|
|
|
|
|
|
|
|
\(setq diary-mail-days 3
|
|
|
|
|
diary-file \"/path/to/diary.file\"
|
2015-11-17 23:28:50 +00:00
|
|
|
|
calendar-date-style \\='european
|
2008-03-27 08:26:17 +00:00
|
|
|
|
diary-mail-addr \"user@host.name\")
|
|
|
|
|
|
|
|
|
|
\(diary-mail-entries)
|
|
|
|
|
|
|
|
|
|
# diary-rem.el ends here
|
|
|
|
|
"
|
2001-01-24 11:48:19 +00:00
|
|
|
|
(interactive "P")
|
(diary-check-diary-file): New function.
(diary, view-diary-entries, show-all-diary-entries)
(mark-diary-entries): Use it.
(view-other-diary-entries): Doc fix. Use `prefix-numeric-value'.
(diary-syntax-table, diary-attrtype-convert, diary-mail-days): Doc fix.
(diary-modified, d-file): No need to defvar (for compiler).
(list-diary-entries): No need for `let*' so use `let'.
(simple-diary-display): Use `diary-file' directly rather than
inheriting `d-file' from `list-diary-entries' caller.
(make-fancy-diary-buffer, show-all-diary-entries): `mode-line-format'
already buffer-local.
(diary-mail-addr): Set to the empty string (rather than nil) if
undefined, as per `user-mail-address'.
(diary-mail-entries): Doc fix. Error if `diary-mail-address' unset.
(mark-sexp-diary-entries): Don't regexp-quote sexp-mark twice.
Remove an un-needed `if'.
(list-sexp-diary-entries): Remove local vars mark and s-entry, and
use `let' rather than `let*'.
(diary-date, insert-monthly-diary-entry)
(insert-yearly-diary-entry, insert-anniversary-diary-entry)
(insert-block-diary-entry, insert-cyclic-diary-entry)
(font-lock-diary-date-forms): No need for `let*' so use `let'.
(make-diary-entry): Doc fix. Use `or' rather than `if'.
(diary-font-lock-keywords): Use `when'. `cal-islam' is required
feature, not `cal-islamic'.
`calendar-islamic-month-name-array-leap-year' does not exist - use
`calendar-islamic-month-name-array'.
2003-06-22 01:02:22 +00:00
|
|
|
|
(if (string-equal diary-mail-addr "")
|
Go back to grave quoting in source-code docstrings etc.
This reverts almost all my recent changes to use curved quotes
in docstrings and/or strings used for error diagnostics.
There are a few exceptions, e.g., Bahá’í proper names.
* admin/unidata/unidata-gen.el (unidata-gen-table):
* lisp/abbrev.el (expand-region-abbrevs):
* lisp/align.el (align-region):
* lisp/allout.el (allout-mode, allout-solicit-alternate-bullet)
(outlineify-sticky):
* lisp/apropos.el (apropos-library):
* lisp/bookmark.el (bookmark-default-annotation-text):
* lisp/button.el (button-category-symbol, button-put)
(make-text-button):
* lisp/calc/calc-aent.el (math-read-if, math-read-factor):
* lisp/calc/calc-embed.el (calc-do-embedded):
* lisp/calc/calc-ext.el (calc-user-function-list):
* lisp/calc/calc-graph.el (calc-graph-show-dumb):
* lisp/calc/calc-help.el (calc-describe-key)
(calc-describe-thing, calc-full-help):
* lisp/calc/calc-lang.el (calc-c-language)
(math-parse-fortran-vector-end, math-parse-tex-sum)
(math-parse-eqn-matrix, math-parse-eqn-prime)
(calc-yacas-language, calc-maxima-language, calc-giac-language)
(math-read-giac-subscr, math-read-math-subscr)
(math-read-big-rec, math-read-big-balance):
* lisp/calc/calc-misc.el (calc-help, report-calc-bug):
* lisp/calc/calc-mode.el (calc-auto-why, calc-save-modes)
(calc-auto-recompute):
* lisp/calc/calc-prog.el (calc-fix-token-name)
(calc-read-parse-table-part, calc-user-define-invocation)
(math-do-arg-check):
* lisp/calc/calc-store.el (calc-edit-variable):
* lisp/calc/calc-units.el (math-build-units-table-buffer):
* lisp/calc/calc-vec.el (math-read-brackets):
* lisp/calc/calc-yank.el (calc-edit-mode):
* lisp/calc/calc.el (calc, calc-do, calc-user-invocation):
* lisp/calendar/appt.el (appt-display-message):
* lisp/calendar/diary-lib.el (diary-check-diary-file)
(diary-mail-entries, diary-from-outlook):
* lisp/calendar/icalendar.el (icalendar-export-region)
(icalendar--convert-float-to-ical)
(icalendar--convert-date-to-ical)
(icalendar--convert-ical-to-diary)
(icalendar--convert-recurring-to-diary)
(icalendar--add-diary-entry):
* lisp/calendar/time-date.el (format-seconds):
* lisp/calendar/timeclock.el (timeclock-mode-line-display)
(timeclock-make-hours-explicit, timeclock-log-data):
* lisp/calendar/todo-mode.el (todo-prefix, todo-delete-category)
(todo-item-mark, todo-check-format)
(todo-insert-item--next-param, todo-edit-item--next-key)
(todo-mode):
* lisp/cedet/ede/pmake.el (ede-proj-makefile-insert-dist-rules):
* lisp/cedet/mode-local.el (describe-mode-local-overload)
(mode-local-print-binding, mode-local-describe-bindings-2):
* lisp/cedet/semantic/complete.el (semantic-displayor-show-request):
* lisp/cedet/srecode/srt-mode.el (srecode-macro-help):
* lisp/cus-start.el (standard):
* lisp/cus-theme.el (describe-theme-1):
* lisp/custom.el (custom-add-dependencies, custom-check-theme)
(custom--sort-vars-1, load-theme):
* lisp/descr-text.el (describe-text-properties-1, describe-char):
* lisp/dired-x.el (dired-do-run-mail):
* lisp/dired.el (dired-log):
* lisp/emacs-lisp/advice.el (ad-read-advised-function)
(ad-read-advice-class, ad-read-advice-name, ad-enable-advice)
(ad-disable-advice, ad-remove-advice, ad-set-argument)
(ad-set-arguments, ad--defalias-fset, ad-activate)
(ad-deactivate):
* lisp/emacs-lisp/byte-opt.el (byte-compile-inline-expand)
(byte-compile-unfold-lambda, byte-optimize-form-code-walker)
(byte-optimize-while, byte-optimize-apply):
* lisp/emacs-lisp/byte-run.el (defun, defsubst):
* lisp/emacs-lisp/bytecomp.el (byte-compile-lapcode)
(byte-compile-log-file, byte-compile-format-warn)
(byte-compile-nogroup-warn, byte-compile-arglist-warn)
(byte-compile-cl-warn)
(byte-compile-warn-about-unresolved-functions)
(byte-compile-file, byte-compile--declare-var)
(byte-compile-file-form-defmumble, byte-compile-form)
(byte-compile-normal-call, byte-compile-check-variable)
(byte-compile-variable-ref, byte-compile-variable-set)
(byte-compile-subr-wrong-args, byte-compile-setq-default)
(byte-compile-negation-optimizer)
(byte-compile-condition-case--old)
(byte-compile-condition-case--new, byte-compile-save-excursion)
(byte-compile-defvar, byte-compile-autoload)
(byte-compile-lambda-form)
(byte-compile-make-variable-buffer-local, display-call-tree)
(batch-byte-compile):
* lisp/emacs-lisp/cconv.el (cconv-convert, cconv--analyze-use):
* lisp/emacs-lisp/chart.el (chart-space-usage):
* lisp/emacs-lisp/check-declare.el (check-declare-scan)
(check-declare-warn, check-declare-file)
(check-declare-directory):
* lisp/emacs-lisp/checkdoc.el (checkdoc-this-string-valid-engine)
(checkdoc-message-text-engine):
* lisp/emacs-lisp/cl-extra.el (cl-parse-integer)
(cl--describe-class):
* lisp/emacs-lisp/cl-generic.el (cl-defgeneric)
(cl--generic-describe, cl-generic-generalizers):
* lisp/emacs-lisp/cl-macs.el (cl--parse-loop-clause, cl-tagbody)
(cl-symbol-macrolet):
* lisp/emacs-lisp/cl.el (cl-unload-function, flet):
* lisp/emacs-lisp/copyright.el (copyright)
(copyright-update-directory):
* lisp/emacs-lisp/edebug.el (edebug-read-list):
* lisp/emacs-lisp/eieio-base.el (eieio-persistent-read):
* lisp/emacs-lisp/eieio-core.el (eieio--slot-override)
(eieio-oref):
* lisp/emacs-lisp/eieio-opt.el (eieio-help-constructor):
* lisp/emacs-lisp/eieio-speedbar.el:
(eieio-speedbar-child-make-tag-lines)
(eieio-speedbar-child-description):
* lisp/emacs-lisp/eieio.el (defclass, change-class):
* lisp/emacs-lisp/elint.el (elint-file, elint-get-top-forms)
(elint-init-form, elint-check-defalias-form)
(elint-check-let-form):
* lisp/emacs-lisp/ert.el (ert-get-test, ert-results-mode-menu)
(ert-results-pop-to-backtrace-for-test-at-point)
(ert-results-pop-to-messages-for-test-at-point)
(ert-results-pop-to-should-forms-for-test-at-point)
(ert-describe-test):
* lisp/emacs-lisp/find-func.el (find-function-search-for-symbol)
(find-function-library):
* lisp/emacs-lisp/generator.el (iter-yield):
* lisp/emacs-lisp/gv.el (gv-define-simple-setter):
* lisp/emacs-lisp/lisp-mnt.el (lm-verify):
* lisp/emacs-lisp/macroexp.el (macroexp--obsolete-warning):
* lisp/emacs-lisp/map-ynp.el (map-y-or-n-p):
* lisp/emacs-lisp/nadvice.el (advice--make-docstring)
(advice--make, define-advice):
* lisp/emacs-lisp/package-x.el (package-upload-file):
* lisp/emacs-lisp/package.el (package-version-join)
(package-disabled-p, package-activate-1, package-activate)
(package--download-one-archive)
(package--download-and-read-archives)
(package-compute-transaction, package-install-from-archive)
(package-install, package-install-selected-packages)
(package-delete, package-autoremove, describe-package-1)
(package-install-button-action, package-delete-button-action)
(package-menu-hide-package, package-menu--list-to-prompt)
(package-menu--perform-transaction)
(package-menu--find-and-notify-upgrades):
* lisp/emacs-lisp/pcase.el (pcase-exhaustive, pcase--u1):
* lisp/emacs-lisp/re-builder.el (reb-enter-subexp-mode):
* lisp/emacs-lisp/ring.el (ring-previous, ring-next):
* lisp/emacs-lisp/rx.el (rx-check, rx-anything)
(rx-check-any-string, rx-check-any, rx-check-not, rx-=)
(rx-repeat, rx-check-backref, rx-syntax, rx-check-category)
(rx-form):
* lisp/emacs-lisp/smie.el (smie-config-save):
* lisp/emacs-lisp/subr-x.el (internal--check-binding):
* lisp/emacs-lisp/tabulated-list.el (tabulated-list-put-tag):
* lisp/emacs-lisp/testcover.el (testcover-1value):
* lisp/emacs-lisp/timer.el (timer-event-handler):
* lisp/emulation/viper-cmd.el (viper-toggle-parse-sexp-ignore-comments)
(viper-toggle-search-style, viper-kill-buffer)
(viper-brac-function):
* lisp/emulation/viper-macs.el (viper-record-kbd-macro):
* lisp/env.el (setenv):
* lisp/erc/erc-button.el (erc-nick-popup):
* lisp/erc/erc.el (erc-cmd-LOAD, erc-handle-login, english):
* lisp/eshell/em-dirs.el (eshell/cd):
* lisp/eshell/em-glob.el (eshell-glob-regexp)
(eshell-glob-entries):
* lisp/eshell/em-pred.el (eshell-parse-modifiers):
* lisp/eshell/esh-opt.el (eshell-show-usage):
* lisp/facemenu.el (facemenu-add-new-face)
(facemenu-add-new-color):
* lisp/faces.el (read-face-name, read-face-font, describe-face)
(x-resolve-font-name):
* lisp/files-x.el (modify-file-local-variable):
* lisp/files.el (locate-user-emacs-file, find-alternate-file)
(set-auto-mode, hack-one-local-variable--obsolete)
(dir-locals-set-directory-class, write-file, basic-save-buffer)
(delete-directory, copy-directory, recover-session)
(recover-session-finish, insert-directory)
(file-modes-char-to-who, file-modes-symbolic-to-number)
(move-file-to-trash):
* lisp/filesets.el (filesets-add-buffer, filesets-remove-buffer):
* lisp/find-cmd.el (find-generic, find-to-string):
* lisp/finder.el (finder-commentary):
* lisp/font-lock.el (font-lock-fontify-buffer):
* lisp/format.el (format-write-file, format-find-file)
(format-insert-file):
* lisp/frame.el (get-device-terminal, select-frame-by-name):
* lisp/fringe.el (fringe--check-style):
* lisp/gnus/nnmairix.el (nnmairix-widget-create-query):
* lisp/help-fns.el (help-fns--key-bindings)
(help-fns--compiler-macro, help-fns--parent-mode)
(help-fns--obsolete, help-fns--interactive-only)
(describe-function-1, describe-variable):
* lisp/help.el (describe-mode)
(describe-minor-mode-from-indicator):
* lisp/image.el (image-type):
* lisp/international/ccl.el (ccl-dump):
* lisp/international/fontset.el (x-must-resolve-font-name):
* lisp/international/mule-cmds.el (prefer-coding-system)
(select-safe-coding-system-interactively)
(select-safe-coding-system, activate-input-method)
(toggle-input-method, describe-current-input-method)
(describe-language-environment):
* lisp/international/mule-conf.el (code-offset):
* lisp/international/mule-diag.el (describe-character-set)
(list-input-methods-1):
* lisp/mail/feedmail.el (feedmail-run-the-queue):
* lisp/mouse.el (minor-mode-menu-from-indicator):
* lisp/mpc.el (mpc-playlist-rename):
* lisp/msb.el (msb--choose-menu):
* lisp/net/ange-ftp.el (ange-ftp-shell-command):
* lisp/net/imap.el (imap-interactive-login):
* lisp/net/mairix.el (mairix-widget-create-query):
* lisp/net/newst-backend.el (newsticker--sentinel-work):
* lisp/net/newst-treeview.el (newsticker--treeview-load):
* lisp/net/rlogin.el (rlogin):
* lisp/obsolete/iswitchb.el (iswitchb-possible-new-buffer):
* lisp/obsolete/otodo-mode.el (todo-more-important-p):
* lisp/obsolete/pgg-gpg.el (pgg-gpg-process-region):
* lisp/obsolete/pgg-pgp.el (pgg-pgp-process-region):
* lisp/obsolete/pgg-pgp5.el (pgg-pgp5-process-region):
* lisp/org/ob-core.el (org-babel-goto-named-src-block)
(org-babel-goto-named-result):
* lisp/org/ob-fortran.el (org-babel-fortran-ensure-main-wrap):
* lisp/org/ob-ref.el (org-babel-ref-resolve):
* lisp/org/org-agenda.el (org-agenda-prepare):
* lisp/org/org-clock.el (org-clock-notify-once-if-expired)
(org-clock-resolve):
* lisp/org/org-ctags.el (org-ctags-ask-rebuild-tags-file-then-find-tag):
* lisp/org/org-feed.el (org-feed-parse-atom-entry):
* lisp/org/org-habit.el (org-habit-parse-todo):
* lisp/org/org-mouse.el (org-mouse-popup-global-menu)
(org-mouse-context-menu):
* lisp/org/org-table.el (org-table-edit-formulas):
* lisp/org/ox.el (org-export-async-start):
* lisp/proced.el (proced-log):
* lisp/progmodes/ada-mode.el (ada-get-indent-case)
(ada-check-matching-start, ada-goto-matching-start):
* lisp/progmodes/ada-prj.el (ada-prj-display-page):
* lisp/progmodes/ada-xref.el (ada-find-executable):
* lisp/progmodes/ebrowse.el (ebrowse-tags-apropos):
* lisp/progmodes/etags.el (etags-tags-apropos-additional):
* lisp/progmodes/flymake.el (flymake-parse-err-lines)
(flymake-start-syntax-check-process):
* lisp/progmodes/python.el (python-shell-get-process-or-error)
(python-define-auxiliary-skeleton):
* lisp/progmodes/sql.el (sql-comint):
* lisp/progmodes/verilog-mode.el (verilog-load-file-at-point):
* lisp/progmodes/vhdl-mode.el (vhdl-widget-directory-validate):
* lisp/recentf.el (recentf-open-files):
* lisp/replace.el (query-replace-read-from)
(occur-after-change-function, occur-1):
* lisp/scroll-bar.el (scroll-bar-columns):
* lisp/server.el (server-get-auth-key):
* lisp/simple.el (execute-extended-command)
(undo-outer-limit-truncate, list-processes--refresh)
(compose-mail, set-variable, choose-completion-string)
(define-alternatives):
* lisp/startup.el (site-run-file, tty-handle-args, command-line)
(command-line-1):
* lisp/subr.el (noreturn, define-error, add-to-list)
(read-char-choice, version-to-list):
* lisp/term/common-win.el (x-handle-xrm-switch)
(x-handle-name-switch, x-handle-args):
* lisp/term/x-win.el (x-handle-parent-id, x-handle-smid):
* lisp/textmodes/reftex-ref.el (reftex-label):
* lisp/textmodes/reftex-toc.el (reftex-toc-rename-label):
* lisp/textmodes/two-column.el (2C-split):
* lisp/tutorial.el (tutorial--describe-nonstandard-key)
(tutorial--find-changed-keys):
* lisp/type-break.el (type-break-noninteractive-query):
* lisp/wdired.el (wdired-do-renames, wdired-do-symlink-changes)
(wdired-do-perm-changes):
* lisp/whitespace.el (whitespace-report-region):
Prefer grave quoting in source-code strings used to generate help
and diagnostics.
* lisp/faces.el (face-documentation):
No need to convert quotes, since the result is a docstring.
* lisp/info.el (Info-virtual-index-find-node)
(Info-virtual-index, info-apropos):
Simplify by generating only curved quotes, since info files are
typically that ways nowadays anyway.
* lisp/international/mule-diag.el (list-input-methods):
Don’t assume text quoting style is curved.
* lisp/org/org-bibtex.el (org-bibtex-fields):
Revert my recent changes, going back to the old quoting style.
2015-09-07 15:41:44 +00:00
|
|
|
|
(user-error "You must set `diary-mail-addr' to use this command")
|
2017-12-04 22:03:32 +00:00
|
|
|
|
(let ((diary-display-function #'diary-fancy-display))
|
2006-05-13 06:12:10 +00:00
|
|
|
|
(diary-list-entries (calendar-current-date) (or ndays diary-mail-days)))
|
(diary-check-diary-file): New function.
(diary, view-diary-entries, show-all-diary-entries)
(mark-diary-entries): Use it.
(view-other-diary-entries): Doc fix. Use `prefix-numeric-value'.
(diary-syntax-table, diary-attrtype-convert, diary-mail-days): Doc fix.
(diary-modified, d-file): No need to defvar (for compiler).
(list-diary-entries): No need for `let*' so use `let'.
(simple-diary-display): Use `diary-file' directly rather than
inheriting `d-file' from `list-diary-entries' caller.
(make-fancy-diary-buffer, show-all-diary-entries): `mode-line-format'
already buffer-local.
(diary-mail-addr): Set to the empty string (rather than nil) if
undefined, as per `user-mail-address'.
(diary-mail-entries): Doc fix. Error if `diary-mail-address' unset.
(mark-sexp-diary-entries): Don't regexp-quote sexp-mark twice.
Remove an un-needed `if'.
(list-sexp-diary-entries): Remove local vars mark and s-entry, and
use `let' rather than `let*'.
(diary-date, insert-monthly-diary-entry)
(insert-yearly-diary-entry, insert-anniversary-diary-entry)
(insert-block-diary-entry, insert-cyclic-diary-entry)
(font-lock-diary-date-forms): No need for `let*' so use `let'.
(make-diary-entry): Doc fix. Use `or' rather than `if'.
(diary-font-lock-keywords): Use `when'. `cal-islam' is required
feature, not `cal-islamic'.
`calendar-islamic-month-name-array-leap-year' does not exist - use
`calendar-islamic-month-name-array'.
2003-06-22 01:02:22 +00:00
|
|
|
|
(compose-mail diary-mail-addr
|
|
|
|
|
(concat "Diary entries generated "
|
|
|
|
|
(calendar-date-string (calendar-current-date))))
|
|
|
|
|
(insert
|
2008-04-07 01:59:37 +00:00
|
|
|
|
(if (get-buffer diary-fancy-buffer)
|
|
|
|
|
(with-current-buffer diary-fancy-buffer (buffer-string))
|
(diary-check-diary-file): New function.
(diary, view-diary-entries, show-all-diary-entries)
(mark-diary-entries): Use it.
(view-other-diary-entries): Doc fix. Use `prefix-numeric-value'.
(diary-syntax-table, diary-attrtype-convert, diary-mail-days): Doc fix.
(diary-modified, d-file): No need to defvar (for compiler).
(list-diary-entries): No need for `let*' so use `let'.
(simple-diary-display): Use `diary-file' directly rather than
inheriting `d-file' from `list-diary-entries' caller.
(make-fancy-diary-buffer, show-all-diary-entries): `mode-line-format'
already buffer-local.
(diary-mail-addr): Set to the empty string (rather than nil) if
undefined, as per `user-mail-address'.
(diary-mail-entries): Doc fix. Error if `diary-mail-address' unset.
(mark-sexp-diary-entries): Don't regexp-quote sexp-mark twice.
Remove an un-needed `if'.
(list-sexp-diary-entries): Remove local vars mark and s-entry, and
use `let' rather than `let*'.
(diary-date, insert-monthly-diary-entry)
(insert-yearly-diary-entry, insert-anniversary-diary-entry)
(insert-block-diary-entry, insert-cyclic-diary-entry)
(font-lock-diary-date-forms): No need for `let*' so use `let'.
(make-diary-entry): Doc fix. Use `or' rather than `if'.
(diary-font-lock-keywords): Use `when'. `cal-islam' is required
feature, not `cal-islamic'.
`calendar-islamic-month-name-array-leap-year' does not exist - use
`calendar-islamic-month-name-array'.
2003-06-22 01:02:22 +00:00
|
|
|
|
"No entries found"))
|
|
|
|
|
(call-interactively (get mail-user-agent 'sendfunc))))
|
2001-01-24 11:48:19 +00:00
|
|
|
|
|
2003-08-03 14:00:56 +00:00
|
|
|
|
(defun diary-name-pattern (string-array &optional abbrev-array paren)
|
|
|
|
|
"Return a regexp matching the strings in the array STRING-ARRAY.
|
2011-05-18 03:20:13 +00:00
|
|
|
|
If the optional argument ABBREV-ARRAY is present, the regexp
|
|
|
|
|
also matches the supplied abbreviations, with or without final `.'
|
|
|
|
|
characters. If the optional argument PAREN is non-nil, surrounds
|
|
|
|
|
the regexp with parentheses."
|
2003-08-03 14:00:56 +00:00
|
|
|
|
(regexp-opt (append string-array
|
2011-05-18 03:20:13 +00:00
|
|
|
|
abbrev-array
|
2003-08-03 14:00:56 +00:00
|
|
|
|
(if abbrev-array
|
2011-05-18 03:20:13 +00:00
|
|
|
|
(mapcar (lambda (e) (format "%s." e))
|
|
|
|
|
abbrev-array))
|
2003-08-03 14:00:56 +00:00
|
|
|
|
nil)
|
|
|
|
|
paren))
|
1995-09-21 03:11:06 +00:00
|
|
|
|
|
(diary-sexp-entry-symbol): Rename sexp-diary-entry-symbol.
Keep old name as alias, update users.
(diary-list-entries-hook): Rename list-diary-entries-hook.
Keep old name as alias, update users.
(diary-mark-entries-hook): Rename mark-diary-entries-hook.
Keep old name as alias, update users.
(diary-nongregorian-listing-hook): Rename nongregorian-diary-listing-hook.
Keep old name as alias, update users.
(diary-nongregorian-marking-hook): Rename nongregorian-diary-marking-hook.
Keep old name as alias, update users.
(diary-print-entries-hook): Rename print-diary-entries-hook.
Keep old name as alias, update users.
(diary-abbreviated-year-flag): Rename abbreviated-calendar-year.
Keep old name as alias, update users.
(diary-number-of-entries): Rename number-of-diary-entries.
Keep old name as alias, update users.
(view-diary-entries, list-diary-entries, show-all-diary-entries):
Give version of obsolescence.
(diary-view-other-diary-entries): Rename view-other-diary-entries.
Keep old name as alias, update callers.
(diary-add-to-list): Rename add-to-diary-list. Keep old name as alias,
update callers.
(diary-include-other-diary-files): Rename include-other-diary-files.
Keep old name as alias, update callers.
(diary-simple-display): Rename simple-diary-display. Keep old name as alias,
update callers.
(diary-fancy-display): Rename fancy-diary-display. Keep old name as alias,
update callers.
(diary-print-entries): Rename print-diary-entries. Keep old name as alias,
update callers.
(diary-marking-entries-flag): Rename marking-diary-entries. Update users.
(diary-marking-entry-flag): Rename marking-diary-entry. Update users.
(diary-mark-entries): Rename mark-diary-entries. Keep old name as alias,
update callers.
(diary-mark-sexp-entries): Rename mark-sexp-diary-entries.
Keep old name as alias, update callers.
(diary-mark-included-diary-files): Rename mark-included-diary-files.
Keep old name as alias, update callers.
(calendar-mark-days-named): Rename mark-calendar-days-named.
Keep old name as alias, update callers.
(calendar-mark-month): Rename mark-calendar-month. Keep old name as alias,
update callers.
(calendar-mark-date-pattern): Rename mark-calendar-date-pattern.
Keep old name as alias, update callers.
(diary-sort-entries): Rename sort-diary-entries. Keep old name as alias,
update callers.
(diary-list-sexp-entries): Rename list-sexp-diary-entries.
Keep old name as alias, update callers.
(diary-make-entry): Rename make-diary-entry. Keep old name as alias,
update callers.
(diary-insert-entry): Rename insert-diary-entry. Keep old name as alias.
(diary-insert-weekly-entry): Rename insert-weekly-diary-entry.
Keep old name as alias.
(diary-insert-monthly-entry): Rename insert-monthly-diary-entry.
Keep old name as alias.
(diary-insert-yearly-entry): Rename insert-yearly-diary-entry.
Keep old name as alias.
(diary-insert-anniversary-entry): Rename insert-anniversary-diary-entry.
Keep old name as alias.
(diary-insert-block-entry): Rename insert-block-diary-entry.
Keep old name as alias.
(diary-insert-cyclic-entry): Rename insert-cyclic-diary-entry.
Keep old name as alias.
(diary-fancy-font-lock-keywords): Rename fancy-diary-font-lock-keywords.
Keep old name as alias, update users.
(diary-fancy-display-mode): Rename fancy-diary-display-mode.
Keep old name as alias, update callers.
2008-04-06 20:53:14 +00:00
|
|
|
|
(defvar diary-marking-entries-flag nil
|
1995-09-21 03:11:06 +00:00
|
|
|
|
"True during the marking of diary entries, nil otherwise.")
|
|
|
|
|
|
(diary-sexp-entry-symbol): Rename sexp-diary-entry-symbol.
Keep old name as alias, update users.
(diary-list-entries-hook): Rename list-diary-entries-hook.
Keep old name as alias, update users.
(diary-mark-entries-hook): Rename mark-diary-entries-hook.
Keep old name as alias, update users.
(diary-nongregorian-listing-hook): Rename nongregorian-diary-listing-hook.
Keep old name as alias, update users.
(diary-nongregorian-marking-hook): Rename nongregorian-diary-marking-hook.
Keep old name as alias, update users.
(diary-print-entries-hook): Rename print-diary-entries-hook.
Keep old name as alias, update users.
(diary-abbreviated-year-flag): Rename abbreviated-calendar-year.
Keep old name as alias, update users.
(diary-number-of-entries): Rename number-of-diary-entries.
Keep old name as alias, update users.
(view-diary-entries, list-diary-entries, show-all-diary-entries):
Give version of obsolescence.
(diary-view-other-diary-entries): Rename view-other-diary-entries.
Keep old name as alias, update callers.
(diary-add-to-list): Rename add-to-diary-list. Keep old name as alias,
update callers.
(diary-include-other-diary-files): Rename include-other-diary-files.
Keep old name as alias, update callers.
(diary-simple-display): Rename simple-diary-display. Keep old name as alias,
update callers.
(diary-fancy-display): Rename fancy-diary-display. Keep old name as alias,
update callers.
(diary-print-entries): Rename print-diary-entries. Keep old name as alias,
update callers.
(diary-marking-entries-flag): Rename marking-diary-entries. Update users.
(diary-marking-entry-flag): Rename marking-diary-entry. Update users.
(diary-mark-entries): Rename mark-diary-entries. Keep old name as alias,
update callers.
(diary-mark-sexp-entries): Rename mark-sexp-diary-entries.
Keep old name as alias, update callers.
(diary-mark-included-diary-files): Rename mark-included-diary-files.
Keep old name as alias, update callers.
(calendar-mark-days-named): Rename mark-calendar-days-named.
Keep old name as alias, update callers.
(calendar-mark-month): Rename mark-calendar-month. Keep old name as alias,
update callers.
(calendar-mark-date-pattern): Rename mark-calendar-date-pattern.
Keep old name as alias, update callers.
(diary-sort-entries): Rename sort-diary-entries. Keep old name as alias,
update callers.
(diary-list-sexp-entries): Rename list-sexp-diary-entries.
Keep old name as alias, update callers.
(diary-make-entry): Rename make-diary-entry. Keep old name as alias,
update callers.
(diary-insert-entry): Rename insert-diary-entry. Keep old name as alias.
(diary-insert-weekly-entry): Rename insert-weekly-diary-entry.
Keep old name as alias.
(diary-insert-monthly-entry): Rename insert-monthly-diary-entry.
Keep old name as alias.
(diary-insert-yearly-entry): Rename insert-yearly-diary-entry.
Keep old name as alias.
(diary-insert-anniversary-entry): Rename insert-anniversary-diary-entry.
Keep old name as alias.
(diary-insert-block-entry): Rename insert-block-diary-entry.
Keep old name as alias.
(diary-insert-cyclic-entry): Rename insert-cyclic-diary-entry.
Keep old name as alias.
(diary-fancy-font-lock-keywords): Rename fancy-diary-font-lock-keywords.
Keep old name as alias, update users.
(diary-fancy-display-mode): Rename fancy-diary-display-mode.
Keep old name as alias, update callers.
2008-04-06 20:53:14 +00:00
|
|
|
|
(defvar diary-marking-entry-flag nil
|
1995-09-21 03:11:06 +00:00
|
|
|
|
"True during the marking of diary entries, if current entry is marking.")
|
|
|
|
|
|
(diary-sexp-entry-symbol): Rename sexp-diary-entry-symbol.
Keep old name as alias, update users.
(diary-list-entries-hook): Rename list-diary-entries-hook.
Keep old name as alias, update users.
(diary-mark-entries-hook): Rename mark-diary-entries-hook.
Keep old name as alias, update users.
(diary-nongregorian-listing-hook): Rename nongregorian-diary-listing-hook.
Keep old name as alias, update users.
(diary-nongregorian-marking-hook): Rename nongregorian-diary-marking-hook.
Keep old name as alias, update users.
(diary-print-entries-hook): Rename print-diary-entries-hook.
Keep old name as alias, update users.
(diary-abbreviated-year-flag): Rename abbreviated-calendar-year.
Keep old name as alias, update users.
(diary-number-of-entries): Rename number-of-diary-entries.
Keep old name as alias, update users.
(view-diary-entries, list-diary-entries, show-all-diary-entries):
Give version of obsolescence.
(diary-view-other-diary-entries): Rename view-other-diary-entries.
Keep old name as alias, update callers.
(diary-add-to-list): Rename add-to-diary-list. Keep old name as alias,
update callers.
(diary-include-other-diary-files): Rename include-other-diary-files.
Keep old name as alias, update callers.
(diary-simple-display): Rename simple-diary-display. Keep old name as alias,
update callers.
(diary-fancy-display): Rename fancy-diary-display. Keep old name as alias,
update callers.
(diary-print-entries): Rename print-diary-entries. Keep old name as alias,
update callers.
(diary-marking-entries-flag): Rename marking-diary-entries. Update users.
(diary-marking-entry-flag): Rename marking-diary-entry. Update users.
(diary-mark-entries): Rename mark-diary-entries. Keep old name as alias,
update callers.
(diary-mark-sexp-entries): Rename mark-sexp-diary-entries.
Keep old name as alias, update callers.
(diary-mark-included-diary-files): Rename mark-included-diary-files.
Keep old name as alias, update callers.
(calendar-mark-days-named): Rename mark-calendar-days-named.
Keep old name as alias, update callers.
(calendar-mark-month): Rename mark-calendar-month. Keep old name as alias,
update callers.
(calendar-mark-date-pattern): Rename mark-calendar-date-pattern.
Keep old name as alias, update callers.
(diary-sort-entries): Rename sort-diary-entries. Keep old name as alias,
update callers.
(diary-list-sexp-entries): Rename list-sexp-diary-entries.
Keep old name as alias, update callers.
(diary-make-entry): Rename make-diary-entry. Keep old name as alias,
update callers.
(diary-insert-entry): Rename insert-diary-entry. Keep old name as alias.
(diary-insert-weekly-entry): Rename insert-weekly-diary-entry.
Keep old name as alias.
(diary-insert-monthly-entry): Rename insert-monthly-diary-entry.
Keep old name as alias.
(diary-insert-yearly-entry): Rename insert-yearly-diary-entry.
Keep old name as alias.
(diary-insert-anniversary-entry): Rename insert-anniversary-diary-entry.
Keep old name as alias.
(diary-insert-block-entry): Rename insert-block-diary-entry.
Keep old name as alias.
(diary-insert-cyclic-entry): Rename insert-cyclic-diary-entry.
Keep old name as alias.
(diary-fancy-font-lock-keywords): Rename fancy-diary-font-lock-keywords.
Keep old name as alias, update users.
(diary-fancy-display-mode): Rename fancy-diary-display-mode.
Keep old name as alias, update callers.
2008-04-06 20:53:14 +00:00
|
|
|
|
;; file-glob-attrs bound in diary-mark-entries.
|
2008-03-16 01:27:15 +00:00
|
|
|
|
(defun diary-mark-entries-1 (markfunc &optional months symbol absfunc)
|
(diary-face-attrs, diary-glob-file-regexp-prefix, diary-selective-display)
(number-of-diary-entries, diary-list-entries, diary-goto-entry):
(list-sexp-diary-entries, diary-date, diary-block, diary-float)
(diary-anniversary, diary-cyclic)
(diary-fancy-font-lock-fontify-region-function): Doc fixes.
(diary-header-line-format): Change wording.
(diary-list-entries): Set `date-start' in let.
(include-other-diary-files, mark-included-diary-files): Use format.
(simple-diary-display, fancy-diary-display): Use cadr, unless.
(mark-diary-entries): Use 1+.
(mark-sexp-diary-entries, list-sexp-diary-entries): Use when.
(mark-calendar-month): Use dotimes.
(diary-list-entries-1, diary-mark-entries-1): New functions.
2008-03-15 03:03:08 +00:00
|
|
|
|
"Mark diary entries of a certain type.
|
2008-03-16 01:27:15 +00:00
|
|
|
|
MARKFUNC is a function that marks entries of the appropriate type
|
|
|
|
|
matching a given date pattern. MONTHS is an array of month names.
|
|
|
|
|
SYMBOL marks diary entries of the type in question. ABSFUNC is a
|
lisp/*.el, src/*.c: Fix typos in docstrings
* lisp/apropos.el (apropos-do-all):
* lisp/auth-source-pass.el (auth-source-pass--select-from-entries):
* lisp/auth-source.el (auth-source-user-or-password):
* lisp/calc/calc-forms.el (math-tzone-names):
* lisp/calendar/diary-lib.el (diary-face-attrs)
(diary-mark-entries-1):
* lisp/cedet/cedet-files.el (cedet-files-list-recursively):
* lisp/cedet/ede.el (ede-constructing, ede-deep-rescan):
* lisp/cedet/ede/cpp-root.el (ede-cpp-root-header-file-p):
* lisp/cedet/ede/proj.el (ede-proj-target-makefile):
* lisp/cedet/inversion.el (inversion-check-version)
(inversion-test):
* lisp/cedet/mode-local.el (mode-local-map-file-buffers):
* lisp/cedet/semantic/complete.el (semantic-displayer-ghost):
* lisp/cedet/semantic/db-find.el (semanticdb-find-translate-path-default):
* lisp/cedet/semantic/db.el (semanticdb-table)
(semanticdb-search-system-databases):
* lisp/cedet/semantic/imenu.el (semantic-imenu-index-directory):
* lisp/cedet/semantic/java.el (semantic-java-doc-keywords-map):
* lisp/cedet/semantic/lex-spp.el (semantic-lex-spp-use-headers-flag):
* lisp/cedet/semantic/lex.el (semantic-lex-make-keyword-table)
(semantic-lex-make-type-table, semantic-lex-debug-analyzers):
* lisp/cedet/semantic/tag-ls.el (semantic-tag-abstract-p)
(semantic-tag-leaf-p, semantic-tag-static-p)
(semantic-tag-prototype-p):
* lisp/dnd.el (dnd-open-remote-file-function, dnd-open-local-file):
* lisp/emacs-lisp/eieio-opt.el (eieio-build-class-alist)
(eieio-read-class, eieio-read-subclass):
* lisp/emacs-lisp/generator.el (cps--replace-variable-references)
(cps--handle-loop-for):
* lisp/erc/erc-dcc.el (erc-dcc-list, erc-dcc-member, erc-dcc-server)
(erc-dcc-auto-mask-p, erc-dcc-get-file, erc-dcc-chat-accept):
* lisp/eshell/em-pred.el (eshell-pred-file-type):
* lisp/faces.el (defined-colors-with-face-attributes):
* lisp/font-core.el (font-lock-mode):
* lisp/frame.el (frame-restack):
* lisp/net/shr.el (shr-image-animate):
* lisp/org/org-agenda.el (org-agenda-change-all-lines)
(org-agenda-today-p):
* lisp/org/org-id.el (org-id-get):
* lisp/org/org.el (org-highlight-latex-and-related)
(org--valid-property-p):
* lisp/org/ox-beamer.el (org-beamer--get-label):
* lisp/org/ox-latex.el (org-latex--caption-above-p):
* lisp/org/ox-odt.el (org-odt--copy-image-file)
(org-odt--copy-formula-file):
* lisp/org/ox.el (org-export-with-timestamps):
* lisp/progmodes/verilog-mode.el (verilog-indent-declaration-macros):
* lisp/ses.el (ses-file-format-extend-parameter-list):
* lisp/term.el (ansi-term):
* lisp/textmodes/bibtex.el (bibtex-no-opt-remove-re)
(bibtex-beginning-of-first-entry, bibtex-autokey-get-title)
(bibtex-read-key, bibtex-initialize):
* lisp/textmodes/flyspell.el (flyspell-word):
* lisp/view.el (view-mode-exit):
* src/composite.c:
* src/floatfns.c (Fisnan): Fix typos in docstrings.
2019-09-19 02:32:25 +00:00
|
|
|
|
function that converts absolute dates to dates of the appropriate type."
|
2017-12-04 22:03:32 +00:00
|
|
|
|
(calendar-dlet*
|
|
|
|
|
((dayname (diary-name-pattern calendar-day-name-array
|
|
|
|
|
calendar-day-abbrev-array))
|
|
|
|
|
(monthname (format "%s\\|\\*"
|
|
|
|
|
(if months
|
|
|
|
|
(diary-name-pattern months)
|
|
|
|
|
(diary-name-pattern calendar-month-name-array
|
|
|
|
|
calendar-month-abbrev-array))))
|
|
|
|
|
(month "[0-9]+\\|\\*")
|
|
|
|
|
(day "[0-9]+\\|\\*")
|
|
|
|
|
(year "[0-9]+\\|\\*"))
|
|
|
|
|
(let* ((case-fold-search t)
|
|
|
|
|
marks)
|
|
|
|
|
(dolist (date-form diary-date-forms)
|
|
|
|
|
(if (eq (car date-form) 'backup) ; ignore 'backup directive
|
|
|
|
|
(setq date-form (cdr date-form)))
|
|
|
|
|
(let* ((l (length date-form))
|
|
|
|
|
(d-name-pos (- l (length (memq 'dayname date-form))))
|
|
|
|
|
(d-name-pos (if (/= l d-name-pos) (1+ d-name-pos)))
|
|
|
|
|
(m-name-pos (- l (length (memq 'monthname date-form))))
|
|
|
|
|
(m-name-pos (if (/= l m-name-pos) (1+ m-name-pos)))
|
|
|
|
|
(d-pos (- l (length (memq 'day date-form))))
|
|
|
|
|
(d-pos (if (/= l d-pos) (1+ d-pos)))
|
|
|
|
|
(m-pos (- l (length (memq 'month date-form))))
|
|
|
|
|
(m-pos (if (/= l m-pos) (1+ m-pos)))
|
|
|
|
|
(y-pos (- l (length (memq 'year date-form))))
|
|
|
|
|
(y-pos (if (/= l y-pos) (1+ y-pos)))
|
|
|
|
|
(regexp (format "^%s\\(%s\\)"
|
|
|
|
|
(if symbol (regexp-quote symbol) "")
|
|
|
|
|
(mapconcat #'eval date-form "\\)\\("))))
|
|
|
|
|
(goto-char (point-min))
|
|
|
|
|
(while (re-search-forward regexp nil t)
|
|
|
|
|
(let* ((dd-name
|
|
|
|
|
(if d-name-pos
|
|
|
|
|
(match-string-no-properties d-name-pos)))
|
|
|
|
|
(mm-name
|
|
|
|
|
(if m-name-pos
|
|
|
|
|
(match-string-no-properties m-name-pos)))
|
|
|
|
|
(mm (string-to-number
|
|
|
|
|
(if m-pos
|
|
|
|
|
(match-string-no-properties m-pos)
|
|
|
|
|
"")))
|
|
|
|
|
(dd (string-to-number
|
|
|
|
|
(if d-pos
|
|
|
|
|
(match-string-no-properties d-pos)
|
|
|
|
|
"")))
|
|
|
|
|
(y-str (if y-pos
|
|
|
|
|
(match-string-no-properties y-pos)))
|
|
|
|
|
(yy (if (not y-str)
|
|
|
|
|
0
|
|
|
|
|
(if (and (= (length y-str) 2)
|
|
|
|
|
diary-abbreviated-year-flag)
|
|
|
|
|
(let* ((current-y
|
|
|
|
|
(calendar-extract-year
|
|
|
|
|
(if absfunc
|
|
|
|
|
(funcall
|
|
|
|
|
absfunc
|
|
|
|
|
(calendar-absolute-from-gregorian
|
|
|
|
|
(calendar-current-date)))
|
|
|
|
|
(calendar-current-date))))
|
|
|
|
|
(y (+ (string-to-number y-str)
|
|
|
|
|
;; Current century, eg 2000.
|
|
|
|
|
(* 100 (/ current-y 100))))
|
|
|
|
|
(offset (- y current-y)))
|
|
|
|
|
;; Add 2-digit year to current century.
|
|
|
|
|
;; If more than 50 years in the future,
|
|
|
|
|
;; assume last century. If more than 50
|
|
|
|
|
;; years in the past, assume next century.
|
|
|
|
|
(if (> offset 50)
|
|
|
|
|
(- y 100)
|
|
|
|
|
(if (< offset -50)
|
|
|
|
|
(+ y 100)
|
|
|
|
|
y)))
|
|
|
|
|
(string-to-number y-str)))))
|
|
|
|
|
(setq marks (cadr (diary-pull-attrs
|
|
|
|
|
(buffer-substring-no-properties
|
|
|
|
|
(point) (line-end-position))
|
|
|
|
|
file-glob-attrs)))
|
|
|
|
|
;; Only mark all days of a given name if the pattern
|
|
|
|
|
;; contains no more specific elements.
|
|
|
|
|
(if (and dd-name (not (or d-pos m-pos y-pos)))
|
|
|
|
|
(calendar-mark-days-named
|
|
|
|
|
(cdr (assoc-string dd-name
|
|
|
|
|
(calendar-make-alist
|
|
|
|
|
calendar-day-name-array
|
|
|
|
|
0 nil calendar-day-abbrev-array
|
|
|
|
|
(mapcar (lambda (e)
|
|
|
|
|
(format "%s." e))
|
|
|
|
|
calendar-day-abbrev-array))
|
|
|
|
|
t))
|
|
|
|
|
marks)
|
|
|
|
|
(if mm-name
|
|
|
|
|
(setq mm
|
|
|
|
|
(if (string-equal mm-name "*") 0
|
|
|
|
|
(cdr (assoc-string
|
|
|
|
|
mm-name
|
|
|
|
|
(if months (calendar-make-alist months)
|
(diary-face-attrs, diary-glob-file-regexp-prefix, diary-selective-display)
(number-of-diary-entries, diary-list-entries, diary-goto-entry):
(list-sexp-diary-entries, diary-date, diary-block, diary-float)
(diary-anniversary, diary-cyclic)
(diary-fancy-font-lock-fontify-region-function): Doc fixes.
(diary-header-line-format): Change wording.
(diary-list-entries): Set `date-start' in let.
(include-other-diary-files, mark-included-diary-files): Use format.
(simple-diary-display, fancy-diary-display): Use cadr, unless.
(mark-diary-entries): Use 1+.
(mark-sexp-diary-entries, list-sexp-diary-entries): Use when.
(mark-calendar-month): Use dotimes.
(diary-list-entries-1, diary-mark-entries-1): New functions.
2008-03-15 03:03:08 +00:00
|
|
|
|
(calendar-make-alist
|
2017-12-04 22:03:32 +00:00
|
|
|
|
calendar-month-name-array
|
|
|
|
|
1 nil calendar-month-abbrev-array
|
2011-05-18 03:20:13 +00:00
|
|
|
|
(mapcar (lambda (e)
|
|
|
|
|
(format "%s." e))
|
2017-12-04 22:03:32 +00:00
|
|
|
|
calendar-month-abbrev-array)))
|
|
|
|
|
t)))))
|
|
|
|
|
(funcall markfunc mm dd yy marks)))))))))
|
(diary-face-attrs, diary-glob-file-regexp-prefix, diary-selective-display)
(number-of-diary-entries, diary-list-entries, diary-goto-entry):
(list-sexp-diary-entries, diary-date, diary-block, diary-float)
(diary-anniversary, diary-cyclic)
(diary-fancy-font-lock-fontify-region-function): Doc fixes.
(diary-header-line-format): Change wording.
(diary-list-entries): Set `date-start' in let.
(include-other-diary-files, mark-included-diary-files): Use format.
(simple-diary-display, fancy-diary-display): Use cadr, unless.
(mark-diary-entries): Use 1+.
(mark-sexp-diary-entries, list-sexp-diary-entries): Use when.
(mark-calendar-month): Use dotimes.
(diary-list-entries-1, diary-mark-entries-1): New functions.
2008-03-15 03:03:08 +00:00
|
|
|
|
|
2008-03-13 05:54:57 +00:00
|
|
|
|
;;;###cal-autoload
|
(diary-sexp-entry-symbol): Rename sexp-diary-entry-symbol.
Keep old name as alias, update users.
(diary-list-entries-hook): Rename list-diary-entries-hook.
Keep old name as alias, update users.
(diary-mark-entries-hook): Rename mark-diary-entries-hook.
Keep old name as alias, update users.
(diary-nongregorian-listing-hook): Rename nongregorian-diary-listing-hook.
Keep old name as alias, update users.
(diary-nongregorian-marking-hook): Rename nongregorian-diary-marking-hook.
Keep old name as alias, update users.
(diary-print-entries-hook): Rename print-diary-entries-hook.
Keep old name as alias, update users.
(diary-abbreviated-year-flag): Rename abbreviated-calendar-year.
Keep old name as alias, update users.
(diary-number-of-entries): Rename number-of-diary-entries.
Keep old name as alias, update users.
(view-diary-entries, list-diary-entries, show-all-diary-entries):
Give version of obsolescence.
(diary-view-other-diary-entries): Rename view-other-diary-entries.
Keep old name as alias, update callers.
(diary-add-to-list): Rename add-to-diary-list. Keep old name as alias,
update callers.
(diary-include-other-diary-files): Rename include-other-diary-files.
Keep old name as alias, update callers.
(diary-simple-display): Rename simple-diary-display. Keep old name as alias,
update callers.
(diary-fancy-display): Rename fancy-diary-display. Keep old name as alias,
update callers.
(diary-print-entries): Rename print-diary-entries. Keep old name as alias,
update callers.
(diary-marking-entries-flag): Rename marking-diary-entries. Update users.
(diary-marking-entry-flag): Rename marking-diary-entry. Update users.
(diary-mark-entries): Rename mark-diary-entries. Keep old name as alias,
update callers.
(diary-mark-sexp-entries): Rename mark-sexp-diary-entries.
Keep old name as alias, update callers.
(diary-mark-included-diary-files): Rename mark-included-diary-files.
Keep old name as alias, update callers.
(calendar-mark-days-named): Rename mark-calendar-days-named.
Keep old name as alias, update callers.
(calendar-mark-month): Rename mark-calendar-month. Keep old name as alias,
update callers.
(calendar-mark-date-pattern): Rename mark-calendar-date-pattern.
Keep old name as alias, update callers.
(diary-sort-entries): Rename sort-diary-entries. Keep old name as alias,
update callers.
(diary-list-sexp-entries): Rename list-sexp-diary-entries.
Keep old name as alias, update callers.
(diary-make-entry): Rename make-diary-entry. Keep old name as alias,
update callers.
(diary-insert-entry): Rename insert-diary-entry. Keep old name as alias.
(diary-insert-weekly-entry): Rename insert-weekly-diary-entry.
Keep old name as alias.
(diary-insert-monthly-entry): Rename insert-monthly-diary-entry.
Keep old name as alias.
(diary-insert-yearly-entry): Rename insert-yearly-diary-entry.
Keep old name as alias.
(diary-insert-anniversary-entry): Rename insert-anniversary-diary-entry.
Keep old name as alias.
(diary-insert-block-entry): Rename insert-block-diary-entry.
Keep old name as alias.
(diary-insert-cyclic-entry): Rename insert-cyclic-diary-entry.
Keep old name as alias.
(diary-fancy-font-lock-keywords): Rename fancy-diary-font-lock-keywords.
Keep old name as alias, update users.
(diary-fancy-display-mode): Rename fancy-diary-display-mode.
Keep old name as alias, update callers.
2008-04-06 20:53:14 +00:00
|
|
|
|
(defun diary-mark-entries (&optional redraw)
|
1995-09-21 03:11:06 +00:00
|
|
|
|
"Mark days in the calendar window that have diary entries.
|
2011-05-10 02:22:55 +00:00
|
|
|
|
Marks each entry in the diary that is visible in the calendar window.
|
|
|
|
|
|
|
|
|
|
After marking the entries, runs `diary-nongregorian-marking-hook'
|
|
|
|
|
for the main diary file, and each included file. For example,
|
|
|
|
|
this is the appropriate hook to process Islamic entries in all
|
|
|
|
|
diary files. Next `diary-mark-entries-hook' runs, for the main diary
|
|
|
|
|
file only. If not using include files, there is no difference between
|
|
|
|
|
these two hooks.
|
|
|
|
|
|
|
|
|
|
If the optional argument REDRAW is non-nil (which is the case
|
|
|
|
|
interactively, for example) then this first removes any existing diary
|
|
|
|
|
marks. This is intended to deal with deleted diary entries."
|
2005-03-16 13:23:55 +00:00
|
|
|
|
(interactive "p")
|
|
|
|
|
;; To remove any deleted diary entries. Do not redraw when:
|
|
|
|
|
;; i) processing #include diary files (else only get the marks from
|
|
|
|
|
;; the last #include file processed).
|
|
|
|
|
;; ii) called via calendar-redraw (since calendar has already been
|
|
|
|
|
;; erased).
|
|
|
|
|
;; Use of REDRAW handles both of these cases.
|
2008-04-07 01:59:37 +00:00
|
|
|
|
(when (and redraw calendar-mark-diary-entries-flag)
|
|
|
|
|
(setq calendar-mark-diary-entries-flag nil)
|
|
|
|
|
(calendar-redraw))
|
(diary-sexp-entry-symbol): Rename sexp-diary-entry-symbol.
Keep old name as alias, update users.
(diary-list-entries-hook): Rename list-diary-entries-hook.
Keep old name as alias, update users.
(diary-mark-entries-hook): Rename mark-diary-entries-hook.
Keep old name as alias, update users.
(diary-nongregorian-listing-hook): Rename nongregorian-diary-listing-hook.
Keep old name as alias, update users.
(diary-nongregorian-marking-hook): Rename nongregorian-diary-marking-hook.
Keep old name as alias, update users.
(diary-print-entries-hook): Rename print-diary-entries-hook.
Keep old name as alias, update users.
(diary-abbreviated-year-flag): Rename abbreviated-calendar-year.
Keep old name as alias, update users.
(diary-number-of-entries): Rename number-of-diary-entries.
Keep old name as alias, update users.
(view-diary-entries, list-diary-entries, show-all-diary-entries):
Give version of obsolescence.
(diary-view-other-diary-entries): Rename view-other-diary-entries.
Keep old name as alias, update callers.
(diary-add-to-list): Rename add-to-diary-list. Keep old name as alias,
update callers.
(diary-include-other-diary-files): Rename include-other-diary-files.
Keep old name as alias, update callers.
(diary-simple-display): Rename simple-diary-display. Keep old name as alias,
update callers.
(diary-fancy-display): Rename fancy-diary-display. Keep old name as alias,
update callers.
(diary-print-entries): Rename print-diary-entries. Keep old name as alias,
update callers.
(diary-marking-entries-flag): Rename marking-diary-entries. Update users.
(diary-marking-entry-flag): Rename marking-diary-entry. Update users.
(diary-mark-entries): Rename mark-diary-entries. Keep old name as alias,
update callers.
(diary-mark-sexp-entries): Rename mark-sexp-diary-entries.
Keep old name as alias, update callers.
(diary-mark-included-diary-files): Rename mark-included-diary-files.
Keep old name as alias, update callers.
(calendar-mark-days-named): Rename mark-calendar-days-named.
Keep old name as alias, update callers.
(calendar-mark-month): Rename mark-calendar-month. Keep old name as alias,
update callers.
(calendar-mark-date-pattern): Rename mark-calendar-date-pattern.
Keep old name as alias, update callers.
(diary-sort-entries): Rename sort-diary-entries. Keep old name as alias,
update callers.
(diary-list-sexp-entries): Rename list-sexp-diary-entries.
Keep old name as alias, update callers.
(diary-make-entry): Rename make-diary-entry. Keep old name as alias,
update callers.
(diary-insert-entry): Rename insert-diary-entry. Keep old name as alias.
(diary-insert-weekly-entry): Rename insert-weekly-diary-entry.
Keep old name as alias.
(diary-insert-monthly-entry): Rename insert-monthly-diary-entry.
Keep old name as alias.
(diary-insert-yearly-entry): Rename insert-yearly-diary-entry.
Keep old name as alias.
(diary-insert-anniversary-entry): Rename insert-anniversary-diary-entry.
Keep old name as alias.
(diary-insert-block-entry): Rename insert-block-diary-entry.
Keep old name as alias.
(diary-insert-cyclic-entry): Rename insert-cyclic-diary-entry.
Keep old name as alias.
(diary-fancy-font-lock-keywords): Rename fancy-diary-font-lock-keywords.
Keep old name as alias, update users.
(diary-fancy-display-mode): Rename fancy-diary-display-mode.
Keep old name as alias, update callers.
2008-04-06 20:53:14 +00:00
|
|
|
|
(let ((diary-marking-entries-flag t)
|
2011-06-25 22:10:21 +00:00
|
|
|
|
(diary-buffer (find-buffer-visiting diary-file))
|
2011-06-25 22:33:29 +00:00
|
|
|
|
;; Dynamically bound in diary-include-files.
|
2011-06-25 22:10:21 +00:00
|
|
|
|
(d-incp (and (boundp 'diary-including) diary-including))
|
|
|
|
|
file-glob-attrs temp-buff)
|
|
|
|
|
(unless d-incp
|
2011-06-25 22:22:47 +00:00
|
|
|
|
(setq diary-included-files nil)
|
2011-06-25 22:10:21 +00:00
|
|
|
|
(message "Marking diary entries..."))
|
|
|
|
|
(unwind-protect
|
|
|
|
|
(with-current-buffer (or diary-buffer
|
|
|
|
|
(if d-incp
|
|
|
|
|
(setq temp-buff (generate-new-buffer
|
|
|
|
|
" *diary-temp*"))
|
|
|
|
|
(find-file-noselect
|
|
|
|
|
(diary-check-diary-file) t)))
|
|
|
|
|
(if temp-buff
|
|
|
|
|
;; If including, caller has already verified it is readable.
|
|
|
|
|
(insert-file-contents diary-file)
|
|
|
|
|
(if (eq major-mode (default-value 'major-mode)) (diary-mode)))
|
|
|
|
|
(setq calendar-mark-diary-entries-flag t)
|
|
|
|
|
(setq file-glob-attrs (nth 1 (diary-pull-attrs nil '())))
|
|
|
|
|
(with-syntax-table diary-syntax-table
|
|
|
|
|
(save-excursion
|
2018-11-25 13:04:58 +00:00
|
|
|
|
(save-restriction
|
|
|
|
|
(widen) ; bug#33423
|
|
|
|
|
(diary-mark-entries-1 'calendar-mark-date-pattern)
|
|
|
|
|
(diary-mark-sexp-entries)
|
|
|
|
|
;; Although it looks like mark-entries-hook runs every time,
|
|
|
|
|
;; diary-mark-included-diary-files binds it to nil
|
|
|
|
|
;; (essentially) when it runs in included files.
|
|
|
|
|
(run-hooks 'diary-nongregorian-marking-hook
|
|
|
|
|
'diary-mark-entries-hook)))))
|
2011-06-25 22:10:21 +00:00
|
|
|
|
(and temp-buff (buffer-name temp-buff) (kill-buffer temp-buff)))
|
|
|
|
|
(or d-incp (message "Marking diary entries...done"))))
|
1995-09-21 03:11:06 +00:00
|
|
|
|
|
2008-03-26 03:26:43 +00:00
|
|
|
|
(defun diary-sexp-entry (sexp entry date)
|
|
|
|
|
"Process a SEXP diary ENTRY for DATE."
|
2017-12-04 22:03:32 +00:00
|
|
|
|
(let ((result
|
|
|
|
|
(calendar-dlet* ((date date)
|
|
|
|
|
(entry entry))
|
|
|
|
|
(if calendar-debug-sexp
|
|
|
|
|
(let ((debug-on-error t))
|
|
|
|
|
(eval (car (read-from-string sexp))))
|
|
|
|
|
(condition-case err
|
|
|
|
|
(eval (car (read-from-string sexp)))
|
|
|
|
|
(error
|
|
|
|
|
(display-warning
|
|
|
|
|
'diary
|
|
|
|
|
(format "Bad diary sexp at line %d in %s:\n%s\n\
|
|
|
|
|
Error: %S\n"
|
|
|
|
|
(count-lines (point-min) (point))
|
|
|
|
|
diary-file sexp err)
|
|
|
|
|
:error)
|
|
|
|
|
nil))))))
|
2008-03-26 03:26:43 +00:00
|
|
|
|
(cond ((stringp result) result)
|
|
|
|
|
((and (consp result)
|
2017-12-04 22:03:32 +00:00
|
|
|
|
(stringp (cdr result)))
|
|
|
|
|
result)
|
2008-03-26 03:26:43 +00:00
|
|
|
|
(result entry)
|
|
|
|
|
(t nil))))
|
|
|
|
|
|
(diary-sexp-entry-symbol): Rename sexp-diary-entry-symbol.
Keep old name as alias, update users.
(diary-list-entries-hook): Rename list-diary-entries-hook.
Keep old name as alias, update users.
(diary-mark-entries-hook): Rename mark-diary-entries-hook.
Keep old name as alias, update users.
(diary-nongregorian-listing-hook): Rename nongregorian-diary-listing-hook.
Keep old name as alias, update users.
(diary-nongregorian-marking-hook): Rename nongregorian-diary-marking-hook.
Keep old name as alias, update users.
(diary-print-entries-hook): Rename print-diary-entries-hook.
Keep old name as alias, update users.
(diary-abbreviated-year-flag): Rename abbreviated-calendar-year.
Keep old name as alias, update users.
(diary-number-of-entries): Rename number-of-diary-entries.
Keep old name as alias, update users.
(view-diary-entries, list-diary-entries, show-all-diary-entries):
Give version of obsolescence.
(diary-view-other-diary-entries): Rename view-other-diary-entries.
Keep old name as alias, update callers.
(diary-add-to-list): Rename add-to-diary-list. Keep old name as alias,
update callers.
(diary-include-other-diary-files): Rename include-other-diary-files.
Keep old name as alias, update callers.
(diary-simple-display): Rename simple-diary-display. Keep old name as alias,
update callers.
(diary-fancy-display): Rename fancy-diary-display. Keep old name as alias,
update callers.
(diary-print-entries): Rename print-diary-entries. Keep old name as alias,
update callers.
(diary-marking-entries-flag): Rename marking-diary-entries. Update users.
(diary-marking-entry-flag): Rename marking-diary-entry. Update users.
(diary-mark-entries): Rename mark-diary-entries. Keep old name as alias,
update callers.
(diary-mark-sexp-entries): Rename mark-sexp-diary-entries.
Keep old name as alias, update callers.
(diary-mark-included-diary-files): Rename mark-included-diary-files.
Keep old name as alias, update callers.
(calendar-mark-days-named): Rename mark-calendar-days-named.
Keep old name as alias, update callers.
(calendar-mark-month): Rename mark-calendar-month. Keep old name as alias,
update callers.
(calendar-mark-date-pattern): Rename mark-calendar-date-pattern.
Keep old name as alias, update callers.
(diary-sort-entries): Rename sort-diary-entries. Keep old name as alias,
update callers.
(diary-list-sexp-entries): Rename list-sexp-diary-entries.
Keep old name as alias, update callers.
(diary-make-entry): Rename make-diary-entry. Keep old name as alias,
update callers.
(diary-insert-entry): Rename insert-diary-entry. Keep old name as alias.
(diary-insert-weekly-entry): Rename insert-weekly-diary-entry.
Keep old name as alias.
(diary-insert-monthly-entry): Rename insert-monthly-diary-entry.
Keep old name as alias.
(diary-insert-yearly-entry): Rename insert-yearly-diary-entry.
Keep old name as alias.
(diary-insert-anniversary-entry): Rename insert-anniversary-diary-entry.
Keep old name as alias.
(diary-insert-block-entry): Rename insert-block-diary-entry.
Keep old name as alias.
(diary-insert-cyclic-entry): Rename insert-cyclic-diary-entry.
Keep old name as alias.
(diary-fancy-font-lock-keywords): Rename fancy-diary-font-lock-keywords.
Keep old name as alias, update users.
(diary-fancy-display-mode): Rename fancy-diary-display-mode.
Keep old name as alias, update callers.
2008-04-06 20:53:14 +00:00
|
|
|
|
(defun diary-mark-sexp-entries ()
|
1995-09-21 03:11:06 +00:00
|
|
|
|
"Mark days in the calendar window that have sexp diary entries.
|
|
|
|
|
Each entry in the diary file (or included files) visible in the calendar window
|
(diary-sexp-entry-symbol): Rename sexp-diary-entry-symbol.
Keep old name as alias, update users.
(diary-list-entries-hook): Rename list-diary-entries-hook.
Keep old name as alias, update users.
(diary-mark-entries-hook): Rename mark-diary-entries-hook.
Keep old name as alias, update users.
(diary-nongregorian-listing-hook): Rename nongregorian-diary-listing-hook.
Keep old name as alias, update users.
(diary-nongregorian-marking-hook): Rename nongregorian-diary-marking-hook.
Keep old name as alias, update users.
(diary-print-entries-hook): Rename print-diary-entries-hook.
Keep old name as alias, update users.
(diary-abbreviated-year-flag): Rename abbreviated-calendar-year.
Keep old name as alias, update users.
(diary-number-of-entries): Rename number-of-diary-entries.
Keep old name as alias, update users.
(view-diary-entries, list-diary-entries, show-all-diary-entries):
Give version of obsolescence.
(diary-view-other-diary-entries): Rename view-other-diary-entries.
Keep old name as alias, update callers.
(diary-add-to-list): Rename add-to-diary-list. Keep old name as alias,
update callers.
(diary-include-other-diary-files): Rename include-other-diary-files.
Keep old name as alias, update callers.
(diary-simple-display): Rename simple-diary-display. Keep old name as alias,
update callers.
(diary-fancy-display): Rename fancy-diary-display. Keep old name as alias,
update callers.
(diary-print-entries): Rename print-diary-entries. Keep old name as alias,
update callers.
(diary-marking-entries-flag): Rename marking-diary-entries. Update users.
(diary-marking-entry-flag): Rename marking-diary-entry. Update users.
(diary-mark-entries): Rename mark-diary-entries. Keep old name as alias,
update callers.
(diary-mark-sexp-entries): Rename mark-sexp-diary-entries.
Keep old name as alias, update callers.
(diary-mark-included-diary-files): Rename mark-included-diary-files.
Keep old name as alias, update callers.
(calendar-mark-days-named): Rename mark-calendar-days-named.
Keep old name as alias, update callers.
(calendar-mark-month): Rename mark-calendar-month. Keep old name as alias,
update callers.
(calendar-mark-date-pattern): Rename mark-calendar-date-pattern.
Keep old name as alias, update callers.
(diary-sort-entries): Rename sort-diary-entries. Keep old name as alias,
update callers.
(diary-list-sexp-entries): Rename list-sexp-diary-entries.
Keep old name as alias, update callers.
(diary-make-entry): Rename make-diary-entry. Keep old name as alias,
update callers.
(diary-insert-entry): Rename insert-diary-entry. Keep old name as alias.
(diary-insert-weekly-entry): Rename insert-weekly-diary-entry.
Keep old name as alias.
(diary-insert-monthly-entry): Rename insert-monthly-diary-entry.
Keep old name as alias.
(diary-insert-yearly-entry): Rename insert-yearly-diary-entry.
Keep old name as alias.
(diary-insert-anniversary-entry): Rename insert-anniversary-diary-entry.
Keep old name as alias.
(diary-insert-block-entry): Rename insert-block-diary-entry.
Keep old name as alias.
(diary-insert-cyclic-entry): Rename insert-cyclic-diary-entry.
Keep old name as alias.
(diary-fancy-font-lock-keywords): Rename fancy-diary-font-lock-keywords.
Keep old name as alias, update users.
(diary-fancy-display-mode): Rename fancy-diary-display-mode.
Keep old name as alias, update callers.
2008-04-06 20:53:14 +00:00
|
|
|
|
is marked. See the documentation for the function `diary-list-sexp-entries'."
|
|
|
|
|
(let* ((sexp-mark (regexp-quote diary-sexp-entry-symbol))
|
2008-03-16 01:27:15 +00:00
|
|
|
|
(s-entry (format "^\\(%s(\\)\\|\\(%s%s(diary-remind\\)" sexp-mark
|
1995-09-21 03:11:06 +00:00
|
|
|
|
(regexp-quote diary-nonmarking-symbol)
|
2008-03-16 01:27:15 +00:00
|
|
|
|
sexp-mark))
|
(diary-check-diary-file): New function.
(diary, view-diary-entries, show-all-diary-entries)
(mark-diary-entries): Use it.
(view-other-diary-entries): Doc fix. Use `prefix-numeric-value'.
(diary-syntax-table, diary-attrtype-convert, diary-mail-days): Doc fix.
(diary-modified, d-file): No need to defvar (for compiler).
(list-diary-entries): No need for `let*' so use `let'.
(simple-diary-display): Use `diary-file' directly rather than
inheriting `d-file' from `list-diary-entries' caller.
(make-fancy-diary-buffer, show-all-diary-entries): `mode-line-format'
already buffer-local.
(diary-mail-addr): Set to the empty string (rather than nil) if
undefined, as per `user-mail-address'.
(diary-mail-entries): Doc fix. Error if `diary-mail-address' unset.
(mark-sexp-diary-entries): Don't regexp-quote sexp-mark twice.
Remove an un-needed `if'.
(list-sexp-diary-entries): Remove local vars mark and s-entry, and
use `let' rather than `let*'.
(diary-date, insert-monthly-diary-entry)
(insert-yearly-diary-entry, insert-anniversary-diary-entry)
(insert-block-diary-entry, insert-cyclic-diary-entry)
(font-lock-diary-date-forms): No need for `let*' so use `let'.
(make-diary-entry): Doc fix. Use `or' rather than `if'.
(diary-font-lock-keywords): Use `when'. `cal-islam' is required
feature, not `cal-islamic'.
`calendar-islamic-month-name-array-leap-year' does not exist - use
`calendar-islamic-month-name-array'.
2003-06-22 01:02:22 +00:00
|
|
|
|
(file-glob-attrs (nth 1 (diary-pull-attrs nil '())))
|
2008-04-02 03:34:23 +00:00
|
|
|
|
m y first-date last-date date mark file-glob-attrs
|
|
|
|
|
sexp-start sexp entry entry-start)
|
2005-09-12 21:21:42 +00:00
|
|
|
|
(with-current-buffer calendar-buffer
|
2008-03-16 01:27:15 +00:00
|
|
|
|
(setq m displayed-month
|
|
|
|
|
y displayed-year))
|
2008-04-07 01:59:37 +00:00
|
|
|
|
(calendar-increment-month m y -1)
|
2008-04-10 05:20:15 +00:00
|
|
|
|
(setq first-date (calendar-absolute-from-gregorian (list m 1 y)))
|
2008-04-07 01:59:37 +00:00
|
|
|
|
(calendar-increment-month m y 2)
|
1995-09-21 03:11:06 +00:00
|
|
|
|
(setq last-date
|
|
|
|
|
(calendar-absolute-from-gregorian
|
|
|
|
|
(list m (calendar-last-day-of-month m y) y)))
|
|
|
|
|
(goto-char (point-min))
|
|
|
|
|
(while (re-search-forward s-entry nil t)
|
(diary-sexp-entry-symbol): Rename sexp-diary-entry-symbol.
Keep old name as alias, update users.
(diary-list-entries-hook): Rename list-diary-entries-hook.
Keep old name as alias, update users.
(diary-mark-entries-hook): Rename mark-diary-entries-hook.
Keep old name as alias, update users.
(diary-nongregorian-listing-hook): Rename nongregorian-diary-listing-hook.
Keep old name as alias, update users.
(diary-nongregorian-marking-hook): Rename nongregorian-diary-marking-hook.
Keep old name as alias, update users.
(diary-print-entries-hook): Rename print-diary-entries-hook.
Keep old name as alias, update users.
(diary-abbreviated-year-flag): Rename abbreviated-calendar-year.
Keep old name as alias, update users.
(diary-number-of-entries): Rename number-of-diary-entries.
Keep old name as alias, update users.
(view-diary-entries, list-diary-entries, show-all-diary-entries):
Give version of obsolescence.
(diary-view-other-diary-entries): Rename view-other-diary-entries.
Keep old name as alias, update callers.
(diary-add-to-list): Rename add-to-diary-list. Keep old name as alias,
update callers.
(diary-include-other-diary-files): Rename include-other-diary-files.
Keep old name as alias, update callers.
(diary-simple-display): Rename simple-diary-display. Keep old name as alias,
update callers.
(diary-fancy-display): Rename fancy-diary-display. Keep old name as alias,
update callers.
(diary-print-entries): Rename print-diary-entries. Keep old name as alias,
update callers.
(diary-marking-entries-flag): Rename marking-diary-entries. Update users.
(diary-marking-entry-flag): Rename marking-diary-entry. Update users.
(diary-mark-entries): Rename mark-diary-entries. Keep old name as alias,
update callers.
(diary-mark-sexp-entries): Rename mark-sexp-diary-entries.
Keep old name as alias, update callers.
(diary-mark-included-diary-files): Rename mark-included-diary-files.
Keep old name as alias, update callers.
(calendar-mark-days-named): Rename mark-calendar-days-named.
Keep old name as alias, update callers.
(calendar-mark-month): Rename mark-calendar-month. Keep old name as alias,
update callers.
(calendar-mark-date-pattern): Rename mark-calendar-date-pattern.
Keep old name as alias, update callers.
(diary-sort-entries): Rename sort-diary-entries. Keep old name as alias,
update callers.
(diary-list-sexp-entries): Rename list-sexp-diary-entries.
Keep old name as alias, update callers.
(diary-make-entry): Rename make-diary-entry. Keep old name as alias,
update callers.
(diary-insert-entry): Rename insert-diary-entry. Keep old name as alias.
(diary-insert-weekly-entry): Rename insert-weekly-diary-entry.
Keep old name as alias.
(diary-insert-monthly-entry): Rename insert-monthly-diary-entry.
Keep old name as alias.
(diary-insert-yearly-entry): Rename insert-yearly-diary-entry.
Keep old name as alias.
(diary-insert-anniversary-entry): Rename insert-anniversary-diary-entry.
Keep old name as alias.
(diary-insert-block-entry): Rename insert-block-diary-entry.
Keep old name as alias.
(diary-insert-cyclic-entry): Rename insert-cyclic-diary-entry.
Keep old name as alias.
(diary-fancy-font-lock-keywords): Rename fancy-diary-font-lock-keywords.
Keep old name as alias, update users.
(diary-fancy-display-mode): Rename fancy-diary-display-mode.
Keep old name as alias, update callers.
2008-04-06 20:53:14 +00:00
|
|
|
|
(setq diary-marking-entry-flag (char-equal (preceding-char) ?\())
|
1995-09-21 03:11:06 +00:00
|
|
|
|
(re-search-backward "(")
|
2008-04-02 03:34:23 +00:00
|
|
|
|
(setq sexp-start (point))
|
|
|
|
|
(forward-sexp)
|
|
|
|
|
(setq sexp (buffer-substring-no-properties sexp-start (point)))
|
|
|
|
|
(forward-char 1)
|
|
|
|
|
(if (and (bolp) (not (looking-at "[ \t]")))
|
|
|
|
|
;; Diary entry consists only of the sexp.
|
|
|
|
|
(progn
|
|
|
|
|
(backward-char 1)
|
|
|
|
|
(setq entry ""))
|
|
|
|
|
(setq entry-start (point))
|
|
|
|
|
;; Find end of entry.
|
|
|
|
|
(forward-line 1)
|
|
|
|
|
(while (looking-at "[ \t]")
|
|
|
|
|
(forward-line 1))
|
|
|
|
|
(if (bolp) (backward-char 1))
|
|
|
|
|
(setq entry (buffer-substring-no-properties entry-start (point))))
|
2008-04-10 05:20:15 +00:00
|
|
|
|
(setq date (1- first-date))
|
2008-04-11 03:46:35 +00:00
|
|
|
|
;; FIXME this loops over all visible dates.
|
|
|
|
|
;; Could be optimized in many cases. Depends on whether t or * present.
|
2008-04-02 03:34:23 +00:00
|
|
|
|
(while (<= (setq date (1+ date)) last-date)
|
|
|
|
|
(when (setq mark (diary-sexp-entry
|
|
|
|
|
sexp entry
|
|
|
|
|
(calendar-gregorian-from-absolute date)))
|
2008-04-07 01:59:37 +00:00
|
|
|
|
(calendar-mark-visible-date
|
2008-04-02 03:34:23 +00:00
|
|
|
|
(calendar-gregorian-from-absolute date)
|
|
|
|
|
(or (cadr (diary-pull-attrs entry file-glob-attrs))
|
|
|
|
|
(if (consp mark) (car mark)))))))))
|
1995-09-21 03:11:06 +00:00
|
|
|
|
|
(diary-sexp-entry-symbol): Rename sexp-diary-entry-symbol.
Keep old name as alias, update users.
(diary-list-entries-hook): Rename list-diary-entries-hook.
Keep old name as alias, update users.
(diary-mark-entries-hook): Rename mark-diary-entries-hook.
Keep old name as alias, update users.
(diary-nongregorian-listing-hook): Rename nongregorian-diary-listing-hook.
Keep old name as alias, update users.
(diary-nongregorian-marking-hook): Rename nongregorian-diary-marking-hook.
Keep old name as alias, update users.
(diary-print-entries-hook): Rename print-diary-entries-hook.
Keep old name as alias, update users.
(diary-abbreviated-year-flag): Rename abbreviated-calendar-year.
Keep old name as alias, update users.
(diary-number-of-entries): Rename number-of-diary-entries.
Keep old name as alias, update users.
(view-diary-entries, list-diary-entries, show-all-diary-entries):
Give version of obsolescence.
(diary-view-other-diary-entries): Rename view-other-diary-entries.
Keep old name as alias, update callers.
(diary-add-to-list): Rename add-to-diary-list. Keep old name as alias,
update callers.
(diary-include-other-diary-files): Rename include-other-diary-files.
Keep old name as alias, update callers.
(diary-simple-display): Rename simple-diary-display. Keep old name as alias,
update callers.
(diary-fancy-display): Rename fancy-diary-display. Keep old name as alias,
update callers.
(diary-print-entries): Rename print-diary-entries. Keep old name as alias,
update callers.
(diary-marking-entries-flag): Rename marking-diary-entries. Update users.
(diary-marking-entry-flag): Rename marking-diary-entry. Update users.
(diary-mark-entries): Rename mark-diary-entries. Keep old name as alias,
update callers.
(diary-mark-sexp-entries): Rename mark-sexp-diary-entries.
Keep old name as alias, update callers.
(diary-mark-included-diary-files): Rename mark-included-diary-files.
Keep old name as alias, update callers.
(calendar-mark-days-named): Rename mark-calendar-days-named.
Keep old name as alias, update callers.
(calendar-mark-month): Rename mark-calendar-month. Keep old name as alias,
update callers.
(calendar-mark-date-pattern): Rename mark-calendar-date-pattern.
Keep old name as alias, update callers.
(diary-sort-entries): Rename sort-diary-entries. Keep old name as alias,
update callers.
(diary-list-sexp-entries): Rename list-sexp-diary-entries.
Keep old name as alias, update callers.
(diary-make-entry): Rename make-diary-entry. Keep old name as alias,
update callers.
(diary-insert-entry): Rename insert-diary-entry. Keep old name as alias.
(diary-insert-weekly-entry): Rename insert-weekly-diary-entry.
Keep old name as alias.
(diary-insert-monthly-entry): Rename insert-monthly-diary-entry.
Keep old name as alias.
(diary-insert-yearly-entry): Rename insert-yearly-diary-entry.
Keep old name as alias.
(diary-insert-anniversary-entry): Rename insert-anniversary-diary-entry.
Keep old name as alias.
(diary-insert-block-entry): Rename insert-block-diary-entry.
Keep old name as alias.
(diary-insert-cyclic-entry): Rename insert-cyclic-diary-entry.
Keep old name as alias.
(diary-fancy-font-lock-keywords): Rename fancy-diary-font-lock-keywords.
Keep old name as alias, update users.
(diary-fancy-display-mode): Rename fancy-diary-display-mode.
Keep old name as alias, update callers.
2008-04-06 20:53:14 +00:00
|
|
|
|
(defun diary-mark-included-diary-files ()
|
2011-05-10 02:22:55 +00:00
|
|
|
|
"Mark diary entries from included diary files.
|
|
|
|
|
To use, add this function to `diary-mark-entries-hook'.
|
2011-06-25 22:22:47 +00:00
|
|
|
|
For details, see `diary-include-files'.
|
2011-05-10 02:22:55 +00:00
|
|
|
|
See also `diary-include-other-diary-files'."
|
2011-06-25 22:22:47 +00:00
|
|
|
|
(diary-include-files t))
|
1995-09-21 03:11:06 +00:00
|
|
|
|
|
(diary-sexp-entry-symbol): Rename sexp-diary-entry-symbol.
Keep old name as alias, update users.
(diary-list-entries-hook): Rename list-diary-entries-hook.
Keep old name as alias, update users.
(diary-mark-entries-hook): Rename mark-diary-entries-hook.
Keep old name as alias, update users.
(diary-nongregorian-listing-hook): Rename nongregorian-diary-listing-hook.
Keep old name as alias, update users.
(diary-nongregorian-marking-hook): Rename nongregorian-diary-marking-hook.
Keep old name as alias, update users.
(diary-print-entries-hook): Rename print-diary-entries-hook.
Keep old name as alias, update users.
(diary-abbreviated-year-flag): Rename abbreviated-calendar-year.
Keep old name as alias, update users.
(diary-number-of-entries): Rename number-of-diary-entries.
Keep old name as alias, update users.
(view-diary-entries, list-diary-entries, show-all-diary-entries):
Give version of obsolescence.
(diary-view-other-diary-entries): Rename view-other-diary-entries.
Keep old name as alias, update callers.
(diary-add-to-list): Rename add-to-diary-list. Keep old name as alias,
update callers.
(diary-include-other-diary-files): Rename include-other-diary-files.
Keep old name as alias, update callers.
(diary-simple-display): Rename simple-diary-display. Keep old name as alias,
update callers.
(diary-fancy-display): Rename fancy-diary-display. Keep old name as alias,
update callers.
(diary-print-entries): Rename print-diary-entries. Keep old name as alias,
update callers.
(diary-marking-entries-flag): Rename marking-diary-entries. Update users.
(diary-marking-entry-flag): Rename marking-diary-entry. Update users.
(diary-mark-entries): Rename mark-diary-entries. Keep old name as alias,
update callers.
(diary-mark-sexp-entries): Rename mark-sexp-diary-entries.
Keep old name as alias, update callers.
(diary-mark-included-diary-files): Rename mark-included-diary-files.
Keep old name as alias, update callers.
(calendar-mark-days-named): Rename mark-calendar-days-named.
Keep old name as alias, update callers.
(calendar-mark-month): Rename mark-calendar-month. Keep old name as alias,
update callers.
(calendar-mark-date-pattern): Rename mark-calendar-date-pattern.
Keep old name as alias, update callers.
(diary-sort-entries): Rename sort-diary-entries. Keep old name as alias,
update callers.
(diary-list-sexp-entries): Rename list-sexp-diary-entries.
Keep old name as alias, update callers.
(diary-make-entry): Rename make-diary-entry. Keep old name as alias,
update callers.
(diary-insert-entry): Rename insert-diary-entry. Keep old name as alias.
(diary-insert-weekly-entry): Rename insert-weekly-diary-entry.
Keep old name as alias.
(diary-insert-monthly-entry): Rename insert-monthly-diary-entry.
Keep old name as alias.
(diary-insert-yearly-entry): Rename insert-yearly-diary-entry.
Keep old name as alias.
(diary-insert-anniversary-entry): Rename insert-anniversary-diary-entry.
Keep old name as alias.
(diary-insert-block-entry): Rename insert-block-diary-entry.
Keep old name as alias.
(diary-insert-cyclic-entry): Rename insert-cyclic-diary-entry.
Keep old name as alias.
(diary-fancy-font-lock-keywords): Rename fancy-diary-font-lock-keywords.
Keep old name as alias, update users.
(diary-fancy-display-mode): Rename fancy-diary-display-mode.
Keep old name as alias, update callers.
2008-04-06 20:53:14 +00:00
|
|
|
|
(defun calendar-mark-days-named (dayname &optional color)
|
1995-09-21 03:11:06 +00:00
|
|
|
|
"Mark all dates in the calendar window that are day DAYNAME of the week.
|
(diary-face-attrs): Fix custom :type.
(diary-face-attrs, diary-glob-file-regexp-prefix, diary-unknown-time)
(diary-pull-attrs, diary-header-line-flag, diary-list-entries)
(diary-unhide-everything, include-other-diary-files, diary-goto-entry)
(mark-included-diary-files, mark-calendar-days-named)
(mark-calendar-date-pattern, mark-calendar-month, diary-entry-compare)
(diary-remind, insert-diary-entry, insert-weekly-diary-entry)
(insert-monthly-diary-entry, insert-yearly-diary-entry)
(insert-anniversary-diary-entry, insert-block-diary-entry)
(insert-cyclic-diary-entry, fancy-diary-font-lock-keywords)
(diary-font-lock-sexps): Doc fixes.
(diary-remind-message, mark-calendar-month): Use zerop.
(diary-attrtype-convert, diary-pull-attrs): Simplify.
(diary-list-entries): Revert let to let* (previous change).
2008-03-10 02:44:51 +00:00
|
|
|
|
0 means all Sundays, 1 means all Mondays, and so on.
|
2008-04-07 01:59:37 +00:00
|
|
|
|
Optional argument COLOR is passed to `calendar-mark-visible-date' as MARK."
|
2005-09-12 21:21:42 +00:00
|
|
|
|
(with-current-buffer calendar-buffer
|
1995-09-21 03:11:06 +00:00
|
|
|
|
(let ((prev-month displayed-month)
|
|
|
|
|
(prev-year displayed-year)
|
|
|
|
|
(succ-month displayed-month)
|
|
|
|
|
(succ-year displayed-year)
|
|
|
|
|
(last-day)
|
|
|
|
|
(day))
|
2008-04-07 01:59:37 +00:00
|
|
|
|
(calendar-increment-month succ-month succ-year 1)
|
|
|
|
|
(calendar-increment-month prev-month prev-year -1)
|
1995-09-21 03:11:06 +00:00
|
|
|
|
(setq day (calendar-absolute-from-gregorian
|
(diary-face-attrs): Fix custom :type.
(diary-face-attrs, diary-glob-file-regexp-prefix, diary-unknown-time)
(diary-pull-attrs, diary-header-line-flag, diary-list-entries)
(diary-unhide-everything, include-other-diary-files, diary-goto-entry)
(mark-included-diary-files, mark-calendar-days-named)
(mark-calendar-date-pattern, mark-calendar-month, diary-entry-compare)
(diary-remind, insert-diary-entry, insert-weekly-diary-entry)
(insert-monthly-diary-entry, insert-yearly-diary-entry)
(insert-anniversary-diary-entry, insert-block-diary-entry)
(insert-cyclic-diary-entry, fancy-diary-font-lock-keywords)
(diary-font-lock-sexps): Doc fixes.
(diary-remind-message, mark-calendar-month): Use zerop.
(diary-attrtype-convert, diary-pull-attrs): Simplify.
(diary-list-entries): Revert let to let* (previous change).
2008-03-10 02:44:51 +00:00
|
|
|
|
(calendar-nth-named-day 1 dayname prev-month prev-year))
|
2008-03-13 06:29:28 +00:00
|
|
|
|
last-day (calendar-absolute-from-gregorian
|
2008-03-13 06:40:31 +00:00
|
|
|
|
(calendar-nth-named-day -1 dayname succ-month succ-year)))
|
1995-09-21 03:11:06 +00:00
|
|
|
|
(while (<= day last-day)
|
2008-04-07 01:59:37 +00:00
|
|
|
|
(calendar-mark-visible-date (calendar-gregorian-from-absolute day)
|
2008-03-13 06:29:28 +00:00
|
|
|
|
color)
|
1995-09-21 03:11:06 +00:00
|
|
|
|
(setq day (+ day 7))))))
|
|
|
|
|
|
(diary-sexp-entry-symbol): Rename sexp-diary-entry-symbol.
Keep old name as alias, update users.
(diary-list-entries-hook): Rename list-diary-entries-hook.
Keep old name as alias, update users.
(diary-mark-entries-hook): Rename mark-diary-entries-hook.
Keep old name as alias, update users.
(diary-nongregorian-listing-hook): Rename nongregorian-diary-listing-hook.
Keep old name as alias, update users.
(diary-nongregorian-marking-hook): Rename nongregorian-diary-marking-hook.
Keep old name as alias, update users.
(diary-print-entries-hook): Rename print-diary-entries-hook.
Keep old name as alias, update users.
(diary-abbreviated-year-flag): Rename abbreviated-calendar-year.
Keep old name as alias, update users.
(diary-number-of-entries): Rename number-of-diary-entries.
Keep old name as alias, update users.
(view-diary-entries, list-diary-entries, show-all-diary-entries):
Give version of obsolescence.
(diary-view-other-diary-entries): Rename view-other-diary-entries.
Keep old name as alias, update callers.
(diary-add-to-list): Rename add-to-diary-list. Keep old name as alias,
update callers.
(diary-include-other-diary-files): Rename include-other-diary-files.
Keep old name as alias, update callers.
(diary-simple-display): Rename simple-diary-display. Keep old name as alias,
update callers.
(diary-fancy-display): Rename fancy-diary-display. Keep old name as alias,
update callers.
(diary-print-entries): Rename print-diary-entries. Keep old name as alias,
update callers.
(diary-marking-entries-flag): Rename marking-diary-entries. Update users.
(diary-marking-entry-flag): Rename marking-diary-entry. Update users.
(diary-mark-entries): Rename mark-diary-entries. Keep old name as alias,
update callers.
(diary-mark-sexp-entries): Rename mark-sexp-diary-entries.
Keep old name as alias, update callers.
(diary-mark-included-diary-files): Rename mark-included-diary-files.
Keep old name as alias, update callers.
(calendar-mark-days-named): Rename mark-calendar-days-named.
Keep old name as alias, update callers.
(calendar-mark-month): Rename mark-calendar-month. Keep old name as alias,
update callers.
(calendar-mark-date-pattern): Rename mark-calendar-date-pattern.
Keep old name as alias, update callers.
(diary-sort-entries): Rename sort-diary-entries. Keep old name as alias,
update callers.
(diary-list-sexp-entries): Rename list-sexp-diary-entries.
Keep old name as alias, update callers.
(diary-make-entry): Rename make-diary-entry. Keep old name as alias,
update callers.
(diary-insert-entry): Rename insert-diary-entry. Keep old name as alias.
(diary-insert-weekly-entry): Rename insert-weekly-diary-entry.
Keep old name as alias.
(diary-insert-monthly-entry): Rename insert-monthly-diary-entry.
Keep old name as alias.
(diary-insert-yearly-entry): Rename insert-yearly-diary-entry.
Keep old name as alias.
(diary-insert-anniversary-entry): Rename insert-anniversary-diary-entry.
Keep old name as alias.
(diary-insert-block-entry): Rename insert-block-diary-entry.
Keep old name as alias.
(diary-insert-cyclic-entry): Rename insert-cyclic-diary-entry.
Keep old name as alias.
(diary-fancy-font-lock-keywords): Rename fancy-diary-font-lock-keywords.
Keep old name as alias, update users.
(diary-fancy-display-mode): Rename fancy-diary-display-mode.
Keep old name as alias, update callers.
2008-04-06 20:53:14 +00:00
|
|
|
|
(defun calendar-mark-month (month year p-month p-day p-year &optional color)
|
(diary-face-attrs): Fix custom :type.
(diary-face-attrs, diary-glob-file-regexp-prefix, diary-unknown-time)
(diary-pull-attrs, diary-header-line-flag, diary-list-entries)
(diary-unhide-everything, include-other-diary-files, diary-goto-entry)
(mark-included-diary-files, mark-calendar-days-named)
(mark-calendar-date-pattern, mark-calendar-month, diary-entry-compare)
(diary-remind, insert-diary-entry, insert-weekly-diary-entry)
(insert-monthly-diary-entry, insert-yearly-diary-entry)
(insert-anniversary-diary-entry, insert-block-diary-entry)
(insert-cyclic-diary-entry, fancy-diary-font-lock-keywords)
(diary-font-lock-sexps): Doc fixes.
(diary-remind-message, mark-calendar-month): Use zerop.
(diary-attrtype-convert, diary-pull-attrs): Simplify.
(diary-list-entries): Revert let to let* (previous change).
2008-03-10 02:44:51 +00:00
|
|
|
|
"Mark dates in the MONTH/YEAR that conform to pattern P-MONTH/P-DAY/P-YEAR.
|
|
|
|
|
A value of 0 in any position of the pattern is a wildcard.
|
2008-04-07 01:59:37 +00:00
|
|
|
|
Optional argument COLOR is passed to `calendar-mark-visible-date' as MARK."
|
1995-09-21 03:11:06 +00:00
|
|
|
|
(if (or (and (= month p-month)
|
(diary-face-attrs): Fix custom :type.
(diary-face-attrs, diary-glob-file-regexp-prefix, diary-unknown-time)
(diary-pull-attrs, diary-header-line-flag, diary-list-entries)
(diary-unhide-everything, include-other-diary-files, diary-goto-entry)
(mark-included-diary-files, mark-calendar-days-named)
(mark-calendar-date-pattern, mark-calendar-month, diary-entry-compare)
(diary-remind, insert-diary-entry, insert-weekly-diary-entry)
(insert-monthly-diary-entry, insert-yearly-diary-entry)
(insert-anniversary-diary-entry, insert-block-diary-entry)
(insert-cyclic-diary-entry, fancy-diary-font-lock-keywords)
(diary-font-lock-sexps): Doc fixes.
(diary-remind-message, mark-calendar-month): Use zerop.
(diary-attrtype-convert, diary-pull-attrs): Simplify.
(diary-list-entries): Revert let to let* (previous change).
2008-03-10 02:44:51 +00:00
|
|
|
|
(or (zerop p-year) (= year p-year)))
|
2008-03-13 05:54:57 +00:00
|
|
|
|
(and (zerop p-month)
|
(diary-face-attrs): Fix custom :type.
(diary-face-attrs, diary-glob-file-regexp-prefix, diary-unknown-time)
(diary-pull-attrs, diary-header-line-flag, diary-list-entries)
(diary-unhide-everything, include-other-diary-files, diary-goto-entry)
(mark-included-diary-files, mark-calendar-days-named)
(mark-calendar-date-pattern, mark-calendar-month, diary-entry-compare)
(diary-remind, insert-diary-entry, insert-weekly-diary-entry)
(insert-monthly-diary-entry, insert-yearly-diary-entry)
(insert-anniversary-diary-entry, insert-block-diary-entry)
(insert-cyclic-diary-entry, fancy-diary-font-lock-keywords)
(diary-font-lock-sexps): Doc fixes.
(diary-remind-message, mark-calendar-month): Use zerop.
(diary-attrtype-convert, diary-pull-attrs): Simplify.
(diary-list-entries): Revert let to let* (previous change).
2008-03-10 02:44:51 +00:00
|
|
|
|
(or (zerop p-year) (= year p-year))))
|
|
|
|
|
(if (zerop p-day)
|
(diary-face-attrs, diary-glob-file-regexp-prefix, diary-selective-display)
(number-of-diary-entries, diary-list-entries, diary-goto-entry):
(list-sexp-diary-entries, diary-date, diary-block, diary-float)
(diary-anniversary, diary-cyclic)
(diary-fancy-font-lock-fontify-region-function): Doc fixes.
(diary-header-line-format): Change wording.
(diary-list-entries): Set `date-start' in let.
(include-other-diary-files, mark-included-diary-files): Use format.
(simple-diary-display, fancy-diary-display): Use cadr, unless.
(mark-diary-entries): Use 1+.
(mark-sexp-diary-entries, list-sexp-diary-entries): Use when.
(mark-calendar-month): Use dotimes.
(diary-list-entries-1, diary-mark-entries-1): New functions.
2008-03-15 03:03:08 +00:00
|
|
|
|
(dotimes (i (calendar-last-day-of-month month year))
|
2008-04-07 01:59:37 +00:00
|
|
|
|
(calendar-mark-visible-date (list month (1+ i) year) color))
|
|
|
|
|
(calendar-mark-visible-date (list month p-day year) color))))
|
1995-09-21 03:11:06 +00:00
|
|
|
|
|
(diary-sexp-entry-symbol): Rename sexp-diary-entry-symbol.
Keep old name as alias, update users.
(diary-list-entries-hook): Rename list-diary-entries-hook.
Keep old name as alias, update users.
(diary-mark-entries-hook): Rename mark-diary-entries-hook.
Keep old name as alias, update users.
(diary-nongregorian-listing-hook): Rename nongregorian-diary-listing-hook.
Keep old name as alias, update users.
(diary-nongregorian-marking-hook): Rename nongregorian-diary-marking-hook.
Keep old name as alias, update users.
(diary-print-entries-hook): Rename print-diary-entries-hook.
Keep old name as alias, update users.
(diary-abbreviated-year-flag): Rename abbreviated-calendar-year.
Keep old name as alias, update users.
(diary-number-of-entries): Rename number-of-diary-entries.
Keep old name as alias, update users.
(view-diary-entries, list-diary-entries, show-all-diary-entries):
Give version of obsolescence.
(diary-view-other-diary-entries): Rename view-other-diary-entries.
Keep old name as alias, update callers.
(diary-add-to-list): Rename add-to-diary-list. Keep old name as alias,
update callers.
(diary-include-other-diary-files): Rename include-other-diary-files.
Keep old name as alias, update callers.
(diary-simple-display): Rename simple-diary-display. Keep old name as alias,
update callers.
(diary-fancy-display): Rename fancy-diary-display. Keep old name as alias,
update callers.
(diary-print-entries): Rename print-diary-entries. Keep old name as alias,
update callers.
(diary-marking-entries-flag): Rename marking-diary-entries. Update users.
(diary-marking-entry-flag): Rename marking-diary-entry. Update users.
(diary-mark-entries): Rename mark-diary-entries. Keep old name as alias,
update callers.
(diary-mark-sexp-entries): Rename mark-sexp-diary-entries.
Keep old name as alias, update callers.
(diary-mark-included-diary-files): Rename mark-included-diary-files.
Keep old name as alias, update callers.
(calendar-mark-days-named): Rename mark-calendar-days-named.
Keep old name as alias, update callers.
(calendar-mark-month): Rename mark-calendar-month. Keep old name as alias,
update callers.
(calendar-mark-date-pattern): Rename mark-calendar-date-pattern.
Keep old name as alias, update callers.
(diary-sort-entries): Rename sort-diary-entries. Keep old name as alias,
update callers.
(diary-list-sexp-entries): Rename list-sexp-diary-entries.
Keep old name as alias, update callers.
(diary-make-entry): Rename make-diary-entry. Keep old name as alias,
update callers.
(diary-insert-entry): Rename insert-diary-entry. Keep old name as alias.
(diary-insert-weekly-entry): Rename insert-weekly-diary-entry.
Keep old name as alias.
(diary-insert-monthly-entry): Rename insert-monthly-diary-entry.
Keep old name as alias.
(diary-insert-yearly-entry): Rename insert-yearly-diary-entry.
Keep old name as alias.
(diary-insert-anniversary-entry): Rename insert-anniversary-diary-entry.
Keep old name as alias.
(diary-insert-block-entry): Rename insert-block-diary-entry.
Keep old name as alias.
(diary-insert-cyclic-entry): Rename insert-cyclic-diary-entry.
Keep old name as alias.
(diary-fancy-font-lock-keywords): Rename fancy-diary-font-lock-keywords.
Keep old name as alias, update users.
(diary-fancy-display-mode): Rename fancy-diary-display-mode.
Keep old name as alias, update callers.
2008-04-06 20:53:14 +00:00
|
|
|
|
(defun calendar-mark-date-pattern (month day year &optional color)
|
2008-03-17 02:33:49 +00:00
|
|
|
|
"Mark all dates in the calendar window that conform to MONTH/DAY/YEAR.
|
|
|
|
|
A value of 0 in any position is a wildcard. Optional argument COLOR is
|
2008-04-07 01:59:37 +00:00
|
|
|
|
passed to `calendar-mark-visible-date' as MARK."
|
2008-03-17 02:33:49 +00:00
|
|
|
|
(with-current-buffer calendar-buffer
|
|
|
|
|
(let ((m displayed-month)
|
|
|
|
|
(y displayed-year))
|
2008-04-07 01:59:37 +00:00
|
|
|
|
(calendar-increment-month m y -1)
|
2017-12-04 22:03:32 +00:00
|
|
|
|
(dotimes (_ 3)
|
(diary-sexp-entry-symbol): Rename sexp-diary-entry-symbol.
Keep old name as alias, update users.
(diary-list-entries-hook): Rename list-diary-entries-hook.
Keep old name as alias, update users.
(diary-mark-entries-hook): Rename mark-diary-entries-hook.
Keep old name as alias, update users.
(diary-nongregorian-listing-hook): Rename nongregorian-diary-listing-hook.
Keep old name as alias, update users.
(diary-nongregorian-marking-hook): Rename nongregorian-diary-marking-hook.
Keep old name as alias, update users.
(diary-print-entries-hook): Rename print-diary-entries-hook.
Keep old name as alias, update users.
(diary-abbreviated-year-flag): Rename abbreviated-calendar-year.
Keep old name as alias, update users.
(diary-number-of-entries): Rename number-of-diary-entries.
Keep old name as alias, update users.
(view-diary-entries, list-diary-entries, show-all-diary-entries):
Give version of obsolescence.
(diary-view-other-diary-entries): Rename view-other-diary-entries.
Keep old name as alias, update callers.
(diary-add-to-list): Rename add-to-diary-list. Keep old name as alias,
update callers.
(diary-include-other-diary-files): Rename include-other-diary-files.
Keep old name as alias, update callers.
(diary-simple-display): Rename simple-diary-display. Keep old name as alias,
update callers.
(diary-fancy-display): Rename fancy-diary-display. Keep old name as alias,
update callers.
(diary-print-entries): Rename print-diary-entries. Keep old name as alias,
update callers.
(diary-marking-entries-flag): Rename marking-diary-entries. Update users.
(diary-marking-entry-flag): Rename marking-diary-entry. Update users.
(diary-mark-entries): Rename mark-diary-entries. Keep old name as alias,
update callers.
(diary-mark-sexp-entries): Rename mark-sexp-diary-entries.
Keep old name as alias, update callers.
(diary-mark-included-diary-files): Rename mark-included-diary-files.
Keep old name as alias, update callers.
(calendar-mark-days-named): Rename mark-calendar-days-named.
Keep old name as alias, update callers.
(calendar-mark-month): Rename mark-calendar-month. Keep old name as alias,
update callers.
(calendar-mark-date-pattern): Rename mark-calendar-date-pattern.
Keep old name as alias, update callers.
(diary-sort-entries): Rename sort-diary-entries. Keep old name as alias,
update callers.
(diary-list-sexp-entries): Rename list-sexp-diary-entries.
Keep old name as alias, update callers.
(diary-make-entry): Rename make-diary-entry. Keep old name as alias,
update callers.
(diary-insert-entry): Rename insert-diary-entry. Keep old name as alias.
(diary-insert-weekly-entry): Rename insert-weekly-diary-entry.
Keep old name as alias.
(diary-insert-monthly-entry): Rename insert-monthly-diary-entry.
Keep old name as alias.
(diary-insert-yearly-entry): Rename insert-yearly-diary-entry.
Keep old name as alias.
(diary-insert-anniversary-entry): Rename insert-anniversary-diary-entry.
Keep old name as alias.
(diary-insert-block-entry): Rename insert-block-diary-entry.
Keep old name as alias.
(diary-insert-cyclic-entry): Rename insert-cyclic-diary-entry.
Keep old name as alias.
(diary-fancy-font-lock-keywords): Rename fancy-diary-font-lock-keywords.
Keep old name as alias, update users.
(diary-fancy-display-mode): Rename fancy-diary-display-mode.
Keep old name as alias, update callers.
2008-04-06 20:53:14 +00:00
|
|
|
|
(calendar-mark-month m y month day year color)
|
2008-04-07 01:59:37 +00:00
|
|
|
|
(calendar-increment-month m y 1)))))
|
2008-03-17 02:33:49 +00:00
|
|
|
|
|
2015-09-03 22:31:12 +00:00
|
|
|
|
;; Bahá’í, Hebrew, Islamic.
|
2008-03-16 01:27:15 +00:00
|
|
|
|
(defun calendar-mark-complex (month day year fromabs &optional color)
|
|
|
|
|
"Mark dates in the calendar conforming to MONTH DAY YEAR of some system.
|
|
|
|
|
The function FROMABS converts absolute dates to the appropriate date system.
|
2008-04-07 01:59:37 +00:00
|
|
|
|
Optional argument COLOR is passed to `calendar-mark-visible-date' as MARK."
|
2008-03-16 01:27:15 +00:00
|
|
|
|
;; Not one of the simple cases--check all visible dates for match.
|
|
|
|
|
;; Actually, the following code takes care of ALL of the cases, but
|
|
|
|
|
;; it's much too slow to be used for the simple (common) cases.
|
2008-04-02 03:34:23 +00:00
|
|
|
|
(let* ((m displayed-month)
|
|
|
|
|
(y displayed-year)
|
|
|
|
|
(first-date (progn
|
2008-04-07 01:59:37 +00:00
|
|
|
|
(calendar-increment-month m y -1)
|
2008-04-02 03:34:23 +00:00
|
|
|
|
(calendar-absolute-from-gregorian (list m 1 y))))
|
|
|
|
|
(last-date (progn
|
2008-04-07 01:59:37 +00:00
|
|
|
|
(calendar-increment-month m y 2)
|
2008-04-02 03:34:23 +00:00
|
|
|
|
(calendar-absolute-from-gregorian
|
|
|
|
|
(list m (calendar-last-day-of-month m y) y))))
|
|
|
|
|
(date (1- first-date))
|
|
|
|
|
local-date)
|
|
|
|
|
(while (<= (setq date (1+ date)) last-date)
|
|
|
|
|
(setq local-date (funcall fromabs date))
|
|
|
|
|
(and (or (zerop month)
|
2008-04-07 01:59:37 +00:00
|
|
|
|
(= month (calendar-extract-month local-date)))
|
2008-04-02 03:34:23 +00:00
|
|
|
|
(or (zerop day)
|
2008-04-07 01:59:37 +00:00
|
|
|
|
(= day (calendar-extract-day local-date)))
|
2008-04-02 03:34:23 +00:00
|
|
|
|
(or (zerop year)
|
2008-04-07 01:59:37 +00:00
|
|
|
|
(= year (calendar-extract-year local-date)))
|
|
|
|
|
(calendar-mark-visible-date
|
2008-04-02 03:34:23 +00:00
|
|
|
|
(calendar-gregorian-from-absolute date) color)))))
|
2008-03-16 01:27:15 +00:00
|
|
|
|
|
2015-09-03 22:31:12 +00:00
|
|
|
|
;; Bahá’í, Islamic.
|
2008-03-16 01:27:15 +00:00
|
|
|
|
(defun calendar-mark-1 (month day year fromabs toabs &optional color)
|
|
|
|
|
"Mark dates in the calendar conforming to MONTH DAY YEAR of some system.
|
|
|
|
|
The function FROMABS converts absolute dates to the appropriate date system.
|
2008-11-30 01:01:18 +00:00
|
|
|
|
The function TOABS carries out the inverse operation. Optional argument
|
2008-04-07 01:59:37 +00:00
|
|
|
|
COLOR is passed to `calendar-mark-visible-date' as MARK."
|
* url-util.el (url-insert-entities-in-string):
* url-nfs.el (url-nfs-unescape):
* url-ldap.el (url-ldap):
* url-imap.el (url-imap):
* url-cid.el (url-cid-gnus, url-cid): Use with-current-buffer.
* erc.el (erc-display-line-1, erc-process-away):
* erc-truncate.el (erc-truncate-buffer-to-size):
Use with-current-buffer.
* term/ns-win.el (ns-scroll-bar-move, ns-face-at-pos):
* play/mpuz.el (mpuz-create-buffer):
* play/landmark.el (lm-prompt-for-move, lm-print-wts, lm-print-smell)
(lm-print-y,s,noise, lm-print-w0, lm-init):
* play/gomoku.el (gomoku-prompt-for-move):
* play/fortune.el (fortune-in-buffer):
* play/dissociate.el (dissociated-press):
* play/decipher.el (decipher-adjacency-list, decipher-display-regexp)
(decipher-analyze-buffer, decipher-stats-buffer,decipher-stats-buffer):
* mail/supercite.el (sc-eref-show):
* mail/smtpmail.el (smtpmail-send-it):
* mail/rmailsum.el (rmail-summary-next-labeled-message)
(rmail-summary-previous-labeled-message, rmail-summary-wipe)
(rmail-summary-undelete-many, rmail-summary-rmail-update)
(rmail-summary-goto-msg, rmail-summary-expunge)
(rmail-summary-get-new-mail, rmail-summary-search-backward)
(rmail-summary-add-label, rmail-summary-output-menu)
(rmail-summary-output-body):
* mail/rfc822.el (rfc822-addresses):
* mail/reporter.el (reporter-dump-variable, reporter-dump-state):
* mail/mailpost.el (post-mail-send-it):
* mail/hashcash.el (hashcash-generate-payment):
* mail/feedmail.el (feedmail-run-the-queue)
(feedmail-queue-send-edit-prompt-help-first)
(feedmail-send-it-immediately, feedmail-give-it-to-buffer-eater)
(feedmail-deduce-address-list):
* eshell/esh-ext.el (eshell-remote-command):
* eshell/em-unix.el (eshell-occur-mode-mouse-goto):
* emulation/viper-util.el (viper-glob-unix-files, viper-save-setting)
(viper-wildcard-to-regexp, viper-glob-mswindows-files)
(viper-save-string-in-file, viper-valid-marker):
* emulation/viper-keym.el (viper-toggle-key):
* emulation/viper-ex.el (ex-expand-filsyms, viper-get-ex-file)
(ex-edit, ex-global, ex-mark, ex-next-related-buffer, ex-quit)
(ex-get-inline-cmd-args, ex-tag, ex-command, ex-compile):
* emulation/viper-cmd.el (viper-exec-form-in-vi)
(viper-exec-form-in-emacs, viper-brac-function):
* emulation/viper.el (viper-delocalize-var):
* emulation/vip.el (vip-mode, vip-get-ex-token, vip-ex, vip-get-ex-pat)
(vip-get-ex-command, vip-get-ex-opt-gc, vip-get-ex-buffer)
(vip-get-ex-count, vip-get-ex-file, ex-edit, ex-global, ex-mark)
(ex-map, ex-unmap, ex-quit, ex-read, ex-tag, ex-command):
* emulation/vi.el (vi-switch-mode, vi-ex-cmd):
* emulation/edt.el (edt-electric-helpify):
* emulation/cua-rect.el (cua--rectangle-aux-replace):
* emulation/cua-gmrk.el (cua--insert-at-global-mark)
(cua--delete-at-global-mark, cua--copy-rectangle-to-global-mark)
(cua-indent-to-global-mark-column):
* calendar/diary-lib.el (calendar-mark-1):
* calendar/cal-hebrew.el (calendar-hebrew-mark-date-pattern):
Use with-current-buffer.
* emulation/viper.el (viper-delocalize-var): Use dolist.
2009-11-03 02:04:29 +00:00
|
|
|
|
(with-current-buffer calendar-buffer
|
2008-03-16 01:27:15 +00:00
|
|
|
|
(if (and (not (zerop month)) (not (zerop day)))
|
|
|
|
|
(if (not (zerop year))
|
|
|
|
|
;; Fully specified date.
|
|
|
|
|
(let ((date (calendar-gregorian-from-absolute
|
|
|
|
|
(funcall toabs (list month day year)))))
|
|
|
|
|
(if (calendar-date-is-visible-p date)
|
2008-04-07 01:59:37 +00:00
|
|
|
|
(calendar-mark-visible-date date color)))
|
2008-03-16 01:27:15 +00:00
|
|
|
|
;; Month and day in any year--this taken from the holiday stuff.
|
|
|
|
|
(let* ((i-date (funcall fromabs
|
|
|
|
|
(calendar-absolute-from-gregorian
|
|
|
|
|
(list displayed-month 15 displayed-year))))
|
2008-04-07 01:59:37 +00:00
|
|
|
|
(m (calendar-extract-month i-date))
|
|
|
|
|
(y (calendar-extract-year i-date))
|
2008-03-16 01:27:15 +00:00
|
|
|
|
date)
|
|
|
|
|
(unless (< m 1) ; calendar doesn't apply
|
2008-04-07 01:59:37 +00:00
|
|
|
|
(calendar-increment-month m y (- 10 month))
|
2008-04-02 03:34:23 +00:00
|
|
|
|
(and (> m 7) ; date might be visible
|
|
|
|
|
(calendar-date-is-visible-p
|
|
|
|
|
(setq date (calendar-gregorian-from-absolute
|
|
|
|
|
(funcall toabs (list month day y)))))
|
2008-04-07 01:59:37 +00:00
|
|
|
|
(calendar-mark-visible-date date color)))))
|
2014-11-23 07:51:24 +00:00
|
|
|
|
(calendar-mark-complex month day year fromabs color))))
|
2008-03-16 01:27:15 +00:00
|
|
|
|
|
1995-09-21 03:11:06 +00:00
|
|
|
|
|
|
|
|
|
(defun diary-entry-time (s)
|
(mark-sexp-diary-entries): Retrieve mark
from diary-sexp-entry and pass it to mark-visible-calendar-date.
(list-sexp-diary-entries): Update doc string for new docs for ....
If diary-sexp-entry returns a cons, only add the text to the diary list.
(diary-sexp-entry): Allow sexps to return a cons of the form (MARK
. STRING) to specify what face or character mark should be used in
the calendar display.
(diary-date, diary-block, diary-float, diary-anniversary)
(diary-cyclic): Add optional MARK parameter, specifying what face
or character to use in the calendar display. These will now
return (MARK . ENTRY).
(check-calendar-holidays, diary-iso-date)
(calendar-holiday-list, diary-french-date, diary-mayan-date)
(diary-julian-date, diary-astro-day-number, diary-chinese-date)
(diary-islamic-date, list-islamic-diary-entries)
(mark-islamic-diary-entries, mark-islamic-calendar-date-pattern)
(diary-hebrew-date, diary-omer, diary-yahrzeit, diary-parasha)
(diary-rosh-hodesh, list-hebrew-diary-entries)
(mark-hebrew-diary-entries, mark-hebrew-calendar-date-pattern)
(diary-coptic-date, diary-persian-date, diary-phases-of-moon)
(diary-sunrise-sunset, diary-sabbath-candles):
Remove interactive flag from autoloads.
2002-07-22 15:32:00 +00:00
|
|
|
|
"Return time at the beginning of the string S as a military-style integer.
|
|
|
|
|
For example, returns 1325 for 1:25pm.
|
2004-01-08 23:31:47 +00:00
|
|
|
|
|
|
|
|
|
Returns `diary-unknown-time' (default value -9999) if no time is recognized.
|
|
|
|
|
The recognized forms are XXXX, X:XX, or XX:XX (military time), and XXam,
|
2008-11-30 01:01:18 +00:00
|
|
|
|
XXAM, XXpm, XXPM, XX:XXam, XX:XXAM, XX:XXpm, or XX:XXPM. A period (.) can
|
2004-01-11 22:25:33 +00:00
|
|
|
|
be used instead of a colon (:) to separate the hour and minute parts."
|
2008-04-02 03:34:23 +00:00
|
|
|
|
(let (case-fold-search)
|
2008-03-13 06:29:28 +00:00
|
|
|
|
(cond ((string-match ; military time
|
|
|
|
|
"\\`[ \t\n]*\\([0-9]?[0-9]\\)[:.]?\\([0-9][0-9]\\)\\(\\>\\|[^ap]\\)"
|
2004-01-08 23:31:47 +00:00
|
|
|
|
s)
|
2008-03-13 06:29:28 +00:00
|
|
|
|
(+ (* 100 (string-to-number (match-string 1 s)))
|
|
|
|
|
(string-to-number (match-string 2 s))))
|
|
|
|
|
((string-match ; hour only (XXam or XXpm)
|
|
|
|
|
"\\`[ \t\n]*\\([0-9]?[0-9]\\)\\([ap]\\)m\\>" s)
|
|
|
|
|
(+ (* 100 (% (string-to-number (match-string 1 s)) 12))
|
|
|
|
|
(if (equal ?a (downcase (aref s (match-beginning 2))))
|
|
|
|
|
0 1200)))
|
2008-03-13 06:40:31 +00:00
|
|
|
|
((string-match ; hour and minute (XX:XXam or XX:XXpm)
|
2008-03-13 06:29:28 +00:00
|
|
|
|
"\\`[ \t\n]*\\([0-9]?[0-9]\\)[:.]\\([0-9][0-9]\\)\\([ap]\\)m\\>" s)
|
|
|
|
|
(+ (* 100 (% (string-to-number (match-string 1 s)) 12))
|
|
|
|
|
(string-to-number (match-string 2 s))
|
|
|
|
|
(if (equal ?a (downcase (aref s (match-beginning 3))))
|
|
|
|
|
0 1200)))
|
|
|
|
|
(t diary-unknown-time)))) ; unrecognizable
|
2000-11-30 12:27:36 +00:00
|
|
|
|
|
2008-03-17 02:33:49 +00:00
|
|
|
|
(defun diary-entry-compare (e1 e2)
|
|
|
|
|
"Return t if E1 is earlier than E2."
|
|
|
|
|
(or (calendar-date-compare e1 e2)
|
|
|
|
|
(and (calendar-date-equal (car e1) (car e2))
|
|
|
|
|
(let* ((ts1 (cadr e1)) (t1 (diary-entry-time ts1))
|
|
|
|
|
(ts2 (cadr e2)) (t2 (diary-entry-time ts2)))
|
|
|
|
|
(or (< t1 t2)
|
|
|
|
|
(and (= t1 t2)
|
|
|
|
|
(string-lessp ts1 ts2)))))))
|
|
|
|
|
|
(diary-sexp-entry-symbol): Rename sexp-diary-entry-symbol.
Keep old name as alias, update users.
(diary-list-entries-hook): Rename list-diary-entries-hook.
Keep old name as alias, update users.
(diary-mark-entries-hook): Rename mark-diary-entries-hook.
Keep old name as alias, update users.
(diary-nongregorian-listing-hook): Rename nongregorian-diary-listing-hook.
Keep old name as alias, update users.
(diary-nongregorian-marking-hook): Rename nongregorian-diary-marking-hook.
Keep old name as alias, update users.
(diary-print-entries-hook): Rename print-diary-entries-hook.
Keep old name as alias, update users.
(diary-abbreviated-year-flag): Rename abbreviated-calendar-year.
Keep old name as alias, update users.
(diary-number-of-entries): Rename number-of-diary-entries.
Keep old name as alias, update users.
(view-diary-entries, list-diary-entries, show-all-diary-entries):
Give version of obsolescence.
(diary-view-other-diary-entries): Rename view-other-diary-entries.
Keep old name as alias, update callers.
(diary-add-to-list): Rename add-to-diary-list. Keep old name as alias,
update callers.
(diary-include-other-diary-files): Rename include-other-diary-files.
Keep old name as alias, update callers.
(diary-simple-display): Rename simple-diary-display. Keep old name as alias,
update callers.
(diary-fancy-display): Rename fancy-diary-display. Keep old name as alias,
update callers.
(diary-print-entries): Rename print-diary-entries. Keep old name as alias,
update callers.
(diary-marking-entries-flag): Rename marking-diary-entries. Update users.
(diary-marking-entry-flag): Rename marking-diary-entry. Update users.
(diary-mark-entries): Rename mark-diary-entries. Keep old name as alias,
update callers.
(diary-mark-sexp-entries): Rename mark-sexp-diary-entries.
Keep old name as alias, update callers.
(diary-mark-included-diary-files): Rename mark-included-diary-files.
Keep old name as alias, update callers.
(calendar-mark-days-named): Rename mark-calendar-days-named.
Keep old name as alias, update callers.
(calendar-mark-month): Rename mark-calendar-month. Keep old name as alias,
update callers.
(calendar-mark-date-pattern): Rename mark-calendar-date-pattern.
Keep old name as alias, update callers.
(diary-sort-entries): Rename sort-diary-entries. Keep old name as alias,
update callers.
(diary-list-sexp-entries): Rename list-sexp-diary-entries.
Keep old name as alias, update callers.
(diary-make-entry): Rename make-diary-entry. Keep old name as alias,
update callers.
(diary-insert-entry): Rename insert-diary-entry. Keep old name as alias.
(diary-insert-weekly-entry): Rename insert-weekly-diary-entry.
Keep old name as alias.
(diary-insert-monthly-entry): Rename insert-monthly-diary-entry.
Keep old name as alias.
(diary-insert-yearly-entry): Rename insert-yearly-diary-entry.
Keep old name as alias.
(diary-insert-anniversary-entry): Rename insert-anniversary-diary-entry.
Keep old name as alias.
(diary-insert-block-entry): Rename insert-block-diary-entry.
Keep old name as alias.
(diary-insert-cyclic-entry): Rename insert-cyclic-diary-entry.
Keep old name as alias.
(diary-fancy-font-lock-keywords): Rename fancy-diary-font-lock-keywords.
Keep old name as alias, update users.
(diary-fancy-display-mode): Rename fancy-diary-display-mode.
Keep old name as alias, update callers.
2008-04-06 20:53:14 +00:00
|
|
|
|
(defun diary-sort-entries ()
|
2010-09-14 08:02:28 +00:00
|
|
|
|
"Sort the list of diary entries by time of day.
|
|
|
|
|
If you add this function to `diary-list-entries-hook', it should
|
|
|
|
|
be the last item in the hook, in case earlier items add diary
|
|
|
|
|
entries, or change the order."
|
2008-03-17 02:33:49 +00:00
|
|
|
|
(setq diary-entries-list (sort diary-entries-list 'diary-entry-compare)))
|
|
|
|
|
|
|
|
|
|
|
(diary-sexp-entry-symbol): Rename sexp-diary-entry-symbol.
Keep old name as alias, update users.
(diary-list-entries-hook): Rename list-diary-entries-hook.
Keep old name as alias, update users.
(diary-mark-entries-hook): Rename mark-diary-entries-hook.
Keep old name as alias, update users.
(diary-nongregorian-listing-hook): Rename nongregorian-diary-listing-hook.
Keep old name as alias, update users.
(diary-nongregorian-marking-hook): Rename nongregorian-diary-marking-hook.
Keep old name as alias, update users.
(diary-print-entries-hook): Rename print-diary-entries-hook.
Keep old name as alias, update users.
(diary-abbreviated-year-flag): Rename abbreviated-calendar-year.
Keep old name as alias, update users.
(diary-number-of-entries): Rename number-of-diary-entries.
Keep old name as alias, update users.
(view-diary-entries, list-diary-entries, show-all-diary-entries):
Give version of obsolescence.
(diary-view-other-diary-entries): Rename view-other-diary-entries.
Keep old name as alias, update callers.
(diary-add-to-list): Rename add-to-diary-list. Keep old name as alias,
update callers.
(diary-include-other-diary-files): Rename include-other-diary-files.
Keep old name as alias, update callers.
(diary-simple-display): Rename simple-diary-display. Keep old name as alias,
update callers.
(diary-fancy-display): Rename fancy-diary-display. Keep old name as alias,
update callers.
(diary-print-entries): Rename print-diary-entries. Keep old name as alias,
update callers.
(diary-marking-entries-flag): Rename marking-diary-entries. Update users.
(diary-marking-entry-flag): Rename marking-diary-entry. Update users.
(diary-mark-entries): Rename mark-diary-entries. Keep old name as alias,
update callers.
(diary-mark-sexp-entries): Rename mark-sexp-diary-entries.
Keep old name as alias, update callers.
(diary-mark-included-diary-files): Rename mark-included-diary-files.
Keep old name as alias, update callers.
(calendar-mark-days-named): Rename mark-calendar-days-named.
Keep old name as alias, update callers.
(calendar-mark-month): Rename mark-calendar-month. Keep old name as alias,
update callers.
(calendar-mark-date-pattern): Rename mark-calendar-date-pattern.
Keep old name as alias, update callers.
(diary-sort-entries): Rename sort-diary-entries. Keep old name as alias,
update callers.
(diary-list-sexp-entries): Rename list-sexp-diary-entries.
Keep old name as alias, update callers.
(diary-make-entry): Rename make-diary-entry. Keep old name as alias,
update callers.
(diary-insert-entry): Rename insert-diary-entry. Keep old name as alias.
(diary-insert-weekly-entry): Rename insert-weekly-diary-entry.
Keep old name as alias.
(diary-insert-monthly-entry): Rename insert-monthly-diary-entry.
Keep old name as alias.
(diary-insert-yearly-entry): Rename insert-yearly-diary-entry.
Keep old name as alias.
(diary-insert-anniversary-entry): Rename insert-anniversary-diary-entry.
Keep old name as alias.
(diary-insert-block-entry): Rename insert-block-diary-entry.
Keep old name as alias.
(diary-insert-cyclic-entry): Rename insert-cyclic-diary-entry.
Keep old name as alias.
(diary-fancy-font-lock-keywords): Rename fancy-diary-font-lock-keywords.
Keep old name as alias, update users.
(diary-fancy-display-mode): Rename fancy-diary-display-mode.
Keep old name as alias, update callers.
2008-04-06 20:53:14 +00:00
|
|
|
|
(defun diary-list-sexp-entries (date)
|
1995-09-21 03:11:06 +00:00
|
|
|
|
"Add sexp entries for DATE from the diary file to `diary-entries-list'.
|
2008-03-27 07:58:31 +00:00
|
|
|
|
Also, make them visible in the diary. Returns t if any entries are found.
|
1995-09-21 03:11:06 +00:00
|
|
|
|
|
(diary-sexp-entry-symbol): Rename sexp-diary-entry-symbol.
Keep old name as alias, update users.
(diary-list-entries-hook): Rename list-diary-entries-hook.
Keep old name as alias, update users.
(diary-mark-entries-hook): Rename mark-diary-entries-hook.
Keep old name as alias, update users.
(diary-nongregorian-listing-hook): Rename nongregorian-diary-listing-hook.
Keep old name as alias, update users.
(diary-nongregorian-marking-hook): Rename nongregorian-diary-marking-hook.
Keep old name as alias, update users.
(diary-print-entries-hook): Rename print-diary-entries-hook.
Keep old name as alias, update users.
(diary-abbreviated-year-flag): Rename abbreviated-calendar-year.
Keep old name as alias, update users.
(diary-number-of-entries): Rename number-of-diary-entries.
Keep old name as alias, update users.
(view-diary-entries, list-diary-entries, show-all-diary-entries):
Give version of obsolescence.
(diary-view-other-diary-entries): Rename view-other-diary-entries.
Keep old name as alias, update callers.
(diary-add-to-list): Rename add-to-diary-list. Keep old name as alias,
update callers.
(diary-include-other-diary-files): Rename include-other-diary-files.
Keep old name as alias, update callers.
(diary-simple-display): Rename simple-diary-display. Keep old name as alias,
update callers.
(diary-fancy-display): Rename fancy-diary-display. Keep old name as alias,
update callers.
(diary-print-entries): Rename print-diary-entries. Keep old name as alias,
update callers.
(diary-marking-entries-flag): Rename marking-diary-entries. Update users.
(diary-marking-entry-flag): Rename marking-diary-entry. Update users.
(diary-mark-entries): Rename mark-diary-entries. Keep old name as alias,
update callers.
(diary-mark-sexp-entries): Rename mark-sexp-diary-entries.
Keep old name as alias, update callers.
(diary-mark-included-diary-files): Rename mark-included-diary-files.
Keep old name as alias, update callers.
(calendar-mark-days-named): Rename mark-calendar-days-named.
Keep old name as alias, update callers.
(calendar-mark-month): Rename mark-calendar-month. Keep old name as alias,
update callers.
(calendar-mark-date-pattern): Rename mark-calendar-date-pattern.
Keep old name as alias, update callers.
(diary-sort-entries): Rename sort-diary-entries. Keep old name as alias,
update callers.
(diary-list-sexp-entries): Rename list-sexp-diary-entries.
Keep old name as alias, update callers.
(diary-make-entry): Rename make-diary-entry. Keep old name as alias,
update callers.
(diary-insert-entry): Rename insert-diary-entry. Keep old name as alias.
(diary-insert-weekly-entry): Rename insert-weekly-diary-entry.
Keep old name as alias.
(diary-insert-monthly-entry): Rename insert-monthly-diary-entry.
Keep old name as alias.
(diary-insert-yearly-entry): Rename insert-yearly-diary-entry.
Keep old name as alias.
(diary-insert-anniversary-entry): Rename insert-anniversary-diary-entry.
Keep old name as alias.
(diary-insert-block-entry): Rename insert-block-diary-entry.
Keep old name as alias.
(diary-insert-cyclic-entry): Rename insert-cyclic-diary-entry.
Keep old name as alias.
(diary-fancy-font-lock-keywords): Rename fancy-diary-font-lock-keywords.
Keep old name as alias, update users.
(diary-fancy-display-mode): Rename fancy-diary-display-mode.
Keep old name as alias, update callers.
2008-04-06 20:53:14 +00:00
|
|
|
|
Sexp diary entries must be prefaced by a `diary-sexp-entry-symbol'
|
2008-03-27 07:58:31 +00:00
|
|
|
|
\(normally `%%'). The form of a sexp diary entry is
|
1995-09-21 03:11:06 +00:00
|
|
|
|
|
|
|
|
|
%%(SEXP) ENTRY
|
|
|
|
|
|
2018-01-19 04:01:35 +00:00
|
|
|
|
Both `entry' and `date' are available when the SEXP is evaluated. If
|
2008-03-27 07:58:31 +00:00
|
|
|
|
the SEXP returns nil, the diary entry does not apply. If it
|
|
|
|
|
returns a non-nil value, ENTRY will be taken to apply to DATE; if
|
|
|
|
|
the value is a string, that string will be the diary entry in the
|
|
|
|
|
fancy diary display.
|
1995-09-21 03:11:06 +00:00
|
|
|
|
|
2008-03-27 07:58:31 +00:00
|
|
|
|
For example, the following diary entry will apply to the 21st of
|
|
|
|
|
the month if it is a weekday and the Friday before if the 21st is
|
|
|
|
|
on a weekend:
|
1995-09-21 03:11:06 +00:00
|
|
|
|
|
|
|
|
|
&%%(let ((dayname (calendar-day-of-week date))
|
2008-04-07 01:59:37 +00:00
|
|
|
|
(day (calendar-extract-day date)))
|
1995-09-21 03:11:06 +00:00
|
|
|
|
(or
|
2015-09-03 22:31:12 +00:00
|
|
|
|
(and (= day 21) (memq dayname \\='(1 2 3 4 5)))
|
|
|
|
|
(and (memq day \\='(19 20)) (= dayname 5)))
|
1995-09-21 03:11:06 +00:00
|
|
|
|
) UIUC pay checks deposited
|
|
|
|
|
|
2008-03-27 07:58:31 +00:00
|
|
|
|
A number of built-in functions are available for this type of
|
|
|
|
|
diary entry. In the following, the optional parameter MARK
|
|
|
|
|
specifies a face or single-character string to use when
|
2008-03-29 02:44:24 +00:00
|
|
|
|
highlighting the day in the calendar. For those functions that
|
|
|
|
|
take MONTH, DAY, and YEAR as arguments, the order of the input
|
|
|
|
|
parameters changes according to `calendar-date-style' (e.g. to
|
|
|
|
|
DAY MONTH YEAR in the European style).
|
2008-03-27 07:58:31 +00:00
|
|
|
|
|
|
|
|
|
%%(diary-date MONTH DAY YEAR &optional MARK) text
|
2008-03-29 02:44:24 +00:00
|
|
|
|
Entry applies if date is MONTH, DAY, YEAR. DAY, MONTH, and YEAR can
|
2015-05-21 17:04:45 +00:00
|
|
|
|
be a list of integers, t (meaning all values), or an integer.
|
2008-03-27 07:58:31 +00:00
|
|
|
|
|
|
|
|
|
%%(diary-float MONTH DAYNAME N &optional DAY MARK) text
|
2008-04-29 03:34:40 +00:00
|
|
|
|
Entry will appear on the Nth DAYNAME after/before MONTH DAY.
|
|
|
|
|
DAYNAME=0 means Sunday, DAYNAME=1 means Monday, and so on.
|
|
|
|
|
If N>0, use the Nth DAYNAME after MONTH DAY.
|
|
|
|
|
If N<0, use the Nth DAYNAME before MONTH DAY.
|
|
|
|
|
DAY defaults to 1 if N>0, and MONTH's last day otherwise.
|
2015-05-21 17:04:45 +00:00
|
|
|
|
MONTH can be a list of months, a single month, or t to
|
2008-04-29 03:34:40 +00:00
|
|
|
|
specify all months.
|
2008-03-27 07:58:31 +00:00
|
|
|
|
|
|
|
|
|
%%(diary-block M1 D1 Y1 M2 D2 Y2 &optional MARK) text
|
|
|
|
|
Entry will appear on dates between M1/D1/Y1 and M2/D2/Y2,
|
2008-03-29 02:44:24 +00:00
|
|
|
|
inclusive.
|
2008-03-27 07:58:31 +00:00
|
|
|
|
|
|
|
|
|
%%(diary-anniversary MONTH DAY YEAR &optional MARK) text
|
2008-03-29 02:44:24 +00:00
|
|
|
|
Entry will appear on anniversary dates of MONTH DAY, YEAR.
|
|
|
|
|
Text can contain `%d' or `%d%s'; `%d' will be replaced by the
|
|
|
|
|
number of years since the MONTH DAY, YEAR, and `%s' by the
|
|
|
|
|
ordinal ending of that number (i.e. `st', `nd', `rd' or `th',
|
|
|
|
|
as appropriate). The anniversary of February 29 is
|
|
|
|
|
considered to be March 1 in a non-leap year.
|
2008-03-27 07:58:31 +00:00
|
|
|
|
|
|
|
|
|
%%(diary-cyclic N MONTH DAY YEAR &optional MARK) text
|
2008-03-29 02:44:24 +00:00
|
|
|
|
Entry will appear every N days, starting MONTH DAY, YEAR.
|
|
|
|
|
Text can contain `%d' or `%d%s'; `%d' will be replaced by the
|
|
|
|
|
number of repetitions since the MONTH DAY, YEAR and `%s' by
|
|
|
|
|
the ordinal ending of that number (i.e. `st', `nd', `rd' or
|
|
|
|
|
`th', as appropriate).
|
2008-03-27 07:58:31 +00:00
|
|
|
|
|
|
|
|
|
%%(diary-remind SEXP DAYS &optional MARKING) text
|
|
|
|
|
Entry is a reminder for diary sexp SEXP. DAYS is either a
|
|
|
|
|
single number or a list of numbers indicating the number(s)
|
2008-04-23 03:06:11 +00:00
|
|
|
|
of days before the event that the warning(s) should occur.
|
|
|
|
|
A negative number -DAYS has the same meaning as a list (1 2 ... DAYS).
|
|
|
|
|
If the current date is (one of) DAYS before the event indicated
|
2008-03-27 07:58:31 +00:00
|
|
|
|
by EXPR, then a suitable message (as specified by
|
|
|
|
|
`diary-remind-message') appears. In addition to the
|
|
|
|
|
reminders beforehand, the diary entry also appears on the
|
|
|
|
|
date itself. If optional MARKING is non-nil then the
|
|
|
|
|
*reminders* are marked on the calendar. Marking of reminders
|
|
|
|
|
is independent of whether the entry *itself* is a marking or
|
|
|
|
|
non-marking one.
|
|
|
|
|
|
2008-04-05 20:58:26 +00:00
|
|
|
|
%%(diary-hebrew-yahrzeit MONTH DAY YEAR) text
|
2008-03-27 07:58:31 +00:00
|
|
|
|
Text is assumed to be the name of the person; the date is the
|
|
|
|
|
date of death on the *civil* calendar. The diary entry will
|
|
|
|
|
appear on the proper Hebrew-date anniversary and on the day
|
2008-03-29 02:44:24 +00:00
|
|
|
|
before.
|
2008-03-27 07:58:31 +00:00
|
|
|
|
|
|
|
|
|
All the remaining functions do not accept any text, and so only
|
(diary-sexp-entry-symbol): Rename sexp-diary-entry-symbol.
Keep old name as alias, update users.
(diary-list-entries-hook): Rename list-diary-entries-hook.
Keep old name as alias, update users.
(diary-mark-entries-hook): Rename mark-diary-entries-hook.
Keep old name as alias, update users.
(diary-nongregorian-listing-hook): Rename nongregorian-diary-listing-hook.
Keep old name as alias, update users.
(diary-nongregorian-marking-hook): Rename nongregorian-diary-marking-hook.
Keep old name as alias, update users.
(diary-print-entries-hook): Rename print-diary-entries-hook.
Keep old name as alias, update users.
(diary-abbreviated-year-flag): Rename abbreviated-calendar-year.
Keep old name as alias, update users.
(diary-number-of-entries): Rename number-of-diary-entries.
Keep old name as alias, update users.
(view-diary-entries, list-diary-entries, show-all-diary-entries):
Give version of obsolescence.
(diary-view-other-diary-entries): Rename view-other-diary-entries.
Keep old name as alias, update callers.
(diary-add-to-list): Rename add-to-diary-list. Keep old name as alias,
update callers.
(diary-include-other-diary-files): Rename include-other-diary-files.
Keep old name as alias, update callers.
(diary-simple-display): Rename simple-diary-display. Keep old name as alias,
update callers.
(diary-fancy-display): Rename fancy-diary-display. Keep old name as alias,
update callers.
(diary-print-entries): Rename print-diary-entries. Keep old name as alias,
update callers.
(diary-marking-entries-flag): Rename marking-diary-entries. Update users.
(diary-marking-entry-flag): Rename marking-diary-entry. Update users.
(diary-mark-entries): Rename mark-diary-entries. Keep old name as alias,
update callers.
(diary-mark-sexp-entries): Rename mark-sexp-diary-entries.
Keep old name as alias, update callers.
(diary-mark-included-diary-files): Rename mark-included-diary-files.
Keep old name as alias, update callers.
(calendar-mark-days-named): Rename mark-calendar-days-named.
Keep old name as alias, update callers.
(calendar-mark-month): Rename mark-calendar-month. Keep old name as alias,
update callers.
(calendar-mark-date-pattern): Rename mark-calendar-date-pattern.
Keep old name as alias, update callers.
(diary-sort-entries): Rename sort-diary-entries. Keep old name as alias,
update callers.
(diary-list-sexp-entries): Rename list-sexp-diary-entries.
Keep old name as alias, update callers.
(diary-make-entry): Rename make-diary-entry. Keep old name as alias,
update callers.
(diary-insert-entry): Rename insert-diary-entry. Keep old name as alias.
(diary-insert-weekly-entry): Rename insert-weekly-diary-entry.
Keep old name as alias.
(diary-insert-monthly-entry): Rename insert-monthly-diary-entry.
Keep old name as alias.
(diary-insert-yearly-entry): Rename insert-yearly-diary-entry.
Keep old name as alias.
(diary-insert-anniversary-entry): Rename insert-anniversary-diary-entry.
Keep old name as alias.
(diary-insert-block-entry): Rename insert-block-diary-entry.
Keep old name as alias.
(diary-insert-cyclic-entry): Rename insert-cyclic-diary-entry.
Keep old name as alias.
(diary-fancy-font-lock-keywords): Rename fancy-diary-font-lock-keywords.
Keep old name as alias, update users.
(diary-fancy-display-mode): Rename fancy-diary-display-mode.
Keep old name as alias, update callers.
2008-04-06 20:53:14 +00:00
|
|
|
|
make sense with `diary-fancy-display'. Most produce output every day.
|
2008-03-27 07:58:31 +00:00
|
|
|
|
|
|
|
|
|
`diary-day-of-year' - day of year and number of days remaining
|
|
|
|
|
`diary-iso-date' - ISO commercial date
|
|
|
|
|
`diary-astro-day-number' - astronomical (Julian) day number
|
|
|
|
|
`diary-sunrise-sunset' - local times of sunrise and sunset
|
|
|
|
|
|
|
|
|
|
These functions give the date in alternative calendrical systems:
|
|
|
|
|
|
|
|
|
|
`diary-bahai-date', `diary-chinese-date', `diary-coptic-date',
|
|
|
|
|
`diary-ethiopic-date', `diary-french-date', `diary-hebrew-date',
|
|
|
|
|
`diary-islamic-date', `diary-julian-date', `diary-mayan-date',
|
|
|
|
|
`diary-persian-date'
|
|
|
|
|
|
|
|
|
|
Theses functions only produce output on certain dates:
|
|
|
|
|
|
2008-06-27 00:35:08 +00:00
|
|
|
|
`diary-lunar-phases' - phases of moon (on the appropriate days)
|
2008-04-05 21:25:45 +00:00
|
|
|
|
`diary-hebrew-omer' - Omer count, within 50 days after Passover
|
|
|
|
|
`diary-hebrew-parasha' - weekly parasha, every Saturday
|
|
|
|
|
`diary-hebrew-rosh-hodesh' - Rosh Hodesh, or the day or Saturday before
|
|
|
|
|
`diary-hebrew-sabbath-candles' - local time of candle lighting, on Fridays
|
2008-03-27 07:58:31 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Marking these entries is *extremely* time consuming, so it is
|
|
|
|
|
best if they are non-marking."
|
2008-03-16 01:27:15 +00:00
|
|
|
|
(let ((s-entry (format "^%s?%s(" (regexp-quote diary-nonmarking-symbol)
|
(diary-sexp-entry-symbol): Rename sexp-diary-entry-symbol.
Keep old name as alias, update users.
(diary-list-entries-hook): Rename list-diary-entries-hook.
Keep old name as alias, update users.
(diary-mark-entries-hook): Rename mark-diary-entries-hook.
Keep old name as alias, update users.
(diary-nongregorian-listing-hook): Rename nongregorian-diary-listing-hook.
Keep old name as alias, update users.
(diary-nongregorian-marking-hook): Rename nongregorian-diary-marking-hook.
Keep old name as alias, update users.
(diary-print-entries-hook): Rename print-diary-entries-hook.
Keep old name as alias, update users.
(diary-abbreviated-year-flag): Rename abbreviated-calendar-year.
Keep old name as alias, update users.
(diary-number-of-entries): Rename number-of-diary-entries.
Keep old name as alias, update users.
(view-diary-entries, list-diary-entries, show-all-diary-entries):
Give version of obsolescence.
(diary-view-other-diary-entries): Rename view-other-diary-entries.
Keep old name as alias, update callers.
(diary-add-to-list): Rename add-to-diary-list. Keep old name as alias,
update callers.
(diary-include-other-diary-files): Rename include-other-diary-files.
Keep old name as alias, update callers.
(diary-simple-display): Rename simple-diary-display. Keep old name as alias,
update callers.
(diary-fancy-display): Rename fancy-diary-display. Keep old name as alias,
update callers.
(diary-print-entries): Rename print-diary-entries. Keep old name as alias,
update callers.
(diary-marking-entries-flag): Rename marking-diary-entries. Update users.
(diary-marking-entry-flag): Rename marking-diary-entry. Update users.
(diary-mark-entries): Rename mark-diary-entries. Keep old name as alias,
update callers.
(diary-mark-sexp-entries): Rename mark-sexp-diary-entries.
Keep old name as alias, update callers.
(diary-mark-included-diary-files): Rename mark-included-diary-files.
Keep old name as alias, update callers.
(calendar-mark-days-named): Rename mark-calendar-days-named.
Keep old name as alias, update callers.
(calendar-mark-month): Rename mark-calendar-month. Keep old name as alias,
update callers.
(calendar-mark-date-pattern): Rename mark-calendar-date-pattern.
Keep old name as alias, update callers.
(diary-sort-entries): Rename sort-diary-entries. Keep old name as alias,
update callers.
(diary-list-sexp-entries): Rename list-sexp-diary-entries.
Keep old name as alias, update callers.
(diary-make-entry): Rename make-diary-entry. Keep old name as alias,
update callers.
(diary-insert-entry): Rename insert-diary-entry. Keep old name as alias.
(diary-insert-weekly-entry): Rename insert-weekly-diary-entry.
Keep old name as alias.
(diary-insert-monthly-entry): Rename insert-monthly-diary-entry.
Keep old name as alias.
(diary-insert-yearly-entry): Rename insert-yearly-diary-entry.
Keep old name as alias.
(diary-insert-anniversary-entry): Rename insert-anniversary-diary-entry.
Keep old name as alias.
(diary-insert-block-entry): Rename insert-block-diary-entry.
Keep old name as alias.
(diary-insert-cyclic-entry): Rename insert-cyclic-diary-entry.
Keep old name as alias.
(diary-fancy-font-lock-keywords): Rename fancy-diary-font-lock-keywords.
Keep old name as alias, update users.
(diary-fancy-display-mode): Rename fancy-diary-display-mode.
Keep old name as alias, update callers.
2008-04-06 20:53:14 +00:00
|
|
|
|
(regexp-quote diary-sexp-entry-symbol)))
|
2008-04-02 03:34:23 +00:00
|
|
|
|
entry-found file-glob-attrs marks
|
|
|
|
|
sexp-start sexp entry specifier entry-start line-start
|
|
|
|
|
diary-entry temp literal)
|
1995-09-21 03:11:06 +00:00
|
|
|
|
(goto-char (point-min))
|
2009-12-02 03:03:48 +00:00
|
|
|
|
(setq file-glob-attrs (nth 1 (diary-pull-attrs nil '())))
|
1995-09-21 03:11:06 +00:00
|
|
|
|
(while (re-search-forward s-entry nil t)
|
|
|
|
|
(backward-char 1)
|
2008-04-02 03:34:23 +00:00
|
|
|
|
(setq sexp-start (point))
|
|
|
|
|
(forward-sexp)
|
|
|
|
|
(setq sexp (buffer-substring-no-properties sexp-start (point))
|
|
|
|
|
line-start (line-end-position 0)
|
|
|
|
|
specifier
|
|
|
|
|
(buffer-substring-no-properties (1+ line-start) (point))
|
|
|
|
|
entry-start (1+ line-start))
|
|
|
|
|
(forward-char 1)
|
|
|
|
|
(if (and (bolp) (not (looking-at "[ \t]")))
|
|
|
|
|
;; Diary entry consists only of the sexp.
|
|
|
|
|
(progn
|
|
|
|
|
(backward-char 1)
|
|
|
|
|
(setq entry ""))
|
|
|
|
|
(setq entry-start (point))
|
|
|
|
|
(forward-line 1)
|
|
|
|
|
(while (looking-at "[ \t]")
|
|
|
|
|
(forward-line 1))
|
2010-12-09 01:50:08 +00:00
|
|
|
|
(if (bolp) (backward-char 1))
|
2008-04-02 03:34:23 +00:00
|
|
|
|
(setq entry (buffer-substring-no-properties entry-start (point))))
|
|
|
|
|
(setq diary-entry (diary-sexp-entry sexp entry date)
|
|
|
|
|
literal entry ; before evaluation
|
|
|
|
|
entry (if (consp diary-entry)
|
|
|
|
|
(cdr diary-entry)
|
|
|
|
|
diary-entry))
|
|
|
|
|
(when diary-entry
|
|
|
|
|
(remove-overlays line-start (point) 'invisible 'diary)
|
|
|
|
|
(if (< 0 (length entry))
|
|
|
|
|
(setq temp (diary-pull-attrs entry file-glob-attrs)
|
|
|
|
|
entry (nth 0 temp)
|
|
|
|
|
marks (nth 1 temp))))
|
(diary-sexp-entry-symbol): Rename sexp-diary-entry-symbol.
Keep old name as alias, update users.
(diary-list-entries-hook): Rename list-diary-entries-hook.
Keep old name as alias, update users.
(diary-mark-entries-hook): Rename mark-diary-entries-hook.
Keep old name as alias, update users.
(diary-nongregorian-listing-hook): Rename nongregorian-diary-listing-hook.
Keep old name as alias, update users.
(diary-nongregorian-marking-hook): Rename nongregorian-diary-marking-hook.
Keep old name as alias, update users.
(diary-print-entries-hook): Rename print-diary-entries-hook.
Keep old name as alias, update users.
(diary-abbreviated-year-flag): Rename abbreviated-calendar-year.
Keep old name as alias, update users.
(diary-number-of-entries): Rename number-of-diary-entries.
Keep old name as alias, update users.
(view-diary-entries, list-diary-entries, show-all-diary-entries):
Give version of obsolescence.
(diary-view-other-diary-entries): Rename view-other-diary-entries.
Keep old name as alias, update callers.
(diary-add-to-list): Rename add-to-diary-list. Keep old name as alias,
update callers.
(diary-include-other-diary-files): Rename include-other-diary-files.
Keep old name as alias, update callers.
(diary-simple-display): Rename simple-diary-display. Keep old name as alias,
update callers.
(diary-fancy-display): Rename fancy-diary-display. Keep old name as alias,
update callers.
(diary-print-entries): Rename print-diary-entries. Keep old name as alias,
update callers.
(diary-marking-entries-flag): Rename marking-diary-entries. Update users.
(diary-marking-entry-flag): Rename marking-diary-entry. Update users.
(diary-mark-entries): Rename mark-diary-entries. Keep old name as alias,
update callers.
(diary-mark-sexp-entries): Rename mark-sexp-diary-entries.
Keep old name as alias, update callers.
(diary-mark-included-diary-files): Rename mark-included-diary-files.
Keep old name as alias, update callers.
(calendar-mark-days-named): Rename mark-calendar-days-named.
Keep old name as alias, update callers.
(calendar-mark-month): Rename mark-calendar-month. Keep old name as alias,
update callers.
(calendar-mark-date-pattern): Rename mark-calendar-date-pattern.
Keep old name as alias, update callers.
(diary-sort-entries): Rename sort-diary-entries. Keep old name as alias,
update callers.
(diary-list-sexp-entries): Rename list-sexp-diary-entries.
Keep old name as alias, update callers.
(diary-make-entry): Rename make-diary-entry. Keep old name as alias,
update callers.
(diary-insert-entry): Rename insert-diary-entry. Keep old name as alias.
(diary-insert-weekly-entry): Rename insert-weekly-diary-entry.
Keep old name as alias.
(diary-insert-monthly-entry): Rename insert-monthly-diary-entry.
Keep old name as alias.
(diary-insert-yearly-entry): Rename insert-yearly-diary-entry.
Keep old name as alias.
(diary-insert-anniversary-entry): Rename insert-anniversary-diary-entry.
Keep old name as alias.
(diary-insert-block-entry): Rename insert-block-diary-entry.
Keep old name as alias.
(diary-insert-cyclic-entry): Rename insert-cyclic-diary-entry.
Keep old name as alias.
(diary-fancy-font-lock-keywords): Rename fancy-diary-font-lock-keywords.
Keep old name as alias, update users.
(diary-fancy-display-mode): Rename fancy-diary-display-mode.
Keep old name as alias, update callers.
2008-04-06 20:53:14 +00:00
|
|
|
|
(diary-add-to-list date entry specifier
|
2008-04-02 03:34:23 +00:00
|
|
|
|
(if entry-start (copy-marker entry-start))
|
|
|
|
|
marks literal)
|
|
|
|
|
(setq entry-found (or entry-found diary-entry)))
|
1995-09-21 03:11:06 +00:00
|
|
|
|
entry-found))
|
|
|
|
|
|
2008-03-29 02:44:24 +00:00
|
|
|
|
(defun diary-make-date (a b c)
|
|
|
|
|
"Convert A B C into the internal calendar date form.
|
|
|
|
|
The expected order of the inputs depends on `calendar-date-style',
|
|
|
|
|
e.g. in the European case, A = day, B = month, C = year. Returns
|
2008-11-30 01:01:18 +00:00
|
|
|
|
a list (MONTH DAY YEAR), i.e. the American style, which is the
|
2008-03-29 02:44:24 +00:00
|
|
|
|
form used internally by the calendar and diary."
|
|
|
|
|
(cond ((eq calendar-date-style 'iso) ; YMD
|
|
|
|
|
(list b c a))
|
|
|
|
|
((eq calendar-date-style 'european) ; DMY
|
|
|
|
|
(list b a c))
|
|
|
|
|
(t (list a b c))))
|
|
|
|
|
|
|
|
|
|
|
2008-03-26 03:26:43 +00:00
|
|
|
|
;;; Sexp diary functions.
|
|
|
|
|
|
2008-03-08 23:38:06 +00:00
|
|
|
|
;; To be called from diary-sexp-entry, where DATE, ENTRY are bound.
|
(mark-sexp-diary-entries): Retrieve mark
from diary-sexp-entry and pass it to mark-visible-calendar-date.
(list-sexp-diary-entries): Update doc string for new docs for ....
If diary-sexp-entry returns a cons, only add the text to the diary list.
(diary-sexp-entry): Allow sexps to return a cons of the form (MARK
. STRING) to specify what face or character mark should be used in
the calendar display.
(diary-date, diary-block, diary-float, diary-anniversary)
(diary-cyclic): Add optional MARK parameter, specifying what face
or character to use in the calendar display. These will now
return (MARK . ENTRY).
(check-calendar-holidays, diary-iso-date)
(calendar-holiday-list, diary-french-date, diary-mayan-date)
(diary-julian-date, diary-astro-day-number, diary-chinese-date)
(diary-islamic-date, list-islamic-diary-entries)
(mark-islamic-diary-entries, mark-islamic-calendar-date-pattern)
(diary-hebrew-date, diary-omer, diary-yahrzeit, diary-parasha)
(diary-rosh-hodesh, list-hebrew-diary-entries)
(mark-hebrew-diary-entries, mark-hebrew-calendar-date-pattern)
(diary-coptic-date, diary-persian-date, diary-phases-of-moon)
(diary-sunrise-sunset, diary-sabbath-candles):
Remove interactive flag from autoloads.
2002-07-22 15:32:00 +00:00
|
|
|
|
(defun diary-date (month day year &optional mark)
|
1995-09-21 03:11:06 +00:00
|
|
|
|
"Specific date(s) diary entry.
|
2008-11-30 01:01:18 +00:00
|
|
|
|
Entry applies if date is MONTH, DAY, YEAR. Each parameter can be a
|
2015-05-21 17:04:45 +00:00
|
|
|
|
list of integers, t (meaning all values), or an integer. The order
|
2008-11-30 01:01:18 +00:00
|
|
|
|
of the input parameters changes according to `calendar-date-style'
|
2008-03-29 02:44:24 +00:00
|
|
|
|
\(e.g. to DAY MONTH YEAR in the European style).
|
(mark-sexp-diary-entries): Retrieve mark
from diary-sexp-entry and pass it to mark-visible-calendar-date.
(list-sexp-diary-entries): Update doc string for new docs for ....
If diary-sexp-entry returns a cons, only add the text to the diary list.
(diary-sexp-entry): Allow sexps to return a cons of the form (MARK
. STRING) to specify what face or character mark should be used in
the calendar display.
(diary-date, diary-block, diary-float, diary-anniversary)
(diary-cyclic): Add optional MARK parameter, specifying what face
or character to use in the calendar display. These will now
return (MARK . ENTRY).
(check-calendar-holidays, diary-iso-date)
(calendar-holiday-list, diary-french-date, diary-mayan-date)
(diary-julian-date, diary-astro-day-number, diary-chinese-date)
(diary-islamic-date, list-islamic-diary-entries)
(mark-islamic-diary-entries, mark-islamic-calendar-date-pattern)
(diary-hebrew-date, diary-omer, diary-yahrzeit, diary-parasha)
(diary-rosh-hodesh, list-hebrew-diary-entries)
(mark-hebrew-diary-entries, mark-hebrew-calendar-date-pattern)
(diary-coptic-date, diary-persian-date, diary-phases-of-moon)
(diary-sunrise-sunset, diary-sabbath-candles):
Remove interactive flag from autoloads.
2002-07-22 15:32:00 +00:00
|
|
|
|
|
2008-11-30 01:01:18 +00:00
|
|
|
|
An optional parameter MARK specifies a face or single-character string
|
|
|
|
|
to use when highlighting the day in the calendar."
|
2017-12-04 22:03:32 +00:00
|
|
|
|
(with-no-warnings (defvar date) (defvar entry))
|
2008-03-29 02:44:24 +00:00
|
|
|
|
(let* ((ddate (diary-make-date month day year))
|
2008-04-07 01:59:37 +00:00
|
|
|
|
(dd (calendar-extract-day ddate))
|
|
|
|
|
(mm (calendar-extract-month ddate))
|
|
|
|
|
(yy (calendar-extract-year ddate))
|
|
|
|
|
(m (calendar-extract-month date))
|
|
|
|
|
(y (calendar-extract-year date))
|
|
|
|
|
(d (calendar-extract-day date)))
|
2008-03-29 02:44:24 +00:00
|
|
|
|
(and
|
|
|
|
|
(or (and (listp dd) (memq d dd))
|
|
|
|
|
(equal d dd)
|
|
|
|
|
(eq dd t))
|
|
|
|
|
(or (and (listp mm) (memq m mm))
|
|
|
|
|
(equal m mm)
|
|
|
|
|
(eq mm t))
|
|
|
|
|
(or (and (listp yy) (memq y yy))
|
|
|
|
|
(equal y yy)
|
|
|
|
|
(eq yy t))
|
|
|
|
|
(cons mark entry))))
|
1995-09-21 03:11:06 +00:00
|
|
|
|
|
2008-03-08 23:38:06 +00:00
|
|
|
|
;; To be called from diary-sexp-entry, where DATE, ENTRY are bound.
|
(mark-sexp-diary-entries): Retrieve mark
from diary-sexp-entry and pass it to mark-visible-calendar-date.
(list-sexp-diary-entries): Update doc string for new docs for ....
If diary-sexp-entry returns a cons, only add the text to the diary list.
(diary-sexp-entry): Allow sexps to return a cons of the form (MARK
. STRING) to specify what face or character mark should be used in
the calendar display.
(diary-date, diary-block, diary-float, diary-anniversary)
(diary-cyclic): Add optional MARK parameter, specifying what face
or character to use in the calendar display. These will now
return (MARK . ENTRY).
(check-calendar-holidays, diary-iso-date)
(calendar-holiday-list, diary-french-date, diary-mayan-date)
(diary-julian-date, diary-astro-day-number, diary-chinese-date)
(diary-islamic-date, list-islamic-diary-entries)
(mark-islamic-diary-entries, mark-islamic-calendar-date-pattern)
(diary-hebrew-date, diary-omer, diary-yahrzeit, diary-parasha)
(diary-rosh-hodesh, list-hebrew-diary-entries)
(mark-hebrew-diary-entries, mark-hebrew-calendar-date-pattern)
(diary-coptic-date, diary-persian-date, diary-phases-of-moon)
(diary-sunrise-sunset, diary-sabbath-candles):
Remove interactive flag from autoloads.
2002-07-22 15:32:00 +00:00
|
|
|
|
(defun diary-block (m1 d1 y1 m2 d2 y2 &optional mark)
|
1995-09-21 03:11:06 +00:00
|
|
|
|
"Block diary entry.
|
2008-11-30 01:01:18 +00:00
|
|
|
|
Entry applies if date is between, or on one of, two dates. The order
|
|
|
|
|
of the input parameters changes according to `calendar-date-style'
|
|
|
|
|
\(e.g. to D1, M1, Y1, D2, M2, Y2 in the European style).
|
(mark-sexp-diary-entries): Retrieve mark
from diary-sexp-entry and pass it to mark-visible-calendar-date.
(list-sexp-diary-entries): Update doc string for new docs for ....
If diary-sexp-entry returns a cons, only add the text to the diary list.
(diary-sexp-entry): Allow sexps to return a cons of the form (MARK
. STRING) to specify what face or character mark should be used in
the calendar display.
(diary-date, diary-block, diary-float, diary-anniversary)
(diary-cyclic): Add optional MARK parameter, specifying what face
or character to use in the calendar display. These will now
return (MARK . ENTRY).
(check-calendar-holidays, diary-iso-date)
(calendar-holiday-list, diary-french-date, diary-mayan-date)
(diary-julian-date, diary-astro-day-number, diary-chinese-date)
(diary-islamic-date, list-islamic-diary-entries)
(mark-islamic-diary-entries, mark-islamic-calendar-date-pattern)
(diary-hebrew-date, diary-omer, diary-yahrzeit, diary-parasha)
(diary-rosh-hodesh, list-hebrew-diary-entries)
(mark-hebrew-diary-entries, mark-hebrew-calendar-date-pattern)
(diary-coptic-date, diary-persian-date, diary-phases-of-moon)
(diary-sunrise-sunset, diary-sabbath-candles):
Remove interactive flag from autoloads.
2002-07-22 15:32:00 +00:00
|
|
|
|
|
2008-11-30 01:01:18 +00:00
|
|
|
|
An optional parameter MARK specifies a face or single-character string
|
|
|
|
|
to use when highlighting the day in the calendar."
|
2017-12-04 22:03:32 +00:00
|
|
|
|
(with-no-warnings (defvar date) (defvar entry))
|
1995-09-21 03:11:06 +00:00
|
|
|
|
(let ((date1 (calendar-absolute-from-gregorian
|
2008-03-29 02:44:24 +00:00
|
|
|
|
(diary-make-date m1 d1 y1)))
|
1995-09-21 03:11:06 +00:00
|
|
|
|
(date2 (calendar-absolute-from-gregorian
|
2008-03-29 02:44:24 +00:00
|
|
|
|
(diary-make-date m2 d2 y2)))
|
1995-09-21 03:11:06 +00:00
|
|
|
|
(d (calendar-absolute-from-gregorian date)))
|
2008-03-29 02:44:24 +00:00
|
|
|
|
(and (<= date1 d) (<= d date2)
|
|
|
|
|
(cons mark entry))))
|
1995-09-21 03:11:06 +00:00
|
|
|
|
|
2008-03-08 23:38:06 +00:00
|
|
|
|
;; To be called from diary-sexp-entry, where DATE, ENTRY are bound.
|
(mark-sexp-diary-entries): Retrieve mark
from diary-sexp-entry and pass it to mark-visible-calendar-date.
(list-sexp-diary-entries): Update doc string for new docs for ....
If diary-sexp-entry returns a cons, only add the text to the diary list.
(diary-sexp-entry): Allow sexps to return a cons of the form (MARK
. STRING) to specify what face or character mark should be used in
the calendar display.
(diary-date, diary-block, diary-float, diary-anniversary)
(diary-cyclic): Add optional MARK parameter, specifying what face
or character to use in the calendar display. These will now
return (MARK . ENTRY).
(check-calendar-holidays, diary-iso-date)
(calendar-holiday-list, diary-french-date, diary-mayan-date)
(diary-julian-date, diary-astro-day-number, diary-chinese-date)
(diary-islamic-date, list-islamic-diary-entries)
(mark-islamic-diary-entries, mark-islamic-calendar-date-pattern)
(diary-hebrew-date, diary-omer, diary-yahrzeit, diary-parasha)
(diary-rosh-hodesh, list-hebrew-diary-entries)
(mark-hebrew-diary-entries, mark-hebrew-calendar-date-pattern)
(diary-coptic-date, diary-persian-date, diary-phases-of-moon)
(diary-sunrise-sunset, diary-sabbath-candles):
Remove interactive flag from autoloads.
2002-07-22 15:32:00 +00:00
|
|
|
|
(defun diary-float (month dayname n &optional day mark)
|
2008-04-29 03:34:40 +00:00
|
|
|
|
"Diary entry for the Nth DAYNAME after/before MONTH DAY.
|
|
|
|
|
DAYNAME=0 means Sunday, DAYNAME=1 means Monday, and so on.
|
|
|
|
|
If N>0, use the Nth DAYNAME after MONTH DAY.
|
|
|
|
|
If N<0, use the Nth DAYNAME before MONTH DAY.
|
|
|
|
|
DAY defaults to 1 if N>0, and MONTH's last day otherwise.
|
2015-05-21 17:04:45 +00:00
|
|
|
|
MONTH can be a list of months, an integer, or t (meaning all months).
|
2002-08-06 15:11:26 +00:00
|
|
|
|
Optional MARK specifies a face or single-character string to use when
|
(mark-sexp-diary-entries): Retrieve mark
from diary-sexp-entry and pass it to mark-visible-calendar-date.
(list-sexp-diary-entries): Update doc string for new docs for ....
If diary-sexp-entry returns a cons, only add the text to the diary list.
(diary-sexp-entry): Allow sexps to return a cons of the form (MARK
. STRING) to specify what face or character mark should be used in
the calendar display.
(diary-date, diary-block, diary-float, diary-anniversary)
(diary-cyclic): Add optional MARK parameter, specifying what face
or character to use in the calendar display. These will now
return (MARK . ENTRY).
(check-calendar-holidays, diary-iso-date)
(calendar-holiday-list, diary-french-date, diary-mayan-date)
(diary-julian-date, diary-astro-day-number, diary-chinese-date)
(diary-islamic-date, list-islamic-diary-entries)
(mark-islamic-diary-entries, mark-islamic-calendar-date-pattern)
(diary-hebrew-date, diary-omer, diary-yahrzeit, diary-parasha)
(diary-rosh-hodesh, list-hebrew-diary-entries)
(mark-hebrew-diary-entries, mark-hebrew-calendar-date-pattern)
(diary-coptic-date, diary-persian-date, diary-phases-of-moon)
(diary-sunrise-sunset, diary-sabbath-candles):
Remove interactive flag from autoloads.
2002-07-22 15:32:00 +00:00
|
|
|
|
highlighting the day in the calendar."
|
2017-12-04 22:03:32 +00:00
|
|
|
|
(with-no-warnings (defvar date) (defvar entry))
|
2008-03-13 06:29:28 +00:00
|
|
|
|
;; This is messy because the diary entry may apply, but the date on which it
|
|
|
|
|
;; is based can be in a different month/year. For example, asking for the
|
|
|
|
|
;; first Monday after December 30. For large values of |n| the problem is
|
|
|
|
|
;; more grotesque.
|
1997-05-20 05:18:15 +00:00
|
|
|
|
(and (= dayname (calendar-day-of-week date))
|
2008-04-07 01:59:37 +00:00
|
|
|
|
(let* ((m (calendar-extract-month date))
|
|
|
|
|
(d (calendar-extract-day date))
|
|
|
|
|
(y (calendar-extract-year date))
|
2008-03-13 06:29:28 +00:00
|
|
|
|
;; Last (n>0) or first (n<0) possible base date for entry.
|
(diary-face-attrs): Fix custom :type.
(diary-face-attrs, diary-glob-file-regexp-prefix, diary-unknown-time)
(diary-pull-attrs, diary-header-line-flag, diary-list-entries)
(diary-unhide-everything, include-other-diary-files, diary-goto-entry)
(mark-included-diary-files, mark-calendar-days-named)
(mark-calendar-date-pattern, mark-calendar-month, diary-entry-compare)
(diary-remind, insert-diary-entry, insert-weekly-diary-entry)
(insert-monthly-diary-entry, insert-yearly-diary-entry)
(insert-anniversary-diary-entry, insert-block-diary-entry)
(insert-cyclic-diary-entry, fancy-diary-font-lock-keywords)
(diary-font-lock-sexps): Doc fixes.
(diary-remind-message, mark-calendar-month): Use zerop.
(diary-attrtype-convert, diary-pull-attrs): Simplify.
(diary-list-entries): Revert let to let* (previous change).
2008-03-10 02:44:51 +00:00
|
|
|
|
(limit
|
1997-05-20 05:18:15 +00:00
|
|
|
|
(calendar-nth-named-absday (- n) dayname m y d))
|
|
|
|
|
(last-abs (if (> n 0) limit (+ limit 6)))
|
|
|
|
|
(first-abs (if (> n 0) (- limit 6) limit))
|
|
|
|
|
(last (calendar-gregorian-from-absolute last-abs))
|
|
|
|
|
(first (calendar-gregorian-from-absolute first-abs))
|
(diary-face-attrs): Fix custom :type.
(diary-face-attrs, diary-glob-file-regexp-prefix, diary-unknown-time)
(diary-pull-attrs, diary-header-line-flag, diary-list-entries)
(diary-unhide-everything, include-other-diary-files, diary-goto-entry)
(mark-included-diary-files, mark-calendar-days-named)
(mark-calendar-date-pattern, mark-calendar-month, diary-entry-compare)
(diary-remind, insert-diary-entry, insert-weekly-diary-entry)
(insert-monthly-diary-entry, insert-yearly-diary-entry)
(insert-anniversary-diary-entry, insert-block-diary-entry)
(insert-cyclic-diary-entry, fancy-diary-font-lock-keywords)
(diary-font-lock-sexps): Doc fixes.
(diary-remind-message, mark-calendar-month): Use zerop.
(diary-attrtype-convert, diary-pull-attrs): Simplify.
(diary-list-entries): Revert let to let* (previous change).
2008-03-10 02:44:51 +00:00
|
|
|
|
;; m1, d1 is first possible base date.
|
2008-04-07 01:59:37 +00:00
|
|
|
|
(m1 (calendar-extract-month first))
|
|
|
|
|
(d1 (calendar-extract-day first))
|
|
|
|
|
(y1 (calendar-extract-year first))
|
(diary-face-attrs): Fix custom :type.
(diary-face-attrs, diary-glob-file-regexp-prefix, diary-unknown-time)
(diary-pull-attrs, diary-header-line-flag, diary-list-entries)
(diary-unhide-everything, include-other-diary-files, diary-goto-entry)
(mark-included-diary-files, mark-calendar-days-named)
(mark-calendar-date-pattern, mark-calendar-month, diary-entry-compare)
(diary-remind, insert-diary-entry, insert-weekly-diary-entry)
(insert-monthly-diary-entry, insert-yearly-diary-entry)
(insert-anniversary-diary-entry, insert-block-diary-entry)
(insert-cyclic-diary-entry, fancy-diary-font-lock-keywords)
(diary-font-lock-sexps): Doc fixes.
(diary-remind-message, mark-calendar-month): Use zerop.
(diary-attrtype-convert, diary-pull-attrs): Simplify.
(diary-list-entries): Revert let to let* (previous change).
2008-03-10 02:44:51 +00:00
|
|
|
|
;; m2, d2 is last possible base date.
|
2008-04-07 01:59:37 +00:00
|
|
|
|
(m2 (calendar-extract-month last))
|
|
|
|
|
(d2 (calendar-extract-day last))
|
|
|
|
|
(y2 (calendar-extract-year last)))
|
2008-03-13 06:29:28 +00:00
|
|
|
|
(if (or (and (= m1 m2) ; only possible base dates in one month
|
|
|
|
|
(or (eq month t)
|
|
|
|
|
(if (listp month)
|
2001-01-24 11:48:19 +00:00
|
|
|
|
(memq m1 month)
|
2008-03-13 06:29:28 +00:00
|
|
|
|
(= m1 month)))
|
|
|
|
|
(let ((d (or day (if (> n 0)
|
|
|
|
|
1
|
|
|
|
|
(calendar-last-day-of-month m1 y1)))))
|
|
|
|
|
(and (<= d1 d) (<= d d2))))
|
|
|
|
|
;; Only possible base dates straddle two months.
|
|
|
|
|
(and (or (< y1 y2)
|
|
|
|
|
(and (= y1 y2) (< m1 m2)))
|
|
|
|
|
(or
|
|
|
|
|
;; m1, d1 works as a base date.
|
|
|
|
|
(and
|
|
|
|
|
(or (eq month t)
|
|
|
|
|
(if (listp month)
|
2001-01-24 11:48:19 +00:00
|
|
|
|
(memq m1 month)
|
2008-03-13 06:29:28 +00:00
|
|
|
|
(= m1 month)))
|
|
|
|
|
(<= d1 (or day (if (> n 0)
|
|
|
|
|
1
|
|
|
|
|
(calendar-last-day-of-month m1 y1)))))
|
|
|
|
|
;; m2, d2 works as a base date.
|
|
|
|
|
(and (or (eq month t)
|
|
|
|
|
(if (listp month)
|
2001-01-24 11:48:19 +00:00
|
|
|
|
(memq m2 month)
|
2008-03-13 06:29:28 +00:00
|
|
|
|
(= m2 month)))
|
|
|
|
|
(<= (or day (if (> n 0)
|
|
|
|
|
1
|
|
|
|
|
(calendar-last-day-of-month m2 y2)))
|
|
|
|
|
d2)))))
|
|
|
|
|
(cons mark entry)))))
|
1995-09-21 03:11:06 +00:00
|
|
|
|
|
2008-03-17 02:33:49 +00:00
|
|
|
|
(defun diary-ordinal-suffix (n)
|
lisp/*.el: Fix typos and other trivial doc fixes
* lisp/allout-widgets.el (allout-widgets-auto-activation)
(allout-current-decorated-p):
* lisp/auth-source.el (auth-source-protocols):
* lisp/autorevert.el (auto-revert-set-timer):
* lisp/battery.el (battery-mode-line-limit):
* lisp/calc/calcalg3.el (math-map-binop):
* lisp/calendar/cal-dst.el (calendar-dst-find-startend):
* lisp/calendar/cal-mayan.el (calendar-mayan-long-count-to-absolute):
* lisp/calendar/calendar.el (calendar-date-echo-text)
(calendar-generate-month, calendar-string-spread)
(calendar-cursor-to-date, calendar-read, calendar-read-date)
(calendar-mark-visible-date, calendar-dayname-on-or-before):
* lisp/calendar/diary-lib.el (diary-ordinal-suffix):
* lisp/cedet/ede/autoconf-edit.el (autoconf-new-program)
(autoconf-find-last-macro, autoconf-parameter-strip):
* lisp/cedet/ede/config.el (ede-target-with-config-build):
* lisp/cedet/ede/linux.el (ede-linux--detect-architecture)
(ede-linux--get-architecture):
* lisp/cedet/semantic/complete.el (semantic-collector-calculate-cache)
(semantic-displayer-abstract, semantic-displayer-point-position):
* lisp/cedet/semantic/format.el (semantic-format-face-alist)
(semantic-format-tag-short-doc):
* lisp/cedet/semantic/fw.el (semantic-find-file-noselect):
* lisp/cedet/semantic/idle.el (semantic-idle-scheduler-work-idle-time)
(semantic-idle-breadcrumbs-display-function)
(semantic-idle-breadcrumbs-format-tag-list-function):
* lisp/cedet/semantic/lex.el (semantic-lex-map-types)
(define-lex, define-lex-block-type-analyzer):
* lisp/cedet/semantic/senator.el (senator-search-default-tag-filter):
* lisp/cedet/semantic/symref.el (semantic-symref-result)
(semantic-symref-hit-to-tag-via-db):
* lisp/cedet/semantic/symref.el (semantic-symref-tool-baseclass):
* lisp/cedet/semantic/tag.el (semantic-tag-new-variable)
(semantic-tag-new-include, semantic-tag-new-package)
(semantic-tag-set-faux, semantic-create-tag-proxy)
(semantic-tag-function-parent)
(semantic-tag-components-with-overlays):
* lisp/cedet/srecode/cpp.el (srecode-cpp-namespaces)
(srecode-semantic-handle-:c, srecode-semantic-apply-tag-to-dict):
* lisp/cedet/srecode/dictionary.el (srecode-create-dictionary)
(srecode-dictionary-add-entries, srecode-dictionary-lookup-name)
(srecode-create-dictionaries-from-tags):
* lisp/cmuscheme.el (scheme-compile-region):
* lisp/color.el (color-lab-to-lch):
* lisp/doc-view.el (doc-view-image-width)
(doc-view-set-up-single-converter):
* lisp/dynamic-setting.el (font-setting-change-default-font)
(dynamic-setting-handle-config-changed-event):
* lisp/elec-pair.el (electric-pair-text-pairs)
(electric-pair-skip-whitespace-function)
(electric-pair-string-bound-function):
* lisp/emacs-lisp/avl-tree.el (avl-tree--del-balance)
(avl-tree-member, avl-tree-mapcar, avl-tree-iter):
* lisp/emacs-lisp/bytecomp.el (byte-compile-generate-call-tree):
* lisp/emacs-lisp/checkdoc.el (checkdoc-autofix-flag)
(checkdoc-spellcheck-documentation-flag, checkdoc-ispell)
(checkdoc-ispell-current-buffer, checkdoc-ispell-interactive)
(checkdoc-ispell-message-interactive)
(checkdoc-ispell-message-text, checkdoc-ispell-start)
(checkdoc-ispell-continue, checkdoc-ispell-comments)
(checkdoc-ispell-defun):
* lisp/emacs-lisp/cl-generic.el (cl--generic-search-method):
* lisp/emacs-lisp/eieio-custom.el (eieio-read-customization-group):
* lisp/emacs-lisp/lisp.el (forward-sexp, up-list):
* lisp/emacs-lisp/package-x.el (package--archive-contents-from-file):
* lisp/emacs-lisp/package.el (package-desc)
(package--make-autoloads-and-stuff, package-hidden-regexps):
* lisp/emacs-lisp/tcover-ses.el (ses-exercise-startup):
* lisp/emacs-lisp/testcover.el (testcover-nohits)
(testcover-1value):
* lisp/epg.el (epg-receive-keys, epg-start-edit-key):
* lisp/erc/erc-backend.el (erc-server-processing-p)
(erc-split-line-length, erc-server-coding-system)
(erc-server-send, erc-message):
* lisp/erc/erc-button.el (erc-button-face, erc-button-alist)
(erc-browse-emacswiki):
* lisp/erc/erc-ezbounce.el (erc-ezbounce, erc-ezb-get-login):
* lisp/erc/erc-fill.el (erc-fill-variable-maximum-indentation):
* lisp/erc/erc-log.el (erc-current-logfile):
* lisp/erc/erc-match.el (erc-log-match-format)
(erc-text-matched-hook):
* lisp/erc/erc-netsplit.el (erc-netsplit, erc-netsplit-debug):
* lisp/erc/erc-networks.el (erc-server-alist)
(erc-networks-alist, erc-current-network):
* lisp/erc/erc-ring.el (erc-input-ring-index):
* lisp/erc/erc-speedbar.el (erc-speedbar)
(erc-speedbar-update-channel):
* lisp/erc/erc-stamp.el (erc-timestamp-only-if-changed-flag):
* lisp/erc/erc-track.el (erc-track-position-in-mode-line)
(erc-track-remove-from-mode-line, erc-modified-channels-update)
(erc-track-last-non-erc-buffer, erc-track-sort-by-importance)
(erc-track-get-active-buffer):
* lisp/erc/erc.el (erc-get-channel-user-list)
(erc-echo-notice-hook, erc-echo-notice-always-hook)
(erc-wash-quit-reason, erc-format-@nick):
* lisp/ffap.el (ffap-latex-mode):
* lisp/files.el (abort-if-file-too-large)
(dir-locals--get-sort-score, buffer-stale--default-function):
* lisp/filesets.el (filesets-tree-max-level, filesets-data)
(filesets-update-pre010505):
* lisp/gnus/gnus-agent.el (gnus-agent-flush-cache):
* lisp/gnus/gnus-art.el (gnus-article-encrypt-protocol)
(gnus-button-prefer-mid-or-mail):
* lisp/gnus/gnus-cus.el (gnus-group-parameters):
* lisp/gnus/gnus-demon.el (gnus-demon-handlers)
(gnus-demon-run-callback):
* lisp/gnus/gnus-dired.el (gnus-dired-print):
* lisp/gnus/gnus-icalendar.el (gnus-icalendar-event-from-buffer):
* lisp/gnus/gnus-range.el (gnus-range-normalize):
* lisp/gnus/gnus-spec.el (gnus-pad-form):
* lisp/gnus/gnus-srvr.el (gnus-server-agent, gnus-server-cloud)
(gnus-server-opened, gnus-server-closed, gnus-server-denied)
(gnus-server-offline):
* lisp/gnus/gnus-sum.el (gnus-refer-thread-use-nnir)
(gnus-refer-thread-limit-to-thread)
(gnus-summary-limit-include-thread, gnus-summary-refer-thread)
(gnus-summary-find-matching):
* lisp/gnus/gnus-util.el (gnus-rescale-image):
* lisp/gnus/gnus.el (gnus-summary-line-format, gnus-no-server):
* lisp/gnus/mail-source.el (mail-source-incoming-file-prefix):
* lisp/gnus/message.el (message-cite-reply-position)
(message-cite-style-outlook, message-cite-style-thunderbird)
(message-cite-style-gmail, message--send-mail-maybe-partially):
* lisp/gnus/mm-extern.el (mm-inline-external-body):
* lisp/gnus/mm-partial.el (mm-inline-partial):
* lisp/gnus/mml-sec.el (mml-secure-message-sign)
(mml-secure-message-sign-encrypt, mml-secure-message-encrypt):
* lisp/gnus/mml2015.el (mml2015-epg-key-image)
(mml2015-epg-key-image-to-string):
* lisp/gnus/nndiary.el (nndiary-reminders, nndiary-get-new-mail):
* lisp/gnus/nnheader.el (nnheader-directory-files-is-safe):
* lisp/gnus/nnir.el (nnir-search-history)
(nnir-imap-search-other, nnir-artlist-length)
(nnir-artlist-article, nnir-artitem-group, nnir-artitem-number)
(nnir-artitem-rsv, nnir-article-group, nnir-article-number)
(nnir-article-rsv, nnir-article-ids, nnir-categorize)
(nnir-retrieve-headers-override-function)
(nnir-imap-default-search-key, nnir-hyrex-additional-switches)
(gnus-group-make-nnir-group, nnir-run-namazu, nnir-read-parms)
(nnir-read-parm, nnir-read-server-parm, nnir-search-thread):
* lisp/gnus/nnmairix.el (nnmairix-default-group)
(nnmairix-propagate-marks):
* lisp/gnus/smime.el (smime-keys, smime-crl-check)
(smime-verify-buffer, smime-noverify-buffer):
* lisp/gnus/spam-report.el (spam-report-url-ping-mm-url):
* lisp/gnus/spam.el (spam-spamassassin-positive-spam-flag-header)
(spam-spamassassin-spam-status-header, spam-sa-learn-rebuild)
(spam-classifications, spam-check-stat, spam-spamassassin-score):
* lisp/help.el (describe-minor-mode-from-symbol):
* lisp/hippie-exp.el (hippie-expand-ignore-buffers):
* lisp/htmlfontify.el (hfy-optimizations, hfy-face-resolve-face)
(hfy-begin-span):
* lisp/ibuf-ext.el (ibuffer-update-saved-filters-format)
(ibuffer-saved-filters, ibuffer-old-saved-filters-warning)
(ibuffer-filtering-qualifiers, ibuffer-repair-saved-filters)
(eval, ibuffer-unary-operand, file-extension, directory):
* lisp/image-dired.el (image-dired-cmd-pngcrush-options):
* lisp/image-mode.el (image-toggle-display):
* lisp/international/ccl.el (ccl-compile-read-multibyte-character)
(ccl-compile-write-multibyte-character):
* lisp/international/kkc.el (kkc-save-init-file):
* lisp/international/latin1-disp.el (latin1-display):
* lisp/international/ogonek.el (ogonek-name-encoding-alist)
(ogonek-information, ogonek-lookup-encoding)
(ogonek-deprefixify-region):
* lisp/isearch.el (isearch-filter-predicate)
(isearch--momentary-message):
* lisp/jsonrpc.el (jsonrpc-connection-send)
(jsonrpc-process-connection, jsonrpc-shutdown)
(jsonrpc--async-request-1):
* lisp/language/tibet-util.el (tibetan-char-p):
* lisp/mail/feedmail.el (feedmail-queue-use-send-time-for-date)
(feedmail-last-chance-hook, feedmail-before-fcc-hook)
(feedmail-send-it-immediately-wrapper, feedmail-find-eoh):
* lisp/mail/hashcash.el (hashcash-generate-payment)
(hashcash-generate-payment-async, hashcash-insert-payment)
(hashcash-verify-payment):
* lisp/mail/rmail.el (rmail-movemail-variant-in-use)
(rmail-get-attr-value):
* lisp/mail/rmailmm.el (rmail-mime-prefer-html, rmail-mime):
* lisp/mail/rmailsum.el (rmail-summary-show-message):
* lisp/mail/supercite.el (sc-raw-mode-toggle):
* lisp/man.el (Man-start-calling):
* lisp/mh-e/mh-acros.el (mh-do-at-event-location)
(mh-iterate-on-messages-in-region, mh-iterate-on-range):
* lisp/mh-e/mh-alias.el (mh-alias-system-aliases)
(mh-alias-reload, mh-alias-ali)
(mh-alias-canonicalize-suggestion, mh-alias-add-alias-to-file)
(mh-alias-add-alias):
* lisp/mouse.el (mouse-save-then-kill):
* lisp/net/browse-url.el (browse-url-default-macosx-browser):
* lisp/net/eudc.el (eudc-set, eudc-variable-protocol-value)
(eudc-variable-server-value, eudc-update-variable)
(eudc-expand-inline):
* lisp/net/eudcb-bbdb.el (eudc-bbdb-format-record-as-result):
* lisp/net/eudcb-ldap.el (eudc-ldap-get-field-list):
* lisp/net/pop3.el (pop3-list):
* lisp/net/soap-client.el (soap-namespace-put)
(soap-xs-parse-sequence, soap-parse-envelope):
* lisp/net/soap-inspect.el (soap-inspect-xs-complex-type):
* lisp/nxml/rng-xsd.el (rng-xsd-date-to-days):
* lisp/org/ob-C.el (org-babel-prep-session:C)
(org-babel-load-session:C):
* lisp/org/ob-J.el (org-babel-execute:J):
* lisp/org/ob-asymptote.el (org-babel-prep-session:asymptote):
* lisp/org/ob-awk.el (org-babel-execute:awk):
* lisp/org/ob-core.el (org-babel-process-file-name):
* lisp/org/ob-ebnf.el (org-babel-execute:ebnf):
* lisp/org/ob-forth.el (org-babel-execute:forth):
* lisp/org/ob-fortran.el (org-babel-execute:fortran)
(org-babel-prep-session:fortran, org-babel-load-session:fortran):
* lisp/org/ob-groovy.el (org-babel-execute:groovy):
* lisp/org/ob-io.el (org-babel-execute:io):
* lisp/org/ob-js.el (org-babel-execute:js):
* lisp/org/ob-lilypond.el (org-babel-default-header-args:lilypond)
(org-babel-lilypond-compile-post-tangle)
(org-babel-lilypond-display-pdf-post-tangle)
(org-babel-lilypond-tangle)
(org-babel-lilypond-execute-tangled-ly)
(org-babel-lilypond-compile-lilyfile)
(org-babel-lilypond-check-for-compile-error)
(org-babel-lilypond-process-compile-error)
(org-babel-lilypond-mark-error-line)
(org-babel-lilypond-parse-error-line)
(org-babel-lilypond-attempt-to-open-pdf)
(org-babel-lilypond-attempt-to-play-midi)
(org-babel-lilypond-switch-extension)
(org-babel-lilypond-set-header-args):
* lisp/org/ob-lua.el (org-babel-prep-session:lua):
* lisp/org/ob-picolisp.el (org-babel-execute:picolisp):
* lisp/org/ob-processing.el (org-babel-prep-session:processing):
* lisp/org/ob-python.el (org-babel-prep-session:python):
* lisp/org/ob-scheme.el (org-babel-scheme-capture-current-message)
(org-babel-scheme-execute-with-geiser, org-babel-execute:scheme):
* lisp/org/ob-shen.el (org-babel-execute:shen):
* lisp/org/org-agenda.el (org-agenda-entry-types)
(org-agenda-move-date-from-past-immediately-to-today)
(org-agenda-time-grid, org-agenda-sorting-strategy)
(org-agenda-filter-by-category, org-agenda-forward-block):
* lisp/org/org-colview.el (org-columns--overlay-text):
* lisp/org/org-faces.el (org-verbatim, org-cycle-level-faces):
* lisp/org/org-indent.el (org-indent-set-line-properties):
* lisp/org/org-macs.el (org-get-limited-outline-regexp):
* lisp/org/org-mobile.el (org-mobile-files):
* lisp/org/org.el (org-use-fast-todo-selection)
(org-extend-today-until, org-use-property-inheritance)
(org-refresh-effort-properties, org-open-at-point-global)
(org-track-ordered-property-with-tag, org-shiftright):
* lisp/org/ox-html.el (org-html-checkbox-type):
* lisp/org/ox-man.el (org-man-source-highlight)
(org-man-verse-block):
* lisp/org/ox-publish.el (org-publish-sitemap-default):
* lisp/outline.el (outline-head-from-level):
* lisp/progmodes/dcl-mode.el (dcl-back-to-indentation-1)
(dcl-calc-command-indent, dcl-indent-to):
* lisp/progmodes/flymake.el (flymake-make-diagnostic)
(flymake--overlays, flymake-diagnostic-functions)
(flymake-diagnostic-types-alist, flymake--backend-state)
(flymake-is-running, flymake--collect, flymake-mode):
* lisp/progmodes/gdb-mi.el (gdb-threads-list, gdb, gdb-non-stop)
(gdb-buffers, gdb-gud-context-call, gdb-jsonify-buffer):
* lisp/progmodes/grep.el (grep-error-screen-columns):
* lisp/progmodes/gud.el (gud-prev-expr):
* lisp/progmodes/ps-mode.el (ps-mode, ps-mode-target-column)
(ps-run-goto-error):
* lisp/progmodes/python.el (python-eldoc-get-doc)
(python-eldoc-function-timeout-permanent, python-eldoc-function):
* lisp/shadowfile.el (shadow-make-group):
* lisp/speedbar.el (speedbar-obj-do-check):
* lisp/textmodes/flyspell.el (flyspell-auto-correct-previous-hook):
* lisp/textmodes/reftex-cite.el (reftex-bib-or-thebib):
* lisp/textmodes/reftex-index.el (reftex-index-goto-entry)
(reftex-index-kill, reftex-index-undo):
* lisp/textmodes/reftex-parse.el (reftex-context-substring):
* lisp/textmodes/reftex.el (reftex-TeX-master-file):
* lisp/textmodes/rst.el (rst-next-hdr, rst-toc)
(rst-uncomment-region, rst-font-lock-extend-region-internal):
* lisp/thumbs.el (thumbs-mode):
* lisp/vc/ediff-util.el (ediff-restore-diff):
* lisp/vc/pcvs-defs.el (cvs-cvsroot, cvs-force-dir-tag):
* lisp/vc/vc-hg.el (vc-hg--ignore-patterns-valid-p):
* lisp/wid-edit.el (widget-field-value-set, string):
* lisp/x-dnd.el (x-dnd-version-from-flags)
(x-dnd-more-than-3-from-flags): Assorted docfixes.
2019-09-20 22:27:53 +00:00
|
|
|
|
"Ordinal suffix for N. (That is, `st', `nd', `rd', or `th', as appropriate.)"
|
2008-03-17 02:33:49 +00:00
|
|
|
|
(if (or (memq (% n 100) '(11 12 13))
|
|
|
|
|
(< 3 (% n 10)))
|
|
|
|
|
"th"
|
|
|
|
|
(aref ["th" "st" "nd" "rd"] (% n 10))))
|
|
|
|
|
|
2008-03-08 23:38:06 +00:00
|
|
|
|
;; To be called from diary-sexp-entry, where DATE, ENTRY are bound.
|
2005-10-06 16:22:13 +00:00
|
|
|
|
(defun diary-anniversary (month day &optional year mark)
|
1995-09-21 03:11:06 +00:00
|
|
|
|
"Anniversary diary entry.
|
2008-03-29 02:44:24 +00:00
|
|
|
|
Entry applies if date is the anniversary of MONTH, DAY, YEAR.
|
|
|
|
|
The order of the input parameters changes according to
|
|
|
|
|
`calendar-date-style' (e.g. to DAY MONTH YEAR in the European style).
|
|
|
|
|
|
2008-11-30 01:01:18 +00:00
|
|
|
|
The diary entry can contain `%d' or `%d%s'; the %d will be replaced
|
|
|
|
|
by the number of years since the MONTH, DAY, YEAR, and the %s will
|
|
|
|
|
be replaced by the ordinal ending of that number (that is, `st',
|
|
|
|
|
`nd', `rd' or `th', as appropriate). The anniversary of February 29
|
|
|
|
|
is considered to be March 1 in non-leap years.
|
2008-03-29 02:44:24 +00:00
|
|
|
|
|
|
|
|
|
An optional parameter MARK specifies a face or single-character
|
|
|
|
|
string to use when highlighting the day in the calendar."
|
2017-12-04 22:03:32 +00:00
|
|
|
|
(with-no-warnings (defvar date) (defvar entry))
|
2008-03-29 02:44:24 +00:00
|
|
|
|
(let* ((ddate (diary-make-date month day year))
|
2008-04-07 01:59:37 +00:00
|
|
|
|
(dd (calendar-extract-day ddate))
|
|
|
|
|
(mm (calendar-extract-month ddate))
|
|
|
|
|
(yy (calendar-extract-year ddate))
|
|
|
|
|
(y (calendar-extract-year date))
|
2008-03-29 02:44:24 +00:00
|
|
|
|
(diff (if yy (- y yy) 100)))
|
|
|
|
|
(and (= mm 2) (= dd 29) (not (calendar-leap-year-p y))
|
|
|
|
|
(setq mm 3
|
|
|
|
|
dd 1))
|
|
|
|
|
(and (> diff 0) (calendar-date-equal (list mm dd y) date)
|
|
|
|
|
(cons mark (format entry diff (diary-ordinal-suffix diff))))))
|
1995-09-21 03:11:06 +00:00
|
|
|
|
|
2008-03-08 23:38:06 +00:00
|
|
|
|
;; To be called from diary-sexp-entry, where DATE, ENTRY are bound.
|
(mark-sexp-diary-entries): Retrieve mark
from diary-sexp-entry and pass it to mark-visible-calendar-date.
(list-sexp-diary-entries): Update doc string for new docs for ....
If diary-sexp-entry returns a cons, only add the text to the diary list.
(diary-sexp-entry): Allow sexps to return a cons of the form (MARK
. STRING) to specify what face or character mark should be used in
the calendar display.
(diary-date, diary-block, diary-float, diary-anniversary)
(diary-cyclic): Add optional MARK parameter, specifying what face
or character to use in the calendar display. These will now
return (MARK . ENTRY).
(check-calendar-holidays, diary-iso-date)
(calendar-holiday-list, diary-french-date, diary-mayan-date)
(diary-julian-date, diary-astro-day-number, diary-chinese-date)
(diary-islamic-date, list-islamic-diary-entries)
(mark-islamic-diary-entries, mark-islamic-calendar-date-pattern)
(diary-hebrew-date, diary-omer, diary-yahrzeit, diary-parasha)
(diary-rosh-hodesh, list-hebrew-diary-entries)
(mark-hebrew-diary-entries, mark-hebrew-calendar-date-pattern)
(diary-coptic-date, diary-persian-date, diary-phases-of-moon)
(diary-sunrise-sunset, diary-sabbath-candles):
Remove interactive flag from autoloads.
2002-07-22 15:32:00 +00:00
|
|
|
|
(defun diary-cyclic (n month day year &optional mark)
|
1995-09-21 03:11:06 +00:00
|
|
|
|
"Cycle diary entry--entry applies every N days starting at MONTH, DAY, YEAR.
|
2008-03-29 02:44:24 +00:00
|
|
|
|
The order of the input parameters changes according to
|
|
|
|
|
`calendar-date-style' (e.g. to N DAY MONTH YEAR in the European
|
2008-11-30 01:01:18 +00:00
|
|
|
|
style). The entry can contain `%d' or `%d%s'; the %d will be
|
2008-03-29 02:44:24 +00:00
|
|
|
|
replaced by the number of repetitions since the MONTH DAY YEAR,
|
|
|
|
|
and %s by the ordinal ending of that number (that is, `st', `nd',
|
2008-11-30 01:01:18 +00:00
|
|
|
|
`rd' or `th', as appropriate).
|
2008-03-29 02:44:24 +00:00
|
|
|
|
|
|
|
|
|
An optional parameter MARK specifies a face or single-character
|
|
|
|
|
string to use when highlighting the day in the calendar."
|
2017-12-04 22:03:32 +00:00
|
|
|
|
(with-no-warnings (defvar date) (defvar entry))
|
2009-04-02 06:33:18 +00:00
|
|
|
|
(or (> n 0)
|
2015-06-10 21:04:54 +00:00
|
|
|
|
(user-error "Day count must be positive"))
|
2008-03-29 02:44:24 +00:00
|
|
|
|
(let* ((diff (- (calendar-absolute-from-gregorian date)
|
1995-09-21 03:11:06 +00:00
|
|
|
|
(calendar-absolute-from-gregorian
|
2008-03-29 02:44:24 +00:00
|
|
|
|
(diary-make-date month day year))))
|
1995-09-21 03:11:06 +00:00
|
|
|
|
(cycle (/ diff n)))
|
2008-03-29 02:44:24 +00:00
|
|
|
|
(and (>= diff 0) (zerop (% diff n))
|
|
|
|
|
(cons mark (format entry cycle (diary-ordinal-suffix cycle))))))
|
1995-09-21 03:11:06 +00:00
|
|
|
|
|
|
|
|
|
(defun diary-day-of-year ()
|
|
|
|
|
"Day of year and number of days remaining in the year of date diary entry."
|
2017-12-04 22:03:32 +00:00
|
|
|
|
(with-no-warnings (defvar date))
|
1995-09-21 03:11:06 +00:00
|
|
|
|
(calendar-day-of-year-string date))
|
|
|
|
|
|
|
|
|
|
(defun diary-remind (sexp days &optional marking)
|
|
|
|
|
"Provide a reminder of a diary entry.
|
2008-04-23 03:06:11 +00:00
|
|
|
|
SEXP is a diary-sexp. DAYS is either a single number or a list
|
|
|
|
|
of numbers indicating the number(s) of days before the event that
|
|
|
|
|
the warning(s) should occur on. A negative number -DAYS has the
|
|
|
|
|
same meaning as a list (1 2 ... DAYS). If the current date
|
|
|
|
|
is (one of) DAYS before the event indicated by SEXP, then this function
|
|
|
|
|
returns a suitable message (as specified by `diary-remind-message').
|
|
|
|
|
|
|
|
|
|
In addition to the reminders beforehand, the diary entry also
|
|
|
|
|
appears on the date itself.
|
|
|
|
|
|
|
|
|
|
A `diary-nonmarking-symbol' at the beginning of the line of the
|
|
|
|
|
`diary-remind' entry specifies that the diary entry (not the
|
|
|
|
|
reminder) is non-marking. Marking of reminders is independent of
|
|
|
|
|
whether the entry itself is a marking or nonmarking; if optional
|
|
|
|
|
parameter MARKING is non-nil then the reminders are marked on the
|
|
|
|
|
calendar."
|
2008-04-16 03:24:06 +00:00
|
|
|
|
;; `date' has a value at this point, from diary-sexp-entry.
|
2017-12-04 22:03:32 +00:00
|
|
|
|
(with-no-warnings (defvar date))
|
2008-04-23 03:06:11 +00:00
|
|
|
|
;; Convert a negative number to a list of days.
|
|
|
|
|
(and (integerp days)
|
|
|
|
|
(< days 0)
|
|
|
|
|
(setq days (number-sequence 1 (- days))))
|
2017-12-04 22:03:32 +00:00
|
|
|
|
(calendar-dlet* ((diary-entry (eval sexp)))
|
1999-05-03 20:03:07 +00:00
|
|
|
|
(cond
|
(diary-face-attrs): Fix custom :type.
(diary-face-attrs, diary-glob-file-regexp-prefix, diary-unknown-time)
(diary-pull-attrs, diary-header-line-flag, diary-list-entries)
(diary-unhide-everything, include-other-diary-files, diary-goto-entry)
(mark-included-diary-files, mark-calendar-days-named)
(mark-calendar-date-pattern, mark-calendar-month, diary-entry-compare)
(diary-remind, insert-diary-entry, insert-weekly-diary-entry)
(insert-monthly-diary-entry, insert-yearly-diary-entry)
(insert-anniversary-diary-entry, insert-block-diary-entry)
(insert-cyclic-diary-entry, fancy-diary-font-lock-keywords)
(diary-font-lock-sexps): Doc fixes.
(diary-remind-message, mark-calendar-month): Use zerop.
(diary-attrtype-convert, diary-pull-attrs): Simplify.
(diary-list-entries): Revert let to let* (previous change).
2008-03-10 02:44:51 +00:00
|
|
|
|
;; Diary entry applies on date.
|
1999-05-03 20:03:07 +00:00
|
|
|
|
((and diary-entry
|
(diary-sexp-entry-symbol): Rename sexp-diary-entry-symbol.
Keep old name as alias, update users.
(diary-list-entries-hook): Rename list-diary-entries-hook.
Keep old name as alias, update users.
(diary-mark-entries-hook): Rename mark-diary-entries-hook.
Keep old name as alias, update users.
(diary-nongregorian-listing-hook): Rename nongregorian-diary-listing-hook.
Keep old name as alias, update users.
(diary-nongregorian-marking-hook): Rename nongregorian-diary-marking-hook.
Keep old name as alias, update users.
(diary-print-entries-hook): Rename print-diary-entries-hook.
Keep old name as alias, update users.
(diary-abbreviated-year-flag): Rename abbreviated-calendar-year.
Keep old name as alias, update users.
(diary-number-of-entries): Rename number-of-diary-entries.
Keep old name as alias, update users.
(view-diary-entries, list-diary-entries, show-all-diary-entries):
Give version of obsolescence.
(diary-view-other-diary-entries): Rename view-other-diary-entries.
Keep old name as alias, update callers.
(diary-add-to-list): Rename add-to-diary-list. Keep old name as alias,
update callers.
(diary-include-other-diary-files): Rename include-other-diary-files.
Keep old name as alias, update callers.
(diary-simple-display): Rename simple-diary-display. Keep old name as alias,
update callers.
(diary-fancy-display): Rename fancy-diary-display. Keep old name as alias,
update callers.
(diary-print-entries): Rename print-diary-entries. Keep old name as alias,
update callers.
(diary-marking-entries-flag): Rename marking-diary-entries. Update users.
(diary-marking-entry-flag): Rename marking-diary-entry. Update users.
(diary-mark-entries): Rename mark-diary-entries. Keep old name as alias,
update callers.
(diary-mark-sexp-entries): Rename mark-sexp-diary-entries.
Keep old name as alias, update callers.
(diary-mark-included-diary-files): Rename mark-included-diary-files.
Keep old name as alias, update callers.
(calendar-mark-days-named): Rename mark-calendar-days-named.
Keep old name as alias, update callers.
(calendar-mark-month): Rename mark-calendar-month. Keep old name as alias,
update callers.
(calendar-mark-date-pattern): Rename mark-calendar-date-pattern.
Keep old name as alias, update callers.
(diary-sort-entries): Rename sort-diary-entries. Keep old name as alias,
update callers.
(diary-list-sexp-entries): Rename list-sexp-diary-entries.
Keep old name as alias, update callers.
(diary-make-entry): Rename make-diary-entry. Keep old name as alias,
update callers.
(diary-insert-entry): Rename insert-diary-entry. Keep old name as alias.
(diary-insert-weekly-entry): Rename insert-weekly-diary-entry.
Keep old name as alias.
(diary-insert-monthly-entry): Rename insert-monthly-diary-entry.
Keep old name as alias.
(diary-insert-yearly-entry): Rename insert-yearly-diary-entry.
Keep old name as alias.
(diary-insert-anniversary-entry): Rename insert-anniversary-diary-entry.
Keep old name as alias.
(diary-insert-block-entry): Rename insert-block-diary-entry.
Keep old name as alias.
(diary-insert-cyclic-entry): Rename insert-cyclic-diary-entry.
Keep old name as alias.
(diary-fancy-font-lock-keywords): Rename fancy-diary-font-lock-keywords.
Keep old name as alias, update users.
(diary-fancy-display-mode): Rename fancy-diary-display-mode.
Keep old name as alias, update callers.
2008-04-06 20:53:14 +00:00
|
|
|
|
(or (not diary-marking-entries-flag) diary-marking-entry-flag))
|
1999-05-03 20:03:07 +00:00
|
|
|
|
diary-entry)
|
(diary-face-attrs): Fix custom :type.
(diary-face-attrs, diary-glob-file-regexp-prefix, diary-unknown-time)
(diary-pull-attrs, diary-header-line-flag, diary-list-entries)
(diary-unhide-everything, include-other-diary-files, diary-goto-entry)
(mark-included-diary-files, mark-calendar-days-named)
(mark-calendar-date-pattern, mark-calendar-month, diary-entry-compare)
(diary-remind, insert-diary-entry, insert-weekly-diary-entry)
(insert-monthly-diary-entry, insert-yearly-diary-entry)
(insert-anniversary-diary-entry, insert-block-diary-entry)
(insert-cyclic-diary-entry, fancy-diary-font-lock-keywords)
(diary-font-lock-sexps): Doc fixes.
(diary-remind-message, mark-calendar-month): Use zerop.
(diary-attrtype-convert, diary-pull-attrs): Simplify.
(diary-list-entries): Revert let to let* (previous change).
2008-03-10 02:44:51 +00:00
|
|
|
|
;; Diary entry may apply to `days' before date.
|
1999-05-03 20:03:07 +00:00
|
|
|
|
((and (integerp days)
|
2008-03-13 06:29:28 +00:00
|
|
|
|
(not diary-entry) ; diary entry does not apply to date
|
(diary-sexp-entry-symbol): Rename sexp-diary-entry-symbol.
Keep old name as alias, update users.
(diary-list-entries-hook): Rename list-diary-entries-hook.
Keep old name as alias, update users.
(diary-mark-entries-hook): Rename mark-diary-entries-hook.
Keep old name as alias, update users.
(diary-nongregorian-listing-hook): Rename nongregorian-diary-listing-hook.
Keep old name as alias, update users.
(diary-nongregorian-marking-hook): Rename nongregorian-diary-marking-hook.
Keep old name as alias, update users.
(diary-print-entries-hook): Rename print-diary-entries-hook.
Keep old name as alias, update users.
(diary-abbreviated-year-flag): Rename abbreviated-calendar-year.
Keep old name as alias, update users.
(diary-number-of-entries): Rename number-of-diary-entries.
Keep old name as alias, update users.
(view-diary-entries, list-diary-entries, show-all-diary-entries):
Give version of obsolescence.
(diary-view-other-diary-entries): Rename view-other-diary-entries.
Keep old name as alias, update callers.
(diary-add-to-list): Rename add-to-diary-list. Keep old name as alias,
update callers.
(diary-include-other-diary-files): Rename include-other-diary-files.
Keep old name as alias, update callers.
(diary-simple-display): Rename simple-diary-display. Keep old name as alias,
update callers.
(diary-fancy-display): Rename fancy-diary-display. Keep old name as alias,
update callers.
(diary-print-entries): Rename print-diary-entries. Keep old name as alias,
update callers.
(diary-marking-entries-flag): Rename marking-diary-entries. Update users.
(diary-marking-entry-flag): Rename marking-diary-entry. Update users.
(diary-mark-entries): Rename mark-diary-entries. Keep old name as alias,
update callers.
(diary-mark-sexp-entries): Rename mark-sexp-diary-entries.
Keep old name as alias, update callers.
(diary-mark-included-diary-files): Rename mark-included-diary-files.
Keep old name as alias, update callers.
(calendar-mark-days-named): Rename mark-calendar-days-named.
Keep old name as alias, update callers.
(calendar-mark-month): Rename mark-calendar-month. Keep old name as alias,
update callers.
(calendar-mark-date-pattern): Rename mark-calendar-date-pattern.
Keep old name as alias, update callers.
(diary-sort-entries): Rename sort-diary-entries. Keep old name as alias,
update callers.
(diary-list-sexp-entries): Rename list-sexp-diary-entries.
Keep old name as alias, update callers.
(diary-make-entry): Rename make-diary-entry. Keep old name as alias,
update callers.
(diary-insert-entry): Rename insert-diary-entry. Keep old name as alias.
(diary-insert-weekly-entry): Rename insert-weekly-diary-entry.
Keep old name as alias.
(diary-insert-monthly-entry): Rename insert-monthly-diary-entry.
Keep old name as alias.
(diary-insert-yearly-entry): Rename insert-yearly-diary-entry.
Keep old name as alias.
(diary-insert-anniversary-entry): Rename insert-anniversary-diary-entry.
Keep old name as alias.
(diary-insert-block-entry): Rename insert-block-diary-entry.
Keep old name as alias.
(diary-insert-cyclic-entry): Rename insert-cyclic-diary-entry.
Keep old name as alias.
(diary-fancy-font-lock-keywords): Rename fancy-diary-font-lock-keywords.
Keep old name as alias, update users.
(diary-fancy-display-mode): Rename fancy-diary-display-mode.
Keep old name as alias, update callers.
2008-04-06 20:53:14 +00:00
|
|
|
|
(or (not diary-marking-entries-flag) marking))
|
2008-04-16 03:24:06 +00:00
|
|
|
|
;; Adjust date, and re-evaluate.
|
|
|
|
|
(let ((date (calendar-gregorian-from-absolute
|
|
|
|
|
(+ (calendar-absolute-from-gregorian date) days))))
|
|
|
|
|
(when (setq diary-entry (eval sexp))
|
|
|
|
|
;; Discard any mark portion from diary-anniversary, etc.
|
|
|
|
|
(if (consp diary-entry) (setq diary-entry (cdr diary-entry)))
|
2018-02-15 05:41:52 +00:00
|
|
|
|
(calendar-dlet* ((days days))
|
|
|
|
|
(mapconcat #'eval diary-remind-message "")))))
|
(diary-face-attrs): Fix custom :type.
(diary-face-attrs, diary-glob-file-regexp-prefix, diary-unknown-time)
(diary-pull-attrs, diary-header-line-flag, diary-list-entries)
(diary-unhide-everything, include-other-diary-files, diary-goto-entry)
(mark-included-diary-files, mark-calendar-days-named)
(mark-calendar-date-pattern, mark-calendar-month, diary-entry-compare)
(diary-remind, insert-diary-entry, insert-weekly-diary-entry)
(insert-monthly-diary-entry, insert-yearly-diary-entry)
(insert-anniversary-diary-entry, insert-block-diary-entry)
(insert-cyclic-diary-entry, fancy-diary-font-lock-keywords)
(diary-font-lock-sexps): Doc fixes.
(diary-remind-message, mark-calendar-month): Use zerop.
(diary-attrtype-convert, diary-pull-attrs): Simplify.
(diary-list-entries): Revert let to let* (previous change).
2008-03-10 02:44:51 +00:00
|
|
|
|
;; Diary entry may apply to one of a list of days before date.
|
1999-05-03 20:03:07 +00:00
|
|
|
|
((and (listp days) days)
|
|
|
|
|
(or (diary-remind sexp (car days) marking)
|
|
|
|
|
(diary-remind sexp (cdr days) marking))))))
|
1995-09-21 03:11:06 +00:00
|
|
|
|
|
2008-03-26 03:26:43 +00:00
|
|
|
|
|
|
|
|
|
;;; Diary insertion functions.
|
2005-03-01 10:23:58 +00:00
|
|
|
|
|
2008-03-13 05:54:57 +00:00
|
|
|
|
;;;###cal-autoload
|
2019-06-08 00:43:38 +00:00
|
|
|
|
(defun diary-make-entry (string &optional nonmarking file omit-trailing-space
|
|
|
|
|
do-not-show)
|
1995-09-21 03:11:06 +00:00
|
|
|
|
"Insert a diary entry STRING which may be NONMARKING in FILE.
|
2005-03-01 10:23:58 +00:00
|
|
|
|
If omitted, NONMARKING defaults to nil and FILE defaults to
|
2019-06-08 00:43:38 +00:00
|
|
|
|
`diary-file'. If OMIT-TRAILING-SPACE is non-nil, then do not add
|
|
|
|
|
a trailing space to the entry. If DO-NOT-SHOW is non-nil, do not
|
|
|
|
|
show the diary buffer."
|
|
|
|
|
(with-current-buffer
|
|
|
|
|
(let ((diary-file-name (or file diary-file)))
|
|
|
|
|
(if do-not-show
|
|
|
|
|
(find-file-noselect diary-file-name)
|
|
|
|
|
(let ((pop-up-frames (or pop-up-frames (window-dedicated-p))))
|
|
|
|
|
(find-file-other-window diary-file-name))))
|
|
|
|
|
(when (eq major-mode (default-value 'major-mode)) (diary-mode))
|
|
|
|
|
(widen)
|
|
|
|
|
(diary-unhide-everything)
|
|
|
|
|
(goto-char (point-max))
|
|
|
|
|
(when (let ((case-fold-search t))
|
|
|
|
|
(search-backward "Local Variables:"
|
|
|
|
|
(max (- (point-max) 3000) (point-min))
|
|
|
|
|
t))
|
|
|
|
|
(beginning-of-line)
|
|
|
|
|
(insert "\n")
|
|
|
|
|
(forward-line -1))
|
|
|
|
|
(insert
|
|
|
|
|
(if (bolp) "" "\n")
|
|
|
|
|
(if nonmarking diary-nonmarking-symbol "")
|
|
|
|
|
string (if omit-trailing-space "" " "))))
|
1995-09-21 03:11:06 +00:00
|
|
|
|
|
(diary-sexp-entry-symbol): Rename sexp-diary-entry-symbol.
Keep old name as alias, update users.
(diary-list-entries-hook): Rename list-diary-entries-hook.
Keep old name as alias, update users.
(diary-mark-entries-hook): Rename mark-diary-entries-hook.
Keep old name as alias, update users.
(diary-nongregorian-listing-hook): Rename nongregorian-diary-listing-hook.
Keep old name as alias, update users.
(diary-nongregorian-marking-hook): Rename nongregorian-diary-marking-hook.
Keep old name as alias, update users.
(diary-print-entries-hook): Rename print-diary-entries-hook.
Keep old name as alias, update users.
(diary-abbreviated-year-flag): Rename abbreviated-calendar-year.
Keep old name as alias, update users.
(diary-number-of-entries): Rename number-of-diary-entries.
Keep old name as alias, update users.
(view-diary-entries, list-diary-entries, show-all-diary-entries):
Give version of obsolescence.
(diary-view-other-diary-entries): Rename view-other-diary-entries.
Keep old name as alias, update callers.
(diary-add-to-list): Rename add-to-diary-list. Keep old name as alias,
update callers.
(diary-include-other-diary-files): Rename include-other-diary-files.
Keep old name as alias, update callers.
(diary-simple-display): Rename simple-diary-display. Keep old name as alias,
update callers.
(diary-fancy-display): Rename fancy-diary-display. Keep old name as alias,
update callers.
(diary-print-entries): Rename print-diary-entries. Keep old name as alias,
update callers.
(diary-marking-entries-flag): Rename marking-diary-entries. Update users.
(diary-marking-entry-flag): Rename marking-diary-entry. Update users.
(diary-mark-entries): Rename mark-diary-entries. Keep old name as alias,
update callers.
(diary-mark-sexp-entries): Rename mark-sexp-diary-entries.
Keep old name as alias, update callers.
(diary-mark-included-diary-files): Rename mark-included-diary-files.
Keep old name as alias, update callers.
(calendar-mark-days-named): Rename mark-calendar-days-named.
Keep old name as alias, update callers.
(calendar-mark-month): Rename mark-calendar-month. Keep old name as alias,
update callers.
(calendar-mark-date-pattern): Rename mark-calendar-date-pattern.
Keep old name as alias, update callers.
(diary-sort-entries): Rename sort-diary-entries. Keep old name as alias,
update callers.
(diary-list-sexp-entries): Rename list-sexp-diary-entries.
Keep old name as alias, update callers.
(diary-make-entry): Rename make-diary-entry. Keep old name as alias,
update callers.
(diary-insert-entry): Rename insert-diary-entry. Keep old name as alias.
(diary-insert-weekly-entry): Rename insert-weekly-diary-entry.
Keep old name as alias.
(diary-insert-monthly-entry): Rename insert-monthly-diary-entry.
Keep old name as alias.
(diary-insert-yearly-entry): Rename insert-yearly-diary-entry.
Keep old name as alias.
(diary-insert-anniversary-entry): Rename insert-anniversary-diary-entry.
Keep old name as alias.
(diary-insert-block-entry): Rename insert-block-diary-entry.
Keep old name as alias.
(diary-insert-cyclic-entry): Rename insert-cyclic-diary-entry.
Keep old name as alias.
(diary-fancy-font-lock-keywords): Rename fancy-diary-font-lock-keywords.
Keep old name as alias, update users.
(diary-fancy-display-mode): Rename fancy-diary-display-mode.
Keep old name as alias, update callers.
2008-04-06 20:53:14 +00:00
|
|
|
|
;;;###cal-autoload
|
2008-06-17 15:42:19 +00:00
|
|
|
|
(defun diary-insert-entry (arg &optional event)
|
1995-09-21 03:11:06 +00:00
|
|
|
|
"Insert a diary entry for the date indicated by point.
|
(diary-face-attrs): Fix custom :type.
(diary-face-attrs, diary-glob-file-regexp-prefix, diary-unknown-time)
(diary-pull-attrs, diary-header-line-flag, diary-list-entries)
(diary-unhide-everything, include-other-diary-files, diary-goto-entry)
(mark-included-diary-files, mark-calendar-days-named)
(mark-calendar-date-pattern, mark-calendar-month, diary-entry-compare)
(diary-remind, insert-diary-entry, insert-weekly-diary-entry)
(insert-monthly-diary-entry, insert-yearly-diary-entry)
(insert-anniversary-diary-entry, insert-block-diary-entry)
(insert-cyclic-diary-entry, fancy-diary-font-lock-keywords)
(diary-font-lock-sexps): Doc fixes.
(diary-remind-message, mark-calendar-month): Use zerop.
(diary-attrtype-convert, diary-pull-attrs): Simplify.
(diary-list-entries): Revert let to let* (previous change).
2008-03-10 02:44:51 +00:00
|
|
|
|
Prefix argument ARG makes the entry nonmarking."
|
2008-06-17 15:42:19 +00:00
|
|
|
|
(interactive
|
|
|
|
|
(list current-prefix-arg last-nonmenu-event))
|
|
|
|
|
(diary-make-entry (calendar-date-string (calendar-cursor-to-date t event) t t)
|
1995-09-21 03:11:06 +00:00
|
|
|
|
arg))
|
|
|
|
|
|
(diary-sexp-entry-symbol): Rename sexp-diary-entry-symbol.
Keep old name as alias, update users.
(diary-list-entries-hook): Rename list-diary-entries-hook.
Keep old name as alias, update users.
(diary-mark-entries-hook): Rename mark-diary-entries-hook.
Keep old name as alias, update users.
(diary-nongregorian-listing-hook): Rename nongregorian-diary-listing-hook.
Keep old name as alias, update users.
(diary-nongregorian-marking-hook): Rename nongregorian-diary-marking-hook.
Keep old name as alias, update users.
(diary-print-entries-hook): Rename print-diary-entries-hook.
Keep old name as alias, update users.
(diary-abbreviated-year-flag): Rename abbreviated-calendar-year.
Keep old name as alias, update users.
(diary-number-of-entries): Rename number-of-diary-entries.
Keep old name as alias, update users.
(view-diary-entries, list-diary-entries, show-all-diary-entries):
Give version of obsolescence.
(diary-view-other-diary-entries): Rename view-other-diary-entries.
Keep old name as alias, update callers.
(diary-add-to-list): Rename add-to-diary-list. Keep old name as alias,
update callers.
(diary-include-other-diary-files): Rename include-other-diary-files.
Keep old name as alias, update callers.
(diary-simple-display): Rename simple-diary-display. Keep old name as alias,
update callers.
(diary-fancy-display): Rename fancy-diary-display. Keep old name as alias,
update callers.
(diary-print-entries): Rename print-diary-entries. Keep old name as alias,
update callers.
(diary-marking-entries-flag): Rename marking-diary-entries. Update users.
(diary-marking-entry-flag): Rename marking-diary-entry. Update users.
(diary-mark-entries): Rename mark-diary-entries. Keep old name as alias,
update callers.
(diary-mark-sexp-entries): Rename mark-sexp-diary-entries.
Keep old name as alias, update callers.
(diary-mark-included-diary-files): Rename mark-included-diary-files.
Keep old name as alias, update callers.
(calendar-mark-days-named): Rename mark-calendar-days-named.
Keep old name as alias, update callers.
(calendar-mark-month): Rename mark-calendar-month. Keep old name as alias,
update callers.
(calendar-mark-date-pattern): Rename mark-calendar-date-pattern.
Keep old name as alias, update callers.
(diary-sort-entries): Rename sort-diary-entries. Keep old name as alias,
update callers.
(diary-list-sexp-entries): Rename list-sexp-diary-entries.
Keep old name as alias, update callers.
(diary-make-entry): Rename make-diary-entry. Keep old name as alias,
update callers.
(diary-insert-entry): Rename insert-diary-entry. Keep old name as alias.
(diary-insert-weekly-entry): Rename insert-weekly-diary-entry.
Keep old name as alias.
(diary-insert-monthly-entry): Rename insert-monthly-diary-entry.
Keep old name as alias.
(diary-insert-yearly-entry): Rename insert-yearly-diary-entry.
Keep old name as alias.
(diary-insert-anniversary-entry): Rename insert-anniversary-diary-entry.
Keep old name as alias.
(diary-insert-block-entry): Rename insert-block-diary-entry.
Keep old name as alias.
(diary-insert-cyclic-entry): Rename insert-cyclic-diary-entry.
Keep old name as alias.
(diary-fancy-font-lock-keywords): Rename fancy-diary-font-lock-keywords.
Keep old name as alias, update users.
(diary-fancy-display-mode): Rename fancy-diary-display-mode.
Keep old name as alias, update callers.
2008-04-06 20:53:14 +00:00
|
|
|
|
;;;###cal-autoload
|
|
|
|
|
(defun diary-insert-weekly-entry (arg)
|
1995-09-21 03:11:06 +00:00
|
|
|
|
"Insert a weekly diary entry for the day of the week indicated by point.
|
(diary-face-attrs): Fix custom :type.
(diary-face-attrs, diary-glob-file-regexp-prefix, diary-unknown-time)
(diary-pull-attrs, diary-header-line-flag, diary-list-entries)
(diary-unhide-everything, include-other-diary-files, diary-goto-entry)
(mark-included-diary-files, mark-calendar-days-named)
(mark-calendar-date-pattern, mark-calendar-month, diary-entry-compare)
(diary-remind, insert-diary-entry, insert-weekly-diary-entry)
(insert-monthly-diary-entry, insert-yearly-diary-entry)
(insert-anniversary-diary-entry, insert-block-diary-entry)
(insert-cyclic-diary-entry, fancy-diary-font-lock-keywords)
(diary-font-lock-sexps): Doc fixes.
(diary-remind-message, mark-calendar-month): Use zerop.
(diary-attrtype-convert, diary-pull-attrs): Simplify.
(diary-list-entries): Revert let to let* (previous change).
2008-03-10 02:44:51 +00:00
|
|
|
|
Prefix argument ARG makes the entry nonmarking."
|
1995-09-21 03:11:06 +00:00
|
|
|
|
(interactive "P")
|
(diary-sexp-entry-symbol): Rename sexp-diary-entry-symbol.
Keep old name as alias, update users.
(diary-list-entries-hook): Rename list-diary-entries-hook.
Keep old name as alias, update users.
(diary-mark-entries-hook): Rename mark-diary-entries-hook.
Keep old name as alias, update users.
(diary-nongregorian-listing-hook): Rename nongregorian-diary-listing-hook.
Keep old name as alias, update users.
(diary-nongregorian-marking-hook): Rename nongregorian-diary-marking-hook.
Keep old name as alias, update users.
(diary-print-entries-hook): Rename print-diary-entries-hook.
Keep old name as alias, update users.
(diary-abbreviated-year-flag): Rename abbreviated-calendar-year.
Keep old name as alias, update users.
(diary-number-of-entries): Rename number-of-diary-entries.
Keep old name as alias, update users.
(view-diary-entries, list-diary-entries, show-all-diary-entries):
Give version of obsolescence.
(diary-view-other-diary-entries): Rename view-other-diary-entries.
Keep old name as alias, update callers.
(diary-add-to-list): Rename add-to-diary-list. Keep old name as alias,
update callers.
(diary-include-other-diary-files): Rename include-other-diary-files.
Keep old name as alias, update callers.
(diary-simple-display): Rename simple-diary-display. Keep old name as alias,
update callers.
(diary-fancy-display): Rename fancy-diary-display. Keep old name as alias,
update callers.
(diary-print-entries): Rename print-diary-entries. Keep old name as alias,
update callers.
(diary-marking-entries-flag): Rename marking-diary-entries. Update users.
(diary-marking-entry-flag): Rename marking-diary-entry. Update users.
(diary-mark-entries): Rename mark-diary-entries. Keep old name as alias,
update callers.
(diary-mark-sexp-entries): Rename mark-sexp-diary-entries.
Keep old name as alias, update callers.
(diary-mark-included-diary-files): Rename mark-included-diary-files.
Keep old name as alias, update callers.
(calendar-mark-days-named): Rename mark-calendar-days-named.
Keep old name as alias, update callers.
(calendar-mark-month): Rename mark-calendar-month. Keep old name as alias,
update callers.
(calendar-mark-date-pattern): Rename mark-calendar-date-pattern.
Keep old name as alias, update callers.
(diary-sort-entries): Rename sort-diary-entries. Keep old name as alias,
update callers.
(diary-list-sexp-entries): Rename list-sexp-diary-entries.
Keep old name as alias, update callers.
(diary-make-entry): Rename make-diary-entry. Keep old name as alias,
update callers.
(diary-insert-entry): Rename insert-diary-entry. Keep old name as alias.
(diary-insert-weekly-entry): Rename insert-weekly-diary-entry.
Keep old name as alias.
(diary-insert-monthly-entry): Rename insert-monthly-diary-entry.
Keep old name as alias.
(diary-insert-yearly-entry): Rename insert-yearly-diary-entry.
Keep old name as alias.
(diary-insert-anniversary-entry): Rename insert-anniversary-diary-entry.
Keep old name as alias.
(diary-insert-block-entry): Rename insert-block-diary-entry.
Keep old name as alias.
(diary-insert-cyclic-entry): Rename insert-cyclic-diary-entry.
Keep old name as alias.
(diary-fancy-font-lock-keywords): Rename fancy-diary-font-lock-keywords.
Keep old name as alias, update users.
(diary-fancy-display-mode): Rename fancy-diary-display-mode.
Keep old name as alias, update callers.
2008-04-06 20:53:14 +00:00
|
|
|
|
(diary-make-entry (calendar-day-name (calendar-cursor-to-date t))
|
1995-09-21 03:11:06 +00:00
|
|
|
|
arg))
|
|
|
|
|
|
2008-03-29 02:44:24 +00:00
|
|
|
|
(defun diary-date-display-form (&optional type)
|
2008-11-30 01:01:18 +00:00
|
|
|
|
"Return value for `calendar-date-display-form' using `calendar-date-style'.
|
2008-03-29 02:44:24 +00:00
|
|
|
|
Optional symbol TYPE is either `monthly' or `yearly'."
|
|
|
|
|
(cond ((eq type 'monthly) (cond ((eq calendar-date-style 'iso)
|
|
|
|
|
'((format "*-*-%.2d"
|
|
|
|
|
(string-to-number day))))
|
|
|
|
|
((eq calendar-date-style 'european)
|
|
|
|
|
'(day " * "))
|
|
|
|
|
(t '("* " day ))))
|
|
|
|
|
((eq type 'yearly) (cond ((eq calendar-date-style 'iso)
|
|
|
|
|
'((format "*-%.2d-%.2d"
|
|
|
|
|
(string-to-number month)
|
|
|
|
|
(string-to-number day))))
|
|
|
|
|
((eq calendar-date-style 'european)
|
|
|
|
|
'(day " " monthname))
|
|
|
|
|
(t '(monthname " " day))))
|
|
|
|
|
;; Iso cannot contain "-", because this form used eg by
|
2011-05-04 02:03:30 +00:00
|
|
|
|
;; diary-insert-anniversary-entry.
|
2008-03-29 02:44:24 +00:00
|
|
|
|
(t (cond ((eq calendar-date-style 'iso)
|
|
|
|
|
'((format "%s %.2d %.2d" year
|
|
|
|
|
(string-to-number month) (string-to-number day))))
|
|
|
|
|
((eq calendar-date-style 'european)
|
|
|
|
|
'(day " " month " " year))
|
|
|
|
|
(t '(month " " day " " year))))))
|
|
|
|
|
|
|
|
|
|
(defun diary-insert-entry-1 (&optional type nomark months symbol absfunc)
|
|
|
|
|
"Subroutine to insert a diary entry related to the date at point.
|
2008-11-30 01:01:18 +00:00
|
|
|
|
TYPE is the type of entry (`monthly' or `yearly'). NOMARK non-nil
|
|
|
|
|
means make the entry non-marking. Array MONTHS is used in place
|
|
|
|
|
of `calendar-month-name-array'. String SYMBOL marks the type of
|
|
|
|
|
diary entry. Function ABSFUNC converts absolute dates to dates of
|
|
|
|
|
the appropriate type."
|
2008-03-29 02:44:24 +00:00
|
|
|
|
(let ((calendar-date-display-form (if type
|
|
|
|
|
(diary-date-display-form type)
|
|
|
|
|
calendar-date-display-form))
|
|
|
|
|
(calendar-month-name-array (or months calendar-month-name-array))
|
|
|
|
|
(date (calendar-cursor-to-date t)))
|
(diary-sexp-entry-symbol): Rename sexp-diary-entry-symbol.
Keep old name as alias, update users.
(diary-list-entries-hook): Rename list-diary-entries-hook.
Keep old name as alias, update users.
(diary-mark-entries-hook): Rename mark-diary-entries-hook.
Keep old name as alias, update users.
(diary-nongregorian-listing-hook): Rename nongregorian-diary-listing-hook.
Keep old name as alias, update users.
(diary-nongregorian-marking-hook): Rename nongregorian-diary-marking-hook.
Keep old name as alias, update users.
(diary-print-entries-hook): Rename print-diary-entries-hook.
Keep old name as alias, update users.
(diary-abbreviated-year-flag): Rename abbreviated-calendar-year.
Keep old name as alias, update users.
(diary-number-of-entries): Rename number-of-diary-entries.
Keep old name as alias, update users.
(view-diary-entries, list-diary-entries, show-all-diary-entries):
Give version of obsolescence.
(diary-view-other-diary-entries): Rename view-other-diary-entries.
Keep old name as alias, update callers.
(diary-add-to-list): Rename add-to-diary-list. Keep old name as alias,
update callers.
(diary-include-other-diary-files): Rename include-other-diary-files.
Keep old name as alias, update callers.
(diary-simple-display): Rename simple-diary-display. Keep old name as alias,
update callers.
(diary-fancy-display): Rename fancy-diary-display. Keep old name as alias,
update callers.
(diary-print-entries): Rename print-diary-entries. Keep old name as alias,
update callers.
(diary-marking-entries-flag): Rename marking-diary-entries. Update users.
(diary-marking-entry-flag): Rename marking-diary-entry. Update users.
(diary-mark-entries): Rename mark-diary-entries. Keep old name as alias,
update callers.
(diary-mark-sexp-entries): Rename mark-sexp-diary-entries.
Keep old name as alias, update callers.
(diary-mark-included-diary-files): Rename mark-included-diary-files.
Keep old name as alias, update callers.
(calendar-mark-days-named): Rename mark-calendar-days-named.
Keep old name as alias, update callers.
(calendar-mark-month): Rename mark-calendar-month. Keep old name as alias,
update callers.
(calendar-mark-date-pattern): Rename mark-calendar-date-pattern.
Keep old name as alias, update callers.
(diary-sort-entries): Rename sort-diary-entries. Keep old name as alias,
update callers.
(diary-list-sexp-entries): Rename list-sexp-diary-entries.
Keep old name as alias, update callers.
(diary-make-entry): Rename make-diary-entry. Keep old name as alias,
update callers.
(diary-insert-entry): Rename insert-diary-entry. Keep old name as alias.
(diary-insert-weekly-entry): Rename insert-weekly-diary-entry.
Keep old name as alias.
(diary-insert-monthly-entry): Rename insert-monthly-diary-entry.
Keep old name as alias.
(diary-insert-yearly-entry): Rename insert-yearly-diary-entry.
Keep old name as alias.
(diary-insert-anniversary-entry): Rename insert-anniversary-diary-entry.
Keep old name as alias.
(diary-insert-block-entry): Rename insert-block-diary-entry.
Keep old name as alias.
(diary-insert-cyclic-entry): Rename insert-cyclic-diary-entry.
Keep old name as alias.
(diary-fancy-font-lock-keywords): Rename fancy-diary-font-lock-keywords.
Keep old name as alias, update users.
(diary-fancy-display-mode): Rename fancy-diary-display-mode.
Keep old name as alias, update callers.
2008-04-06 20:53:14 +00:00
|
|
|
|
(diary-make-entry
|
2008-03-29 02:44:24 +00:00
|
|
|
|
(format "%s%s" (or symbol "")
|
|
|
|
|
(calendar-date-string
|
|
|
|
|
(if absfunc
|
|
|
|
|
(funcall absfunc (calendar-absolute-from-gregorian date))
|
|
|
|
|
date)
|
|
|
|
|
(not absfunc)
|
|
|
|
|
(not type)))
|
|
|
|
|
nomark)))
|
|
|
|
|
|
2008-03-13 05:54:57 +00:00
|
|
|
|
;;;###cal-autoload
|
(diary-sexp-entry-symbol): Rename sexp-diary-entry-symbol.
Keep old name as alias, update users.
(diary-list-entries-hook): Rename list-diary-entries-hook.
Keep old name as alias, update users.
(diary-mark-entries-hook): Rename mark-diary-entries-hook.
Keep old name as alias, update users.
(diary-nongregorian-listing-hook): Rename nongregorian-diary-listing-hook.
Keep old name as alias, update users.
(diary-nongregorian-marking-hook): Rename nongregorian-diary-marking-hook.
Keep old name as alias, update users.
(diary-print-entries-hook): Rename print-diary-entries-hook.
Keep old name as alias, update users.
(diary-abbreviated-year-flag): Rename abbreviated-calendar-year.
Keep old name as alias, update users.
(diary-number-of-entries): Rename number-of-diary-entries.
Keep old name as alias, update users.
(view-diary-entries, list-diary-entries, show-all-diary-entries):
Give version of obsolescence.
(diary-view-other-diary-entries): Rename view-other-diary-entries.
Keep old name as alias, update callers.
(diary-add-to-list): Rename add-to-diary-list. Keep old name as alias,
update callers.
(diary-include-other-diary-files): Rename include-other-diary-files.
Keep old name as alias, update callers.
(diary-simple-display): Rename simple-diary-display. Keep old name as alias,
update callers.
(diary-fancy-display): Rename fancy-diary-display. Keep old name as alias,
update callers.
(diary-print-entries): Rename print-diary-entries. Keep old name as alias,
update callers.
(diary-marking-entries-flag): Rename marking-diary-entries. Update users.
(diary-marking-entry-flag): Rename marking-diary-entry. Update users.
(diary-mark-entries): Rename mark-diary-entries. Keep old name as alias,
update callers.
(diary-mark-sexp-entries): Rename mark-sexp-diary-entries.
Keep old name as alias, update callers.
(diary-mark-included-diary-files): Rename mark-included-diary-files.
Keep old name as alias, update callers.
(calendar-mark-days-named): Rename mark-calendar-days-named.
Keep old name as alias, update callers.
(calendar-mark-month): Rename mark-calendar-month. Keep old name as alias,
update callers.
(calendar-mark-date-pattern): Rename mark-calendar-date-pattern.
Keep old name as alias, update callers.
(diary-sort-entries): Rename sort-diary-entries. Keep old name as alias,
update callers.
(diary-list-sexp-entries): Rename list-sexp-diary-entries.
Keep old name as alias, update callers.
(diary-make-entry): Rename make-diary-entry. Keep old name as alias,
update callers.
(diary-insert-entry): Rename insert-diary-entry. Keep old name as alias.
(diary-insert-weekly-entry): Rename insert-weekly-diary-entry.
Keep old name as alias.
(diary-insert-monthly-entry): Rename insert-monthly-diary-entry.
Keep old name as alias.
(diary-insert-yearly-entry): Rename insert-yearly-diary-entry.
Keep old name as alias.
(diary-insert-anniversary-entry): Rename insert-anniversary-diary-entry.
Keep old name as alias.
(diary-insert-block-entry): Rename insert-block-diary-entry.
Keep old name as alias.
(diary-insert-cyclic-entry): Rename insert-cyclic-diary-entry.
Keep old name as alias.
(diary-fancy-font-lock-keywords): Rename fancy-diary-font-lock-keywords.
Keep old name as alias, update users.
(diary-fancy-display-mode): Rename fancy-diary-display-mode.
Keep old name as alias, update callers.
2008-04-06 20:53:14 +00:00
|
|
|
|
(defun diary-insert-monthly-entry (arg)
|
1995-09-21 03:11:06 +00:00
|
|
|
|
"Insert a monthly diary entry for the day of the month indicated by point.
|
(diary-face-attrs): Fix custom :type.
(diary-face-attrs, diary-glob-file-regexp-prefix, diary-unknown-time)
(diary-pull-attrs, diary-header-line-flag, diary-list-entries)
(diary-unhide-everything, include-other-diary-files, diary-goto-entry)
(mark-included-diary-files, mark-calendar-days-named)
(mark-calendar-date-pattern, mark-calendar-month, diary-entry-compare)
(diary-remind, insert-diary-entry, insert-weekly-diary-entry)
(insert-monthly-diary-entry, insert-yearly-diary-entry)
(insert-anniversary-diary-entry, insert-block-diary-entry)
(insert-cyclic-diary-entry, fancy-diary-font-lock-keywords)
(diary-font-lock-sexps): Doc fixes.
(diary-remind-message, mark-calendar-month): Use zerop.
(diary-attrtype-convert, diary-pull-attrs): Simplify.
(diary-list-entries): Revert let to let* (previous change).
2008-03-10 02:44:51 +00:00
|
|
|
|
Prefix argument ARG makes the entry nonmarking."
|
1995-09-21 03:11:06 +00:00
|
|
|
|
(interactive "P")
|
2008-03-29 02:44:24 +00:00
|
|
|
|
(diary-insert-entry-1 'monthly arg))
|
1995-09-21 03:11:06 +00:00
|
|
|
|
|
(diary-sexp-entry-symbol): Rename sexp-diary-entry-symbol.
Keep old name as alias, update users.
(diary-list-entries-hook): Rename list-diary-entries-hook.
Keep old name as alias, update users.
(diary-mark-entries-hook): Rename mark-diary-entries-hook.
Keep old name as alias, update users.
(diary-nongregorian-listing-hook): Rename nongregorian-diary-listing-hook.
Keep old name as alias, update users.
(diary-nongregorian-marking-hook): Rename nongregorian-diary-marking-hook.
Keep old name as alias, update users.
(diary-print-entries-hook): Rename print-diary-entries-hook.
Keep old name as alias, update users.
(diary-abbreviated-year-flag): Rename abbreviated-calendar-year.
Keep old name as alias, update users.
(diary-number-of-entries): Rename number-of-diary-entries.
Keep old name as alias, update users.
(view-diary-entries, list-diary-entries, show-all-diary-entries):
Give version of obsolescence.
(diary-view-other-diary-entries): Rename view-other-diary-entries.
Keep old name as alias, update callers.
(diary-add-to-list): Rename add-to-diary-list. Keep old name as alias,
update callers.
(diary-include-other-diary-files): Rename include-other-diary-files.
Keep old name as alias, update callers.
(diary-simple-display): Rename simple-diary-display. Keep old name as alias,
update callers.
(diary-fancy-display): Rename fancy-diary-display. Keep old name as alias,
update callers.
(diary-print-entries): Rename print-diary-entries. Keep old name as alias,
update callers.
(diary-marking-entries-flag): Rename marking-diary-entries. Update users.
(diary-marking-entry-flag): Rename marking-diary-entry. Update users.
(diary-mark-entries): Rename mark-diary-entries. Keep old name as alias,
update callers.
(diary-mark-sexp-entries): Rename mark-sexp-diary-entries.
Keep old name as alias, update callers.
(diary-mark-included-diary-files): Rename mark-included-diary-files.
Keep old name as alias, update callers.
(calendar-mark-days-named): Rename mark-calendar-days-named.
Keep old name as alias, update callers.
(calendar-mark-month): Rename mark-calendar-month. Keep old name as alias,
update callers.
(calendar-mark-date-pattern): Rename mark-calendar-date-pattern.
Keep old name as alias, update callers.
(diary-sort-entries): Rename sort-diary-entries. Keep old name as alias,
update callers.
(diary-list-sexp-entries): Rename list-sexp-diary-entries.
Keep old name as alias, update callers.
(diary-make-entry): Rename make-diary-entry. Keep old name as alias,
update callers.
(diary-insert-entry): Rename insert-diary-entry. Keep old name as alias.
(diary-insert-weekly-entry): Rename insert-weekly-diary-entry.
Keep old name as alias.
(diary-insert-monthly-entry): Rename insert-monthly-diary-entry.
Keep old name as alias.
(diary-insert-yearly-entry): Rename insert-yearly-diary-entry.
Keep old name as alias.
(diary-insert-anniversary-entry): Rename insert-anniversary-diary-entry.
Keep old name as alias.
(diary-insert-block-entry): Rename insert-block-diary-entry.
Keep old name as alias.
(diary-insert-cyclic-entry): Rename insert-cyclic-diary-entry.
Keep old name as alias.
(diary-fancy-font-lock-keywords): Rename fancy-diary-font-lock-keywords.
Keep old name as alias, update users.
(diary-fancy-display-mode): Rename fancy-diary-display-mode.
Keep old name as alias, update callers.
2008-04-06 20:53:14 +00:00
|
|
|
|
;;;###cal-autoload
|
|
|
|
|
(defun diary-insert-yearly-entry (arg)
|
1995-09-21 03:11:06 +00:00
|
|
|
|
"Insert an annual diary entry for the day of the year indicated by point.
|
(diary-face-attrs): Fix custom :type.
(diary-face-attrs, diary-glob-file-regexp-prefix, diary-unknown-time)
(diary-pull-attrs, diary-header-line-flag, diary-list-entries)
(diary-unhide-everything, include-other-diary-files, diary-goto-entry)
(mark-included-diary-files, mark-calendar-days-named)
(mark-calendar-date-pattern, mark-calendar-month, diary-entry-compare)
(diary-remind, insert-diary-entry, insert-weekly-diary-entry)
(insert-monthly-diary-entry, insert-yearly-diary-entry)
(insert-anniversary-diary-entry, insert-block-diary-entry)
(insert-cyclic-diary-entry, fancy-diary-font-lock-keywords)
(diary-font-lock-sexps): Doc fixes.
(diary-remind-message, mark-calendar-month): Use zerop.
(diary-attrtype-convert, diary-pull-attrs): Simplify.
(diary-list-entries): Revert let to let* (previous change).
2008-03-10 02:44:51 +00:00
|
|
|
|
Prefix argument ARG makes the entry nonmarking."
|
1995-09-21 03:11:06 +00:00
|
|
|
|
(interactive "P")
|
2008-03-29 02:44:24 +00:00
|
|
|
|
(diary-insert-entry-1 'yearly arg))
|
1995-09-21 03:11:06 +00:00
|
|
|
|
|
(diary-sexp-entry-symbol): Rename sexp-diary-entry-symbol.
Keep old name as alias, update users.
(diary-list-entries-hook): Rename list-diary-entries-hook.
Keep old name as alias, update users.
(diary-mark-entries-hook): Rename mark-diary-entries-hook.
Keep old name as alias, update users.
(diary-nongregorian-listing-hook): Rename nongregorian-diary-listing-hook.
Keep old name as alias, update users.
(diary-nongregorian-marking-hook): Rename nongregorian-diary-marking-hook.
Keep old name as alias, update users.
(diary-print-entries-hook): Rename print-diary-entries-hook.
Keep old name as alias, update users.
(diary-abbreviated-year-flag): Rename abbreviated-calendar-year.
Keep old name as alias, update users.
(diary-number-of-entries): Rename number-of-diary-entries.
Keep old name as alias, update users.
(view-diary-entries, list-diary-entries, show-all-diary-entries):
Give version of obsolescence.
(diary-view-other-diary-entries): Rename view-other-diary-entries.
Keep old name as alias, update callers.
(diary-add-to-list): Rename add-to-diary-list. Keep old name as alias,
update callers.
(diary-include-other-diary-files): Rename include-other-diary-files.
Keep old name as alias, update callers.
(diary-simple-display): Rename simple-diary-display. Keep old name as alias,
update callers.
(diary-fancy-display): Rename fancy-diary-display. Keep old name as alias,
update callers.
(diary-print-entries): Rename print-diary-entries. Keep old name as alias,
update callers.
(diary-marking-entries-flag): Rename marking-diary-entries. Update users.
(diary-marking-entry-flag): Rename marking-diary-entry. Update users.
(diary-mark-entries): Rename mark-diary-entries. Keep old name as alias,
update callers.
(diary-mark-sexp-entries): Rename mark-sexp-diary-entries.
Keep old name as alias, update callers.
(diary-mark-included-diary-files): Rename mark-included-diary-files.
Keep old name as alias, update callers.
(calendar-mark-days-named): Rename mark-calendar-days-named.
Keep old name as alias, update callers.
(calendar-mark-month): Rename mark-calendar-month. Keep old name as alias,
update callers.
(calendar-mark-date-pattern): Rename mark-calendar-date-pattern.
Keep old name as alias, update callers.
(diary-sort-entries): Rename sort-diary-entries. Keep old name as alias,
update callers.
(diary-list-sexp-entries): Rename list-sexp-diary-entries.
Keep old name as alias, update callers.
(diary-make-entry): Rename make-diary-entry. Keep old name as alias,
update callers.
(diary-insert-entry): Rename insert-diary-entry. Keep old name as alias.
(diary-insert-weekly-entry): Rename insert-weekly-diary-entry.
Keep old name as alias.
(diary-insert-monthly-entry): Rename insert-monthly-diary-entry.
Keep old name as alias.
(diary-insert-yearly-entry): Rename insert-yearly-diary-entry.
Keep old name as alias.
(diary-insert-anniversary-entry): Rename insert-anniversary-diary-entry.
Keep old name as alias.
(diary-insert-block-entry): Rename insert-block-diary-entry.
Keep old name as alias.
(diary-insert-cyclic-entry): Rename insert-cyclic-diary-entry.
Keep old name as alias.
(diary-fancy-font-lock-keywords): Rename fancy-diary-font-lock-keywords.
Keep old name as alias, update users.
(diary-fancy-display-mode): Rename fancy-diary-display-mode.
Keep old name as alias, update callers.
2008-04-06 20:53:14 +00:00
|
|
|
|
;;;###cal-autoload
|
|
|
|
|
(defun diary-insert-anniversary-entry (arg)
|
1995-09-21 03:11:06 +00:00
|
|
|
|
"Insert an anniversary diary entry for the date given by point.
|
(diary-face-attrs): Fix custom :type.
(diary-face-attrs, diary-glob-file-regexp-prefix, diary-unknown-time)
(diary-pull-attrs, diary-header-line-flag, diary-list-entries)
(diary-unhide-everything, include-other-diary-files, diary-goto-entry)
(mark-included-diary-files, mark-calendar-days-named)
(mark-calendar-date-pattern, mark-calendar-month, diary-entry-compare)
(diary-remind, insert-diary-entry, insert-weekly-diary-entry)
(insert-monthly-diary-entry, insert-yearly-diary-entry)
(insert-anniversary-diary-entry, insert-block-diary-entry)
(insert-cyclic-diary-entry, fancy-diary-font-lock-keywords)
(diary-font-lock-sexps): Doc fixes.
(diary-remind-message, mark-calendar-month): Use zerop.
(diary-attrtype-convert, diary-pull-attrs): Simplify.
(diary-list-entries): Revert let to let* (previous change).
2008-03-10 02:44:51 +00:00
|
|
|
|
Prefix argument ARG makes the entry nonmarking."
|
1995-09-21 03:11:06 +00:00
|
|
|
|
(interactive "P")
|
2008-03-29 02:44:24 +00:00
|
|
|
|
(let ((calendar-date-display-form (diary-date-display-form)))
|
(diary-sexp-entry-symbol): Rename sexp-diary-entry-symbol.
Keep old name as alias, update users.
(diary-list-entries-hook): Rename list-diary-entries-hook.
Keep old name as alias, update users.
(diary-mark-entries-hook): Rename mark-diary-entries-hook.
Keep old name as alias, update users.
(diary-nongregorian-listing-hook): Rename nongregorian-diary-listing-hook.
Keep old name as alias, update users.
(diary-nongregorian-marking-hook): Rename nongregorian-diary-marking-hook.
Keep old name as alias, update users.
(diary-print-entries-hook): Rename print-diary-entries-hook.
Keep old name as alias, update users.
(diary-abbreviated-year-flag): Rename abbreviated-calendar-year.
Keep old name as alias, update users.
(diary-number-of-entries): Rename number-of-diary-entries.
Keep old name as alias, update users.
(view-diary-entries, list-diary-entries, show-all-diary-entries):
Give version of obsolescence.
(diary-view-other-diary-entries): Rename view-other-diary-entries.
Keep old name as alias, update callers.
(diary-add-to-list): Rename add-to-diary-list. Keep old name as alias,
update callers.
(diary-include-other-diary-files): Rename include-other-diary-files.
Keep old name as alias, update callers.
(diary-simple-display): Rename simple-diary-display. Keep old name as alias,
update callers.
(diary-fancy-display): Rename fancy-diary-display. Keep old name as alias,
update callers.
(diary-print-entries): Rename print-diary-entries. Keep old name as alias,
update callers.
(diary-marking-entries-flag): Rename marking-diary-entries. Update users.
(diary-marking-entry-flag): Rename marking-diary-entry. Update users.
(diary-mark-entries): Rename mark-diary-entries. Keep old name as alias,
update callers.
(diary-mark-sexp-entries): Rename mark-sexp-diary-entries.
Keep old name as alias, update callers.
(diary-mark-included-diary-files): Rename mark-included-diary-files.
Keep old name as alias, update callers.
(calendar-mark-days-named): Rename mark-calendar-days-named.
Keep old name as alias, update callers.
(calendar-mark-month): Rename mark-calendar-month. Keep old name as alias,
update callers.
(calendar-mark-date-pattern): Rename mark-calendar-date-pattern.
Keep old name as alias, update callers.
(diary-sort-entries): Rename sort-diary-entries. Keep old name as alias,
update callers.
(diary-list-sexp-entries): Rename list-sexp-diary-entries.
Keep old name as alias, update callers.
(diary-make-entry): Rename make-diary-entry. Keep old name as alias,
update callers.
(diary-insert-entry): Rename insert-diary-entry. Keep old name as alias.
(diary-insert-weekly-entry): Rename insert-weekly-diary-entry.
Keep old name as alias.
(diary-insert-monthly-entry): Rename insert-monthly-diary-entry.
Keep old name as alias.
(diary-insert-yearly-entry): Rename insert-yearly-diary-entry.
Keep old name as alias.
(diary-insert-anniversary-entry): Rename insert-anniversary-diary-entry.
Keep old name as alias.
(diary-insert-block-entry): Rename insert-block-diary-entry.
Keep old name as alias.
(diary-insert-cyclic-entry): Rename insert-cyclic-diary-entry.
Keep old name as alias.
(diary-fancy-font-lock-keywords): Rename fancy-diary-font-lock-keywords.
Keep old name as alias, update users.
(diary-fancy-display-mode): Rename fancy-diary-display-mode.
Keep old name as alias, update callers.
2008-04-06 20:53:14 +00:00
|
|
|
|
(diary-make-entry
|
1995-09-21 03:11:06 +00:00
|
|
|
|
(format "%s(diary-anniversary %s)"
|
(diary-sexp-entry-symbol): Rename sexp-diary-entry-symbol.
Keep old name as alias, update users.
(diary-list-entries-hook): Rename list-diary-entries-hook.
Keep old name as alias, update users.
(diary-mark-entries-hook): Rename mark-diary-entries-hook.
Keep old name as alias, update users.
(diary-nongregorian-listing-hook): Rename nongregorian-diary-listing-hook.
Keep old name as alias, update users.
(diary-nongregorian-marking-hook): Rename nongregorian-diary-marking-hook.
Keep old name as alias, update users.
(diary-print-entries-hook): Rename print-diary-entries-hook.
Keep old name as alias, update users.
(diary-abbreviated-year-flag): Rename abbreviated-calendar-year.
Keep old name as alias, update users.
(diary-number-of-entries): Rename number-of-diary-entries.
Keep old name as alias, update users.
(view-diary-entries, list-diary-entries, show-all-diary-entries):
Give version of obsolescence.
(diary-view-other-diary-entries): Rename view-other-diary-entries.
Keep old name as alias, update callers.
(diary-add-to-list): Rename add-to-diary-list. Keep old name as alias,
update callers.
(diary-include-other-diary-files): Rename include-other-diary-files.
Keep old name as alias, update callers.
(diary-simple-display): Rename simple-diary-display. Keep old name as alias,
update callers.
(diary-fancy-display): Rename fancy-diary-display. Keep old name as alias,
update callers.
(diary-print-entries): Rename print-diary-entries. Keep old name as alias,
update callers.
(diary-marking-entries-flag): Rename marking-diary-entries. Update users.
(diary-marking-entry-flag): Rename marking-diary-entry. Update users.
(diary-mark-entries): Rename mark-diary-entries. Keep old name as alias,
update callers.
(diary-mark-sexp-entries): Rename mark-sexp-diary-entries.
Keep old name as alias, update callers.
(diary-mark-included-diary-files): Rename mark-included-diary-files.
Keep old name as alias, update callers.
(calendar-mark-days-named): Rename mark-calendar-days-named.
Keep old name as alias, update callers.
(calendar-mark-month): Rename mark-calendar-month. Keep old name as alias,
update callers.
(calendar-mark-date-pattern): Rename mark-calendar-date-pattern.
Keep old name as alias, update callers.
(diary-sort-entries): Rename sort-diary-entries. Keep old name as alias,
update callers.
(diary-list-sexp-entries): Rename list-sexp-diary-entries.
Keep old name as alias, update callers.
(diary-make-entry): Rename make-diary-entry. Keep old name as alias,
update callers.
(diary-insert-entry): Rename insert-diary-entry. Keep old name as alias.
(diary-insert-weekly-entry): Rename insert-weekly-diary-entry.
Keep old name as alias.
(diary-insert-monthly-entry): Rename insert-monthly-diary-entry.
Keep old name as alias.
(diary-insert-yearly-entry): Rename insert-yearly-diary-entry.
Keep old name as alias.
(diary-insert-anniversary-entry): Rename insert-anniversary-diary-entry.
Keep old name as alias.
(diary-insert-block-entry): Rename insert-block-diary-entry.
Keep old name as alias.
(diary-insert-cyclic-entry): Rename insert-cyclic-diary-entry.
Keep old name as alias.
(diary-fancy-font-lock-keywords): Rename fancy-diary-font-lock-keywords.
Keep old name as alias, update users.
(diary-fancy-display-mode): Rename fancy-diary-display-mode.
Keep old name as alias, update callers.
2008-04-06 20:53:14 +00:00
|
|
|
|
diary-sexp-entry-symbol
|
1995-09-21 03:11:06 +00:00
|
|
|
|
(calendar-date-string (calendar-cursor-to-date t) nil t))
|
|
|
|
|
arg)))
|
|
|
|
|
|
(diary-sexp-entry-symbol): Rename sexp-diary-entry-symbol.
Keep old name as alias, update users.
(diary-list-entries-hook): Rename list-diary-entries-hook.
Keep old name as alias, update users.
(diary-mark-entries-hook): Rename mark-diary-entries-hook.
Keep old name as alias, update users.
(diary-nongregorian-listing-hook): Rename nongregorian-diary-listing-hook.
Keep old name as alias, update users.
(diary-nongregorian-marking-hook): Rename nongregorian-diary-marking-hook.
Keep old name as alias, update users.
(diary-print-entries-hook): Rename print-diary-entries-hook.
Keep old name as alias, update users.
(diary-abbreviated-year-flag): Rename abbreviated-calendar-year.
Keep old name as alias, update users.
(diary-number-of-entries): Rename number-of-diary-entries.
Keep old name as alias, update users.
(view-diary-entries, list-diary-entries, show-all-diary-entries):
Give version of obsolescence.
(diary-view-other-diary-entries): Rename view-other-diary-entries.
Keep old name as alias, update callers.
(diary-add-to-list): Rename add-to-diary-list. Keep old name as alias,
update callers.
(diary-include-other-diary-files): Rename include-other-diary-files.
Keep old name as alias, update callers.
(diary-simple-display): Rename simple-diary-display. Keep old name as alias,
update callers.
(diary-fancy-display): Rename fancy-diary-display. Keep old name as alias,
update callers.
(diary-print-entries): Rename print-diary-entries. Keep old name as alias,
update callers.
(diary-marking-entries-flag): Rename marking-diary-entries. Update users.
(diary-marking-entry-flag): Rename marking-diary-entry. Update users.
(diary-mark-entries): Rename mark-diary-entries. Keep old name as alias,
update callers.
(diary-mark-sexp-entries): Rename mark-sexp-diary-entries.
Keep old name as alias, update callers.
(diary-mark-included-diary-files): Rename mark-included-diary-files.
Keep old name as alias, update callers.
(calendar-mark-days-named): Rename mark-calendar-days-named.
Keep old name as alias, update callers.
(calendar-mark-month): Rename mark-calendar-month. Keep old name as alias,
update callers.
(calendar-mark-date-pattern): Rename mark-calendar-date-pattern.
Keep old name as alias, update callers.
(diary-sort-entries): Rename sort-diary-entries. Keep old name as alias,
update callers.
(diary-list-sexp-entries): Rename list-sexp-diary-entries.
Keep old name as alias, update callers.
(diary-make-entry): Rename make-diary-entry. Keep old name as alias,
update callers.
(diary-insert-entry): Rename insert-diary-entry. Keep old name as alias.
(diary-insert-weekly-entry): Rename insert-weekly-diary-entry.
Keep old name as alias.
(diary-insert-monthly-entry): Rename insert-monthly-diary-entry.
Keep old name as alias.
(diary-insert-yearly-entry): Rename insert-yearly-diary-entry.
Keep old name as alias.
(diary-insert-anniversary-entry): Rename insert-anniversary-diary-entry.
Keep old name as alias.
(diary-insert-block-entry): Rename insert-block-diary-entry.
Keep old name as alias.
(diary-insert-cyclic-entry): Rename insert-cyclic-diary-entry.
Keep old name as alias.
(diary-fancy-font-lock-keywords): Rename fancy-diary-font-lock-keywords.
Keep old name as alias, update users.
(diary-fancy-display-mode): Rename fancy-diary-display-mode.
Keep old name as alias, update callers.
2008-04-06 20:53:14 +00:00
|
|
|
|
;;;###cal-autoload
|
|
|
|
|
(defun diary-insert-block-entry (arg)
|
1995-09-21 03:11:06 +00:00
|
|
|
|
"Insert a block diary entry for the days between the point and marked date.
|
(diary-face-attrs): Fix custom :type.
(diary-face-attrs, diary-glob-file-regexp-prefix, diary-unknown-time)
(diary-pull-attrs, diary-header-line-flag, diary-list-entries)
(diary-unhide-everything, include-other-diary-files, diary-goto-entry)
(mark-included-diary-files, mark-calendar-days-named)
(mark-calendar-date-pattern, mark-calendar-month, diary-entry-compare)
(diary-remind, insert-diary-entry, insert-weekly-diary-entry)
(insert-monthly-diary-entry, insert-yearly-diary-entry)
(insert-anniversary-diary-entry, insert-block-diary-entry)
(insert-cyclic-diary-entry, fancy-diary-font-lock-keywords)
(diary-font-lock-sexps): Doc fixes.
(diary-remind-message, mark-calendar-month): Use zerop.
(diary-attrtype-convert, diary-pull-attrs): Simplify.
(diary-list-entries): Revert let to let* (previous change).
2008-03-10 02:44:51 +00:00
|
|
|
|
Prefix argument ARG makes the entry nonmarking."
|
1995-09-21 03:11:06 +00:00
|
|
|
|
(interactive "P")
|
2008-03-29 02:44:24 +00:00
|
|
|
|
(let ((calendar-date-display-form (diary-date-display-form))
|
2008-03-13 06:40:31 +00:00
|
|
|
|
(cursor (calendar-cursor-to-date t))
|
|
|
|
|
(mark (or (car calendar-mark-ring)
|
|
|
|
|
(error "No mark set in this buffer")))
|
|
|
|
|
start end)
|
1995-09-21 03:11:06 +00:00
|
|
|
|
(if (< (calendar-absolute-from-gregorian mark)
|
|
|
|
|
(calendar-absolute-from-gregorian cursor))
|
|
|
|
|
(setq start mark
|
|
|
|
|
end cursor)
|
|
|
|
|
(setq start cursor
|
2008-03-13 06:40:31 +00:00
|
|
|
|
end mark))
|
(diary-sexp-entry-symbol): Rename sexp-diary-entry-symbol.
Keep old name as alias, update users.
(diary-list-entries-hook): Rename list-diary-entries-hook.
Keep old name as alias, update users.
(diary-mark-entries-hook): Rename mark-diary-entries-hook.
Keep old name as alias, update users.
(diary-nongregorian-listing-hook): Rename nongregorian-diary-listing-hook.
Keep old name as alias, update users.
(diary-nongregorian-marking-hook): Rename nongregorian-diary-marking-hook.
Keep old name as alias, update users.
(diary-print-entries-hook): Rename print-diary-entries-hook.
Keep old name as alias, update users.
(diary-abbreviated-year-flag): Rename abbreviated-calendar-year.
Keep old name as alias, update users.
(diary-number-of-entries): Rename number-of-diary-entries.
Keep old name as alias, update users.
(view-diary-entries, list-diary-entries, show-all-diary-entries):
Give version of obsolescence.
(diary-view-other-diary-entries): Rename view-other-diary-entries.
Keep old name as alias, update callers.
(diary-add-to-list): Rename add-to-diary-list. Keep old name as alias,
update callers.
(diary-include-other-diary-files): Rename include-other-diary-files.
Keep old name as alias, update callers.
(diary-simple-display): Rename simple-diary-display. Keep old name as alias,
update callers.
(diary-fancy-display): Rename fancy-diary-display. Keep old name as alias,
update callers.
(diary-print-entries): Rename print-diary-entries. Keep old name as alias,
update callers.
(diary-marking-entries-flag): Rename marking-diary-entries. Update users.
(diary-marking-entry-flag): Rename marking-diary-entry. Update users.
(diary-mark-entries): Rename mark-diary-entries. Keep old name as alias,
update callers.
(diary-mark-sexp-entries): Rename mark-sexp-diary-entries.
Keep old name as alias, update callers.
(diary-mark-included-diary-files): Rename mark-included-diary-files.
Keep old name as alias, update callers.
(calendar-mark-days-named): Rename mark-calendar-days-named.
Keep old name as alias, update callers.
(calendar-mark-month): Rename mark-calendar-month. Keep old name as alias,
update callers.
(calendar-mark-date-pattern): Rename mark-calendar-date-pattern.
Keep old name as alias, update callers.
(diary-sort-entries): Rename sort-diary-entries. Keep old name as alias,
update callers.
(diary-list-sexp-entries): Rename list-sexp-diary-entries.
Keep old name as alias, update callers.
(diary-make-entry): Rename make-diary-entry. Keep old name as alias,
update callers.
(diary-insert-entry): Rename insert-diary-entry. Keep old name as alias.
(diary-insert-weekly-entry): Rename insert-weekly-diary-entry.
Keep old name as alias.
(diary-insert-monthly-entry): Rename insert-monthly-diary-entry.
Keep old name as alias.
(diary-insert-yearly-entry): Rename insert-yearly-diary-entry.
Keep old name as alias.
(diary-insert-anniversary-entry): Rename insert-anniversary-diary-entry.
Keep old name as alias.
(diary-insert-block-entry): Rename insert-block-diary-entry.
Keep old name as alias.
(diary-insert-cyclic-entry): Rename insert-cyclic-diary-entry.
Keep old name as alias.
(diary-fancy-font-lock-keywords): Rename fancy-diary-font-lock-keywords.
Keep old name as alias, update users.
(diary-fancy-display-mode): Rename fancy-diary-display-mode.
Keep old name as alias, update callers.
2008-04-06 20:53:14 +00:00
|
|
|
|
(diary-make-entry
|
1995-09-21 03:11:06 +00:00
|
|
|
|
(format "%s(diary-block %s %s)"
|
(diary-sexp-entry-symbol): Rename sexp-diary-entry-symbol.
Keep old name as alias, update users.
(diary-list-entries-hook): Rename list-diary-entries-hook.
Keep old name as alias, update users.
(diary-mark-entries-hook): Rename mark-diary-entries-hook.
Keep old name as alias, update users.
(diary-nongregorian-listing-hook): Rename nongregorian-diary-listing-hook.
Keep old name as alias, update users.
(diary-nongregorian-marking-hook): Rename nongregorian-diary-marking-hook.
Keep old name as alias, update users.
(diary-print-entries-hook): Rename print-diary-entries-hook.
Keep old name as alias, update users.
(diary-abbreviated-year-flag): Rename abbreviated-calendar-year.
Keep old name as alias, update users.
(diary-number-of-entries): Rename number-of-diary-entries.
Keep old name as alias, update users.
(view-diary-entries, list-diary-entries, show-all-diary-entries):
Give version of obsolescence.
(diary-view-other-diary-entries): Rename view-other-diary-entries.
Keep old name as alias, update callers.
(diary-add-to-list): Rename add-to-diary-list. Keep old name as alias,
update callers.
(diary-include-other-diary-files): Rename include-other-diary-files.
Keep old name as alias, update callers.
(diary-simple-display): Rename simple-diary-display. Keep old name as alias,
update callers.
(diary-fancy-display): Rename fancy-diary-display. Keep old name as alias,
update callers.
(diary-print-entries): Rename print-diary-entries. Keep old name as alias,
update callers.
(diary-marking-entries-flag): Rename marking-diary-entries. Update users.
(diary-marking-entry-flag): Rename marking-diary-entry. Update users.
(diary-mark-entries): Rename mark-diary-entries. Keep old name as alias,
update callers.
(diary-mark-sexp-entries): Rename mark-sexp-diary-entries.
Keep old name as alias, update callers.
(diary-mark-included-diary-files): Rename mark-included-diary-files.
Keep old name as alias, update callers.
(calendar-mark-days-named): Rename mark-calendar-days-named.
Keep old name as alias, update callers.
(calendar-mark-month): Rename mark-calendar-month. Keep old name as alias,
update callers.
(calendar-mark-date-pattern): Rename mark-calendar-date-pattern.
Keep old name as alias, update callers.
(diary-sort-entries): Rename sort-diary-entries. Keep old name as alias,
update callers.
(diary-list-sexp-entries): Rename list-sexp-diary-entries.
Keep old name as alias, update callers.
(diary-make-entry): Rename make-diary-entry. Keep old name as alias,
update callers.
(diary-insert-entry): Rename insert-diary-entry. Keep old name as alias.
(diary-insert-weekly-entry): Rename insert-weekly-diary-entry.
Keep old name as alias.
(diary-insert-monthly-entry): Rename insert-monthly-diary-entry.
Keep old name as alias.
(diary-insert-yearly-entry): Rename insert-yearly-diary-entry.
Keep old name as alias.
(diary-insert-anniversary-entry): Rename insert-anniversary-diary-entry.
Keep old name as alias.
(diary-insert-block-entry): Rename insert-block-diary-entry.
Keep old name as alias.
(diary-insert-cyclic-entry): Rename insert-cyclic-diary-entry.
Keep old name as alias.
(diary-fancy-font-lock-keywords): Rename fancy-diary-font-lock-keywords.
Keep old name as alias, update users.
(diary-fancy-display-mode): Rename fancy-diary-display-mode.
Keep old name as alias, update callers.
2008-04-06 20:53:14 +00:00
|
|
|
|
diary-sexp-entry-symbol
|
2008-03-13 06:40:31 +00:00
|
|
|
|
(calendar-date-string start nil t)
|
|
|
|
|
(calendar-date-string end nil t))
|
1995-09-21 03:11:06 +00:00
|
|
|
|
arg)))
|
|
|
|
|
|
(diary-sexp-entry-symbol): Rename sexp-diary-entry-symbol.
Keep old name as alias, update users.
(diary-list-entries-hook): Rename list-diary-entries-hook.
Keep old name as alias, update users.
(diary-mark-entries-hook): Rename mark-diary-entries-hook.
Keep old name as alias, update users.
(diary-nongregorian-listing-hook): Rename nongregorian-diary-listing-hook.
Keep old name as alias, update users.
(diary-nongregorian-marking-hook): Rename nongregorian-diary-marking-hook.
Keep old name as alias, update users.
(diary-print-entries-hook): Rename print-diary-entries-hook.
Keep old name as alias, update users.
(diary-abbreviated-year-flag): Rename abbreviated-calendar-year.
Keep old name as alias, update users.
(diary-number-of-entries): Rename number-of-diary-entries.
Keep old name as alias, update users.
(view-diary-entries, list-diary-entries, show-all-diary-entries):
Give version of obsolescence.
(diary-view-other-diary-entries): Rename view-other-diary-entries.
Keep old name as alias, update callers.
(diary-add-to-list): Rename add-to-diary-list. Keep old name as alias,
update callers.
(diary-include-other-diary-files): Rename include-other-diary-files.
Keep old name as alias, update callers.
(diary-simple-display): Rename simple-diary-display. Keep old name as alias,
update callers.
(diary-fancy-display): Rename fancy-diary-display. Keep old name as alias,
update callers.
(diary-print-entries): Rename print-diary-entries. Keep old name as alias,
update callers.
(diary-marking-entries-flag): Rename marking-diary-entries. Update users.
(diary-marking-entry-flag): Rename marking-diary-entry. Update users.
(diary-mark-entries): Rename mark-diary-entries. Keep old name as alias,
update callers.
(diary-mark-sexp-entries): Rename mark-sexp-diary-entries.
Keep old name as alias, update callers.
(diary-mark-included-diary-files): Rename mark-included-diary-files.
Keep old name as alias, update callers.
(calendar-mark-days-named): Rename mark-calendar-days-named.
Keep old name as alias, update callers.
(calendar-mark-month): Rename mark-calendar-month. Keep old name as alias,
update callers.
(calendar-mark-date-pattern): Rename mark-calendar-date-pattern.
Keep old name as alias, update callers.
(diary-sort-entries): Rename sort-diary-entries. Keep old name as alias,
update callers.
(diary-list-sexp-entries): Rename list-sexp-diary-entries.
Keep old name as alias, update callers.
(diary-make-entry): Rename make-diary-entry. Keep old name as alias,
update callers.
(diary-insert-entry): Rename insert-diary-entry. Keep old name as alias.
(diary-insert-weekly-entry): Rename insert-weekly-diary-entry.
Keep old name as alias.
(diary-insert-monthly-entry): Rename insert-monthly-diary-entry.
Keep old name as alias.
(diary-insert-yearly-entry): Rename insert-yearly-diary-entry.
Keep old name as alias.
(diary-insert-anniversary-entry): Rename insert-anniversary-diary-entry.
Keep old name as alias.
(diary-insert-block-entry): Rename insert-block-diary-entry.
Keep old name as alias.
(diary-insert-cyclic-entry): Rename insert-cyclic-diary-entry.
Keep old name as alias.
(diary-fancy-font-lock-keywords): Rename fancy-diary-font-lock-keywords.
Keep old name as alias, update users.
(diary-fancy-display-mode): Rename fancy-diary-display-mode.
Keep old name as alias, update callers.
2008-04-06 20:53:14 +00:00
|
|
|
|
;;;###cal-autoload
|
|
|
|
|
(defun diary-insert-cyclic-entry (arg)
|
1995-09-21 03:11:06 +00:00
|
|
|
|
"Insert a cyclic diary entry starting at the date given by point.
|
(diary-face-attrs): Fix custom :type.
(diary-face-attrs, diary-glob-file-regexp-prefix, diary-unknown-time)
(diary-pull-attrs, diary-header-line-flag, diary-list-entries)
(diary-unhide-everything, include-other-diary-files, diary-goto-entry)
(mark-included-diary-files, mark-calendar-days-named)
(mark-calendar-date-pattern, mark-calendar-month, diary-entry-compare)
(diary-remind, insert-diary-entry, insert-weekly-diary-entry)
(insert-monthly-diary-entry, insert-yearly-diary-entry)
(insert-anniversary-diary-entry, insert-block-diary-entry)
(insert-cyclic-diary-entry, fancy-diary-font-lock-keywords)
(diary-font-lock-sexps): Doc fixes.
(diary-remind-message, mark-calendar-month): Use zerop.
(diary-attrtype-convert, diary-pull-attrs): Simplify.
(diary-list-entries): Revert let to let* (previous change).
2008-03-10 02:44:51 +00:00
|
|
|
|
Prefix argument ARG makes the entry nonmarking."
|
1995-09-21 03:11:06 +00:00
|
|
|
|
(interactive "P")
|
2008-03-29 02:44:24 +00:00
|
|
|
|
(let ((calendar-date-display-form (diary-date-display-form)))
|
(diary-sexp-entry-symbol): Rename sexp-diary-entry-symbol.
Keep old name as alias, update users.
(diary-list-entries-hook): Rename list-diary-entries-hook.
Keep old name as alias, update users.
(diary-mark-entries-hook): Rename mark-diary-entries-hook.
Keep old name as alias, update users.
(diary-nongregorian-listing-hook): Rename nongregorian-diary-listing-hook.
Keep old name as alias, update users.
(diary-nongregorian-marking-hook): Rename nongregorian-diary-marking-hook.
Keep old name as alias, update users.
(diary-print-entries-hook): Rename print-diary-entries-hook.
Keep old name as alias, update users.
(diary-abbreviated-year-flag): Rename abbreviated-calendar-year.
Keep old name as alias, update users.
(diary-number-of-entries): Rename number-of-diary-entries.
Keep old name as alias, update users.
(view-diary-entries, list-diary-entries, show-all-diary-entries):
Give version of obsolescence.
(diary-view-other-diary-entries): Rename view-other-diary-entries.
Keep old name as alias, update callers.
(diary-add-to-list): Rename add-to-diary-list. Keep old name as alias,
update callers.
(diary-include-other-diary-files): Rename include-other-diary-files.
Keep old name as alias, update callers.
(diary-simple-display): Rename simple-diary-display. Keep old name as alias,
update callers.
(diary-fancy-display): Rename fancy-diary-display. Keep old name as alias,
update callers.
(diary-print-entries): Rename print-diary-entries. Keep old name as alias,
update callers.
(diary-marking-entries-flag): Rename marking-diary-entries. Update users.
(diary-marking-entry-flag): Rename marking-diary-entry. Update users.
(diary-mark-entries): Rename mark-diary-entries. Keep old name as alias,
update callers.
(diary-mark-sexp-entries): Rename mark-sexp-diary-entries.
Keep old name as alias, update callers.
(diary-mark-included-diary-files): Rename mark-included-diary-files.
Keep old name as alias, update callers.
(calendar-mark-days-named): Rename mark-calendar-days-named.
Keep old name as alias, update callers.
(calendar-mark-month): Rename mark-calendar-month. Keep old name as alias,
update callers.
(calendar-mark-date-pattern): Rename mark-calendar-date-pattern.
Keep old name as alias, update callers.
(diary-sort-entries): Rename sort-diary-entries. Keep old name as alias,
update callers.
(diary-list-sexp-entries): Rename list-sexp-diary-entries.
Keep old name as alias, update callers.
(diary-make-entry): Rename make-diary-entry. Keep old name as alias,
update callers.
(diary-insert-entry): Rename insert-diary-entry. Keep old name as alias.
(diary-insert-weekly-entry): Rename insert-weekly-diary-entry.
Keep old name as alias.
(diary-insert-monthly-entry): Rename insert-monthly-diary-entry.
Keep old name as alias.
(diary-insert-yearly-entry): Rename insert-yearly-diary-entry.
Keep old name as alias.
(diary-insert-anniversary-entry): Rename insert-anniversary-diary-entry.
Keep old name as alias.
(diary-insert-block-entry): Rename insert-block-diary-entry.
Keep old name as alias.
(diary-insert-cyclic-entry): Rename insert-cyclic-diary-entry.
Keep old name as alias.
(diary-fancy-font-lock-keywords): Rename fancy-diary-font-lock-keywords.
Keep old name as alias, update users.
(diary-fancy-display-mode): Rename fancy-diary-display-mode.
Keep old name as alias, update callers.
2008-04-06 20:53:14 +00:00
|
|
|
|
(diary-make-entry
|
1995-09-21 03:11:06 +00:00
|
|
|
|
(format "%s(diary-cyclic %d %s)"
|
(diary-sexp-entry-symbol): Rename sexp-diary-entry-symbol.
Keep old name as alias, update users.
(diary-list-entries-hook): Rename list-diary-entries-hook.
Keep old name as alias, update users.
(diary-mark-entries-hook): Rename mark-diary-entries-hook.
Keep old name as alias, update users.
(diary-nongregorian-listing-hook): Rename nongregorian-diary-listing-hook.
Keep old name as alias, update users.
(diary-nongregorian-marking-hook): Rename nongregorian-diary-marking-hook.
Keep old name as alias, update users.
(diary-print-entries-hook): Rename print-diary-entries-hook.
Keep old name as alias, update users.
(diary-abbreviated-year-flag): Rename abbreviated-calendar-year.
Keep old name as alias, update users.
(diary-number-of-entries): Rename number-of-diary-entries.
Keep old name as alias, update users.
(view-diary-entries, list-diary-entries, show-all-diary-entries):
Give version of obsolescence.
(diary-view-other-diary-entries): Rename view-other-diary-entries.
Keep old name as alias, update callers.
(diary-add-to-list): Rename add-to-diary-list. Keep old name as alias,
update callers.
(diary-include-other-diary-files): Rename include-other-diary-files.
Keep old name as alias, update callers.
(diary-simple-display): Rename simple-diary-display. Keep old name as alias,
update callers.
(diary-fancy-display): Rename fancy-diary-display. Keep old name as alias,
update callers.
(diary-print-entries): Rename print-diary-entries. Keep old name as alias,
update callers.
(diary-marking-entries-flag): Rename marking-diary-entries. Update users.
(diary-marking-entry-flag): Rename marking-diary-entry. Update users.
(diary-mark-entries): Rename mark-diary-entries. Keep old name as alias,
update callers.
(diary-mark-sexp-entries): Rename mark-sexp-diary-entries.
Keep old name as alias, update callers.
(diary-mark-included-diary-files): Rename mark-included-diary-files.
Keep old name as alias, update callers.
(calendar-mark-days-named): Rename mark-calendar-days-named.
Keep old name as alias, update callers.
(calendar-mark-month): Rename mark-calendar-month. Keep old name as alias,
update callers.
(calendar-mark-date-pattern): Rename mark-calendar-date-pattern.
Keep old name as alias, update callers.
(diary-sort-entries): Rename sort-diary-entries. Keep old name as alias,
update callers.
(diary-list-sexp-entries): Rename list-sexp-diary-entries.
Keep old name as alias, update callers.
(diary-make-entry): Rename make-diary-entry. Keep old name as alias,
update callers.
(diary-insert-entry): Rename insert-diary-entry. Keep old name as alias.
(diary-insert-weekly-entry): Rename insert-weekly-diary-entry.
Keep old name as alias.
(diary-insert-monthly-entry): Rename insert-monthly-diary-entry.
Keep old name as alias.
(diary-insert-yearly-entry): Rename insert-yearly-diary-entry.
Keep old name as alias.
(diary-insert-anniversary-entry): Rename insert-anniversary-diary-entry.
Keep old name as alias.
(diary-insert-block-entry): Rename insert-block-diary-entry.
Keep old name as alias.
(diary-insert-cyclic-entry): Rename insert-cyclic-diary-entry.
Keep old name as alias.
(diary-fancy-font-lock-keywords): Rename fancy-diary-font-lock-keywords.
Keep old name as alias, update users.
(diary-fancy-display-mode): Rename fancy-diary-display-mode.
Keep old name as alias, update callers.
2008-04-06 20:53:14 +00:00
|
|
|
|
diary-sexp-entry-symbol
|
2021-01-21 04:14:25 +00:00
|
|
|
|
(calendar-read-sexp "Repeat every how many days"
|
|
|
|
|
(lambda (x) (> x 0)))
|
1995-09-21 03:11:06 +00:00
|
|
|
|
(calendar-date-string (calendar-cursor-to-date t) nil t))
|
|
|
|
|
arg)))
|
|
|
|
|
|
2008-03-17 02:33:49 +00:00
|
|
|
|
;;; Diary mode.
|
|
|
|
|
|
2008-03-26 03:26:43 +00:00
|
|
|
|
(defun diary-redraw-calendar ()
|
|
|
|
|
"If `calendar-buffer' is live and diary entries are marked, redraw it."
|
2008-04-07 01:59:37 +00:00
|
|
|
|
(and calendar-mark-diary-entries-flag
|
2008-03-26 03:26:43 +00:00
|
|
|
|
(save-excursion
|
2008-04-07 01:59:37 +00:00
|
|
|
|
(calendar-redraw)))
|
2008-03-26 03:26:43 +00:00
|
|
|
|
;; Return value suitable for `write-contents-functions'.
|
|
|
|
|
nil)
|
|
|
|
|
|
2005-09-12 21:21:42 +00:00
|
|
|
|
(defvar diary-mode-map
|
|
|
|
|
(let ((map (make-sparse-keymap)))
|
|
|
|
|
(define-key map "\C-c\C-s" 'diary-show-all-entries)
|
|
|
|
|
(define-key map "\C-c\C-q" 'quit-window)
|
|
|
|
|
map)
|
|
|
|
|
"Keymap for `diary-mode'.")
|
|
|
|
|
|
|
|
|
|
(defun diary-font-lock-sexps (limit)
|
(diary-face-attrs): Fix custom :type.
(diary-face-attrs, diary-glob-file-regexp-prefix, diary-unknown-time)
(diary-pull-attrs, diary-header-line-flag, diary-list-entries)
(diary-unhide-everything, include-other-diary-files, diary-goto-entry)
(mark-included-diary-files, mark-calendar-days-named)
(mark-calendar-date-pattern, mark-calendar-month, diary-entry-compare)
(diary-remind, insert-diary-entry, insert-weekly-diary-entry)
(insert-monthly-diary-entry, insert-yearly-diary-entry)
(insert-anniversary-diary-entry, insert-block-diary-entry)
(insert-cyclic-diary-entry, fancy-diary-font-lock-keywords)
(diary-font-lock-sexps): Doc fixes.
(diary-remind-message, mark-calendar-month): Use zerop.
(diary-attrtype-convert, diary-pull-attrs): Simplify.
(diary-list-entries): Revert let to let* (previous change).
2008-03-10 02:44:51 +00:00
|
|
|
|
"Recognize sexp diary entry up to LIMIT for font-locking."
|
2002-11-16 19:17:20 +00:00
|
|
|
|
(if (re-search-forward
|
2008-03-16 01:27:15 +00:00
|
|
|
|
(format "^%s?\\(%s\\)" (regexp-quote diary-nonmarking-symbol)
|
(diary-sexp-entry-symbol): Rename sexp-diary-entry-symbol.
Keep old name as alias, update users.
(diary-list-entries-hook): Rename list-diary-entries-hook.
Keep old name as alias, update users.
(diary-mark-entries-hook): Rename mark-diary-entries-hook.
Keep old name as alias, update users.
(diary-nongregorian-listing-hook): Rename nongregorian-diary-listing-hook.
Keep old name as alias, update users.
(diary-nongregorian-marking-hook): Rename nongregorian-diary-marking-hook.
Keep old name as alias, update users.
(diary-print-entries-hook): Rename print-diary-entries-hook.
Keep old name as alias, update users.
(diary-abbreviated-year-flag): Rename abbreviated-calendar-year.
Keep old name as alias, update users.
(diary-number-of-entries): Rename number-of-diary-entries.
Keep old name as alias, update users.
(view-diary-entries, list-diary-entries, show-all-diary-entries):
Give version of obsolescence.
(diary-view-other-diary-entries): Rename view-other-diary-entries.
Keep old name as alias, update callers.
(diary-add-to-list): Rename add-to-diary-list. Keep old name as alias,
update callers.
(diary-include-other-diary-files): Rename include-other-diary-files.
Keep old name as alias, update callers.
(diary-simple-display): Rename simple-diary-display. Keep old name as alias,
update callers.
(diary-fancy-display): Rename fancy-diary-display. Keep old name as alias,
update callers.
(diary-print-entries): Rename print-diary-entries. Keep old name as alias,
update callers.
(diary-marking-entries-flag): Rename marking-diary-entries. Update users.
(diary-marking-entry-flag): Rename marking-diary-entry. Update users.
(diary-mark-entries): Rename mark-diary-entries. Keep old name as alias,
update callers.
(diary-mark-sexp-entries): Rename mark-sexp-diary-entries.
Keep old name as alias, update callers.
(diary-mark-included-diary-files): Rename mark-included-diary-files.
Keep old name as alias, update callers.
(calendar-mark-days-named): Rename mark-calendar-days-named.
Keep old name as alias, update callers.
(calendar-mark-month): Rename mark-calendar-month. Keep old name as alias,
update callers.
(calendar-mark-date-pattern): Rename mark-calendar-date-pattern.
Keep old name as alias, update callers.
(diary-sort-entries): Rename sort-diary-entries. Keep old name as alias,
update callers.
(diary-list-sexp-entries): Rename list-sexp-diary-entries.
Keep old name as alias, update callers.
(diary-make-entry): Rename make-diary-entry. Keep old name as alias,
update callers.
(diary-insert-entry): Rename insert-diary-entry. Keep old name as alias.
(diary-insert-weekly-entry): Rename insert-weekly-diary-entry.
Keep old name as alias.
(diary-insert-monthly-entry): Rename insert-monthly-diary-entry.
Keep old name as alias.
(diary-insert-yearly-entry): Rename insert-yearly-diary-entry.
Keep old name as alias.
(diary-insert-anniversary-entry): Rename insert-anniversary-diary-entry.
Keep old name as alias.
(diary-insert-block-entry): Rename insert-block-diary-entry.
Keep old name as alias.
(diary-insert-cyclic-entry): Rename insert-cyclic-diary-entry.
Keep old name as alias.
(diary-fancy-font-lock-keywords): Rename fancy-diary-font-lock-keywords.
Keep old name as alias, update users.
(diary-fancy-display-mode): Rename fancy-diary-display-mode.
Keep old name as alias, update callers.
2008-04-06 20:53:14 +00:00
|
|
|
|
(regexp-quote diary-sexp-entry-symbol))
|
2002-11-16 19:17:20 +00:00
|
|
|
|
limit t)
|
|
|
|
|
(condition-case nil
|
2008-03-13 06:29:28 +00:00
|
|
|
|
(save-restriction
|
|
|
|
|
(narrow-to-region (point-min) limit)
|
|
|
|
|
(let ((start (point)))
|
|
|
|
|
(forward-sexp 1)
|
|
|
|
|
(store-match-data (list start (point)))
|
|
|
|
|
t))
|
|
|
|
|
(error t))))
|
2002-11-16 19:17:20 +00:00
|
|
|
|
|
2005-09-12 21:21:42 +00:00
|
|
|
|
(defun diary-font-lock-date-forms (month-array &optional symbol abbrev-array)
|
2003-08-03 14:00:56 +00:00
|
|
|
|
"Create font-lock patterns for `diary-date-forms' using MONTH-ARRAY.
|
2011-05-18 03:20:13 +00:00
|
|
|
|
If given, optional SYMBOL must be a prefix to entries. If
|
|
|
|
|
optional ABBREV-ARRAY is present, also matches the abbreviations
|
|
|
|
|
from this array (with or without a final `.'), in addition to the
|
|
|
|
|
full month names."
|
2017-12-04 22:03:32 +00:00
|
|
|
|
(calendar-dlet*
|
|
|
|
|
((dayname (diary-name-pattern calendar-day-name-array
|
|
|
|
|
calendar-day-abbrev-array t))
|
|
|
|
|
(monthname (format "\\(%s\\|\\*\\)"
|
|
|
|
|
(diary-name-pattern month-array abbrev-array)))
|
|
|
|
|
(month "\\([0-9]+\\|\\*\\)")
|
|
|
|
|
(day "\\([0-9]+\\|\\*\\)")
|
|
|
|
|
(year "-?\\([0-9]+\\|\\*\\)"))
|
2005-09-12 21:21:42 +00:00
|
|
|
|
(mapcar (lambda (x)
|
2008-03-13 06:40:31 +00:00
|
|
|
|
(cons
|
|
|
|
|
(concat "^" (regexp-quote diary-nonmarking-symbol) "?"
|
|
|
|
|
(if symbol (regexp-quote symbol) "") "\\("
|
2017-12-04 22:03:32 +00:00
|
|
|
|
(mapconcat #'eval
|
2008-03-13 06:40:31 +00:00
|
|
|
|
;; If backup, omit first item (backup)
|
|
|
|
|
;; and last item (not part of date).
|
|
|
|
|
(if (equal (car x) 'backup)
|
2005-09-12 21:21:42 +00:00
|
|
|
|
(nreverse (cdr (reverse (cdr x))))
|
2008-03-13 06:40:31 +00:00
|
|
|
|
x)
|
|
|
|
|
"")
|
|
|
|
|
;; With backup, last item is not part of date.
|
|
|
|
|
(if (equal (car x) 'backup)
|
|
|
|
|
(concat "\\)" (eval (car (reverse x))))
|
|
|
|
|
"\\)"))
|
Remove calendar code obsolete since at least version 23.1
* lisp/calendar/cal-bahai.el (calendar-absolute-from-bahai)
(calendar-print-bahai-date, calendar-bahai-prompt-for-date)
(calendar-goto-bahai-date, list-bahai-diary-entries)
(mark-bahai-calendar-date-pattern, mark-bahai-diary-entries)
(insert-bahai-diary-entry, insert-monthly-bahai-diary-entry)
(insert-yearly-bahai-diary-entry):
* lisp/calendar/cal-china.el (chinese-calendar-time-zone)
(chinese-calendar-location-name)
(chinese-calendar-daylight-time-offset)
(chinese-calendar-standard-time-zone-name)
(chinese-calendar-daylight-time-zone-name)
(chinese-calendar-daylight-savings-starts)
(chinese-calendar-daylight-savings-ends)
(chinese-calendar-daylight-savings-starts-time)
(chinese-calendar-daylight-savings-ends-time)
(chinese-calendar-celestial-stem)
(chinese-calendar-terrestrial-branch)
(calendar-absolute-from-chinese, calendar-print-chinese-date)
(calendar-goto-chinese-date):
* lisp/calendar/cal-coptic.el (calendar-absolute-from-coptic)
(calendar-print-coptic-date, coptic-prompt-for-date)
(calendar-goto-coptic-date, calendar-absolute-from-ethiopic)
(calendar-print-ethiopic-date, calendar-goto-ethiopic-date):
* lisp/calendar/cal-french.el (calendar-absolute-from-french)
(calendar-print-french-date, calendar-goto-french-date):
* lisp/calendar/cal-hebrew.el (diary-sabbath-candles-minutes)
(calendar-absolute-from-hebrew, calendar-print-hebrew-date)
(hebrew-calendar-yahrzeit, calendar-goto-hebrew-date)
(holiday-rosh-hashanah-etc, holiday-hanukkah)
(holiday-passover-etc, holiday-tisha-b-av-etc)
(list-hebrew-diary-entries, mark-hebrew-calendar-date-pattern)
(mark-hebrew-diary-entries, insert-hebrew-diary-entry)
(insert-monthly-hebrew-diary-entry)
(insert-yearly-hebrew-diary-entry, list-yahrzeit-dates)
(diary-omer, diary-yahrzeit, diary-rosh-hodesh, diary-parasha)
(diary-sabbath-candles):
* lisp/calendar/cal-islam.el (calendar-absolute-from-islamic)
(calendar-print-islamic-date, calendar-goto-islamic-date)
(list-islamic-diary-entries, mark-islamic-calendar-date-pattern)
(mark-islamic-diary-entries, insert-islamic-diary-entry)
(insert-monthly-islamic-diary-entry)
(insert-yearly-islamic-diary-entry):
* lisp/calendar/cal-iso.el (calendar-absolute-from-iso)
(calendar-print-iso-date, calendar-iso-read-args)
(calendar-goto-iso-date, calendar-goto-iso-week):
* lisp/calendar/cal-julian.el (calendar-absolute-from-julian)
(calendar-print-julian-date, calendar-goto-julian-date)
(calendar-absolute-from-astro, calendar-print-astro-day-number)
(calendar-goto-astro-day-number):
* lisp/calendar/cal-mayan.el (calendar-print-mayan-date)
(calendar-next-haab-date, calendar-previous-haab-date)
(calendar-next-tzolkin-date, calendar-previous-tzolkin-date)
(calendar-next-calendar-round-date)
(calendar-previous-calendar-round-date)
(calendar-absolute-from-mayan-long-count)
(calendar-goto-mayan-long-count-date):
* lisp/calendar/cal-move.el (scroll-calendar-left)
(scroll-calendar-right, scroll-calendar-left-three-months)
(scroll-calendar-right-three-months):
* lisp/calendar/cal-persia.el (calendar-absolute-from-persian)
(calendar-print-persian-date, persian-prompt-for-date)
(calendar-goto-persian-date):
* lisp/calendar/cal-x.el (calendar-after-frame-setup-hooks):
* lisp/calendar/calendar.el (view-diary-entries-initially)
(mark-diary-entries-in-calendar, calendar-today-face)
(diary-face, holiday-face, view-calendar-holidays-initially)
(mark-holidays-in-calendar, initial-calendar-window-hook)
(today-visible-calendar-hook, today-invisible-calendar-hook)
(hebrew-diary-entry-symbol, islamic-diary-entry-symbol)
(bahai-diary-entry-symbol, american-date-diary-pattern)
(european-date-diary-pattern, european-calendar-display-form)
(american-calendar-display-form, holidays-in-diary-buffer)
(all-hebrew-calendar-holidays, all-christian-calendar-holidays)
(all-islamic-calendar-holidays, all-bahai-calendar-holidays)
(fancy-diary-buffer, increment-calendar-month)
(extract-calendar-month, extract-calendar-day)
(extract-calendar-year, exit-calendar, calendar-date-is-legal-p)
(mark-visible-calendar-date, calendar-version):
* lisp/calendar/diary-lib.el (diary-button-face, sexp-diary-entry-symbol)
(diary-display-hook, list-diary-entries-hook)
(mark-diary-entries-hook, nongregorian-diary-listing-hook)
(nongregorian-diary-marking-hook, print-diary-entries-hook)
(abbreviated-calendar-year, number-of-diary-entries)
(view-other-diary-entries, add-to-diary-list)
(include-other-diary-files, simple-diary-display)
(fancy-diary-display, print-diary-entries, mark-diary-entries)
(mark-sexp-diary-entries, mark-included-diary-files)
(mark-calendar-days-named, mark-calendar-month)
(mark-calendar-date-pattern, sort-diary-entries)
(list-sexp-diary-entries, make-diary-entry, insert-diary-entry)
(insert-weekly-diary-entry, insert-monthly-diary-entry)
(insert-yearly-diary-entry, insert-anniversary-diary-entry)
(insert-block-diary-entry, insert-cyclic-diary-entry)
(fancy-diary-font-lock-keywords, fancy-diary-display-mode):
* lisp/calendar/holidays.el (general-holidays, oriental-holidays)
(local-holidays, other-holidays, hebrew-holidays)
(christian-holidays, islamic-holidays, bahai-holidays)
(solar-holidays, list-calendar-holidays)
(check-calendar-holidays, mark-calendar-holidays)
(filter-visible-calendar-holidays):
* lisp/calendar/lunar.el (calendar-phases-of-moon, phases-of-moon)
(diary-phases-of-moon): Remove obsolete aliases.
* lisp/calendar/cal-menu.el (cal-menu-load-hook): Remove obsolete hook.
* calendar/cal-x.el (calendar-one-frame-setup)
(calendar-only-one-frame-setup, calendar-two-frame-setup):
Remove obsolete functions.
(cal-x-load-hook): Remove obsolete hook.
* calendar/calendar.el (european-calendar-style): Remove obsolete variable.
(calendar-date-style): No longer consult european-calendar-style.
* calendar/calendar.el (european-calendar, american-calendar):
Remove obsolete commands.
* calendar/calendar.el (calendar-for-loop): Remove obsolete macro.
* calendar/diary-lib.el (diary-face): Remove obsolete variable.
(diary-font-lock-date-forms, diary-fancy-font-lock-keywords):
Use the face `diary' instead of the variable `diary-face'.
* calendar/holidays.el (hebrew-holidays-1, hebrew-holidays-2)
(hebrew-holidays-3, hebrew-holidays-4): Remove obsolete variables.
* lisp/calendar/icalendar.el (icalendar--date-style): Remove function.
Replace all uses with calendar-date-style.
* lisp/textmodes/remember.el (calendar-date-style): Declare.
(remember-diary-convert-entry):
No longer consult european-calendar-style.
* test/automated/icalendar-tests.el (icalendar--calendar-style):
Remove test, no longer relevant.
2014-10-06 02:02:04 +00:00
|
|
|
|
'(1 'diary)))
|
2002-11-16 19:17:20 +00:00
|
|
|
|
diary-date-forms)))
|
|
|
|
|
|
2008-03-16 01:27:15 +00:00
|
|
|
|
(defmacro diary-font-lock-keywords-1 (markfunc listfunc feature months symbol)
|
|
|
|
|
"Subroutine of the function `diary-font-lock-keywords'.
|
(diary-sexp-entry-symbol): Rename sexp-diary-entry-symbol.
Keep old name as alias, update users.
(diary-list-entries-hook): Rename list-diary-entries-hook.
Keep old name as alias, update users.
(diary-mark-entries-hook): Rename mark-diary-entries-hook.
Keep old name as alias, update users.
(diary-nongregorian-listing-hook): Rename nongregorian-diary-listing-hook.
Keep old name as alias, update users.
(diary-nongregorian-marking-hook): Rename nongregorian-diary-marking-hook.
Keep old name as alias, update users.
(diary-print-entries-hook): Rename print-diary-entries-hook.
Keep old name as alias, update users.
(diary-abbreviated-year-flag): Rename abbreviated-calendar-year.
Keep old name as alias, update users.
(diary-number-of-entries): Rename number-of-diary-entries.
Keep old name as alias, update users.
(view-diary-entries, list-diary-entries, show-all-diary-entries):
Give version of obsolescence.
(diary-view-other-diary-entries): Rename view-other-diary-entries.
Keep old name as alias, update callers.
(diary-add-to-list): Rename add-to-diary-list. Keep old name as alias,
update callers.
(diary-include-other-diary-files): Rename include-other-diary-files.
Keep old name as alias, update callers.
(diary-simple-display): Rename simple-diary-display. Keep old name as alias,
update callers.
(diary-fancy-display): Rename fancy-diary-display. Keep old name as alias,
update callers.
(diary-print-entries): Rename print-diary-entries. Keep old name as alias,
update callers.
(diary-marking-entries-flag): Rename marking-diary-entries. Update users.
(diary-marking-entry-flag): Rename marking-diary-entry. Update users.
(diary-mark-entries): Rename mark-diary-entries. Keep old name as alias,
update callers.
(diary-mark-sexp-entries): Rename mark-sexp-diary-entries.
Keep old name as alias, update callers.
(diary-mark-included-diary-files): Rename mark-included-diary-files.
Keep old name as alias, update callers.
(calendar-mark-days-named): Rename mark-calendar-days-named.
Keep old name as alias, update callers.
(calendar-mark-month): Rename mark-calendar-month. Keep old name as alias,
update callers.
(calendar-mark-date-pattern): Rename mark-calendar-date-pattern.
Keep old name as alias, update callers.
(diary-sort-entries): Rename sort-diary-entries. Keep old name as alias,
update callers.
(diary-list-sexp-entries): Rename list-sexp-diary-entries.
Keep old name as alias, update callers.
(diary-make-entry): Rename make-diary-entry. Keep old name as alias,
update callers.
(diary-insert-entry): Rename insert-diary-entry. Keep old name as alias.
(diary-insert-weekly-entry): Rename insert-weekly-diary-entry.
Keep old name as alias.
(diary-insert-monthly-entry): Rename insert-monthly-diary-entry.
Keep old name as alias.
(diary-insert-yearly-entry): Rename insert-yearly-diary-entry.
Keep old name as alias.
(diary-insert-anniversary-entry): Rename insert-anniversary-diary-entry.
Keep old name as alias.
(diary-insert-block-entry): Rename insert-block-diary-entry.
Keep old name as alias.
(diary-insert-cyclic-entry): Rename insert-cyclic-diary-entry.
Keep old name as alias.
(diary-fancy-font-lock-keywords): Rename fancy-diary-font-lock-keywords.
Keep old name as alias, update users.
(diary-fancy-display-mode): Rename fancy-diary-display-mode.
Keep old name as alias, update callers.
2008-04-06 20:53:14 +00:00
|
|
|
|
If MARKFUNC is a member of `diary-nongregorian-marking-hook', or
|
2008-11-30 01:01:18 +00:00
|
|
|
|
LISTFUNC of `diary-nongregorian-listing-hook', then require FEATURE and
|
|
|
|
|
return a font-lock pattern matching array of MONTHS and marking SYMBOL."
|
(diary-sexp-entry-symbol): Rename sexp-diary-entry-symbol.
Keep old name as alias, update users.
(diary-list-entries-hook): Rename list-diary-entries-hook.
Keep old name as alias, update users.
(diary-mark-entries-hook): Rename mark-diary-entries-hook.
Keep old name as alias, update users.
(diary-nongregorian-listing-hook): Rename nongregorian-diary-listing-hook.
Keep old name as alias, update users.
(diary-nongregorian-marking-hook): Rename nongregorian-diary-marking-hook.
Keep old name as alias, update users.
(diary-print-entries-hook): Rename print-diary-entries-hook.
Keep old name as alias, update users.
(diary-abbreviated-year-flag): Rename abbreviated-calendar-year.
Keep old name as alias, update users.
(diary-number-of-entries): Rename number-of-diary-entries.
Keep old name as alias, update users.
(view-diary-entries, list-diary-entries, show-all-diary-entries):
Give version of obsolescence.
(diary-view-other-diary-entries): Rename view-other-diary-entries.
Keep old name as alias, update callers.
(diary-add-to-list): Rename add-to-diary-list. Keep old name as alias,
update callers.
(diary-include-other-diary-files): Rename include-other-diary-files.
Keep old name as alias, update callers.
(diary-simple-display): Rename simple-diary-display. Keep old name as alias,
update callers.
(diary-fancy-display): Rename fancy-diary-display. Keep old name as alias,
update callers.
(diary-print-entries): Rename print-diary-entries. Keep old name as alias,
update callers.
(diary-marking-entries-flag): Rename marking-diary-entries. Update users.
(diary-marking-entry-flag): Rename marking-diary-entry. Update users.
(diary-mark-entries): Rename mark-diary-entries. Keep old name as alias,
update callers.
(diary-mark-sexp-entries): Rename mark-sexp-diary-entries.
Keep old name as alias, update callers.
(diary-mark-included-diary-files): Rename mark-included-diary-files.
Keep old name as alias, update callers.
(calendar-mark-days-named): Rename mark-calendar-days-named.
Keep old name as alias, update callers.
(calendar-mark-month): Rename mark-calendar-month. Keep old name as alias,
update callers.
(calendar-mark-date-pattern): Rename mark-calendar-date-pattern.
Keep old name as alias, update callers.
(diary-sort-entries): Rename sort-diary-entries. Keep old name as alias,
update callers.
(diary-list-sexp-entries): Rename list-sexp-diary-entries.
Keep old name as alias, update callers.
(diary-make-entry): Rename make-diary-entry. Keep old name as alias,
update callers.
(diary-insert-entry): Rename insert-diary-entry. Keep old name as alias.
(diary-insert-weekly-entry): Rename insert-weekly-diary-entry.
Keep old name as alias.
(diary-insert-monthly-entry): Rename insert-monthly-diary-entry.
Keep old name as alias.
(diary-insert-yearly-entry): Rename insert-yearly-diary-entry.
Keep old name as alias.
(diary-insert-anniversary-entry): Rename insert-anniversary-diary-entry.
Keep old name as alias.
(diary-insert-block-entry): Rename insert-block-diary-entry.
Keep old name as alias.
(diary-insert-cyclic-entry): Rename insert-cyclic-diary-entry.
Keep old name as alias.
(diary-fancy-font-lock-keywords): Rename fancy-diary-font-lock-keywords.
Keep old name as alias, update users.
(diary-fancy-display-mode): Rename fancy-diary-display-mode.
Keep old name as alias, update callers.
2008-04-06 20:53:14 +00:00
|
|
|
|
`(when (or (memq ',markfunc diary-nongregorian-marking-hook)
|
|
|
|
|
(memq ',listfunc diary-nongregorian-listing-hook))
|
2008-03-16 01:27:15 +00:00
|
|
|
|
(require ',feature)
|
|
|
|
|
(diary-font-lock-date-forms ,months ,symbol)))
|
|
|
|
|
|
2008-03-17 02:33:49 +00:00
|
|
|
|
(defconst diary-time-regexp
|
|
|
|
|
;; Accepted formats: 10:00 10.00 10h00 10h 10am 10:00am 10.00am
|
|
|
|
|
;; Use of "." as a separator annoyingly matches numbers, eg "123.45".
|
|
|
|
|
;; Hence often prefix this with "\\(^\\|\\s-\\)."
|
|
|
|
|
(concat "[0-9]?[0-9]\\([AaPp][mM]\\|\\("
|
|
|
|
|
"[Hh]\\([0-9][0-9]\\)?\\|[:.][0-9][0-9]"
|
|
|
|
|
"\\)\\([AaPp][Mm]\\)?\\)")
|
|
|
|
|
"Regular expression matching a time of day.")
|
|
|
|
|
|
Move defcustoms to start.
(diary-include-string, diary-list-include-blanks)
(diary-glob-file-regexp-prefix, diary-face, diary-face-attrs)
(diary-file-name-prefix, diary-file-name-prefix-function)
(sexp-diary-entry-symbol, list-diary-entries-hook)
(mark-diary-entries-hook, nongregorian-diary-listing-hook)
(nongregorian-diary-marking-hook, print-diary-entries-hook):
Move here from calendar.el.
(diary-face): Make it a defcustom, and mark as obsolete.
(top-level): No need to require cal-hebrew, cal-islam when compiling.
(calendar-hebrew-month-name-array-leap-year)
(calendar-islamic-month-name-array, calendar-bahai-month-name-array):
Define for compiler.
(diary-font-lock-keywords): Use format rather than concat. Add
bahai-diary-entry-symbol.
2008-03-08 03:47:36 +00:00
|
|
|
|
(defvar calendar-hebrew-month-name-array-leap-year)
|
|
|
|
|
(defvar calendar-islamic-month-name-array)
|
|
|
|
|
(defvar calendar-bahai-month-name-array)
|
2014-05-04 23:49:33 +00:00
|
|
|
|
(defvar calendar-chinese-month-name-array)
|
2003-08-03 14:00:56 +00:00
|
|
|
|
|
2008-03-13 05:54:57 +00:00
|
|
|
|
;;;###cal-autoload
|
2007-04-07 21:53:17 +00:00
|
|
|
|
(defun diary-font-lock-keywords ()
|
|
|
|
|
"Return a value for the variable `diary-font-lock-keywords'."
|
|
|
|
|
(append
|
|
|
|
|
(diary-font-lock-date-forms calendar-month-name-array
|
|
|
|
|
nil calendar-month-abbrev-array)
|
2008-04-05 20:58:26 +00:00
|
|
|
|
(diary-font-lock-keywords-1 diary-hebrew-mark-entries
|
|
|
|
|
diary-hebrew-list-entries
|
2008-03-16 01:27:15 +00:00
|
|
|
|
cal-hebrew
|
|
|
|
|
calendar-hebrew-month-name-array-leap-year
|
2008-04-05 20:20:38 +00:00
|
|
|
|
diary-hebrew-entry-symbol)
|
2008-04-04 07:33:26 +00:00
|
|
|
|
(diary-font-lock-keywords-1 diary-islamic-mark-entries
|
|
|
|
|
diary-islamic-list-entries
|
2008-03-16 01:27:15 +00:00
|
|
|
|
cal-islam
|
|
|
|
|
calendar-islamic-month-name-array
|
2008-04-05 20:20:38 +00:00
|
|
|
|
diary-islamic-entry-symbol)
|
2008-03-16 01:27:15 +00:00
|
|
|
|
(diary-font-lock-keywords-1 diary-bahai-mark-entries
|
|
|
|
|
diary-bahai-list-entries
|
|
|
|
|
cal-bahai
|
|
|
|
|
calendar-bahai-month-name-array
|
2008-04-05 20:20:38 +00:00
|
|
|
|
diary-bahai-entry-symbol)
|
2014-05-04 00:16:58 +00:00
|
|
|
|
(diary-font-lock-keywords-1 diary-chinese-mark-entries
|
|
|
|
|
diary-chinese-list-entries
|
|
|
|
|
cal-china
|
|
|
|
|
calendar-chinese-month-name-array
|
|
|
|
|
diary-chinese-entry-symbol)
|
2007-04-07 21:53:17 +00:00
|
|
|
|
(list
|
|
|
|
|
(cons
|
Move defcustoms to start.
(diary-include-string, diary-list-include-blanks)
(diary-glob-file-regexp-prefix, diary-face, diary-face-attrs)
(diary-file-name-prefix, diary-file-name-prefix-function)
(sexp-diary-entry-symbol, list-diary-entries-hook)
(mark-diary-entries-hook, nongregorian-diary-listing-hook)
(nongregorian-diary-marking-hook, print-diary-entries-hook):
Move here from calendar.el.
(diary-face): Make it a defcustom, and mark as obsolete.
(top-level): No need to require cal-hebrew, cal-islam when compiling.
(calendar-hebrew-month-name-array-leap-year)
(calendar-islamic-month-name-array, calendar-bahai-month-name-array):
Define for compiler.
(diary-font-lock-keywords): Use format rather than concat. Add
bahai-diary-entry-symbol.
2008-03-08 03:47:36 +00:00
|
|
|
|
(format "^%s.*$" (regexp-quote diary-include-string))
|
2007-04-07 21:53:17 +00:00
|
|
|
|
'font-lock-keyword-face)
|
|
|
|
|
(cons
|
Move defcustoms to start.
(diary-include-string, diary-list-include-blanks)
(diary-glob-file-regexp-prefix, diary-face, diary-face-attrs)
(diary-file-name-prefix, diary-file-name-prefix-function)
(sexp-diary-entry-symbol, list-diary-entries-hook)
(mark-diary-entries-hook, nongregorian-diary-listing-hook)
(nongregorian-diary-marking-hook, print-diary-entries-hook):
Move here from calendar.el.
(diary-face): Make it a defcustom, and mark as obsolete.
(top-level): No need to require cal-hebrew, cal-islam when compiling.
(calendar-hebrew-month-name-array-leap-year)
(calendar-islamic-month-name-array, calendar-bahai-month-name-array):
Define for compiler.
(diary-font-lock-keywords): Use format rather than concat. Add
bahai-diary-entry-symbol.
2008-03-08 03:47:36 +00:00
|
|
|
|
(format "^%s?\\(%s\\)" (regexp-quote diary-nonmarking-symbol)
|
(diary-sexp-entry-symbol): Rename sexp-diary-entry-symbol.
Keep old name as alias, update users.
(diary-list-entries-hook): Rename list-diary-entries-hook.
Keep old name as alias, update users.
(diary-mark-entries-hook): Rename mark-diary-entries-hook.
Keep old name as alias, update users.
(diary-nongregorian-listing-hook): Rename nongregorian-diary-listing-hook.
Keep old name as alias, update users.
(diary-nongregorian-marking-hook): Rename nongregorian-diary-marking-hook.
Keep old name as alias, update users.
(diary-print-entries-hook): Rename print-diary-entries-hook.
Keep old name as alias, update users.
(diary-abbreviated-year-flag): Rename abbreviated-calendar-year.
Keep old name as alias, update users.
(diary-number-of-entries): Rename number-of-diary-entries.
Keep old name as alias, update users.
(view-diary-entries, list-diary-entries, show-all-diary-entries):
Give version of obsolescence.
(diary-view-other-diary-entries): Rename view-other-diary-entries.
Keep old name as alias, update callers.
(diary-add-to-list): Rename add-to-diary-list. Keep old name as alias,
update callers.
(diary-include-other-diary-files): Rename include-other-diary-files.
Keep old name as alias, update callers.
(diary-simple-display): Rename simple-diary-display. Keep old name as alias,
update callers.
(diary-fancy-display): Rename fancy-diary-display. Keep old name as alias,
update callers.
(diary-print-entries): Rename print-diary-entries. Keep old name as alias,
update callers.
(diary-marking-entries-flag): Rename marking-diary-entries. Update users.
(diary-marking-entry-flag): Rename marking-diary-entry. Update users.
(diary-mark-entries): Rename mark-diary-entries. Keep old name as alias,
update callers.
(diary-mark-sexp-entries): Rename mark-sexp-diary-entries.
Keep old name as alias, update callers.
(diary-mark-included-diary-files): Rename mark-included-diary-files.
Keep old name as alias, update callers.
(calendar-mark-days-named): Rename mark-calendar-days-named.
Keep old name as alias, update callers.
(calendar-mark-month): Rename mark-calendar-month. Keep old name as alias,
update callers.
(calendar-mark-date-pattern): Rename mark-calendar-date-pattern.
Keep old name as alias, update callers.
(diary-sort-entries): Rename sort-diary-entries. Keep old name as alias,
update callers.
(diary-list-sexp-entries): Rename list-sexp-diary-entries.
Keep old name as alias, update callers.
(diary-make-entry): Rename make-diary-entry. Keep old name as alias,
update callers.
(diary-insert-entry): Rename insert-diary-entry. Keep old name as alias.
(diary-insert-weekly-entry): Rename insert-weekly-diary-entry.
Keep old name as alias.
(diary-insert-monthly-entry): Rename insert-monthly-diary-entry.
Keep old name as alias.
(diary-insert-yearly-entry): Rename insert-yearly-diary-entry.
Keep old name as alias.
(diary-insert-anniversary-entry): Rename insert-anniversary-diary-entry.
Keep old name as alias.
(diary-insert-block-entry): Rename insert-block-diary-entry.
Keep old name as alias.
(diary-insert-cyclic-entry): Rename insert-cyclic-diary-entry.
Keep old name as alias.
(diary-fancy-font-lock-keywords): Rename fancy-diary-font-lock-keywords.
Keep old name as alias, update users.
(diary-fancy-display-mode): Rename fancy-diary-display-mode.
Keep old name as alias, update callers.
2008-04-06 20:53:14 +00:00
|
|
|
|
(regexp-quote diary-sexp-entry-symbol))
|
2012-09-24 11:39:33 +00:00
|
|
|
|
'(1 font-lock-constant-face))
|
2007-04-07 21:53:17 +00:00
|
|
|
|
(cons
|
Move defcustoms to start.
(diary-include-string, diary-list-include-blanks)
(diary-glob-file-regexp-prefix, diary-face, diary-face-attrs)
(diary-file-name-prefix, diary-file-name-prefix-function)
(sexp-diary-entry-symbol, list-diary-entries-hook)
(mark-diary-entries-hook, nongregorian-diary-listing-hook)
(nongregorian-diary-marking-hook, print-diary-entries-hook):
Move here from calendar.el.
(diary-face): Make it a defcustom, and mark as obsolete.
(top-level): No need to require cal-hebrew, cal-islam when compiling.
(calendar-hebrew-month-name-array-leap-year)
(calendar-islamic-month-name-array, calendar-bahai-month-name-array):
Define for compiler.
(diary-font-lock-keywords): Use format rather than concat. Add
bahai-diary-entry-symbol.
2008-03-08 03:47:36 +00:00
|
|
|
|
(format "^%s" (regexp-quote diary-nonmarking-symbol))
|
2012-09-24 11:39:33 +00:00
|
|
|
|
'font-lock-constant-face)
|
2007-04-07 21:53:17 +00:00
|
|
|
|
(cons
|
Move defcustoms to start.
(diary-include-string, diary-list-include-blanks)
(diary-glob-file-regexp-prefix, diary-face, diary-face-attrs)
(diary-file-name-prefix, diary-file-name-prefix-function)
(sexp-diary-entry-symbol, list-diary-entries-hook)
(mark-diary-entries-hook, nongregorian-diary-listing-hook)
(nongregorian-diary-marking-hook, print-diary-entries-hook):
Move here from calendar.el.
(diary-face): Make it a defcustom, and mark as obsolete.
(top-level): No need to require cal-hebrew, cal-islam when compiling.
(calendar-hebrew-month-name-array-leap-year)
(calendar-islamic-month-name-array, calendar-bahai-month-name-array):
Define for compiler.
(diary-font-lock-keywords): Use format rather than concat. Add
bahai-diary-entry-symbol.
2008-03-08 03:47:36 +00:00
|
|
|
|
(format "^%s?%s" (regexp-quote diary-nonmarking-symbol)
|
2017-12-04 22:03:32 +00:00
|
|
|
|
(regexp-opt (mapcar #'regexp-quote
|
2008-04-05 20:20:38 +00:00
|
|
|
|
(list diary-hebrew-entry-symbol
|
|
|
|
|
diary-islamic-entry-symbol
|
2014-05-04 00:16:58 +00:00
|
|
|
|
diary-bahai-entry-symbol
|
|
|
|
|
diary-chinese-entry-symbol))
|
2008-03-13 06:29:28 +00:00
|
|
|
|
t))
|
2012-09-24 11:39:33 +00:00
|
|
|
|
'(1 font-lock-constant-face))
|
2007-04-07 21:53:17 +00:00
|
|
|
|
'(diary-font-lock-sexps . font-lock-keyword-face)
|
2011-02-04 03:23:55 +00:00
|
|
|
|
;; Don't need to worry about space around "-" because the first
|
|
|
|
|
;; match takes care of that. It does mean the "-" itself may or
|
|
|
|
|
;; may not be fontified though.
|
|
|
|
|
;; diary-date-forms often include a final character that is not
|
|
|
|
|
;; part of the date (eg a non-digit to mark the end of the year).
|
|
|
|
|
;; This can use up the only space char between a date and time (b#7891).
|
|
|
|
|
;; Hence we use OVERRIDE, which can only override whitespace.
|
|
|
|
|
;; FIXME it's probably better to tighten up the diary-time-regexp
|
|
|
|
|
;; and drop the whitespace requirement below.
|
Move defcustoms to start.
(diary-include-string, diary-list-include-blanks)
(diary-glob-file-regexp-prefix, diary-face, diary-face-attrs)
(diary-file-name-prefix, diary-file-name-prefix-function)
(sexp-diary-entry-symbol, list-diary-entries-hook)
(mark-diary-entries-hook, nongregorian-diary-listing-hook)
(nongregorian-diary-marking-hook, print-diary-entries-hook):
Move here from calendar.el.
(diary-face): Make it a defcustom, and mark as obsolete.
(top-level): No need to require cal-hebrew, cal-islam when compiling.
(calendar-hebrew-month-name-array-leap-year)
(calendar-islamic-month-name-array, calendar-bahai-month-name-array):
Define for compiler.
(diary-font-lock-keywords): Use format rather than concat. Add
bahai-diary-entry-symbol.
2008-03-08 03:47:36 +00:00
|
|
|
|
`(,(format "\\(^\\|\\s-\\)%s\\(-%s\\)?" diary-time-regexp
|
2008-03-13 06:29:28 +00:00
|
|
|
|
diary-time-regexp)
|
2011-02-04 03:23:55 +00:00
|
|
|
|
. (0 'diary-time t)))))
|
|
|
|
|
; . 'diary-time))))
|
2007-04-07 21:53:17 +00:00
|
|
|
|
|
|
|
|
|
(defvar diary-font-lock-keywords (diary-font-lock-keywords)
|
|
|
|
|
"Forms to highlight in `diary-mode'.")
|
2002-11-16 19:17:20 +00:00
|
|
|
|
|
2008-03-17 02:33:49 +00:00
|
|
|
|
;;;###autoload
|
|
|
|
|
(define-derived-mode diary-mode fundamental-mode "Diary"
|
|
|
|
|
"Major mode for editing the diary file."
|
2020-12-07 15:45:46 +00:00
|
|
|
|
(setq-local font-lock-defaults '(diary-font-lock-keywords t))
|
|
|
|
|
(setq-local comment-start diary-comment-start)
|
|
|
|
|
(setq-local comment-end diary-comment-end)
|
2008-03-17 02:33:49 +00:00
|
|
|
|
(add-to-invisibility-spec '(diary . nil))
|
2017-12-04 22:03:32 +00:00
|
|
|
|
(add-hook 'after-save-hook #'diary-redraw-calendar nil t)
|
2011-01-10 23:31:47 +00:00
|
|
|
|
;; In case the file was modified externally, refresh the calendar
|
|
|
|
|
;; after refreshing the diary buffer.
|
2017-12-04 22:03:32 +00:00
|
|
|
|
(add-hook 'after-revert-hook #'diary-redraw-calendar nil t)
|
2008-03-17 02:33:49 +00:00
|
|
|
|
(if diary-header-line-flag
|
|
|
|
|
(setq header-line-format diary-header-line-format)))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;;; Fancy Diary Mode.
|
|
|
|
|
|
2011-05-04 02:06:28 +00:00
|
|
|
|
(defun diary-fancy-date-pattern ()
|
|
|
|
|
"Return a regexp matching the first line of a fancy diary date header.
|
|
|
|
|
This depends on the calendar date style."
|
2020-10-13 02:10:43 +00:00
|
|
|
|
(declare (obsolete nil "28.1"))
|
2008-03-17 02:33:49 +00:00
|
|
|
|
(concat
|
2017-12-04 22:03:32 +00:00
|
|
|
|
(calendar-dlet*
|
|
|
|
|
((dayname (diary-name-pattern calendar-day-name-array nil t))
|
|
|
|
|
(monthname (diary-name-pattern calendar-month-name-array nil t))
|
|
|
|
|
(day "1")
|
|
|
|
|
(month "2")
|
|
|
|
|
;; FIXME? This used to be "-?[0-9]+" - what was the "-?" for?
|
|
|
|
|
(year "3"))
|
2011-05-04 02:03:30 +00:00
|
|
|
|
;; This is ugly. c-d-d-form expects `day' etc to be "numbers in
|
|
|
|
|
;; string form"; eg the iso version calls string-to-number on some.
|
|
|
|
|
;; Therefore we cannot eg just let day = "[0-9]+". (Bug#8583).
|
|
|
|
|
;; Assumes no integers in c-day/month-name-array.
|
|
|
|
|
(replace-regexp-in-string "[0-9]+" "[0-9]+"
|
2017-12-04 22:03:32 +00:00
|
|
|
|
(mapconcat #'eval calendar-date-display-form "")
|
2011-05-04 02:03:30 +00:00
|
|
|
|
nil t))
|
2008-03-17 02:33:49 +00:00
|
|
|
|
;; Optional ": holiday name" after the date.
|
2011-05-04 02:06:28 +00:00
|
|
|
|
"\\(: .*\\)?"))
|
|
|
|
|
|
|
|
|
|
(defun diary-fancy-date-matcher (limit)
|
|
|
|
|
"Search for a fancy diary data header, up to LIMIT."
|
2020-10-13 02:10:43 +00:00
|
|
|
|
(declare (obsolete nil "28.1"))
|
2011-05-04 02:06:28 +00:00
|
|
|
|
;; Any number of " other holiday name" lines, followed by "==" line.
|
2020-10-13 02:10:43 +00:00
|
|
|
|
(with-suppressed-warnings ((obsolete diary-fancy-date-pattern))
|
|
|
|
|
(when (re-search-forward
|
|
|
|
|
(format "%s\\(\n +.*\\)*\n=+$" (diary-fancy-date-pattern)) limit t)
|
|
|
|
|
(put-text-property (match-beginning 0) (match-end 0)
|
|
|
|
|
'font-lock-multiline t)
|
|
|
|
|
t)))
|
2008-03-17 02:33:49 +00:00
|
|
|
|
|
(diary-sexp-entry-symbol): Rename sexp-diary-entry-symbol.
Keep old name as alias, update users.
(diary-list-entries-hook): Rename list-diary-entries-hook.
Keep old name as alias, update users.
(diary-mark-entries-hook): Rename mark-diary-entries-hook.
Keep old name as alias, update users.
(diary-nongregorian-listing-hook): Rename nongregorian-diary-listing-hook.
Keep old name as alias, update users.
(diary-nongregorian-marking-hook): Rename nongregorian-diary-marking-hook.
Keep old name as alias, update users.
(diary-print-entries-hook): Rename print-diary-entries-hook.
Keep old name as alias, update users.
(diary-abbreviated-year-flag): Rename abbreviated-calendar-year.
Keep old name as alias, update users.
(diary-number-of-entries): Rename number-of-diary-entries.
Keep old name as alias, update users.
(view-diary-entries, list-diary-entries, show-all-diary-entries):
Give version of obsolescence.
(diary-view-other-diary-entries): Rename view-other-diary-entries.
Keep old name as alias, update callers.
(diary-add-to-list): Rename add-to-diary-list. Keep old name as alias,
update callers.
(diary-include-other-diary-files): Rename include-other-diary-files.
Keep old name as alias, update callers.
(diary-simple-display): Rename simple-diary-display. Keep old name as alias,
update callers.
(diary-fancy-display): Rename fancy-diary-display. Keep old name as alias,
update callers.
(diary-print-entries): Rename print-diary-entries. Keep old name as alias,
update callers.
(diary-marking-entries-flag): Rename marking-diary-entries. Update users.
(diary-marking-entry-flag): Rename marking-diary-entry. Update users.
(diary-mark-entries): Rename mark-diary-entries. Keep old name as alias,
update callers.
(diary-mark-sexp-entries): Rename mark-sexp-diary-entries.
Keep old name as alias, update callers.
(diary-mark-included-diary-files): Rename mark-included-diary-files.
Keep old name as alias, update callers.
(calendar-mark-days-named): Rename mark-calendar-days-named.
Keep old name as alias, update callers.
(calendar-mark-month): Rename mark-calendar-month. Keep old name as alias,
update callers.
(calendar-mark-date-pattern): Rename mark-calendar-date-pattern.
Keep old name as alias, update callers.
(diary-sort-entries): Rename sort-diary-entries. Keep old name as alias,
update callers.
(diary-list-sexp-entries): Rename list-sexp-diary-entries.
Keep old name as alias, update callers.
(diary-make-entry): Rename make-diary-entry. Keep old name as alias,
update callers.
(diary-insert-entry): Rename insert-diary-entry. Keep old name as alias.
(diary-insert-weekly-entry): Rename insert-weekly-diary-entry.
Keep old name as alias.
(diary-insert-monthly-entry): Rename insert-monthly-diary-entry.
Keep old name as alias.
(diary-insert-yearly-entry): Rename insert-yearly-diary-entry.
Keep old name as alias.
(diary-insert-anniversary-entry): Rename insert-anniversary-diary-entry.
Keep old name as alias.
(diary-insert-block-entry): Rename insert-block-diary-entry.
Keep old name as alias.
(diary-insert-cyclic-entry): Rename insert-cyclic-diary-entry.
Keep old name as alias.
(diary-fancy-font-lock-keywords): Rename fancy-diary-font-lock-keywords.
Keep old name as alias, update users.
(diary-fancy-display-mode): Rename fancy-diary-display-mode.
Keep old name as alias, update callers.
2008-04-06 20:53:14 +00:00
|
|
|
|
(defvar diary-fancy-font-lock-keywords
|
2020-10-13 02:10:43 +00:00
|
|
|
|
`(("^.*\\([aA]nniversary\\|[bB]irthday\\).*$" . 'diary-anniversary)
|
2012-09-24 11:39:33 +00:00
|
|
|
|
("^.*Yahrzeit.*$" . font-lock-constant-face)
|
2011-05-04 02:06:28 +00:00
|
|
|
|
("^\\(Erev \\)?Rosh Hodesh.*" . font-lock-function-name-face)
|
|
|
|
|
("^Day.*omer.*$" . font-lock-builtin-face)
|
|
|
|
|
("^Parashat.*$" . font-lock-comment-face)
|
|
|
|
|
(,(format "\\(^\\|\\s-\\)%s\\(-%s\\)?" diary-time-regexp
|
2017-12-04 22:03:32 +00:00
|
|
|
|
diary-time-regexp)
|
|
|
|
|
. 'diary-time))
|
2008-03-17 02:33:49 +00:00
|
|
|
|
"Keywords to highlight in fancy diary display.")
|
|
|
|
|
|
|
|
|
|
;; If region looks like it might start or end in the middle of a
|
|
|
|
|
;; multiline pattern, extend the region to encompass the whole pattern.
|
|
|
|
|
(defun diary-fancy-font-lock-fontify-region-function (beg end &optional verbose)
|
|
|
|
|
"Function to use for `font-lock-fontify-region-function' in Fancy Diary.
|
(diary-sexp-entry-symbol): Rename sexp-diary-entry-symbol.
Keep old name as alias, update users.
(diary-list-entries-hook): Rename list-diary-entries-hook.
Keep old name as alias, update users.
(diary-mark-entries-hook): Rename mark-diary-entries-hook.
Keep old name as alias, update users.
(diary-nongregorian-listing-hook): Rename nongregorian-diary-listing-hook.
Keep old name as alias, update users.
(diary-nongregorian-marking-hook): Rename nongregorian-diary-marking-hook.
Keep old name as alias, update users.
(diary-print-entries-hook): Rename print-diary-entries-hook.
Keep old name as alias, update users.
(diary-abbreviated-year-flag): Rename abbreviated-calendar-year.
Keep old name as alias, update users.
(diary-number-of-entries): Rename number-of-diary-entries.
Keep old name as alias, update users.
(view-diary-entries, list-diary-entries, show-all-diary-entries):
Give version of obsolescence.
(diary-view-other-diary-entries): Rename view-other-diary-entries.
Keep old name as alias, update callers.
(diary-add-to-list): Rename add-to-diary-list. Keep old name as alias,
update callers.
(diary-include-other-diary-files): Rename include-other-diary-files.
Keep old name as alias, update callers.
(diary-simple-display): Rename simple-diary-display. Keep old name as alias,
update callers.
(diary-fancy-display): Rename fancy-diary-display. Keep old name as alias,
update callers.
(diary-print-entries): Rename print-diary-entries. Keep old name as alias,
update callers.
(diary-marking-entries-flag): Rename marking-diary-entries. Update users.
(diary-marking-entry-flag): Rename marking-diary-entry. Update users.
(diary-mark-entries): Rename mark-diary-entries. Keep old name as alias,
update callers.
(diary-mark-sexp-entries): Rename mark-sexp-diary-entries.
Keep old name as alias, update callers.
(diary-mark-included-diary-files): Rename mark-included-diary-files.
Keep old name as alias, update callers.
(calendar-mark-days-named): Rename mark-calendar-days-named.
Keep old name as alias, update callers.
(calendar-mark-month): Rename mark-calendar-month. Keep old name as alias,
update callers.
(calendar-mark-date-pattern): Rename mark-calendar-date-pattern.
Keep old name as alias, update callers.
(diary-sort-entries): Rename sort-diary-entries. Keep old name as alias,
update callers.
(diary-list-sexp-entries): Rename list-sexp-diary-entries.
Keep old name as alias, update callers.
(diary-make-entry): Rename make-diary-entry. Keep old name as alias,
update callers.
(diary-insert-entry): Rename insert-diary-entry. Keep old name as alias.
(diary-insert-weekly-entry): Rename insert-weekly-diary-entry.
Keep old name as alias.
(diary-insert-monthly-entry): Rename insert-monthly-diary-entry.
Keep old name as alias.
(diary-insert-yearly-entry): Rename insert-yearly-diary-entry.
Keep old name as alias.
(diary-insert-anniversary-entry): Rename insert-anniversary-diary-entry.
Keep old name as alias.
(diary-insert-block-entry): Rename insert-block-diary-entry.
Keep old name as alias.
(diary-insert-cyclic-entry): Rename insert-cyclic-diary-entry.
Keep old name as alias.
(diary-fancy-font-lock-keywords): Rename fancy-diary-font-lock-keywords.
Keep old name as alias, update users.
(diary-fancy-display-mode): Rename fancy-diary-display-mode.
Keep old name as alias, update callers.
2008-04-06 20:53:14 +00:00
|
|
|
|
Needed to handle multiline keyword in `diary-fancy-font-lock-keywords'.
|
2008-03-17 02:33:49 +00:00
|
|
|
|
Fontify the region between BEG and END, quietly unless VERBOSE is non-nil."
|
|
|
|
|
(goto-char beg)
|
|
|
|
|
(forward-line 0)
|
|
|
|
|
(if (looking-at "=+$") (forward-line -1))
|
|
|
|
|
(while (and (looking-at " +[^ ]")
|
|
|
|
|
(zerop (forward-line -1))))
|
|
|
|
|
(goto-char end)
|
|
|
|
|
(forward-line 0)
|
|
|
|
|
(while (and (looking-at " +[^ ]")
|
|
|
|
|
(zerop (forward-line 1))))
|
|
|
|
|
(if (looking-at "=+$")
|
|
|
|
|
(setq end (line-beginning-position 2)))
|
|
|
|
|
(font-lock-default-fontify-region beg end verbose))
|
|
|
|
|
|
2011-02-01 21:22:21 +00:00
|
|
|
|
(defvar diary-fancy-overriding-map (make-sparse-keymap)
|
2009-09-04 02:59:13 +00:00
|
|
|
|
"Keymap overriding minor-mode maps in `diary-fancy-display-mode'.")
|
|
|
|
|
|
2011-02-01 21:22:21 +00:00
|
|
|
|
(define-derived-mode diary-fancy-display-mode special-mode
|
2008-03-17 02:33:49 +00:00
|
|
|
|
"Diary"
|
|
|
|
|
"Major mode used while displaying diary entries using Fancy Display."
|
2020-12-07 15:45:46 +00:00
|
|
|
|
(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)))
|
2009-09-04 02:59:13 +00:00
|
|
|
|
(view-mode 1))
|
2008-03-17 02:33:49 +00:00
|
|
|
|
|
2004-04-30 18:50:08 +00:00
|
|
|
|
;; Following code from Dave Love <fx@gnu.org>.
|
|
|
|
|
;; Import Outlook-format appointments from mail messages in Gnus or
|
|
|
|
|
;; Rmail using command `diary-from-outlook'. This, or the specialized
|
|
|
|
|
;; functions `diary-from-outlook-gnus' and `diary-from-outlook-rmail',
|
|
|
|
|
;; could be run from hooks to notice appointments automatically (in
|
|
|
|
|
;; which case they will prompt about adding to the diary). The
|
2010-11-26 03:10:16 +00:00
|
|
|
|
;; message formats recognized are customizable through `diary-outlook-formats'.
|
2004-04-30 18:50:08 +00:00
|
|
|
|
|
2010-11-26 03:10:16 +00:00
|
|
|
|
(defun diary-from-outlook-internal (subject body &optional test-only)
|
2004-04-30 18:50:08 +00:00
|
|
|
|
"Snarf a diary entry from a message assumed to be from MS Outlook.
|
2010-11-26 03:10:16 +00:00
|
|
|
|
SUBJECT and BODY are strings giving the message subject and body.
|
2004-04-30 18:50:08 +00:00
|
|
|
|
Arg TEST-ONLY non-nil means return non-nil if and only if the
|
|
|
|
|
message contains an appointment, don't make a diary entry."
|
|
|
|
|
(catch 'finished
|
|
|
|
|
(let (format-string)
|
2010-11-26 03:10:16 +00:00
|
|
|
|
(dolist (fmt diary-outlook-formats)
|
|
|
|
|
(when (eq 0 (string-match (car fmt) body))
|
2008-03-13 06:29:28 +00:00
|
|
|
|
(unless test-only
|
2010-11-26 03:10:16 +00:00
|
|
|
|
(setq format-string (cdr fmt))
|
2008-03-13 06:29:28 +00:00
|
|
|
|
(save-excursion
|
|
|
|
|
(save-window-excursion
|
(diary-sexp-entry-symbol): Rename sexp-diary-entry-symbol.
Keep old name as alias, update users.
(diary-list-entries-hook): Rename list-diary-entries-hook.
Keep old name as alias, update users.
(diary-mark-entries-hook): Rename mark-diary-entries-hook.
Keep old name as alias, update users.
(diary-nongregorian-listing-hook): Rename nongregorian-diary-listing-hook.
Keep old name as alias, update users.
(diary-nongregorian-marking-hook): Rename nongregorian-diary-marking-hook.
Keep old name as alias, update users.
(diary-print-entries-hook): Rename print-diary-entries-hook.
Keep old name as alias, update users.
(diary-abbreviated-year-flag): Rename abbreviated-calendar-year.
Keep old name as alias, update users.
(diary-number-of-entries): Rename number-of-diary-entries.
Keep old name as alias, update users.
(view-diary-entries, list-diary-entries, show-all-diary-entries):
Give version of obsolescence.
(diary-view-other-diary-entries): Rename view-other-diary-entries.
Keep old name as alias, update callers.
(diary-add-to-list): Rename add-to-diary-list. Keep old name as alias,
update callers.
(diary-include-other-diary-files): Rename include-other-diary-files.
Keep old name as alias, update callers.
(diary-simple-display): Rename simple-diary-display. Keep old name as alias,
update callers.
(diary-fancy-display): Rename fancy-diary-display. Keep old name as alias,
update callers.
(diary-print-entries): Rename print-diary-entries. Keep old name as alias,
update callers.
(diary-marking-entries-flag): Rename marking-diary-entries. Update users.
(diary-marking-entry-flag): Rename marking-diary-entry. Update users.
(diary-mark-entries): Rename mark-diary-entries. Keep old name as alias,
update callers.
(diary-mark-sexp-entries): Rename mark-sexp-diary-entries.
Keep old name as alias, update callers.
(diary-mark-included-diary-files): Rename mark-included-diary-files.
Keep old name as alias, update callers.
(calendar-mark-days-named): Rename mark-calendar-days-named.
Keep old name as alias, update callers.
(calendar-mark-month): Rename mark-calendar-month. Keep old name as alias,
update callers.
(calendar-mark-date-pattern): Rename mark-calendar-date-pattern.
Keep old name as alias, update callers.
(diary-sort-entries): Rename sort-diary-entries. Keep old name as alias,
update callers.
(diary-list-sexp-entries): Rename list-sexp-diary-entries.
Keep old name as alias, update callers.
(diary-make-entry): Rename make-diary-entry. Keep old name as alias,
update callers.
(diary-insert-entry): Rename insert-diary-entry. Keep old name as alias.
(diary-insert-weekly-entry): Rename insert-weekly-diary-entry.
Keep old name as alias.
(diary-insert-monthly-entry): Rename insert-monthly-diary-entry.
Keep old name as alias.
(diary-insert-yearly-entry): Rename insert-yearly-diary-entry.
Keep old name as alias.
(diary-insert-anniversary-entry): Rename insert-anniversary-diary-entry.
Keep old name as alias.
(diary-insert-block-entry): Rename insert-block-diary-entry.
Keep old name as alias.
(diary-insert-cyclic-entry): Rename insert-cyclic-diary-entry.
Keep old name as alias.
(diary-fancy-font-lock-keywords): Rename fancy-diary-font-lock-keywords.
Keep old name as alias, update users.
(diary-fancy-display-mode): Rename fancy-diary-display-mode.
Keep old name as alias, update callers.
2008-04-06 20:53:14 +00:00
|
|
|
|
(diary-make-entry
|
2008-03-13 06:29:28 +00:00
|
|
|
|
(format (replace-match (if (functionp format-string)
|
|
|
|
|
(funcall format-string body)
|
|
|
|
|
format-string)
|
|
|
|
|
t nil (match-string 0 body))
|
2010-11-26 03:10:16 +00:00
|
|
|
|
subject)))))
|
2008-03-13 06:29:28 +00:00
|
|
|
|
(throw 'finished t))))
|
2004-04-30 18:50:08 +00:00
|
|
|
|
nil))
|
|
|
|
|
|
|
|
|
|
(defvar gnus-article-mime-handles)
|
|
|
|
|
(defvar gnus-article-buffer)
|
|
|
|
|
|
|
|
|
|
(autoload 'gnus-fetch-field "gnus-util")
|
|
|
|
|
(autoload 'gnus-narrow-to-body "gnus")
|
|
|
|
|
(autoload 'mm-get-part "mm-decode")
|
|
|
|
|
|
2004-11-09 17:01:01 +00:00
|
|
|
|
(defun diary-from-outlook-gnus (&optional noconfirm)
|
2004-04-30 18:50:08 +00:00
|
|
|
|
"Maybe snarf diary entry from Outlook-generated message in Gnus.
|
2004-11-09 17:01:01 +00:00
|
|
|
|
Unless the optional argument NOCONFIRM is non-nil (which is the case when
|
2004-11-09 14:51:06 +00:00
|
|
|
|
this function is called interactively), then if an entry is found the
|
|
|
|
|
user is asked to confirm its addition.
|
|
|
|
|
Add this function to `gnus-article-prepare-hook' to notice appointments
|
2004-04-30 18:50:08 +00:00
|
|
|
|
automatically."
|
2004-11-09 14:51:06 +00:00
|
|
|
|
(interactive "p")
|
2004-04-30 18:50:08 +00:00
|
|
|
|
(with-current-buffer gnus-article-buffer
|
|
|
|
|
(let ((subject (gnus-fetch-field "subject"))
|
2008-03-13 06:29:28 +00:00
|
|
|
|
(body (if gnus-article-mime-handles
|
|
|
|
|
;; We're multipart. Don't get confused by part
|
|
|
|
|
;; buttons &c. Assume info is in first part.
|
|
|
|
|
(mm-get-part (nth 1 gnus-article-mime-handles))
|
|
|
|
|
(save-restriction
|
|
|
|
|
(gnus-narrow-to-body)
|
|
|
|
|
(buffer-string)))))
|
2010-11-26 03:10:16 +00:00
|
|
|
|
(when (diary-from-outlook-internal subject body t)
|
2008-03-13 06:29:28 +00:00
|
|
|
|
(when (or noconfirm (y-or-n-p "Snarf diary entry? "))
|
2010-11-26 03:10:16 +00:00
|
|
|
|
(diary-from-outlook-internal subject body)
|
2008-03-13 06:29:28 +00:00
|
|
|
|
(message "Diary entry added"))))))
|
2004-04-30 18:50:08 +00:00
|
|
|
|
|
|
|
|
|
(custom-add-option 'gnus-article-prepare-hook 'diary-from-outlook-gnus)
|
|
|
|
|
|
|
|
|
|
(defvar rmail-buffer)
|
|
|
|
|
|
2004-11-09 17:01:01 +00:00
|
|
|
|
(defun diary-from-outlook-rmail (&optional noconfirm)
|
2004-11-09 14:51:06 +00:00
|
|
|
|
"Maybe snarf diary entry from Outlook-generated message in Rmail.
|
2004-11-09 17:01:01 +00:00
|
|
|
|
Unless the optional argument NOCONFIRM is non-nil (which is the case when
|
2004-11-09 14:51:06 +00:00
|
|
|
|
this function is called interactively), then if an entry is found the
|
|
|
|
|
user is asked to confirm its addition."
|
|
|
|
|
(interactive "p")
|
2010-11-26 03:10:16 +00:00
|
|
|
|
;; FIXME maybe the body needs rmail-mm decoding, in which case
|
|
|
|
|
;; there is no single buffer with both body and subject, sigh.
|
2004-04-30 18:50:08 +00:00
|
|
|
|
(with-current-buffer rmail-buffer
|
|
|
|
|
(let ((subject (mail-fetch-field "subject"))
|
2008-03-13 06:29:28 +00:00
|
|
|
|
(body (buffer-substring (save-excursion
|
|
|
|
|
(rfc822-goto-eoh)
|
|
|
|
|
(point))
|
|
|
|
|
(point-max))))
|
2010-11-26 03:10:16 +00:00
|
|
|
|
(when (diary-from-outlook-internal subject body t)
|
2008-03-13 06:29:28 +00:00
|
|
|
|
(when (or noconfirm (y-or-n-p "Snarf diary entry? "))
|
2010-11-26 03:10:16 +00:00
|
|
|
|
(diary-from-outlook-internal subject body)
|
2008-03-13 06:29:28 +00:00
|
|
|
|
(message "Diary entry added"))))))
|
2004-04-30 18:50:08 +00:00
|
|
|
|
|
2013-05-04 23:55:57 +00:00
|
|
|
|
(defvar diary-from-outlook-function nil
|
|
|
|
|
"If non-nil, a function of one argument for `diary-from-outlook' to call.
|
|
|
|
|
If the current buffer contains an Outlook-style appointment message,
|
|
|
|
|
this function should extract it into a diary entry. If the argument is
|
|
|
|
|
nil, it should ask for confirmation before adding this entry to the diary.
|
|
|
|
|
For examples, see `diary-from-outlook-rmail' and `diary-from-outlook-gnus'.")
|
|
|
|
|
|
2008-03-17 02:33:49 +00:00
|
|
|
|
(defun diary-from-outlook (&optional noconfirm)
|
|
|
|
|
"Maybe snarf diary entry from current Outlook-generated message.
|
2013-05-04 23:55:57 +00:00
|
|
|
|
Uses `diary-from-outlook-function' if that is non-nil, else
|
|
|
|
|
`diary-from-outlook-rmail' for Rmail or `diary-from-outlook-gnus' for Gnus.
|
|
|
|
|
Unless the optional argument NOCONFIRM is non-nil (which is the
|
|
|
|
|
case when this function is called interactively), then if an
|
|
|
|
|
entry is found the user is asked to confirm its addition."
|
2008-03-17 02:33:49 +00:00
|
|
|
|
(interactive "p")
|
|
|
|
|
(let ((func (cond
|
2013-05-04 23:55:57 +00:00
|
|
|
|
(diary-from-outlook-function)
|
2008-03-17 02:33:49 +00:00
|
|
|
|
((eq major-mode 'rmail-mode)
|
|
|
|
|
#'diary-from-outlook-rmail)
|
|
|
|
|
((memq major-mode '(gnus-summary-mode gnus-article-mode))
|
|
|
|
|
#'diary-from-outlook-gnus)
|
Go back to grave quoting in source-code docstrings etc.
This reverts almost all my recent changes to use curved quotes
in docstrings and/or strings used for error diagnostics.
There are a few exceptions, e.g., Bahá’í proper names.
* admin/unidata/unidata-gen.el (unidata-gen-table):
* lisp/abbrev.el (expand-region-abbrevs):
* lisp/align.el (align-region):
* lisp/allout.el (allout-mode, allout-solicit-alternate-bullet)
(outlineify-sticky):
* lisp/apropos.el (apropos-library):
* lisp/bookmark.el (bookmark-default-annotation-text):
* lisp/button.el (button-category-symbol, button-put)
(make-text-button):
* lisp/calc/calc-aent.el (math-read-if, math-read-factor):
* lisp/calc/calc-embed.el (calc-do-embedded):
* lisp/calc/calc-ext.el (calc-user-function-list):
* lisp/calc/calc-graph.el (calc-graph-show-dumb):
* lisp/calc/calc-help.el (calc-describe-key)
(calc-describe-thing, calc-full-help):
* lisp/calc/calc-lang.el (calc-c-language)
(math-parse-fortran-vector-end, math-parse-tex-sum)
(math-parse-eqn-matrix, math-parse-eqn-prime)
(calc-yacas-language, calc-maxima-language, calc-giac-language)
(math-read-giac-subscr, math-read-math-subscr)
(math-read-big-rec, math-read-big-balance):
* lisp/calc/calc-misc.el (calc-help, report-calc-bug):
* lisp/calc/calc-mode.el (calc-auto-why, calc-save-modes)
(calc-auto-recompute):
* lisp/calc/calc-prog.el (calc-fix-token-name)
(calc-read-parse-table-part, calc-user-define-invocation)
(math-do-arg-check):
* lisp/calc/calc-store.el (calc-edit-variable):
* lisp/calc/calc-units.el (math-build-units-table-buffer):
* lisp/calc/calc-vec.el (math-read-brackets):
* lisp/calc/calc-yank.el (calc-edit-mode):
* lisp/calc/calc.el (calc, calc-do, calc-user-invocation):
* lisp/calendar/appt.el (appt-display-message):
* lisp/calendar/diary-lib.el (diary-check-diary-file)
(diary-mail-entries, diary-from-outlook):
* lisp/calendar/icalendar.el (icalendar-export-region)
(icalendar--convert-float-to-ical)
(icalendar--convert-date-to-ical)
(icalendar--convert-ical-to-diary)
(icalendar--convert-recurring-to-diary)
(icalendar--add-diary-entry):
* lisp/calendar/time-date.el (format-seconds):
* lisp/calendar/timeclock.el (timeclock-mode-line-display)
(timeclock-make-hours-explicit, timeclock-log-data):
* lisp/calendar/todo-mode.el (todo-prefix, todo-delete-category)
(todo-item-mark, todo-check-format)
(todo-insert-item--next-param, todo-edit-item--next-key)
(todo-mode):
* lisp/cedet/ede/pmake.el (ede-proj-makefile-insert-dist-rules):
* lisp/cedet/mode-local.el (describe-mode-local-overload)
(mode-local-print-binding, mode-local-describe-bindings-2):
* lisp/cedet/semantic/complete.el (semantic-displayor-show-request):
* lisp/cedet/srecode/srt-mode.el (srecode-macro-help):
* lisp/cus-start.el (standard):
* lisp/cus-theme.el (describe-theme-1):
* lisp/custom.el (custom-add-dependencies, custom-check-theme)
(custom--sort-vars-1, load-theme):
* lisp/descr-text.el (describe-text-properties-1, describe-char):
* lisp/dired-x.el (dired-do-run-mail):
* lisp/dired.el (dired-log):
* lisp/emacs-lisp/advice.el (ad-read-advised-function)
(ad-read-advice-class, ad-read-advice-name, ad-enable-advice)
(ad-disable-advice, ad-remove-advice, ad-set-argument)
(ad-set-arguments, ad--defalias-fset, ad-activate)
(ad-deactivate):
* lisp/emacs-lisp/byte-opt.el (byte-compile-inline-expand)
(byte-compile-unfold-lambda, byte-optimize-form-code-walker)
(byte-optimize-while, byte-optimize-apply):
* lisp/emacs-lisp/byte-run.el (defun, defsubst):
* lisp/emacs-lisp/bytecomp.el (byte-compile-lapcode)
(byte-compile-log-file, byte-compile-format-warn)
(byte-compile-nogroup-warn, byte-compile-arglist-warn)
(byte-compile-cl-warn)
(byte-compile-warn-about-unresolved-functions)
(byte-compile-file, byte-compile--declare-var)
(byte-compile-file-form-defmumble, byte-compile-form)
(byte-compile-normal-call, byte-compile-check-variable)
(byte-compile-variable-ref, byte-compile-variable-set)
(byte-compile-subr-wrong-args, byte-compile-setq-default)
(byte-compile-negation-optimizer)
(byte-compile-condition-case--old)
(byte-compile-condition-case--new, byte-compile-save-excursion)
(byte-compile-defvar, byte-compile-autoload)
(byte-compile-lambda-form)
(byte-compile-make-variable-buffer-local, display-call-tree)
(batch-byte-compile):
* lisp/emacs-lisp/cconv.el (cconv-convert, cconv--analyze-use):
* lisp/emacs-lisp/chart.el (chart-space-usage):
* lisp/emacs-lisp/check-declare.el (check-declare-scan)
(check-declare-warn, check-declare-file)
(check-declare-directory):
* lisp/emacs-lisp/checkdoc.el (checkdoc-this-string-valid-engine)
(checkdoc-message-text-engine):
* lisp/emacs-lisp/cl-extra.el (cl-parse-integer)
(cl--describe-class):
* lisp/emacs-lisp/cl-generic.el (cl-defgeneric)
(cl--generic-describe, cl-generic-generalizers):
* lisp/emacs-lisp/cl-macs.el (cl--parse-loop-clause, cl-tagbody)
(cl-symbol-macrolet):
* lisp/emacs-lisp/cl.el (cl-unload-function, flet):
* lisp/emacs-lisp/copyright.el (copyright)
(copyright-update-directory):
* lisp/emacs-lisp/edebug.el (edebug-read-list):
* lisp/emacs-lisp/eieio-base.el (eieio-persistent-read):
* lisp/emacs-lisp/eieio-core.el (eieio--slot-override)
(eieio-oref):
* lisp/emacs-lisp/eieio-opt.el (eieio-help-constructor):
* lisp/emacs-lisp/eieio-speedbar.el:
(eieio-speedbar-child-make-tag-lines)
(eieio-speedbar-child-description):
* lisp/emacs-lisp/eieio.el (defclass, change-class):
* lisp/emacs-lisp/elint.el (elint-file, elint-get-top-forms)
(elint-init-form, elint-check-defalias-form)
(elint-check-let-form):
* lisp/emacs-lisp/ert.el (ert-get-test, ert-results-mode-menu)
(ert-results-pop-to-backtrace-for-test-at-point)
(ert-results-pop-to-messages-for-test-at-point)
(ert-results-pop-to-should-forms-for-test-at-point)
(ert-describe-test):
* lisp/emacs-lisp/find-func.el (find-function-search-for-symbol)
(find-function-library):
* lisp/emacs-lisp/generator.el (iter-yield):
* lisp/emacs-lisp/gv.el (gv-define-simple-setter):
* lisp/emacs-lisp/lisp-mnt.el (lm-verify):
* lisp/emacs-lisp/macroexp.el (macroexp--obsolete-warning):
* lisp/emacs-lisp/map-ynp.el (map-y-or-n-p):
* lisp/emacs-lisp/nadvice.el (advice--make-docstring)
(advice--make, define-advice):
* lisp/emacs-lisp/package-x.el (package-upload-file):
* lisp/emacs-lisp/package.el (package-version-join)
(package-disabled-p, package-activate-1, package-activate)
(package--download-one-archive)
(package--download-and-read-archives)
(package-compute-transaction, package-install-from-archive)
(package-install, package-install-selected-packages)
(package-delete, package-autoremove, describe-package-1)
(package-install-button-action, package-delete-button-action)
(package-menu-hide-package, package-menu--list-to-prompt)
(package-menu--perform-transaction)
(package-menu--find-and-notify-upgrades):
* lisp/emacs-lisp/pcase.el (pcase-exhaustive, pcase--u1):
* lisp/emacs-lisp/re-builder.el (reb-enter-subexp-mode):
* lisp/emacs-lisp/ring.el (ring-previous, ring-next):
* lisp/emacs-lisp/rx.el (rx-check, rx-anything)
(rx-check-any-string, rx-check-any, rx-check-not, rx-=)
(rx-repeat, rx-check-backref, rx-syntax, rx-check-category)
(rx-form):
* lisp/emacs-lisp/smie.el (smie-config-save):
* lisp/emacs-lisp/subr-x.el (internal--check-binding):
* lisp/emacs-lisp/tabulated-list.el (tabulated-list-put-tag):
* lisp/emacs-lisp/testcover.el (testcover-1value):
* lisp/emacs-lisp/timer.el (timer-event-handler):
* lisp/emulation/viper-cmd.el (viper-toggle-parse-sexp-ignore-comments)
(viper-toggle-search-style, viper-kill-buffer)
(viper-brac-function):
* lisp/emulation/viper-macs.el (viper-record-kbd-macro):
* lisp/env.el (setenv):
* lisp/erc/erc-button.el (erc-nick-popup):
* lisp/erc/erc.el (erc-cmd-LOAD, erc-handle-login, english):
* lisp/eshell/em-dirs.el (eshell/cd):
* lisp/eshell/em-glob.el (eshell-glob-regexp)
(eshell-glob-entries):
* lisp/eshell/em-pred.el (eshell-parse-modifiers):
* lisp/eshell/esh-opt.el (eshell-show-usage):
* lisp/facemenu.el (facemenu-add-new-face)
(facemenu-add-new-color):
* lisp/faces.el (read-face-name, read-face-font, describe-face)
(x-resolve-font-name):
* lisp/files-x.el (modify-file-local-variable):
* lisp/files.el (locate-user-emacs-file, find-alternate-file)
(set-auto-mode, hack-one-local-variable--obsolete)
(dir-locals-set-directory-class, write-file, basic-save-buffer)
(delete-directory, copy-directory, recover-session)
(recover-session-finish, insert-directory)
(file-modes-char-to-who, file-modes-symbolic-to-number)
(move-file-to-trash):
* lisp/filesets.el (filesets-add-buffer, filesets-remove-buffer):
* lisp/find-cmd.el (find-generic, find-to-string):
* lisp/finder.el (finder-commentary):
* lisp/font-lock.el (font-lock-fontify-buffer):
* lisp/format.el (format-write-file, format-find-file)
(format-insert-file):
* lisp/frame.el (get-device-terminal, select-frame-by-name):
* lisp/fringe.el (fringe--check-style):
* lisp/gnus/nnmairix.el (nnmairix-widget-create-query):
* lisp/help-fns.el (help-fns--key-bindings)
(help-fns--compiler-macro, help-fns--parent-mode)
(help-fns--obsolete, help-fns--interactive-only)
(describe-function-1, describe-variable):
* lisp/help.el (describe-mode)
(describe-minor-mode-from-indicator):
* lisp/image.el (image-type):
* lisp/international/ccl.el (ccl-dump):
* lisp/international/fontset.el (x-must-resolve-font-name):
* lisp/international/mule-cmds.el (prefer-coding-system)
(select-safe-coding-system-interactively)
(select-safe-coding-system, activate-input-method)
(toggle-input-method, describe-current-input-method)
(describe-language-environment):
* lisp/international/mule-conf.el (code-offset):
* lisp/international/mule-diag.el (describe-character-set)
(list-input-methods-1):
* lisp/mail/feedmail.el (feedmail-run-the-queue):
* lisp/mouse.el (minor-mode-menu-from-indicator):
* lisp/mpc.el (mpc-playlist-rename):
* lisp/msb.el (msb--choose-menu):
* lisp/net/ange-ftp.el (ange-ftp-shell-command):
* lisp/net/imap.el (imap-interactive-login):
* lisp/net/mairix.el (mairix-widget-create-query):
* lisp/net/newst-backend.el (newsticker--sentinel-work):
* lisp/net/newst-treeview.el (newsticker--treeview-load):
* lisp/net/rlogin.el (rlogin):
* lisp/obsolete/iswitchb.el (iswitchb-possible-new-buffer):
* lisp/obsolete/otodo-mode.el (todo-more-important-p):
* lisp/obsolete/pgg-gpg.el (pgg-gpg-process-region):
* lisp/obsolete/pgg-pgp.el (pgg-pgp-process-region):
* lisp/obsolete/pgg-pgp5.el (pgg-pgp5-process-region):
* lisp/org/ob-core.el (org-babel-goto-named-src-block)
(org-babel-goto-named-result):
* lisp/org/ob-fortran.el (org-babel-fortran-ensure-main-wrap):
* lisp/org/ob-ref.el (org-babel-ref-resolve):
* lisp/org/org-agenda.el (org-agenda-prepare):
* lisp/org/org-clock.el (org-clock-notify-once-if-expired)
(org-clock-resolve):
* lisp/org/org-ctags.el (org-ctags-ask-rebuild-tags-file-then-find-tag):
* lisp/org/org-feed.el (org-feed-parse-atom-entry):
* lisp/org/org-habit.el (org-habit-parse-todo):
* lisp/org/org-mouse.el (org-mouse-popup-global-menu)
(org-mouse-context-menu):
* lisp/org/org-table.el (org-table-edit-formulas):
* lisp/org/ox.el (org-export-async-start):
* lisp/proced.el (proced-log):
* lisp/progmodes/ada-mode.el (ada-get-indent-case)
(ada-check-matching-start, ada-goto-matching-start):
* lisp/progmodes/ada-prj.el (ada-prj-display-page):
* lisp/progmodes/ada-xref.el (ada-find-executable):
* lisp/progmodes/ebrowse.el (ebrowse-tags-apropos):
* lisp/progmodes/etags.el (etags-tags-apropos-additional):
* lisp/progmodes/flymake.el (flymake-parse-err-lines)
(flymake-start-syntax-check-process):
* lisp/progmodes/python.el (python-shell-get-process-or-error)
(python-define-auxiliary-skeleton):
* lisp/progmodes/sql.el (sql-comint):
* lisp/progmodes/verilog-mode.el (verilog-load-file-at-point):
* lisp/progmodes/vhdl-mode.el (vhdl-widget-directory-validate):
* lisp/recentf.el (recentf-open-files):
* lisp/replace.el (query-replace-read-from)
(occur-after-change-function, occur-1):
* lisp/scroll-bar.el (scroll-bar-columns):
* lisp/server.el (server-get-auth-key):
* lisp/simple.el (execute-extended-command)
(undo-outer-limit-truncate, list-processes--refresh)
(compose-mail, set-variable, choose-completion-string)
(define-alternatives):
* lisp/startup.el (site-run-file, tty-handle-args, command-line)
(command-line-1):
* lisp/subr.el (noreturn, define-error, add-to-list)
(read-char-choice, version-to-list):
* lisp/term/common-win.el (x-handle-xrm-switch)
(x-handle-name-switch, x-handle-args):
* lisp/term/x-win.el (x-handle-parent-id, x-handle-smid):
* lisp/textmodes/reftex-ref.el (reftex-label):
* lisp/textmodes/reftex-toc.el (reftex-toc-rename-label):
* lisp/textmodes/two-column.el (2C-split):
* lisp/tutorial.el (tutorial--describe-nonstandard-key)
(tutorial--find-changed-keys):
* lisp/type-break.el (type-break-noninteractive-query):
* lisp/wdired.el (wdired-do-renames, wdired-do-symlink-changes)
(wdired-do-perm-changes):
* lisp/whitespace.el (whitespace-report-region):
Prefer grave quoting in source-code strings used to generate help
and diagnostics.
* lisp/faces.el (face-documentation):
No need to convert quotes, since the result is a docstring.
* lisp/info.el (Info-virtual-index-find-node)
(Info-virtual-index, info-apropos):
Simplify by generating only curved quotes, since info files are
typically that ways nowadays anyway.
* lisp/international/mule-diag.el (list-input-methods):
Don’t assume text quoting style is curved.
* lisp/org/org-bibtex.el (org-bibtex-fields):
Revert my recent changes, going back to the old quoting style.
2015-09-07 15:41:44 +00:00
|
|
|
|
(t (error "Don't know how to snarf in `%s'" major-mode)))))
|
2008-03-17 02:33:49 +00:00
|
|
|
|
(funcall func noconfirm)))
|
2004-04-30 18:50:08 +00:00
|
|
|
|
|
1995-11-25 05:39:20 +00:00
|
|
|
|
(provide 'diary-lib)
|
1995-09-21 03:11:06 +00:00
|
|
|
|
|
1995-11-25 05:39:20 +00:00
|
|
|
|
;;; diary-lib.el ends here
|