aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaroly Lorentey2004-10-12 07:52:25 +0000
committerKaroly Lorentey2004-10-12 07:52:25 +0000
commit684c64437d4bcdea90b1a922d557477b7cff1084 (patch)
tree0b16b6a2e696b586f121f5abb315fb1101bf042a
parent65f640341c447084163a74acba654e0f6a32c73c (diff)
parente62e7654ac785834b72bfb8784ff34d203d3190f (diff)
downloademacs-684c64437d4bcdea90b1a922d557477b7cff1084.tar.gz
emacs-684c64437d4bcdea90b1a922d557477b7cff1084.zip
Merged in changes from CVS trunk.
Patches applied: * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-608 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-609 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-610 Merge from gnus--rel--5.10 * miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-45 Update from CVS git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-258
-rw-r--r--lisp/ChangeLog42
-rw-r--r--lisp/calc/calc-help.el21
-rw-r--r--lisp/calc/calc-misc.el12
-rw-r--r--lisp/calc/calc.el3
-rw-r--r--lisp/comint.el257
-rw-r--r--lisp/diff-mode.el49
-rw-r--r--lisp/emacs-lisp/byte-opt.el2
-rw-r--r--lisp/font-lock.el6
-rw-r--r--lisp/gnus/ChangeLog23
-rw-r--r--lisp/gnus/gnus-sum.el3
-rw-r--r--lisp/gnus/gnus.el1
-rw-r--r--lisp/gnus/imap.el10
-rw-r--r--lisp/gnus/mml.el3
-rw-r--r--lisp/gnus/nnheader.el10
-rw-r--r--lisp/gnus/pop3.el108
-rw-r--r--lisp/imenu.el39
-rw-r--r--lisp/kmacro.el31
-rw-r--r--lisp/mail/smtpmail.el32
-rw-r--r--lisp/net/ange-ftp.el5
-rw-r--r--lisp/pcvs-defs.el9
-rw-r--r--lisp/subr.el39
-rw-r--r--lisp/textmodes/tex-mode.el29
-rw-r--r--lisp/url/ChangeLog40
-rw-r--r--lisp/url/url-auth.el1
-rw-r--r--lisp/url/url-cache.el1
-rw-r--r--lisp/url/url-cookie.el1
-rw-r--r--lisp/url/url-dired.el1
-rw-r--r--lisp/url/url-file.el1
-rw-r--r--lisp/url/url-ftp.el1
-rw-r--r--lisp/url/url-handlers.el1
-rw-r--r--lisp/url/url-history.el1
-rw-r--r--lisp/url/url-irc.el1
-rw-r--r--lisp/url/url-mailto.el1
-rw-r--r--lisp/url/url-methods.el3
-rw-r--r--lisp/url/url-misc.el3
-rw-r--r--lisp/url/url-news.el1
-rw-r--r--lisp/url/url-nfs.el3
-rw-r--r--lisp/url/url-parse.el3
-rw-r--r--lisp/url/url-privacy.el1
-rw-r--r--lisp/url/url-util.el3
-rw-r--r--lisp/url/url-vars.el3
-rw-r--r--lisp/url/url.el3
-rw-r--r--lisp/vc.el5
-rw-r--r--man/ChangeLog5
-rw-r--r--man/gnus.texi26
-rw-r--r--man/sc.texi2
-rw-r--r--src/ChangeLog34
-rw-r--r--src/doc.c6
-rw-r--r--src/keyboard.c35
-rw-r--r--src/keyboard.h2
-rw-r--r--src/mac.c47
-rw-r--r--src/macfns.c8
-rw-r--r--src/macgui.h2
-rw-r--r--src/macterm.c18
-rw-r--r--src/xfns.c2
55 files changed, 588 insertions, 411 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index d615c4c9723..eb028c98a25 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,45 @@
12004-10-12 Kim F. Storm <storm@cua.dk>
2
3 * kmacro.el (kmacro-insert-counter, kmacro-add-counter): Use and
4 reset kmacro-initial-counter-value if set.
5 (kmacro-set-counter): Only set kmacro-counter if defining or executing
6 macro. Set kmacro-initial-counter-value otherwise. Never set both.
7 (kmacro-display): Show macro counter if non-zero.
8
9 * subr.el (substitute-key-definition): Mention command remapping
10 in doc string.
11
122004-10-11 Simon Josefsson <jas@extundo.com>
13
14 * mail/smtpmail.el (smtpmail-open-stream): Look for
15 starttls-gnutls-program instead of starttls-program iff
16 starttls-use-gnutls is non-nil.
17 (smtpmail-open-stream): Don't overwrite user settings of
18 starttls-extra-arguments and starttls-extra-args.
19
202004-10-10 Kai Grossjohann <kai.grossjohann@gmx.net>
21
22 * net/ange-ftp.el (ange-ftp-remote-shell): Remove variable.
23 (ange-ftp-call-chmod): Reference remote-shell-program instead of
24 ange-ftp-remote-shell.
25
262004-10-10 Andreas Schwab <schwab@suse.de>
27
28 * emacs-lisp/byte-opt.el (byte-optimize-backward-word): Optimize
29 `(backward-word)' to `(forward-word -1)', not `(forward-char -1)'.
30 Reported by <sri@asu.edu>.
31
322004-10-10 Benjamin Rutt <brutt@bloomington.in.us>
33
34 * vc.el (vc-annotate-mode): Remove variable.
35 (vc-annotate-display-select): Only call vc-annotate-mode
36 if we're not in that mode already.
37
382004-10-09 Kim F. Storm <storm@cua.dk>
39
40 * subr.el (progress-reporter-update): Define before first usage.
41 (make-progress-reporter): Doc fix.
42
12004-10-09 Luc Teirlinck <teirllm@auburn.edu> 432004-10-09 Luc Teirlinck <teirllm@auburn.edu>
2 44
3 * textmodes/paragraphs.el (sentence-end-double-space) 45 * textmodes/paragraphs.el (sentence-end-double-space)
diff --git a/lisp/calc/calc-help.el b/lisp/calc/calc-help.el
index e66f50bd40c..32f86d6f750 100644
--- a/lisp/calc/calc-help.el
+++ b/lisp/calc/calc-help.el
@@ -93,18 +93,15 @@ C-w Describe how there is no warranty for Calc."
93 93
94(defun calc-describe-copying () 94(defun calc-describe-copying ()
95 (interactive) 95 (interactive)
96 (calc-info) 96 (calc-info-goto-node "Copying"))
97 (Info-goto-node "Copying"))
98 97
99(defun calc-describe-distribution () 98(defun calc-describe-distribution ()
100 (interactive) 99 (interactive)
101 (calc-info) 100 (calc-info-goto-node "Reporting Bugs"))
102 (Info-goto-node "Reporting Bugs"))
103 101
104(defun calc-describe-no-warranty () 102(defun calc-describe-no-warranty ()
105 (interactive) 103 (interactive)
106 (calc-info) 104 (calc-info-goto-node "Copying")
107 (Info-goto-node "Copying")
108 (let ((case-fold-search nil)) 105 (let ((case-fold-search nil))
109 (search-forward " NO WARRANTY")) 106 (search-forward " NO WARRANTY"))
110 (beginning-of-line) 107 (beginning-of-line)
@@ -190,13 +187,13 @@ C-w Describe how there is no warranty for Calc."
190 (message "Reading Calc summary from manual...") 187 (message "Reading Calc summary from manual...")
191 (save-window-excursion 188 (save-window-excursion
192 (save-excursion 189 (save-excursion
193 (calc-info) 190 (calc-info-goto-node "Summary")
194 (Info-goto-node "Summary")
195 (goto-char (point-min)) 191 (goto-char (point-min))
196 (forward-line 1) 192 (forward-line 1)
197 (copy-to-buffer "*Calc Summary*" 193 (copy-to-buffer "*Calc Summary*"
198 (point) (point-max)) 194 (point) (point-max))
199 (Info-last))) 195 (if Info-history
196 (Info-last))))
200 (setq case-fold-search nil) 197 (setq case-fold-search nil)
201 (re-search-forward "^\\(.*\\)\\[\\.\\. a b") 198 (re-search-forward "^\\(.*\\)\\[\\.\\. a b")
202 (setq calc-summary-indentation 199 (setq calc-summary-indentation
@@ -326,8 +323,7 @@ C-w Describe how there is no warranty for Calc."
326(defun calc-describe-thing (thing where &optional target not-quoted) 323(defun calc-describe-thing (thing where &optional target not-quoted)
327 (message "Looking for `%s' in %s..." thing where) 324 (message "Looking for `%s' in %s..." thing where)
328 (let ((savewin (current-window-configuration))) 325 (let ((savewin (current-window-configuration)))
329 (calc-info) 326 (calc-info-goto-node where)
330 (Info-goto-node where)
331 (or (let ((case-fold-search nil)) 327 (or (let ((case-fold-search nil))
332 (re-search-forward (format "\n\\* +%s: \\(.*\\)\\." 328 (re-search-forward (format "\n\\* +%s: \\(.*\\)\\."
333 (regexp-quote thing)) 329 (regexp-quote thing))
@@ -338,7 +334,8 @@ C-w Describe how there is no warranty for Calc."
338 nil t) 334 nil t)
339 (setq thing (format "%s9" (substring thing 0 -1)))) 335 (setq thing (format "%s9" (substring thing 0 -1))))
340 (progn 336 (progn
341 (Info-last) 337 (if Info-history
338 (Info-last))
342 (set-window-configuration savewin) 339 (set-window-configuration savewin)
343 (error "Can't find `%s' in %s" thing where))) 340 (error "Can't find `%s' in %s" thing where)))
344 (let (Info-history) 341 (let (Info-history)
diff --git a/lisp/calc/calc-misc.el b/lisp/calc/calc-misc.el
index 772b39ffed4..c01d37e6848 100644
--- a/lisp/calc/calc-misc.el
+++ b/lisp/calc/calc-misc.el
@@ -160,21 +160,25 @@ Calc user interface as before (either M-# C or M-# K; initially M-# C)."
160 (select-window (get-largest-window)) 160 (select-window (get-largest-window))
161 (info "Calc")) 161 (info "Calc"))
162 162
163(defun calc-info-goto-node (node)
164 "Go to a node in the Calculator info documentation."
165 (interactive)
166 (select-window (get-largest-window))
167 (Info-goto-node (concat "(Calc)" node)))
168
163(defun calc-tutorial () 169(defun calc-tutorial ()
164 "Run the Emacs Info system on the Calculator Tutorial." 170 "Run the Emacs Info system on the Calculator Tutorial."
165 (interactive) 171 (interactive)
166 (if (get-buffer-window "*Calculator*") 172 (if (get-buffer-window "*Calculator*")
167 (calc-quit)) 173 (calc-quit))
168 (calc-info) 174 (calc-info-goto-node "Interactive Tutorial")
169 (Info-goto-node "Interactive Tutorial")
170 (calc-other-window) 175 (calc-other-window)
171 (message "Welcome to the Calc Tutorial!")) 176 (message "Welcome to the Calc Tutorial!"))
172 177
173(defun calc-info-summary () 178(defun calc-info-summary ()
174 "Run the Emacs Info system on the Calculator Summary." 179 "Run the Emacs Info system on the Calculator Summary."
175 (interactive) 180 (interactive)
176 (calc-info) 181 (calc-info-goto-node "Summary"))
177 (Info-goto-node "Summary"))
178 182
179(defun calc-help () 183(defun calc-help ()
180 (interactive) 184 (interactive)
diff --git a/lisp/calc/calc.el b/lisp/calc/calc.el
index 5c7e24ed646..c17449a8450 100644
--- a/lisp/calc/calc.el
+++ b/lisp/calc/calc.el
@@ -942,7 +942,8 @@ If nil, selections displayed but ignored.")
942 calcDigit-algebraic calcDigit-edit) 942 calcDigit-algebraic calcDigit-edit)
943 943
944 ("calc-misc" another-calc calc-big-or-small calc-dispatch-help 944 ("calc-misc" another-calc calc-big-or-small calc-dispatch-help
945 calc-help calc-info calc-info-summary calc-inv calc-last-args-stub 945 calc-help calc-info calc-info-goto-node calc-info-summary calc-inv
946 calc-last-args-stub
946 calc-missing-key calc-mod calc-other-window calc-over calc-percent 947 calc-missing-key calc-mod calc-other-window calc-over calc-percent
947 calc-pop-above calc-power calc-roll-down calc-roll-up 948 calc-pop-above calc-power calc-roll-down calc-roll-up
948 calc-shift-Y-prefix-help calc-tutorial calcDigit-letter 949 calc-shift-Y-prefix-help calc-tutorial calcDigit-letter
diff --git a/lisp/comint.el b/lisp/comint.el
index 8b5a107c7d7..8b2c779ecd3 100644
--- a/lisp/comint.el
+++ b/lisp/comint.el
@@ -1,7 +1,7 @@
1;;; comint.el --- general command interpreter in a window stuff 1;;; comint.el --- general command interpreter in a window stuff
2 2
3;; Copyright (C) 1988,90,92,93,94,95,96,97,98,99,2000,01,02,03,2004 3;; Copyright (C) 1988, 1990, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
4;; Free Software Foundation, Inc. 4;; 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
5 5
6;; Author: Olin Shivers <shivers@cs.cmu.edu> 6;; Author: Olin Shivers <shivers@cs.cmu.edu>
7;; Simon Marshall <simon@gnu.org> 7;; Simon Marshall <simon@gnu.org>
@@ -185,10 +185,10 @@ the remaining prompts will be accidentally messed up. You may
185wish to put something like the following in your `.emacs' file: 185wish to put something like the following in your `.emacs' file:
186 186
187\(add-hook 'comint-mode-hook 187\(add-hook 'comint-mode-hook
188 '(lambda () 188 (lambda ()
189 (define-key comint-mode-map \"\C-w\" 'comint-kill-region) 189 (define-key comint-mode-map \"\C-w\" 'comint-kill-region)
190 (define-key comint-mode-map [C-S-backspace] 190 (define-key comint-mode-map [C-S-backspace]
191 'comint-kill-whole-line))) 191 'comint-kill-whole-line)))
192 192
193If you sometimes use comint-mode on text-only terminals or with `emacs-nw', 193If you sometimes use comint-mode on text-only terminals or with `emacs-nw',
194you might wish to use another binding for `comint-kill-whole-line'." 194you might wish to use another binding for `comint-kill-whole-line'."
@@ -369,11 +369,8 @@ Takes one argument, the input. If non-nil, the input may be saved on the input
369history list. Default is to save anything that isn't all whitespace.") 369history list. Default is to save anything that isn't all whitespace.")
370 370
371(defvar comint-input-filter-functions '() 371(defvar comint-input-filter-functions '()
372 "Functions to call before input is sent to the process. 372 "Special hook run before input is sent to the process.
373These functions get one argument, a string containing the text to send. 373These functions get one argument, a string containing the text to send.")
374
375You can use `add-hook' to add functions to this list
376either globally or locally.")
377 374
378(defvar comint-output-filter-functions '(comint-postoutput-scroll-to-bottom) 375(defvar comint-output-filter-functions '(comint-postoutput-scroll-to-bottom)
379 "Functions to call after output is inserted into the buffer. 376 "Functions to call after output is inserted into the buffer.
@@ -411,7 +408,7 @@ See `comint-send-input'."
411(defcustom comint-use-prompt-regexp-instead-of-fields nil 408(defcustom comint-use-prompt-regexp-instead-of-fields nil
412 "*If non-nil, use `comint-prompt-regexp' to distinguish prompts from user-input. 409 "*If non-nil, use `comint-prompt-regexp' to distinguish prompts from user-input.
413If nil, then program output and user-input are given different `field' 410If nil, then program output and user-input are given different `field'
414properties, which emacs commands can use to distinguish them (in 411properties, which Emacs commands can use to distinguish them (in
415particular, common movement commands such as begining-of-line respect 412particular, common movement commands such as begining-of-line respect
416field boundaries in a natural way)." 413field boundaries in a natural way)."
417 :type 'boolean 414 :type 'boolean
@@ -432,7 +429,106 @@ executed once when the buffer is created."
432 :type 'hook 429 :type 'hook
433 :group 'comint) 430 :group 'comint)
434 431
435(defvar comint-mode-map nil) 432(defvar comint-mode-map
433 (let ((map (make-sparse-keymap)))
434 ;; Keys:
435 (define-key map "\ep" 'comint-previous-input)
436 (define-key map "\en" 'comint-next-input)
437 (define-key map [C-up] 'comint-previous-input)
438 (define-key map [C-down] 'comint-next-input)
439 (define-key map "\er" 'comint-previous-matching-input)
440 (define-key map "\es" 'comint-next-matching-input)
441 (define-key map [?\C-c ?\M-r] 'comint-previous-matching-input-from-input)
442 (define-key map [?\C-c ?\M-s] 'comint-next-matching-input-from-input)
443 (define-key map "\e\C-l" 'comint-show-output)
444 (define-key map "\C-m" 'comint-send-input)
445 (define-key map "\C-d" 'comint-delchar-or-maybe-eof)
446 (define-key map "\C-c " 'comint-accumulate)
447 (define-key map "\C-c\C-x" 'comint-get-next-from-history)
448 (define-key map "\C-c\C-a" 'comint-bol-or-process-mark)
449 (define-key map "\C-c\C-u" 'comint-kill-input)
450 (define-key map "\C-c\C-w" 'backward-kill-word)
451 (define-key map "\C-c\C-c" 'comint-interrupt-subjob)
452 (define-key map "\C-c\C-z" 'comint-stop-subjob)
453 (define-key map "\C-c\C-\\" 'comint-quit-subjob)
454 (define-key map "\C-c\C-m" 'comint-insert-input)
455 (define-key map "\C-c\C-o" 'comint-delete-output)
456 (define-key map "\C-c\C-r" 'comint-show-output)
457 (define-key map "\C-c\C-e" 'comint-show-maximum-output)
458 (define-key map "\C-c\C-l" 'comint-dynamic-list-input-ring)
459 (define-key map "\C-c\C-n" 'comint-next-prompt)
460 (define-key map "\C-c\C-p" 'comint-previous-prompt)
461 (define-key map "\C-c\C-d" 'comint-send-eof)
462 (define-key map "\C-c\C-s" 'comint-write-output)
463 (define-key map "\C-c." 'comint-insert-previous-argument)
464 ;; Mouse Buttons:
465 (define-key map [mouse-2] 'comint-insert-input)
466 ;; Menu bars:
467 ;; completion:
468 (define-key map [menu-bar completion]
469 (cons "Complete" (make-sparse-keymap "Complete")))
470 (define-key map [menu-bar completion complete-expand]
471 '("Expand File Name" . comint-replace-by-expanded-filename))
472 (define-key map [menu-bar completion complete-listing]
473 '("File Completion Listing" . comint-dynamic-list-filename-completions))
474 (define-key map [menu-bar completion complete-file]
475 '("Complete File Name" . comint-dynamic-complete-filename))
476 (define-key map [menu-bar completion complete]
477 '("Complete Before Point" . comint-dynamic-complete))
478 ;; Input history:
479 (define-key map [menu-bar inout]
480 (cons "In/Out" (make-sparse-keymap "In/Out")))
481 (define-key map [menu-bar inout delete-output]
482 '("Delete Current Output Group" . comint-delete-output))
483 (define-key map [menu-bar inout append-output-to-file]
484 '("Append Current Output Group to File" . comint-append-output-to-file))
485 (define-key map [menu-bar inout write-output]
486 '("Write Current Output Group to File" . comint-write-output))
487 (define-key map [menu-bar inout next-prompt]
488 '("Forward Output Group" . comint-next-prompt))
489 (define-key map [menu-bar inout previous-prompt]
490 '("Backward Output Group" . comint-previous-prompt))
491 (define-key map [menu-bar inout show-maximum-output]
492 '("Show Maximum Output" . comint-show-maximum-output))
493 (define-key map [menu-bar inout show-output]
494 '("Show Current Output Group" . comint-show-output))
495 (define-key map [menu-bar inout kill-input]
496 '("Kill Current Input" . comint-kill-input))
497 (define-key map [menu-bar inout copy-input]
498 '("Copy Old Input" . comint-insert-input))
499 (define-key map [menu-bar inout forward-matching-history]
500 '("Forward Matching Input..." . comint-forward-matching-input))
501 (define-key map [menu-bar inout backward-matching-history]
502 '("Backward Matching Input..." . comint-backward-matching-input))
503 (define-key map [menu-bar inout next-matching-history]
504 '("Next Matching Input..." . comint-next-matching-input))
505 (define-key map [menu-bar inout previous-matching-history]
506 '("Previous Matching Input..." . comint-previous-matching-input))
507 (define-key map [menu-bar inout next-matching-history-from-input]
508 '("Next Matching Current Input" . comint-next-matching-input-from-input))
509 (define-key map [menu-bar inout previous-matching-history-from-input]
510 '("Previous Matching Current Input" . comint-previous-matching-input-from-input))
511 (define-key map [menu-bar inout next-history]
512 '("Next Input" . comint-next-input))
513 (define-key map [menu-bar inout previous-history]
514 '("Previous Input" . comint-previous-input))
515 (define-key map [menu-bar inout list-history]
516 '("List Input History" . comint-dynamic-list-input-ring))
517 (define-key map [menu-bar inout expand-history]
518 '("Expand History Before Point" . comint-replace-by-expanded-history))
519 ;; Signals
520 (let ((signals-map (make-sparse-keymap "Signals")))
521 (define-key map [menu-bar signals] (cons "Signals" signals-map))
522 (define-key signals-map [eof] '("EOF" . comint-send-eof))
523 (define-key signals-map [kill] '("KILL" . comint-kill-subjob))
524 (define-key signals-map [quit] '("QUIT" . comint-quit-subjob))
525 (define-key signals-map [cont] '("CONT" . comint-continue-subjob))
526 (define-key signals-map [stop] '("STOP" . comint-stop-subjob))
527 (define-key signals-map [break] '("BREAK" . comint-interrupt-subjob)))
528 ;; Put them in the menu bar:
529 (setq menu-bar-final-items (append '(completion inout signals)
530 menu-bar-final-items))
531 map))
436 532
437;; Fixme: Is this still relevant? 533;; Fixme: Is this still relevant?
438(defvar comint-ptyp t 534(defvar comint-ptyp t
@@ -548,114 +644,6 @@ Entry to this mode runs the hooks on `comint-mode-hook'."
548 ;; This behavior is not useful in comint buffers, and is annoying 644 ;; This behavior is not useful in comint buffers, and is annoying
549 (set (make-local-variable 'next-line-add-newlines) nil)) 645 (set (make-local-variable 'next-line-add-newlines) nil))
550 646
551(if comint-mode-map
552 nil
553 ;; Keys:
554 (setq comint-mode-map (make-sparse-keymap))
555 (define-key comint-mode-map "\ep" 'comint-previous-input)
556 (define-key comint-mode-map "\en" 'comint-next-input)
557 (define-key comint-mode-map [C-up] 'comint-previous-input)
558 (define-key comint-mode-map [C-down] 'comint-next-input)
559 (define-key comint-mode-map "\er" 'comint-previous-matching-input)
560 (define-key comint-mode-map "\es" 'comint-next-matching-input)
561 (define-key comint-mode-map [?\C-c ?\M-r] 'comint-previous-matching-input-from-input)
562 (define-key comint-mode-map [?\C-c ?\M-s] 'comint-next-matching-input-from-input)
563 (define-key comint-mode-map "\e\C-l" 'comint-show-output)
564 (define-key comint-mode-map "\C-m" 'comint-send-input)
565 (define-key comint-mode-map "\C-d" 'comint-delchar-or-maybe-eof)
566 (define-key comint-mode-map "\C-c " 'comint-accumulate)
567 (define-key comint-mode-map "\C-c\C-x" 'comint-get-next-from-history)
568 (define-key comint-mode-map "\C-c\C-a" 'comint-bol-or-process-mark)
569 (define-key comint-mode-map "\C-c\C-u" 'comint-kill-input)
570 (define-key comint-mode-map "\C-c\C-w" 'backward-kill-word)
571 (define-key comint-mode-map "\C-c\C-c" 'comint-interrupt-subjob)
572 (define-key comint-mode-map "\C-c\C-z" 'comint-stop-subjob)
573 (define-key comint-mode-map "\C-c\C-\\" 'comint-quit-subjob)
574 (define-key comint-mode-map "\C-c\C-m" 'comint-insert-input)
575 (define-key comint-mode-map "\C-c\C-o" 'comint-delete-output)
576 (define-key comint-mode-map "\C-c\C-r" 'comint-show-output)
577 (define-key comint-mode-map "\C-c\C-e" 'comint-show-maximum-output)
578 (define-key comint-mode-map "\C-c\C-l" 'comint-dynamic-list-input-ring)
579 (define-key comint-mode-map "\C-c\C-n" 'comint-next-prompt)
580 (define-key comint-mode-map "\C-c\C-p" 'comint-previous-prompt)
581 (define-key comint-mode-map "\C-c\C-d" 'comint-send-eof)
582 (define-key comint-mode-map "\C-c\C-s" 'comint-write-output)
583 (define-key comint-mode-map "\C-c." 'comint-insert-previous-argument)
584 ;; Mouse Buttons:
585 (define-key comint-mode-map [mouse-2] 'comint-mouse-insert-input)
586 ;; Menu bars:
587 ;; completion:
588 (define-key comint-mode-map [menu-bar completion]
589 (cons "Complete" (make-sparse-keymap "Complete")))
590 (define-key comint-mode-map [menu-bar completion complete-expand]
591 '("Expand File Name" . comint-replace-by-expanded-filename))
592 (define-key comint-mode-map [menu-bar completion complete-listing]
593 '("File Completion Listing" . comint-dynamic-list-filename-completions))
594 (define-key comint-mode-map [menu-bar completion complete-file]
595 '("Complete File Name" . comint-dynamic-complete-filename))
596 (define-key comint-mode-map [menu-bar completion complete]
597 '("Complete Before Point" . comint-dynamic-complete))
598 ;; Input history:
599 (define-key comint-mode-map [menu-bar inout]
600 (cons "In/Out" (make-sparse-keymap "In/Out")))
601 (define-key comint-mode-map [menu-bar inout delete-output]
602 '("Delete Current Output Group" . comint-delete-output))
603 (define-key comint-mode-map [menu-bar inout append-output-to-file]
604 '("Append Current Output Group to File" . comint-append-output-to-file))
605 (define-key comint-mode-map [menu-bar inout write-output]
606 '("Write Current Output Group to File" . comint-write-output))
607 (define-key comint-mode-map [menu-bar inout next-prompt]
608 '("Forward Output Group" . comint-next-prompt))
609 (define-key comint-mode-map [menu-bar inout previous-prompt]
610 '("Backward Output Group" . comint-previous-prompt))
611 (define-key comint-mode-map [menu-bar inout show-maximum-output]
612 '("Show Maximum Output" . comint-show-maximum-output))
613 (define-key comint-mode-map [menu-bar inout show-output]
614 '("Show Current Output Group" . comint-show-output))
615 (define-key comint-mode-map [menu-bar inout kill-input]
616 '("Kill Current Input" . comint-kill-input))
617 (define-key comint-mode-map [menu-bar inout copy-input]
618 '("Copy Old Input" . comint-insert-input))
619 (define-key comint-mode-map [menu-bar inout forward-matching-history]
620 '("Forward Matching Input..." . comint-forward-matching-input))
621 (define-key comint-mode-map [menu-bar inout backward-matching-history]
622 '("Backward Matching Input..." . comint-backward-matching-input))
623 (define-key comint-mode-map [menu-bar inout next-matching-history]
624 '("Next Matching Input..." . comint-next-matching-input))
625 (define-key comint-mode-map [menu-bar inout previous-matching-history]
626 '("Previous Matching Input..." . comint-previous-matching-input))
627 (define-key comint-mode-map [menu-bar inout next-matching-history-from-input]
628 '("Next Matching Current Input" . comint-next-matching-input-from-input))
629 (define-key comint-mode-map [menu-bar inout previous-matching-history-from-input]
630 '("Previous Matching Current Input" . comint-previous-matching-input-from-input))
631 (define-key comint-mode-map [menu-bar inout next-history]
632 '("Next Input" . comint-next-input))
633 (define-key comint-mode-map [menu-bar inout previous-history]
634 '("Previous Input" . comint-previous-input))
635 (define-key comint-mode-map [menu-bar inout list-history]
636 '("List Input History" . comint-dynamic-list-input-ring))
637 (define-key comint-mode-map [menu-bar inout expand-history]
638 '("Expand History Before Point" . comint-replace-by-expanded-history))
639 ;; Signals
640 (define-key comint-mode-map [menu-bar signals]
641 (cons "Signals" (make-sparse-keymap "Signals")))
642 (define-key comint-mode-map [menu-bar signals eof]
643 '("EOF" . comint-send-eof))
644 (define-key comint-mode-map [menu-bar signals kill]
645 '("KILL" . comint-kill-subjob))
646 (define-key comint-mode-map [menu-bar signals quit]
647 '("QUIT" . comint-quit-subjob))
648 (define-key comint-mode-map [menu-bar signals cont]
649 '("CONT" . comint-continue-subjob))
650 (define-key comint-mode-map [menu-bar signals stop]
651 '("STOP" . comint-stop-subjob))
652 (define-key comint-mode-map [menu-bar signals break]
653 '("BREAK" . comint-interrupt-subjob))
654 ;; Put them in the menu bar:
655 (setq menu-bar-final-items (append '(completion inout signals)
656 menu-bar-final-items))
657 )
658
659(defun comint-check-proc (buffer) 647(defun comint-check-proc (buffer)
660 "Return t if there is a living process associated w/buffer BUFFER. 648 "Return t if there is a living process associated w/buffer BUFFER.
661Living means the status is `open', `run', or `stop'. 649Living means the status is `open', `run', or `stop'.
@@ -798,9 +786,10 @@ buffer. The hook `comint-exec-hook' is run after each exec."
798 (set-process-coding-system proc decoding encoding)) 786 (set-process-coding-system proc decoding encoding))
799 proc)) 787 proc))
800 788
801(defun comint-insert-input () 789(defun comint-insert-input (&optional event)
802 "In a Comint buffer, set the current input to the previous input at point." 790 "In a Comint buffer, set the current input to the previous input at point."
803 (interactive) 791 (interactive (list last-input-event))
792 (if event (mouse-set-point event))
804 (let ((pos (point))) 793 (let ((pos (point)))
805 (if (not (eq (get-char-property pos 'field) 'input)) 794 (if (not (eq (get-char-property pos 'field) 'input))
806 ;; No input at POS, fall back to the global definition. 795 ;; No input at POS, fall back to the global definition.
@@ -818,13 +807,7 @@ buffer. The hook `comint-exec-hook' is run after each exec."
818 ;; Insert the input at point 807 ;; Insert the input at point
819 (insert (buffer-substring-no-properties 808 (insert (buffer-substring-no-properties
820 (previous-single-char-property-change (1+ pos) 'field) 809 (previous-single-char-property-change (1+ pos) 'field)
821 (next-single-char-property-change pos 'field)))))) 810 (next-single-char-property-change pos 'field))))))
822
823(defun comint-mouse-insert-input (event)
824 "In a Comint buffer, set the current input to the previous input you click on."
825 (interactive "e")
826 (mouse-set-point event)
827 (comint-insert-input))
828 811
829 812
830;; Input history processing in a buffer 813;; Input history processing in a buffer
@@ -1734,7 +1717,7 @@ Make backspaces delete the previous character."
1734 (1- prompt-start) prompt-start 'read-only 'fence)) 1717 (1- prompt-start) prompt-start 'read-only 'fence))
1735 (add-text-properties 1718 (add-text-properties
1736 prompt-start (point) 1719 prompt-start (point)
1737 '(read-only t rear-non-sticky t front-sticky (read-only)))) 1720 '(read-only t rear-nonsticky t front-sticky (read-only))))
1738 (unless (and (bolp) (null comint-last-prompt-overlay)) 1721 (unless (and (bolp) (null comint-last-prompt-overlay))
1739 ;; Need to create or move the prompt overlay (in the case 1722 ;; Need to create or move the prompt overlay (in the case
1740 ;; where there is no prompt ((bolp) == t), we still do 1723 ;; where there is no prompt ((bolp) == t), we still do
@@ -2136,8 +2119,8 @@ This command also kills the pending input
2136between the process mark and point. 2119between the process mark and point.
2137 2120
2138WARNING: if there is no current subjob, you can end up suspending 2121WARNING: if there is no current subjob, you can end up suspending
2139the top-level process running in the buffer. If you accidentally do 2122the top-level process running in the buffer. If you accidentally do
2140this, use \\[comint-continue-subjob] to resume the process. (This 2123this, use \\[comint-continue-subjob] to resume the process. (This
2141is not a problem with most shells, since they ignore this signal.)" 2124is not a problem with most shells, since they ignore this signal.)"
2142 (interactive) 2125 (interactive)
2143 (comint-skip-input) 2126 (comint-skip-input)
@@ -2357,9 +2340,9 @@ preceding newline is removed."
2357 2340
2358(defun comint-kill-whole-line (&optional arg) 2341(defun comint-kill-whole-line (&optional arg)
2359 "Kill current line, ignoring read-only and field properties. 2342 "Kill current line, ignoring read-only and field properties.
2360With prefix arg, kill that many lines starting from the current line. 2343With prefix ARG, kill that many lines starting from the current line.
2361If arg is negative, kill backward. Also kill the preceding newline, 2344If arg is negative, kill backward. Also kill the preceding newline,
2362instead of the trailing one. \(This is meant to make C-x z work well 2345instead of the trailing one. \(This is meant to make \\[repeat] work well
2363with negative arguments.) 2346with negative arguments.)
2364If arg is zero, kill current line but exclude the trailing newline. 2347If arg is zero, kill current line but exclude the trailing newline.
2365The read-only status of newlines is updated with `comint-update-fence', 2348The read-only status of newlines is updated with `comint-update-fence',
@@ -2505,7 +2488,7 @@ Provides a default, if there is one, and returns the result filename.
2505 2488
2506See `comint-source-default' for more on determining defaults. 2489See `comint-source-default' for more on determining defaults.
2507 2490
2508PROMPT is the prompt string. PREV-DIR/FILE is the (directory . file) pair 2491PROMPT is the prompt string. PREV-DIR/FILE is the (directory . file) pair
2509from the last source processing command. SOURCE-MODES is a list of major 2492from the last source processing command. SOURCE-MODES is a list of major
2510modes used to determine what file buffers contain source files. (These 2493modes used to determine what file buffers contain source files. (These
2511two arguments are used for determining defaults). If MUSTMATCH-P is true, 2494two arguments are used for determining defaults). If MUSTMATCH-P is true,
@@ -3503,5 +3486,5 @@ REGEXP-GROUP is the regular expression group in REGEXP to use."
3503 3486
3504(provide 'comint) 3487(provide 'comint)
3505 3488
3506;;; arch-tag: 1793314c-09db-40be-9549-9aeae3e75164 3489;; arch-tag: 1793314c-09db-40be-9549-9aeae3e75164
3507;;; comint.el ends here 3490;;; comint.el ends here
diff --git a/lisp/diff-mode.el b/lisp/diff-mode.el
index 0a7f1a1950a..c945a6a7221 100644
--- a/lisp/diff-mode.el
+++ b/lisp/diff-mode.el
@@ -1,6 +1,7 @@
1;;; diff-mode.el --- a mode for viewing/editing context diffs 1;;; diff-mode.el --- a mode for viewing/editing context diffs
2 2
3;; Copyright (C) 1998,1999,2000,01,02,03,2004 Free Software Foundation, Inc. 3;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004
4;; Free Software Foundation, Inc.
4 5
5;; Author: Stefan Monnier <monnier@cs.yale.edu> 6;; Author: Stefan Monnier <monnier@cs.yale.edu>
6;; Keywords: convenience patch diff 7;; Keywords: convenience patch diff
@@ -171,75 +172,73 @@ when editing big diffs)."
171 172
172(defface diff-header-face 173(defface diff-header-face
173 '((((class color) (min-colors 88) (background light)) 174 '((((class color) (min-colors 88) (background light))
174 (:background "grey85")) 175 :background "grey85")
175 (((class color) (min-colors 88) (background dark)) 176 (((class color) (min-colors 88) (background dark))
176 (:background "grey45")) 177 :background "grey45")
177 (((class color) (background light)) 178 (((class color) (background light))
178 (:foreground "blue1" :weight bold)) 179 :foreground "blue1" :weight bold)
179 (((class color) (background dark)) 180 (((class color) (background dark))
180 (:foreground "green" :weight bold)) 181 :foreground "green" :weight bold)
181 (t (:weight bold))) 182 (t :weight bold))
182 "`diff-mode' face inherited by hunk and index header faces.") 183 "`diff-mode' face inherited by hunk and index header faces.")
183(defvar diff-header-face 'diff-header-face) 184(defvar diff-header-face 'diff-header-face)
184 185
185(defface diff-file-header-face 186(defface diff-file-header-face
186 '((((class color) (min-colors 88) (background light)) 187 '((((class color) (min-colors 88) (background light))
187 (:background "grey70" :weight bold)) 188 :background "grey70" :weight bold)
188 (((class color) (min-colors 88) (background dark)) 189 (((class color) (min-colors 88) (background dark))
189 (:background "grey60" :weight bold)) 190 :background "grey60" :weight bold)
190 (((class color) (background light)) 191 (((class color) (background light))
191 (:foreground "yellow" :weight bold)) 192 :foreground "yellow" :weight bold)
192 (((class color) (background dark)) 193 (((class color) (background dark))
193 (:foreground "cyan" :weight bold)) 194 :foreground "cyan" :weight bold)
194 (t (:weight bold))) ; :height 1.3 195 (t :weight bold)) ; :height 1.3
195 "`diff-mode' face used to highlight file header lines.") 196 "`diff-mode' face used to highlight file header lines.")
196(defvar diff-file-header-face 'diff-file-header-face) 197(defvar diff-file-header-face 'diff-file-header-face)
197 198
198(defface diff-index-face 199(defface diff-index-face
199 '((t (:inherit diff-file-header-face))) 200 '((t :inherit diff-file-header-face))
200 "`diff-mode' face used to highlight index header lines.") 201 "`diff-mode' face used to highlight index header lines.")
201(defvar diff-index-face 'diff-index-face) 202(defvar diff-index-face 'diff-index-face)
202 203
203(defface diff-hunk-header-face 204(defface diff-hunk-header-face
204 '((t (:inherit diff-header-face))) 205 '((t :inherit diff-header-face))
205 "`diff-mode' face used to highlight hunk header lines.") 206 "`diff-mode' face used to highlight hunk header lines.")
206(defvar diff-hunk-header-face 'diff-hunk-header-face) 207(defvar diff-hunk-header-face 'diff-hunk-header-face)
207 208
208(defface diff-removed-face 209(defface diff-removed-face
209 '((t (:inherit diff-changed-face))) 210 '((t :inherit diff-changed-face))
210 "`diff-mode' face used to highlight removed lines.") 211 "`diff-mode' face used to highlight removed lines.")
211(defvar diff-removed-face 'diff-removed-face) 212(defvar diff-removed-face 'diff-removed-face)
212 213
213(defface diff-added-face 214(defface diff-added-face
214 '((t (:inherit diff-changed-face))) 215 '((t :inherit diff-changed-face))
215 "`diff-mode' face used to highlight added lines.") 216 "`diff-mode' face used to highlight added lines.")
216(defvar diff-added-face 'diff-added-face) 217(defvar diff-added-face 'diff-added-face)
217 218
218(defface diff-changed-face 219(defface diff-changed-face
219 '((((type tty pc) (class color) (background light)) 220 '((((type tty pc) (class color) (background light))
220 (:foreground "magenta" :weight bold :slant italic)) 221 :foreground "magenta" :weight bold :slant italic)
221 (((type tty pc) (class color) (background dark)) 222 (((type tty pc) (class color) (background dark))
222 (:foreground "yellow" :weight bold :slant italic)) 223 :foreground "yellow" :weight bold :slant italic))
223 (t ()))
224 "`diff-mode' face used to highlight changed lines.") 224 "`diff-mode' face used to highlight changed lines.")
225(defvar diff-changed-face 'diff-changed-face) 225(defvar diff-changed-face 'diff-changed-face)
226 226
227(defface diff-function-face 227(defface diff-function-face
228 '((t (:inherit diff-context-face))) 228 '((t :inherit diff-context-face))
229 "`diff-mode' face used to highlight function names produced by \"diff -p\".") 229 "`diff-mode' face used to highlight function names produced by \"diff -p\".")
230(defvar diff-function-face 'diff-function-face) 230(defvar diff-function-face 'diff-function-face)
231 231
232(defface diff-context-face 232(defface diff-context-face
233 '((((class color) (background light)) 233 '((((class color) (background light))
234 (:foreground "grey50")) 234 :foreground "grey50")
235 (((class color) (background dark)) 235 (((class color) (background dark))
236 (:foreground "grey70")) 236 :foreground "grey70"))
237 (t ))
238 "`diff-mode' face used to highlight context and other side-information.") 237 "`diff-mode' face used to highlight context and other side-information.")
239(defvar diff-context-face 'diff-context-face) 238(defvar diff-context-face 'diff-context-face)
240 239
241(defface diff-nonexistent-face 240(defface diff-nonexistent-face
242 '((t (:inherit diff-file-header-face))) 241 '((t :inherit diff-file-header-face))
243 "`diff-mode' face used to highlight nonexistent files in recursive diffs.") 242 "`diff-mode' face used to highlight nonexistent files in recursive diffs.")
244(defvar diff-nonexistent-face 'diff-nonexistent-face) 243(defvar diff-nonexistent-face 'diff-nonexistent-face)
245 244
@@ -1255,7 +1254,7 @@ For use in `add-log-current-defun-function'."
1255 (save-excursion 1254 (save-excursion
1256 (when (looking-at diff-hunk-header-re) 1255 (when (looking-at diff-hunk-header-re)
1257 (forward-line 1) 1256 (forward-line 1)
1258 (while (and (looking-at " ") (not (zerop (forward-line 1)))))) 1257 (re-search-forward "^[^ ]" nil t))
1259 (destructuring-bind (buf line-offset pos src dst &optional switched) 1258 (destructuring-bind (buf line-offset pos src dst &optional switched)
1260 (diff-find-source-location) 1259 (diff-find-source-location)
1261 (beginning-of-line) 1260 (beginning-of-line)
@@ -1355,5 +1354,5 @@ For use in `add-log-current-defun-function'."
1355;; use `combine-after-change-calls' to minimize the slowdown of font-lock. 1354;; use `combine-after-change-calls' to minimize the slowdown of font-lock.
1356;; 1355;;
1357 1356
1358;;; arch-tag: 2571d7ff-bc28-4cf9-8585-42e21890be66 1357;; arch-tag: 2571d7ff-bc28-4cf9-8585-42e21890be66
1359;;; diff-mode.el ends here 1358;;; diff-mode.el ends here
diff --git a/lisp/emacs-lisp/byte-opt.el b/lisp/emacs-lisp/byte-opt.el
index da8e7583438..e00bebc91d5 100644
--- a/lisp/emacs-lisp/byte-opt.el
+++ b/lisp/emacs-lisp/byte-opt.el
@@ -1152,7 +1152,7 @@ of FORM by signalling the error at compile-time."
1152 (numberp (nth 1 form))) 1152 (numberp (nth 1 form)))
1153 (list 'forward-word (eval (- (nth 1 form))))) 1153 (list 'forward-word (eval (- (nth 1 form)))))
1154 ((= 1 (safe-length form)) 1154 ((= 1 (safe-length form))
1155 '(forward-char -1)) 1155 '(forward-word -1))
1156 (t form))) 1156 (t form)))
1157 1157
1158(put 'char-before 'byte-optimizer 'byte-optimize-char-before) 1158(put 'char-before 'byte-optimizer 'byte-optimize-char-before)
diff --git a/lisp/font-lock.el b/lisp/font-lock.el
index 887e9b29a88..d0c749bf385 100644
--- a/lisp/font-lock.el
+++ b/lisp/font-lock.el
@@ -1324,6 +1324,12 @@ HIGHLIGHT should be of the form MATCH-HIGHLIGHT, see `font-lock-keywords'."
1324 (add-text-properties start end (cddr val)) 1324 (add-text-properties start end (cddr val))
1325 (setq val (cadr val))) 1325 (setq val (cadr val)))
1326 (cond 1326 (cond
1327 ((not (or val (eq override t)))
1328 ;; If `val' is nil, don't do anything. It is important to do it
1329 ;; explicitly, because when adding nil via things like
1330 ;; font-lock-append-text-property, the property is actually
1331 ;; changed from <face> to (<face>) which is undesirable. --Stef
1332 nil)
1327 ((not override) 1333 ((not override)
1328 ;; Cannot override existing fontification. 1334 ;; Cannot override existing fontification.
1329 (or (text-property-not-all start end 'face nil) 1335 (or (text-property-not-all start end 'face nil)
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog
index f4b77297867..782c2a260a6 100644
--- a/lisp/gnus/ChangeLog
+++ b/lisp/gnus/ChangeLog
@@ -1,3 +1,26 @@
12004-10-10 Reiner Steib <Reiner.Steib@gmx.de>
2
3 * gnus-sum.el: Mention that multibyte characters don't work as marks.
4
5 * gnus.el (message-y-or-n-p): Autoload.
6
7 * pop3.el (pop3-maildrop, pop3-mailhost, pop3-port)
8 (pop3-password-required, pop3-authentication-scheme)
9 (pop3-leave-mail-on-server): Made customizable.
10 (pop3): New custom group.
11 (pop3-retr): Remove `sleep-for' statements.
12 Suggested by Dave Love <fx@gnu.org>.
13
14 * nnheader.el (nnheader-read-timeout): Explain 1.0 timeout for
15 Windows/DOS.
16
17 * imap.el (imap-parse-flag-list, imap-parse-body-extension)
18 (imap-parse-body): Fix incorrect use of `assert'. Suggested by
19 Dave Love <fx@gnu.org>.
20
21 * mml.el (mml-minibuffer-read-disposition): Require match.
22 Suggested by Dave Love <fx@gnu.org>.
23
12004-10-06 Katsumi Yamaoka <yamaoka@jpl.org> 242004-10-06 Katsumi Yamaoka <yamaoka@jpl.org>
2 25
3 * gnus-group.el (gnus-update-group-mark-positions): 26 * gnus-group.el (gnus-update-group-mark-positions):
diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el
index 84de9c4e1ab..6f6f728720b 100644
--- a/lisp/gnus/gnus-sum.el
+++ b/lisp/gnus/gnus-sum.el
@@ -428,6 +428,9 @@ this variable specifies group names."
428 (cons :value ("" "") regexp (repeat string)) 428 (cons :value ("" "") regexp (repeat string))
429 (sexp :value nil)))) 429 (sexp :value nil))))
430 430
431;; FIXME: Although the custom type is `character' for the following variables,
432;; using multibyte characters (Latin-1, UTF-8) doesn't work. -- rs
433
431(defcustom gnus-unread-mark ? ;Whitespace 434(defcustom gnus-unread-mark ? ;Whitespace
432 "*Mark used for unread articles." 435 "*Mark used for unread articles."
433 :group 'gnus-summary-marks 436 :group 'gnus-summary-marks
diff --git a/lisp/gnus/gnus.el b/lisp/gnus/gnus.el
index 979ee2a7c24..bff1c3bba2f 100644
--- a/lisp/gnus/gnus.el
+++ b/lisp/gnus/gnus.el
@@ -34,6 +34,7 @@
34(require 'wid-edit) 34(require 'wid-edit)
35(require 'mm-util) 35(require 'mm-util)
36(require 'nnheader) 36(require 'nnheader)
37(autoload 'message-y-or-n-p "message" nil nil 'macro)
37 38
38(defgroup gnus nil 39(defgroup gnus nil
39 "The coffee-brewing, all singing, all dancing, kitchen sink newsreader." 40 "The coffee-brewing, all singing, all dancing, kitchen sink newsreader."
diff --git a/lisp/gnus/imap.el b/lisp/gnus/imap.el
index 754473fa8ec..326c998c5d9 100644
--- a/lisp/gnus/imap.el
+++ b/lisp/gnus/imap.el
@@ -2421,7 +2421,7 @@ Return nil if no complete line has arrived."
2421 2421
2422(defun imap-parse-flag-list () 2422(defun imap-parse-flag-list ()
2423 (let (flag-list start) 2423 (let (flag-list start)
2424 (assert (eq (char-after) ?\() t "In imap-parse-flag-list") 2424 (assert (eq (char-after) ?\() nil "In imap-parse-flag-list")
2425 (while (and (not (eq (char-after) ?\))) 2425 (while (and (not (eq (char-after) ?\)))
2426 (setq start (progn 2426 (setq start (progn
2427 (imap-forward) 2427 (imap-forward)
@@ -2430,7 +2430,7 @@ Return nil if no complete line has arrived."
2430 (point))) 2430 (point)))
2431 (> (skip-chars-forward "^ )" (imap-point-at-eol)) 0)) 2431 (> (skip-chars-forward "^ )" (imap-point-at-eol)) 0))
2432 (push (buffer-substring start (point)) flag-list)) 2432 (push (buffer-substring start (point)) flag-list))
2433 (assert (eq (char-after) ?\)) t "In imap-parse-flag-list") 2433 (assert (eq (char-after) ?\)) nil "In imap-parse-flag-list")
2434 (imap-forward) 2434 (imap-forward)
2435 (nreverse flag-list))) 2435 (nreverse flag-list)))
2436 2436
@@ -2515,7 +2515,7 @@ Return nil if no complete line has arrived."
2515 (while (eq (char-after) ?\ ) 2515 (while (eq (char-after) ?\ )
2516 (imap-forward) 2516 (imap-forward)
2517 (push (imap-parse-body-extension) b-e)) 2517 (push (imap-parse-body-extension) b-e))
2518 (assert (eq (char-after) ?\)) t "In imap-parse-body-extension") 2518 (assert (eq (char-after) ?\)) nil "In imap-parse-body-extension")
2519 (imap-forward) 2519 (imap-forward)
2520 (nreverse b-e)) 2520 (nreverse b-e))
2521 (or (imap-parse-number) 2521 (or (imap-parse-number)
@@ -2641,7 +2641,7 @@ Return nil if no complete line has arrived."
2641 (push (and (imap-parse-nil) nil) body)) 2641 (push (and (imap-parse-nil) nil) body))
2642 (setq body 2642 (setq body
2643 (append (imap-parse-body-ext) body))) ;; body-ext-... 2643 (append (imap-parse-body-ext) body))) ;; body-ext-...
2644 (assert (eq (char-after) ?\)) t "In imap-parse-body") 2644 (assert (eq (char-after) ?\)) nil "In imap-parse-body")
2645 (imap-forward) 2645 (imap-forward)
2646 (nreverse body)) 2646 (nreverse body))
2647 2647
@@ -2701,7 +2701,7 @@ Return nil if no complete line has arrived."
2701 (push (imap-parse-nstring) body) ;; body-fld-md5 2701 (push (imap-parse-nstring) body) ;; body-fld-md5
2702 (setq body (append (imap-parse-body-ext) body))) ;; body-ext-1part.. 2702 (setq body (append (imap-parse-body-ext) body))) ;; body-ext-1part..
2703 2703
2704 (assert (eq (char-after) ?\)) t "In imap-parse-body 2") 2704 (assert (eq (char-after) ?\)) nil "In imap-parse-body 2")
2705 (imap-forward) 2705 (imap-forward)
2706 (nreverse body))))) 2706 (nreverse body)))))
2707 2707
diff --git a/lisp/gnus/mml.el b/lisp/gnus/mml.el
index c2c5bbf91e3..2deb69fe36c 100644
--- a/lisp/gnus/mml.el
+++ b/lisp/gnus/mml.el
@@ -946,8 +946,7 @@ See Info node `(emacs-mime)Composing'.
946 "attachment"))) 946 "attachment")))
947 (disposition (completing-read "Disposition: " 947 (disposition (completing-read "Disposition: "
948 '(("attachment") ("inline") ("")) 948 '(("attachment") ("inline") (""))
949 nil 949 nil t)))
950 nil)))
951 (if (not (equal disposition "")) 950 (if (not (equal disposition ""))
952 disposition 951 disposition
953 default))) 952 default)))
diff --git a/lisp/gnus/nnheader.el b/lisp/gnus/nnheader.el
index 1b6ec636734..7df5ecae205 100644
--- a/lisp/gnus/nnheader.el
+++ b/lisp/gnus/nnheader.el
@@ -74,7 +74,15 @@ Integer values will in effect be rounded up to the nearest multiple of
74(defvar nnheader-read-timeout 74(defvar nnheader-read-timeout
75 (if (string-match "windows-nt\\|os/2\\|emx\\|cygwin" 75 (if (string-match "windows-nt\\|os/2\\|emx\\|cygwin"
76 (symbol-name system-type)) 76 (symbol-name system-type))
77 1.0 ; why? 77 ;; http://thread.gmane.org/v9655t3pjo.fsf@marauder.physik.uni-ulm.de
78 ;;
79 ;; IIRC, values lower than 1.0 didn't/don't work on Windows/DOS.
80 ;;
81 ;; There should probably be a runtime test to determine the timing
82 ;; resolution, or a primitive to report it. I don't know off-hand
83 ;; what's possible. Perhaps better, maybe the Windows/DOS primitive
84 ;; could round up non-zero timeouts to a minimum of 1.0?
85 1.0
78 0.1) 86 0.1)
79 "How long nntp should wait between checking for the end of output. 87 "How long nntp should wait between checking for the end of output.
80Shorter values mean quicker response, but are more CPU intensive.") 88Shorter values mean quicker response, but are more CPU intensive.")
diff --git a/lisp/gnus/pop3.el b/lisp/gnus/pop3.el
index 567ab24e004..e288f6cace2 100644
--- a/lisp/gnus/pop3.el
+++ b/lisp/gnus/pop3.el
@@ -37,25 +37,56 @@
37 37
38(require 'mail-utils) 38(require 'mail-utils)
39 39
40(defvar pop3-maildrop (or (user-login-name) (getenv "LOGNAME") (getenv "USER") nil) 40(defgroup pop3 nil
41 "*POP3 maildrop.") 41 "Post Office Protocol"
42(defvar pop3-mailhost (or (getenv "MAILHOST") nil) 42 :group 'mail
43 "*POP3 mailhost.") 43 :group 'mail-source)
44(defvar pop3-port 110 44
45 "*POP3 port.") 45(defcustom pop3-maildrop (or (user-login-name)
46 46 (getenv "LOGNAME")
47(defvar pop3-password-required t 47 (getenv "USER"))
48 "*Non-nil if a password is required when connecting to POP server.") 48 "*POP3 maildrop."
49 :version "21.4" ;; Oort Gnus
50 :type 'string
51 :group 'pop3)
52
53(defcustom pop3-mailhost (or (getenv "MAILHOST") ;; nil -> mismatch
54 "pop3")
55 "*POP3 mailhost."
56 :version "21.4" ;; Oort Gnus
57 :type 'string
58 :group 'pop3)
59
60(defcustom pop3-port 110
61 "*POP3 port."
62 :version "21.4" ;; Oort Gnus
63 :type 'number
64 :group 'pop3)
65
66(defcustom pop3-password-required t
67 "*Non-nil if a password is required when connecting to POP server."
68 :version "21.4" ;; Oort Gnus
69 :type 'boolean
70 :group 'pop3)
71
72;; Should this be customizable?
49(defvar pop3-password nil 73(defvar pop3-password nil
50 "*Password to use when connecting to POP server.") 74 "*Password to use when connecting to POP server.")
51 75
52(defvar pop3-authentication-scheme 'pass 76(defcustom pop3-authentication-scheme 'pass
53 "*POP3 authentication scheme. 77 "*POP3 authentication scheme.
54Defaults to 'pass, for the standard USER/PASS authentication. Other valid 78Defaults to 'pass, for the standard USER/PASS authentication. Other valid
55values are 'apop.") 79values are 'apop."
56 80 :version "21.4" ;; Oort Gnus
57(defvar pop3-leave-mail-on-server nil 81 :type '(choice (const :tag "USER/PASS" pass)
58 "*Non-nil if the mail is to be left on the POP server after fetching.") 82 (const :tag "APOP" apop))
83 :group 'pop3)
84
85(defcustom pop3-leave-mail-on-server nil
86 "*Non-nil if the mail is to be left on the POP server after fetching."
87 :version "21.4" ;; Oort Gnus
88 :type 'boolean
89 :group 'pop3)
59 90
60(defvar pop3-timestamp nil 91(defvar pop3-timestamp nil
61 "Timestamp returned when initially connected to the POP server. 92 "Timestamp returned when initially connected to the POP server.
@@ -71,8 +102,7 @@ Used for APOP authentication.")
71 (crashbuf (get-buffer-create " *pop3-retr*")) 102 (crashbuf (get-buffer-create " *pop3-retr*"))
72 (n 1) 103 (n 1)
73 message-count 104 message-count
74 (pop3-password pop3-password) 105 (pop3-password pop3-password))
75 )
76 ;; for debugging only 106 ;; for debugging only
77 (if pop3-debug (switch-to-buffer (process-buffer process))) 107 (if pop3-debug (switch-to-buffer (process-buffer process)))
78 ;; query for password 108 ;; query for password
@@ -114,8 +144,7 @@ Used for APOP authentication.")
114 "Return the number of messages in the maildrop." 144 "Return the number of messages in the maildrop."
115 (let* ((process (pop3-open-server pop3-mailhost pop3-port)) 145 (let* ((process (pop3-open-server pop3-mailhost pop3-port))
116 message-count 146 message-count
117 (pop3-password pop3-password) 147 (pop3-password pop3-password))
118 )
119 ;; for debugging only 148 ;; for debugging only
120 (if pop3-debug (switch-to-buffer (process-buffer process))) 149 (if pop3-debug (switch-to-buffer (process-buffer process)))
121 ;; query for password 150 ;; query for password
@@ -159,15 +188,14 @@ Returns the process associated with the connection."
159 (insert output))) 188 (insert output)))
160 189
161(defun pop3-send-command (process command) 190(defun pop3-send-command (process command)
162 (set-buffer (process-buffer process)) 191 (set-buffer (process-buffer process))
163 (goto-char (point-max)) 192 (goto-char (point-max))
164;; (if (= (aref command 0) ?P) 193 ;; (if (= (aref command 0) ?P)
165;; (insert "PASS <omitted>\r\n") 194 ;; (insert "PASS <omitted>\r\n")
166;; (insert command "\r\n")) 195 ;; (insert command "\r\n"))
167 (setq pop3-read-point (point)) 196 (setq pop3-read-point (point))
168 (goto-char (point-max)) 197 (goto-char (point-max))
169 (process-send-string process (concat command "\r\n")) 198 (process-send-string process (concat command "\r\n")))
170 )
171 199
172(defun pop3-read-response (process &optional return) 200(defun pop3-read-response (process &optional return)
173 "Read the response from the server. 201 "Read the response from the server.
@@ -355,27 +383,15 @@ This function currently does nothing.")
355 (while (not (re-search-forward "^\\.\r\n" nil t)) 383 (while (not (re-search-forward "^\\.\r\n" nil t))
356 ;; Fixme: Shouldn't depend on nnheader. 384 ;; Fixme: Shouldn't depend on nnheader.
357 (nnheader-accept-process-output process) 385 (nnheader-accept-process-output process)
358 ;; bill@att.com ... to save wear and tear on the heap
359 ;; uncommented because the condensed version below is a problem for
360 ;; some.
361 (if (> (buffer-size) 20000) (sleep-for 1))
362 (if (> (buffer-size) 50000) (sleep-for 1))
363 (if (> (buffer-size) 100000) (sleep-for 1))
364 (if (> (buffer-size) 200000) (sleep-for 1))
365 (if (> (buffer-size) 500000) (sleep-for 1))
366 ;; bill@att.com
367 ;; condensed into:
368 ;; (sometimes causes problems for really large messages.)
369; (if (> (buffer-size) 20000) (sleep-for (/ (buffer-size) 20000)))
370 (goto-char start)) 386 (goto-char start))
371 (setq pop3-read-point (point-marker)) 387 (setq pop3-read-point (point-marker))
372;; this code does not seem to work for some POP servers... 388 ;; this code does not seem to work for some POP servers...
373;; and I cannot figure out why not. 389 ;; and I cannot figure out why not.
374; (goto-char (match-beginning 0)) 390 ;; (goto-char (match-beginning 0))
375; (backward-char 2) 391 ;; (backward-char 2)
376; (if (not (looking-at "\r\n")) 392 ;; (if (not (looking-at "\r\n"))
377; (insert "\r\n")) 393 ;; (insert "\r\n"))
378; (re-search-forward "\\.\r\n") 394 ;; (re-search-forward "\\.\r\n")
379 (goto-char (match-beginning 0)) 395 (goto-char (match-beginning 0))
380 (setq end (point-marker)) 396 (setq end (point-marker))
381 (pop3-clean-region start end) 397 (pop3-clean-region start end)
diff --git a/lisp/imenu.el b/lisp/imenu.el
index 1c82fcacf34..6859c0c74c7 100644
--- a/lisp/imenu.el
+++ b/lisp/imenu.el
@@ -317,9 +317,12 @@ The function in this variable is called when selecting a normal index-item.")
317;;;; 317;;;;
318;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 318;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
319 319
320;; Return the current/previous sexp and the location of the sexp (its 320;; FIXME: This is the only imenu-example-* definition that's actually used,
321;; beginning) without moving the point. 321;; and it seems to only be used by cperl-mode.el. We should just move it to
322;; cperl-mode.el and remove the rest.
322(defun imenu-example--name-and-position () 323(defun imenu-example--name-and-position ()
324 "Return the current/previous sexp and its (beginning) location.
325Don't move point."
323 (save-excursion 326 (save-excursion
324 (forward-sexp -1) 327 (forward-sexp -1)
325 ;; [ydi] modified for imenu-use-markers 328 ;; [ydi] modified for imenu-use-markers
@@ -549,12 +552,10 @@ A nested sub-alist element looks like (INDEX-NAME SUB-ALIST).")
549 (cond 552 (cond
550 ((consp (cdr item)) 553 ((consp (cdr item))
551 (imenu--truncate-items (cdr item))) 554 (imenu--truncate-items (cdr item)))
552 (t 555 ;; truncate if necessary
553 ;; truncate if necessary 556 ((and (numberp imenu-max-item-length)
554 (if (and (numberp imenu-max-item-length) 557 (> (length (car item)) imenu-max-item-length))
555 (> (length (car item)) imenu-max-item-length)) 558 (setcar item (substring (car item) 0 imenu-max-item-length))))))
556 (setcar item (substring (car item) 0
557 imenu-max-item-length)))))))
558 menulist)) 559 menulist))
559 560
560 561
@@ -854,7 +855,7 @@ depending on PATTERNS."
854(defun imenu--completion-buffer (index-alist &optional prompt) 855(defun imenu--completion-buffer (index-alist &optional prompt)
855 "Let the user select from INDEX-ALIST in a completion buffer with PROMPT. 856 "Let the user select from INDEX-ALIST in a completion buffer with PROMPT.
856 857
857Returns t for rescan and otherwise a position number." 858Return one of the entries in index-alist or nil."
858 ;; Create a list for this buffer only when needed. 859 ;; Create a list for this buffer only when needed.
859 (let ((name (thing-at-point 'symbol)) 860 (let ((name (thing-at-point 'symbol))
860 choice 861 choice
@@ -880,13 +881,11 @@ Returns t for rescan and otherwise a position number."
880 prepared-index-alist 881 prepared-index-alist
881 nil t nil 'imenu--history-list name))) 882 nil t nil 'imenu--history-list name)))
882 883
883 (cond ((not (stringp name)) nil) 884 (when (stringp name)
884 ((string= name (car imenu--rescan-item)) t) 885 (setq choice (assoc name prepared-index-alist))
885 (t 886 (if (imenu--subalist-p choice)
886 (setq choice (assoc name prepared-index-alist)) 887 (imenu--completion-buffer (cdr choice) prompt)
887 (if (imenu--subalist-p choice) 888 choice))))
888 (imenu--completion-buffer (cdr choice) prompt)
889 choice)))))
890 889
891(defun imenu--mouse-menu (index-alist event &optional title) 890(defun imenu--mouse-menu (index-alist event &optional title)
892 "Let the user select from a buffer index from a mouse menu. 891 "Let the user select from a buffer index from a mouse menu.
@@ -937,9 +936,9 @@ The returned value is of the form (INDEX-NAME . INDEX-POSITION)."
937 (or (eq imenu-use-popup-menu t) mouse-triggered)) 936 (or (eq imenu-use-popup-menu t) mouse-triggered))
938 (imenu--mouse-menu index-alist last-nonmenu-event) 937 (imenu--mouse-menu index-alist last-nonmenu-event)
939 (imenu--completion-buffer index-alist prompt))) 938 (imenu--completion-buffer index-alist prompt)))
940 (and (eq result t) 939 (and (equal result imenu--rescan-item)
941 (imenu--cleanup) 940 (imenu--cleanup)
942 (setq imenu--index-alist nil))) 941 (setq result t imenu--index-alist nil)))
943 result)) 942 result))
944 943
945;;;###autoload 944;;;###autoload
@@ -1014,7 +1013,7 @@ A trivial interface to `imenu-add-to-menubar' suitable for use in a hook."
1014 nil)) 1013 nil))
1015 1014
1016(defun imenu-default-goto-function (name position &optional rest) 1015(defun imenu-default-goto-function (name position &optional rest)
1017 "Move the point to the given position. 1016 "Move to the given position.
1018 1017
1019NAME is ignored. POSITION is where to move. REST is also ignored. 1018NAME is ignored. POSITION is where to move. REST is also ignored.
1020The ignored args just make this function have the same interface as a 1019The ignored args just make this function have the same interface as a
@@ -1054,5 +1053,5 @@ for more information."
1054 1053
1055(provide 'imenu) 1054(provide 'imenu)
1056 1055
1057;;; arch-tag: 98a2f5f5-4b91-4704-b18c-3aacf77d77a7 1056;; arch-tag: 98a2f5f5-4b91-4704-b18c-3aacf77d77a7
1058;;; imenu.el ends here 1057;;; imenu.el ends here
diff --git a/lisp/kmacro.el b/lisp/kmacro.el
index b2226d4a895..2b4cbcaf323 100644
--- a/lisp/kmacro.el
+++ b/lisp/kmacro.el
@@ -248,7 +248,9 @@ macro to be executed before appending to it."
248 "Insert macro counter and increment with ARG or 1 if missing. 248 "Insert macro counter and increment with ARG or 1 if missing.
249With \\[universal-argument], insert previous kmacro-counter (but do not modify counter)." 249With \\[universal-argument], insert previous kmacro-counter (but do not modify counter)."
250 (interactive "P") 250 (interactive "P")
251 (setq kmacro-initial-counter-value nil) 251 (if kmacro-initial-counter-value
252 (setq kmacro-counter kmacro-initial-counter-value
253 kmacro-initial-counter-value nil))
252 (if (and arg (listp arg)) 254 (if (and arg (listp arg))
253 (insert (format kmacro-counter-format kmacro-last-counter)) 255 (insert (format kmacro-counter-format kmacro-last-counter))
254 (insert (format kmacro-counter-format kmacro-counter)) 256 (insert (format kmacro-counter-format kmacro-counter))
@@ -275,23 +277,23 @@ With \\[universal-argument], insert previous kmacro-counter (but do not modify c
275 "Set kmacro-counter to ARG or prompt if missing. 277 "Set kmacro-counter to ARG or prompt if missing.
276With \\[universal-argument] prefix, reset counter to its value prior to this iteration of the macro." 278With \\[universal-argument] prefix, reset counter to its value prior to this iteration of the macro."
277 (interactive "NMacro counter value: ") 279 (interactive "NMacro counter value: ")
278 (setq kmacro-last-counter kmacro-counter 280 (if (not (or defining-kbd-macro executing-kbd-macro))
279 kmacro-counter (if (and current-prefix-arg (listp current-prefix-arg)) 281 (kmacro-display-counter (setq kmacro-initial-counter-value arg))
280 kmacro-counter-value-start 282 (setq kmacro-last-counter kmacro-counter
281 arg)) 283 kmacro-counter (if (and current-prefix-arg (listp current-prefix-arg))
282 ;; setup initial macro counter value if we are not executing a macro. 284 kmacro-counter-value-start
283 (setq kmacro-initial-counter-value 285 arg))
284 (and (not (or defining-kbd-macro executing-kbd-macro)) 286 (unless executing-kbd-macro
285 kmacro-counter)) 287 (kmacro-display-counter))))
286 (unless executing-kbd-macro
287 (kmacro-display-counter)))
288 288
289 289
290(defun kmacro-add-counter (arg) 290(defun kmacro-add-counter (arg)
291 "Add numeric prefix arg (prompt if missing) to macro counter. 291 "Add numeric prefix arg (prompt if missing) to macro counter.
292With \\[universal-argument], restore previous counter value." 292With \\[universal-argument], restore previous counter value."
293 (interactive "NAdd to macro counter: ") 293 (interactive "NAdd to macro counter: ")
294 (setq kmacro-initial-counter-value nil) 294 (if kmacro-initial-counter-value
295 (setq kmacro-counter kmacro-initial-counter-value
296 kmacro-initial-counter-value nil))
295 (let ((last kmacro-last-counter)) 297 (let ((last kmacro-last-counter))
296 (setq kmacro-last-counter kmacro-counter 298 (setq kmacro-last-counter kmacro-counter
297 kmacro-counter (if (and current-prefix-arg (listp current-prefix-arg)) 299 kmacro-counter (if (and current-prefix-arg (listp current-prefix-arg))
@@ -394,7 +396,10 @@ Optional arg EMPTY is message to print if no macros are defined."
394 (m (format-kbd-macro macro)) 396 (m (format-kbd-macro macro))
395 (l (length m)) 397 (l (length m))
396 (z (and nil trunc (> l x)))) 398 (z (and nil trunc (> l x))))
397 (message (format "%s: %s%s" (or descr "Macro") 399 (message (format "%s%s: %s%s" (or descr "Macro")
400 (if (= kmacro-counter 0) ""
401 (format " [%s]"
402 (format kmacro-counter-format-start kmacro-counter)))
398 (if z (substring m 0 (1- x)) m) (if z "..." "")))) 403 (if z (substring m 0 (1- x)) m) (if z "..." ""))))
399 (message (or empty "No keyboard macros defined")))) 404 (message (or empty "No keyboard macros defined"))))
400 405
diff --git a/lisp/mail/smtpmail.el b/lisp/mail/smtpmail.el
index 84a61350145..d356979ea26 100644
--- a/lisp/mail/smtpmail.el
+++ b/lisp/mail/smtpmail.el
@@ -471,26 +471,32 @@ This is relative to `smtpmail-queue-dir'.")
471 (if (null (and cred (condition-case () 471 (if (null (and cred (condition-case ()
472 (progn 472 (progn
473 (require 'starttls) 473 (require 'starttls)
474 (call-process starttls-program)) 474 (call-process (if starttls-use-gnutls
475 starttls-gnutls-program
476 starttls-program)))
475 (error nil)))) 477 (error nil))))
476 ;; The normal case. 478 ;; The normal case.
477 (open-network-stream "SMTP" process-buffer host port) 479 (open-network-stream "SMTP" process-buffer host port)
478 (let* ((cred-key (smtpmail-cred-key cred)) 480 (let* ((cred-key (smtpmail-cred-key cred))
479 (cred-cert (smtpmail-cred-cert cred)) 481 (cred-cert (smtpmail-cred-cert cred))
480 (starttls-extra-args 482 (starttls-extra-args
481 (when (and (stringp cred-key) (stringp cred-cert) 483 (append
482 (file-regular-p 484 starttls-extra-args
483 (setq cred-key (expand-file-name cred-key))) 485 (when (and (stringp cred-key) (stringp cred-cert)
484 (file-regular-p 486 (file-regular-p
485 (setq cred-cert (expand-file-name cred-cert)))) 487 (setq cred-key (expand-file-name cred-key)))
486 (list "--key-file" cred-key "--cert-file" cred-cert))) 488 (file-regular-p
489 (setq cred-cert (expand-file-name cred-cert))))
490 (list "--key-file" cred-key "--cert-file" cred-cert))))
487 (starttls-extra-arguments 491 (starttls-extra-arguments
488 (when (and (stringp cred-key) (stringp cred-cert) 492 (append
489 (file-regular-p 493 starttls-extra-arguments
490 (setq cred-key (expand-file-name cred-key))) 494 (when (and (stringp cred-key) (stringp cred-cert)
491 (file-regular-p 495 (file-regular-p
492 (setq cred-cert (expand-file-name cred-cert)))) 496 (setq cred-key (expand-file-name cred-key)))
493 (list "--x509keyfile" cred-key "--x509certfile" cred-cert)))) 497 (file-regular-p
498 (setq cred-cert (expand-file-name cred-cert))))
499 (list "--x509keyfile" cred-key "--x509certfile" cred-cert)))))
494 (starttls-open-stream "SMTP" process-buffer host port))))) 500 (starttls-open-stream "SMTP" process-buffer host port)))))
495 501
496(defun smtpmail-try-auth-methods (process supported-extensions host port) 502(defun smtpmail-try-auth-methods (process supported-extensions host port)
diff --git a/lisp/net/ange-ftp.el b/lisp/net/ange-ftp.el
index c1f3c0a8d52..16a4826b8ae 100644
--- a/lisp/net/ange-ftp.el
+++ b/lisp/net/ange-ftp.el
@@ -4514,9 +4514,6 @@ NEWNAME should be the name to give the new compressed or uncompressed file.")
4514 1)) 4514 1))
4515 (apply 'call-process program nil (not discard) nil arguments))) 4515 (apply 'call-process program nil (not discard) nil arguments)))
4516 4516
4517(defvar ange-ftp-remote-shell "rsh"
4518 "Remote shell to use for chmod, if FTP server rejects the `chmod' command.")
4519
4520;; Handle an attempt to run chmod on a remote file 4517;; Handle an attempt to run chmod on a remote file
4521;; by using the ftp chmod command. 4518;; by using the ftp chmod command.
4522(defun ange-ftp-call-chmod (args) 4519(defun ange-ftp-call-chmod (args)
@@ -4541,7 +4538,7 @@ NEWNAME should be the name to give the new compressed or uncompressed file.")
4541 abbr)))) 4538 abbr))))
4542 (or (car result) 4539 (or (car result)
4543 (call-process 4540 (call-process
4544 ange-ftp-remote-shell 4541 remote-shell-program
4545 nil t nil host dired-chmod-program mode name)))))) 4542 nil t nil host dired-chmod-program mode name))))))
4546 rest)) 4543 rest))
4547 (setq ange-ftp-ls-cache-file nil) ;Stop confusing Dired. 4544 (setq ange-ftp-ls-cache-file nil) ;Stop confusing Dired.
diff --git a/lisp/pcvs-defs.el b/lisp/pcvs-defs.el
index 16e2ff82553..cd379afab77 100644
--- a/lisp/pcvs-defs.el
+++ b/lisp/pcvs-defs.el
@@ -1,7 +1,7 @@
1;;; pcvs-defs.el --- variable definitions for PCL-CVS 1;;; pcvs-defs.el --- variable definitions for PCL-CVS
2 2
3;; Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000, 03, 2004 3;; Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
4;; Free Software Foundation, Inc. 4;; 2000, 2003, 2004 Free Software Foundation, Inc.
5 5
6;; Author: Stefan Monnier <monnier@cs.yale.edu> 6;; Author: Stefan Monnier <monnier@cs.yale.edu>
7;; Keywords: pcl-cvs 7;; Keywords: pcl-cvs
@@ -249,9 +249,6 @@ Output from cvs is placed here for asynchronous commands.")
249 :type '(choice (const :tag "Ediff" (cvs-ediff-diff . cvs-ediff-merge)) 249 :type '(choice (const :tag "Ediff" (cvs-ediff-diff . cvs-ediff-merge))
250 (const :tag "Emerge" (cvs-emerge-diff . cvs-emerge-merge)))) 250 (const :tag "Emerge" (cvs-emerge-diff . cvs-emerge-merge))))
251 251
252(defvar pcl-cvs-load-hook nil
253 "Run after loading pcl-cvs.")
254
255(defvar cvs-mode-hook nil 252(defvar cvs-mode-hook nil
256 "Run after `cvs-mode' was setup.") 253 "Run after `cvs-mode' was setup.")
257 254
@@ -510,5 +507,5 @@ message and replace it with a message tell you to change this variable.")
510;; 507;;
511(provide 'pcvs-defs) 508(provide 'pcvs-defs)
512 509
513;;; arch-tag: c7c701d0-d1d4-4aa9-a302-007bb03aca5e 510;; arch-tag: c7c701d0-d1d4-4aa9-a302-007bb03aca5e
514;;; pcvs-defs.el ends here 511;;; pcvs-defs.el ends here
diff --git a/lisp/subr.el b/lisp/subr.el
index ea971b99c76..0dcdcebff69 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -383,7 +383,10 @@ but optional second arg NODIGITS non-nil treats them like other chars."
383 "Replace OLDDEF with NEWDEF for any keys in KEYMAP now defined as OLDDEF. 383 "Replace OLDDEF with NEWDEF for any keys in KEYMAP now defined as OLDDEF.
384In other words, OLDDEF is replaced with NEWDEF where ever it appears. 384In other words, OLDDEF is replaced with NEWDEF where ever it appears.
385Alternatively, if optional fourth argument OLDMAP is specified, we redefine 385Alternatively, if optional fourth argument OLDMAP is specified, we redefine
386in KEYMAP as NEWDEF those keys which are defined as OLDDEF in OLDMAP." 386in KEYMAP as NEWDEF those keys which are defined as OLDDEF in OLDMAP.
387
388For most uses, it is simpler and safer to use command remappping like this:
389 \(define-key KEYMAP [remap OLDDEF] NEWDEF)"
387 ;; Don't document PREFIX in the doc string because we don't want to 390 ;; Don't document PREFIX in the doc string because we don't want to
388 ;; advertise it. It's meant for recursive calls only. Here's its 391 ;; advertise it. It's meant for recursive calls only. Here's its
389 ;; meaning 392 ;; meaning
@@ -2683,10 +2686,26 @@ The properties used on SYMBOL are `composefunc', `sendfunc',
2683;; digits of precision, it doesn't really matter here. On the other 2686;; digits of precision, it doesn't really matter here. On the other
2684;; hand, it greatly simplifies the code. 2687;; hand, it greatly simplifies the code.
2685 2688
2689(defsubst progress-reporter-update (reporter value)
2690 "Report progress of an operation in the echo area.
2691However, if the change since last echo area update is too small
2692or not enough time has passed, then do nothing (see
2693`make-progress-reporter' for details).
2694
2695First parameter, REPORTER, should be the result of a call to
2696`make-progress-reporter'. Second, VALUE, determines the actual
2697progress of operation; it must be between MIN-VALUE and MAX-VALUE
2698as passed to `make-progress-reporter'.
2699
2700This function is very inexpensive, you may not bother how often
2701you call it."
2702 (when (>= value (car reporter))
2703 (progress-reporter-do-update reporter value)))
2704
2686(defun make-progress-reporter (message min-value max-value 2705(defun make-progress-reporter (message min-value max-value
2687 &optional current-value 2706 &optional current-value
2688 min-change min-time) 2707 min-change min-time)
2689 "Return an object suitable for reporting operation progress with `progress-reporter-update'. 2708 "Return progress reporter object usage with `progress-reporter-update'.
2690 2709
2691MESSAGE is shown in the echo area. When at least 1% of operation 2710MESSAGE is shown in the echo area. When at least 1% of operation
2692is complete, the exact percentage will be appended to the 2711is complete, the exact percentage will be appended to the
@@ -2723,22 +2742,6 @@ then this parameter is effectively rounded up."
2723 (progress-reporter-update reporter (or current-value min-value)) 2742 (progress-reporter-update reporter (or current-value min-value))
2724 reporter)) 2743 reporter))
2725 2744
2726(defsubst progress-reporter-update (reporter value)
2727 "Report progress of an operation in the echo area.
2728However, if the change since last echo area update is too small
2729or not enough time has passed, then do nothing (see
2730`make-progress-reporter' for details).
2731
2732First parameter, REPORTER, should be the result of a call to
2733`make-progress-reporter'. Second, VALUE, determines the actual
2734progress of operation; it must be between MIN-VALUE and MAX-VALUE
2735as passed to `make-progress-reporter'.
2736
2737This function is very inexpensive, you may not bother how often
2738you call it."
2739 (when (>= value (car reporter))
2740 (progress-reporter-do-update reporter value)))
2741
2742(defun progress-reporter-force-update (reporter value &optional new-message) 2745(defun progress-reporter-force-update (reporter value &optional new-message)
2743 "Report progress of an operation in the echo area unconditionally. 2746 "Report progress of an operation in the echo area unconditionally.
2744 2747
diff --git a/lisp/textmodes/tex-mode.el b/lisp/textmodes/tex-mode.el
index 2a9059e2f56..ddcaaa0bf4f 100644
--- a/lisp/textmodes/tex-mode.el
+++ b/lisp/textmodes/tex-mode.el
@@ -500,6 +500,11 @@ An alternative value is \" . \", if you use a font with a narrow period."
500 1 font-lock-function-name-face)))) 500 1 font-lock-function-name-face))))
501 "Subdued expressions to highlight in TeX modes.") 501 "Subdued expressions to highlight in TeX modes.")
502 502
503(defun tex-font-lock-append-prop (prop)
504 (unless (memq (get-text-property (match-end 1) 'face)
505 '(font-lock-comment-face tex-verbatim-face))
506 prop))
507
503(defconst tex-font-lock-keywords-2 508(defconst tex-font-lock-keywords-2
504 (append tex-font-lock-keywords-1 509 (append tex-font-lock-keywords-1
505 (eval-when-compile 510 (eval-when-compile
@@ -553,16 +558,19 @@ An alternative value is \" . \", if you use a font with a narrow period."
553 ;; 558 ;;
554 ;; Font environments. It seems a bit dubious to use `bold' etc. faces 559 ;; Font environments. It seems a bit dubious to use `bold' etc. faces
555 ;; since we might not be able to display those fonts. 560 ;; since we might not be able to display those fonts.
556 (list (concat slash bold " *" arg) 2 '(quote bold) 'append) 561 (list (concat slash bold " *" arg) 2
557 (list (concat slash italic " *" arg) 2 '(quote italic) 'append) 562 '(tex-font-lock-append-prop 'bold) 'append)
563 (list (concat slash italic " *" arg) 2
564 '(tex-font-lock-append-prop 'italic) 'append)
558 ;; (list (concat slash type arg) 2 '(quote bold-italic) 'append) 565 ;; (list (concat slash type arg) 2 '(quote bold-italic) 'append)
559 ;; 566 ;;
560 ;; Old-style bf/em/it/sl. Stop at `\\' and un-escaped `&', for tables. 567 ;; Old-style bf/em/it/sl. Stop at `\\' and un-escaped `&', for tables.
561 (list (concat "\\\\\\(em\\|it\\|sl\\)\\>" args) 568 (list (concat "\\\\\\(em\\|it\\|sl\\)\\>" args)
562 2 '(quote italic) 'append) 569 2 '(tex-font-lock-append-prop 'italic) 'append)
563 ;; This is separate from the previous one because of cases like 570 ;; This is separate from the previous one because of cases like
564 ;; {\em foo {\bf bar} bla} where both match. 571 ;; {\em foo {\bf bar} bla} where both match.
565 (list (concat "\\\\bf\\>" args) 1 '(quote bold) 'append))))) 572 (list (concat "\\\\\\(bf\\)\\>" args)
573 2 '(tex-font-lock-append-prop 'bold) 'append)))))
566 "Gaudy expressions to highlight in TeX modes.") 574 "Gaudy expressions to highlight in TeX modes.")
567 575
568(defun tex-font-lock-suscript (pos) 576(defun tex-font-lock-suscript (pos)
@@ -604,11 +612,14 @@ An alternative value is \" . \", if you use a font with a narrow period."
604(defvar tex-font-lock-syntactic-keywords 612(defvar tex-font-lock-syntactic-keywords
605 (let ((verbs (regexp-opt tex-verbatim-environments t))) 613 (let ((verbs (regexp-opt tex-verbatim-environments t)))
606 `((,(concat "^\\\\begin *{" verbs "}.*\\(\n\\)") 2 "|") 614 `((,(concat "^\\\\begin *{" verbs "}.*\\(\n\\)") 2 "|")
607 (,(concat "^\\\\end *{" verbs "}\\(.?\\)") 2 615 ;; Technically, we'd like to put the "|" property on the \n preceding
608 (unless (<= (match-beginning 0) (point-min)) 616 ;; the \end, but this would have 2 disadvantages:
609 (put-text-property (1- (match-beginning 0)) (match-beginning 0) 617 ;; 1 - it's wrong if the verbatim env is empty (the same \n is used to
610 'syntax-table (string-to-syntax "|")) 618 ;; start and end the fenced-string).
611 "<")) 619 ;; 2 - font-lock considers the preceding \n as being part of the
620 ;; preceding line, so things gets screwed every time the previous
621 ;; line is re-font-locked on its own.
622 (,(concat "^\\(\\\\\\)end *{" verbs "}\\(.?\\)") (1 "|") (3 "<"))
612 ;; ("^\\(\\\\\\)begin *{comment}" 1 "< b") 623 ;; ("^\\(\\\\\\)begin *{comment}" 1 "< b")
613 ;; ("^\\\\end *{comment}.*\\(\n\\)" 1 "> b") 624 ;; ("^\\\\end *{comment}.*\\(\n\\)" 1 "> b")
614 ("\\\\verb\\**\\([^a-z@*]\\)" 1 "\"")))) 625 ("\\\\verb\\**\\([^a-z@*]\\)" 1 "\""))))
diff --git a/lisp/url/ChangeLog b/lisp/url/ChangeLog
index 0da4297bb86..c441dc37d7a 100644
--- a/lisp/url/ChangeLog
+++ b/lisp/url/ChangeLog
@@ -1,3 +1,43 @@
12004-10-10 Lars Hansen <larsh@math.ku.dk>
2
3 * url-auth.el: Fix copyright notice.
4
5 * url-cache.el: Fix copyright notice.
6
7 * url-cookie.el: Fix copyright notice.
8
9 * url-dired.el: Fix copyright notice.
10
11 * url-file.el: Fix copyright notice.
12
13 * url-ftp.el: Fix copyright notice.
14
15 * url-handlers.el: Fix copyright notice.
16
17 * url-history.el: Fix copyright notice.
18
19 * url-irc.el: Fix copyright notice.
20
21 * url-mailto.el: Fix copyright notice.
22
23 * url-methods.el: Fix copyright notice.
24
25 * url-misc.el: Fix copyright notice.
26
27 * url-news.el: Fix copyright notice.
28
29 * url-nfs.el: Fix copyright notice.
30
31 * url-parse.el: Fix copyright notice.
32
33 * url-privacy.el: Fix copyright notice.
34
35 * url-vars.el: Fix copyright notice.
36
37 * url.el: Fix copyright notice.
38
39 * url-util.el: Fix copyright notice.
40
12004-10-06 Stefan Monnier <monnier@iro.umontreal.ca> 412004-10-06 Stefan Monnier <monnier@iro.umontreal.ca>
2 42
3 * url-handlers.el (url-insert-file-contents): Use the URL to decide the 43 * url-handlers.el (url-insert-file-contents): Use the URL to decide the
diff --git a/lisp/url/url-auth.el b/lisp/url/url-auth.el
index 5d9b9ab945c..39bb730bebc 100644
--- a/lisp/url/url-auth.el
+++ b/lisp/url/url-auth.el
@@ -2,7 +2,6 @@
2;; Keywords: comm, data, processes, hypermedia 2;; Keywords: comm, data, processes, hypermedia
3 3
4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
5;;; Copyright (c) 1993 - 1996 by William M. Perry <wmperry@cs.indiana.edu>
6;;; Copyright (c) 1996 - 1999 Free Software Foundation, Inc. 5;;; Copyright (c) 1996 - 1999 Free Software Foundation, Inc.
7;;; 6;;;
8;;; This file is part of GNU Emacs. 7;;; This file is part of GNU Emacs.
diff --git a/lisp/url/url-cache.el b/lisp/url/url-cache.el
index d279a88951d..1e3374639e1 100644
--- a/lisp/url/url-cache.el
+++ b/lisp/url/url-cache.el
@@ -2,7 +2,6 @@
2;; Keywords: comm, data, processes, hypermedia 2;; Keywords: comm, data, processes, hypermedia
3 3
4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
5;;; Copyright (c) 1993 - 1996 by William M. Perry <wmperry@cs.indiana.edu>
6;;; Copyright (c) 1996 - 1999 Free Software Foundation, Inc. 5;;; Copyright (c) 1996 - 1999 Free Software Foundation, Inc.
7;;; 6;;;
8;;; This file is part of GNU Emacs. 7;;; This file is part of GNU Emacs.
diff --git a/lisp/url/url-cookie.el b/lisp/url/url-cookie.el
index 997c203069c..9f7db867597 100644
--- a/lisp/url/url-cookie.el
+++ b/lisp/url/url-cookie.el
@@ -1,7 +1,6 @@
1;;; url-cookie.el --- Netscape Cookie support 1;;; url-cookie.el --- Netscape Cookie support
2 2
3;; Copyright (c) 1996 - 1999,2004 Free Software Foundation, Inc. 3;; Copyright (c) 1996 - 1999,2004 Free Software Foundation, Inc.
4;; Copyright (c) 1996 by William M. Perry <wmperry@cs.indiana.edu>
5 4
6;; Keywords: comm, data, processes, hypermedia 5;; Keywords: comm, data, processes, hypermedia
7 6
diff --git a/lisp/url/url-dired.el b/lisp/url/url-dired.el
index da22ddc9a78..73307412e1e 100644
--- a/lisp/url/url-dired.el
+++ b/lisp/url/url-dired.el
@@ -2,7 +2,6 @@
2;; Keywords: comm, files 2;; Keywords: comm, files
3 3
4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
5;;; Copyright (c) 1993 - 1996 by William M. Perry <wmperry@cs.indiana.edu>
6;;; Copyright (c) 1996 - 1999 Free Software Foundation, Inc. 5;;; Copyright (c) 1996 - 1999 Free Software Foundation, Inc.
7;;; 6;;;
8;;; This file is part of GNU Emacs. 7;;; This file is part of GNU Emacs.
diff --git a/lisp/url/url-file.el b/lisp/url/url-file.el
index 77c2e74555f..0aa23acc0ec 100644
--- a/lisp/url/url-file.el
+++ b/lisp/url/url-file.el
@@ -1,7 +1,6 @@
1;;; url-file.el --- File retrieval code 1;;; url-file.el --- File retrieval code
2 2
3;; Copyright (c) 1996 - 1999,2004 Free Software Foundation, Inc. 3;; Copyright (c) 1996 - 1999,2004 Free Software Foundation, Inc.
4;; Copyright (c) 1993 - 1996 by William M. Perry <wmperry@cs.indiana.edu>
5 4
6;; Keywords: comm, data, processes 5;; Keywords: comm, data, processes
7 6
diff --git a/lisp/url/url-ftp.el b/lisp/url/url-ftp.el
index 925a6fb5238..4346f3910b1 100644
--- a/lisp/url/url-ftp.el
+++ b/lisp/url/url-ftp.el
@@ -2,7 +2,6 @@
2;; Keywords: comm, data, processes 2;; Keywords: comm, data, processes
3 3
4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
5;;; Copyright (c) 1993 - 1996 by William M. Perry <wmperry@cs.indiana.edu>
6;;; Copyright (c) 1996 - 1999 Free Software Foundation, Inc. 5;;; Copyright (c) 1996 - 1999 Free Software Foundation, Inc.
7;;; 6;;;
8;;; This file is part of GNU Emacs. 7;;; This file is part of GNU Emacs.
diff --git a/lisp/url/url-handlers.el b/lisp/url/url-handlers.el
index 18a2e273637..db961b9c27e 100644
--- a/lisp/url/url-handlers.el
+++ b/lisp/url/url-handlers.el
@@ -1,7 +1,6 @@
1;;; url-handlers.el --- file-name-handler stuff for URL loading 1;;; url-handlers.el --- file-name-handler stuff for URL loading
2 2
3;; Copyright (c) 1996, 1997, 1998, 1999, 2004 Free Software Foundation, Inc. 3;; Copyright (c) 1996, 1997, 1998, 1999, 2004 Free Software Foundation, Inc.
4;; Copyright (c) 1993 - 1996 by William M. Perry <wmperry@cs.indiana.edu>
5 4
6;; Keywords: comm, data, processes, hypermedia 5;; Keywords: comm, data, processes, hypermedia
7 6
diff --git a/lisp/url/url-history.el b/lisp/url/url-history.el
index 1d5153ff327..6a2d87cfbc1 100644
--- a/lisp/url/url-history.el
+++ b/lisp/url/url-history.el
@@ -1,7 +1,6 @@
1;;; url-history.el --- Global history tracking for URL package 1;;; url-history.el --- Global history tracking for URL package
2 2
3;; Copyright (c) 1996 - 1999,2004 Free Software Foundation, Inc. 3;; Copyright (c) 1996 - 1999,2004 Free Software Foundation, Inc.
4;; Copyright (c) 1993 - 1996 by William M. Perry <wmperry@cs.indiana.edu>
5 4
6;; Keywords: comm, data, processes, hypermedia 5;; Keywords: comm, data, processes, hypermedia
7 6
diff --git a/lisp/url/url-irc.el b/lisp/url/url-irc.el
index 6b62761d97a..a4b195f253f 100644
--- a/lisp/url/url-irc.el
+++ b/lisp/url/url-irc.el
@@ -2,7 +2,6 @@
2;; Keywords: comm, data, processes 2;; Keywords: comm, data, processes
3 3
4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
5;;; Copyright (c) 1996 by William M. Perry <wmperry@cs.indiana.edu>
6;;; Copyright (c) 1996 - 1999 Free Software Foundation, Inc. 5;;; Copyright (c) 1996 - 1999 Free Software Foundation, Inc.
7;;; 6;;;
8;;; This file is part of GNU Emacs. 7;;; This file is part of GNU Emacs.
diff --git a/lisp/url/url-mailto.el b/lisp/url/url-mailto.el
index c2b35051c31..bcb6bad4179 100644
--- a/lisp/url/url-mailto.el
+++ b/lisp/url/url-mailto.el
@@ -1,7 +1,6 @@
1;;; url-mail.el --- Mail Uniform Resource Locator retrieval code 1;;; url-mail.el --- Mail Uniform Resource Locator retrieval code
2 2
3;; Copyright (c) 1996 - 1999 Free Software Foundation, Inc. 3;; Copyright (c) 1996 - 1999 Free Software Foundation, Inc.
4;; Copyright (c) 1993 - 1996 by William M. Perry <wmperry@cs.indiana.edu>
5 4
6;; Keywords: comm, data, processes 5;; Keywords: comm, data, processes
7 6
diff --git a/lisp/url/url-methods.el b/lisp/url/url-methods.el
index 49329264e63..75d746f3e3f 100644
--- a/lisp/url/url-methods.el
+++ b/lisp/url/url-methods.el
@@ -1,7 +1,6 @@
1;;; url-methods.el --- Load URL schemes as needed 1;;; url-methods.el --- Load URL schemes as needed
2 2
3;; Copyright (c) 1996,97,98,1999,2004 Free Software Foundation, Inc. 3;; Copyright (c) 1996,1997,1998,1999,2004 Free Software Foundation, Inc.
4;; Copyright (c) 1993 - 1996 by William M. Perry <wmperry@cs.indiana.edu>
5 4
6;; Keywords: comm, data, processes, hypermedia 5;; Keywords: comm, data, processes, hypermedia
7 6
diff --git a/lisp/url/url-misc.el b/lisp/url/url-misc.el
index f6962f4fdee..ff2f1282137 100644
--- a/lisp/url/url-misc.el
+++ b/lisp/url/url-misc.el
@@ -2,8 +2,7 @@
2;; Keywords: comm, data, processes 2;; Keywords: comm, data, processes
3 3
4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
5;;; Copyright (c) 1993 - 1996 by William M. Perry <wmperry@cs.indiana.edu> 5;;; Copyright (c) 1996,1997,1998,1999,2002 Free Software Foundation, Inc.
6;;; Copyright (c) 1996, 97, 98, 99, 2002 Free Software Foundation, Inc.
7;;; 6;;;
8;;; This file is part of GNU Emacs. 7;;; This file is part of GNU Emacs.
9;;; 8;;;
diff --git a/lisp/url/url-news.el b/lisp/url/url-news.el
index c56fe83e77e..a426f09b1ca 100644
--- a/lisp/url/url-news.el
+++ b/lisp/url/url-news.el
@@ -2,7 +2,6 @@
2;; Keywords: comm, data, processes 2;; Keywords: comm, data, processes
3 3
4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
5;;; Copyright (c) 1993 - 1996 by William M. Perry <wmperry@cs.indiana.edu>
6;;; Copyright (c) 1996 - 1999 Free Software Foundation, Inc. 5;;; Copyright (c) 1996 - 1999 Free Software Foundation, Inc.
7;;; 6;;;
8;;; This file is part of GNU Emacs. 7;;; This file is part of GNU Emacs.
diff --git a/lisp/url/url-nfs.el b/lisp/url/url-nfs.el
index d068341b1c2..3b834bba75f 100644
--- a/lisp/url/url-nfs.el
+++ b/lisp/url/url-nfs.el
@@ -1,7 +1,6 @@
1;;; url-nfs.el --- NFS URL interface 1;;; url-nfs.el --- NFS URL interface
2 2
3;; Copyright (c) 1996,97,98,1999,2004 Free Software Foundation, Inc. 3;; Copyright (c) 1996,1997,1998,1999,2004 Free Software Foundation, Inc.
4;; Copyright (c) 1996 by William M. Perry <wmperry@cs.indiana.edu>
5 4
6;; Keywords: comm, data, processes 5;; Keywords: comm, data, processes
7 6
diff --git a/lisp/url/url-parse.el b/lisp/url/url-parse.el
index 9a2a45e9710..97348ab5db2 100644
--- a/lisp/url/url-parse.el
+++ b/lisp/url/url-parse.el
@@ -1,7 +1,6 @@
1;;; url-parse.el --- Uniform Resource Locator parser 1;;; url-parse.el --- Uniform Resource Locator parser
2 2
3;; Copyright (c) 1996,97,98,1999,2004 Free Software Foundation, Inc. 3;; Copyright (c) 1996,1997,1998,1999,2004 Free Software Foundation, Inc.
4;; Copyright (c) 1993 - 1996 by William M. Perry <wmperry@cs.indiana.edu>
5 4
6;; Keywords: comm, data, processes 5;; Keywords: comm, data, processes
7 6
diff --git a/lisp/url/url-privacy.el b/lisp/url/url-privacy.el
index 9fcfe8f04a3..cb64cfbd4fc 100644
--- a/lisp/url/url-privacy.el
+++ b/lisp/url/url-privacy.el
@@ -2,7 +2,6 @@
2;; Keywords: comm, data, processes, hypermedia 2;; Keywords: comm, data, processes, hypermedia
3 3
4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
5;;; Copyright (c) 1993 - 1996 by William M. Perry <wmperry@cs.indiana.edu>
6;;; Copyright (c) 1996 - 1999 Free Software Foundation, Inc. 5;;; Copyright (c) 1996 - 1999 Free Software Foundation, Inc.
7;;; 6;;;
8;;; This file is part of GNU Emacs. 7;;; This file is part of GNU Emacs.
diff --git a/lisp/url/url-util.el b/lisp/url/url-util.el
index d4a3733eab5..5d1f73e0d5d 100644
--- a/lisp/url/url-util.el
+++ b/lisp/url/url-util.el
@@ -1,7 +1,6 @@
1;;; url-util.el --- Miscellaneous helper routines for URL library 1;;; url-util.el --- Miscellaneous helper routines for URL library
2 2
3;; Copyright (c) 1996,97,98,99,2001,2004 Free Software Foundation, Inc. 3;; Copyright (c) 1996,1997,1998,1999,2001,2004 Free Software Foundation, Inc.
4;; Copyright (c) 1993 - 1996 by William M. Perry <wmperry@cs.indiana.edu>
5 4
6;; Author: Bill Perry <wmperry@gnu.org> 5;; Author: Bill Perry <wmperry@gnu.org>
7;; Keywords: comm, data, processes 6;; Keywords: comm, data, processes
diff --git a/lisp/url/url-vars.el b/lisp/url/url-vars.el
index 68076e7d3db..4328c34b6fa 100644
--- a/lisp/url/url-vars.el
+++ b/lisp/url/url-vars.el
@@ -2,8 +2,7 @@
2;; Keywords: comm, data, processes, hypermedia 2;; Keywords: comm, data, processes, hypermedia
3 3
4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
5;;; Copyright (c) 1993 - 1996 by William M. Perry <wmperry@cs.indiana.edu> 5;;; Copyright (c) 1996,1997,1998,1999,2001 Free Software Foundation, Inc.
6;;; Copyright (c) 1996, 97, 98, 99, 2001 Free Software Foundation, Inc.
7;;; 6;;;
8;;; This file is part of GNU Emacs. 7;;; This file is part of GNU Emacs.
9;;; 8;;;
diff --git a/lisp/url/url.el b/lisp/url/url.el
index 1f8f3c930ff..f7b1b717681 100644
--- a/lisp/url/url.el
+++ b/lisp/url/url.el
@@ -1,7 +1,6 @@
1;;; url.el --- Uniform Resource Locator retrieval tool 1;;; url.el --- Uniform Resource Locator retrieval tool
2 2
3;; Copyright (c) 1996,97,98,99,2001,2004 Free Software Foundation, Inc. 3;; Copyright (c) 1996,1997,1998,1999,2001,2004 Free Software Foundation, Inc.
4;; Copyright (c) 1993 - 1996 by William M. Perry <wmperry@cs.indiana.edu>
5 4
6;; Author: Bill Perry <wmperry@gnu.org> 5;; Author: Bill Perry <wmperry@gnu.org>
7;; Keywords: comm, data, processes, hypermedia 6;; Keywords: comm, data, processes, hypermedia
diff --git a/lisp/vc.el b/lisp/vc.el
index 663c45fd466..3f562905280 100644
--- a/lisp/vc.el
+++ b/lisp/vc.el
@@ -646,9 +646,6 @@ List of factors, used to expand/compress the time scale. See `vc-annotate'."
646 :group 'vc) 646 :group 'vc)
647 647
648;; vc-annotate functionality (CVS only). 648;; vc-annotate functionality (CVS only).
649(defvar vc-annotate-mode nil
650 "Variable indicating if VC-Annotate mode is active.")
651
652(defvar vc-annotate-mode-map 649(defvar vc-annotate-mode-map
653 (let ((m (make-sparse-keymap))) 650 (let ((m (make-sparse-keymap)))
654 (define-key m [menu-bar] (make-sparse-keymap "VC-Annotate")) 651 (define-key m [menu-bar] (make-sparse-keymap "VC-Annotate"))
@@ -3004,7 +3001,7 @@ use; you may override this using the second optional arg MODE."
3004 (when buffer 3001 (when buffer
3005 (set-buffer buffer) 3002 (set-buffer buffer)
3006 (display-buffer buffer)) 3003 (display-buffer buffer))
3007 (if (not vc-annotate-mode) ; Turn on vc-annotate-mode if not done 3004 (if (not vc-annotate-parent-ref)
3008 (vc-annotate-mode)) 3005 (vc-annotate-mode))
3009 (cond ((null vc-annotate-display-mode) 3006 (cond ((null vc-annotate-display-mode)
3010 (vc-annotate-display-default vc-annotate-ratio)) 3007 (vc-annotate-display-default vc-annotate-ratio))
diff --git a/man/ChangeLog b/man/ChangeLog
index 2a31de4ba34..c996722b444 100644
--- a/man/ChangeLog
+++ b/man/ChangeLog
@@ -1,3 +1,8 @@
12004-10-10 Juri Linkov <juri@jurta.org>
2
3 * gnus.texi (Top, Marking Articles): Join two menus in one node
4 because a node can have only one menu.
5
12004-10-09 Luc Teirlinck <teirllm@auburn.edu> 62004-10-09 Luc Teirlinck <teirllm@auburn.edu>
2 7
3 * files.texi (Misc File Ops): View mode is a minor mode. 8 * files.texi (Misc File Ops): View mode is a minor mode.
diff --git a/man/gnus.texi b/man/gnus.texi
index 576877cb861..a62e9bcf149 100644
--- a/man/gnus.texi
+++ b/man/gnus.texi
@@ -535,12 +535,9 @@ Marking Articles
535* Unread Articles:: Marks for unread articles. 535* Unread Articles:: Marks for unread articles.
536* Read Articles:: Marks for read articles. 536* Read Articles:: Marks for read articles.
537* Other Marks:: Marks that do not affect readedness. 537* Other Marks:: Marks that do not affect readedness.
538 538* Setting Marks:: How to set and remove marks.
539Marking Articles 539* Generic Marking Commands:: How to customize the marking.
540 540* Setting Process Marks:: How to mark articles for later processing.
541* Setting Marks:: How to set and remove marks.
542* Generic Marking Commands:: How to customize the marking.
543* Setting Process Marks:: How to mark articles for later processing.
544 541
545Threading 542Threading
546 543
@@ -5686,20 +5683,17 @@ neologism ohoy!) of the article. Alphabetic marks generally mean
5686 5683
5687In addition, you also have marks that do not affect readedness. 5684In addition, you also have marks that do not affect readedness.
5688 5685
5689@menu
5690* Unread Articles:: Marks for unread articles.
5691* Read Articles:: Marks for read articles.
5692* Other Marks:: Marks that do not affect readedness.
5693@end menu
5694
5695@ifinfo 5686@ifinfo
5696There's a plethora of commands for manipulating these marks: 5687There's a plethora of commands for manipulating these marks.
5697@end ifinfo 5688@end ifinfo
5698 5689
5699@menu 5690@menu
5700* Setting Marks:: How to set and remove marks. 5691* Unread Articles:: Marks for unread articles.
5701* Generic Marking Commands:: How to customize the marking. 5692* Read Articles:: Marks for read articles.
5702* Setting Process Marks:: How to mark articles for later processing. 5693* Other Marks:: Marks that do not affect readedness.
5694* Setting Marks:: How to set and remove marks.
5695* Generic Marking Commands:: How to customize the marking.
5696* Setting Process Marks:: How to mark articles for later processing.
5703@end menu 5697@end menu
5704 5698
5705 5699
diff --git a/man/sc.texi b/man/sc.texi
index 5e911e2df72..11ae3d139ce 100644
--- a/man/sc.texi
+++ b/man/sc.texi
@@ -1565,7 +1565,7 @@ incorrectly.
1565@vindex sc-use-only-preference-p 1565@vindex sc-use-only-preference-p
1566@vindex use-only-preference-p (sc-) 1566@vindex use-only-preference-p (sc-)
1567Also, if the preferred attribution, which you specified in your 1567Also, if the preferred attribution, which you specified in your
1568@code{sc-preferred-attribution-alist} variable cannot be found, a 1568@code{sc-preferred-attribution-list} variable cannot be found, a
1569secondary method can be employed to find a valid attribution string. The 1569secondary method can be employed to find a valid attribution string. The
1570variable @code{sc-use-only-preference-p} controls what happens in this 1570variable @code{sc-use-only-preference-p} controls what happens in this
1571case. If the variable's value is non-@code{nil}, then 1571case. If the variable's value is non-@code{nil}, then
diff --git a/src/ChangeLog b/src/ChangeLog
index 131586c4e8d..1a513d0194e 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,37 @@
12004-10-12 Kim F. Storm <storm@cua.dk>
2
3 * doc.c (Fsubstitute_command_keys): Ignore remappings unless there
4 are no ordinary bindings.
5
62004-10-11 Jan Dj,Ad(Brv <jan.h.d@swipnet.se>
7
8 * xfns.c (syms_of_xfns): defsubr x-file-dialog for GTK also.
9
102004-10-10 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
11
12 * macterm.c (x_raise_frame): Add BLOCK_INPUT around SelectWindow
13 (x_lower_frame): Add BLOCK_INPUT around SendBehind
14 (make_mac_frame): Add BLOCK_INPUT around the making of a
15 terminal frame
16 (mac_initialize): Add BLOCK_INPUT around carbon initialization
17 * macgui.h (mktime): Use emacs_mktime
18 * macfns.c (Fx_file_dialog): Add BLOCK_INPUT around more code.
19 Make a cancel file-open dialog be like C-g.
20 * mac.c (mktime): Use emacs_mktime
21 (Fdo_applescript): Add BLOCK_INPUT around do_applescript
22 (Fmac_paste_function): Add better error handling for carbon
23 cut/paste
24
252004-10-10 Kim F. Storm <storm@cua.dk>
26
27 * keyboard.c (timer_resume_idle): New function to resume idle
28 timer without resetting timers on the idle list.
29 (read_char): Use timer_resume_idle. Remove local var last_idle_start.
30 (timer_start_idle, timer_stop_idle): Declare static.
31 (read_key_sequence): Use timer_resume_idle instead of timer_start_idle.
32
33 * keyboard.h (timer_start_idle, timer_stop_idle): Remove prototypes.
34
12004-10-08 Steven Tamm <steventamm@mac.com> 352004-10-08 Steven Tamm <steventamm@mac.com>
2 36
3 * config.in (HAVE_MALLOC_MALLOC_H): Regenerate 37 * config.in (HAVE_MALLOC_MALLOC_H): Regenerate
diff --git a/src/doc.c b/src/doc.c
index 120d35767b2..e6914d24038 100644
--- a/src/doc.c
+++ b/src/doc.c
@@ -776,9 +776,13 @@ thus, \\=\\=\\=\\= puts \\=\\= into the output, and \\=\\=\\=\\[ puts \\=\\[ int
776 idx = strp - SDATA (string); 776 idx = strp - SDATA (string);
777 tem = Fintern (make_string (start, length_byte), Qnil); 777 tem = Fintern (make_string (start, length_byte), Qnil);
778 778
779 /* Ignore remappings unless there are no ordinary bindings. */
780 tem = Fwhere_is_internal (tem, keymap, Qt, Qnil, Qt);
781 if (NILP (tem))
782 tem = Fwhere_is_internal (tem, keymap, Qt, Qnil, Qnil);
783
779 /* Note the Fwhere_is_internal can GC, so we have to take 784 /* Note the Fwhere_is_internal can GC, so we have to take
780 relocation of string contents into account. */ 785 relocation of string contents into account. */
781 tem = Fwhere_is_internal (tem, keymap, Qt, Qnil, Qnil);
782 strp = SDATA (string) + idx; 786 strp = SDATA (string) + idx;
783 start = SDATA (string) + start_idx; 787 start = SDATA (string) + start_idx;
784 788
diff --git a/src/keyboard.c b/src/keyboard.c
index 940802764d2..475479b66a3 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -665,6 +665,9 @@ static void clear_event P_ ((struct input_event *));
665static void any_kboard_state P_ ((void)); 665static void any_kboard_state P_ ((void));
666static SIGTYPE interrupt_signal P_ ((int signalnum)); 666static SIGTYPE interrupt_signal P_ ((int signalnum));
667static void handle_interrupt P_ ((void)); 667static void handle_interrupt P_ ((void));
668static void timer_start_idle P_ ((void));
669static void timer_stop_idle P_ ((void));
670static void timer_resume_idle P_ ((void));
668 671
669/* Nonzero means don't try to suspend even if the operating system seems 672/* Nonzero means don't try to suspend even if the operating system seems
670 to support it. */ 673 to support it. */
@@ -2383,7 +2386,6 @@ read_char (commandflag, nmaps, maps, prev_event, used_mouse_menu)
2383 volatile Lisp_Object also_record; 2386 volatile Lisp_Object also_record;
2384 volatile int reread; 2387 volatile int reread;
2385 struct gcpro gcpro1, gcpro2; 2388 struct gcpro gcpro1, gcpro2;
2386 EMACS_TIME last_idle_start;
2387 int polling_stopped_here = 0; 2389 int polling_stopped_here = 0;
2388 2390
2389 also_record = Qnil; 2391 also_record = Qnil;
@@ -2890,9 +2892,6 @@ read_char (commandflag, nmaps, maps, prev_event, used_mouse_menu)
2890 2892
2891 non_reread: 2893 non_reread:
2892 2894
2893 /* Record the last idle start time so that we can reset it
2894 should the next event read be a help-echo. */
2895 last_idle_start = timer_idleness_start_time;
2896 timer_stop_idle (); 2895 timer_stop_idle ();
2897 RESUME_POLLING; 2896 RESUME_POLLING;
2898 2897
@@ -2932,7 +2931,7 @@ read_char (commandflag, nmaps, maps, prev_event, used_mouse_menu)
2932 prevents automatic window selection (under 2931 prevents automatic window selection (under
2933 mouse_autoselect_window from acting as a real input event, for 2932 mouse_autoselect_window from acting as a real input event, for
2934 example banishing the mouse under mouse-avoidance-mode. */ 2933 example banishing the mouse under mouse-avoidance-mode. */
2935 timer_idleness_start_time = last_idle_start; 2934 timer_resume_idle ();
2936 2935
2937 /* Resume allowing input from any kboard, if that was true before. */ 2936 /* Resume allowing input from any kboard, if that was true before. */
2938 if (!was_locked) 2937 if (!was_locked)
@@ -3131,7 +3130,7 @@ read_char (commandflag, nmaps, maps, prev_event, used_mouse_menu)
3131 show_help_echo (help, window, object, position, 0); 3130 show_help_echo (help, window, object, position, 0);
3132 3131
3133 /* We stopped being idle for this event; undo that. */ 3132 /* We stopped being idle for this event; undo that. */
3134 timer_idleness_start_time = last_idle_start; 3133 timer_resume_idle ();
3135 goto retry; 3134 goto retry;
3136 } 3135 }
3137 3136
@@ -4252,7 +4251,7 @@ swallow_events (do_display)
4252/* Record the start of when Emacs is idle, 4251/* Record the start of when Emacs is idle,
4253 for the sake of running idle-time timers. */ 4252 for the sake of running idle-time timers. */
4254 4253
4255void 4254static void
4256timer_start_idle () 4255timer_start_idle ()
4257{ 4256{
4258 Lisp_Object timers; 4257 Lisp_Object timers;
@@ -4280,12 +4279,23 @@ timer_start_idle ()
4280 4279
4281/* Record that Emacs is no longer idle, so stop running idle-time timers. */ 4280/* Record that Emacs is no longer idle, so stop running idle-time timers. */
4282 4281
4283void 4282static void
4284timer_stop_idle () 4283timer_stop_idle ()
4285{ 4284{
4286 EMACS_SET_SECS_USECS (timer_idleness_start_time, -1, -1); 4285 EMACS_SET_SECS_USECS (timer_idleness_start_time, -1, -1);
4287} 4286}
4288 4287
4288/* Resume idle timer from last idle start time. */
4289
4290static void
4291timer_resume_idle ()
4292{
4293 if (! EMACS_TIME_NEG_P (timer_idleness_start_time))
4294 return;
4295
4296 timer_idleness_start_time = timer_last_idleness_start_time;
4297}
4298
4289/* This is only for debugging. */ 4299/* This is only for debugging. */
4290struct input_event last_timer_event; 4300struct input_event last_timer_event;
4291 4301
@@ -8918,14 +8928,7 @@ read_key_sequence (keybuf, bufsize, prompt, dont_downcase_last,
8918 keymap may have changed, so replay the sequence. */ 8928 keymap may have changed, so replay the sequence. */
8919 if (BUFFERP (key)) 8929 if (BUFFERP (key))
8920 { 8930 {
8921 EMACS_TIME initial_idleness_start_time; 8931 timer_resume_idle ();
8922 EMACS_SET_SECS_USECS (initial_idleness_start_time,
8923 EMACS_SECS (timer_last_idleness_start_time),
8924 EMACS_USECS (timer_last_idleness_start_time));
8925
8926 /* Resume idle state, using the same start-time as before. */
8927 timer_start_idle ();
8928 timer_idleness_start_time = initial_idleness_start_time;
8929 8932
8930 mock_input = t; 8933 mock_input = t;
8931 /* Reset the current buffer from the selected window 8934 /* Reset the current buffer from the selected window
diff --git a/src/keyboard.h b/src/keyboard.h
index c079994ca9a..3039f028bbb 100644
--- a/src/keyboard.h
+++ b/src/keyboard.h
@@ -326,8 +326,6 @@ extern void swallow_events P_ ((int));
326extern int help_char_p P_ ((Lisp_Object)); 326extern int help_char_p P_ ((Lisp_Object));
327extern void quit_throw_to_read_char P_ ((void)) NO_RETURN; 327extern void quit_throw_to_read_char P_ ((void)) NO_RETURN;
328extern void cmd_error_internal P_ ((Lisp_Object, char *)); 328extern void cmd_error_internal P_ ((Lisp_Object, char *));
329extern void timer_start_idle P_ ((void));
330extern void timer_stop_idle P_ ((void));
331extern int lucid_event_type_list_p P_ ((Lisp_Object)); 329extern int lucid_event_type_list_p P_ ((Lisp_Object));
332extern void kbd_buffer_store_event P_ ((struct input_event *)); 330extern void kbd_buffer_store_event P_ ((struct input_event *));
333extern void kbd_buffer_store_event_hold P_ ((struct input_event *, 331extern void kbd_buffer_store_event_hold P_ ((struct input_event *,
diff --git a/src/mac.c b/src/mac.c
index f7e96b9c146..91d07372578 100644
--- a/src/mac.c
+++ b/src/mac.c
@@ -47,6 +47,8 @@ Boston, MA 02111-1307, USA. */
47#undef realloc 47#undef realloc
48#undef init_process 48#undef init_process
49#include <Carbon/Carbon.h> 49#include <Carbon/Carbon.h>
50#undef mktime
51#define mktime emacs_mktime
50#undef free 52#undef free
51#define free unexec_free 53#define free unexec_free
52#undef malloc 54#undef malloc
@@ -73,6 +75,7 @@ Boston, MA 02111-1307, USA. */
73#include "process.h" 75#include "process.h"
74#include "sysselect.h" 76#include "sysselect.h"
75#include "systime.h" 77#include "systime.h"
78#include "blockinput.h"
76 79
77Lisp_Object QCLIPBOARD; 80Lisp_Object QCLIPBOARD;
78 81
@@ -2548,7 +2551,9 @@ component. */)
2548 2551
2549 CHECK_STRING (script); 2552 CHECK_STRING (script);
2550 2553
2554 BLOCK_INPUT;
2551 status = do_applescript (SDATA (script), &result); 2555 status = do_applescript (SDATA (script), &result);
2556 UNBLOCK_INPUT;
2552 if (status) 2557 if (status)
2553 { 2558 {
2554 if (!result) 2559 if (!result)
@@ -2618,26 +2623,23 @@ DEFUN ("mac-paste-function", Fmac_paste_function, Smac_paste_function, 0, 0, 0,
2618 () 2623 ()
2619{ 2624{
2620#if TARGET_API_MAC_CARBON 2625#if TARGET_API_MAC_CARBON
2626 OSStatus err;
2621 ScrapRef scrap; 2627 ScrapRef scrap;
2622 ScrapFlavorFlags sff; 2628 ScrapFlavorFlags sff;
2623 Size s; 2629 Size s;
2624 int i; 2630 int i;
2625 char *data; 2631 char *data;
2626 2632
2627 if (GetCurrentScrap (&scrap) != noErr) 2633 BLOCK_INPUT;
2628 return Qnil; 2634 err = GetCurrentScrap (&scrap);
2629 2635 if (err == noErr)
2630 if (GetScrapFlavorFlags (scrap, kScrapFlavorTypeText, &sff) != noErr) 2636 err = GetScrapFlavorFlags (scrap, kScrapFlavorTypeText, &sff);
2631 return Qnil; 2637 if (err == noErr)
2632 2638 err = GetScrapFlavorSize (scrap, kScrapFlavorTypeText, &s);
2633 if (GetScrapFlavorSize (scrap, kScrapFlavorTypeText, &s) != noErr) 2639 if (err == noErr && (data = (char*) alloca (s)))
2634 return Qnil; 2640 err = GetScrapFlavorData (scrap, kScrapFlavorTypeText, &s, data);
2635 2641 UNBLOCK_INPUT;
2636 if ((data = (char*) alloca (s)) == NULL) 2642 if (err != noErr || s == 0)
2637 return Qnil;
2638
2639 if (GetScrapFlavorData (scrap, kScrapFlavorTypeText, &s, data) != noErr
2640 || s == 0)
2641 return Qnil; 2643 return Qnil;
2642 2644
2643 /* Emacs expects clipboard contents have Unix-style eol's */ 2645 /* Emacs expects clipboard contents have Unix-style eol's */
@@ -2702,13 +2704,22 @@ DEFUN ("mac-cut-function", Fmac_cut_function, Smac_cut_function, 1, 2, 0,
2702#if TARGET_API_MAC_CARBON 2704#if TARGET_API_MAC_CARBON
2703 { 2705 {
2704 ScrapRef scrap; 2706 ScrapRef scrap;
2707
2708 BLOCK_INPUT;
2705 ClearCurrentScrap (); 2709 ClearCurrentScrap ();
2706 if (GetCurrentScrap (&scrap) != noErr) 2710 if (GetCurrentScrap (&scrap) != noErr)
2707 error ("cannot get current scrap"); 2711 {
2712 UNBLOCK_INPUT;
2713 error ("cannot get current scrap");
2714 }
2708 2715
2709 if (PutScrapFlavor (scrap, kScrapFlavorTypeText, kScrapFlavorMaskNone, len, 2716 if (PutScrapFlavor (scrap, kScrapFlavorTypeText, kScrapFlavorMaskNone, len,
2710 buf) != noErr) 2717 buf) != noErr)
2711 error ("cannot put to scrap"); 2718 {
2719 UNBLOCK_INPUT;
2720 error ("cannot put to scrap");
2721 }
2722 UNBLOCK_INPUT;
2712 } 2723 }
2713#else /* not TARGET_API_MAC_CARBON */ 2724#else /* not TARGET_API_MAC_CARBON */
2714 ZeroScrap (); 2725 ZeroScrap ();
@@ -2743,9 +2754,11 @@ and t is the same as `SECONDARY'. */)
2743 ScrapRef scrap; 2754 ScrapRef scrap;
2744 ScrapFlavorFlags sff; 2755 ScrapFlavorFlags sff;
2745 2756
2757 BLOCK_INPUT;
2746 if (GetCurrentScrap (&scrap) == noErr) 2758 if (GetCurrentScrap (&scrap) == noErr)
2747 if (GetScrapFlavorFlags (scrap, kScrapFlavorTypeText, &sff) == noErr) 2759 if (GetScrapFlavorFlags (scrap, kScrapFlavorTypeText, &sff) == noErr)
2748 val = Qt; 2760 val = Qt;
2761 UNBLOCK_INPUT;
2749#else /* not TARGET_API_MAC_CARBON */ 2762#else /* not TARGET_API_MAC_CARBON */
2750 Handle my_handle; 2763 Handle my_handle;
2751 long rc, scrap_offset; 2764 long rc, scrap_offset;
@@ -2770,8 +2783,6 @@ and t is the same as `SECONDARY'. */)
2770extern int inhibit_window_system; 2783extern int inhibit_window_system;
2771extern int noninteractive; 2784extern int noninteractive;
2772 2785
2773#include "blockinput.h"
2774
2775/* When Emacs is started from the Finder, SELECT always immediately 2786/* When Emacs is started from the Finder, SELECT always immediately
2776 returns as if input is present when file descriptor 0 is polled for 2787 returns as if input is present when file descriptor 0 is polled for
2777 input. Strangely, when Emacs is run as a GUI application from the 2788 input. Strangely, when Emacs is run as a GUI application from the
diff --git a/src/macfns.c b/src/macfns.c
index f7594e9c6c2..88f975a65c8 100644
--- a/src/macfns.c
+++ b/src/macfns.c
@@ -4247,6 +4247,7 @@ specified. Ensure that file exists if MUSTMATCH is non-nil. */)
4247 NavUserAction userAction; 4247 NavUserAction userAction;
4248 CFStringRef message=NULL, client=NULL, saveName = NULL; 4248 CFStringRef message=NULL, client=NULL, saveName = NULL;
4249 4249
4250 BLOCK_INPUT;
4250 /* No need for a callback function because we are modal */ 4251 /* No need for a callback function because we are modal */
4251 NavGetDefaultDialogCreationOptions(&options); 4252 NavGetDefaultDialogCreationOptions(&options);
4252 options.modality = kWindowModalityAppModal; 4253 options.modality = kWindowModalityAppModal;
@@ -4317,9 +4318,7 @@ specified. Ensure that file exists if MUSTMATCH is non-nil. */)
4317 AEDisposeDesc(&defLocAed); 4318 AEDisposeDesc(&defLocAed);
4318 } 4319 }
4319 4320
4320 BLOCK_INPUT;
4321 status = NavDialogRun(dialogRef); 4321 status = NavDialogRun(dialogRef);
4322 UNBLOCK_INPUT;
4323 } 4322 }
4324 4323
4325 if (saveName) CFRelease(saveName); 4324 if (saveName) CFRelease(saveName);
@@ -4332,9 +4331,7 @@ specified. Ensure that file exists if MUSTMATCH is non-nil. */)
4332 { 4331 {
4333 case kNavUserActionNone: 4332 case kNavUserActionNone:
4334 case kNavUserActionCancel: 4333 case kNavUserActionCancel:
4335 NavDialogDispose(dialogRef); 4334 break; /* Treat cancel like C-g */
4336 Fsignal (Qquit, Qnil); /* Treat cancel like C-g */
4337 return;
4338 case kNavUserActionOpen: 4335 case kNavUserActionOpen:
4339 case kNavUserActionChoose: 4336 case kNavUserActionChoose:
4340 case kNavUserActionSaveAs: 4337 case kNavUserActionSaveAs:
@@ -4369,6 +4366,7 @@ specified. Ensure that file exists if MUSTMATCH is non-nil. */)
4369 dir, mustmatch, dir, Qfile_name_history, 4366 dir, mustmatch, dir, Qfile_name_history,
4370 default_filename, Qnil); 4367 default_filename, Qnil);
4371 } 4368 }
4369 UNBLOCK_INPUT;
4372 } 4370 }
4373 4371
4374 UNGCPRO; 4372 UNGCPRO;
diff --git a/src/macgui.h b/src/macgui.h
index 58081df52b4..e5ea665ac15 100644
--- a/src/macgui.h
+++ b/src/macgui.h
@@ -42,6 +42,8 @@ typedef unsigned long Time;
42#undef min 42#undef min
43#undef init_process 43#undef init_process
44#include <Carbon/Carbon.h> 44#include <Carbon/Carbon.h>
45#undef mktime
46#define mktime emacs_mktime
45#undef Z 47#undef Z
46#define Z (current_buffer->text->z) 48#define Z (current_buffer->text->z)
47#undef free 49#undef free
diff --git a/src/macterm.c b/src/macterm.c
index b7ebaea0990..f62bbbc0d84 100644
--- a/src/macterm.c
+++ b/src/macterm.c
@@ -5317,7 +5317,11 @@ x_raise_frame (f)
5317 struct frame *f; 5317 struct frame *f;
5318{ 5318{
5319 if (f->async_visible) 5319 if (f->async_visible)
5320 SelectWindow (FRAME_MAC_WINDOW (f)); 5320 {
5321 BLOCK_INPUT;
5322 SelectWindow (FRAME_MAC_WINDOW (f));
5323 UNBLOCK_INPUT;
5324 }
5321} 5325}
5322 5326
5323/* Lower frame F. */ 5327/* Lower frame F. */
@@ -5326,7 +5330,11 @@ x_lower_frame (f)
5326 struct frame *f; 5330 struct frame *f;
5327{ 5331{
5328 if (f->async_visible) 5332 if (f->async_visible)
5329 SendBehind (FRAME_MAC_WINDOW (f), nil); 5333 {
5334 BLOCK_INPUT;
5335 SendBehind (FRAME_MAC_WINDOW (f), nil);
5336 UNBLOCK_INPUT;
5337 }
5330} 5338}
5331 5339
5332static void 5340static void
@@ -8757,6 +8765,7 @@ make_mac_frame (FRAME_PTR fp)
8757 8765
8758 mwp = fp->output_data.mac; 8766 mwp = fp->output_data.mac;
8759 8767
8768 BLOCK_INPUT;
8760 if (making_terminal_window) 8769 if (making_terminal_window)
8761 { 8770 {
8762 if (!(mwp->mWP = GetNewCWindow (TERM_WINDOW_RESOURCE, NULL, 8771 if (!(mwp->mWP = GetNewCWindow (TERM_WINDOW_RESOURCE, NULL,
@@ -8784,9 +8793,8 @@ make_mac_frame (FRAME_PTR fp)
8784 /* so that update events can find this mac_output struct */ 8793 /* so that update events can find this mac_output struct */
8785 mwp->mFP = fp; /* point back to emacs frame */ 8794 mwp->mFP = fp; /* point back to emacs frame */
8786 8795
8787 SetPortWindowPort (mwp->mWP);
8788
8789 SizeWindow (mwp->mWP, FRAME_PIXEL_WIDTH (fp), FRAME_PIXEL_HEIGHT (fp), false); 8796 SizeWindow (mwp->mWP, FRAME_PIXEL_WIDTH (fp), FRAME_PIXEL_HEIGHT (fp), false);
8797 UNBLOCK_INPUT;
8790} 8798}
8791 8799
8792 8800
@@ -9210,6 +9218,7 @@ mac_initialize ()
9210 signal (SIGPIPE, x_connection_signal); 9218 signal (SIGPIPE, x_connection_signal);
9211#endif 9219#endif
9212 9220
9221 BLOCK_INPUT;
9213 mac_initialize_display_info (); 9222 mac_initialize_display_info ();
9214 9223
9215#if TARGET_API_MAC_CARBON 9224#if TARGET_API_MAC_CARBON
@@ -9228,6 +9237,7 @@ mac_initialize ()
9228 if (!inhibit_window_system) 9237 if (!inhibit_window_system)
9229 MakeMeTheFrontProcess (); 9238 MakeMeTheFrontProcess ();
9230#endif 9239#endif
9240 UNBLOCK_INPUT;
9231} 9241}
9232 9242
9233 9243
diff --git a/src/xfns.c b/src/xfns.c
index 9e9a85749a1..115a5aeb3c5 100644
--- a/src/xfns.c
+++ b/src/xfns.c
@@ -5590,7 +5590,7 @@ Chinese, Japanese, and Korean. */);
5590 last_show_tip_args = Qnil; 5590 last_show_tip_args = Qnil;
5591 staticpro (&last_show_tip_args); 5591 staticpro (&last_show_tip_args);
5592 5592
5593#ifdef USE_MOTIF 5593#if defined (USE_MOTIF) || defined (USE_GTK)
5594 defsubr (&Sx_file_dialog); 5594 defsubr (&Sx_file_dialog);
5595#endif 5595#endif
5596} 5596}