summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2010-06-16 16:08:41 -0400
committerStefan Monnier <monnier@iro.umontreal.ca>2010-06-16 16:08:41 -0400
commit2a64315a111fb4da67e9c40c9b69045c4f63d619 (patch)
tree2e7ba99465f6eb5eae64361767af5bc5fff7aca4 /lisp
parent288cf4e907c0350eb24824016763bddd09df8ea8 (diff)
parent36901266a8acb83880fefee50c93abb09f64533b (diff)
downloademacs-2a64315a111fb4da67e9c40c9b69045c4f63d619.tar.gz
Merge from emacs-23
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog37
-rw-r--r--lisp/calendar/appt.el59
-rw-r--r--lisp/emacs-lisp/cl-macs.el2
-rw-r--r--lisp/font-core.el10
-rw-r--r--lisp/font-lock.el9
-rw-r--r--lisp/url/ChangeLog4
-rw-r--r--lisp/url/url-vars.el2
-rw-r--r--lisp/vc/vc-annotate.el8
-rw-r--r--lisp/vc/vc-svn.el2
9 files changed, 100 insertions, 33 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 2346cf3449f..a70c564b1ef 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,40 @@
+2010-06-16 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * font-lock.el (font-lock-major-mode): Rename from
+ font-lock-mode-major-mode to distinguish it from
+ global-font-lock-mode's own font-lock-mode-major-mode (bug#6135).
+ (font-lock-set-defaults):
+ * font-core.el (font-lock-default-function): Adjust users.
+ (font-lock-mode): Don't set it at all.
+
+2010-06-16 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * vc-annotate.el (vc-annotate): Use vc-read-revision.
+
+2010-06-16 Glenn Morris <rgm@gnu.org>
+
+ * calendar/appt.el (appt-time-msg-list): Doc fix.
+ (appt-check): Let-bind appt-warn-time.
+ (appt-add): Make the 3rd argument optional.
+ Simplify argument names. Doc fix. Check for integer WARNTIME.
+ Only add WARNTIME to the output list if non-nil.
+
+2010-06-16 Ivan Kanis <apple@kanis.eu>
+
+ * calendar/appt.el (appt-check): Let the 3rd element of
+ appt-time-msg-list specify the warning time.
+ (appt-add): Add new argument with the warning time. (Bug#5176)
+
+2010-06-16 Bob Rogers <rogers-emacs@rgrjr.dyndns.org> (tiny change)
+
+ * vc-svn.el (vc-svn-after-dir-status): Fix regexp for Subversions
+ older than version 1.6. (Bug#6361)
+
+2010-06-16 Helmut Eller <eller.helmut@gmail.com>
+
+ * emacs-lisp/cl-macs.el (destructuring-bind): Bind `bind-enquote',
+ used by cl-do-arglist. (Bug#6408)
+
2010-06-16 Agustín Martín <agustin.martin@hispalinux.es>
* ispell.el (ispell-dictionary-base-alist): Fix
diff --git a/lisp/calendar/appt.el b/lisp/calendar/appt.el
index b403b7043d8..7fcaab9da34 100644
--- a/lisp/calendar/appt.el
+++ b/lisp/calendar/appt.el
@@ -183,16 +183,25 @@ Only relevant if reminders are being displayed in a window."
(defconst appt-buffer-name "*appt-buf*"
"Name of the appointments buffer.")
+;; TODO Turn this into an alist? It would be easier to add more
+;; optional elements.
+;; TODO There should be a way to set WARNTIME (and other properties)
+;; from the diary-file. Implementing that would be a good reason
+;; to change this to an alist.
(defvar appt-time-msg-list nil
"The list of appointments for today.
Use `appt-add' and `appt-delete' to add and delete appointments.
The original list is generated from today's `diary-entries-list', and
can be regenerated using the function `appt-check'.
-Each element of the generated list has the form (MINUTES STRING [FLAG]); where
-MINUTES is the time in minutes of the appointment after midnight, and
-STRING is the description of the appointment.
-FLAG, if non-nil, says that the element was made with `appt-add'
-so calling `appt-make-list' again should preserve it.")
+Each element of the generated list has the form
+\(MINUTES STRING [FLAG] [WARNTIME])
+where MINUTES is the time in minutes of the appointment after midnight,
+and STRING is the description of the appointment.
+FLAG and WARNTIME can only be present if the element was made
+with `appt-add'. A non-nil FLAG indicates that the element was made
+with `appt-add', so calling `appt-make-list' again should preserve it.
+If WARNTIME is non-nil, it is an integer to use in place
+of `appt-message-warning-time'.")
(defconst appt-max-time (1- (* 24 60))
"11:59pm in minutes - number of minutes in a day minus 1.")
@@ -313,7 +322,7 @@ displayed in a window:
(zerop (mod prev-appt-display-count appt-display-interval))))
;; Non-nil means only update the interval displayed in the mode line.
(mode-line-only (unless full-check appt-now-displayed))
- now cur-comp-time appt-comp-time)
+ now cur-comp-time appt-comp-time appt-warn-time)
(when (or full-check mode-line-only)
(save-excursion
;; Convert current time to minutes after midnight (12.01am = 1).
@@ -353,6 +362,8 @@ displayed in a window:
;; calculate the number of minutes until the appointment.
(when (and appt-issue-message appt-time-msg-list)
(setq appt-comp-time (caar (car appt-time-msg-list))
+ appt-warn-time (or (nth 3 (car appt-time-msg-list))
+ appt-message-warning-time)
min-to-app (- appt-comp-time cur-comp-time))
(while (and appt-time-msg-list
(< appt-comp-time cur-comp-time))
@@ -360,21 +371,21 @@ displayed in a window:
(if appt-time-msg-list
(setq appt-comp-time (caar (car appt-time-msg-list)))))
;; If we have an appointment between midnight and
- ;; `appt-message-warning-time' minutes after midnight, we
+ ;; `appt-warn-time' minutes after midnight, we
;; must begin to issue a message before midnight. Midnight
;; is considered 0 minutes and 11:59pm is 1439
;; minutes. Therefore we must recalculate the minutes to
;; appointment variable. It is equal to the number of
;; minutes before midnight plus the number of minutes after
;; midnight our appointment is.
- (if (and (< appt-comp-time appt-message-warning-time)
- (> (+ cur-comp-time appt-message-warning-time)
+ (if (and (< appt-comp-time appt-warn-time)
+ (> (+ cur-comp-time appt-warn-time)
appt-max-time))
(setq min-to-app (+ (- (1+ appt-max-time) cur-comp-time)
appt-comp-time)))
;; Issue warning if the appointment time is within
;; appt-message-warning time.
- (when (and (<= min-to-app appt-message-warning-time)
+ (when (and (<= min-to-app appt-warn-time)
(>= min-to-app 0))
(setq appt-now-displayed t
appt-display-count (1+ prev-appt-display-count))
@@ -470,14 +481,28 @@ Usually just deletes the appointment buffer."
"[0-9]?[0-9]\\(h\\([0-9][0-9]\\)?\\|[:.][0-9][0-9]\\)\\(am\\|pm\\)?")
;;;###autoload
-(defun appt-add (new-appt-time new-appt-msg)
- "Add an appointment for today at NEW-APPT-TIME with message NEW-APPT-MSG.
-The time should be in either 24 hour format or am/pm format."
- (interactive "sTime (hh:mm[am/pm]): \nsMessage: ")
- (unless (string-match appt-time-regexp new-appt-time)
+(defun appt-add (time msg &optional warntime)
+ "Add an appointment for today at TIME with message MSG.
+The time should be in either 24 hour format or am/pm format.
+Optional argument WARNTIME is an integer (or string) giving the number
+of minutes before the appointment at which to start warning.
+The default is `appt-message-warning-time'."
+ (interactive "sTime (hh:mm[am/pm]): \nsMessage:
+sMinutes before the appointment to start warning: ")
+ (unless (string-match appt-time-regexp time)
(error "Unacceptable time-string"))
- (let ((time-msg (list (list (appt-convert-time new-appt-time))
- (concat new-appt-time " " new-appt-msg) t)))
+ (and (stringp warntime)
+ (setq warntime (unless (string-equal warntime "")
+ (string-to-number warntime))))
+ (and warntime
+ (not (integerp warntime))
+ (error "Argument WARNTIME must be an integer, or nil"))
+ (let ((time-msg (list (list (appt-convert-time time))
+ (concat time " " msg) t)))
+ ;; It is presently non-sensical to have multiple warnings about
+ ;; the same appointment with just different delays, but it might
+ ;; not always be so. TODO
+ (if warntime (setq time-msg (append time-msg (list warntime))))
(unless (member time-msg appt-time-msg-list)
(setq appt-time-msg-list
(appt-sort-list (nconc appt-time-msg-list (list time-msg)))))))
diff --git a/lisp/emacs-lisp/cl-macs.el b/lisp/emacs-lisp/cl-macs.el
index 444178edb0c..694a06f8338 100644
--- a/lisp/emacs-lisp/cl-macs.el
+++ b/lisp/emacs-lisp/cl-macs.el
@@ -438,7 +438,7 @@ It is a list of elements of the form either:
;;;###autoload
(defmacro destructuring-bind (args expr &rest body)
(let* ((bind-lets nil) (bind-forms nil) (bind-inits nil)
- (bind-defs nil) (bind-block 'cl-none))
+ (bind-defs nil) (bind-block 'cl-none) (bind-enquote nil))
(cl-do-arglist (or args '(&aux)) expr)
(append '(progn) bind-inits
(list (nconc (list 'let* (nreverse bind-lets))
diff --git a/lisp/font-core.el b/lisp/font-core.el
index be3a2a3eaca..d33295b3c34 100644
--- a/lisp/font-core.el
+++ b/lisp/font-core.el
@@ -97,7 +97,7 @@ It will be passed one argument, which is the current value of
`font-lock-mode'.")
;; The mode for which font-lock was initialized, or nil if none.
-(defvar font-lock-mode-major-mode)
+(defvar font-lock-major-mode)
(define-minor-mode font-lock-mode
"Toggle Font Lock mode.
With arg, turn Font Lock mode off if and only if arg is a non-positive
@@ -159,9 +159,7 @@ your own function which is called when `font-lock-mode' is toggled via
;; Arrange to unfontify this buffer if we change major mode later.
(if font-lock-mode
(add-hook 'change-major-mode-hook 'font-lock-change-mode nil t)
- (remove-hook 'change-major-mode-hook 'font-lock-change-mode t))
- (when font-lock-mode
- (setq font-lock-mode-major-mode major-mode)))
+ (remove-hook 'change-major-mode-hook 'font-lock-change-mode t)))
;; Get rid of fontification for the old major mode.
;; We do this when changing major modes.
@@ -213,8 +211,8 @@ this function onto `change-major-mode-hook'."
(and mode
(boundp 'font-lock-set-defaults)
font-lock-set-defaults
- font-lock-mode-major-mode
- (not (eq font-lock-mode-major-mode major-mode))))
+ font-lock-major-mode
+ (not (eq font-lock-major-mode major-mode))))
(font-lock-mode-internal mode)))
(defun turn-on-font-lock ()
diff --git a/lisp/font-lock.el b/lisp/font-lock.el
index 7e8562c433a..db665857fdb 100644
--- a/lisp/font-lock.el
+++ b/lisp/font-lock.el
@@ -1783,15 +1783,18 @@ preserve `hi-lock-mode' highlighting patterns."
(kill-local-variable 'font-lock-set-defaults)
(font-lock-mode 1))
-(defvar font-lock-mode-major-mode)
+(defvar font-lock-major-mode nil
+ "Major mode for which the font-lock settings have been setup.")
+(make-variable-buffer-local 'font-lock-major-mode)
+
(defun font-lock-set-defaults ()
"Set fontification defaults appropriately for this mode.
Sets various variables using `font-lock-defaults' (or, if nil, using
`font-lock-defaults-alist') and `font-lock-maximum-decoration'."
;; Set fontification defaults if not previously set for correct major mode.
(unless (and font-lock-set-defaults
- (eq font-lock-mode-major-mode major-mode))
- (setq font-lock-mode-major-mode major-mode)
+ (eq font-lock-major-mode major-mode))
+ (setq font-lock-major-mode major-mode)
(set (make-local-variable 'font-lock-set-defaults) t)
(make-local-variable 'font-lock-fontified)
(make-local-variable 'font-lock-multiline)
diff --git a/lisp/url/ChangeLog b/lisp/url/ChangeLog
index f61c8d2566d..374333150c8 100644
--- a/lisp/url/ChangeLog
+++ b/lisp/url/ChangeLog
@@ -1,3 +1,7 @@
+2010-06-12 Štěpán Němec <stepnem@gmail.com> (tiny change)
+
+ * url-vars.el (url-privacy-level): Fix doc typo. (Bug#6406)
+
2010-05-19 Stefan Monnier <monnier@iro.umontreal.ca>
* url-util.el (url-unhex-string): Don't accidentally decode as latin-1.
diff --git a/lisp/url/url-vars.el b/lisp/url/url-vars.el
index 1b9fd7b76cc..65622a06e02 100644
--- a/lisp/url/url-vars.el
+++ b/lisp/url/url-vars.el
@@ -128,7 +128,7 @@ email -- the email address
os -- the operating system info
lastloc -- the last location
agent -- do not send the User-Agent string
-cookie -- never accept HTTP cookies
+cookies -- never accept HTTP cookies
Samples:
diff --git a/lisp/vc/vc-annotate.el b/lisp/vc/vc-annotate.el
index d21d40d50f2..d0951bdd404 100644
--- a/lisp/vc/vc-annotate.el
+++ b/lisp/vc/vc-annotate.el
@@ -316,7 +316,7 @@ use; you may override this using the second optional arg MODE."
;;;###autoload
(defun vc-annotate (file rev &optional display-mode buf move-point-to)
- "Display the edit history of the current file using colors.
+ "Display the edit history of the current FILE using colors.
This command creates a buffer that shows, for each line of the current
file, when it was last edited and by whom. Additionally, colors are
@@ -326,7 +326,7 @@ default, the time scale stretches back one year into the past;
everything that is older than that is shown in blue.
With a prefix argument, this command asks two questions in the
-minibuffer. First, you may enter a revision number; then the buffer
+minibuffer. First, you may enter a revision number REV; then the buffer
displays and annotates that revision instead of the working revision
\(type RET in the minibuffer to leave that default unchanged). Then,
you are prompted for the time span in days which the color range
@@ -348,9 +348,9 @@ mode-specific menu. `vc-annotate-color-map' and
(list buffer-file-name
(let ((def (vc-working-revision buffer-file-name)))
(if (null current-prefix-arg) def
- (read-string
+ (vc-read-revision
(format "Annotate from revision (default %s): " def)
- nil nil def)))
+ (list buffer-file-name) nil def)))
(if (null current-prefix-arg)
vc-annotate-display-mode
(float (string-to-number
diff --git a/lisp/vc/vc-svn.el b/lisp/vc/vc-svn.el
index cd43d425af1..889a60c278e 100644
--- a/lisp/vc/vc-svn.el
+++ b/lisp/vc/vc-svn.el
@@ -170,7 +170,7 @@ want to force an empty list of arguments, use t."
(?? . unregistered)
;; This is what vc-svn-parse-status does.
(?~ . edited)))
- (re (if remote "^\\(.\\)...... \\([ *]\\) +\\(?:[-0-9]+\\)? \\(.*\\)$"
+ (re (if remote "^\\(.\\)......? \\([ *]\\) +\\(?:[-0-9]+\\)? \\(.*\\)$"
;; Subexp 2 is a dummy in this case, so the numbers match.
"^\\(.\\)....\\(.\\) \\(.*\\)$"))
result)