aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog146
-rw-r--r--lisp/calendar/diary-lib.el2
-rw-r--r--lisp/comint.el37
-rw-r--r--lisp/cus-edit.el4
-rw-r--r--lisp/dired-aux.el6
-rw-r--r--lisp/dired.el5
-rw-r--r--lisp/files.el23
-rw-r--r--lisp/format.el3
-rw-r--r--lisp/frame.el2
-rw-r--r--lisp/ido.el12
-rw-r--r--lisp/image-dired.el8
-rw-r--r--lisp/mail/rmail.el4
-rw-r--r--lisp/mail/rmailmm.el81
-rw-r--r--lisp/mail/smtpmail.el1
-rw-r--r--lisp/mouse.el3
-rw-r--r--lisp/net/tramp-sh.el114
-rw-r--r--lisp/net/tramp.el41
-rw-r--r--lisp/ps-print.el10
-rw-r--r--lisp/subr.el29
-rw-r--r--lisp/url/ChangeLog37
-rw-r--r--lisp/url/url-cookie.el5
-rw-r--r--lisp/vc/diff-mode.el7
-rw-r--r--lisp/vc/log-edit.el2
23 files changed, 403 insertions, 179 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 5b0fab21cc9..e4310dd5fe8 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,137 @@
12010-12-13 Eli Zaretskii <eliz@gnu.org>
2
3 * subr.el (posn-col-row): Evaluate header-line-format in the
4 context of the POSITION window's buffer.
5
62010-12-13 Glenn Morris <rgm@gnu.org>
7
8 * subr.el (member-ignore-case, run-mode-hooks, insert-for-yank-1)
9 (with-silent-modifications): Doc fixes.
10
112010-12-13 Michael Albinus <michael.albinus@gmx.de>
12
13 * net/tramp.el (tramp-action-password, tramp-process-actions):
14 Revert patch from 2010-12-08. Use `save-restriction'.
15
162010-12-13 Stephen Berman <stephen.berman@gmx.net>
17
18 * calendar/diary-lib.el (diary-list-sexp-entries):
19 Handle case of no newline at end of file. (Bug#7536)
20
212010-12-13 Glenn Morris <rgm@gnu.org>
22
23 * mail/smtpmail.el (smtpmail-send-it): Revert previous change.
24
252010-12-13 Michael Albinus <michael.albinus@gmx.de>
26
27 * net/tramp.el (tramp-action-password): Delete region, do not narrow.
28 (tramp-process-actions): Do not widen.
29 * net/tramp-sh.el (tramp-sh-handle-start-file-process):
30 Protect buffer-modified value. (Bug#7557)
31
322010-12-13 Jan Moringen <jmoringe@techfak.uni-bielefeld.de>
33
34 * log-edit.el (log-edit-changelog-entries):
35 Regexp quote filename. (Bug#7505)
36
372010-12-13 Tom Breton <tehom@panix.com>
38
39 * cus-edit.el (custom-save-all):
40 Bind print-length and print-level to nil. (Bug#7581)
41
422010-12-13 Glenn Morris <rgm@gnu.org>
43
44 * mouse.el (mouse-menu-major-mode-map, mouse-menu-bar-map):
45 Run hooks to update menu contents. (Bug#7586)
46
47 * mail/smtpmail.el (smtpmail-send-it): Avoid colons in the queued
48 file names, for the sake of MS Windows. (Bug#7588)
49
502010-12-13 Stefan Monnier <monnier@iro.umontreal.ca>
51
52 * diff-mode.el (diff-refine-hunk): Make it work when the hunk contains
53 empty lines without a leading space.
54
552010-12-13 Leo <sdl.web@gmail.com>
56
57 * dired-aux.el (dired-do-redisplay): Postpone dired-after-readin-hook
58 while mapping over marks (Bug#6810).
59
602010-12-13 Chong Yidong <cyd@stupidchicken.com>
61
62 * image-dired.el (image-dired-db-file)
63 (image-dired-temp-image-file, image-dired-gallery-dir)
64 (image-dired-temp-rotate-image-file): Set default values relative
65 to image-dired-dir (Bug#7518).
66
672010-12-13 Lawrence Mitchell <wence@gmx.li>
68
69 * format.el (format-decode-run-method): Pass args FROM and TO, not
70 point-min and point-max, to shell-command-on-region (Bug#7488).
71
722010-12-13 Jan Djärv <jan.h.d@swipnet.se>
73
74 * frame.el (blink-cursor-mode): Make default t for ns.
75
762010-12-13 Bob Rogers <rogers-emacs@rgrjr.dyndns.org>
77
78 * vc-dir.el (vc-dir-query-replace-regexp): Doc fix (Bug#7501).
79
802010-12-13 Chong Yidong <cyd@stupidchicken.com>
81
82 * comint.el (comint-dynamic-list-input-ring)
83 (comint-dynamic-complete-filename)
84 (comint-replace-by-expanded-filename)
85 (comint-dynamic-simple-complete)
86 (comint-dynamic-list-filename-completions)
87 (comint-dynamic-list-completions): Doc fix (Bug#7499).
88
89 * subr.el (posn-x-y, posn-object-x-y, posn-object-width-height):
90 Doc fix (Bug#7471).
91
922010-12-13 Martin Rudalics <rudalics@gmx.at>
93
94 * dired.el (dired-pop-to-buffer): Bind pop-up-frames to nil
95 (Bug#7533).
96
972010-12-13 W. Martin Borgert <debacle@debian.org> (tiny change)
98
99 * files.el (auto-mode-alist): Handle .dbk (DocBook) with xml-mode.
100 (Bug#7491).
101
1022010-12-13 Eli Zaretskii <eliz@gnu.org>
103
104 * files.el (file-relative-name): Handle UNC file names on
105 DOS/Windows. (Bug#4674)
106
1072010-12-13 Daiki Ueno <ueno@unixuser.org>
108
109 * epg.el (epg-digest-algorithm-alist): Replace "RMD160" with
110 "RIPEMD160" (Bug#7490). Reported by Daniel Kahn Gillmor.
111 (epg-context-set-passphrase-callback): Mention that the callback
112 is not called when used with GnuPG 2.x.
113
1142010-12-13 Glenn Morris <rgm@gnu.org>
115
116 * ps-print.el (ps-line-lengths-internal, ps-nb-pages):
117 Ensure ps-footer-font-size-internal is initialized.
118 Call ps-get-page-dimensions before trying to use ps-font-for-text.
119
1202010-12-13 Kenichi Handa <handa@m17n.org>
121
122 * mail/rmailmm.el (rmail-mime-parse): Call rmail-mime-process
123 within condition-case.
124 (rmail-show-mime): Don't use condition-case.
125 (rmail-search-mime-message): New function.
126 (rmail-search-mime-message-function): Set to
127 rmail-search-mime-message.
128
1292010-12-13 Leo <sdl.web@gmail.com>
130
131 * ido.el (ido-common-initialization): New function. (bug#3274)
132 (ido-mode): Use it.
133 (ido-completing-read): Call it.
134
12010-12-12 Karl Fogel <kfogel@red-bean.com> 1352010-12-12 Karl Fogel <kfogel@red-bean.com>
2 136
3 * bookmark.el (bookmark-name-from-full-record): Rename back to 137 * bookmark.el (bookmark-name-from-full-record): Rename back to
@@ -437,17 +571,15 @@
437 (rmail-mime-save): Handle the case that the button's `data' is a 571 (rmail-mime-save): Handle the case that the button's `data' is a
438 MIME entity. 572 MIME entity.
439 (rmail-mime-insert-text): New function. 573 (rmail-mime-insert-text): New function.
440 (rmail-mime-insert-image): Handle the case that DATA is a MIME 574 (rmail-mime-insert-image): Handle the case that DATA is a MIME entity.
441 entity.
442 (rmail-mime-bulk-handler): Just call rmail-mime-insert-bulk. 575 (rmail-mime-bulk-handler): Just call rmail-mime-insert-bulk.
443 (rmail-mime-insert-bulk): New function mostly copied from the old 576 (rmail-mime-insert-bulk): New function mostly copied from the old
444 rmail-mime-bulk-handler. 577 rmail-mime-bulk-handler.
445 (rmail-mime-multipart-handler): Just call 578 (rmail-mime-multipart-handler): Just call rmail-mime-process-multipart.
446 rmail-mime-process-multipart. 579 (rmail-mime-process-multipart): New function mostly copied from
447 (rmail-mime-process-multipart): New funciton mostly copied from
448 the old rmail-mime-multipart-handler. 580 the old rmail-mime-multipart-handler.
449 (rmail-mime-show): Just call rmail-mime-process. 581 (rmail-mime-show): Just call rmail-mime-process.
450 (rmail-mime-process): New funciton mostly copied from the old 582 (rmail-mime-process): New function mostly copied from the old
451 rmail-mime-show. 583 rmail-mime-show.
452 (rmail-mime-insert-multipart, rmail-mime-parse) 584 (rmail-mime-insert-multipart, rmail-mime-parse)
453 (rmail-mime-insert, rmail-show-mime) 585 (rmail-mime-insert, rmail-show-mime)
@@ -5911,7 +6043,7 @@
59112010-07-20 Michael R. Mauger <mmaug@yahoo.com> 60432010-07-20 Michael R. Mauger <mmaug@yahoo.com>
5912 6044
5913 * progmodes/sql.el: Version 2.3. 6045 * progmodes/sql.el: Version 2.3.
5914 (sql-connection-alist): Changed keys from symbols to strings; 6046 (sql-connection-alist): Change keys from symbols to strings;
5915 enhanced the widget definition. 6047 enhanced the widget definition.
5916 (sql-mode-menu): Add submenu to select connections. 6048 (sql-mode-menu): Add submenu to select connections.
5917 (sql-interactive-mode-menu): Add "Save Connection" item. 6049 (sql-interactive-mode-menu): Add "Save Connection" item.
diff --git a/lisp/calendar/diary-lib.el b/lisp/calendar/diary-lib.el
index 231c92f417d..869d69fd8b7 100644
--- a/lisp/calendar/diary-lib.el
+++ b/lisp/calendar/diary-lib.el
@@ -1764,7 +1764,7 @@ best if they are non-marking."
1764 (forward-line 1) 1764 (forward-line 1)
1765 (while (looking-at "[ \t]") 1765 (while (looking-at "[ \t]")
1766 (forward-line 1)) 1766 (forward-line 1))
1767 (backward-char 1) 1767 (if (bolp) (backward-char 1))
1768 (setq entry (buffer-substring-no-properties entry-start (point)))) 1768 (setq entry (buffer-substring-no-properties entry-start (point))))
1769 (setq diary-entry (diary-sexp-entry sexp entry date) 1769 (setq diary-entry (diary-sexp-entry sexp entry date)
1770 literal entry ; before evaluation 1770 literal entry ; before evaluation
diff --git a/lisp/comint.el b/lisp/comint.el
index b4d06cefafb..bd563ee4592 100644
--- a/lisp/comint.el
+++ b/lisp/comint.el
@@ -1009,7 +1009,7 @@ See also `comint-read-input-ring'."
1009 (choose-completion-string completion buffer))) 1009 (choose-completion-string completion buffer)))
1010 1010
1011(defun comint-dynamic-list-input-ring () 1011(defun comint-dynamic-list-input-ring ()
1012 "List in help buffer the buffer's input history." 1012 "Display a list of recent inputs entered into the current buffer."
1013 (interactive) 1013 (interactive)
1014 (if (or (not (ring-p comint-input-ring)) 1014 (if (or (not (ring-p comint-input-ring))
1015 (ring-empty-p comint-input-ring)) 1015 (ring-empty-p comint-input-ring))
@@ -3003,7 +3003,7 @@ Completes if after a filename. See `comint-match-partial-filename' and
3003This function is similar to `comint-replace-by-expanded-filename', except that 3003This function is similar to `comint-replace-by-expanded-filename', except that
3004it won't change parts of the filename already entered in the buffer; it just 3004it won't change parts of the filename already entered in the buffer; it just
3005adds completion characters to the end of the filename. A completions listing 3005adds completion characters to the end of the filename. A completions listing
3006may be shown in a help buffer if completion is ambiguous. 3006may be shown in a separate buffer if completion is ambiguous.
3007 3007
3008Completion is dependent on the value of `comint-completion-addsuffix', 3008Completion is dependent on the value of `comint-completion-addsuffix',
3009`comint-completion-recexact' and `comint-completion-fignore', and the timing of 3009`comint-completion-recexact' and `comint-completion-fignore', and the timing of
@@ -3090,11 +3090,11 @@ See `comint-dynamic-complete-filename'. Returns t if successful."
3090 3090
3091(defun comint-replace-by-expanded-filename () 3091(defun comint-replace-by-expanded-filename ()
3092 "Dynamically expand and complete the filename at point. 3092 "Dynamically expand and complete the filename at point.
3093Replace the filename with an expanded, canonicalized and completed replacement. 3093Replace the filename with an expanded, canonicalized and
3094\"Expanded\" means environment variables (e.g., $HOME) and `~'s are replaced 3094completed replacement, i.e. substituting environment
3095with the corresponding directories. \"Canonicalized\" means `..' and `.' are 3095variables (e.g. $HOME), `~'s, `..', and `.', and making the
3096removed, and the filename is made absolute instead of relative. For expansion 3096filename absolute. For expansion see `expand-file-name' and
3097see `expand-file-name' and `substitute-in-file-name'. For completion see 3097`substitute-in-file-name'. For completion see
3098`comint-dynamic-complete-filename'." 3098`comint-dynamic-complete-filename'."
3099 (interactive) 3099 (interactive)
3100 (let ((filename (comint-match-partial-filename))) 3100 (let ((filename (comint-match-partial-filename)))
@@ -3105,15 +3105,16 @@ see `expand-file-name' and `substitute-in-file-name'. For completion see
3105 3105
3106(defun comint-dynamic-simple-complete (stub candidates) 3106(defun comint-dynamic-simple-complete (stub candidates)
3107 "Dynamically complete STUB from CANDIDATES list. 3107 "Dynamically complete STUB from CANDIDATES list.
3108This function inserts completion characters at point by completing STUB from 3108This function inserts completion characters at point by
3109the strings in CANDIDATES. A completions listing may be shown in a help buffer 3109completing STUB from the strings in CANDIDATES. If completion is
3110if completion is ambiguous. 3110ambiguous, possibly show a completions listing in a separate
3111buffer.
3111 3112
3112Returns nil if no completion was inserted. 3113Return nil if no completion was inserted.
3113Returns `sole' if completed with the only completion match. 3114Return `sole' if completed with the only completion match.
3114Returns `shortest' if completed with the shortest of the completion matches. 3115Return `shortest' if completed with the shortest match.
3115Returns `partial' if completed as far as possible with the completion matches. 3116Return `partial' if completed as far as possible.
3116Returns `listed' if a completion listing was shown. 3117Return `listed' if a completion listing was shown.
3117 3118
3118See also `comint-dynamic-complete-filename'." 3119See also `comint-dynamic-complete-filename'."
3119 (let* ((completion-ignore-case (memq system-type '(ms-dos windows-nt cygwin))) 3120 (let* ((completion-ignore-case (memq system-type '(ms-dos windows-nt cygwin)))
@@ -3161,7 +3162,7 @@ See also `comint-dynamic-complete-filename'."
3161 3162
3162 3163
3163(defun comint-dynamic-list-filename-completions () 3164(defun comint-dynamic-list-filename-completions ()
3164 "List in help buffer possible completions of the filename at point." 3165 "Display a list of possible completions for the filename at point."
3165 (interactive) 3166 (interactive)
3166 (let* ((completion-ignore-case read-file-name-completion-ignore-case) 3167 (let* ((completion-ignore-case read-file-name-completion-ignore-case)
3167 ;; If we bind this, it breaks remote directory tracking in rlogin.el. 3168 ;; If we bind this, it breaks remote directory tracking in rlogin.el.
@@ -3190,9 +3191,9 @@ See also `comint-dynamic-complete-filename'."
3190(defvar comint-dynamic-list-completions-config nil) 3191(defvar comint-dynamic-list-completions-config nil)
3191 3192
3192(defun comint-dynamic-list-completions (completions &optional common-substring) 3193(defun comint-dynamic-list-completions (completions &optional common-substring)
3193 "List in help buffer sorted COMPLETIONS. 3194 "Display a list of sorted COMPLETIONS.
3194The meaning of COMMON-SUBSTRING is the same as in `display-completion-list'. 3195The meaning of COMMON-SUBSTRING is the same as in `display-completion-list'.
3195Typing SPC flushes the help buffer." 3196Typing SPC flushes the completions buffer."
3196 (let ((window (get-buffer-window "*Completions*" 0))) 3197 (let ((window (get-buffer-window "*Completions*" 0)))
3197 (setq completions (sort completions 'string-lessp)) 3198 (setq completions (sort completions 'string-lessp))
3198 (if (and (eq last-command this-command) 3199 (if (and (eq last-command this-command)
diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el
index 61e6881139a..edb299f86ed 100644
--- a/lisp/cus-edit.el
+++ b/lisp/cus-edit.el
@@ -4426,7 +4426,9 @@ if only the first line of the docstring is shown."))
4426 4426
4427 (unless (eq major-mode 'emacs-lisp-mode) 4427 (unless (eq major-mode 'emacs-lisp-mode)
4428 (emacs-lisp-mode)) 4428 (emacs-lisp-mode))
4429 (let ((inhibit-read-only t)) 4429 (let ((inhibit-read-only t)
4430 (print-length nil)
4431 (print-level nil))
4430 (custom-save-variables) 4432 (custom-save-variables)
4431 (custom-save-faces)) 4433 (custom-save-faces))
4432 (let ((file-precious-flag t)) 4434 (let ((file-precious-flag t))
diff --git a/lisp/dired-aux.el b/lisp/dired-aux.el
index 764d13f5a9c..f269d89b1bd 100644
--- a/lisp/dired-aux.el
+++ b/lisp/dired-aux.el
@@ -1019,10 +1019,14 @@ See Info node `(emacs)Subdir switches' for more details."
1019 ;; message much faster than making dired-map-over-marks show progress 1019 ;; message much faster than making dired-map-over-marks show progress
1020 (dired-uncache 1020 (dired-uncache
1021 (if (consp dired-directory) (car dired-directory) dired-directory)) 1021 (if (consp dired-directory) (car dired-directory) dired-directory))
1022 (dired-map-over-marks (let ((fname (dired-get-filename))) 1022 (dired-map-over-marks (let ((fname (dired-get-filename))
1023 ;; Postphone readin hook till we map
1024 ;; over all marked files (Bug#6810).
1025 (dired-after-readin-hook nil))
1023 (message "Redisplaying... %s" fname) 1026 (message "Redisplaying... %s" fname)
1024 (dired-update-file-line fname)) 1027 (dired-update-file-line fname))
1025 arg) 1028 arg)
1029 (run-hooks 'dired-after-readin-hook)
1026 (dired-move-to-filename) 1030 (dired-move-to-filename)
1027 (message "Redisplaying...done"))) 1031 (message "Redisplaying...done")))
1028 1032
diff --git a/lisp/dired.el b/lisp/dired.el
index 8012fcb472d..56030feae8b 100644
--- a/lisp/dired.el
+++ b/lisp/dired.el
@@ -2775,7 +2775,8 @@ name, or the marker and a count of marked files."
2775 ;; that's possible. (Bug#1806) 2775 ;; that's possible. (Bug#1806)
2776 (split-window-vertically)) 2776 (split-window-vertically))
2777 ;; Otherwise, try to split WINDOW sensibly. 2777 ;; Otherwise, try to split WINDOW sensibly.
2778 (split-window-sensibly window))))) 2778 (split-window-sensibly window))))
2779 pop-up-frames)
2779 (pop-to-buffer (get-buffer-create buf))) 2780 (pop-to-buffer (get-buffer-create buf)))
2780 ;; If dired-shrink-to-fit is t, make its window fit its contents. 2781 ;; If dired-shrink-to-fit is t, make its window fit its contents.
2781 (when dired-shrink-to-fit 2782 (when dired-shrink-to-fit
@@ -3557,7 +3558,7 @@ Ask means pop up a menu for the user to select one of copy, move or link."
3557;;;;;; dired-run-shell-command dired-do-shell-command dired-do-async-shell-command 3558;;;;;; dired-run-shell-command dired-do-shell-command dired-do-async-shell-command
3558;;;;;; dired-clean-directory dired-do-print dired-do-touch dired-do-chown 3559;;;;;; dired-clean-directory dired-do-print dired-do-touch dired-do-chown
3559;;;;;; dired-do-chgrp dired-do-chmod dired-compare-directories dired-backup-diff 3560;;;;;; dired-do-chgrp dired-do-chmod dired-compare-directories dired-backup-diff
3560;;;;;; dired-diff) "dired-aux" "dired-aux.el" "1628b7a7d379fb4da8ae4bf29faad4b5") 3561;;;;;; dired-diff) "dired-aux" "dired-aux.el" "2e8658304f56098052e312d01c8763a2")
3561;;; Generated autoloads from dired-aux.el 3562;;; Generated autoloads from dired-aux.el
3562 3563
3563(autoload 'dired-diff "dired-aux" "\ 3564(autoload 'dired-diff "dired-aux" "\
diff --git a/lisp/files.el b/lisp/files.el
index 460b005b9ef..e89c3075397 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -2337,6 +2337,7 @@ ARC\\|ZIP\\|LZH\\|LHA\\|ZOO\\|[JEW]AR\\|XPI\\|RAR\\|7Z\\)\\'" . archive-mode)
2337 ("\\.oak\\'" . scheme-mode) 2337 ("\\.oak\\'" . scheme-mode)
2338 ("\\.sgml?\\'" . sgml-mode) 2338 ("\\.sgml?\\'" . sgml-mode)
2339 ("\\.x[ms]l\\'" . xml-mode) 2339 ("\\.x[ms]l\\'" . xml-mode)
2340 ("\\.dbk\\'" . xml-mode)
2340 ("\\.dtd\\'" . sgml-mode) 2341 ("\\.dtd\\'" . sgml-mode)
2341 ("\\.ds\\(ss\\)?l\\'" . dsssl-mode) 2342 ("\\.ds\\(ss\\)?l\\'" . dsssl-mode)
2342 ("\\.js\\'" . js-mode) ; javascript-mode would be better 2343 ("\\.js\\'" . js-mode) ; javascript-mode would be better
@@ -4167,11 +4168,29 @@ on a DOS/Windows machine, it returns FILENAME in expanded form."
4167 (dremote (file-remote-p directory))) 4168 (dremote (file-remote-p directory)))
4168 (if ;; Conditions for separate trees 4169 (if ;; Conditions for separate trees
4169 (or 4170 (or
4170 ;; Test for different drives on DOS/Windows 4171 ;; Test for different filesystems on DOS/Windows
4171 (and 4172 (and
4172 ;; Should `cygwin' really be included here? --stef 4173 ;; Should `cygwin' really be included here? --stef
4173 (memq system-type '(ms-dos cygwin windows-nt)) 4174 (memq system-type '(ms-dos cygwin windows-nt))
4174 (not (eq t (compare-strings filename 0 2 directory 0 2)))) 4175 (or
4176 ;; Test for different drive letters
4177 (not (eq t (compare-strings filename 0 2 directory 0 2)))
4178 ;; Test for UNCs on different servers
4179 (not (eq t (compare-strings
4180 (progn
4181 (if (string-match "\\`//\\([^:/]+\\)/" filename)
4182 (match-string 1 filename)
4183 ;; Windows file names cannot have ? in
4184 ;; them, so use that to detect when
4185 ;; neither FILENAME nor DIRECTORY is a
4186 ;; UNC.
4187 "?"))
4188 0 nil
4189 (progn
4190 (if (string-match "\\`//\\([^:/]+\\)/" directory)
4191 (match-string 1 directory)
4192 "?"))
4193 0 nil t)))))
4175 ;; Test for different remote file system identification 4194 ;; Test for different remote file system identification
4176 (not (equal fremote dremote))) 4195 (not (equal fremote dremote)))
4177 filename 4196 filename
diff --git a/lisp/format.el b/lisp/format.el
index 0436187d984..b4277ef6df0 100644
--- a/lisp/format.el
+++ b/lisp/format.el
@@ -181,8 +181,7 @@ it should be a Lisp function. Decoding is done for the given BUFFER."
181 ;; We should perhaps go via a temporary buffer and copy it 181 ;; We should perhaps go via a temporary buffer and copy it
182 ;; back, in case of errors. 182 ;; back, in case of errors.
183 (if (and (zerop (save-window-excursion 183 (if (and (zerop (save-window-excursion
184 (shell-command-on-region (point-min) (point-max) 184 (shell-command-on-region from to method t t
185 method t t
186 error-buff))) 185 error-buff)))
187 ;; gzip gives zero exit status with bad args, for instance. 186 ;; gzip gives zero exit status with bad args, for instance.
188 (zerop (with-current-buffer error-buff 187 (zerop (with-current-buffer error-buff
diff --git a/lisp/frame.el b/lisp/frame.el
index b133851b440..969a02debe9 100644
--- a/lisp/frame.el
+++ b/lisp/frame.el
@@ -1545,7 +1545,7 @@ cursor display. On a text-only terminal, this is not implemented."
1545 :init-value (not (or noninteractive 1545 :init-value (not (or noninteractive
1546 no-blinking-cursor 1546 no-blinking-cursor
1547 (eq system-type 'ms-dos) 1547 (eq system-type 'ms-dos)
1548 (not (memq window-system '(x w32))))) 1548 (not (memq window-system '(x w32 ns)))))
1549 :initialize 'custom-initialize-delay 1549 :initialize 'custom-initialize-delay
1550 :group 'cursor 1550 :group 'cursor
1551 :global t 1551 :global t
diff --git a/lisp/ido.el b/lisp/ido.el
index 2df9b8666af..306485de1ad 100644
--- a/lisp/ido.el
+++ b/lisp/ido.el
@@ -1467,6 +1467,11 @@ Removes badly formatted data and ignored directories."
1467 ;; ido kill emacs hook 1467 ;; ido kill emacs hook
1468 (ido-save-history)) 1468 (ido-save-history))
1469 1469
1470(defun ido-common-initialization ()
1471 (ido-init-completion-maps)
1472 (add-hook 'minibuffer-setup-hook 'ido-minibuffer-setup)
1473 (add-hook 'choose-completion-string-functions 'ido-choose-completion-string))
1474
1470(define-minor-mode ido-everywhere 1475(define-minor-mode ido-everywhere
1471 "Toggle using ido speed-ups everywhere file and directory names are read. 1476 "Toggle using ido speed-ups everywhere file and directory names are read.
1472With ARG, turn ido speed-up on if arg is positive, off otherwise." 1477With ARG, turn ido speed-up on if arg is positive, off otherwise."
@@ -1510,12 +1515,9 @@ This function also adds a hook to the minibuffer."
1510 (t nil))) 1515 (t nil)))
1511 1516
1512 (ido-everywhere (if ido-everywhere 1 -1)) 1517 (ido-everywhere (if ido-everywhere 1 -1))
1513 (when ido-mode
1514 (ido-init-completion-maps))
1515 1518
1516 (when ido-mode 1519 (when ido-mode
1517 (add-hook 'minibuffer-setup-hook 'ido-minibuffer-setup) 1520 (ido-common-initialization)
1518 (add-hook 'choose-completion-string-functions 'ido-choose-completion-string)
1519 (ido-load-history) 1521 (ido-load-history)
1520 1522
1521 (add-hook 'kill-emacs-hook 'ido-kill-emacs-hook) 1523 (add-hook 'kill-emacs-hook 'ido-kill-emacs-hook)
@@ -4759,6 +4761,8 @@ DEF, if non-nil, is the default value."
4759 (ido-directory-too-big nil) 4761 (ido-directory-too-big nil)
4760 (ido-context-switch-command 'ignore) 4762 (ido-context-switch-command 'ignore)
4761 (ido-choice-list choices)) 4763 (ido-choice-list choices))
4764 ;; Initialize ido before invoking ido-read-internal
4765 (ido-common-initialization)
4762 (ido-read-internal 'list prompt hist def require-match initial-input))) 4766 (ido-read-internal 'list prompt hist def require-match initial-input)))
4763 4767
4764(defun ido-unload-function () 4768(defun ido-unload-function ()
diff --git a/lisp/image-dired.el b/lisp/image-dired.el
index a74ddd312d5..565448c854e 100644
--- a/lisp/image-dired.el
+++ b/lisp/image-dired.el
@@ -187,19 +187,19 @@ that allows sharing of thumbnails across different programs."
187 :group 'image-dired) 187 :group 'image-dired)
188 188
189(defcustom image-dired-db-file 189(defcustom image-dired-db-file
190 (locate-user-emacs-file "image-dired/.image-dired_db") 190 (expand-file-name ".image-dired_db" image-dired-dir)
191 "Database file where file names and their associated tags are stored." 191 "Database file where file names and their associated tags are stored."
192 :type 'string 192 :type 'string
193 :group 'image-dired) 193 :group 'image-dired)
194 194
195(defcustom image-dired-temp-image-file 195(defcustom image-dired-temp-image-file
196 (locate-user-emacs-file "image-dired/.image-dired_temp") 196 (expand-file-name ".image-dired_temp" image-dired-dir)
197 "Name of temporary image file used by various commands." 197 "Name of temporary image file used by various commands."
198 :type 'string 198 :type 'string
199 :group 'image-dired) 199 :group 'image-dired)
200 200
201(defcustom image-dired-gallery-dir 201(defcustom image-dired-gallery-dir
202 (locate-user-emacs-file "image-dired/.image-dired_gallery") 202 (expand-file-name ".image-dired_gallery" image-dired-dir)
203 "Directory to store generated gallery html pages. 203 "Directory to store generated gallery html pages.
204This path needs to be \"shared\" to the public so that it can access 204This path needs to be \"shared\" to the public so that it can access
205the index.html page that image-dired creates." 205the index.html page that image-dired creates."
@@ -344,7 +344,7 @@ original image file name and %t which is replaced by
344 :group 'image-dired) 344 :group 'image-dired)
345 345
346(defcustom image-dired-temp-rotate-image-file 346(defcustom image-dired-temp-rotate-image-file
347 (locate-user-emacs-file "image-dired/.image-dired_rotate_temp") 347 (expand-file-name ".image-dired_rotate_temp" image-dired-dir)
348 "Temporary file for rotate operations." 348 "Temporary file for rotate operations."
349 :type 'string 349 :type 'string
350 :group 'image-dired) 350 :group 'image-dired)
diff --git a/lisp/mail/rmail.el b/lisp/mail/rmail.el
index ffb52683bd7..139b7cf926a 100644
--- a/lisp/mail/rmail.el
+++ b/lisp/mail/rmail.el
@@ -4289,7 +4289,7 @@ With prefix argument N moves forward N messages with these labels.
4289 4289
4290;;;*** 4290;;;***
4291 4291
4292;;;### (autoloads (rmail-mime) "rmailmm" "rmailmm.el" "ec0bed149baed671125f623e5b012f6f") 4292;;;### (autoloads (rmail-mime) "rmailmm" "rmailmm.el" "b1ce015fd919b54cc7b1d0b2155489f9")
4293;;; Generated autoloads from rmailmm.el 4293;;; Generated autoloads from rmailmm.el
4294 4294
4295(autoload 'rmail-mime "rmailmm" "\ 4295(autoload 'rmail-mime "rmailmm" "\
@@ -4380,7 +4380,7 @@ If prefix argument REVERSE is non-nil, sorts in reverse order.
4380 4380
4381;;;### (autoloads (rmail-summary-by-senders rmail-summary-by-topic 4381;;;### (autoloads (rmail-summary-by-senders rmail-summary-by-topic
4382;;;;;; rmail-summary-by-regexp rmail-summary-by-recipients rmail-summary-by-labels 4382;;;;;; rmail-summary-by-regexp rmail-summary-by-recipients rmail-summary-by-labels
4383;;;;;; rmail-summary) "rmailsum" "rmailsum.el" "666a5db1021cdcba6e68a18a553d65f1") 4383;;;;;; rmail-summary) "rmailsum" "rmailsum.el" "d855683972baef7111d4508dffbb54b6")
4384;;; Generated autoloads from rmailsum.el 4384;;; Generated autoloads from rmailsum.el
4385 4385
4386(autoload 'rmail-summary "rmailsum" "\ 4386(autoload 'rmail-summary "rmailsum" "\
diff --git a/lisp/mail/rmailmm.el b/lisp/mail/rmailmm.el
index 918d2dfc365..708ec64706e 100644
--- a/lisp/mail/rmailmm.el
+++ b/lisp/mail/rmailmm.el
@@ -691,7 +691,9 @@ modified."
691The value is a MIME-entiy object (see `rmail-mime-enty-new')." 691The value is a MIME-entiy object (see `rmail-mime-enty-new')."
692 (save-excursion 692 (save-excursion
693 (goto-char (point-min)) 693 (goto-char (point-min))
694 (rmail-mime-process nil t))) 694 (condition-case nil
695 (rmail-mime-process nil t)
696 (error nil))))
695 697
696(defun rmail-mime-insert (entity &optional content-type disposition) 698(defun rmail-mime-insert (entity &optional content-type disposition)
697 "Insert a MIME-entity ENTITY in the current buffer. 699 "Insert a MIME-entity ENTITY in the current buffer.
@@ -744,30 +746,31 @@ attachments as specfied by `rmail-mime-attachment-dirs-alist'."
744 message type disposition encoding)) 746 message type disposition encoding))
745 747
746(defun rmail-show-mime () 748(defun rmail-show-mime ()
747 (let ((mbox-buf rmail-buffer)) 749 "Function to set in `rmail-show-mime-function' (which see)."
748 (condition-case nil 750 (let ((mbox-buf rmail-buffer)
749 (let ((entity (rmail-mime-parse))) 751 (entity (rmail-mime-parse)))
750 (with-current-buffer rmail-view-buffer 752 (if entity
751 (let ((inhibit-read-only t) 753 (with-current-buffer rmail-view-buffer
752 (rmail-buffer mbox-buf)) 754 (let ((inhibit-read-only t)
753 (erase-buffer) 755 (rmail-buffer mbox-buf))
754 (rmail-mime-insert entity)))) 756 (erase-buffer)
755 (error 757 (rmail-mime-insert entity)))
756 ;; Decoding failed. Insert the original message body as is. 758 ;; Decoding failed. Insert the original message body as is.
757 (let ((region (with-current-buffer mbox-buf 759 (let ((region (with-current-buffer mbox-buf
758 (goto-char (point-min)) 760 (goto-char (point-min))
759 (re-search-forward "^$" nil t) 761 (re-search-forward "^$" nil t)
760 (forward-line 1) 762 (forward-line 1)
761 (cons (point) (point-max))))) 763 (cons (point) (point-max)))))
762 (with-current-buffer rmail-view-buffer 764 (with-current-buffer rmail-view-buffer
763 (let ((inhibit-read-only t)) 765 (let ((inhibit-read-only t))
764 (erase-buffer) 766 (erase-buffer)
765 (insert-buffer-substring mbox-buf (car region) (cdr region)))) 767 (insert-buffer-substring mbox-buf (car region) (cdr region))))
766 (message "MIME decoding failed")))))) 768 (message "MIME decoding failed")))))
767 769
768(setq rmail-show-mime-function 'rmail-show-mime) 770(setq rmail-show-mime-function 'rmail-show-mime)
769 771
770(defun rmail-insert-mime-forwarded-message (forward-buffer) 772(defun rmail-insert-mime-forwarded-message (forward-buffer)
773 "Function to set in `rmail-insert-mime-forwarded-message-function' (which see)."
771 (let ((mbox-buf (with-current-buffer forward-buffer rmail-view-buffer))) 774 (let ((mbox-buf (with-current-buffer forward-buffer rmail-view-buffer)))
772 (save-restriction 775 (save-restriction
773 (narrow-to-region (point) (point)) 776 (narrow-to-region (point) (point))
@@ -777,6 +780,7 @@ attachments as specfied by `rmail-mime-attachment-dirs-alist'."
777 'rmail-insert-mime-forwarded-message) 780 'rmail-insert-mime-forwarded-message)
778 781
779(defun rmail-insert-mime-resent-message (forward-buffer) 782(defun rmail-insert-mime-resent-message (forward-buffer)
783 "Function to set in `rmail-insert-mime-resent-message-function' (which see)."
780 (insert-buffer-substring 784 (insert-buffer-substring
781 (with-current-buffer forward-buffer rmail-view-buffer)) 785 (with-current-buffer forward-buffer rmail-view-buffer))
782 (goto-char (point-min)) 786 (goto-char (point-min))
@@ -787,6 +791,41 @@ attachments as specfied by `rmail-mime-attachment-dirs-alist'."
787(setq rmail-insert-mime-resent-message-function 791(setq rmail-insert-mime-resent-message-function
788 'rmail-insert-mime-resent-message) 792 'rmail-insert-mime-resent-message)
789 793
794(defun rmail-search-mime-message (msg regexp)
795 "Function to set in `rmail-search-mime-message-function' (which see)."
796 (save-restriction
797 (narrow-to-region (rmail-msgbeg msg) (rmail-msgend msg))
798 (let ((mbox-buf (current-buffer))
799 (header-end (save-excursion
800 (re-search-forward "^$" nil 'move) (point)))
801 (body-end (point-max))
802 (entity (rmail-mime-parse)))
803 (or
804 ;; At first, just search the headers.
805 (with-temp-buffer
806 (insert-buffer-substring mbox-buf nil header-end)
807 (rfc2047-decode-region (point-min) (point))
808 (goto-char (point-min))
809 (re-search-forward regexp nil t))
810 ;; Next, search the body.
811 (if (and entity
812 (let* ((content-type (rmail-mime-entity-type entity))
813 (charset (cdr (assq 'charset (cdr content-type)))))
814 (or (not (string-match "text/.*" (car content-type)))
815 (and charset
816 (not (string= (downcase charset) "us-ascii"))))))
817 ;; Search the decoded MIME message.
818 (with-temp-buffer
819 (let ((rmail-buffer mbox-buf))
820 (rmail-mime-insert entity))
821 (goto-char (point-min))
822 (re-search-forward regexp nil t))
823 ;; Search the body without decoding.
824 (goto-char header-end)
825 (re-search-forward regexp nil t))))))
826
827(setq rmail-search-mime-message-function 'rmail-search-mime-message)
828
790(provide 'rmailmm) 829(provide 'rmailmm)
791 830
792;; Local Variables: 831;; Local Variables:
diff --git a/lisp/mail/smtpmail.el b/lisp/mail/smtpmail.el
index 4e76de60188..62bfbb740c4 100644
--- a/lisp/mail/smtpmail.el
+++ b/lisp/mail/smtpmail.el
@@ -1007,5 +1007,4 @@ many continuation lines."
1007 1007
1008(provide 'smtpmail) 1008(provide 'smtpmail)
1009 1009
1010;; arch-tag: a76992df-6d71-43b7-9e72-4bacc6c05466
1011;;; smtpmail.el ends here 1010;;; smtpmail.el ends here
diff --git a/lisp/mouse.el b/lisp/mouse.el
index 40e0c14c064..aa5dadf84ff 100644
--- a/lisp/mouse.el
+++ b/lisp/mouse.el
@@ -185,6 +185,7 @@ items `Turn Off' and `Help'."
185 (minor-mode-menu-from-indicator indicator))) 185 (minor-mode-menu-from-indicator indicator)))
186 186
187(defun mouse-menu-major-mode-map () 187(defun mouse-menu-major-mode-map ()
188 (run-hooks 'activate-menubar-hook 'menu-bar-update-hook)
188 (let* (;; Keymap from which to inherit; may be null. 189 (let* (;; Keymap from which to inherit; may be null.
189 (ancestor (mouse-menu-non-singleton 190 (ancestor (mouse-menu-non-singleton
190 (and (current-local-map) 191 (and (current-local-map)
@@ -217,6 +218,7 @@ Otherwise return the whole menu."
217 "Return a keymap equivalent to the menu bar. 218 "Return a keymap equivalent to the menu bar.
218The contents are the items that would be in the menu bar whether or 219The contents are the items that would be in the menu bar whether or
219not it is actually displayed." 220not it is actually displayed."
221 (run-hooks 'activate-menubar-hook 'menu-bar-update-hook)
220 (let* ((local-menu (and (current-local-map) 222 (let* ((local-menu (and (current-local-map)
221 (lookup-key (current-local-map) [menu-bar]))) 223 (lookup-key (current-local-map) [menu-bar])))
222 (global-menu (lookup-key global-map [menu-bar])) 224 (global-menu (lookup-key global-map [menu-bar]))
@@ -2130,5 +2132,4 @@ choose a font."
2130 2132
2131(provide 'mouse) 2133(provide 'mouse)
2132 2134
2133;; arch-tag: 9a710ce1-914a-4923-9b81-697f7bf82ab3
2134;;; mouse.el ends here 2135;;; mouse.el ends here
diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el
index 1501868a6b5..92f6c2a0335 100644
--- a/lisp/net/tramp-sh.el
+++ b/lisp/net/tramp-sh.el
@@ -2637,61 +2637,65 @@ the result will be a local, non-Tramp, filename."
2637(defun tramp-sh-handle-start-file-process (name buffer program &rest args) 2637(defun tramp-sh-handle-start-file-process (name buffer program &rest args)
2638 "Like `start-file-process' for Tramp files." 2638 "Like `start-file-process' for Tramp files."
2639 (with-parsed-tramp-file-name default-directory nil 2639 (with-parsed-tramp-file-name default-directory nil
2640 (unwind-protect 2640 ;; When PROGRAM is nil, we just provide a tty.
2641 ;; When PROGRAM is nil, we just provide a tty. 2641 (let ((command
2642 (let ((command 2642 (when (stringp program)
2643 (when (stringp program) 2643 (format "cd %s; exec %s"
2644 (format "cd %s; exec %s" 2644 (tramp-shell-quote-argument localname)
2645 (tramp-shell-quote-argument localname) 2645 (mapconcat 'tramp-shell-quote-argument
2646 (mapconcat 'tramp-shell-quote-argument 2646 (cons program args) " "))))
2647 (cons program args) " ")))) 2647 (tramp-process-connection-type
2648 (tramp-process-connection-type 2648 (or (null program) tramp-process-connection-type))
2649 (or (null program) tramp-process-connection-type)) 2649 (bmp (and (buffer-live-p buffer) (buffer-modified-p buffer)))
2650 (name1 name) 2650 (name1 name)
2651 (i 0)) 2651 (i 0))
2652 (unless buffer 2652 (unwind-protect
2653 ;; BUFFER can be nil. We use a temporary buffer. 2653 (save-excursion
2654 (setq buffer (generate-new-buffer tramp-temp-buffer-name))) 2654 (save-restriction
2655 (while (get-process name1) 2655 (unless buffer
2656 ;; NAME must be unique as process name. 2656 ;; BUFFER can be nil. We use a temporary buffer.
2657 (setq i (1+ i) 2657 (setq buffer (generate-new-buffer tramp-temp-buffer-name)))
2658 name1 (format "%s<%d>" name i))) 2658 (while (get-process name1)
2659 (setq name name1) 2659 ;; NAME must be unique as process name.
2660 ;; Set the new process properties. 2660 (setq i (1+ i)
2661 (tramp-set-connection-property v "process-name" name) 2661 name1 (format "%s<%d>" name i)))
2662 (tramp-set-connection-property v "process-buffer" buffer) 2662 (setq name name1)
2663 ;; Activate narrowing in order to save BUFFER contents. 2663 ;; Set the new process properties.
2664 ;; Clear also the modification time; otherwise we might be 2664 (tramp-set-connection-property v "process-name" name)
2665 ;; interrupted by `verify-visited-file-modtime'. 2665 (tramp-set-connection-property v "process-buffer" buffer)
2666 (with-current-buffer (tramp-get-connection-buffer v) 2666 ;; Activate narrowing in order to save BUFFER contents.
2667 (clear-visited-file-modtime) 2667 ;; Clear also the modification time; otherwise we might
2668 (narrow-to-region (point-max) (point-max))) 2668 ;; be interrupted by `verify-visited-file-modtime'.
2669 (if command 2669 (with-current-buffer (tramp-get-connection-buffer v)
2670 ;; Send the command. 2670 (let ((buffer-undo-list t))
2671 (tramp-send-command v command nil t) ; nooutput 2671 (clear-visited-file-modtime)
2672 ;; Check, whether a pty is associated. 2672 (narrow-to-region (point-max) (point-max))
2673 (tramp-maybe-open-connection v) 2673 (if command
2674 (unless (tramp-compat-process-get 2674 ;; Send the command.
2675 (tramp-get-connection-process v) 'remote-tty) 2675 (tramp-send-command v command nil t) ; nooutput
2676 (tramp-error 2676 ;; Check, whether a pty is associated.
2677 v 'file-error "pty association is not supported for `%s'" name))) 2677 (tramp-maybe-open-connection v)
2678 (let ((p (tramp-get-connection-process v))) 2678 (unless (tramp-compat-process-get
2679 ;; Set sentinel and query flag for this process. 2679 (tramp-get-connection-process v) 'remote-tty)
2680 (tramp-set-connection-property p "vector" v) 2680 (tramp-error
2681 (set-process-sentinel p 'tramp-process-sentinel) 2681 v 'file-error
2682 (tramp-compat-set-process-query-on-exit-flag p t) 2682 "pty association is not supported for `%s'" name)))))
2683 ;; Return process. 2683 (let ((p (tramp-get-connection-process v)))
2684 p)) 2684 ;; Set sentinel and query flag for this process.
2685 ;; Save exit. 2685 (tramp-set-connection-property p "vector" v)
2686 (with-current-buffer (tramp-get-connection-buffer v) 2686 (set-process-sentinel p 'tramp-process-sentinel)
2687 (if (string-match tramp-temp-buffer-name (buffer-name)) 2687 (tramp-compat-set-process-query-on-exit-flag p t)
2688 (progn 2688 ;; Return process.
2689 (set-process-buffer (tramp-get-connection-process v) nil) 2689 p)))
2690 (kill-buffer (current-buffer))) 2690 ;; Save exit.
2691 (widen) 2691 (with-current-buffer (tramp-get-connection-buffer v)
2692 (goto-char (point-max)))) 2692 (if (string-match tramp-temp-buffer-name (buffer-name))
2693 (tramp-set-connection-property v "process-name" nil) 2693 (progn
2694 (tramp-set-connection-property v "process-buffer" nil)))) 2694 (set-process-buffer (tramp-get-connection-process v) nil)
2695 (kill-buffer (current-buffer)))
2696 (set-buffer-modified-p bmp)))
2697 (tramp-set-connection-property v "process-name" nil)
2698 (tramp-set-connection-property v "process-buffer" nil)))))
2695 2699
2696(defun tramp-sh-handle-process-file 2700(defun tramp-sh-handle-process-file
2697 (program &optional infile destination display &rest args) 2701 (program &optional infile destination display &rest args)
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el
index f7d3b81039e..abcb6ae7d77 100644
--- a/lisp/net/tramp.el
+++ b/lisp/net/tramp.el
@@ -3077,26 +3077,27 @@ The terminal type can be configured with `tramp-terminal-type'."
3077 (tramp-compat-with-temp-message "" 3077 (tramp-compat-with-temp-message ""
3078 ;; Enable auth-source and password-cache. 3078 ;; Enable auth-source and password-cache.
3079 (tramp-set-connection-property vec "first-password-request" t) 3079 (tramp-set-connection-property vec "first-password-request" t)
3080 (let (exit) 3080 (save-restriction
3081 (while (not exit) 3081 (let (exit)
3082 (tramp-message proc 3 "Waiting for prompts from remote shell") 3082 (while (not exit)
3083 (setq exit 3083 (tramp-message proc 3 "Waiting for prompts from remote shell")
3084 (catch 'tramp-action 3084 (setq exit
3085 (if timeout 3085 (catch 'tramp-action
3086 (with-timeout (timeout) 3086 (if timeout
3087 (tramp-process-one-action proc vec actions)) 3087 (with-timeout (timeout)
3088 (tramp-process-one-action proc vec actions))))) 3088 (tramp-process-one-action proc vec actions))
3089 (with-current-buffer (tramp-get-connection-buffer vec) 3089 (tramp-process-one-action proc vec actions)))))
3090 (widen) 3090 (with-current-buffer (tramp-get-connection-buffer vec)
3091 (tramp-message vec 6 "\n%s" (buffer-string))) 3091 (widen)
3092 (unless (eq exit 'ok) 3092 (tramp-message vec 6 "\n%s" (buffer-string)))
3093 (tramp-clear-passwd vec) 3093 (unless (eq exit 'ok)
3094 (tramp-error-with-buffer 3094 (tramp-clear-passwd vec)
3095 nil vec 'file-error 3095 (tramp-error-with-buffer
3096 (cond 3096 nil vec 'file-error
3097 ((eq exit 'permission-denied) "Permission denied") 3097 (cond
3098 ((eq exit 'process-died) "Process died") 3098 ((eq exit 'permission-denied) "Permission denied")
3099 (t "Login failed"))))))) 3099 ((eq exit 'process-died) "Process died")
3100 (t "Login failed"))))))))
3100 3101
3101:;; Utility functions: 3102:;; Utility functions:
3102 3103
diff --git a/lisp/ps-print.el b/lisp/ps-print.el
index 885fe68be26..4e13ae07624 100644
--- a/lisp/ps-print.el
+++ b/lisp/ps-print.el
@@ -4328,14 +4328,17 @@ Try: pr -t file | awk '{printf \"%3d %s\n\", length($0), $0}' | sort -r | head"
4328 (ps-header-font-size-internal 4328 (ps-header-font-size-internal
4329 (or ps-header-font-size-internal 4329 (or ps-header-font-size-internal
4330 (ps-get-font-size 'ps-header-font-size))) 4330 (ps-get-font-size 'ps-header-font-size)))
4331 (ps-footer-font-size-internal
4332 (or ps-footer-font-size-internal
4333 (ps-get-font-size 'ps-footer-font-size)))
4331 (ps-header-title-font-size-internal 4334 (ps-header-title-font-size-internal
4332 (or ps-header-title-font-size-internal 4335 (or ps-header-title-font-size-internal
4333 (ps-get-font-size 'ps-header-title-font-size))) 4336 (ps-get-font-size 'ps-header-title-font-size)))
4334 (buf (get-buffer-create "*Line-lengths*")) 4337 (buf (get-buffer-create "*Line-lengths*"))
4335 (ifs ps-font-size-internal) ; initial font size 4338 (ifs ps-font-size-internal) ; initial font size
4336 (icw (ps-avg-char-width 'ps-font-for-text)) ; initial character width
4337 (print-width (progn (ps-get-page-dimensions) 4339 (print-width (progn (ps-get-page-dimensions)
4338 ps-print-width)) 4340 ps-print-width))
4341 (icw (ps-avg-char-width 'ps-font-for-text)) ; initial character width
4339 (ps-setup (ps-setup)) ; setup for the current buffer 4342 (ps-setup (ps-setup)) ; setup for the current buffer
4340 (fs-min 5) ; minimum font size 4343 (fs-min 5) ; minimum font size
4341 cw-min ; minimum character width 4344 cw-min ; minimum character width
@@ -4375,6 +4378,9 @@ and on the current ps-print setup."
4375 (ps-header-font-size-internal 4378 (ps-header-font-size-internal
4376 (or ps-header-font-size-internal 4379 (or ps-header-font-size-internal
4377 (ps-get-font-size 'ps-header-font-size))) 4380 (ps-get-font-size 'ps-header-font-size)))
4381 (ps-footer-font-size-internal
4382 (or ps-footer-font-size-internal
4383 (ps-get-font-size 'ps-footer-font-size)))
4378 (ps-header-title-font-size-internal 4384 (ps-header-title-font-size-internal
4379 (or ps-header-title-font-size-internal 4385 (or ps-header-title-font-size-internal
4380 (ps-get-font-size 'ps-header-title-font-size))) 4386 (ps-get-font-size 'ps-header-title-font-size)))
@@ -4384,9 +4390,9 @@ and on the current ps-print setup."
4384 (buf (get-buffer-create "*Nb-Pages*")) 4390 (buf (get-buffer-create "*Nb-Pages*"))
4385 (ils ps-line-spacing-internal) ; initial line spacing 4391 (ils ps-line-spacing-internal) ; initial line spacing
4386 (ifs ps-font-size-internal) ; initial font size 4392 (ifs ps-font-size-internal) ; initial font size
4387 (ilh (ps-line-height 'ps-font-for-text)) ; initial line height
4388 (page-height (progn (ps-get-page-dimensions) 4393 (page-height (progn (ps-get-page-dimensions)
4389 ps-print-height)) 4394 ps-print-height))
4395 (ilh (ps-line-height 'ps-font-for-text)) ; initial line height
4390 (ps-setup (ps-setup)) ; setup for the current buffer 4396 (ps-setup (ps-setup)) ; setup for the current buffer
4391 (fs-min 4) ; minimum font size 4397 (fs-min 4) ; minimum font size
4392 lh-min ; minimum line height 4398 lh-min ; minimum line height
diff --git a/lisp/subr.el b/lisp/subr.el
index ff65997c68c..8a7ef7069c2 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -417,7 +417,7 @@ Unibyte strings are converted to multibyte for comparison."
417 (assoc-string key alist nil)) 417 (assoc-string key alist nil))
418 418
419(defun member-ignore-case (elt list) 419(defun member-ignore-case (elt list)
420 "Like `member', but ignores differences in case and text representation. 420 "Like `member', but ignore differences in case and text representation.
421ELT must be a string. Upper-case and lower-case letters are treated as equal. 421ELT must be a string. Upper-case and lower-case letters are treated as equal.
422Unibyte strings are converted to multibyte for comparison. 422Unibyte strings are converted to multibyte for comparison.
423Non-strings in LIST are ignored." 423Non-strings in LIST are ignored."
@@ -915,8 +915,9 @@ Select the corresponding window as well."
915 915
916(defsubst posn-x-y (position) 916(defsubst posn-x-y (position)
917 "Return the x and y coordinates in POSITION. 917 "Return the x and y coordinates in POSITION.
918POSITION should be a list of the form returned by the `event-start' 918The return value has the form (X . Y), where X and Y are given in
919and `event-end' functions." 919pixels. POSITION should be a list of the form returned by
920`event-start' and `event-end'."
920 (nth 2 position)) 921 (nth 2 position))
921 922
922(declare-function scroll-bar-scale "scroll-bar" (num-denom whole)) 923(declare-function scroll-bar-scale "scroll-bar" (num-denom whole))
@@ -955,7 +956,9 @@ and `event-end' functions."
955 (setq spacing 0))) 956 (setq spacing 0)))
956 (cons (/ (car pair) (frame-char-width frame)) 957 (cons (/ (car pair) (frame-char-width frame))
957 (- (/ (cdr pair) (+ (frame-char-height frame) spacing)) 958 (- (/ (cdr pair) (+ (frame-char-height frame) spacing))
958 (if (null header-line-format) 0 1)))))))) 959 (if (null (with-current-buffer (window-buffer window)
960 header-line-format))
961 0 1))))))))
959 962
960(defun posn-actual-col-row (position) 963(defun posn-actual-col-row (position)
961 "Return the actual column and row in POSITION, measured in characters. 964 "Return the actual column and row in POSITION, measured in characters.
@@ -996,14 +999,15 @@ and `event-end' functions."
996 999
997(defsubst posn-object-x-y (position) 1000(defsubst posn-object-x-y (position)
998 "Return the x and y coordinates relative to the object of POSITION. 1001 "Return the x and y coordinates relative to the object of POSITION.
999POSITION should be a list of the form returned by the `event-start' 1002The return value has the form (DX . DY), where DX and DY are
1000and `event-end' functions." 1003given in pixels. POSITION should be a list of the form returned
1004by `event-start' and `event-end'."
1001 (nth 8 position)) 1005 (nth 8 position))
1002 1006
1003(defsubst posn-object-width-height (position) 1007(defsubst posn-object-width-height (position)
1004 "Return the pixel width and height of the object of POSITION. 1008 "Return the pixel width and height of the object of POSITION.
1005POSITION should be a list of the form returned by the `event-start' 1009The return value has the form (WIDTH . HEIGHT). POSITION should
1006and `event-end' functions." 1010be a list of the form returned by `event-start' and `event-end'."
1007 (nth 9 position)) 1011 (nth 9 position))
1008 1012
1009 1013
@@ -1355,9 +1359,8 @@ if it is empty or a duplicate."
1355 1359
1356(defun run-mode-hooks (&rest hooks) 1360(defun run-mode-hooks (&rest hooks)
1357 "Run mode hooks `delayed-mode-hooks' and HOOKS, or delay HOOKS. 1361 "Run mode hooks `delayed-mode-hooks' and HOOKS, or delay HOOKS.
1358Execution is delayed if `delay-mode-hooks' is non-nil. 1362Execution is delayed if the variable `delay-mode-hooks' is non-nil.
1359If `delay-mode-hooks' is nil, run `after-change-major-mode-hook' 1363Otherwise, runs the mode hooks and then `after-change-major-mode-hook'.
1360after running the mode hooks.
1361Major mode functions should use this instead of `run-hooks' when running their 1364Major mode functions should use this instead of `run-hooks' when running their
1362FOO-mode-hook." 1365FOO-mode-hook."
1363 (if delay-mode-hooks 1366 (if delay-mode-hooks
@@ -2458,7 +2461,7 @@ If PARAM is present and non-nil, it replaces STRING as the object
2458 `yank-rectangle', PARAM may be a list of strings to insert as a 2461 `yank-rectangle', PARAM may be a list of strings to insert as a
2459 rectangle. 2462 rectangle.
2460If NOEXCLUDE is present and non-nil, the normal removal of the 2463If NOEXCLUDE is present and non-nil, the normal removal of the
2461 yank-excluded-properties is not performed; instead FUNCTION is 2464 `yank-excluded-properties' is not performed; instead FUNCTION is
2462 responsible for removing those properties. This may be necessary 2465 responsible for removing those properties. This may be necessary
2463 if FUNCTION adjusts point before or after inserting the object. 2466 if FUNCTION adjusts point before or after inserting the object.
2464If UNDO is present and non-nil, it is a function that will be called 2467If UNDO is present and non-nil, it is a function that will be called
@@ -3818,9 +3821,9 @@ which is higher than \"1alpha\"."
3818 3821
3819;; The following statement ought to be in print.c, but `provide' can't 3822;; The following statement ought to be in print.c, but `provide' can't
3820;; be used there. 3823;; be used there.
3824;; http://lists.gnu.org/archive/html/emacs-devel/2009-08/msg00236.html
3821(when (hash-table-p (car (read-from-string 3825(when (hash-table-p (car (read-from-string
3822 (prin1-to-string (make-hash-table))))) 3826 (prin1-to-string (make-hash-table)))))
3823 (provide 'hashtable-print-readable)) 3827 (provide 'hashtable-print-readable))
3824 3828
3825;; arch-tag: f7e0e6e5-70aa-4897-ae72-7a3511ec40bc
3826;;; subr.el ends here 3829;;; subr.el ends here
diff --git a/lisp/url/ChangeLog b/lisp/url/ChangeLog
index 44cc511c99c..5fd96e43b6b 100644
--- a/lisp/url/ChangeLog
+++ b/lisp/url/ChangeLog
@@ -1,3 +1,8 @@
12010-12-13 Chong Yidong <cyd@stupidchicken.com>
2
3 * url-cookie.el (url-cookie-retrieve): Handle null LOCALPART.
4 Suggested by Lennart Borgman (Bug#7543).
5
12010-11-16 Lars Magne Ingebrigtsen <larsi@gnus.org> 62010-11-16 Lars Magne Ingebrigtsen <larsi@gnus.org>
2 7
3 * url-file.el (url-file-build-filename): Avoid interpreting 8 * url-file.el (url-file-build-filename): Avoid interpreting
@@ -14,8 +19,8 @@
14 19
152010-10-04 Lars Magne Ingebrigtsen <larsi@gnus.org> 202010-10-04 Lars Magne Ingebrigtsen <larsi@gnus.org>
16 21
17 * url-http.el (url-http-wait-for-headers-change-function): Protect 22 * url-http.el (url-http-wait-for-headers-change-function):
18 against url-http-response-status for degenerate documents. 23 Protect against url-http-response-status for degenerate documents.
19 (url-http-wait-for-headers-change-function): Revert previous 24 (url-http-wait-for-headers-change-function): Revert previous
20 change. It lead to really slow loads. 25 change. It lead to really slow loads.
21 26
@@ -31,7 +36,7 @@
31 36
322010-10-03 Lars Magne Ingebrigtsen <larsi@gnus.org> 372010-10-03 Lars Magne Ingebrigtsen <larsi@gnus.org>
33 38
34 * url-vars.el (url-mime-charset-string): Changed the default to 39 * url-vars.el (url-mime-charset-string): Change the default to
35 nil to avoid sending 1171 bytes of not very useful data to the 40 nil to avoid sending 1171 bytes of not very useful data to the
36 HTTP server every request. 41 HTTP server every request.
37 42
@@ -119,8 +124,8 @@
1192010-07-01 Mark A. Hershberger <mah@everybody.org> 1242010-07-01 Mark A. Hershberger <mah@everybody.org>
120 125
121 * url-http.el (url-http-create-request): Add a CRLF on the end so 126 * url-http.el (url-http-create-request): Add a CRLF on the end so
122 that POSTs with content to https urls work. See 127 that POSTs with content to https urls work.
123 <https://bugs.launchpad.net/mediawiki-el/+bug/540759> 128 See <https://bugs.launchpad.net/mediawiki-el/+bug/540759>
124 129
1252010-06-22 Mark A. Hershberger <mah@everybody.org> 1302010-06-22 Mark A. Hershberger <mah@everybody.org>
126 131
@@ -602,8 +607,8 @@
602 * url-http.el (url-http-proxy): New variable. 607 * url-http.el (url-http-proxy): New variable.
603 (url-http-create-request): Use it. Don't use `url-proxy-object'. 608 (url-http-create-request): Use it. Don't use `url-proxy-object'.
604 (url-http): Treat `url' argument as resource to download, and 609 (url-http): Treat `url' argument as resource to download, and
605 dynamic variable `url-using-proxy' as proxy to use. Set 610 dynamic variable `url-using-proxy' as proxy to use.
606 `url-current-object' to actual URL, and `url-http-proxy' to proxy 611 Set `url-current-object' to actual URL, and `url-http-proxy' to proxy
607 used. 612 used.
608 (url-http-handle-cookies): Assume that `url-current-object' does 613 (url-http-handle-cookies): Assume that `url-current-object' does
609 not point to the proxy used. 614 not point to the proxy used.
@@ -619,24 +624,24 @@
619 (url-proxy): Bind it instead of `proxy-object'. 624 (url-proxy): Bind it instead of `proxy-object'.
620 625
621 * url-http.el (url-http-create-request): Remove url argument, use 626 * url-http.el (url-http-create-request): Remove url argument, use
622 the buffer-local variable `url-http-target-url' instead. Both 627 the buffer-local variable `url-http-target-url' instead.
623 callers updated. Simplify proxy handling. 628 Both callers updated. Simplify proxy handling.
624 (url-http): Don't make proxy-object buffer local. 629 (url-http): Don't make proxy-object buffer local.
625 630
626 * url.el (url-retrieve-internal): Bind url-proxy-object to nil. 631 * url.el (url-retrieve-internal): Bind url-proxy-object to nil.
627 632
6282006-11-26 Magnus Henoch <mange@freemail.hu> 6332006-11-26 Magnus Henoch <mange@freemail.hu>
629 634
630 * url-http.el (url-http-wait-for-headers-change-function): Use 635 * url-http.el (url-http-wait-for-headers-change-function):
631 `when' instead of `if' when possible. 636 Use `when' instead of `if' when possible.
632 (url-http): Define url-http-response-version. 637 (url-http): Define url-http-response-version.
633 (url-http-parse-response): Set it. 638 (url-http-parse-response): Set it.
634 (url-http-parse-headers): Use it to determine keep-alive behavior. 639 (url-http-parse-headers): Use it to determine keep-alive behavior.
635 640
6362006-11-23 Diane Murray <disumu@x3y2z1.net> (tiny change) 6412006-11-23 Diane Murray <disumu@x3y2z1.net> (tiny change)
637 642
638 * url-http.el (url-http-content-length-after-change-function): Use 643 * url-http.el (url-http-content-length-after-change-function):
639 `url-lazy-message'. 644 Use `url-lazy-message'.
640 645
641 * url-util.el (url-display-percentage): Only show a message if 646 * url-util.el (url-display-percentage): Only show a message if
642 `url-show-status' is non-nil. 647 `url-show-status' is non-nil.
@@ -1018,8 +1023,8 @@
1018 (url-cookie-generate-header-lines): Likewise. 1023 (url-cookie-generate-header-lines): Likewise.
1019 (url-cookie-handle-set-cookie): Likewise. 1024 (url-cookie-handle-set-cookie): Likewise.
1020 (url-cookie-create): Expect :localpart instead of :path. 1025 (url-cookie-create): Expect :localpart instead of :path.
1021 (url-cookie-localpart): Renamed from url-cookie-path. 1026 (url-cookie-localpart): Rename from url-cookie-path.
1022 (url-cookie-set-localpart): Renamed from url-cookie-set-path. 1027 (url-cookie-set-localpart): Rename from url-cookie-set-path.
1023 (url-cookie-file): Doc fix. 1028 (url-cookie-file): Doc fix.
1024 (url-cookie-p): Add doc string. 1029 (url-cookie-p): Add doc string.
1025 1030
@@ -2236,7 +2241,7 @@
2236 message when we have to contact a host so the user always gets 2241 message when we have to contact a host so the user always gets
2237 at least some feedback. 2242 at least some feedback.
2238 2243
2239 * lisp/url-expand.el (url-expander-remove-relative-links): Moved and 2244 * lisp/url-expand.el (url-expander-remove-relative-links): Move and
2240 renamed function. 2245 renamed function.
2241 (url-default-expander): Use it. 2246 (url-default-expander): Use it.
2242 2247
diff --git a/lisp/url/url-cookie.el b/lisp/url/url-cookie.el
index e056db38a98..ec0974e9d76 100644
--- a/lisp/url/url-cookie.el
+++ b/lisp/url/url-cookie.el
@@ -198,7 +198,7 @@ telling Microsoft that."
198 (and exp (> (float-time) (float-time (date-to-time exp)))))) 198 (and exp (> (float-time) (float-time (date-to-time exp))))))
199 199
200(defun url-cookie-retrieve (host &optional localpart secure) 200(defun url-cookie-retrieve (host &optional localpart secure)
201 "Retrieve all the netscape-style cookies for a specified HOST and LOCALPART." 201 "Retrieve all cookies for a specified HOST and LOCALPART."
202 (let ((storage (if secure 202 (let ((storage (if secure
203 (append url-cookie-secure-storage url-cookie-storage) 203 (append url-cookie-secure-storage url-cookie-storage)
204 url-cookie-storage)) 204 url-cookie-storage))
@@ -226,7 +226,8 @@ telling Microsoft that."
226 (setq cur (car cookies) 226 (setq cur (car cookies)
227 cookies (cdr cookies) 227 cookies (cdr cookies)
228 localpart-match (url-cookie-localpart cur)) 228 localpart-match (url-cookie-localpart cur))
229 (if (and (if (stringp localpart-match) 229 (if (and (if (and (stringp localpart-match)
230 (stringp localpart))
230 (string-match (concat "^" (regexp-quote 231 (string-match (concat "^" (regexp-quote
231 localpart-match)) 232 localpart-match))
232 localpart) 233 localpart)
diff --git a/lisp/vc/diff-mode.el b/lisp/vc/diff-mode.el
index cec4fb24616..c16c2460e75 100644
--- a/lisp/vc/diff-mode.el
+++ b/lisp/vc/diff-mode.el
@@ -1829,10 +1829,13 @@ For use in `add-log-current-defun-function'."
1829 (eval-and-compile (require 'smerge-mode)) 1829 (eval-and-compile (require 'smerge-mode))
1830 (save-excursion 1830 (save-excursion
1831 (diff-beginning-of-hunk 'try-harder) 1831 (diff-beginning-of-hunk 'try-harder)
1832 (let* ((style (diff-hunk-style)) ;Skips the hunk header as well. 1832 (let* ((start (point))
1833 (style (diff-hunk-style)) ;Skips the hunk header as well.
1833 (beg (point)) 1834 (beg (point))
1834 (props '((diff-mode . fine) (face diff-refine-change))) 1835 (props '((diff-mode . fine) (face diff-refine-change)))
1835 (end (progn (diff-end-of-hunk) (point)))) 1836 ;; Be careful to go back to `start' so diff-end-of-hunk gets
1837 ;; to read the hunk header's line info.
1838 (end (progn (goto-char start) (diff-end-of-hunk) (point))))
1836 1839
1837 (remove-overlays beg end 'diff-mode 'fine) 1840 (remove-overlays beg end 'diff-mode 'fine)
1838 1841
diff --git a/lisp/vc/log-edit.el b/lisp/vc/log-edit.el
index 2bce58f50f2..c7f37c50011 100644
--- a/lisp/vc/log-edit.el
+++ b/lisp/vc/log-edit.el
@@ -774,7 +774,7 @@ where LOGBUFFER is the name of the ChangeLog buffer, and each
774 (setq pattern (file-name-nondirectory file))) 774 (setq pattern (file-name-nondirectory file)))
775 775
776 (setq pattern (concat "\\(^\\|[^[:alnum:]]\\)" 776 (setq pattern (concat "\\(^\\|[^[:alnum:]]\\)"
777 pattern 777 (regexp-quote pattern)
778 "\\($\\|[^[:alnum:]]\\)")) 778 "\\($\\|[^[:alnum:]]\\)"))
779 779
780 (let (texts 780 (let (texts