aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CONTRIBUTE6
-rw-r--r--etc/ChangeLog4
-rw-r--r--etc/HELLO4
-rw-r--r--etc/NEWS7
-rw-r--r--lisp/ChangeLog204
-rw-r--r--lisp/cus-edit.el33
-rw-r--r--lisp/cus-start.el10
-rw-r--r--lisp/custom.el16
-rw-r--r--lisp/dired-x.el168
-rw-r--r--lisp/emacs-lisp/checkdoc.el3
-rw-r--r--lisp/emacs-lisp/easy-mmode.el3
-rw-r--r--lisp/emacs-lisp/trace.el13
-rw-r--r--lisp/emulation/viper-cmd.el11
-rw-r--r--lisp/find-dired.el18
-rw-r--r--lisp/gnus/ChangeLog44
-rw-r--r--lisp/gnus/gnus-art.el25
-rw-r--r--lisp/gnus/gnus-sum.el23
-rw-r--r--lisp/gnus/mail-parse.el2
-rw-r--r--lisp/gnus/message.el12
-rw-r--r--lisp/gnus/rfc2047.el114
-rw-r--r--lisp/hl-line.el34
-rw-r--r--lisp/ibuffer.el4
-rw-r--r--lisp/image-mode.el13
-rw-r--r--lisp/imenu.el8
-rw-r--r--lisp/international/quail.el4
-rw-r--r--lisp/mail/feedmail.el10
-rw-r--r--lisp/mail/rmail-spam-filter.el19
-rw-r--r--lisp/mail/sendmail.el10
-rw-r--r--lisp/man.el4
-rw-r--r--lisp/net/rcirc.el376
-rw-r--r--lisp/net/tramp.el98
-rw-r--r--lisp/net/trampver.el2
-rw-r--r--lisp/paths.el10
-rw-r--r--lisp/pgg-gpg.el35
-rw-r--r--lisp/progmodes/python.el97
-rw-r--r--lisp/shell.el4
-rw-r--r--lisp/simple.el25
-rw-r--r--lisp/startup.el8
-rw-r--r--lisp/term/mac-win.el21
-rw-r--r--lisp/term/xterm.el64
-rw-r--r--lisp/url/ChangeLog15
-rw-r--r--lisp/url/url-cookie.el4
-rw-r--r--lisp/url/url-http.el3
-rw-r--r--lisp/url/url-parse.el23
-rw-r--r--lisp/woman.el15
-rw-r--r--lispref/ChangeLog41
-rw-r--r--lispref/buffers.texi12
-rw-r--r--lispref/display.texi7
-rw-r--r--lispref/makefile.w32-in3
-rw-r--r--lispref/modes.texi7
-rw-r--r--lispref/nonascii.texi5
-rw-r--r--lispref/os.texi19
-rw-r--r--lispref/processes.texi2
-rw-r--r--man/ChangeLog28
-rw-r--r--man/basic.texi2
-rw-r--r--man/cc-mode.texi29
-rw-r--r--man/display.texi135
-rw-r--r--man/emacs.texi3
-rw-r--r--man/indent.texi2
-rw-r--r--man/rcirc.texi6
-rw-r--r--man/tramp.texi16
-rw-r--r--man/trampver.texi2
-rw-r--r--man/windows.texi2
-rw-r--r--src/ChangeLog100
-rw-r--r--src/Makefile.in46
-rw-r--r--src/buffer.c27
-rw-r--r--src/buffer.h10
-rw-r--r--src/casefiddle.c2
-rw-r--r--src/coding.c6
-rw-r--r--src/editfns.c22
-rw-r--r--src/eval.c8
-rw-r--r--src/fns.c7
-rw-r--r--src/gtkutil.c29
-rw-r--r--src/indent.c13
-rw-r--r--src/insdel.c19
-rw-r--r--src/lisp.h2
-rw-r--r--src/macterm.c15
-rw-r--r--src/marker.c3
-rw-r--r--src/minibuf.c23
-rw-r--r--src/textprop.c12
-rw-r--r--src/w32.c24
-rw-r--r--src/window.c8
-rw-r--r--src/xdisp.c2
83 files changed, 1680 insertions, 645 deletions
diff --git a/CONTRIBUTE b/CONTRIBUTE
index e1fb74c8df6..d5d3b77d142 100644
--- a/CONTRIBUTE
+++ b/CONTRIBUTE
@@ -147,13 +147,13 @@ giving you write access to the CVS repository.
147 147
148Discussion about Emacs development takes place on emacs-devel@gnu.org. 148Discussion about Emacs development takes place on emacs-devel@gnu.org.
149 149
150Bug reports for released versions are sent to emacs-bugs@gnu.org. 150Bug reports for released versions are sent to bug-gnu-emacs@gnu.org.
151 151
152Bug reports for development versions are sent to emacs-pretest-bug@gnu.org. 152Bug reports for development versions are sent to emacs-pretest-bug@gnu.org.
153 153
154You can subscribe to the mailing lists at savannah.gnu.org/projects/emacs. 154You can subscribe to the mailing lists at savannah.gnu.org/projects/emacs.
155 155
156You can find the mailing lists archives at mail.gnu.org or gmane.org. 156You can find the mailing lists archives at lists.gnu.org or gmane.org.
157 157
158 158
159** Document your changes. 159** Document your changes.
@@ -189,7 +189,7 @@ need to check whether *that file* was changed in those years.
189It's sufficient that *Emacs* was changed in those years (and it was!). 189It's sufficient that *Emacs* was changed in those years (and it was!).
190 190
191** For those files that have been added since then, we should add 191** For those files that have been added since then, we should add
192the year it was added to Emacs, and all subsequent years." 192the year it was added to Emacs, and all subsequent years.
193 193
194** For the refcards under etc/, it's ok to simply use the latest year 194** For the refcards under etc/, it's ok to simply use the latest year
195(typically in a `\def\year{YEAR}' expression) for the rendered copyright 195(typically in a `\def\year{YEAR}' expression) for the rendered copyright
diff --git a/etc/ChangeLog b/etc/ChangeLog
index 100460e9b93..d01cdd2186a 100644
--- a/etc/ChangeLog
+++ b/etc/ChangeLog
@@ -1,3 +1,7 @@
12006-09-02 Juri Linkov <juri@jurta.org>
2
3 * HELLO: Regroup Europe Non-ASCII examples by similar scripts.
4
12006-08-25 Richard Stallman <rms@gnu.org> 52006-08-25 Richard Stallman <rms@gnu.org>
2 6
3 * TUTORIAL: Give priority to graphical terminals over text terminals 7 * TUTORIAL: Give priority to graphical terminals over text terminals
diff --git a/etc/HELLO b/etc/HELLO
index e12a901e548..821159be4bf 100644
--- a/etc/HELLO
+++ b/etc/HELLO
@@ -1,8 +1,8 @@
1This is a list of ways to say hello in various languages. 1This is a list of ways to say hello in various languages.
2 2
3Non-ASCII examples: 3Non-ASCII examples:
4 Europe: ,A!(BHola!, Hyv,Add(B p,Ad(Biv,Add(B, Gr,A|_(B Gott, Bon,Cu(Bu, Dobr,B}(B den, Tere p,Ad(Bevast 4 Europe: ,A!(BHola!, Gr,A|_(B Gott, Hyv,Add(B p,Ad(Biv,Add(B, Tere ,Au(Bhtust, Bon,Cu(Bu
5 Cze,B6f(B!, ,FCei\(B ,Fsar(B, ,L7T`PRabRcYbU(B!, $,1J2J0J;J0J@JOJ=J1J0(B 5 Cze,B6f(B!, Dobr,B}(B den, ,L7T`PRabRcYbU(B!, ,FCei\(B ,Fsar(B, $,1J2J0J;J0J@JOJ=J1J0(B
6 Africa: $(3!A!,!>(B 6 Africa: $(3!A!,!>(B
7 Middle/Near East: ,Hylem(B, (38R(47d(3T!JSa(4W(3W(B 7 Middle/Near East: ,Hylem(B, (38R(47d(3T!JSa(4W(3W(B
8 South Asia: $,15h5n5x6-5d6'(B, $,1?(?.?8?M>u?>?0(B, $,1@H@N@X@m@5@^@P@"(B, $,1<U<C<5<m<5<N<m(B, $(7"7"!#C"Q!;"E"S"G!;"7"2"[!;"D"["#"G!>(B 8 South Asia: $,15h5n5x6-5d6'(B, $,1?(?.?8?M>u?>?0(B, $,1@H@N@X@m@5@^@P@"(B, $,1<U<C<5<m<5<N<m(B, $(7"7"!#C"Q!;"E"S"G!;"7"2"[!;"D"["#"G!>(B
diff --git a/etc/NEWS b/etc/NEWS
index b4b3ba46937..114a19a2403 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -4158,6 +4158,13 @@ position or for a given window pixel coordinate.
4158** Text modification: 4158** Text modification:
4159 4159
4160+++ 4160+++
4161*** The new function `buffer-chars-modified-tick' returns a buffer's
4162tick counter for changes to characters. Each time text in that buffer
4163is inserted or deleted, the character-change counter is updated to the
4164tick counter (`buffer-modified-tick'). Text property changes leave it
4165unchanged.
4166
4167+++
4161*** The new function `insert-for-yank' normally works like `insert', but 4168*** The new function `insert-for-yank' normally works like `insert', but
4162removes the text properties in the `yank-excluded-properties' list 4169removes the text properties in the `yank-excluded-properties' list
4163and handles the `yank-handler' text property. 4170and handles the `yank-handler' text property.
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 82f1dc88cb9..7f8b66c0e32 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,207 @@
12006-09-04 John Paul Wallington <jpw@pobox.com>
2
3 * simple.el (completion-show-help): New defcustom.
4 (completion-setup-function): Heed it.
5
62006-09-04 Dan Nicolaescu <dann@ics.uci.edu>
7
8 * term/xterm.el (terminal-init-xterm): Add C-M- bindings.
9
102006-09-04 Richard Stallman <rms@gnu.org>
11
12 * mail/rmail-spam-filter.el (rsf-scanning-messages-now): Doc fix.
13 (rsf-min-region-to-spam-list): Doc fix.
14 (rsf-add-content-type-field): Doc fix.
15
16 * simple.el (kill-region): Explicitly test there is a region.
17
182006-09-04 Chong Yidong <cyd@stupidchicken.com>
19
20 * mail/feedmail.el (feedmail-buffer-to-sendmail): Look for
21 sendmail in several common directories.
22
23 * mail/sendmail.el (sendmail-program): Moved here from pathe.el.
24
25 * paths.el (sendmail-program): Removed.
26
272006-09-04 Daiki Ueno <ueno@unixuser.org>
28
29 * pgg-gpg.el (pgg-gpg-process-region): Revert two patches from Satyaki
30 Das. http://article.gmane.org/gmane.emacs.gnus.general/49947
31 http://article.gmane.org/gmane.emacs.gnus.general/50457
32
332006-09-03 Chong Yidong <cyd@stupidchicken.com>
34
35 * cus-edit.el (custom-group-menu-create): Avoid deactivating the
36 mark after running the menu filter.
37
382006-09-03 Juri Linkov <juri@jurta.org>
39
40 * international/quail.el (quail-defrule-internal): Add a check
41 if a key is a vector.
42
432006-09-02 Juri Linkov <juri@jurta.org>
44
45 * man.el (Man-topic-history): New variable.
46 (man): Use it.
47
48 * woman.el (woman-topic-history): Change defvar to defvaralias
49 for symbol `Man-topic-history'.
50
51 * shell.el (shell-filter-ctrl-a-ctrl-b): Check if
52 `comint-last-output-start' is a marker by using `markerp' and
53 check if it has a position by using `marker-position', and use
54 this position for `goto-char'.
55
56 * international/quail.el (quail-defrule-internal): Add missing
57 `error' call for null key.
58
592006-09-02 Ryan Yeske <rcyeske@gmail.com>
60
61 * rcirc.el (rcirc-keywords): New variable.
62 (rcirc-bright-nicks, rcirc-dim-nicks): New variables.
63 (rcirc-bright-nick-regexp, rcirc-dim-nick-regexp): Remove
64 variables.
65 (rcirc-responses-no-activity): New function.
66 (rcirc-handler-generic): Check for responses in above.
67 (rcirc-process-command): Add ?: character to arguments of raw
68 server commands.
69 (rcirc-format-response-string): Use `rcirc-bright-nicks' and
70 `rcirc-dim-nicks'.
71 (rcirc-gray-toggle): Remove unused variable.
72 (rcirc-print): Remove some tracking logic, which is moved into
73 markup functions.
74 (rcirc-activity-types): Was `rcirc-activity-type', now a list of
75 types.
76 (rcirc-activity-string): Look for 'keyword in activity-types.
77 (rcirc-window-configuration-change): Don't erase overlay-arrow
78 unnecessarily.
79 (rcirc-add-or-remove): New function.
80 (rcirc-cmd-ignore): Use it.
81 (rcirc-message-leader): Remove unused function.
82 (rcicr-cmd-bright, rcirc-cmd-dim, rcirc-cmd-keyword): New commands.
83 (rcirc-add-face): New function.
84 (rcirc-facify): Use rcirc-add-face.
85 (rcirc-url-regexp): Add parens.
86 (rcirc-map-regexp): Remove function.
87 (rcirc-mangle-regexp): Remove function.
88 (rcirc-markup-text-functions): New variable.
89 (rcirc-markup-text): New function (replaces `rcirc-mangle-text').
90 (rcirc-markup-body-text, rcirc-markup-attributes)
91 (rcirc-markup-my-nick, rcirc-markup-urls, rcirc-markup-keywords)
92 (rcirc-markup-bright-nicks): New markup handler functions.
93 (rcirc-nick-in-message-full-line): New face.
94 (rcirc-track-nick): Rename from `rcirc-mode-line-nick'.
95 (rcirc-track-keyword, rcirc-url, rcirc-keyword): New faces.
96
972006-09-02 Martin Rudalics <rudalics@gmx.at>
98
99 * cus-start.el (hscroll-margin, hscroll-step)
100 (mode-line-in-non-selected-windows, mouse-autoselect-window)
101 (x-use-underline-position-properties): Change version to "22.1"
102 since they will appear there for the first time.
103
1042006-09-01 Chong Yidong <cyd@stupidchicken.com>
105
106 * imenu.el (imenu-update-menubar): Use buffer-chars-modified-tick.
107
1082006-08-31 Richard Stallman <rms@gnu.org>
109
110 * cus-edit.el (custom-save-variables): Slight cleanup.
111 (Custom-no-edit): Renamed from custom-no-edit.
112 (Custom-newline): Renamed from custom-newline.
113 (custom-mode-map): Use new names.
114
115 * emacs-lisp/easy-mmode.el (define-minor-mode): Reference manual
116 about customization, rather than M-x customize, in the doc string
117 made for the defcustom.
118
119 * emacs-lisp/trace.el (trace-function-background): Doc fix.
120
1212006-08-31 Romain Francoise <romain@orebokech.com>
122
123 * dired-x.el (dired-guess-shell-alist-default): Update.
124
1252006-08-31 Michael Mauger <mmaug@yahoo.com>
126
127 * custom.el (custom-theme-set-variables): Autoload packages before
128 sorting the variables.
129
1302006-08-30 Michael Kifer <kifer@cs.stonybrook.edu>
131
132 * viper-cmd.el (viper-special-read-and-insert-char): Convert events to
133 chars if XEmacs.
134 (viper-after-change-undo-hook): Check if undo-in-progress is bound.
135
1362006-08-30 Stefan Monnier <monnier@iro.umontreal.ca>
137
138 * progmodes/python.el (python-eldoc-function): Re-enable quit while
139 waiting for process.
140
1412006-08-30 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
142
143 * term/mac-win.el (mac-string-to-utxt): If adjustment for MacJapanese
144 results in ASCII-only string, encode original one directly.
145
1462006-08-29 Romain Francoise <romain@orebokech.com>
147
148 * startup.el (normal-splash-screen, fancy-splash-screens):
149 Make buffer read-only and arrange to enter view mode if necessary.
150
1512006-08-29 Chong Yidong <cyd@stupidchicken.com>
152
153 * hl-line.el (hl-line): New face.
154 (hl-line-face): Use it.
155
156 * image-mode.el (image-mode): Fix last fix.
157 Suggested by Kim F. Storm.
158
1592006-08-29 Michael Albinus <michael.albinus@gmx.de>
160
161 Sync with Tramp 2.0.54.
162
163 * net/tramp.el (tramp-convert-file-attributes): Call `eql' instead
164 of `=', because `tramp-get-remote-gid' might not always return an
165 integer when expected.
166 (tramp-register-file-name-handlers): `partial-completion-mode' is
167 unknown to XEmacs.
168 (tramp-time-diff): Don't use `floor', it might fail for large
169 differences.
170 (tramp-handle-make-auto-save-file-name): For Emacs 21, set
171 `tramp-auto-save-directory' if unset in order to guarantee unique
172 auto-save file names.
173
1742006-08-28 Chong Yidong <cyd@stupidchicken.com>
175
176 * image-mode.el (image-mode): Display image as text on a terminal.
177
1782006-08-28 Stefan Monnier <monnier@iro.umontreal.ca>
179
180 * progmodes/python.el (python-send-command): Simplify.
181 (run-python): Don't generate a new buffer unless `new' was specified.
182 Make sure we send `import emacs' to the proper process.
183
184 * progmodes/python.el (python-send-command): Don't wait for the command
185 to terminate. Don't fiddle with compilation-parsing-end.
186
1872006-08-28 Chong Yidong <cyd@stupidchicken.com>
188
189 * emacs-lisp/checkdoc.el (checkdoc-file-comments-engine):
190 Insert commentary after first line summary.
191
192 * woman.el (woman-follow): New function, based on `man-follow'.
193 (woman-mode-map): Use it.
194
195 * ibuffer.el (ibuffer-do-sort-by-recency): Perform full update
196 since ibuffer-do-sort-by-recency does not define a sorter.
197
1982006-08-28 Kim F. Storm <storm@cua.dk>
199
200 * find-dired.el (find-dired): Use shell-quote-argument to properly
201 escape ( and ) args. Also use it on {} and ; args in default
202 value of find-ls-option string.
203 (find-grep-dired): Use shell-quote-argument on {} and ; args.
204
12006-08-27 Michael Olson <mwolson@gnu.org> 2052006-08-27 Michael Olson <mwolson@gnu.org>
2 206
3 * emacs-lisp/tq.el: Small grammar fix in comments. 207 * emacs-lisp/tq.el: Small grammar fix in comments.
diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el
index 609b5572a08..c31e319f798 100644
--- a/lisp/cus-edit.el
+++ b/lisp/cus-edit.el
@@ -4255,19 +4255,31 @@ This function does not save the buffer."
4255 (let ((spec (car-safe (get symbol 'theme-value))) 4255 (let ((spec (car-safe (get symbol 'theme-value)))
4256 (value (get symbol 'saved-value)) 4256 (value (get symbol 'saved-value))
4257 (requests (get symbol 'custom-requests)) 4257 (requests (get symbol 'custom-requests))
4258 (now (not (or (custom-variable-p symbol) 4258 (now (and (not (custom-variable-p symbol))
4259 (and (not (boundp symbol)) 4259 (or (boundp symbol)
4260 (not (eq (get symbol 'force-value) 4260 (eq (get symbol 'force-value)
4261 'rogue)))))) 4261 'rogue))))
4262 (comment (get symbol 'saved-variable-comment))) 4262 (comment (get symbol 'saved-variable-comment)))
4263 ;; Check `requests'. 4263 ;; Check REQUESTS for validity.
4264 (dolist (request requests) 4264 (dolist (request requests)
4265 (when (and (symbolp request) (not (featurep request))) 4265 (when (and (symbolp request) (not (featurep request)))
4266 (message "Unknown requested feature: %s" request) 4266 (message "Unknown requested feature: %s" request)
4267 (setq requests (delq request requests)))) 4267 (setq requests (delq request requests))))
4268 ;; Is there anything customized about this variable?
4268 (when (or (and spec (eq (car spec) 'user)) 4269 (when (or (and spec (eq (car spec) 'user))
4269 comment 4270 comment
4270 (and (null spec) (get symbol 'saved-value))) 4271 (and (null spec) (get symbol 'saved-value)))
4272 ;; Output an element for this variable.
4273 ;; It has the form (SYMBOL VALUE-FORM NOW REQUESTS COMMENT).
4274 ;; SYMBOL is the variable name.
4275 ;; VALUE-FORM is an expression to return the customized value.
4276 ;; NOW if non-nil means always set the variable immediately
4277 ;; when the customizations are reloaded. This is used
4278 ;; for rogue variables
4279 ;; REQUESTS is a list of packages to load before setting the
4280 ;; variable. Each element of it will be passed to `require'.
4281 ;; COMMENT is whatever comment the user has specified
4282 ;; with the customize facility.
4271 (unless (bolp) 4283 (unless (bolp)
4272 (princ "\n")) 4284 (princ "\n"))
4273 (princ " '(") 4285 (princ " '(")
@@ -4383,7 +4395,8 @@ This function does not save the buffer."
4383 "Ignoring WIDGET, create a menu entry for customization group SYMBOL." 4395 "Ignoring WIDGET, create a menu entry for customization group SYMBOL."
4384 `( ,(custom-unlispify-menu-entry symbol t) 4396 `( ,(custom-unlispify-menu-entry symbol t)
4385 :filter (lambda (&rest junk) 4397 :filter (lambda (&rest junk)
4386 (let ((menu (custom-menu-create ',symbol))) 4398 (let* ((deactivate-mark nil)
4399 (menu (custom-menu-create ',symbol)))
4387 (if (consp menu) (cdr menu) menu))))) 4400 (if (consp menu) (cdr menu) menu)))))
4388 4401
4389;;;###autoload 4402;;;###autoload
@@ -4435,8 +4448,8 @@ The format is suitable for use with `easy-menu-define'."
4435 ;; Actually, this misfeature of dense keymaps was fixed on 2001-11-26. 4448 ;; Actually, this misfeature of dense keymaps was fixed on 2001-11-26.
4436 (let ((map (make-keymap))) 4449 (let ((map (make-keymap)))
4437 (set-keymap-parent map widget-keymap) 4450 (set-keymap-parent map widget-keymap)
4438 (define-key map [remap self-insert-command] 'custom-no-edit) 4451 (define-key map [remap self-insert-command] 'Custom-no-edit)
4439 (define-key map "\^m" 'custom-newline) 4452 (define-key map "\^m" 'Custom-newline)
4440 (define-key map " " 'scroll-up) 4453 (define-key map " " 'scroll-up)
4441 (define-key map "\177" 'scroll-down) 4454 (define-key map "\177" 'scroll-down)
4442 (define-key map "\C-c\C-c" 'Custom-set) 4455 (define-key map "\C-c\C-c" 'Custom-set)
@@ -4448,12 +4461,12 @@ The format is suitable for use with `easy-menu-define'."
4448 map) 4461 map)
4449 "Keymap for `custom-mode'.") 4462 "Keymap for `custom-mode'.")
4450 4463
4451(defun custom-no-edit (pos &optional event) 4464(defun Custom-no-edit (pos &optional event)
4452 "Invoke button at POS, or refuse to allow editing of Custom buffer." 4465 "Invoke button at POS, or refuse to allow editing of Custom buffer."
4453 (interactive "@d") 4466 (interactive "@d")
4454 (error "You can't edit this part of the Custom buffer")) 4467 (error "You can't edit this part of the Custom buffer"))
4455 4468
4456(defun custom-newline (pos &optional event) 4469(defun Custom-newline (pos &optional event)
4457 "Invoke button at POS, or refuse to allow editing of Custom buffer." 4470 "Invoke button at POS, or refuse to allow editing of Custom buffer."
4458 (interactive "@d") 4471 (interactive "@d")
4459 (let ((button (get-char-property pos 'button))) 4472 (let ((button (get-char-property pos 'button)))
diff --git a/lisp/cus-start.el b/lisp/cus-start.el
index 75cd340604c..4d817474f3a 100644
--- a/lisp/cus-start.el
+++ b/lisp/cus-start.el
@@ -347,11 +347,11 @@ since it could result in memory overflow and make Emacs crash."
347 (scroll-step windows integer) 347 (scroll-step windows integer)
348 (scroll-conservatively windows integer) 348 (scroll-conservatively windows integer)
349 (scroll-margin windows integer) 349 (scroll-margin windows integer)
350 (hscroll-margin windows integer "21.3") 350 (hscroll-margin windows integer "22.1")
351 (hscroll-step windows number "21.3") 351 (hscroll-step windows number "22.1")
352 (truncate-partial-width-windows display boolean) 352 (truncate-partial-width-windows display boolean)
353 (mode-line-inverse-video modeline boolean) 353 (mode-line-inverse-video modeline boolean)
354 (mode-line-in-non-selected-windows modeline boolean "21.3") 354 (mode-line-in-non-selected-windows modeline boolean "22.1")
355 (line-number-display-limit display 355 (line-number-display-limit display
356 (choice integer 356 (choice integer
357 (const :tag "No limit" nil))) 357 (const :tag "No limit" nil)))
@@ -373,8 +373,8 @@ since it could result in memory overflow and make Emacs crash."
373 (x-gtk-show-hidden-files menu boolean "22.1") 373 (x-gtk-show-hidden-files menu boolean "22.1")
374 (x-gtk-whole-detached-tool-bar x boolean "22.1") 374 (x-gtk-whole-detached-tool-bar x boolean "22.1")
375 ;; xterm.c 375 ;; xterm.c
376 (mouse-autoselect-window display boolean "21.3") 376 (mouse-autoselect-window display boolean "22.1")
377 (x-use-underline-position-properties display boolean "21.3") 377 (x-use-underline-position-properties display boolean "22.1")
378 (x-underline-at-descent-line display boolean "22.1") 378 (x-underline-at-descent-line display boolean "22.1")
379 (x-stretch-cursor display boolean "21.1"))) 379 (x-stretch-cursor display boolean "21.1")))
380 this symbol group type standard version native-p 380 this symbol group type standard version native-p
diff --git a/lisp/custom.el b/lisp/custom.el
index 2e5c0a59d9b..104e63126f0 100644
--- a/lisp/custom.el
+++ b/lisp/custom.el
@@ -874,6 +874,18 @@ COMMENT is a comment string about SYMBOL.
874EXP itself is saved unevaluated as SYMBOL property `saved-value' and 874EXP itself is saved unevaluated as SYMBOL property `saved-value' and
875in SYMBOL's list property `theme-value' \(using `custom-push-theme')." 875in SYMBOL's list property `theme-value' \(using `custom-push-theme')."
876 (custom-check-theme theme) 876 (custom-check-theme theme)
877
878 ;; Process all the needed autoloads before anything else, so that the
879 ;; subsequent code has all the info it needs (e.g. which var corresponds
880 ;; to a minor mode), regardless of the ordering of the variables.
881 (dolist (entry args)
882 (let* ((symbol (indirect-variable (nth 0 entry))))
883 (unless (or (get symbol 'standard-value)
884 (memq (get symbol 'custom-autoload) '(nil noset)))
885 ;; This symbol needs to be autoloaded, even just for a `set'.
886 (custom-load-symbol symbol))))
887
888 ;; Move minor modes and variables with explicit requires to the end.
877 (setq args 889 (setq args
878 (sort args 890 (sort args
879 (lambda (a1 a2) 891 (lambda (a1 a2)
@@ -904,10 +916,6 @@ in SYMBOL's list property `theme-value' \(using `custom-push-theme')."
904 (when requests 916 (when requests
905 (put symbol 'custom-requests requests) 917 (put symbol 'custom-requests requests)
906 (mapc 'require requests)) 918 (mapc 'require requests))
907 (unless (or (get symbol 'standard-value)
908 (memq (get symbol 'custom-autoload) '(nil noset)))
909 ;; This symbol needs to be autoloaded, even just for a `set'.
910 (custom-load-symbol symbol))
911 (setq set (or (get symbol 'custom-set) 'custom-set-default)) 919 (setq set (or (get symbol 'custom-set) 'custom-set-default))
912 (put symbol 'saved-value (list value)) 920 (put symbol 'saved-value (list value))
913 (put symbol 'saved-variable-comment comment) 921 (put symbol 'saved-variable-comment comment)
diff --git a/lisp/dired-x.el b/lisp/dired-x.el
index 4d3734bbd5a..942d16d3478 100644
--- a/lisp/dired-x.el
+++ b/lisp/dired-x.el
@@ -958,119 +958,132 @@ dired."
958(defvar dired-guess-shell-alist-default 958(defvar dired-guess-shell-alist-default
959 (list 959 (list
960 (list "\\.tar$" 960 (list "\\.tar$"
961 '(if dired-guess-shell-gnutar 961 '(if dired-guess-shell-gnutar
962 (concat dired-guess-shell-gnutar " xvf") 962 (concat dired-guess-shell-gnutar " xvf")
963 "tar xvf") 963 "tar xvf")
964 ;; Extract files into a separate subdirectory 964 ;; Extract files into a separate subdirectory
965 '(if dired-guess-shell-gnutar 965 '(if dired-guess-shell-gnutar
966 (concat "mkdir " (file-name-sans-extension file) 966 (concat "mkdir " (file-name-sans-extension file)
967 "; " dired-guess-shell-gnutar " -C " 967 "; " dired-guess-shell-gnutar " -C "
968 (file-name-sans-extension file) " -xvf") 968 (file-name-sans-extension file) " -xvf")
969 (concat "mkdir " (file-name-sans-extension file) 969 (concat "mkdir " (file-name-sans-extension file)
970 "; tar -C " (file-name-sans-extension file) " -xvf"))) 970 "; tar -C " (file-name-sans-extension file) " -xvf"))
971 ;; List archive contents.
972 '(if dired-guess-shell-gnutar
973 (concat dired-guess-shell-gnutar " tvf")
974 "tar tvf"))
971 975
972 ;; REGEXPS for compressed archives must come before the .Z rule to 976 ;; REGEXPS for compressed archives must come before the .Z rule to
973 ;; be recognized: 977 ;; be recognized:
974 (list "\\.tar\\.Z$" 978 (list "\\.tar\\.Z$"
975 ;; Untar it. 979 ;; Untar it.
976 '(if dired-guess-shell-gnutar 980 '(if dired-guess-shell-gnutar
977 (concat dired-guess-shell-gnutar " zxvf") 981 (concat dired-guess-shell-gnutar " zxvf")
978 (concat "zcat * | tar xvf -")) 982 (concat "zcat * | tar xvf -"))
979 ;; Optional conversion to gzip format. 983 ;; Optional conversion to gzip format.
980 '(concat "znew" (if dired-guess-shell-gzip-quiet " -q") 984 '(concat "znew" (if dired-guess-shell-gzip-quiet " -q")
981 " " dired-guess-shell-znew-switches)) 985 " " dired-guess-shell-znew-switches))
982 986
983 ;; gzip'ed archives 987 ;; gzip'ed archives
984 (list "\\.t\\(ar\\.\\)?gz$" 988 (list "\\.t\\(ar\\.\\)?gz$"
985 '(if dired-guess-shell-gnutar 989 '(if dired-guess-shell-gnutar
986 (concat dired-guess-shell-gnutar " zxvf") 990 (concat dired-guess-shell-gnutar " zxvf")
987 (concat "gunzip -qc * | tar xvf -")) 991 (concat "gunzip -qc * | tar xvf -"))
988 ;; Extract files into a separate subdirectory 992 ;; Extract files into a separate subdirectory
989 '(if dired-guess-shell-gnutar 993 '(if dired-guess-shell-gnutar
990 (concat "mkdir " (file-name-sans-extension file) 994 (concat "mkdir " (file-name-sans-extension file)
991 "; " dired-guess-shell-gnutar " -C " 995 "; " dired-guess-shell-gnutar " -C "
992 (file-name-sans-extension file) " -zxvf") 996 (file-name-sans-extension file) " -zxvf")
993 (concat "mkdir " (file-name-sans-extension file) 997 (concat "mkdir " (file-name-sans-extension file)
994 "; gunzip -qc * | tar -C " 998 "; gunzip -qc * | tar -C "
995 (file-name-sans-extension file) " -xvf -")) 999 (file-name-sans-extension file) " -xvf -"))
996 ;; Optional decompression. 1000 ;; Optional decompression.
997 '(concat "gunzip" (if dired-guess-shell-gzip-quiet " -q" ""))) 1001 '(concat "gunzip" (if dired-guess-shell-gzip-quiet " -q" ""))
1002 ;; List archive contents.
1003 '(if dired-guess-shell-gnutar
1004 (concat dired-guess-shell-gnutar " ztvf")
1005 (concat "gunzip -qc * | tar tvf -")))
998 1006
999 ;; bzip2'ed archives 1007 ;; bzip2'ed archives
1000 (list "\\.t\\(ar\\.bz2\\|bz\\)$" 1008 (list "\\.t\\(ar\\.bz2\\|bz\\)$"
1001 "bunzip2 -c * | tar xvf -" 1009 "bunzip2 -c * | tar xvf -"
1002 ;; Extract files into a separate subdirectory 1010 ;; Extract files into a separate subdirectory
1003 '(concat "mkdir " (file-name-sans-extension file) 1011 '(concat "mkdir " (file-name-sans-extension file)
1004 "; bunzip2 -c * | tar -C " 1012 "; bunzip2 -c * | tar -C "
1005 (file-name-sans-extension file) " -xvf -") 1013 (file-name-sans-extension file) " -xvf -")
1006 ;; Optional decompression. 1014 ;; Optional decompression.
1007 "bunzip2") 1015 "bunzip2")
1008 1016
1009 '("\\.shar\\.Z$" "zcat * | unshar") 1017 '("\\.shar\\.Z$" "zcat * | unshar")
1010 '("\\.shar\\.g?z$" "gunzip -qc * | unshar") 1018 '("\\.shar\\.g?z$" "gunzip -qc * | unshar")
1011 1019
1012 '("\\.e?ps$" "ghostview" "xloadimage" "lpr") 1020 '("\\.e?ps$" "ghostview" "xloadimage" "lpr")
1013 (list "\\.e?ps\\.g?z$" "gunzip -qc * | ghostview -" 1021 (list "\\.e?ps\\.g?z$" "gunzip -qc * | ghostview -"
1014 ;; Optional decompression. 1022 ;; Optional decompression.
1015 '(concat "gunzip" (if dired-guess-shell-gzip-quiet " -q"))) 1023 '(concat "gunzip" (if dired-guess-shell-gzip-quiet " -q")))
1016 (list "\\.e?ps\\.Z$" "zcat * | ghostview -" 1024 (list "\\.e?ps\\.Z$" "zcat * | ghostview -"
1017 ;; Optional conversion to gzip format. 1025 ;; Optional conversion to gzip format.
1018 '(concat "znew" (if dired-guess-shell-gzip-quiet " -q") 1026 '(concat "znew" (if dired-guess-shell-gzip-quiet " -q")
1019 " " dired-guess-shell-znew-switches)) 1027 " " dired-guess-shell-znew-switches))
1020 1028
1021 '("\\.patch$" "cat * | patch") 1029 '("\\.patch$" "cat * | patch")
1022 (list "\\.patch\\.g?z$" "gunzip -qc * | patch" 1030 (list "\\.patch\\.g?z$" "gunzip -qc * | patch"
1023 ;; Optional decompression. 1031 ;; Optional decompression.
1024 '(concat "gunzip" (if dired-guess-shell-gzip-quiet " -q"))) 1032 '(concat "gunzip" (if dired-guess-shell-gzip-quiet " -q")))
1025 (list "\\.patch\\.Z$" "zcat * | patch" 1033 (list "\\.patch\\.Z$" "zcat * | patch"
1026 ;; Optional conversion to gzip format. 1034 ;; Optional conversion to gzip format.
1027 '(concat "znew" (if dired-guess-shell-gzip-quiet " -q") 1035 '(concat "znew" (if dired-guess-shell-gzip-quiet " -q")
1028 " " dired-guess-shell-znew-switches)) 1036 " " dired-guess-shell-znew-switches))
1029 1037
1030 ;; The following four extensions are useful with dired-man ("N" key) 1038 ;; The following four extensions are useful with dired-man ("N" key)
1031 (list "\\.\\(?:[0-9]\\|man\\)$" '(progn (require 'man) 1039 (list "\\.\\(?:[0-9]\\|man\\)$" '(progn (require 'man)
1032 (if (Man-support-local-filenames) 1040 (if (Man-support-local-filenames)
1033 "man -l" 1041 "man -l"
1034 "cat * | tbl | nroff -man -h"))) 1042 "cat * | tbl | nroff -man -h")))
1035 (list "\\.\\(?:[0-9]\\|man\\)\\.g?z$" '(progn (require 'man) 1043 (list "\\.\\(?:[0-9]\\|man\\)\\.g?z$" '(progn (require 'man)
1036 (if (Man-support-local-filenames) 1044 (if (Man-support-local-filenames)
1037 "man -l" 1045 "man -l"
1038 "gunzip -qc * | tbl | nroff -man -h")) 1046 "gunzip -qc * | tbl | nroff -man -h"))
1039 ;; Optional decompression. 1047 ;; Optional decompression.
1040 '(concat "gunzip" (if dired-guess-shell-gzip-quiet " -q"))) 1048 '(concat "gunzip" (if dired-guess-shell-gzip-quiet " -q")))
1041 (list "\\.[0-9]\\.Z$" '(progn (require 'man) 1049 (list "\\.[0-9]\\.Z$" '(progn (require 'man)
1042 (if (Man-support-local-filenames) 1050 (if (Man-support-local-filenames)
1043 "man -l" 1051 "man -l"
1044 "zcat * | tbl | nroff -man -h")) 1052 "zcat * | tbl | nroff -man -h"))
1045 ;; Optional conversion to gzip format. 1053 ;; Optional conversion to gzip format.
1046 '(concat "znew" (if dired-guess-shell-gzip-quiet " -q") 1054 '(concat "znew" (if dired-guess-shell-gzip-quiet " -q")
1047 " " dired-guess-shell-znew-switches)) 1055 " " dired-guess-shell-znew-switches))
1048 '("\\.pod$" "perldoc" "pod2man * | nroff -man") 1056 '("\\.pod$" "perldoc" "pod2man * | nroff -man")
1049 1057
1050 '("\\.dvi$" "xdvi" "dvips") ; preview and printing 1058 '("\\.dvi$" "xdvi" "dvips") ; preview and printing
1051 '("\\.au$" "play") ; play Sun audiofiles 1059 '("\\.au$" "play") ; play Sun audiofiles
1052 '("\\.mpg$" "mpeg_play") 1060 '("\\.mpe?g$\\|\\.avi$" "xine -p")
1053 '("\\.uu$" "uudecode") ; for uudecoded files 1061 '("\\.wav$" "play")
1062 '("\\.uu$" "uudecode") ; for uudecoded files
1054 '("\\.hqx$" "mcvert") 1063 '("\\.hqx$" "mcvert")
1055 '("\\.sh$" "sh") ; execute shell scripts 1064 '("\\.sh$" "sh") ; execute shell scripts
1056 '("\\.xbm$" "bitmap") ; view X11 bitmaps 1065 '("\\.xbm$" "bitmap") ; view X11 bitmaps
1057 '("\\.gp$" "gnuplot") 1066 '("\\.gp$" "gnuplot")
1058 '("\\.p[bgpn]m$" "xloadimage") 1067 '("\\.p[bgpn]m$" "xloadimage")
1059 '("\\.gif$" "xloadimage") ; view gif pictures 1068 '("\\.gif$" "xloadimage") ; view gif pictures
1060 '("\\.tif$" "xloadimage") 1069 '("\\.tif$" "xloadimage")
1061 '("\\.png$" "display") ; xloadimage 4.1 doesn't grok PNG 1070 '("\\.png$" "display") ; xloadimage 4.1 doesn't grok PNG
1062 '("\\.jpe?g$" "xloadimage") 1071 '("\\.jpe?g$" "xloadimage")
1063 '("\\.fig$" "xfig") ; edit fig pictures 1072 '("\\.fig$" "xfig") ; edit fig pictures
1064 '("\\.out$" "xgraph") ; for plotting purposes. 1073 '("\\.out$" "xgraph") ; for plotting purposes.
1065 '("\\.tex$" "latex" "tex") 1074 '("\\.tex$" "latex" "tex")
1066 '("\\.texi\\(nfo\\)?$" "makeinfo" "texi2dvi") 1075 '("\\.texi\\(nfo\\)?$" "makeinfo" "texi2dvi")
1067 '("\\.pdf$" "xpdf") ; edit PDF files 1076 '("\\.pdf$" "xpdf")
1077 '("\\.doc$" "antiword" "strings")
1078 '("\\.rpm$" "rpm -qilp" "rpm -ivh")
1079 '("\\.dia$" "dia")
1080 '("\\.mgp$" "mgp")
1068 1081
1069 ;; Some other popular archivers. 1082 ;; Some other popular archivers.
1070 (list "\\.zip$" "unzip" 1083 (list "\\.zip$" "unzip" "unzip -l"
1071 ;; Extract files into a separate subdirectory 1084 ;; Extract files into a separate subdirectory
1072 '(concat "unzip" (if dired-guess-shell-gzip-quiet " -q") 1085 '(concat "unzip" (if dired-guess-shell-gzip-quiet " -q")
1073 " -d " (file-name-sans-extension file))) 1086 " -d " (file-name-sans-extension file)))
1074 '("\\.zoo$" "zoo x//") 1087 '("\\.zoo$" "zoo x//")
1075 '("\\.lzh$" "lharc x") 1088 '("\\.lzh$" "lharc x")
1076 '("\\.arc$" "arc x") 1089 '("\\.arc$" "arc x")
@@ -1081,10 +1094,11 @@ dired."
1081 (list "\\.dz$" "dictunzip") 1094 (list "\\.dz$" "dictunzip")
1082 (list "\\.bz2$" "bunzip2") 1095 (list "\\.bz2$" "bunzip2")
1083 (list "\\.Z$" "uncompress" 1096 (list "\\.Z$" "uncompress"
1084 ;; Optional conversion to gzip format. 1097 ;; Optional conversion to gzip format.
1085 '(concat "znew" (if dired-guess-shell-gzip-quiet " -q") 1098 '(concat "znew" (if dired-guess-shell-gzip-quiet " -q")
1086 " " dired-guess-shell-znew-switches)) 1099 " " dired-guess-shell-znew-switches))
1087 ) 1100
1101 '("\\.sign?$" "gpg --verify"))
1088 1102
1089 "Default alist used for shell command guessing. 1103 "Default alist used for shell command guessing.
1090See `dired-guess-shell-alist-user'.") 1104See `dired-guess-shell-alist-user'.")
diff --git a/lisp/emacs-lisp/checkdoc.el b/lisp/emacs-lisp/checkdoc.el
index 68603c905a5..666b373ca53 100644
--- a/lisp/emacs-lisp/checkdoc.el
+++ b/lisp/emacs-lisp/checkdoc.el
@@ -2261,7 +2261,8 @@ Code:, and others referenced in the style guide."
2261 (re-search-forward "^;;; Code" nil t) 2261 (re-search-forward "^;;; Code" nil t)
2262 (re-search-forward "^(require" nil t) 2262 (re-search-forward "^(require" nil t)
2263 (re-search-forward "^(" nil t)) 2263 (re-search-forward "^(" nil t))
2264 (beginning-of-line))) 2264 (beginning-of-line))
2265 (t (re-search-forward ";;; .* --- .*\n")))
2265 (if (checkdoc-y-or-n-p 2266 (if (checkdoc-y-or-n-p
2266 "You should have a \";;; Commentary:\", add one? ") 2267 "You should have a \";;; Commentary:\", add one? ")
2267 (insert "\n;;; Commentary:\n;; \n\n") 2268 (insert "\n;;; Commentary:\n;; \n\n")
diff --git a/lisp/emacs-lisp/easy-mmode.el b/lisp/emacs-lisp/easy-mmode.el
index d4ba8d30623..b22e49dac34 100644
--- a/lisp/emacs-lisp/easy-mmode.el
+++ b/lisp/emacs-lisp/easy-mmode.el
@@ -200,7 +200,8 @@ Use the command `%s' to change this variable." pretty-name mode))
200See the command `%s' for a description of this minor-mode." 200See the command `%s' for a description of this minor-mode."
201 (if body " 201 (if body "
202Setting this variable directly does not take effect; 202Setting this variable directly does not take effect;
203use either \\[customize] or the function `%s'.")))) 203either customize it (see the info node `Easy Customization')
204or call the function `%s'."))))
204 `(defcustom ,mode ,init-value 205 `(defcustom ,mode ,init-value
205 ,(format base-doc-string pretty-name mode mode) 206 ,(format base-doc-string pretty-name mode mode)
206 ,@set 207 ,@set
diff --git a/lisp/emacs-lisp/trace.el b/lisp/emacs-lisp/trace.el
index 1ebf1186c2d..191be58c0b5 100644
--- a/lisp/emacs-lisp/trace.el
+++ b/lisp/emacs-lisp/trace.el
@@ -265,11 +265,14 @@ display oriented stuff, use `trace-function-background' instead."
265;;;###autoload 265;;;###autoload
266(defun trace-function-background (function &optional buffer) 266(defun trace-function-background (function &optional buffer)
267 "Traces FUNCTION with trace output going quietly to BUFFER. 267 "Traces FUNCTION with trace output going quietly to BUFFER.
268For every call of FUNCTION Lisp-style trace messages that display argument 268When this tracing is enabled, every call to FUNCTION writes
269and return values will be inserted into BUFFER. This function generates the 269a Lisp-style trace message (showing the arguments and return value)
270trace advice for FUNCTION and activates it together with any other advice 270into BUFFER. This function generates advice to trace FUNCTION
271there might be!! Trace output will quietly go to BUFFER without changing 271and activates it together with any other advice there might be.
272the window or buffer configuration at all." 272The trace output goes to BUFFER quietly, without changing
273the window or buffer configuration.
274
275BUFFER defaults to `trace-buffer'."
273 (interactive 276 (interactive
274 (list 277 (list
275 (intern 278 (intern
diff --git a/lisp/emulation/viper-cmd.el b/lisp/emulation/viper-cmd.el
index af757a2a55c..1685b829f64 100644
--- a/lisp/emulation/viper-cmd.el
+++ b/lisp/emulation/viper-cmd.el
@@ -892,12 +892,17 @@ Vi's prefix argument will be used. Otherwise, the prefix argument passed to
892 (t 892 (t
893 ;;(setq ch (read-char-exclusive)) 893 ;;(setq ch (read-char-exclusive))
894 (setq ch (aref (read-key-sequence nil) 0)) 894 (setq ch (aref (read-key-sequence nil) 0))
895 (if viper-xemacs-p
896 (setq ch (event-to-character ch)))
895 ;; replace ^M with the newline 897 ;; replace ^M with the newline
896 (if (eq ch ?\C-m) (setq ch ?\n)) 898 (if (eq ch ?\C-m) (setq ch ?\n))
897 ;; Make sure ^V and ^Q work as quotation chars 899 ;; Make sure ^V and ^Q work as quotation chars
898 (if (memq ch '(?\C-v ?\C-q)) 900 (if (memq ch '(?\C-v ?\C-q))
899 ;;(setq ch (read-char-exclusive)) 901 (progn
900 (setq ch (aref (read-key-sequence nil) 0)) 902 ;;(setq ch (read-char-exclusive))
903 (setq ch (aref (read-key-sequence nil) 0))
904 (if viper-xemacs-p
905 (setq ch (event-to-character ch))))
901 ) 906 )
902 (insert ch)) 907 (insert ch))
903 ) 908 )
@@ -1750,7 +1755,7 @@ invokes the command before that, etc."
1750 1755
1751;; Hook used in viper-undo 1756;; Hook used in viper-undo
1752(defun viper-after-change-undo-hook (beg end len) 1757(defun viper-after-change-undo-hook (beg end len)
1753 (if undo-in-progress 1758 (if (and (boundp 'undo-in-progress) undo-in-progress)
1754 (setq undo-beg-posn beg 1759 (setq undo-beg-posn beg
1755 undo-end-posn (or end beg)) 1760 undo-end-posn (or end beg))
1756 ;; some other hooks may be changing various text properties in 1761 ;; some other hooks may be changing various text properties in
diff --git a/lisp/find-dired.el b/lisp/find-dired.el
index 88e5414d525..a2895133c27 100644
--- a/lisp/find-dired.el
+++ b/lisp/find-dired.el
@@ -129,8 +129,17 @@ as the final argument."
129 args (concat find-dired-find-program " . " 129 args (concat find-dired-find-program " . "
130 (if (string= args "") 130 (if (string= args "")
131 "" 131 ""
132 (concat "\\( " args " \\) ")) 132 (concat
133 (car find-ls-option))) 133 (shell-quote-argument "(")
134 " " args " "
135 (shell-quote-argument ")")
136 " "))
137 (if (equal (car find-ls-option) "-exec ls -ld {} \\;")
138 (concat "-exec ls -ld "
139 (shell-quote-argument "{}")
140 " "
141 (shell-quote-argument ";"))
142 (car find-ls-option))))
134 ;; Start the find process. 143 ;; Start the find process.
135 (shell-command (concat args "&") (current-buffer)) 144 (shell-command (concat args "&") (current-buffer))
136 ;; The next statement will bomb in classic dired (no optional arg allowed) 145 ;; The next statement will bomb in classic dired (no optional arg allowed)
@@ -215,7 +224,10 @@ Thus ARG can also contain additional grep options."
215 (find-dired dir 224 (find-dired dir
216 (concat "-type f -exec grep " find-grep-options " -e " 225 (concat "-type f -exec grep " find-grep-options " -e "
217 (shell-quote-argument regexp) 226 (shell-quote-argument regexp)
218 " {} \\\; "))) 227 " "
228 (shell-quote-argument "{}")
229 " "
230 (shell-quote-argument ";"))))
219 231
220(defun find-dired-filter (proc string) 232(defun find-dired-filter (proc string)
221 ;; Filter for \\[find-dired] processes. 233 ;; Filter for \\[find-dired] processes.
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog
index 6927e3bfbac..81d566fc856 100644
--- a/lisp/gnus/ChangeLog
+++ b/lisp/gnus/ChangeLog
@@ -1,3 +1,43 @@
12006-09-04 Chong Yidong <cyd@stupidchicken.com>
2
3 * message.el (message-send-mail-with-sendmail): Look for sendmail in
4 several common directories.
5
62006-09-04 Katsumi Yamaoka <yamaoka@jpl.org>
7
8 * rfc2047.el (rfc2047-strip-backslashes-in-quoted-strings): Decode `\\'
9 in quoted string into `\'.
10
112006-09-01 Katsumi Yamaoka <yamaoka@jpl.org>
12
13 * rfc2047.el (rfc2047-quote-special-characters-in-quoted-strings):
14 Use standard-syntax-table.
15
162006-09-01 Katsumi Yamaoka <yamaoka@jpl.org>
17
18 * gnus-art.el (gnus-decode-address-function): New variable.
19 (article-decode-encoded-words): Use it to decode headers which are
20 assumed to contain addresses.
21 (gnus-mime-delete-part): Remove useless `or'.
22
23 * gnus-sum.el (gnus-decode-encoded-address-function): New variable.
24 (gnus-summary-from-or-to-or-newsgroups): Use it to decode To header.
25 (gnus-nov-parse-line): Use it to decode From header.
26 (gnus-get-newsgroup-headers): Ditto.
27 (gnus-summary-enter-digest-group): Use it to decode `to-address'.
28
29 * mail-parse.el (mail-decode-encoded-address-region): New alias.
30 (mail-decode-encoded-address-string): New alias.
31
32 * rfc2047.el (rfc2047-quote-special-characters-in-quoted-strings):
33 New function.
34 (rfc2047-encode-message-header, rfc2047-encode-region): Use it.
35 (rfc2047-strip-backslashes-in-quoted-strings): New fnction.
36 (rfc2047-decode-region): Use it; add optional argument `address-mime'.
37 (rfc2047-decode-string): Ditto.
38 (rfc2047-decode-address-region): New function.
39 (rfc2047-decode-address-string): New function.
40
12006-08-23 Andreas Seltenreich <uwi7@rz.uni-karlsruhe.de> 412006-08-23 Andreas Seltenreich <uwi7@rz.uni-karlsruhe.de>
2 42
3 [ Backported bug fix from No Gnus. ] 43 [ Backported bug fix from No Gnus. ]
@@ -389,10 +429,6 @@
389 * gnus-sum.el (gnus-get-newsgroup-headers-xover): Group is an 429 * gnus-sum.el (gnus-get-newsgroup-headers-xover): Group is an
390 optional parameter. 430 optional parameter.
391 431
3922006-04-07 Reiner Steib <Reiner.Steib@gmx.de>
393
394 * pgg-gpg.el: Revert to revision 7.15 to allow the use of gpg-agent.
395
3962006-04-06 Reiner Steib <Reiner.Steib@gmx.de> 4322006-04-06 Reiner Steib <Reiner.Steib@gmx.de>
397 433
398 * gnus-fun.el (gnus): Require it for gnus-directory. 434 * gnus-fun.el (gnus): Require it for gnus-directory.
diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el
index 39292e33a1f..17cbbeb0a75 100644
--- a/lisp/gnus/gnus-art.el
+++ b/lisp/gnus/gnus-art.el
@@ -853,6 +853,9 @@ be displayed by the first non-nil matching CONTENT face."
853(defvar gnus-decode-header-function 'mail-decode-encoded-word-region 853(defvar gnus-decode-header-function 'mail-decode-encoded-word-region
854 "Function used to decode headers.") 854 "Function used to decode headers.")
855 855
856(defvar gnus-decode-address-function 'mail-decode-encoded-address-region
857 "Function used to decode addresses.")
858
856(defvar gnus-article-dumbquotes-map 859(defvar gnus-article-dumbquotes-map
857 '(("\200" "EUR") 860 '(("\200" "EUR")
858 ("\202" ",") 861 ("\202" ",")
@@ -2377,10 +2380,23 @@ If PROMPT (the prefix), prompt for a coding system to use."
2377 (set-buffer gnus-summary-buffer) 2380 (set-buffer gnus-summary-buffer)
2378 (error)) 2381 (error))
2379 gnus-newsgroup-ignored-charsets)) 2382 gnus-newsgroup-ignored-charsets))
2380 (inhibit-read-only t)) 2383 (inhibit-read-only t)
2384 start)
2381 (save-restriction 2385 (save-restriction
2382 (article-narrow-to-head) 2386 (article-narrow-to-head)
2383 (funcall gnus-decode-header-function (point-min) (point-max))))) 2387 (while (not (eobp))
2388 (setq start (point))
2389 (if (prog1
2390 (looking-at "\
2391\\(?:Resent-\\)?\\(?:From\\|Cc\\|To\\|Bcc\\|\\(?:In-\\)?Reply-To\\|Sender\
2392\\|Mail-Followup-To\\|Mail-Copies-To\\|Approved\\):")
2393 (while (progn
2394 (forward-line)
2395 (if (eobp)
2396 nil
2397 (memq (char-after) '(?\t ? ))))))
2398 (funcall gnus-decode-address-function start (point))
2399 (funcall gnus-decode-header-function start (point)))))))
2384 2400
2385(defun article-decode-group-name () 2401(defun article-decode-group-name ()
2386 "Decode group names in `Newsgroups:'." 2402 "Decode group names in `Newsgroups:'."
@@ -4324,9 +4340,8 @@ Deleting parts may malfunction or destroy the article; continue? ")
4324 (handles gnus-article-mime-handles) 4340 (handles gnus-article-mime-handles)
4325 (none "(none)") 4341 (none "(none)")
4326 (description 4342 (description
4327 (or 4343 (mail-decode-encoded-word-string (or (mm-handle-description data)
4328 (mail-decode-encoded-word-string (or (mm-handle-description data) 4344 none)))
4329 none))))
4330 (filename 4345 (filename
4331 (or (mail-content-type-get (mm-handle-disposition data) 'filename) 4346 (or (mail-content-type-get (mm-handle-disposition data) 'filename)
4332 none)) 4347 none))
diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el
index b94d093329a..7d91d4db5aa 100644
--- a/lisp/gnus/gnus-sum.el
+++ b/lisp/gnus/gnus-sum.el
@@ -992,7 +992,11 @@ which it may alter in any way."
992 :group 'gnus-summary) 992 :group 'gnus-summary)
993 993
994(defvar gnus-decode-encoded-word-function 'mail-decode-encoded-word-string 994(defvar gnus-decode-encoded-word-function 'mail-decode-encoded-word-string
995 "Variable that says which function should be used to decode a string with encoded words.") 995 "Function used to decode a string with encoded words.")
996
997(defvar gnus-decode-encoded-address-function
998 'mail-decode-encoded-address-string
999 "Function used to decode addresses with encoded words.")
996 1000
997(defcustom gnus-extra-headers '(To Newsgroups) 1001(defcustom gnus-extra-headers '(To Newsgroups)
998 "*Extra headers to parse." 1002 "*Extra headers to parse."
@@ -1001,7 +1005,7 @@ which it may alter in any way."
1001 :type '(repeat symbol)) 1005 :type '(repeat symbol))
1002 1006
1003(defcustom gnus-ignored-from-addresses 1007(defcustom gnus-ignored-from-addresses
1004 (and user-mail-address 1008 (and user-mail-address
1005 (not (string= user-mail-address "")) 1009 (not (string= user-mail-address ""))
1006 (regexp-quote user-mail-address)) 1010 (regexp-quote user-mail-address))
1007 "*Regexp of From headers that may be suppressed in favor of To headers." 1011 "*Regexp of From headers that may be suppressed in favor of To headers."
@@ -3436,7 +3440,7 @@ buffer that was in action when the last article was fetched."
3436 (concat "-> " 3440 (concat "-> "
3437 (inline 3441 (inline
3438 (gnus-summary-extract-address-component 3442 (gnus-summary-extract-address-component
3439 (funcall gnus-decode-encoded-word-function to))))) 3443 (funcall gnus-decode-encoded-address-function to)))))
3440 ((setq newsgroups (cdr (assq 'Newsgroups extra-headers))) 3444 ((setq newsgroups (cdr (assq 'Newsgroups extra-headers)))
3441 (concat "=> " newsgroups))))) 3445 (concat "=> " newsgroups)))))
3442 (inline (gnus-summary-extract-address-component gnus-tmp-from))))) 3446 (inline (gnus-summary-extract-address-component gnus-tmp-from)))))
@@ -4182,7 +4186,7 @@ Returns HEADER if it was entered in the DEPENDENCIES. Returns nil otherwise."
4182 (error x)) 4186 (error x))
4183 (condition-case () ; from 4187 (condition-case () ; from
4184 (gnus-remove-odd-characters 4188 (gnus-remove-odd-characters
4185 (funcall gnus-decode-encoded-word-function 4189 (funcall gnus-decode-encoded-address-function
4186 (setq x (nnheader-nov-field)))) 4190 (setq x (nnheader-nov-field))))
4187 (error x)) 4191 (error x))
4188 (nnheader-nov-field) ; date 4192 (nnheader-nov-field) ; date
@@ -5956,7 +5960,7 @@ The resulting hash table is returned, or nil if no Xrefs were found."
5956 (progn 5960 (progn
5957 (goto-char p) 5961 (goto-char p)
5958 (if (search-forward "\nfrom:" nil t) 5962 (if (search-forward "\nfrom:" nil t)
5959 (funcall gnus-decode-encoded-word-function 5963 (funcall gnus-decode-encoded-address-function
5960 (nnheader-header-value)) 5964 (nnheader-header-value))
5961 "(nobody)")) 5965 "(nobody)"))
5962 ;; Date. 5966 ;; Date.
@@ -8449,10 +8453,11 @@ to guess what the document format is."
8449 ;; the parent article. 8453 ;; the parent article.
8450 (when (setq to-address (or (gnus-fetch-field "reply-to") 8454 (when (setq to-address (or (gnus-fetch-field "reply-to")
8451 (gnus-fetch-field "from"))) 8455 (gnus-fetch-field "from")))
8452 (setq params (append 8456 (setq params
8453 (list (cons 'to-address 8457 (append
8454 (funcall gnus-decode-encoded-word-function 8458 (list (cons 'to-address
8455 to-address)))))) 8459 (funcall gnus-decode-encoded-address-function
8460 to-address))))))
8456 (setq dig (nnheader-set-temp-buffer " *gnus digest buffer*")) 8461 (setq dig (nnheader-set-temp-buffer " *gnus digest buffer*"))
8457 (insert-buffer-substring gnus-original-article-buffer) 8462 (insert-buffer-substring gnus-original-article-buffer)
8458 ;; Remove lines that may lead nndoc to misinterpret the 8463 ;; Remove lines that may lead nndoc to misinterpret the
diff --git a/lisp/gnus/mail-parse.el b/lisp/gnus/mail-parse.el
index 6a9a4755bb2..3c1aa8111c2 100644
--- a/lisp/gnus/mail-parse.el
+++ b/lisp/gnus/mail-parse.el
@@ -70,6 +70,8 @@
70(defalias 'mail-encode-encoded-word-string 'rfc2047-encode-string) 70(defalias 'mail-encode-encoded-word-string 'rfc2047-encode-string)
71(defalias 'mail-decode-encoded-word-region 'rfc2047-decode-region) 71(defalias 'mail-decode-encoded-word-region 'rfc2047-decode-region)
72(defalias 'mail-decode-encoded-word-string 'rfc2047-decode-string) 72(defalias 'mail-decode-encoded-word-string 'rfc2047-decode-string)
73(defalias 'mail-decode-encoded-address-region 'rfc2047-decode-address-region)
74(defalias 'mail-decode-encoded-address-string 'rfc2047-decode-address-string)
73 75
74(provide 'mail-parse) 76(provide 'mail-parse)
75 77
diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el
index 4ee87933967..f8d3a32a515 100644
--- a/lisp/gnus/message.el
+++ b/lisp/gnus/message.el
@@ -3897,9 +3897,15 @@ If you always want Gnus to send messages in one piece, set
3897 'call-process-region 3897 'call-process-region
3898 (append 3898 (append
3899 (list (point-min) (point-max) 3899 (list (point-min) (point-max)
3900 (if (boundp 'sendmail-program) 3900 (cond ((boundp 'sendmail-program)
3901 sendmail-program 3901 sendmail-program)
3902 "/usr/lib/sendmail") 3902 ((file-exists-p "/usr/sbin/sendmail")
3903 "/usr/sbin/sendmail")
3904 ((file-exists-p "/usr/lib/sendmail")
3905 "/usr/lib/sendmail")
3906 ((file-exists-p "/usr/ucblib/sendmail")
3907 "/usr/ucblib/sendmail")
3908 (t "fakemail"))
3903 nil errbuf nil "-oi") 3909 nil errbuf nil "-oi")
3904 ;; Always specify who from, 3910 ;; Always specify who from,
3905 ;; since some systems have broken sendmails. 3911 ;; since some systems have broken sendmails.
diff --git a/lisp/gnus/rfc2047.el b/lisp/gnus/rfc2047.el
index f282795a0ab..534459683ce 100644
--- a/lisp/gnus/rfc2047.el
+++ b/lisp/gnus/rfc2047.el
@@ -171,6 +171,40 @@ This is either `base64' or `quoted-printable'."
171 (re-search-forward ":[ \t\n]*" nil t) 171 (re-search-forward ":[ \t\n]*" nil t)
172 (buffer-substring-no-properties (point) (point-max))))) 172 (buffer-substring-no-properties (point) (point-max)))))
173 173
174(defun rfc2047-quote-special-characters-in-quoted-strings (&optional
175 encodable-regexp)
176 "Quote special characters with `\\'s in quoted strings.
177Quoting will not be done in a quoted string if it contains characters
178matching ENCODABLE-REGEXP."
179 (goto-char (point-min))
180 (let ((tspecials (concat "[" ietf-drums-tspecials "]"))
181 beg)
182 (with-syntax-table (standard-syntax-table)
183 (while (search-forward "\"" nil t)
184 (unless (eq (char-before) ?\\)
185 (setq beg (match-end 0))
186 (goto-char (match-beginning 0))
187 (condition-case nil
188 (progn
189 (forward-sexp)
190 (save-restriction
191 (narrow-to-region beg (1- (point)))
192 (goto-char beg)
193 (unless (and encodable-regexp
194 (re-search-forward encodable-regexp nil t))
195 (while (re-search-forward tspecials nil 'move)
196 (unless (and (eq (char-before) ?\\) ;; Already quoted.
197 (looking-at tspecials))
198 (goto-char (match-beginning 0))
199 (unless (or (eq (char-before) ?\\)
200 (and rfc2047-encode-encoded-words
201 (eq (char-after) ??)
202 (eq (char-before) ?=)))
203 (insert "\\")))
204 (forward-char)))))
205 (error
206 (goto-char beg))))))))
207
174(defvar rfc2047-encoding-type 'address-mime 208(defvar rfc2047-encoding-type 'address-mime
175 "The type of encoding done by `rfc2047-encode-region'. 209 "The type of encoding done by `rfc2047-encode-region'.
176This should be dynamically bound around calls to 210This should be dynamically bound around calls to
@@ -187,8 +221,18 @@ Should be called narrowed to the head of the message."
187 (while (not (eobp)) 221 (while (not (eobp))
188 (save-restriction 222 (save-restriction
189 (rfc2047-narrow-to-field) 223 (rfc2047-narrow-to-field)
224 (setq method nil
225 alist rfc2047-header-encoding-alist)
226 (while (setq elem (pop alist))
227 (when (or (and (stringp (car elem))
228 (looking-at (car elem)))
229 (eq (car elem) t))
230 (setq alist nil
231 method (cdr elem))))
190 (if (not (rfc2047-encodable-p)) 232 (if (not (rfc2047-encodable-p))
191 (prog1 233 (prog2
234 (when (eq method 'address-mime)
235 (rfc2047-quote-special-characters-in-quoted-strings))
192 (if (and (eq (mm-body-7-or-8) '8bit) 236 (if (and (eq (mm-body-7-or-8) '8bit)
193 (mm-multibyte-p) 237 (mm-multibyte-p)
194 (mm-coding-system-p 238 (mm-coding-system-p
@@ -209,14 +253,6 @@ Should be called narrowed to the head of the message."
209 (point)) 253 (point))
210 (point-max)))) 254 (point-max))))
211 ;; We found something that may perhaps be encoded. 255 ;; We found something that may perhaps be encoded.
212 (setq method nil
213 alist rfc2047-header-encoding-alist)
214 (while (setq elem (pop alist))
215 (when (or (and (stringp (car elem))
216 (looking-at (car elem)))
217 (eq (car elem) t))
218 (setq alist nil
219 method (cdr elem))))
220 (re-search-forward "^[^:]+: *" nil t) 256 (re-search-forward "^[^:]+: *" nil t)
221 (cond 257 (cond
222 ((eq method 'address-mime) 258 ((eq method 'address-mime)
@@ -347,6 +383,7 @@ Dynamically bind `rfc2047-encoding-type' to change that."
347 (rfc2047-encode start (point)) 383 (rfc2047-encode start (point))
348 (goto-char end)))) 384 (goto-char end))))
349 ;; `address-mime' case -- take care of quoted words, comments. 385 ;; `address-mime' case -- take care of quoted words, comments.
386 (rfc2047-quote-special-characters-in-quoted-strings encodable-regexp)
350 (with-syntax-table rfc2047-syntax-table 387 (with-syntax-table rfc2047-syntax-table
351 (goto-char (point-min)) 388 (goto-char (point-min))
352 (condition-case err ; in case of unbalanced quotes 389 (condition-case err ; in case of unbalanced quotes
@@ -821,6 +858,29 @@ encoded-word, concatenate them, and decode it by charset. Otherwise,
821the decoder will fully decode each encoded-word before concatenating 858the decoder will fully decode each encoded-word before concatenating
822them.") 859them.")
823 860
861(defun rfc2047-strip-backslashes-in-quoted-strings ()
862 "Strip backslashes in quoted strings. `\\\"' remains."
863 (goto-char (point-min))
864 (let (beg)
865 (with-syntax-table (standard-syntax-table)
866 (while (search-forward "\"" nil t)
867 (unless (eq (char-before) ?\\)
868 (setq beg (match-end 0))
869 (goto-char (match-beginning 0))
870 (condition-case nil
871 (progn
872 (forward-sexp)
873 (save-restriction
874 (narrow-to-region beg (1- (point)))
875 (goto-char beg)
876 (while (search-forward "\\" nil 'move)
877 (unless (memq (char-after) '(?\"))
878 (delete-backward-char 1))
879 (forward-char)))
880 (forward-char))
881 (error
882 (goto-char beg))))))))
883
824(defun rfc2047-charset-to-coding-system (charset) 884(defun rfc2047-charset-to-coding-system (charset)
825 "Return coding-system corresponding to MIME CHARSET. 885 "Return coding-system corresponding to MIME CHARSET.
826If your Emacs implementation can't decode CHARSET, return nil." 886If your Emacs implementation can't decode CHARSET, return nil."
@@ -898,8 +958,10 @@ ENCODED-WORD)."
898;; and worthwhile (is it more correct or not?), e.g. something like 958;; and worthwhile (is it more correct or not?), e.g. something like
899;; `=?iso-8859-1?q?foo?=@'. 959;; `=?iso-8859-1?q?foo?=@'.
900 960
901(defun rfc2047-decode-region (start end) 961(defun rfc2047-decode-region (start end &optional address-mime)
902 "Decode MIME-encoded words in region between START and END." 962 "Decode MIME-encoded words in region between START and END.
963If ADDRESS-MIME is non-nil, strip backslashes which precede characters
964other than `\"' and `\\' in quoted strings."
903 (interactive "r") 965 (interactive "r")
904 (let ((case-fold-search t) 966 (let ((case-fold-search t)
905 (eword-regexp (eval-when-compile 967 (eword-regexp (eval-when-compile
@@ -910,6 +972,8 @@ ENCODED-WORD)."
910 (save-excursion 972 (save-excursion
911 (save-restriction 973 (save-restriction
912 (narrow-to-region start end) 974 (narrow-to-region start end)
975 (when address-mime
976 (rfc2047-strip-backslashes-in-quoted-strings))
913 (goto-char (setq b start)) 977 (goto-char (setq b start))
914 ;; Look for the encoded-words. 978 ;; Look for the encoded-words.
915 (while (setq match (re-search-forward eword-regexp nil t)) 979 (while (setq match (re-search-forward eword-regexp nil t))
@@ -995,8 +1059,16 @@ ENCODED-WORD)."
995 (not (eq mail-parse-charset 'gnus-decoded))) 1059 (not (eq mail-parse-charset 'gnus-decoded)))
996 (mm-decode-coding-region b (point-max) mail-parse-charset)))))) 1060 (mm-decode-coding-region b (point-max) mail-parse-charset))))))
997 1061
998(defun rfc2047-decode-string (string) 1062(defun rfc2047-decode-address-region (start end)
999 "Decode the quoted-printable-encoded STRING and return the results." 1063 "Decode MIME-encoded words in region between START and END.
1064Backslashes which precede characters other than `\"' and `\\' in quoted
1065strings are stripped."
1066 (rfc2047-decode-region start end t))
1067
1068(defun rfc2047-decode-string (string &optional address-mime)
1069 "Decode MIME-encoded STRING and return the result.
1070If ADDRESS-MIME is non-nil, strip backslashes which precede characters
1071other than `\"' and `\\' in quoted strings."
1000 (let ((m (mm-multibyte-p))) 1072 (let ((m (mm-multibyte-p)))
1001 (if (string-match "=\\?" string) 1073 (if (string-match "=\\?" string)
1002 (with-temp-buffer 1074 (with-temp-buffer
@@ -1010,8 +1082,16 @@ ENCODED-WORD)."
1010 (mm-enable-multibyte)) 1082 (mm-enable-multibyte))
1011 (insert string) 1083 (insert string)
1012 (inline 1084 (inline
1013 (rfc2047-decode-region (point-min) (point-max))) 1085 (rfc2047-decode-region (point-min) (point-max) address-mime))
1014 (buffer-string)) 1086 (buffer-string))
1087 (when address-mime
1088 (setq string
1089 (with-temp-buffer
1090 (when (mm-multibyte-string-p string)
1091 (mm-enable-multibyte))
1092 (insert string)
1093 (rfc2047-strip-backslashes-in-quoted-strings)
1094 (buffer-string))))
1015 ;; Fixme: As above, `m' here is inappropriate. 1095 ;; Fixme: As above, `m' here is inappropriate.
1016 (if (and m 1096 (if (and m
1017 mail-parse-charset 1097 mail-parse-charset
@@ -1033,6 +1113,12 @@ ENCODED-WORD)."
1033 (mm-decode-coding-string string mail-parse-charset)) 1113 (mm-decode-coding-string string mail-parse-charset))
1034 (mm-string-as-multibyte string))))) 1114 (mm-string-as-multibyte string)))))
1035 1115
1116(defun rfc2047-decode-address-string (string)
1117 "Decode MIME-encoded STRING and return the result.
1118Backslashes which precede characters other than `\"' and `\\' in quoted
1119strings are stripped."
1120 (rfc2047-decode-string string t))
1121
1036(defun rfc2047-pad-base64 (string) 1122(defun rfc2047-pad-base64 (string)
1037 "Pad STRING to quartets." 1123 "Pad STRING to quartets."
1038 ;; Be more liberal to accept buggy base64 strings. If 1124 ;; Be more liberal to accept buggy base64 strings. If
diff --git a/lisp/hl-line.el b/lisp/hl-line.el
index c2d2d293010..757a398086d 100644
--- a/lisp/hl-line.el
+++ b/lisp/hl-line.el
@@ -64,16 +64,37 @@
64 64
65;;; Code: 65;;; Code:
66 66
67(defvar hl-line-overlay nil
68 "Overlay used by Hl-Line mode to highlight the current line.")
69(make-variable-buffer-local 'hl-line-overlay)
70
71(defvar global-hl-line-overlay nil
72 "Overlay used by Global-Hl-Line mode to highlight the current line.")
73
67(defgroup hl-line nil 74(defgroup hl-line nil
68 "Highlight the current line." 75 "Highlight the current line."
69 :version "21.1" 76 :version "21.1"
70 :group 'editing) 77 :group 'editing)
71 78
72(defcustom hl-line-face 'highlight 79(defface hl-line
73 "Face with which to highlight the current line." 80 '((t :inherit highlight))
74 :type 'face 81 "Default face for highlighting the current line in Hl-Line mode."
82 :version "22.1"
75 :group 'hl-line) 83 :group 'hl-line)
76 84
85(defcustom hl-line-face 'hl-line
86 "Face with which to highlight the current line in Hl-Line mode."
87 :type 'face
88 :group 'hl-line
89 :set (lambda (symbol value)
90 (set symbol value)
91 (dolist (buffer (buffer-list))
92 (with-current-buffer buffer
93 (when hl-line-overlay
94 (overlay-put hl-line-overlay 'face hl-line-face))))
95 (when global-hl-line-overlay
96 (overlay-put global-hl-line-overlay 'face hl-line-face))))
97
77(defcustom hl-line-sticky-flag t 98(defcustom hl-line-sticky-flag t
78 "*Non-nil means highlight the current line in all windows. 99 "*Non-nil means highlight the current line in all windows.
79Otherwise Hl-Line mode will highlight only in the selected 100Otherwise Hl-Line mode will highlight only in the selected
@@ -92,13 +113,6 @@ It should return nil if there's no region to be highlighted.
92 113
93This variable is expected to be made buffer-local by modes.") 114This variable is expected to be made buffer-local by modes.")
94 115
95(defvar hl-line-overlay nil
96 "Overlay used by Hl-Line mode to highlight the current line.")
97(make-variable-buffer-local 'hl-line-overlay)
98
99(defvar global-hl-line-overlay nil
100 "Overlay used by Global-Hl-Line mode to highlight the current line.")
101
102;;;###autoload 116;;;###autoload
103(define-minor-mode hl-line-mode 117(define-minor-mode hl-line-mode
104 "Buffer-local minor mode to highlight the line about point. 118 "Buffer-local minor mode to highlight the line about point.
diff --git a/lisp/ibuffer.el b/lisp/ibuffer.el
index 29767cee7f6..04672f6e29f 100644
--- a/lisp/ibuffer.el
+++ b/lisp/ibuffer.el
@@ -1972,12 +1972,12 @@ the value of point at the beginning of the line for that buffer."
1972 (not (eq ibuffer-buf buf)))))) 1972 (not (eq ibuffer-buf buf))))))
1973 1973
1974;; This function is a special case; it's not defined by 1974;; This function is a special case; it's not defined by
1975;; `ibuffer-define-sorter'. 1975;; `define-ibuffer-sorter'.
1976(defun ibuffer-do-sort-by-recency () 1976(defun ibuffer-do-sort-by-recency ()
1977 "Sort the buffers by last view time." 1977 "Sort the buffers by last view time."
1978 (interactive) 1978 (interactive)
1979 (setq ibuffer-sorting-mode 'recency) 1979 (setq ibuffer-sorting-mode 'recency)
1980 (ibuffer-redisplay t)) 1980 (ibuffer-update nil t))
1981 1981
1982(defun ibuffer-update-format () 1982(defun ibuffer-update-format ()
1983 (when (null ibuffer-current-format) 1983 (when (null ibuffer-current-format)
diff --git a/lisp/image-mode.el b/lisp/image-mode.el
index 523ef3f73a8..66f719ae1eb 100644
--- a/lisp/image-mode.el
+++ b/lisp/image-mode.el
@@ -60,16 +60,19 @@ to toggle between display as an image and display as text."
60 (setq major-mode 'image-mode) 60 (setq major-mode 'image-mode)
61 (use-local-map image-mode-map) 61 (use-local-map image-mode-map)
62 (add-hook 'change-major-mode-hook 'image-toggle-display-text nil t) 62 (add-hook 'change-major-mode-hook 'image-toggle-display-text nil t)
63 (if (not (get-text-property (point-min) 'display)) 63 (if (and (display-images-p)
64 (not (get-text-property (point-min) 'display)))
64 (image-toggle-display) 65 (image-toggle-display)
65 ;; Set next vars when image is already displayed but local 66 ;; Set next vars when image is already displayed but local
66 ;; variables were cleared by kill-all-local-variables 67 ;; variables were cleared by kill-all-local-variables
67 (setq cursor-type nil truncate-lines t)) 68 (setq cursor-type nil truncate-lines t))
68 (run-mode-hooks 'image-mode-hook) 69 (run-mode-hooks 'image-mode-hook)
69 (message "%s" (concat (substitute-command-keys 70 (if (display-images-p)
70 "Type \\[image-toggle-display] to view the image as ") 71 (message "%s" (concat
71 (if (get-text-property (point-min) 'display) 72 (substitute-command-keys
72 "text" "an image") "."))) 73 "Type \\[image-toggle-display] to view the image as ")
74 (if (get-text-property (point-min) 'display)
75 "text" "an image") "."))))
73 76
74;;;###autoload 77;;;###autoload
75(define-minor-mode image-minor-mode 78(define-minor-mode image-minor-mode
diff --git a/lisp/imenu.el b/lisp/imenu.el
index d9c75c5fdd4..ed190c24e12 100644
--- a/lisp/imenu.el
+++ b/lisp/imenu.el
@@ -967,15 +967,15 @@ A trivial interface to `imenu-add-to-menubar' suitable for use in a hook."
967(defvar imenu-buffer-menubar nil) 967(defvar imenu-buffer-menubar nil)
968 968
969(defvar imenu-menubar-modified-tick 0 969(defvar imenu-menubar-modified-tick 0
970 "The value of (buffer-modified-tick) as of last call to `imenu-update-menubar'.") 970 "The value of (buffer-chars-modified-tick) as of the last call
971to `imenu-update-menubar'.")
971(make-variable-buffer-local 'imenu-menubar-modified-tick) 972(make-variable-buffer-local 'imenu-menubar-modified-tick)
972 973
973(defun imenu-update-menubar () 974(defun imenu-update-menubar ()
974 (when (and (current-local-map) 975 (when (and (current-local-map)
975 (keymapp (lookup-key (current-local-map) [menu-bar index])) 976 (keymapp (lookup-key (current-local-map) [menu-bar index]))
976 (not (eq (buffer-modified-tick) 977 (/= (buffer-chars-modified-tick) imenu-menubar-modified-tick))
977 imenu-menubar-modified-tick))) 978 (setq imenu-menubar-modified-tick (buffer-chars-modified-tick))
978 (setq imenu-menubar-modified-tick (buffer-modified-tick))
979 (let ((index-alist (imenu--make-index-alist t))) 979 (let ((index-alist (imenu--make-index-alist t)))
980 ;; Don't bother updating if the index-alist has not changed 980 ;; Don't bother updating if the index-alist has not changed
981 ;; since the last time we did it. 981 ;; since the last time we did it.
diff --git a/lisp/international/quail.el b/lisp/international/quail.el
index 36a828d2142..75de3e1f271 100644
--- a/lisp/international/quail.el
+++ b/lisp/international/quail.el
@@ -1095,8 +1095,8 @@ Optional 5th arg DECODE-MAP is a Quail decode map.
1095 1095
1096Optional 6th arg PROPS is a property list annotating TRANS. See the 1096Optional 6th arg PROPS is a property list annotating TRANS. See the
1097function `quail-define-rules' for the detail." 1097function `quail-define-rules' for the detail."
1098 (if (null (stringp key)) 1098 (if (not (or (stringp key) (vectorp key)))
1099 "Invalid Quail key `%s'" key) 1099 (error "Invalid Quail key `%s'" key))
1100 (if (not (or (numberp trans) (stringp trans) (vectorp trans) 1100 (if (not (or (numberp trans) (stringp trans) (vectorp trans)
1101 (consp trans) 1101 (consp trans)
1102 (symbolp trans) 1102 (symbolp trans)
diff --git a/lisp/mail/feedmail.el b/lisp/mail/feedmail.el
index 3bd287541cf..04928fb537b 100644
--- a/lisp/mail/feedmail.el
+++ b/lisp/mail/feedmail.el
@@ -1340,7 +1340,15 @@ complicated cases."
1340 (set-buffer prepped) 1340 (set-buffer prepped)
1341 (apply 'call-process-region 1341 (apply 'call-process-region
1342 (append (list (point-min) (point-max) 1342 (append (list (point-min) (point-max)
1343 (if (boundp 'sendmail-program) sendmail-program "/usr/lib/sendmail") 1343 (cond ((boundp 'sendmail-program)
1344 sendmail-program)
1345 ((file-exists-p "/usr/sbin/sendmail")
1346 "/usr/sbin/sendmail")
1347 ((file-exists-p "/usr/lib/sendmail")
1348 "/usr/lib/sendmail")
1349 ((file-exists-p "/usr/ucblib/sendmail")
1350 "/usr/ucblib/sendmail")
1351 (t "fakemail"))
1344 nil errors-to nil "-oi" "-t") 1352 nil errors-to nil "-oi" "-t")
1345 ;; provide envelope "from" to sendmail; results will vary 1353 ;; provide envelope "from" to sendmail; results will vary
1346 (list "-f" user-mail-address) 1354 (list "-f" user-mail-address)
diff --git a/lisp/mail/rmail-spam-filter.el b/lisp/mail/rmail-spam-filter.el
index 933e1f6c8a2..bba23111612 100644
--- a/lisp/mail/rmail-spam-filter.el
+++ b/lisp/mail/rmail-spam-filter.el
@@ -134,12 +134,11 @@ spam, as one of the fields of `rsf-definitions-alist'"
134 :group 'rmail-spam-filter ) 134 :group 'rmail-spam-filter )
135 135
136(defcustom rsf-min-region-to-spam-list 7 136(defcustom rsf-min-region-to-spam-list 7
137 "*User may highlight a region in an incomming message and use 137 "*Minimum size of region that you can add to the spam list.
138 the menubar to add this region to the spam definitions. This 138This is a size limit on text that you can specify as
139 variable specifies the minimum size of region that may be added 139indicating a message is spam. The aim is to avoid
140 to spam list, to avoid accidentally adding a too short region 140accidentally adding a too short region, which would result
141 which would result in false positive identification of spam 141in false positive identification of spam."
142 messages."
143 :type 'integer 142 :type 'integer
144 :group 'rmail-spam-filter ) 143 :group 'rmail-spam-filter )
145 144
@@ -212,8 +211,8 @@ specify 'this\\&that' in the appropriate spam definition field."
212 :group 'rmail-spam-filter) 211 :group 'rmail-spam-filter)
213 212
214(defvar rsf-scanning-messages-now nil 213(defvar rsf-scanning-messages-now nil
215 "Non nil when rmail-spam-filter scans messages, 214 "Non nil when `rmail-spam-filter' scans messages.
216for interaction with `rsf-bbdb-auto-delete-spam-entries'") 215This is for interaction with `rsf-bbdb-auto-delete-spam-entries'.")
217 216
218;; the advantage over the automatic filter definitions is the AND conjunction 217;; the advantage over the automatic filter definitions is the AND conjunction
219;; of in-one-definition-elements 218;; of in-one-definition-elements
@@ -596,8 +595,8 @@ Added to spam definitions as a contents field."
596(define-key rmail-mode-map "\C-cSt" 'rsf-add-subject-to-spam-list) 595(define-key rmail-mode-map "\C-cSt" 'rsf-add-subject-to-spam-list)
597 596
598(defun rsf-add-content-type-field () 597(defun rsf-add-content-type-field ()
599 "Maintain backward compatibility with previous versions of rmail-spam-filter. 598 "Maintain backward compatibility for `rmail-spam-filter'.
600The most recent version of rmai-spam-filter checks the contents 599The most recent version of `rmail-spam-filter' checks the contents
601field of the incoming mail to see if it spam. The format of 600field of the incoming mail to see if it spam. The format of
602`rsf-definitions-alist' has therefore changed. This function 601`rsf-definitions-alist' has therefore changed. This function
603checks to see if old format is used, and if it is, it converts 602checks to see if old format is used, and if it is, it converts
diff --git a/lisp/mail/sendmail.el b/lisp/mail/sendmail.el
index 0760aa648ec..7e9da94b100 100644
--- a/lisp/mail/sendmail.el
+++ b/lisp/mail/sendmail.el
@@ -48,6 +48,16 @@
48 :group 'sendmail 48 :group 'sendmail
49 :version "22.1") 49 :version "22.1")
50 50
51(defcustom sendmail-program
52 (cond
53 ((file-exists-p "/usr/sbin/sendmail") "/usr/sbin/sendmail")
54 ((file-exists-p "/usr/lib/sendmail") "/usr/lib/sendmail")
55 ((file-exists-p "/usr/ucblib/sendmail") "/usr/ucblib/sendmail")
56 (t "fakemail")) ;In ../etc, to interface to /bin/mail.
57 "Program used to send messages."
58 :group 'mail
59 :type 'file)
60
51;;;###autoload 61;;;###autoload
52(defcustom mail-from-style 'angles 62(defcustom mail-from-style 'angles
53 "Specifies how \"From:\" fields look. 63 "Specifies how \"From:\" fields look.
diff --git a/lisp/man.el b/lisp/man.el
index 77c089b9d8d..2351853eeca 100644
--- a/lisp/man.el
+++ b/lisp/man.el
@@ -388,6 +388,8 @@ Otherwise, the value is whatever the function
388/\e\\[[0-9][0-9]*m/ s///g" 388/\e\\[[0-9][0-9]*m/ s///g"
389 "Script for berkeley-like sed to nuke backspaces and ANSI codes from manpages.") 389 "Script for berkeley-like sed to nuke backspaces and ANSI codes from manpages.")
390 390
391(defvar Man-topic-history nil "Topic read history.")
392
391(defvar man-mode-syntax-table 393(defvar man-mode-syntax-table
392 (let ((table (copy-syntax-table (standard-syntax-table)))) 394 (let ((table (copy-syntax-table (standard-syntax-table))))
393 (modify-syntax-entry ?. "w" table) 395 (modify-syntax-entry ?. "w" table)
@@ -686,7 +688,7 @@ all sections related to a subject, put something appropriate into the
686 (if (string= default-entry "") 688 (if (string= default-entry "")
687 ": " 689 ": "
688 (format " (default %s): " default-entry))) 690 (format " (default %s): " default-entry)))
689 nil nil default-entry))) 691 nil 'Man-topic-history default-entry)))
690 (if (string= input "") 692 (if (string= input "")
691 (error "No man args given") 693 (error "No man args given")
692 input)))) 694 input))))
diff --git a/lisp/net/rcirc.el b/lisp/net/rcirc.el
index c34ac7dcf78..8c678b6ae5f 100644
--- a/lisp/net/rcirc.el
+++ b/lisp/net/rcirc.el
@@ -144,7 +144,9 @@ number. If zero or nil, no truncating is done."
144 144
145(defcustom rcirc-show-maximum-output t 145(defcustom rcirc-show-maximum-output t
146 "*If non-nil, scroll buffer to keep the point at the bottom of 146 "*If non-nil, scroll buffer to keep the point at the bottom of
147the window.") 147the window."
148 :type 'boolean
149 :group 'rcirc)
148 150
149(defcustom rcirc-authinfo nil 151(defcustom rcirc-authinfo nil
150 "List of authentication passwords. 152 "List of authentication passwords.
@@ -200,6 +202,11 @@ use either M-x customize or also call `rcirc-update-prompt'."
200 :initialize 'custom-initialize-default 202 :initialize 'custom-initialize-default
201 :group 'rcirc) 203 :group 'rcirc)
202 204
205(defcustom rcirc-keywords nil
206 "List of keywords to highlight in message text."
207 :type '(repeat string)
208 :group 'rcirc)
209
203(defcustom rcirc-ignore-list () 210(defcustom rcirc-ignore-list ()
204 "List of ignored nicks. 211 "List of ignored nicks.
205Use /ignore to list them, use /ignore NICK to add or remove a nick." 212Use /ignore to list them, use /ignore NICK to add or remove a nick."
@@ -212,16 +219,16 @@ When an ignored person renames, their nick is added to both lists.
212Nicks will be removed from the automatic list on follow-up renamings or 219Nicks will be removed from the automatic list on follow-up renamings or
213parts.") 220parts.")
214 221
215(defcustom rcirc-bright-nick-regexp nil 222(defcustom rcirc-bright-nicks nil
216 "Regexp matching nicks to be emphasized. 223 "List of nicks to be emphasized.
217See `rcirc-bright-nick' face." 224See `rcirc-bright-nick' face."
218 :type 'regexp 225 :type '(repeat string)
219 :group 'rcirc) 226 :group 'rcirc)
220 227
221(defcustom rcirc-dim-nick-regexp nil 228(defcustom rcirc-dim-nicks nil
222 "Regexp matching nicks to be deemphasized. 229 "List of nicks to be deemphasized.
223See `rcirc-dim-nick' face." 230See `rcirc-dim-nick' face."
224 :type 'regexp 231 :type '(repeat string)
225 :group 'rcirc) 232 :group 'rcirc)
226 233
227(defcustom rcirc-print-hooks nil 234(defcustom rcirc-print-hooks nil
@@ -246,7 +253,7 @@ Called with 5 arguments, PROCESS, SENDER, RESPONSE, TARGET and TEXT."
246 :group 'rcirc) 253 :group 'rcirc)
247 254
248(defcustom rcirc-coding-system-alist nil 255(defcustom rcirc-coding-system-alist nil
249 "Alist to decide a coding system to use for a file I/O operation. 256 "Alist to decide a coding system to use for a channel I/O operation.
250The format is ((PATTERN . VAL) ...). 257The format is ((PATTERN . VAL) ...).
251PATTERN is either a string or a cons of strings. 258PATTERN is either a string or a cons of strings.
252If PATTERN is a string, it is used to match a target. 259If PATTERN is a string, it is used to match a target.
@@ -528,10 +535,14 @@ Function is called with PROCESS, COMMAND, SENDER, ARGS and LINE.")
528 process cmd sender args text))) 535 process cmd sender args text)))
529 (message "UNHANDLED: %s" text))) 536 (message "UNHANDLED: %s" text)))
530 537
531(defun rcirc-handler-generic (process command sender args text) 538(defvar rcirc-responses-no-activity '("305" "306")
539 "Responses that don't trigger activity in the mode-line indicator.")
540
541(defun rcirc-handler-generic (process response sender args text)
532 "Generic server response handler." 542 "Generic server response handler."
533 (rcirc-print process sender command nil 543 (rcirc-print process sender response nil
534 (mapconcat 'identity (cdr args) " ") t)) 544 (mapconcat 'identity (cdr args) " ")
545 (not (member response rcirc-responses-no-activity))))
535 546
536(defun rcirc-send-string (process string) 547(defun rcirc-send-string (process string)
537 "Send PROCESS a STRING plus a newline." 548 "Send PROCESS a STRING plus a newline."
@@ -748,13 +759,10 @@ If NOTICEP is non-nil, send a notice instead of privmsg."
748 759
749 ;; if the user changes the major mode or kills the buffer, there is 760 ;; if the user changes the major mode or kills the buffer, there is
750 ;; cleanup work to do 761 ;; cleanup work to do
751 (make-local-variable 'change-major-mode-hook) 762 (add-hook 'change-major-mode-hook 'rcirc-change-major-mode-hook nil t)
752 (add-hook 'change-major-mode-hook 'rcirc-change-major-mode-hook) 763 (add-hook 'kill-buffer-hook 'rcirc-kill-buffer-hook nil t)
753 (make-local-variable 'kill-buffer-hook)
754 (add-hook 'kill-buffer-hook 'rcirc-kill-buffer-hook)
755 764
756 (make-local-variable 'window-scroll-functions) 765 (add-hook 'window-scroll-functions 'rcirc-scroll-to-bottom nil t)
757 (add-hook 'window-scroll-functions 'rcirc-scroll-to-bottom)
758 766
759 ;; add to buffer list, and update buffer abbrevs 767 ;; add to buffer list, and update buffer abbrevs
760 (when target ; skip server buffer 768 (when target ; skip server buffer
@@ -941,7 +949,7 @@ Create the buffer if it doesn't exist."
941 (if (fboundp fun) 949 (if (fboundp fun)
942 (funcall fun args process rcirc-target) 950 (funcall fun args process rcirc-target)
943 (rcirc-send-string process 951 (rcirc-send-string process
944 (concat command " " args))))))) 952 (concat command " :" args)))))))
945 953
946(defvar rcirc-parent-buffer nil) 954(defvar rcirc-parent-buffer nil)
947(defvar rcirc-window-configuration nil) 955(defvar rcirc-window-configuration nil)
@@ -1073,7 +1081,8 @@ is found by looking up RESPONSE in `rcirc-response-formats'."
1073 "%") 1081 "%")
1074 ((or (eq key ?n) (eq key ?N)) 1082 ((or (eq key ?n) (eq key ?N))
1075 ;; %n/%N -- nick 1083 ;; %n/%N -- nick
1076 (let ((nick (concat (if (string= (with-rcirc-process-buffer process 1084 (let ((nick (concat (if (string= (with-rcirc-process-buffer
1085 process
1077 rcirc-server) 1086 rcirc-server)
1078 sender) 1087 sender)
1079 "" 1088 ""
@@ -1084,26 +1093,26 @@ is found by looking up RESPONSE in `rcirc-response-formats'."
1084 face 1093 face
1085 (cond ((string= sender (rcirc-nick process)) 1094 (cond ((string= sender (rcirc-nick process))
1086 'rcirc-my-nick) 1095 'rcirc-my-nick)
1087 ((and rcirc-bright-nick-regexp 1096 ((and rcirc-bright-nicks
1088 (string-match rcirc-bright-nick-regexp sender)) 1097 (string-match
1098 (regexp-opt rcirc-bright-nicks)
1099 sender))
1089 'rcirc-bright-nick) 1100 'rcirc-bright-nick)
1090 ((and rcirc-dim-nick-regexp 1101 ((and rcirc-dim-nicks
1091 (string-match rcirc-dim-nick-regexp sender)) 1102 (string-match
1103 (regexp-opt rcirc-dim-nicks)
1104 sender))
1092 'rcirc-dim-nick) 1105 'rcirc-dim-nick)
1093 (t 1106 (t
1094 'rcirc-other-nick)))))) 1107 'rcirc-other-nick))))))
1095 ((eq key ?T) 1108 ((eq key ?T)
1096 ;; %T -- timestamp 1109 ;; %T -- timestamp
1097 (rcirc-facify 1110 (rcirc-facify
1098 (format-time-string rcirc-time-format (current-time)) 1111 (format-time-string rcirc-time-format (current-time))
1099 'rcirc-timestamp)) 1112 'rcirc-timestamp))
1100 ((eq key ?m) 1113 ((eq key ?m)
1101 ;; %m -- message text 1114 ;; %m -- message text
1102 ;; We add the text property `rcirc-text' to identify this 1115 (rcirc-markup-text process sender response (rcirc-facify text face)))
1103 ;; as the body text.
1104 (propertize
1105 (rcirc-mangle-text process (rcirc-facify text face))
1106 'rcirc-text text))
1107 ((eq key ?t) 1116 ((eq key ?t)
1108 ;; %t -- target 1117 ;; %t -- target
1109 (rcirc-facify (or rcirc-target "") face)) 1118 (rcirc-facify (or rcirc-target "") face))
@@ -1152,12 +1161,10 @@ is found by looking up RESPONSE in `rcirc-response-formats'."
1152 ((or (rcirc-get-buffer process target) 1161 ((or (rcirc-get-buffer process target)
1153 (rcirc-any-buffer process)))))) 1162 (rcirc-any-buffer process))))))
1154 1163
1155(defvar rcirc-activity-type nil) 1164(defvar rcirc-activity-types nil)
1156(make-variable-buffer-local 'rcirc-activity-type) 1165(make-variable-buffer-local 'rcirc-activity-types)
1157(defvar rcirc-last-sender nil) 1166(defvar rcirc-last-sender nil)
1158(make-variable-buffer-local 'rcirc-last-sender) 1167(make-variable-buffer-local 'rcirc-last-sender)
1159(defvar rcirc-gray-toggle nil)
1160(make-variable-buffer-local 'rcirc-gray-toggle)
1161 1168
1162(defun rcirc-scroll-to-bottom (window display-start) 1169(defun rcirc-scroll-to-bottom (window display-start)
1163 "Scroll window to show maximum output if `rcirc-show-maximum-output' is 1170 "Scroll window to show maximum output if `rcirc-show-maximum-output' is
@@ -1261,26 +1268,13 @@ record activity."
1261 (buffer-enable-undo)) 1268 (buffer-enable-undo))
1262 1269
1263 ;; record modeline activity 1270 ;; record modeline activity
1264 (when activity 1271 (when (and activity
1265 (let ((nick-match 1272 (not rcirc-ignore-buffer-activity-flag)
1266 (with-syntax-table rcirc-nick-syntax-table 1273 (not (and rcirc-dim-nicks sender
1267 (string-match (concat "\\b" 1274 (string-match (regexp-opt rcirc-dim-nicks) sender))))
1268 (regexp-quote (rcirc-nick process)) 1275 (rcirc-record-activity (current-buffer)
1269 "\\b") 1276 (when (not (rcirc-channel-p rcirc-target))
1270 text)))) 1277 'nick)))
1271 (when (if rcirc-ignore-buffer-activity-flag
1272 ;; - Always notice when our nick is mentioned
1273 nick-match
1274 ;; - unless our nick is mentioned, don't bother us
1275 ;; - with dim-nicks
1276 (or nick-match
1277 (not (and rcirc-dim-nick-regexp sender
1278 (string-match rcirc-dim-nick-regexp sender)))))
1279 (rcirc-record-activity
1280 (current-buffer)
1281 (when (or nick-match (and (not (rcirc-channel-p rcirc-target))
1282 (not rcirc-low-priority-flag)))
1283 'nick)))))
1284 1278
1285 (sit-for 0) ; displayed text before hook 1279 (sit-for 0) ; displayed text before hook
1286 (run-hook-with-args 'rcirc-print-hooks 1280 (run-hook-with-args 'rcirc-print-hooks
@@ -1501,8 +1495,7 @@ activity. Only run if the buffer is not visible and
1501 (let ((t1 (with-current-buffer b1 rcirc-last-post-time)) 1495 (let ((t1 (with-current-buffer b1 rcirc-last-post-time))
1502 (t2 (with-current-buffer b2 rcirc-last-post-time))) 1496 (t2 (with-current-buffer b2 rcirc-last-post-time)))
1503 (time-less-p t2 t1))))) 1497 (time-less-p t2 t1)))))
1504 (if (not rcirc-activity-type) 1498 (pushnew type rcirc-activity-types)
1505 (setq rcirc-activity-type type))
1506 (rcirc-update-activity-string))) 1499 (rcirc-update-activity-string)))
1507 (run-hook-with-args 'rcirc-activity-hooks buffer)) 1500 (run-hook-with-args 'rcirc-activity-hooks buffer))
1508 1501
@@ -1510,7 +1503,7 @@ activity. Only run if the buffer is not visible and
1510 "Clear the BUFFER activity." 1503 "Clear the BUFFER activity."
1511 (setq rcirc-activity (delete buffer rcirc-activity)) 1504 (setq rcirc-activity (delete buffer rcirc-activity))
1512 (with-current-buffer buffer 1505 (with-current-buffer buffer
1513 (setq rcirc-activity-type nil))) 1506 (setq rcirc-activity-types nil)))
1514 1507
1515(defun rcirc-split-activity (activity) 1508(defun rcirc-split-activity (activity)
1516 "Return a cons cell with ACTIVITY split into (lopri . hipri)." 1509 "Return a cons cell with ACTIVITY split into (lopri . hipri)."
@@ -1518,7 +1511,7 @@ activity. Only run if the buffer is not visible and
1518 (dolist (buf rcirc-activity) 1511 (dolist (buf rcirc-activity)
1519 (with-current-buffer buf 1512 (with-current-buffer buf
1520 (if (and rcirc-low-priority-flag 1513 (if (and rcirc-low-priority-flag
1521 (not (eq rcirc-activity-type 'nick))) 1514 (not (member 'nick rcirc-activity-types)))
1522 (add-to-list 'lopri buf t) 1515 (add-to-list 'lopri buf t)
1523 (add-to-list 'hipri buf t)))) 1516 (add-to-list 'hipri buf t))))
1524 (cons lopri hipri))) 1517 (cons lopri hipri)))
@@ -1547,11 +1540,15 @@ activity. Only run if the buffer is not visible and
1547 1540
1548(defun rcirc-activity-string (buffers) 1541(defun rcirc-activity-string (buffers)
1549 (mapconcat (lambda (b) 1542 (mapconcat (lambda (b)
1550 (let ((s (rcirc-short-buffer-name b))) 1543 (let ((s (substring-no-properties (rcirc-short-buffer-name b))))
1551 (with-current-buffer b 1544 (with-current-buffer b
1552 (if (not (eq rcirc-activity-type 'nick)) 1545 (dolist (type rcirc-activity-types)
1553 s 1546 (rcirc-add-face 0 (length s)
1554 (rcirc-facify s 'rcirc-mode-line-nick))))) 1547 (case type
1548 ('nick 'rcirc-track-nick)
1549 ('keyword 'rcirc-track-keyword))
1550 s)))
1551 s))
1555 buffers ",")) 1552 buffers ","))
1556 1553
1557(defun rcirc-short-buffer-name (buffer) 1554(defun rcirc-short-buffer-name (buffer)
@@ -1566,15 +1563,18 @@ Also, clear the overlay arrow if the current buffer is now hidden."
1566 (let ((current-now-hidden t)) 1563 (let ((current-now-hidden t))
1567 (walk-windows (lambda (w) 1564 (walk-windows (lambda (w)
1568 (let ((buf (window-buffer w))) 1565 (let ((buf (window-buffer w)))
1569 (when (eq major-mode 'rcirc-mode) 1566 (with-current-buffer buf
1570 (rcirc-clear-activity buf) 1567 (when (eq major-mode 'rcirc-mode)
1568 (rcirc-clear-activity buf)))
1571 (when (eq buf rcirc-current-buffer) 1569 (when (eq buf rcirc-current-buffer)
1572 (setq current-now-hidden nil)))))) 1570 (setq current-now-hidden nil)))))
1573 ;; add overlay arrow if the buffer isn't displayed 1571 ;; add overlay arrow if the buffer isn't displayed
1574 (when (and rcirc-current-buffer current-now-hidden) 1572 (when (and current-now-hidden
1573 rcirc-current-buffer
1574 (buffer-live-p rcirc-current-buffer))
1575 (with-current-buffer rcirc-current-buffer 1575 (with-current-buffer rcirc-current-buffer
1576 (when (eq major-mode 'rcirc-mode) 1576 (when (and (eq major-mode 'rcirc-mode)
1577 (marker-position overlay-arrow-position) 1577 (marker-position overlay-arrow-position))
1578 (set-marker overlay-arrow-position nil))))) 1578 (set-marker overlay-arrow-position nil)))))
1579 1579
1580 ;; remove any killed buffers from list 1580 ;; remove any killed buffers from list
@@ -1792,17 +1792,21 @@ With a prefix arg, prompt for new topic."
1792 (rcirc-send-string process (format "PRIVMSG %s :\C-aACTION %s\C-a" 1792 (rcirc-send-string process (format "PRIVMSG %s :\C-aACTION %s\C-a"
1793 target args))) 1793 target args)))
1794 1794
1795(defun rcirc-add-or-remove (set &optional elt)
1796 (if (and elt (not (string= "" elt)))
1797 (if (member-ignore-case elt set)
1798 (delete elt set)
1799 (cons elt set))
1800 set))
1801
1795(defun-rcirc-command ignore (nick) 1802(defun-rcirc-command ignore (nick)
1796 "Manage the ignore list. 1803 "Manage the ignore list.
1797Ignore NICK, unignore NICK if already ignored, or list ignored 1804Ignore NICK, unignore NICK if already ignored, or list ignored
1798nicks when no NICK is given. When listing ignored nicks, the 1805nicks when no NICK is given. When listing ignored nicks, the
1799ones added to the list automatically are marked with an asterisk." 1806ones added to the list automatically are marked with an asterisk."
1800 (interactive "sToggle ignoring of nick: ") 1807 (interactive "sToggle ignoring of nick: ")
1801 (when (not (string= "" nick)) 1808 (setq rcirc-ignore-list (rcirc-add-or-remove rcirc-ignore-list nick))
1802 (if (member-ignore-case nick rcirc-ignore-list) 1809 (rcirc-print process nil "IGNORE" target
1803 (setq rcirc-ignore-list (delete nick rcirc-ignore-list))
1804 (setq rcirc-ignore-list (cons nick rcirc-ignore-list))))
1805 (rcirc-print process (rcirc-nick process) "IGNORE" target
1806 (mapconcat 1810 (mapconcat
1807 (lambda (nick) 1811 (lambda (nick)
1808 (concat nick 1812 (concat nick
@@ -1810,14 +1814,47 @@ ones added to the list automatically are marked with an asterisk."
1810 "*" ""))) 1814 "*" "")))
1811 rcirc-ignore-list " "))) 1815 rcirc-ignore-list " ")))
1812 1816
1817(defun-rcirc-command bright (nick)
1818 "Manage the bright nick list."
1819 (interactive "sToggle emphasis of nick: ")
1820 (setq rcirc-bright-nicks (rcirc-add-or-remove rcirc-bright-nicks nick))
1821 (rcirc-print process nil "BRIGHT" target
1822 (mapconcat 'identity rcirc-bright-nicks " ")))
1823
1824(defun-rcirc-command dim (nick)
1825 "Manage the dim nick list."
1826 (interactive "sToggle deemphasis of nick: ")
1827 (setq rcirc-dim-nicks (rcirc-add-or-remove rcirc-dim-nicks nick))
1828 (rcirc-print process nil "DIM" target
1829 (mapconcat 'identity rcirc-dim-nicks " ")))
1830
1831(defun-rcirc-command keyword (keyword)
1832 "Manage the keyword list.
1833Mark KEYWORD, unmark KEYWORD if already marked, or list marked
1834keywords when no KEYWORD is given."
1835 (interactive "sToggle highlighting of keyword: ")
1836 (setq rcirc-keywords (rcirc-add-or-remove rcirc-keywords keyword))
1837 (rcirc-print process nil "KEYWORD" target
1838 (mapconcat 'identity rcirc-keywords " ")))
1839
1813 1840
1814(defun rcirc-message-leader (sender face) 1841(defun rcirc-add-face (start end name &optional object)
1815 "Return a string with SENDER propertized with FACE." 1842 "Add face NAME to the face text property of the text from START to END."
1816 (rcirc-facify (concat "<" sender "> ") face)) 1843 (when name
1844 (let ((pos start)
1845 next prop)
1846 (while (< pos end)
1847 (setq prop (get-text-property pos 'face object)
1848 next (next-single-property-change pos 'face object end))
1849 (unless (member name (get-text-property pos 'face object))
1850 (add-text-properties pos next (list 'face (cons name prop)) object))
1851 (setq pos next)))))
1817 1852
1818(defun rcirc-facify (string face) 1853(defun rcirc-facify (string face)
1819 "Return a copy of STRING with FACE property added." 1854 "Return a copy of STRING with FACE property added."
1820 (propertize (or string "") 'face face 'rear-nonsticky t)) 1855 (let ((string (or string "")))
1856 (rcirc-add-face 0 (length string) face string)
1857 string))
1821 1858
1822(defvar rcirc-url-regexp 1859(defvar rcirc-url-regexp
1823 (rx-to-string 1860 (rx-to-string
@@ -1835,8 +1872,8 @@ ones added to the list automatically are marked with an asterisk."
1835 word-boundary)) 1872 word-boundary))
1836 (optional 1873 (optional
1837 (and "/" 1874 (and "/"
1838 (1+ (char "-a-zA-Z0-9_=!?#$\@~`%&*+|\\/:;.,{}[]")) 1875 (1+ (char "-a-zA-Z0-9_=!?#$\@~`%&*+|\\/:;.,{}[]()"))
1839 (char "-a-zA-Z0-9_=#$\@~`%&*+|\\/:;{}[]"))))) 1876 (char "-a-zA-Z0-9_=#$\@~`%&*+|\\/:;{}[]()")))))
1840 "Regexp matching URLs. Set to nil to disable URL features in rcirc.") 1877 "Regexp matching URLs. Set to nil to disable URL features in rcirc.")
1841 1878
1842(defun rcirc-browse-url (&optional arg) 1879(defun rcirc-browse-url (&optional arg)
@@ -1863,68 +1900,99 @@ ones added to the list automatically are marked with an asterisk."
1863 (with-current-buffer (window-buffer (posn-window position)) 1900 (with-current-buffer (window-buffer (posn-window position))
1864 (rcirc-browse-url-at-point (posn-point position))))) 1901 (rcirc-browse-url-at-point (posn-point position)))))
1865 1902
1866(defun rcirc-map-regexp (function regexp string) 1903
1867 "Return a copy of STRING after calling FUNCTION for each REGEXP match. 1904(defvar rcirc-markup-text-functions
1868FUNCTION takes 3 arguments, MATCH-START, MATCH-END, and STRING." 1905 '(rcirc-markup-body-text
1869 (let ((start 0)) 1906 rcirc-markup-attributes
1870 (while (string-match regexp string start) 1907 rcirc-markup-my-nick
1871 (setq start (match-end 0)) 1908 rcirc-markup-urls
1872 (funcall function (match-beginning 0) (match-end 0) string))) 1909 rcirc-markup-keywords
1873 string) 1910 rcirc-markup-bright-nicks)
1874 1911 "List of functions used to manipulate text before it is printed.
1875(defun rcirc-mangle-text (process text) 1912
1913Each function takes three arguments, PROCESS, SENDER, RESPONSE
1914and CHANNEL-BUFFER. The current buffer is temporary buffer that
1915contains the text to manipulate. Each function works on the text
1916in this buffer.")
1917
1918(defun rcirc-markup-text (process sender response text)
1876 "Return TEXT with properties added based on various patterns." 1919 "Return TEXT with properties added based on various patterns."
1877 ;; ^B 1920 (let ((channel-buffer (current-buffer)))
1878 (setq text 1921 (with-temp-buffer
1879 (rcirc-map-regexp 1922 (insert text)
1880 (lambda (start end string) 1923 (goto-char (point-min))
1881 (let ((orig-face (get-text-property start 'face string))) 1924 (dolist (fn rcirc-markup-text-functions)
1882 (add-text-properties 1925 (save-excursion
1883 start end 1926 (funcall fn process sender response channel-buffer)))
1884 (list 'face (if (listp orig-face) 1927 (buffer-substring (point-min) (point-max)))))
1885 (append orig-face 1928
1886 (list 'bold)) 1929(defun rcirc-markup-body-text (process sender response channel-buffer)
1887 (list orig-face 'bold)) 1930 ;; We add the text property `rcirc-text' to identify this as the
1888 'rear-nonsticky t) 1931 ;; body text.
1889 string))) 1932 (add-text-properties (point-min) (point-max)
1890 ".*?" 1933 (list 'rcirc-text (buffer-substring-no-properties
1891 text)) 1934 (point-min) (point-max)))))
1892 ;; TODO: deal with ^_ and ^C colors sequences 1935
1893 (while (string-match "\\(.*\\)[]\\(.*\\)" text) 1936(defun rcirc-markup-attributes (process sender response channel-buffer)
1894 (setq text (concat (match-string 1 text) 1937 (while (re-search-forward "\\([\C-b\C-_\C-v]\\).*?\\(\\1\\|\C-o\\)" nil t)
1895 (match-string 2 text)))) 1938 (rcirc-add-face (match-beginning 0) (match-end 0)
1896 ;; my nick 1939 (case (char-after (match-beginning 1))
1897 (setq text 1940 (?\C-b 'bold)
1898 (with-syntax-table rcirc-nick-syntax-table 1941 (?\C-v 'italic)
1899 (rcirc-map-regexp (lambda (start end string) 1942 (?\C-_ 'underline)))
1900 (add-text-properties 1943 ;; keep the ^O since it could terminate other attributes
1901 start end 1944 (when (not (eq ?\C-o (char-before (match-end 2))))
1902 (list 'face 'rcirc-nick-in-message 1945 (delete-region (match-beginning 2) (match-end 2)))
1903 'rear-nonsticky t) 1946 (delete-region (match-beginning 1) (match-end 1))
1904 string)) 1947 (goto-char (1+ (match-beginning 1))))
1905 (concat "\\b" 1948 ;; remove the ^O characters now
1906 (regexp-quote (rcirc-nick process)) 1949 (while (re-search-forward "\C-o+" nil t)
1907 "\\b") 1950 (delete-region (match-beginning 0) (match-end 0))))
1908 text))) 1951
1909 ;; urls 1952(defun rcirc-markup-my-nick (process sender response channel-buffer)
1910 (setq text 1953 (with-syntax-table rcirc-nick-syntax-table
1911 (rcirc-map-regexp 1954 (while (re-search-forward (concat "\\b"
1912 (lambda (start end string) 1955 (regexp-quote (rcirc-nick process))
1913 (let ((orig-face (get-text-property start 'face string))) 1956 "\\b")
1914 (add-text-properties start end 1957 nil t)
1915 (list 'face (if (listp orig-face) 1958 (rcirc-add-face (match-beginning 0) (match-end 0)
1916 (append orig-face 1959 'rcirc-nick-in-message)
1917 (list 'bold)) 1960 (when (string= response "PRIVMSG")
1918 (list orig-face 'bold)) 1961 (rcirc-add-face (point-min) (point-max) 'rcirc-nick-in-message-full-line)
1919 'rear-nonsticky t 1962 (rcirc-record-activity channel-buffer 'nick)))))
1920 'mouse-face 'highlight 1963
1921 'keymap rcirc-browse-url-map) 1964(defun rcirc-markup-urls (process sender response channel-buffer)
1922 string)) 1965 (while (re-search-forward rcirc-url-regexp nil t)
1923 (push (substring-no-properties string start end) rcirc-urls)) 1966 (let ((start (match-beginning 0))
1924 rcirc-url-regexp 1967 (end (match-end 0)))
1925 text)) 1968 (rcirc-add-face start end 'rcirc-url)
1926 text) 1969 (add-text-properties start end (list 'mouse-face 'highlight
1927 1970 'keymap rcirc-browse-url-map))
1971 ;; record the url
1972 (let ((url (buffer-substring-no-properties start end)))
1973 (with-current-buffer channel-buffer
1974 (push url rcirc-urls))))))
1975
1976(defun rcirc-markup-keywords (process sender response channel-buffer)
1977 (let* ((target (with-current-buffer channel-buffer (or rcirc-target "")))
1978 (keywords (delq nil (mapcar (lambda (keyword)
1979 (when (not (string-match keyword target))
1980 keyword))
1981 rcirc-keywords))))
1982 (when keywords
1983 (while (re-search-forward (regexp-opt keywords 'words) nil t)
1984 (rcirc-add-face (match-beginning 0) (match-end 0) 'rcirc-keyword)
1985 (when (and (string= response "PRIVMSG")
1986 (not (string= sender (rcirc-nick process))))
1987 (rcirc-record-activity channel-buffer 'keyword))))))
1988
1989(defun rcirc-markup-bright-nicks (process sender response channel-buffer)
1990 (when (and rcirc-bright-nicks
1991 (string= response "NAMES"))
1992 (with-syntax-table rcirc-nick-syntax-table
1993 (while (re-search-forward (regexp-opt rcirc-bright-nicks 'words) nil t)
1994 (rcirc-add-face (match-beginning 0) (match-end 0)
1995 'rcirc-bright-nick)))))
1928 1996
1929;;; handlers 1997;;; handlers
1930;; these are called with the server PROCESS, the SENDER, which is a 1998;; these are called with the server PROCESS, the SENDER, which is a
@@ -2275,12 +2343,12 @@ Passwords are stored in `rcirc-authinfo' (which see)."
2275 (((class color) (min-colors 16) (background dark)) (:foreground "Aquamarine")) 2343 (((class color) (min-colors 16) (background dark)) (:foreground "Aquamarine"))
2276 (((class color) (min-colors 8)) (:foreground "magenta")) 2344 (((class color) (min-colors 8)) (:foreground "magenta"))
2277 (t (:weight bold :underline t))) 2345 (t (:weight bold :underline t)))
2278 "Face used for nicks matched by `rcirc-bright-nick-regexp'." 2346 "Face used for nicks matched by `rcirc-bright-nicks'."
2279 :group 'rcirc-faces) 2347 :group 'rcirc-faces)
2280 2348
2281(defface rcirc-dim-nick 2349(defface rcirc-dim-nick
2282 '((t :inherit default)) 2350 '((t :inherit default))
2283 "Face used for nicks matched by `rcirc-dim-nick-regexp'." 2351 "Face used for nicks in `rcirc-dim-nicks'."
2284 :group 'rcirc-faces) 2352 :group 'rcirc-faces)
2285 2353
2286(defface rcirc-server ; font-lock-comment-face 2354(defface rcirc-server ; font-lock-comment-face
@@ -2329,9 +2397,14 @@ Passwords are stored in `rcirc-authinfo' (which see)."
2329 (((class color) (min-colors 16) (background dark)) (:foreground "Cyan")) 2397 (((class color) (min-colors 16) (background dark)) (:foreground "Cyan"))
2330 (((class color) (min-colors 8)) (:foreground "cyan" :weight bold)) 2398 (((class color) (min-colors 8)) (:foreground "cyan" :weight bold))
2331 (t (:weight bold))) 2399 (t (:weight bold)))
2332 "The face used to highlight instances of nick within messages." 2400 "The face used to highlight instances of your nick within messages."
2333 :group 'rcirc-faces) 2401 :group 'rcirc-faces)
2334 2402
2403(defface rcirc-nick-in-message-full-line
2404 '((t (:bold t)))
2405 "The face used emphasize the entire message when your nick is mentioned."
2406 :group 'rcirc-faces)
2407
2335(defface rcirc-prompt ; comint-highlight-prompt 2408(defface rcirc-prompt ; comint-highlight-prompt
2336 '((((min-colors 88) (background dark)) (:foreground "cyan1")) 2409 '((((min-colors 88) (background dark)) (:foreground "cyan1"))
2337 (((background dark)) (:foreground "cyan")) 2410 (((background dark)) (:foreground "cyan"))
@@ -2339,9 +2412,24 @@ Passwords are stored in `rcirc-authinfo' (which see)."
2339 "The face used to highlight prompts." 2412 "The face used to highlight prompts."
2340 :group 'rcirc-faces) 2413 :group 'rcirc-faces)
2341 2414
2342(defface rcirc-mode-line-nick 2415(defface rcirc-track-nick
2416 '((t (:inverse-video t)))
2417 "The face used in the mode-line when your nick is mentioned."
2418 :group 'rcirc-faces)
2419
2420(defface rcirc-track-keyword
2421 '((t (:bold t )))
2422 "The face used in the mode-line when keywords are mentioned."
2423 :group 'rcirc-faces)
2424
2425(defface rcirc-url
2343 '((t (:bold t))) 2426 '((t (:bold t)))
2344 "The face used indicate activity directed at you." 2427 "The face used to highlight urls."
2428 :group 'rcirc-faces)
2429
2430(defface rcirc-keyword
2431 '((t (:inherit highlight)))
2432 "The face used to highlight keywords."
2345 :group 'rcirc-faces) 2433 :group 'rcirc-faces)
2346 2434
2347 2435
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el
index cb5a6d75331..97b08e7e704 100644
--- a/lisp/net/tramp.el
+++ b/lisp/net/tramp.el
@@ -3888,37 +3888,50 @@ This will break if COMMAND prints a newline, followed by the value of
3888(defun tramp-handle-make-auto-save-file-name () 3888(defun tramp-handle-make-auto-save-file-name ()
3889 "Like `make-auto-save-file-name' for tramp files. 3889 "Like `make-auto-save-file-name' for tramp files.
3890Returns a file name in `tramp-auto-save-directory' for autosaving this file." 3890Returns a file name in `tramp-auto-save-directory' for autosaving this file."
3891 (when tramp-auto-save-directory 3891 (let ((tramp-auto-save-directory tramp-auto-save-directory))
3892 (unless (file-exists-p tramp-auto-save-directory) 3892 ;; File name must be unique. This is ensured with Emacs 22 (see
3893 (make-directory tramp-auto-save-directory t))) 3893 ;; UNIQUIFY element of `auto-save-file-name-transforms'); but for
3894 ;; jka-compr doesn't like auto-saving, so by appending "~" to the 3894 ;; all other cases we must do it ourselves.
3895 ;; file name we make sure that jka-compr isn't used for the 3895 (when (boundp 'auto-save-file-name-transforms)
3896 ;; auto-save file. 3896 (mapcar
3897 (let ((buffer-file-name 3897 '(lambda (x)
3898 (if tramp-auto-save-directory 3898 (when (and (string-match (car x) buffer-file-name)
3899 (expand-file-name 3899 (not (car (cddr x))))
3900 (tramp-subst-strs-in-string 3900 (setq tramp-auto-save-directory
3901 '(("_" . "|") 3901 (or tramp-auto-save-directory temporary-file-directory))))
3902 ("/" . "_a") 3902 (symbol-value 'auto-save-file-name-transforms)))
3903 (":" . "_b") 3903 ;; Create directory.
3904 ("|" . "__") 3904 (when tramp-auto-save-directory
3905 ("[" . "_l") 3905 (unless (file-exists-p tramp-auto-save-directory)
3906 ("]" . "_r")) 3906 (make-directory tramp-auto-save-directory t)))
3907 (buffer-file-name)) 3907 ;; jka-compr doesn't like auto-saving, so by appending "~" to the
3908 tramp-auto-save-directory) 3908 ;; file name we make sure that jka-compr isn't used for the
3909 (buffer-file-name)))) 3909 ;; auto-save file.
3910 ;; Run plain `make-auto-save-file-name'. There might be an advice when 3910 (let ((buffer-file-name
3911 ;; it is not a magic file name operation (since Emacs 22). 3911 (if tramp-auto-save-directory
3912 ;; We must deactivate it temporarily. 3912 (expand-file-name
3913 (if (not (ad-is-active 'make-auto-save-file-name)) 3913 (tramp-subst-strs-in-string
3914 (tramp-run-real-handler 3914 '(("_" . "|")
3915 'make-auto-save-file-name nil) 3915 ("/" . "_a")
3916 ;; else 3916 (":" . "_b")
3917 (ad-deactivate 'make-auto-save-file-name) 3917 ("|" . "__")
3918 (prog1 3918 ("[" . "_l")
3919 (tramp-run-real-handler 3919 ("]" . "_r"))
3920 'make-auto-save-file-name nil) 3920 (buffer-file-name))
3921 (ad-activate 'make-auto-save-file-name))))) 3921 tramp-auto-save-directory)
3922 (buffer-file-name))))
3923 ;; Run plain `make-auto-save-file-name'. There might be an advice when
3924 ;; it is not a magic file name operation (since Emacs 22).
3925 ;; We must deactivate it temporarily.
3926 (if (not (ad-is-active 'make-auto-save-file-name))
3927 (tramp-run-real-handler
3928 'make-auto-save-file-name nil)
3929 ;; else
3930 (ad-deactivate 'make-auto-save-file-name)
3931 (prog1
3932 (tramp-run-real-handler
3933 'make-auto-save-file-name nil)
3934 (ad-activate 'make-auto-save-file-name))))))
3922 3935
3923 3936
3924;; CCC grok APPEND, LOCKNAME, CONFIRM 3937;; CCC grok APPEND, LOCKNAME, CONFIRM
@@ -4333,7 +4346,12 @@ Falls back to normal file name handler if no tramp file name handler exists."
4333 "Add tramp file name handlers to `file-name-handler-alist'." 4346 "Add tramp file name handlers to `file-name-handler-alist'."
4334 (add-to-list 'file-name-handler-alist 4347 (add-to-list 'file-name-handler-alist
4335 (cons tramp-file-name-regexp 'tramp-file-name-handler)) 4348 (cons tramp-file-name-regexp 'tramp-file-name-handler))
4336 (when (or partial-completion-mode (featurep 'ido)) 4349 ;; `partial-completion-mode' is unknown in XEmacs. So we should
4350 ;; load it unconditionally there. In the GNU Emacs case, method/
4351 ;; user/host name completion shall be bound to `partial-completion-mode'.
4352 (when (or (not (boundp 'partial-completion-mode))
4353 (symbol-value 'partial-completion-mode)
4354 (featurep 'ido))
4337 (add-to-list 'file-name-handler-alist 4355 (add-to-list 'file-name-handler-alist
4338 (cons tramp-completion-file-name-regexp 4356 (cons tramp-completion-file-name-regexp
4339 'tramp-completion-file-name-handler)) 4357 'tramp-completion-file-name-handler))
@@ -6749,8 +6767,8 @@ Return ATTR."
6749 ;; Set file's gid change bit. Possible only when id-format is 'integer. 6767 ;; Set file's gid change bit. Possible only when id-format is 'integer.
6750 (when (numberp (nth 3 attr)) 6768 (when (numberp (nth 3 attr))
6751 (setcar (nthcdr 9 attr) 6769 (setcar (nthcdr 9 attr)
6752 (not (= (nth 3 attr) 6770 (not (eql (nth 3 attr)
6753 (tramp-get-remote-gid multi-method method user host))))) 6771 (tramp-get-remote-gid multi-method method user host)))))
6754 ;; Set virtual device number. 6772 ;; Set virtual device number.
6755 (setcar (nthcdr 11 attr) 6773 (setcar (nthcdr 11 attr)
6756 (tramp-get-device multi-method method user host)) 6774 (tramp-get-device multi-method method user host))
@@ -7200,10 +7218,7 @@ Invokes `password-read' if available, `read-passwd' else."
7200 7218
7201(defun tramp-time-diff (t1 t2) 7219(defun tramp-time-diff (t1 t2)
7202 "Return the difference between the two times, in seconds. 7220 "Return the difference between the two times, in seconds.
7203T1 and T2 are time values (as returned by `current-time' for example). 7221T1 and T2 are time values (as returned by `current-time' for example)."
7204
7205NOTE: This function will fail if the time difference is too large to
7206fit in an integer."
7207 ;; Pacify byte-compiler with `symbol-function'. 7222 ;; Pacify byte-compiler with `symbol-function'.
7208 (cond ((and (fboundp 'subtract-time) 7223 (cond ((and (fboundp 'subtract-time)
7209 (fboundp 'float-time)) 7224 (fboundp 'float-time))
@@ -7214,10 +7229,9 @@ fit in an integer."
7214 (funcall (symbol-function 'time-to-seconds) 7229 (funcall (symbol-function 'time-to-seconds)
7215 (funcall (symbol-function 'subtract-time) t1 t2))) 7230 (funcall (symbol-function 'subtract-time) t1 t2)))
7216 ((fboundp 'itimer-time-difference) 7231 ((fboundp 'itimer-time-difference)
7217 (floor (funcall 7232 (funcall (symbol-function 'itimer-time-difference)
7218 (symbol-function 'itimer-time-difference) 7233 (if (< (length t1) 3) (append t1 '(0)) t1)
7219 (if (< (length t1) 3) (append t1 '(0)) t1) 7234 (if (< (length t2) 3) (append t2 '(0)) t2)))
7220 (if (< (length t2) 3) (append t2 '(0)) t2))))
7221 (t 7235 (t
7222 ;; snarfed from Emacs 21 time-date.el; combining 7236 ;; snarfed from Emacs 21 time-date.el; combining
7223 ;; time-to-seconds and subtract-time 7237 ;; time-to-seconds and subtract-time
diff --git a/lisp/net/trampver.el b/lisp/net/trampver.el
index c7edf9a4cdc..710022f885b 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.53" 33(defconst tramp-version "2.0.54"
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/paths.el b/lisp/paths.el
index 846f91793d1..022f12dd1fc 100644
--- a/lisp/paths.el
+++ b/lisp/paths.el
@@ -159,16 +159,6 @@ The `ORGANIZATION' environment variable is used instead if defined.")
159 "Name of directory used by system mailer for delivering new mail. 159 "Name of directory used by system mailer for delivering new mail.
160Its name should end with a slash.") 160Its name should end with a slash.")
161 161
162(defcustom sendmail-program
163 (cond
164 ((file-exists-p "/usr/sbin/sendmail") "/usr/sbin/sendmail")
165 ((file-exists-p "/usr/lib/sendmail") "/usr/lib/sendmail")
166 ((file-exists-p "/usr/ucblib/sendmail") "/usr/ucblib/sendmail")
167 (t "fakemail")) ;In ../etc, to interface to /bin/mail.
168 "Program used to send messages."
169 :group 'mail
170 :type 'file)
171
172(defcustom remote-shell-program 162(defcustom remote-shell-program
173 (cond 163 (cond
174 ;; Some systems use rsh for the remote shell; others use that name for the 164 ;; Some systems use rsh for the remote shell; others use that name for the
diff --git a/lisp/pgg-gpg.el b/lisp/pgg-gpg.el
index ab91471a619..46dbf833311 100644
--- a/lisp/pgg-gpg.el
+++ b/lisp/pgg-gpg.el
@@ -74,23 +74,27 @@
74 (errors-buffer pgg-errors-buffer) 74 (errors-buffer pgg-errors-buffer)
75 (orig-mode (default-file-modes)) 75 (orig-mode (default-file-modes))
76 (process-connection-type nil) 76 (process-connection-type nil)
77 exit-status) 77 process status exit-status)
78 (with-current-buffer (get-buffer-create errors-buffer) 78 (with-current-buffer (get-buffer-create errors-buffer)
79 (buffer-disable-undo) 79 (buffer-disable-undo)
80 (erase-buffer)) 80 (erase-buffer))
81 (unwind-protect 81 (unwind-protect
82 (progn 82 (progn
83 (set-default-file-modes 448) 83 (set-default-file-modes 448)
84 (let ((coding-system-for-write 'binary) 84 (let ((coding-system-for-write 'binary))
85 (input (buffer-substring-no-properties start end)) 85 (setq process
86 (default-enable-multibyte-characters nil)) 86 (apply #'start-process "*GnuPG*" errors-buffer
87 (with-temp-buffer 87 program args)))
88 (when passphrase 88 (set-process-sentinel process #'ignore)
89 (insert passphrase "\n")) 89 (when passphrase
90 (insert input) 90 (process-send-string process (concat passphrase "\n")))
91 (setq exit-status 91 (process-send-region process start end)
92 (apply #'call-process-region (point-min) (point-max) program 92 (process-send-eof process)
93 nil errors-buffer nil args)))) 93 (while (eq 'run (process-status process))
94 (accept-process-output process 5))
95 (setq status (process-status process)
96 exit-status (process-exit-status process))
97 (delete-process process)
94 (with-current-buffer (get-buffer-create output-buffer) 98 (with-current-buffer (get-buffer-create output-buffer)
95 (buffer-disable-undo) 99 (buffer-disable-undo)
96 (erase-buffer) 100 (erase-buffer)
@@ -100,9 +104,12 @@
100 'binary))) 104 'binary)))
101 (insert-file-contents output-file-name))) 105 (insert-file-contents output-file-name)))
102 (set-buffer errors-buffer) 106 (set-buffer errors-buffer)
103 (if (not (equal exit-status 0)) 107 (if (memq status '(stop signal))
104 (insert (format "\n%s exited abnormally: '%s'\n" 108 (error "%s exited abnormally: '%s'" program exit-status))
105 program exit-status))))) 109 (if (= 127 exit-status)
110 (error "%s could not be found" program))))
111 (if (and process (eq 'run (process-status process)))
112 (interrupt-process process))
106 (if (file-exists-p output-file-name) 113 (if (file-exists-p output-file-name)
107 (delete-file output-file-name)) 114 (delete-file output-file-name))
108 (set-default-file-modes orig-mode)))) 115 (set-default-file-modes orig-mode))))
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el
index c38a6e82f83..66d8cd4714f 100644
--- a/lisp/progmodes/python.el
+++ b/lisp/progmodes/python.el
@@ -1330,30 +1330,30 @@ buffer for a list of commands.)"
1330 ;; (not a name) in Python buffers from which `run-python' &c is 1330 ;; (not a name) in Python buffers from which `run-python' &c is
1331 ;; invoked. Would support multiple processes better. 1331 ;; invoked. Would support multiple processes better.
1332 (when (or new (not (comint-check-proc python-buffer))) 1332 (when (or new (not (comint-check-proc python-buffer)))
1333 (save-current-buffer 1333 (with-current-buffer
1334 (let* ((cmdlist (append (python-args-to-list cmd) '("-i"))) 1334 (let* ((cmdlist (append (python-args-to-list cmd) '("-i")))
1335 (path (getenv "PYTHONPATH")) 1335 (path (getenv "PYTHONPATH"))
1336 (process-environment ; to import emacs.py 1336 (process-environment ; to import emacs.py
1337 (cons (concat "PYTHONPATH=" data-directory 1337 (cons (concat "PYTHONPATH=" data-directory
1338 (if path (concat ":" path))) 1338 (if path (concat ":" path)))
1339 process-environment))) 1339 process-environment)))
1340 (set-buffer (apply 'make-comint-in-buffer "Python" 1340 (apply 'make-comint-in-buffer "Python"
1341 (generate-new-buffer "*Python*") 1341 (if new (generate-new-buffer "*Python*") "*Python*")
1342 (car cmdlist) nil (cdr cmdlist))) 1342 (car cmdlist) nil (cdr cmdlist)))
1343 (setq-default python-buffer (current-buffer)) 1343 (setq-default python-buffer (current-buffer))
1344 (setq python-buffer (current-buffer))) 1344 (setq python-buffer (current-buffer))
1345 (accept-process-output (get-buffer-process python-buffer) 5) 1345 (accept-process-output (get-buffer-process python-buffer) 5)
1346 (inferior-python-mode))) 1346 (inferior-python-mode)
1347 ;; Load function definitions we need.
1348 ;; Before the preoutput function was used, this was done via -c in
1349 ;; cmdlist, but that loses the banner and doesn't run the startup
1350 ;; file. The code might be inline here, but there's enough that it
1351 ;; seems worth putting in a separate file, and it's probably cleaner
1352 ;; to put it in a module.
1353 ;; Ensure we're at a prompt before doing anything else.
1354 (python-send-receive "import emacs; print '_emacs_out ()'")))
1347 (if (derived-mode-p 'python-mode) 1355 (if (derived-mode-p 'python-mode)
1348 (setq python-buffer (default-value 'python-buffer))) ; buffer-local 1356 (setq python-buffer (default-value 'python-buffer))) ; buffer-local
1349 ;; Load function definitions we need.
1350 ;; Before the preoutput function was used, this was done via -c in
1351 ;; cmdlist, but that loses the banner and doesn't run the startup
1352 ;; file. The code might be inline here, but there's enough that it
1353 ;; seems worth putting in a separate file, and it's probably cleaner
1354 ;; to put it in a module.
1355 ;; Ensure we're at a prompt before doing anything else.
1356 (python-send-receive "import emacs; print '_emacs_out ()'")
1357 ;; Without this, help output goes into the inferior python buffer if 1357 ;; Without this, help output goes into the inferior python buffer if
1358 ;; the process isn't already running. 1358 ;; the process isn't already running.
1359 (sit-for 1 t) ;Should we use accept-process-output instead? --Stef 1359 (sit-for 1 t) ;Should we use accept-process-output instead? --Stef
@@ -1369,15 +1369,20 @@ buffer for a list of commands.)"
1369(defun python-send-command (command) 1369(defun python-send-command (command)
1370 "Like `python-send-string' but resets `compilation-shell-minor-mode'. 1370 "Like `python-send-string' but resets `compilation-shell-minor-mode'.
1371COMMAND should be a single statement." 1371COMMAND should be a single statement."
1372 (assert (not (string-match "\n" command))) 1372 ;; (assert (not (string-match "\n" command)))
1373 (let ((end (marker-position (process-mark (python-proc))))) 1373 ;; (let ((end (marker-position (process-mark (python-proc)))))
1374 (with-current-buffer python-buffer (goto-char (point-max))) 1374 (with-current-buffer python-buffer (goto-char (point-max)))
1375 (compilation-forget-errors) 1375 (compilation-forget-errors)
1376 ;; Must wait until this has completed before re-setting variables below. 1376 (python-send-string command)
1377 (python-send-receive (concat command "; print '_emacs_out ()'"))
1378 (with-current-buffer python-buffer 1377 (with-current-buffer python-buffer
1379 (set-marker compilation-parsing-end end) 1378 (setq compilation-last-buffer (current-buffer)))
1380 (setq compilation-last-buffer (current-buffer))))) 1379 ;; No idea what this is for but it breaks the call to
1380 ;; compilation-fake-loc in python-send-region. -- Stef
1381 ;; Must wait until this has completed before re-setting variables below.
1382 ;; (python-send-receive "print '_emacs_out ()'")
1383 ;; (with-current-buffer python-buffer
1384 ;; (set-marker compilation-parsing-end end))
1385 ) ;;)
1381 1386
1382(defun python-send-region (start end) 1387(defun python-send-region (start end)
1383 "Send the region to the inferior Python process." 1388 "Send the region to the inferior Python process."
@@ -1594,24 +1599,26 @@ Only works when point is in a function name, not its arg list, for
1594instance. Assumes an inferior Python is running." 1599instance. Assumes an inferior Python is running."
1595 (let ((symbol (with-syntax-table python-dotty-syntax-table 1600 (let ((symbol (with-syntax-table python-dotty-syntax-table
1596 (current-word)))) 1601 (current-word))))
1597 ;; First try the symbol we're on. 1602 ;; This is run from timers, so inhibit-quit tends to be set.
1598 (or (and symbol 1603 (with-local-quit
1599 (python-send-receive (format "emacs.eargs(%S, %s)" 1604 ;; First try the symbol we're on.
1600 symbol python-imports))) 1605 (or (and symbol
1601 ;; Try moving to symbol before enclosing parens. 1606 (python-send-receive (format "emacs.eargs(%S, %s)"
1602 (let ((s (syntax-ppss))) 1607 symbol python-imports)))
1603 (unless (zerop (car s)) 1608 ;; Try moving to symbol before enclosing parens.
1604 (when (eq ?\( (char-after (nth 1 s))) 1609 (let ((s (syntax-ppss)))
1605 (save-excursion 1610 (unless (zerop (car s))
1606 (goto-char (nth 1 s)) 1611 (when (eq ?\( (char-after (nth 1 s)))
1607 (skip-syntax-backward "-") 1612 (save-excursion
1608 (let ((point (point))) 1613 (goto-char (nth 1 s))
1609 (skip-chars-backward "a-zA-Z._") 1614 (skip-syntax-backward "-")
1610 (if (< (point) point) 1615 (let ((point (point)))
1611 (python-send-receive 1616 (skip-chars-backward "a-zA-Z._")
1612 (format "emacs.eargs(%S, %s)" 1617 (if (< (point) point)
1613 (buffer-substring-no-properties (point) point) 1618 (python-send-receive
1614 python-imports))))))))))) 1619 (format "emacs.eargs(%S, %s)"
1620 (buffer-substring-no-properties (point) point)
1621 python-imports))))))))))))
1615 1622
1616;;;; Info-look functionality. 1623;;;; Info-look functionality.
1617 1624
diff --git a/lisp/shell.el b/lisp/shell.el
index 6a145ae1569..d4791821b5b 100644
--- a/lisp/shell.el
+++ b/lisp/shell.el
@@ -483,7 +483,9 @@ This function can be put on `comint-output-filter-functions'.
483The argument STRING is ignored." 483The argument STRING is ignored."
484 (let ((pmark (process-mark (get-buffer-process (current-buffer))))) 484 (let ((pmark (process-mark (get-buffer-process (current-buffer)))))
485 (save-excursion 485 (save-excursion
486 (goto-char (or comint-last-output-start (point-min))) 486 (goto-char (or (and (markerp comint-last-output-start)
487 (marker-position comint-last-output-start))
488 (point-min)))
487 (while (re-search-forward "[\C-a\C-b]" pmark t) 489 (while (re-search-forward "[\C-a\C-b]" pmark t)
488 (replace-match ""))))) 490 (replace-match "")))))
489 491
diff --git a/lisp/simple.el b/lisp/simple.el
index a59eb6c9511..e53cb1fb3e8 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -2554,6 +2554,8 @@ text. See `insert-for-yank'."
2554 ;; Pass point first, then mark, because the order matters 2554 ;; Pass point first, then mark, because the order matters
2555 ;; when calling kill-append. 2555 ;; when calling kill-append.
2556 (interactive (list (point) (mark))) 2556 (interactive (list (point) (mark)))
2557 (unless (and beg end)
2558 (error "The mark is not set now, so there is no region"))
2557 (condition-case nil 2559 (condition-case nil
2558 (let ((string (filter-buffer-substring beg end t))) 2560 (let ((string (filter-buffer-substring beg end t)))
2559 (when string ;STRING is nil if BEG = END 2561 (when string ;STRING is nil if BEG = END
@@ -4982,6 +4984,12 @@ value of `completion-common-substring'. See also `display-completion-list'.")
4982 4984
4983;; Variables and faces used in `completion-setup-function'. 4985;; Variables and faces used in `completion-setup-function'.
4984 4986
4987(defcustom completion-show-help t
4988 "Non-nil means show help message in *Completions* buffer."
4989 :type 'boolean
4990 :version "22.1"
4991 :group 'completion)
4992
4985(defface completions-first-difference 4993(defface completions-first-difference
4986 '((t (:inherit bold))) 4994 '((t (:inherit bold)))
4987 "Face put on the first uncommon character in completions in *Completions* buffer." 4995 "Face put on the first uncommon character in completions in *Completions* buffer."
@@ -5068,14 +5076,15 @@ of the minibuffer before point is always the common substring.)")
5068 (if (get-char-property element-common-end 'mouse-face) 5076 (if (get-char-property element-common-end 'mouse-face)
5069 (put-text-property element-common-end (1+ element-common-end) 5077 (put-text-property element-common-end (1+ element-common-end)
5070 'font-lock-face 'completions-first-difference)))))) 5078 'font-lock-face 'completions-first-difference))))))
5071 ;; Insert help string. 5079 ;; Maybe insert help string.
5072 (goto-char (point-min)) 5080 (when completion-show-help
5073 (if (display-mouse-p) 5081 (goto-char (point-min))
5074 (insert (substitute-command-keys 5082 (if (display-mouse-p)
5075 "Click \\[mouse-choose-completion] on a completion to select it.\n"))) 5083 (insert (substitute-command-keys
5076 (insert (substitute-command-keys 5084 "Click \\[mouse-choose-completion] on a completion to select it.\n")))
5077 "In this buffer, type \\[choose-completion] to \ 5085 (insert (substitute-command-keys
5078select the completion near point.\n\n"))))) 5086 "In this buffer, type \\[choose-completion] to \
5087select the completion near point.\n\n"))))))
5079 5088
5080(add-hook 'completion-setup-hook 'completion-setup-function) 5089(add-hook 'completion-setup-hook 'completion-setup-function)
5081 5090
diff --git a/lisp/startup.el b/lisp/startup.el
index 5bc83e01e37..fb44e539b74 100644
--- a/lisp/startup.el
+++ b/lisp/startup.el
@@ -1395,6 +1395,7 @@ mouse."
1395 (window-dedicated-p (selected-window))) 1395 (window-dedicated-p (selected-window)))
1396 (pop-to-buffer (current-buffer)) 1396 (pop-to-buffer (current-buffer))
1397 (switch-to-buffer "GNU Emacs")) 1397 (switch-to-buffer "GNU Emacs"))
1398 (setq buffer-read-only nil)
1398 (erase-buffer) 1399 (erase-buffer)
1399 (if pure-space-overflow 1400 (if pure-space-overflow
1400 (insert "\ 1401 (insert "\
@@ -1406,6 +1407,9 @@ Warning Warning!!! Pure space overflow !!!Warning Warning
1406 (apply #'fancy-splash-insert text)) 1407 (apply #'fancy-splash-insert text))
1407 (fancy-splash-tail) 1408 (fancy-splash-tail)
1408 (set-buffer-modified-p nil) 1409 (set-buffer-modified-p nil)
1410 (setq buffer-read-only t)
1411 (if (and view-read-only (not view-mode))
1412 (view-mode-enter nil 'kill-buffer))
1409 (goto-char (point-min))))) 1413 (goto-char (point-min)))))
1410 1414
1411(defun fancy-splash-frame () 1415(defun fancy-splash-frame ()
@@ -1442,6 +1446,7 @@ we put it on this frame."
1442 (let ((prev-buffer (current-buffer))) 1446 (let ((prev-buffer (current-buffer)))
1443 (unwind-protect 1447 (unwind-protect
1444 (with-current-buffer (get-buffer-create "GNU Emacs") 1448 (with-current-buffer (get-buffer-create "GNU Emacs")
1449 (setq buffer-read-only nil)
1445 (erase-buffer) 1450 (erase-buffer)
1446 (set (make-local-variable 'tab-width) 8) 1451 (set (make-local-variable 'tab-width) 8)
1447 (if hide-on-input 1452 (if hide-on-input
@@ -1581,6 +1586,9 @@ Type \\[describe-distribution] for information on getting the latest version."))
1581 1586
1582 ;; Display the input that we set up in the buffer. 1587 ;; Display the input that we set up in the buffer.
1583 (set-buffer-modified-p nil) 1588 (set-buffer-modified-p nil)
1589 (setq buffer-read-only t)
1590 (if (and view-read-only (not view-mode))
1591 (view-mode-enter nil 'kill-buffer))
1584 (goto-char (point-min)) 1592 (goto-char (point-min))
1585 (if (or (window-minibuffer-p) 1593 (if (or (window-minibuffer-p)
1586 (window-dedicated-p (selected-window))) 1594 (window-dedicated-p (selected-window)))
diff --git a/lisp/term/mac-win.el b/lisp/term/mac-win.el
index 382a4d8736f..ec6c7fbf410 100644
--- a/lisp/term/mac-win.el
+++ b/lisp/term/mac-win.el
@@ -1337,14 +1337,19 @@ correspoinding TextEncodingBase value."
1337 (find-coding-systems-string string))) 1337 (find-coding-systems-string string)))
1338 (setq coding-system 1338 (setq coding-system
1339 (coding-system-change-eol-conversion coding-system 'mac)) 1339 (coding-system-change-eol-conversion coding-system 'mac))
1340 (when (and (eq system-type 'darwin) 1340 (let ((str string))
1341 (eq coding-system 'japanese-shift-jis-mac)) 1341 (when (and (eq system-type 'darwin)
1342 (setq encoding mac-text-encoding-mac-japanese-basic-variant) 1342 (eq coding-system 'japanese-shift-jis-mac))
1343 (setq string (subst-char-in-string ?\\ ?\x80 string)) 1343 (setq encoding mac-text-encoding-mac-japanese-basic-variant)
1344 (subst-char-in-string ?\Â¥ ?\x5c string t)) 1344 (setq str (subst-char-in-string ?\\ ?\x80 str))
1345 (setq data (mac-code-convert-string 1345 (subst-char-in-string ?\Â¥ ?\x5c str t)
1346 (encode-coding-string string coding-system) 1346 ;; ASCII-only?
1347 (or encoding coding-system) nil))) 1347 (if (string-match "\\`[\x00-\x7f]*\\'" str)
1348 (setq str nil)))
1349 (and str
1350 (setq data (mac-code-convert-string
1351 (encode-coding-string str coding-system)
1352 (or encoding coding-system) nil)))))
1348 (or data (encode-coding-string string (if (eq (byteorder) ?B) 1353 (or data (encode-coding-string string (if (eq (byteorder) ?B)
1349 'utf-16be-mac 1354 'utf-16be-mac
1350 'utf-16le-mac))))) 1355 'utf-16le-mac)))))
diff --git a/lisp/term/xterm.el b/lisp/term/xterm.el
index 9ea51a2f774..73d26b56b74 100644
--- a/lisp/term/xterm.el
+++ b/lisp/term/xterm.el
@@ -231,17 +231,20 @@
231 ;; These keys are available in xterm starting from version 216 231 ;; These keys are available in xterm starting from version 216
232 ;; if the modifyOtherKeys resource is set to 1. 232 ;; if the modifyOtherKeys resource is set to 1.
233 233
234 (define-key map "\e[27;5;9~" [C-tab])
235 (define-key map "\e[27;5;13~" [C-return])
234 (define-key map "\e[27;5;39~" [?\C-\']) 236 (define-key map "\e[27;5;39~" [?\C-\'])
237 (define-key map "\e[27;5;44~" [?\C-,])
235 (define-key map "\e[27;5;45~" [?\C--]) 238 (define-key map "\e[27;5;45~" [?\C--])
236 239 (define-key map "\e[27;5;46~" [?\C-.])
240 (define-key map "\e[27;5;47~" [?\C-/])
237 (define-key map "\e[27;5;48~" [?\C-0]) 241 (define-key map "\e[27;5;48~" [?\C-0])
238 (define-key map "\e[27;5;49~" [?\C-1]) 242 (define-key map "\e[27;5;49~" [?\C-1])
239 ;; Not all C-DIGIT keys have a distinct binding. 243 ;; Not all C-DIGIT keys have a distinct binding.
240 (define-key map "\e[27;5;57~" [?\C-9]) 244 (define-key map "\e[27;5;57~" [?\C-9])
241 245 (define-key map "\e[27;5;59~" [(C-\;)])
242 (define-key map "\e[27;5;59~" [?\C-\;])
243 (define-key map "\e[27;5;61~" [?\C-=]) 246 (define-key map "\e[27;5;61~" [?\C-=])
244 247 (define-key map "\e[27;5;92~" [?\C-\\])
245 248
246 (define-key map "\e[27;6;33~" [?\C-!]) 249 (define-key map "\e[27;6;33~" [?\C-!])
247 (define-key map "\e[27;6;34~" [?\C-\"]) 250 (define-key map "\e[27;6;34~" [?\C-\"])
@@ -253,26 +256,53 @@
253 (define-key map "\e[27;6;41~" [?\C-)]) 256 (define-key map "\e[27;6;41~" [?\C-)])
254 (define-key map "\e[27;6;42~" [?\C-*]) 257 (define-key map "\e[27;6;42~" [?\C-*])
255 (define-key map "\e[27;6;43~" [?\C-+]) 258 (define-key map "\e[27;6;43~" [?\C-+])
256
257 (define-key map "\e[27;6;58~" [?\C-:]) 259 (define-key map "\e[27;6;58~" [?\C-:])
258 (define-key map "\e[27;6;60~" [?\C-<]) 260 (define-key map "\e[27;6;60~" [?\C-<])
259 (define-key map "\e[27;6;62~" [?\C->]) 261 (define-key map "\e[27;6;62~" [?\C->])
260 (define-key map "\e[27;6;63~" [(C-\?)]) 262 (define-key map "\e[27;6;63~" [(C-\?)])
261 263
262 (define-key map "\e[27;5;9~" [C-tab]) 264 (define-key map "\e[27;13;9~" [(C-M-tab)])
263 (define-key map "\e[27;5;13~" [C-return]) 265 (define-key map "\e[27;13;13~" [(C-M-return)])
264 (define-key map "\e[27;5;44~" [?\C-,])
265 (define-key map "\e[27;5;46~" [?\C-.])
266 (define-key map "\e[27;5;47~" [?\C-/])
267 (define-key map "\e[27;5;92~" [?\C-\\])
268
269 (define-key map "\e[27;2;9~" [S-tab])
270 (define-key map "\e[27;2;13~" [S-return])
271
272 (define-key map "\e[27;6;9~" [(C-S-tab)])
273 266
267 (define-key map "\e[27;13;39~" [?\C-\M-\'])
268 (define-key map "\e[27;13;44~" [?\C-\M-,])
269 (define-key map "\e[27;13;45~" [?\C-\M--])
274 (define-key map "\e[27;13;46~" [?\C-\M-.]) 270 (define-key map "\e[27;13;46~" [?\C-\M-.])
275 271 (define-key map "\e[27;13;47~" [?\C-\M-/])
272 (define-key map "\e[27;13;48~" [?\C-\M-0])
273 (define-key map "\e[27;13;49~" [?\C-\M-1])
274 (define-key map "\e[27;13;50~" [?\C-\M-2])
275 (define-key map "\e[27;13;51~" [?\C-\M-3])
276 (define-key map "\e[27;13;52~" [?\C-\M-4])
277 (define-key map "\e[27;13;53~" [?\C-\M-5])
278 (define-key map "\e[27;13;54~" [?\C-\M-6])
279 (define-key map "\e[27;13;55~" [?\C-\M-7])
280 (define-key map "\e[27;13;56~" [?\C-\M-8])
281 (define-key map "\e[27;13;57~" [?\C-\M-9])
282 (define-key map "\e[27;13;59~" [?\C-\M-\;])
283 (define-key map "\e[27;13;61~" [?\C-\M-=])
284 (define-key map "\e[27;13;92~" [?\C-\M-\\])
285
286 (define-key map "\e[27;14;33~" [?\C-\M-!])
287 (define-key map "\e[27;14;34~" [?\C-\M-\"])
288 (define-key map "\e[27;14;35~" [?\C-\M-#])
289 (define-key map "\e[27;14;36~" [?\C-\M-$])
290 (define-key map "\e[27;14;37~" [?\C-\M-%])
291 (define-key map "\e[27;14;38~" [(C-M-&)])
292 (define-key map "\e[27;14;40~" [?\C-\M-(])
293 (define-key map "\e[27;14;41~" [?\C-\M-)])
294 (define-key map "\e[27;14;42~" [?\C-\M-*])
295 (define-key map "\e[27;14;43~" [?\C-\M-+])
296 (define-key map "\e[27;14;58~" [?\C-\M-:])
297 (define-key map "\e[27;14;60~" [?\C-\M-<])
298 (define-key map "\e[27;14;62~" [?\C-\M->])
299 (define-key map "\e[27;14;63~" [(C-M-\?)])
300
301 (define-key map "\e[27;2;9~" [S-tab])
302 (define-key map "\e[27;2;13~" [S-return])
303
304 (define-key map "\e[27;6;9~" [(C-S-tab)])
305 (define-key map "\e[27;6;13~" [(C-S-return)])
276 306
277 ;; Other versions of xterm might emit these. 307 ;; Other versions of xterm might emit these.
278 (define-key map "\e[A" [up]) 308 (define-key map "\e[A" [up])
diff --git a/lisp/url/ChangeLog b/lisp/url/ChangeLog
index e4b54f9fc92..ad3912de67f 100644
--- a/lisp/url/ChangeLog
+++ b/lisp/url/ChangeLog
@@ -1,3 +1,18 @@
12006-08-31 Diane Murray <disumu@x3y2z1.net>
2
3 * url-parse.el (url-recreate-url-attributes): New function, code
4 simply moved from `url-recreate-url'.
5 (url-recreate-url): Use it.
6 Put the `url-target' at the end of the URL after the attributes.
7
8 * url-http.el (url-http-create-request):
9 Use `url-recreate-url-attributes' when setting real-fname.
10
112006-08-29 Diane Murray <disumu@x3y2z1.net>
12
13 * url-cookie.el (url-cookie-write-file): Really don't use versioned
14 backups.
15
12006-08-25 Stefan Monnier <monnier@iro.umontreal.ca> 162006-08-25 Stefan Monnier <monnier@iro.umontreal.ca>
2 17
3 * url-handlers.el (url-file-local-copy): Tell url-copy-file that the 18 * url-handlers.el (url-file-local-copy): Tell url-copy-file that the
diff --git a/lisp/url/url-cookie.el b/lisp/url/url-cookie.el
index e74d4989117..f3902619c89 100644
--- a/lisp/url/url-cookie.el
+++ b/lisp/url/url-cookie.el
@@ -168,11 +168,11 @@ telling Microsoft that."
168 (insert ")\n(setq url-cookie-secure-storage\n '") 168 (insert ")\n(setq url-cookie-secure-storage\n '")
169 (pp url-cookie-secure-storage (current-buffer)) 169 (pp url-cookie-secure-storage (current-buffer))
170 (insert ")\n") 170 (insert ")\n")
171 (insert " ;; Local Variables:\n" 171 (insert " \n;; Local Variables:\n"
172 ";; version-control: never\n" 172 ";; version-control: never\n"
173 ";; no-byte-compile: t\n" 173 ";; no-byte-compile: t\n"
174 ";; End:\n") 174 ";; End:\n")
175 (set (make-local-variable 'version-control) t) 175 (set (make-local-variable 'version-control) 'never)
176 (write-file fname) 176 (write-file fname)
177 (setq url-cookies-changed-since-last-save nil) 177 (setq url-cookies-changed-since-last-save nil)
178 (kill-buffer (current-buffer)))))) 178 (kill-buffer (current-buffer))))))
diff --git a/lisp/url/url-http.el b/lisp/url/url-http.el
index ae3a4b3e070..a1d87e1bd31 100644
--- a/lisp/url/url-http.el
+++ b/lisp/url/url-http.el
@@ -160,7 +160,8 @@ request.")
160 (let ((url-basic-auth-storage 160 (let ((url-basic-auth-storage
161 'url-http-proxy-basic-auth-storage)) 161 'url-http-proxy-basic-auth-storage))
162 (url-get-authentication url nil 'any nil)))) 162 (url-get-authentication url nil 'any nil))))
163 (real-fname (url-filename (or proxy-obj url))) 163 (real-fname (concat (url-filename (or proxy-obj url))
164 (url-recreate-url-attributes (or proxy-obj url))))
164 (host (url-host (or proxy-obj url))) 165 (host (url-host (or proxy-obj url)))
165 (auth (if (cdr-safe (assoc "Authorization" url-request-extra-headers)) 166 (auth (if (cdr-safe (assoc "Authorization" url-request-extra-headers))
166 nil 167 nil
diff --git a/lisp/url/url-parse.el b/lisp/url/url-parse.el
index f84bf1a7ba2..1e4d93a861e 100644
--- a/lisp/url/url-parse.el
+++ b/lisp/url/url-parse.el
@@ -100,17 +100,20 @@
100 (not (equal (url-port urlobj) 100 (not (equal (url-port urlobj)
101 (url-scheme-get-property (url-type urlobj) 'default-port)))) 101 (url-scheme-get-property (url-type urlobj) 'default-port))))
102 (format ":%d" (url-port urlobj))) 102 (format ":%d" (url-port urlobj)))
103 (or (url-filename urlobj) "/") 103 (or (url-filename urlobj) "/")
104 (url-recreate-url-attributes urlobj)
104 (if (url-target urlobj) 105 (if (url-target urlobj)
105 (concat "#" (url-target urlobj))) 106 (concat "#" (url-target urlobj)))))
106 (if (url-attributes urlobj) 107
107 (concat ";" 108(defun url-recreate-url-attributes (urlobj)
108 (mapconcat 109 "Recreate the attributes of an URL string from the parsed URLOBJ."
109 (function 110 (when (url-attributes urlobj)
110 (lambda (x) 111 (concat ";"
111 (if (cdr x) 112 (mapconcat (lambda (x)
112 (concat (car x) "=" (cdr x)) 113 (if (cdr x)
113 (car x)))) (url-attributes urlobj) ";"))))) 114 (concat (car x) "=" (cdr x))
115 (car x)))
116 (url-attributes urlobj) ";"))))
114 117
115;;;###autoload 118;;;###autoload
116(defun url-generic-parse-url (url) 119(defun url-generic-parse-url (url)
diff --git a/lisp/woman.el b/lisp/woman.el
index 2392d0bfa4c..3ee3e3f98d6 100644
--- a/lisp/woman.el
+++ b/lisp/woman.el
@@ -1196,7 +1196,7 @@ It is saved to the file named by the variable `woman-cache-filename'."
1196 (kill-buffer standard-output) 1196 (kill-buffer standard-output)
1197 )))) 1197 ))))
1198 1198
1199(defvar woman-topic-history nil "Topic read history.") 1199(defvaralias 'woman-topic-history 'Man-topic-history)
1200(defvar woman-file-history nil "File-name read history.") 1200(defvar woman-file-history nil "File-name read history.")
1201 1201
1202(defun woman-file-name (topic &optional re-cache) 1202(defun woman-file-name (topic &optional re-cache)
@@ -1750,7 +1750,18 @@ Leave point at end of new text. Return length of inserted text."
1750 (define-key woman-mode-map [M-mouse-2] 'woman-follow-word) 1750 (define-key woman-mode-map [M-mouse-2] 'woman-follow-word)
1751 1751
1752 ;; We don't need to call `man' when we are in `woman-mode'. 1752 ;; We don't need to call `man' when we are in `woman-mode'.
1753 (define-key woman-mode-map [remap man] 'woman)) 1753 (define-key woman-mode-map [remap man] 'woman)
1754 (define-key woman-mode-map [remap man-follow] 'woman-follow))
1755
1756(defun woman-follow (topic)
1757 "Get a Un*x manual page of the item under point and put it in a buffer."
1758 (interactive (list (Man-default-man-entry)))
1759 (if (or (not topic)
1760 (string= topic ""))
1761 (error "No item under point")
1762 (woman (if (string-match Man-reference-regexp topic)
1763 (substring topic 0 (match-end 1))
1764 topic))))
1754 1765
1755(defun woman-follow-word (event) 1766(defun woman-follow-word (event)
1756 "Run WoMan with word under mouse as topic. 1767 "Run WoMan with word under mouse as topic.
diff --git a/lispref/ChangeLog b/lispref/ChangeLog
index cc3ccac3c7a..78e5e6d88cf 100644
--- a/lispref/ChangeLog
+++ b/lispref/ChangeLog
@@ -1,3 +1,44 @@
12006-09-04 Richard Stallman <rms@gnu.org>
2
3 * processes.texi (Accepting Output): Explain SECONDS=0 for
4 accept-process-output.
5
6 * os.texi (Idle Timers): Explain why timer functions should not
7 loop until (input-pending-p).
8
92006-09-02 Eli Zaretskii <eliz@gnu.org>
10
11 * makefile.w32-in (usermanualdir): New variable.
12 (elisp.dvi): Use it.
13
142006-09-01 Eli Zaretskii <eliz@gnu.org>
15
16 * buffers.texi (Buffer Modification): Fix last change.
17
182006-09-01 Chong Yidong <cyd@stupidchicken.com>
19
20 * buffers.texi (Buffer Modification): Document
21 buffer-chars-modified-tick.
22
232006-08-31 Richard Stallman <rms@gnu.org>
24
25 * modes.texi (Syntactic Font Lock): Mention specific faces once again.
26
272006-08-31 Richard Bielawski <RBielawski@moneygram.com> (tiny change)
28
29 * modes.texi (Syntactic Font Lock):
30 Mention font-lock-syntactic-face-function
31 instead of specific faces.
32
332006-08-29 Chong Yidong <cyd@stupidchicken.com>
34
35 * display.texi (Images): Add xrref to display-images-p.
36
372006-08-28 Kenichi Handa <handa@m17n.org>
38
39 * nonascii.texi (Lisp and Coding Systems): Fix description of
40 detect-coding-region.
41
12006-08-27 Michael Olson <mwolson@gnu.org> 422006-08-27 Michael Olson <mwolson@gnu.org>
2 43
3 * processes.texi (Transaction Queues): Remove stray quote 44 * processes.texi (Transaction Queues): Remove stray quote
diff --git a/lispref/buffers.texi b/lispref/buffers.texi
index 46a886eaea6..3b9750f00a2 100644
--- a/lispref/buffers.texi
+++ b/lispref/buffers.texi
@@ -573,7 +573,6 @@ Don't use this function in programs, since it prints a message in the
573echo area; use @code{set-buffer-modified-p} (above) instead. 573echo area; use @code{set-buffer-modified-p} (above) instead.
574@end deffn 574@end deffn
575 575
576@c Emacs 19 feature
577@defun buffer-modified-tick &optional buffer 576@defun buffer-modified-tick &optional buffer
578This function returns @var{buffer}'s modification-count. This is a 577This function returns @var{buffer}'s modification-count. This is a
579counter that increments every time the buffer is modified. If 578counter that increments every time the buffer is modified. If
@@ -581,6 +580,17 @@ counter that increments every time the buffer is modified. If
581The counter can wrap around occasionally. 580The counter can wrap around occasionally.
582@end defun 581@end defun
583 582
583@defun buffer-chars-modified-tick &optional buffer
584This function returns @var{buffer}'s character-change modification-count.
585Changes to text properties leave this counter unchanged; however, each
586time text is inserted or removed from the buffer, the counter is reset
587to the value that would be returned @code{buffer-modified-tick}.
588By comparing the values returned by two @code{buffer-chars-modified-tick}
589calls, you can tell whether a character change occurred in that buffer
590in between the calls. If @var{buffer} is @code{nil} (or omitted), the
591current buffer is used.
592@end defun
593
584@node Modification Time 594@node Modification Time
585@comment node-name, next, previous, up 595@comment node-name, next, previous, up
586@section Comparison of Modification Time 596@section Comparison of Modification Time
diff --git a/lispref/display.texi b/lispref/display.texi
index e762c14a7f0..5865f9c6854 100644
--- a/lispref/display.texi
+++ b/lispref/display.texi
@@ -3564,6 +3564,13 @@ If @var{window} is @code{nil}, the selected window is used.
3564descriptor, then use it as a display specifier in the @code{display} 3564descriptor, then use it as a display specifier in the @code{display}
3565property of text that is displayed (@pxref{Display Property}). 3565property of text that is displayed (@pxref{Display Property}).
3566 3566
3567 Emacs is usually able to display images when it is run on a
3568graphical terminal. Images cannot be displayed in a text terminal, on
3569certain graphical terminals that lack the support for this, or if
3570Emacs is compiled without image support. You can use the function
3571@code{display-images-p} to determine if images can in principle be
3572displayed (@pxref{Display Feature Testing}).
3573
3567 Emacs can display a number of different image formats; some of them 3574 Emacs can display a number of different image formats; some of them
3568are supported only if particular support libraries are installed on 3575are supported only if particular support libraries are installed on
3569your machine. In some environments, Emacs can load image 3576your machine. In some environments, Emacs can load image
diff --git a/lispref/makefile.w32-in b/lispref/makefile.w32-in
index 0b4c080b956..7da88058bd5 100644
--- a/lispref/makefile.w32-in
+++ b/lispref/makefile.w32-in
@@ -23,6 +23,7 @@
23srcdir = . 23srcdir = .
24 24
25infodir = $(srcdir)/../info 25infodir = $(srcdir)/../info
26usermanualdir = $(srcdir)/../man
26 27
27# Redefine `TEX' if `tex' does not invoke plain TeX. For example: 28# Redefine `TEX' if `tex' does not invoke plain TeX. For example:
28# TEX=platex 29# TEX=platex
@@ -108,7 +109,7 @@ $(infodir)/elisp: $(srcs)
108 $(MAKEINFO) -I. -I$(srcdir) -o $(infodir)/elisp $(srcdir)/elisp.texi 109 $(MAKEINFO) -I. -I$(srcdir) -o $(infodir)/elisp $(srcdir)/elisp.texi
109 110
110elisp.dvi: $(srcs) 111elisp.dvi: $(srcs)
111 $(texinputdir) $(TEX) $(srcdir)/elisp.texi 112 $(texinputdir) $(TEX) -I $(usermanualdir) $(srcdir)/elisp.texi
112 113
113clean: 114clean:
114 - $(DEL) *.toc *.aux *.log *.cp *.cps *.fn *.fns *.tp *.tps \ 115 - $(DEL) *.toc *.aux *.log *.cp *.cps *.fn *.fns *.tp *.tps \
diff --git a/lispref/modes.texi b/lispref/modes.texi
index f8afcd8a829..68aeace5c38 100644
--- a/lispref/modes.texi
+++ b/lispref/modes.texi
@@ -2897,9 +2897,10 @@ directives in C.
2897Syntactic fontification uses the syntax table to find comments and 2897Syntactic fontification uses the syntax table to find comments and
2898string constants (@pxref{Syntax Tables}). It highlights them using 2898string constants (@pxref{Syntax Tables}). It highlights them using
2899@code{font-lock-comment-face} and @code{font-lock-string-face} 2899@code{font-lock-comment-face} and @code{font-lock-string-face}
2900(@pxref{Faces for Font Lock}). There are several variables that 2900(@pxref{Faces for Font Lock}), or whatever
2901affect syntactic fontification; you should set them by means of 2901@code{font-lock-syntactic-face-function} chooses. There are several
2902@code{font-lock-defaults} (@pxref{Font Lock Basics}). 2902variables that affect syntactic fontification; you should set them by
2903means of @code{font-lock-defaults} (@pxref{Font Lock Basics}).
2903 2904
2904@defvar font-lock-keywords-only 2905@defvar font-lock-keywords-only
2905Non-@code{nil} means Font Lock should not do syntactic fontification; 2906Non-@code{nil} means Font Lock should not do syntactic fontification;
diff --git a/lispref/nonascii.texi b/lispref/nonascii.texi
index b22a162bb2e..ba001ca72db 100644
--- a/lispref/nonascii.texi
+++ b/lispref/nonascii.texi
@@ -882,8 +882,9 @@ decreasing priority. But if @var{highest} is non-@code{nil}, then the
882return value is just one coding system, the one that is highest in 882return value is just one coding system, the one that is highest in
883priority. 883priority.
884 884
885If the region contains only @acronym{ASCII} characters, the value 885If the region contains only @acronym{ASCII} characters except for such
886is @code{undecided} or @code{(undecided)}, or a variant specifying 886ISO-2022 control characters ISO-2022 as @code{ESC}, the value is
887@code{undecided} or @code{(undecided)}, or a variant specifying
887end-of-line conversion, if that can be deduced from the text. 888end-of-line conversion, if that can be deduced from the text.
888@end defun 889@end defun
889 890
diff --git a/lispref/os.texi b/lispref/os.texi
index f6682548e5b..edf5833bf42 100644
--- a/lispref/os.texi
+++ b/lispref/os.texi
@@ -1578,6 +1578,25 @@ Here's an example:
1578@end smallexample 1578@end smallexample
1579@end defun 1579@end defun
1580 1580
1581 Some idle timer functions in user Lisp packages have a loop that
1582does a certain amount of processing each time around, and exits when
1583@code{(input-pending-p)} is non-@code{nil}. That approach seems very
1584natural but has two problems:
1585
1586@itemize
1587@item
1588It blocks out all process output (since Emacs accepts process output
1589only while waiting).
1590
1591@item
1592It blocks out any idle timers that ought to run during that time.
1593@end itemize
1594
1595@noindent
1596To avoid these problems, don't use that technique. Instead, write
1597such idle timers to reschedule themselves after a brief pause, using
1598the method in the @code{timer-function} example above.
1599
1581@node Terminal Input 1600@node Terminal Input
1582@section Terminal Input 1601@section Terminal Input
1583@cindex terminal input 1602@cindex terminal input
diff --git a/lispref/processes.texi b/lispref/processes.texi
index f957ebcac4b..dbc2486f5f6 100644
--- a/lispref/processes.texi
+++ b/lispref/processes.texi
@@ -1308,6 +1308,8 @@ subprocess output.
1308 1308
1309The argument @var{seconds} need not be an integer. If it is a floating 1309The argument @var{seconds} need not be an integer. If it is a floating
1310point number, this function waits for a fractional number of seconds. 1310point number, this function waits for a fractional number of seconds.
1311If @var{seconds} is 0, the function accepts whatever output is
1312pending but does not wait.
1311 1313
1312@c Emacs 22.1 feature 1314@c Emacs 22.1 feature
1313If @var{process} is a process, and the argument @var{just-this-one} is 1315If @var{process} is a process, and the argument @var{just-this-one} is
diff --git a/man/ChangeLog b/man/ChangeLog
index ee0dac8359c..388800b99ae 100644
--- a/man/ChangeLog
+++ b/man/ChangeLog
@@ -1,3 +1,31 @@
12006-09-01 Eli Zaretskii <eliz@gnu.org>
2
3 * rcirc.texi (Internet Relay Chat, Useful IRC commands): Don't use
4 @indicateurl.
5
6 * cc-mode.texi (Subword Movement): Don't use @headitem.
7 (Custom Braces, Clean-ups): Don't use @tie.
8
92006-08-29 Michael Albinus <michael.albinus@gmx.de>
10
11 Sync with Tramp 2.0.54.
12
13 * tramp.texi (Bug Reports): The Tramp mailing list is moderated
14 now. Suggested by Adrian Phillips <a.phillips@met.no>.
15
162006-08-28 Richard Stallman <rms@gnu.org>
17
18 * windows.texi (Split Window): Update xref.
19
20 * basic.texi (Continuation Lines): Update xref.
21
22 * indent.texi (Tab Stops): Update xref.
23
24 * emacs.texi (Top): Update subnode menu.
25
26 * display.texi (Line Truncation, Displaying Boundaries): New nodes,
27 split out of Display Custom.
28
12006-08-25 Kim F. Storm <storm@cua.dk> 292006-08-25 Kim F. Storm <storm@cua.dk>
2 30
3 * display.texi (Display Custom): Add variables overline-margin 31 * display.texi (Display Custom): Add variables overline-margin
diff --git a/man/basic.texi b/man/basic.texi
index 6f0e7cad68c..5d91685e9e4 100644
--- a/man/basic.texi
+++ b/man/basic.texi
@@ -480,7 +480,7 @@ does not appear at all. @samp{$} in the last column or a small
480straight arrow in the window's right fringe indicates a truncated 480straight arrow in the window's right fringe indicates a truncated
481line. 481line.
482 482
483 @xref{Display Custom}, for more about line truncation, 483 @xref{Line Truncation}, for more about line truncation,
484and other variables that control how text is displayed. 484and other variables that control how text is displayed.
485 485
486@node Position Info 486@node Position Info
diff --git a/man/cc-mode.texi b/man/cc-mode.texi
index 699283528a9..395433bc899 100644
--- a/man/cc-mode.texi
+++ b/man/cc-mode.texi
@@ -1624,8 +1624,16 @@ these mixed case symbols @dfn{nomenclatures}. Also, each capitalized
1624@dfn{subword}. Here are some examples: 1624@dfn{subword}. Here are some examples:
1625 1625
1626@multitable {@samp{NSGraphicsContext}} {@samp{NS}, @samp{Graphics}, and @samp{Context}} 1626@multitable {@samp{NSGraphicsContext}} {@samp{NS}, @samp{Graphics}, and @samp{Context}}
1627@headitem Nomenclature 1627@c This could be converted to @headitem when we require Texinfo 4.7
1628@iftex
1629@item @b{Nomenclature}
1630 @tab @b{Subwords}
1631@end iftex
1632@ifnottex
1633@item Nomenclature
1628 @tab Subwords 1634 @tab Subwords
1635@item ---------------------------------------------------------
1636@end ifnottex
1629@item @samp{GtkWindow} 1637@item @samp{GtkWindow}
1630 @tab @samp{Gtk} and @samp{Window} 1638 @tab @samp{Gtk} and @samp{Window}
1631@item @samp{EmacsFrameClass} 1639@item @samp{EmacsFrameClass}
@@ -1657,7 +1665,14 @@ nomenclature and treat them as separate words:
1657@findex c-downcase-subword 1665@findex c-downcase-subword
1658@findex downcase-subword (c-) 1666@findex downcase-subword (c-)
1659@multitable @columnfractions .20 .40 .40 1667@multitable @columnfractions .20 .40 .40
1660@headitem Key @tab Word oriented command @tab Subword oriented command 1668@c This could be converted to @headitem when we require Texinfo 4.7
1669@iftex
1670@item @b{Key} @tab @b{Word oriented command} @tab @b{Subword oriented command}
1671@end iftex
1672@ifnottex
1673@item Key @tab Word oriented command @tab Subword oriented command
1674@item ----------------------------------------------------------------------------
1675@end ifnottex
1661@item @kbd{M-f} @tab @code{forward-word} @tab @code{c-forward-subword} 1676@item @kbd{M-f} @tab @code{forward-word} @tab @code{c-forward-subword}
1662@item @kbd{M-b} @tab @code{backward-word} @tab @code{c-backward-subword} 1677@item @kbd{M-b} @tab @code{backward-word} @tab @code{c-backward-subword}
1663@item @kbd{M-@@} @tab @code{mark-word} @tab @code{c-mark-subword} 1678@item @kbd{M-@@} @tab @code{mark-word} @tab @code{c-mark-subword}
@@ -3231,9 +3246,9 @@ give @code{c-syntactic-context} a value yourself---this would disrupt
3231the proper functioning of @ccmode{}. 3246the proper functioning of @ccmode{}.
3232 3247
3233This variable is also bound in three other circumstances: 3248This variable is also bound in three other circumstances:
3234(i)@tie{}when calling a c-hanging-semi&comma-criteria function 3249(i)@w{ }when calling a c-hanging-semi&comma-criteria function
3235(@pxref{Hanging Semicolons and Commas}; (ii)@tie{}when calling a 3250(@pxref{Hanging Semicolons and Commas}; (ii)@w{ }when calling a
3236line-up function (@pxref{Custom Line-Up}; (iii)@tie{}when calling a 3251line-up function (@pxref{Custom Line-Up}; (iii)@w{ }when calling a
3237c-special-indent-hook function (@pxref{Other Indentation}). 3252c-special-indent-hook function (@pxref{Other Indentation}).
3238@end defvar 3253@end defvar
3239 3254
@@ -3630,8 +3645,8 @@ Auto-newline minor mode are enabled:
3630@item space-before-funcall 3645@item space-before-funcall
3631Insert a space between the function name and the opening parenthesis 3646Insert a space between the function name and the opening parenthesis
3632of a function call. This produces function calls in the style 3647of a function call. This produces function calls in the style
3633mandated by the GNU coding standards, e.g. @samp{signal@tie{}(SIGINT, 3648mandated by the GNU coding standards, e.g. @samp{signal@w{ }(SIGINT,
3634SIG_IGN)} and @samp{abort@tie{}()}. Clean up occurs when the opening 3649SIG_IGN)} and @samp{abort@w{ }()}. Clean up occurs when the opening
3635parenthesis is typed. This clean-up should never be active in AWK 3650parenthesis is typed. This clean-up should never be active in AWK
3636Mode, since such a space is syntactically invalid for user defined 3651Mode, since such a space is syntactically invalid for user defined
3637functions. 3652functions.
diff --git a/man/display.texi b/man/display.texi
index 2a0abd4bef6..74d2ba5eb62 100644
--- a/man/display.texi
+++ b/man/display.texi
@@ -23,11 +23,14 @@ their values only make a difference at the time of redisplay.
23* Font Lock:: Minor mode for syntactic highlighting using faces. 23* Font Lock:: Minor mode for syntactic highlighting using faces.
24* Highlight Interactively:: Tell Emacs what text to highlight. 24* Highlight Interactively:: Tell Emacs what text to highlight.
25* Fringes:: Enabling or disabling window fringes. 25* Fringes:: Enabling or disabling window fringes.
26* Displaying Boundaries:: Displaying top and bottom of the buffer.
26* Useless Whitespace:: Showing possibly-spurious trailing whitespace. 27* Useless Whitespace:: Showing possibly-spurious trailing whitespace.
27* Selective Display:: Hiding lines with lots of indentation. 28* Selective Display:: Hiding lines with lots of indentation.
28* Optional Mode Line:: Optional mode line display features. 29* Optional Mode Line:: Optional mode line display features.
29* Text Display:: How text characters are normally displayed. 30* Text Display:: How text characters are normally displayed.
30* Cursor Display:: Features for displaying the cursor. 31* Cursor Display:: Features for displaying the cursor.
32* Line Truncation:: Truncating lines to fit the screen width instead
33 of continuing them to multiple screen lines.
31* Display Custom:: Information on variables for customizing display. 34* Display Custom:: Information on variables for customizing display.
32@end menu 35@end menu
33 36
@@ -202,8 +205,8 @@ window, Emacs recenters the window. By default, @code{scroll-margin} is
202 @dfn{Horizontal scrolling} means shifting all the lines sideways 205 @dfn{Horizontal scrolling} means shifting all the lines sideways
203within a window---so that some of the text near the left margin is not 206within a window---so that some of the text near the left margin is not
204displayed at all. When the text in a window is scrolled horizontally, 207displayed at all. When the text in a window is scrolled horizontally,
205text lines are truncated rather than continued (@pxref{Display 208text lines are truncated rather than continued (@pxref{Line
206Custom}). Whenever a window shows truncated lines, Emacs 209Truncation}). Whenever a window shows truncated lines, Emacs
207automatically updates its horizontal scrolling whenever point moves 210automatically updates its horizontal scrolling whenever point moves
208off the left or right edge of the screen. You can also use these 211off the left or right edge of the screen. You can also use these
209commands to do explicit horizontal scrolling. 212commands to do explicit horizontal scrolling.
@@ -751,6 +754,40 @@ program you are debugging is executing (@pxref{Debuggers}).
751@kbd{M-x fringe-mode}. To enable and disable the fringes 754@kbd{M-x fringe-mode}. To enable and disable the fringes
752for the selected frame, use @kbd{M-x set-fringe-style}. 755for the selected frame, use @kbd{M-x set-fringe-style}.
753 756
757@node Displaying Boundaries
758@section Displaying Boundaries
759
760@vindex indicate-buffer-boundaries
761 On a graphical display, Emacs can indicate the buffer boundaries in
762the fringes. It indicates the first line and the last line with
763angle images in the fringes. This can be combined with up and down
764arrow images which say whether it is possible to scroll the window up
765and down.
766
767 The buffer-local variable @code{indicate-buffer-boundaries} controls
768how the buffer boundaries and window scrolling is indicated in the
769fringes. If the value is @code{left} or @code{right}, both angle and
770arrow bitmaps are displayed in the left or right fringe, respectively.
771
772 If value is an alist, each element @code{(@var{indicator} .
773@var{position})} specifies the position of one of the indicators.
774The @var{indicator} must be one of @code{top}, @code{bottom},
775@code{up}, @code{down}, or @code{t} which specifies the default
776position for the indicators not present in the alist.
777The @var{position} is one of @code{left}, @code{right}, or @code{nil}
778which specifies not to show this indicator.
779
780 For example, @code{((top . left) (t . right))} places the top angle
781bitmap in left fringe, the bottom angle bitmap in right fringe, and
782both arrow bitmaps in right fringe. To show just the angle bitmaps in
783the left fringe, but no arrow bitmaps, use @code{((top . left)
784(bottom . left))}.
785
786@vindex default-indicate-buffer-boundaries
787 The value of the variable @code{default-indicate-buffer-boundaries}
788is the default value for @code{indicate-buffer-boundaries} in buffers
789that do not override it.
790
754@node Useless Whitespace 791@node Useless Whitespace
755@section Useless Whitespace 792@section Useless Whitespace
756 793
@@ -1083,30 +1120,8 @@ minor mode that highlights the line containing point. Use @kbd{M-x
1083hl-line-mode} to enable or disable it in the current buffer. @kbd{M-x 1120hl-line-mode} to enable or disable it in the current buffer. @kbd{M-x
1084global-hl-line-mode} enables or disables the same mode globally. 1121global-hl-line-mode} enables or disables the same mode globally.
1085 1122
1086@node Display Custom 1123@node Line Truncation
1087@section Customization of Display 1124@section Truncation of Lines
1088
1089 This section describes variables (@pxref{Variables}) that you can
1090change to customize how Emacs displays. Beginning users can skip
1091it.
1092@c the reason for that pxref is because an xref early in the
1093@c ``echo area'' section leads here.
1094
1095@vindex inverse-video
1096 If the variable @code{inverse-video} is non-@code{nil}, Emacs attempts
1097to invert all the lines of the display from what they normally are.
1098
1099@vindex visible-bell
1100 If the variable @code{visible-bell} is non-@code{nil}, Emacs attempts
1101to make the whole screen blink when it would normally make an audible bell
1102sound. This variable has no effect if your terminal does not have a way
1103to make the screen blink.
1104
1105@vindex echo-keystrokes
1106 The variable @code{echo-keystrokes} controls the echoing of multi-character
1107keys; its value is the number of seconds of pause required to cause echoing
1108to start, or zero, meaning don't echo at all. The value takes effect when
1109there is someting to echo. @xref{Echo Area}.
1110 1125
1111@cindex truncation 1126@cindex truncation
1112@cindex line truncation, and fringes 1127@cindex line truncation, and fringes
@@ -1145,36 +1160,30 @@ truncate a line which is exactly as wide as the window. Instead, the
1145newline overflows into the right fringe, and the cursor appears in the 1160newline overflows into the right fringe, and the cursor appears in the
1146fringe when positioned on that newline. 1161fringe when positioned on that newline.
1147 1162
1148@vindex indicate-buffer-boundaries 1163@node Display Custom
1149 On a graphical display, Emacs can indicate the buffer boundaries in 1164@section Customization of Display
1150the fringes. It indicates the first line and the last line with
1151angle images in the fringes. This can be combined with up and down
1152arrow images which say whether it is possible to scroll the window up
1153and down.
1154 1165
1155 The buffer-local variable @code{indicate-buffer-boundaries} controls 1166 This section describes variables (@pxref{Variables}) that you can
1156how the buffer boundaries and window scrolling is indicated in the 1167change to customize how Emacs displays. Beginning users can skip
1157fringes. If the value is @code{left} or @code{right}, both angle and 1168it.
1158arrow bitmaps are displayed in the left or right fringe, respectively. 1169@c the reason for that pxref is because an xref early in the
1170@c ``echo area'' section leads here.
1159 1171
1160 If value is an alist, each element @code{(@var{indicator} . 1172@vindex inverse-video
1161@var{position})} specifies the position of one of the indicators. 1173 If the variable @code{inverse-video} is non-@code{nil}, Emacs attempts
1162The @var{indicator} must be one of @code{top}, @code{bottom}, 1174to invert all the lines of the display from what they normally are.
1163@code{up}, @code{down}, or @code{t} which specifies the default
1164position for the indicators not present in the alist.
1165The @var{position} is one of @code{left}, @code{right}, or @code{nil}
1166which specifies not to show this indicator.
1167 1175
1168 For example, @code{((top . left) (t . right))} places the top angle 1176@vindex visible-bell
1169bitmap in left fringe, the bottom angle bitmap in right fringe, and 1177 If the variable @code{visible-bell} is non-@code{nil}, Emacs attempts
1170both arrow bitmaps in right fringe. To show just the angle bitmaps in 1178to make the whole screen blink when it would normally make an audible bell
1171the left fringe, but no arrow bitmaps, use @code{((top . left) 1179sound. This variable has no effect if your terminal does not have a way
1172(bottom . left))}. 1180to make the screen blink.
1173 1181
1174@vindex default-indicate-buffer-boundaries 1182@vindex echo-keystrokes
1175 The value of the variable @code{default-indicate-buffer-boundaries} 1183 The variable @code{echo-keystrokes} controls the echoing of multi-character
1176is the default value for @code{indicate-buffer-boundaries} in buffers 1184keys; its value is the number of seconds of pause required to cause echoing
1177that do not override it. 1185to start, or zero, meaning don't echo at all. The value takes effect when
1186there is someting to echo. @xref{Echo Area}.
1178 1187
1179@vindex baud-rate 1188@vindex baud-rate
1180 The variable @anchor{baud-rate}@code{baud-rate} holds the output 1189 The variable @anchor{baud-rate}@code{baud-rate} holds the output
@@ -1197,6 +1206,17 @@ or off, customize the group @code{cursor}. You can also control the
1197amount of time Emacs must remain busy before the busy indicator is 1206amount of time Emacs must remain busy before the busy indicator is
1198displayed, by setting the variable @code{hourglass-delay}. 1207displayed, by setting the variable @code{hourglass-delay}.
1199 1208
1209@vindex overline-margin
1210 On graphical display, this variables specifies the vertical position
1211of an overline above the text, including the height of the overline
1212itself (1 pixel). The default value is 2 pixels.
1213
1214@vindex x-underline-at-descent-line
1215 On graphical display, Emacs normally draws an underline at the
1216baseline level of the font. If @code{x-underline-at-descent-line} is
1217non-@code{nil}, Emacs draws the underline at the same height as the
1218font's descent line.
1219
1200@findex tty-suppress-bold-inverse-default-colors 1220@findex tty-suppress-bold-inverse-default-colors
1201 On some text-only terminals, bold face and inverse video together 1221 On some text-only terminals, bold face and inverse video together
1202result in text that is hard to read. Call the function 1222result in text that is hard to read. Call the function
@@ -1215,17 +1235,6 @@ page for other output. On such terminals, you might want to set the variable
1215assume, when resumed, that the screen page it is using still contains 1235assume, when resumed, that the screen page it is using still contains
1216what Emacs last wrote there. 1236what Emacs last wrote there.
1217 1237
1218@vindex overline-margin
1219 On graphical display, this variables specifies the number of pixes
1220the overline is shown above the text. The value includes the height of
1221the overline itself (1 pixel). The default value is 2 pixels.
1222
1223@vindex x-underline-at-descent-line
1224 On graphical display, the underline is normally drawn at the
1225baseline level of the font. If @code{x-underline-at-descent-line} is
1226non-@code{nil}, the underline is drawn at the same position as the
1227font's decent line.
1228
1229@ignore 1238@ignore
1230 arch-tag: 2219f910-2ff0-4521-b059-1bd231a536c4 1239 arch-tag: 2219f910-2ff0-4521-b059-1bd231a536c4
1231@end ignore 1240@end ignore
diff --git a/man/emacs.texi b/man/emacs.texi
index 780b5c97b6e..503ec74bffd 100644
--- a/man/emacs.texi
+++ b/man/emacs.texi
@@ -329,11 +329,14 @@ Controlling the Display
329* Font Lock:: Minor mode for syntactic highlighting using faces. 329* Font Lock:: Minor mode for syntactic highlighting using faces.
330* Highlight Interactively:: Tell Emacs what text to highlight. 330* Highlight Interactively:: Tell Emacs what text to highlight.
331* Fringes:: Enabling or disabling window fringes. 331* Fringes:: Enabling or disabling window fringes.
332* Displaying Boundaries:: Displaying top and bottom of the buffer.
332* Useless Whitespace:: Showing possibly-spurious trailing whitespace. 333* Useless Whitespace:: Showing possibly-spurious trailing whitespace.
333* Selective Display:: Hiding lines with lots of indentation. 334* Selective Display:: Hiding lines with lots of indentation.
334* Optional Mode Line:: Optional mode line display features. 335* Optional Mode Line:: Optional mode line display features.
335* Text Display:: How text characters are normally displayed. 336* Text Display:: How text characters are normally displayed.
336* Cursor Display:: Features for displaying the cursor. 337* Cursor Display:: Features for displaying the cursor.
338* Line Truncation:: Truncating lines to fit the screen width instead
339 of continuing them to multiple screen lines.
337* Display Custom:: Information on variables for customizing display. 340* Display Custom:: Information on variables for customizing display.
338 341
339Searching and Replacement 342Searching and Replacement
diff --git a/man/indent.texi b/man/indent.texi
index d5c69daa192..9462b1b3fac 100644
--- a/man/indent.texi
+++ b/man/indent.texi
@@ -212,7 +212,7 @@ To install changes, type C-c C-c
212are present just to help you see where the colons are and know what to do. 212are present just to help you see where the colons are and know what to do.
213 213
214 Note that the tab stops that control @code{tab-to-tab-stop} have nothing 214 Note that the tab stops that control @code{tab-to-tab-stop} have nothing
215to do with displaying tab characters in the buffer. @xref{Display Custom}, 215to do with displaying tab characters in the buffer. @xref{Text Display},
216for more information on that. 216for more information on that.
217 217
218@node Just Spaces,, Tab Stops, Indentation 218@node Just Spaces,, Tab Stops, Indentation
diff --git a/man/rcirc.texi b/man/rcirc.texi
index 606e6beea06..15744e6642c 100644
--- a/man/rcirc.texi
+++ b/man/rcirc.texi
@@ -118,7 +118,7 @@ Here's a typical example:
118 118
119@cindex redirection to random servers 119@cindex redirection to random servers
120When you connect to the Freenode network 120When you connect to the Freenode network
121(@indicateurl{http://freenode.net/}), you point your IRC client at the 121(@code{http://freenode.net/}), you point your IRC client at the
122server @code{irc.freenode.net}. That server will redirect your client 122server @code{irc.freenode.net}. That server will redirect your client
123to a random server on the network, such as @code{zelazny.freenode.net}. 123to a random server on the network, such as @code{zelazny.freenode.net}.
124 124
@@ -424,8 +424,8 @@ your status as ``being back'' if you do not. People can use the
424@cindex help about irc 424@cindex help about irc
425Typical IRC servers implement many more commands. You can read more 425Typical IRC servers implement many more commands. You can read more
426about the fantastic world of IRC online at 426about the fantastic world of IRC online at
427@indicateurl{http://www.irchelp.org/}, the Internet Relay Chat (IRC) 427@uref{http://www.irchelp.org/, the Internet Relay Chat (IRC) help
428help archive. 428archive}.
429 429
430@node Configuration, , Useful IRC commands, Reference 430@node Configuration, , Useful IRC commands, Reference
431@section Configuration 431@section Configuration
diff --git a/man/tramp.texi b/man/tramp.texi
index e7d7b3d6b8d..b85347461ca 100644
--- a/man/tramp.texi
+++ b/man/tramp.texi
@@ -1931,12 +1931,16 @@ navigation in the @file{*Compilation*} buffer.
1931@chapter Reporting Bugs and Problems 1931@chapter Reporting Bugs and Problems
1932@cindex bug reports 1932@cindex bug reports
1933 1933
1934Bugs and problems with @value{tramp} are actively worked on by the development 1934Bugs and problems with @value{tramp} are actively worked on by the
1935team. Feature requests and suggestions are also more than welcome. 1935development team. Feature requests and suggestions are also more than
1936 1936welcome.
1937The @value{tramp} mailing list is a great place to get information on working 1937
1938with @value{tramp}, solving problems and general discussion and advice on topics 1938The @value{tramp} mailing list is a great place to get information on
1939relating to the package. 1939working with @value{tramp}, solving problems and general discussion
1940and advice on topics relating to the package. It is moderated so
1941non-subscribers can post but messages will be delayed, possibly up to
194248 hours (or longer in case of holidays), until the moderator approves
1943your message.
1940 1944
1941The mailing list is at @email{tramp-devel@@gnu.org}. Messages sent to 1945The mailing list is at @email{tramp-devel@@gnu.org}. Messages sent to
1942this address go to all the subscribers. This is @emph{not} the address 1946this address go to all the subscribers. This is @emph{not} the address
diff --git a/man/trampver.texi b/man/trampver.texi
index 4fc3958b2f2..bf220f4b195 100644
--- a/man/trampver.texi
+++ b/man/trampver.texi
@@ -4,7 +4,7 @@
4@c In the Tramp CVS, the version number is auto-frobbed from 4@c In the Tramp CVS, the version number is auto-frobbed from
5@c configure.ac, so you should edit that file and run 5@c configure.ac, so you should edit that file and run
6@c "autoconf && ./configure" to change the version number. 6@c "autoconf && ./configure" to change the version number.
7@set trampver 2.0.53 7@set trampver 2.0.54
8 8
9@c Other flags from configuration 9@c Other flags from configuration
10@set prefix /usr/local 10@set prefix /usr/local
diff --git a/man/windows.texi b/man/windows.texi
index a000892ad09..afb9f4273e6 100644
--- a/man/windows.texi
+++ b/man/windows.texi
@@ -116,7 +116,7 @@ fit are frequent. Continuing all those lines might be confusing, so
116if the variable @code{truncate-partial-width-windows} is 116if the variable @code{truncate-partial-width-windows} is
117non-@code{nil}, that forces truncation in all windows less than the 117non-@code{nil}, that forces truncation in all windows less than the
118full width of the screen, independent of the buffer being displayed 118full width of the screen, independent of the buffer being displayed
119and its value for @code{truncate-lines}. @xref{Display Custom}. 119and its value for @code{truncate-lines}. @xref{Line Truncation}.
120 120
121 Horizontal scrolling is often used in side-by-side windows. 121 Horizontal scrolling is often used in side-by-side windows.
122@xref{Horizontal Scrolling}. 122@xref{Horizontal Scrolling}.
diff --git a/src/ChangeLog b/src/ChangeLog
index be774a8b75c..64b3b884bfa 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,99 @@
12006-09-05 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
2
3 * macterm.c (install_window_handler, mac_handle_window_event)
4 [USE_CARBON_EVENTS]: Handle kEventWindowClose.
5 [USE_MAC_TSM] (mac_handle_text_input_event): Set modifiers for
6 ASCII keystroke event.
7
82006-09-04 Jan Dj,Ad(Brv <jan.h.d@swipnet.se>
9
10 * gtkutil.c (xg_get_file_with_chooser): Don't mention specific keys in
11 the file chooser message. Only call gtk_file_chooser_set_current_name
12 when action is SAVE.
13
142006-09-04 Andreas Schwab <schwab@suse.de>
15
16 * Makefile.in: Double all single and back quotes in C-style
17 comments to help fontifier.
18
192006-09-03 Jason Rumney <jasonr@gnu.org>
20
21 * w32.c (shutdown_handler): New function to exit cleanly on shutdown.
22 (globals_of_w32): Register it as a signal handler.
23
242006-09-02 Juri Linkov <juri@jurta.org>
25
26 * marker.c (Fmarker_position): Doc fix.
27
282006-09-03 Eli Zaretskii <eliz@gnu.org>
29
30 * window.c (syms_of_window) <split-height-threshold>:
31 <window-min-height, window-min-width>: Doc fix.
32
332006-09-02 Jan Dj,Ad(Brv <jan.h.d@swipnet.se>
34
35 * gtkutil.c (xg_get_file_with_chooser): Change file chooser message
36 for writing files. Call gtk_file_chooser_set_current_name to keep
37 default filename.
38
39 * minibuf.c (Finternal_complete_buffer): Move after DEFUN:s it calls
40
412006-09-02 Jindrich Makovicka <makovick@gmail.com> (tiny change)
42
43 * fns.c (concat) [__GNUC__]: Declare with
44 `__attribute__((noinline))'.
45
46 * eval.c (apply1, call2) [__GNUC__]: Declare with
47 `__attribute__((noinline))'.
48
492006-09-02 Stuart D. Herring <herring@lanl.gov>
50
51 * minibuf.c (Finternal_complete_buffer): New function.
52 (syms_of_minibuf): Defsubr it.
53 (Fread_buffer): Use it, instead of Vbuffer_alist.
54
552006-09-01 Martin Rudalics <rudalics@gmx.at>
56
57 * buffer.h (struct buffer_text): New field chars_modiff.
58 (CHARS_MODIFF, BUF_CHARS_MODIFF): New macros.
59 * buffer.c (Fbuffer_chars_modified_tick): New function returning
60 value of BUF_CHARS_MODIFF.
61 (syms_of_buffer): Defsubr it.
62 (Fget_buffer_create): Initialize BUF_CHARS_MODIFF.
63 * insdel.c (modify_region): New argument preserve_chars_modiff.
64 Set CHARS_MODIFF to MODIFF provided preserve_chars_modiff is zero.
65 (insert_1_both, insert_from_string_1, insert_from_buffer_1)
66 (adjust_after_replace, adjust_after_replace_noundo)
67 (replace_range, replace_range_2, del_range_2): Reset CHARS_MODIFF.
68 * lisp.h (modify_region): Add fourth argument in extern.
69 * casefiddle.c (casify_region): Call modify_region with fourth
70 argument zero to assert that CHARS_MODIFF is updated.
71 * editfns.c (Fsubst_char_in_region, Ftranslate_region_internal)
72 (Ftranspose_regions): Likewise.
73 * textprop.c (Fadd_text_properties, Fset_text_properties)
74 (Fremove_text_properties, Fremove_list_of_text_properties):
75 Call modify_region with fourth argument 1 to avoid that
76 CHARS_MODIFF is updated.
77
782006-08-31 Richard Stallman <rms@gnu.org>
79
80 * editfns.c (Fformat): Don't sign-extend for %o or %x.
81
822006-08-29 Chong Yidong <cyd@stupidchicken.com>
83
84 * indent.c (Fvertical_motion): Don't move back if we were
85 displaying a Lisp string, either.
86
872006-08-28 Kim F. Storm <storm@cua.dk>
88
89 * xdisp.c (get_window_cursor_type) [!HAVE_WINDOW_SYSTEM]:
90 Don't attempt to replace cursor on image glyphs.
91
922006-08-28 Kenichi Handa <handa@m17n.org>
93
94 * coding.c (Fdetect_coding_region, Fdetect_coding_string): Fix
95 docstring about ISO-2022 control characters.
96
12006-08-28 Kim F. Storm <storm@cua.dk> 972006-08-28 Kim F. Storm <storm@cua.dk>
2 98
3 * xdisp.c (get_window_cursor_type): Replace BOX cursor on images 99 * xdisp.c (get_window_cursor_type): Replace BOX cursor on images
@@ -68,6 +164,10 @@
68 (Frename_file, Fadd_name_to_file, Fmake_symbolic_link): 164 (Frename_file, Fadd_name_to_file, Fmake_symbolic_link):
69 Simplify; remove NO_ARG_ARRAY stuff, use list2. 165 Simplify; remove NO_ARG_ARRAY stuff, use list2.
70 166
1672006-08-25 Richard Stallman <rms@gnu.org>
168
169 * buffer.c (Fswitch_to_buffer): Fix previous change.
170
712006-08-25 Kim F. Storm <storm@cua.dk> 1712006-08-25 Kim F. Storm <storm@cua.dk>
72 172
73 * keyboard.c (Fcurrent_idle_time): Simplify. 173 * keyboard.c (Fcurrent_idle_time): Simplify.
diff --git a/src/Makefile.in b/src/Makefile.in
index b0843ad4063..88879645ceb 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -75,13 +75,13 @@ SHELL=/bin/sh
75#define NOT_C_CODE 75#define NOT_C_CODE
76#include "config.h" 76#include "config.h"
77 77
78/* We won't really call alloca; 78/* We won''t really call alloca;
79 don't let the file name alloca.c get messed up. */ 79 don''t let the file name alloca.c get messed up. */
80#ifdef alloca 80#ifdef alloca
81#undef alloca 81#undef alloca
82#endif 82#endif
83 83
84/* Don't let the file name mktime.c get messed up. */ 84/* Don''t let the file name mktime.c get messed up. */
85#ifdef mktime 85#ifdef mktime
86#undef mktime 86#undef mktime
87#endif 87#endif
@@ -96,7 +96,7 @@ SHELL=/bin/sh
96#endif 96#endif
97 97
98/* On some machines #define register is done in config; 98/* On some machines #define register is done in config;
99 don't let it interfere with this file. */ 99 don''t let it interfere with this file. */
100#undef register 100#undef register
101 101
102/* On some systems we may not be able to use the system make command. */ 102/* On some systems we may not be able to use the system make command. */
@@ -116,7 +116,7 @@ CC = C_COMPILER
116#endif 116#endif
117#endif 117#endif
118 118
119/* Some machines don't find the standard C libraries in the usual place. */ 119/* Some machines don''t find the standard C libraries in the usual place. */
120#ifndef ORDINARY_LINK 120#ifndef ORDINARY_LINK
121#ifndef LIB_STANDARD 121#ifndef LIB_STANDARD
122#define LIB_STANDARD -lc 122#define LIB_STANDARD -lc
@@ -248,7 +248,7 @@ STARTFILES = START_FILES
248#endif /* not ORDINARY_LINK */ 248#endif /* not ORDINARY_LINK */
249 249
250 250
251/* cc switches needed to make `asm' keyword work. 251/* cc switches needed to make ``asm'' keyword work.
252 Nothing special needed on most machines. */ 252 Nothing special needed on most machines. */
253#ifndef C_SWITCH_ASM 253#ifndef C_SWITCH_ASM
254#define C_SWITCH_ASM 254#define C_SWITCH_ASM
@@ -277,7 +277,7 @@ TOOLKIT_DEFINES =
277 for use in Emacs. 277 for use in Emacs.
278 278
279 -DHAVE_CONFIG_H is needed for some other files to take advantage of 279 -DHAVE_CONFIG_H is needed for some other files to take advantage of
280 the information in `config.h'. */ 280 the information in ``config.h''. */
281 281
282/* C_SWITCH_X_SITE must come before C_SWITCH_X_MACHINE and C_SWITCH_X_SYSTEM 282/* C_SWITCH_X_SITE must come before C_SWITCH_X_MACHINE and C_SWITCH_X_SYSTEM
283 since it may have -I options that should override those two. */ 283 since it may have -I options that should override those two. */
@@ -337,7 +337,7 @@ LIBXMENU= -lXMenu
337 337
338#else /* not HAVE_MENUS */ 338#else /* not HAVE_MENUS */
339 339
340/* Otherwise, don't worry about the menu library at all. */ 340/* Otherwise, don''t worry about the menu library at all. */
341LIBXMENU= 341LIBXMENU=
342#endif /* not HAVE_MENUS */ 342#endif /* not HAVE_MENUS */
343 343
@@ -381,7 +381,7 @@ LIBXTR6 = -lSM -lICE
381#ifdef LIBXT_STATIC 381#ifdef LIBXT_STATIC
382/* We assume the config files have defined STATIC_OPTION 382/* We assume the config files have defined STATIC_OPTION
383 since that might depend on the operating system. 383 since that might depend on the operating system.
384 (Don't forget you need different definitions with and without __GNUC__.) */ 384 (Don''t forget you need different definitions with and without __GNUC__.) */
385LIBXT= STATIC_OPTION $(LIBW) LIBXMU -lXt $(LIBXTR6) -lXext DYNAMIC_OPTION 385LIBXT= STATIC_OPTION $(LIBW) LIBXMU -lXt $(LIBXTR6) -lXext DYNAMIC_OPTION
386#else /* not LIBXT_STATIC */ 386#else /* not LIBXT_STATIC */
387LIBXT= $(LIBW) LIBXMU -lXt $(LIBXTR6) -lXext 387LIBXT= $(LIBW) LIBXMU -lXt $(LIBXTR6) -lXext
@@ -474,9 +474,9 @@ CFLAGS_SOUND= @CFLAGS_SOUND@
474/* Versions of GCC >= 2.0 put their library, libgcc.a, in obscure 474/* Versions of GCC >= 2.0 put their library, libgcc.a, in obscure
475 places that are difficult to figure out at make time. Fortunately, 475 places that are difficult to figure out at make time. Fortunately,
476 these same versions allow you to pass arbitrary flags on to the 476 these same versions allow you to pass arbitrary flags on to the
477 linker, so there's no reason not to use it as a linker. 477 linker, so there''s no reason not to use it as a linker.
478 478
479 Well, it's not quite perfect. The `-nostdlib' keeps GCC from 479 Well, it''s not quite perfect. The ``-nostdlib'' keeps GCC from
480 searching for libraries in its internal directories, so we have to 480 searching for libraries in its internal directories, so we have to
481 ask GCC explicitly where to find libgcc.a. */ 481 ask GCC explicitly where to find libgcc.a. */
482 482
@@ -493,9 +493,9 @@ GNULIB_VAR = LIB_GCC
493 493
494#ifndef LINKER_WAS_SPECIFIED 494#ifndef LINKER_WAS_SPECIFIED
495/* GCC passes any argument prefixed with -Xlinker directly to the 495/* GCC passes any argument prefixed with -Xlinker directly to the
496 linker. See prefix-args.c for an explanation of why we don't do 496 linker. See prefix-args.c for an explanation of why we don''t do
497 this with the shell's `for' construct. 497 this with the shell''s ``for'' construct.
498 Note that some people don't have '.' in their paths, so we must 498 Note that some people don''t have '.' in their paths, so we must
499 use ./prefix-args. */ 499 use ./prefix-args. */
500#define YMF_PASS_LDFLAGS(flags) `./prefix-args -Xlinker flags` 500#define YMF_PASS_LDFLAGS(flags) `./prefix-args -Xlinker flags`
501#else 501#else
@@ -536,12 +536,12 @@ LD=ld
536#endif /* not ORDINARY_LINK */ 536#endif /* not ORDINARY_LINK */
537 537
538/* Flags to pass to LD only for temacs. */ 538/* Flags to pass to LD only for temacs. */
539/* Don't split this line with a backslash. That can cause trouble with 539/* Don''t split this line with a backslash. That can cause trouble with
540 some cpps. */ 540 some cpps. */
541TEMACS_LDFLAGS = LD_SWITCH_SYSTEM LD_SWITCH_SYSTEM_TEMACS LD_SWITCH_MACHINE LD_SWITCH_MACHINE_TEMACS LD_SWITCH_SITE 541TEMACS_LDFLAGS = LD_SWITCH_SYSTEM LD_SWITCH_SYSTEM_TEMACS LD_SWITCH_MACHINE LD_SWITCH_MACHINE_TEMACS LD_SWITCH_SITE
542 542
543/* A macro which other sections of Makefile can redefine to munge the 543/* A macro which other sections of Makefile can redefine to munge the
544 flags before they're passed to LD. This is helpful if you have 544 flags before they''re passed to LD. This is helpful if you have
545 redefined LD to something odd, like "gcc". 545 redefined LD to something odd, like "gcc".
546 (The YMF prefix is a holdover from the old name "ymakefile".) 546 (The YMF prefix is a holdover from the old name "ymakefile".)
547 */ 547 */
@@ -728,8 +728,8 @@ otherobj= $(termcapobj) lastfile.o $(mallocobj) $(allocaobj) $(widgetobj) $(LIBO
728#define TOOLTIP_SUPPORT 728#define TOOLTIP_SUPPORT
729#endif 729#endif
730 730
731/* List of Lisp files loaded into the dumped Emacs. It's arranged 731/* List of Lisp files loaded into the dumped Emacs. It''s arranged
732 like this because it's easier to generate it semi-mechanically from 732 like this because it''s easier to generate it semi-mechanically from
733 loadup.el this way. 733 loadup.el this way.
734 734
735 Note that this list should not include lisp files which might not 735 Note that this list should not include lisp files which might not
@@ -915,7 +915,7 @@ shortlisp= \
915 We must unconditionally put them in the DOC file. 915 We must unconditionally put them in the DOC file.
916 We use ../lisp/ to start the file names 916 We use ../lisp/ to start the file names
917 to reduce the size of the argument list for make-docfile 917 to reduce the size of the argument list for make-docfile
918 for the sake of systems which can\'t handle large ones. */ 918 for the sake of systems which can''t handle large ones. */
919SOME_MACHINE_LISP = ${dotdot}/lisp/mouse.elc \ 919SOME_MACHINE_LISP = ${dotdot}/lisp/mouse.elc \
920 ${dotdot}/lisp/select.elc ${dotdot}/lisp/scroll-bar.elc \ 920 ${dotdot}/lisp/select.elc ${dotdot}/lisp/scroll-bar.elc \
921 ${dotdot}/lisp/vmsproc.elc ${dotdot}/lisp/vms-patch.elc \ 921 ${dotdot}/lisp/vmsproc.elc ${dotdot}/lisp/vms-patch.elc \
@@ -1003,13 +1003,13 @@ temacs${EXEEXT}: MAKE_PARALLEL $(LOCALCPP) $(STARTFILES) stamp-oldxmenu ${obj} $
1003 -o temacs ${STARTFILES} ${obj} ${otherobj} \ 1003 -o temacs ${STARTFILES} ${obj} ${otherobj} \
1004 OBJECTS_MACHINE ${LIBES} 1004 OBJECTS_MACHINE ${LIBES}
1005 1005
1006/* We don't use ALL_LDFLAGS because LD_SWITCH_SYSTEM and LD_SWITCH_MACHINE 1006/* We don''t use ALL_LDFLAGS because LD_SWITCH_SYSTEM and LD_SWITCH_MACHINE
1007 often contain options that have to do with using Emacs's crt0, 1007 often contain options that have to do with using Emacs''s crt0,
1008 which are only good with temacs. */ 1008 which are only good with temacs. */
1009prefix-args${EXEEXT}: prefix-args.c $(config_h) 1009prefix-args${EXEEXT}: prefix-args.c $(config_h)
1010 $(CC) $(ALL_CFLAGS) $(LDFLAGS) ${srcdir}/prefix-args.c -o prefix-args 1010 $(CC) $(ALL_CFLAGS) $(LDFLAGS) ${srcdir}/prefix-args.c -o prefix-args
1011 1011
1012/* Don't lose if this was not defined. */ 1012/* Don''t lose if this was not defined. */
1013#ifndef OLDXMENU_OPTIONS 1013#ifndef OLDXMENU_OPTIONS
1014#define OLDXMENU_OPTIONS 1014#define OLDXMENU_OPTIONS
1015#endif 1015#endif
@@ -1072,7 +1072,7 @@ really-oldXMenu:
1072#endif /* not USE_X_TOOLKIT */ 1072#endif /* not USE_X_TOOLKIT */
1073#else /* not (HAVE_X_WINDOWS && HAVE_X11 && HAVE_MENUS && ! HAVE_GTK) */ 1073#else /* not (HAVE_X_WINDOWS && HAVE_X11 && HAVE_MENUS && ! HAVE_GTK) */
1074 1074
1075/* We don\'t really need this, but satisfy the dependency. */ 1075/* We don''t really need this, but satisfy the dependency. */
1076stamp-oldxmenu: 1076stamp-oldxmenu:
1077 touch stamp-oldxmenu 1077 touch stamp-oldxmenu
1078#endif /* not (HAVE_X_WINDOWS && HAVE_X11 && HAVE_MENUS && ! HAVE_GTK) */ 1078#endif /* not (HAVE_X_WINDOWS && HAVE_X11 && HAVE_MENUS && ! HAVE_GTK) */
diff --git a/src/buffer.c b/src/buffer.c
index 48c3a2aeb5b..5369fe0fac1 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -375,6 +375,7 @@ The value is never nil. */)
375 BUF_ZV_BYTE (b) = BEG_BYTE; 375 BUF_ZV_BYTE (b) = BEG_BYTE;
376 BUF_Z_BYTE (b) = BEG_BYTE; 376 BUF_Z_BYTE (b) = BEG_BYTE;
377 BUF_MODIFF (b) = 1; 377 BUF_MODIFF (b) = 1;
378 BUF_CHARS_MODIFF (b) = 1;
378 BUF_OVERLAY_MODIFF (b) = 1; 379 BUF_OVERLAY_MODIFF (b) = 1;
379 BUF_SAVE_MODIFF (b) = 1; 380 BUF_SAVE_MODIFF (b) = 1;
380 BUF_INTERVALS (b) = 0; 381 BUF_INTERVALS (b) = 0;
@@ -1149,6 +1150,31 @@ No argument or nil as argument means use current buffer as BUFFER. */)
1149 1150
1150 return make_number (BUF_MODIFF (buf)); 1151 return make_number (BUF_MODIFF (buf));
1151} 1152}
1153
1154DEFUN ("buffer-chars-modified-tick", Fbuffer_chars_modified_tick,
1155 Sbuffer_chars_modified_tick, 0, 1, 0,
1156 doc: /* Return BUFFER's character-change tick counter.
1157Each buffer has a character-change tick counter, which is set to the
1158value of the buffer's tick counter \(see `buffer-modified-tick'), each
1159time text in that buffer is inserted or deleted. By comparing the
1160values returned by two individual calls of `buffer-chars-modified-tick',
1161you can tell whether a character change occurred in that buffer in
1162between these calls. No argument or nil as argument means use current
1163buffer as BUFFER. */)
1164 (buffer)
1165 register Lisp_Object buffer;
1166{
1167 register struct buffer *buf;
1168 if (NILP (buffer))
1169 buf = current_buffer;
1170 else
1171 {
1172 CHECK_BUFFER (buffer);
1173 buf = XBUFFER (buffer);
1174 }
1175
1176 return make_number (BUF_CHARS_MODIFF (buf));
1177}
1152 1178
1153DEFUN ("rename-buffer", Frename_buffer, Srename_buffer, 1, 2, 1179DEFUN ("rename-buffer", Frename_buffer, Srename_buffer, 1, 2,
1154 "sRename buffer (to new name): \nP", 1180 "sRename buffer (to new name): \nP",
@@ -6060,6 +6086,7 @@ The function `kill-all-local-variables' runs this before doing anything else. *
6060 defsubr (&Sbuffer_modified_p); 6086 defsubr (&Sbuffer_modified_p);
6061 defsubr (&Sset_buffer_modified_p); 6087 defsubr (&Sset_buffer_modified_p);
6062 defsubr (&Sbuffer_modified_tick); 6088 defsubr (&Sbuffer_modified_tick);
6089 defsubr (&Sbuffer_chars_modified_tick);
6063 defsubr (&Srename_buffer); 6090 defsubr (&Srename_buffer);
6064 defsubr (&Sother_buffer); 6091 defsubr (&Sother_buffer);
6065 defsubr (&Sbuffer_enable_undo); 6092 defsubr (&Sbuffer_enable_undo);
diff --git a/src/buffer.h b/src/buffer.h
index 9d3ca6ea463..96db95a57e4 100644
--- a/src/buffer.h
+++ b/src/buffer.h
@@ -82,6 +82,9 @@ Boston, MA 02110-1301, USA. */
82/* Modification count. */ 82/* Modification count. */
83#define MODIFF (current_buffer->text->modiff) 83#define MODIFF (current_buffer->text->modiff)
84 84
85/* Character modification count. */
86#define CHARS_MODIFF (current_buffer->text->chars_modiff)
87
85/* Overlay modification count. */ 88/* Overlay modification count. */
86#define OVERLAY_MODIFF (current_buffer->text->overlay_modiff) 89#define OVERLAY_MODIFF (current_buffer->text->overlay_modiff)
87 90
@@ -147,6 +150,9 @@ Boston, MA 02110-1301, USA. */
147/* Modification count. */ 150/* Modification count. */
148#define BUF_MODIFF(buf) ((buf)->text->modiff) 151#define BUF_MODIFF(buf) ((buf)->text->modiff)
149 152
153/* Character modification count. */
154#define BUF_CHARS_MODIFF(buf) ((buf)->text->chars_modiff)
155
150/* Modification count as of last visit or save. */ 156/* Modification count as of last visit or save. */
151#define BUF_SAVE_MODIFF(buf) ((buf)->text->save_modiff) 157#define BUF_SAVE_MODIFF(buf) ((buf)->text->save_modiff)
152 158
@@ -410,6 +416,10 @@ struct buffer_text
410 for this buffer. It is incremented for 416 for this buffer. It is incremented for
411 each such event, and never otherwise 417 each such event, and never otherwise
412 changed. */ 418 changed. */
419 int chars_modiff; /* This is modified with character change
420 events for this buffer. It is set to
421 modiff for each such event, and never
422 otherwise changed. */
413 int save_modiff; /* Previous value of modiff, as of last 423 int save_modiff; /* Previous value of modiff, as of last
414 time buffer visited or saved a file. */ 424 time buffer visited or saved a file. */
415 425
diff --git a/src/casefiddle.c b/src/casefiddle.c
index 8eb3cc69fca..104f7f97a41 100644
--- a/src/casefiddle.c
+++ b/src/casefiddle.c
@@ -196,7 +196,7 @@ casify_region (flag, b, e)
196 validate_region (&b, &e); 196 validate_region (&b, &e);
197 start = XFASTINT (b); 197 start = XFASTINT (b);
198 end = XFASTINT (e); 198 end = XFASTINT (e);
199 modify_region (current_buffer, start, end); 199 modify_region (current_buffer, start, end, 0);
200 record_change (start, end - start); 200 record_change (start, end - start);
201 start_byte = CHAR_TO_BYTE (start); 201 start_byte = CHAR_TO_BYTE (start);
202 end_byte = CHAR_TO_BYTE (end); 202 end_byte = CHAR_TO_BYTE (end);
diff --git a/src/coding.c b/src/coding.c
index d8977227ec9..3efce130b85 100644
--- a/src/coding.c
+++ b/src/coding.c
@@ -7461,7 +7461,8 @@ DEFUN ("detect-coding-region", Fdetect_coding_region, Sdetect_coding_region,
7461 doc: /* Detect coding system of the text in the region between START and END. 7461 doc: /* Detect coding system of the text in the region between START and END.
7462Return a list of possible coding systems ordered by priority. 7462Return a list of possible coding systems ordered by priority.
7463 7463
7464If only ASCII characters are found, it returns a list of single element 7464If only ASCII characters are found (except for such ISO-2022 control
7465characters ISO-2022 as ESC), it returns a list of single element
7465`undecided' or its subsidiary coding system according to a detected 7466`undecided' or its subsidiary coding system according to a detected
7466end-of-line format. 7467end-of-line format.
7467 7468
@@ -7497,7 +7498,8 @@ DEFUN ("detect-coding-string", Fdetect_coding_string, Sdetect_coding_string,
7497 doc: /* Detect coding system of the text in STRING. 7498 doc: /* Detect coding system of the text in STRING.
7498Return a list of possible coding systems ordered by priority. 7499Return a list of possible coding systems ordered by priority.
7499 7500
7500If only ASCII characters are found, it returns a list of single element 7501If only ASCII characters are found (except for such ISO-2022 control
7502characters ISO-2022 as ESC), it returns a list of single element
7501`undecided' or its subsidiary coding system according to a detected 7503`undecided' or its subsidiary coding system according to a detected
7502end-of-line format. 7504end-of-line format.
7503 7505
diff --git a/src/editfns.c b/src/editfns.c
index 362d8fe1dae..2fcacc16901 100644
--- a/src/editfns.c
+++ b/src/editfns.c
@@ -2802,7 +2802,7 @@ Both characters must have the same length of multi-byte form. */)
2802 else if (!changed) 2802 else if (!changed)
2803 { 2803 {
2804 changed = -1; 2804 changed = -1;
2805 modify_region (current_buffer, pos, XINT (end)); 2805 modify_region (current_buffer, pos, XINT (end), 0);
2806 2806
2807 if (! NILP (noundo)) 2807 if (! NILP (noundo))
2808 { 2808 {
@@ -2982,7 +2982,7 @@ It returns the number of characters changed. */)
2982 pos = XINT (start); 2982 pos = XINT (start);
2983 pos_byte = CHAR_TO_BYTE (pos); 2983 pos_byte = CHAR_TO_BYTE (pos);
2984 end_pos = XINT (end); 2984 end_pos = XINT (end);
2985 modify_region (current_buffer, pos, end_pos); 2985 modify_region (current_buffer, pos, end_pos, 0);
2986 2986
2987 cnt = 0; 2987 cnt = 0;
2988 for (; pos < end_pos; ) 2988 for (; pos < end_pos; )
@@ -3890,7 +3890,13 @@ usage: (format STRING &rest OBJECTS) */)
3890 this_format[format - this_format_start] = 0; 3890 this_format[format - this_format_start] = 0;
3891 3891
3892 if (INTEGERP (args[n])) 3892 if (INTEGERP (args[n]))
3893 sprintf (p, this_format, XINT (args[n])); 3893 {
3894 if (format[-1] == 'd')
3895 sprintf (p, this_format, XINT (args[n]));
3896 /* Don't sign-extend for octal or hex printing. */
3897 else
3898 sprintf (p, this_format, XUINT (args[n]));
3899 }
3894 else 3900 else
3895 sprintf (p, this_format, XFLOAT_DATA (args[n])); 3901 sprintf (p, this_format, XFLOAT_DATA (args[n]));
3896 3902
@@ -4306,7 +4312,7 @@ Transposing beyond buffer boundaries is an error. */)
4306 4312
4307 if (end1 == start2) /* adjacent regions */ 4313 if (end1 == start2) /* adjacent regions */
4308 { 4314 {
4309 modify_region (current_buffer, start1, end2); 4315 modify_region (current_buffer, start1, end2, 0);
4310 record_change (start1, len1 + len2); 4316 record_change (start1, len1 + len2);
4311 4317
4312 tmp_interval1 = copy_intervals (cur_intv, start1, len1); 4318 tmp_interval1 = copy_intervals (cur_intv, start1, len1);
@@ -4362,8 +4368,8 @@ Transposing beyond buffer boundaries is an error. */)
4362 { 4368 {
4363 USE_SAFE_ALLOCA; 4369 USE_SAFE_ALLOCA;
4364 4370
4365 modify_region (current_buffer, start1, end1); 4371 modify_region (current_buffer, start1, end1, 0);
4366 modify_region (current_buffer, start2, end2); 4372 modify_region (current_buffer, start2, end2, 0);
4367 record_change (start1, len1); 4373 record_change (start1, len1);
4368 record_change (start2, len2); 4374 record_change (start2, len2);
4369 tmp_interval1 = copy_intervals (cur_intv, start1, len1); 4375 tmp_interval1 = copy_intervals (cur_intv, start1, len1);
@@ -4392,7 +4398,7 @@ Transposing beyond buffer boundaries is an error. */)
4392 { 4398 {
4393 USE_SAFE_ALLOCA; 4399 USE_SAFE_ALLOCA;
4394 4400
4395 modify_region (current_buffer, start1, end2); 4401 modify_region (current_buffer, start1, end2, 0);
4396 record_change (start1, (end2 - start1)); 4402 record_change (start1, (end2 - start1));
4397 tmp_interval1 = copy_intervals (cur_intv, start1, len1); 4403 tmp_interval1 = copy_intervals (cur_intv, start1, len1);
4398 tmp_interval_mid = copy_intervals (cur_intv, end1, len_mid); 4404 tmp_interval_mid = copy_intervals (cur_intv, end1, len_mid);
@@ -4423,7 +4429,7 @@ Transposing beyond buffer boundaries is an error. */)
4423 USE_SAFE_ALLOCA; 4429 USE_SAFE_ALLOCA;
4424 4430
4425 record_change (start1, (end2 - start1)); 4431 record_change (start1, (end2 - start1));
4426 modify_region (current_buffer, start1, end2); 4432 modify_region (current_buffer, start1, end2, 0);
4427 4433
4428 tmp_interval1 = copy_intervals (cur_intv, start1, len1); 4434 tmp_interval1 = copy_intervals (cur_intv, start1, len1);
4429 tmp_interval_mid = copy_intervals (cur_intv, end1, len_mid); 4435 tmp_interval_mid = copy_intervals (cur_intv, end1, len_mid);
diff --git a/src/eval.c b/src/eval.c
index 0d7a6a31038..5f3bd46c4dc 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -199,6 +199,14 @@ extern Lisp_Object Qrisky_local_variable;
199 199
200static Lisp_Object funcall_lambda P_ ((Lisp_Object, int, Lisp_Object*)); 200static Lisp_Object funcall_lambda P_ ((Lisp_Object, int, Lisp_Object*));
201static void unwind_to_catch P_ ((struct catchtag *, Lisp_Object)) NO_RETURN; 201static void unwind_to_catch P_ ((struct catchtag *, Lisp_Object)) NO_RETURN;
202
203#if __GNUC__
204/* "gcc -O3" enables automatic function inlining, which optimizes out
205 the arguments for the invocations of these functions, whereas they
206 expect these values on the stack. */
207Lisp_Object apply1 () __attribute__((noinline));
208Lisp_Object call2 () __attribute__((noinline));
209#endif
202 210
203void 211void
204init_eval_once () 212init_eval_once ()
diff --git a/src/fns.c b/src/fns.c
index adec7f7be85..044f82fcdb6 100644
--- a/src/fns.c
+++ b/src/fns.c
@@ -385,7 +385,12 @@ Symbols are also allowed; their print names are used instead. */)
385 return i1 < SCHARS (s2) ? Qt : Qnil; 385 return i1 < SCHARS (s2) ? Qt : Qnil;
386} 386}
387 387
388static Lisp_Object concat (); 388#if __GNUC__
389/* "gcc -O3" enables automatic function inlining, which optimizes out
390 the arguments for the invocations of this function, whereas it
391 expects these values on the stack. */
392static Lisp_Object concat () __attribute__((noinline));
393#endif
389 394
390/* ARGSUSED */ 395/* ARGSUSED */
391Lisp_Object 396Lisp_Object
diff --git a/src/gtkutil.c b/src/gtkutil.c
index 2a6ed9d1524..89b0f8b11c6 100644
--- a/src/gtkutil.c
+++ b/src/gtkutil.c
@@ -1326,9 +1326,10 @@ xg_get_file_with_chooser (f, prompt, default_filename,
1326 message[0] = '\0'; 1326 message[0] = '\0';
1327 if (action != GTK_FILE_CHOOSER_ACTION_SAVE) 1327 if (action != GTK_FILE_CHOOSER_ACTION_SAVE)
1328 strcat (message, "\nType C-l to display a file name text entry box.\n"); 1328 strcat (message, "\nType C-l to display a file name text entry box.\n");
1329 strcat (message, "\nIf you don't like this file selector, customize " 1329 strcat (message, "\nIf you don't like this file selector, use the "
1330 "use-file-dialog\nto turn it off, or type C-x C-f to visit files."); 1330 "corresponding\nkey binding or customize "
1331 1331 "use-file-dialog to turn it off.");
1332
1332 wmessage = gtk_label_new (message); 1333 wmessage = gtk_label_new (message);
1333 gtk_widget_show (wmessage); 1334 gtk_widget_show (wmessage);
1334 gtk_box_pack_start (GTK_BOX (wbox), wtoggle, FALSE, FALSE, 0); 1335 gtk_box_pack_start (GTK_BOX (wbox), wtoggle, FALSE, FALSE, 0);
@@ -1340,6 +1341,7 @@ xg_get_file_with_chooser (f, prompt, default_filename,
1340 Lisp_Object file; 1341 Lisp_Object file;
1341 struct gcpro gcpro1; 1342 struct gcpro gcpro1;
1342 GCPRO1 (file); 1343 GCPRO1 (file);
1344 char *utf8_filename;
1343 1345
1344 file = build_string (default_filename); 1346 file = build_string (default_filename);
1345 1347
@@ -1347,14 +1349,23 @@ xg_get_file_with_chooser (f, prompt, default_filename,
1347 an absolute name starting with /. */ 1349 an absolute name starting with /. */
1348 if (default_filename[0] != '/') 1350 if (default_filename[0] != '/')
1349 file = Fexpand_file_name (file, Qnil); 1351 file = Fexpand_file_name (file, Qnil);
1350 1352
1351 default_filename = SSDATA (file); 1353 utf8_filename = SSDATA (ENCODE_UTF_8 (file));
1352 if (Ffile_directory_p (file)) 1354 if (! NILP (Ffile_directory_p (file)))
1353 gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER (filewin), 1355 gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER (filewin),
1354 default_filename); 1356 utf8_filename);
1355 else 1357 else
1356 gtk_file_chooser_set_filename (GTK_FILE_CHOOSER (filewin), 1358 {
1357 default_filename); 1359 gtk_file_chooser_set_filename (GTK_FILE_CHOOSER (filewin),
1360 utf8_filename);
1361 if (action == GTK_FILE_CHOOSER_ACTION_SAVE)
1362 {
1363 char *cp = strrchr (utf8_filename, '/');
1364 if (cp) ++cp;
1365 else cp = utf8_filename;
1366 gtk_file_chooser_set_current_name (GTK_FILE_CHOOSER (filewin), cp);
1367 }
1368 }
1358 1369
1359 UNGCPRO; 1370 UNGCPRO;
1360 } 1371 }
diff --git a/src/indent.c b/src/indent.c
index ae28fa3791d..2461c156e3c 100644
--- a/src/indent.c
+++ b/src/indent.c
@@ -2074,7 +2074,7 @@ whether or not it is currently displayed in some window. */)
2074 { 2074 {
2075 int it_start; 2075 int it_start;
2076 int oselective; 2076 int oselective;
2077 int start_on_image_or_stretch_p; 2077 int start_on_image_or_stretch_or_string_p;
2078 2078
2079 SET_TEXT_POS (pt, PT, PT_BYTE); 2079 SET_TEXT_POS (pt, PT, PT_BYTE);
2080 start_display (&it, w, pt); 2080 start_display (&it, w, pt);
@@ -2086,8 +2086,9 @@ whether or not it is currently displayed in some window. */)
2086 while the end position is really at some X > 0, the same X that 2086 while the end position is really at some X > 0, the same X that
2087 PT had. */ 2087 PT had. */
2088 it_start = IT_CHARPOS (it); 2088 it_start = IT_CHARPOS (it);
2089 start_on_image_or_stretch_p = (it.method == GET_FROM_IMAGE 2089 start_on_image_or_stretch_or_string_p = (it.method == GET_FROM_IMAGE
2090 || it.method == GET_FROM_STRETCH); 2090 || it.method == GET_FROM_STRETCH
2091 || it.method == GET_FROM_STRING);
2091 reseat_at_previous_visible_line_start (&it); 2092 reseat_at_previous_visible_line_start (&it);
2092 it.current_x = it.hpos = 0; 2093 it.current_x = it.hpos = 0;
2093 /* Temporarily disable selective display so we don't move too far */ 2094 /* Temporarily disable selective display so we don't move too far */
@@ -2098,10 +2099,10 @@ whether or not it is currently displayed in some window. */)
2098 2099
2099 /* Move back if we got too far. This may happen if 2100 /* Move back if we got too far. This may happen if
2100 truncate-lines is on and PT is beyond right margin. 2101 truncate-lines is on and PT is beyond right margin.
2101 It may also happen if it_start is on an image or a stretch 2102 It may also happen if it_start is on an image, stretch
2102 glyph -- in that case, don't go back. */ 2103 glyph, or string -- in that case, don't go back. */
2103 if (IT_CHARPOS (it) > it_start && XINT (lines) > 0 2104 if (IT_CHARPOS (it) > it_start && XINT (lines) > 0
2104 && !start_on_image_or_stretch_p) 2105 && !start_on_image_or_stretch_or_string_p)
2105 move_it_by_lines (&it, -1, 0); 2106 move_it_by_lines (&it, -1, 0);
2106 2107
2107 it.vpos = 0; 2108 it.vpos = 0;
diff --git a/src/insdel.c b/src/insdel.c
index df0831c9652..5e0eec936d4 100644
--- a/src/insdel.c
+++ b/src/insdel.c
@@ -996,6 +996,7 @@ insert_1_both (string, nchars, nbytes, inherit, prepare, before_markers)
996 will add up to the right stuff in the undo list. */ 996 will add up to the right stuff in the undo list. */
997 record_insert (PT, nchars); 997 record_insert (PT, nchars);
998 MODIFF++; 998 MODIFF++;
999 CHARS_MODIFF = MODIFF;
999 1000
1000 bcopy (string, GPT_ADDR, nbytes); 1001 bcopy (string, GPT_ADDR, nbytes);
1001 1002
@@ -1133,6 +1134,7 @@ insert_from_string_1 (string, pos, pos_byte, nchars, nbytes,
1133 1134
1134 record_insert (PT, nchars); 1135 record_insert (PT, nchars);
1135 MODIFF++; 1136 MODIFF++;
1137 CHARS_MODIFF = MODIFF;
1136 1138
1137 GAP_SIZE -= outgoing_nbytes; 1139 GAP_SIZE -= outgoing_nbytes;
1138 GPT += nchars; 1140 GPT += nchars;
@@ -1328,6 +1330,7 @@ insert_from_buffer_1 (buf, from, nchars, inherit)
1328 1330
1329 record_insert (PT, nchars); 1331 record_insert (PT, nchars);
1330 MODIFF++; 1332 MODIFF++;
1333 CHARS_MODIFF = MODIFF;
1331 1334
1332 GAP_SIZE -= outgoing_nbytes; 1335 GAP_SIZE -= outgoing_nbytes;
1333 GPT += nchars; 1336 GPT += nchars;
@@ -1436,6 +1439,7 @@ adjust_after_replace (from, from_byte, prev_text, len, len_byte)
1436 if (len == 0) 1439 if (len == 0)
1437 evaporate_overlays (from); 1440 evaporate_overlays (from);
1438 MODIFF++; 1441 MODIFF++;
1442 CHARS_MODIFF = MODIFF;
1439} 1443}
1440 1444
1441/* Like adjust_after_replace, but doesn't require PREV_TEXT. 1445/* Like adjust_after_replace, but doesn't require PREV_TEXT.
@@ -1486,6 +1490,7 @@ adjust_after_replace_noundo (from, from_byte, nchars_del, nbytes_del, len, len_b
1486 if (len == 0) 1490 if (len == 0)
1487 evaporate_overlays (from); 1491 evaporate_overlays (from);
1488 MODIFF++; 1492 MODIFF++;
1493 CHARS_MODIFF = MODIFF;
1489} 1494}
1490 1495
1491/* Record undo information, adjust markers and position keepers for an 1496/* Record undo information, adjust markers and position keepers for an
@@ -1678,6 +1683,7 @@ replace_range (from, to, new, prepare, inherit, markers)
1678 CHECK_MARKERS (); 1683 CHECK_MARKERS ();
1679 1684
1680 MODIFF++; 1685 MODIFF++;
1686 CHARS_MODIFF = MODIFF;
1681 UNGCPRO; 1687 UNGCPRO;
1682 1688
1683 signal_after_change (from, nchars_del, GPT - from); 1689 signal_after_change (from, nchars_del, GPT - from);
@@ -1802,6 +1808,7 @@ replace_range_2 (from, from_byte, to, to_byte, ins, inschars, insbytes, markers)
1802 CHECK_MARKERS (); 1808 CHECK_MARKERS ();
1803 1809
1804 MODIFF++; 1810 MODIFF++;
1811 CHARS_MODIFF = MODIFF;
1805} 1812}
1806 1813
1807/* Delete characters in current buffer 1814/* Delete characters in current buffer
@@ -1983,6 +1990,7 @@ del_range_2 (from, from_byte, to, to_byte, ret_string)
1983 if (! EQ (current_buffer->undo_list, Qt)) 1990 if (! EQ (current_buffer->undo_list, Qt))
1984 record_delete (from, deletion); 1991 record_delete (from, deletion);
1985 MODIFF++; 1992 MODIFF++;
1993 CHARS_MODIFF = MODIFF;
1986 1994
1987 /* Relocate point as if it were a marker. */ 1995 /* Relocate point as if it were a marker. */
1988 if (from < PT) 1996 if (from < PT)
@@ -2023,12 +2031,15 @@ del_range_2 (from, from_byte, to, to_byte, ret_string)
2023 character positions START to END. This checks the read-only 2031 character positions START to END. This checks the read-only
2024 properties of the region, calls the necessary modification hooks, 2032 properties of the region, calls the necessary modification hooks,
2025 and warns the next redisplay that it should pay attention to that 2033 and warns the next redisplay that it should pay attention to that
2026 area. */ 2034 area.
2035
2036 If PRESERVE_CHARS_MODIFF is non-zero, do not update CHARS_MODIFF.
2037 Otherwise set CHARS_MODIFF to the new value of MODIFF. */
2027 2038
2028void 2039void
2029modify_region (buffer, start, end) 2040modify_region (buffer, start, end, preserve_chars_modiff)
2030 struct buffer *buffer; 2041 struct buffer *buffer;
2031 int start, end; 2042 int start, end, preserve_chars_modiff;
2032{ 2043{
2033 struct buffer *old_buffer = current_buffer; 2044 struct buffer *old_buffer = current_buffer;
2034 2045
@@ -2042,6 +2053,8 @@ modify_region (buffer, start, end)
2042 if (MODIFF <= SAVE_MODIFF) 2053 if (MODIFF <= SAVE_MODIFF)
2043 record_first_change (); 2054 record_first_change ();
2044 MODIFF++; 2055 MODIFF++;
2056 if (! preserve_chars_modiff)
2057 CHARS_MODIFF = MODIFF;
2045 2058
2046 buffer->point_before_scroll = Qnil; 2059 buffer->point_before_scroll = Qnil;
2047 2060
diff --git a/src/lisp.h b/src/lisp.h
index 171f8340885..7c6826d7bda 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -2484,7 +2484,7 @@ extern Lisp_Object del_range_1 P_ ((int, int, int, int));
2484extern void del_range_byte P_ ((int, int, int)); 2484extern void del_range_byte P_ ((int, int, int));
2485extern void del_range_both P_ ((int, int, int, int, int)); 2485extern void del_range_both P_ ((int, int, int, int, int));
2486extern Lisp_Object del_range_2 P_ ((int, int, int, int, int)); 2486extern Lisp_Object del_range_2 P_ ((int, int, int, int, int));
2487extern void modify_region P_ ((struct buffer *, int, int)); 2487extern void modify_region P_ ((struct buffer *, int, int, int));
2488extern void prepare_to_modify_buffer P_ ((int, int, int *)); 2488extern void prepare_to_modify_buffer P_ ((int, int, int *));
2489extern void signal_before_change P_ ((int, int, int *)); 2489extern void signal_before_change P_ ((int, int, int *));
2490extern void signal_after_change P_ ((int, int, int)); 2490extern void signal_after_change P_ ((int, int, int));
diff --git a/src/macterm.c b/src/macterm.c
index f46679eaa58..4156000478e 100644
--- a/src/macterm.c
+++ b/src/macterm.c
@@ -9507,6 +9507,18 @@ mac_handle_window_event (next_handler, event, data)
9507 9507
9508 break; 9508 break;
9509 9509
9510 case kEventWindowClose:
9511 {
9512 struct input_event buf;
9513
9514 EVENT_INIT (buf);
9515 buf.kind = DELETE_WINDOW_EVENT;
9516 XSETFRAME (buf.frame_or_window, mac_window_to_frame (wp));
9517 buf.arg = Qnil;
9518 kbd_buffer_store_event (&buf);
9519 }
9520 return noErr;
9521
9510#ifdef MAC_OSX 9522#ifdef MAC_OSX
9511 case kEventWindowToolbarSwitchMode: 9523 case kEventWindowToolbarSwitchMode:
9512 result = CallNextEventHandler (next_handler, event); 9524 result = CallNextEventHandler (next_handler, event);
@@ -9796,6 +9808,8 @@ mac_handle_text_input_event (next_handler, event, data)
9796 read_socket_inev->kind = ASCII_KEYSTROKE_EVENT; 9808 read_socket_inev->kind = ASCII_KEYSTROKE_EVENT;
9797 read_socket_inev->code = code; 9809 read_socket_inev->code = code;
9798 read_socket_inev->modifiers = 9810 read_socket_inev->modifiers =
9811 mac_to_emacs_modifiers (modifiers);
9812 read_socket_inev->modifiers |=
9799 (extra_keyboard_modifiers 9813 (extra_keyboard_modifiers
9800 & (meta_modifier | alt_modifier 9814 & (meta_modifier | alt_modifier
9801 | hyper_modifier | super_modifier)); 9815 | hyper_modifier | super_modifier));
@@ -9920,6 +9934,7 @@ install_window_handler (window)
9920 {kEventClassWindow, kEventWindowHidden}, 9934 {kEventClassWindow, kEventWindowHidden},
9921 {kEventClassWindow, kEventWindowExpanded}, 9935 {kEventClassWindow, kEventWindowExpanded},
9922 {kEventClassWindow, kEventWindowCollapsed}, 9936 {kEventClassWindow, kEventWindowCollapsed},
9937 {kEventClassWindow, kEventWindowClose},
9923#ifdef MAC_OSX 9938#ifdef MAC_OSX
9924 {kEventClassWindow, kEventWindowToolbarSwitchMode}, 9939 {kEventClassWindow, kEventWindowToolbarSwitchMode},
9925#endif 9940#endif
diff --git a/src/marker.c b/src/marker.c
index 82e62e0aa99..9f2aa4826b4 100644
--- a/src/marker.c
+++ b/src/marker.c
@@ -460,7 +460,8 @@ Returns nil if MARKER points into a dead buffer. */)
460} 460}
461 461
462DEFUN ("marker-position", Fmarker_position, Smarker_position, 1, 1, 0, 462DEFUN ("marker-position", Fmarker_position, Smarker_position, 1, 1, 0,
463 doc: /* Return the position MARKER points at, as a character number. */) 463 doc: /* Return the position MARKER points at, as a character number.
464Returns nil if MARKER points nowhere. */)
464 (marker) 465 (marker)
465 Lisp_Object marker; 466 Lisp_Object marker;
466{ 467{
diff --git a/src/minibuf.c b/src/minibuf.c
index 848dbd0fed0..63eee29c494 100644
--- a/src/minibuf.c
+++ b/src/minibuf.c
@@ -1195,8 +1195,8 @@ The argument PROMPT should be a string ending with a colon and a space. */)
1195 prompt = Fformat (3, args); 1195 prompt = Fformat (3, args);
1196 } 1196 }
1197 1197
1198 return Fcompleting_read (prompt, Vbuffer_alist, Qnil, 1198 return Fcompleting_read (prompt, intern ("internal-complete-buffer"),
1199 require_match, Qnil, Qbuffer_name_history, 1199 Qnil, require_match, Qnil, Qbuffer_name_history,
1200 def, Qnil); 1200 def, Qnil);
1201 } 1201 }
1202 else 1202 else
@@ -1905,6 +1905,24 @@ the values STRING, PREDICATE and `lambda'. */)
1905 return Qt; 1905 return Qt;
1906} 1906}
1907 1907
1908DEFUN ("internal-complete-buffer", Finternal_complete_buffer, Sinternal_complete_buffer, 3, 3, 0,
1909 doc: /* Perform completion on buffer names.
1910If the argument FLAG is nil, invoke `try-completion', if it's t, invoke
1911`all-completions', otherwise invoke `test-completion'.
1912
1913The arguments STRING and PREDICATE are as in `try-completion',
1914`all-completions', and `test-completion'. */)
1915 (string, predicate, flag)
1916 Lisp_Object string, predicate, flag;
1917{
1918 if (NILP (flag))
1919 return Ftry_completion (string, Vbuffer_alist, predicate);
1920 else if (EQ (flag, Qt))
1921 return Fall_completions (string, Vbuffer_alist, predicate, Qt);
1922 else /* assume `lambda' */
1923 return Ftest_completion (string, Vbuffer_alist, predicate);
1924}
1925
1908/* returns: 1926/* returns:
1909 * 0 no possible completion 1927 * 0 no possible completion
1910 * 1 was already an exact and unique completion 1928 * 1 was already an exact and unique completion
@@ -2906,6 +2924,7 @@ properties. */);
2906 defsubr (&Sread_string); 2924 defsubr (&Sread_string);
2907 defsubr (&Sread_command); 2925 defsubr (&Sread_command);
2908 defsubr (&Sread_variable); 2926 defsubr (&Sread_variable);
2927 defsubr (&Sinternal_complete_buffer);
2909 defsubr (&Sread_buffer); 2928 defsubr (&Sread_buffer);
2910 defsubr (&Sread_no_blanks_input); 2929 defsubr (&Sread_no_blanks_input);
2911 defsubr (&Sminibuffer_depth); 2930 defsubr (&Sminibuffer_depth);
diff --git a/src/textprop.c b/src/textprop.c
index fd70f039d22..785ed19b566 100644
--- a/src/textprop.c
+++ b/src/textprop.c
@@ -1253,7 +1253,7 @@ Return t if any property value actually changed, nil otherwise. */)
1253 } 1253 }
1254 1254
1255 if (BUFFERP (object)) 1255 if (BUFFERP (object))
1256 modify_region (XBUFFER (object), XINT (start), XINT (end)); 1256 modify_region (XBUFFER (object), XINT (start), XINT (end), 1);
1257 1257
1258 /* We are at the beginning of interval I, with LEN chars to scan. */ 1258 /* We are at the beginning of interval I, with LEN chars to scan. */
1259 for (;;) 1259 for (;;)
@@ -1393,7 +1393,7 @@ set_text_properties (start, end, properties, object, signal_after_change_p)
1393 } 1393 }
1394 1394
1395 if (BUFFERP (object)) 1395 if (BUFFERP (object))
1396 modify_region (XBUFFER (object), XINT (start), XINT (end)); 1396 modify_region (XBUFFER (object), XINT (start), XINT (end), 1);
1397 1397
1398 set_text_properties_1 (start, end, properties, object, i); 1398 set_text_properties_1 (start, end, properties, object, i);
1399 1399
@@ -1541,7 +1541,7 @@ Use set-text-properties if you want to remove all text properties. */)
1541 } 1541 }
1542 1542
1543 if (BUFFERP (object)) 1543 if (BUFFERP (object))
1544 modify_region (XBUFFER (object), XINT (start), XINT (end)); 1544 modify_region (XBUFFER (object), XINT (start), XINT (end), 1);
1545 1545
1546 /* We are at the beginning of an interval, with len to scan */ 1546 /* We are at the beginning of an interval, with len to scan */
1547 for (;;) 1547 for (;;)
@@ -1655,7 +1655,7 @@ Return t if any property was actually removed, nil otherwise. */)
1655 if (LENGTH (i) == len) 1655 if (LENGTH (i) == len)
1656 { 1656 {
1657 if (!modified && BUFFERP (object)) 1657 if (!modified && BUFFERP (object))
1658 modify_region (XBUFFER (object), XINT (start), XINT (end)); 1658 modify_region (XBUFFER (object), XINT (start), XINT (end), 1);
1659 remove_properties (Qnil, properties, i, object); 1659 remove_properties (Qnil, properties, i, object);
1660 if (BUFFERP (object)) 1660 if (BUFFERP (object))
1661 signal_after_change (XINT (start), XINT (end) - XINT (start), 1661 signal_after_change (XINT (start), XINT (end) - XINT (start),
@@ -1668,7 +1668,7 @@ Return t if any property was actually removed, nil otherwise. */)
1668 i = split_interval_left (i, len); 1668 i = split_interval_left (i, len);
1669 copy_properties (unchanged, i); 1669 copy_properties (unchanged, i);
1670 if (!modified && BUFFERP (object)) 1670 if (!modified && BUFFERP (object))
1671 modify_region (XBUFFER (object), XINT (start), XINT (end)); 1671 modify_region (XBUFFER (object), XINT (start), XINT (end), 1);
1672 remove_properties (Qnil, properties, i, object); 1672 remove_properties (Qnil, properties, i, object);
1673 if (BUFFERP (object)) 1673 if (BUFFERP (object))
1674 signal_after_change (XINT (start), XINT (end) - XINT (start), 1674 signal_after_change (XINT (start), XINT (end) - XINT (start),
@@ -1679,7 +1679,7 @@ Return t if any property was actually removed, nil otherwise. */)
1679 if (interval_has_some_properties_list (properties, i)) 1679 if (interval_has_some_properties_list (properties, i))
1680 { 1680 {
1681 if (!modified && BUFFERP (object)) 1681 if (!modified && BUFFERP (object))
1682 modify_region (XBUFFER (object), XINT (start), XINT (end)); 1682 modify_region (XBUFFER (object), XINT (start), XINT (end), 1);
1683 remove_properties (Qnil, properties, i, object); 1683 remove_properties (Qnil, properties, i, object);
1684 modified = 1; 1684 modified = 1;
1685 } 1685 }
diff --git a/src/w32.c b/src/w32.c
index 0da908ff932..cbc78f8a5d5 100644
--- a/src/w32.c
+++ b/src/w32.c
@@ -4113,6 +4113,25 @@ init_ntproc ()
4113} 4113}
4114 4114
4115/* 4115/*
4116 shutdown_handler ensures that buffers' autosave files are
4117 up to date when the user logs off, or the system shuts down.
4118*/
4119BOOL WINAPI shutdown_handler(DWORD type)
4120{
4121 /* Ctrl-C and Ctrl-Break are already suppressed, so don't handle them. */
4122 if (type == CTRL_CLOSE_EVENT /* User closes console window. */
4123 || type == CTRL_LOGOFF_EVENT /* User logs off. */
4124 || type == CTRL_SHUTDOWN_EVENT) /* User shutsdown. */
4125 {
4126 /* Shut down cleanly, making sure autosave files are up to date. */
4127 shut_down_emacs (0, 0, Qnil);
4128 }
4129
4130 /* Allow other handlers to handle this signal. */
4131 return FALSE;
4132}
4133
4134/*
4116 globals_of_w32 is used to initialize those global variables that 4135 globals_of_w32 is used to initialize those global variables that
4117 must always be initialized on startup even when the global variable 4136 must always be initialized on startup even when the global variable
4118 initialized is non zero (see the function main in emacs.c). 4137 initialized is non zero (see the function main in emacs.c).
@@ -4124,6 +4143,11 @@ void globals_of_w32 ()
4124 g_b_init_get_token_information = 0; 4143 g_b_init_get_token_information = 0;
4125 g_b_init_lookup_account_sid = 0; 4144 g_b_init_lookup_account_sid = 0;
4126 g_b_init_get_sid_identifier_authority = 0; 4145 g_b_init_get_sid_identifier_authority = 0;
4146 /* The following sets a handler for shutdown notifications for
4147 console apps. This actually applies to Emacs in both console and
4148 GUI modes, since we had to fool windows into thinking emacs is a
4149 console application to get console mode to work. */
4150 SetConsoleCtrlHandler(shutdown_handler, TRUE);
4127} 4151}
4128 4152
4129/* end of nt.c */ 4153/* end of nt.c */
diff --git a/src/window.c b/src/window.c
index f6253ec634f..7f3e71ec145 100644
--- a/src/window.c
+++ b/src/window.c
@@ -7290,16 +7290,18 @@ See also `same-window-buffer-names'. */);
7290 next_screen_context_lines = 2; 7290 next_screen_context_lines = 2;
7291 7291
7292 DEFVAR_INT ("split-height-threshold", &split_height_threshold, 7292 DEFVAR_INT ("split-height-threshold", &split_height_threshold,
7293 doc: /* *A window must be at least this tall to be eligible for splitting by `display-buffer'. 7293 doc: /* *A window must be at least this tall to be eligible for splitting
7294by `display-buffer'. The value is in line units.
7294If there is only one window, it is split regardless of this value. */); 7295If there is only one window, it is split regardless of this value. */);
7295 split_height_threshold = 500; 7296 split_height_threshold = 500;
7296 7297
7297 DEFVAR_INT ("window-min-height", &window_min_height, 7298 DEFVAR_INT ("window-min-height", &window_min_height,
7298 doc: /* *Delete any window less than this tall (including its mode line). */); 7299 doc: /* *Delete any window less than this tall (including its mode line).
7300The value is in line units. */);
7299 window_min_height = 4; 7301 window_min_height = 4;
7300 7302
7301 DEFVAR_INT ("window-min-width", &window_min_width, 7303 DEFVAR_INT ("window-min-width", &window_min_width,
7302 doc: /* *Delete any window less than this wide. */); 7304 doc: /* *Delete any window less than this wide (measured in characters). */);
7303 window_min_width = 10; 7305 window_min_width = 10;
7304 7306
7305 DEFVAR_LISP ("scroll-preserve-screen-position", 7307 DEFVAR_LISP ("scroll-preserve-screen-position",
diff --git a/src/xdisp.c b/src/xdisp.c
index 4d41bb229d7..0e60020f110 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -21547,6 +21547,7 @@ get_window_cursor_type (w, glyph, width, active_cursor)
21547 /* Use normal cursor if not blinked off. */ 21547 /* Use normal cursor if not blinked off. */
21548 if (!w->cursor_off_p) 21548 if (!w->cursor_off_p)
21549 { 21549 {
21550#ifdef HAVE_WINDOW_SYSTEM
21550 if (glyph != NULL && glyph->type == IMAGE_GLYPH) 21551 if (glyph != NULL && glyph->type == IMAGE_GLYPH)
21551 { 21552 {
21552 if (cursor_type == FILLED_BOX_CURSOR) 21553 if (cursor_type == FILLED_BOX_CURSOR)
@@ -21572,6 +21573,7 @@ get_window_cursor_type (w, glyph, width, active_cursor)
21572 cursor_type = HOLLOW_BOX_CURSOR; 21573 cursor_type = HOLLOW_BOX_CURSOR;
21573 } 21574 }
21574 } 21575 }
21576#endif
21575 return cursor_type; 21577 return cursor_type;
21576 } 21578 }
21577 21579