aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2006-04-26 05:23:37 +0000
committerStefan Monnier2006-04-26 05:23:37 +0000
commitd1921057f3b136147d877f13a9daaf21fe137ec8 (patch)
tree8d47acbefff6bbd0a57d6912a06682ef16d4c94b
parent21a360b2c300ec8348632331a7f6c2f643a77a0e (diff)
downloademacs-d1921057f3b136147d877f13a9daaf21fe137ec8.tar.gz
emacs-d1921057f3b136147d877f13a9daaf21fe137ec8.zip
Remove spurious * in docstrings.
(add-log-time-zone-rule): Rename from change-log-time-zone-rule. (add-change-log-entry): Use it here, since it's not specific to iso8601. (add-log-iso8601-time-string): Don't use it here any more. (change-log-indent-text, change-log-indent): Rename from add-log-*.
-rw-r--r--lisp/ChangeLog32
-rw-r--r--lisp/add-log.el82
2 files changed, 65 insertions, 49 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 487c79cfe0d..fcc049feb28 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,14 @@
12006-04-26 Stefan Monnier <monnier@iro.umontreal.ca>
2
3 * add-log.el: Remove spurious * in docstrings.
4 (add-log-time-zone-rule): Rename from change-log-time-zone-rule.
5 (add-change-log-entry): Use it here, since it's not specific
6 to iso8601.
7 (add-log-iso8601-time-string): Don't use it here any more.
8 (change-log-indent-text, change-log-indent): Rename from add-log-*.
9
10 * abbrev.el (abbrev-mode): Tighten up a bit the safety predicate.
11
12006-04-25 Ryan Yeske <rcyeske@gmail.com> 122006-04-25 Ryan Yeske <rcyeske@gmail.com>
2 13
3 * net/rcirc.el (rcirc-print): Revert last change with ignored nicks. 14 * net/rcirc.el (rcirc-print): Revert last change with ignored nicks.
@@ -23,7 +34,7 @@
23 34
24 * net/tramp.el (tramp-register-file-name-handlers): New defun. 35 * net/tramp.el (tramp-register-file-name-handlers): New defun.
25 Added with autoload cookie. 36 Added with autoload cookie.
26 (tramp-unload-file-name-handlers): Renamed from 37 (tramp-unload-file-name-handlers): Rename from
27 `tramp-unload-file-name-handler-alist'. 38 `tramp-unload-file-name-handler-alist'.
28 39
292006-04-23 Romain Francoise <romain@orebokech.com> 402006-04-23 Romain Francoise <romain@orebokech.com>
@@ -50,8 +61,7 @@
50 61
512006-04-21 Carsten Dominik <dominik@science.uva.nl> 622006-04-21 Carsten Dominik <dominik@science.uva.nl>
52 63
53 * textmodes/org.el (org-mode-map): Catch conflict with old 64 * textmodes/org.el (org-mode-map): Catch conflict with old allout.el.
54 allout.el.
55 (org-open-at-point): Remove the "...done" message to keep output 65 (org-open-at-point): Remove the "...done" message to keep output
56 in the echo area visible. 66 in the echo area visible.
57 (org-export-as-xoxo): Fix call to `indent-region'. 67 (org-export-as-xoxo): Fix call to `indent-region'.
@@ -79,7 +89,7 @@
792006-04-20 Carsten Dominik <dominik@science.uva.nl> 892006-04-20 Carsten Dominik <dominik@science.uva.nl>
80 90
81 * textmodes/org.el: (org-deadline-announce): Face removed. 91 * textmodes/org.el: (org-deadline-announce): Face removed.
82 (org-level-faces, org-n-levels): Converted to constant. 92 (org-level-faces, org-n-levels): Convert to constant.
83 (org-compatible-face): New function. 93 (org-compatible-face): New function.
84 (org-hide, org-level-1, org-level-2, org-level-3, org-level-4) 94 (org-hide, org-level-1, org-level-2, org-level-3, org-level-4)
85 (org-level-5, org-level-6, org-level-7, org-level-8) 95 (org-level-5, org-level-6, org-level-7, org-level-8)
@@ -90,7 +100,7 @@
90 (org-bold-re, org-italic-re, org-underline-re): New constants. 100 (org-bold-re, org-italic-re, org-underline-re): New constants.
91 (org-set-font-lock-defaults): Use the new constants. 101 (org-set-font-lock-defaults): Use the new constants.
92 (org-agenda-highlight-todo): New function. 102 (org-agenda-highlight-todo): New function.
93 (org-agenda-todo): Fixed bug with point at end of line. 103 (org-agenda-todo): Fix bug with point at end of line.
94 (org-agenda-change-all-lines, org-finalize-agenda-entries): 104 (org-agenda-change-all-lines, org-finalize-agenda-entries):
95 Fontify TODO keywords. 105 Fontify TODO keywords.
96 (org-insert-link): Preserve relative path in ../ links. 106 (org-insert-link): Preserve relative path in ../ links.
@@ -114,12 +124,11 @@
114 when moving off either end of the input history ring. 124 when moving off either end of the input history ring.
115 (comint-delete-input): New function, used by 125 (comint-delete-input): New function, used by
116 `comint-previous-input' and others. 126 `comint-previous-input' and others.
117 (comint-previous-matching-input): Use 127 (comint-previous-matching-input):
118 `coming-delete-input'. Save the partial input if leaving the 128 Use `coming-delete-input'. Save the partial input if leaving the
119 edit line. Goto point-max before deleting input to avoid 129 edit line. Goto point-max before deleting input to avoid
120 partial input fragments hanging around. 130 partial input fragments hanging around.
121 (comint-restore-input): New function, used by 131 (comint-restore-input): New function, used by `comint-previous-input'.
122 `comint-previous-input'.
123 132
1242006-04-18 Luc Teirlinck <teirllm@auburn.edu> 1332006-04-18 Luc Teirlinck <teirllm@auburn.edu>
125 134
@@ -127,8 +136,7 @@
127 136
1282006-04-18 Dan Nicolaescu <dann@ics.uci.edu> 1372006-04-18 Dan Nicolaescu <dann@ics.uci.edu>
129 138
130 * progmodes/python.el (python-mode): Add support for 139 * progmodes/python.el (python-mode): Add support for hs-minor-mode.
131 hs-minor-mode.
132 140
1332006-04-19 Reiner Steib <Reiner.Steib@gmx.de> 1412006-04-19 Reiner Steib <Reiner.Steib@gmx.de>
134 142
@@ -206,7 +214,7 @@
206 (gdb-frame-address): Re-use to identify frame for watch expression. 214 (gdb-frame-address): Re-use to identify frame for watch expression.
207 (gdb-var-list, gdb-var-create-handler): Add frame address for root 215 (gdb-var-list, gdb-var-create-handler): Add frame address for root
208 variables. 216 variables.
209 (gdb-init-1, gdb-source, gdb-post-prompt, ) 217 (gdb-init-1, gdb-source, gdb-post-prompt)
210 (gdb-assembler-custom, gdb-invalidate-assembler): Use gdb-pc-address. 218 (gdb-assembler-custom, gdb-invalidate-assembler): Use gdb-pc-address.
211 (gdb-frame-handler): Get gdb-frame-address. 219 (gdb-frame-handler): Get gdb-frame-address.
212 220
diff --git a/lisp/add-log.el b/lisp/add-log.el
index 1afdc7dcb72..b47494194d4 100644
--- a/lisp/add-log.el
+++ b/lisp/add-log.el
@@ -72,7 +72,7 @@ This defaults to the value returned by the function `user-full-name'."
72 72
73;;;###autoload 73;;;###autoload
74(defcustom add-log-mailing-address nil 74(defcustom add-log-mailing-address nil
75 "*Email addresses of user, for inclusion in ChangeLog headers. 75 "Email addresses of user, for inclusion in ChangeLog headers.
76This defaults to the value of `user-mail-address'. In addition to 76This defaults to the value of `user-mail-address'. In addition to
77being a simple string, this value can also be a list. All elements 77being a simple string, this value can also be a list. All elements
78will be recognized as referring to the same user; when creating a new 78will be recognized as referring to the same user; when creating a new
@@ -83,7 +83,7 @@ ChangeLog entry, one element will be chosen at random."
83 :group 'change-log) 83 :group 'change-log)
84 84
85(defcustom add-log-time-format 'add-log-iso8601-time-string 85(defcustom add-log-time-format 'add-log-iso8601-time-string
86 "*Function that defines the time format. 86 "Function that defines the time format.
87For example, `add-log-iso8601-time-string', which gives the 87For example, `add-log-iso8601-time-string', which gives the
88date in international ISO 8601 format, 88date in international ISO 8601 format,
89and `current-time-string' are two valid values." 89and `current-time-string' are two valid values."
@@ -95,7 +95,7 @@ and `current-time-string' are two valid values."
95 :group 'change-log) 95 :group 'change-log)
96 96
97(defcustom add-log-keep-changes-together nil 97(defcustom add-log-keep-changes-together nil
98 "*If non-nil, normally keep day's log entries for one file together. 98 "If non-nil, normally keep day's log entries for one file together.
99 99
100Log entries for a given file made with \\[add-change-log-entry] or 100Log entries for a given file made with \\[add-change-log-entry] or
101\\[add-change-log-entry-other-window] will only be added to others \ 101\\[add-change-log-entry-other-window] will only be added to others \
@@ -127,20 +127,20 @@ this variable."
127 :group 'change-log) 127 :group 'change-log)
128 128
129(defcustom add-log-always-start-new-record nil 129(defcustom add-log-always-start-new-record nil
130 "*If non-nil, `add-change-log-entry' will always start a new record." 130 "If non-nil, `add-change-log-entry' will always start a new record."
131 :version "22.1" 131 :version "22.1"
132 :type 'boolean 132 :type 'boolean
133 :group 'change-log) 133 :group 'change-log)
134 134
135(defcustom add-log-buffer-file-name-function nil 135(defcustom add-log-buffer-file-name-function nil
136 "*If non-nil, function to call to identify the full filename of a buffer. 136 "If non-nil, function to call to identify the full filename of a buffer.
137This function is called with no argument. If this is nil, the default is to 137This function is called with no argument. If this is nil, the default is to
138use `buffer-file-name'." 138use `buffer-file-name'."
139 :type '(choice (const nil) function) 139 :type '(choice (const nil) function)
140 :group 'change-log) 140 :group 'change-log)
141 141
142(defcustom add-log-file-name-function nil 142(defcustom add-log-file-name-function nil
143 "*If non-nil, function to call to identify the filename for a ChangeLog entry. 143 "If non-nil, function to call to identify the filename for a ChangeLog entry.
144This function is called with one argument, the value of variable 144This function is called with one argument, the value of variable
145`buffer-file-name' in that buffer. If this is nil, the default is to 145`buffer-file-name' in that buffer. If this is nil, the default is to
146use the file's name relative to the directory of the change log file." 146use the file's name relative to the directory of the change log file."
@@ -286,10 +286,14 @@ Note: The search is conducted only within 10%, at the beginning of the file."
286 map) 286 map)
287 "Keymap for Change Log major mode.") 287 "Keymap for Change Log major mode.")
288 288
289(defvar change-log-time-zone-rule nil 289;; It used to be called change-log-time-zone-rule but really should be
290;; called add-log-time-zone-rule since it's only used from add-log-* code.
291(defvaralias 'change-log-time-zone-rule 'add-log-time-zone-rule)
292(defvar add-log-time-zone-rule nil
290 "Time zone used for calculating change log time stamps. 293 "Time zone used for calculating change log time stamps.
291It takes the same format as the TZ argument of `set-time-zone-rule'. 294It takes the same format as the TZ argument of `set-time-zone-rule'.
292If nil, use local time.") 295If nil, use local time.
296If t, use universal time.")
293 297
294(defun add-log-iso8601-time-zone (time) 298(defun add-log-iso8601-time-zone (time)
295 (let* ((utc-offset (or (car (current-time-zone time)) 0)) 299 (let* ((utc-offset (or (car (current-time-zone time)) 0))
@@ -304,18 +308,13 @@ If nil, use local time.")
304 (t "%c%02d")) 308 (t "%c%02d"))
305 sign hh mm ss))) 309 sign hh mm ss)))
306 310
311(defvar add-log-iso8601-with-time-zone nil)
312
307(defun add-log-iso8601-time-string () 313(defun add-log-iso8601-time-string ()
308 (if change-log-time-zone-rule 314 (let ((time (format-time-string "%Y-%m-%d" (eq t add-log-time-zone-rule))))
309 (let ((tz (getenv "TZ")) 315 (if add-log-iso8601-with-time-zone
310 (now (current-time))) 316 (concat time " " (add-log-iso8601-time-zone))
311 (unwind-protect 317 time)))
312 (progn
313 (set-time-zone-rule change-log-time-zone-rule)
314 (concat
315 (format-time-string "%Y-%m-%d " now)
316 (add-log-iso8601-time-zone now)))
317 (set-time-zone-rule tz)))
318 (format-time-string "%Y-%m-%d")))
319 318
320(defun change-log-name () 319(defun change-log-name ()
321 "Return (system-dependent) default name for a change log file." 320 "Return (system-dependent) default name for a change log file."
@@ -494,7 +493,7 @@ The change log file can start with a copyright notice and a copying
494permission notice. The first blank line indicates the end of these 493permission notice. The first blank line indicates the end of these
495notices. 494notices.
496 495
497Today's date is calculated according to `change-log-time-zone-rule' if 496Today's date is calculated according to `add-log-time-zone-rule' if
498non-nil, otherwise in local time." 497non-nil, otherwise in local time."
499 (interactive (list current-prefix-arg 498 (interactive (list current-prefix-arg
500 (prompt-for-change-log-name))) 499 (prompt-for-change-log-name)))
@@ -538,13 +537,22 @@ non-nil, otherwise in local time."
538 (skip-chars-forward "\n")) 537 (skip-chars-forward "\n"))
539 538
540 ;; Advance into first entry if it is usable; else make new one. 539 ;; Advance into first entry if it is usable; else make new one.
541 (let ((new-entries (mapcar (lambda (addr) 540 (let ((new-entries
542 (concat (funcall add-log-time-format) 541 (mapcar (lambda (addr)
543 " " full-name 542 (concat
544 " <" addr ">")) 543 (if (stringp add-log-time-zone-rule)
545 (if (consp mailing-address) 544 (let ((tz (getenv "TZ")))
546 mailing-address 545 (unwind-protect
547 (list mailing-address))))) 546 (progn
547 (set-time-zone-rule add-log-time-zone-rule)
548 (funcall add-log-time-format))
549 (set-time-zone-rule tz)))
550 (funcall add-log-time-format))
551 " " full-name
552 " <" addr ">"))
553 (if (consp mailing-address)
554 mailing-address
555 (list mailing-address)))))
548 (if (and (not add-log-always-start-new-record) 556 (if (and (not add-log-always-start-new-record)
549 (let ((hit nil)) 557 (let ((hit nil))
550 (dolist (entry new-entries hit) 558 (dolist (entry new-entries hit)
@@ -652,21 +660,21 @@ the change log file in another window."
652 (add-change-log-entry whoami file-name t)) 660 (add-change-log-entry whoami file-name t))
653;;;###autoload (define-key ctl-x-4-map "a" 'add-change-log-entry-other-window) 661;;;###autoload (define-key ctl-x-4-map "a" 'add-change-log-entry-other-window)
654 662
655(defvar add-log-indent-text 0) 663(defvar change-log-indent-text 0)
656 664
657(defun add-log-indent () 665(defun change-log-indent ()
658 (let* ((indent 666 (let* ((indent
659 (save-excursion 667 (save-excursion
660 (beginning-of-line) 668 (beginning-of-line)
661 (skip-chars-forward " \t") 669 (skip-chars-forward " \t")
662 (cond 670 (cond
663 ((and (looking-at "\\(.*\\) [^ \n].*[^ \n] <.*>$") 671 ((and (looking-at "\\(.*\\) [^ \n].*[^ \n] <.*>\\(?: +(.*)\\)? *$")
664 ;; Matching the output of add-log-time-format is difficult, 672 ;; Matching the output of add-log-time-format is difficult,
665 ;; but I'll get it has at least two adjacent digits. 673 ;; but I'll get it has at least two adjacent digits.
666 (string-match "[[:digit:]][[:digit:]]" (match-string 1))) 674 (string-match "[[:digit:]][[:digit:]]" (match-string 1)))
667 0) 675 0)
668 ((looking-at "[^*(]") 676 ((looking-at "[^*(]")
669 (+ (current-left-margin) add-log-indent-text)) 677 (+ (current-left-margin) change-log-indent-text))
670 (t (current-left-margin))))) 678 (t (current-left-margin)))))
671 (pos (save-excursion (indent-line-to indent) (point)))) 679 (pos (save-excursion (indent-line-to indent) (point))))
672 (if (> pos (point)) (goto-char pos)))) 680 (if (> pos (point)) (goto-char pos))))
@@ -688,7 +696,7 @@ Runs `change-log-mode-hook'.
688 tab-width 8) 696 tab-width 8)
689 (set (make-local-variable 'fill-paragraph-function) 697 (set (make-local-variable 'fill-paragraph-function)
690 'change-log-fill-paragraph) 698 'change-log-fill-paragraph)
691 (set (make-local-variable 'indent-line-function) 'add-log-indent) 699 (set (make-local-variable 'indent-line-function) 'change-log-indent)
692 (set (make-local-variable 'tab-always-indent) nil) 700 (set (make-local-variable 'tab-always-indent) nil)
693 ;; We really do want "^" in paragraph-start below: it is only the 701 ;; We really do want "^" in paragraph-start below: it is only the
694 ;; lines that begin at column 0 (despite the left-margin of 8) that 702 ;; lines that begin at column 0 (despite the left-margin of 8) that
@@ -722,23 +730,23 @@ Prefix arg means justify as well."
722 730
723(defcustom add-log-current-defun-header-regexp 731(defcustom add-log-current-defun-header-regexp
724 "^\\([[:upper:]][[:upper:]_ ]*[[:upper:]_]\\|[-_[:alpha:]]+\\)[ \t]*[:=]" 732 "^\\([[:upper:]][[:upper:]_ ]*[[:upper:]_]\\|[-_[:alpha:]]+\\)[ \t]*[:=]"
725 "*Heuristic regexp used by `add-log-current-defun' for unknown major modes." 733 "Heuristic regexp used by `add-log-current-defun' for unknown major modes."
726 :type 'regexp 734 :type 'regexp
727 :group 'change-log) 735 :group 'change-log)
728 736
729;;;###autoload 737;;;###autoload
730(defvar add-log-lisp-like-modes 738(defvar add-log-lisp-like-modes
731 '(emacs-lisp-mode lisp-mode scheme-mode dsssl-mode lisp-interaction-mode) 739 '(emacs-lisp-mode lisp-mode scheme-mode dsssl-mode lisp-interaction-mode)
732 "*Modes that look like Lisp to `add-log-current-defun'.") 740 "*Modes that look like Lisp to `add-log-current-defun'.")
733 741
734;;;###autoload 742;;;###autoload
735(defvar add-log-c-like-modes 743(defvar add-log-c-like-modes
736 '(c-mode c++-mode c++-c-mode objc-mode) 744 '(c-mode c++-mode c++-c-mode objc-mode)
737 "*Modes that look like C to `add-log-current-defun'.") 745 "*Modes that look like C to `add-log-current-defun'.")
738 746
739;;;###autoload 747;;;###autoload
740(defvar add-log-tex-like-modes 748(defvar add-log-tex-like-modes
741 '(TeX-mode plain-TeX-mode LaTeX-mode plain-tex-mode latex-mode) 749 '(TeX-mode plain-TeX-mode LaTeX-mode plain-tex-mode latex-mode)
742 "*Modes that look like TeX to `add-log-current-defun'.") 750 "*Modes that look like TeX to `add-log-current-defun'.")
743 751
744;;;###autoload 752;;;###autoload
@@ -1103,5 +1111,5 @@ old-style time formats for entries are supported."
1103 1111
1104(provide 'add-log) 1112(provide 'add-log)
1105 1113
1106;;; arch-tag: 81eee6fc-088f-4372-a37f-80ad9620e762 1114;; arch-tag: 81eee6fc-088f-4372-a37f-80ad9620e762
1107;;; add-log.el ends here 1115;;; add-log.el ends here