summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorMiles Bader <miles@gnu.org>2007-08-03 05:20:51 +0000
committerMiles Bader <miles@gnu.org>2007-08-03 05:20:51 +0000
commite145a7fe95fb8f97407d125f94653ef95e42696d (patch)
tree4f83705aac9d1a4416dabcf774115f7cccb80bda /lisp
parent2a4924ce174b1a2b032558f3036f1d95445c4936 (diff)
parent2f12b713116a4e15b4744fc78d5f0dbb57fcd1ca (diff)
downloademacs-e145a7fe95fb8f97407d125f94653ef95e42696d.tar.gz
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 @@
+2007-07-29 Kimit Yada <kimitto@gmail.com> (tiny change)
+
+ * emacs-lisp/copyright.el (copyright-update-year, copyright-update)
+ (copyright-fix-years, copyright): Correctly handle the case where
+ copyright-limit is nil.
+
+2007-07-28 Konstantin Novitsky <knovitsk@Bear.com> (tiny change)
+
+ * progmodes/python.el (run-python): Fix path separator under w32.
+
+2007-07-30 Richard Stallman <rms@gnu.org>
+
+ * emacs-lisp/lisp-mode.el (emacs-lisp-mode-syntax-table):
+ Treat non-break space as whitespace in Lisp.
+
+2007-07-30 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * vc.el (vc-dired-hook): Use inhibit-read-only.
+
+ * progmodes/compile.el (compilation-forget-errors):
+ Reset compilation-auto-jump-to-next.
+
+2007-07-30 Michael Olson <mwolson@gnu.org>
+
+ * cus-edit.el (custom-group-save): Fix void function definition
+ error. Thanks to Zhang Wei for the report.
+
+ * ps-print.el: Check in trivial changes to the autoloads section
+ caused by the build process. These autoloads really ought to be
+ placed in a separate file, methinks.
+
+2007-07-29 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * calendar/calendar.el (calendar-mode): Make sure
+ displayed-(month|year) are set.
+ (calendar-basic-setup): Display buffer before adjusting window sizes.
+ (generate-calendar-window): Use inhibit-read-only. Simplify.
+ Generate buffer and set displayed-month and displayed-year before
+ calling update-calendar-mode-line.
+
+2007-07-29 Michael Albinus <michael.albinus@gmx.de>
+
+ * tramp.el:
+ * tramp-uu.el:
+ * trampver.el: Use utf-8 encoding with coding cookie.
+
+ * tramp-cache.el:
+ * tramp-fish.el:
+ * tramp-ftp.el:
+ * tramp-gw.el:
+ * tramp-smb.el: Remove coding cookie.
+
+ * tramp.el (tramp-handle-verify-visited-file-modtime):
+ Flush buffer file-name's file property.
+ (tramp-handle-file-remote-p): The first parameter is FILENAME.
+
+ * trampver.el: Update release number.
+
+2007-07-29 Juri Linkov <juri@jurta.org>
+
+ * dired.el (dired-mode-map): Bind C-x C-q to dired-toggle-read-only.
+ Filter out menu item "Edit File Names" `wdired-change-to-wdired-mode'
+ when major-mode is not dired-mode.
+ (dired-toggle-read-only): New function.
+ (dired-recursive-deletes): Remove obsolete comments about old
+ default value.
+ (dired-do-flagged-delete, dired-do-delete): Refill docstring.
+
+ * wdired.el (wdired-exit): New function.
+ (wdired-mode-map): Bind C-x C-q to wdired-exit.
+
+2007-07-28 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * cus-edit.el (customize-read-group): New fun.
+ (customize-group-other-window, customize-face-other-window):
+ Prompt before delegating to customize-(group|face).
+ Bind pop-up-windows rather than use the other-window argument.
+ (customize-group, customize-face): Prompt from the interactive spec.
+ Remove args `prompt-for-group' and `other-window'.
+
+ * emacs-lisp/advice.el (ad-interactive-form): Re-introduce.
+ (ad-body-forms, ad-advised-interactive-form): Revert this part of
+ last change.
+
+2007-07-28 Masatake YAMATO <jet@gyve.org>
+
+ * vc.el (vc-dired-mode): Add a menu for VC related operation.
+ Use backend name as the menu label Suggested by David Kastrup.
+
+2007-07-28 Alan Mackenzie <acm@muc.de>
+
+ Fix problem with modes derived from CC Mode:
+ * progmodes/cc-mode.el (c-make-emacs-variables-local): Move this
+ macro to cc-langs.
+ (c-init-language-vars-for): Remove call to above macro.
+ * progmodes/cc-langs.el (c-make-emacs-variables-local): Macro has
+ been moved to here.
+ (c-make-init-lang-vars-fun): Call c-make-emacs-variables-local.
+
+2007-07-28 Eli Zaretskii <eliz@gnu.org>
+
+ * net/trampver.el: Fix the `coding' cookie.
+
+2007-07-28 Dan Nicolaescu <dann@ics.uci.edu>
+
+ * vc-git.el (vc-git-print-log): Support both the old single file
+ interface and the new one.
+
+2007-07-28 Nick Roberts <nickrob@snap.net.nz>
+
+ * bindings.el (mode-line-remote): Use updated %@ construct.
+
+2007-07-27 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * calendar/cal-bahai.el (calendar-bahai-month-name-array)
+ (calendar-bahai-epoch, calendar-bahai-leap-year-p)
+ (calendar-bahai-leap-base, calendar-bahai-prompt-for-date)
+ (diary-list-bahai-entries, diary-bahai-mark-entries)
+ (calendar-bahai-mark-date-pattern, diary-insert-bahai-entry)
+ (diary-bahai-insert-monthly-entry, diary-bahai-insert-yearly-entry):
+ New names to clean up namespace.
+ (list-bahai-diary-entries, mark-bahai-diary-entries)
+ (insert-bahai-diary-entry, insert-monthly-bahai-diary-entry)
+ (insert-yearly-bahai-diary-entry, mark-bahai-calendar-date-pattern):
+ Add compatibility aliases.
+
+ * calendar/appt.el: Don't wrap defvar within eval-when-compile.
+
+ * calendar/cal-move.el (calendar-scroll-left, calendar-scroll-right)
+ (calendar-scroll-left-three-months)
+ (calendar-scroll-right-three-months): Clean up namespace.
+ (scroll-calendar-left, scroll-calendar-right)
+ (scroll-calendar-left-three-months)
+ (scroll-calendar-right-three-months): Add compatibility aliases.
+
+ * calendar/cal-move.el (calendar-scroll-left, calendar-scroll-right):
+ Behave like mouse-scroll-calendar-* when used from the mouse.
+
+ * calendar/cal-menu.el (cal-menu-scroll-menu)
+ (cal-menu-global-mouse-menu):
+ * calendar/calendar.el (calendar-mode-map):
+ Use new calendar-scroll-* names.
+ (mouse-scroll-calendar-left, mouse-scroll-calendar-right):
+ Remove. Use calendar-scroll-* directly instead.
+
2007-07-26 Stefan Monnier <monnier@iro.umontreal.ca>
* 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.")
(defvar mode-line-remote
(list (propertize
- "%1R"
+ "%1@"
'help-echo (purecopy (lambda (window object point)
(format "%s"
(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."
(message "")))
-(eval-when-compile (defvar number)
- (defvar original-date)
- (defvar diary-entries-list))
+(defvar number)
+(defvar original-date)
+(defvar diary-entries-list)
;;;###autoload
(defun appt-make-list ()
"Update the appointments list from today's diary buffer.
@@ -634,7 +634,7 @@ appointment package (if it is not already active)."
(defun appt-sort-list (appt-list)
"Sort an appointment list, putting earlier items at the front.
APPT-LIST is a list of the same format as `appt-time-msg-list'."
-(sort appt-list (lambda (e1 e2) (< (caar e1) (caar e2)))))
+ (sort appt-list (lambda (e1 e2) (< (caar e1) (caar e2)))))
(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 @@
(require 'cal-julian)
-(defvar bahai-calendar-month-name-array
+(defconst calendar-bahai-month-name-array
["Baha" "Jalal" "Jamal" "`Azamat" "Nur" "Rahmat" "Kalimat" "Kamal"
"Asma" "`Izzat" "Mashiyyat" "`Ilm" "Qudrat" "Qawl" "Masa'il"
"Sharaf" "Sultan" "Mulk" "`Ala"])
-(defvar calendar-bahai-epoch (calendar-absolute-from-gregorian '(3 21 1844))
+(defconst calendar-bahai-epoch (calendar-absolute-from-gregorian '(3 21 1844))
"Absolute date of start of Baha'i calendar = March 19, 622 A.D. (Julian).")
-(defun bahai-calendar-leap-year-p (year)
+(defun calendar-bahai-leap-year-p (year)
"True if YEAR is a leap year on the Baha'i calendar."
(calendar-leap-year-p (+ year 1844)))
-(defvar bahai-calendar-leap-base
+(defconst calendar-bahai-leap-base
(+ (/ 1844 4) (- (/ 1844 100)) (/ 1844 400)))
(defun calendar-absolute-from-bahai (date)
@@ -89,7 +89,7 @@ Gregorian date Sunday, December 31, 1 BC."
(leap-days (- (+ (/ prior-years 4) ; Leap days in prior years.
(- (/ prior-years 100))
(/ prior-years 400))
- bahai-calendar-leap-base)))
+ calendar-bahai-leap-base)))
(+ (1- calendar-bahai-epoch) ; Days before epoch
(* 365 (1- year)) ; Days in prior years.
leap-days
@@ -131,10 +131,10 @@ Defaults to today's date if DATE is not given."
(if (and (= m 19)
(<= d 0))
"Ayyam-i-Ha"
- (aref bahai-calendar-month-name-array (1- m))))
+ (aref calendar-bahai-month-name-array (1- m))))
(day (int-to-string
(if (<= d 0)
- (if (bahai-calendar-leap-year-p y)
+ (if (calendar-bahai-leap-year-p y)
(+ d 5)
(+ d 4))
d)))
@@ -152,12 +152,12 @@ Defaults to today's date if DATE is not given."
(defun calendar-goto-bahai-date (date &optional noecho)
"Move cursor to Baha'i date DATE.
Echo Baha'i date unless NOECHO is t."
- (interactive (bahai-prompt-for-date))
+ (interactive (calendar-bahai-prompt-for-date))
(calendar-goto-date (calendar-gregorian-from-absolute
(calendar-absolute-from-bahai date)))
(or noecho (calendar-print-bahai-date)))
-(defun bahai-prompt-for-date ()
+(defun calendar-bahai-prompt-for-date ()
"Ask for a Baha'i date."
(let* ((today (calendar-current-date))
(year (calendar-read
@@ -172,9 +172,9 @@ Echo Baha'i date unless NOECHO is t."
(completing-read
"Baha'i calendar month name: "
(mapcar 'list
- (append bahai-calendar-month-name-array nil))
+ (append calendar-bahai-month-name-array nil))
nil t)
- (calendar-make-alist bahai-calendar-month-name-array
+ (calendar-make-alist calendar-bahai-month-name-array
1))))
(day (calendar-read "Baha'i calendar day (1-19): "
'(lambda (x) (and (< 0 x) (<= x 19))))))
@@ -204,7 +204,7 @@ nil if it is not visible in the current calendar window."
(if (calendar-date-is-visible-p date)
(list (list date string))))))))
-(defun list-bahai-diary-entries ()
+(defun diary-list-bahai-entries ()
"Add any Baha'i date entries from the diary file to `diary-entries-list'.
Baha'i date diary entries must be prefaced by an
`bahai-diary-entry-symbol' (normally a `B'). The same diary date
@@ -238,7 +238,7 @@ calendar. This function is provided for use with the
(calendar-day-name gdate) "\\|"
(substring (calendar-day-name gdate) 0 3) ".?"))
(calendar-month-name-array
- bahai-calendar-month-name-array)
+ calendar-bahai-month-name-array)
(monthname
(concat
"\\*\\|"
@@ -290,7 +290,7 @@ calendar. This function is provided for use with the
(set-buffer-modified-p diary-modified))
(goto-char (point-min))))
-(defun mark-bahai-diary-entries ()
+(defun diary-bahai-mark-entries ()
"Mark days in the calendar window that have Baha'i date diary entries.
Each entry in diary-file (or included files) visible in the calendar
window is marked. Baha'i date entries are prefaced by a
@@ -311,7 +311,7 @@ nongregorian-diary-marking-hook."
(dayname (diary-name-pattern calendar-day-name-array))
(monthname
(concat
- (diary-name-pattern bahai-calendar-month-name-array t)
+ (diary-name-pattern calendar-bahai-month-name-array t)
"\\|\\*"))
(month "[0-9]+\\|\\*")
(day "[0-9]+\\|\\*")
@@ -395,12 +395,12 @@ nongregorian-diary-marking-hook."
(cdr (assoc-string
mm-name
(calendar-make-alist
- bahai-calendar-month-name-array)
+ calendar-bahai-month-name-array)
t)))))
- (mark-bahai-calendar-date-pattern mm dd yy)))))
+ (calendar-bahai-mark-date-pattern mm dd yy)))))
(setq d (cdr d)))))
-(defun mark-bahai-calendar-date-pattern (month day year)
+(defun calendar-bahai-mark-date-pattern (month day year)
"Mark dates in calendar window that conform to Baha'i date MONTH/DAY/YEAR.
A value of 0 in any position is a wildcard."
(save-excursion
@@ -458,12 +458,12 @@ A value of 0 in any position is a wildcard."
(mark-visible-calendar-date
(calendar-gregorian-from-absolute date)))))))))
-(defun insert-bahai-diary-entry (arg)
+(defun diary-insert-bahai-entry (arg)
"Insert a diary entry.
For the Baha'i date corresponding to the date indicated by point.
Prefix arg will make the entry nonmarking."
(interactive "P")
- (let* ((calendar-month-name-array bahai-calendar-month-name-array))
+ (let* ((calendar-month-name-array calendar-bahai-month-name-array))
(make-diary-entry
(concat
bahai-diary-entry-symbol
@@ -474,14 +474,14 @@ Prefix arg will make the entry nonmarking."
nil t))
arg)))
-(defun insert-monthly-bahai-diary-entry (arg)
+(defun diary-bahai-insert-monthly-entry (arg)
"Insert a monthly diary entry.
For the day of the Baha'i month corresponding to the date indicated by point.
Prefix arg will make the entry nonmarking."
(interactive "P")
(let* ((calendar-date-display-form
(if european-calendar-style '(day " * ") '("* " day )))
- (calendar-month-name-array bahai-calendar-month-name-array))
+ (calendar-month-name-array calendar-bahai-month-name-array))
(make-diary-entry
(concat
bahai-diary-entry-symbol
@@ -491,7 +491,7 @@ Prefix arg will make the entry nonmarking."
(calendar-cursor-to-date t)))))
arg)))
-(defun insert-yearly-bahai-diary-entry (arg)
+(defun diary-bahai-insert-yearly-entry (arg)
"Insert an annual diary entry.
For the day of the Baha'i year corresponding to the date indicated by point.
Prefix arg will make the entry nonmarking."
@@ -500,7 +500,7 @@ Prefix arg will make the entry nonmarking."
(if european-calendar-style
'(day " " monthname)
'(monthname " " day)))
- (calendar-month-name-array bahai-calendar-month-name-array))
+ (calendar-month-name-array calendar-bahai-month-name-array))
(make-diary-entry
(concat
bahai-diary-entry-symbol
@@ -510,7 +510,21 @@ Prefix arg will make the entry nonmarking."
(calendar-cursor-to-date t)))))
arg)))
+;; Backward compatibility.
+(define-obsolete-function-alias
+ 'list-bahai-diary-entries 'diary-list-bahai-entries "23.1")
+(define-obsolete-function-alias
+ 'mark-bahai-diary-entries 'diary-mark-bahai-entries "23.1")
+(define-obsolete-function-alias
+ 'insert-bahai-diary-entry 'diary-insert-bahai-entry "23.1")
+(define-obsolete-function-alias
+ 'insert-monthly-bahai-diary-entry 'diary-insert-bahai-monthly-entry "23.1")
+(define-obsolete-function-alias
+ 'insert-yearly-bahai-diary-entry 'diary-insert-bahai-yearly-entry "23.1")
+(define-obsolete-function-alias
+ 'mark-bahai-calendar-date-pattern 'calendar-bahai-mark-date-pattern "23.1")
+
(provide 'cal-bahai)
-;;; arch-tag: c1cb1d67-862a-4264-a01c-41cb4df01f14
+;; arch-tag: c1cb1d67-862a-4264-a01c-41cb4df01f14
;;; 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 @@
;;; Code:
-(defvar displayed-month)
(defvar displayed-year)
(defconst cal-menu-moon-menu
@@ -140,11 +139,11 @@
(defconst cal-menu-scroll-menu
'("Scroll"
- ["Forward 1 Month" scroll-calendar-left]
- ["Forward 3 Months" scroll-calendar-left-three-months]
+ ["Forward 1 Month" calendar-scroll-left]
+ ["Forward 3 Months" calendar-scroll-left-three-months]
["Forward 1 Year" "4\C-v"]
- ["Backward 1 Month" scroll-calendar-right]
- ["Backward 3 Months" scroll-calendar-right-three-months]
+ ["Backward 1 Month" calendar-scroll-right]
+ ["Backward 3 Months" calendar-scroll-right-three-months]
["Backward 1 Year" "4\ev"]))
(defun cal-menu-x-popup-menu (position menu)
@@ -459,8 +458,8 @@ The output is in landscape format, one month to a page."
(easy-menu-define cal-menu-global-mouse-menu nil
"Menu bound to a mouse event, not specific to the mouse-click location."
'("Calendar"
- ["Scroll forward" scroll-calendar-left-three-months]
- ["Scroll backward" scroll-calendar-right-three-months]
+ ["Scroll forward" calendar-scroll-left-three-months]
+ ["Scroll backward" calendar-scroll-right-three-months]
["Mark diary entries" mark-diary-entries]
["List holidays" list-calendar-holidays]
["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."
(interactive "p")
(calendar-forward-month (* -12 arg)))
-(defun scroll-calendar-left (&optional arg)
+(defun calendar-scroll-left (&optional arg event)
"Scroll the displayed calendar left by ARG months.
If ARG is negative the calendar is scrolled right. Maintains the relative
position of the cursor with respect to the calendar as well as possible."
- (interactive "p")
+ (interactive (list (prefix-numeric-value current-prefix-arg)
+ last-nonmenu-event))
(unless arg (setq arg 1))
- (calendar-cursor-to-nearest-date)
- (let ((old-date (calendar-cursor-to-date))
- (today (calendar-current-date)))
- (if (/= arg 0)
- (let ((month displayed-month)
- (year displayed-year))
- (increment-calendar-month month year arg)
- (generate-calendar-window month year)
- (calendar-cursor-to-visible-date
- (cond
- ((calendar-date-is-visible-p old-date) old-date)
- ((calendar-date-is-visible-p today) today)
- (t (list month 1 year)))))))
- (run-hooks 'calendar-move-hook))
-
-(defun scroll-calendar-right (&optional arg)
+ (save-selected-window
+ (select-window (posn-window (event-start event)))
+ (calendar-cursor-to-nearest-date)
+ (let ((old-date (calendar-cursor-to-date))
+ (today (calendar-current-date)))
+ (if (/= arg 0)
+ (let ((month displayed-month)
+ (year displayed-year))
+ (increment-calendar-month month year arg)
+ (generate-calendar-window month year)
+ (calendar-cursor-to-visible-date
+ (cond
+ ((calendar-date-is-visible-p old-date) old-date)
+ ((calendar-date-is-visible-p today) today)
+ (t (list month 1 year)))))))
+ (run-hooks 'calendar-move-hook)))
+
+(defun calendar-scroll-right (&optional arg event)
"Scroll the displayed calendar window right by ARG months.
If ARG is negative the calendar is scrolled left. Maintains the relative
position of the cursor with respect to the calendar as well as possible."
- (interactive "p")
- (scroll-calendar-left (- (or arg 1))))
+ (interactive (list (prefix-numeric-value current-prefix-arg)
+ last-nonmenu-event))
+ (calendar-scroll-left (- (or arg 1)) event))
-(defun scroll-calendar-left-three-months (arg)
+(defun calendar-scroll-left-three-months (arg)
"Scroll the displayed calendar window left by 3*ARG months.
If ARG is negative the calendar is scrolled right. Maintains the relative
position of the cursor with respect to the calendar as well as possible."
(interactive "p")
- (scroll-calendar-left (* 3 arg)))
+ (calendar-scroll-left (* 3 arg)))
-(defun scroll-calendar-right-three-months (arg)
+(defun calendar-scroll-right-three-months (arg)
"Scroll the displayed calendar window right by 3*ARG months.
If ARG is negative the calendar is scrolled left. Maintains the relative
position of the cursor with respect to the calendar as well as possible."
(interactive "p")
- (scroll-calendar-left (* -3 arg)))
+ (calendar-scroll-left (* -3 arg)))
(defun calendar-cursor-to-nearest-date ()
"Move the cursor to the closest date.
@@ -345,7 +349,17 @@ Negative DAY counts backward from end of year."
(+ 1 day (calendar-absolute-from-gregorian (list 12 31 year))))))
(or noecho (calendar-print-day-of-year)))
+;; Backward compatibility.
+(define-obsolete-function-alias
+ 'scroll-calendar-left 'calendar-scroll-left "23.1")
+(define-obsolete-function-alias
+ 'scroll-calendar-right 'calendar-scroll-right "23.1")
+(define-obsolete-function-alias
+ 'scroll-calendar-left-three-months 'calendar-scroll-left-three-months "23.1")
+(define-obsolete-function-alias
+ 'scroll-calendar-right-three-months 'calendar-scroll-right-three-months "23.1")
+
(provide 'cal-move)
-;;; arch-tag: d0883c46-7e16-4914-8ff8-8f67e699b781
+;; arch-tag: d0883c46-7e16-4914-8ff8-8f67e699b781
;;; 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."
"Move the cursor backward ARG years."
t)
-(autoload 'scroll-calendar-left "cal-move"
+(autoload 'calendar-scroll-left "cal-move"
"Scroll the displayed calendar left by ARG months."
t)
-(autoload 'scroll-calendar-right "cal-move"
+(autoload 'calendar-scroll-right "cal-move"
"Scroll the displayed calendar window right by ARG months."
t)
-(autoload 'scroll-calendar-left-three-months "cal-move"
+(autoload 'calendar-scroll-left-three-months "cal-move"
"Scroll the displayed calendar window left by 3*ARG months."
t)
-(autoload 'scroll-calendar-right-three-months "cal-move"
+(autoload 'calendar-scroll-right-three-months "cal-move"
"Scroll the displayed calendar window right by 3*ARG months."
t)
@@ -1678,10 +1678,10 @@ to be replaced by asterisks to highlight it whenever it is in the window."
;; not a legal date for the visible test in the diary section.
(if arg (setcar (cdr date) 1))
(increment-calendar-month month year (- calendar-offset))
- (generate-calendar-window month year)
- ;; Display the buffer *after* generating it, so that menu entries that
- ;; use display-month do not fail when creating the new frame.
+ ;; Display the buffer before calling generate-calendar-window so that it
+ ;; can get a chance to adjust the window sizes to the frame size.
(pop-to-buffer calendar-buffer)
+ (generate-calendar-window month year)
(if (and view-diary-entries-initially (calendar-date-is-visible-p date))
(diary-view-entries)))
(let* ((diary-buffer (get-file-buffer diary-file))
@@ -2060,7 +2060,7 @@ existing output files are overwritten." t)
(defun generate-calendar-window (&optional mon yr)
"Generate the calendar window for the current date.
Or, for optional MON, YR."
- (let* ((buffer-read-only nil)
+ (let* ((inhibit-read-only t)
(today (calendar-current-date))
(month (extract-calendar-month today))
(day (extract-calendar-day today))
@@ -2072,10 +2072,8 @@ Or, for optional MON, YR."
(day-in-week (calendar-day-of-week today))
(in-calendar-window (eq (window-buffer (selected-window))
(get-buffer calendar-buffer))))
+ (generate-calendar (or mon month) (or yr year))
(update-calendar-mode-line)
- (if mon
- (generate-calendar mon yr)
- (generate-calendar month year))
(calendar-cursor-to-visible-date
(if today-visible today (list displayed-month 1 displayed-year)))
(set-buffer-modified-p nil)
@@ -2224,14 +2222,14 @@ movement commands will not work correctly."
downcase-region upcase-region kill-region
copy-region-as-kill capitalize-region write-region))
(define-key map (vector 'remap c) 'calendar-not-implemented))
- (define-key map "<" 'scroll-calendar-right)
- (define-key map "\C-x<" 'scroll-calendar-right)
- (define-key map [prior] 'scroll-calendar-right-three-months)
- (define-key map "\ev" 'scroll-calendar-right-three-months)
- (define-key map ">" 'scroll-calendar-left)
- (define-key map "\C-x>" 'scroll-calendar-left)
- (define-key map [next] 'scroll-calendar-left-three-months)
- (define-key map "\C-v" 'scroll-calendar-left-three-months)
+ (define-key map "<" 'calendar-scroll-right)
+ (define-key map "\C-x<" 'calendar-scroll-right)
+ (define-key map [prior] 'calendar-scroll-right-three-months)
+ (define-key map "\ev" 'calendar-scroll-right-three-months)
+ (define-key map ">" 'calendar-scroll-left)
+ (define-key map "\C-x>" 'calendar-scroll-left)
+ (define-key map [next] 'calendar-scroll-left-three-months)
+ (define-key map "\C-v" 'calendar-scroll-left-three-months)
(define-key map "\C-b" 'calendar-backward-day)
(define-key map "\C-p" 'calendar-backward-week)
(define-key map "\e{" 'calendar-backward-month)
@@ -2383,7 +2381,7 @@ movement commands will not work correctly."
'help-echo "mouse-1: previous month"
'mouse-face 'mode-line-highlight
'keymap (make-mode-line-mouse-map 'mouse-1
- 'mouse-scroll-calendar-right))
+ 'calendar-scroll-right))
"Calendar"
(concat
(propertize
@@ -2412,7 +2410,7 @@ movement commands will not work correctly."
'help-echo "mouse-1: next month"
'mouse-face 'mode-line-highlight
'keymap (make-mode-line-mouse-map
- 'mouse-1 'mouse-scroll-calendar-left)))
+ 'mouse-1 'calendar-scroll-left)))
"The mode line of the calendar buffer.
This must be a list of items that evaluate to strings--those strings are
@@ -2439,24 +2437,6 @@ under the cursor:
(extract-calendar-year iso-date)))
\"\"))")
-(defun mouse-scroll-calendar-left (event)
- "Scroll the displayed calendar left by one month.
-Maintains the relative position of the cursor
-with respect to the calendar as well as possible."
- (interactive "e")
- (save-selected-window
- (select-window (posn-window (event-start event)))
- (scroll-calendar-left 1)))
-
-(defun mouse-scroll-calendar-right (event)
- "Scroll the displayed calendar right by one month.
-Maintains the relative position of the cursor
-with respect to the calendar as well as possible."
- (interactive "e")
- (save-selected-window
- (select-window (posn-window (event-start event)))
- (scroll-calendar-right 1)))
-
(defun mouse-calendar-other-month (event)
"Display a three-month calendar centered around a specified month and year."
(interactive "e")
@@ -2493,8 +2473,13 @@ For a complete description, type \
(setq indent-tabs-mode nil)
(update-calendar-mode-line)
(make-local-variable 'calendar-mark-ring)
- (make-local-variable 'displayed-month);; Month in middle of window.
- (make-local-variable 'displayed-year) ;; Year in middle of window.
+ (make-local-variable 'displayed-month) ;; Month in middle of window.
+ (make-local-variable 'displayed-year) ;; Year in middle of window.
+ ;; Most functions only work if displayed-month and displayed-year are set,
+ ;; so let's make sure they're always set. Most likely, this will be reset
+ ;; soon in generate-calendar, but better safe than sorry.
+ (unless (boundp 'displayed-month) (setq displayed-month 1))
+ (unless (boundp 'displayed-year) (setq displayed-year 2001))
(set (make-local-variable 'font-lock-defaults)
'(calendar-font-lock-keywords t))
(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 @@
(require 'cus-face)
(require 'wid-edit)
-(eval-when-compile
- (defvar custom-versions-load-alist) ; from cus-load
- (defvar recentf-exclude)) ; from recentf.el
+
+(defvar custom-versions-load-alist) ; from cus-load
+(defvar recentf-exclude) ; from recentf.el
(condition-case nil
(require 'cus-load)
@@ -1032,22 +1032,20 @@ then prompt for the MODE to customize."
t nil nil (if group (symbol-name major-mode))))))))
(customize-group (custom-group-of-mode mode)))
+(defun customize-read-group ()
+ (let ((completion-ignore-case t))
+ (completing-read "Customize group (default emacs): "
+ obarray
+ (lambda (symbol)
+ (or (and (get symbol 'custom-loads)
+ (not (get symbol 'custom-autoload)))
+ (get symbol 'custom-group)))
+ t)))
;;;###autoload
-(defun customize-group (&optional group prompt-for-group other-window)
+(defun customize-group (&optional group)
"Customize GROUP, which must be a customization group."
- (interactive)
- (and (null group)
- (or prompt-for-group (called-interactively-p))
- (let ((completion-ignore-case t))
- (setq group
- (completing-read "Customize group (default emacs): "
- obarray
- (lambda (symbol)
- (or (and (get symbol 'custom-loads)
- (not (get symbol 'custom-autoload)))
- (get symbol 'custom-group)))
- t))))
+ (interactive (list (customize-read-group)))
(when (stringp group)
(if (string-equal "" group)
(setq group 'emacs)
@@ -1055,25 +1053,21 @@ then prompt for the MODE to customize."
(let ((name (format "*Customize Group: %s*"
(custom-unlispify-tag-name group))))
(if (get-buffer name)
- (if other-window
- (let ((pop-up-windows t)
- (same-window-buffer-names nil)
- (same-window-regexps nil))
- (pop-to-buffer name))
- (pop-to-buffer name))
- (funcall (if other-window
- 'custom-buffer-create-other-window
- 'custom-buffer-create)
- (list (list group 'custom-group))
- name
- (concat " for group "
- (custom-unlispify-tag-name group))))))
+ (pop-to-buffer name)
+ (custom-buffer-create
+ (list (list group 'custom-group))
+ name
+ (concat " for group "
+ (custom-unlispify-tag-name group))))))
;;;###autoload
(defun customize-group-other-window (&optional group)
"Customize GROUP, which must be a customization group, in another window."
- (interactive)
- (customize-group group t t))
+ (interactive (list (customize-read-group)))
+ (let ((pop-up-windows t)
+ (same-window-buffer-names nil)
+ (same-window-regexps nil))
+ (customize-group group)))
;;;###autoload
(defalias 'customize-variable 'customize-option)
@@ -1254,41 +1248,33 @@ Emacs that is associated with version VERSION of PACKAGE."
(< minor1 minor2)))))
;;;###autoload
-(defun customize-face (&optional face prompt-for-face other-window)
+(defun customize-face (&optional face)
"Customize FACE, which should be a face name or nil.
If FACE is nil, customize all faces. If FACE is actually a
face-alias, customize the face it is aliased to.
Interactively, when point is on text which has a face specified,
suggest to customize that face, if it's customizable."
- (interactive)
- (and (null face)
- (or prompt-for-face (called-interactively-p))
- (setq face (read-face-name "Customize face" "all faces" t)))
+ (interactive (list (read-face-name "Customize face" "all faces" t)))
(if (member face '(nil ""))
(setq face (face-list)))
(if (and (listp face) (null (cdr face)))
(setq face (car face)))
- (let ((create-buffer-fn (if other-window
- 'custom-buffer-create-other-window
- 'custom-buffer-create)))
- (if (listp face)
- (funcall create-buffer-fn
- (custom-sort-items
- (mapcar (lambda (s)
- (list s 'custom-face))
- face)
- t nil)
- "*Customize Faces*")
- ;; If FACE is actually an alias, customize the face it is aliased to.
- (if (get face 'face-alias)
- (setq face (get face 'face-alias)))
- (unless (facep face)
- (error "Invalid face %S" face))
- (funcall create-buffer-fn
- (list (list face 'custom-face))
- (format "*Customize Face: %s*"
- (custom-unlispify-tag-name face))))))
+ (if (listp face)
+ (custom-buffer-create
+ (custom-sort-items
+ (mapcar (lambda (s) (list s 'custom-face)) face)
+ t nil)
+ "*Customize Faces*")
+ ;; If FACE is actually an alias, customize the face it is aliased to.
+ (if (get face 'face-alias)
+ (setq face (get face 'face-alias)))
+ (unless (facep face)
+ (error "Invalid face %S" face))
+ (custom-buffer-create
+ (list (list face 'custom-face))
+ (format "*Customize Face: %s*"
+ (custom-unlispify-tag-name face)))))
;;;###autoload
(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.
Interactively, when point is on text which has a face specified,
suggest to customize that face, if it's customizable."
- (interactive)
- (customize-face face t t))
+ (interactive (list (read-face-name "Customize face" "all faces" t)))
+ (let ((pop-up-windows t)
+ (same-window-buffer-names nil)
+ (same-window-regexps nil))
+ (customize-face face)))
(defalias 'customize-customized 'customize-unsaved)
@@ -4025,7 +4014,7 @@ Optional EVENT is the location for the menu."
(defun custom-group-save (widget)
"Save all modified group members."
- (dolist (child (children (widget-get widget :children)))
+ (dolist (child (widget-get widget :children))
(when (memq (widget-get child :custom-state) '(modified set))
(widget-apply child :custom-save))))
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."
(define-key map "$" 'dired-hide-subdir)
(define-key map "\M-$" 'dired-hide-all)
;; misc
- (define-key map "\C-x\C-q" 'wdired-change-to-wdired-mode)
+ (define-key map "\C-x\C-q" 'dired-toggle-read-only)
(define-key map "?" 'dired-summary)
(define-key map "\177" 'dired-unmark-backward)
(define-key map [remap undo] 'dired-undo)
@@ -1353,7 +1353,8 @@ Do so according to the former subdir alist OLD-SUBDIR-ALIST."
(define-key map [menu-bar immediate create-directory]
'(menu-item "Create Directory..." dired-create-directory))
(define-key map [menu-bar immediate wdired-mode]
- '(menu-item "Edit File Names" wdired-change-to-wdired-mode))
+ '(menu-item "Edit File Names" wdired-change-to-wdired-mode
+ :filter (lambda (x) (if (eq major-mode 'dired-mode) x))))
(define-key map [menu-bar regexp]
(cons "Regexp" (make-sparse-keymap "Regexp")))
@@ -1656,6 +1657,16 @@ You can use it to recover marks, killed lines or subdirs."
(message "Change in dired buffer undone.
Actual changes in files cannot be undone by Emacs."))
+(defun dired-toggle-read-only ()
+ "Edit dired buffer with Wdired, or set it read-only.
+Call `wdired-change-to-wdired-mode' in dired buffers whose editing is
+supported by Wdired (the major mode of the dired buffer is `dired-mode').
+Otherwise, for buffers inheriting from dired-mode, call `toggle-read-only'."
+ (interactive)
+ (if (eq major-mode 'dired-mode)
+ (wdired-change-to-wdired-mode)
+ (toggle-read-only)))
+
(defun dired-next-line (arg)
"Move down lines then position at filename.
Optional 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'."
;; Deleting files
-(defcustom dired-recursive-deletes 'top ; Default only delete empty directories.
+(defcustom dired-recursive-deletes 'top
"*Decide whether recursive deletes are allowed.
A value of nil means no recursive deletes.
`always' means delete recursively without asking. This is DANGEROUS!
@@ -2409,8 +2420,8 @@ Anything else, ask for each sub-directory."
"In Dired, delete the files flagged for deletion.
If NOMESSAGE is non-nil, we don't display any message
if there are no flagged files.
-`dired-recursive-deletes' controls whether
-deletion of non-empty directories is allowed."
+`dired-recursive-deletes' controls whether deletion of
+non-empty directories is allowed."
(interactive)
(let* ((dired-marker-char dired-del-marker)
(regexp (dired-marker-regexp))
@@ -2427,8 +2438,8 @@ deletion of non-empty directories is allowed."
(defun dired-do-delete (&optional arg)
"Delete all marked (or next ARG) files.
-`dired-recursive-deletes' controls whether
-deletion of non-empty directories is allowed."
+`dired-recursive-deletes' controls whether deletion of
+non-empty directories is allowed."
;; This is more consistent with the file marking feature than
;; dired-do-flagged-delete.
(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)'."
(natnump docstring))
docstring)))
+(defun ad-interactive-form (definition)
+ "Return the interactive form of DEFINITION.
+Like `interactive-form', but also works on pieces of advice."
+ (interactive-form
+ (if (ad-advice-p definition)
+ (ad-lambda-expression definition)
+ definition)))
+
(defun ad-body-forms (definition)
"Return the list of body forms of DEFINITION."
(cond ((ad-compiled-p definition)
nil)
((consp definition)
(nthcdr (+ (if (ad-docstring definition) 1 0)
- (if (interactive-form definition) 1 0))
+ (if (ad-interactive-form definition) 1 0))
(cdr (cdr (ad-lambda-expression definition)))))))
;; Matches the docstring of an advised definition.
@@ -3024,7 +3032,7 @@ in any of these classes."
(ad-get-enabled-advices function 'around)
(ad-get-enabled-advices function 'after)))
(let ((interactive-form
- (interactive-form (ad-advice-definition advice))))
+ (ad-interactive-form (ad-advice-definition advice))))
(if interactive-form
;; We found the first one, use it:
(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."
(const :tag "No limit")))
(defcustom copyright-regexp
- "\\(©\|@copyright{}\\|[Cc]opyright\\s *:?\\s *\\(?:(C)\\)?\
+ "\\(©\\|@copyright{}\\|[Cc]opyright\\s *:?\\s *\\(?:(C)\\)?\
\\|[Cc]opyright\\s *:?\\s *©\\)\
-\\s *\\([1-9]\\([-0-9, ';\n\t]\\|\\s<\\|\\s>\\)*[0-9]+\\)"
+\\s *\\([1-9]\\([-0-9, ';/*%#\n\t]\\|\\s<\\|\\s>\\)*[0-9]+\\)"
"What your copyright notice looks like.
The second \\( \\) construct must match the years."
:group 'copyright
@@ -93,7 +93,8 @@ When this is `function', only ask when called non-interactively."
(re-search-forward (concat "\\(" copyright-regexp
"\\)\\([ \t]*\n\\)?.*\\(?:"
copyright-names-regexp "\\)")
- (+ (point) copyright-limit) t)
+ (if copyright-limit (+ (point) copyright-limit))
+ t)
;; In case the regexp is rejected. This is useful because
;; copyright-update is typically called from before-save-hook where
;; such an error is very inconvenient for the user.
@@ -174,10 +175,11 @@ interactively."
(and copyright-current-gpl-version
;; match the GPL version comment in .el files, including the
;; bilingual Esperanto one in two-column, and in texinfo.tex
- (re-search-forward "\\(the Free Software Foundation;\
+ (re-search-forward
+ "\\(the Free Software Foundation;\
either \\|; a\\^u eldono \\([0-9]+\\)a, ? a\\^u (la\\^u via \\)\
version \\([0-9]+\\), or (at"
- (+ (point) copyright-limit) t)
+ (if copyright-limit (+ (point) copyright-limit)) t)
(not (string= (match-string 3) copyright-current-gpl-version))
(or noquery
(y-or-n-p (concat "Replace GPL version by "
@@ -199,7 +201,8 @@ Uses heuristic: year >= 50 means 19xx, < 50 means 20xx."
(interactive)
(widen)
(goto-char (point-min))
- (if (re-search-forward copyright-regexp (+ (point) copyright-limit) t)
+ (if (re-search-forward copyright-regexp
+ (if copyright-limit (+ (point) copyright-limit)) t)
(let ((s (match-beginning 2))
(e (copy-marker (1+ (match-end 2))))
(p (make-marker))
@@ -239,7 +242,7 @@ Uses heuristic: year >= 50 means 19xx, < 50 means 20xx."
"Copyright (C) " `(substring (current-time-string) -4) " by "
(or (getenv "ORGANIZATION")
str)
- '(if (> (point) (+ (point-min) copyright-limit))
+ '(if (and copyright-limit (> (point) (+ (point-min) copyright-limit)))
(message "Copyright extends beyond `copyright-limit' and won't be updated automatically."))
comment-end \n)
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 @@
(modify-syntax-entry i "_ " table)
(setq i (1+ i)))
(modify-syntax-entry ?\s " " table)
+ ;; Non-break space acts as whitespace.
+ (modify-syntax-entry ?\x8a0 " " table)
(modify-syntax-entry ?\t " " table)
(modify-syntax-entry ?\f " " table)
(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 @@
+2007-07-30 Michael Olson <mwolson@gnu.org>
+
+ * erc-nicklist.el: Remove from the Emacs source tree. This file
+ is not release quality, and relies heavily on a module which
+ cannot be distributed with ERC due to licensing reasons.
+
2007-07-25 Glenn Morris <rgm@gnu.org>
* 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 @@
-;;; erc-nicklist.el --- Display channel nicknames in a side buffer.
-
-;; Copyright (C) 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
-
-;; Filename: erc-nicklist.el
-;; Author: Lawrence Mitchell <wence@gmx.li>
-;; Created: 2004-04-30
-;; Keywords: IRC chat client Internet
-
-;; This file is part of GNU Emacs.
-
-;; GNU Emacs is free software; you can redistribute it and/or modify
-;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 3, or (at your option)
-;; any later version.
-
-;; GNU Emacs is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-;; GNU General Public License for more details.
-
-;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs; see the file COPYING. If not, write to the
-;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
-;; Boston, MA 02110-1301, USA.
-
-;;; Commentary:
-;;
-;; This provides a minimal mIRC style nicklist buffer for ERC. To
-;; activate, do M-x erc-nicklist RET in the channel buffer you want
-;; the nicklist to appear for. To close and quit the nicklist
-;; buffer, do M-x erc-nicklist-quit RET from within the nicklist buffer.
-;;
-;; TODO:
-;; o Somehow associate nicklist windows with channel windows so they
-;; appear together, and if one gets buried, then the other does.
-;;
-;; o Make "Query" and "Message" work.
-;;
-;; o Prettify the actual list of nicks in some way.
-;;
-;; o Add a proper erc-module that people can turn on and off, figure
-;; out a way of creating the nicklist window at an appropriate time
-;; --- probably in `erc-join-hook'.
-;;
-;; o Ensure XEmacs compatibility --- the mouse-menu support is likely
-;; broken.
-;;
-;; o Add option to display in a separate frame --- will again need to
-;; be able to associate the nicklist with the currently active
-;; channel buffer or something similar.
-;;
-;; o Allow toggling of visibility of nicklist via ERC commands.
-
-;;; History:
-;;
-
-;; Changes by Edgar Gonçalves <edgar.goncalves@inesc-id.pt>
-;; Jun 25 2005:
-;; - images are changed to a standard set of names.
-;; - /images now contain gaim's status icons.
-;; May 31 2005:
-;; - tooltips are improved. they try to access bbdb for a nice nick!
-;; Apr 26 2005:
-;; - erc-nicklist-channel-users-info was fixed (sorting bug)
-;; - Away names don't need parenthesis when using icons
-;; Apr 26 2005:
-;; - nicks can display icons of their connection type (msn, icq, for now)
-;; Mar 15 2005:
-;; - nicks now are different for unvoiced and op users
-;; - nicks now have tooltips displaying more info
-;; Mar 18 2005:
-;; - queries now work ok, both on menu and keyb shortcut RET.
-;; - nicklist is now sorted ignoring the case. Voiced nicks will
-;; appear according to `erc-nicklist-voiced-position'.
-
-;;; Code:
-
-(require 'erc)
-(condition-case nil
- (require 'erc-bbdb)
- (error nil))
-(eval-when-compile (require 'cl))
-
-(defgroup erc-nicklist nil
- "Display a list of nicknames in a separate window."
- :group 'erc)
-
-(defcustom erc-nicklist-use-icons t
- "*If non-nil, display an icon instead of the name of the chat medium.
-By \"chat medium\", we mean IRC, AOL, MSN, ICQ, etc."
- :group 'erc-nicklist
- :type 'boolean)
-
-(defcustom erc-nicklist-icons-directory
- (concat default-directory "images/")
- "*Directory of the PNG files for chat icons.
-Icons are displayed if `erc-nicklist-use-icons' is non-nil."
- :group 'erc-nicklist
- :type 'directory)
-
-(defcustom erc-nicklist-voiced-position 'bottom
- "*Position of voiced nicks in the nicklist.
-The value can be `top', `bottom' or nil (don't sort)."
- :group 'erc-nicklist
- :type '(choice
- (const :tag "Top" 'top)
- (const :tag "Bottom" 'bottom)
- (const :tag "Mixed" nil)))
-
-(defcustom erc-nicklist-window-size 20.0
- "*The size of the nicklist window.
-
-This specifies a percentage of the channel window width.
-
-A negative value means the nicklist window appears on the left of the
-channel window, and vice versa."
- :group 'erc-nicklist
- :type 'float)
-
-
-(defun erc-nicklist-buffer-name (&optional buffer)
- "Return the buffer name for a nicklist associated with BUFFER.
-
-If BUFFER is nil, use the value of `current-buffer'."
- (format " *%s-nicklist*" (buffer-name (or buffer (current-buffer)))))
-
-(defun erc-nicklist-make-window ()
- "Create an ERC nicklist window.
-
-See also `erc-nicklist-window-size'."
- (let ((width (floor (* (window-width) (/ erc-nicklist-window-size 100.0))))
- (buffer (erc-nicklist-buffer-name))
- window)
- (split-window-horizontally (- width))
- (setq window (next-window))
- (set-window-buffer window (get-buffer-create buffer))
- (with-current-buffer buffer
- (set-window-dedicated-p window t))))
-
-
-(defvar erc-nicklist-images-alist '()
- "Alist that maps a connection type to an icon.")
-
-(defun erc-nicklist-insert-medium-name-or-icon (host channel is-away)
- "Inserts an icon or a string identifying the current host type.
-This is configured using `erc-nicklist-use-icons' and
-`erc-nicklist-icons-directory'."
- ;; identify the network (for bitlebee usage):
- (let ((bitlbee-p (save-match-data
- (string-match "\\`&bitlbee\\b"
- (buffer-name channel)))))
- (cond ((and bitlbee-p
- (string= "login.icq.com" host))
- (if erc-nicklist-use-icons
- (if is-away
- (insert-image (cdr (assoc 'icq-away
- erc-nicklist-images-alist)))
- (insert-image (cdr (assoc 'icq
- erc-nicklist-images-alist))))
- (insert "ICQ")))
- (bitlbee-p
- (if erc-nicklist-use-icons
- (if is-away
- (insert-image (cdr (assoc 'msn-away
- erc-nicklist-images-alist)))
- (insert-image (cdr (assoc 'msn
- erc-nicklist-images-alist))))
- (insert "MSN")))
- (t
- (if erc-nicklist-use-icons
- (if is-away
- (insert-image (cdr (assoc 'irc-away
- erc-nicklist-images-alist)))
- (insert-image (cdr (assoc 'irc
- erc-nicklist-images-alist))))
- (insert "IRC"))))
- (insert " ")))
-
-(defun erc-nicklist-search-for-nick (finger-host)
- "Return the bitlbee-nick field for this contact given FINGER-HOST.
-Seach for the BBDB record of this contact. If not found, return nil."
- (when (boundp 'erc-bbdb-bitlbee-name-field)
- (let ((record (car
- (erc-member-if
- #'(lambda (r)
- (let ((fingers (bbdb-record-finger-host r)))
- (when fingers
- (string-match finger-host
- (car (bbdb-record-finger-host r))))))
- (bbdb-records)))))
- (when record
- (bbdb-get-field record erc-bbdb-bitlbee-name-field)))))
-
-(defun erc-nicklist-insert-contents (channel)
- "Insert the nicklist contents, with text properties and the optional images."
- (setq buffer-read-only nil)
- (erase-buffer)
- (dolist (u (erc-nicklist-channel-users-info channel))
- (let* ((server-user (car u))
- (channel-user (cdr u))
- (nick (erc-server-user-nickname server-user))
- (host (erc-server-user-host server-user))
- (login (erc-server-user-login server-user))
- (full-name(erc-server-user-full-name server-user))
- (info (erc-server-user-info server-user))
- (channels (erc-server-user-buffers server-user))
- (op (erc-channel-user-op channel-user))
- (voice (erc-channel-user-voice channel-user))
- (bbdb-nick (or (erc-nicklist-search-for-nick
- (concat login "@" host))
- ""))
- (away-status (if voice "" "\n(Away)"))
- (balloon-text (concat bbdb-nick (if (string= "" bbdb-nick)
- "" "\n")
- "Login: " login "@" host
- away-status)))
- (erc-nicklist-insert-medium-name-or-icon host channel (not voice))
- (unless (or voice erc-nicklist-use-icons)
- (setq nick (concat "(" nick ")")))
- (when op
- (setq nick (concat nick " (OP)")))
- (insert (erc-propertize nick
- 'erc-nicklist-nick nick
- 'mouse-face 'highlight
- 'erc-nicklist-channel channel
- 'help-echo balloon-text)
- "\n")))
- (erc-nicklist-mode))
-
-
-(defun erc-nicklist ()
- "Create an ERC nicklist buffer."
- (interactive)
- (let ((channel (current-buffer)))
- (unless (or (not erc-nicklist-use-icons)
- erc-nicklist-images-alist)
- (setq erc-nicklist-images-alist
- `((msn . ,(create-image (concat erc-nicklist-icons-directory
- "msn-online.png")))
- (msn-away . ,(create-image (concat erc-nicklist-icons-directory
- "msn-offline.png")))
- (irc . ,(create-image (concat erc-nicklist-icons-directory
- "irc-online.png")))
- (irc-away . ,(create-image (concat erc-nicklist-icons-directory
- "irc-offline.png")))
- (icq . ,(create-image (concat erc-nicklist-icons-directory
- "icq-online.png")))
- (icq-away . ,(create-image (concat erc-nicklist-icons-directory
- "icq-offline.png"))))))
- (erc-nicklist-make-window)
- (with-current-buffer (get-buffer (erc-nicklist-buffer-name channel))
- (erc-nicklist-insert-contents channel)))
- (add-hook 'erc-channel-members-changed-hook #'erc-nicklist-update))
-
-(defun erc-nicklist-update ()
- "Update the ERC nicklist buffer."
- (let ((b (get-buffer (erc-nicklist-buffer-name)))
- (channel (current-buffer)))
- (when b
- (with-current-buffer b
- (erc-nicklist-insert-contents channel)))))
-
-(defvar erc-nicklist-mode-map
- (let ((map (make-sparse-keymap)))
- (define-key map (kbd "<down-mouse-3>") 'erc-nicklist-menu)
- (define-key map "\C-j" 'erc-nicklist-kbd-menu)
- (define-key map "q" 'erc-nicklist-quit)
- (define-key map (kbd "RET") 'erc-nicklist-kbd-cmd-QUERY)
- map)
- "Keymap for `erc-nicklist-mode'.")
-
-(define-derived-mode erc-nicklist-mode fundamental-mode
- "Nicklist"
- "Major mode for the ERC nicklist buffer."
- (setq buffer-read-only t))
-
-(defun erc-nicklist-call-erc-command (command point buffer window)
- "Call an ERC COMMAND.
-
-Depending on what COMMAND is, it's called with one of POINT, BUFFER,
-or WINDOW as arguments."
- (when command
- (let* ((p (text-properties-at point))
- (b (plist-get p 'erc-nicklist-channel)))
- (if (memq command '(erc-nicklist-quit ignore))
- (funcall command window)
- ;; EEEK! Horrble, but it's the only way we can ensure the
- ;; response goes to the correct buffer.
- (erc-set-active-buffer b)
- (switch-to-buffer-other-window b)
- (funcall command (plist-get p 'erc-nicklist-nick))))))
-
-(defun erc-nicklist-cmd-QUERY (user &optional server)
- "Opens a query buffer with USER."
- ;; FIXME: find a way to switch to that buffer afterwards...
- (let ((send (if server
- (format "QUERY %s %s" user server)
- (format "QUERY %s" user))))
- (erc-cmd-QUERY user)
- t))
-
-(defun erc-nicklist-kbd-cmd-QUERY (&optional window)
- (interactive)
- (let* ((p (text-properties-at (point)))
- (server (plist-get p 'erc-nicklist-channel))
- (nick (plist-get p 'erc-nicklist-nick))
- (nick (or (and (string-match "(\\(.*\\))" nick)
- (match-string 1 nick))
- nick))
- (nick (or (and (string-match "\\+\\(.*\\)" nick)
- (match-string 1 nick))
- nick))
- (send (format "QUERY %s %s" nick server)))
- (switch-to-buffer-other-window server)
- (erc-cmd-QUERY nick)))
-
-
-(defvar erc-nicklist-menu
- (let ((map (make-sparse-keymap "Action")))
- (define-key map [erc-cmd-WHOIS]
- '("Whois" . erc-cmd-WHOIS))
- (define-key map [erc-cmd-DEOP]
- '("Deop" . erc-cmd-DEOP))
- (define-key map [erc-cmd-MSG]
- '("Message" . erc-cmd-MSG)) ;; TODO!
- (define-key map [erc-nicklist-cmd-QUERY]
- '("Query" . erc-nicklist-kbd-cmd-QUERY))
- (define-key map [ignore]
- '("Cancel" . ignore))
- (define-key map [erc-nicklist-quit]
- '("Close nicklist" . erc-nicklist-quit))
- map)
- "Menu keymap for the ERC nicklist.")
-
-(defun erc-nicklist-quit (&optional window)
- "Delete the ERC nicklist.
-
-Deletes WINDOW and stops updating the nicklist buffer."
- (interactive)
- (let ((b (window-buffer window)))
- (with-current-buffer b
- (set-buffer-modified-p nil)
- (kill-this-buffer)
- (remove-hook 'erc-channel-members-changed-hook 'erc-nicklist-update))))
-
-
-(defun erc-nicklist-kbd-menu ()
- "Show the ERC nicklist menu."
- (interactive)
- (let* ((point (point))
- (window (selected-window))
- (buffer (current-buffer)))
- (with-current-buffer buffer
- (erc-nicklist-call-erc-command
- (car (x-popup-menu point
- erc-nicklist-menu))
- point
- buffer
- window))))
-
-(defun erc-nicklist-menu (&optional arg)
- "Show the ERC nicklist menu.
-
-ARG is a parametrized event (see `interactive')."
- (interactive "e")
- (let* ((point (nth 1 (cadr arg)))
- (window (car (cadr arg)))
- (buffer (window-buffer window)))
- (with-current-buffer buffer
- (erc-nicklist-call-erc-command
- (car (x-popup-menu arg
- erc-nicklist-menu))
- point
- buffer
- window))))
-
-
-(defun erc-nicklist-channel-users-info (channel)
- "Return a nick-sorted list of all users on CHANNEL.
-Result are elements in the form (SERVER-USER . CHANNEL-USER). The
-list has all the voiced users according to
-`erc-nicklist-voiced-position'."
- (let* ((nicks (erc-sort-channel-users-alphabetically
- (with-current-buffer channel (erc-get-channel-user-list)))))
- (if erc-nicklist-voiced-position
- (let ((voiced-nicks (erc-remove-if-not
- #'(lambda (x)
- (null (erc-channel-user-voice (cdr x))))
- nicks))
- (devoiced-nicks (erc-remove-if-not
- #'(lambda (x)
- (erc-channel-user-voice
- (cdr x)))
- nicks)))
- (cond ((eq erc-nicklist-voiced-position 'top)
- (append devoiced-nicks voiced-nicks))
- ((eq erc-nicklist-voiced-position 'bottom)
- (append voiced-nicks devoiced-nicks))))
- nicks)))
-
-
-
-(provide 'erc-nicklist)
-
-;;; erc-nicklist.el ends here
-;;
-;; Local Variables:
-;; indent-tabs-mode: t
-;; tab-width: 8
-;; coding: utf-8
-;; End:
-
-;; 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 @@
* Relicense all FSF files to GPLv3 or later.
+2007-07-24 Katsumi Yamaoka <yamaoka@jpl.org>
+
+ * gnus-msg.el (gnus-summary-supersede-article)
+ (gnus-summary-resend-message-edit): Add Gcc header.
+ (gnus-summary-resend-bounced-mail): Ditto; search whole body for parent
+ article's Message-ID; refer parent article in summary buffer.
+
+ * message.el (message-bounce): Call mime-to-mml.
+
2007-07-21 Reiner Steib <Reiner.Steib@gmx.de>
* 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."
(set-buffer ,gnus-summary-buffer)
(gnus-cache-possibly-remove-article ,article nil nil nil t)
(gnus-summary-mark-as-read ,article gnus-canceled-mark)))))
- message-send-actions))))
+ message-send-actions)
+ ;; Add Gcc header.
+ (gnus-inews-insert-archive-gcc)
+ (gnus-inews-insert-gcc))))
@@ -1280,10 +1283,13 @@ composing a new message."
(message-narrow-to-head-1)
;; Gnus will generate a new one when sending.
(message-remove-header "Message-ID")
- (message-remove-header message-ignored-resent-headers t)
;; Remove unwanted headers.
+ (message-remove-header message-ignored-resent-headers t)
(goto-char (point-max))
(insert mail-header-separator)
+ ;; Add Gcc header.
+ (gnus-inews-insert-archive-gcc)
+ (gnus-inews-insert-gcc)
(goto-char (point-min))
(when (re-search-forward "^To:\\|^Newsgroups:" nil 'move)
(forward-char 1))
@@ -1557,15 +1563,29 @@ If FETCH, try to fetch the article that this is a reply to, if indeed
this is a reply."
(interactive "P")
(gnus-summary-select-article t)
- (set-buffer gnus-original-article-buffer)
- (gnus-setup-message 'compose-bounce
- (let* ((references (mail-fetch-field "references"))
- (parent (and references (gnus-parent-id references))))
+ (let (summary-buffer parent)
+ (if fetch
+ (progn
+ (setq summary-buffer (current-buffer))
+ (set-buffer gnus-original-article-buffer)
+ (article-goto-body)
+ (when (re-search-forward "^References:\n?" nil t)
+ (while (memq (char-after) '(?\t ? ))
+ (forward-line 1))
+ (skip-chars-backward "\t\n ")
+ (setq parent
+ (gnus-parent-id (buffer-substring (match-end 0) (point))))))
+ (set-buffer gnus-original-article-buffer))
+ (gnus-setup-message 'compose-bounce
(message-bounce)
+ ;; Add Gcc header.
+ (gnus-inews-insert-archive-gcc)
+ (gnus-inews-insert-gcc)
;; If there are references, we fetch the article we answered to.
- (and fetch parent
- (gnus-summary-refer-article parent)
- (gnus-summary-show-all-headers)))))
+ (when parent
+ (with-current-buffer summary-buffer
+ (gnus-summary-refer-article parent)
+ (gnus-summary-show-all-headers))))))
;;; Gcc handling.
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."
(goto-char boundary)
(when (re-search-backward "^.?From .*\n" nil t)
(delete-region (match-beginning 0) (match-end 0)))))
- (mm-enable-multibyte)
+ (mime-to-mml)
(save-restriction
(message-narrow-to-head-1)
(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 @@
;; GNU Emacs is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 2, or (at your option)
+;; the Free Software Foundation; either version 3, or (at your option)
;; any later version.
;; 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 @@
-;;; -*- mode: Emacs-Lisp; coding: iso-2022-7bit; -*-
;;; tramp-cache.el --- file information caching for Tramp
;; Copyright (C) 2000, 2005, 2006, 2007 by Free Software Foundation, Inc.
@@ -11,8 +10,8 @@
;; GNU Emacs is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 3 of the License, or
-;; (at your option) any later version.
+;; the Free Software Foundation; either version 3, or (at your option)
+;; any later version.
;; GNU Emacs is distributed in the hope that it will be useful,
;; 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 @@
-;;; -*- coding: iso-8859-1; -*-
;;; tramp-fish.el --- Tramp access functions for FISH protocol
;; Copyright (C) 2006, 2007 Free Software Foundation, Inc.
@@ -10,8 +9,8 @@
;; GNU Emacs is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 3 of the License, or
-;; (at your option) any later version.
+;; the Free Software Foundation; either version 3, or (at your option)
+;; any later version.
;; GNU Emacs is distributed in the hope that it will be useful,
;; 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 @@
-;;; tramp-ftp.el --- Tramp convenience functions for Ange-FTP -*- coding: iso-8859-1; -*-
+;;; tramp-ftp.el --- Tramp convenience functions for Ange-FTP
;; Copyright (C) 2002, 2003, 2004, 2005, 2006,
;; 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 @@
-;;; -*- coding: iso-8859-1; -*-
;;; tramp-gw.el --- Tramp utility functions for HTTP tunnels and SOCKS gateways
;; Copyright (C) 2007 Free Software Foundation, Inc.
@@ -10,8 +9,8 @@
;; GNU Emacs is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 3 of the License, or
-;; (at your option) any later version.
+;; the Free Software Foundation; either version 3, or (at your option)
+;; any later version.
;; GNU Emacs is distributed in the hope that it will be useful,
;; 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 @@
-;;; tramp-smb.el --- Tramp access functions for SMB servers -*- coding: iso-8859-1; -*-
+;;; tramp-smb.el --- Tramp access functions for SMB servers
;; Copyright (C) 2002, 2003, 2004, 2005, 2006,
;; 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 @@
-;;; -*- coding: iso-2022-7bit; -*-
+;;; -*- coding: utf-8; -*-
;;; tramp-uu.el --- uuencode in Lisp
;; Copyright (C) 2002, 2003, 2004, 2005, 2006,
;; 2007 Free Software Foundation, Inc.
-;; Author: Kai Gro,A_(Bjohann <kai.grossjohann@gmx.net>
+;; Author: Kai Großjohann <kai.grossjohann@gmx.net>
;; Keywords: comm, terminals
;; 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 @@
-;;; -*- mode: Emacs-Lisp; coding: iso-2022-7bit; -*-
+;;; -*- mode: Emacs-Lisp; coding: utf-8; -*-
;;; tramp.el --- Transparent Remote Access, Multiple Protocol
;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004,
@@ -6,7 +6,7 @@
;; (copyright statements below in code to be updated with the above notice)
-;; Author: Kai Gro,A_(Bjohann <kai.grossjohann@gmx.net>
+;; Author: Kai Großjohann <kai.grossjohann@gmx.net>
;; Michael Albinus <michael.albinus@gmx.de>
;; Keywords: comm, processes
@@ -2448,6 +2448,7 @@ of."
t
(let ((f (buffer-file-name)))
(with-parsed-tramp-file-name f nil
+ (tramp-flush-file-property v localname)
(let* ((attr (file-attributes f))
(modtime (nth 5 attr))
(mt (visited-file-modtime)))
@@ -3713,7 +3714,7 @@ beginning of local filename are not substituted."
(run-hooks 'tramp-handle-file-local-copy-hook)
tmpfil)))
-(defun tramp-handle-file-remote-p (file &optional identification connected)
+(defun tramp-handle-file-remote-p (filename &optional identification connected)
"Like `file-remote-p' for Tramp files."
(when (tramp-tramp-file-p filename)
(with-parsed-tramp-file-name filename nil
@@ -7358,7 +7359,7 @@ please ensure that the buffers are attached to your email.\n\n")
;; transfer method to use. (Greg Stark)
;; * Remove unneeded parameters from methods.
;; * Invoke rsync once for copying a whole directory hierarchy.
-;; (Francesco Potort,Al(B)
+;; (Francesco Potortì)
;; * Make it work for different encodings, and for different file name
;; encodings, too. (Daniel Pittman)
;; * 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 @@
-;;; -*- mode: Emacs-Lisp; coding: iso-8859-1; -*-
+;;; -*- mode: Emacs-Lisp; coding: utf-8; -*-
;;; trampver.el --- Transparent Remote Access, Multiple Protocol
;;; lisp/trampver.el. Generated from trampver.el.in by configure.
;; Copyright (C) 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
-;; Author: Kai Gro,A_(Bjohann <kai.grossjohann@gmx.net>
+;; Author: Kai Großjohann <kai.grossjohann@gmx.net>
;; Keywords: comm, processes
;; This file is part of GNU Emacs.
@@ -30,14 +30,14 @@
;; "autoconf && ./configure" to change them. (X)Emacs version check is defined
;; in macro AC_EMACS_INFO of aclocal.m4; should be changed only there.
-(defconst tramp-version "2.1.10"
+(defconst tramp-version "2.1.11-pre"
"This version of Tramp.")
(defconst tramp-bug-report-address "tramp-devel@gnu.org"
"Email address to send bug reports to.")
;; Check for (X)Emacs version.
-(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")))
+(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")))
(unless (string-match "\\`ok\\'" x) (error x)))
(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."
(defconst c-lang-variable-inits (cc-eval-when-compile c-lang-variable-inits))
(defconst c-emacs-variable-inits (cc-eval-when-compile c-emacs-variable-inits))
+;; Make the `c-lang-setvar' variables buffer local in the current buffer.
+;; These are typically standard emacs variables such as `comment-start'.
+(defmacro c-make-emacs-variables-local ()
+ `(progn
+ ,@(mapcar (lambda (init)
+ `(make-local-variable ',(car init)))
+ (cdr c-emacs-variable-inits))))
+
(defun c-make-init-lang-vars-fun (mode)
"Create a function that initializes all the language dependent variables
for the given mode.
@@ -2898,6 +2906,7 @@ accomplish that conveniently."
;; that could be in the result from `cl-macroexpand-all'.
(let ((c-buffer-is-cc-mode ',mode)
current-var source-eval)
+ (c-make-emacs-variables-local)
(condition-case err
(if (eq c-version-sym ',c-version-sym)
@@ -2956,6 +2965,7 @@ accomplish that conveniently."
(init (append (cdr c-emacs-variable-inits)
(cdr c-lang-variable-inits)))
current-var)
+ (c-make-emacs-variables-local)
(condition-case err
(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 @@
(defun c-leave-cc-mode-mode ()
(setq c-buffer-is-cc-mode nil))
-;; Make the `c-lang-setvar' variables buffer local in the current buffer.
-;; These are typically standard emacs variables such as `comment-start'.
-(defmacro c-make-emacs-variables-local ()
- `(progn
- ,@(mapcar (lambda (init)
- `(make-local-variable ',(car init)))
- (cdr c-emacs-variable-inits))))
-
(defun c-init-language-vars-for (mode)
"Initialize the language variables for one of the language modes
directly supported by CC Mode. This can be used instead of the
`c-init-language-vars' macro if the language you want to use is one of
those, rather than a derived language defined through the language
variable system (see \"cc-langs.el\")."
- (c-make-emacs-variables-local)
(cond ((eq mode 'c-mode) (c-init-language-vars c-mode))
((eq mode 'c++-mode) (c-init-language-vars c++-mode))
((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:
;; compilation-error-list) to point-min, but that was only meaningful for
;; the internal uses of compilation-forget-errors: all calls from external
;; packages seem to be followed by a move of compilation-parsing-end to
- ;; something equivalent to point-max. So we speculatively move
+ ;; something equivalent to point-max. So we heuristically move
;; compilation-current-error to point-max (since the external package
- ;; won't know that it should do it). --stef
+ ;; won't know that it should do it). --Stef
(setq compilation-current-error nil)
(let* ((proc (get-buffer-process (current-buffer)))
(mark (if proc (process-mark proc)))
@@ -2063,7 +2063,12 @@ The file-structure looks like this:
;; we need to put ours just before the insertion point rather
;; than at the insertion point. If that's not possible, then
;; don't use a marker. --Stef
- (if (> pos (point-min)) (copy-marker (1- pos)) pos))))
+ (if (> pos (point-min)) (copy-marker (1- pos)) pos)))
+ ;; Again, since this command is used in buffers that contain several
+ ;; compilations, to set the beginning of "this compilation", it's a good
+ ;; place to reset compilation-auto-jump-to-next.
+ (set (make-local-variable 'compilation-auto-jump-to-next)
+ compilation-auto-jump-to-first-error))
;;;###autoload
(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.)"
(path (getenv "PYTHONPATH"))
(process-environment ; to import emacs.py
(cons (concat "PYTHONPATH=" data-directory
- (if path (concat ":" path)))
+ (if path (concat path-separator path)))
process-environment)))
(apply 'make-comint-in-buffer "Python"
(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.
(autoload (quote ps-mule-begin-job) "ps-mule" "\
Start printing job for multi-byte chars between FROM and TO.
-This checks if all multi-byte characters in the region are printable or not.
+It checks if all multi-byte characters in the region are printable or not.
\(fn FROM TO)" nil nil)
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 @@
;; This file is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 2, or (at your option)
+;; the Free Software Foundation; either version 3, or (at your option)
;; any later version.
;; 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 @@
;; This file is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 2, or (at your option)
+;; the Free Software Foundation; either version 3, or (at your option)
;; any later version.
;; 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 @@
;; NOTE: THIS IS A MODIFIED VERSION OF Dave Love's vc-bzr.el,
;; which you can find at: http://www.loveshack.ukfsn.org/emacs/vc-bzr.el
-;; I could not get in touch with Dave Love by email, so
+;; I could not get in touch with Dave Love by email, so
;; I am releasing my changes separately. -- Riccardo
;; Author: Dave Love <fx@gnu.org>, Riccardo Murri <riccardo.murri@gmail.com>
@@ -15,7 +15,7 @@
;; This file is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 2, or (at your option)
+;; the Free Software Foundation; either version 3, or (at your option)
;; any later version.
;; 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 @@
(defun vc-git-print-log (files &optional buffer)
"Get change log associated with FILES."
- (let ((coding-system-for-read git-commits-coding-system))
+ (let ((coding-system-for-read git-commits-coding-system)
+ ;; Support both the old print-log interface that passes a
+ ;; single file, and the new one that passes a file list.
+ (flist (if (listp files) files (list files))))
;; `vc-do-command' creates the buffer, but we need it before running
;; the command.
(vc-setup-buffer buffer)
@@ -273,7 +276,7 @@
;; "git rev-list" on each file separately to make sure that each
;; file gets a "File:" header before the corresponding
;; log. Maybe there is a way to do this with one command...
- (dolist (file files)
+ (dolist (file flist)
(with-current-buffer
buffer
(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 @@
(defun vc-hg-registered (file)
"Return non-nil if FILE is registered with hg."
(when (vc-hg-root file) ; short cut
- (vc-hg-state file))) ; expensive
+ (vc-file-setprop file 'vc-state (vc-hg-state file)))) ; expensive
(defun vc-hg-state (file)
"Hg-specific version of `vc-state'."
@@ -303,12 +303,12 @@
(buffer-substring-no-properties (point-min) (point-max))))))
;; Modelled after the similar function in vc-cvs.el
-;; (defun vc-hg-revision-completion-table (file)
-;; (lexical-let ((file file)
-;; table)
-;; (setq table (lazy-completion-table
-;; table (lambda () (vc-hg-revision-table file))))
-;; table))
+(defun vc-hg-revision-completion-table (file)
+ (lexical-let ((file file)
+ table)
+ (setq table (lazy-completion-table
+ table (lambda () (vc-hg-revision-table file))))
+ table))
(defun vc-hg-diff-tree (file &optional oldvers newvers buffer)
(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."
(set (make-local-variable 'dired-actual-switches)
vc-dired-switches))
(set (make-local-variable 'vc-dired-terse-mode) vc-dired-terse-display)
- (setq mode-name (concat mode-name (symbol-name (vc-responsible-backend
- default-directory))))
+ (let ((backend-name (symbol-name (vc-responsible-backend
+ default-directory))))
+ (setq mode-name (concat mode-name backend-name))
+ ;; Add menu after `vc-dired-mode-map' has `dired-mode-map' as the parent.
+ (let ((vc-dire-menu-map (copy-keymap vc-menu-map)))
+ (define-key-after (lookup-key vc-dired-mode-map [menu-bar]) [vc]
+ (cons backend-name vc-dire-menu-map) 'subdir)))
(setq vc-dired-mode t))
(defun vc-dired-toggle-terse-mode ()
@@ -2284,7 +2289,7 @@ This code, like dired, assumes UNIX -l format."
"Reformat the listing according to version control.
Called by dired after any portion of a vc-dired buffer has been read in."
(message "Getting version information... ")
- (let (subdir filename (buffer-read-only nil))
+ (let (subdir filename (inhibit-read-only t))
(goto-char (point-min))
(while (not (eobp))
(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."
(define-key map "\C-c\C-c" 'wdired-finish-edit)
(define-key map "\C-c\C-k" 'wdired-abort-changes)
(define-key map "\C-c\C-[" 'wdired-abort-changes)
+ (define-key map "\C-x\C-q" 'wdired-exit)
(define-key map "\C-m" 'ignore)
(define-key map "\C-j" 'ignore)
(define-key map "\C-o" 'ignore)
@@ -423,6 +424,22 @@ non-nil means return old filename."
(set-buffer-modified-p nil)
(setq buffer-undo-list nil))
+(defun wdired-exit ()
+ "Exit wdired and return to dired mode.
+Just return to dired mode if there are no changes. Otherwise,
+ask a yes-or-no question whether to save or cancel changes,
+and proceed depending on the answer."
+ (interactive)
+ (if (buffer-modified-p)
+ (if (y-or-n-p (format "Buffer %s modified; save changes? "
+ (current-buffer)))
+ (wdired-finish-edit)
+ (wdired-abort-changes))
+ (wdired-change-to-dired-mode)
+ (set-buffer-modified-p nil)
+ (setq buffer-undo-list nil)
+ (message "(No changes need to be saved)")))
+
;; Rename a file, searching it in a modified dired buffer, in order
;; to be able to use `dired-do-create-files-regexp' and get its
;; "benefits".