aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorMiles Bader2007-05-30 14:44:47 +0000
committerMiles Bader2007-05-30 14:44:47 +0000
commit34c6724464237db4bfd5b3fa57e8b0f66a92f618 (patch)
treebbfe4aea433c943f0f6a67b3e49ee31647e12d92 /lisp
parent30790a37efea5c6fed87ee0dd0d54c31ac9eea11 (diff)
parent7a781a5480b9a1f55d28a76e1d1f89aaa2421f97 (diff)
downloademacs-34c6724464237db4bfd5b3fa57e8b0f66a92f618.tar.gz
emacs-34c6724464237db4bfd5b3fa57e8b0f66a92f618.zip
Merge from emacs--devo--0
Patches applied: * emacs--devo--0 (patch 771-780) - Update from CVS - Merge from emacs--rel--22 - Merge from emacs--rel--22, gnus--rel--5.10 - Fix tq.el edge case * emacs--rel--22 (patch 26-32) - Update from CVS - lisp/vc-hooks.el (vc-find-root): Fix file attribute test * gnus--rel--5.10 (patch 224-225) - Merge from emacs--devo--0, emacs--rel--22 - Update from CVS Revision: emacs@sv.gnu.org/emacs--multi-tty--0--patch-18
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog118
-rw-r--r--lisp/bs.el9
-rw-r--r--lisp/composite.el12
-rw-r--r--lisp/cus-dep.el2
-rw-r--r--lisp/disp-table.el4
-rw-r--r--lisp/ediff-init.el14
-rw-r--r--lisp/ediff-util.el12
-rw-r--r--lisp/edmacro.el5
-rw-r--r--lisp/emacs-lisp/copyright.el33
-rw-r--r--lisp/emacs-lisp/derived.el6
-rw-r--r--lisp/emacs-lisp/rx.el9
-rw-r--r--lisp/emacs-lisp/tq.el5
-rw-r--r--lisp/gnus/ChangeLog5
-rw-r--r--lisp/gnus/message.el14
-rw-r--r--lisp/image-mode.el169
-rw-r--r--lisp/log-edit.el2
-rw-r--r--lisp/net/tramp-ftp.el10
-rw-r--r--lisp/net/tramp-smb.el7
-rw-r--r--lisp/net/tramp-util.el1
-rw-r--r--lisp/net/tramp-uu.el3
-rw-r--r--lisp/net/tramp-vc.el2
-rw-r--r--lisp/net/tramp.el207
-rw-r--r--lisp/net/trampver.el2
-rw-r--r--lisp/net/webjump.el2
-rw-r--r--lisp/progmodes/idlwave.el4
-rw-r--r--lisp/textmodes/flyspell.el3
-rw-r--r--lisp/textmodes/sgml-mode.el23
-rw-r--r--lisp/textmodes/table.el26
-rw-r--r--lisp/url/ChangeLog6
-rw-r--r--lisp/url/url-mailto.el4
-rw-r--r--lisp/vc-hooks.el2
-rw-r--r--lisp/xt-mouse.el29
32 files changed, 550 insertions, 200 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 98adf1a4da4..9a79d4a0b55 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,121 @@
12007-05-30 Michael Olson <mwolson@gnu.org>
2
3 * emacs-lisp/tq.el (tq-queue-pop): Stifle error when a process has
4 died and we are trying to send a signal to it. The program using
5 tq.el should periodically check to see whether the process has
6 died and react appropriately -- this is not the responsibility of
7 tq.el, and is consistent with the rest of the tq.el source code.
8
92007-05-29 Martin Rudalics <rudalics@gmx.at>
10
11 * textmodes/table.el (table--point-entered-cell-function)
12 (table--point-left-cell-function): Bind
13 `inhibit-point-motion-hooks' to t.
14
152007-05-29 Nikolaj Schumacher <n_schumacher@web.de> (tiny change)
16
17 * emacs-lisp/rx.el (rx): Doc fix.
18
192007-05-28 Juanma Barranquero <lekktu@gmail.com>
20
21 * progmodes/idlwave.el (idlwave-routines): Fix typo in docstring.
22
232007-05-28 Michael Albinus <michael.albinus@gmx.de>
24
25 Sync with Tramp 2.0.56.
26
27 * net/tramp.el:
28 * net/tramp-ftp.el:
29 * net/tramp-smb.el:
30 * net/tramp-util.el:
31 * net/tramp-vc.el:
32 Don't load cl.el, because that pollutes the namespace. Replace cl
33 macros by their implementations where necessary. Requested by
34 Richard Stallman <rms@gnu.org>.
35
36 * net/tramp.el (top): Make `set-buffer-multibyte' an alias if it
37 doesn't exist.
38 (with-parsed-tramp-file-name): Protect debug spec during
39 compilation.
40 (tramp-handle-insert-directory): Check (featurep 'ls-lisp).
41 (tramp-file-name-p, tramp-file-name-multi-method)
42 (tramp-file-name-method, tramp-file-name-user)
43 (tramp-file-name-host, tramp-file-name-localname): New defuns,
44 replacing defstruct `tramp-file-name'.
45 (tramp-handle-file-remote-p, tramp-completion-dissect-file-name1)
46 (tramp-dissect-file-name, tramp-dissect-multi-file-name): Apply
47 `vector' instead of `make-tramp-file-name'.
48 (tramp-handle-make-auto-save-file-name): Apply
49 `tramp-temporary-file-directory' for compatibility reasons.
50 (tramp-completion-mode): Use `natnump' instead of `wholenump'
51 because of XEmacs.
52 (tramp-completion-mode): `last-input-event' is nil when XEmacs is
53 started.
54
552007-05-28 Chong Yidong <cyd@stupidchicken.com>
56
57 * textmodes/sgml-mode.el (sgml-point-entered): Use condition-case.
58
592007-05-27 Tetsurou Okazaki <okazaki@be.to> (tiny change)
60
61 * log-edit.el (log-edit-changelog-paragraph): Return point-max
62 as the end of the ChangeLog paragraph when it ends without a line
63 termination.
64
652007-05-27 Ryan Yeske <rcyeske@gmail.com>
66
67 * net/webjump.el (webjump-sample-sites):
68 Add simple Wikipedia query.
69
702007-05-25 Stefan Monnier <monnier@iro.umontreal.ca>
71
72 * emacs-lisp/derived.el (define-derived-mode): Remove bogus
73 compatibiity code.
74
75 * emacs-lisp/copyright.el (copyright-names-regexp): New var.
76 (copyright-update-year): Use it.
77
78 * edmacro.el (edmacro-format-keys): Use current-active-maps.
79
80 * ediff-init.el (ediff-defvar-local, ediff-with-current-buffer):
81 Add indentation and debugging info. Fix up comment convention.
82
83 * cus-dep.el (custom-make-dependencies): Simplify.
84
85 * composite.el (compose-region, decompose-region):
86 Use inhibit-read-only and restore-buffer-modified-p.
87
88 * xt-mouse.el (xterm-mouse-truncate-wrap): New function.
89 (xterm-mouse-event): Use it.
90
912007-05-25 Juanma Barranquero <lekktu@gmail.com>
92
93 * bs.el (bs-cycle-previous): Don't modify the cycle list until
94 `switch-to-buffer' has returned succesfully.
95 (bs-cycle-next): Ditto. Also, don't bury the buffer when the
96 window is dedicated (it could iconify the frame).
97
982007-05-25 Miles Bader <miles@fencepost.gnu.org>
99
100 * vc-hooks.el (vc-find-root): Fix file attribute test.
101
1022007-05-24 Richard Stallman <rms@gnu.org>
103
104 * textmodes/flyspell.el (flyspell-correct-word-before-point):
105 Don't let opoint be nil.
106 (flyspell-emacs-popup): Explicit error if no dialogs.
107
1082007-05-24 Chong Yidong <cyd@stupidchicken.com>
109
110 * image-mode.el (image-forward-hscroll, image-backward-hscroll)
111 (image-next-line, image-previous-line, image-scroll-up)
112 (image-scroll-down, image-bol, image-eol, image-bob, image-eob):
113 New functions.
114 (image-mode-map): Remap motion commands.
115 (image-mode-text-map): New keymap for viewing images as text.
116 (image-mode): Use image-mode-map.
117 (image-toggle-display): Toggle auto-hscroll-mode and mode keymaps.
118
12007-05-24 Stefan Monnier <monnier@iro.umontreal.ca> 1192007-05-24 Stefan Monnier <monnier@iro.umontreal.ca>
2 120
3 * textmodes/fill.el (canonically-space-region): Make the second arg 121 * textmodes/fill.el (canonically-space-region): Make the second arg
diff --git a/lisp/bs.el b/lisp/bs.el
index b1fa47100f0..5951d129d96 100644
--- a/lisp/bs.el
+++ b/lisp/bs.el
@@ -1221,10 +1221,13 @@ by buffer configuration `bs-cycle-configuration-name'."
1221 bs--cycle-list))) 1221 bs--cycle-list)))
1222 (next (car tupel)) 1222 (next (car tupel))
1223 (cycle-list (cdr tupel))) 1223 (cycle-list (cdr tupel)))
1224 (unless (window-dedicated-p (selected-window))
1225 ;; We don't want the frame iconified if the only window in the frame
1226 ;; happens to be dedicated; let's get the error from switch-to-buffer
1227 (bury-buffer))
1228 (switch-to-buffer next)
1224 (setq bs--cycle-list (append (cdr cycle-list) 1229 (setq bs--cycle-list (append (cdr cycle-list)
1225 (list (car cycle-list)))) 1230 (list (car cycle-list))))
1226 (bury-buffer)
1227 (switch-to-buffer next)
1228 (bs-message-without-log "Next buffers: %s" 1231 (bs-message-without-log "Next buffers: %s"
1229 (or (cdr bs--cycle-list) 1232 (or (cdr bs--cycle-list)
1230 "this buffer")))))) 1233 "this buffer"))))))
@@ -1251,9 +1254,9 @@ by buffer configuration `bs-cycle-configuration-name'."
1251 bs--cycle-list))) 1254 bs--cycle-list)))
1252 (prev-buffer (car tupel)) 1255 (prev-buffer (car tupel))
1253 (cycle-list (cdr tupel))) 1256 (cycle-list (cdr tupel)))
1257 (switch-to-buffer prev-buffer)
1254 (setq bs--cycle-list (append (last cycle-list) 1258 (setq bs--cycle-list (append (last cycle-list)
1255 (reverse (cdr (reverse cycle-list))))) 1259 (reverse (cdr (reverse cycle-list)))))
1256 (switch-to-buffer prev-buffer)
1257 (bs-message-without-log "Previous buffers: %s" 1260 (bs-message-without-log "Previous buffers: %s"
1258 (or (reverse (cdr bs--cycle-list)) 1261 (or (reverse (cdr bs--cycle-list))
1259 "this buffer")))))) 1262 "this buffer"))))))
diff --git a/lisp/composite.el b/lisp/composite.el
index ede7d023e87..f22c6b52da0 100644
--- a/lisp/composite.el
+++ b/lisp/composite.el
@@ -194,7 +194,7 @@ adjust the composition when it gets invalid because of a change of
194text in the composition." 194text in the composition."
195 (interactive "r") 195 (interactive "r")
196 (let ((modified-p (buffer-modified-p)) 196 (let ((modified-p (buffer-modified-p))
197 (buffer-read-only nil)) 197 (inhibit-read-only t))
198 (if (or (vectorp components) (listp components)) 198 (if (or (vectorp components) (listp components))
199 (setq components (encode-composition-components components))) 199 (setq components (encode-composition-components components)))
200 (compose-region-internal start end components modification-func) 200 (compose-region-internal start end components modification-func)
@@ -208,9 +208,9 @@ When called from a program, expects two arguments,
208positions (integers or markers) specifying the region." 208positions (integers or markers) specifying the region."
209 (interactive "r") 209 (interactive "r")
210 (let ((modified-p (buffer-modified-p)) 210 (let ((modified-p (buffer-modified-p))
211 (buffer-read-only nil)) 211 (inhibit-read-only t))
212 (remove-text-properties start end '(composition nil)) 212 (remove-text-properties start end '(composition nil))
213 (set-buffer-modified-p modified-p))) 213 (restore-buffer-modified-p modified-p)))
214 214
215;;;###autoload 215;;;###autoload
216(defun compose-string (string &optional start end components modification-func) 216(defun compose-string (string &optional start end components modification-func)
@@ -372,8 +372,8 @@ after a sequence of character events."
372;;;###autoload(global-set-key [compose-last-chars] 'compose-last-chars) 372;;;###autoload(global-set-key [compose-last-chars] 'compose-last-chars)
373 373
374 374
375;;; The following codes are only for backward compatibility with Emacs 375;; The following codes are only for backward compatibility with Emacs
376;;; 20.4 and earlier. 376;; 20.4 and earlier.
377 377
378;;;###autoload 378;;;###autoload
379(defun decompose-composite-char (char &optional type with-composition-rule) 379(defun decompose-composite-char (char &optional type with-composition-rule)
@@ -392,5 +392,5 @@ Optional 3rd arg WITH-COMPOSITION-RULE is ignored."
392 392
393 393
394 394
395;;; arch-tag: ee703d77-1723-45d4-a31f-e9f0f867aa33 395;; arch-tag: ee703d77-1723-45d4-a31f-e9f0f867aa33
396;;; composite.el ends here 396;;; composite.el ends here
diff --git a/lisp/cus-dep.el b/lisp/cus-dep.el
index 713b84f8bc0..98af13cec69 100644
--- a/lisp/cus-dep.el
+++ b/lisp/cus-dep.el
@@ -141,7 +141,7 @@ Usage: emacs -batch -l ./cus-dep.el -f custom-make-dependencies DIRS"
141 (member where 141 (member where
142 (cdr (assoc version version-alist))) 142 (cdr (assoc version version-alist)))
143 (push where (cdr (assoc version version-alist)))) 143 (push where (cdr (assoc version version-alist))))
144 (push (cons version (list where)) version-alist))) 144 (push (list version where) version-alist)))
145 ;; This is a group 145 ;; This is a group
146 (insert "(custom-put-if-not '" (symbol-name symbol) 146 (insert "(custom-put-if-not '" (symbol-name symbol)
147 " 'custom-version ") 147 " 'custom-version ")
diff --git a/lisp/disp-table.el b/lisp/disp-table.el
index 2a4dd01897d..207063cbba2 100644
--- a/lisp/disp-table.el
+++ b/lisp/disp-table.el
@@ -220,7 +220,7 @@ with either the `--unibyte' option or the EMACS_UNIBYTE environment
220variable, or else customize `enable-multibyte-characters'. 220variable, or else customize `enable-multibyte-characters'.
221 221
222With prefix argument, this command enables European character display 222With prefix argument, this command enables European character display
223if arg is positive, disables it otherwise. Otherwise, it toggles 223if ARG is positive, disables it otherwise. Otherwise, it toggles
224European character display. 224European character display.
225 225
226When this mode is enabled, characters in the range of 160 to 255 226When this mode is enabled, characters in the range of 160 to 255
@@ -264,5 +264,5 @@ for users who call this function in `.emacs'."
264 264
265(provide 'disp-table) 265(provide 'disp-table)
266 266
267;;; arch-tag: ffe4c28c-960c-47aa-b8a8-ae89d371ffc7 267;; arch-tag: ffe4c28c-960c-47aa-b8a8-ae89d371ffc7
268;;; disp-table.el ends here 268;;; disp-table.el ends here
diff --git a/lisp/ediff-init.el b/lisp/ediff-init.el
index 0ecc809797f..d37096f9e89 100644
--- a/lisp/ediff-init.el
+++ b/lisp/ediff-init.el
@@ -110,6 +110,7 @@ that Ediff doesn't know about.")
110;; 110;;
111;; Plagiarised from `emerge-defvar-local' for XEmacs. 111;; Plagiarised from `emerge-defvar-local' for XEmacs.
112(defmacro ediff-defvar-local (var value doc) 112(defmacro ediff-defvar-local (var value doc)
113 (declare (indent defun))
113 `(progn 114 `(progn
114 (defvar ,var ,value ,doc) 115 (defvar ,var ,value ,doc)
115 (make-variable-buffer-local ',var) 116 (make-variable-buffer-local ',var)
@@ -258,6 +259,7 @@ It needs to be killed when we quit the session.")
258;; Doesn't save the point and mark. 259;; Doesn't save the point and mark.
259;; This is `with-current-buffer' with the added test for live buffers." 260;; This is `with-current-buffer' with the added test for live buffers."
260(defmacro ediff-with-current-buffer (buffer &rest body) 261(defmacro ediff-with-current-buffer (buffer &rest body)
262 (declare (indent 1) (debug (form body)))
261 `(if (ediff-buffer-live-p ,buffer) 263 `(if (ediff-buffer-live-p ,buffer)
262 (save-current-buffer 264 (save-current-buffer
263 (set-buffer ,buffer) 265 (set-buffer ,buffer)
@@ -1873,11 +1875,11 @@ Unless optional argument INPLACE is non-nil, return a new string."
1873 1875
1874 1876
1875 1877
1876;;; Local Variables: 1878;; Local Variables:
1877;;; eval: (put 'ediff-defvar-local 'lisp-indent-hook 'defun) 1879;; eval: (put 'ediff-defvar-local 'lisp-indent-hook 'defun)
1878;;; eval: (put 'ediff-with-current-buffer 'lisp-indent-hook 1) 1880;; eval: (put 'ediff-with-current-buffer 'lisp-indent-hook 1)
1879;;; eval: (put 'ediff-with-current-buffer 'edebug-form-spec '(form body)) 1881;; eval: (put 'ediff-with-current-buffer 'edebug-form-spec '(form body))
1880;;; End: 1882;; End:
1881 1883
1882;;; arch-tag: fa31d384-1e70-4d4b-82a7-3e96307c46f5 1884;; arch-tag: fa31d384-1e70-4d4b-82a7-3e96307c46f5
1883;;; ediff-init.el ends here 1885;;; ediff-init.el ends here
diff --git a/lisp/ediff-util.el b/lisp/ediff-util.el
index 7483128b71a..34af5cc146b 100644
--- a/lisp/ediff-util.el
+++ b/lisp/ediff-util.el
@@ -4315,11 +4315,11 @@ Mail anyway? (y or n) ")
4315(provide 'ediff-util) 4315(provide 'ediff-util)
4316 4316
4317 4317
4318;;; Local Variables: 4318;; Local Variables:
4319;;; eval: (put 'ediff-defvar-local 'lisp-indent-hook 'defun) 4319;; eval: (put 'ediff-defvar-local 'lisp-indent-hook 'defun)
4320;;; eval: (put 'ediff-with-current-buffer 'lisp-indent-hook 1) 4320;; eval: (put 'ediff-with-current-buffer 'lisp-indent-hook 1)
4321;;; eval: (put 'ediff-with-current-buffer 'edebug-form-spec '(form body)) 4321;; eval: (put 'ediff-with-current-buffer 'edebug-form-spec '(form body))
4322;;; End: 4322;; End:
4323 4323
4324;;; arch-tag: f51099b6-ef4b-470f-88a1-3a0e0b03a879 4324;; arch-tag: f51099b6-ef4b-470f-88a1-3a0e0b03a879
4325;;; ediff-util.el ends here 4325;;; ediff-util.el ends here
diff --git a/lisp/edmacro.el b/lisp/edmacro.el
index 5ef9e25b3f9..86d5fb65fcf 100644
--- a/lisp/edmacro.el
+++ b/lisp/edmacro.el
@@ -430,10 +430,7 @@ doubt, use whitespace."
430 430
431(defun edmacro-format-keys (macro &optional verbose) 431(defun edmacro-format-keys (macro &optional verbose)
432 (setq macro (edmacro-fix-menu-commands macro)) 432 (setq macro (edmacro-fix-menu-commands macro))
433 (let* ((maps (append (current-minor-mode-maps) 433 (let* ((maps (current-active-maps))
434 (if (current-local-map)
435 (list (current-local-map)))
436 (list (current-global-map))))
437 (pkeys '(end-macro ?0 ?1 ?2 ?3 ?4 ?5 ?6 ?7 ?8 ?9 ?- ?\C-u 434 (pkeys '(end-macro ?0 ?1 ?2 ?3 ?4 ?5 ?6 ?7 ?8 ?9 ?- ?\C-u
438 ?\M-- ?\M-0 ?\M-1 ?\M-2 ?\M-3 ?\M-4 ?\M-5 ?\M-6 435 ?\M-- ?\M-0 ?\M-1 ?\M-2 ?\M-3 ?\M-4 ?\M-5 ?\M-6
439 ?\M-7 ?\M-8 ?\M-9)) 436 ?\M-7 ?\M-8 ?\M-9))
diff --git a/lisp/emacs-lisp/copyright.el b/lisp/emacs-lisp/copyright.el
index 5f5aecea97a..ac61c5a9ada 100644
--- a/lisp/emacs-lisp/copyright.el
+++ b/lisp/emacs-lisp/copyright.el
@@ -37,7 +37,7 @@
37 :group 'tools) 37 :group 'tools)
38 38
39(defcustom copyright-limit 2000 39(defcustom copyright-limit 2000
40 "*Don't try to update copyright beyond this position unless interactive. 40 "Don't try to update copyright beyond this position unless interactive.
41A value of nil means to search whole buffer." 41A value of nil means to search whole buffer."
42 :group 'copyright 42 :group 'copyright
43 :type '(choice (integer :tag "Limit") 43 :type '(choice (integer :tag "Limit")
@@ -49,21 +49,28 @@ A value of nil means to search whole buffer."
49 "\\([©Ž©]\\|@copyright{}\\|[Cc]opyright\\s *:?\\s *\\(?:(C)\\)?\ 49 "\\([©Ž©]\\|@copyright{}\\|[Cc]opyright\\s *:?\\s *\\(?:(C)\\)?\
50\\|[Cc]opyright\\s *:?\\s *[©Ž©]\\)\ 50\\|[Cc]opyright\\s *:?\\s *[©Ž©]\\)\
51\\s *\\([1-9]\\([-0-9, ';/*%#\n\t]\\|\\s<\\|\\s>\\)*[0-9]+\\)" 51\\s *\\([1-9]\\([-0-9, ';/*%#\n\t]\\|\\s<\\|\\s>\\)*[0-9]+\\)"
52 "*What your copyright notice looks like. 52 "What your copyright notice looks like.
53The second \\( \\) construct must match the years." 53The second \\( \\) construct must match the years."
54 :group 'copyright 54 :group 'copyright
55 :type 'regexp) 55 :type 'regexp)
56 56
57(defcustom copyright-names-regexp ""
58 "Regexp matching the names which correspond to the user.
59Only copyright lines where the name matches this regexp will be updated.
60This allows you to avoid adding yars to a copyright notice belonging to
61someone else or to a group for which you do not work."
62 :type 'regexp)
63
57(defcustom copyright-years-regexp 64(defcustom copyright-years-regexp
58 "\\(\\s *\\)\\([1-9]\\([-0-9, ';/*%#\n\t]\\|\\s<\\|\\s>\\)*[0-9]+\\)" 65 "\\(\\s *\\)\\([1-9]\\([-0-9, ';/*%#\n\t]\\|\\s<\\|\\s>\\)*[0-9]+\\)"
59 "*Match additional copyright notice years. 66 "Match additional copyright notice years.
60The second \\( \\) construct must match the years." 67The second \\( \\) construct must match the years."
61 :group 'copyright 68 :group 'copyright
62 :type 'regexp) 69 :type 'regexp)
63 70
64 71
65(defcustom copyright-query 'function 72(defcustom copyright-query 'function
66 "*If non-nil, ask user before changing copyright. 73 "If non-nil, ask user before changing copyright.
67When this is `function', only ask when called non-interactively." 74When this is `function', only ask when called non-interactively."
68 :group 'copyright 75 :group 'copyright
69 :type '(choice (const :tag "Do not ask") 76 :type '(choice (const :tag "Do not ask")
@@ -83,7 +90,17 @@ When this is `function', only ask when called non-interactively."
83 "String representing the current year.") 90 "String representing the current year.")
84 91
85(defun copyright-update-year (replace noquery) 92(defun copyright-update-year (replace noquery)
86 (when (re-search-forward copyright-regexp (+ (point) copyright-limit) t) 93 (when
94 (condition-case err
95 (re-search-forward (concat "\\(" copyright-regexp
96 "\\)\\([ \t]*\n\\)?.*\\(?:"
97 copyright-names-regexp "\\)")
98 (+ (point) copyright-limit) t)
99 ;; In case the regexp is rejected. This is useful because
100 ;; copyright-update is typically called from before-save-hook where
101 ;; such an error is very inconvenient for the user.
102 (error (message "Can't update copyright: %s" err) nil))
103 (goto-char (match-end 1))
87 ;; If the years are continued onto multiple lined 104 ;; If the years are continued onto multiple lined
88 ;; that are marked as comments, skip to the end of the years anyway. 105 ;; that are marked as comments, skip to the end of the years anyway.
89 (while (save-excursion 106 (while (save-excursion
@@ -94,7 +111,7 @@ When this is `function', only ask when called non-interactively."
94 (save-match-data 111 (save-match-data
95 (forward-line 1) 112 (forward-line 1)
96 (and (looking-at comment-start-skip) 113 (and (looking-at comment-start-skip)
97 (goto-char (match-end 0)))) 114 (goto-char (match-end 1))))
98 (save-match-data 115 (save-match-data
99 (looking-at copyright-years-regexp)))) 116 (looking-at copyright-years-regexp))))
100 (forward-line 1) 117 (forward-line 1)
@@ -103,7 +120,7 @@ When this is `function', only ask when called non-interactively."
103 120
104 ;; Note that `current-time-string' isn't locale-sensitive. 121 ;; Note that `current-time-string' isn't locale-sensitive.
105 (setq copyright-current-year (substring (current-time-string) -4)) 122 (setq copyright-current-year (substring (current-time-string) -4))
106 (unless (string= (buffer-substring (- (match-end 2) 2) (match-end 2)) 123 (unless (string= (buffer-substring (- (match-end 3) 2) (match-end 3))
107 (substring copyright-current-year -2)) 124 (substring copyright-current-year -2))
108 (if (or noquery 125 (if (or noquery
109 (y-or-n-p (if replace 126 (y-or-n-p (if replace
@@ -235,5 +252,5 @@ Uses heuristic: year >= 50 means 19xx, < 50 means 20xx."
235;; coding: emacs-mule 252;; coding: emacs-mule
236;; End: 253;; End:
237 254
238;;; arch-tag: b4991afb-b6b1-4590-bebe-e076d9d4aee8 255;; arch-tag: b4991afb-b6b1-4590-bebe-e076d9d4aee8
239;;; copyright.el ends here 256;;; copyright.el ends here
diff --git a/lisp/emacs-lisp/derived.el b/lisp/emacs-lisp/derived.el
index 2b2cffc5a35..5fc60cf516f 100644
--- a/lisp/emacs-lisp/derived.el
+++ b/lisp/emacs-lisp/derived.el
@@ -254,11 +254,7 @@ No problems result if this variable is not bound.
254 ,@body 254 ,@body
255 ) 255 )
256 ;; Run the hooks, if any. 256 ;; Run the hooks, if any.
257 ;; Make the generated code work in older Emacs versions 257 (run-mode-hooks ',hook)))))
258 ;; that do not yet have run-mode-hooks.
259 (if (fboundp 'run-mode-hooks)
260 (run-mode-hooks ',hook)
261 (run-hooks ',hook))))))
262 258
263;; PUBLIC: find the ultimate class of a derived mode. 259;; PUBLIC: find the ultimate class of a derived mode.
264 260
diff --git a/lisp/emacs-lisp/rx.el b/lisp/emacs-lisp/rx.el
index 39134443d86..54f88ba3ea5 100644
--- a/lisp/emacs-lisp/rx.el
+++ b/lisp/emacs-lisp/rx.el
@@ -725,8 +725,7 @@ CHAR
725 matches the empty string, but only at point. 725 matches the empty string, but only at point.
726 726
727`word-start', `bow' 727`word-start', `bow'
728 matches the empty string, but only at the beginning or end of a 728 matches the empty string, but only at the beginning of a word.
729 word.
730 729
731`word-end', `eow' 730`word-end', `eow'
732 matches the empty string, but only at the end of a word. 731 matches the empty string, but only at the end of a word.
@@ -740,6 +739,12 @@ CHAR
740 matches the empty string, but not at the beginning or end of a 739 matches the empty string, but not at the beginning or end of a
741 word. 740 word.
742 741
742`symbol-start'
743 matches the empty string, but only at the beginning of a symbol.
744
745`symbol-end'
746 matches the empty string, but only at the end of a symbol.
747
743`digit', `numeric', `num' 748`digit', `numeric', `num'
744 matches 0 through 9. 749 matches 0 through 9.
745 750
diff --git a/lisp/emacs-lisp/tq.el b/lisp/emacs-lisp/tq.el
index b12c21b6730..f20015fd720 100644
--- a/lisp/emacs-lisp/tq.el
+++ b/lisp/emacs-lisp/tq.el
@@ -100,8 +100,9 @@ to a tcp server on another machine."
100(defun tq-queue-pop (tq) 100(defun tq-queue-pop (tq)
101 (setcar tq (cdr (car tq))) 101 (setcar tq (cdr (car tq)))
102 (let ((question (tq-queue-head-question tq))) 102 (let ((question (tq-queue-head-question tq)))
103 (when question 103 (condition-case nil
104 (process-send-string (tq-process tq) question))) 104 (process-send-string (tq-process tq) question)
105 (error nil)))
105 (null (car tq))) 106 (null (car tq)))
106 107
107(defun tq-enqueue (tq question regexp closure fn &optional delay-question) 108(defun tq-enqueue (tq question regexp closure fn &optional delay-question)
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog
index 9f4df39957f..631869e4f34 100644
--- a/lisp/gnus/ChangeLog
+++ b/lisp/gnus/ChangeLog
@@ -1,3 +1,8 @@
12007-05-28 Katsumi Yamaoka <yamaoka@jpl.org>
2
3 * message.el (message-pop-to-buffer): Add switch-function argument.
4 (message-mail): Pass switch-function argument to it.
5
12007-05-24 Katsumi Yamaoka <yamaoka@jpl.org> 62007-05-24 Katsumi Yamaoka <yamaoka@jpl.org>
2 7
3 * message.el (message-narrow-to-headers-or-head): Ignore 8 * message.el (message-narrow-to-headers-or-head): Ignore
diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el
index 432bd69b67f..eef854f4fb7 100644
--- a/lisp/gnus/message.el
+++ b/lisp/gnus/message.el
@@ -5576,7 +5576,7 @@ between beginning of field and beginning of line."
5576 'car-less-than-car))) 5576 'car-less-than-car)))
5577 new))))) 5577 new)))))
5578 5578
5579(defun message-pop-to-buffer (name) 5579(defun message-pop-to-buffer (name &optional switch-function)
5580 "Pop to buffer NAME, and warn if it already exists and is modified." 5580 "Pop to buffer NAME, and warn if it already exists and is modified."
5581 (let ((buffer (get-buffer name))) 5581 (let ((buffer (get-buffer name)))
5582 (if (and buffer 5582 (if (and buffer
@@ -5587,14 +5587,16 @@ between beginning of field and beginning of line."
5587 (progn 5587 (progn
5588 (gnus-select-frame-set-input-focus (window-frame window)) 5588 (gnus-select-frame-set-input-focus (window-frame window))
5589 (select-window window)) 5589 (select-window window))
5590 (set-buffer (pop-to-buffer buffer))) 5590 (funcall (or switch-function 'pop-to-buffer) buffer)
5591 (set-buffer buffer))
5591 (when (and (buffer-modified-p) 5592 (when (and (buffer-modified-p)
5592 (not (prog1 5593 (not (prog1
5593 (y-or-n-p 5594 (y-or-n-p
5594 "Message already being composed; erase? ") 5595 "Message already being composed; erase? ")
5595 (message nil)))) 5596 (message nil))))
5596 (error "Message being composed"))) 5597 (error "Message being composed")))
5597 (set-buffer (pop-to-buffer name))) 5598 (funcall (or switch-function 'pop-to-buffer) name)
5599 (set-buffer name))
5598 (erase-buffer) 5600 (erase-buffer)
5599 (message-mode))) 5601 (message-mode)))
5600 5602
@@ -5831,15 +5833,15 @@ is a function used to switch to and display the mail buffer."
5831 (interactive) 5833 (interactive)
5832 (let ((message-this-is-mail t) replybuffer) 5834 (let ((message-this-is-mail t) replybuffer)
5833 (unless (message-mail-user-agent) 5835 (unless (message-mail-user-agent)
5834 (funcall 5836 (message-pop-to-buffer
5835 (or switch-function 'message-pop-to-buffer)
5836 ;; Search for the existing message buffer if `continue' is non-nil. 5837 ;; Search for the existing message buffer if `continue' is non-nil.
5837 (let ((message-generate-new-buffers 5838 (let ((message-generate-new-buffers
5838 (when (or (not continue) 5839 (when (or (not continue)
5839 (eq message-generate-new-buffers 'standard) 5840 (eq message-generate-new-buffers 'standard)
5840 (functionp message-generate-new-buffers)) 5841 (functionp message-generate-new-buffers))
5841 message-generate-new-buffers))) 5842 message-generate-new-buffers)))
5842 (message-buffer-name "mail" to)))) 5843 (message-buffer-name "mail" to))
5844 switch-function))
5843 ;; FIXME: message-mail should do something if YANK-ACTION is not 5845 ;; FIXME: message-mail should do something if YANK-ACTION is not
5844 ;; insert-buffer. 5846 ;; insert-buffer.
5845 (and (consp yank-action) (eq (car yank-action) 'insert-buffer) 5847 (and (consp yank-action) (eq (car yank-action) 'insert-buffer)
diff --git a/lisp/image-mode.el b/lisp/image-mode.el
index 5ff35258c54..6ac864172d8 100644
--- a/lisp/image-mode.el
+++ b/lisp/image-mode.el
@@ -43,11 +43,162 @@
43;;;###autoload (push '("\\.p[bpgn]m\\'" . image-mode) auto-mode-alist) 43;;;###autoload (push '("\\.p[bpgn]m\\'" . image-mode) auto-mode-alist)
44;;;###autoload (push '("\\.x[bp]m\\'" . image-mode-maybe) auto-mode-alist) 44;;;###autoload (push '("\\.x[bp]m\\'" . image-mode-maybe) auto-mode-alist)
45 45
46;;; Image scrolling functions
47
48(defun image-forward-hscroll (&optional n)
49 "Scroll image in current window to the left by N character widths.
50Stop if the right edge of the image is reached."
51 (interactive "p")
52 (cond ((= n 0) nil)
53 ((< n 0)
54 (set-window-hscroll (selected-window)
55 (max 0 (+ (window-hscroll) n))))
56 (t
57 (let* ((image (get-text-property 1 'display))
58 (edges (window-inside-edges))
59 (win-width (- (nth 2 edges) (nth 0 edges)))
60 (img-width (ceiling (car (image-size image)))))
61 (set-window-hscroll (selected-window)
62 (min (max 0 (- img-width win-width))
63 (+ n (window-hscroll))))))))
64
65(defun image-backward-hscroll (&optional n)
66 "Scroll image in current window to the right by N character widths.
67Stop if the left edge of the image is reached."
68 (interactive "p")
69 (image-forward-hscroll (- n)))
70
71(defun image-next-line (&optional n)
72 "Scroll image in current window upward by N lines.
73Stop if the bottom edge of the image is reached."
74 (interactive "p")
75 (cond ((= n 0) nil)
76 ((< n 0)
77 (set-window-vscroll (selected-window)
78 (max 0 (+ (window-vscroll) n))))
79 (t
80 (let* ((image (get-text-property 1 'display))
81 (edges (window-inside-edges))
82 (win-height (- (nth 3 edges) (nth 1 edges)))
83 (img-height (ceiling (cdr (image-size image)))))
84 (set-window-vscroll (selected-window)
85 (min (max 0 (- img-height win-height))
86 (+ n (window-vscroll))))))))
87
88(defun image-previous-line (&optional n)
89 "Scroll image in current window downward by N lines.
90Stop if the top edge of the image is reached."
91 (interactive "p")
92 (image-next-line (- n)))
93
94(defun image-scroll-up (&optional n)
95 "Scroll image in current window upward by N lines.
96Stop if the bottom edge of the image is reached.
97If ARG is omitted or nil, scroll upward by a near full screen.
98A near full screen is `next-screen-context-lines' less than a full screen.
99Negative ARG means scroll downward.
100If ARG is the atom `-', scroll downward by nearly full screen.
101When calling from a program, supply as argument a number, nil, or `-'."
102 (interactive "P")
103 (cond ((null n)
104 (let* ((edges (window-inside-edges))
105 (win-height (- (nth 3 edges) (nth 1 edges))))
106 (image-next-line
107 (max 0 (- win-height next-screen-context-lines)))))
108 ((eq n '-)
109 (let* ((edges (window-inside-edges))
110 (win-height (- (nth 3 edges) (nth 1 edges))))
111 (image-next-line
112 (min 0 (- next-screen-context-lines win-height)))))
113 (t (image-next-line (prefix-numeric-value n)))))
114
115(defun image-scroll-down (&optional n)
116 "Scroll image in current window downward by N lines
117Stop if the top edge of the image is reached.
118If ARG is omitted or nil, scroll downward by a near full screen.
119A near full screen is `next-screen-context-lines' less than a full screen.
120Negative ARG means scroll upward.
121If ARG is the atom `-', scroll upward by nearly full screen.
122When calling from a program, supply as argument a number, nil, or `-'."
123 (interactive "P")
124 (cond ((null n)
125 (let* ((edges (window-inside-edges))
126 (win-height (- (nth 3 edges) (nth 1 edges))))
127 (image-next-line
128 (min 0 (- next-screen-context-lines win-height)))))
129 ((eq n '-)
130 (let* ((edges (window-inside-edges))
131 (win-height (- (nth 3 edges) (nth 1 edges))))
132 (image-next-line
133 (max 0 (- win-height next-screen-context-lines)))))
134 (t (image-next-line (- (prefix-numeric-value n))))))
135
136(defun image-bol (arg)
137 "Scroll horizontally to the left edge of the image in the current window.
138With argument ARG not nil or 1, move forward ARG - 1 lines first,
139stopping if the top or bottom edge of the image is reached."
140 (interactive "p")
141 (and arg
142 (/= (setq arg (prefix-numeric-value arg)) 1)
143 (image-next-line (- arg 1)))
144 (set-window-hscroll (selected-window) 0))
145
146(defun image-eol (arg)
147 "Scroll horizontally to the right edge of the image in the current window.
148With argument ARG not nil or 1, move forward ARG - 1 lines first,
149stopping if the top or bottom edge of the image is reached."
150 (interactive "p")
151 (and arg
152 (/= (setq arg (prefix-numeric-value arg)) 1)
153 (image-next-line (- arg 1)))
154 (let* ((image (get-text-property 1 'display))
155 (edges (window-inside-edges))
156 (win-width (- (nth 2 edges) (nth 0 edges)))
157 (img-width (ceiling (car (image-size image)))))
158 (set-window-hscroll (selected-window)
159 (max 0 (- img-width win-width)))))
160
161(defun image-bob ()
162 "Scroll to the top-left corner of the image in the current window."
163 (interactive)
164 (set-window-hscroll (selected-window) 0)
165 (set-window-vscroll (selected-window) 0))
166
167(defun image-eob ()
168 "Scroll to the bottom-right corner of the image in the current window."
169 (interactive)
170 (let* ((image (get-text-property 1 'display))
171 (edges (window-inside-edges))
172 (win-width (- (nth 2 edges) (nth 0 edges)))
173 (img-width (ceiling (car (image-size image))))
174 (win-height (- (nth 3 edges) (nth 1 edges)))
175 (img-height (ceiling (cdr (image-size image)))))
176 (set-window-hscroll (selected-window) (max 0 (- img-width win-width)))
177 (set-window-vscroll (selected-window) (max 0 (- img-height win-height)))))
178
179;;; Image Mode setup
180
46(defvar image-mode-map 181(defvar image-mode-map
47 (let ((map (make-sparse-keymap))) 182 (let ((map (make-sparse-keymap)))
48 (define-key map "\C-c\C-c" 'image-toggle-display) 183 (define-key map "\C-c\C-c" 'image-toggle-display)
184 (define-key map [remap forward-char] 'image-forward-hscroll)
185 (define-key map [remap backward-char] 'image-backward-hscroll)
186 (define-key map [remap previous-line] 'image-previous-line)
187 (define-key map [remap next-line] 'image-next-line)
188 (define-key map [remap scroll-up] 'image-scroll-up)
189 (define-key map [remap scroll-down] 'image-scroll-down)
190 (define-key map [remap move-beginning-of-line] 'image-bol)
191 (define-key map [remap move-end-of-line] 'image-eol)
192 (define-key map [remap beginning-of-buffer] 'image-bob)
193 (define-key map [remap end-of-buffer] 'image-eob)
194 map)
195 "Major mode keymap for viewing images in Image mode.")
196
197(defvar image-mode-text-map
198 (let ((map (make-sparse-keymap)))
199 (define-key map "\C-c\C-c" 'image-toggle-display)
49 map) 200 map)
50 "Major mode keymap for Image mode.") 201 "Major mode keymap for viewing images as text in Image mode.")
51 202
52;;;###autoload 203;;;###autoload
53(defun image-mode () 204(defun image-mode ()
@@ -58,13 +209,13 @@ to toggle between display as an image and display as text."
58 (kill-all-local-variables) 209 (kill-all-local-variables)
59 (setq mode-name "Image") 210 (setq mode-name "Image")
60 (setq major-mode 'image-mode) 211 (setq major-mode 'image-mode)
61 (use-local-map image-mode-map)
62 (add-hook 'change-major-mode-hook 'image-toggle-display-text nil t) 212 (add-hook 'change-major-mode-hook 'image-toggle-display-text nil t)
63 (if (and (display-images-p) 213 (if (and (display-images-p)
64 (not (get-text-property (point-min) 'display))) 214 (not (get-text-property (point-min) 'display)))
65 (image-toggle-display) 215 (image-toggle-display)
66 ;; Set next vars when image is already displayed but local 216 ;; Set next vars when image is already displayed but local
67 ;; variables were cleared by kill-all-local-variables 217 ;; variables were cleared by kill-all-local-variables
218 (use-local-map image-mode-map)
68 (setq cursor-type nil truncate-lines t)) 219 (setq cursor-type nil truncate-lines t))
69 (run-mode-hooks 'image-mode-hook) 220 (run-mode-hooks 'image-mode-hook)
70 (if (display-images-p) 221 (if (display-images-p)
@@ -140,6 +291,8 @@ and showing the image as an image."
140 (set-buffer-modified-p modified) 291 (set-buffer-modified-p modified)
141 (kill-local-variable 'cursor-type) 292 (kill-local-variable 'cursor-type)
142 (kill-local-variable 'truncate-lines) 293 (kill-local-variable 'truncate-lines)
294 (kill-local-variable 'auto-hscroll-mode)
295 (use-local-map image-mode-text-map)
143 (if (called-interactively-p) 296 (if (called-interactively-p)
144 (message "Repeat this command to go back to displaying the image"))) 297 (message "Repeat this command to go back to displaying the image")))
145 ;; Turn the image data into a real image, but only if the whole file 298 ;; Turn the image data into a real image, but only if the whole file
@@ -161,12 +314,9 @@ and showing the image as an image."
161 nil t))) 314 nil t)))
162 (props 315 (props
163 `(display ,image 316 `(display ,image
164 intangible ,image 317 intangible ,image
165 rear-nonsticky (display intangible) 318 rear-nonsticky (display intangible)
166 ;; This a cheap attempt to make the whole buffer 319 read-only t front-sticky (read-only)))
167 ;; read-only when we're visiting the file (as
168 ;; opposed to just inserting it).
169 read-only t front-sticky (read-only)))
170 (inhibit-read-only t) 320 (inhibit-read-only t)
171 (buffer-undo-list t) 321 (buffer-undo-list t)
172 (modified (buffer-modified-p))) 322 (modified (buffer-modified-p)))
@@ -179,6 +329,9 @@ and showing the image as an image."
179 ;; This just makes the arrow displayed in the right fringe 329 ;; This just makes the arrow displayed in the right fringe
180 ;; area look correct when the image is wider than the window. 330 ;; area look correct when the image is wider than the window.
181 (setq truncate-lines t) 331 (setq truncate-lines t)
332 ;; Allow navigation of large images
333 (set (make-local-variable 'auto-hscroll-mode) nil)
334 (use-local-map image-mode-map)
182 (if (called-interactively-p) 335 (if (called-interactively-p)
183 (message "Repeat this command to go back to displaying the file as text"))))) 336 (message "Repeat this command to go back to displaying the file as text")))))
184 337
diff --git a/lisp/log-edit.el b/lisp/log-edit.el
index ed0a5c464e9..8f63635ee49 100644
--- a/lisp/log-edit.el
+++ b/lisp/log-edit.el
@@ -538,7 +538,7 @@ If we are between paragraphs, return the previous paragraph."
538 (point)) 538 (point))
539 (if (re-search-forward "^[ \t\n]*$" nil t) 539 (if (re-search-forward "^[ \t\n]*$" nil t)
540 (match-beginning 0) 540 (match-beginning 0)
541 (point))))) 541 (point-max)))))
542 542
543(defun log-edit-changelog-subparagraph () 543(defun log-edit-changelog-subparagraph ()
544 "Return the bounds of the ChangeLog subparagraph containing point. 544 "Return the bounds of the ChangeLog subparagraph containing point.
diff --git a/lisp/net/tramp-ftp.el b/lisp/net/tramp-ftp.el
index 2749a6858c0..d33873d1689 100644
--- a/lisp/net/tramp-ftp.el
+++ b/lisp/net/tramp-ftp.el
@@ -1,6 +1,7 @@
1;;; tramp-ftp.el --- Tramp convenience functions for Ange-FTP -*- coding: iso-8859-1; -*- 1;;; tramp-ftp.el --- Tramp convenience functions for Ange-FTP -*- coding: iso-8859-1; -*-
2 2
3;; Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc. 3;; Copyright (C) 2002, 2003, 2004, 2005, 2006,
4;; 2007 Free Software Foundation, Inc.
4 5
5;; Author: Michael Albinus <michael.albinus@gmx.de> 6;; Author: Michael Albinus <michael.albinus@gmx.de>
6;; Keywords: comm, processes 7;; Keywords: comm, processes
@@ -31,12 +32,7 @@
31 32
32(require 'tramp) 33(require 'tramp)
33 34
34(eval-when-compile 35(eval-when-compile (require 'custom))
35 (require 'cl)
36 (require 'custom)
37 ;; Emacs 19.34 compatibility hack -- is this needed?
38 (or (>= emacs-major-version 20)
39 (load "cl-seq")))
40 36
41;; Disable Ange-FTP from file-name-handler-alist. 37;; Disable Ange-FTP from file-name-handler-alist.
42;; To handle EFS, the following functions need to be dealt with: 38;; To handle EFS, the following functions need to be dealt with:
diff --git a/lisp/net/tramp-smb.el b/lisp/net/tramp-smb.el
index 5d5d441193d..7382bdef63b 100644
--- a/lisp/net/tramp-smb.el
+++ b/lisp/net/tramp-smb.el
@@ -31,12 +31,7 @@
31(require 'tramp) 31(require 'tramp)
32 32
33;; Pacify byte-compiler 33;; Pacify byte-compiler
34(eval-when-compile 34(eval-when-compile (require 'custom))
35 (require 'cl)
36 (require 'custom)
37 ;; Emacs 19.34 compatibility hack -- is this needed?
38 (or (>= emacs-major-version 20)
39 (load "cl-seq")))
40 35
41;; Avoid byte-compiler warnings if the byte-compiler supports this. 36;; Avoid byte-compiler warnings if the byte-compiler supports this.
42;; Currently, XEmacs supports this. 37;; Currently, XEmacs supports this.
diff --git a/lisp/net/tramp-util.el b/lisp/net/tramp-util.el
index 81857ae4225..4895edf019b 100644
--- a/lisp/net/tramp-util.el
+++ b/lisp/net/tramp-util.el
@@ -29,7 +29,6 @@
29 29
30;;; Code: 30;;; Code:
31 31
32(eval-when-compile (require 'cl))
33(require 'compile) 32(require 'compile)
34(require 'tramp) 33(require 'tramp)
35(add-hook 'tramp-util-unload-hook 34(add-hook 'tramp-util-unload-hook
diff --git a/lisp/net/tramp-uu.el b/lisp/net/tramp-uu.el
index ce047489260..32bb9857f7f 100644
--- a/lisp/net/tramp-uu.el
+++ b/lisp/net/tramp-uu.el
@@ -1,7 +1,8 @@
1;;; -*- coding: iso-2022-7bit; -*- 1;;; -*- coding: iso-2022-7bit; -*-
2;;; tramp-uu.el --- uuencode in Lisp 2;;; tramp-uu.el --- uuencode in Lisp
3 3
4;; Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc. 4;; Copyright (C) 2002, 2003, 2004, 2005, 2006,
5;; 2007 Free Software Foundation, Inc.
5 6
6;; Author: Kai Gro,A_(Bjohann <kai.grossjohann@gmx.net> 7;; Author: Kai Gro,A_(Bjohann <kai.grossjohann@gmx.net>
7;; Keywords: comm, terminals 8;; Keywords: comm, terminals
diff --git a/lisp/net/tramp-vc.el b/lisp/net/tramp-vc.el
index eda98364a98..cc5566d6354 100644
--- a/lisp/net/tramp-vc.el
+++ b/lisp/net/tramp-vc.el
@@ -31,8 +31,6 @@
31 31
32;;; Code: 32;;; Code:
33 33
34(eval-when-compile
35 (require 'cl))
36(require 'vc) 34(require 'vc)
37;; Old VC defines vc-rcs-release in vc.el, new VC requires extra module. 35;; Old VC defines vc-rcs-release in vc.el, new VC requires extra module.
38(unless (boundp 'vc-rcs-release) 36(unless (boundp 'vc-rcs-release)
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el
index 20ac73d0f75..f85620ee323 100644
--- a/lisp/net/tramp.el
+++ b/lisp/net/tramp.el
@@ -151,11 +151,7 @@ Otherwise, use a separate filename syntax for Tramp.")
151 (when (featurep 'tramp-smb) 151 (when (featurep 'tramp-smb)
152 (unload-feature 'tramp-smb 'force))))))) 152 (unload-feature 'tramp-smb 'force)))))))
153 153
154(require 'cl)
155(require 'custom) 154(require 'custom)
156;; Emacs 19.34 compatibility hack -- is this needed?
157(or (>= emacs-major-version 20)
158 (load "cl-seq"))
159 155
160(unless (boundp 'custom-print-functions) 156(unless (boundp 'custom-print-functions)
161 (defvar custom-print-functions nil)) ; not autoloaded before Emacs 20.4 157 (defvar custom-print-functions nil)) ; not autoloaded before Emacs 20.4
@@ -175,6 +171,11 @@ Otherwise, use a separate filename syntax for Tramp.")
175 (when (boundp 'byte-compile-not-obsolete-var) 171 (when (boundp 'byte-compile-not-obsolete-var)
176 (setq byte-compile-not-obsolete-var 'directory-sep-char))) 172 (setq byte-compile-not-obsolete-var 'directory-sep-char)))
177 173
174;; `set-buffer-multibyte' comes from Emacs Leim.
175(eval-and-compile
176 (unless (fboundp 'set-buffer-multibyte)
177 (defalias 'set-buffer-multibyte 'ignore)))
178
178;;; User Customizable Internal Variables: 179;;; User Customizable Internal Variables:
179 180
180(defgroup tramp nil 181(defgroup tramp nil
@@ -2077,7 +2078,9 @@ If VAR is nil, then we bind `v' to the structure and `multi-method',
2077 2078
2078(put 'with-parsed-tramp-file-name 'lisp-indent-function 2) 2079(put 'with-parsed-tramp-file-name 'lisp-indent-function 2)
2079;; Enable debugging. 2080;; Enable debugging.
2080(def-edebug-spec with-parsed-tramp-file-name (form symbolp body)) 2081(eval-and-compile
2082 (when (featurep 'edebug)
2083 (def-edebug-spec with-parsed-tramp-file-name (form symbolp body))))
2081;; Highlight as keyword. 2084;; Highlight as keyword.
2082(when (functionp 'font-lock-add-keywords) 2085(when (functionp 'font-lock-add-keywords)
2083 (funcall 'font-lock-add-keywords 2086 (funcall 'font-lock-add-keywords
@@ -2384,10 +2387,10 @@ target of the symlink differ."
2384 "Integer constant overflow in reader") 2387 "Integer constant overflow in reader")
2385 (string-match 2388 (string-match
2386 "^[0-9]+\\([0-9][0-9][0-9][0-9][0-9]\\)\\'" 2389 "^[0-9]+\\([0-9][0-9][0-9][0-9][0-9]\\)\\'"
2387 (caddr err))) 2390 (car (cddr err))))
2388 (let* ((big (read (substring (caddr err) 0 2391 (let* ((big (read (substring (car (cddr err)) 0
2389 (match-beginning 1)))) 2392 (match-beginning 1))))
2390 (small (read (match-string 1 (caddr err)))) 2393 (small (read (match-string 1 (car (cddr err)))))
2391 (twiddle (/ small 65536))) 2394 (twiddle (/ small 65536)))
2392 (cons (+ big twiddle) 2395 (cons (+ big twiddle)
2393 (- small (* twiddle 65536)))))))) 2396 (- small (* twiddle 65536))))))))
@@ -2807,7 +2810,7 @@ of."
2807 object))) 2810 object)))
2808 (cell root)) 2811 (cell root))
2809 (while (cdr cell) 2812 (while (cdr cell)
2810 (if (and match (not (string-match match (caadr cell)))) 2813 (if (and match (not (string-match match (car (cadr cell)))))
2811 ;; Remove from list 2814 ;; Remove from list
2812 (setcdr cell (cddr cell)) 2815 (setcdr cell (cddr cell))
2813 ;; Include in list 2816 ;; Include in list
@@ -3426,10 +3429,10 @@ This is like `dired-recursive-delete-directory' for tramp files."
3426(defun tramp-handle-insert-directory 3429(defun tramp-handle-insert-directory
3427 (filename switches &optional wildcard full-directory-p) 3430 (filename switches &optional wildcard full-directory-p)
3428 "Like `insert-directory' for tramp files." 3431 "Like `insert-directory' for tramp files."
3429 (if (and (boundp 'ls-lisp-use-insert-directory-program) 3432 (if (and (featurep 'ls-lisp)
3430 (not (symbol-value 'ls-lisp-use-insert-directory-program))) 3433 (not (symbol-value 'ls-lisp-use-insert-directory-program)))
3431 (tramp-run-real-handler 'insert-directory 3434 (tramp-run-real-handler
3432 (list filename switches wildcard full-directory-p)) 3435 'insert-directory (list filename switches wildcard full-directory-p))
3433 ;; For the moment, we assume that the remote "ls" program does not 3436 ;; For the moment, we assume that the remote "ls" program does not
3434 ;; grok "--dired". In the future, we should detect this on 3437 ;; grok "--dired". In the future, we should detect this on
3435 ;; connection setup. 3438 ;; connection setup.
@@ -3869,12 +3872,7 @@ This will break if COMMAND prints a newline, followed by the value of
3869 "Like `file-remote-p' for tramp files." 3872 "Like `file-remote-p' for tramp files."
3870 (when (tramp-tramp-file-p filename) 3873 (when (tramp-tramp-file-p filename)
3871 (with-parsed-tramp-file-name filename nil 3874 (with-parsed-tramp-file-name filename nil
3872 (make-tramp-file-name 3875 (vector multi-method method user host ""))))
3873 :multi-method multi-method
3874 :method method
3875 :user user
3876 :host host
3877 :localname ""))))
3878 3876
3879(defun tramp-handle-insert-file-contents 3877(defun tramp-handle-insert-file-contents
3880 (filename &optional visit beg end replace) 3878 (filename &optional visit beg end replace)
@@ -3919,7 +3917,7 @@ This will break if COMMAND prints a newline, followed by the value of
3919 (when (boundp 'last-coding-system-used) 3917 (when (boundp 'last-coding-system-used)
3920 (set 'last-coding-system-used coding-system-used)) 3918 (set 'last-coding-system-used coding-system-used))
3921 (list (expand-file-name filename) 3919 (list (expand-file-name filename)
3922 (second result)))))) 3920 (cadr result))))))
3923 3921
3924 3922
3925(defun tramp-handle-find-backup-file-name (filename) 3923(defun tramp-handle-find-backup-file-name (filename)
@@ -3978,7 +3976,8 @@ Returns a file name in `tramp-auto-save-directory' for autosaving this file."
3978 (when (and (string-match (car x) buffer-file-name) 3976 (when (and (string-match (car x) buffer-file-name)
3979 (not (car (cddr x)))) 3977 (not (car (cddr x))))
3980 (setq tramp-auto-save-directory 3978 (setq tramp-auto-save-directory
3981 (or tramp-auto-save-directory temporary-file-directory)))) 3979 (or tramp-auto-save-directory
3980 (tramp-temporary-file-directory)))))
3982 (symbol-value 'auto-save-file-name-transforms))) 3981 (symbol-value 'auto-save-file-name-transforms)))
3983 ;; Create directory. 3982 ;; Create directory.
3984 (when tramp-auto-save-directory 3983 (when tramp-auto-save-directory
@@ -4566,7 +4565,7 @@ Falls back to normal file name handler if no tramp file name handler exists."
4566 (member (match-string 1 file) (mapcar 'car tramp-methods))) 4565 (member (match-string 1 file) (mapcar 'car tramp-methods)))
4567 ((or (equal last-input-event 'tab) 4566 ((or (equal last-input-event 'tab)
4568 ;; Emacs 4567 ;; Emacs
4569 (and (wholenump last-input-event) 4568 (and (natnump last-input-event)
4570 (or 4569 (or
4571 ;; ?\t has event-modifier 'control 4570 ;; ?\t has event-modifier 'control
4572 (char-equal last-input-event ?\t) 4571 (char-equal last-input-event ?\t)
@@ -4575,6 +4574,10 @@ Falls back to normal file name handler if no tramp file name handler exists."
4575 (char-equal last-input-event ?\ ))))) 4574 (char-equal last-input-event ?\ )))))
4576 ;; XEmacs 4575 ;; XEmacs
4577 (and (featurep 'xemacs) 4576 (and (featurep 'xemacs)
4577 ;; `last-input-event' might be nil.
4578 (not (null last-input-event))
4579 ;; `last-input-event' may have no character approximation.
4580 (funcall (symbol-function 'event-to-character) last-input-event)
4578 (or 4581 (or
4579 ;; ?\t has event-modifier 'control 4582 ;; ?\t has event-modifier 'control
4580 (char-equal 4583 (char-equal
@@ -4771,24 +4774,14 @@ remote host and localname (filename on remote host)."
4771 (match-string (nth 1 structure) name))) 4774 (match-string (nth 1 structure) name)))
4772 (if (and method (member method tramp-multi-methods)) 4775 (if (and method (member method tramp-multi-methods))
4773 ;; Not handled (yet). 4776 ;; Not handled (yet).
4774 (make-tramp-file-name 4777 (vector method nil nil nil nil)
4775 :multi-method method
4776 :method nil
4777 :user nil
4778 :host nil
4779 :localname nil)
4780 (let ((user (and (nth 2 structure) 4778 (let ((user (and (nth 2 structure)
4781 (match-string (nth 2 structure) name))) 4779 (match-string (nth 2 structure) name)))
4782 (host (and (nth 3 structure) 4780 (host (and (nth 3 structure)
4783 (match-string (nth 3 structure) name))) 4781 (match-string (nth 3 structure) name)))
4784 (localname (and (nth 4 structure) 4782 (localname (and (nth 4 structure)
4785 (match-string (nth 4 structure) name)))) 4783 (match-string (nth 4 structure) name))))
4786 (make-tramp-file-name 4784 (vector nil method user host localname)))))))
4787 :multi-method nil
4788 :method method
4789 :user user
4790 :host host
4791 :localname localname)))))))
4792 4785
4793;; This function returns all possible method completions, adding the 4786;; This function returns all possible method completions, adding the
4794;; trailing method delimeter. 4787;; trailing method delimeter.
@@ -5191,7 +5184,7 @@ USER the array of user names, HOST the array of host names."
5191 (aref user i) (aref host i)) 5184 (aref user i) (aref host i))
5192 (format "%s@%s:" (aref method i) (aref host i))) 5185 (format "%s@%s:" (aref method i) (aref host i)))
5193 string-list)) 5186 string-list))
5194 (incf i)) 5187 (setq i (1+ i)))
5195 (format "*%s/%s %s*" 5188 (format "*%s/%s %s*"
5196 prefix multi-method 5189 prefix multi-method
5197 (apply 'concat (reverse string-list))))) 5190 (apply 'concat (reverse string-list)))))
@@ -5928,7 +5921,7 @@ log in as u2 to h2."
5928 ;; is done here. 5921 ;; is done here.
5929 (funcall multi-func p m u h command) 5922 (funcall multi-func p m u h command)
5930 (erase-buffer) 5923 (erase-buffer)
5931 (incf i))) 5924 (setq i (1+ i))))
5932 (tramp-open-connection-setup-interactive-shell 5925 (tramp-open-connection-setup-interactive-shell
5933 p multi-method method user host) 5926 p multi-method method user host)
5934 (tramp-post-connection multi-method method user host))))) 5927 (tramp-post-connection multi-method method user host)))))
@@ -6824,7 +6817,8 @@ If `tramp-discard-garbage' is nil, just erase buffer."
6824 6817
6825(defun tramp-mode-string-to-int (mode-string) 6818(defun tramp-mode-string-to-int (mode-string)
6826 "Converts a ten-letter `drwxrwxrwx'-style mode string into mode bits." 6819 "Converts a ten-letter `drwxrwxrwx'-style mode string into mode bits."
6827 (let* ((mode-chars (string-to-vector mode-string)) 6820 (let* (case-fold-search
6821 (mode-chars (string-to-vector mode-string))
6828 (owner-read (aref mode-chars 1)) 6822 (owner-read (aref mode-chars 1))
6829 (owner-write (aref mode-chars 2)) 6823 (owner-write (aref mode-chars 2))
6830 (owner-execute-or-setid (aref mode-chars 3)) 6824 (owner-execute-or-setid (aref mode-chars 3))
@@ -6836,45 +6830,61 @@ If `tramp-discard-garbage' is nil, just erase buffer."
6836 (other-execute-or-sticky (aref mode-chars 9))) 6830 (other-execute-or-sticky (aref mode-chars 9)))
6837 (save-match-data 6831 (save-match-data
6838 (logior 6832 (logior
6839 (case owner-read 6833 (cond
6840 (?r (tramp-octal-to-decimal "00400")) (?- 0) 6834 ((char-equal owner-read ?r) (tramp-octal-to-decimal "00400"))
6841 (t (error "Second char `%c' must be one of `r-'" owner-read))) 6835 ((char-equal owner-read ?-) 0)
6842 (case owner-write 6836 (t (error "Second char `%c' must be one of `r-'" owner-read)))
6843 (?w (tramp-octal-to-decimal "00200")) (?- 0) 6837 (cond
6844 (t (error "Third char `%c' must be one of `w-'" owner-write))) 6838 ((char-equal owner-write ?w) (tramp-octal-to-decimal "00200"))
6845 (case owner-execute-or-setid 6839 ((char-equal owner-write ?-) 0)
6846 (?x (tramp-octal-to-decimal "00100")) 6840 (t (error "Third char `%c' must be one of `w-'" owner-write)))
6847 (?S (tramp-octal-to-decimal "04000")) 6841 (cond
6848 (?s (tramp-octal-to-decimal "04100")) 6842 ((char-equal owner-execute-or-setid ?x)
6849 (?- 0) 6843 (tramp-octal-to-decimal "00100"))
6850 (t (error "Fourth char `%c' must be one of `xsS-'" 6844 ((char-equal owner-execute-or-setid ?S)
6851 owner-execute-or-setid))) 6845 (tramp-octal-to-decimal "04000"))
6852 (case group-read 6846 ((char-equal owner-execute-or-setid ?s)
6853 (?r (tramp-octal-to-decimal "00040")) (?- 0) 6847 (tramp-octal-to-decimal "04100"))
6854 (t (error "Fifth char `%c' must be one of `r-'" group-read))) 6848 ((char-equal owner-execute-or-setid ?-) 0)
6855 (case group-write 6849 (t (error "Fourth char `%c' must be one of `xsS-'"
6856 (?w (tramp-octal-to-decimal "00020")) (?- 0) 6850 owner-execute-or-setid)))
6857 (t (error "Sixth char `%c' must be one of `w-'" group-write))) 6851 (cond
6858 (case group-execute-or-setid 6852 ((char-equal group-read ?r) (tramp-octal-to-decimal "00040"))
6859 (?x (tramp-octal-to-decimal "00010")) 6853 ((char-equal group-read ?-) 0)
6860 (?S (tramp-octal-to-decimal "02000")) 6854 (t (error "Fifth char `%c' must be one of `r-'" group-read)))
6861 (?s (tramp-octal-to-decimal "02010")) 6855 (cond
6862 (?- 0) 6856 ((char-equal group-write ?w) (tramp-octal-to-decimal "00020"))
6863 (t (error "Seventh char `%c' must be one of `xsS-'" 6857 ((char-equal group-write ?-) 0)
6864 group-execute-or-setid))) 6858 (t (error "Sixth char `%c' must be one of `w-'" group-write)))
6865 (case other-read 6859 (cond
6866 (?r (tramp-octal-to-decimal "00004")) (?- 0) 6860 ((char-equal group-execute-or-setid ?x)
6867 (t (error "Eighth char `%c' must be one of `r-'" other-read))) 6861 (tramp-octal-to-decimal "00010"))
6868 (case other-write 6862 ((char-equal group-execute-or-setid ?S)
6869 (?w (tramp-octal-to-decimal "00002")) (?- 0) 6863 (tramp-octal-to-decimal "02000"))
6864 ((char-equal group-execute-or-setid ?s)
6865 (tramp-octal-to-decimal "02010"))
6866 ((char-equal group-execute-or-setid ?-) 0)
6867 (t (error "Seventh char `%c' must be one of `xsS-'"
6868 group-execute-or-setid)))
6869 (cond
6870 ((char-equal other-read ?r)
6871 (tramp-octal-to-decimal "00004"))
6872 ((char-equal other-read ?-) 0)
6873 (t (error "Eighth char `%c' must be one of `r-'" other-read)))
6874 (cond
6875 ((char-equal other-write ?w) (tramp-octal-to-decimal "00002"))
6876 ((char-equal other-write ?-) 0)
6870 (t (error "Nineth char `%c' must be one of `w-'" other-write))) 6877 (t (error "Nineth char `%c' must be one of `w-'" other-write)))
6871 (case other-execute-or-sticky 6878 (cond
6872 (?x (tramp-octal-to-decimal "00001")) 6879 ((char-equal other-execute-or-sticky ?x)
6873 (?T (tramp-octal-to-decimal "01000")) 6880 (tramp-octal-to-decimal "00001"))
6874 (?t (tramp-octal-to-decimal "01001")) 6881 ((char-equal other-execute-or-sticky ?T)
6875 (?- 0) 6882 (tramp-octal-to-decimal "01000"))
6876 (t (error "Tenth char `%c' must be one of `xtT-'" 6883 ((char-equal other-execute-or-sticky ?t)
6877 other-execute-or-sticky))))))) 6884 (tramp-octal-to-decimal "01001"))
6885 ((char-equal other-execute-or-sticky ?-) 0)
6886 (t (error "Tenth char `%c' must be one of `xtT-'"
6887 other-execute-or-sticky)))))))
6878 6888
6879(defun tramp-convert-file-attributes (multi-method method user host attr) 6889(defun tramp-convert-file-attributes (multi-method method user host attr)
6880 "Convert file-attributes ATTR generated by perl script or ls. 6890 "Convert file-attributes ATTR generated by perl script or ls.
@@ -6977,7 +6987,29 @@ Not actually used. Use `(format \"%o\" i)' instead?"
6977;; internal data structure. Convenience functions for internal 6987;; internal data structure. Convenience functions for internal
6978;; data structure. 6988;; data structure.
6979 6989
6980(defstruct tramp-file-name multi-method method user host localname) 6990(defun tramp-file-name-p (obj)
6991 "Check whether TRAMP-FILE-NAME is a Tramp object."
6992 (and (vectorp obj) (= 5 (length obj))))
6993
6994(defun tramp-file-name-multi-method (obj)
6995 "Return MULTI-METHOD component of TRAMP-FILE-NAME."
6996 (and (tramp-file-name-p obj) (aref obj 0)))
6997
6998(defun tramp-file-name-method (obj)
6999 "Return METHOD component of TRAMP-FILE-NAME."
7000 (and (tramp-file-name-p obj) (aref obj 1)))
7001
7002(defun tramp-file-name-user (obj)
7003 "Return USER component of TRAMP-FILE-NAME."
7004 (and (tramp-file-name-p obj) (aref obj 2)))
7005
7006(defun tramp-file-name-host (obj)
7007 "Return HOST component of TRAMP-FILE-NAME."
7008 (and (tramp-file-name-p obj) (aref obj 3)))
7009
7010(defun tramp-file-name-localname (obj)
7011 "Return LOCALNAME component of TRAMP-FILE-NAME."
7012 (and (tramp-file-name-p obj) (aref obj 4)))
6981 7013
6982(defun tramp-tramp-file-p (name) 7014(defun tramp-tramp-file-p (name)
6983 "Return t iff NAME is a tramp file." 7015 "Return t iff NAME is a tramp file."
@@ -7010,12 +7042,7 @@ localname (file name on remote host)."
7010 (let ((user (match-string (nth 2 tramp-file-name-structure) name)) 7042 (let ((user (match-string (nth 2 tramp-file-name-structure) name))
7011 (host (match-string (nth 3 tramp-file-name-structure) name)) 7043 (host (match-string (nth 3 tramp-file-name-structure) name))
7012 (localname (match-string (nth 4 tramp-file-name-structure) name))) 7044 (localname (match-string (nth 4 tramp-file-name-structure) name)))
7013 (make-tramp-file-name 7045 (vector nil method (or user nil) host localname))))))
7014 :multi-method nil
7015 :method method
7016 :user (or user nil)
7017 :host host
7018 :localname localname))))))
7019 7046
7020(defun tramp-find-default-method (user host) 7047(defun tramp-find-default-method (user host)
7021 "Look up the right method to use in `tramp-default-method-alist'." 7048 "Look up the right method to use in `tramp-default-method-alist'."
@@ -7055,7 +7082,7 @@ If both MULTI-METHOD and METHOD are nil, do a lookup in
7055 (setq method (match-string method-index name)) 7082 (setq method (match-string method-index name))
7056 (setq hops (match-string hops-index name)) 7083 (setq hops (match-string hops-index name))
7057 (setq len (/ (length (match-data t)) 2)) 7084 (setq len (/ (length (match-data t)) 2))
7058 (when (< localname-index 0) (incf localname-index len)) 7085 (when (< localname-index 0) (setq localname-index (+ localname-index len)))
7059 (setq localname (match-string localname-index name)) 7086 (setq localname (match-string localname-index name))
7060 (let ((index 0)) 7087 (let ((index 0))
7061 (while (string-match hop-regexp hops index) 7088 (while (string-match hop-regexp hops index)
@@ -7066,12 +7093,12 @@ If both MULTI-METHOD and METHOD are nil, do a lookup in
7066 (cons (match-string hop-user-index hops) hop-users)) 7093 (cons (match-string hop-user-index hops) hop-users))
7067 (setq hop-hosts 7094 (setq hop-hosts
7068 (cons (match-string hop-host-index hops) hop-hosts)))) 7095 (cons (match-string hop-host-index hops) hop-hosts))))
7069 (make-tramp-file-name 7096 (vector
7070 :multi-method method 7097 method
7071 :method (apply 'vector (reverse hop-methods)) 7098 (apply 'vector (reverse hop-methods))
7072 :user (apply 'vector (reverse hop-users)) 7099 (apply 'vector (reverse hop-users))
7073 :host (apply 'vector (reverse hop-hosts)) 7100 (apply 'vector (reverse hop-hosts))
7074 :localname localname))) 7101 localname)))
7075 7102
7076(defun tramp-make-tramp-file-name (multi-method method user host localname) 7103(defun tramp-make-tramp-file-name (multi-method method user host localname)
7077 "Constructs a tramp file name from METHOD, USER, HOST and LOCALNAME." 7104 "Constructs a tramp file name from METHOD, USER, HOST and LOCALNAME."
@@ -7103,7 +7130,7 @@ If both MULTI-METHOD and METHOD are nil, do a lookup in
7103 (let ((m (aref method i)) (u (aref user i)) (h (aref host i))) 7130 (let ((m (aref method i)) (u (aref user i)) (h (aref host i)))
7104 (setq hops (concat hops (format-spec hop-format 7131 (setq hops (concat hops (format-spec hop-format
7105 `((?m . ,m) (?u . ,u) (?h . ,h))))) 7132 `((?m . ,m) (?u . ,u) (?h . ,h)))))
7106 (incf i))) 7133 (setq i (1+ i))))
7107 (concat prefix hops localname))) 7134 (concat prefix hops localname)))
7108 7135
7109(defun tramp-make-copy-program-file-name (user host localname) 7136(defun tramp-make-copy-program-file-name (user host localname)
@@ -7218,7 +7245,7 @@ as default."
7218 (assoc (tramp-find-method multi-method method user host) 7245 (assoc (tramp-find-method multi-method method user host)
7219 tramp-methods)))) 7246 tramp-methods))))
7220 (if entry 7247 (if entry
7221 (second entry) 7248 (cadr entry)
7222 (symbol-value param)))) 7249 (symbol-value param))))
7223 7250
7224 7251
diff --git a/lisp/net/trampver.el b/lisp/net/trampver.el
index 04f7bc754f2..485c58afa65 100644
--- a/lisp/net/trampver.el
+++ b/lisp/net/trampver.el
@@ -30,7 +30,7 @@
30;; are auto-frobbed from configure.ac, so you should edit that file and run 30;; are auto-frobbed from configure.ac, so you should edit that file and run
31;; "autoconf && ./configure" to change them. 31;; "autoconf && ./configure" to change them.
32 32
33(defconst tramp-version "2.0.55" 33(defconst tramp-version "2.0.56"
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"
diff --git a/lisp/net/webjump.el b/lisp/net/webjump.el
index 7f4fce16bce..03ce6305196 100644
--- a/lisp/net/webjump.el
+++ b/lisp/net/webjump.el
@@ -229,6 +229,8 @@
229 ("Yahoo" . 229 ("Yahoo" .
230 [simple-query "www.yahoo.com" "search.yahoo.com/search?p=" ""]) 230 [simple-query "www.yahoo.com" "search.yahoo.com/search?p=" ""])
231 ("Yahoo: Reference" . "www.yahoo.com/Reference/") 231 ("Yahoo: Reference" . "www.yahoo.com/Reference/")
232 ("Wikipedia" .
233 [simple-query "wikipedia.org" "wikipedia.org/wiki/" ""])
232 234
233 ;; Misc. general interest. 235 ;; Misc. general interest.
234 ("Interactive Weather Information Network" . webjump-to-iwin) 236 ("Interactive Weather Information Network" . webjump-to-iwin)
diff --git a/lisp/progmodes/idlwave.el b/lisp/progmodes/idlwave.el
index 0556c87b43d..cf518b17d94 100644
--- a/lisp/progmodes/idlwave.el
+++ b/lisp/progmodes/idlwave.el
@@ -4342,7 +4342,7 @@ catalog \('lib).")
4342(defvar idlwave-true-path-alist nil 4342(defvar idlwave-true-path-alist nil
4343 "Like `idlwave-path-alist', but with true filenames.") 4343 "Like `idlwave-path-alist', but with true filenames.")
4344(defvar idlwave-routines nil 4344(defvar idlwave-routines nil
4345 "Holds the combinded procedure/function/method routine-info.") 4345 "Holds the combined procedure/function/method routine-info.")
4346(defvar idlwave-class-alist nil 4346(defvar idlwave-class-alist nil
4347 "Holds the class names known to IDLWAVE.") 4347 "Holds the class names known to IDLWAVE.")
4348(defvar idlwave-class-history nil 4348(defvar idlwave-class-history nil
@@ -4846,7 +4846,7 @@ Gets set in cached XML rinfo, or `idlw-rinfo.el'.")
4846 ;; Create a sysvar list entry from the xml parsed list. 4846 ;; Create a sysvar list entry from the xml parsed list.
4847 (let* ((nameblock (nth 1 xml-entry)) 4847 (let* ((nameblock (nth 1 xml-entry))
4848 (name (cdr (assq 'name nameblock))) 4848 (name (cdr (assq 'name nameblock)))
4849 (sysvar (substring name (progn (string-match "^ *!" name) 4849 (sysvar (substring name (progn (string-match "^ *!" name)
4850 (match-end 0)))) 4850 (match-end 0))))
4851 (link (cdr (assq 'link nameblock))) 4851 (link (cdr (assq 'link nameblock)))
4852 (params (cddr xml-entry)) 4852 (params (cddr xml-entry))
diff --git a/lisp/textmodes/flyspell.el b/lisp/textmodes/flyspell.el
index a509fdf7f6c..e02fec1362f 100644
--- a/lisp/textmodes/flyspell.el
+++ b/lisp/textmodes/flyspell.el
@@ -2025,6 +2025,7 @@ If OPOINT is non-nil, restore point there after adjusting it for replacement."
2025 (error "Pop-up menus do not work on this terminal")) 2025 (error "Pop-up menus do not work on this terminal"))
2026 ;; use the correct dictionary 2026 ;; use the correct dictionary
2027 (flyspell-accept-buffer-local-defs) 2027 (flyspell-accept-buffer-local-defs)
2028 (or opoint (setq opoint (point-marker)))
2028 (let ((cursor-location (point)) 2029 (let ((cursor-location (point))
2029 (word (flyspell-get-word nil))) 2030 (word (flyspell-get-word nil)))
2030 (if (consp word) 2031 (if (consp word)
@@ -2133,6 +2134,8 @@ If OPOINT is non-nil, restore point there after adjusting it for replacement."
2133;;*---------------------------------------------------------------------*/ 2134;;*---------------------------------------------------------------------*/
2134(defun flyspell-emacs-popup (event poss word) 2135(defun flyspell-emacs-popup (event poss word)
2135 "The Emacs popup menu." 2136 "The Emacs popup menu."
2137 (unless window-system
2138 (error "This command requires pop-up dialogs"))
2136 (if (not event) 2139 (if (not event)
2137 (let* ((mouse-pos (mouse-position)) 2140 (let* ((mouse-pos (mouse-position))
2138 (mouse-pos (if (nth 1 mouse-pos) 2141 (mouse-pos (if (nth 1 mouse-pos)
diff --git a/lisp/textmodes/sgml-mode.el b/lisp/textmodes/sgml-mode.el
index 51ff5e48a34..7441fb46ffc 100644
--- a/lisp/textmodes/sgml-mode.el
+++ b/lisp/textmodes/sgml-mode.el
@@ -896,16 +896,19 @@ With prefix argument ARG, repeat this ARG times."
896 ;; Show preceding or following hidden tag, depending of cursor direction. 896 ;; Show preceding or following hidden tag, depending of cursor direction.
897 (let ((inhibit-point-motion-hooks t)) 897 (let ((inhibit-point-motion-hooks t))
898 (save-excursion 898 (save-excursion
899 (message "Invisible tag: %s" 899 (condition-case nil
900 ;; Strip properties, otherwise, the text is invisible. 900 (message "Invisible tag: %s"
901 (buffer-substring-no-properties 901 ;; Strip properties, otherwise, the text is invisible.
902 (point) 902 (buffer-substring-no-properties
903 (if (or (and (> x y) 903 (point)
904 (not (eq (following-char) ?<))) 904 (if (or (and (> x y)
905 (and (< x y) 905 (not (eq (following-char) ?<)))
906 (eq (preceding-char) ?>))) 906 (and (< x y)
907 (backward-list) 907 (eq (preceding-char) ?>)))
908 (forward-list))))))) 908 (backward-list)
909 (forward-list))))
910 (error nil)))))
911
909 912
910 913
911(defun sgml-validate (command) 914(defun sgml-validate (command)
diff --git a/lisp/textmodes/table.el b/lisp/textmodes/table.el
index c0a85eeb68c..69c3c60f912 100644
--- a/lisp/textmodes/table.el
+++ b/lisp/textmodes/table.el
@@ -5333,21 +5333,25 @@ instead of the current buffer and returns the OBJECT."
5333(defun table--point-entered-cell-function (&optional old-point new-point) 5333(defun table--point-entered-cell-function (&optional old-point new-point)
5334 "Point has entered a cell. 5334 "Point has entered a cell.
5335Refresh the menu bar." 5335Refresh the menu bar."
5336 (unless table-cell-entered-state 5336 ;; Avoid calling point-motion-hooks recursively.
5337 (setq table-cell-entered-state t) 5337 (let ((inhibit-point-motion-hooks t))
5338 (setq table-mode-indicator t) 5338 (unless table-cell-entered-state
5339 (force-mode-line-update) 5339 (setq table-cell-entered-state t)
5340 (table--warn-incompatibility) 5340 (setq table-mode-indicator t)
5341 (run-hooks 'table-point-entered-cell-hook))) 5341 (force-mode-line-update)
5342 (table--warn-incompatibility)
5343 (run-hooks 'table-point-entered-cell-hook))))
5342 5344
5343(defun table--point-left-cell-function (&optional old-point new-point) 5345(defun table--point-left-cell-function (&optional old-point new-point)
5344 "Point has left a cell. 5346 "Point has left a cell.
5345Refresh the menu bar." 5347Refresh the menu bar."
5346 (when table-cell-entered-state 5348 ;; Avoid calling point-motion-hooks recursively.
5347 (setq table-cell-entered-state nil) 5349 (let ((inhibit-point-motion-hooks t))
5348 (setq table-mode-indicator nil) 5350 (when table-cell-entered-state
5349 (force-mode-line-update) 5351 (setq table-cell-entered-state nil)
5350 (run-hooks 'table-point-left-cell-hook))) 5352 (setq table-mode-indicator nil)
5353 (force-mode-line-update)
5354 (run-hooks 'table-point-left-cell-hook))))
5351 5355
5352(defun table--warn-incompatibility () 5356(defun table--warn-incompatibility ()
5353 "If called from interactive operation warn the know incompatibilities. 5357 "If called from interactive operation warn the know incompatibilities.
diff --git a/lisp/url/ChangeLog b/lisp/url/ChangeLog
index 8c53d49fdd1..d9efd3a4540 100644
--- a/lisp/url/ChangeLog
+++ b/lisp/url/ChangeLog
@@ -1,3 +1,9 @@
12007-05-29 Chong Yidong <cyd@stupidchicken.com>
2
3 * url-mailto.el (url-mailto): Insert body after
4 mail-header-separator if present, so that it is before signature.
5 Suggested by Leo <sdl.web@gmail.com>.
6
12007-04-15 Chong Yidong <cyd@stupidchicken.com> 72007-04-15 Chong Yidong <cyd@stupidchicken.com>
2 8
3 * url-parse.el (url-generic-parse-url): Revert 2006-10-09 changes. 9 * url-parse.el (url-generic-parse-url): Revert 2006-10-09 changes.
diff --git a/lisp/url/url-mailto.el b/lisp/url/url-mailto.el
index 9f20989a0b1..6585ba8e458 100644
--- a/lisp/url/url-mailto.el
+++ b/lisp/url/url-mailto.el
@@ -100,7 +100,9 @@
100 (while args 100 (while args
101 (if (string= (caar args) "body") 101 (if (string= (caar args) "body")
102 (progn 102 (progn
103 (goto-char (point-max)) 103 (goto-char (point-min))
104 (or (search-forward (concat "\n" mail-header-separator "\n") nil t)
105 (goto-char (point-max)))
104 (insert (mapconcat 106 (insert (mapconcat
105 #'(lambda (string) 107 #'(lambda (string)
106 (replace-regexp-in-string "\r\n" "\n" string)) 108 (replace-regexp-in-string "\r\n" "\n" string))
diff --git a/lisp/vc-hooks.el b/lisp/vc-hooks.el
index 1bde704790b..22935ab7f3b 100644
--- a/lisp/vc-hooks.el
+++ b/lisp/vc-hooks.el
@@ -325,7 +325,7 @@ If WITNESS if not found, return nil, otherwise return the root."
325 ;; to another user. This should save us from looking in 325 ;; to another user. This should save us from looking in
326 ;; things like /net and /afs. This assumes that all the 326 ;; things like /net and /afs. This assumes that all the
327 ;; files inside a project belong to the same user. 327 ;; files inside a project belong to the same user.
328 (not (equal user (file-attributes file))) 328 (not (equal user (nth 2 (file-attributes file))))
329 (string-match vc-ignore-dir-regexp file))) 329 (string-match vc-ignore-dir-regexp file)))
330 (if (file-exists-p (expand-file-name witness file)) 330 (if (file-exists-p (expand-file-name witness file))
331 (setq root file) 331 (setq root file)
diff --git a/lisp/xt-mouse.el b/lisp/xt-mouse.el
index dea232179c6..5988baf3565 100644
--- a/lisp/xt-mouse.el
+++ b/lisp/xt-mouse.el
@@ -131,6 +131,21 @@
131 (+ c #x8000000 128) 131 (+ c #x8000000 128)
132 c))) 132 c)))
133 133
134(defun xterm-mouse-truncate-wrap (f)
135 "Truncate with wrap-around."
136 (condition-case nil
137 ;; First try the built-in truncate, in case there's no overflow.
138 (truncate f)
139 ;; In case of overflow, do wraparound by hand.
140 (range-error
141 ;; In our case, we wrap around every 3 days or so, so if we assume
142 ;; a maximum of 65536 wraparounds, we're safe for a couple years.
143 ;; Using a power of 2 makes rounding errors less likely.
144 (let* ((maxwrap (* 65536 2048))
145 (dbig (truncate (/ f maxwrap)))
146 (fdiff (- f (* 1.0 maxwrap dbig))))
147 (+ (truncate fdiff) (* maxwrap dbig))))))
148
134(defun xterm-mouse-event () 149(defun xterm-mouse-event ()
135 "Convert XTerm mouse event to Emacs mouse event." 150 "Convert XTerm mouse event to Emacs mouse event."
136 (let* ((type (- (xterm-mouse-event-read) #o40)) 151 (let* ((type (- (xterm-mouse-event-read) #o40))
@@ -138,12 +153,12 @@
138 (y (- (xterm-mouse-event-read) #o40 1)) 153 (y (- (xterm-mouse-event-read) #o40 1))
139 ;; Emulate timestamp information. This is accurate enough 154 ;; Emulate timestamp information. This is accurate enough
140 ;; for default value of mouse-1-click-follows-link (450msec). 155 ;; for default value of mouse-1-click-follows-link (450msec).
141 (timestamp (truncate 156 (timestamp (xterm-mouse-truncate-wrap
142 (* 1000 157 (* 1000
143 (- (float-time) 158 (- (float-time)
144 (or xt-mouse-epoch 159 (or xt-mouse-epoch
145 (setq xt-mouse-epoch (float-time))))))) 160 (setq xt-mouse-epoch (float-time)))))))
146 (mouse (intern 161 (mouse (intern
147 ;; For buttons > 3, the release-event looks 162 ;; For buttons > 3, the release-event looks
148 ;; differently (see xc/programs/xterm/button.c, 163 ;; differently (see xc/programs/xterm/button.c,
149 ;; function EditorButton), and there seems to come in 164 ;; function EditorButton), and there seems to come in
@@ -243,5 +258,5 @@ down the SHIFT key while pressing the mouse button."
243 258
244(provide 'xt-mouse) 259(provide 'xt-mouse)
245 260
246;;; arch-tag: 84962d4e-fae9-4c13-a9d7-ef4925a4ac03 261;; arch-tag: 84962d4e-fae9-4c13-a9d7-ef4925a4ac03
247;;; xt-mouse.el ends here 262;;; xt-mouse.el ends here