aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorMiles Bader2007-08-03 05:20:51 +0000
committerMiles Bader2007-08-03 05:20:51 +0000
commite145a7fe95fb8f97407d125f94653ef95e42696d (patch)
tree4f83705aac9d1a4416dabcf774115f7cccb80bda /lisp
parent2a4924ce174b1a2b032558f3036f1d95445c4936 (diff)
parent2f12b713116a4e15b4744fc78d5f0dbb57fcd1ca (diff)
downloademacs-e145a7fe95fb8f97407d125f94653ef95e42696d.tar.gz
emacs-e145a7fe95fb8f97407d125f94653ef95e42696d.zip
Merge from emacs--devo--0
Patches applied: * emacs--devo--0 (patch 832-838) - Remove lisp/erc/erc-nicklist.el - Update some .arch-inventory files - Fix void function definition error in cus-edit.el - Update from CVS - Restore lisp/emacs-lisp/cl-loaddefs.el - Merge from emacs--rel--22 * emacs--rel--22 (patch 75-83) - Update from CVS - Remove lisp/erc/erc-nicklist.el - Update some .arch-inventory files - Indicate that emacs--devo--0--patch-834 does not need to be applied - Merge from gnus--rel--5.10 - Restore lisp/emacs-lisp/cl-loaddefs.el * gnus--rel--5.10 (patch 239-241) - Merge from emacs--devo--0 - Update from CVS Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-239
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog145
-rw-r--r--lisp/bindings.el2
-rw-r--r--lisp/calendar/appt.el8
-rw-r--r--lisp/calendar/cal-bahai.el64
-rw-r--r--lisp/calendar/cal-menu.el13
-rw-r--r--lisp/calendar/cal-move.el64
-rw-r--r--lisp/calendar/calendar.el67
-rw-r--r--lisp/cus-edit.el107
-rw-r--r--lisp/dired.el25
-rw-r--r--lisp/emacs-lisp/advice.el12
-rw-r--r--lisp/emacs-lisp/copyright.el17
-rw-r--r--lisp/emacs-lisp/lisp-mode.el2
-rw-r--r--lisp/erc/ChangeLog6
-rw-r--r--lisp/erc/erc-nicklist.el414
-rw-r--r--lisp/gnus/ChangeLog9
-rw-r--r--lisp/gnus/gnus-msg.el38
-rw-r--r--lisp/gnus/message.el2
-rw-r--r--lisp/mb-depth.el2
-rw-r--r--lisp/net/tramp-cache.el5
-rw-r--r--lisp/net/tramp-fish.el5
-rw-r--r--lisp/net/tramp-ftp.el2
-rw-r--r--lisp/net/tramp-gw.el5
-rw-r--r--lisp/net/tramp-smb.el2
-rw-r--r--lisp/net/tramp-uu.el4
-rw-r--r--lisp/net/tramp.el9
-rw-r--r--lisp/net/trampver.el8
-rw-r--r--lisp/progmodes/cc-langs.el10
-rw-r--r--lisp/progmodes/cc-mode.el9
-rw-r--r--lisp/progmodes/compile.el11
-rw-r--r--lisp/progmodes/python.el2
-rw-r--r--lisp/ps-print.el2
-rw-r--r--lisp/textmodes/bibtex-style.el2
-rw-r--r--lisp/textmodes/org-publish.el2
-rw-r--r--lisp/vc-bzr.el4
-rw-r--r--lisp/vc-git.el7
-rw-r--r--lisp/vc-hg.el14
-rw-r--r--lisp/vc.el11
-rw-r--r--lisp/wdired.el17
38 files changed, 474 insertions, 654 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 378d0c3fe22..f48ea78a246 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,148 @@
12007-07-29 Kimit Yada <kimitto@gmail.com> (tiny change)
2
3 * emacs-lisp/copyright.el (copyright-update-year, copyright-update)
4 (copyright-fix-years, copyright): Correctly handle the case where
5 copyright-limit is nil.
6
72007-07-28 Konstantin Novitsky <knovitsk@Bear.com> (tiny change)
8
9 * progmodes/python.el (run-python): Fix path separator under w32.
10
112007-07-30 Richard Stallman <rms@gnu.org>
12
13 * emacs-lisp/lisp-mode.el (emacs-lisp-mode-syntax-table):
14 Treat non-break space as whitespace in Lisp.
15
162007-07-30 Stefan Monnier <monnier@iro.umontreal.ca>
17
18 * vc.el (vc-dired-hook): Use inhibit-read-only.
19
20 * progmodes/compile.el (compilation-forget-errors):
21 Reset compilation-auto-jump-to-next.
22
232007-07-30 Michael Olson <mwolson@gnu.org>
24
25 * cus-edit.el (custom-group-save): Fix void function definition
26 error. Thanks to Zhang Wei for the report.
27
28 * ps-print.el: Check in trivial changes to the autoloads section
29 caused by the build process. These autoloads really ought to be
30 placed in a separate file, methinks.
31
322007-07-29 Stefan Monnier <monnier@iro.umontreal.ca>
33
34 * calendar/calendar.el (calendar-mode): Make sure
35 displayed-(month|year) are set.
36 (calendar-basic-setup): Display buffer before adjusting window sizes.
37 (generate-calendar-window): Use inhibit-read-only. Simplify.
38 Generate buffer and set displayed-month and displayed-year before
39 calling update-calendar-mode-line.
40
412007-07-29 Michael Albinus <michael.albinus@gmx.de>
42
43 * tramp.el:
44 * tramp-uu.el:
45 * trampver.el: Use utf-8 encoding with coding cookie.
46
47 * tramp-cache.el:
48 * tramp-fish.el:
49 * tramp-ftp.el:
50 * tramp-gw.el:
51 * tramp-smb.el: Remove coding cookie.
52
53 * tramp.el (tramp-handle-verify-visited-file-modtime):
54 Flush buffer file-name's file property.
55 (tramp-handle-file-remote-p): The first parameter is FILENAME.
56
57 * trampver.el: Update release number.
58
592007-07-29 Juri Linkov <juri@jurta.org>
60
61 * dired.el (dired-mode-map): Bind C-x C-q to dired-toggle-read-only.
62 Filter out menu item "Edit File Names" `wdired-change-to-wdired-mode'
63 when major-mode is not dired-mode.
64 (dired-toggle-read-only): New function.
65 (dired-recursive-deletes): Remove obsolete comments about old
66 default value.
67 (dired-do-flagged-delete, dired-do-delete): Refill docstring.
68
69 * wdired.el (wdired-exit): New function.
70 (wdired-mode-map): Bind C-x C-q to wdired-exit.
71
722007-07-28 Stefan Monnier <monnier@iro.umontreal.ca>
73
74 * cus-edit.el (customize-read-group): New fun.
75 (customize-group-other-window, customize-face-other-window):
76 Prompt before delegating to customize-(group|face).
77 Bind pop-up-windows rather than use the other-window argument.
78 (customize-group, customize-face): Prompt from the interactive spec.
79 Remove args `prompt-for-group' and `other-window'.
80
81 * emacs-lisp/advice.el (ad-interactive-form): Re-introduce.
82 (ad-body-forms, ad-advised-interactive-form): Revert this part of
83 last change.
84
852007-07-28 Masatake YAMATO <jet@gyve.org>
86
87 * vc.el (vc-dired-mode): Add a menu for VC related operation.
88 Use backend name as the menu label Suggested by David Kastrup.
89
902007-07-28 Alan Mackenzie <acm@muc.de>
91
92 Fix problem with modes derived from CC Mode:
93 * progmodes/cc-mode.el (c-make-emacs-variables-local): Move this
94 macro to cc-langs.
95 (c-init-language-vars-for): Remove call to above macro.
96 * progmodes/cc-langs.el (c-make-emacs-variables-local): Macro has
97 been moved to here.
98 (c-make-init-lang-vars-fun): Call c-make-emacs-variables-local.
99
1002007-07-28 Eli Zaretskii <eliz@gnu.org>
101
102 * net/trampver.el: Fix the `coding' cookie.
103
1042007-07-28 Dan Nicolaescu <dann@ics.uci.edu>
105
106 * vc-git.el (vc-git-print-log): Support both the old single file
107 interface and the new one.
108
1092007-07-28 Nick Roberts <nickrob@snap.net.nz>
110
111 * bindings.el (mode-line-remote): Use updated %@ construct.
112
1132007-07-27 Stefan Monnier <monnier@iro.umontreal.ca>
114
115 * calendar/cal-bahai.el (calendar-bahai-month-name-array)
116 (calendar-bahai-epoch, calendar-bahai-leap-year-p)
117 (calendar-bahai-leap-base, calendar-bahai-prompt-for-date)
118 (diary-list-bahai-entries, diary-bahai-mark-entries)
119 (calendar-bahai-mark-date-pattern, diary-insert-bahai-entry)
120 (diary-bahai-insert-monthly-entry, diary-bahai-insert-yearly-entry):
121 New names to clean up namespace.
122 (list-bahai-diary-entries, mark-bahai-diary-entries)
123 (insert-bahai-diary-entry, insert-monthly-bahai-diary-entry)
124 (insert-yearly-bahai-diary-entry, mark-bahai-calendar-date-pattern):
125 Add compatibility aliases.
126
127 * calendar/appt.el: Don't wrap defvar within eval-when-compile.
128
129 * calendar/cal-move.el (calendar-scroll-left, calendar-scroll-right)
130 (calendar-scroll-left-three-months)
131 (calendar-scroll-right-three-months): Clean up namespace.
132 (scroll-calendar-left, scroll-calendar-right)
133 (scroll-calendar-left-three-months)
134 (scroll-calendar-right-three-months): Add compatibility aliases.
135
136 * calendar/cal-move.el (calendar-scroll-left, calendar-scroll-right):
137 Behave like mouse-scroll-calendar-* when used from the mouse.
138
139 * calendar/cal-menu.el (cal-menu-scroll-menu)
140 (cal-menu-global-mouse-menu):
141 * calendar/calendar.el (calendar-mode-map):
142 Use new calendar-scroll-* names.
143 (mouse-scroll-calendar-left, mouse-scroll-calendar-right):
144 Remove. Use calendar-scroll-* directly instead.
145
12007-07-26 Stefan Monnier <monnier@iro.umontreal.ca> 1462007-07-26 Stefan Monnier <monnier@iro.umontreal.ca>
2 147
3 * emacs-lisp/advice.el (ad-interactive-p, ad-interactive-form): Remove. 148 * emacs-lisp/advice.el (ad-interactive-p, ad-interactive-form): Remove.
diff --git a/lisp/bindings.el b/lisp/bindings.el
index 669652564d5..8a492d665a1 100644
--- a/lisp/bindings.el
+++ b/lisp/bindings.el
@@ -250,7 +250,7 @@ Normally nil in most modes, since there is no process to display.")
250 250
251(defvar mode-line-remote 251(defvar mode-line-remote
252 (list (propertize 252 (list (propertize
253 "%1R" 253 "%1@"
254 'help-echo (purecopy (lambda (window object point) 254 'help-echo (purecopy (lambda (window object point)
255 (format "%s" 255 (format "%s"
256 (save-selected-window 256 (save-selected-window
diff --git a/lisp/calendar/appt.el b/lisp/calendar/appt.el
index 7f343f300dc..94df068b012 100644
--- a/lisp/calendar/appt.el
+++ b/lisp/calendar/appt.el
@@ -531,9 +531,9 @@ The time should be in either 24 hour format or am/pm format."
531 (message ""))) 531 (message "")))
532 532
533 533
534(eval-when-compile (defvar number) 534(defvar number)
535 (defvar original-date) 535(defvar original-date)
536 (defvar diary-entries-list)) 536(defvar diary-entries-list)
537;;;###autoload 537;;;###autoload
538(defun appt-make-list () 538(defun appt-make-list ()
539 "Update the appointments list from today's diary buffer. 539 "Update the appointments list from today's diary buffer.
@@ -634,7 +634,7 @@ appointment package (if it is not already active)."
634(defun appt-sort-list (appt-list) 634(defun appt-sort-list (appt-list)
635 "Sort an appointment list, putting earlier items at the front. 635 "Sort an appointment list, putting earlier items at the front.
636APPT-LIST is a list of the same format as `appt-time-msg-list'." 636APPT-LIST is a list of the same format as `appt-time-msg-list'."
637(sort appt-list (lambda (e1 e2) (< (caar e1) (caar e2))))) 637 (sort appt-list (lambda (e1 e2) (< (caar e1) (caar e2)))))
638 638
639 639
640(defun appt-convert-time (time2conv) 640(defun appt-convert-time (time2conv)
diff --git a/lisp/calendar/cal-bahai.el b/lisp/calendar/cal-bahai.el
index e3b84539614..1657611466c 100644
--- a/lisp/calendar/cal-bahai.el
+++ b/lisp/calendar/cal-bahai.el
@@ -63,19 +63,19 @@
63 63
64(require 'cal-julian) 64(require 'cal-julian)
65 65
66(defvar bahai-calendar-month-name-array 66(defconst calendar-bahai-month-name-array
67 ["Baha" "Jalal" "Jamal" "`Azamat" "Nur" "Rahmat" "Kalimat" "Kamal" 67 ["Baha" "Jalal" "Jamal" "`Azamat" "Nur" "Rahmat" "Kalimat" "Kamal"
68 "Asma" "`Izzat" "Mashiyyat" "`Ilm" "Qudrat" "Qawl" "Masa'il" 68 "Asma" "`Izzat" "Mashiyyat" "`Ilm" "Qudrat" "Qawl" "Masa'il"
69 "Sharaf" "Sultan" "Mulk" "`Ala"]) 69 "Sharaf" "Sultan" "Mulk" "`Ala"])
70 70
71(defvar calendar-bahai-epoch (calendar-absolute-from-gregorian '(3 21 1844)) 71(defconst calendar-bahai-epoch (calendar-absolute-from-gregorian '(3 21 1844))
72 "Absolute date of start of Baha'i calendar = March 19, 622 A.D. (Julian).") 72 "Absolute date of start of Baha'i calendar = March 19, 622 A.D. (Julian).")
73 73
74(defun bahai-calendar-leap-year-p (year) 74(defun calendar-bahai-leap-year-p (year)
75 "True if YEAR is a leap year on the Baha'i calendar." 75 "True if YEAR is a leap year on the Baha'i calendar."
76 (calendar-leap-year-p (+ year 1844))) 76 (calendar-leap-year-p (+ year 1844)))
77 77
78(defvar bahai-calendar-leap-base 78(defconst calendar-bahai-leap-base
79 (+ (/ 1844 4) (- (/ 1844 100)) (/ 1844 400))) 79 (+ (/ 1844 4) (- (/ 1844 100)) (/ 1844 400)))
80 80
81(defun calendar-absolute-from-bahai (date) 81(defun calendar-absolute-from-bahai (date)
@@ -89,7 +89,7 @@ Gregorian date Sunday, December 31, 1 BC."
89 (leap-days (- (+ (/ prior-years 4) ; Leap days in prior years. 89 (leap-days (- (+ (/ prior-years 4) ; Leap days in prior years.
90 (- (/ prior-years 100)) 90 (- (/ prior-years 100))
91 (/ prior-years 400)) 91 (/ prior-years 400))
92 bahai-calendar-leap-base))) 92 calendar-bahai-leap-base)))
93 (+ (1- calendar-bahai-epoch) ; Days before epoch 93 (+ (1- calendar-bahai-epoch) ; Days before epoch
94 (* 365 (1- year)) ; Days in prior years. 94 (* 365 (1- year)) ; Days in prior years.
95 leap-days 95 leap-days
@@ -131,10 +131,10 @@ Defaults to today's date if DATE is not given."
131 (if (and (= m 19) 131 (if (and (= m 19)
132 (<= d 0)) 132 (<= d 0))
133 "Ayyam-i-Ha" 133 "Ayyam-i-Ha"
134 (aref bahai-calendar-month-name-array (1- m)))) 134 (aref calendar-bahai-month-name-array (1- m))))
135 (day (int-to-string 135 (day (int-to-string
136 (if (<= d 0) 136 (if (<= d 0)
137 (if (bahai-calendar-leap-year-p y) 137 (if (calendar-bahai-leap-year-p y)
138 (+ d 5) 138 (+ d 5)
139 (+ d 4)) 139 (+ d 4))
140 d))) 140 d)))
@@ -152,12 +152,12 @@ Defaults to today's date if DATE is not given."
152(defun calendar-goto-bahai-date (date &optional noecho) 152(defun calendar-goto-bahai-date (date &optional noecho)
153 "Move cursor to Baha'i date DATE. 153 "Move cursor to Baha'i date DATE.
154Echo Baha'i date unless NOECHO is t." 154Echo Baha'i date unless NOECHO is t."
155 (interactive (bahai-prompt-for-date)) 155 (interactive (calendar-bahai-prompt-for-date))
156 (calendar-goto-date (calendar-gregorian-from-absolute 156 (calendar-goto-date (calendar-gregorian-from-absolute
157 (calendar-absolute-from-bahai date))) 157 (calendar-absolute-from-bahai date)))
158 (or noecho (calendar-print-bahai-date))) 158 (or noecho (calendar-print-bahai-date)))
159 159
160(defun bahai-prompt-for-date () 160(defun calendar-bahai-prompt-for-date ()
161 "Ask for a Baha'i date." 161 "Ask for a Baha'i date."
162 (let* ((today (calendar-current-date)) 162 (let* ((today (calendar-current-date))
163 (year (calendar-read 163 (year (calendar-read
@@ -172,9 +172,9 @@ Echo Baha'i date unless NOECHO is t."
172 (completing-read 172 (completing-read
173 "Baha'i calendar month name: " 173 "Baha'i calendar month name: "
174 (mapcar 'list 174 (mapcar 'list
175 (append bahai-calendar-month-name-array nil)) 175 (append calendar-bahai-month-name-array nil))
176 nil t) 176 nil t)
177 (calendar-make-alist bahai-calendar-month-name-array 177 (calendar-make-alist calendar-bahai-month-name-array
178 1)))) 178 1))))
179 (day (calendar-read "Baha'i calendar day (1-19): " 179 (day (calendar-read "Baha'i calendar day (1-19): "
180 '(lambda (x) (and (< 0 x) (<= x 19)))))) 180 '(lambda (x) (and (< 0 x) (<= x 19))))))
@@ -204,7 +204,7 @@ nil if it is not visible in the current calendar window."
204 (if (calendar-date-is-visible-p date) 204 (if (calendar-date-is-visible-p date)
205 (list (list date string)))))))) 205 (list (list date string))))))))
206 206
207(defun list-bahai-diary-entries () 207(defun diary-list-bahai-entries ()
208 "Add any Baha'i date entries from the diary file to `diary-entries-list'. 208 "Add any Baha'i date entries from the diary file to `diary-entries-list'.
209Baha'i date diary entries must be prefaced by an 209Baha'i date diary entries must be prefaced by an
210`bahai-diary-entry-symbol' (normally a `B'). The same diary date 210`bahai-diary-entry-symbol' (normally a `B'). The same diary date
@@ -238,7 +238,7 @@ calendar. This function is provided for use with the
238 (calendar-day-name gdate) "\\|" 238 (calendar-day-name gdate) "\\|"
239 (substring (calendar-day-name gdate) 0 3) ".?")) 239 (substring (calendar-day-name gdate) 0 3) ".?"))
240 (calendar-month-name-array 240 (calendar-month-name-array
241 bahai-calendar-month-name-array) 241 calendar-bahai-month-name-array)
242 (monthname 242 (monthname
243 (concat 243 (concat
244 "\\*\\|" 244 "\\*\\|"
@@ -290,7 +290,7 @@ calendar. This function is provided for use with the
290 (set-buffer-modified-p diary-modified)) 290 (set-buffer-modified-p diary-modified))
291 (goto-char (point-min)))) 291 (goto-char (point-min))))
292 292
293(defun mark-bahai-diary-entries () 293(defun diary-bahai-mark-entries ()
294 "Mark days in the calendar window that have Baha'i date diary entries. 294 "Mark days in the calendar window that have Baha'i date diary entries.
295Each entry in diary-file (or included files) visible in the calendar 295Each entry in diary-file (or included files) visible in the calendar
296window is marked. Baha'i date entries are prefaced by a 296window is marked. Baha'i date entries are prefaced by a
@@ -311,7 +311,7 @@ nongregorian-diary-marking-hook."
311 (dayname (diary-name-pattern calendar-day-name-array)) 311 (dayname (diary-name-pattern calendar-day-name-array))
312 (monthname 312 (monthname
313 (concat 313 (concat
314 (diary-name-pattern bahai-calendar-month-name-array t) 314 (diary-name-pattern calendar-bahai-month-name-array t)
315 "\\|\\*")) 315 "\\|\\*"))
316 (month "[0-9]+\\|\\*") 316 (month "[0-9]+\\|\\*")
317 (day "[0-9]+\\|\\*") 317 (day "[0-9]+\\|\\*")
@@ -395,12 +395,12 @@ nongregorian-diary-marking-hook."
395 (cdr (assoc-string 395 (cdr (assoc-string
396 mm-name 396 mm-name
397 (calendar-make-alist 397 (calendar-make-alist
398 bahai-calendar-month-name-array) 398 calendar-bahai-month-name-array)
399 t))))) 399 t)))))
400 (mark-bahai-calendar-date-pattern mm dd yy))))) 400 (calendar-bahai-mark-date-pattern mm dd yy)))))
401 (setq d (cdr d))))) 401 (setq d (cdr d)))))
402 402
403(defun mark-bahai-calendar-date-pattern (month day year) 403(defun calendar-bahai-mark-date-pattern (month day year)
404 "Mark dates in calendar window that conform to Baha'i date MONTH/DAY/YEAR. 404 "Mark dates in calendar window that conform to Baha'i date MONTH/DAY/YEAR.
405A value of 0 in any position is a wildcard." 405A value of 0 in any position is a wildcard."
406 (save-excursion 406 (save-excursion
@@ -458,12 +458,12 @@ A value of 0 in any position is a wildcard."
458 (mark-visible-calendar-date 458 (mark-visible-calendar-date
459 (calendar-gregorian-from-absolute date))))))))) 459 (calendar-gregorian-from-absolute date)))))))))
460 460
461(defun insert-bahai-diary-entry (arg) 461(defun diary-insert-bahai-entry (arg)
462 "Insert a diary entry. 462 "Insert a diary entry.
463For the Baha'i date corresponding to the date indicated by point. 463For the Baha'i date corresponding to the date indicated by point.
464Prefix arg will make the entry nonmarking." 464Prefix arg will make the entry nonmarking."
465 (interactive "P") 465 (interactive "P")
466 (let* ((calendar-month-name-array bahai-calendar-month-name-array)) 466 (let* ((calendar-month-name-array calendar-bahai-month-name-array))
467 (make-diary-entry 467 (make-diary-entry
468 (concat 468 (concat
469 bahai-diary-entry-symbol 469 bahai-diary-entry-symbol
@@ -474,14 +474,14 @@ Prefix arg will make the entry nonmarking."
474 nil t)) 474 nil t))
475 arg))) 475 arg)))
476 476
477(defun insert-monthly-bahai-diary-entry (arg) 477(defun diary-bahai-insert-monthly-entry (arg)
478 "Insert a monthly diary entry. 478 "Insert a monthly diary entry.
479For the day of the Baha'i month corresponding to the date indicated by point. 479For the day of the Baha'i month corresponding to the date indicated by point.
480Prefix arg will make the entry nonmarking." 480Prefix arg will make the entry nonmarking."
481 (interactive "P") 481 (interactive "P")
482 (let* ((calendar-date-display-form 482 (let* ((calendar-date-display-form
483 (if european-calendar-style '(day " * ") '("* " day ))) 483 (if european-calendar-style '(day " * ") '("* " day )))
484 (calendar-month-name-array bahai-calendar-month-name-array)) 484 (calendar-month-name-array calendar-bahai-month-name-array))
485 (make-diary-entry 485 (make-diary-entry
486 (concat 486 (concat
487 bahai-diary-entry-symbol 487 bahai-diary-entry-symbol
@@ -491,7 +491,7 @@ Prefix arg will make the entry nonmarking."
491 (calendar-cursor-to-date t))))) 491 (calendar-cursor-to-date t)))))
492 arg))) 492 arg)))
493 493
494(defun insert-yearly-bahai-diary-entry (arg) 494(defun diary-bahai-insert-yearly-entry (arg)
495 "Insert an annual diary entry. 495 "Insert an annual diary entry.
496For the day of the Baha'i year corresponding to the date indicated by point. 496For the day of the Baha'i year corresponding to the date indicated by point.
497Prefix arg will make the entry nonmarking." 497Prefix arg will make the entry nonmarking."
@@ -500,7 +500,7 @@ Prefix arg will make the entry nonmarking."
500 (if european-calendar-style 500 (if european-calendar-style
501 '(day " " monthname) 501 '(day " " monthname)
502 '(monthname " " day))) 502 '(monthname " " day)))
503 (calendar-month-name-array bahai-calendar-month-name-array)) 503 (calendar-month-name-array calendar-bahai-month-name-array))
504 (make-diary-entry 504 (make-diary-entry
505 (concat 505 (concat
506 bahai-diary-entry-symbol 506 bahai-diary-entry-symbol
@@ -510,7 +510,21 @@ Prefix arg will make the entry nonmarking."
510 (calendar-cursor-to-date t))))) 510 (calendar-cursor-to-date t)))))
511 arg))) 511 arg)))
512 512
513;; Backward compatibility.
514(define-obsolete-function-alias
515 'list-bahai-diary-entries 'diary-list-bahai-entries "23.1")
516(define-obsolete-function-alias
517 'mark-bahai-diary-entries 'diary-mark-bahai-entries "23.1")
518(define-obsolete-function-alias
519 'insert-bahai-diary-entry 'diary-insert-bahai-entry "23.1")
520(define-obsolete-function-alias
521 'insert-monthly-bahai-diary-entry 'diary-insert-bahai-monthly-entry "23.1")
522(define-obsolete-function-alias
523 'insert-yearly-bahai-diary-entry 'diary-insert-bahai-yearly-entry "23.1")
524(define-obsolete-function-alias
525 'mark-bahai-calendar-date-pattern 'calendar-bahai-mark-date-pattern "23.1")
526
513(provide 'cal-bahai) 527(provide 'cal-bahai)
514 528
515;;; arch-tag: c1cb1d67-862a-4264-a01c-41cb4df01f14 529;; arch-tag: c1cb1d67-862a-4264-a01c-41cb4df01f14
516;;; cal-bahai.el ends here 530;;; cal-bahai.el ends here
diff --git a/lisp/calendar/cal-menu.el b/lisp/calendar/cal-menu.el
index 40cf158dcd6..1f4e4df736f 100644
--- a/lisp/calendar/cal-menu.el
+++ b/lisp/calendar/cal-menu.el
@@ -33,7 +33,6 @@
33 33
34;;; Code: 34;;; Code:
35 35
36(defvar displayed-month)
37(defvar displayed-year) 36(defvar displayed-year)
38 37
39(defconst cal-menu-moon-menu 38(defconst cal-menu-moon-menu
@@ -140,11 +139,11 @@
140 139
141(defconst cal-menu-scroll-menu 140(defconst cal-menu-scroll-menu
142 '("Scroll" 141 '("Scroll"
143 ["Forward 1 Month" scroll-calendar-left] 142 ["Forward 1 Month" calendar-scroll-left]
144 ["Forward 3 Months" scroll-calendar-left-three-months] 143 ["Forward 3 Months" calendar-scroll-left-three-months]
145 ["Forward 1 Year" "4\C-v"] 144 ["Forward 1 Year" "4\C-v"]
146 ["Backward 1 Month" scroll-calendar-right] 145 ["Backward 1 Month" calendar-scroll-right]
147 ["Backward 3 Months" scroll-calendar-right-three-months] 146 ["Backward 3 Months" calendar-scroll-right-three-months]
148 ["Backward 1 Year" "4\ev"])) 147 ["Backward 1 Year" "4\ev"]))
149 148
150(defun cal-menu-x-popup-menu (position menu) 149(defun cal-menu-x-popup-menu (position menu)
@@ -459,8 +458,8 @@ The output is in landscape format, one month to a page."
459(easy-menu-define cal-menu-global-mouse-menu nil 458(easy-menu-define cal-menu-global-mouse-menu nil
460 "Menu bound to a mouse event, not specific to the mouse-click location." 459 "Menu bound to a mouse event, not specific to the mouse-click location."
461 '("Calendar" 460 '("Calendar"
462 ["Scroll forward" scroll-calendar-left-three-months] 461 ["Scroll forward" calendar-scroll-left-three-months]
463 ["Scroll backward" scroll-calendar-right-three-months] 462 ["Scroll backward" calendar-scroll-right-three-months]
464 ["Mark diary entries" mark-diary-entries] 463 ["Mark diary entries" mark-diary-entries]
465 ["List holidays" list-calendar-holidays] 464 ["List holidays" list-calendar-holidays]
466 ["Mark holidays" mark-calendar-holidays] 465 ["Mark holidays" mark-calendar-holidays]
diff --git a/lisp/calendar/cal-move.el b/lisp/calendar/cal-move.el
index 02760b34e93..81f75114a3f 100644
--- a/lisp/calendar/cal-move.el
+++ b/lisp/calendar/cal-move.el
@@ -85,47 +85,51 @@ Movement is forward is ARG is negative."
85 (interactive "p") 85 (interactive "p")
86 (calendar-forward-month (* -12 arg))) 86 (calendar-forward-month (* -12 arg)))
87 87
88(defun scroll-calendar-left (&optional arg) 88(defun calendar-scroll-left (&optional arg event)
89 "Scroll the displayed calendar left by ARG months. 89 "Scroll the displayed calendar left by ARG months.
90If ARG is negative the calendar is scrolled right. Maintains the relative 90If ARG is negative the calendar is scrolled right. Maintains the relative
91position of the cursor with respect to the calendar as well as possible." 91position of the cursor with respect to the calendar as well as possible."
92 (interactive "p") 92 (interactive (list (prefix-numeric-value current-prefix-arg)
93 last-nonmenu-event))
93 (unless arg (setq arg 1)) 94 (unless arg (setq arg 1))
94 (calendar-cursor-to-nearest-date) 95 (save-selected-window
95 (let ((old-date (calendar-cursor-to-date)) 96 (select-window (posn-window (event-start event)))
96 (today (calendar-current-date))) 97 (calendar-cursor-to-nearest-date)
97 (if (/= arg 0) 98 (let ((old-date (calendar-cursor-to-date))
98 (let ((month displayed-month) 99 (today (calendar-current-date)))
99 (year displayed-year)) 100 (if (/= arg 0)
100 (increment-calendar-month month year arg) 101 (let ((month displayed-month)
101 (generate-calendar-window month year) 102 (year displayed-year))
102 (calendar-cursor-to-visible-date 103 (increment-calendar-month month year arg)
103 (cond 104 (generate-calendar-window month year)
104 ((calendar-date-is-visible-p old-date) old-date) 105 (calendar-cursor-to-visible-date
105 ((calendar-date-is-visible-p today) today) 106 (cond
106 (t (list month 1 year))))))) 107 ((calendar-date-is-visible-p old-date) old-date)
107 (run-hooks 'calendar-move-hook)) 108 ((calendar-date-is-visible-p today) today)
108 109 (t (list month 1 year)))))))
109(defun scroll-calendar-right (&optional arg) 110 (run-hooks 'calendar-move-hook)))
111
112(defun calendar-scroll-right (&optional arg event)
110 "Scroll the displayed calendar window right by ARG months. 113 "Scroll the displayed calendar window right by ARG months.
111If ARG is negative the calendar is scrolled left. Maintains the relative 114If ARG is negative the calendar is scrolled left. Maintains the relative
112position of the cursor with respect to the calendar as well as possible." 115position of the cursor with respect to the calendar as well as possible."
113 (interactive "p") 116 (interactive (list (prefix-numeric-value current-prefix-arg)
114 (scroll-calendar-left (- (or arg 1)))) 117 last-nonmenu-event))
118 (calendar-scroll-left (- (or arg 1)) event))
115 119
116(defun scroll-calendar-left-three-months (arg) 120(defun calendar-scroll-left-three-months (arg)
117 "Scroll the displayed calendar window left by 3*ARG months. 121 "Scroll the displayed calendar window left by 3*ARG months.
118If ARG is negative the calendar is scrolled right. Maintains the relative 122If ARG is negative the calendar is scrolled right. Maintains the relative
119position of the cursor with respect to the calendar as well as possible." 123position of the cursor with respect to the calendar as well as possible."
120 (interactive "p") 124 (interactive "p")
121 (scroll-calendar-left (* 3 arg))) 125 (calendar-scroll-left (* 3 arg)))
122 126
123(defun scroll-calendar-right-three-months (arg) 127(defun calendar-scroll-right-three-months (arg)
124 "Scroll the displayed calendar window right by 3*ARG months. 128 "Scroll the displayed calendar window right by 3*ARG months.
125If ARG is negative the calendar is scrolled left. Maintains the relative 129If ARG is negative the calendar is scrolled left. Maintains the relative
126position of the cursor with respect to the calendar as well as possible." 130position of the cursor with respect to the calendar as well as possible."
127 (interactive "p") 131 (interactive "p")
128 (scroll-calendar-left (* -3 arg))) 132 (calendar-scroll-left (* -3 arg)))
129 133
130(defun calendar-cursor-to-nearest-date () 134(defun calendar-cursor-to-nearest-date ()
131 "Move the cursor to the closest date. 135 "Move the cursor to the closest date.
@@ -345,7 +349,17 @@ Negative DAY counts backward from end of year."
345 (+ 1 day (calendar-absolute-from-gregorian (list 12 31 year)))))) 349 (+ 1 day (calendar-absolute-from-gregorian (list 12 31 year))))))
346 (or noecho (calendar-print-day-of-year))) 350 (or noecho (calendar-print-day-of-year)))
347 351
352;; Backward compatibility.
353(define-obsolete-function-alias
354 'scroll-calendar-left 'calendar-scroll-left "23.1")
355(define-obsolete-function-alias
356 'scroll-calendar-right 'calendar-scroll-right "23.1")
357(define-obsolete-function-alias
358 'scroll-calendar-left-three-months 'calendar-scroll-left-three-months "23.1")
359(define-obsolete-function-alias
360 'scroll-calendar-right-three-months 'calendar-scroll-right-three-months "23.1")
361
348(provide 'cal-move) 362(provide 'cal-move)
349 363
350;;; arch-tag: d0883c46-7e16-4914-8ff8-8f67e699b781 364;; arch-tag: d0883c46-7e16-4914-8ff8-8f67e699b781
351;;; cal-move.el ends here 365;;; cal-move.el ends here
diff --git a/lisp/calendar/calendar.el b/lisp/calendar/calendar.el
index c8c27703f8e..7611e40f8ef 100644
--- a/lisp/calendar/calendar.el
+++ b/lisp/calendar/calendar.el
@@ -1493,19 +1493,19 @@ return negative results."
1493 "Move the cursor backward ARG years." 1493 "Move the cursor backward ARG years."
1494 t) 1494 t)
1495 1495
1496(autoload 'scroll-calendar-left "cal-move" 1496(autoload 'calendar-scroll-left "cal-move"
1497 "Scroll the displayed calendar left by ARG months." 1497 "Scroll the displayed calendar left by ARG months."
1498 t) 1498 t)
1499 1499
1500(autoload 'scroll-calendar-right "cal-move" 1500(autoload 'calendar-scroll-right "cal-move"
1501 "Scroll the displayed calendar window right by ARG months." 1501 "Scroll the displayed calendar window right by ARG months."
1502 t) 1502 t)
1503 1503
1504(autoload 'scroll-calendar-left-three-months "cal-move" 1504(autoload 'calendar-scroll-left-three-months "cal-move"
1505 "Scroll the displayed calendar window left by 3*ARG months." 1505 "Scroll the displayed calendar window left by 3*ARG months."
1506 t) 1506 t)
1507 1507
1508(autoload 'scroll-calendar-right-three-months "cal-move" 1508(autoload 'calendar-scroll-right-three-months "cal-move"
1509 "Scroll the displayed calendar window right by 3*ARG months." 1509 "Scroll the displayed calendar window right by 3*ARG months."
1510 t) 1510 t)
1511 1511
@@ -1678,10 +1678,10 @@ to be replaced by asterisks to highlight it whenever it is in the window."
1678 ;; not a legal date for the visible test in the diary section. 1678 ;; not a legal date for the visible test in the diary section.
1679 (if arg (setcar (cdr date) 1)) 1679 (if arg (setcar (cdr date) 1))
1680 (increment-calendar-month month year (- calendar-offset)) 1680 (increment-calendar-month month year (- calendar-offset))
1681 (generate-calendar-window month year) 1681 ;; Display the buffer before calling generate-calendar-window so that it
1682 ;; Display the buffer *after* generating it, so that menu entries that 1682 ;; can get a chance to adjust the window sizes to the frame size.
1683 ;; use display-month do not fail when creating the new frame.
1684 (pop-to-buffer calendar-buffer) 1683 (pop-to-buffer calendar-buffer)
1684 (generate-calendar-window month year)
1685 (if (and view-diary-entries-initially (calendar-date-is-visible-p date)) 1685 (if (and view-diary-entries-initially (calendar-date-is-visible-p date))
1686 (diary-view-entries))) 1686 (diary-view-entries)))
1687 (let* ((diary-buffer (get-file-buffer diary-file)) 1687 (let* ((diary-buffer (get-file-buffer diary-file))
@@ -2060,7 +2060,7 @@ existing output files are overwritten." t)
2060(defun generate-calendar-window (&optional mon yr) 2060(defun generate-calendar-window (&optional mon yr)
2061 "Generate the calendar window for the current date. 2061 "Generate the calendar window for the current date.
2062Or, for optional MON, YR." 2062Or, for optional MON, YR."
2063 (let* ((buffer-read-only nil) 2063 (let* ((inhibit-read-only t)
2064 (today (calendar-current-date)) 2064 (today (calendar-current-date))
2065 (month (extract-calendar-month today)) 2065 (month (extract-calendar-month today))
2066 (day (extract-calendar-day today)) 2066 (day (extract-calendar-day today))
@@ -2072,10 +2072,8 @@ Or, for optional MON, YR."
2072 (day-in-week (calendar-day-of-week today)) 2072 (day-in-week (calendar-day-of-week today))
2073 (in-calendar-window (eq (window-buffer (selected-window)) 2073 (in-calendar-window (eq (window-buffer (selected-window))
2074 (get-buffer calendar-buffer)))) 2074 (get-buffer calendar-buffer))))
2075 (generate-calendar (or mon month) (or yr year))
2075 (update-calendar-mode-line) 2076 (update-calendar-mode-line)
2076 (if mon
2077 (generate-calendar mon yr)
2078 (generate-calendar month year))
2079 (calendar-cursor-to-visible-date 2077 (calendar-cursor-to-visible-date
2080 (if today-visible today (list displayed-month 1 displayed-year))) 2078 (if today-visible today (list displayed-month 1 displayed-year)))
2081 (set-buffer-modified-p nil) 2079 (set-buffer-modified-p nil)
@@ -2224,14 +2222,14 @@ movement commands will not work correctly."
2224 downcase-region upcase-region kill-region 2222 downcase-region upcase-region kill-region
2225 copy-region-as-kill capitalize-region write-region)) 2223 copy-region-as-kill capitalize-region write-region))
2226 (define-key map (vector 'remap c) 'calendar-not-implemented)) 2224 (define-key map (vector 'remap c) 'calendar-not-implemented))
2227 (define-key map "<" 'scroll-calendar-right) 2225 (define-key map "<" 'calendar-scroll-right)
2228 (define-key map "\C-x<" 'scroll-calendar-right) 2226 (define-key map "\C-x<" 'calendar-scroll-right)
2229 (define-key map [prior] 'scroll-calendar-right-three-months) 2227 (define-key map [prior] 'calendar-scroll-right-three-months)
2230 (define-key map "\ev" 'scroll-calendar-right-three-months) 2228 (define-key map "\ev" 'calendar-scroll-right-three-months)
2231 (define-key map ">" 'scroll-calendar-left) 2229 (define-key map ">" 'calendar-scroll-left)
2232 (define-key map "\C-x>" 'scroll-calendar-left) 2230 (define-key map "\C-x>" 'calendar-scroll-left)
2233 (define-key map [next] 'scroll-calendar-left-three-months) 2231 (define-key map [next] 'calendar-scroll-left-three-months)
2234 (define-key map "\C-v" 'scroll-calendar-left-three-months) 2232 (define-key map "\C-v" 'calendar-scroll-left-three-months)
2235 (define-key map "\C-b" 'calendar-backward-day) 2233 (define-key map "\C-b" 'calendar-backward-day)
2236 (define-key map "\C-p" 'calendar-backward-week) 2234 (define-key map "\C-p" 'calendar-backward-week)
2237 (define-key map "\e{" 'calendar-backward-month) 2235 (define-key map "\e{" 'calendar-backward-month)
@@ -2383,7 +2381,7 @@ movement commands will not work correctly."
2383 'help-echo "mouse-1: previous month" 2381 'help-echo "mouse-1: previous month"
2384 'mouse-face 'mode-line-highlight 2382 'mouse-face 'mode-line-highlight
2385 'keymap (make-mode-line-mouse-map 'mouse-1 2383 'keymap (make-mode-line-mouse-map 'mouse-1
2386 'mouse-scroll-calendar-right)) 2384 'calendar-scroll-right))
2387 "Calendar" 2385 "Calendar"
2388 (concat 2386 (concat
2389 (propertize 2387 (propertize
@@ -2412,7 +2410,7 @@ movement commands will not work correctly."
2412 'help-echo "mouse-1: next month" 2410 'help-echo "mouse-1: next month"
2413 'mouse-face 'mode-line-highlight 2411 'mouse-face 'mode-line-highlight
2414 'keymap (make-mode-line-mouse-map 2412 'keymap (make-mode-line-mouse-map
2415 'mouse-1 'mouse-scroll-calendar-left))) 2413 'mouse-1 'calendar-scroll-left)))
2416 "The mode line of the calendar buffer. 2414 "The mode line of the calendar buffer.
2417 2415
2418This must be a list of items that evaluate to strings--those strings are 2416This must be a list of items that evaluate to strings--those strings are
@@ -2439,24 +2437,6 @@ under the cursor:
2439 (extract-calendar-year iso-date))) 2437 (extract-calendar-year iso-date)))
2440 \"\"))") 2438 \"\"))")
2441 2439
2442(defun mouse-scroll-calendar-left (event)
2443 "Scroll the displayed calendar left by one month.
2444Maintains the relative position of the cursor
2445with respect to the calendar as well as possible."
2446 (interactive "e")
2447 (save-selected-window
2448 (select-window (posn-window (event-start event)))
2449 (scroll-calendar-left 1)))
2450
2451(defun mouse-scroll-calendar-right (event)
2452 "Scroll the displayed calendar right by one month.
2453Maintains the relative position of the cursor
2454with respect to the calendar as well as possible."
2455 (interactive "e")
2456 (save-selected-window
2457 (select-window (posn-window (event-start event)))
2458 (scroll-calendar-right 1)))
2459
2460(defun mouse-calendar-other-month (event) 2440(defun mouse-calendar-other-month (event)
2461 "Display a three-month calendar centered around a specified month and year." 2441 "Display a three-month calendar centered around a specified month and year."
2462 (interactive "e") 2442 (interactive "e")
@@ -2493,8 +2473,13 @@ For a complete description, type \
2493 (setq indent-tabs-mode nil) 2473 (setq indent-tabs-mode nil)
2494 (update-calendar-mode-line) 2474 (update-calendar-mode-line)
2495 (make-local-variable 'calendar-mark-ring) 2475 (make-local-variable 'calendar-mark-ring)
2496 (make-local-variable 'displayed-month);; Month in middle of window. 2476 (make-local-variable 'displayed-month) ;; Month in middle of window.
2497 (make-local-variable 'displayed-year) ;; Year in middle of window. 2477 (make-local-variable 'displayed-year) ;; Year in middle of window.
2478 ;; Most functions only work if displayed-month and displayed-year are set,
2479 ;; so let's make sure they're always set. Most likely, this will be reset
2480 ;; soon in generate-calendar, but better safe than sorry.
2481 (unless (boundp 'displayed-month) (setq displayed-month 1))
2482 (unless (boundp 'displayed-year) (setq displayed-year 2001))
2498 (set (make-local-variable 'font-lock-defaults) 2483 (set (make-local-variable 'font-lock-defaults)
2499 '(calendar-font-lock-keywords t)) 2484 '(calendar-font-lock-keywords t))
2500 (run-mode-hooks 'calendar-mode-hook)) 2485 (run-mode-hooks 'calendar-mode-hook))
diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el
index 203129b410c..ff86711e041 100644
--- a/lisp/cus-edit.el
+++ b/lisp/cus-edit.el
@@ -141,9 +141,9 @@
141 141
142(require 'cus-face) 142(require 'cus-face)
143(require 'wid-edit) 143(require 'wid-edit)
144(eval-when-compile 144
145 (defvar custom-versions-load-alist) ; from cus-load 145(defvar custom-versions-load-alist) ; from cus-load
146 (defvar recentf-exclude)) ; from recentf.el 146(defvar recentf-exclude) ; from recentf.el
147 147
148(condition-case nil 148(condition-case nil
149 (require 'cus-load) 149 (require 'cus-load)
@@ -1032,22 +1032,20 @@ then prompt for the MODE to customize."
1032 t nil nil (if group (symbol-name major-mode)))))))) 1032 t nil nil (if group (symbol-name major-mode))))))))
1033 (customize-group (custom-group-of-mode mode))) 1033 (customize-group (custom-group-of-mode mode)))
1034 1034
1035(defun customize-read-group ()
1036 (let ((completion-ignore-case t))
1037 (completing-read "Customize group (default emacs): "
1038 obarray
1039 (lambda (symbol)
1040 (or (and (get symbol 'custom-loads)
1041 (not (get symbol 'custom-autoload)))
1042 (get symbol 'custom-group)))
1043 t)))
1035 1044
1036;;;###autoload 1045;;;###autoload
1037(defun customize-group (&optional group prompt-for-group other-window) 1046(defun customize-group (&optional group)
1038 "Customize GROUP, which must be a customization group." 1047 "Customize GROUP, which must be a customization group."
1039 (interactive) 1048 (interactive (list (customize-read-group)))
1040 (and (null group)
1041 (or prompt-for-group (called-interactively-p))
1042 (let ((completion-ignore-case t))
1043 (setq group
1044 (completing-read "Customize group (default emacs): "
1045 obarray
1046 (lambda (symbol)
1047 (or (and (get symbol 'custom-loads)
1048 (not (get symbol 'custom-autoload)))
1049 (get symbol 'custom-group)))
1050 t))))
1051 (when (stringp group) 1049 (when (stringp group)
1052 (if (string-equal "" group) 1050 (if (string-equal "" group)
1053 (setq group 'emacs) 1051 (setq group 'emacs)
@@ -1055,25 +1053,21 @@ then prompt for the MODE to customize."
1055 (let ((name (format "*Customize Group: %s*" 1053 (let ((name (format "*Customize Group: %s*"
1056 (custom-unlispify-tag-name group)))) 1054 (custom-unlispify-tag-name group))))
1057 (if (get-buffer name) 1055 (if (get-buffer name)
1058 (if other-window 1056 (pop-to-buffer name)
1059 (let ((pop-up-windows t) 1057 (custom-buffer-create
1060 (same-window-buffer-names nil) 1058 (list (list group 'custom-group))
1061 (same-window-regexps nil)) 1059 name
1062 (pop-to-buffer name)) 1060 (concat " for group "
1063 (pop-to-buffer name)) 1061 (custom-unlispify-tag-name group))))))
1064 (funcall (if other-window
1065 'custom-buffer-create-other-window
1066 'custom-buffer-create)
1067 (list (list group 'custom-group))
1068 name
1069 (concat " for group "
1070 (custom-unlispify-tag-name group))))))
1071 1062
1072;;;###autoload 1063;;;###autoload
1073(defun customize-group-other-window (&optional group) 1064(defun customize-group-other-window (&optional group)
1074 "Customize GROUP, which must be a customization group, in another window." 1065 "Customize GROUP, which must be a customization group, in another window."
1075 (interactive) 1066 (interactive (list (customize-read-group)))
1076 (customize-group group t t)) 1067 (let ((pop-up-windows t)
1068 (same-window-buffer-names nil)
1069 (same-window-regexps nil))
1070 (customize-group group)))
1077 1071
1078;;;###autoload 1072;;;###autoload
1079(defalias 'customize-variable 'customize-option) 1073(defalias 'customize-variable 'customize-option)
@@ -1254,41 +1248,33 @@ Emacs that is associated with version VERSION of PACKAGE."
1254 (< minor1 minor2))))) 1248 (< minor1 minor2)))))
1255 1249
1256;;;###autoload 1250;;;###autoload
1257(defun customize-face (&optional face prompt-for-face other-window) 1251(defun customize-face (&optional face)
1258 "Customize FACE, which should be a face name or nil. 1252 "Customize FACE, which should be a face name or nil.
1259If FACE is nil, customize all faces. If FACE is actually a 1253If FACE is nil, customize all faces. If FACE is actually a
1260face-alias, customize the face it is aliased to. 1254face-alias, customize the face it is aliased to.
1261 1255
1262Interactively, when point is on text which has a face specified, 1256Interactively, when point is on text which has a face specified,
1263suggest to customize that face, if it's customizable." 1257suggest to customize that face, if it's customizable."
1264 (interactive) 1258 (interactive (list (read-face-name "Customize face" "all faces" t)))
1265 (and (null face)
1266 (or prompt-for-face (called-interactively-p))
1267 (setq face (read-face-name "Customize face" "all faces" t)))
1268 (if (member face '(nil "")) 1259 (if (member face '(nil ""))
1269 (setq face (face-list))) 1260 (setq face (face-list)))
1270 (if (and (listp face) (null (cdr face))) 1261 (if (and (listp face) (null (cdr face)))
1271 (setq face (car face))) 1262 (setq face (car face)))
1272 (let ((create-buffer-fn (if other-window 1263 (if (listp face)
1273 'custom-buffer-create-other-window 1264 (custom-buffer-create
1274 'custom-buffer-create))) 1265 (custom-sort-items
1275 (if (listp face) 1266 (mapcar (lambda (s) (list s 'custom-face)) face)
1276 (funcall create-buffer-fn 1267 t nil)
1277 (custom-sort-items 1268 "*Customize Faces*")
1278 (mapcar (lambda (s) 1269 ;; If FACE is actually an alias, customize the face it is aliased to.
1279 (list s 'custom-face)) 1270 (if (get face 'face-alias)
1280 face) 1271 (setq face (get face 'face-alias)))
1281 t nil) 1272 (unless (facep face)
1282 "*Customize Faces*") 1273 (error "Invalid face %S" face))
1283 ;; If FACE is actually an alias, customize the face it is aliased to. 1274 (custom-buffer-create
1284 (if (get face 'face-alias) 1275 (list (list face 'custom-face))
1285 (setq face (get face 'face-alias))) 1276 (format "*Customize Face: %s*"
1286 (unless (facep face) 1277 (custom-unlispify-tag-name face)))))
1287 (error "Invalid face %S" face))
1288 (funcall create-buffer-fn
1289 (list (list face 'custom-face))
1290 (format "*Customize Face: %s*"
1291 (custom-unlispify-tag-name face))))))
1292 1278
1293;;;###autoload 1279;;;###autoload
1294(defun customize-face-other-window (&optional face) 1280(defun customize-face-other-window (&optional face)
@@ -1297,8 +1283,11 @@ If FACE is actually a face-alias, customize the face it is aliased to.
1297 1283
1298Interactively, when point is on text which has a face specified, 1284Interactively, when point is on text which has a face specified,
1299suggest to customize that face, if it's customizable." 1285suggest to customize that face, if it's customizable."
1300 (interactive) 1286 (interactive (list (read-face-name "Customize face" "all faces" t)))
1301 (customize-face face t t)) 1287 (let ((pop-up-windows t)
1288 (same-window-buffer-names nil)
1289 (same-window-regexps nil))
1290 (customize-face face)))
1302 1291
1303(defalias 'customize-customized 'customize-unsaved) 1292(defalias 'customize-customized 'customize-unsaved)
1304 1293
@@ -4025,7 +4014,7 @@ Optional EVENT is the location for the menu."
4025 4014
4026(defun custom-group-save (widget) 4015(defun custom-group-save (widget)
4027 "Save all modified group members." 4016 "Save all modified group members."
4028 (dolist (child (children (widget-get widget :children))) 4017 (dolist (child (widget-get widget :children))
4029 (when (memq (widget-get child :custom-state) '(modified set)) 4018 (when (memq (widget-get child :custom-state) '(modified set))
4030 (widget-apply child :custom-save)))) 4019 (widget-apply child :custom-save))))
4031 4020
diff --git a/lisp/dired.el b/lisp/dired.el
index 12180856023..1a906093a7a 100644
--- a/lisp/dired.el
+++ b/lisp/dired.el
@@ -1247,7 +1247,7 @@ Do so according to the former subdir alist OLD-SUBDIR-ALIST."
1247 (define-key map "$" 'dired-hide-subdir) 1247 (define-key map "$" 'dired-hide-subdir)
1248 (define-key map "\M-$" 'dired-hide-all) 1248 (define-key map "\M-$" 'dired-hide-all)
1249 ;; misc 1249 ;; misc
1250 (define-key map "\C-x\C-q" 'wdired-change-to-wdired-mode) 1250 (define-key map "\C-x\C-q" 'dired-toggle-read-only)
1251 (define-key map "?" 'dired-summary) 1251 (define-key map "?" 'dired-summary)
1252 (define-key map "\177" 'dired-unmark-backward) 1252 (define-key map "\177" 'dired-unmark-backward)
1253 (define-key map [remap undo] 'dired-undo) 1253 (define-key map [remap undo] 'dired-undo)
@@ -1353,7 +1353,8 @@ Do so according to the former subdir alist OLD-SUBDIR-ALIST."
1353 (define-key map [menu-bar immediate create-directory] 1353 (define-key map [menu-bar immediate create-directory]
1354 '(menu-item "Create Directory..." dired-create-directory)) 1354 '(menu-item "Create Directory..." dired-create-directory))
1355 (define-key map [menu-bar immediate wdired-mode] 1355 (define-key map [menu-bar immediate wdired-mode]
1356 '(menu-item "Edit File Names" wdired-change-to-wdired-mode)) 1356 '(menu-item "Edit File Names" wdired-change-to-wdired-mode
1357 :filter (lambda (x) (if (eq major-mode 'dired-mode) x))))
1357 1358
1358 (define-key map [menu-bar regexp] 1359 (define-key map [menu-bar regexp]
1359 (cons "Regexp" (make-sparse-keymap "Regexp"))) 1360 (cons "Regexp" (make-sparse-keymap "Regexp")))
@@ -1656,6 +1657,16 @@ You can use it to recover marks, killed lines or subdirs."
1656 (message "Change in dired buffer undone. 1657 (message "Change in dired buffer undone.
1657Actual changes in files cannot be undone by Emacs.")) 1658Actual changes in files cannot be undone by Emacs."))
1658 1659
1660(defun dired-toggle-read-only ()
1661 "Edit dired buffer with Wdired, or set it read-only.
1662Call `wdired-change-to-wdired-mode' in dired buffers whose editing is
1663supported by Wdired (the major mode of the dired buffer is `dired-mode').
1664Otherwise, for buffers inheriting from dired-mode, call `toggle-read-only'."
1665 (interactive)
1666 (if (eq major-mode 'dired-mode)
1667 (wdired-change-to-wdired-mode)
1668 (toggle-read-only)))
1669
1659(defun dired-next-line (arg) 1670(defun dired-next-line (arg)
1660 "Move down lines then position at filename. 1671 "Move down lines then position at filename.
1661Optional prefix ARG says how many lines to move; default is one line." 1672Optional prefix ARG says how many lines to move; default is one line."
@@ -2360,7 +2371,7 @@ Optional argument means return a file name relative to `default-directory'."
2360 2371
2361;; Deleting files 2372;; Deleting files
2362 2373
2363(defcustom dired-recursive-deletes 'top ; Default only delete empty directories. 2374(defcustom dired-recursive-deletes 'top
2364 "*Decide whether recursive deletes are allowed. 2375 "*Decide whether recursive deletes are allowed.
2365A value of nil means no recursive deletes. 2376A value of nil means no recursive deletes.
2366`always' means delete recursively without asking. This is DANGEROUS! 2377`always' means delete recursively without asking. This is DANGEROUS!
@@ -2409,8 +2420,8 @@ Anything else, ask for each sub-directory."
2409 "In Dired, delete the files flagged for deletion. 2420 "In Dired, delete the files flagged for deletion.
2410If NOMESSAGE is non-nil, we don't display any message 2421If NOMESSAGE is non-nil, we don't display any message
2411if there are no flagged files. 2422if there are no flagged files.
2412`dired-recursive-deletes' controls whether 2423`dired-recursive-deletes' controls whether deletion of
2413deletion of non-empty directories is allowed." 2424non-empty directories is allowed."
2414 (interactive) 2425 (interactive)
2415 (let* ((dired-marker-char dired-del-marker) 2426 (let* ((dired-marker-char dired-del-marker)
2416 (regexp (dired-marker-regexp)) 2427 (regexp (dired-marker-regexp))
@@ -2427,8 +2438,8 @@ deletion of non-empty directories is allowed."
2427 2438
2428(defun dired-do-delete (&optional arg) 2439(defun dired-do-delete (&optional arg)
2429 "Delete all marked (or next ARG) files. 2440 "Delete all marked (or next ARG) files.
2430`dired-recursive-deletes' controls whether 2441`dired-recursive-deletes' controls whether deletion of
2431deletion of non-empty directories is allowed." 2442non-empty directories is allowed."
2432 ;; This is more consistent with the file marking feature than 2443 ;; This is more consistent with the file marking feature than
2433 ;; dired-do-flagged-delete. 2444 ;; dired-do-flagged-delete.
2434 (interactive "P") 2445 (interactive "P")
diff --git a/lisp/emacs-lisp/advice.el b/lisp/emacs-lisp/advice.el
index c6e80453d72..dbebf314798 100644
--- a/lisp/emacs-lisp/advice.el
+++ b/lisp/emacs-lisp/advice.el
@@ -2586,13 +2586,21 @@ that property, or otherwise use `(&rest ad-subr-args)'."
2586 (natnump docstring)) 2586 (natnump docstring))
2587 docstring))) 2587 docstring)))
2588 2588
2589(defun ad-interactive-form (definition)
2590 "Return the interactive form of DEFINITION.
2591Like `interactive-form', but also works on pieces of advice."
2592 (interactive-form
2593 (if (ad-advice-p definition)
2594 (ad-lambda-expression definition)
2595 definition)))
2596
2589(defun ad-body-forms (definition) 2597(defun ad-body-forms (definition)
2590 "Return the list of body forms of DEFINITION." 2598 "Return the list of body forms of DEFINITION."
2591 (cond ((ad-compiled-p definition) 2599 (cond ((ad-compiled-p definition)
2592 nil) 2600 nil)
2593 ((consp definition) 2601 ((consp definition)
2594 (nthcdr (+ (if (ad-docstring definition) 1 0) 2602 (nthcdr (+ (if (ad-docstring definition) 1 0)
2595 (if (interactive-form definition) 1 0)) 2603 (if (ad-interactive-form definition) 1 0))
2596 (cdr (cdr (ad-lambda-expression definition))))))) 2604 (cdr (cdr (ad-lambda-expression definition)))))))
2597 2605
2598;; Matches the docstring of an advised definition. 2606;; Matches the docstring of an advised definition.
@@ -3024,7 +3032,7 @@ in any of these classes."
3024 (ad-get-enabled-advices function 'around) 3032 (ad-get-enabled-advices function 'around)
3025 (ad-get-enabled-advices function 'after))) 3033 (ad-get-enabled-advices function 'after)))
3026 (let ((interactive-form 3034 (let ((interactive-form
3027 (interactive-form (ad-advice-definition advice)))) 3035 (ad-interactive-form (ad-advice-definition advice))))
3028 (if interactive-form 3036 (if interactive-form
3029 ;; We found the first one, use it: 3037 ;; We found the first one, use it:
3030 (ad-do-return interactive-form))))) 3038 (ad-do-return interactive-form)))))
diff --git a/lisp/emacs-lisp/copyright.el b/lisp/emacs-lisp/copyright.el
index 0931ba8635c..7538439d76c 100644
--- a/lisp/emacs-lisp/copyright.el
+++ b/lisp/emacs-lisp/copyright.el
@@ -44,9 +44,9 @@ A value of nil means to search whole buffer."
44 (const :tag "No limit"))) 44 (const :tag "No limit")))
45 45
46(defcustom copyright-regexp 46(defcustom copyright-regexp
47 "\\(©\|@copyright{}\\|[Cc]opyright\\s *:?\\s *\\(?:(C)\\)?\ 47 "\\(©\\|@copyright{}\\|[Cc]opyright\\s *:?\\s *\\(?:(C)\\)?\
48\\|[Cc]opyright\\s *:?\\s *©\\)\ 48\\|[Cc]opyright\\s *:?\\s *©\\)\
49\\s *\\([1-9]\\([-0-9, ';\n\t]\\|\\s<\\|\\s>\\)*[0-9]+\\)" 49\\s *\\([1-9]\\([-0-9, ';/*%#\n\t]\\|\\s<\\|\\s>\\)*[0-9]+\\)"
50 "What your copyright notice looks like. 50 "What your copyright notice looks like.
51The second \\( \\) construct must match the years." 51The second \\( \\) construct must match the years."
52 :group 'copyright 52 :group 'copyright
@@ -93,7 +93,8 @@ When this is `function', only ask when called non-interactively."
93 (re-search-forward (concat "\\(" copyright-regexp 93 (re-search-forward (concat "\\(" copyright-regexp
94 "\\)\\([ \t]*\n\\)?.*\\(?:" 94 "\\)\\([ \t]*\n\\)?.*\\(?:"
95 copyright-names-regexp "\\)") 95 copyright-names-regexp "\\)")
96 (+ (point) copyright-limit) t) 96 (if copyright-limit (+ (point) copyright-limit))
97 t)
97 ;; In case the regexp is rejected. This is useful because 98 ;; In case the regexp is rejected. This is useful because
98 ;; copyright-update is typically called from before-save-hook where 99 ;; copyright-update is typically called from before-save-hook where
99 ;; such an error is very inconvenient for the user. 100 ;; such an error is very inconvenient for the user.
@@ -174,10 +175,11 @@ interactively."
174 (and copyright-current-gpl-version 175 (and copyright-current-gpl-version
175 ;; match the GPL version comment in .el files, including the 176 ;; match the GPL version comment in .el files, including the
176 ;; bilingual Esperanto one in two-column, and in texinfo.tex 177 ;; bilingual Esperanto one in two-column, and in texinfo.tex
177 (re-search-forward "\\(the Free Software Foundation;\ 178 (re-search-forward
179 "\\(the Free Software Foundation;\
178 either \\|; a\\^u eldono \\([0-9]+\\)a, ? a\\^u (la\\^u via \\)\ 180 either \\|; a\\^u eldono \\([0-9]+\\)a, ? a\\^u (la\\^u via \\)\
179version \\([0-9]+\\), or (at" 181version \\([0-9]+\\), or (at"
180 (+ (point) copyright-limit) t) 182 (if copyright-limit (+ (point) copyright-limit)) t)
181 (not (string= (match-string 3) copyright-current-gpl-version)) 183 (not (string= (match-string 3) copyright-current-gpl-version))
182 (or noquery 184 (or noquery
183 (y-or-n-p (concat "Replace GPL version by " 185 (y-or-n-p (concat "Replace GPL version by "
@@ -199,7 +201,8 @@ Uses heuristic: year >= 50 means 19xx, < 50 means 20xx."
199 (interactive) 201 (interactive)
200 (widen) 202 (widen)
201 (goto-char (point-min)) 203 (goto-char (point-min))
202 (if (re-search-forward copyright-regexp (+ (point) copyright-limit) t) 204 (if (re-search-forward copyright-regexp
205 (if copyright-limit (+ (point) copyright-limit)) t)
203 (let ((s (match-beginning 2)) 206 (let ((s (match-beginning 2))
204 (e (copy-marker (1+ (match-end 2)))) 207 (e (copy-marker (1+ (match-end 2))))
205 (p (make-marker)) 208 (p (make-marker))
@@ -239,7 +242,7 @@ Uses heuristic: year >= 50 means 19xx, < 50 means 20xx."
239 "Copyright (C) " `(substring (current-time-string) -4) " by " 242 "Copyright (C) " `(substring (current-time-string) -4) " by "
240 (or (getenv "ORGANIZATION") 243 (or (getenv "ORGANIZATION")
241 str) 244 str)
242 '(if (> (point) (+ (point-min) copyright-limit)) 245 '(if (and copyright-limit (> (point) (+ (point-min) copyright-limit)))
243 (message "Copyright extends beyond `copyright-limit' and won't be updated automatically.")) 246 (message "Copyright extends beyond `copyright-limit' and won't be updated automatically."))
244 comment-end \n) 247 comment-end \n)
245 248
diff --git a/lisp/emacs-lisp/lisp-mode.el b/lisp/emacs-lisp/lisp-mode.el
index d41c0af3d73..655677998e0 100644
--- a/lisp/emacs-lisp/lisp-mode.el
+++ b/lisp/emacs-lisp/lisp-mode.el
@@ -56,6 +56,8 @@
56 (modify-syntax-entry i "_ " table) 56 (modify-syntax-entry i "_ " table)
57 (setq i (1+ i))) 57 (setq i (1+ i)))
58 (modify-syntax-entry ?\s " " table) 58 (modify-syntax-entry ?\s " " table)
59 ;; Non-break space acts as whitespace.
60 (modify-syntax-entry ?\x8a0 " " table)
59 (modify-syntax-entry ?\t " " table) 61 (modify-syntax-entry ?\t " " table)
60 (modify-syntax-entry ?\f " " table) 62 (modify-syntax-entry ?\f " " table)
61 (modify-syntax-entry ?\n "> " table) 63 (modify-syntax-entry ?\n "> " table)
diff --git a/lisp/erc/ChangeLog b/lisp/erc/ChangeLog
index ee4eb753926..a5b2a8100a8 100644
--- a/lisp/erc/ChangeLog
+++ b/lisp/erc/ChangeLog
@@ -1,3 +1,9 @@
12007-07-30 Michael Olson <mwolson@gnu.org>
2
3 * erc-nicklist.el: Remove from the Emacs source tree. This file
4 is not release quality, and relies heavily on a module which
5 cannot be distributed with ERC due to licensing reasons.
6
12007-07-25 Glenn Morris <rgm@gnu.org> 72007-07-25 Glenn Morris <rgm@gnu.org>
2 8
3 * Relicense all FSF files to GPLv3 or later. 9 * Relicense all FSF files to GPLv3 or later.
diff --git a/lisp/erc/erc-nicklist.el b/lisp/erc/erc-nicklist.el
deleted file mode 100644
index b542c2a5e1d..00000000000
--- a/lisp/erc/erc-nicklist.el
+++ /dev/null
@@ -1,414 +0,0 @@
1;;; erc-nicklist.el --- Display channel nicknames in a side buffer.
2
3;; Copyright (C) 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
4
5;; Filename: erc-nicklist.el
6;; Author: Lawrence Mitchell <wence@gmx.li>
7;; Created: 2004-04-30
8;; Keywords: IRC chat client Internet
9
10;; This file is part of GNU Emacs.
11
12;; GNU Emacs is free software; you can redistribute it and/or modify
13;; it under the terms of the GNU General Public License as published by
14;; the Free Software Foundation; either version 3, or (at your option)
15;; any later version.
16
17;; GNU Emacs is distributed in the hope that it will be useful,
18;; but WITHOUT ANY WARRANTY; without even the implied warranty of
19;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20;; GNU General Public License for more details.
21
22;; You should have received a copy of the GNU General Public License
23;; along with GNU Emacs; see the file COPYING. If not, write to the
24;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
25;; Boston, MA 02110-1301, USA.
26
27;;; Commentary:
28;;
29;; This provides a minimal mIRC style nicklist buffer for ERC. To
30;; activate, do M-x erc-nicklist RET in the channel buffer you want
31;; the nicklist to appear for. To close and quit the nicklist
32;; buffer, do M-x erc-nicklist-quit RET from within the nicklist buffer.
33;;
34;; TODO:
35;; o Somehow associate nicklist windows with channel windows so they
36;; appear together, and if one gets buried, then the other does.
37;;
38;; o Make "Query" and "Message" work.
39;;
40;; o Prettify the actual list of nicks in some way.
41;;
42;; o Add a proper erc-module that people can turn on and off, figure
43;; out a way of creating the nicklist window at an appropriate time
44;; --- probably in `erc-join-hook'.
45;;
46;; o Ensure XEmacs compatibility --- the mouse-menu support is likely
47;; broken.
48;;
49;; o Add option to display in a separate frame --- will again need to
50;; be able to associate the nicklist with the currently active
51;; channel buffer or something similar.
52;;
53;; o Allow toggling of visibility of nicklist via ERC commands.
54
55;;; History:
56;;
57
58;; Changes by Edgar Gonçalves <edgar.goncalves@inesc-id.pt>
59;; Jun 25 2005:
60;; - images are changed to a standard set of names.
61;; - /images now contain gaim's status icons.
62;; May 31 2005:
63;; - tooltips are improved. they try to access bbdb for a nice nick!
64;; Apr 26 2005:
65;; - erc-nicklist-channel-users-info was fixed (sorting bug)
66;; - Away names don't need parenthesis when using icons
67;; Apr 26 2005:
68;; - nicks can display icons of their connection type (msn, icq, for now)
69;; Mar 15 2005:
70;; - nicks now are different for unvoiced and op users
71;; - nicks now have tooltips displaying more info
72;; Mar 18 2005:
73;; - queries now work ok, both on menu and keyb shortcut RET.
74;; - nicklist is now sorted ignoring the case. Voiced nicks will
75;; appear according to `erc-nicklist-voiced-position'.
76
77;;; Code:
78
79(require 'erc)
80(condition-case nil
81 (require 'erc-bbdb)
82 (error nil))
83(eval-when-compile (require 'cl))
84
85(defgroup erc-nicklist nil
86 "Display a list of nicknames in a separate window."
87 :group 'erc)
88
89(defcustom erc-nicklist-use-icons t
90 "*If non-nil, display an icon instead of the name of the chat medium.
91By \"chat medium\", we mean IRC, AOL, MSN, ICQ, etc."
92 :group 'erc-nicklist
93 :type 'boolean)
94
95(defcustom erc-nicklist-icons-directory
96 (concat default-directory "images/")
97 "*Directory of the PNG files for chat icons.
98Icons are displayed if `erc-nicklist-use-icons' is non-nil."
99 :group 'erc-nicklist
100 :type 'directory)
101
102(defcustom erc-nicklist-voiced-position 'bottom
103 "*Position of voiced nicks in the nicklist.
104The value can be `top', `bottom' or nil (don't sort)."
105 :group 'erc-nicklist
106 :type '(choice
107 (const :tag "Top" 'top)
108 (const :tag "Bottom" 'bottom)
109 (const :tag "Mixed" nil)))
110
111(defcustom erc-nicklist-window-size 20.0
112 "*The size of the nicklist window.
113
114This specifies a percentage of the channel window width.
115
116A negative value means the nicklist window appears on the left of the
117channel window, and vice versa."
118 :group 'erc-nicklist
119 :type 'float)
120
121
122(defun erc-nicklist-buffer-name (&optional buffer)
123 "Return the buffer name for a nicklist associated with BUFFER.
124
125If BUFFER is nil, use the value of `current-buffer'."
126 (format " *%s-nicklist*" (buffer-name (or buffer (current-buffer)))))
127
128(defun erc-nicklist-make-window ()
129 "Create an ERC nicklist window.
130
131See also `erc-nicklist-window-size'."
132 (let ((width (floor (* (window-width) (/ erc-nicklist-window-size 100.0))))
133 (buffer (erc-nicklist-buffer-name))
134 window)
135 (split-window-horizontally (- width))
136 (setq window (next-window))
137 (set-window-buffer window (get-buffer-create buffer))
138 (with-current-buffer buffer
139 (set-window-dedicated-p window t))))
140
141
142(defvar erc-nicklist-images-alist '()
143 "Alist that maps a connection type to an icon.")
144
145(defun erc-nicklist-insert-medium-name-or-icon (host channel is-away)
146 "Inserts an icon or a string identifying the current host type.
147This is configured using `erc-nicklist-use-icons' and
148`erc-nicklist-icons-directory'."
149 ;; identify the network (for bitlebee usage):
150 (let ((bitlbee-p (save-match-data
151 (string-match "\\`&bitlbee\\b"
152 (buffer-name channel)))))
153 (cond ((and bitlbee-p
154 (string= "login.icq.com" host))
155 (if erc-nicklist-use-icons
156 (if is-away
157 (insert-image (cdr (assoc 'icq-away
158 erc-nicklist-images-alist)))
159 (insert-image (cdr (assoc 'icq
160 erc-nicklist-images-alist))))
161 (insert "ICQ")))
162 (bitlbee-p
163 (if erc-nicklist-use-icons
164 (if is-away
165 (insert-image (cdr (assoc 'msn-away
166 erc-nicklist-images-alist)))
167 (insert-image (cdr (assoc 'msn
168 erc-nicklist-images-alist))))
169 (insert "MSN")))
170 (t
171 (if erc-nicklist-use-icons
172 (if is-away
173 (insert-image (cdr (assoc 'irc-away
174 erc-nicklist-images-alist)))
175 (insert-image (cdr (assoc 'irc
176 erc-nicklist-images-alist))))
177 (insert "IRC"))))
178 (insert " ")))
179
180(defun erc-nicklist-search-for-nick (finger-host)
181 "Return the bitlbee-nick field for this contact given FINGER-HOST.
182Seach for the BBDB record of this contact. If not found, return nil."
183 (when (boundp 'erc-bbdb-bitlbee-name-field)
184 (let ((record (car
185 (erc-member-if
186 #'(lambda (r)
187 (let ((fingers (bbdb-record-finger-host r)))
188 (when fingers
189 (string-match finger-host
190 (car (bbdb-record-finger-host r))))))
191 (bbdb-records)))))
192 (when record
193 (bbdb-get-field record erc-bbdb-bitlbee-name-field)))))
194
195(defun erc-nicklist-insert-contents (channel)
196 "Insert the nicklist contents, with text properties and the optional images."
197 (setq buffer-read-only nil)
198 (erase-buffer)
199 (dolist (u (erc-nicklist-channel-users-info channel))
200 (let* ((server-user (car u))
201 (channel-user (cdr u))
202 (nick (erc-server-user-nickname server-user))
203 (host (erc-server-user-host server-user))
204 (login (erc-server-user-login server-user))
205 (full-name(erc-server-user-full-name server-user))
206 (info (erc-server-user-info server-user))
207 (channels (erc-server-user-buffers server-user))
208 (op (erc-channel-user-op channel-user))
209 (voice (erc-channel-user-voice channel-user))
210 (bbdb-nick (or (erc-nicklist-search-for-nick
211 (concat login "@" host))
212 ""))
213 (away-status (if voice "" "\n(Away)"))
214 (balloon-text (concat bbdb-nick (if (string= "" bbdb-nick)
215 "" "\n")
216 "Login: " login "@" host
217 away-status)))
218 (erc-nicklist-insert-medium-name-or-icon host channel (not voice))
219 (unless (or voice erc-nicklist-use-icons)
220 (setq nick (concat "(" nick ")")))
221 (when op
222 (setq nick (concat nick " (OP)")))
223 (insert (erc-propertize nick
224 'erc-nicklist-nick nick
225 'mouse-face 'highlight
226 'erc-nicklist-channel channel
227 'help-echo balloon-text)
228 "\n")))
229 (erc-nicklist-mode))
230
231
232(defun erc-nicklist ()
233 "Create an ERC nicklist buffer."
234 (interactive)
235 (let ((channel (current-buffer)))
236 (unless (or (not erc-nicklist-use-icons)
237 erc-nicklist-images-alist)
238 (setq erc-nicklist-images-alist
239 `((msn . ,(create-image (concat erc-nicklist-icons-directory
240 "msn-online.png")))
241 (msn-away . ,(create-image (concat erc-nicklist-icons-directory
242 "msn-offline.png")))
243 (irc . ,(create-image (concat erc-nicklist-icons-directory
244 "irc-online.png")))
245 (irc-away . ,(create-image (concat erc-nicklist-icons-directory
246 "irc-offline.png")))
247 (icq . ,(create-image (concat erc-nicklist-icons-directory
248 "icq-online.png")))
249 (icq-away . ,(create-image (concat erc-nicklist-icons-directory
250 "icq-offline.png"))))))
251 (erc-nicklist-make-window)
252 (with-current-buffer (get-buffer (erc-nicklist-buffer-name channel))
253 (erc-nicklist-insert-contents channel)))
254 (add-hook 'erc-channel-members-changed-hook #'erc-nicklist-update))
255
256(defun erc-nicklist-update ()
257 "Update the ERC nicklist buffer."
258 (let ((b (get-buffer (erc-nicklist-buffer-name)))
259 (channel (current-buffer)))
260 (when b
261 (with-current-buffer b
262 (erc-nicklist-insert-contents channel)))))
263
264(defvar erc-nicklist-mode-map
265 (let ((map (make-sparse-keymap)))
266 (define-key map (kbd "<down-mouse-3>") 'erc-nicklist-menu)
267 (define-key map "\C-j" 'erc-nicklist-kbd-menu)
268 (define-key map "q" 'erc-nicklist-quit)
269 (define-key map (kbd "RET") 'erc-nicklist-kbd-cmd-QUERY)
270 map)
271 "Keymap for `erc-nicklist-mode'.")
272
273(define-derived-mode erc-nicklist-mode fundamental-mode
274 "Nicklist"
275 "Major mode for the ERC nicklist buffer."
276 (setq buffer-read-only t))
277
278(defun erc-nicklist-call-erc-command (command point buffer window)
279 "Call an ERC COMMAND.
280
281Depending on what COMMAND is, it's called with one of POINT, BUFFER,
282or WINDOW as arguments."
283 (when command
284 (let* ((p (text-properties-at point))
285 (b (plist-get p 'erc-nicklist-channel)))
286 (if (memq command '(erc-nicklist-quit ignore))
287 (funcall command window)
288 ;; EEEK! Horrble, but it's the only way we can ensure the
289 ;; response goes to the correct buffer.
290 (erc-set-active-buffer b)
291 (switch-to-buffer-other-window b)
292 (funcall command (plist-get p 'erc-nicklist-nick))))))
293
294(defun erc-nicklist-cmd-QUERY (user &optional server)
295 "Opens a query buffer with USER."
296 ;; FIXME: find a way to switch to that buffer afterwards...
297 (let ((send (if server
298 (format "QUERY %s %s" user server)
299 (format "QUERY %s" user))))
300 (erc-cmd-QUERY user)
301 t))
302
303(defun erc-nicklist-kbd-cmd-QUERY (&optional window)
304 (interactive)
305 (let* ((p (text-properties-at (point)))
306 (server (plist-get p 'erc-nicklist-channel))
307 (nick (plist-get p 'erc-nicklist-nick))
308 (nick (or (and (string-match "(\\(.*\\))" nick)
309 (match-string 1 nick))
310 nick))
311 (nick (or (and (string-match "\\+\\(.*\\)" nick)
312 (match-string 1 nick))
313 nick))
314 (send (format "QUERY %s %s" nick server)))
315 (switch-to-buffer-other-window server)
316 (erc-cmd-QUERY nick)))
317
318
319(defvar erc-nicklist-menu
320 (let ((map (make-sparse-keymap "Action")))
321 (define-key map [erc-cmd-WHOIS]
322 '("Whois" . erc-cmd-WHOIS))
323 (define-key map [erc-cmd-DEOP]
324 '("Deop" . erc-cmd-DEOP))
325 (define-key map [erc-cmd-MSG]
326 '("Message" . erc-cmd-MSG)) ;; TODO!
327 (define-key map [erc-nicklist-cmd-QUERY]
328 '("Query" . erc-nicklist-kbd-cmd-QUERY))
329 (define-key map [ignore]
330 '("Cancel" . ignore))
331 (define-key map [erc-nicklist-quit]
332 '("Close nicklist" . erc-nicklist-quit))
333 map)
334 "Menu keymap for the ERC nicklist.")
335
336(defun erc-nicklist-quit (&optional window)
337 "Delete the ERC nicklist.
338
339Deletes WINDOW and stops updating the nicklist buffer."
340 (interactive)
341 (let ((b (window-buffer window)))
342 (with-current-buffer b
343 (set-buffer-modified-p nil)
344 (kill-this-buffer)
345 (remove-hook 'erc-channel-members-changed-hook 'erc-nicklist-update))))
346
347
348(defun erc-nicklist-kbd-menu ()
349 "Show the ERC nicklist menu."
350 (interactive)
351 (let* ((point (point))
352 (window (selected-window))
353 (buffer (current-buffer)))
354 (with-current-buffer buffer
355 (erc-nicklist-call-erc-command
356 (car (x-popup-menu point
357 erc-nicklist-menu))
358 point
359 buffer
360 window))))
361
362(defun erc-nicklist-menu (&optional arg)
363 "Show the ERC nicklist menu.
364
365ARG is a parametrized event (see `interactive')."
366 (interactive "e")
367 (let* ((point (nth 1 (cadr arg)))
368 (window (car (cadr arg)))
369 (buffer (window-buffer window)))
370 (with-current-buffer buffer
371 (erc-nicklist-call-erc-command
372 (car (x-popup-menu arg
373 erc-nicklist-menu))
374 point
375 buffer
376 window))))
377
378
379(defun erc-nicklist-channel-users-info (channel)
380 "Return a nick-sorted list of all users on CHANNEL.
381Result are elements in the form (SERVER-USER . CHANNEL-USER). The
382list has all the voiced users according to
383`erc-nicklist-voiced-position'."
384 (let* ((nicks (erc-sort-channel-users-alphabetically
385 (with-current-buffer channel (erc-get-channel-user-list)))))
386 (if erc-nicklist-voiced-position
387 (let ((voiced-nicks (erc-remove-if-not
388 #'(lambda (x)
389 (null (erc-channel-user-voice (cdr x))))
390 nicks))
391 (devoiced-nicks (erc-remove-if-not
392 #'(lambda (x)
393 (erc-channel-user-voice
394 (cdr x)))
395 nicks)))
396 (cond ((eq erc-nicklist-voiced-position 'top)
397 (append devoiced-nicks voiced-nicks))
398 ((eq erc-nicklist-voiced-position 'bottom)
399 (append voiced-nicks devoiced-nicks))))
400 nicks)))
401
402
403
404(provide 'erc-nicklist)
405
406;;; erc-nicklist.el ends here
407;;
408;; Local Variables:
409;; indent-tabs-mode: t
410;; tab-width: 8
411;; coding: utf-8
412;; End:
413
414;; arch-tag: db37a256-87a7-4544-bd90-e5f16c9f5ca5
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog
index c0c5c8dad2b..83ca62ca0de 100644
--- a/lisp/gnus/ChangeLog
+++ b/lisp/gnus/ChangeLog
@@ -2,6 +2,15 @@
2 2
3 * Relicense all FSF files to GPLv3 or later. 3 * Relicense all FSF files to GPLv3 or later.
4 4
52007-07-24 Katsumi Yamaoka <yamaoka@jpl.org>
6
7 * gnus-msg.el (gnus-summary-supersede-article)
8 (gnus-summary-resend-message-edit): Add Gcc header.
9 (gnus-summary-resend-bounced-mail): Ditto; search whole body for parent
10 article's Message-ID; refer parent article in summary buffer.
11
12 * message.el (message-bounce): Call mime-to-mml.
13
52007-07-21 Reiner Steib <Reiner.Steib@gmx.de> 142007-07-21 Reiner Steib <Reiner.Steib@gmx.de>
6 15
7 * mm-uu.el (mm-uu-type-alist): Refer to mm-uu-configure-list in doc 16 * mm-uu.el (mm-uu-type-alist): Refer to mm-uu-configure-list in doc
diff --git a/lisp/gnus/gnus-msg.el b/lisp/gnus/gnus-msg.el
index 0789e25bc68..c9aedab7019 100644
--- a/lisp/gnus/gnus-msg.el
+++ b/lisp/gnus/gnus-msg.el
@@ -815,7 +815,10 @@ header line with the old Message-ID."
815 (set-buffer ,gnus-summary-buffer) 815 (set-buffer ,gnus-summary-buffer)
816 (gnus-cache-possibly-remove-article ,article nil nil nil t) 816 (gnus-cache-possibly-remove-article ,article nil nil nil t)
817 (gnus-summary-mark-as-read ,article gnus-canceled-mark))))) 817 (gnus-summary-mark-as-read ,article gnus-canceled-mark)))))
818 message-send-actions)))) 818 message-send-actions)
819 ;; Add Gcc header.
820 (gnus-inews-insert-archive-gcc)
821 (gnus-inews-insert-gcc))))
819 822
820 823
821 824
@@ -1280,10 +1283,13 @@ composing a new message."
1280 (message-narrow-to-head-1) 1283 (message-narrow-to-head-1)
1281 ;; Gnus will generate a new one when sending. 1284 ;; Gnus will generate a new one when sending.
1282 (message-remove-header "Message-ID") 1285 (message-remove-header "Message-ID")
1283 (message-remove-header message-ignored-resent-headers t)
1284 ;; Remove unwanted headers. 1286 ;; Remove unwanted headers.
1287 (message-remove-header message-ignored-resent-headers t)
1285 (goto-char (point-max)) 1288 (goto-char (point-max))
1286 (insert mail-header-separator) 1289 (insert mail-header-separator)
1290 ;; Add Gcc header.
1291 (gnus-inews-insert-archive-gcc)
1292 (gnus-inews-insert-gcc)
1287 (goto-char (point-min)) 1293 (goto-char (point-min))
1288 (when (re-search-forward "^To:\\|^Newsgroups:" nil 'move) 1294 (when (re-search-forward "^To:\\|^Newsgroups:" nil 'move)
1289 (forward-char 1)) 1295 (forward-char 1))
@@ -1557,15 +1563,29 @@ If FETCH, try to fetch the article that this is a reply to, if indeed
1557this is a reply." 1563this is a reply."
1558 (interactive "P") 1564 (interactive "P")
1559 (gnus-summary-select-article t) 1565 (gnus-summary-select-article t)
1560 (set-buffer gnus-original-article-buffer) 1566 (let (summary-buffer parent)
1561 (gnus-setup-message 'compose-bounce 1567 (if fetch
1562 (let* ((references (mail-fetch-field "references")) 1568 (progn
1563 (parent (and references (gnus-parent-id references)))) 1569 (setq summary-buffer (current-buffer))
1570 (set-buffer gnus-original-article-buffer)
1571 (article-goto-body)
1572 (when (re-search-forward "^References:\n?" nil t)
1573 (while (memq (char-after) '(?\t ? ))
1574 (forward-line 1))
1575 (skip-chars-backward "\t\n ")
1576 (setq parent
1577 (gnus-parent-id (buffer-substring (match-end 0) (point))))))
1578 (set-buffer gnus-original-article-buffer))
1579 (gnus-setup-message 'compose-bounce
1564 (message-bounce) 1580 (message-bounce)
1581 ;; Add Gcc header.
1582 (gnus-inews-insert-archive-gcc)
1583 (gnus-inews-insert-gcc)
1565 ;; If there are references, we fetch the article we answered to. 1584 ;; If there are references, we fetch the article we answered to.
1566 (and fetch parent 1585 (when parent
1567 (gnus-summary-refer-article parent) 1586 (with-current-buffer summary-buffer
1568 (gnus-summary-show-all-headers))))) 1587 (gnus-summary-refer-article parent)
1588 (gnus-summary-show-all-headers))))))
1569 1589
1570;;; Gcc handling. 1590;;; Gcc handling.
1571 1591
diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el
index b98c4eb5366..419fd07727c 100644
--- a/lisp/gnus/message.el
+++ b/lisp/gnus/message.el
@@ -6697,7 +6697,7 @@ you."
6697 (goto-char boundary) 6697 (goto-char boundary)
6698 (when (re-search-backward "^.?From .*\n" nil t) 6698 (when (re-search-backward "^.?From .*\n" nil t)
6699 (delete-region (match-beginning 0) (match-end 0))))) 6699 (delete-region (match-beginning 0) (match-end 0)))))
6700 (mm-enable-multibyte) 6700 (mime-to-mml)
6701 (save-restriction 6701 (save-restriction
6702 (message-narrow-to-head-1) 6702 (message-narrow-to-head-1)
6703 (message-remove-header message-ignored-bounced-headers t) 6703 (message-remove-header message-ignored-bounced-headers t)
diff --git a/lisp/mb-depth.el b/lisp/mb-depth.el
index 256c7ee6a99..1d125e45d95 100644
--- a/lisp/mb-depth.el
+++ b/lisp/mb-depth.el
@@ -9,7 +9,7 @@
9 9
10;; GNU Emacs is free software; you can redistribute it and/or modify 10;; GNU Emacs is free software; you can redistribute it and/or modify
11;; it under the terms of the GNU General Public License as published by 11;; it under the terms of the GNU General Public License as published by
12;; the Free Software Foundation; either version 2, or (at your option) 12;; the Free Software Foundation; either version 3, or (at your option)
13;; any later version. 13;; any later version.
14 14
15;; GNU Emacs is distributed in the hope that it will be useful, 15;; GNU Emacs is distributed in the hope that it will be useful,
diff --git a/lisp/net/tramp-cache.el b/lisp/net/tramp-cache.el
index 96c4b3ecb9b..79b0b537837 100644
--- a/lisp/net/tramp-cache.el
+++ b/lisp/net/tramp-cache.el
@@ -1,4 +1,3 @@
1;;; -*- mode: Emacs-Lisp; coding: iso-2022-7bit; -*-
2;;; tramp-cache.el --- file information caching for Tramp 1;;; tramp-cache.el --- file information caching for Tramp
3 2
4;; Copyright (C) 2000, 2005, 2006, 2007 by Free Software Foundation, Inc. 3;; Copyright (C) 2000, 2005, 2006, 2007 by Free Software Foundation, Inc.
@@ -11,8 +10,8 @@
11 10
12;; GNU Emacs is free software; you can redistribute it and/or modify 11;; GNU Emacs is free software; you can redistribute it and/or modify
13;; it under the terms of the GNU General Public License as published by 12;; it under the terms of the GNU General Public License as published by
14;; the Free Software Foundation; either version 3 of the License, or 13;; the Free Software Foundation; either version 3, or (at your option)
15;; (at your option) any later version. 14;; any later version.
16 15
17;; GNU Emacs is distributed in the hope that it will be useful, 16;; GNU Emacs is distributed in the hope that it will be useful,
18;; but WITHOUT ANY WARRANTY; without even the implied warranty of 17;; but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/lisp/net/tramp-fish.el b/lisp/net/tramp-fish.el
index 1752a09a285..f0db302abcb 100644
--- a/lisp/net/tramp-fish.el
+++ b/lisp/net/tramp-fish.el
@@ -1,4 +1,3 @@
1;;; -*- coding: iso-8859-1; -*-
2;;; tramp-fish.el --- Tramp access functions for FISH protocol 1;;; tramp-fish.el --- Tramp access functions for FISH protocol
3 2
4;; Copyright (C) 2006, 2007 Free Software Foundation, Inc. 3;; Copyright (C) 2006, 2007 Free Software Foundation, Inc.
@@ -10,8 +9,8 @@
10 9
11;; GNU Emacs is free software; you can redistribute it and/or modify 10;; GNU Emacs is free software; you can redistribute it and/or modify
12;; it under the terms of the GNU General Public License as published by 11;; it under the terms of the GNU General Public License as published by
13;; the Free Software Foundation; either version 3 of the License, or 12;; the Free Software Foundation; either version 3, or (at your option)
14;; (at your option) any later version. 13;; any later version.
15 14
16;; GNU Emacs is distributed in the hope that it will be useful, 15;; GNU Emacs is distributed in the hope that it will be useful,
17;; but WITHOUT ANY WARRANTY; without even the implied warranty of 16;; but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/lisp/net/tramp-ftp.el b/lisp/net/tramp-ftp.el
index e9caf47018f..f3d7a3aadf1 100644
--- a/lisp/net/tramp-ftp.el
+++ b/lisp/net/tramp-ftp.el
@@ -1,4 +1,4 @@
1;;; tramp-ftp.el --- Tramp convenience functions for Ange-FTP -*- coding: iso-8859-1; -*- 1;;; tramp-ftp.el --- Tramp convenience functions for Ange-FTP
2 2
3;; Copyright (C) 2002, 2003, 2004, 2005, 2006, 3;; Copyright (C) 2002, 2003, 2004, 2005, 2006,
4;; 2007 Free Software Foundation, Inc. 4;; 2007 Free Software Foundation, Inc.
diff --git a/lisp/net/tramp-gw.el b/lisp/net/tramp-gw.el
index 2cbb7ea377f..3ac496d8a09 100644
--- a/lisp/net/tramp-gw.el
+++ b/lisp/net/tramp-gw.el
@@ -1,4 +1,3 @@
1;;; -*- coding: iso-8859-1; -*-
2;;; tramp-gw.el --- Tramp utility functions for HTTP tunnels and SOCKS gateways 1;;; tramp-gw.el --- Tramp utility functions for HTTP tunnels and SOCKS gateways
3 2
4;; Copyright (C) 2007 Free Software Foundation, Inc. 3;; Copyright (C) 2007 Free Software Foundation, Inc.
@@ -10,8 +9,8 @@
10 9
11;; GNU Emacs is free software; you can redistribute it and/or modify 10;; GNU Emacs is free software; you can redistribute it and/or modify
12;; it under the terms of the GNU General Public License as published by 11;; it under the terms of the GNU General Public License as published by
13;; the Free Software Foundation; either version 3 of the License, or 12;; the Free Software Foundation; either version 3, or (at your option)
14;; (at your option) any later version. 13;; any later version.
15 14
16;; GNU Emacs is distributed in the hope that it will be useful, 15;; GNU Emacs is distributed in the hope that it will be useful,
17;; but WITHOUT ANY WARRANTY; without even the implied warranty of 16;; but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/lisp/net/tramp-smb.el b/lisp/net/tramp-smb.el
index 22b6afa30e2..5dbf12955d7 100644
--- a/lisp/net/tramp-smb.el
+++ b/lisp/net/tramp-smb.el
@@ -1,4 +1,4 @@
1;;; tramp-smb.el --- Tramp access functions for SMB servers -*- coding: iso-8859-1; -*- 1;;; tramp-smb.el --- Tramp access functions for SMB servers
2 2
3;; Copyright (C) 2002, 2003, 2004, 2005, 2006, 3;; Copyright (C) 2002, 2003, 2004, 2005, 2006,
4;; 2007 Free Software Foundation, Inc. 4;; 2007 Free Software Foundation, Inc.
diff --git a/lisp/net/tramp-uu.el b/lisp/net/tramp-uu.el
index 71a76dd5c04..c399a0b211d 100644
--- a/lisp/net/tramp-uu.el
+++ b/lisp/net/tramp-uu.el
@@ -1,10 +1,10 @@
1;;; -*- coding: iso-2022-7bit; -*- 1;;; -*- coding: utf-8; -*-
2;;; tramp-uu.el --- uuencode in Lisp 2;;; tramp-uu.el --- uuencode in Lisp
3 3
4;; Copyright (C) 2002, 2003, 2004, 2005, 2006, 4;; Copyright (C) 2002, 2003, 2004, 2005, 2006,
5;; 2007 Free Software Foundation, Inc. 5;; 2007 Free Software Foundation, Inc.
6 6
7;; Author: Kai Gro,A_(Bjohann <kai.grossjohann@gmx.net> 7;; Author: Kai Großjohann <kai.grossjohann@gmx.net>
8;; Keywords: comm, terminals 8;; Keywords: comm, terminals
9 9
10;; This file is free software; you can redistribute it and/or modify 10;; This file is free software; you can redistribute it and/or modify
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el
index fc4817dcdc1..5285b87313a 100644
--- a/lisp/net/tramp.el
+++ b/lisp/net/tramp.el
@@ -1,4 +1,4 @@
1;;; -*- mode: Emacs-Lisp; coding: iso-2022-7bit; -*- 1;;; -*- mode: Emacs-Lisp; coding: utf-8; -*-
2;;; tramp.el --- Transparent Remote Access, Multiple Protocol 2;;; tramp.el --- Transparent Remote Access, Multiple Protocol
3 3
4;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 4;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004,
@@ -6,7 +6,7 @@
6 6
7;; (copyright statements below in code to be updated with the above notice) 7;; (copyright statements below in code to be updated with the above notice)
8 8
9;; Author: Kai Gro,A_(Bjohann <kai.grossjohann@gmx.net> 9;; Author: Kai Großjohann <kai.grossjohann@gmx.net>
10;; Michael Albinus <michael.albinus@gmx.de> 10;; Michael Albinus <michael.albinus@gmx.de>
11;; Keywords: comm, processes 11;; Keywords: comm, processes
12 12
@@ -2448,6 +2448,7 @@ of."
2448 t 2448 t
2449 (let ((f (buffer-file-name))) 2449 (let ((f (buffer-file-name)))
2450 (with-parsed-tramp-file-name f nil 2450 (with-parsed-tramp-file-name f nil
2451 (tramp-flush-file-property v localname)
2451 (let* ((attr (file-attributes f)) 2452 (let* ((attr (file-attributes f))
2452 (modtime (nth 5 attr)) 2453 (modtime (nth 5 attr))
2453 (mt (visited-file-modtime))) 2454 (mt (visited-file-modtime)))
@@ -3713,7 +3714,7 @@ beginning of local filename are not substituted."
3713 (run-hooks 'tramp-handle-file-local-copy-hook) 3714 (run-hooks 'tramp-handle-file-local-copy-hook)
3714 tmpfil))) 3715 tmpfil)))
3715 3716
3716(defun tramp-handle-file-remote-p (file &optional identification connected) 3717(defun tramp-handle-file-remote-p (filename &optional identification connected)
3717 "Like `file-remote-p' for Tramp files." 3718 "Like `file-remote-p' for Tramp files."
3718 (when (tramp-tramp-file-p filename) 3719 (when (tramp-tramp-file-p filename)
3719 (with-parsed-tramp-file-name filename nil 3720 (with-parsed-tramp-file-name filename nil
@@ -7358,7 +7359,7 @@ please ensure that the buffers are attached to your email.\n\n")
7358;; transfer method to use. (Greg Stark) 7359;; transfer method to use. (Greg Stark)
7359;; * Remove unneeded parameters from methods. 7360;; * Remove unneeded parameters from methods.
7360;; * Invoke rsync once for copying a whole directory hierarchy. 7361;; * Invoke rsync once for copying a whole directory hierarchy.
7361;; (Francesco Potort,Al(B) 7362;; (Francesco Potortì)
7362;; * Make it work for different encodings, and for different file name 7363;; * Make it work for different encodings, and for different file name
7363;; encodings, too. (Daniel Pittman) 7364;; encodings, too. (Daniel Pittman)
7364;; * Clean up unused *tramp/foo* buffers after a while. (Pete Forman) 7365;; * Clean up unused *tramp/foo* buffers after a while. (Pete Forman)
diff --git a/lisp/net/trampver.el b/lisp/net/trampver.el
index 30d28a1e2c9..f10f08e1031 100644
--- a/lisp/net/trampver.el
+++ b/lisp/net/trampver.el
@@ -1,10 +1,10 @@
1;;; -*- mode: Emacs-Lisp; coding: iso-8859-1; -*- 1;;; -*- mode: Emacs-Lisp; coding: utf-8; -*-
2;;; trampver.el --- Transparent Remote Access, Multiple Protocol 2;;; trampver.el --- Transparent Remote Access, Multiple Protocol
3;;; lisp/trampver.el. Generated from trampver.el.in by configure. 3;;; lisp/trampver.el. Generated from trampver.el.in by configure.
4 4
5;; Copyright (C) 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc. 5;; Copyright (C) 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
6 6
7;; Author: Kai Gro,A_(Bjohann <kai.grossjohann@gmx.net> 7;; Author: Kai Großjohann <kai.grossjohann@gmx.net>
8;; Keywords: comm, processes 8;; Keywords: comm, processes
9 9
10;; This file is part of GNU Emacs. 10;; This file is part of GNU Emacs.
@@ -30,14 +30,14 @@
30;; "autoconf && ./configure" to change them. (X)Emacs version check is defined 30;; "autoconf && ./configure" to change them. (X)Emacs version check is defined
31;; in macro AC_EMACS_INFO of aclocal.m4; should be changed only there. 31;; in macro AC_EMACS_INFO of aclocal.m4; should be changed only there.
32 32
33(defconst tramp-version "2.1.10" 33(defconst tramp-version "2.1.11-pre"
34 "This version of Tramp.") 34 "This version of Tramp.")
35 35
36(defconst tramp-bug-report-address "tramp-devel@gnu.org" 36(defconst tramp-bug-report-address "tramp-devel@gnu.org"
37 "Email address to send bug reports to.") 37 "Email address to send bug reports to.")
38 38
39;; Check for (X)Emacs version. 39;; Check for (X)Emacs version.
40(let ((x (if (or (< emacs-major-version 21) (and (featurep 'xemacs) (< emacs-minor-version 4))) (format "Tramp 2.1.10 is not fit for %s" (when (string-match "^.*$" (emacs-version)) (match-string 0 (emacs-version)))) "ok"))) 40(let ((x (if (or (< emacs-major-version 21) (and (featurep 'xemacs) (< emacs-minor-version 4))) (format "Tramp 2.1.11-pre is not fit for %s" (when (string-match "^.*$" (emacs-version)) (match-string 0 (emacs-version)))) "ok")))
41 (unless (string-match "\\`ok\\'" x) (error x))) 41 (unless (string-match "\\`ok\\'" x) (error x)))
42 42
43(provide 'trampver) 43(provide 'trampver)
diff --git a/lisp/progmodes/cc-langs.el b/lisp/progmodes/cc-langs.el
index 9c749c11b6a..c5d9c162520 100644
--- a/lisp/progmodes/cc-langs.el
+++ b/lisp/progmodes/cc-langs.el
@@ -2875,6 +2875,14 @@ way."
2875(defconst c-lang-variable-inits (cc-eval-when-compile c-lang-variable-inits)) 2875(defconst c-lang-variable-inits (cc-eval-when-compile c-lang-variable-inits))
2876(defconst c-emacs-variable-inits (cc-eval-when-compile c-emacs-variable-inits)) 2876(defconst c-emacs-variable-inits (cc-eval-when-compile c-emacs-variable-inits))
2877 2877
2878;; Make the `c-lang-setvar' variables buffer local in the current buffer.
2879;; These are typically standard emacs variables such as `comment-start'.
2880(defmacro c-make-emacs-variables-local ()
2881 `(progn
2882 ,@(mapcar (lambda (init)
2883 `(make-local-variable ',(car init)))
2884 (cdr c-emacs-variable-inits))))
2885
2878(defun c-make-init-lang-vars-fun (mode) 2886(defun c-make-init-lang-vars-fun (mode)
2879 "Create a function that initializes all the language dependent variables 2887 "Create a function that initializes all the language dependent variables
2880for the given mode. 2888for the given mode.
@@ -2898,6 +2906,7 @@ accomplish that conveniently."
2898 ;; that could be in the result from `cl-macroexpand-all'. 2906 ;; that could be in the result from `cl-macroexpand-all'.
2899 (let ((c-buffer-is-cc-mode ',mode) 2907 (let ((c-buffer-is-cc-mode ',mode)
2900 current-var source-eval) 2908 current-var source-eval)
2909 (c-make-emacs-variables-local)
2901 (condition-case err 2910 (condition-case err
2902 2911
2903 (if (eq c-version-sym ',c-version-sym) 2912 (if (eq c-version-sym ',c-version-sym)
@@ -2956,6 +2965,7 @@ accomplish that conveniently."
2956 (init (append (cdr c-emacs-variable-inits) 2965 (init (append (cdr c-emacs-variable-inits)
2957 (cdr c-lang-variable-inits))) 2966 (cdr c-lang-variable-inits)))
2958 current-var) 2967 current-var)
2968 (c-make-emacs-variables-local)
2959 (condition-case err 2969 (condition-case err
2960 2970
2961 (while init 2971 (while init
diff --git a/lisp/progmodes/cc-mode.el b/lisp/progmodes/cc-mode.el
index f201f9bab6c..8669a41c2f0 100644
--- a/lisp/progmodes/cc-mode.el
+++ b/lisp/progmodes/cc-mode.el
@@ -154,21 +154,12 @@
154(defun c-leave-cc-mode-mode () 154(defun c-leave-cc-mode-mode ()
155 (setq c-buffer-is-cc-mode nil)) 155 (setq c-buffer-is-cc-mode nil))
156 156
157;; Make the `c-lang-setvar' variables buffer local in the current buffer.
158;; These are typically standard emacs variables such as `comment-start'.
159(defmacro c-make-emacs-variables-local ()
160 `(progn
161 ,@(mapcar (lambda (init)
162 `(make-local-variable ',(car init)))
163 (cdr c-emacs-variable-inits))))
164
165(defun c-init-language-vars-for (mode) 157(defun c-init-language-vars-for (mode)
166 "Initialize the language variables for one of the language modes 158 "Initialize the language variables for one of the language modes
167directly supported by CC Mode. This can be used instead of the 159directly supported by CC Mode. This can be used instead of the
168`c-init-language-vars' macro if the language you want to use is one of 160`c-init-language-vars' macro if the language you want to use is one of
169those, rather than a derived language defined through the language 161those, rather than a derived language defined through the language
170variable system (see \"cc-langs.el\")." 162variable system (see \"cc-langs.el\")."
171 (c-make-emacs-variables-local)
172 (cond ((eq mode 'c-mode) (c-init-language-vars c-mode)) 163 (cond ((eq mode 'c-mode) (c-init-language-vars c-mode))
173 ((eq mode 'c++-mode) (c-init-language-vars c++-mode)) 164 ((eq mode 'c++-mode) (c-init-language-vars c++-mode))
174 ((eq mode 'objc-mode) (c-init-language-vars objc-mode)) 165 ((eq mode 'objc-mode) (c-init-language-vars objc-mode))
diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el
index ceb9a7b924d..2710066c2cd 100644
--- a/lisp/progmodes/compile.el
+++ b/lisp/progmodes/compile.el
@@ -2050,9 +2050,9 @@ The file-structure looks like this:
2050 ;; compilation-error-list) to point-min, but that was only meaningful for 2050 ;; compilation-error-list) to point-min, but that was only meaningful for
2051 ;; the internal uses of compilation-forget-errors: all calls from external 2051 ;; the internal uses of compilation-forget-errors: all calls from external
2052 ;; packages seem to be followed by a move of compilation-parsing-end to 2052 ;; packages seem to be followed by a move of compilation-parsing-end to
2053 ;; something equivalent to point-max. So we speculatively move 2053 ;; something equivalent to point-max. So we heuristically move
2054 ;; compilation-current-error to point-max (since the external package 2054 ;; compilation-current-error to point-max (since the external package
2055 ;; won't know that it should do it). --stef 2055 ;; won't know that it should do it). --Stef
2056 (setq compilation-current-error nil) 2056 (setq compilation-current-error nil)
2057 (let* ((proc (get-buffer-process (current-buffer))) 2057 (let* ((proc (get-buffer-process (current-buffer)))
2058 (mark (if proc (process-mark proc))) 2058 (mark (if proc (process-mark proc)))
@@ -2063,7 +2063,12 @@ The file-structure looks like this:
2063 ;; we need to put ours just before the insertion point rather 2063 ;; we need to put ours just before the insertion point rather
2064 ;; than at the insertion point. If that's not possible, then 2064 ;; than at the insertion point. If that's not possible, then
2065 ;; don't use a marker. --Stef 2065 ;; don't use a marker. --Stef
2066 (if (> pos (point-min)) (copy-marker (1- pos)) pos)))) 2066 (if (> pos (point-min)) (copy-marker (1- pos)) pos)))
2067 ;; Again, since this command is used in buffers that contain several
2068 ;; compilations, to set the beginning of "this compilation", it's a good
2069 ;; place to reset compilation-auto-jump-to-next.
2070 (set (make-local-variable 'compilation-auto-jump-to-next)
2071 compilation-auto-jump-to-first-error))
2067 2072
2068;;;###autoload 2073;;;###autoload
2069(add-to-list 'auto-mode-alist '("\\.gcov\\'" . compilation-mode)) 2074(add-to-list 'auto-mode-alist '("\\.gcov\\'" . compilation-mode))
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el
index 1caa9ee2007..c3caa7e397c 100644
--- a/lisp/progmodes/python.el
+++ b/lisp/progmodes/python.el
@@ -1359,7 +1359,7 @@ buffer for a list of commands.)"
1359 (path (getenv "PYTHONPATH")) 1359 (path (getenv "PYTHONPATH"))
1360 (process-environment ; to import emacs.py 1360 (process-environment ; to import emacs.py
1361 (cons (concat "PYTHONPATH=" data-directory 1361 (cons (concat "PYTHONPATH=" data-directory
1362 (if path (concat ":" path))) 1362 (if path (concat path-separator path)))
1363 process-environment))) 1363 process-environment)))
1364 (apply 'make-comint-in-buffer "Python" 1364 (apply 'make-comint-in-buffer "Python"
1365 (if new (generate-new-buffer "*Python*") "*Python*") 1365 (if new (generate-new-buffer "*Python*") "*Python*")
diff --git a/lisp/ps-print.el b/lisp/ps-print.el
index 62556b83a24..090e598e46c 100644
--- a/lisp/ps-print.el
+++ b/lisp/ps-print.el
@@ -6528,7 +6528,7 @@ Initialize global data for printing multi-byte characters.
6528 6528
6529(autoload (quote ps-mule-begin-job) "ps-mule" "\ 6529(autoload (quote ps-mule-begin-job) "ps-mule" "\
6530Start printing job for multi-byte chars between FROM and TO. 6530Start printing job for multi-byte chars between FROM and TO.
6531This checks if all multi-byte characters in the region are printable or not. 6531It checks if all multi-byte characters in the region are printable or not.
6532 6532
6533\(fn FROM TO)" nil nil) 6533\(fn FROM TO)" nil nil)
6534 6534
diff --git a/lisp/textmodes/bibtex-style.el b/lisp/textmodes/bibtex-style.el
index 8afc92968d9..99c2f92cab0 100644
--- a/lisp/textmodes/bibtex-style.el
+++ b/lisp/textmodes/bibtex-style.el
@@ -7,7 +7,7 @@
7 7
8;; This file is free software; you can redistribute it and/or modify 8;; This file is free software; you can redistribute it and/or modify
9;; it under the terms of the GNU General Public License as published by 9;; it under the terms of the GNU General Public License as published by
10;; the Free Software Foundation; either version 2, or (at your option) 10;; the Free Software Foundation; either version 3, or (at your option)
11;; any later version. 11;; any later version.
12 12
13;; This file is distributed in the hope that it will be useful, 13;; This file is distributed in the hope that it will be useful,
diff --git a/lisp/textmodes/org-publish.el b/lisp/textmodes/org-publish.el
index 1afcee0182b..5a2a146dbaa 100644
--- a/lisp/textmodes/org-publish.el
+++ b/lisp/textmodes/org-publish.el
@@ -8,7 +8,7 @@
8 8
9;; This file is free software; you can redistribute it and/or modify 9;; This file is free software; you can redistribute it and/or modify
10;; it under the terms of the GNU General Public License as published by 10;; it under the terms of the GNU General Public License as published by
11;; the Free Software Foundation; either version 2, or (at your option) 11;; the Free Software Foundation; either version 3, or (at your option)
12;; any later version. 12;; any later version.
13 13
14;; This file is distributed in the hope that it will be useful, 14;; This file is distributed in the hope that it will be useful,
diff --git a/lisp/vc-bzr.el b/lisp/vc-bzr.el
index dc8004c25a8..6a8f930f00f 100644
--- a/lisp/vc-bzr.el
+++ b/lisp/vc-bzr.el
@@ -4,7 +4,7 @@
4 4
5;; NOTE: THIS IS A MODIFIED VERSION OF Dave Love's vc-bzr.el, 5;; NOTE: THIS IS A MODIFIED VERSION OF Dave Love's vc-bzr.el,
6;; which you can find at: http://www.loveshack.ukfsn.org/emacs/vc-bzr.el 6;; which you can find at: http://www.loveshack.ukfsn.org/emacs/vc-bzr.el
7;; I could not get in touch with Dave Love by email, so 7;; I could not get in touch with Dave Love by email, so
8;; I am releasing my changes separately. -- Riccardo 8;; I am releasing my changes separately. -- Riccardo
9 9
10;; Author: Dave Love <fx@gnu.org>, Riccardo Murri <riccardo.murri@gmail.com> 10;; Author: Dave Love <fx@gnu.org>, Riccardo Murri <riccardo.murri@gmail.com>
@@ -15,7 +15,7 @@
15 15
16;; This file is free software; you can redistribute it and/or modify 16;; This file is free software; you can redistribute it and/or modify
17;; it under the terms of the GNU General Public License as published by 17;; it under the terms of the GNU General Public License as published by
18;; the Free Software Foundation; either version 2, or (at your option) 18;; the Free Software Foundation; either version 3, or (at your option)
19;; any later version. 19;; any later version.
20 20
21;; This file is distributed in the hope that it will be useful, 21;; This file is distributed in the hope that it will be useful,
diff --git a/lisp/vc-git.el b/lisp/vc-git.el
index 7e358ed0238..e4a9d26105a 100644
--- a/lisp/vc-git.el
+++ b/lisp/vc-git.el
@@ -260,7 +260,10 @@
260 260
261(defun vc-git-print-log (files &optional buffer) 261(defun vc-git-print-log (files &optional buffer)
262 "Get change log associated with FILES." 262 "Get change log associated with FILES."
263 (let ((coding-system-for-read git-commits-coding-system)) 263 (let ((coding-system-for-read git-commits-coding-system)
264 ;; Support both the old print-log interface that passes a
265 ;; single file, and the new one that passes a file list.
266 (flist (if (listp files) files (list files))))
264 ;; `vc-do-command' creates the buffer, but we need it before running 267 ;; `vc-do-command' creates the buffer, but we need it before running
265 ;; the command. 268 ;; the command.
266 (vc-setup-buffer buffer) 269 (vc-setup-buffer buffer)
@@ -273,7 +276,7 @@
273 ;; "git rev-list" on each file separately to make sure that each 276 ;; "git rev-list" on each file separately to make sure that each
274 ;; file gets a "File:" header before the corresponding 277 ;; file gets a "File:" header before the corresponding
275 ;; log. Maybe there is a way to do this with one command... 278 ;; log. Maybe there is a way to do this with one command...
276 (dolist (file files) 279 (dolist (file flist)
277 (with-current-buffer 280 (with-current-buffer
278 buffer 281 buffer
279 (insert "File: " (file-name-nondirectory file) "\n")) 282 (insert "File: " (file-name-nondirectory file) "\n"))
diff --git a/lisp/vc-hg.el b/lisp/vc-hg.el
index 727aaf072e1..d8a7ec0dd46 100644
--- a/lisp/vc-hg.el
+++ b/lisp/vc-hg.el
@@ -148,7 +148,7 @@
148(defun vc-hg-registered (file) 148(defun vc-hg-registered (file)
149 "Return non-nil if FILE is registered with hg." 149 "Return non-nil if FILE is registered with hg."
150 (when (vc-hg-root file) ; short cut 150 (when (vc-hg-root file) ; short cut
151 (vc-hg-state file))) ; expensive 151 (vc-file-setprop file 'vc-state (vc-hg-state file)))) ; expensive
152 152
153(defun vc-hg-state (file) 153(defun vc-hg-state (file)
154 "Hg-specific version of `vc-state'." 154 "Hg-specific version of `vc-state'."
@@ -303,12 +303,12 @@
303 (buffer-substring-no-properties (point-min) (point-max)))))) 303 (buffer-substring-no-properties (point-min) (point-max))))))
304 304
305;; Modelled after the similar function in vc-cvs.el 305;; Modelled after the similar function in vc-cvs.el
306;; (defun vc-hg-revision-completion-table (file) 306(defun vc-hg-revision-completion-table (file)
307;; (lexical-let ((file file) 307 (lexical-let ((file file)
308;; table) 308 table)
309;; (setq table (lazy-completion-table 309 (setq table (lazy-completion-table
310;; table (lambda () (vc-hg-revision-table file)))) 310 table (lambda () (vc-hg-revision-table file))))
311;; table)) 311 table))
312 312
313(defun vc-hg-diff-tree (file &optional oldvers newvers buffer) 313(defun vc-hg-diff-tree (file &optional oldvers newvers buffer)
314 (vc-hg-diff (list file) oldvers newvers buffer)) 314 (vc-hg-diff (list file) oldvers newvers buffer))
diff --git a/lisp/vc.el b/lisp/vc.el
index 08baa16e6b4..5030fb64471 100644
--- a/lisp/vc.el
+++ b/lisp/vc.el
@@ -2233,8 +2233,13 @@ There is a special command, `*l', to mark all files currently locked."
2233 (set (make-local-variable 'dired-actual-switches) 2233 (set (make-local-variable 'dired-actual-switches)
2234 vc-dired-switches)) 2234 vc-dired-switches))
2235 (set (make-local-variable 'vc-dired-terse-mode) vc-dired-terse-display) 2235 (set (make-local-variable 'vc-dired-terse-mode) vc-dired-terse-display)
2236 (setq mode-name (concat mode-name (symbol-name (vc-responsible-backend 2236 (let ((backend-name (symbol-name (vc-responsible-backend
2237 default-directory)))) 2237 default-directory))))
2238 (setq mode-name (concat mode-name backend-name))
2239 ;; Add menu after `vc-dired-mode-map' has `dired-mode-map' as the parent.
2240 (let ((vc-dire-menu-map (copy-keymap vc-menu-map)))
2241 (define-key-after (lookup-key vc-dired-mode-map [menu-bar]) [vc]
2242 (cons backend-name vc-dire-menu-map) 'subdir)))
2238 (setq vc-dired-mode t)) 2243 (setq vc-dired-mode t))
2239 2244
2240(defun vc-dired-toggle-terse-mode () 2245(defun vc-dired-toggle-terse-mode ()
@@ -2284,7 +2289,7 @@ This code, like dired, assumes UNIX -l format."
2284 "Reformat the listing according to version control. 2289 "Reformat the listing according to version control.
2285Called by dired after any portion of a vc-dired buffer has been read in." 2290Called by dired after any portion of a vc-dired buffer has been read in."
2286 (message "Getting version information... ") 2291 (message "Getting version information... ")
2287 (let (subdir filename (buffer-read-only nil)) 2292 (let (subdir filename (inhibit-read-only t))
2288 (goto-char (point-min)) 2293 (goto-char (point-min))
2289 (while (not (eobp)) 2294 (while (not (eobp))
2290 (cond 2295 (cond
diff --git a/lisp/wdired.el b/lisp/wdired.el
index 0abb8647ce0..960d8990983 100644
--- a/lisp/wdired.el
+++ b/lisp/wdired.el
@@ -175,6 +175,7 @@ program `dired-chmod-program', which must exist."
175 (define-key map "\C-c\C-c" 'wdired-finish-edit) 175 (define-key map "\C-c\C-c" 'wdired-finish-edit)
176 (define-key map "\C-c\C-k" 'wdired-abort-changes) 176 (define-key map "\C-c\C-k" 'wdired-abort-changes)
177 (define-key map "\C-c\C-[" 'wdired-abort-changes) 177 (define-key map "\C-c\C-[" 'wdired-abort-changes)
178 (define-key map "\C-x\C-q" 'wdired-exit)
178 (define-key map "\C-m" 'ignore) 179 (define-key map "\C-m" 'ignore)
179 (define-key map "\C-j" 'ignore) 180 (define-key map "\C-j" 'ignore)
180 (define-key map "\C-o" 'ignore) 181 (define-key map "\C-o" 'ignore)
@@ -423,6 +424,22 @@ non-nil means return old filename."
423 (set-buffer-modified-p nil) 424 (set-buffer-modified-p nil)
424 (setq buffer-undo-list nil)) 425 (setq buffer-undo-list nil))
425 426
427(defun wdired-exit ()
428 "Exit wdired and return to dired mode.
429Just return to dired mode if there are no changes. Otherwise,
430ask a yes-or-no question whether to save or cancel changes,
431and proceed depending on the answer."
432 (interactive)
433 (if (buffer-modified-p)
434 (if (y-or-n-p (format "Buffer %s modified; save changes? "
435 (current-buffer)))
436 (wdired-finish-edit)
437 (wdired-abort-changes))
438 (wdired-change-to-dired-mode)
439 (set-buffer-modified-p nil)
440 (setq buffer-undo-list nil)
441 (message "(No changes need to be saved)")))
442
426;; Rename a file, searching it in a modified dired buffer, in order 443;; Rename a file, searching it in a modified dired buffer, in order
427;; to be able to use `dired-do-create-files-regexp' and get its 444;; to be able to use `dired-do-create-files-regexp' and get its
428;; "benefits". 445;; "benefits".