]> git.eshelyaron.com Git - emacs.git/commitdiff
(list-diary-entries-hook, diary-display-hook, nongregorian-diary-listing-hook)
authorGlenn Morris <rgm@gnu.org>
Wed, 6 Aug 2003 10:10:46 +0000 (10:10 +0000)
committerGlenn Morris <rgm@gnu.org>
Wed, 6 Aug 2003 10:10:46 +0000 (10:10 +0000)
(mark-diary-entries-hook, nongregorian-diary-marking-hook): Add some
customize options for these hooks.
(calendar-abbrev-construct): Don't try to take a substring longer than
the original string.

lisp/ChangeLog
lisp/calendar/calendar.el

index bcf09a81bba2b9ee801dde472ab238234d6a503f..2d6e31a44b7b4d8af2253eb6169c88c3a8546565 100644 (file)
@@ -1,3 +1,12 @@
+2003-08-06  Glenn Morris  <gmorris@ast.cam.ac.uk>
+
+       * calendar/calendar.el (list-diary-entries-hook)
+       (diary-display-hook, nongregorian-diary-listing-hook)
+       (mark-diary-entries-hook, nongregorian-diary-marking-hook): Add
+       some customize options for these hooks.
+       (calendar-abbrev-construct): Don't try to take a substring longer
+       than the original string.
+
 2003-08-05  Richard M. Stallman  <rms@gnu.org>
 
        * emacs-lisp/testcover.el (noreturn): Report error if does return.
index 88d389072c24d485a0db102444ff93e768943ad6..e99e0b09d519ce1cc6a4708ac7b2c764596a02a5 100644 (file)
@@ -753,6 +753,7 @@ in your `.emacs' file to cause the fancy diary buffer to be displayed with
 diary entries from various included files, each day's entries sorted into
 lexicographic order."
   :type 'hook
+  :options '(include-other-diary-files sort-diary-entries)
   :group 'diary)
 
 ;;;###autoload
@@ -785,6 +786,7 @@ diary buffer will not show days for which there are no diary entries, even
 if that day is a holiday; if you want such days to be shown in the fancy
 diary buffer, set the variable `diary-list-include-blanks' to t."
   :type 'hook
+  :options '(fancy-diary-display)
   :group 'diary)
 
 ;;;###autoload
@@ -795,6 +797,7 @@ relevant entries.  You can use either or both of `list-hebrew-diary-entries'
 and `list-islamic-diary-entries'.  The documentation for these functions
 describes the style of such diary entries."
   :type 'hook
+  :options '(list-hebrew-diary-entries list-islamic-diary-entries)
   :group 'diary)
 
 ;;;###autoload
@@ -812,6 +815,7 @@ variable `diary-include-string'.  When you use `mark-included-diary-files' as
 part of the mark-diary-entries-hook, you will probably also want to use the
 function `include-other-diary-files' as part of `list-diary-entries-hook'."
   :type 'hook
+  :options '(mark-included-diary-files)
   :group 'diary)
 
 ;;;###autoload
@@ -822,6 +826,7 @@ relevant entries.  You can use either or both of `mark-hebrew-diary-entries'
 and `mark-islamic-diary-entries'.  The documentation for these functions
 describes the style of such diary entries."
   :type 'hook
+  :options '(mark-hebrew-diary-entries mark-islamic-diary-entries)
   :group 'diary)
 
 ;;;###autoload
@@ -2564,10 +2569,12 @@ of full names.  The return value is the ABBREV array, with any nil
 elements replaced by the first three characters taken from the
 corresponding element of FULL.  If optional argument PERIOD is non-nil,
 each element returned has a final `.' character."
-  (let (elem array)
+  (let (elem array name)
     (dotimes (i (length full))
-      (setq elem (or (aref abbrev i)
-                     (substring (aref full i) 0 calendar-abbrev-length))
+      (setq name (aref full i)
+            elem (or (aref abbrev i)
+                     (substring name 0
+                                (min calendar-abbrev-length (length name))))
             elem (format "%s%s" elem (if period "." ""))
             array (append array (list elem))))
     (vconcat array)))