aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaroly Lorentey2004-03-28 06:08:38 +0000
committerKaroly Lorentey2004-03-28 06:08:38 +0000
commitbe8e0e977a411c16f5d2f3ccf28b4818dab2d88d (patch)
treeebfd8ab5dfe95a4c5980cb5f26043511bfbbeabe
parent026ad6ba8148d468a0a61a1c863a63ef58054e50 (diff)
parent692feebddfe2c4b0c9b48e7ea31a1362daf071a4 (diff)
downloademacs-be8e0e977a411c16f5d2f3ccf28b4818dab2d88d.tar.gz
emacs-be8e0e977a411c16f5d2f3ccf28b4818dab2d88d.zip
Merged in changes from CVS HEAD
Patches applied: * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-173 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-174 Update from CVS git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-125
-rw-r--r--etc/NEWS5
-rw-r--r--lisp/ChangeLog110
-rw-r--r--lisp/apropos.el88
-rw-r--r--lisp/autorevert.el25
-rw-r--r--lisp/bs.el10
-rw-r--r--lisp/buff-menu.el113
-rw-r--r--lisp/calc/calc-ext.el3
-rw-r--r--lisp/calc/calc.el19
-rw-r--r--lisp/cvs-status.el4
-rw-r--r--lisp/dabbrev.el16
-rw-r--r--lisp/dired.el21
-rw-r--r--lisp/ediff-init.el7
-rw-r--r--lisp/electric.el6
-rw-r--r--lisp/emacs-lisp/rx.el6
-rw-r--r--lisp/eshell/em-alias.el4
-rw-r--r--lisp/eshell/em-banner.el2
-rw-r--r--lisp/eshell/em-smart.el2
-rw-r--r--lisp/eshell/esh-cmd.el2
-rw-r--r--lisp/eshell/eshell.el2
-rw-r--r--lisp/faces.el30
-rw-r--r--lisp/files.el35
-rw-r--r--lisp/finder.el29
-rw-r--r--lisp/gnus/ChangeLog4
-rw-r--r--lisp/gnus/gnus-srvr.el2
-rw-r--r--lisp/progmodes/cperl-mode.el324
-rw-r--r--lisp/ses.el23
-rw-r--r--lisp/strokes.el36
-rw-r--r--lisp/subr.el23
-rw-r--r--lisp/vc-hooks.el26
-rw-r--r--lisp/vc.el17
-rw-r--r--lisp/woman.el10
-rw-r--r--src/ChangeLog21
-rw-r--r--src/xdisp.c42
33 files changed, 622 insertions, 445 deletions
diff --git a/etc/NEWS b/etc/NEWS
index 223f9657583..791e75f1ea2 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -104,6 +104,11 @@ can be saved and will again be loaded with the new `grep-mode'.
104 104
105** M-x diff uses diff-mode instead of compilation-mode. 105** M-x diff uses diff-mode instead of compilation-mode.
106 106
107** New command `strokes-global-set-stroke-string'.
108This is like `strokes-global-set-stroke', but it allows you to bind
109the stroke directly to a string to insert. This is convenient for
110using strokes as an input method.
111
107--- 112---
108** The saveplace.el package now filters out unreadable files. 113** The saveplace.el package now filters out unreadable files.
109When you exit Emacs, the saved positions in visited files no longer 114When you exit Emacs, the saved positions in visited files no longer
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 89a18361ddd..ab3ac98ea9d 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,15 +1,111 @@
12004-03-27 Francis J. Wright <F.J.Wright@qmul.ac.uk>
2
3 * woman.el (woman-change-fonts): Rename local variable
4 woman-font-alist to font-alist to avoid a compiler warning.
5
62004-03-27 Dave Love <fx@gnu.org>
7
8 * emacs-lisp/rx.el (rx): Doc fix.
9 Fix copyright years.
10
11 * strokes.el (strokes-global-set-stroke-string): New function.
12 (strokes-list-strokes): Cope with strings, not just commands. Set
13 foreground colour of image.
14 (strokes-global-set-stroke): Doc fix.
15
162004-03-26 Luc Teirlinck <teirllm@auburn.edu>
17
18 * buff-menu.el (Buffer-menu-revert-function): Make it suitable for
19 Auto Revert mode.
20 (Buffer-menu-files-only): New variable.
21 (Buffer-menu-toggle-files-only): New function.
22 (Buffer-menu-mode-map): Bind it to `T'.
23 (Buffer-menu-mode): Mention `T' in docstring.
24 Set buffer-stale-function.
25 (list-buffers-noselect): Mark buffer non-modified and set
26 Buffer-menu-files-only.
27
28 * dired.el (buffer-stale-function): Remove no longer needed defvar.
29
30 * autorevert.el (auto-revert-handler): Print revert message
31 before, rather than after, reverting.
32 (buffer-stale-function): Move to files.el.
33
34 * files.el (buffer-stale-function): Moved here from autorevert.el.
35
362004-03-26 Stefan Monnier <monnier@iro.umontreal.ca>
37
38 * vc.el (vc-maybe-resolve-conflicts): Don't prompt the user.
39
40 * calc/calc.el (calc-mode-map): Use mapc.
41
42 * apropos.el (apropos-mode): Don't autoload.
43 (apropos-symbols-internal): New fun. Extracted from `apropos'.
44 (apropos): Use it.
45 (apropos-print): Add optional `text' argument.
46 (apropos-describe-plist): Use help-buffer and hexlp-setup-xref.
47 Don't assume point-min == 1.
48
49 * bs.el (bs-buffer-list): Use buffer-local-value.
50 (bs--set-toggle-to-show): Use with-current-buffer.
51
52 * buff-menu.el (Buffer-menu-sort, Buffer-menu-make-sort-button):
53 New funs.
54 (list-buffers-noselect): Use them. Adjust :align-to to new style.
55
56 * cvs-status.el (cvs-tree-use-jisx0208): Use char-displayable-p.
57
58 * dabbrev.el (dabbrev-expand): Fix regexp construction.
59 (dabbrev--find-expansion): Use pop.
60 (dabbrev--search): Use match-string-no-properties.
61
62 * dired.el (dired-mode): Use run-mode-hooks.
63 (dired-move-to-end-of-filename): Use match-string.
64
65 * ediff-init.el (ediff-hide-face): Check that facemenu-unlisted-faces
66 is bound before using it.
67 (ediff-verbose-p): Make it into a var since it's not constant.
68
69 * electric.el (Electric-pop-up-window): Avoid popping up a new frame.
70
71 * faces.el (read-face-font): Don't cons up unnecessarily.
72 (header-line, tool-bar): Share common parts.
73
74 * files.el (file-relative-name): Use compare-strings.
75
76 * finder.el (finder-mode): Follow coding convention.
77
78 * subr.el (read-number): New function.
79
80 * ses.el (ses-read-number): Move to subr.el.
81 (ses-set-header-row): Use read-number.
82
832004-03-26 Andre Spiegel <spiegel@gnu.org>
84
85 * vc-hooks.el (vc-arg-list): New function, which handles both
86 compiled and uncompiled code.
87 (vc-default-workfile-unchanged-p): Use it.
88
89 * vc.el (vc-print-log): Undo prev change, use new function
90 vc-arg-list from vc-hooks.el.
91
12004-03-26 Masatake YAMATO <jet@gyve.org> 922004-03-26 Masatake YAMATO <jet@gyve.org>
2 93
3 * simple.el (completion-setup-function): Emphasize the 94 * simple.el (completion-setup-function): Emphasize the
4 first uncommon characters in the completions;and de-emphasize 95 first uncommon characters in the completions; and de-emphasize
5 the common prefix substrings. 96 the common prefix substrings.
6 (completion-emphasis): New face. 97 (completion-emphasis): New face.
7 (completion-de-emphasis): New face. 98 (completion-de-emphasis): New face.
8 99
1002004-03-25 Juanma Barranquero <lektu@terra.es>
101
102 * progmodes/cperl-mode.el (cperl-indent-alist, cperl-where-am-i):
103 Comment out (it's unused and unfinished code).
104
92004-03-25 Sam Steingold <sds@gnu.org> 1052004-03-25 Sam Steingold <sds@gnu.org>
10 106
11 * vc.el (vc-print-log): Fixed a bug in the last patch: 107 * vc.el (vc-print-log): Fix a bug in the last patch:
12 backend-function may be a byte-compiled object, not a lambda 108 backend-function may be a byte-compiled object, not a lambda.
13 109
142004-03-25 Juri Linkov <juri@jurta.org> 1102004-03-25 Juri Linkov <juri@jurta.org>
15 111
@@ -28,6 +124,14 @@
28 * jit-lock.el (jit-lock): Remove links to removed Support Modes 124 * jit-lock.el (jit-lock): Remove links to removed Support Modes
29 Info node. 125 Info node.
30 126
127 * eshell/eshell.el (eshell): Fix broken info-link.
128
129 * eshell/em-alias.el (eshell-alias, eshell-bad-command-tolerance):
130 * eshell/em-banner.el (eshell-banner):
131 * eshell/em-smart.el (eshell-smart):
132 * eshell/esh-cmd.el (eshell-cmd):
133 Comment out broken info-links to incomplete Info manual.
134
31 * info-xref.el: Fix commentary. 135 * info-xref.el: Fix commentary.
32 136
332004-03-25 Kevin Ryde <user42@zip.com.au> 1372004-03-25 Kevin Ryde <user42@zip.com.au>
diff --git a/lisp/apropos.el b/lisp/apropos.el
index 9750683fd85..e5904e73b71 100644
--- a/lisp/apropos.el
+++ b/lisp/apropos.el
@@ -1,6 +1,6 @@
1;;; apropos.el --- apropos commands for users and programmers 1;;; apropos.el --- apropos commands for users and programmers
2 2
3;; Copyright (C) 1989, 1994, 1995, 2001, 2002, 2003 Free Software Foundation, Inc. 3;; Copyright (C) 1989,94,1995,2001,02,03,2004 Free Software Foundation, Inc.
4 4
5;; Author: Joe Wells <jbw@bigbird.bu.edu> 5;; Author: Joe Wells <jbw@bigbird.bu.edu>
6;; Rewritten: Daniel Pfeiffer <occitan@esperanto.org> 6;; Rewritten: Daniel Pfeiffer <occitan@esperanto.org>
@@ -58,6 +58,7 @@
58;;; Code: 58;;; Code:
59 59
60(require 'button) 60(require 'button)
61(eval-when-compile (require 'cl))
61 62
62(defgroup apropos nil 63(defgroup apropos nil
63 "Apropos commands for users and programmers" 64 "Apropos commands for users and programmers"
@@ -348,7 +349,6 @@ This requires that at least 2 keywords (unless only one was given)."
348 "Return t if DOC is really matched by the current keywords." 349 "Return t if DOC is really matched by the current keywords."
349 (apropos-true-hit doc apropos-all-words)) 350 (apropos-true-hit doc apropos-all-words))
350 351
351;;;###autoload
352(define-derived-mode apropos-mode fundamental-mode "Apropos" 352(define-derived-mode apropos-mode fundamental-mode "Apropos"
353 "Major mode for following hyperlinks in output of apropos commands. 353 "Major mode for following hyperlinks in output of apropos commands.
354 354
@@ -452,37 +452,42 @@ show unbound symbols and key bindings, which is a little more
452time-consuming. Returns list of symbols and documentation found." 452time-consuming. Returns list of symbols and documentation found."
453 (interactive "sApropos symbol (regexp or words): \nP") 453 (interactive "sApropos symbol (regexp or words): \nP")
454 (setq apropos-regexp (apropos-rewrite-regexp apropos-regexp)) 454 (setq apropos-regexp (apropos-rewrite-regexp apropos-regexp))
455 (setq apropos-accumulator 455 (apropos-symbols-internal
456 (apropos-internal apropos-regexp 456 (apropos-internal apropos-regexp
457 (and (not do-all) 457 (and (not do-all)
458 (not apropos-do-all) 458 (not apropos-do-all)
459 (lambda (symbol) 459 (lambda (symbol)
460 (or (fboundp symbol) 460 (or (fboundp symbol)
461 (boundp symbol) 461 (boundp symbol)
462 (facep symbol) 462 (facep symbol)
463 (symbol-plist symbol)))))) 463 (symbol-plist symbol)))))
464 (let ((tem apropos-accumulator)) 464 (or do-all apropos-do-all)))
465 (while tem 465
466 (if (get (car tem) 'apropos-inhibit) 466(defun apropos-symbols-internal (symbols keys &optional text)
467 (setq apropos-accumulator (delq (car tem) apropos-accumulator))) 467 ;; Filter out entries that are marked as apropos-inhibit.
468 (setq tem (cdr tem)))) 468 (let ((all nil))
469 (let ((p apropos-accumulator) 469 (dolist (symbol symbols)
470 symbol doc properties) 470 (unless (get symbol 'apropos-inhibit)
471 (while p 471 (push symbol all)))
472 (setcar p (list 472 (setq symbols all))
473 (setq symbol (car p)) 473 (let ((apropos-accumulator
474 (apropos-score-symbol symbol) 474 (mapcar
475 (when (fboundp symbol) 475 (lambda (symbol)
476 (if (setq doc (condition-case nil 476 (let (doc properties)
477 (documentation symbol t) 477 (list
478 (void-function 478 symbol
479 "(alias for undefined function)") 479 (apropos-score-symbol symbol)
480 (error 480 (when (fboundp symbol)
481 "(error retrieving function documentation)"))) 481 (if (setq doc (condition-case nil
482 (substring doc 0 (string-match "\n" doc)) 482 (documentation symbol t)
483 "(not documented)")) 483 (void-function
484 (when (boundp symbol) 484 "(alias for undefined function)")
485 (apropos-documentation-property 485 (error
486 "(can't retrieve function documentation)")))
487 (substring doc 0 (string-match "\n" doc))
488 "(not documented)"))
489 (when (boundp symbol)
490 (apropos-documentation-property
486 symbol 'variable-documentation t)) 491 symbol 'variable-documentation t))
487 (when (setq properties (symbol-plist symbol)) 492 (when (setq properties (symbol-plist symbol))
488 (setq doc (list (car properties))) 493 (setq doc (list (car properties)))
@@ -492,16 +497,14 @@ time-consuming. Returns list of symbols and documentation found."
492 (when (get symbol 'widget-type) 497 (when (get symbol 'widget-type)
493 (apropos-documentation-property 498 (apropos-documentation-property
494 symbol 'widget-documentation t)) 499 symbol 'widget-documentation t))
495 (when (facep symbol) 500 (when (facep symbol)
496 (apropos-documentation-property 501 (apropos-documentation-property
497 symbol 'face-documentation t)) 502 symbol 'face-documentation t))
498 (when (get symbol 'custom-group) 503 (when (get symbol 'custom-group)
499 (apropos-documentation-property 504 (apropos-documentation-property
500 symbol 'group-documentation t)))) 505 symbol 'group-documentation t)))))
501 (setq p (cdr p)))) 506 symbols)))
502 (apropos-print 507 (apropos-print keys nil text)))
503 (or do-all apropos-do-all)
504 nil))
505 508
506 509
507;;;###autoload 510;;;###autoload
@@ -755,7 +758,7 @@ Will return nil instead."
755 function)) 758 function))
756 759
757 760
758(defun apropos-print (do-keys spacing) 761(defun apropos-print (do-keys spacing &optional text)
759 "Output result of apropos searching into buffer `*Apropos*'. 762 "Output result of apropos searching into buffer `*Apropos*'.
760The value of `apropos-accumulator' is the list of items to output. 763The value of `apropos-accumulator' is the list of items to output.
761Each element should have the format 764Each element should have the format
@@ -764,8 +767,8 @@ The return value is the list that was in `apropos-accumulator', sorted
764alphabetically by symbol name; but this function also sets 767alphabetically by symbol name; but this function also sets
765`apropos-accumulator' to nil before returning. 768`apropos-accumulator' to nil before returning.
766 769
767If SPACING is non-nil, it should be a string; 770If SPACING is non-nil, it should be a string; separate items with that string.
768separate items with that string." 771If non-nil TEXT is a string that will be printed as a heading."
769 (if (null apropos-accumulator) 772 (if (null apropos-accumulator)
770 (message "No apropos matches for `%s'" apropos-orig-regexp) 773 (message "No apropos matches for `%s'" apropos-orig-regexp)
771 (setq apropos-accumulator 774 (setq apropos-accumulator
@@ -794,6 +797,7 @@ separate items with that string."
794 " or variable,\n" 797 " or variable,\n"
795 (substitute-command-keys 798 (substitute-command-keys
796 "and type \\[apropos-follow] to get full documentation.\n\n")) 799 "and type \\[apropos-follow] to get full documentation.\n\n"))
800 (if text (insert text "\n\n"))
797 (while (consp p) 801 (while (consp p)
798 (when (and spacing (not (bobp))) 802 (when (and spacing (not (bobp)))
799 (princ spacing)) 803 (princ spacing))
@@ -907,13 +911,15 @@ separate items with that string."
907 911
908(defun apropos-describe-plist (symbol) 912(defun apropos-describe-plist (symbol)
909 "Display a pretty listing of SYMBOL's plist." 913 "Display a pretty listing of SYMBOL's plist."
910 (with-output-to-temp-buffer "*Help*" 914 (help-setup-xref (list 'apropos-describe-plist symbol) (interactive-p))
915 (with-output-to-temp-buffer (help-buffer)
911 (set-buffer standard-output) 916 (set-buffer standard-output)
912 (princ "Symbol ") 917 (princ "Symbol ")
913 (prin1 symbol) 918 (prin1 symbol)
914 (princ "'s plist is\n (") 919 (princ "'s plist is\n (")
915 (if apropos-symbol-face 920 (if apropos-symbol-face
916 (put-text-property 8 (- (point) 14) 'face apropos-symbol-face)) 921 (put-text-property (+ (point-min) 7) (- (point) 14)
922 'face apropos-symbol-face))
917 (insert (apropos-format-plist symbol "\n ")) 923 (insert (apropos-format-plist symbol "\n "))
918 (princ ")") 924 (princ ")")
919 (print-help-return-message))) 925 (print-help-return-message)))
diff --git a/lisp/autorevert.el b/lisp/autorevert.el
index efae885de60..152b21eef84 100644
--- a/lisp/autorevert.el
+++ b/lisp/autorevert.el
@@ -198,19 +198,6 @@ not necessarily make manual updates useless for non-file buffers."
198This variable becomes buffer local when set in any fashion.") 198This variable becomes buffer local when set in any fashion.")
199(make-variable-buffer-local 'global-auto-revert-ignore-buffer) 199(make-variable-buffer-local 'global-auto-revert-ignore-buffer)
200 200
201(defvar buffer-stale-function nil
202 "Function to check whether a non-file buffer needs reverting.
203This should be a function with one optional argument NOCONFIRM.
204Auto Revert Mode sets NOCONFIRM to t. The function should return
205non-nil if the buffer should be reverted. The buffer is current
206when this function is called.
207
208The idea behind the NOCONFIRM argument is that the same function
209can also be used to ask the user whether the buffer should be
210reverted. In such a situation one has to be less careful about,
211say, reverting remote files, than if the function is called at
212regular intervals by Auto Revert Mode.")
213
214;; Internal variables: 201;; Internal variables:
215 202
216(defvar auto-revert-buffer-list '() 203(defvar auto-revert-buffer-list '()
@@ -349,8 +336,8 @@ Use `auto-revert-mode' to revert a particular buffer."
349 (let (revert) 336 (let (revert)
350 (cond 337 (cond
351 ((auto-revert-vc-buffer-p) 338 ((auto-revert-vc-buffer-p)
352 (when (auto-revert-handler-vc) 339 (when (auto-revert-handler-vc)
353 (setq revert 'vc))) 340 (setq revert 'vc)))
354 ((or (and (buffer-file-name) 341 ((or (and (buffer-file-name)
355 (file-readable-p (buffer-file-name)) 342 (file-readable-p (buffer-file-name))
356 (not (verify-visited-file-modtime (current-buffer)))) 343 (not (verify-visited-file-modtime (current-buffer))))
@@ -361,11 +348,11 @@ Use `auto-revert-mode' to revert a particular buffer."
361 (funcall buffer-stale-function t))) 348 (funcall buffer-stale-function t)))
362 (setq revert t))) 349 (setq revert t)))
363 (when revert 350 (when revert
351 (when auto-revert-verbose
352 (message "Reverting buffer `%s'." (buffer-name)))
364 (revert-buffer 'ignore-auto 'dont-ask 'preserve-modes) 353 (revert-buffer 'ignore-auto 'dont-ask 'preserve-modes)
365 (if (eq revert 'vc) 354 (if (eq revert 'vc)
366 (vc-mode-line buffer-file-name)) 355 (vc-mode-line buffer-file-name))))))
367 (if auto-revert-verbose
368 (message "Reverting buffer `%s'." (buffer-name)))))))
369 356
370(defun auto-revert-buffers () 357(defun auto-revert-buffers ()
371 "Revert buffers as specified by Auto-Revert and Global Auto-Revert Mode. 358 "Revert buffers as specified by Auto-Revert and Global Auto-Revert Mode.
diff --git a/lisp/bs.el b/lisp/bs.el
index 9fdc8922cc2..29258119974 100644
--- a/lisp/bs.el
+++ b/lisp/bs.el
@@ -1,6 +1,6 @@
1;;; bs.el --- menu for selecting and displaying buffers 1;;; bs.el --- menu for selecting and displaying buffers
2 2
3;; Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc. 3;; Copyright (C) 1998, 1999, 2000, 2001, 2004 Free Software Foundation, Inc.
4;; Author: Olaf Sylvester <Olaf.Sylvester@netsurf.de> 4;; Author: Olaf Sylvester <Olaf.Sylvester@netsurf.de>
5;; Maintainer: Olaf Sylvester <Olaf.Sylvester@netsurf.de> 5;; Maintainer: Olaf Sylvester <Olaf.Sylvester@netsurf.de>
6;; Keywords: convenience 6;; Keywords: convenience
@@ -546,9 +546,7 @@ a special function. SORT-DESCRIPTION is an element of `bs-sort-functions'."
546 (extern-must-show-from-fun (and bs-must-show-function 546 (extern-must-show-from-fun (and bs-must-show-function
547 (funcall bs-must-show-function 547 (funcall bs-must-show-function
548 (car list)))) 548 (car list))))
549 (show-flag (save-excursion 549 (show-flag (buffer-local-value 'bs-buffer-show-mark (car list))))
550 (set-buffer (car list))
551 bs-buffer-show-mark)))
552 (if (or (eq show-flag 'always) 550 (if (or (eq show-flag 'always)
553 (and (or bs--show-all (not (eq show-flag 'never))) 551 (and (or bs--show-all (not (eq show-flag 'never)))
554 (not int-show-never) 552 (not int-show-never)
@@ -865,9 +863,7 @@ always. Otherwise it is marked to show never."
865 "Set value `bs-buffer-show-mark' of buffer BUFFER to WHAT. 863 "Set value `bs-buffer-show-mark' of buffer BUFFER to WHAT.
866Redisplay current line and display a message describing 864Redisplay current line and display a message describing
867the status of buffer on current line." 865the status of buffer on current line."
868 (save-excursion 866 (with-current-buffer buffer (setq bs-buffer-show-mark what))
869 (set-buffer buffer)
870 (setq bs-buffer-show-mark what))
871 (bs--update-current-line) 867 (bs--update-current-line)
872 (bs--set-window-height) 868 (bs--set-window-height)
873 (bs--show-config-message what)) 869 (bs--show-config-message what))
diff --git a/lisp/buff-menu.el b/lisp/buff-menu.el
index 800f8693eda..a1b0f4093c7 100644
--- a/lisp/buff-menu.el
+++ b/lisp/buff-menu.el
@@ -1,6 +1,6 @@
1;;; buff-menu.el --- buffer menu main function and support functions 1;;; buff-menu.el --- buffer menu main function and support functions
2 2
3;; Copyright (C) 1985, 86, 87, 93, 94, 95, 2000, 2001, 2002, 2003 3;; Copyright (C) 1985, 86, 87, 93, 94, 95, 2000, 2001, 2002, 03, 2004
4;; Free Software Foundation, Inc. 4;; Free Software Foundation, Inc.
5 5
6;; Maintainer: FSF 6;; Maintainer: FSF
@@ -47,22 +47,22 @@
47 47
48;;; Code: 48;;; Code:
49 49
50;;;Trying to preserve the old window configuration works well in 50;;Trying to preserve the old window configuration works well in
51;;;simple scenarios, when you enter the buffer menu, use it, and exit it. 51;;simple scenarios, when you enter the buffer menu, use it, and exit it.
52;;;But it does strange things when you switch back to the buffer list buffer 52;;But it does strange things when you switch back to the buffer list buffer
53;;;with C-x b, later on, when the window configuration is different. 53;;with C-x b, later on, when the window configuration is different.
54;;;The choice seems to be, either restore the window configuration 54;;The choice seems to be, either restore the window configuration
55;;;in all cases, or in no cases. 55;;in all cases, or in no cases.
56;;;I decided it was better not to restore the window config at all. -- rms. 56;;I decided it was better not to restore the window config at all. -- rms.
57 57
58;;;But since then, I changed buffer-menu to use the selected window, 58;;But since then, I changed buffer-menu to use the selected window,
59;;;so q now once again goes back to the previous window configuration. 59;;so q now once again goes back to the previous window configuration.
60 60
61;;;(defvar Buffer-menu-window-config nil 61;;(defvar Buffer-menu-window-config nil
62;;; "Window configuration saved from entry to `buffer-menu'.") 62;; "Window configuration saved from entry to `buffer-menu'.")
63 63
64; Put buffer *Buffer List* into proper mode right away 64;; Put buffer *Buffer List* into proper mode right away
65; so that from now on even list-buffers is enough to get a buffer menu. 65;; so that from now on even list-buffers is enough to get a buffer menu.
66 66
67(defgroup Buffer-menu nil 67(defgroup Buffer-menu nil
68 "Show a menu of all buffers in a buffer." 68 "Show a menu of all buffers in a buffer."
@@ -89,7 +89,7 @@
89 :type 'number 89 :type 'number
90 :group 'Buffer-menu) 90 :group 'Buffer-menu)
91 91
92; This should get updated & resorted when you click on a column heading 92;; This should get updated & resorted when you click on a column heading
93(defvar Buffer-menu-sort-column nil 93(defvar Buffer-menu-sort-column nil
94 "*2 for sorting by buffer names. 5 for sorting by file names. 94 "*2 for sorting by buffer names. 5 for sorting by file names.
95nil for default sorting by visited order.") 95nil for default sorting by visited order.")
@@ -99,6 +99,14 @@ nil for default sorting by visited order.")
99(defvar Buffer-menu-mode-map nil 99(defvar Buffer-menu-mode-map nil
100 "Local keymap for `Buffer-menu-mode' buffers.") 100 "Local keymap for `Buffer-menu-mode' buffers.")
101 101
102(defvar Buffer-menu-files-only nil
103 "Non-nil if the current buffer-menu lists only file buffers.
104This variable determines whether reverting the buffer lists only
105file buffers. It affects both manual reverting and reverting by
106Auto Revert Mode.")
107
108(make-variable-buffer-local 'Buffer-menu-files-only)
109
102(if Buffer-menu-mode-map 110(if Buffer-menu-mode-map
103 () 111 ()
104 (setq Buffer-menu-mode-map (make-keymap)) 112 (setq Buffer-menu-mode-map (make-keymap))
@@ -131,6 +139,7 @@ nil for default sorting by visited order.")
131 (define-key Buffer-menu-mode-map "b" 'Buffer-menu-bury) 139 (define-key Buffer-menu-mode-map "b" 'Buffer-menu-bury)
132 (define-key Buffer-menu-mode-map "g" 'Buffer-menu-revert) 140 (define-key Buffer-menu-mode-map "g" 'Buffer-menu-revert)
133 (define-key Buffer-menu-mode-map "V" 'Buffer-menu-view) 141 (define-key Buffer-menu-mode-map "V" 'Buffer-menu-view)
142 (define-key Buffer-menu-mode-map "T" 'Buffer-menu-toggle-files-only)
134 (define-key Buffer-menu-mode-map [mouse-2] 'Buffer-menu-mouse-select) 143 (define-key Buffer-menu-mode-map [mouse-2] 'Buffer-menu-mouse-select)
135) 144)
136 145
@@ -167,13 +176,16 @@ Letters do not insert themselves; instead, they are commands.
167\\[Buffer-menu-backup-unmark] -- back up a line and remove marks. 176\\[Buffer-menu-backup-unmark] -- back up a line and remove marks.
168\\[Buffer-menu-toggle-read-only] -- toggle read-only status of buffer on this line. 177\\[Buffer-menu-toggle-read-only] -- toggle read-only status of buffer on this line.
169\\[Buffer-menu-revert] -- update the list of buffers. 178\\[Buffer-menu-revert] -- update the list of buffers.
179\\[Buffer-menu-toggle-files-only] -- toggle whether the menu displays only file buffers.
170\\[Buffer-menu-bury] -- bury the buffer listed on this line." 180\\[Buffer-menu-bury] -- bury the buffer listed on this line."
171 (kill-all-local-variables) 181 (kill-all-local-variables)
172 (use-local-map Buffer-menu-mode-map) 182 (use-local-map Buffer-menu-mode-map)
173 (setq major-mode 'Buffer-menu-mode) 183 (setq major-mode 'Buffer-menu-mode)
174 (setq mode-name "Buffer Menu") 184 (setq mode-name "Buffer Menu")
175 (make-local-variable 'revert-buffer-function) 185 (set (make-local-variable 'revert-buffer-function)
176 (setq revert-buffer-function 'Buffer-menu-revert-function) 186 'Buffer-menu-revert-function)
187 (set (make-local-variable 'buffer-stale-function)
188 #'(lambda (&optional noconfirm) t))
177 (setq truncate-lines t) 189 (setq truncate-lines t)
178 (setq buffer-read-only t) 190 (setq buffer-read-only t)
179 (run-hooks 'buffer-menu-mode-hook)) 191 (run-hooks 'buffer-menu-mode-hook))
@@ -184,7 +196,21 @@ Letters do not insert themselves; instead, they are commands.
184 (revert-buffer)) 196 (revert-buffer))
185 197
186(defun Buffer-menu-revert-function (ignore1 ignore2) 198(defun Buffer-menu-revert-function (ignore1 ignore2)
187 (list-buffers)) 199 ;; We can not use save-excursion here. The buffer gets erased.
200 (let ((old-point (point)))
201 (list-buffers-noselect Buffer-menu-files-only)
202 (goto-char old-point)))
203
204(defun Buffer-menu-toggle-files-only (arg)
205 "Toggle whether the current buffer-menu displays only file buffers.
206With a positive ARG display only file buffers. With zero or
207negative ARG, display other buffers as well."
208 (interactive "P")
209 (setq Buffer-menu-files-only
210 (cond ((not arg) (not Buffer-menu-files-only))
211 ((> (prefix-numeric-value arg) 0) t)))
212 (revert-buffer))
213
188 214
189(defun Buffer-menu-buffer (error-if-non-existent-p) 215(defun Buffer-menu-buffer (error-if-non-existent-p)
190 "Return buffer described by this line of buffer menu." 216 "Return buffer described by this line of buffer menu."
@@ -547,6 +573,29 @@ For more information, see the function `buffer-menu'."
547 ? ) 573 ? )
548 size)) 574 size))
549 575
576(defun Buffer-menu-sort (column)
577 "Sort the buffer menu by COLUMN."
578 (interactive "P")
579 (when column
580 (setq column (prefix-numeric-value column))
581 (if (< column 2) (setq column 2))
582 (if (> column 5) (setq column 5)))
583 (setq Buffer-menu-sort-column column)
584 (Buffer-menu-revert))
585
586(defun Buffer-menu-make-sort-button (name column)
587 (if (equal column Buffer-menu-sort-column) (setq column nil))
588 (propertize name
589 'help-echo (if column
590 (concat "mouse-2: sort by " (downcase name))
591 "mouse-2: sort by visited order")
592 'mouse-face 'highlight
593 'keymap (let ((map (make-sparse-keymap)))
594 (define-key map [header-line mouse-2]
595 `(lambda () (interactive)
596 (Buffer-menu-sort ,column)))
597 map)))
598
550(defun list-buffers-noselect (&optional files-only) 599(defun list-buffers-noselect (&optional files-only)
551 "Create and return a buffer with a list of names of existing buffers. 600 "Create and return a buffer with a list of names of existing buffers.
552The buffer is named `*Buffer List*'. 601The buffer is named `*Buffer List*'.
@@ -557,29 +606,25 @@ For more information, see the function `buffer-menu'."
557 (let* ((old-buffer (current-buffer)) 606 (let* ((old-buffer (current-buffer))
558 (standard-output standard-output) 607 (standard-output standard-output)
559 (mode-end (make-string (- Buffer-menu-mode-width 2) ? )) 608 (mode-end (make-string (- Buffer-menu-mode-width 2) ? ))
560 (header (concat (propertize "CRM " 'face 'fixed-pitch) 609 (header (concat " " (propertize "CRM " 'face 'fixed-pitch)
561 (Buffer-menu-buffer+size "Buffer" "Size") 610 (Buffer-menu-buffer+size
562 " Mode" mode-end "File\n")) 611 (Buffer-menu-make-sort-button "Buffer" 2)
563 list desired-point name file mode) 612 (Buffer-menu-make-sort-button "Size" 3))
613 " "
614 (Buffer-menu-make-sort-button "Mode" 4) mode-end
615 (Buffer-menu-make-sort-button "File" 5) "\n"))
616 list desired-point name file)
564 (when Buffer-menu-use-header-line 617 (when Buffer-menu-use-header-line
565 (let ((spaces 618 (let ((pos 0))
566 (- (car (window-inside-edges))
567 (car (window-edges))))
568 (pos 0))
569 ;; Turn spaces in the header into stretch specs so they work 619 ;; Turn spaces in the header into stretch specs so they work
570 ;; regardless of the header-line face. 620 ;; regardless of the header-line face.
571 (while (string-match "[ \t]+" header pos) 621 (while (string-match "[ \t]+" header pos)
572 (setq pos (match-end 0)) 622 (setq pos (match-end 0))
573 (put-text-property (match-beginning 0) pos 'display 623 (put-text-property (match-beginning 0) pos 'display
574 ;; Assume fixed-size chars 624 ;; Assume fixed-size chars
575 (list 'space :align-to (+ spaces pos)) 625 (list 'space :align-to (1- pos))
576 header))
577 ;; Add the leading space
578 (setq header (concat (propertize (make-string (floor spaces) ? )
579 'display (list 'space :width spaces))
580 header)))) 626 header))))
581 (save-excursion 627 (with-current-buffer (get-buffer-create "*Buffer List*")
582 (set-buffer (get-buffer-create "*Buffer List*"))
583 (setq buffer-read-only nil) 628 (setq buffer-read-only nil)
584 (erase-buffer) 629 (erase-buffer)
585 (setq standard-output (current-buffer)) 630 (setq standard-output (current-buffer))
@@ -662,6 +707,8 @@ For more information, see the function `buffer-menu'."
662 ;; current buffer is not displayed for some reason. 707 ;; current buffer is not displayed for some reason.
663 (and desired-point 708 (and desired-point
664 (goto-char desired-point)) 709 (goto-char desired-point))
710 (setq Buffer-menu-files-only files-only)
711 (set-buffer-modified-p nil)
665 (current-buffer)))) 712 (current-buffer))))
666 713
667;;; arch-tag: e7dfcfc9-6cb2-46e4-bf55-8ef1936d83c6 714;;; arch-tag: e7dfcfc9-6cb2-46e4-bf55-8ef1936d83c6
diff --git a/lisp/calc/calc-ext.el b/lisp/calc/calc-ext.el
index eafcc0766c2..47c02bc285c 100644
--- a/lisp/calc/calc-ext.el
+++ b/lisp/calc/calc-ext.el
@@ -591,6 +591,9 @@
591 (define-key calc-mode-map "v}" 'calc-matrix-brackets) 591 (define-key calc-mode-map "v}" 'calc-matrix-brackets)
592 (define-key calc-mode-map "v(" 'calc-vector-parens) 592 (define-key calc-mode-map "v(" 'calc-vector-parens)
593 (define-key calc-mode-map "v)" 'calc-matrix-brackets) 593 (define-key calc-mode-map "v)" 'calc-matrix-brackets)
594 ;; We can't rely on the automatic upper->lower conversion because
595 ;; in the global map V is explicitly bound, so we need to bind it
596 ;; explicitly as well :-( --stef
594 (define-key calc-mode-map "V" (lookup-key calc-mode-map "v")) 597 (define-key calc-mode-map "V" (lookup-key calc-mode-map "v"))
595 598
596 (define-key calc-mode-map "z" 'nil) 599 (define-key calc-mode-map "z" 'nil)
diff --git a/lisp/calc/calc.el b/lisp/calc/calc.el
index bf06b68ac99..782275c9b07 100644
--- a/lisp/calc/calc.el
+++ b/lisp/calc/calc.el
@@ -1,6 +1,6 @@
1;;; calc.el --- the GNU Emacs calculator 1;;; calc.el --- the GNU Emacs calculator
2 2
3;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2002 Free Software Foundation, Inc. 3;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
4 4
5;; Author: David Gillespie <daveg@synaptics.com> 5;; Author: David Gillespie <daveg@synaptics.com>
6;; Maintainers: D. Goel <deego@gnufans.org> 6;; Maintainers: D. Goel <deego@gnufans.org>
@@ -733,13 +733,13 @@ scientific notation in calc-mode.")
733 (define-key map "\M-\C-m" 'calc-last-args-stub) 733 (define-key map "\M-\C-m" 'calc-last-args-stub)
734 (define-key map "\C-j" 'calc-over) 734 (define-key map "\C-j" 'calc-over)
735 735
736 (mapcar (lambda (x) (define-key map (char-to-string x) 'undefined)) 736 (mapc (lambda (x) (define-key map (char-to-string x) 'undefined))
737 "lOW") 737 "lOW")
738 (mapcar (lambda (x) (define-key map (char-to-string x) 'calc-missing-key)) 738 (mapc (lambda (x) (define-key map (char-to-string x) 'calc-missing-key))
739 (concat "ABCDEFGHIJKLMNPQRSTUVXZabcdfghjkmoprstuvwxyz" 739 (concat "ABCDEFGHIJKLMNPQRSTUVXZabcdfghjkmoprstuvwxyz"
740 ":\\|!()[]<>{},;=~`\C-k\M-k\C-w\M-w\C-y\C-_")) 740 ":\\|!()[]<>{},;=~`\C-k\M-k\C-w\M-w\C-y\C-_"))
741 (mapcar (lambda (x) (define-key map (char-to-string x) 'calcDigit-start)) 741 (mapc (lambda (x) (define-key map (char-to-string x) 'calcDigit-start))
742 "_0123456789.#@") 742 "_0123456789.#@")
743 map)) 743 map))
744 744
745(defvar calc-digit-map 745(defvar calc-digit-map
@@ -2952,8 +2952,7 @@ If mouse is pressed in Calc window, push cut buffer contents onto the stack."
2952 (if (eq calc-language 'big) 2952 (if (eq calc-language 'big)
2953 (setq s (concat s "\n")) 2953 (setq s (concat s "\n"))
2954 (when calc-line-numbering 2954 (when calc-line-numbering
2955 (aset s 0 ?1) 2955 (setq s (concat "1:" (substring s 2)))))
2956 (aset s 1 ?:)))
2957 (setcar (cdr entry) (calc-count-lines s)) 2956 (setcar (cdr entry) (calc-count-lines s))
2958 s)) 2957 s))
2959 2958
diff --git a/lisp/cvs-status.el b/lisp/cvs-status.el
index b2945ca21be..528ab74e509 100644
--- a/lisp/cvs-status.el
+++ b/lisp/cvs-status.el
@@ -1,6 +1,6 @@
1;;; cvs-status.el --- major mode for browsing `cvs status' output 1;;; cvs-status.el --- major mode for browsing `cvs status' output
2 2
3;; Copyright (C) 1999, 2000 Free Software Foundation, Inc. 3;; Copyright (C) 1999, 2000, 03, 2004 Free Software Foundation, Inc.
4 4
5;; Author: Stefan Monnier <monnier@cs.yale.edu> 5;; Author: Stefan Monnier <monnier@cs.yale.edu>
6;; Keywords: pcl-cvs cvs status tree tools 6;; Keywords: pcl-cvs cvs status tree tools
@@ -385,7 +385,7 @@ the list is a three-string list TAG, KIND, REV."
385;;;; 385;;;;
386 386
387(defvar cvs-tree-use-jisx0208 387(defvar cvs-tree-use-jisx0208
388 nil ;; (and (char-display-font 'japanese-jisx0208) t) 388 (and (char-displayable-p (make-char 'japanese-jisx0208 40 44)) t)
389 "*Non-nil if we should use the graphical glyphs from `japanese-jisx0208'. 389 "*Non-nil if we should use the graphical glyphs from `japanese-jisx0208'.
390Otherwise, default to ASCII chars like +, - and |.") 390Otherwise, default to ASCII chars like +, - and |.")
391 391
diff --git a/lisp/dabbrev.el b/lisp/dabbrev.el
index c9591950f50..3763f2ccab8 100644
--- a/lisp/dabbrev.el
+++ b/lisp/dabbrev.el
@@ -1,6 +1,6 @@
1;;; dabbrev.el --- dynamic abbreviation package 1;;; dabbrev.el --- dynamic abbreviation package
2 2
3;; Copyright (C) 1985, 86, 92, 94, 96, 1997, 2000, 01, 2003 3;; Copyright (C) 1985, 86, 92, 94, 96, 1997, 2000, 01, 03, 2004
4;; Free Software Foundation, Inc. 4;; Free Software Foundation, Inc.
5 5
6;; Author: Don Morrison 6;; Author: Don Morrison
@@ -529,7 +529,7 @@ See also `dabbrev-abbrev-char-regexp' and \\[dabbrev-completion]."
529 ;; Take the following word, with intermediate separators, 529 ;; Take the following word, with intermediate separators,
530 ;; as our expansion this time. 530 ;; as our expansion this time.
531 (re-search-forward 531 (re-search-forward
532 (concat "\\(\\(" dabbrev--abbrev-char-regexp "\\)+\\)")) 532 (concat "\\(?:" dabbrev--abbrev-char-regexp "\\)+"))
533 (setq expansion (buffer-substring-no-properties 533 (setq expansion (buffer-substring-no-properties
534 dabbrev--last-expansion-location (point))) 534 dabbrev--last-expansion-location (point)))
535 535
@@ -793,10 +793,7 @@ of the start of the occurrence."
793 ;; Walk through the buffers till we find a match. 793 ;; Walk through the buffers till we find a match.
794 (let (expansion) 794 (let (expansion)
795 (while (and (not expansion) dabbrev--friend-buffer-list) 795 (while (and (not expansion) dabbrev--friend-buffer-list)
796 (setq dabbrev--last-buffer 796 (setq dabbrev--last-buffer (pop dabbrev--friend-buffer-list))
797 (car dabbrev--friend-buffer-list))
798 (setq dabbrev--friend-buffer-list
799 (cdr dabbrev--friend-buffer-list))
800 (set-buffer dabbrev--last-buffer) 797 (set-buffer dabbrev--last-buffer)
801 (dabbrev--scanning-message) 798 (dabbrev--scanning-message)
802 (setq dabbrev--last-expansion-location (point-min)) 799 (setq dabbrev--last-expansion-location (point-min))
@@ -1000,8 +997,7 @@ Leaves point at the location of the start of the expansion."
1000 nil 997 nil
1001 ;; We have a truly valid match. Find the end. 998 ;; We have a truly valid match. Find the end.
1002 (re-search-forward pattern2) 999 (re-search-forward pattern2)
1003 (setq found-string (buffer-substring-no-properties 1000 (setq found-string (match-string-no-properties 0))
1004 (match-beginning 0) (match-end 0)))
1005 (setq result found-string) 1001 (setq result found-string)
1006 (and ignore-case (setq found-string (downcase found-string))) 1002 (and ignore-case (setq found-string (downcase found-string)))
1007 ;; Ignore this match if it's already in the table. 1003 ;; Ignore this match if it's already in the table.
@@ -1010,9 +1006,7 @@ Leaves point at the location of the start of the expansion."
1010 (string= found-string table-string)) 1006 (string= found-string table-string))
1011 (setq found-string nil))) 1007 (setq found-string nil)))
1012 ;; Prepare to continue searching. 1008 ;; Prepare to continue searching.
1013 (if reverse 1009 (goto-char (if reverse (match-beginning 0) (match-end 0))))
1014 (goto-char (match-beginning 0))
1015 (goto-char (match-end 0))))
1016 ;; If we found something, use it. 1010 ;; If we found something, use it.
1017 (when found-string 1011 (when found-string
1018 ;; Put it into `dabbrev--last-table' 1012 ;; Put it into `dabbrev--last-table'
diff --git a/lisp/dired.el b/lisp/dired.el
index 515daa03f27..cfdb57d614c 100644
--- a/lisp/dired.el
+++ b/lisp/dired.el
@@ -1227,8 +1227,6 @@ Do so according to the former subdir alist OLD-SUBDIR-ALIST."
1227;; Dired mode is suitable only for specially formatted data. 1227;; Dired mode is suitable only for specially formatted data.
1228(put 'dired-mode 'mode-class 'special) 1228(put 'dired-mode 'mode-class 'special)
1229 1229
1230(defvar buffer-stale-function)
1231
1232(defun dired-mode (&optional dirname switches) 1230(defun dired-mode (&optional dirname switches)
1233 "\ 1231 "\
1234Mode for \"editing\" directory listings. 1232Mode for \"editing\" directory listings.
@@ -1323,7 +1321,7 @@ Keybindings:
1323 (set (make-local-variable 'font-lock-defaults) 1321 (set (make-local-variable 'font-lock-defaults)
1324 '(dired-font-lock-keywords t nil nil beginning-of-line)) 1322 '(dired-font-lock-keywords t nil nil beginning-of-line))
1325 (dired-sort-other dired-actual-switches t) 1323 (dired-sort-other dired-actual-switches t)
1326 (run-hooks 'dired-mode-hook) 1324 (run-mode-hooks 'dired-mode-hook)
1327 (when (featurep 'x-dnd) 1325 (when (featurep 'x-dnd)
1328 (make-variable-buffer-local 'x-dnd-test-function) 1326 (make-variable-buffer-local 'x-dnd-test-function)
1329 (make-variable-buffer-local 'x-dnd-protocol-alist) 1327 (make-variable-buffer-local 'x-dnd-protocol-alist)
@@ -1720,12 +1718,9 @@ regardless of the language.")
1720 (string-match 1718 (string-match
1721 "[xst]" ;; execute bit set anywhere? 1719 "[xst]" ;; execute bit set anywhere?
1722 (concat 1720 (concat
1723 (buffer-substring (match-beginning 2) 1721 (match-string 2)
1724 (match-end 2)) 1722 (match-string 3)
1725 (buffer-substring (match-beginning 3) 1723 (match-string 4)))))
1726 (match-end 3))
1727 (buffer-substring (match-beginning 4)
1728 (match-end 4))))))
1729 (or no-error (error "No file on this line")))) 1724 (or no-error (error "No file on this line"))))
1730 ;; Move point to end of name: 1725 ;; Move point to end of name:
1731 (if symlink 1726 (if symlink
@@ -2897,10 +2892,10 @@ With a prefix argument you can edit the current listing switches instead."
2897 (concat result (substring string start)))) 2892 (concat result (substring string start))))
2898 2893
2899(defun dired-sort-other (switches &optional no-revert) 2894(defun dired-sort-other (switches &optional no-revert)
2900 ;; Specify new ls SWITCHES for current dired buffer. Values matching 2895 "Specify new ls SWITCHES for current dired buffer.
2901 ;; `dired-sort-by-date-regexp' or `dired-sort-by-name-regexp' set the 2896Values matching `dired-sort-by-date-regexp' or `dired-sort-by-name-regexp'
2902 ;; minor mode accordingly, others appear literally in the mode line. 2897set the minor mode accordingly, others appear literally in the mode line.
2903 ;; With optional second arg NO-REVERT, don't refresh the listing afterwards. 2898With optional second arg NO-REVERT, don't refresh the listing afterwards."
2904 (dired-sort-R-check switches) 2899 (dired-sort-R-check switches)
2905 (setq dired-actual-switches switches) 2900 (setq dired-actual-switches switches)
2906 (if (eq major-mode 'dired-mode) (dired-sort-set-modeline)) 2901 (if (eq major-mode 'dired-mode) (dired-sort-set-modeline))
diff --git a/lisp/ediff-init.el b/lisp/ediff-init.el
index 4f5786651f5..81299b9c63a 100644
--- a/lisp/ediff-init.el
+++ b/lisp/ediff-init.el
@@ -1,6 +1,6 @@
1;;; ediff-init.el --- Macros, variables, and defsubsts used by Ediff 1;;; ediff-init.el --- Macros, variables, and defsubsts used by Ediff
2 2
3;; Copyright (C) 1994, 95, 96, 97, 98, 99, 2000, 01, 02 Free Software Foundation, Inc. 3;; Copyright (C) 1994, 95, 96, 97, 98, 99, 2000, 01, 02, 04 Free Software Foundation, Inc.
4 4
5;; Author: Michael Kifer <kifer@cs.stonybrook.edu> 5;; Author: Michael Kifer <kifer@cs.stonybrook.edu>
6 6
@@ -895,7 +895,8 @@ to temp files when Ediff needs to find fine differences."
895 (sit-for 1))))) 895 (sit-for 1)))))
896 896
897(defun ediff-hide-face (face) 897(defun ediff-hide-face (face)
898 (if (and (ediff-has-face-support-p) ediff-emacs-p) 898 (if (and (ediff-has-face-support-p) (boundp 'add-to-list)
899 (boundp 'facemenu-unlisted-faces))
899 (add-to-list 'facemenu-unlisted-faces face))) 900 (add-to-list 'facemenu-unlisted-faces face)))
900 901
901 902
@@ -1288,7 +1289,7 @@ This property can be toggled interactively."
1288;;; Misc 1289;;; Misc
1289 1290
1290;; if nil, this silences some messages 1291;; if nil, this silences some messages
1291(defconst ediff-verbose-p t) 1292(defvar ediff-verbose-p t)
1292 1293
1293(defcustom ediff-autostore-merges 'group-jobs-only 1294(defcustom ediff-autostore-merges 'group-jobs-only
1294 "*Save the results of merge jobs automatically. 1295 "*Save the results of merge jobs automatically.
diff --git a/lisp/electric.el b/lisp/electric.el
index 6df74eac6ef..3d2bf140c8c 100644
--- a/lisp/electric.el
+++ b/lisp/electric.el
@@ -1,6 +1,6 @@
1;;; electric.el --- window maker and Command loop for `electric' modes 1;;; electric.el --- window maker and Command loop for `electric' modes
2 2
3;; Copyright (C) 1985, 1986, 1995 Free Software Foundation, Inc. 3;; Copyright (C) 1985, 1986, 1995, 2004 Free Software Foundation, Inc.
4 4
5;; Author: K. Shane Hartman 5;; Author: K. Shane Hartman
6;; Maintainer: FSF 6;; Maintainer: FSF
@@ -144,12 +144,12 @@
144 (buf (get-buffer buffer)) 144 (buf (get-buffer buffer))
145 (one-window (one-window-p t)) 145 (one-window (one-window-p t))
146 (pop-up-windows t) 146 (pop-up-windows t)
147 (pop-up-frames nil)
147 (target-height) 148 (target-height)
148 (lines)) 149 (lines))
149 (if (not buf) 150 (if (not buf)
150 (error "Buffer %s does not exist" buffer) 151 (error "Buffer %s does not exist" buffer)
151 (save-excursion 152 (with-current-buffer buf
152 (set-buffer buf)
153 (setq lines (count-lines (point-min) (point-max))) 153 (setq lines (count-lines (point-min) (point-max)))
154 (setq target-height 154 (setq target-height
155 (min (max (if max-height (min max-height (1+ lines)) (1+ lines)) 155 (min (max (if max-height (min max-height (1+ lines)) (1+ lines))
diff --git a/lisp/emacs-lisp/rx.el b/lisp/emacs-lisp/rx.el
index b94ac57eca1..6656cf5ed3c 100644
--- a/lisp/emacs-lisp/rx.el
+++ b/lisp/emacs-lisp/rx.el
@@ -1,6 +1,6 @@
1;;; rx.el --- sexp notation for regular expressions 1;;; rx.el --- sexp notation for regular expressions
2 2
3;; Copyright (C) 2001, 03, 2004 Free Software Foundation, Inc. 3;; Copyright (C) 2001, 2003, 2004 Free Software Foundation, Inc.
4 4
5;; Author: Gerd Moellmann <gerd@gnu.org> 5;; Author: Gerd Moellmann <gerd@gnu.org>
6;; Maintainer: FSF 6;; Maintainer: FSF
@@ -802,6 +802,9 @@ CHAR
802`(backref N)' 802`(backref N)'
803 matches what was matched previously by submatch N. 803 matches what was matched previously by submatch N.
804 804
805`(backref N)'
806 matches what was matched previously by submatch N.
807
805`(eval FORM)' 808`(eval FORM)'
806 evaluate FORM and insert result. If result is a string, 809 evaluate FORM and insert result. If result is a string,
807 `regexp-quote' it. 810 `regexp-quote' it.
@@ -811,7 +814,6 @@ CHAR
811 814
812 (rx-to-string regexp)) 815 (rx-to-string regexp))
813 816
814
815(provide 'rx) 817(provide 'rx)
816 818
817;;; arch-tag: 12d01a63-0008-42bb-ab8c-1c7d63be370b 819;;; arch-tag: 12d01a63-0008-42bb-ab8c-1c7d63be370b
diff --git a/lisp/eshell/em-alias.el b/lisp/eshell/em-alias.el
index 214375e496c..0312f9d7ada 100644
--- a/lisp/eshell/em-alias.el
+++ b/lisp/eshell/em-alias.el
@@ -28,7 +28,7 @@
28(defgroup eshell-alias nil 28(defgroup eshell-alias nil
29 "Command aliases allow for easy definition of alternate commands." 29 "Command aliases allow for easy definition of alternate commands."
30 :tag "Command aliases" 30 :tag "Command aliases"
31 :link '(info-link "(eshell)Command aliases") 31 ;; :link '(info-link "(eshell)Command aliases")
32 :group 'eshell-module) 32 :group 'eshell-module)
33 33
34;;; Commentary: 34;;; Commentary:
@@ -103,7 +103,7 @@ gained by using this module."
103(defcustom eshell-bad-command-tolerance 3 103(defcustom eshell-bad-command-tolerance 3
104 "*The number of failed commands to ignore before creating an alias." 104 "*The number of failed commands to ignore before creating an alias."
105 :type 'integer 105 :type 'integer
106 :link '(custom-manual "(eshell)Auto-correction of bad commands") 106 ;; :link '(custom-manual "(eshell)Auto-correction of bad commands")
107 :group 'eshell-alias) 107 :group 'eshell-alias)
108 108
109;;; 109;;;
diff --git a/lisp/eshell/em-banner.el b/lisp/eshell/em-banner.el
index c6f65ccd779..d63c99be005 100644
--- a/lisp/eshell/em-banner.el
+++ b/lisp/eshell/em-banner.el
@@ -30,7 +30,7 @@
30It exists so that others wishing to create their own Eshell extension 30It exists so that others wishing to create their own Eshell extension
31modules may have a simple template to begin with." 31modules may have a simple template to begin with."
32 :tag "Login banner" 32 :tag "Login banner"
33 :link '(info-link "(eshell)Login banner") 33 ;; :link '(info-link "(eshell)Login banner")
34 :group 'eshell-module) 34 :group 'eshell-module)
35 35
36;;; Commentary: 36;;; Commentary:
diff --git a/lisp/eshell/em-smart.el b/lisp/eshell/em-smart.el
index fb539487204..750d7978287 100644
--- a/lisp/eshell/em-smart.el
+++ b/lisp/eshell/em-smart.el
@@ -33,7 +33,7 @@ some of the edit/review concepts inherent in the design of Plan 9's
33Most likely you will have to turn this option on and play around with 33Most likely you will have to turn this option on and play around with
34it to get a real sense of how it works." 34it to get a real sense of how it works."
35 :tag "Smart display of output" 35 :tag "Smart display of output"
36 :link '(info-link "(eshell)Smart display of output") 36 ;; :link '(info-link "(eshell)Smart display of output")
37 :group 'eshell-module) 37 :group 'eshell-module)
38 38
39;;; Commentary: 39;;; Commentary:
diff --git a/lisp/eshell/esh-cmd.el b/lisp/eshell/esh-cmd.el
index e944020b1ed..9b4f54ce8bf 100644
--- a/lisp/eshell/esh-cmd.el
+++ b/lisp/eshell/esh-cmd.el
@@ -30,7 +30,7 @@
30pressing <RET>. There are several different kinds of commands, 30pressing <RET>. There are several different kinds of commands,
31however." 31however."
32 :tag "Command invocation" 32 :tag "Command invocation"
33 :link '(info-link "(eshell)Command invocation") 33 ;; :link '(info-link "(eshell)Command invocation")
34 :group 'eshell) 34 :group 'eshell)
35 35
36;;; Commentary: 36;;; Commentary:
diff --git a/lisp/eshell/eshell.el b/lisp/eshell/eshell.el
index e76bcb17055..b3307c81b4e 100644
--- a/lisp/eshell/eshell.el
+++ b/lisp/eshell/eshell.el
@@ -34,7 +34,7 @@ is intended to be a functional replacement for command shells such as
34bash, zsh, rc, 4dos; since Emacs itself is capable of handling most of 34bash, zsh, rc, 4dos; since Emacs itself is capable of handling most of
35the tasks accomplished by such tools." 35the tasks accomplished by such tools."
36 :tag "The Emacs shell" 36 :tag "The Emacs shell"
37 :link '(info-link "(eshell)The Emacs shell") 37 :link '(info-link "(eshell)Top")
38 :version "21.1" 38 :version "21.1"
39 :group 'applications) 39 :group 'applications)
40 40
diff --git a/lisp/faces.el b/lisp/faces.el
index 2c9fbb8206e..47dab153dba 100644
--- a/lisp/faces.el
+++ b/lisp/faces.el
@@ -1071,7 +1071,7 @@ of a global face. Value is the new attribute value."
1071If optional argument FRAME Is nil or omitted, use the selected frame." 1071If optional argument FRAME Is nil or omitted, use the selected frame."
1072 (let ((completion-ignore-case t)) 1072 (let ((completion-ignore-case t))
1073 (completing-read (format "Set font attributes of face `%s' from font: " face) 1073 (completing-read (format "Set font attributes of face `%s' from font: " face)
1074 (mapcar 'list (x-list-fonts "*" nil frame))))) 1074 (x-list-fonts "*" nil frame))))
1075 1075
1076 1076
1077(defun read-all-face-attributes (face &optional frame) 1077(defun read-all-face-attributes (face &optional frame)
@@ -1866,7 +1866,9 @@ created."
1866(put 'modeline-inactive 'face-alias 'mode-line-inactive) 1866(put 'modeline-inactive 'face-alias 'mode-line-inactive)
1867 1867
1868(defface header-line 1868(defface header-line
1869 '((((type tty)) 1869 '((t
1870 :inherit mode-line)
1871 (((type tty))
1870 ;; This used to be `:inverse-video t', but that doesn't look very 1872 ;; This used to be `:inverse-video t', but that doesn't look very
1871 ;; good when combined with inverse-video mode-lines and multiple 1873 ;; good when combined with inverse-video mode-lines and multiple
1872 ;; windows. Underlining looks better, and is more consistent with 1874 ;; windows. Underlining looks better, and is more consistent with
@@ -1876,41 +1878,37 @@ created."
1876 ;; highlighting; this may be too confusing in general, although it 1878 ;; highlighting; this may be too confusing in general, although it
1877 ;; happens to look good with the only current use of header-lines, 1879 ;; happens to look good with the only current use of header-lines,
1878 ;; the info browser. XXX 1880 ;; the info browser. XXX
1881 :inverse-video nil ;Override the value inherited from mode-line.
1879 :underline t) 1882 :underline t)
1880 (((class color grayscale) (background light)) 1883 (((class color grayscale) (background light))
1881 :background "grey90" :foreground "grey20" 1884 :background "grey90" :foreground "grey20"
1882 :box nil 1885 :box nil)
1883 :inherit mode-line)
1884 (((class color grayscale) (background dark)) 1886 (((class color grayscale) (background dark))
1885 :background "grey20" :foreground "grey90" 1887 :background "grey20" :foreground "grey90"
1886 :box nil 1888 :box nil)
1887 :inherit mode-line)
1888 (((class mono) (background light)) 1889 (((class mono) (background light))
1889 :background "white" :foreground "black" 1890 :background "white" :foreground "black"
1890 :inverse-video nil 1891 :inverse-video nil
1891 :box nil 1892 :box nil
1892 :underline t 1893 :underline t)
1893 :inherit mode-line)
1894 (((class mono) (background dark)) 1894 (((class mono) (background dark))
1895 :background "black" :foreground "white" 1895 :background "black" :foreground "white"
1896 :inverse-video nil 1896 :inverse-video nil
1897 :box nil 1897 :box nil
1898 :underline t 1898 :underline t))
1899 :inherit mode-line))
1900 "Basic header-line face." 1899 "Basic header-line face."
1901 :version "21.1" 1900 :version "21.1"
1902 :group 'basic-faces) 1901 :group 'basic-faces)
1903 1902
1904 1903
1905(defface tool-bar 1904(defface tool-bar
1906 '((((type x w32 mac) (class color)) 1905 '((t
1907 :box (:line-width 1 :style released-button) 1906 :box (:line-width 1 :style released-button)
1908 :background "grey75" :foreground "black") 1907 :foreground "black")
1908 (((type x w32 mac) (class color))
1909 :background "grey75")
1909 (((type x) (class mono)) 1910 (((type x) (class mono))
1910 :box (:line-width 1 :style released-button) 1911 :background "grey"))
1911 :background "grey" :foreground "black")
1912 (t
1913 ()))
1914 "Basic tool-bar face." 1912 "Basic tool-bar face."
1915 :version "21.1" 1913 :version "21.1"
1916 :group 'basic-faces) 1914 :group 'basic-faces)
diff --git a/lisp/files.el b/lisp/files.el
index 15f0f5e5179..706c6856775 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -1,6 +1,6 @@
1;;; files.el --- file input and output commands for Emacs 1;;; files.el --- file input and output commands for Emacs
2 2
3;; Copyright (C) 1985,86,87,92,93,94,95,96,97,98,99,2000,01,02,2003 3;; Copyright (C) 1985,86,87,92,93,94,95,96,97,98,99,2000,01,02,03,2004
4;;; Free Software Foundation, Inc. 4;;; Free Software Foundation, Inc.
5 5
6;; Maintainer: FSF 6;; Maintainer: FSF
@@ -2905,9 +2905,9 @@ on a DOS/Windows machine, it returns FILENAME on expanded form."
2905 (or 2905 (or
2906 ;; Test for different drives on DOS/Windows 2906 ;; Test for different drives on DOS/Windows
2907 (and 2907 (and
2908 ;; Should `cygwin' really be included here? --stef
2908 (memq system-type '(ms-dos cygwin windows-nt)) 2909 (memq system-type '(ms-dos cygwin windows-nt))
2909 (not (string-equal (substring filename 0 2) 2910 (not (eq t (compare-strings filename 0 2 directory 0 2))))
2910 (substring directory 0 2))))
2911 ;; Test for different remote file handlers 2911 ;; Test for different remote file handlers
2912 (not (eq hf hd)) 2912 (not (eq hf hd))
2913 ;; Test for different remote file system identification 2913 ;; Test for different remote file system identification
@@ -2925,21 +2925,22 @@ on a DOS/Windows machine, it returns FILENAME on expanded form."
2925 filename 2925 filename
2926 (let ((ancestor ".") 2926 (let ((ancestor ".")
2927 (filename-dir (file-name-as-directory filename))) 2927 (filename-dir (file-name-as-directory filename)))
2928 (while 2928 (while (not
2929 (and 2929 (or
2930 (not (string-match (concat "\\`" (regexp-quote directory)) 2930 (eq t (compare-strings filename-dir nil (length directory)
2931 filename-dir)) 2931 directory nil nil case-fold-search))
2932 (not (string-match (concat "\\`" (regexp-quote directory)) 2932 (eq t (compare-strings filename nil (length directory)
2933 filename))) 2933 directory nil nil case-fold-search))))
2934 (setq directory (file-name-directory (substring directory 0 -1)) 2934 (setq directory (file-name-directory (substring directory 0 -1))
2935 ancestor (if (equal ancestor ".") 2935 ancestor (if (equal ancestor ".")
2936 ".." 2936 ".."
2937 (concat "../" ancestor)))) 2937 (concat "../" ancestor))))
2938 ;; Now ancestor is empty, or .., or ../.., etc. 2938 ;; Now ancestor is empty, or .., or ../.., etc.
2939 (if (string-match (concat "^" (regexp-quote directory)) filename) 2939 (if (eq t (compare-strings filename nil (length directory)
2940 directory nil nil case-fold-search))
2940 ;; We matched within FILENAME's directory part. 2941 ;; We matched within FILENAME's directory part.
2941 ;; Add the rest of FILENAME onto ANCESTOR. 2942 ;; Add the rest of FILENAME onto ANCESTOR.
2942 (let ((rest (substring filename (match-end 0)))) 2943 (let ((rest (substring filename (length directory))))
2943 (if (and (equal ancestor ".") (not (equal rest ""))) 2944 (if (and (equal ancestor ".") (not (equal rest "")))
2944 ;; But don't bother with ANCESTOR if it would give us `./'. 2945 ;; But don't bother with ANCESTOR if it would give us `./'.
2945 rest 2946 rest
@@ -3453,6 +3454,18 @@ and second, t if reading the auto-save file.
3453 3454
3454The function you specify is responsible for updating (or preserving) point.") 3455The function you specify is responsible for updating (or preserving) point.")
3455 3456
3457(defvar buffer-stale-function nil
3458 "Function to check whether a non-file buffer needs reverting.
3459This should be a function with one optional argument NOCONFIRM.
3460Auto Revert Mode sets NOCONFIRM to t. The function should return
3461non-nil if the buffer should be reverted. The buffer is current
3462when this function is called.
3463
3464The idea behind the NOCONFIRM argument is that it should be
3465non-nil if the buffer is going to be reverted without asking the
3466user. In such situations, one has to be careful with potentially
3467time consuming operations.")
3468
3456(defvar before-revert-hook nil 3469(defvar before-revert-hook nil
3457 "Normal hook for `revert-buffer' to run before reverting. 3470 "Normal hook for `revert-buffer' to run before reverting.
3458If `revert-buffer-function' is used to override the normal revert 3471If `revert-buffer-function' is used to override the normal revert
diff --git a/lisp/finder.el b/lisp/finder.el
index 40629cab6af..dc7343b9fb0 100644
--- a/lisp/finder.el
+++ b/lisp/finder.el
@@ -1,6 +1,6 @@
1;;; finder.el --- topic & keyword-based code finder 1;;; finder.el --- topic & keyword-based code finder
2 2
3;; Copyright (C) 1992, 1997, 1998, 1999, 2001 Free Software Foundation, Inc. 3;; Copyright (C) 1992,97,98,1999,2001,2004 Free Software Foundation, Inc.
4 4
5;; Author: Eric S. Raymond <esr@snark.thyrsus.com> 5;; Author: Eric S. Raymond <esr@snark.thyrsus.com>
6;; Created: 16 Jun 1992 6;; Created: 16 Jun 1992
@@ -95,17 +95,16 @@
95 (wp . "word processing") 95 (wp . "word processing")
96 )) 96 ))
97 97
98(defvar finder-mode-map nil) 98(defvar finder-mode-map
99(or finder-mode-map 99 (let ((map (make-sparse-keymap)))
100 (let ((map (make-sparse-keymap))) 100 (define-key map " " 'finder-select)
101 (define-key map " " 'finder-select) 101 (define-key map "f" 'finder-select)
102 (define-key map "f" 'finder-select) 102 (define-key map [mouse-2] 'finder-mouse-select)
103 (define-key map [mouse-2] 'finder-mouse-select) 103 (define-key map "\C-m" 'finder-select)
104 (define-key map "\C-m" 'finder-select) 104 (define-key map "?" 'finder-summary)
105 (define-key map "?" 'finder-summary) 105 (define-key map "q" 'finder-exit)
106 (define-key map "q" 'finder-exit) 106 (define-key map "d" 'finder-list-keywords)
107 (define-key map "d" 'finder-list-keywords) 107 map))
108 (setq finder-mode-map map)))
109 108
110 109
111;;; Code for regenerating the keyword list. 110;;; Code for regenerating the keyword list.
@@ -336,13 +335,13 @@ FILE should be in a form suitable for passing to `locate-library'."
336\\[finder-select] more help for the item on the current line 335\\[finder-select] more help for the item on the current line
337\\[finder-exit] exit Finder mode and kill the Finder buffer." 336\\[finder-exit] exit Finder mode and kill the Finder buffer."
338 (interactive) 337 (interactive)
338 (kill-all-local-variables)
339 (use-local-map finder-mode-map) 339 (use-local-map finder-mode-map)
340 (set-syntax-table emacs-lisp-mode-syntax-table) 340 (set-syntax-table emacs-lisp-mode-syntax-table)
341 (setq mode-name "Finder") 341 (setq mode-name "Finder")
342 (setq major-mode 'finder-mode) 342 (setq major-mode 'finder-mode)
343 (make-local-variable 'finder-headmark) 343 (set (make-local-variable 'finder-headmark) nil)
344 (setq finder-headmark nil) 344 (run-mode-hooks 'finder-mode-hook))
345 (run-hooks 'finder-mode-hook))
346 345
347(defun finder-summary () 346(defun finder-summary ()
348 "Summarize basic Finder commands." 347 "Summarize basic Finder commands."
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog
index 0673b44bc1e..dc39720f79b 100644
--- a/lisp/gnus/ChangeLog
+++ b/lisp/gnus/ChangeLog
@@ -1,3 +1,7 @@
12004-03-27 Juanma Barranquero <lektu@terra.es>
2
3 * gnus-srvr.el (gnus-server-prepare): Remove spurious call to `cdr'.
4
12004-03-22 Stefan Monnier <monnier@iro.umontreal.ca> 52004-03-22 Stefan Monnier <monnier@iro.umontreal.ca>
2 6
3 * gnus-art.el: Use inhibit-read-only instead of buffer-read-only. 7 * gnus-art.el: Use inhibit-read-only instead of buffer-read-only.
diff --git a/lisp/gnus/gnus-srvr.el b/lisp/gnus/gnus-srvr.el
index 31ad693a544..4015916a674 100644
--- a/lisp/gnus/gnus-srvr.el
+++ b/lisp/gnus/gnus-srvr.el
@@ -219,7 +219,7 @@ The following commands are available:
219 (while alist 219 (while alist
220 (unless (member (cdar alist) done) 220 (unless (member (cdar alist) done)
221 (push (cdar alist) done) 221 (push (cdar alist) done)
222 (cdr (setq server (pop alist))) 222 (setq server (pop alist))
223 (when (and server (car server) (cdr server)) 223 (when (and server (car server) (cdr server))
224 (gnus-server-insert-server-line (car server) (cdr server)))) 224 (gnus-server-insert-server-line (car server) (cdr server))))
225 (when (member (cdar alist) done) 225 (when (member (cdar alist) done)
diff --git a/lisp/progmodes/cperl-mode.el b/lisp/progmodes/cperl-mode.el
index 155648fadb1..e13198fb240 100644
--- a/lisp/progmodes/cperl-mode.el
+++ b/lisp/progmodes/cperl-mode.el
@@ -2693,168 +2693,168 @@ and closing parentheses and brackets."
2693 (cperl-calculate-indent)) 2693 (cperl-calculate-indent))
2694 (current-indentation)))))))))))))) 2694 (current-indentation))))))))))))))
2695 2695
2696(defvar cperl-indent-alist 2696;; (defvar cperl-indent-alist
2697 '((string nil) 2697;; '((string nil)
2698 (comment nil) 2698;; (comment nil)
2699 (toplevel 0) 2699;; (toplevel 0)
2700 (toplevel-after-parenth 2) 2700;; (toplevel-after-parenth 2)
2701 (toplevel-continued 2) 2701;; (toplevel-continued 2)
2702 (expression 1)) 2702;; (expression 1))
2703 "Alist of indentation rules for CPerl mode. 2703;; "Alist of indentation rules for CPerl mode.
2704The values mean: 2704;; The values mean:
2705 nil: do not indent; 2705;; nil: do not indent;
2706 number: add this amount of indentation. 2706;; number: add this amount of indentation.
2707 2707
2708Not finished, not used.") 2708;; Not finished, not used.")
2709 2709
2710(defun cperl-where-am-i (&optional parse-start start-state) 2710;; (defun cperl-where-am-i (&optional parse-start start-state)
2711 ;; Unfinished 2711;; ;; Unfinished
2712 "Return a list of lists ((TYPE POS)...) of good points before the point. 2712;; "Return a list of lists ((TYPE POS)...) of good points before the point.
2713POS may be nil if it is hard to find, say, when TYPE is `string' or `comment'. 2713;; ;; POS may be nil if it is hard to find, say, when TYPE is `string' or `comment'.
2714 2714
2715Not finished, not used." 2715;; ;; Not finished, not used."
2716 (save-excursion 2716;; (save-excursion
2717 (let* ((start-point (point)) 2717;; (let* ((start-point (point))
2718 (s-s (cperl-get-state)) 2718;; (s-s (cperl-get-state))
2719 (start (nth 0 s-s)) 2719;; (start (nth 0 s-s))
2720 (state (nth 1 s-s)) 2720;; (state (nth 1 s-s))
2721 (prestart (nth 3 s-s)) 2721;; (prestart (nth 3 s-s))
2722 (containing-sexp (car (cdr state))) 2722;; (containing-sexp (car (cdr state)))
2723 (case-fold-search nil) 2723;; (case-fold-search nil)
2724 (res (list (list 'parse-start start) (list 'parse-prestart prestart)))) 2724;; (res (list (list 'parse-start start) (list 'parse-prestart prestart))))
2725 (cond ((nth 3 state) ; In string 2725;; (cond ((nth 3 state) ; In string
2726 (setq res (cons (list 'string nil (nth 3 state)) res))) ; What started string 2726;; (setq res (cons (list 'string nil (nth 3 state)) res))) ; What started string
2727 ((nth 4 state) ; In comment 2727;; ((nth 4 state) ; In comment
2728 (setq res (cons '(comment) res))) 2728;; (setq res (cons '(comment) res)))
2729 ((null containing-sexp) 2729;; ((null containing-sexp)
2730 ;; Line is at top level. 2730;; ;; Line is at top level.
2731 ;; Indent like the previous top level line 2731;; ;; Indent like the previous top level line
2732 ;; unless that ends in a closeparen without semicolon, 2732;; ;; unless that ends in a closeparen without semicolon,
2733 ;; in which case this line is the first argument decl. 2733;; ;; in which case this line is the first argument decl.
2734 (cperl-backward-to-noncomment (or parse-start (point-min))) 2734;; (cperl-backward-to-noncomment (or parse-start (point-min)))
2735 ;;(skip-chars-backward " \t\f\n") 2735;; ;;(skip-chars-backward " \t\f\n")
2736 (cond 2736;; (cond
2737 ((or (bobp) 2737;; ((or (bobp)
2738 (memq (preceding-char) (append ";}" nil))) 2738;; (memq (preceding-char) (append ";}" nil)))
2739 (setq res (cons (list 'toplevel start) res))) 2739;; (setq res (cons (list 'toplevel start) res)))
2740 ((eq (preceding-char) ?\) ) 2740;; ((eq (preceding-char) ?\) )
2741 (setq res (cons (list 'toplevel-after-parenth start) res))) 2741;; (setq res (cons (list 'toplevel-after-parenth start) res)))
2742 (t 2742;; (t
2743 (setq res (cons (list 'toplevel-continued start) res))))) 2743;; (setq res (cons (list 'toplevel-continued start) res)))))
2744 ((/= (char-after containing-sexp) ?{) 2744;; ((/= (char-after containing-sexp) ?{)
2745 ;; line is expression, not statement: 2745;; ;; line is expression, not statement:
2746 ;; indent to just after the surrounding open. 2746;; ;; indent to just after the surrounding open.
2747 ;; skip blanks if we do not close the expression. 2747;; ;; skip blanks if we do not close the expression.
2748 (setq res (cons (list 'expression-blanks 2748;; (setq res (cons (list 'expression-blanks
2749 (progn 2749;; (progn
2750 (goto-char (1+ containing-sexp)) 2750;; (goto-char (1+ containing-sexp))
2751 (or (looking-at "[ \t]*\\(#\\|$\\)") 2751;; (or (looking-at "[ \t]*\\(#\\|$\\)")
2752 (skip-chars-forward " \t")) 2752;; (skip-chars-forward " \t"))
2753 (point))) 2753;; (point)))
2754 (cons (list 'expression containing-sexp) res)))) 2754;; (cons (list 'expression containing-sexp) res))))
2755 ((progn 2755;; ((progn
2756 ;; Containing-expr starts with \{. Check whether it is a hash. 2756;; ;; Containing-expr starts with \{. Check whether it is a hash.
2757 (goto-char containing-sexp) 2757;; (goto-char containing-sexp)
2758 (not (cperl-block-p))) 2758;; (not (cperl-block-p)))
2759 (setq res (cons (list 'expression-blanks 2759;; (setq res (cons (list 'expression-blanks
2760 (progn 2760;; (progn
2761 (goto-char (1+ containing-sexp)) 2761;; (goto-char (1+ containing-sexp))
2762 (or (looking-at "[ \t]*\\(#\\|$\\)") 2762;; (or (looking-at "[ \t]*\\(#\\|$\\)")
2763 (skip-chars-forward " \t")) 2763;; (skip-chars-forward " \t"))
2764 (point))) 2764;; (point)))
2765 (cons (list 'expression containing-sexp) res)))) 2765;; (cons (list 'expression containing-sexp) res))))
2766 (t 2766;; (t
2767 ;; Statement level. 2767;; ;; Statement level.
2768 (setq res (cons (list 'in-block containing-sexp) res)) 2768;; (setq res (cons (list 'in-block containing-sexp) res))
2769 ;; Is it a continuation or a new statement? 2769;; ;; Is it a continuation or a new statement?
2770 ;; Find previous non-comment character. 2770;; ;; Find previous non-comment character.
2771 (cperl-backward-to-noncomment containing-sexp) 2771;; (cperl-backward-to-noncomment containing-sexp)
2772 ;; Back up over label lines, since they don't 2772;; ;; Back up over label lines, since they don't
2773 ;; affect whether our line is a continuation. 2773;; ;; affect whether our line is a continuation.
2774 ;; Back up comma-delimited lines too ????? 2774;; ;; Back up comma-delimited lines too ?????
2775 (while (or (eq (preceding-char) ?\,) 2775;; (while (or (eq (preceding-char) ?\,)
2776 (save-excursion (cperl-after-label))) 2776;; (save-excursion (cperl-after-label)))
2777 (if (eq (preceding-char) ?\,) 2777;; (if (eq (preceding-char) ?\,)
2778 ;; Will go to beginning of line, essentially 2778;; ;; Will go to beginning of line, essentially
2779 ;; Will ignore embedded sexpr XXXX. 2779;; ;; Will ignore embedded sexpr XXXX.
2780 (cperl-backward-to-start-of-continued-exp containing-sexp)) 2780;; (cperl-backward-to-start-of-continued-exp containing-sexp))
2781 (beginning-of-line) 2781;; (beginning-of-line)
2782 (cperl-backward-to-noncomment containing-sexp)) 2782;; (cperl-backward-to-noncomment containing-sexp))
2783 ;; Now we get the answer. 2783;; ;; Now we get the answer.
2784 (if (not (memq (preceding-char) (append ";}{" '(nil)))) ; Was ?\, 2784;; (if (not (memq (preceding-char) (append ";}{" '(nil)))) ; Was ?\,
2785 ;; This line is continuation of preceding line's statement. 2785;; ;; This line is continuation of preceding line's statement.
2786 (list (list 'statement-continued containing-sexp)) 2786;; (list (list 'statement-continued containing-sexp))
2787 ;; This line starts a new statement. 2787;; ;; This line starts a new statement.
2788 ;; Position following last unclosed open. 2788;; ;; Position following last unclosed open.
2789 (goto-char containing-sexp) 2789;; (goto-char containing-sexp)
2790 ;; Is line first statement after an open-brace? 2790;; ;; Is line first statement after an open-brace?
2791 (or 2791;; (or
2792 ;; If no, find that first statement and indent like 2792;; ;; If no, find that first statement and indent like
2793 ;; it. If the first statement begins with label, do 2793;; ;; it. If the first statement begins with label, do
2794 ;; not believe when the indentation of the label is too 2794;; ;; not believe when the indentation of the label is too
2795 ;; small. 2795;; ;; small.
2796 (save-excursion 2796;; (save-excursion
2797 (forward-char 1) 2797;; (forward-char 1)
2798 (let ((colon-line-end 0)) 2798;; (let ((colon-line-end 0))
2799 (while (progn (skip-chars-forward " \t\n" start-point) 2799;; (while (progn (skip-chars-forward " \t\n" start-point)
2800 (and (< (point) start-point) 2800;; (and (< (point) start-point)
2801 (looking-at 2801;; (looking-at
2802 "#\\|[a-zA-Z_][a-zA-Z0-9_]*:[^:]"))) 2802;; "#\\|[a-zA-Z_][a-zA-Z0-9_]*:[^:]")))
2803 ;; Skip over comments and labels following openbrace. 2803;; ;; Skip over comments and labels following openbrace.
2804 (cond ((= (following-char) ?\#) 2804;; (cond ((= (following-char) ?\#)
2805 ;;(forward-line 1) 2805;; ;;(forward-line 1)
2806 (end-of-line)) 2806;; (end-of-line))
2807 ;; label: 2807;; ;; label:
2808 (t 2808;; (t
2809 (save-excursion (end-of-line) 2809;; (save-excursion (end-of-line)
2810 (setq colon-line-end (point))) 2810;; (setq colon-line-end (point)))
2811 (search-forward ":")))) 2811;; (search-forward ":"))))
2812 ;; Now at the point, after label, or at start 2812;; ;; Now at the point, after label, or at start
2813 ;; of first statement in the block. 2813;; ;; of first statement in the block.
2814 (and (< (point) start-point) 2814;; (and (< (point) start-point)
2815 (if (> colon-line-end (point)) 2815;; (if (> colon-line-end (point))
2816 ;; Before statement after label 2816;; ;; Before statement after label
2817 (if (> (current-indentation) 2817;; (if (> (current-indentation)
2818 cperl-min-label-indent) 2818;; cperl-min-label-indent)
2819 (list (list 'label-in-block (point))) 2819;; (list (list 'label-in-block (point)))
2820 ;; Do not believe: `max' is involved 2820;; ;; Do not believe: `max' is involved
2821 (list 2821;; (list
2822 (list 'label-in-block-min-indent (point)))) 2822;; (list 'label-in-block-min-indent (point))))
2823 ;; Before statement 2823;; ;; Before statement
2824 (list 'statement-in-block (point)))))) 2824;; (list 'statement-in-block (point))))))
2825 ;; If no previous statement, 2825;; ;; If no previous statement,
2826 ;; indent it relative to line brace is on. 2826;; ;; indent it relative to line brace is on.
2827 ;; For open brace in column zero, don't let statement 2827;; ;; For open brace in column zero, don't let statement
2828 ;; start there too. If cperl-indent-level is zero, 2828;; ;; start there too. If cperl-indent-level is zero,
2829 ;; use cperl-brace-offset + cperl-continued-statement-offset instead. 2829;; ;; use cperl-brace-offset + cperl-continued-statement-offset instead.
2830 ;; For open-braces not the first thing in a line, 2830;; ;; For open-braces not the first thing in a line,
2831 ;; add in cperl-brace-imaginary-offset. 2831;; ;; add in cperl-brace-imaginary-offset.
2832 2832
2833 ;; If first thing on a line: ????? 2833;; ;; If first thing on a line: ?????
2834 (+ (if (and (bolp) (zerop cperl-indent-level)) 2834;; (+ (if (and (bolp) (zerop cperl-indent-level))
2835 (+ cperl-brace-offset cperl-continued-statement-offset) 2835;; (+ cperl-brace-offset cperl-continued-statement-offset)
2836 cperl-indent-level) 2836;; cperl-indent-level)
2837 ;; Move back over whitespace before the openbrace. 2837;; ;; Move back over whitespace before the openbrace.
2838 ;; If openbrace is not first nonwhite thing on the line, 2838;; ;; If openbrace is not first nonwhite thing on the line,
2839 ;; add the cperl-brace-imaginary-offset. 2839;; ;; add the cperl-brace-imaginary-offset.
2840 (progn (skip-chars-backward " \t") 2840;; (progn (skip-chars-backward " \t")
2841 (if (bolp) 0 cperl-brace-imaginary-offset)) 2841;; (if (bolp) 0 cperl-brace-imaginary-offset))
2842 ;; If the openbrace is preceded by a parenthesized exp, 2842;; ;; If the openbrace is preceded by a parenthesized exp,
2843 ;; move to the beginning of that; 2843;; ;; move to the beginning of that;
2844 ;; possibly a different line 2844;; ;; possibly a different line
2845 (progn 2845;; (progn
2846 (if (eq (preceding-char) ?\)) 2846;; (if (eq (preceding-char) ?\))
2847 (forward-sexp -1)) 2847;; (forward-sexp -1))
2848 ;; Get initial indentation of the line we are on. 2848;; ;; Get initial indentation of the line we are on.
2849 ;; If line starts with label, calculate label indentation 2849;; ;; If line starts with label, calculate label indentation
2850 (if (save-excursion 2850;; (if (save-excursion
2851 (beginning-of-line) 2851;; (beginning-of-line)
2852 (looking-at "[ \t]*[a-zA-Z_][a-zA-Z_0-9]*:[^:]")) 2852;; (looking-at "[ \t]*[a-zA-Z_][a-zA-Z_0-9]*:[^:]"))
2853 (if (> (current-indentation) cperl-min-label-indent) 2853;; (if (> (current-indentation) cperl-min-label-indent)
2854 (- (current-indentation) cperl-label-offset) 2854;; (- (current-indentation) cperl-label-offset)
2855 (cperl-calculate-indent)) 2855;; (cperl-calculate-indent))
2856 (current-indentation)))))))) 2856;; (current-indentation))))))))
2857 res))) 2857;; res)))
2858 2858
2859(defun cperl-calculate-indent-within-comment () 2859(defun cperl-calculate-indent-within-comment ()
2860 "Return the indentation amount for line, assuming that 2860 "Return the indentation amount for line, assuming that
diff --git a/lisp/ses.el b/lisp/ses.el
index 314ca603861..a5cc6bf657c 100644
--- a/lisp/ses.el
+++ b/lisp/ses.el
@@ -2658,27 +2658,6 @@ WANT-FORMULAS is non-nil. Newlines and tabs in the export text are escaped."
2658;;;; Other user commands 2658;;;; Other user commands
2659;;;---------------------------------------------------------------------------- 2659;;;----------------------------------------------------------------------------
2660 2660
2661;; This should be used by `call-interactively'.
2662(defun ses-read-number (prompt &optional default)
2663 (let ((n nil))
2664 (when default
2665 (setq prompt
2666 (if (string-match "\\(\\):[^:]*" prompt)
2667 (replace-match (format " [%s]" default) t t prompt 1)
2668 (concat prompt (format " [%s] " default)))))
2669 (while
2670 (progn
2671 (let ((str (read-from-minibuffer prompt nil nil nil nil
2672 (number-to-string default))))
2673 (setq n (cond
2674 ((zerop (length str)) default)
2675 ((stringp str) (read str)))))
2676 (unless (numberp n)
2677 (message "Please enter a number.")
2678 (sit-for 1)
2679 t)))
2680 n))
2681
2682(defun ses-unset-header-row () 2661(defun ses-unset-header-row ()
2683 "Select the default header row." 2662 "Select the default header row."
2684 (interactive) 2663 (interactive)
@@ -2694,7 +2673,7 @@ The top row is row 1. Selecting row 0 displays the default header row."
2694 (list (if (numberp current-prefix-arg) current-prefix-arg 2673 (list (if (numberp current-prefix-arg) current-prefix-arg
2695 (let ((currow (1+ (car (ses-sym-rowcol ses--curcell))))) 2674 (let ((currow (1+ (car (ses-sym-rowcol ses--curcell)))))
2696 (if current-prefix-arg 2675 (if current-prefix-arg
2697 (ses-read-number "Header row: " currow) 2676 (read-number "Header row: " currow)
2698 currow))))) 2677 currow)))))
2699 (if (or (< row 0) (> row ses--numrows)) 2678 (if (or (< row 0) (> row ses--numrows))
2700 (error "Invalid header-row")) 2679 (error "Invalid header-row"))
diff --git a/lisp/strokes.el b/lisp/strokes.el
index c6ad0c6d55a..cd3e82c4d3c 100644
--- a/lisp/strokes.el
+++ b/lisp/strokes.el
@@ -78,7 +78,7 @@
78 78
79;; however, if you would probably just have the user enter in the 79;; however, if you would probably just have the user enter in the
80;; stroke interactively and then set the stroke to whatever he/she 80;; stroke interactively and then set the stroke to whatever he/she
81;; entered. The Lisp function to interactively read a stroke is 81;; entered. The Lisp function to interactively read a stroke is
82;; `strokes-read-stroke'. This is especially helpful when you're 82;; `strokes-read-stroke'. This is especially helpful when you're
83;; on a fast computer that can handle a 9x9 stroke grid. 83;; on a fast computer that can handle a 9x9 stroke grid.
84 84
@@ -435,7 +435,9 @@ or for window START-WINDOW if that is specified."
435Operated just like `global-set-key', except for strokes. 435Operated just like `global-set-key', except for strokes.
436COMMAND is a symbol naming an interactively-callable function. STROKE 436COMMAND is a symbol naming an interactively-callable function. STROKE
437is a list of sampled positions on the stroke grid as described in the 437is a list of sampled positions on the stroke grid as described in the
438documentation for the `strokes-define-stroke' function." 438documentation for the `strokes-define-stroke' function.
439
440See also `strokes-global-set-stroke-string'."
439 (interactive 441 (interactive
440 (list 442 (list
441 (and (or strokes-mode (strokes-mode t)) 443 (and (or strokes-mode (strokes-mode t))
@@ -444,6 +446,22 @@ documentation for the `strokes-define-stroke' function."
444 (read-command "Command to map stroke to: "))) 446 (read-command "Command to map stroke to: ")))
445 (strokes-define-stroke strokes-global-map stroke command)) 447 (strokes-define-stroke strokes-global-map stroke command))
446 448
449(defun strokes-global-set-stroke-string (stroke string)
450 "Interactively give STROKE the global binding as STRING.
451Operated just like `global-set-key', except for strokes. STRING
452is a string to be inserted by the stroke. STROKE is a list of
453sampled positions on the stroke grid as described in the
454documentation for the `strokes-define-stroke' function.
455
456Compare `strokes-global-set-stroke'."
457 (interactive
458 (list
459 (and (or strokes-mode (strokes-mode t))
460 (strokes-read-complex-stroke
461 "Draw with mouse button 1 (or 2). End with button 3..."))
462 (read-string "String to map stroke to: ")))
463 (strokes-define-stroke strokes-global-map stroke string))
464
447;;(defun global-unset-stroke (stroke); FINISH THIS DEFUN! 465;;(defun global-unset-stroke (stroke); FINISH THIS DEFUN!
448;; "delete all strokes matching STROKE from `strokes-global-map', 466;; "delete all strokes matching STROKE from `strokes-global-map',
449;; letting the user input 467;; letting the user input
@@ -1319,7 +1337,9 @@ If STROKES-MAP is not given, `strokes-global-map' will be used instead."
1319 "------- ------") 1337 "------- ------")
1320 (loop for def in strokes-map do 1338 (loop for def in strokes-map do
1321 (let ((stroke (car def)) 1339 (let ((stroke (car def))
1322 (command-name (symbol-name (cdr def)))) 1340 (command-name (if (symbolp (cdr def))
1341 (symbol-name (cdr def))
1342 (prin1-to-string (cdr def)))))
1323 (strokes-xpm-for-stroke stroke " *strokes-xpm*") 1343 (strokes-xpm-for-stroke stroke " *strokes-xpm*")
1324 (newline 2) 1344 (newline 2)
1325 (insert-char ?\ 45) 1345 (insert-char ?\ 45)
@@ -1327,9 +1347,13 @@ If STROKES-MAP is not given, `strokes-global-map' will be used instead."
1327 (insert command-name) 1347 (insert command-name)
1328 (beginning-of-line) 1348 (beginning-of-line)
1329 (forward-char 45) 1349 (forward-char 45)
1330 (insert-image (create-image (with-current-buffer " *strokes-xpm*" 1350 (insert-image
1331 (buffer-string)) 1351 (create-image (with-current-buffer " *strokes-xpm*"
1332 'xpm t))) 1352 (buffer-string))
1353 'xpm t
1354 :color-symbols
1355 `(("foreground"
1356 . ,(frame-parameter nil 'foreground-color))))))
1333 finally do (kill-region (1+ (point)) (point-max))) 1357 finally do (kill-region (1+ (point)) (point-max)))
1334 (view-buffer "*Strokes List*" nil) 1358 (view-buffer "*Strokes List*" nil)
1335 (set (make-local-variable 'view-mode-map) 1359 (set (make-local-variable 'view-mode-map)
diff --git a/lisp/subr.el b/lisp/subr.el
index 0b3c3df4e8d..2c39a8447cf 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -1,6 +1,6 @@
1;;; subr.el --- basic lisp subroutines for Emacs 1;;; subr.el --- basic lisp subroutines for Emacs
2 2
3;; Copyright (C) 1985, 86, 92, 94, 95, 99, 2000, 2001, 2002, 2003 3;; Copyright (C) 1985, 86, 92, 94, 95, 99, 2000, 2001, 2002, 03, 2004
4;; Free Software Foundation, Inc. 4;; Free Software Foundation, Inc.
5 5
6;; Maintainer: FSF 6;; Maintainer: FSF
@@ -1307,6 +1307,27 @@ Optional DEFAULT is a default password to use instead of empty input."
1307 (setq pass new-pass)))))) 1307 (setq pass new-pass))))))
1308 (message nil) 1308 (message nil)
1309 (or pass default "")))) 1309 (or pass default ""))))
1310
1311;; This should be used by `call-interactively' for `n' specs.
1312(defun read-number (prompt &optional default)
1313 (let ((n nil))
1314 (when default
1315 (setq prompt
1316 (if (string-match "\\(\\):[^:]*" prompt)
1317 (replace-match (format " [%s]" default) t t prompt 1)
1318 (concat prompt (format " [%s] " default)))))
1319 (while
1320 (progn
1321 (let ((str (read-from-minibuffer prompt nil nil nil nil
1322 (number-to-string default))))
1323 (setq n (cond
1324 ((zerop (length str)) default)
1325 ((stringp str) (read str)))))
1326 (unless (numberp n)
1327 (message "Please enter a number.")
1328 (sit-for 1)
1329 t)))
1330 n))
1310 1331
1311;;; Atomic change groups. 1332;;; Atomic change groups.
1312 1333
diff --git a/lisp/vc-hooks.el b/lisp/vc-hooks.el
index 4b4b1d6f64f..e6bf15653d8 100644
--- a/lisp/vc-hooks.el
+++ b/lisp/vc-hooks.el
@@ -6,7 +6,7 @@
6;; Author: FSF (see vc.el for full credits) 6;; Author: FSF (see vc.el for full credits)
7;; Maintainer: Andre Spiegel <spiegel@gnu.org> 7;; Maintainer: Andre Spiegel <spiegel@gnu.org>
8 8
9;; $Id: vc-hooks.el,v 1.163 2004/03/23 20:59:19 monnier Exp $ 9;; $Id: vc-hooks.el,v 1.164 2004/03/26 06:06:39 spiegel Exp $
10 10
11;; This file is part of GNU Emacs. 11;; This file is part of GNU Emacs.
12 12
@@ -267,6 +267,15 @@ It is usually called via the `vc-call' macro."
267 ;; BEWARE!! `file' is evaluated twice!! 267 ;; BEWARE!! `file' is evaluated twice!!
268 `(vc-call-backend (vc-backend ,file) ',fun ,file ,@args)) 268 `(vc-call-backend (vc-backend ,file) ',fun ,file ,@args))
269 269
270(defun vc-arg-list (backend fun)
271 "Return the argument list of BACKEND function FUN."
272 (let ((f (symbol-function (vc-find-backend-function backend fun))))
273 (if (listp f)
274 ;; loaded from .el file
275 (cadr f)
276 ;; loaded from .elc file
277 (aref f 0))))
278
270 279
271(defsubst vc-parse-buffer (pattern i) 280(defsubst vc-parse-buffer (pattern i)
272 "Find PATTERN in the current buffer and return its Ith submatch." 281 "Find PATTERN in the current buffer and return its Ith submatch."
@@ -463,15 +472,12 @@ and does not employ any heuristic at all."
463(defun vc-default-workfile-unchanged-p (backend file) 472(defun vc-default-workfile-unchanged-p (backend file)
464 "Check if FILE is unchanged by diffing against the master version. 473 "Check if FILE is unchanged by diffing against the master version.
465Return non-nil if FILE is unchanged." 474Return non-nil if FILE is unchanged."
466 (let ((diff-args-length 475 (zerop (if (> (length (vc-arg-list backend 'diff)) 4)
467 (length (cadr (symbol-function 476 ;; If the implementation supports it, let the output
468 (vc-find-backend-function backend 'diff)))))) 477 ;; go to *vc*, not *vc-diff*, since this is an internal call.
469 (zerop (if (> diff-args-length 4) 478 (vc-call diff file nil nil "*vc*")
470 ;; If the implementation supports it, let the output 479 ;; for backward compatibility
471 ;; go to *vc*, not *vc-diff*, since this is an internal call. 480 (vc-call diff file))))
472 (vc-call diff file nil nil "*vc*")
473 ;; for backward compatibility
474 (vc-call diff file)))))
475 481
476(defun vc-workfile-version (file) 482(defun vc-workfile-version (file)
477 "Return the version level of the current workfile FILE. 483 "Return the version level of the current workfile FILE.
diff --git a/lisp/vc.el b/lisp/vc.el
index 929abee658d..7cceab6779c 100644
--- a/lisp/vc.el
+++ b/lisp/vc.el
@@ -7,7 +7,7 @@
7;; Maintainer: Andre Spiegel <spiegel@gnu.org> 7;; Maintainer: Andre Spiegel <spiegel@gnu.org>
8;; Keywords: tools 8;; Keywords: tools
9 9
10;; $Id: vc.el,v 1.371 2004/03/25 15:39:03 sds Exp $ 10;; $Id: vc.el,v 1.373 2004/03/26 16:17:12 monnier Exp $
11 11
12;; This file is part of GNU Emacs. 12;; This file is part of GNU Emacs.
13 13
@@ -1989,9 +1989,7 @@ See Info node `Merging'."
1989 (vc-resynch-buffer file t (not (buffer-modified-p))) 1989 (vc-resynch-buffer file t (not (buffer-modified-p)))
1990 (if (zerop status) (message "Merge successful") 1990 (if (zerop status) (message "Merge successful")
1991 (smerge-mode 1) 1991 (smerge-mode 1)
1992 (if (y-or-n-p "Conflicts detected. Resolve them now? ") 1992 (message "File contains conflicts.")))
1993 (vc-resolve-conflicts name-A name-B)
1994 (message "File contains conflict markers"))))
1995 1993
1996;;;###autoload 1994;;;###autoload
1997(defalias 'vc-resolve-conflicts 'smerge-ediff) 1995(defalias 'vc-resolve-conflicts 'smerge-ediff)
@@ -2334,19 +2332,12 @@ allowed and simply skipped)."
2334If FOCUS-REV is non-nil, leave the point at that revision." 2332If FOCUS-REV is non-nil, leave the point at that revision."
2335 (interactive) 2333 (interactive)
2336 (vc-ensure-vc-buffer) 2334 (vc-ensure-vc-buffer)
2337 (let* ((file buffer-file-name) 2335 (let ((file buffer-file-name))
2338 (backend-function
2339 (symbol-function
2340 (vc-find-backend-function (vc-backend file) 'print-log)))
2341 (print-log-args
2342 (if (byte-code-function-p backend-function)
2343 (aref backend-function 0)
2344 (cadr backend-function))))
2345 (or focus-rev (setq focus-rev (vc-workfile-version file))) 2336 (or focus-rev (setq focus-rev (vc-workfile-version file)))
2346 ;; Don't switch to the output buffer before running the command, 2337 ;; Don't switch to the output buffer before running the command,
2347 ;; so that any buffer-local settings in the vc-controlled 2338 ;; so that any buffer-local settings in the vc-controlled
2348 ;; buffer can be accessed by the command. 2339 ;; buffer can be accessed by the command.
2349 (if (cdr print-log-args) 2340 (if (> (length (vc-arg-list (vc-backend file) 'print-log)) 1)
2350 (progn 2341 (progn
2351 (vc-call print-log file "*vc-change-log*") 2342 (vc-call print-log file "*vc-change-log*")
2352 (set-buffer "*vc-change-log*")) 2343 (set-buffer "*vc-change-log*"))
diff --git a/lisp/woman.el b/lisp/woman.el
index d25f60f58c1..d69c631f27b 100644
--- a/lisp/woman.el
+++ b/lisp/woman.el
@@ -3239,7 +3239,7 @@ If optional arg CONCAT is non-nil then join arguments."
3239 ;; Paragraph .LP/PP/HP/IP/TP and font .B/.BI etc. macros reset font. 3239 ;; Paragraph .LP/PP/HP/IP/TP and font .B/.BI etc. macros reset font.
3240 ;; Should .SH/.SS reset font? 3240 ;; Should .SH/.SS reset font?
3241 ;; Font size setting macros (?) should reset font. 3241 ;; Font size setting macros (?) should reset font.
3242 (let ((woman-font-alist woman-font-alist) ; for local updating 3242 (let ((font-alist woman-font-alist) ; for local updating
3243 (previous-pos (point)) 3243 (previous-pos (point))
3244 (previous-font 'default) 3244 (previous-font 'default)
3245 (current-font 'default)) 3245 (current-font 'default))
@@ -3270,15 +3270,15 @@ If optional arg CONCAT is non-nil then join arguments."
3270 ;; Get font name: 3270 ;; Get font name:
3271 (or font 3271 (or font
3272 (let ((fontstring (match-string 0))) 3272 (let ((fontstring (match-string 0)))
3273 (setq font (assoc fontstring woman-font-alist) 3273 (setq font (assoc fontstring font-alist)
3274 ;; NB: woman-font-alist contains VARIABLE NAMES. 3274 ;; NB: font-alist contains VARIABLE NAMES.
3275 font (if font 3275 font (if font
3276 (cdr font) 3276 (cdr font)
3277 (WoMan-warn "Unknown font %s." fontstring) 3277 (WoMan-warn "Unknown font %s." fontstring)
3278 ;; Output this message once only per call ... 3278 ;; Output this message once only per call ...
3279 (setq woman-font-alist 3279 (setq font-alist
3280 (cons (cons fontstring 'woman-unknown-face) 3280 (cons (cons fontstring 'woman-unknown-face)
3281 woman-font-alist)) 3281 font-alist))
3282 'woman-unknown-face) 3282 'woman-unknown-face)
3283 ))) 3283 )))
3284 ;; Delete font control line or escape sequence: 3284 ;; Delete font control line or escape sequence:
diff --git a/src/ChangeLog b/src/ChangeLog
index ce03ac5ccda..357060188a5 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,19 +1,21 @@
12004-03-26 Kim F. Storm <storm@cua.dk>
2
3 * xdisp.c (syms_of_xdisp): Include `void-variable' in list_of_error
4 to catch errors in calc_pixel_width_or_height during redisplay.
5
12004-03-26 Masatake YAMATO <jet@gyve.org> 62004-03-26 Masatake YAMATO <jet@gyve.org>
2 7
3 * insdel.c (adjust_markers_for_insert): Call 8 * buffer.c (fix_start_end_in_overlays): Rename fix_overlays_in_range.
4 fix_start_end_in_overlays.
5 9
6 * buffer.c (fix_start_end_in_overlays): Rename 10 * lisp.h (fix_start_end_in_overlays): Likewise.
7 fix_overlays_in_range.
8 11
9 * editfns.c (Ftranspose_regions): Likewise. 12 * insdel.c (adjust_markers_for_insert): Call fix_start_end_in_overlays.
10 13
11 * lisp.h (top_level): Likewise. 14 * editfns.c (Ftranspose_regions): Likewise.
12 15
132004-03-20 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> 162004-03-20 Jan Dj,Ad(Brv <jan.h.d@swipnet.se>
14 17
15 * xterm.c (handle_one_xevent): Do not pass key press events to 18 * xterm.c (handle_one_xevent): Do not pass key press events to GTK.
16 GTK.
17 19
182004-03-19 Richard M. Stallman <rms@gnu.org> 202004-03-19 Richard M. Stallman <rms@gnu.org>
19 21
@@ -65,8 +67,7 @@
65 67
662004-03-14 Steven Tamm <steventamm@mac.com> 682004-03-14 Steven Tamm <steventamm@mac.com>
67 69
68 * Makefile.in (XMENU_OBJ): Do not include xmenu.o if 70 * Makefile.in (XMENU_OBJ) [HAVE_CARBON]: Do not include xmenu.o.
69 HAVE_CARBON is defined.
70 71
712004-03-14 Kim F. Storm <storm@cua.dk> 722004-03-14 Kim F. Storm <storm@cua.dk>
72 73
diff --git a/src/xdisp.c b/src/xdisp.c
index 8fd0763590a..d5e49f744cf 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -315,7 +315,7 @@ Lisp_Object Vshow_trailing_whitespace;
315extern Lisp_Object Voverflow_newline_into_fringe; 315extern Lisp_Object Voverflow_newline_into_fringe;
316 316
317/* Test if overflow newline into fringe. Called with iterator IT 317/* Test if overflow newline into fringe. Called with iterator IT
318 at or past right window margin, and with IT->current_x set. */ 318 at or past right window margin, and with IT->current_x set. */
319 319
320#define IT_OVERFLOW_NEWLINE_INTO_FRINGE(it) \ 320#define IT_OVERFLOW_NEWLINE_INTO_FRINGE(it) \
321 (!NILP (Voverflow_newline_into_fringe) \ 321 (!NILP (Voverflow_newline_into_fringe) \
@@ -407,7 +407,7 @@ Lisp_Object Vglobal_mode_string;
407 407
408/* List of variables (symbols) which hold markers for overlay arrows. 408/* List of variables (symbols) which hold markers for overlay arrows.
409 The symbols on this list are examined during redisplay to determine 409 The symbols on this list are examined during redisplay to determine
410 where to display overlay arrows. */ 410 where to display overlay arrows. */
411 411
412Lisp_Object Voverlay_arrow_variable_list; 412Lisp_Object Voverlay_arrow_variable_list;
413 413
@@ -8363,7 +8363,7 @@ update_tool_bar (f, save_match_data)
8363 /* Redisplay the tool-bar if we changed it. */ 8363 /* Redisplay the tool-bar if we changed it. */
8364 if (! NILP (Fequal (old_tool_bar, f->tool_bar_items))) 8364 if (! NILP (Fequal (old_tool_bar, f->tool_bar_items)))
8365 w->update_mode_line = Qt; 8365 w->update_mode_line = Qt;
8366 8366
8367 UNGCPRO; 8367 UNGCPRO;
8368 8368
8369 unbind_to (count, Qnil); 8369 unbind_to (count, Qnil);
@@ -9462,7 +9462,7 @@ overlay_arrow_at_row (f, row, pbitmap)
9462 continue; 9462 continue;
9463 9463
9464 val = find_symbol_value (var); 9464 val = find_symbol_value (var);
9465 9465
9466 if (MARKERP (val) 9466 if (MARKERP (val)
9467 && current_buffer == XMARKER (val)->buffer 9467 && current_buffer == XMARKER (val)->buffer
9468 && (MATRIX_ROW_START_CHARPOS (row) == marker_position (val))) 9468 && (MATRIX_ROW_START_CHARPOS (row) == marker_position (val)))
@@ -11352,7 +11352,7 @@ set_vertical_scroll_bar (w)
11352 which reflect the whole buffer size, with special markers 11352 which reflect the whole buffer size, with special markers
11353 indicating narrowing, and scrollbars which reflect only the 11353 indicating narrowing, and scrollbars which reflect only the
11354 visible region. 11354 visible region.
11355 11355
11356 Note that mini-buffers sometimes aren't displaying any text. */ 11356 Note that mini-buffers sometimes aren't displaying any text. */
11357 if (!MINI_WINDOW_P (w) 11357 if (!MINI_WINDOW_P (w)
11358 || (w == XWINDOW (minibuf_window) 11358 || (w == XWINDOW (minibuf_window)
@@ -11364,7 +11364,7 @@ set_vertical_scroll_bar (w)
11364 /* I don't think this is guaranteed to be right. For the 11364 /* I don't think this is guaranteed to be right. For the
11365 moment, we'll pretend it is. */ 11365 moment, we'll pretend it is. */
11366 end = BUF_Z (buf) - XFASTINT (w->window_end_pos) - BUF_BEGV (buf); 11366 end = BUF_Z (buf) - XFASTINT (w->window_end_pos) - BUF_BEGV (buf);
11367 11367
11368 if (end < start) 11368 if (end < start)
11369 end = start; 11369 end = start;
11370 if (whole < (end - start)) 11370 if (whole < (end - start))
@@ -16701,7 +16701,7 @@ invisible_p (propval, list)
16701/* Calculate a width or height in pixels from a specification using 16701/* Calculate a width or height in pixels from a specification using
16702 the following elements: 16702 the following elements:
16703 16703
16704 SPEC ::= 16704 SPEC ::=
16705 NUM - a (fractional) multiple of the default font width/height 16705 NUM - a (fractional) multiple of the default font width/height
16706 (NUM) - specifies exactly NUM pixels 16706 (NUM) - specifies exactly NUM pixels
16707 UNIT - a fixed number of pixels, see below. 16707 UNIT - a fixed number of pixels, see below.
@@ -16711,7 +16711,7 @@ invisible_p (propval, list)
16711 (- SPEC SPEC ...) - subtract pixel values 16711 (- SPEC SPEC ...) - subtract pixel values
16712 (- SPEC) - negate pixel value 16712 (- SPEC) - negate pixel value
16713 16713
16714 NUM ::= 16714 NUM ::=
16715 INT or FLOAT - a number constant 16715 INT or FLOAT - a number constant
16716 SYMBOL - use symbol's (buffer local) variable binding. 16716 SYMBOL - use symbol's (buffer local) variable binding.
16717 16717
@@ -16737,15 +16737,15 @@ invisible_p (propval, list)
16737 Examples: 16737 Examples:
16738 16738
16739 Pixels corresponding to 5 inches: 16739 Pixels corresponding to 5 inches:
16740 (5 . in) 16740 (5 . in)
16741 16741
16742 Total width of non-text areas on left side of window (if scroll-bar is on left): 16742 Total width of non-text areas on left side of window (if scroll-bar is on left):
16743 '(space :width (+ left-fringe left-margin scroll-bar)) 16743 '(space :width (+ left-fringe left-margin scroll-bar))
16744 16744
16745 Align to first text column (in header line): 16745 Align to first text column (in header line):
16746 '(space :align-to 0) 16746 '(space :align-to 0)
16747 16747
16748 Align to middle of text area minus half the width of variable `my-image' 16748 Align to middle of text area minus half the width of variable `my-image'
16749 containing a loaded image: 16749 containing a loaded image:
16750 '(space :align-to (0.5 . (- text my-image))) 16750 '(space :align-to (0.5 . (- text my-image)))
16751 16751
@@ -18313,7 +18313,7 @@ produce_stretch_glyph (it)
18313 && calc_pixel_width_or_height (&tem, it, prop, font, 1, &align_to)) 18313 && calc_pixel_width_or_height (&tem, it, prop, font, 1, &align_to))
18314 { 18314 {
18315 if (it->glyph_row == NULL || !it->glyph_row->mode_line_p) 18315 if (it->glyph_row == NULL || !it->glyph_row->mode_line_p)
18316 align_to = (align_to < 0 18316 align_to = (align_to < 0
18317 ? 0 18317 ? 0
18318 : align_to - window_box_left_offset (it->w, TEXT_AREA)); 18318 : align_to - window_box_left_offset (it->w, TEXT_AREA));
18319 else if (align_to < 0) 18319 else if (align_to < 0)
@@ -20196,7 +20196,7 @@ on_hot_spot_p (hot_spot, x, y)
20196 int x0, y0; 20196 int x0, y0;
20197 20197
20198 /* Need an even number of coordinates, and at least 3 edges. */ 20198 /* Need an even number of coordinates, and at least 3 edges. */
20199 if (n < 6 || n & 1) 20199 if (n < 6 || n & 1)
20200 return 0; 20200 return 0;
20201 20201
20202 /* Count edge segments intersecting line from (X,Y) to (X,infinity). 20202 /* Count edge segments intersecting line from (X,Y) to (X,infinity).
@@ -20246,13 +20246,13 @@ find_hot_spot (map, x, y)
20246 return XCAR (map); 20246 return XCAR (map);
20247 map = XCDR (map); 20247 map = XCDR (map);
20248 } 20248 }
20249 20249
20250 return Qnil; 20250 return Qnil;
20251} 20251}
20252 20252
20253DEFUN ("lookup-image-map", Flookup_image_map, Slookup_image_map, 20253DEFUN ("lookup-image-map", Flookup_image_map, Slookup_image_map,
20254 3, 3, 0, 20254 3, 3, 0,
20255 doc: /* Lookup in image map MAP coordinates X and Y. 20255 doc: /* Lookup in image map MAP coordinates X and Y.
20256An image map is an alist where each element has the format (AREA ID PLIST). 20256An image map is an alist where each element has the format (AREA ID PLIST).
20257An AREA is specified as either a rectangle, a circle, or a polygon: 20257An AREA is specified as either a rectangle, a circle, or a polygon:
20258A rectangle is a cons (rect . ((x0 . y0) . (x1 . y1))) specifying the 20258A rectangle is a cons (rect . ((x0 . y0) . (x1 . y1))) specifying the
@@ -21125,13 +21125,13 @@ phys_cursor_in_rect_p (w, r)
21125 cursor_glyph = get_phys_cursor_glyph (w); 21125 cursor_glyph = get_phys_cursor_glyph (w);
21126 if (cursor_glyph) 21126 if (cursor_glyph)
21127 { 21127 {
21128 /* r is relative to W's box, but w->phys_cursor.x is relative 21128 /* r is relative to W's box, but w->phys_cursor.x is relative
21129 to left edge of W's TEXT area. Adjust it. */ 21129 to left edge of W's TEXT area. Adjust it. */
21130 cr.x = window_box_left_offset (w, TEXT_AREA) + w->phys_cursor.x; 21130 cr.x = window_box_left_offset (w, TEXT_AREA) + w->phys_cursor.x;
21131 cr.y = w->phys_cursor.y; 21131 cr.y = w->phys_cursor.y;
21132 cr.width = cursor_glyph->pixel_width; 21132 cr.width = cursor_glyph->pixel_width;
21133 cr.height = w->phys_cursor_height; 21133 cr.height = w->phys_cursor_height;
21134 /* ++KFS: W32 version used W32-specific IntersectRect here, but 21134 /* ++KFS: W32 version used W32-specific IntersectRect here, but
21135 I assume the effect is the same -- and this is portable. */ 21135 I assume the effect is the same -- and this is portable. */
21136 return x_intersect_rectangles (&cr, r, &result); 21136 return x_intersect_rectangles (&cr, r, &result);
21137 } 21137 }
@@ -21151,7 +21151,7 @@ x_draw_vertical_border (w)
21151 struct frame *f = XFRAME (WINDOW_FRAME (w)); 21151 struct frame *f = XFRAME (WINDOW_FRAME (w));
21152 21152
21153 /* We could do better, if we knew what type of scroll-bar the adjacent 21153 /* We could do better, if we knew what type of scroll-bar the adjacent
21154 windows (on either side) have... But we don't :-( 21154 windows (on either side) have... But we don't :-(
21155 However, I think this works ok. ++KFS 2003-04-25 */ 21155 However, I think this works ok. ++KFS 2003-04-25 */
21156 21156
21157 /* Redraw borders between horizontally adjacent windows. Don't 21157 /* Redraw borders between horizontally adjacent windows. Don't
@@ -21642,7 +21642,9 @@ syms_of_xdisp ()
21642 Qinhibit_free_realized_faces = intern ("inhibit-free-realized-faces"); 21642 Qinhibit_free_realized_faces = intern ("inhibit-free-realized-faces");
21643 staticpro (&Qinhibit_free_realized_faces); 21643 staticpro (&Qinhibit_free_realized_faces);
21644 21644
21645 list_of_error = Fcons (intern ("error"), Qnil); 21645 list_of_error = Fcons (Fcons (intern ("error"),
21646 Fcons (intern ("void-variable"), Qnil)),
21647 Qnil);
21646 staticpro (&list_of_error); 21648 staticpro (&list_of_error);
21647 21649
21648 Qlast_arrow_position = intern ("last-arrow-position"); 21650 Qlast_arrow_position = intern ("last-arrow-position");
@@ -21698,7 +21700,7 @@ The face used for trailing whitespace is `trailing-whitespace'. */);
21698 DEFVAR_LISP ("void-text-area-pointer", &Vvoid_text_area_pointer, 21700 DEFVAR_LISP ("void-text-area-pointer", &Vvoid_text_area_pointer,
21699 doc: /* *The pointer shape to show in void text areas. 21701 doc: /* *The pointer shape to show in void text areas.
21700Nil means to show the text pointer. Other options are `arrow', `text', 21702Nil means to show the text pointer. Other options are `arrow', `text',
21701`hand', `vdrag', `hdrag', `modeline', and `hourglass'. */); 21703`hand', `vdrag', `hdrag', `modeline', and `hourglass'. */);
21702 Vvoid_text_area_pointer = Qarrow; 21704 Vvoid_text_area_pointer = Qarrow;
21703 21705
21704 DEFVAR_LISP ("inhibit-redisplay", &Vinhibit_redisplay, 21706 DEFVAR_LISP ("inhibit-redisplay", &Vinhibit_redisplay,