aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorMiles Bader2005-09-11 22:21:01 +0000
committerMiles Bader2005-09-11 22:21:01 +0000
commitff8d296438e69b8cf701d95b6ccd271c416c46fd (patch)
tree44b388101b40592656ad4c5033aabe2a1ae4b462 /lisp
parent389cb481135145b80a679beec8cdc8fed75682c5 (diff)
parenta8f6d239d2d541ec874a22000e0542c20fd55a67 (diff)
downloademacs-ff8d296438e69b8cf701d95b6ccd271c416c46fd.tar.gz
emacs-ff8d296438e69b8cf701d95b6ccd271c416c46fd.zip
Revision: miles@gnu.org--gnu-2005/emacs--unicode--0--patch-81
Merge from emacs--cvs-trunk--0 Patches applied: * emacs--cvs-trunk--0 (patch 532-541) - Update from CVS - Merge from gnus--rel--5.10 * gnus--rel--5.10 (patch 112-115) - Update from CVS
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog220
-rw-r--r--lisp/ChangeLog.92
-rw-r--r--lisp/buff-menu.el55
-rw-r--r--lisp/calc/calc-poly.el45
-rw-r--r--lisp/cus-start.el9
-rw-r--r--lisp/descr-text.el3
-rw-r--r--lisp/disp-table.el6
-rw-r--r--lisp/emacs-lisp/authors.el3
-rw-r--r--lisp/font-lock.el10
-rw-r--r--lisp/gnus/ChangeLog38
-rw-r--r--lisp/gnus/ChangeLog.24
-rw-r--r--lisp/gnus/gnus-agent.el2
-rw-r--r--lisp/gnus/gnus-art.el9
-rw-r--r--lisp/gnus/mm-view.el18
-rw-r--r--lisp/gnus/mml-smime.el2
-rw-r--r--lisp/gnus/nnweb.el22
-rw-r--r--lisp/gnus/spam-report.el47
-rw-r--r--lisp/mail/sendmail.el5
-rw-r--r--lisp/menu-bar.el61
-rw-r--r--lisp/mh-e/ChangeLog12
-rw-r--r--lisp/mouse.el9
-rw-r--r--lisp/msb.el2
-rw-r--r--lisp/net/tramp.el13
-rw-r--r--lisp/progmodes/delphi.el1
-rw-r--r--lisp/progmodes/flymake.el3
-rw-r--r--lisp/progmodes/make-mode.el4
-rw-r--r--lisp/progmodes/octave-inf.el6
-rw-r--r--lisp/progmodes/perl-mode.el4
-rw-r--r--lisp/progmodes/sh-script.el7
-rw-r--r--lisp/recentf.el79
-rw-r--r--lisp/simple.el164
-rw-r--r--lisp/smerge-mode.el2
-rw-r--r--lisp/textmodes/ispell.el5
-rw-r--r--lisp/textmodes/page.el2
-rw-r--r--lisp/vc.el5
-rw-r--r--lisp/woman.el167
36 files changed, 723 insertions, 323 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index a0256150af9..b0e895a3707 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,6 +1,187 @@
12005-09-05 Chong Yidong <cyd@stupidchicken.com> 12005-09-11 Kim F. Storm <storm@cua.dk>
2
3 * emacs-lisp/authors.el (authors-aliases): Update list.
4 (authors-fixed-entries): Update mldrag.el entry.
5
62005-09-10 Alan Mackenzie <acm@muc.de>
7
8 * page.el (narrow-to-page): Exclude _entire_ multi-line delimiter
9 from the region narrowed to.
10
112005-09-10 Magnus Henoch <mange@freemail.hu>
12
13 * textmodes/ispell.el (ispell-check-version): Signal an error if
14 aspell version is less than 0.60.
15
162005-09-10 Pascal Dupuis <Pascal.Dupuis@esat.kuleuven.be> (tiny change)
17
18 * progmodes/octave-inf.el (inferior-octave-startup): Resync
19 current dir at the end.
20
212005-09-10 Emilio C. Lopes <eclig@gmx.net>
22
23 * woman.el (woman-topic-at-point-default): Renamed to
24 woman-use-topic-at-point-default.
25 (woman-topic-at-point): Renamed to woman-use-topic-at-point.
26 (woman-file-name): Reflect renames above. Automatically use the
27 word at point as topic if woman-use-topic-at-point is non-nil.
28 Otherwise offer it as default but don't insert it in the
29 minibuffer. Also use `test-completion' instead of `assoc' as
30 suggested by Stefan Monnier.
31
322005-09-10 Andre Spiegel <spiegel@gnu.org>
33
34 * vc.el (vc-directory, vc-update-change-log): Throw an error on
35 the attempt to do it over Tramp. This is not yet supported.
36
372005-09-10 Eli Zaretskii <eliz@gnu.org>
38
39 * menu-bar.el (menu-bar-menu-frame-live-and-visible-p)
40 (menu-bar-non-minibuffer-window-p): New functions.
41 ("Split Window", "Save As..."): Use them.
42 ("Postscript Print Buffer (B+W)", "Postscript Print Buffer")
43 ("Print Buffer", "Truncate Long Lines in this Buffer"): Use
44 menu-bar-menu-frame-live-and-visible-p.
45 ("Save Buffer", "Insert File", "Open Directory...")
46 ("Open File...", "Visit New File..."): Use
47 menu-bar-non-minibuffer-window-p.
48 (kill-this-buffer-enabled-p, dired <menu-enable>): Use
49 menu-bar-non-minibuffer-window-p.
50
512005-09-09 Eli Zaretskii <eliz@gnu.org>
52
53 * cus-start.el (all): Don't complain about fringe-related
54 built-ins if fringes are not supported. Ditto about
55 selection-related built-ins. Fix the test for GTK-related
56 built-ins.
57
58 * menu-bar.el ("Split Window", "Postscript Print Buffer (B+W)")
59 ("Postscript Print Buffer", "Print Region", "Save As...")
60 ("Save", "Insert File...", "Open Directory...")
61 ("Open File...", "Visit New File..."")
62 ("Truncate Long Lines in this Buffer"): Don't look at
63 menu-updating-frame if this display does not support multiple
64 frames.
65
662005-09-09 Frederik Fouvry <fouvry@CoLi.Uni-SB.DE>
67
68 * mail/sendmail.el (default-sendmail-coding-system): Doc fix.
69
702005-09-09 Emilio Lopes <eclig@gmx.net>
71
72 * woman.el: Format- and whitespace-related changes.
73
742005-09-09 Eli Zaretskii <eliz@gnu.org>
75
76 * woman.el: Fix my email address.
77
782005-09-08 Richard M. Stallman <rms@gnu.org>
79
80 * progmodes/sh-script.el (sh-skeleton-pair-default-alist): New var.
81 (sh-mode): Locally set skeleton-pair-default-alist.
82
83 * progmodes/make-mode.el (makefile-add-log-defun): Trim the result.
84
85 * progmodes/flymake.el: Require `compile' unconditionally.
86
87 * mail/sendmail.el (send-mail-function): Add Mailclient alternative.
88
89 * woman.el (woman-file-name): Provide a default, not initial input.
90
91 * smerge-mode.el (smerge-resolve): Pass args to smerge-remove-props.
92
93 * font-lock.el (font-lock-support-mode): Doc fix.
2 94
3 * custom.el (custom-push-theme): Fix last change. 95 * descr-text.el (describe-property-list): Handle non-symbol prop names.
96
972005-09-06 Stefan Monnier <monnier@iro.umontreal.ca>
98
99 * net/ange-ftp.el (ange-ftp-process-filter): Revert to ^#+$.
100 Use with-current-buffer.
101 (ange-ftp-gwp-start): Remove unused var `gw-user'.
102 (ange-ftp-guess-hash-mark-size): Remove unused var `result'.
103 (ange-ftp-insert-directory): Remove unused var `short'.
104 (ange-ftp-file-name-sans-versions): Remove unused var `host-type'.
105
1062005-08-30 Richard M. Stallman <rms@gnu.org>
107
108 * simple.el (blink-matching-open): Get rid of text props from
109 the string shown in echo area. Don't permanently set point.
110 Some rearrangements.
111
112 * files.el (risky-local-variable-p):
113 Match `-predicates' and `-commands.
114
115 * cus-edit.el (custom-buffer-sort-alphabetically): Default to t.
116 (custom-save-all): Visit the file if necessary;
117 kill the buffer if we created it.
118 (custom-save-delete): Don't visit file or kill buffer here.
119
1202005-09-08 Reiner Steib <Reiner.Steib@gmx.de>
121
122 * recentf.el (recentf-filename-handler): Add custom choice
123 `abbreviate-file-name'.
124
125 * msb.el (msb--very-many-menus): Fix typo.
126
127 * disp-table.el (standard-display-european): Don't set
128 enable-multibyte-characters to nil.
129
1302005-09-08 David Ponce <david@dponce.com>
131
132 * recentf.el (recentf-show-file-shortcuts-flag): New option.
133 (recentf-expand-file-name): Doc fix.
134 (recentf-dialog-mode-map): Define digit shortcuts.
135 (recentf--files-with-key): New variable.
136 (recentf-show-digit-shortcut-filter): New function.
137 (recentf-open-files-items): New function.
138 (recentf-open-files): Use it.
139 (recentf-open-file-with-key): New command.
140
1412005-09-07 Michael Albinus <michael.albinus@gmx.de>
142
143 * woman.el (top): Remap `man' command by `woman' in `woman-mode-map'.
144 (Man-getpage-in-background-advice): Remove defadvice; it isn't
145 necessary any longer with the remapped command.
146 (Man-bgproc-sentinel-advice): Remove defadvice which counts
147 formatting time only.
148
149 * net/tramp.el (tramp-action-password)
150 (tramp-multi-action-password): Compile the password prompt from
151 `method', `user' and `host'. Sometimes it isn't obvious which
152 password to enter, for example with remote files offered by
153 recentf.el, or with multiple steps. Suggested by Robert Marshall
154 <robert@chezmarshall.freeserve.co.uk>.
155
1562005-09-07 Stefan Monnier <monnier@iro.umontreal.ca>
157
158 * progmodes/perl-mode.el (perl-font-lock-syntactic-keywords):
159 Fix regexp for when "s///" is at the beginning of line.
160
1612005-09-07 Jay Belanger <belanger@truman.edu>
162
163 * calc/calc-poly.el (math-expand-term): Multiply out any powers
164 when in matrix mode.
165
1662005-09-08 Chong Yidong <cyd@stupidchicken.com>
167
168 * buff-menu.el (Buffer-menu-sort-by-column): New function.
169 Suggested by Kim F. Storm.
170 (Buffer-menu-sort-button-map): Global keymap for sort buttons.
171 (Buffer-menu-make-sort-button): Use global keymap.
172
1732005-09-06 Stefan Monnier <monnier@iro.umontreal.ca>
174
175 * buff-menu.el (Buffer-menu-make-sort-button): Add docstrings, use
176 non-anonymous functions.
177
1782005-09-06 Chong Yidong <cyd@stupidchicken.com>
179
180 * buff-menu.el (Buffer-menu-make-sort-button): Allow mouse-1 clicks
181 when using a header line. Otherwise, use mouse-1-click-follows-link.
182
183 * mouse.el (mouse-drag-header-line): Do nothing if the header-line
184 can't be moved; don't signal an error.
4 185
52005-09-05 Chong Yidong <cyd@stupidchicken.com> 1862005-09-05 Chong Yidong <cyd@stupidchicken.com>
6 187
@@ -11,8 +192,7 @@
11 (custom-push-theme): Save old values in the standard theme. 192 (custom-push-theme): Save old values in the standard theme.
12 (disable-theme): Correct typo. 193 (disable-theme): Correct typo.
13 (custom-face-theme-value) Deleted unused function. 194 (custom-face-theme-value) Deleted unused function.
14 (custom-theme-recalc-face): Rewritten to treat enable/disable 195 (custom-theme-recalc-face): Rewritten to treat enable/disable properly.
15 properly.
16 196
172005-09-05 Stefan Monnier <monnier@iro.umontreal.ca> 1972005-09-05 Stefan Monnier <monnier@iro.umontreal.ca>
18 198
@@ -211,6 +391,16 @@
211 (tramp-advice-make-auto-save-file-name): Make defadvice only when 391 (tramp-advice-make-auto-save-file-name): Make defadvice only when
212 `make-auto-save-file-name' is not a magic file name operation. 392 `make-auto-save-file-name' is not a magic file name operation.
213 393
3942005-08-30 Richard M. Stallman <rms@gnu.org>
395
396 * files.el (risky-local-variable-p):
397 Match `-predicates' and `-commands.
398
399 * cus-edit.el (custom-buffer-sort-alphabetically): Default to t.
400 (custom-save-all): Visit the file if necessary;
401 kill the buffer if we created it.
402 (custom-save-delete): Don't visit file or kill buffer here.
403
2142005-08-30 Carsten Dominik <dominik@science.uva.nl> 4042005-08-30 Carsten Dominik <dominik@science.uva.nl>
215 405
216 * textmodes/org.el (org-special-keyword): New face. 406 * textmodes/org.el (org-special-keyword): New face.
@@ -762,7 +952,7 @@
762 952
7632005-08-15 David Ponce <david@dponce.com> 9532005-08-15 David Ponce <david@dponce.com>
764 954
765 * tree-widget.el Update Commentary header. 955 * tree-widget.el: Update Commentary header.
766 (tree-widget-theme): Doc fix. 956 (tree-widget-theme): Doc fix.
767 (tree-widget-space-width): New option. 957 (tree-widget-space-width): New option.
768 (tree-widget-image-properties): Look up in the default theme too. 958 (tree-widget-image-properties): Look up in the default theme too.
@@ -2420,7 +2610,7 @@
2420 2610
2421 * ediff-ptch.el (ediff-file-name-sans-prefix): Quote regexp. 2611 * ediff-ptch.el (ediff-file-name-sans-prefix): Quote regexp.
2422 2612
2423 * ediff-init: Get rid of -face in face names. 2613 * ediff-init.el: Get rid of -face in face names.
2424 2614
24252005-07-10 Richard M. Stallman <rms@gnu.org> 26152005-07-10 Richard M. Stallman <rms@gnu.org>
2426 2616
@@ -8631,18 +8821,16 @@
8631 8821
86322005-03-25 Werner Lemberg <wl@gnu.org> 88222005-03-25 Werner Lemberg <wl@gnu.org>
8633 8823
8634 * calc/calc-forms.el, calc/calc-sel: Replace `illegal' with `invalid'. 8824 * calc/calc-forms.el, calc/calc-sel.el:
8635 * midnight.el, vc-cvs.el: Replace `illegal' with `invalid'. 8825 * midnight.el, vc-cvs.el:
8636 * emacs-lisp/cl-macs.el: Replace `illegal' with `invalid'. 8826 * emacs-lisp/cl-macs.el:
8637 * emulation/vip.el: Replace `illegal' with `invalid'. 8827 * emulation/vip.el:
8638 * eshell/esh-io.el, eshell/esh-var.el: Replace `illegal' with 8828 * eshell/esh-io.el, eshell/esh-var.el:
8639 `invalid'. 8829 * mail/supercite.el:
8640 * mail/supercite.el: Replace `illegal' with `invalid'.
8641 * progmodes/ebnf-abn.el, progmodes/ebnf-bnf.el 8830 * progmodes/ebnf-abn.el, progmodes/ebnf-bnf.el
8642 * progmodes/ebnf-ebx.el, progmodes/ebnf-dtd.el, progmodes/ebnf-iso.el 8831 * progmodes/ebnf-ebx.el, progmodes/ebnf-dtd.el, progmodes/ebnf-iso.el
8643 * progmodes/ebnf-yac.el, progmodes/ebnf2ps.el, progmodes/idlwave.el 8832 * progmodes/ebnf-yac.el, progmodes/ebnf2ps.el, progmodes/idlwave.el
8644 * progmodes/sh-script.el, progmodes/xscheme.el: 8833 * progmodes/sh-script.el, progmodes/xscheme.el:
8645 Replace `illegal' with `invalid'.
8646 * textmodes/refbib.el, textmodes/refer.el, textmodes/reftex-cite.el 8834 * textmodes/refbib.el, textmodes/refer.el, textmodes/reftex-cite.el
8647 * textmodes/reftex-index.el, textmodes/reftex-parse.el 8835 * textmodes/reftex-index.el, textmodes/reftex-parse.el
8648 * textmodes/reftex-ref.el, textmodes/reftex-vars.el 8836 * textmodes/reftex-ref.el, textmodes/reftex-vars.el
@@ -8807,7 +8995,7 @@
8807 8995
88082005-03-22 Jay Belanger <belanger@truman.edu> 89962005-03-22 Jay Belanger <belanger@truman.edu>
8809 8997
8810 * calc/calc-embed (calc-embedded-original-modes): New variable. 8998 * calc/calc-embed.el (calc-embedded-original-modes): New variable.
8811 (calc-embedded-save-original-modes) 8999 (calc-embedded-save-original-modes)
8812 (calc-embedded-restore-original-modes): New functions. 9000 (calc-embedded-restore-original-modes): New functions.
8813 (calc-do-embedded): Save original modes when entering embedded mode 9001 (calc-do-embedded): Save original modes when entering embedded mode
@@ -18626,7 +18814,7 @@
18626 18814
186272004-05-09 Jason Rumney <jasonr@gnu.org> 188152004-05-09 Jason Rumney <jasonr@gnu.org>
18628 18816
18629 * international/code-pages (cp932, cp936, cp949, c950): Remove. 18817 * international/code-pages.el (cp932, cp936, cp949, c950): Remove.
18630 Only define cp125* if windows-125* is already defined. 18818 Only define cp125* if windows-125* is already defined.
18631 18819
18632 * language/korean.el (cp949): Add alias. 18820 * language/korean.el (cp949): Add alias.
diff --git a/lisp/ChangeLog.9 b/lisp/ChangeLog.9
index a0688eefe37..6bd0b347c30 100644
--- a/lisp/ChangeLog.9
+++ b/lisp/ChangeLog.9
@@ -1127,7 +1127,7 @@
1127 1127
1128 * isearch.el (isearch-intersects-p): Fix end checks. 1128 * isearch.el (isearch-intersects-p): Fix end checks.
1129 1129
11302001-09-11 Eli Zaretskii <a34785@is.elta.co.il> 11302001-09-11 Eli Zaretskii <eliz@is.elta.co.il>
1131 1131
1132 * gud.el (dbx) <gud-dbx-use-stopformat-p>: Move this case into the 1132 * gud.el (dbx) <gud-dbx-use-stopformat-p>: Move this case into the
1133 `t' branch of `cond', since Irix 6.1 and up is a special case of 1133 `t' branch of `cond', since Irix 6.1 and up is a special case of
diff --git a/lisp/buff-menu.el b/lisp/buff-menu.el
index 9418eebe98f..4c45847df0f 100644
--- a/lisp/buff-menu.el
+++ b/lisp/buff-menu.el
@@ -633,35 +633,40 @@ For more information, see the function `buffer-menu'."
633 (insert m2))) 633 (insert m2)))
634 (forward-line))))) 634 (forward-line)))))
635 635
636(defun Buffer-menu-sort-by-column (&optional e)
637 "Sort the buffer menu by the column clicked on."
638 (interactive (list last-input-event))
639 (if e (mouse-select-window e))
640 (let* ((pos (event-start e))
641 (obj (posn-object pos))
642 (col (if obj
643 (get-text-property (cdr obj) 'column (car obj))
644 (get-text-property (posn-point pos) 'column))))
645 (Buffer-menu-sort col)))
646
647(defvar Buffer-menu-sort-button-map
648 (let ((map (make-sparse-keymap)))
649 ;; This keymap handles both nil and non-nil values for
650 ;; Buffer-menu-use-header-line.
651 (define-key map [header-line mouse-1] 'Buffer-menu-sort-by-column)
652 (define-key map [header-line mouse-2] 'Buffer-menu-sort-by-column)
653 (define-key map [mouse-2] 'Buffer-menu-sort-by-column)
654 (define-key map [follow-link] 'mouse-face)
655 (define-key map "\C-m" 'Buffer-menu-sort-by-column)
656 map)
657 "Local keymap for Buffer menu sort buttons.")
658
636(defun Buffer-menu-make-sort-button (name column) 659(defun Buffer-menu-make-sort-button (name column)
637 (if (equal column Buffer-menu-sort-column) (setq column nil)) 660 (if (equal column Buffer-menu-sort-column) (setq column nil))
638 (propertize name 661 (propertize name
639 'help-echo (if column 662 'column column
640 (if Buffer-menu-use-header-line 663 'help-echo (concat
641 (concat "mouse-2: sort by " (downcase name)) 664 (if Buffer-menu-use-header-line
642 (concat "mouse-2, RET: sort by " 665 "mouse-1, mouse-2: sort by "
643 (downcase name))) 666 "mouse-2, RET: sort by ")
644 (if Buffer-menu-use-header-line 667 (if column (downcase name) "visited order"))
645 "mouse-2: sort by visited order"
646 "mouse-2, RET: sort by visited order"))
647 'mouse-face 'highlight 668 'mouse-face 'highlight
648 'keymap (let ((map (make-sparse-keymap))) 669 'keymap Buffer-menu-sort-button-map))
649 (if Buffer-menu-use-header-line
650 (define-key map [header-line mouse-2]
651 `(lambda (e)
652 (interactive "e")
653 (save-window-excursion
654 (if e (mouse-select-window e))
655 (Buffer-menu-sort ,column))))
656 (define-key map [mouse-2]
657 `(lambda (e)
658 (interactive "e")
659 (if e (mouse-select-window e))
660 (Buffer-menu-sort ,column)))
661 (define-key map "\C-m"
662 `(lambda () (interactive)
663 (Buffer-menu-sort ,column))))
664 map)))
665 670
666(defun list-buffers-noselect (&optional files-only buffer-list) 671(defun list-buffers-noselect (&optional files-only buffer-list)
667 "Create and return a buffer with a list of names of existing buffers. 672 "Create and return a buffer with a list of names of existing buffers.
diff --git a/lisp/calc/calc-poly.el b/lisp/calc/calc-poly.el
index 3dd19b6f67a..e27705de98a 100644
--- a/lisp/calc/calc-poly.el
+++ b/lisp/calc/calc-poly.el
@@ -1069,18 +1069,45 @@
1069 (math-add-or-sub (list '/ (nth 1 (nth 1 expr)) (nth 2 expr)) 1069 (math-add-or-sub (list '/ (nth 1 (nth 1 expr)) (nth 2 expr))
1070 (list '/ (nth 2 (nth 1 expr)) (nth 2 expr)) 1070 (list '/ (nth 2 (nth 1 expr)) (nth 2 expr))
1071 nil (eq (car (nth 1 expr)) '-))) 1071 nil (eq (car (nth 1 expr)) '-)))
1072 ((and (eq calc-matrix-mode 'matrix)
1073 (eq (car-safe expr) '^)
1074 (natnump (nth 2 expr))
1075 (> (nth 2 expr) 1)
1076 (memq (car-safe (nth 1 expr)) '(+ -)))
1077 (if (= (nth 2 expr) 2)
1078 (math-add-or-sub (list '* (nth 1 (nth 1 expr)) (nth 1 expr))
1079 (list '* (nth 2 (nth 1 expr)) (nth 1 expr))
1080 nil (eq (car (nth 1 expr)) '-))
1081 (math-add-or-sub (list '* (nth 1 (nth 1 expr)) (list '^ (nth 1 expr)
1082 (1- (nth 2 expr))))
1083 (list '* (nth 2 (nth 1 expr)) (list '^ (nth 1 expr)
1084 (1- (nth 2 expr))))
1085 nil (eq (car (nth 1 expr)) '-))))
1072 ((and (eq (car-safe expr) '^) 1086 ((and (eq (car-safe expr) '^)
1073 (memq (car-safe (nth 1 expr)) '(+ -)) 1087 (memq (car-safe (nth 1 expr)) '(+ -))
1074 (integerp (nth 2 expr)) 1088 (integerp (nth 2 expr))
1075 (if (> (nth 2 expr) 0) 1089 (if (and (eq calc-matrix-mode 'matrix)
1076 (or (and (or (> math-mt-many 500000) (< math-mt-many -500000)) 1090 (> (nth 2 expr) 1))
1077 (math-expand-power (nth 1 expr) (nth 2 expr) 1091 (if (= (nth 2 expr) 2)
1078 nil t)) 1092 (math-add-or-sub (list '* (nth 1 (nth 1 expr)) (nth 1 expr))
1079 (list '* 1093 (list '* (nth 2 (nth 1 expr)) (nth 1 expr))
1080 (nth 1 expr) 1094 nil (eq (car (nth 1 expr)) '-))
1081 (list '^ (nth 1 expr) (1- (nth 2 expr))))) 1095 (math-add-or-sub (list '* (nth 1 (nth 1 expr))
1082 (if (< (nth 2 expr) 0) 1096 (list '^ (nth 1 expr)
1083 (list '/ 1 (list '^ (nth 1 expr) (- (nth 2 expr)))))))) 1097 (1- (nth 2 expr))))
1098 (list '* (nth 2 (nth 1 expr))
1099 (list '^ (nth 1 expr)
1100 (1- (nth 2 expr))))
1101 nil (eq (car (nth 1 expr)) '-)))
1102 (if (> (nth 2 expr) 0)
1103 (or (and (or (> math-mt-many 500000) (< math-mt-many -500000))
1104 (math-expand-power (nth 1 expr) (nth 2 expr)
1105 nil t))
1106 (list '*
1107 (nth 1 expr)
1108 (list '^ (nth 1 expr) (1- (nth 2 expr)))))
1109 (if (< (nth 2 expr) 0)
1110 (list '/ 1 (list '^ (nth 1 expr) (- (nth 2 expr)))))))))
1084 (t expr))) 1111 (t expr)))
1085 1112
1086(defun calcFunc-expand (expr &optional many) 1113(defun calcFunc-expand (expr &optional many)
diff --git a/lisp/cus-start.el b/lisp/cus-start.el
index 71565963e3d..87393e43ff7 100644
--- a/lisp/cus-start.el
+++ b/lisp/cus-start.el
@@ -369,9 +369,16 @@ since it could result in memory overflow and make Emacs crash."
369 ((string-match "\\`w32-" (symbol-name symbol)) 369 ((string-match "\\`w32-" (symbol-name symbol))
370 (eq system-type 'windows-nt)) 370 (eq system-type 'windows-nt))
371 ((string-match "\\`x-.*gtk" (symbol-name symbol)) 371 ((string-match "\\`x-.*gtk" (symbol-name symbol))
372 (or (boundp 'gtk) (not (eq system-type 'windows-nt)))) 372 (or (boundp 'gtk)
373 (and window-system
374 (not (eq window-system 'pc))
375 (not (eq system-type 'windows-nt)))))
373 ((string-match "\\`x-" (symbol-name symbol)) 376 ((string-match "\\`x-" (symbol-name symbol))
374 (fboundp 'x-create-frame)) 377 (fboundp 'x-create-frame))
378 ((string-match "selection" (symbol-name symbol))
379 (fboundp 'x-selection-exists-p))
380 ((string-match "fringe" (symbol-name symbol))
381 (fboundp 'define-fringe-bitmap))
375 (t t)))) 382 (t t))))
376 (if (not (boundp symbol)) 383 (if (not (boundp symbol))
377 ;; If variables are removed from C code, give an error here! 384 ;; If variables are removed from C code, give an error here!
diff --git a/lisp/descr-text.el b/lisp/descr-text.el
index 5ca9aa08093..cf6ac6ac4ad 100644
--- a/lisp/descr-text.el
+++ b/lisp/descr-text.el
@@ -108,7 +108,8 @@ into widget buttons that call `describe-text-category' or
108 (while properties 108 (while properties
109 (push (list (pop properties) (pop properties)) ret)) 109 (push (list (pop properties) (pop properties)) ret))
110 ret) 110 ret)
111 (lambda (a b) (string< (nth 0 a) (nth 0 b))))) 111 (lambda (a b) (string< (prin1-to-string (nth 0 a) t)
112 (prin1-to-string (nth 0 b) t)))))
112 (let ((key (nth 0 elt)) 113 (let ((key (nth 0 elt))
113 (value (nth 1 elt))) 114 (value (nth 1 elt)))
114 (widget-insert (propertize (format " %-20s " key) 115 (widget-insert (propertize (format " %-20s " key)
diff --git a/lisp/disp-table.el b/lisp/disp-table.el
index 87b3eb5057a..f7052013bae 100644
--- a/lisp/disp-table.el
+++ b/lisp/disp-table.el
@@ -220,8 +220,10 @@ for users who call this function in `.emacs'."
220 (unless (or (memq window-system '(x w32))) 220 (unless (or (memq window-system '(x w32)))
221 (and (terminal-coding-system) 221 (and (terminal-coding-system)
222 (set-terminal-coding-system nil)))) 222 (set-terminal-coding-system nil))))
223 ;; Turn off multibyte chars for more compatibility. 223
224 (setq-default enable-multibyte-characters nil) 224 (display-warning 'i18n
225 "`standard-display-european' is semi-obsolete"
226 :warning)
225 227
226 ;; Switch to Latin-1 language environment 228 ;; Switch to Latin-1 language environment
227 ;; unless some other has been specified. 229 ;; unless some other has been specified.
diff --git a/lisp/emacs-lisp/authors.el b/lisp/emacs-lisp/authors.el
index ec5446eef38..437332baec9 100644
--- a/lisp/emacs-lisp/authors.el
+++ b/lisp/emacs-lisp/authors.el
@@ -78,6 +78,7 @@ files.")
78 ("Jay K. Adams" "jka@ece.cmu.edu" "Jay Adams") 78 ("Jay K. Adams" "jka@ece.cmu.edu" "Jay Adams")
79 ("J,Ai(Br,At(Bme Marant" "J,bi(Br,bt(Bme Marant" "Jerome Marant") 79 ("J,Ai(Br,At(Bme Marant" "J,bi(Br,bt(Bme Marant" "Jerome Marant")
80 ("Jens-Ulrik Holger Petersen" "Jens-Ulrik Petersen") 80 ("Jens-Ulrik Holger Petersen" "Jens-Ulrik Petersen")
81 ("Johan Bockg,Ae(Brd" "Johan Bockgard")
81 ("John W. Eaton" "John Eaton") 82 ("John W. Eaton" "John Eaton")
82 ("Jonathan I. Kamens" "Jonathan Kamens") 83 ("Jonathan I. Kamens" "Jonathan Kamens")
83 ("Joseph Arceneaux" "Joe Arceneaux") 84 ("Joseph Arceneaux" "Joe Arceneaux")
@@ -195,7 +196,7 @@ Changes to files in this list are not listed.")
195 ("Michael K. Johnson" :changed "configure.in" "emacs.c" "intel386.h" 196 ("Michael K. Johnson" :changed "configure.in" "emacs.c" "intel386.h"
196 "mem-limits.h" "process.c" "template.h" "sysdep.c" "syssignal.h" "systty.h" "unexec.c" 197 "mem-limits.h" "process.c" "template.h" "sysdep.c" "syssignal.h" "systty.h" "unexec.c"
197 "ymakefile" "linux.h") 198 "ymakefile" "linux.h")
198 ("Kyle E. Jones" :wrote "mldrag.el") 199 ("Kyle Jones" :wrote "mldrag.el")
199 ("Henry Kautz" :wrote "bib-mode.el") 200 ("Henry Kautz" :wrote "bib-mode.el")
200 ("Joseph M. Kelsey" :changed "fileio.c" "vms-pwd.h" "vmsfns.c" "dir.h" 201 ("Joseph M. Kelsey" :changed "fileio.c" "vms-pwd.h" "vmsfns.c" "dir.h"
201 "uaf.h") 202 "uaf.h")
diff --git a/lisp/font-lock.el b/lisp/font-lock.el
index 38ea3aa029d..21e25ac8a54 100644
--- a/lisp/font-lock.el
+++ b/lisp/font-lock.el
@@ -846,9 +846,13 @@ happens, so the major mode can be corrected."
846(defcustom font-lock-support-mode 'jit-lock-mode 846(defcustom font-lock-support-mode 'jit-lock-mode
847 "*Support mode for Font Lock mode. 847 "*Support mode for Font Lock mode.
848Support modes speed up Font Lock mode by being choosy about when fontification 848Support modes speed up Font Lock mode by being choosy about when fontification
849occurs. Known support modes are Fast Lock mode (symbol `fast-lock-mode'), 849occurs. The default support mode, Just-in-time Lock mode (symbol
850Lazy Lock mode (symbol `lazy-lock-mode'), and Just-in-time Lock mode (symbol 850`jit-lock-mode'), is recommended.
851`jit-lock-mode'. See those modes for more info. 851
852Other, older support modes are Fast Lock mode (symbol `fast-lock-mode') and
853Lazy Lock mode (symbol `lazy-lock-mode'). See those modes for more info.
854However, they are no longer recommended, as Just-in-time Lock mode is better.
855
852If nil, means support for Font Lock mode is never performed. 856If nil, means support for Font Lock mode is never performed.
853If a symbol, use that support mode. 857If a symbol, use that support mode.
854If a list, each element should be of the form (MAJOR-MODE . SUPPORT-MODE), 858If a list, each element should be of the form (MAJOR-MODE . SUPPORT-MODE),
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog
index 530758aefb0..96052e04c12 100644
--- a/lisp/gnus/ChangeLog
+++ b/lisp/gnus/ChangeLog
@@ -1,3 +1,37 @@
12005-09-10 Reiner Steib <Reiner.Steib@gmx.de>
2
3 * spam-report.el (spam-report-gmane): Fix generation of spam
4 report URL.
5
62005-09-10 Simon Josefsson <jas@extundo.com>
7
8 * gnus-agent.el (gnus-agent-synchronize-flags): Make the default
9 t, based on discussion on the ding list with Robert Epprecht
10 <epprecht@solnet.ch>.
11
122005-09-07 Reiner Steib <Reiner.Steib@gmx.de>
13
14 * spam-report.el (spam-report-gmane): Make it work without
15 X-Report-Spam header. Gmane now only provides Archived-At. This
16 is only used if `spam-report-gmane-use-article-number' is nil.
17 (spam-report-gmane-spam-header): Removed. Not used anymore.
18
19 * nnweb.el (nnweb-google-wash-article): Print a message if article
20 is not available.
21
222005-09-07 TSUCHIYA Masatoshi <tsuchiya@namazu.org>
23
24 * gnus-art.el (gnus-mime-display-single): Decode text/* parts
25 content before displaying.
26
272005-09-06 Reiner Steib <Reiner.Steib@gmx.de>
28
29 * mml-smime.el: Remove defvar of gnus-extract-address-components.
30
312005-09-06 Katsumi Yamaoka <yamaoka@jpl.org>
32
33 * mm-view.el (mm-display-inline-fontify): Disable support modes.
34
12005-09-05 Reiner Steib <Reiner.Steib@gmx.de> 352005-09-05 Reiner Steib <Reiner.Steib@gmx.de>
2 36
3 * message.el (message-tab-body-function): Fixed mismatched custom 37 * message.el (message-tab-body-function): Fixed mismatched custom
@@ -5,7 +39,7 @@
5 39
6 * gnus.el (gnus-group-change-level-function): Ditto. 40 * gnus.el (gnus-group-change-level-function): Ditto.
7 41
8 * gnus-msg.el (gnus-outgoing-message-group): Ditto. 42 * gnus-msg.el (gnus-outgoing-message-group): Ditto.
9 43
10 * gnus-art.el (gnus-signature-limit) 44 * gnus-art.el (gnus-signature-limit)
11 (gnus-article-mime-part-function): Ditto. 45 (gnus-article-mime-part-function): Ditto.
@@ -237,8 +271,6 @@
237 * gnus-util.el (gnus-beginning-of-window): Remove. 271 * gnus-util.el (gnus-beginning-of-window): Remove.
238 (gnus-end-of-window): Remove. 272 (gnus-end-of-window): Remove.
239 273
240 * lpath.el: Don't bind scroll-margin.
241
2422005-07-25 Simon Josefsson <jas@extundo.com> 2742005-07-25 Simon Josefsson <jas@extundo.com>
243 275
244 * pgg.el (pgg-insert-url-with-w3): Don't load w3, it is possible 276 * pgg.el (pgg-insert-url-with-w3): Don't load w3, it is possible
diff --git a/lisp/gnus/ChangeLog.2 b/lisp/gnus/ChangeLog.2
index 5d7a608054e..f39bf525db8 100644
--- a/lisp/gnus/ChangeLog.2
+++ b/lisp/gnus/ChangeLog.2
@@ -7658,7 +7658,7 @@
7658 7658
7659 * spam.el: more compilation fixes for BBDB 7659 * spam.el: more compilation fixes for BBDB
7660 7660
7661 * spam-stat.el added code from Alex Schroeder <alex@gnu.org> 7661 * spam-stat.el: added code from Alex Schroeder <alex@gnu.org>
7662 (spam-stat-reduce-size): Interactive. 7662 (spam-stat-reduce-size): Interactive.
7663 (spam-stat-reset): New function. 7663 (spam-stat-reset): New function.
7664 (spam-stat-save): Interactive. 7664 (spam-stat-save): Interactive.
@@ -12404,7 +12404,7 @@
12404 12404
124052001-12-05 Katsumi Yamaoka <yamaoka@jpl.org> 124052001-12-05 Katsumi Yamaoka <yamaoka@jpl.org>
12406 12406
12407 * mm-view.wl (mm-inline-text): Decode a charset-encoded rich text. 12407 * mm-view.el (mm-inline-text): Decode a charset-encoded rich text.
12408 12408
124092001-12-04 08:00:00 ShengHuo ZHU <zsh@cs.rochester.edu> 124092001-12-04 08:00:00 ShengHuo ZHU <zsh@cs.rochester.edu>
12410 12410
diff --git a/lisp/gnus/gnus-agent.el b/lisp/gnus/gnus-agent.el
index ea45a139ab0..47d1dfd7364 100644
--- a/lisp/gnus/gnus-agent.el
+++ b/lisp/gnus/gnus-agent.el
@@ -115,7 +115,7 @@ If nil, only read articles will be expired."
115 :group 'gnus-agent 115 :group 'gnus-agent
116 :type 'function) 116 :type 'function)
117 117
118(defcustom gnus-agent-synchronize-flags nil 118(defcustom gnus-agent-synchronize-flags t
119 "Indicate if flags are synchronized when you plug in. 119 "Indicate if flags are synchronized when you plug in.
120If this is `ask' the hook will query the user." 120If this is `ask' the hook will query the user."
121 :version "21.1" 121 :version "21.1"
diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el
index b07954772d2..3bdc93935bc 100644
--- a/lisp/gnus/gnus-art.el
+++ b/lisp/gnus/gnus-art.el
@@ -4862,7 +4862,14 @@ If displaying \"text/html\" is discouraged \(see
4862 (forward-line -1) 4862 (forward-line -1)
4863 (setq beg (point))) 4863 (setq beg (point)))
4864 (gnus-article-insert-newline) 4864 (gnus-article-insert-newline)
4865 (mm-insert-inline handle (mm-get-part handle)) 4865 (mm-insert-inline handle
4866 (let ((charset
4867 (mail-content-type-get
4868 (mm-handle-type handle) 'charset)))
4869 (if (eq charset 'gnus-decoded)
4870 (mm-get-part handle)
4871 (mm-decode-string (mm-get-part handle)
4872 charset))))
4866 (goto-char (point-max)))) 4873 (goto-char (point-max))))
4867 ;; Do highlighting. 4874 ;; Do highlighting.
4868 (save-excursion 4875 (save-excursion
diff --git a/lisp/gnus/mm-view.el b/lisp/gnus/mm-view.el
index 2d78ccab864..ac408aa179f 100644
--- a/lisp/gnus/mm-view.el
+++ b/lisp/gnus/mm-view.el
@@ -476,14 +476,16 @@
476 (buffer-disable-undo) 476 (buffer-disable-undo)
477 (mm-insert-part handle) 477 (mm-insert-part handle)
478 (require 'font-lock) 478 (require 'font-lock)
479 ;; Inhibit font-lock this time (*-mode-hook might run 479 (let ((font-lock-maximum-size nil)
480 ;; `turn-on-font-lock') so that jit-lock may not turn off 480 ;; Disable support modes, e.g., jit-lock, lazy-lock, etc.
481 ;; font-lock immediately after this. 481 (font-lock-mode-hook nil)
482 (let ((font-lock-mode t)) 482 (font-lock-support-mode nil)
483 (funcall mode)) 483 ;; I find font-lock a bit too verbose.
484 (let ((font-lock-verbose nil)) 484 (font-lock-verbose nil))
485 ;; I find font-lock a bit too verbose. 485 (funcall mode)
486 (font-lock-fontify-buffer)) 486 ;; The mode function might have already turned on font-lock.
487 (unless (symbol-value 'font-lock-mode)
488 (font-lock-fontify-buffer)))
487 ;; By default, XEmacs font-lock uses non-duplicable text 489 ;; By default, XEmacs font-lock uses non-duplicable text
488 ;; properties. This code forces all the text properties 490 ;; properties. This code forces all the text properties
489 ;; to be copied along with the text. 491 ;; to be copied along with the text.
diff --git a/lisp/gnus/mml-smime.el b/lisp/gnus/mml-smime.el
index 25cb3094cbb..2933c14744a 100644
--- a/lisp/gnus/mml-smime.el
+++ b/lisp/gnus/mml-smime.el
@@ -29,8 +29,6 @@
29 29
30(eval-when-compile (require 'cl)) 30(eval-when-compile (require 'cl))
31 31
32(defvar gnus-extract-address-components)
33
34(require 'smime) 32(require 'smime)
35(require 'mm-decode) 33(require 'mm-decode)
36(autoload 'message-narrow-to-headers "message") 34(autoload 'message-narrow-to-headers "message")
diff --git a/lisp/gnus/nnweb.el b/lisp/gnus/nnweb.el
index 85c8d4c5239..d3737cd66fd 100644
--- a/lisp/gnus/nnweb.el
+++ b/lisp/gnus/nnweb.el
@@ -319,12 +319,22 @@ Valid types include `google', `dejanews', and `gmane'.")
319 ;; We have Google's masked e-mail addresses here. :-/ 319 ;; We have Google's masked e-mail addresses here. :-/
320 (let ((case-fold-search t)) 320 (let ((case-fold-search t))
321 (goto-char (point-min)) 321 (goto-char (point-min))
322 (delete-region (point-min) 322 (if (save-excursion
323 (1+ (re-search-forward "^<pre>" nil t))) 323 (or (re-search-forward "The requested message.*could not be found."
324 (goto-char (point-min)) 324 nil t)
325 (delete-region (- (re-search-forward "^</pre>" nil t) (length "</pre>")) 325 (not (and (re-search-forward "^<pre>" nil t)
326 (point-max)) 326 (re-search-forward "^</pre>" nil t)))))
327 (mm-url-decode-entities))) 327 ;; FIXME: Don't know how to indicate "not found".
328 ;; Should this function throw an error? --rsteib
329 (progn
330 (gnus-message 3 "Requested article not found")
331 (erase-buffer))
332 (delete-region (point-min)
333 (1+ (re-search-forward "^<pre>" nil t)))
334 (goto-char (point-min))
335 (delete-region (- (re-search-forward "^</pre>" nil t) (length "</pre>"))
336 (point-max))
337 (mm-url-decode-entities))))
328 338
329(defun nnweb-google-parse-1 (&optional Message-ID) 339(defun nnweb-google-parse-1 (&optional Message-ID)
330 (let ((i 0) 340 (let ((i 0)
diff --git a/lisp/gnus/spam-report.el b/lisp/gnus/spam-report.el
index 50a564885bb..173306ec55e 100644
--- a/lisp/gnus/spam-report.el
+++ b/lisp/gnus/spam-report.el
@@ -49,12 +49,6 @@ instead."
49 (regexp :value "^nntp\+.*:gmane\.")) 49 (regexp :value "^nntp\+.*:gmane\."))
50 :group 'spam-report) 50 :group 'spam-report)
51 51
52(defcustom spam-report-gmane-spam-header
53 "^X-Report-Spam: http://\\([^/]+\\)\\(.*\\)$"
54 "String matching Gmane spam-reporting header. Two match groups are needed."
55 :type 'regexp
56 :group 'spam-report)
57
58(defcustom spam-report-gmane-use-article-number t 52(defcustom spam-report-gmane-use-article-number t
59 "Whether the article number (faster!) or the header should be used." 53 "Whether the article number (faster!) or the header should be used."
60 :type 'boolean 54 :type 'boolean
@@ -103,19 +97,42 @@ undo that change.")
103 article)) 97 article))
104 (with-current-buffer nntp-server-buffer 98 (with-current-buffer nntp-server-buffer
105 (gnus-request-head article gnus-newsgroup-name) 99 (gnus-request-head article gnus-newsgroup-name)
106 (goto-char (point-min)) 100 (let ((case-fold-search t)
107 (if (re-search-forward spam-report-gmane-spam-header nil t) 101 field host report url)
108 (let* ((host (match-string 1)) 102 ;; First check for X-Report-Spam because it's more specific to
109 (report (match-string 2)) 103 ;; spam reporting than Archived-At. OTOH, all new articles on
110 (url (format "http://%s%s" host report))) 104 ;; Gmane don't have X-Report-Spam anymore (unless Lars changes his
111 (gnus-message 7 "Reporting spam through URL %s..." url) 105 ;; mind :-)).
112 (spam-report-url-ping host report)) 106 ;;
113 (gnus-message 3 "Could not find X-Report-Spam in article %d..." 107 ;; There might be more than one Archived-At header so we need to
114 article))))))) 108 ;; find (and transform) the one related to Gmane.
109 (setq field (or (gnus-fetch-field "X-Report-Spam")
110 (gnus-fetch-field "Archived-At")))
111 (setq host (progn
112 (string-match
113 (concat "http://\\([a-z]+\\.gmane\\.org\\)"
114 "\\(/[^:/]+[:/][0-9]+\\)")
115 field)
116 (match-string 1 field)))
117 (setq report (match-string 2 field))
118 (when (string-equal "permalink.gmane.org" host)
119 (setq host "spam.gmane.org")
120 (setq report (gnus-replace-in-string
121 report "/\\([0-9]+\\)$" ":\\1")))
122 (setq url (format "http://%s%s" host report))
123 (if (not (and host report url))
124 (gnus-message
125 3 "Could not find a spam report header in article %d..."
126 article)
127 (gnus-message 7 "Reporting spam through URL %s..." url)
128 (spam-report-url-ping host report))))))))
115 129
116(defun spam-report-url-ping (host report) 130(defun spam-report-url-ping (host report)
117 "Ping a host through HTTP, addressing a specific GET resource using 131 "Ping a host through HTTP, addressing a specific GET resource using
118the function specified by `spam-report-url-ping-function'." 132the function specified by `spam-report-url-ping-function'."
133 ;; Example:
134 ;; host: "spam.gmane.org"
135 ;; report: "/gmane.some.group:123456"
119 (funcall spam-report-url-ping-function host report)) 136 (funcall spam-report-url-ping-function host report))
120 137
121(defun spam-report-url-ping-plain (host report) 138(defun spam-report-url-ping-plain (host report)
diff --git a/lisp/mail/sendmail.el b/lisp/mail/sendmail.el
index b7ea845f8ae..4255788605f 100644
--- a/lisp/mail/sendmail.el
+++ b/lisp/mail/sendmail.el
@@ -130,6 +130,7 @@ This is used by the default mail-sending commands. See also
130 :type '(radio (function-item sendmail-send-it :tag "Use Sendmail package") 130 :type '(radio (function-item sendmail-send-it :tag "Use Sendmail package")
131 (function-item smtpmail-send-it :tag "Use SMTPmail package") 131 (function-item smtpmail-send-it :tag "Use SMTPmail package")
132 (function-item feedmail-send-it :tag "Use Feedmail package") 132 (function-item feedmail-send-it :tag "Use Feedmail package")
133 (function-item mailclient-send-it :tag "Use Mailclient package")
133 function) 134 function)
134 :group 'sendmail) 135 :group 'sendmail)
135 136
@@ -886,9 +887,9 @@ See also the function `select-message-coding-system'.")
886 "Default coding system for encoding the outgoing mail. 887 "Default coding system for encoding the outgoing mail.
887This variable is used only when `sendmail-coding-system' is nil. 888This variable is used only when `sendmail-coding-system' is nil.
888 889
889This variable is set/changed by the command set-language-environment. 890This variable is set/changed by the command `set-language-environment'.
890User should not set this variable manually, 891User should not set this variable manually,
891instead use sendmail-coding-system to get a constant encoding 892instead use `sendmail-coding-system' to get a constant encoding
892of outgoing mails regardless of the current language environment. 893of outgoing mails regardless of the current language environment.
893See also the function `select-message-coding-system'.") 894See also the function `select-message-coding-system'.")
894 895
diff --git a/lisp/menu-bar.el b/lisp/menu-bar.el
index 302ede8c8ff..401513c3583 100644
--- a/lisp/menu-bar.el
+++ b/lisp/menu-bar.el
@@ -105,10 +105,8 @@ A large number or nil slows down menu responsiveness."
105 105
106(define-key menu-bar-file-menu [split-window] 106(define-key menu-bar-file-menu [split-window]
107 '(menu-item "Split Window" split-window-vertically 107 '(menu-item "Split Window" split-window-vertically
108 :enable (and (frame-live-p menu-updating-frame) 108 :enable (and (menu-bar-menu-frame-live-and-visible-p)
109 (frame-visible-p menu-updating-frame ) 109 (menu-bar-non-minibuffer-window-p))
110 (not (window-minibuffer-p
111 (frame-selected-window menu-updating-frame))))
112 :help "Split selected window in two windows")) 110 :help "Split selected window in two windows"))
113 111
114(define-key menu-bar-file-menu [separator-window] 112(define-key menu-bar-file-menu [separator-window]
@@ -120,8 +118,7 @@ A large number or nil slows down menu responsiveness."
120 :help "Pretty-print marked region in black and white to PostScript printer")) 118 :help "Pretty-print marked region in black and white to PostScript printer"))
121(define-key menu-bar-file-menu [ps-print-buffer] 119(define-key menu-bar-file-menu [ps-print-buffer]
122 '(menu-item "Postscript Print Buffer (B+W)" ps-print-buffer 120 '(menu-item "Postscript Print Buffer (B+W)" ps-print-buffer
123 :enable (and (frame-live-p menu-updating-frame) 121 :enable (menu-bar-menu-frame-live-and-visible-p)
124 (frame-visible-p menu-updating-frame ))
125 :help "Pretty-print current buffer in black and white to PostScript printer")) 122 :help "Pretty-print current buffer in black and white to PostScript printer"))
126(define-key menu-bar-file-menu [ps-print-region-faces] 123(define-key menu-bar-file-menu [ps-print-region-faces]
127 '(menu-item "Postscript Print Region" ps-print-region-with-faces 124 '(menu-item "Postscript Print Region" ps-print-region-with-faces
@@ -129,8 +126,7 @@ A large number or nil slows down menu responsiveness."
129 :help "Pretty-print marked region to PostScript printer")) 126 :help "Pretty-print marked region to PostScript printer"))
130(define-key menu-bar-file-menu [ps-print-buffer-faces] 127(define-key menu-bar-file-menu [ps-print-buffer-faces]
131 '(menu-item "Postscript Print Buffer" ps-print-buffer-with-faces 128 '(menu-item "Postscript Print Buffer" ps-print-buffer-with-faces
132 :enable (and (frame-live-p menu-updating-frame) 129 :enable (menu-bar-menu-frame-live-and-visible-p)
133 (frame-visible-p menu-updating-frame ))
134 :help "Pretty-print current buffer to PostScript printer")) 130 :help "Pretty-print current buffer to PostScript printer"))
135(define-key menu-bar-file-menu [print-region] 131(define-key menu-bar-file-menu [print-region]
136 '(menu-item "Print Region" print-region 132 '(menu-item "Print Region" print-region
@@ -138,8 +134,7 @@ A large number or nil slows down menu responsiveness."
138 :help "Print region between mark and current position")) 134 :help "Print region between mark and current position"))
139(define-key menu-bar-file-menu [print-buffer] 135(define-key menu-bar-file-menu [print-buffer]
140 '(menu-item "Print Buffer" print-buffer 136 '(menu-item "Print Buffer" print-buffer
141 :enable (and (frame-live-p menu-updating-frame) 137 :enable (menu-bar-menu-frame-live-and-visible-p)
142 (frame-visible-p menu-updating-frame ))
143 :help "Print current buffer with page headings")) 138 :help "Print current buffer with page headings"))
144 139
145(define-key menu-bar-file-menu [separator-print] 140(define-key menu-bar-file-menu [separator-print]
@@ -170,17 +165,14 @@ A large number or nil slows down menu responsiveness."
170 :help "Re-read current buffer from its file")) 165 :help "Re-read current buffer from its file"))
171(define-key menu-bar-file-menu [write-file] 166(define-key menu-bar-file-menu [write-file]
172 '(menu-item "Save As..." write-file 167 '(menu-item "Save As..." write-file
173 :enable (and (frame-live-p menu-updating-frame) 168 :enable (and (menu-bar-menu-frame-live-and-visible-p)
174 (frame-visible-p menu-updating-frame ) 169 (menu-bar-non-minibuffer-window-p))
175 (not (window-minibuffer-p
176 (frame-selected-window menu-updating-frame))))
177 :help "Write current buffer to another file")) 170 :help "Write current buffer to another file"))
178(define-key menu-bar-file-menu [save-buffer] 171(define-key menu-bar-file-menu [save-buffer]
179 '(menu-item "Save" save-buffer 172 '(menu-item "Save" save-buffer
180 :enable (and (buffer-modified-p) 173 :enable (and (buffer-modified-p)
181 (buffer-file-name) 174 (buffer-file-name)
182 (not (window-minibuffer-p 175 (menu-bar-non-minibuffer-window-p))
183 (frame-selected-window menu-updating-frame))))
184 :help "Save current buffer to its file")) 176 :help "Save current buffer to its file"))
185 177
186(define-key menu-bar-file-menu [separator-save] 178(define-key menu-bar-file-menu [separator-save]
@@ -192,23 +184,19 @@ A large number or nil slows down menu responsiveness."
192 :help "Discard (kill) current buffer")) 184 :help "Discard (kill) current buffer"))
193(define-key menu-bar-file-menu [insert-file] 185(define-key menu-bar-file-menu [insert-file]
194 '(menu-item "Insert File..." insert-file 186 '(menu-item "Insert File..." insert-file
195 :enable (not (window-minibuffer-p 187 :enable (menu-bar-non-minibuffer-window-p)
196 (frame-selected-window menu-updating-frame)))
197 :help "Insert another file into current buffer")) 188 :help "Insert another file into current buffer"))
198(define-key menu-bar-file-menu [dired] 189(define-key menu-bar-file-menu [dired]
199 '(menu-item "Open Directory..." dired 190 '(menu-item "Open Directory..." dired
200 :enable (not (window-minibuffer-p 191 :enable (menu-bar-non-minibuffer-window-p)
201 (frame-selected-window menu-updating-frame)))
202 :help "Read a directory, operate on its files")) 192 :help "Read a directory, operate on its files"))
203(define-key menu-bar-file-menu [open-file] 193(define-key menu-bar-file-menu [open-file]
204 '(menu-item "Open File..." find-file-existing 194 '(menu-item "Open File..." find-file-existing
205 :enable (not (window-minibuffer-p 195 :enable (menu-bar-non-minibuffer-window-p)
206 (frame-selected-window menu-updating-frame)))
207 :help "Read an existing file into an Emacs buffer")) 196 :help "Read an existing file into an Emacs buffer"))
208(define-key menu-bar-file-menu [new-file] 197(define-key menu-bar-file-menu [new-file]
209 '(menu-item "Visit New File..." find-file 198 '(menu-item "Visit New File..." find-file
210 :enable (not (window-minibuffer-p 199 :enable (menu-bar-non-minibuffer-window-p)
211 (frame-selected-window menu-updating-frame)))
212 :help "Read or create a file and edit it")) 200 :help "Read or create a file and edit it"))
213 201
214 202
@@ -1043,8 +1031,7 @@ mail status in mode line"))
1043 toggle-truncate-lines 1031 toggle-truncate-lines
1044 :help "Truncate long lines on the screen" 1032 :help "Truncate long lines on the screen"
1045 :button (:toggle . truncate-lines) 1033 :button (:toggle . truncate-lines)
1046 :enable (and (frame-live-p menu-updating-frame) 1034 :enable (menu-bar-menu-frame-live-and-visible-p)))
1047 (frame-visible-p menu-updating-frame))))
1048 1035
1049(define-key menu-bar-options-menu [highlight-separator] 1036(define-key menu-bar-options-menu [highlight-separator]
1050 '("--")) 1037 '("--"))
@@ -1425,6 +1412,23 @@ key, a click, or a menu-item"))
1425 '(menu-item "Emacs Tutorial" help-with-tutorial 1412 '(menu-item "Emacs Tutorial" help-with-tutorial
1426 :help "Learn how to use Emacs")) 1413 :help "Learn how to use Emacs"))
1427 1414
1415(defun menu-bar-menu-frame-live-and-visible-p ()
1416 "Return non-nil if the menu frame is alive and visible.
1417The menu frame is the frame for which we are updating the menu."
1418 (let ((menu-frame (if (display-multi-frame-p) menu-updating-frame
1419 (selected-frame))))
1420 (and (frame-live-p menu-frame)
1421 (frame-visible-p menu-frame))))
1422
1423(defun menu-bar-non-minibuffer-window-p ()
1424 "Return non-nil if selected window of the menu frame is not a minibuf window.
1425
1426See the documentation of `menu-bar-menu-frame-live-and-visible-p'
1427for the definition of the menu frame."
1428 (let ((menu-frame (if (display-multi-frame-p) menu-updating-frame
1429 (selected-frame))))
1430 (not (window-minibuffer-p (frame-selected-window menu-frame)))))
1431
1428(defun kill-this-buffer () ; for the menubar 1432(defun kill-this-buffer () ; for the menubar
1429 "Kill the current buffer." 1433 "Kill the current buffer."
1430 (interactive) 1434 (interactive)
@@ -1437,11 +1441,10 @@ key, a click, or a menu-item"))
1437 (or (string-match "^ " (buffer-name (car buffers))) 1441 (or (string-match "^ " (buffer-name (car buffers)))
1438 (setq count (1+ count))) 1442 (setq count (1+ count)))
1439 (setq buffers (cdr buffers))) 1443 (setq buffers (cdr buffers)))
1440 (and (not (window-minibuffer-p (frame-selected-window menu-updating-frame))) 1444 (and (menu-bar-non-minibuffer-window-p)
1441 (> count 1)))) 1445 (> count 1))))
1442 1446
1443(put 'dired 'menu-enable 1447(put 'dired 'menu-enable '(menu-bar-non-minibuffer-window-p))
1444 '(not (window-minibuffer-p (frame-selected-window menu-updating-frame))))
1445 1448
1446;; Permit deleting frame if it would leave a visible or iconified frame. 1449;; Permit deleting frame if it would leave a visible or iconified frame.
1447(defun delete-frame-enabled-p () 1450(defun delete-frame-enabled-p ()
diff --git a/lisp/mh-e/ChangeLog b/lisp/mh-e/ChangeLog
index 82bedd7c2a6..28cc6c2a6d0 100644
--- a/lisp/mh-e/ChangeLog
+++ b/lisp/mh-e/ChangeLog
@@ -43,7 +43,7 @@
43 (mh-show-from-face, mh-show-xface-face, mh-speedbar-folder-face) 43 (mh-show-from-face, mh-show-xface-face, mh-speedbar-folder-face)
44 (mh-speedbar-selected-folder-face) 44 (mh-speedbar-selected-folder-face)
45 (mh-speedbar-folder-with-unseen-messages-face) 45 (mh-speedbar-folder-with-unseen-messages-face)
46 (mh-speedbar-selected-folder-with-unseen-messages-face): 46 (mh-speedbar-selected-folder-with-unseen-messages-face):
47 New backward-compatibility aliases for renamed faces. 47 New backward-compatibility aliases for renamed faces.
48 (mh-folder-body-face, mh-folder-cur-msg-face) 48 (mh-folder-body-face, mh-folder-cur-msg-face)
49 (mh-folder-cur-msg-number-face, mh-folder-date-face) 49 (mh-folder-cur-msg-number-face, mh-folder-date-face)
@@ -56,7 +56,7 @@
56 (mh-show-pgg-unknown-face, mh-show-pgg-bad-face) 56 (mh-show-pgg-unknown-face, mh-show-pgg-bad-face)
57 (mh-show-to-face, mh-show-from-face, mh-show-subject-face) 57 (mh-show-to-face, mh-show-from-face, mh-show-subject-face)
58 (mh-speedbar-folder-with-unseen-messages) 58 (mh-speedbar-folder-with-unseen-messages)
59 (mh-speedbar-selected-folder-with-unseen-messages): 59 (mh-speedbar-selected-folder-with-unseen-messages):
60 Use renamed MH-E faces. 60 Use renamed MH-E faces.
61 61
62 * mh-utils.el (mh-letter-font-lock-keywords) 62 * mh-utils.el (mh-letter-font-lock-keywords)
@@ -900,7 +900,7 @@
900 900
901 * mh-e.el (Version, mh-version): Updated for release 7.4.3. 901 * mh-e.el (Version, mh-version): Updated for release 7.4.3.
902 902
903 * This patch release contains the following two patches: 903 This patch release contains the following two patches:
904 904
905 * mh-identity.el (mh-identity-make-menu): Removed condition on 905 * mh-identity.el (mh-identity-make-menu): Removed condition on
906 mh-auto-fields-list. Use it to enable or disable menu item 906 mh-auto-fields-list. Use it to enable or disable menu item
@@ -8402,7 +8402,7 @@
8402 defcustom to mh-utils because I got an error about a nil value for 8402 defcustom to mh-utils because I got an error about a nil value for
8403 mh-tool-bar-reply-3-buttons when I fired up mh-rmail. 8403 mh-tool-bar-reply-3-buttons when I fired up mh-rmail.
8404 8404
8405 * mh-comp.el, mh-funcs,el, mh-mime.el, mh-pick.el: Moved (provide) 8405 * mh-comp.el, mh-funcs.el, mh-mime.el, mh-pick.el: Moved (provide)
8406 to the end of the file to be consistent with most other files (see 8406 to the end of the file to be consistent with most other files (see
8407 additional rationale in mh-e.el description below). 8407 additional rationale in mh-e.el description below).
8408 8408
@@ -9210,7 +9210,7 @@
92102002-08-19 Peter S Galbraith <psg@debian.org> 92102002-08-19 Peter S Galbraith <psg@debian.org>
9211 9211
9212 * reply-to.xpm, reply-to.pbm, reply-from.xpm, reply-from.pbm, 9212 * reply-to.xpm, reply-to.pbm, reply-from.xpm, reply-from.pbm,
9213 reply-all.xpm, reply-all.bpm: New icons for various reply methods. 9213 * reply-all.xpm, reply-all.bpm: New icons for various reply methods.
9214 * mh-e.el (mh-folder-tool-bar-map): Split reply button into three 9214 * mh-e.el (mh-folder-tool-bar-map): Split reply button into three
9215 that won't prompt for "from", "to" and "all". 9215 that won't prompt for "from", "to" and "all".
9216 * mh-comp.el (mh-reply): Put variable reply-to in the interactive 9216 * mh-comp.el (mh-reply): Put variable reply-to in the interactive
@@ -10234,7 +10234,7 @@
10234 operations made on all messages in the selected range when 10234 operations made on all messages in the selected range when
10235 transient-mark-mode is on doesn't work in XEmacs. 10235 transient-mark-mode is on doesn't work in XEmacs.
10236 10236
10237 * mh-e.el, mh-utils: Conditionalize calls to 10237 * mh-e.el, mh-utils.el: Conditionalize calls to
10238 'add-to-list 'facemenu-unlisted-faces for XEmacs. 10238 'add-to-list 'facemenu-unlisted-faces for XEmacs.
10239 10239
102402001-12-11 Jeffrey C Honig <jch@honig.net> 102402001-12-11 Jeffrey C Honig <jch@honig.net>
diff --git a/lisp/mouse.el b/lisp/mouse.el
index c928e04f8ed..1970fbf1eeb 100644
--- a/lisp/mouse.el
+++ b/lisp/mouse.el
@@ -538,11 +538,10 @@ resized by dragging their header-line."
538 (window (posn-window start)) 538 (window (posn-window start))
539 (frame (window-frame window)) 539 (frame (window-frame window))
540 (first-window (frame-first-window frame))) 540 (first-window (frame-first-window frame)))
541 (when (or (eq window first-window) 541 (unless (or (eq window first-window)
542 (= (nth 1 (window-edges window)) 542 (= (nth 1 (window-edges window))
543 (nth 1 (window-edges first-window)))) 543 (nth 1 (window-edges first-window))))
544 (error "Cannot move header-line at the top of the frame")) 544 (mouse-drag-mode-line-1 start-event nil))))
545 (mouse-drag-mode-line-1 start-event nil)))
546 545
547 546
548(defun mouse-drag-vertical-line (start-event) 547(defun mouse-drag-vertical-line (start-event)
diff --git a/lisp/msb.el b/lisp/msb.el
index 8fa63d98051..94a1599371f 100644
--- a/lisp/msb.el
+++ b/lisp/msb.el
@@ -185,7 +185,7 @@
185 "Elisp Files (%d)") 185 "Elisp Files (%d)")
186 ((eq major-mode 'latex-mode) 186 ((eq major-mode 'latex-mode)
187 3030 187 3030
188 "LaTex Files (%d)") 188 "LaTeX Files (%d)")
189 ('no-multi 189 ('no-multi
190 3099 190 3099
191 "Other files (%d)"))) 191 "Other files (%d)")))
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el
index e721f3fb016..b8b3fb9068a 100644
--- a/lisp/net/tramp.el
+++ b/lisp/net/tramp.el
@@ -5213,7 +5213,10 @@ Returns nil if none was found, else the command is returned."
5213 5213
5214(defun tramp-action-password (p multi-method method user host) 5214(defun tramp-action-password (p multi-method method user host)
5215 "Query the user for a password." 5215 "Query the user for a password."
5216 (let ((pw-prompt (match-string 0))) 5216 (let ((pw-prompt
5217 (format "Password for %s "
5218 (tramp-make-tramp-file-name
5219 nil method user host ""))))
5217 (tramp-message 9 "Sending password") 5220 (tramp-message 9 "Sending password")
5218 (tramp-enter-password p pw-prompt user host))) 5221 (tramp-enter-password p pw-prompt user host)))
5219 5222
@@ -5300,8 +5303,12 @@ The terminal type can be configured with `tramp-terminal-type'."
5300 5303
5301(defun tramp-multi-action-password (p method user host) 5304(defun tramp-multi-action-password (p method user host)
5302 "Query the user for a password." 5305 "Query the user for a password."
5303 (tramp-message 9 "Sending password") 5306 (let ((pw-prompt
5304 (tramp-enter-password p (match-string 0) user host)) 5307 (format "Password for %s "
5308 (tramp-make-tramp-file-name
5309 nil method user host ""))))
5310 (tramp-message 9 "Sending password")
5311 (tramp-enter-password p pw-prompt user host)))
5305 5312
5306(defun tramp-multi-action-succeed (p method user host) 5313(defun tramp-multi-action-succeed (p method user host)
5307 "Signal success in finding shell prompt." 5314 "Signal success in finding shell prompt."
diff --git a/lisp/progmodes/delphi.el b/lisp/progmodes/delphi.el
index 0c94120a0f8..85f7e1339f3 100644
--- a/lisp/progmodes/delphi.el
+++ b/lisp/progmodes/delphi.el
@@ -4,6 +4,7 @@
4;; Free Software Foundation, Inc. 4;; Free Software Foundation, Inc.
5 5
6;; Author: Ray Blaak <blaak@infomatch.com> 6;; Author: Ray Blaak <blaak@infomatch.com>
7;; Maintainer: FSF (Blaak's email addr bounces, Aug 2005)
7;; Keywords: languages 8;; Keywords: languages
8 9
9;; This file is part of GNU Emacs. 10;; This file is part of GNU Emacs.
diff --git a/lisp/progmodes/flymake.el b/lisp/progmodes/flymake.el
index d137284f795..e5089d84fb0 100644
--- a/lisp/progmodes/flymake.el
+++ b/lisp/progmodes/flymake.el
@@ -960,8 +960,7 @@ Convert it to flymake internal format."
960 (setq converted-list (cons (list regexp file line col) converted-list))))) 960 (setq converted-list (cons (list regexp file line col) converted-list)))))
961 converted-list)) 961 converted-list))
962 962
963(eval-when-compile 963(require 'compile)
964 (require 'compile))
965 964
966(defvar flymake-err-line-patterns ; regexp file-idx line-idx col-idx (optional) text-idx(optional), match-end to end of string is error text 965(defvar flymake-err-line-patterns ; regexp file-idx line-idx col-idx (optional) text-idx(optional), match-end to end of string is error text
967 (append 966 (append
diff --git a/lisp/progmodes/make-mode.el b/lisp/progmodes/make-mode.el
index b8336691307..11ae1c66aa7 100644
--- a/lisp/progmodes/make-mode.el
+++ b/lisp/progmodes/make-mode.el
@@ -1833,6 +1833,10 @@ If it isn't in one, return nil."
1833 ;; Don't keep looking across a blank line or comment. 1833 ;; Don't keep looking across a blank line or comment.
1834 (looking-at "$\\|#") 1834 (looking-at "$\\|#")
1835 (not (zerop (forward-line -1)))))) 1835 (not (zerop (forward-line -1))))))
1836 ;; Remove leading and trailing whitespace.
1837 (when found
1838 (setq found (replace-regexp-in-string "[ \t]+\\'" "" found))
1839 (setq found (replace-regexp-in-string "\\`[ \t]+" "" found)))
1836 found))) 1840 found)))
1837 1841
1838(provide 'make-mode) 1842(provide 'make-mode)
diff --git a/lisp/progmodes/octave-inf.el b/lisp/progmodes/octave-inf.el
index 917016cf159..4f0875bbf99 100644
--- a/lisp/progmodes/octave-inf.el
+++ b/lisp/progmodes/octave-inf.el
@@ -248,7 +248,11 @@ startup file, `~/.emacs-octave'."
248 248
249 ;; And finally, everything is back to normal. 249 ;; And finally, everything is back to normal.
250 (set-process-filter proc 'inferior-octave-output-filter) 250 (set-process-filter proc 'inferior-octave-output-filter)
251 (run-hooks 'inferior-octave-startup-hook))) 251 (run-hooks 'inferior-octave-startup-hook)
252 (run-hooks 'inferior-octave-startup-hook)
253 ;; Just in case, to be sure a cd in the startup file
254 ;; won't have detrimental effects.
255 (inferior-octave-resync-dirs)))
252 256
253 257
254(defun inferior-octave-complete () 258(defun inferior-octave-complete ()
diff --git a/lisp/progmodes/perl-mode.el b/lisp/progmodes/perl-mode.el
index 25a414e69d2..cb2ec81f501 100644
--- a/lisp/progmodes/perl-mode.el
+++ b/lisp/progmodes/perl-mode.el
@@ -267,12 +267,12 @@ The expansion is entirely correct because it uses the C preprocessor."
267 ("\\<sub\\s-+\\S-+\\s-*(\\([^)]+\\))" 1 '(1)) 267 ("\\<sub\\s-+\\S-+\\s-*(\\([^)]+\\))" 1 '(1))
268 ;; regexp and funny quotes 268 ;; regexp and funny quotes
269 ("[?:.,;=!~({[][ \t\n]*\\(/\\)" (1 '(7))) 269 ("[?:.,;=!~({[][ \t\n]*\\(/\\)" (1 '(7)))
270 ("[?:.,;=!~({[ \t\n]\\([msy]\\|q[qxrw]?\\|tr\\)\\>\\s-*\\([^])}> \n\t]\\)" 270 ("\\(^\\|[?:.,;=!~({[ \t]\\)\\([msy]\\|q[qxrw]?\\|tr\\)\\>\\s-*\\([^])}> \n\t]\\)"
271 ;; Nasty cases: 271 ;; Nasty cases:
272 ;; /foo/m $a->m $#m $m @m %m 272 ;; /foo/m $a->m $#m $m @m %m
273 ;; \s (appears often in regexps). 273 ;; \s (appears often in regexps).
274 ;; -s file 274 ;; -s file
275 (2 (if (assoc (char-after (match-beginning 2)) 275 (3 (if (assoc (char-after (match-beginning 3))
276 perl-quote-like-pairs) 276 perl-quote-like-pairs)
277 '(15) '(7)))) 277 '(15) '(7))))
278 ;; TODO: here-documents ("<<\\(\\sw\\|['\"]\\)") 278 ;; TODO: here-documents ("<<\\(\\sw\\|['\"]\\)")
diff --git a/lisp/progmodes/sh-script.el b/lisp/progmodes/sh-script.el
index d39cc4b7281..663332fb8c6 100644
--- a/lisp/progmodes/sh-script.el
+++ b/lisp/progmodes/sh-script.el
@@ -490,7 +490,10 @@ This is buffer-local in every such buffer.")
490 map) 490 map)
491 "Keymap used in Shell-Script mode.") 491 "Keymap used in Shell-Script mode.")
492 492
493 493(defvar sh-skeleton-pair-default-alist '((?( _ ?)) (?\))
494 (?[ ?\s _ ?\s ?]) (?\])
495 (?{ _ ?}) (?\}))
496 "Value to use for `skeleton-pair-default-alist' in Shell-Script mode.")
494 497
495(defcustom sh-dynamic-complete-functions 498(defcustom sh-dynamic-complete-functions
496 '(shell-dynamic-complete-environment-variable 499 '(shell-dynamic-complete-environment-variable
@@ -1362,6 +1365,8 @@ with your script for an edit-interpret-debug cycle."
1362 (make-local-variable 'sh-shell-variables-initialized) 1365 (make-local-variable 'sh-shell-variables-initialized)
1363 (make-local-variable 'imenu-generic-expression) 1366 (make-local-variable 'imenu-generic-expression)
1364 (make-local-variable 'sh-indent-supported-here) 1367 (make-local-variable 'sh-indent-supported-here)
1368 (make-local-variable 'skeleton-pair-default-alist)
1369 (setq skeleton-pair-default-alist sh-skeleton-pair-default-alist)
1365 (setq skeleton-end-hook (lambda () 1370 (setq skeleton-end-hook (lambda ()
1366 (or (eolp) (newline) (indent-relative))) 1371 (or (eolp) (newline) (indent-relative)))
1367 paragraph-start (concat page-delimiter "\\|$") 1372 paragraph-start (concat page-delimiter "\\|$")
diff --git a/lisp/recentf.el b/lisp/recentf.el
index 524d00d389d..20251508941 100644
--- a/lisp/recentf.el
+++ b/lisp/recentf.el
@@ -5,7 +5,6 @@
5 5
6;; Author: David Ponce <david@dponce.com> 6;; Author: David Ponce <david@dponce.com>
7;; Created: July 19 1999 7;; Created: July 19 1999
8;; Maintainer: FSF
9;; Keywords: files 8;; Keywords: files
10 9
11;; This file is part of GNU Emacs. 10;; This file is part of GNU Emacs.
@@ -258,7 +257,16 @@ It is passed a filename to give a chance to transform it.
258If it returns nil, the filename is left unchanged." 257If it returns nil, the filename is left unchanged."
259 :group 'recentf 258 :group 'recentf
260 :type '(choice (const :tag "None" nil) 259 :type '(choice (const :tag "None" nil)
260 (const abbreviate-file-name)
261 function)) 261 function))
262
263(defcustom recentf-show-file-shortcuts-flag t
264 "Whether to show ``[N]'' for the Nth item up to 10.
265If non-nil, `recentf-open-files' will show labels for keys that can be
266used as shortcuts to open the Nth file."
267 :group 'recentf
268 :type 'boolean)
269
262 270
263;;; Utilities 271;;; Utilities
264;; 272;;
@@ -349,7 +357,7 @@ filenames."
349 "Convert filename NAME to absolute, and canonicalize it. 357 "Convert filename NAME to absolute, and canonicalize it.
350See also the function `expand-file-name'. 358See also the function `expand-file-name'.
351If defined, call the function `recentf-filename-handler' 359If defined, call the function `recentf-filename-handler'
352to postprocess the canonical name." 360to post process the canonical name."
353 (let* ((filename (expand-file-name name))) 361 (let* ((filename (expand-file-name name)))
354 (or (and recentf-filename-handler 362 (or (and recentf-filename-handler
355 (funcall recentf-filename-handler filename)) 363 (funcall recentf-filename-handler filename))
@@ -926,6 +934,9 @@ Go to the beginning of buffer if not found."
926 (set-keymap-parent km widget-keymap) 934 (set-keymap-parent km widget-keymap)
927 (define-key km "q" 'recentf-cancel-dialog) 935 (define-key km "q" 'recentf-cancel-dialog)
928 (define-key km [down-mouse-1] 'widget-button-click) 936 (define-key km [down-mouse-1] 'widget-button-click)
937 ;; Keys in reverse order of appearence in help.
938 (dolist (k '("0" "9" "8" "7" "6" "5" "4" "3" "2" "1"))
939 (define-key km k 'recentf-open-file-with-key))
929 km) 940 km)
930 "Keymap used in recentf dialogs.") 941 "Keymap used in recentf dialogs.")
931 942
@@ -1063,6 +1074,18 @@ IGNORE other arguments."
1063 (kill-buffer (current-buffer)) 1074 (kill-buffer (current-buffer))
1064 (funcall recentf-menu-action (widget-value widget))) 1075 (funcall recentf-menu-action (widget-value widget)))
1065 1076
1077;; List of files associated to a digit shortcut key.
1078(defvar recentf--files-with-key nil)
1079
1080(defun recentf-show-digit-shortcut-filter (l)
1081 "Filter the list of menu-elements L to show digit shortcuts."
1082 (let ((i 0))
1083 (dolist (e l)
1084 (setq i (1+ i))
1085 (recentf-set-menu-element-item
1086 e (format "[%d] %s" (% i 10) (recentf-menu-element-item e))))
1087 l))
1088
1066(defun recentf-open-files-item (menu-element) 1089(defun recentf-open-files-item (menu-element)
1067 "Return a widget to display MENU-ELEMENT in a dialog buffer." 1090 "Return a widget to display MENU-ELEMENT in a dialog buffer."
1068 (if (consp (cdr menu-element)) 1091 (if (consp (cdr menu-element))
@@ -1085,6 +1108,26 @@ IGNORE other arguments."
1085 :action recentf-open-files-action 1108 :action recentf-open-files-action
1086 ,(cdr menu-element)))) 1109 ,(cdr menu-element))))
1087 1110
1111(defun recentf-open-files-items (files)
1112 "Return a list of widgets to display FILES in a dialog buffer."
1113 (set (make-local-variable 'recentf--files-with-key)
1114 (recentf-trunc-list files 10))
1115 (mapcar 'recentf-open-files-item
1116 (append
1117 ;; When requested group the files with shortcuts together
1118 ;; at the top of the list.
1119 (when recentf-show-file-shortcuts-flag
1120 (setq files (nthcdr 10 files))
1121 (recentf-apply-menu-filter
1122 'recentf-show-digit-shortcut-filter
1123 (mapcar 'recentf-make-default-menu-element
1124 recentf--files-with-key)))
1125 ;; Then the other files.
1126 (recentf-apply-menu-filter
1127 recentf-menu-filter
1128 (mapcar 'recentf-make-default-menu-element
1129 files)))))
1130
1088(defun recentf-open-files (&optional files buffer-name) 1131(defun recentf-open-files (&optional files buffer-name)
1089 "Show a dialog to open a recent file. 1132 "Show a dialog to open a recent file.
1090If optional argument FILES is non-nil, it is a list of recently-opened 1133If optional argument FILES is non-nil, it is a list of recently-opened
@@ -1093,25 +1136,43 @@ If optional argument BUFFER-NAME is non-nil, it is a buffer name to
1093use for the dialog. It defaults to \"*`recentf-menu-title'*\"." 1136use for the dialog. It defaults to \"*`recentf-menu-title'*\"."
1094 (interactive) 1137 (interactive)
1095 (recentf-dialog (or buffer-name (format "*%s*" recentf-menu-title)) 1138 (recentf-dialog (or buffer-name (format "*%s*" recentf-menu-title))
1096 (widget-insert "Click on a file to open it. 1139 (widget-insert "Click on a file"
1097Click on Cancel or type `q' to cancel.\n" ) 1140 (if recentf-show-file-shortcuts-flag
1141 ", or type the corresponding digit key,"
1142 "")
1143 " to open it.\n"
1144 "Click on Cancel or type `q' to cancel.\n")
1098 ;; Use a L&F that looks like the recentf menu. 1145 ;; Use a L&F that looks like the recentf menu.
1099 (tree-widget-set-theme "folder") 1146 (tree-widget-set-theme "folder")
1100 (apply 'widget-create 1147 (apply 'widget-create
1101 `(group 1148 `(group
1102 :indent 2 1149 :indent 2
1103 :format "\n%v\n" 1150 :format "\n%v\n"
1104 ,@(mapcar 'recentf-open-files-item 1151 ,@(recentf-open-files-items (or files recentf-list))))
1105 (recentf-apply-menu-filter
1106 recentf-menu-filter
1107 (mapcar 'recentf-make-default-menu-element
1108 (or files recentf-list))))))
1109 (widget-create 1152 (widget-create
1110 'push-button 1153 'push-button
1111 :notify 'recentf-cancel-dialog 1154 :notify 'recentf-cancel-dialog
1112 "Cancel") 1155 "Cancel")
1113 (recentf-dialog-goto-first 'link))) 1156 (recentf-dialog-goto-first 'link)))
1114 1157
1158(defun recentf-open-file-with-key (n)
1159 "Open the recent file with the shortcut numeric key N.
1160N must be a valid digit.
1161`1' opens the first file, `2' the second file, ... `9' the ninth file.
1162`0' opens the tenth file."
1163 (interactive
1164 (list
1165 (let ((n (string-to-number (this-command-keys))))
1166 (cond
1167 ((zerop n) 10)
1168 ((and (> n 0) (< n 10)) n)
1169 ((error "Invalid digit key %d" n))))))
1170 (when recentf--files-with-key
1171 (let ((file (nth (1- n) recentf--files-with-key)))
1172 (unless file (error "Not that many recent files"))
1173 (kill-buffer (current-buffer))
1174 (funcall recentf-menu-action file))))
1175
1115(defun recentf-open-more-files () 1176(defun recentf-open-more-files ()
1116 "Show a dialog to open a recent file that is not in the menu." 1177 "Show a dialog to open a recent file that is not in the menu."
1117 (interactive) 1178 (interactive)
diff --git a/lisp/simple.el b/lisp/simple.el
index 746c670b086..20973e9e699 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -4227,88 +4227,90 @@ If nil, search stops at the beginning of the accessible portion of the buffer."
4227(defun blink-matching-open () 4227(defun blink-matching-open ()
4228 "Move cursor momentarily to the beginning of the sexp before point." 4228 "Move cursor momentarily to the beginning of the sexp before point."
4229 (interactive) 4229 (interactive)
4230 (and (> (point) (1+ (point-min))) 4230 (when (and (> (point) (1+ (point-min)))
4231 blink-matching-paren 4231 blink-matching-paren
4232 ;; Verify an even number of quoting characters precede the close. 4232 ;; Verify an even number of quoting characters precede the close.
4233 (= 1 (logand 1 (- (point) 4233 (= 1 (logand 1 (- (point)
4234 (save-excursion 4234 (save-excursion
4235 (forward-char -1) 4235 (forward-char -1)
4236 (skip-syntax-backward "/\\") 4236 (skip-syntax-backward "/\\")
4237 (point))))) 4237 (point))))))
4238 (let* ((oldpos (point)) 4238 (let* ((oldpos (point))
4239 (blinkpos) 4239 blinkpos
4240 (mismatch) 4240 message-log-max ; Don't log messages about paren matching.
4241 matching-paren) 4241 matching-paren
4242 (save-excursion 4242 open-paren-line-string)
4243 (save-restriction 4243 (save-excursion
4244 (if blink-matching-paren-distance 4244 (save-restriction
4245 (narrow-to-region (max (point-min) 4245 (if blink-matching-paren-distance
4246 (- (point) blink-matching-paren-distance)) 4246 (narrow-to-region (max (point-min)
4247 oldpos)) 4247 (- (point) blink-matching-paren-distance))
4248 (condition-case () 4248 oldpos))
4249 (let ((parse-sexp-ignore-comments 4249 (condition-case ()
4250 (and parse-sexp-ignore-comments 4250 (let ((parse-sexp-ignore-comments
4251 (not blink-matching-paren-dont-ignore-comments)))) 4251 (and parse-sexp-ignore-comments
4252 (setq blinkpos (scan-sexps oldpos -1))) 4252 (not blink-matching-paren-dont-ignore-comments))))
4253 (error nil))) 4253 (setq blinkpos (scan-sexps oldpos -1)))
4254 (and blinkpos 4254 (error nil)))
4255 ;; Not syntax '$'. 4255 (and blinkpos
4256 (not (eq (syntax-class (syntax-after blinkpos)) 8)) 4256 ;; Not syntax '$'.
4257 (setq matching-paren 4257 (not (eq (syntax-class (syntax-after blinkpos)) 8))
4258 (let ((syntax (syntax-after blinkpos))) 4258 (setq matching-paren
4259 (and (consp syntax) 4259 (let ((syntax (syntax-after blinkpos)))
4260 (eq (syntax-class syntax) 4) 4260 (and (consp syntax)
4261 (cdr syntax))) 4261 (eq (syntax-class syntax) 4)
4262 mismatch 4262 (cdr syntax)))))
4263 (or (null matching-paren) 4263 (cond
4264 (/= (char-after (1- oldpos)) 4264 ((or (null matching-paren)
4265 matching-paren)))) 4265 (/= (char-before oldpos)
4266 (if mismatch (setq blinkpos nil)) 4266 matching-paren))
4267 (if blinkpos 4267 (message "Mismatched parentheses"))
4268 ;; Don't log messages about paren matching. 4268 ((not blinkpos)
4269 (let (message-log-max) 4269 (if (not blink-matching-paren-distance)
4270 (goto-char blinkpos) 4270 (message "Unmatched parenthesis")))
4271 (if (pos-visible-in-window-p) 4271 ((pos-visible-in-window-p blinkpos)
4272 (and blink-matching-paren-on-screen 4272 ;; Matching open within window, temporarily move to blinkpos but only
4273 (sit-for blink-matching-delay)) 4273 ;; if `blink-matching-paren-on-screen' is non-nil.
4274 (goto-char blinkpos) 4274 (when blink-matching-paren-on-screen
4275 (message 4275 (save-excursion
4276 "Matches %s" 4276 (goto-char blinkpos)
4277 ;; Show what precedes the open in its line, if anything. 4277 (sit-for blink-matching-delay))))
4278 (if (save-excursion 4278 (t
4279 (skip-chars-backward " \t") 4279 (save-excursion
4280 (not (bolp))) 4280 (goto-char blinkpos)
4281 (buffer-substring (progn (beginning-of-line) (point)) 4281 (setq open-paren-line-string
4282 (1+ blinkpos)) 4282 ;; Show what precedes the open in its line, if anything.
4283 ;; Show what follows the open in its line, if anything. 4283 (if (save-excursion
4284 (if (save-excursion 4284 (skip-chars-backward " \t")
4285 (forward-char 1) 4285 (not (bolp)))
4286 (skip-chars-forward " \t") 4286 (buffer-substring (line-beginning-position)
4287 (not (eolp))) 4287 (1+ blinkpos))
4288 (buffer-substring blinkpos 4288 ;; Show what follows the open in its line, if anything.
4289 (progn (end-of-line) (point))) 4289 (if (save-excursion
4290 ;; Otherwise show the previous nonblank line, 4290 (forward-char 1)
4291 ;; if there is one. 4291 (skip-chars-forward " \t")
4292 (if (save-excursion 4292 (not (eolp)))
4293 (skip-chars-backward "\n \t") 4293 (buffer-substring blinkpos
4294 (not (bobp))) 4294 (line-end-position))
4295 (concat 4295 ;; Otherwise show the previous nonblank line,
4296 (buffer-substring (progn 4296 ;; if there is one.
4297 (if (save-excursion
4298 (skip-chars-backward "\n \t")
4299 (not (bobp)))
4300 (concat
4301 (buffer-substring (progn
4297 (skip-chars-backward "\n \t") 4302 (skip-chars-backward "\n \t")
4298 (beginning-of-line) 4303 (line-beginning-position))
4299 (point)) 4304 (progn (end-of-line)
4300 (progn (end-of-line) 4305 (skip-chars-backward " \t")
4301 (skip-chars-backward " \t") 4306 (point)))
4302 (point))) 4307 ;; Replace the newline and other whitespace with `...'.
4303 ;; Replace the newline and other whitespace with `...'. 4308 "..."
4304 "..." 4309 (buffer-substring blinkpos (1+ blinkpos)))
4305 (buffer-substring blinkpos (1+ blinkpos))) 4310 ;; There is nothing to show except the char itself.
4306 ;; There is nothing to show except the char itself. 4311 (buffer-substring blinkpos (1+ blinkpos)))))))
4307 (buffer-substring blinkpos (1+ blinkpos)))))))) 4312 (message "Matches %s"
4308 (cond (mismatch 4313 (substring-no-properties open-paren-line-string))))))))
4309 (message "Mismatched parentheses"))
4310 ((not blink-matching-paren-distance)
4311 (message "Unmatched parenthesis"))))))))
4312 4314
4313;Turned off because it makes dbx bomb out. 4315;Turned off because it makes dbx bomb out.
4314(setq blink-paren-function 'blink-matching-open) 4316(setq blink-paren-function 'blink-matching-open)
diff --git a/lisp/smerge-mode.el b/lisp/smerge-mode.el
index 4b677edc36a..31c7c4f2f12 100644
--- a/lisp/smerge-mode.el
+++ b/lisp/smerge-mode.el
@@ -372,7 +372,7 @@ This relies on mode-specific knowledge and thus only works in
372some major modes. Uses `smerge-resolve-function' to do the actual work." 372some major modes. Uses `smerge-resolve-function' to do the actual work."
373 (interactive) 373 (interactive)
374 (smerge-match-conflict) 374 (smerge-match-conflict)
375 (smerge-remove-props) 375 (smerge-remove-props (match-beginning 0) (match-end 0))
376 (cond 376 (cond
377 ;; Trivial diff3 -A non-conflicts. 377 ;; Trivial diff3 -A non-conflicts.
378 ((and (eq (match-end 1) (match-end 3)) 378 ((and (eq (match-end 1) (match-end 3))
diff --git a/lisp/textmodes/ispell.el b/lisp/textmodes/ispell.el
index d8b6b6e23de..e1805f0e87d 100644
--- a/lisp/textmodes/ispell.el
+++ b/lisp/textmodes/ispell.el
@@ -814,7 +814,10 @@ Otherwise returns the library directory name, if that is defined."
814 (goto-char (point-min)) 814 (goto-char (point-min))
815 (let (case-fold-search) 815 (let (case-fold-search)
816 (setq ispell-really-aspell 816 (setq ispell-really-aspell
817 (and (search-forward "(but really Aspell " nil t) t)))) 817 (and (search-forward-regexp "(but really Aspell \\(.*\\))" nil t)
818 (if (version< (match-string 1) "0.60")
819 (error "aspell version 0.60 or greater is required")
820 t)))))
818 (kill-buffer (current-buffer))) 821 (kill-buffer (current-buffer)))
819 result)) 822 result))
820 823
diff --git a/lisp/textmodes/page.el b/lisp/textmodes/page.el
index ffb4c89f2db..3ec1eca1fb7 100644
--- a/lisp/textmodes/page.el
+++ b/lisp/textmodes/page.el
@@ -112,7 +112,7 @@ thus showing a page other than the one point was originally in."
112 (save-excursion 112 (save-excursion
113 (goto-char (match-beginning 0)) ; was (beginning-of-line) 113 (goto-char (match-beginning 0)) ; was (beginning-of-line)
114 (looking-at page-delimiter))) 114 (looking-at page-delimiter)))
115 (beginning-of-line)) 115 (goto-char (match-beginning 0))) ; was (beginning-of-line)
116 (narrow-to-region (point) 116 (narrow-to-region (point)
117 (progn 117 (progn
118 ;; Find the top of the page. 118 ;; Find the top of the page.
diff --git a/lisp/vc.el b/lisp/vc.el
index a0b6ffa0ad8..8e87cb50eb4 100644
--- a/lisp/vc.el
+++ b/lisp/vc.el
@@ -2259,6 +2259,8 @@ With prefix arg READ-SWITCHES, specify a value to override
2259 (interactive "DDired under VC (directory): \nP") 2259 (interactive "DDired under VC (directory): \nP")
2260 (let ((vc-dired-switches (concat vc-dired-listing-switches 2260 (let ((vc-dired-switches (concat vc-dired-listing-switches
2261 (if vc-dired-recurse "R" "")))) 2261 (if vc-dired-recurse "R" ""))))
2262 (if (eq (string-match tramp-file-name-regexp dir) 0)
2263 (error "Sorry, vc-directory does not work over Tramp"))
2262 (if read-switches 2264 (if read-switches
2263 (setq vc-dired-switches 2265 (setq vc-dired-switches
2264 (read-string "Dired listing switches: " 2266 (read-string "Dired listing switches: "
@@ -2809,6 +2811,9 @@ log entries should be gathered."
2809 ;; it should find all relevant files relative to 2811 ;; it should find all relevant files relative to
2810 ;; the default-directory. 2812 ;; the default-directory.
2811 nil))) 2813 nil)))
2814 (dolist (file (or args (list default-directory)))
2815 (if (eq (string-match tramp-file-name-regexp file) 0)
2816 (error "Sorry, vc-update-change-log does not work over Tramp")))
2812 (vc-call-backend (vc-responsible-backend default-directory) 2817 (vc-call-backend (vc-responsible-backend default-directory)
2813 'update-changelog args)) 2818 'update-changelog args))
2814 2819
diff --git a/lisp/woman.el b/lisp/woman.el
index 5ecc4744305..9b7bce889b3 100644
--- a/lisp/woman.el
+++ b/lisp/woman.el
@@ -3,7 +3,7 @@
3;; Copyright (C) 2000, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. 3;; Copyright (C) 2000, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
4 4
5;; Author: Francis J. Wright <F.J.Wright@qmul.ac.uk> 5;; Author: Francis J. Wright <F.J.Wright@qmul.ac.uk>
6;; Maintainer: Francis J. Wright <F.J.Wright@qmul.ac.uk> 6;; Maintainer: FSF
7;; Keywords: help, unix 7;; Keywords: help, unix
8;; Adapted-By: Eli Zaretskii <eliz@gnu.org> 8;; Adapted-By: Eli Zaretskii <eliz@gnu.org>
9;; Version: see `woman-version' 9;; Version: see `woman-version'
@@ -136,27 +136,23 @@
136;; man man_page_name 136;; man man_page_name
137 137
138 138
139;; Using the `word at point' as a topic suggestion 139;; Using the word at point as the default topic
140;; =============================================== 140;; ============================================
141 141
142;; By default, the `woman' command uses the word nearest to point in 142;; The `woman' command uses the word nearest to point in the current
143;; the current buffer as a suggestion for the topic to look up. The 143;; buffer as the default topic to look up if it matches the name of a
144;; topic must be confirmed or edited in the minibuffer. This 144;; manual page installed on the system. The default topic can also be
145;; suggestion can be turned off, or `woman' can use the suggested 145;; used without confirmation by setting the user-option
146;; topic without confirmation* if possible, by setting the user-option 146;; `woman-use-topic-at-point' to t; thanks to Benjamin Riefenstahl for
147;; `woman-topic-at-point' to nil or t respectively. (Its default 147;; suggesting this functionality.
148;; value is neither nil nor t, meaning ask for confirmation.)
149 148
150;; [* Thanks to Benjamin Riefenstahl for suggesting this 149;; The variable `woman-use-topic-at-point' can be rebound locally,
151;; functionality.] 150;; which may be useful to provide special private key bindings, e.g.
152
153;; The variable `woman-topic-at-point' can be rebound locally, which
154;; may be useful to provide special private key bindings, e.g.
155 151
156;; (global-set-key "\C-cw" 152;; (global-set-key "\C-cw"
157;; (lambda () 153;; (lambda ()
158;; (interactive) 154;; (interactive)
159;; (let ((woman-topic-at-point t)) 155;; (let ((woman-use-topic-at-point t))
160;; (woman))))) 156;; (woman)))))
161 157
162 158
@@ -420,10 +416,7 @@
420;; Paul A. Thompson <pat@po.cwru.edu> 416;; Paul A. Thompson <pat@po.cwru.edu>
421;; Arrigo Triulzi <arrigo@maths.qmw.ac.uk> 417;; Arrigo Triulzi <arrigo@maths.qmw.ac.uk>
422;; Geoff Voelker <voelker@cs.washington.edu> 418;; Geoff Voelker <voelker@cs.washington.edu>
423;; Eli Zaretskii <eliz@is.elta.co.il> 419;; Eli Zaretskii <eliz@gnu.org>
424
425;;; History:
426;; For recent change log see end of file.
427 420
428 421
429;;; Code: 422;;; Code:
@@ -714,26 +707,21 @@ Default is \"CONTENTS\"."
714 :type 'string 707 :type 'string
715 :group 'woman-interface) 708 :group 'woman-interface)
716 709
717(defcustom woman-topic-at-point-default 'confirm 710(defcustom woman-use-topic-at-point-default nil
718 ;; `woman-topic-at-point' may be let-bound when woman is loaded, in 711 ;; `woman-use-topic-at-point' may be let-bound when woman is loaded,
719 ;; which case its global value does not get defined. 712 ;; in which case its global value does not get defined.
720 ;; `woman-file-name' sets it to this value if it is unbound. 713 ;; `woman-file-name' sets it to this value if it is unbound.
721 "*Default value for `woman-topic-at-point'." 714 "*Default value for `woman-use-topic-at-point'."
722 :type '(choice (const :tag "Yes" t) 715 :type '(choice (const :tag "Yes" t)
723 (const :tag "No" nil) 716 (const :tag "No" nil))
724 (other :tag "Confirm" confirm))
725 :group 'woman-interface) 717 :group 'woman-interface)
726 718
727(defcustom woman-topic-at-point woman-topic-at-point-default 719(defcustom woman-use-topic-at-point woman-use-topic-at-point-default
728 "*Controls use by `woman' of `word at point' as a topic suggestion. 720 "*Control use of the word at point as the default topic.
729If non-nil then the `woman' command uses the word at point as an 721If non-nil the `woman' command uses the word at point automatically,
730initial topic suggestion when it reads a topic from the minibuffer; if 722without interactive confirmation, if it exists as a topic."
731t then the `woman' command uses the word at point WITHOUT
732INTERACTIVE CONFIRMATION if it exists as a topic. The default value
733is `confirm', meaning suggest a topic and ask for confirmation."
734 :type '(choice (const :tag "Yes" t) 723 :type '(choice (const :tag "Yes" t)
735 (const :tag "No" nil) 724 (const :tag "No" nil))
736 (other :tag "Confirm" confirm))
737 :group 'woman-interface) 725 :group 'woman-interface)
738 726
739(defvar woman-file-regexp nil 727(defvar woman-file-regexp nil
@@ -956,8 +944,9 @@ This is usually either black or white."
956 :group 'woman-faces) 944 :group 'woman-faces)
957 945
958 (defcustom woman-use-symbol-font nil 946 (defcustom woman-use-symbol-font nil
959 "*If non-nil then may use the symbol font. It is off by default, 947 "*If non-nil then may use the symbol font.
960mainly because it may change the line spacing (in NTEmacs 20.5)." 948It is off by default, mainly because it may change the line spacing
949\(in NTEmacs 20.5)."
961 :type 'boolean 950 :type 'boolean
962 :group 'woman-faces) 951 :group 'woman-faces)
963 952
@@ -1200,10 +1189,11 @@ It is saved to the file named by the variable `woman-cache-filename'."
1200 1189
1201(defun woman-file-name (topic &optional re-cache) 1190(defun woman-file-name (topic &optional re-cache)
1202 "Get the name of the UN*X man-page file describing a chosen TOPIC. 1191 "Get the name of the UN*X man-page file describing a chosen TOPIC.
1203When `woman' is called interactively, the word at point may be used as 1192When `woman' is called interactively, the word at point may be
1204the topic or initial topic suggestion, subject to the value of the 1193automatically used as the topic, if the value of the user option
1205user option `woman-topic-at-point'. Return nil if no file can be found. 1194`woman-use-topic-at-point' is non-nil. Return nil if no file can
1206Optional argument RE-CACHE, if non-nil, forces the cache to be re-read." 1195be found. Optional argument RE-CACHE, if non-nil, forces the
1196cache to be re-read."
1207 ;; Handle the caching of the directory and topic lists: 1197 ;; Handle the caching of the directory and topic lists:
1208 (if (and (not re-cache) 1198 (if (and (not re-cache)
1209 (or 1199 (or
@@ -1221,25 +1211,30 @@ Optional argument RE-CACHE, if non-nil, forces the cache to be re-read."
1221 ;; completions, but to return only a case-sensitive match. This 1211 ;; completions, but to return only a case-sensitive match. This
1222 ;; does not seem to work properly by default, so I re-do the 1212 ;; does not seem to work properly by default, so I re-do the
1223 ;; completion if necessary. 1213 ;; completion if necessary.
1224 (let (files) 1214 (let (files
1215 (default (current-word)))
1225 (or (stringp topic) 1216 (or (stringp topic)
1226 (and (eq t 1217 (and (if (boundp 'woman-use-topic-at-point)
1227 (if (boundp 'woman-topic-at-point) 1218 woman-use-topic-at-point
1228 woman-topic-at-point 1219 ;; Was let-bound when file loaded, so ...
1229 ;; Was let-bound when file loaded, so ... 1220 (setq woman-use-topic-at-point woman-use-topic-at-point-default))
1230 (setq woman-topic-at-point woman-topic-at-point-default))) 1221 (setq topic (or (current-word t) "")) ; only within or adjacent to word
1231 (setq topic 1222 (test-completion topic woman-topic-all-completions))
1232 (or (current-word t) "")) ; only within or adjacent to word
1233 (assoc topic woman-topic-all-completions))
1234 (setq topic 1223 (setq topic
1235 (completing-read 1224 (let* ((word-at-point (current-word))
1236 "Manual entry: " 1225 (default
1237 woman-topic-all-completions nil 1 1226 (when (and word-at-point
1238 ;; Initial input suggestion (was nil), with 1227 (test-completion
1239 ;; cursor at left ready to kill suggestion!: 1228 word-at-point woman-topic-all-completions))
1240 (and woman-topic-at-point 1229 word-at-point)))
1241 (cons (or (current-word) "") 0)) ; nearest word 1230 (completing-read
1242 'woman-topic-history))) 1231 (if default
1232 (format "Manual entry [default: %s]: " default)
1233 "Manual entry: ")
1234 woman-topic-all-completions nil 1
1235 nil
1236 'woman-topic-history
1237 default))))
1243 ;; Note that completing-read always returns a string. 1238 ;; Note that completing-read always returns a string.
1244 (if (= (length topic) 0) 1239 (if (= (length topic) 0)
1245 nil ; no topic, so no file! 1240 nil ; no topic, so no file!
@@ -1259,10 +1254,9 @@ Optional argument RE-CACHE, if non-nil, forces the cache to be re-read."
1259 ;; Unread the command event (TAB = ?\t = 9) that runs the command 1254 ;; Unread the command event (TAB = ?\t = 9) that runs the command
1260 ;; `minibuffer-complete' in order to automatically complete the 1255 ;; `minibuffer-complete' in order to automatically complete the
1261 ;; minibuffer contents as far as possible. 1256 ;; minibuffer contents as far as possible.
1262 (setq unread-command-events '(9)) ; and delete any type-ahead! 1257 (setq unread-command-events '(9)) ; and delete any type-ahead!
1263 (completing-read "Manual file: " files nil 1 1258 (completing-read "Manual file: " files nil 1
1264 (try-completion "" files) 'woman-file-history))) 1259 (try-completion "" files) 'woman-file-history))))))
1265 )))
1266 1260
1267(defun woman-select (predicate list) 1261(defun woman-select (predicate list)
1268 "Select unique elements for which PREDICATE is true in LIST. 1262 "Select unique elements for which PREDICATE is true in LIST.
@@ -1741,7 +1735,10 @@ Leave point at end of new text. Return length of inserted text."
1741 (define-key woman-mode-map "w" 'woman) 1735 (define-key woman-mode-map "w" 'woman)
1742 (define-key woman-mode-map "\en" 'WoMan-next-manpage) 1736 (define-key woman-mode-map "\en" 'WoMan-next-manpage)
1743 (define-key woman-mode-map "\ep" 'WoMan-previous-manpage) 1737 (define-key woman-mode-map "\ep" 'WoMan-previous-manpage)
1744 (define-key woman-mode-map [M-mouse-2] 'woman-follow-word)) 1738 (define-key woman-mode-map [M-mouse-2] 'woman-follow-word)
1739
1740 ;; We don't need to call `man' when we are in `woman-mode'.
1741 (define-key woman-mode-map [remap man] 'woman))
1745 1742
1746(defun woman-follow-word (event) 1743(defun woman-follow-word (event)
1747 "Run WoMan with word under mouse as topic. 1744 "Run WoMan with word under mouse as topic.
@@ -1942,25 +1939,33 @@ Optional argument REDRAW, if non-nil, forces mode line to be updated."
1942(defvar WoMan-Man-start-time nil 1939(defvar WoMan-Man-start-time nil
1943 "Used to record formatting time used by the `man' command.") 1940 "Used to record formatting time used by the `man' command.")
1944 1941
1945(defadvice Man-getpage-in-background 1942;; Both advices are disabled because "a file in Emacs should not put
1946 (around Man-getpage-in-background-advice (topic) activate) 1943;; advice on a function in Emacs" (see Info node "(elisp)Advising
1947 "Use WoMan unless invoked outside a WoMan buffer or invoked explicitly. 1944;; Functions"). Counting the formatting time is useful for
1948Otherwise use Man and record start of formatting time." 1945;; developping, but less applicable for daily use. The advice for
1949 (if (and (eq major-mode 'woman-mode) 1946;; `Man-getpage-in-background' can be discarded, because the
1950 (not (eq (caar command-history) 'man))) 1947;; key-binding in `woman-mode-map' has been remapped to call `woman'
1951 (WoMan-getpage-in-background topic) 1948;; but `man'. Michael Albinus <michael.albinus@gmx.de>
1952 ;; Initiates man processing 1949
1953 (setq WoMan-Man-start-time (current-time)) 1950;; (defadvice Man-getpage-in-background
1954 ad-do-it)) 1951;; (around Man-getpage-in-background-advice (topic) activate)
1955 1952;; "Use WoMan unless invoked outside a WoMan buffer or invoked explicitly.
1956(defadvice Man-bgproc-sentinel 1953;; Otherwise use Man and record start of formatting time."
1957 (after Man-bgproc-sentinel-advice activate) 1954;; (if (and (eq major-mode 'woman-mode)
1958 ;; Terminates man processing 1955;; (not (eq (caar command-history) 'man)))
1959 "Report formatting time." 1956;; (WoMan-getpage-in-background topic)
1960 (let* ((time (current-time)) 1957;; ;; Initiates man processing
1961 (time (+ (* (- (car time) (car WoMan-Man-start-time)) 65536) 1958;; (setq WoMan-Man-start-time (current-time))
1962 (- (cadr time) (cadr WoMan-Man-start-time))))) 1959;; ad-do-it))
1963 (message "Man formatting done in %d seconds" time))) 1960
1961;; (defadvice Man-bgproc-sentinel
1962;; (after Man-bgproc-sentinel-advice activate)
1963;; ;; Terminates man processing
1964;; "Report formatting time."
1965;; (let* ((time (current-time))
1966;; (time (+ (* (- (car time) (car WoMan-Man-start-time)) 65536)
1967;; (- (cadr time) (cadr WoMan-Man-start-time)))))
1968;; (message "Man formatting done in %d seconds" time)))
1964 1969
1965 1970
1966;;; Buffer handling: 1971;;; Buffer handling: