aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorKaroly Lorentey2006-03-10 11:23:32 +0000
committerKaroly Lorentey2006-03-10 11:23:32 +0000
commitd2b86d7f40873f053489f386f7ab926bbb226bef (patch)
tree8c617fed23a63e9dca406fa1aa5daa7f0f0919b6 /lisp
parentdb9d7d9a54118c277fdc47b2840139e78218b1ae (diff)
parent61e66a158a521e1ebdaa2e547dcc98d383674a75 (diff)
downloademacs-d2b86d7f40873f053489f386f7ab926bbb226bef.tar.gz
emacs-d2b86d7f40873f053489f386f7ab926bbb226bef.zip
Merged from emacs@sv.gnu.org
Patches applied: * emacs@sv.gnu.org/emacs--devo--0--patch-136 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-137 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-138 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-139 Merge from gnus--rel--5.10 * emacs@sv.gnu.org/emacs--devo--0--patch-140 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-141 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-142 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-143 Merge from gnus--rel--5.10 * emacs@sv.gnu.org/gnus--rel--5.10--patch-49 Merge from emacs--devo--0 * emacs@sv.gnu.org/gnus--rel--5.10--patch-50 Update from CVS * emacs@sv.gnu.org/gnus--rel--5.10--patch-51 Update from CVS * emacs@sv.gnu.org/gnus--rel--5.10--patch-52 Merge from emacs--devo--0 * emacs@sv.gnu.org/gnus--rel--5.10--patch-53 Update from CVS: Makefile.in (release-*): New targets. * emacs@sv.gnu.org/gnus--rel--5.10--patch-54 Update from CVS * emacs@sv.gnu.org/gnus--rel--5.10--patch-55 Update from CVS git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-527
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog183
-rw-r--r--lisp/arc-mode.el8
-rw-r--r--lisp/complete.el27
-rw-r--r--lisp/files.el10
-rw-r--r--lisp/gnus/ChangeLog28
-rw-r--r--lisp/gnus/TODO193
-rw-r--r--lisp/gnus/gnus-group.el20
-rw-r--r--lisp/gnus/gnus-sum.el2
-rw-r--r--lisp/gnus/gnus-topic.el5
-rw-r--r--lisp/gnus/gnus-util.el17
-rw-r--r--lisp/gnus/mm-util.el3
-rw-r--r--lisp/gnus/mm-view.el26
-rw-r--r--lisp/gnus/nnmail.el21
-rw-r--r--lisp/help.el64
-rw-r--r--lisp/international/fontset.el3
-rw-r--r--lisp/mh-e/ChangeLog47
-rw-r--r--lisp/mh-e/mh-compat.el78
-rw-r--r--lisp/mh-e/mh-e.el4
-rw-r--r--lisp/mh-e/mh-folder.el3
-rw-r--r--lisp/mh-e/mh-letter.el3
-rw-r--r--lisp/mh-e/mh-search.el24
-rw-r--r--lisp/mh-e/mh-utils.el133
-rw-r--r--lisp/outline.el12
-rw-r--r--lisp/progmodes/gdb-ui.el7
-rw-r--r--lisp/progmodes/gud.el18
-rw-r--r--lisp/t-mouse.el32
-rw-r--r--lisp/textmodes/org.el340
-rw-r--r--lisp/tree-widget.el178
-rw-r--r--lisp/tumme.el6
-rw-r--r--lisp/url/ChangeLog11
-rw-r--r--lisp/url/url-http.el20
-rw-r--r--lisp/wdired.el1
32 files changed, 827 insertions, 700 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 9a539543947..647122caada 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,7 +1,120 @@
12006-03-08 Juanma Barranquero <lekktu@gmail.com>
2
3 * help.el (view-lossage): Remove trailing whitespace before
4 inserting "\n".
5
62006-03-07 Chong Yidong <cyd@stupidchicken.com>
7
8 * files.el (hack-local-variables-confirm): Set
9 coding-system-for-read to nil before writing to .emacs.
10
11 * arc-mode.el (archive-extract): Check if an existing buffer name
12 comes from a different archive.
13
14 * help.el (describe-key-briefly): If KEY is a down event, read and
15 discard the up event.
16
172006-03-07 Nick Roberts <nickrob@snap.net.nz>
18
19 * progmodes/gud.el (gud-speedbar-buttons): Allow pointers to
20 be edited and use font-lock-warning-face for any changes.
21
22 * progmodes/gdb-ui.el (gdb-edit-value-handler): New function.
23 (gdb-edit-value): Use it to report any errors.
24
252006-03-07 Juanma Barranquero <lekktu@gmail.com>
26
27 * help.el (describe-key): Remove leftover test code.
28
292006-03-07 Carsten Dominik <dominik@science.uva.nl>
30
31 * textmodes/org.el: Move defvars out of eval-when-compile. Use
32 buffer-file-name variable.
33 (org-agenda-file-to-end, org-agenda-file-to-front): Remove unused
34 arg `file'.
35 (org-level-faces): Remove startup dependency.
36 (org-cycle, org-map-tree, org-scan-tags)
37 (org-remember-handler): Don't call `outline-level' directly.
38 (org-mhe-search-all-folders): New option.
39 (org-mhe-get-message-folder-from-index)
40 (org-mhe-get-message-folder): Fix indexing search.
41 (org-format-agenda-item): Handle nil TAGS argument.
42 (org-cleaned-string-for-export, org-activate-target-links)
43 (org-make-target-link-regexp): Deal with empty radio target list.
44 (org-tag): New face.
45 (org-get-level-face): New function.
46 (org-set-font-lock-defaults): Simplify setup for headlines.
47 (org-complete): Pass common substring to
48 `display-completion-list'.
49
502006-03-06 David Ponce <david@dponce.com>
51
52 * tree-widget.el: Update Commentary header.
53 (tree-widget-theme-name): Ignore parent themes.
54 (tree-widget-set-parent-theme): New function.
55 (tree-widget-set-theme): Use it.
56 (tree-widget-set-image-properties): Move definition. Does nothing
57 if image properties have already been set.
58 (tree-widget-image-properties): Move definition. Receive an image
59 name. Set the :pointer property.
60 (tree-widget-lookup-image): Doc fix. Search in parent themes.
61 Don't set the :pointer image property.
62 (tree-widget-convert-widget): New function. Handle :dynargs
63 compatibility here.
64 (tree-widget): Use it to :convert-widget. Add the :expander-p
65 predicate to control when the :expander function is entered.
66 Thanks to Ken Manheimer <ken.manheimer@gmail.com> for the idea.
67 (tree-widget-value-create): Handle :expander-p. widget-apply
68 :expander.
69 (tree-widget-expander-p): New function. Default value of the
70 :expander-p property.
71
722006-03-06 Chong Yidong <cyd@stupidchicken.com>
73
74 * help.el (describe-key): Properly handle the return value of
75 read-key-sequence when grabbing an up-event. Cleanup mouse-1
76 remaps. Handle string and vector `follow-link' values.
77
782006-03-06 Stefan Monnier <monnier@iro.umontreal.ca>
79
80 * complete.el (PC-expand-many-files): Try be more careful when parsing
81 the shell's output.
82
832006-03-05 Stefan Monnier <monnier@iro.umontreal.ca>
84
85 * outline.el (hide-sublevels): Provide better interactive default.
86
872006-03-06 Kenichi Handa <handa@m17n.org>
88
89 * international/fontset.el (create-fontset-from-fontset-spec):
90 Fix regexp for paring FONTSET-SPEC (allow spaces after `:').
91
922006-03-05 Luc Teirlinck <teirllm@auburn.edu>
93
94 * progmodes/gud.el (gud-jdb-marker-filter): Quote `[' with two
95 backslashes instead of one in regexp.
96 (gud-tooltip-dereference): Add missing optional argument.
97
982006-03-04 John Paul Wallington <jpw@pobox.com>
99
100 * wdired.el (toplevel): Require `cl' at compile-time.
101
1022006-03-04 Andreas Schwab <schwab@suse.de>
103
104 * server.el (server-process-filter): Handle errors during
105 evaluation of the argument.
106
1072006-03-03 John Paul Wallington <jpw@pobox.com>
108
109 * t-mouse.el (t-mouse-drag-start, t-mouse-swap-alt-keys): Doc fix;
110 escape parentheses at beginning of line.
111 (t-mouse-tty, t-mouse-make-event): Doc fix; use imperative.
112 (t-mouse-mode): Remove period from end of error message.
113
12006-03-03 Agustin Martin <agustin.martin@hispalinux.es> 1142006-03-03 Agustin Martin <agustin.martin@hispalinux.es>
2 115
3 textmodes/flyspell.el (flyspell-process-localwords): Be 116 * textmodes/flyspell.el (flyspell-process-localwords):
4 case-sensitive. 117 Be case-sensitive.
5 118
62006-03-03 Martin Rudalics <rudalics@gmx.at> 1192006-03-03 Martin Rudalics <rudalics@gmx.at>
7 120
@@ -14,7 +127,7 @@
14 they have no special meaning. 127 they have no special meaning.
15 128
16 * midnight.el (clean-buffer-list): Handle case where base-buffer of 129 * midnight.el (clean-buffer-list): Handle case where base-buffer of
17 indirect buffer gets killed before indirect buffer. Use dolist. 130 indirect buffer gets killed before indirect buffer. Use dolist.
18 131
192006-03-03 Ken Manheimer <ken.manheimer@gmail.com> 1322006-03-03 Ken Manheimer <ken.manheimer@gmail.com>
20 133
@@ -23,8 +136,8 @@
23 136
242006-03-03 Slawomir Nowaczyk <slawomir.nowaczyk.847@student.lu.se> (tiny change) 1372006-03-03 Slawomir Nowaczyk <slawomir.nowaczyk.847@student.lu.se> (tiny change)
25 138
26 * textmodes/flyspell.el (flyspell-external-point-words): Be 139 * textmodes/flyspell.el (flyspell-external-point-words):
27 case-sensitive. 140 Be case-sensitive.
28 141
292006-03-03 Ryan Yeske <rcyeske@gmail.com> 1422006-03-03 Ryan Yeske <rcyeske@gmail.com>
30 143
@@ -33,37 +146,32 @@
33 146
342006-03-03 Ken Manheimer <ken.manheimer@gmail.com> 1472006-03-03 Ken Manheimer <ken.manheimer@gmail.com>
35 148
36 allout.el: Restablished intermediate missing comment header to 149 * allout.el: Restablish intermediate missing comment header to
37 preserve outline structure. 150 preserve outline structure.
38 (allout-beginning-of-current-entry): Wasn't skipping invisible 151 (allout-beginning-of-current-entry): Skip invisible text.
39 text - fixed. 152 (allout-open-topic): Fix opening a topic at end-of-buffer.
40 (allout-open-topic): Was failing when opening a topic at 153 (allout-minor-mode): Move nearer to allout-mode function.
41 end-of-buffer - fixed.
42 (allout-minor-mode): Moved nearer to allout-mode function.
43 154
442006-03-02 Carsten Dominik <dominik@science.uva.nl> 1552006-03-02 Carsten Dominik <dominik@science.uva.nl>
45 156
46 * textmodes/org.el (org-paste-subtree): Removed forgotten (debug) 157 * textmodes/org.el (org-paste-subtree): Remove (debug) form.
47 form.
48 158
492006-03-02 Nick Roberts <nickrob@snap.net.nz> 1592006-03-02 Nick Roberts <nickrob@snap.net.nz>
50 160
51 * dframe.el (dframe-frame-mode): Don't burp when menu-bar-lines 161 * dframe.el (dframe-frame-mode): Don't burp when menu-bar-lines
52 is nil. 162 is nil.
53 163
54 * progmodes/gud.el (gud-speedbar-menu-items): Use 164 * progmodes/gud.el (gud-speedbar-menu-items):
55 buffer-local-value and add missing :visible keyword. 165 Use buffer-local-value and add missing :visible keyword.
56 166
57 * progmodes/gdb-ui.el (gdb-speedbar-refresh): Quieten 167 * progmodes/gdb-ui.el (gdb-speedbar-refresh): Quieten speedbar-refresh.
58 speedbar-refresh.
59 168
602006-03-01 Carsten Dominik <dominik@science.uva.nl> 1692006-03-01 Carsten Dominik <dominik@science.uva.nl>
61 170
62 * textmodes/reftex-index.el (reftex-index-map): `follow-mouse' 171 * textmodes/reftex-index.el (reftex-index-map): `follow-mouse'
63 must be `follow-link'. 172 must be `follow-link'.
64 173
65 * textmodes/reftex-toc.el (reftex-toc-map): `follow-mouse' must be 174 * textmodes/reftex-toc.el (reftex-toc-map): Likewise.
66 `follow-link'.
67 175
68 * textmodes/org.el (org-export-as-html): Fix bugs in HTML 176 * textmodes/org.el (org-export-as-html): Fix bugs in HTML
69 formatting: No nested anchors. 177 formatting: No nested anchors.
@@ -71,8 +179,7 @@
71 (org-read-date): Add (require 'parse-time). 179 (org-read-date): Add (require 'parse-time).
72 (org-set-tags): Fix bug with extra inserted space. 180 (org-set-tags): Fix bug with extra inserted space.
73 (org-export-html-style): Define a style class for targets. 181 (org-export-html-style): Define a style class for targets.
74 (org-agenda-keymap, org-mouse-map): Add a binding for 182 (org-agenda-keymap, org-mouse-map): Add a binding for `follow-link'.
75 `follow-link'.
76 (org-hide-leading-stars): New option. 183 (org-hide-leading-stars): New option.
77 (org-hide): New face. 184 (org-hide): New face.
78 (org-set-font-lock-defaults): Allow to hide leading stars. 185 (org-set-font-lock-defaults): Allow to hide leading stars.
@@ -88,12 +195,11 @@
88 preserve window-start. 195 preserve window-start.
89 (speedbar-update-directory-contents): Try to preserve window-start 196 (speedbar-update-directory-contents): Try to preserve window-start
90 and window-point. 197 and window-point.
91 (speedbar-update-special-contents): Don't move back to start of 198 (speedbar-update-special-contents): Don't move back to start of window.
92 window.
93 199
94 * progmodes/gdb-ui.el (gdb-speedbar-refresh): Rename from 200 * progmodes/gdb-ui.el (gdb-speedbar-refresh): Rename from
95 gdb-speedbar-timer-fn. Use speedbar-refresh instead of 201 gdb-speedbar-timer-fn. Use speedbar-refresh instead of
96 speedbar-timer-fn 202 speedbar-timer-fn.
97 (gdb-var-update-handler, gdb-var-update-handler-1): Use it. 203 (gdb-var-update-handler, gdb-var-update-handler-1): Use it.
98 (gdb-speedbar-expand-node): Use speedbar-delete-subblock 204 (gdb-speedbar-expand-node): Use speedbar-delete-subblock
99 instead of gdb-speedbar-timer-fn. 205 instead of gdb-speedbar-timer-fn.
@@ -180,17 +286,17 @@
180 * startup.el (command-line): 286 * startup.el (command-line):
181 * subr.el (locate-library): 287 * subr.el (locate-library):
182 * emacs-lisp/autoload.el (update-directory-autoloads): 288 * emacs-lisp/autoload.el (update-directory-autoloads):
183 * emacs-lisp/find-func.el (find-library-suffixes): Use 289 * emacs-lisp/find-func.el (find-library-suffixes):
184 `get-load-suffixes' instead of `load-suffixes'. 290 Use `get-load-suffixes' instead of `load-suffixes'.
185 291
186 * subr.el (locate-library): 292 * subr.el (locate-library):
187 * emacs-lisp/find-func.el (find-library-name): Use 293 * emacs-lisp/find-func.el (find-library-name):
188 `load-file-rep-suffixes' instead of '(""). 294 Use `load-file-rep-suffixes' instead of '("").
189 295
1902006-02-26 Kim F. Storm <storm@cua.dk> 2962006-02-26 Kim F. Storm <storm@cua.dk>
191 297
192 * ido.el (ido-save-history, ido-load-history): Simplify. Don't 298 * ido.el (ido-save-history, ido-load-history): Simplify.
193 use find-file-noselect to avoid interference from other modes. 299 Don't use find-file-noselect to avoid interference from other modes.
194 300
1952006-02-25 Thien-Thi Nguyen <ttn@gnu.org> 3012006-02-25 Thien-Thi Nguyen <ttn@gnu.org>
196 302
@@ -209,8 +315,8 @@
209 315
2102006-02-24 Alan Mackenzie <bug-cc-mode@gnu.org> 3162006-02-24 Alan Mackenzie <bug-cc-mode@gnu.org>
211 317
212 * progmodes/cc-mode.el (c-postprocess-file-styles): Bind 318 * progmodes/cc-mode.el (c-postprocess-file-styles):
213 inhibit-read-only to t, around the call to 319 Bind inhibit-read-only to t, around the call to
214 c-remove-any-local-eval-or-mode-variables, so that it works on a 320 c-remove-any-local-eval-or-mode-variables, so that it works on a
215 RO file. 321 RO file.
216 322
@@ -251,13 +357,12 @@
251 357
252 * progmodes/cc-mode.el: 358 * progmodes/cc-mode.el:
253 [Supersedes patch to cc-engine.el 2005-12-16T20:07:49Z!monnier@iro.umontreal.ca] 359 [Supersedes patch to cc-engine.el 2005-12-16T20:07:49Z!monnier@iro.umontreal.ca]
254 (c-after-change): Protect the match data with save-match-data. It 360 (c-after-change): Protect the match data with save-match-data.
255 was getting corrupted by c-after-change-check-<>-operators. 361 It was getting corrupted by c-after-change-check-<>-operators.
256 362
257 * cc-defs.el: [Supersedes patch V1.38]: 363 * cc-defs.el: [Supersedes patch V1.38]:
258 (top level): Check for a buggy font-lock-compile-keywords ONLY in 364 (top level): Check for a buggy font-lock-compile-keywords ONLY in
259 XEmacs. GNU Emacs 22 now has a check which would throw an error 365 XEmacs. GNU Emacs 22 now has a check which would throw an error here.
260 here.
261 366
262 * progmodes/cc-awk.el (c-awk-after-change): Protect the match data 367 * progmodes/cc-awk.el (c-awk-after-change): Protect the match data
263 with save-match-data. It was being corrupted when Font Lock was 368 with save-match-data. It was being corrupted when Font Lock was
@@ -273,14 +378,12 @@
273 (c-forward-objc-directive): Replace c-forward-token-2 with crude 378 (c-forward-objc-directive): Replace c-forward-token-2 with crude
274 coding; c-f-t-2 doesn't move over a token at EOB. 379 coding; c-f-t-2 doesn't move over a token at EOB.
275 380
276 * progmodes/cc-defs.el (c-version): Update version number to 381 * progmodes/cc-defs.el (c-version): Update version number to 5.31.2.
277 5.31.2
278 382
279 * progmodes/cc-cmds.el, cc-mode.el, cc-engine.el 383 * progmodes/cc-cmds.el, cc-mode.el, cc-engine.el
280 (c-update-modeline): Concatenate the minor mode indicators 384 (c-update-modeline): Concatenate the minor mode indicators
281 directly onto mode-name, removing c-submode-indicators. 385 directly onto mode-name, removing c-submode-indicators.
282 Sometimes, c-s-i got separated from the mode name on the mode 386 Sometimes, c-s-i got separated from the mode name on the mode line.
283 line.
284 387
285 * progmodes/cc-cmds.el (c-electric-brace, c-electric-semi&comma) 388 * progmodes/cc-cmds.el (c-electric-brace, c-electric-semi&comma)
286 (c-electric-colon): Correct doc-strings: "/ln" -> "/la". 389 (c-electric-colon): Correct doc-strings: "/ln" -> "/la".
diff --git a/lisp/arc-mode.el b/lisp/arc-mode.el
index 9799e3e0834..abf38994235 100644
--- a/lisp/arc-mode.el
+++ b/lisp/arc-mode.el
@@ -907,16 +907,18 @@ using `make-temp-file', and the generated name is returned."
907 (read-only-p (or archive-read-only 907 (read-only-p (or archive-read-only
908 view-p 908 view-p
909 (string-match file-name-invalid-regexp ename))) 909 (string-match file-name-invalid-regexp ename)))
910 (arcfilename (expand-file-name (concat arcname ":" iname)))
910 (buffer (get-buffer bufname)) 911 (buffer (get-buffer bufname))
911 (just-created nil)) 912 (just-created nil))
912 (if buffer 913 (if (and buffer
914 (string= (buffer-file-name buffer) arcfilename))
913 nil 915 nil
914 (setq archive (archive-maybe-copy archive)) 916 (setq archive (archive-maybe-copy archive))
917 (setq bufname (generate-new-buffer-name bufname))
915 (setq buffer (get-buffer-create bufname)) 918 (setq buffer (get-buffer-create bufname))
916 (setq just-created t) 919 (setq just-created t)
917 (with-current-buffer buffer 920 (with-current-buffer buffer
918 (setq buffer-file-name 921 (setq buffer-file-name arcfilename)
919 (expand-file-name (concat arcname ":" iname)))
920 (setq buffer-file-truename 922 (setq buffer-file-truename
921 (abbreviate-file-name buffer-file-name)) 923 (abbreviate-file-name buffer-file-name))
922 ;; Set the default-directory to the dir of the superior buffer. 924 ;; Set the default-directory to the dir of the superior buffer.
diff --git a/lisp/complete.el b/lisp/complete.el
index a48942d2df1..a50d02c41f0 100644
--- a/lisp/complete.el
+++ b/lisp/complete.el
@@ -94,7 +94,7 @@
94 :group 'convenience) 94 :group 'convenience)
95 95
96(defcustom PC-first-char 'find-file 96(defcustom PC-first-char 'find-file
97 "*Control how the first character of a string is to be interpreted. 97 "Control how the first character of a string is to be interpreted.
98If nil, the first character of a string is not taken literally if it is a word 98If nil, the first character of a string is not taken literally if it is a word
99delimiter, so that \".e\" matches \"*.e*\". 99delimiter, so that \".e\" matches \"*.e*\".
100If t, the first character of a string is always taken literally even if it is a 100If t, the first character of a string is always taken literally even if it is a
@@ -107,13 +107,13 @@ completion."
107 :group 'partial-completion) 107 :group 'partial-completion)
108 108
109(defcustom PC-meta-flag t 109(defcustom PC-meta-flag t
110 "*If non-nil, TAB means PC completion and M-TAB means normal completion. 110 "If non-nil, TAB means PC completion and M-TAB means normal completion.
111Otherwise, TAB means normal completion and M-TAB means Partial Completion." 111Otherwise, TAB means normal completion and M-TAB means Partial Completion."
112 :type 'boolean 112 :type 'boolean
113 :group 'partial-completion) 113 :group 'partial-completion)
114 114
115(defcustom PC-word-delimiters "-_. " 115(defcustom PC-word-delimiters "-_. "
116 "*A string of characters treated as word delimiters for completion. 116 "A string of characters treated as word delimiters for completion.
117Some arcane rules: 117Some arcane rules:
118If `]' is in this string, it must come first. 118If `]' is in this string, it must come first.
119If `^' is in this string, it must not come first. 119If `^' is in this string, it must not come first.
@@ -124,13 +124,13 @@ expression (not containing character ranges like `a-z')."
124 :group 'partial-completion) 124 :group 'partial-completion)
125 125
126(defcustom PC-include-file-path '("/usr/include" "/usr/local/include") 126(defcustom PC-include-file-path '("/usr/include" "/usr/local/include")
127 "*A list of directories in which to look for include files. 127 "A list of directories in which to look for include files.
128If nil, means use the colon-separated path in the variable $INCPATH instead." 128If nil, means use the colon-separated path in the variable $INCPATH instead."
129 :type '(repeat directory) 129 :type '(repeat directory)
130 :group 'partial-completion) 130 :group 'partial-completion)
131 131
132(defcustom PC-disable-includes nil 132(defcustom PC-disable-includes nil
133 "*If non-nil, include-file support in \\[find-file] is disabled." 133 "If non-nil, include-file support in \\[find-file] is disabled."
134 :type 'boolean 134 :type 'boolean
135 :group 'partial-completion) 135 :group 'partial-completion)
136 136
@@ -764,7 +764,13 @@ or properties are considered."
764 (erase-buffer) 764 (erase-buffer)
765 (shell-command (concat "echo " name) t) 765 (shell-command (concat "echo " name) t)
766 (goto-char (point-min)) 766 (goto-char (point-min))
767 (if (looking-at ".*No match") 767 ;; CSH-style shells were known to output "No match", whereas
768 ;; SH-style shells tend to simply output `name' when no match is found.
769 (if (looking-at (concat ".*No match\\|\\(^\\| \\)\\("
770 (regexp-quote name)
771 "\\|"
772 (regexp-quote (expand-file-name name))
773 "\\)\\( \\|$\\)"))
768 nil 774 nil
769 (insert "(\"") 775 (insert "(\"")
770 (while (search-forward " " nil t) 776 (while (search-forward " " nil t)
@@ -787,7 +793,14 @@ or properties are considered."
787 "\\)\\'"))) 793 "\\)\\'")))
788 (setq p nil) 794 (setq p nil)
789 (while files 795 (while files
790 (or (string-match PC-ignored-regexp (car files)) 796 ;; This whole process of going through to shell, to echo, and
797 ;; finally parsing the output is a hack. It breaks as soon as
798 ;; there are spaces in the file names or when the no-match
799 ;; message changes. To make up for it, we check that what we read
800 ;; indeed exists, so we may miss some files, but we at least won't
801 ;; list non-existent ones.
802 (or (not (file-exists-p (car files)))
803 (string-match PC-ignored-regexp (car files))
791 (setq p (cons (car files) p))) 804 (setq p (cons (car files) p)))
792 (setq files (cdr files))) 805 (setq files (cdr files)))
793 p)))) 806 p))))
diff --git a/lisp/files.el b/lisp/files.el
index edbe0c2d285..f70c264642e 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -2405,9 +2405,13 @@ n -- to ignore the local variables list.
2405 (when (and (= char ?!) unsafe-vars) 2405 (when (and (= char ?!) unsafe-vars)
2406 (dolist (elt unsafe-vars) 2406 (dolist (elt unsafe-vars)
2407 (add-to-list 'safe-local-variable-values elt)) 2407 (add-to-list 'safe-local-variable-values elt))
2408 (customize-save-variable 2408 ;; When this is called from desktop-restore-file-buffer,
2409 'safe-local-variable-values 2409 ;; coding-system-for-read may be non-nil. Reset it before
2410 safe-local-variable-values)) 2410 ;; writing to .emacs.
2411 (let ((coding-system-for-read nil))
2412 (customize-save-variable
2413 'safe-local-variable-values
2414 safe-local-variable-values)))
2411 (kill-buffer buf) 2415 (kill-buffer buf)
2412 (or (= char ?!) 2416 (or (= char ?!)
2413 (= char ?\s) 2417 (= char ?\s)
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog
index dce2a5ae07f..374c3da2994 100644
--- a/lisp/gnus/ChangeLog
+++ b/lisp/gnus/ChangeLog
@@ -1,3 +1,31 @@
12006-03-08 Reiner Steib <Reiner.Steib@gmx.de>
2
3 * gnus-util.el (gnus-tool-bar-update): New function.
4
5 * gnus-group.el (gnus-group-update-tool-bar): New variable.
6 (gnus-group-insert-group-line): Add gnus-tool-bar-update.
7
8 * gnus-topic.el (gnus-topic-prepare-topic): Add gnus-tool-bar-update.
9
102006-03-08 Katsumi Yamaoka <yamaoka@jpl.org>
11
12 * nnmail.el (nnmail-split-it): Invert match-partial-words behavior
13 if optional last element is specified in splits (FIELD VALUE...).
14
152006-03-06 Katsumi Yamaoka <yamaoka@jpl.org>
16
17 * mm-view.el (mm-w3m-cid-retrieve-1): Check carefully whether
18 handle is multipart when calling it recursively.
19 (mm-w3m-cid-retrieve): Display warning if retrieving fails.
20
212006-03-03 Reiner Steib <Reiner.Steib@gmx.de>
22
23 * mm-util.el (mm-with-unibyte-current-buffer): Change "Emacs 23"
24 to "Emacs 23 (unicode)" in doc string.
25
26 * gnus-sum.el (gnus-summary-set-display-table): Change "Emacs 23" to
27 "Emacs 23 (unicode)" in comment.
28
12006-03-03 Katsumi Yamaoka <yamaoka@jpl.org> 292006-03-03 Katsumi Yamaoka <yamaoka@jpl.org>
2 30
3 * mm-decode.el (mm-get-part): Don't use 31 * mm-decode.el (mm-get-part): Don't use
diff --git a/lisp/gnus/TODO b/lisp/gnus/TODO
deleted file mode 100644
index 02afb6dca05..00000000000
--- a/lisp/gnus/TODO
+++ /dev/null
@@ -1,193 +0,0 @@
12004-08-22 Reiner Steib <Reiner.Steib@gmx.de>
2
3 * Disclaimer: This is *temporary* file to keep track of the changes
4 in the trunk, that have or have not made it into the Gnus branch.
5
6
7
82004--08-22 Reiner Steib <Reiner.Steib@gmx.de>
9
10 * Add `:version "21.4"' to all new defcustoms. Grep ChangeLog and
11 ChangeLog.1 for "new variable". Also check if the `:version
12 "21.1"' and `:version "21.3"' entries are correct.
13
14
15
162002-10-02 Karl Berry <karl@gnu.org>
17
18 * In directory ./man:
19
20 * emacs-mime.texi, gnus-faq.texi, gnus.texi, message.texi,
21 pgg.texi, sieve.texi: Per rms, update all manuals to use @copying
22 instead of @ifinfo. Also use @ifnottex instead of @ifinfo around
23 the top node, where needed for the sake of the HTML output.
24 (The Gnus manual is not fixed since it's not clear to me how it
25 works; and the Tramp manual already uses @copying, although in an
26 unusual way. All others were changed.)
27
28==> Done. Not yet in Gnus repository.
29
30
31
322004-06-29 Kim F. Storm <storm@cua.dk>
33
34 * nntp.el (nntp-authinfo-file): Add :group 'nntp.
35
36 * nnimap.el (nnimap-authinfo-file, nnimap-prune-cache):
37 Add :group 'nnimap.
38
39==> applied, here and in Gnus repository.
40
412004-05-18 Stefan Monnier <monnier@iro.umontreal.ca>
42
43 * mm-view.el (mm-insert-inline): Make it work in read-only buffer.
44
45 * gnus-win.el (gnus-all-windows-visible-p): Don't consider
46 non-visible windows.
47
482004-05-07 Stefan Monnier <monnier@iro.umontreal.ca>
49
50 * rfc2047.el (rfc2047-encode-message-header): Don't encode non-address
51 headers as address headers (which breaks if subject has a single ").
52
53==> already in Gnus
54
552004-05-06 Stefan Monnier <monnier@iro.umontreal.ca>
56
57 * nnimap.el (nnimap-demule): Avoid string-as-multibyte.
58
59==> applied, here and in Gnus repository.
60
612004-04-21 Richard M. Stallman <rms@gnu.org>
62
63 * mailcap.el (mailcap-mime-data): Mark as risky.
64
65==> applied, here and in Gnus repository.
66
672004-03-27 Juanma Barranquero <lektu@terra.es>
68
69 * gnus-srvr.el (gnus-server-prepare): Remove spurious call to `cdr'.
70
71==> already in Gnus
72
732004-03-22 Stefan Monnier <monnier@iro.umontreal.ca>
74
75 * gnus-art.el: Use inhibit-read-only instead of buffer-read-only.
76 (gnus-narrow-to-page): Don't assume point-min == 1.
77 (gnus-article-edit-mode): Derive from message-mode.
78 (gnus-button-alist): Add buttons to (info "(emacs)Keymaps").
79
80 * gnus-score.el (gnus-score-find-bnews): Simplify and don't assume
81 point-min == 1.
82
83 * imap.el (imap-parse-address-list, imap-parse-body-ext):
84 Disable incorrect use of `assert'.
85
86==> applied / modified
87
882004-03-05 Stefan Monnier <monnier@iro.umontreal.ca>
89
90 * message.el (message-mode): Fix last change.
91
92==> applied
93
942004-03-04 Stefan Monnier <monnier@iro.umontreal.ca>
95
96 * message.el (message-mode): Set comment-start-skip.
97
98==> applied
99
1002004-02-08 Andreas Schwab <schwab@suse.de>
101
102 * nnlistserv.el (nnlistserv-kk-wash-article): Fix paren nesting.
103
104 * gnus-score.el (gnus-summary-increase-score): Fix format string.
105
106==> applied; here and in Gnus v5-10. Already fixed in No Gnus.
107
1082003-06-25 Sam Steingold <sds@gnu.org>
109
110 * gnus-group.el (gnus-group-suspend): Avoid some consing.
111
112==> hunk FAILED / not very important / skip
113
1142003-06-11 Sam Steingold <sds@gnu.org>
115
116 * pop3.el (pop3-leave-mail-on-server): New user variable.
117 (pop3-movemail): Delete mail only when it is nil.
118
119==> applied / Was not documented in the Gnus manual, added it.
120
1212003-05-10 Juanma Barranquero <lektu@terra.es>
122
123 * message.el (message-buffer-naming-style): Fix typo.
124
125==> variable has been removed.
126
1272003-05-07 Dave Love <fx@gnu.org>
128
129 [Partial sync with Gnus.]
130
131 * rfc2047.el (rfc2047-header-encoding-alist): Add Followup-To.
132 (rfc2047-encode-message-header): Fold when encoding not necessary.
133 (rfc2047-encode-region): Skip \n as whitespace.
134 (rfc2047-fold-region): Fix whitespace regexps. Don't break just
135 after the header name.
136 (rfc2047-unfold-region): Fix regexp and whitespace-skipping.
137
1382003-05-06 Jesper Harder <harder@ifa.au.dk>
139
140 * gnus-cus.el (gnus-group-customize, gnus-score-parameters):
141 Don't quote nil and t in docstrings.
142
143 * gnus-score.el (gnus-score-lower-thread): Likewise.
144
145 * gnus-art.el (gnus-article-mime-match-handle-function): Likewise.
146
147==> already in Gnus
148
1492003-02-28 ShengHuo ZHU <zsh@cs.rochester.edu>
150
151 * nnfolder.el (nnfolder-request-accept-article): Don't use
152 mail-header-unfold-field.
153
154 * imap.el (imap-ssl-open): Don't depend on ssl.el.
155 * nntp.el (nntp-open-ssl-stream): Don't depend on ssl.el.
156
1572003-02-18 Juanma Barranquero <lektu@terra.es>
158
159 * ietf-drums.el (ietf-drums-remove-whitespace): Fix character constant.
160
1612003-02-14 Juanma Barranquero <lektu@terra.es>
162
163 * mm-uu.el (mm-uu-dissect): Fix use of character constant.
164
165==> already done. [2003-02-14 ShengHuo ZHU synced stuff to Gnus]
166
1672003-02-11 Stefan Monnier <monnier@cs.yale.edu>
168
169 * nntp.el (nntp-accept-process-output): Don't use point-max to get
170 the buffer's size.
171
172==> already done. [2003-02-14 ShengHuo ZHU synced stuff to Gnus]
173
1742003-01-31 Joe Buehler <jhpb@draco.hekimian.com>
175
176 * nnheader.el: Added cygwin to system-type comparisons.
177
178==> already done.
179
180
181
1822004-08-22 Reiner Steib <Reiner.Steib@gmx.de>
183
184 * It seems that the last few changes and all older changes have
185 already been applied in Gnus repository, e.g. by ShengHuo ZHU
186 <zsh@cs.rochester.edu>.
187
188# Local Variables:
189# coding: iso-2022-7bit
190# mode: change-log
191# End:
192
193# arch-tag: e6e5d695-4d00-46b1-a49d-508a2418a483
diff --git a/lisp/gnus/gnus-group.el b/lisp/gnus/gnus-group.el
index 933c3762ed9..3d20af8b0df 100644
--- a/lisp/gnus/gnus-group.el
+++ b/lisp/gnus/gnus-group.el
@@ -1379,6 +1379,18 @@ if it is a string, only list groups matching REGEXP."
1379 (gnus-range-difference (list active) (gnus-info-read info)) 1379 (gnus-range-difference (list active) (gnus-info-read info))
1380 seen)))))) 1380 seen))))))
1381 1381
1382(defcustom gnus-group-update-tool-bar
1383 (and (not (featurep 'xemacs))
1384 (boundp 'tool-bar-mode)
1385 tool-bar-mode
1386 ;; Using `redraw-frame' (see `gnus-tool-bar-update') in Emacs 21 might
1387 ;; be confusing, so maybe we shouldn't call it by default.
1388 (fboundp 'force-window-update))
1389 "Force updating the group buffer tool bar."
1390 :group 'gnus-group
1391 :version "22.1"
1392 :type 'boolean)
1393
1382(defun gnus-group-insert-group-line (gnus-tmp-group gnus-tmp-level 1394(defun gnus-group-insert-group-line (gnus-tmp-group gnus-tmp-level
1383 gnus-tmp-marked number 1395 gnus-tmp-marked number
1384 gnus-tmp-method) 1396 gnus-tmp-method)
@@ -1447,8 +1459,10 @@ if it is a string, only list groups matching REGEXP."
1447 (bbb-grouplens-group-p gnus-tmp-group)) 1459 (bbb-grouplens-group-p gnus-tmp-group))
1448 "")) 1460 ""))
1449 (buffer-read-only nil) 1461 (buffer-read-only nil)
1462 beg end
1450 header gnus-tmp-header) ; passed as parameter to user-funcs. 1463 header gnus-tmp-header) ; passed as parameter to user-funcs.
1451 (beginning-of-line) 1464 (beginning-of-line)
1465 (setq beg (point))
1452 (gnus-add-text-properties 1466 (gnus-add-text-properties
1453 (point) 1467 (point)
1454 (prog1 (1+ (point)) 1468 (prog1 (1+ (point))
@@ -1463,6 +1477,12 @@ if it is a string, only list groups matching REGEXP."
1463 gnus-marked ,gnus-tmp-marked-mark 1477 gnus-marked ,gnus-tmp-marked-mark
1464 gnus-indentation ,gnus-group-indentation 1478 gnus-indentation ,gnus-group-indentation
1465 gnus-level ,gnus-tmp-level)) 1479 gnus-level ,gnus-tmp-level))
1480 (setq end (point))
1481 (when gnus-group-update-tool-bar
1482 (gnus-put-text-property beg end 'point-entered
1483 'gnus-tool-bar-update)
1484 (gnus-put-text-property beg end 'point-left
1485 'gnus-tool-bar-update))
1466 (forward-line -1) 1486 (forward-line -1)
1467 (when (inline (gnus-visual-p 'group-highlight 'highlight)) 1487 (when (inline (gnus-visual-p 'group-highlight 'highlight))
1468 (gnus-run-hooks 'gnus-group-update-hook)) 1488 (gnus-run-hooks 'gnus-group-update-hook))
diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el
index 226a9bd50f1..e4ca47f1ea2 100644
--- a/lisp/gnus/gnus-sum.el
+++ b/lisp/gnus/gnus-sum.el
@@ -3099,7 +3099,7 @@ display only a single character."
3099 ;; We keep TAB as well. 3099 ;; We keep TAB as well.
3100 (aset table ?\t nil) 3100 (aset table ?\t nil)
3101 ;; We nix out any glyphs 127 through 255, or 127 through 159 in 3101 ;; We nix out any glyphs 127 through 255, or 127 through 159 in
3102 ;; Emacs 23, that are not set already. 3102 ;; Emacs 23 (unicode), that are not set already.
3103 (let ((i (if (ignore-errors (= (make-char 'latin-iso8859-1 160) 160)) 3103 (let ((i (if (ignore-errors (= (make-char 'latin-iso8859-1 160) 160))
3104 160 3104 160
3105 256))) 3105 256)))
diff --git a/lisp/gnus/gnus-topic.el b/lisp/gnus/gnus-topic.el
index fc80a26f6b9..45585526bcf 100644
--- a/lisp/gnus/gnus-topic.el
+++ b/lisp/gnus/gnus-topic.el
@@ -585,6 +585,11 @@ articles in the topic and its subtopics."
585 (not (eq (nth 2 type) 'hidden)) 585 (not (eq (nth 2 type) 'hidden))
586 level all-entries unread)) 586 level all-entries unread))
587 (gnus-topic-update-unreads (car type) unread) 587 (gnus-topic-update-unreads (car type) unread)
588 (when gnus-group-update-tool-bar
589 (gnus-put-text-property beg end 'point-entered
590 'gnus-tool-bar-update)
591 (gnus-put-text-property beg end 'point-left
592 'gnus-tool-bar-update))
588 (goto-char end) 593 (goto-char end)
589 unread)) 594 unread))
590 595
diff --git a/lisp/gnus/gnus-util.el b/lisp/gnus/gnus-util.el
index c9a3f8c965a..686fe1cf837 100644
--- a/lisp/gnus/gnus-util.el
+++ b/lisp/gnus/gnus-util.el
@@ -1459,6 +1459,23 @@ Return nil otherwise."
1459 display)) 1459 display))
1460 display))))) 1460 display)))))
1461 1461
1462(defun gnus-tool-bar-update (&rest ignore)
1463 "Update the tool bar."
1464 (when (and (boundp 'tool-bar-mode)
1465 tool-bar-mode)
1466 (let* ((args nil)
1467 (func (cond ((featurep 'xemacs)
1468 'ignore)
1469 ((fboundp 'tool-bar-update)
1470 'tool-bar-update)
1471 ((fboundp 'force-window-update)
1472 'force-window-update)
1473 ((fboundp 'redraw-frame)
1474 (setq args (list (selected-frame)))
1475 'redraw-frame)
1476 (t 'ignore))))
1477 (apply func args))))
1478
1462;; Fixme: This has only one use (in gnus-agent), which isn't worthwhile. 1479;; Fixme: This has only one use (in gnus-agent), which isn't worthwhile.
1463(defmacro gnus-mapcar (function seq1 &rest seqs2_n) 1480(defmacro gnus-mapcar (function seq1 &rest seqs2_n)
1464 "Apply FUNCTION to each element of the sequences, and make a list of the results. 1481 "Apply FUNCTION to each element of the sequences, and make a list of the results.
diff --git a/lisp/gnus/mm-util.el b/lisp/gnus/mm-util.el
index e4c87067872..a8c1f3a87a1 100644
--- a/lisp/gnus/mm-util.el
+++ b/lisp/gnus/mm-util.el
@@ -802,7 +802,8 @@ NOTE: Use this macro with caution in multibyte buffers (it is not
802worth using this macro in unibyte buffers of course). Use of 802worth using this macro in unibyte buffers of course). Use of
803`(set-buffer-multibyte t)', which is run finally, is generally 803`(set-buffer-multibyte t)', which is run finally, is generally
804harmful since it is likely to modify existing data in the buffer. 804harmful since it is likely to modify existing data in the buffer.
805For instance, it converts \"\\300\\255\" into \"\\255\" in Emacs 23." 805For instance, it converts \"\\300\\255\" into \"\\255\" in
806Emacs 23 (unicode)."
806 (let ((multibyte (make-symbol "multibyte")) 807 (let ((multibyte (make-symbol "multibyte"))
807 (buffer (make-symbol "buffer"))) 808 (buffer (make-symbol "buffer")))
808 `(if mm-emacs-mule 809 `(if mm-emacs-mule
diff --git a/lisp/gnus/mm-view.el b/lisp/gnus/mm-view.el
index c2b4e19f806..5972a0681a6 100644
--- a/lisp/gnus/mm-view.el
+++ b/lisp/gnus/mm-view.el
@@ -213,21 +213,25 @@
213 213
214(defun mm-w3m-cid-retrieve-1 (url handle) 214(defun mm-w3m-cid-retrieve-1 (url handle)
215 (dolist (elem handle) 215 (dolist (elem handle)
216 (when (listp elem) 216 (when (consp elem)
217 (if (equal url (mm-handle-id elem)) 217 (when (equal url (mm-handle-id elem))
218 (progn 218 (mm-insert-part elem)
219 (mm-insert-part elem) 219 (throw 'found-handle (mm-handle-media-type elem)))
220 (throw 'found-handle (mm-handle-media-type elem)))) 220 (when (and (stringp (car elem))
221 (if (equal "multipart" (mm-handle-media-supertype elem)) 221 (equal "multipart" (mm-handle-media-supertype elem)))
222 (mm-w3m-cid-retrieve-1 url elem))))) 222 (mm-w3m-cid-retrieve-1 url elem)))))
223 223
224(defun mm-w3m-cid-retrieve (url &rest args) 224(defun mm-w3m-cid-retrieve (url &rest args)
225 "Insert a content pointed by URL if it has the cid: scheme." 225 "Insert a content pointed by URL if it has the cid: scheme."
226 (when (string-match "\\`cid:" url) 226 (when (string-match "\\`cid:" url)
227 (catch 'found-handle 227 (or (catch 'found-handle
228 (mm-w3m-cid-retrieve-1 (concat "<" (substring url (match-end 0)) ">") 228 (mm-w3m-cid-retrieve-1
229 (with-current-buffer w3m-current-buffer 229 (setq url (concat "<" (substring url (match-end 0)) ">"))
230 gnus-article-mime-handles))))) 230 (with-current-buffer w3m-current-buffer
231 gnus-article-mime-handles)))
232 (prog1
233 nil
234 (message "Failed to find \"Content-ID: %s\"" url)))))
231 235
232(defun mm-inline-text-html-render-with-w3m (handle) 236(defun mm-inline-text-html-render-with-w3m (handle)
233 "Render a text/html part using emacs-w3m." 237 "Render a text/html part using emacs-w3m."
diff --git a/lisp/gnus/nnmail.el b/lisp/gnus/nnmail.el
index edffd6f709a..f4275fa8ed5 100644
--- a/lisp/gnus/nnmail.el
+++ b/lisp/gnus/nnmail.el
@@ -1425,11 +1425,12 @@ See the documentation for the variable `nnmail-split-fancy' for details."
1425 1425
1426 ;; Not in cache, compute a regexp for the field/value pair. 1426 ;; Not in cache, compute a regexp for the field/value pair.
1427 (t 1427 (t
1428 (let* ((field (nth 0 split)) 1428 (let ((field (nth 0 split))
1429 (value (nth 1 split)) 1429 (value (nth 1 split))
1430 partial-front 1430 (split-rest (cddr split))
1431 partial-rear 1431 partial-front
1432 regexp) 1432 partial-rear
1433 regexp)
1433 (if (symbolp value) 1434 (if (symbolp value)
1434 (setq value (cdr (assq value nnmail-split-abbrev-alist)))) 1435 (setq value (cdr (assq value nnmail-split-abbrev-alist))))
1435 (if (and (>= (length value) 2) 1436 (if (and (>= (length value) 2)
@@ -1441,7 +1442,13 @@ See the documentation for the variable `nnmail-split-fancy' for details."
1441 (string= ".*" (substring value -2))) 1442 (string= ".*" (substring value -2)))
1442 (setq value (substring value 0 -2) 1443 (setq value (substring value 0 -2)
1443 partial-rear "")) 1444 partial-rear ""))
1444 (when nnmail-split-fancy-match-partial-words 1445 ;; Invert the match-partial-words behavior if the optional
1446 ;; last element is specified.
1447 (while (eq (car split-rest) '-)
1448 (setq split-rest (cddr split-rest)))
1449 (when (if (cadr split-rest)
1450 (not nnmail-split-fancy-match-partial-words)
1451 nnmail-split-fancy-match-partial-words)
1445 (setq partial-front "" 1452 (setq partial-front ""
1446 partial-rear "")) 1453 partial-rear ""))
1447 (setq regexp (concat "^\\(\\(" 1454 (setq regexp (concat "^\\(\\("
@@ -1456,7 +1463,7 @@ See the documentation for the variable `nnmail-split-fancy' for details."
1456 (or partial-rear "\\>"))) 1463 (or partial-rear "\\>")))
1457 (push (cons split regexp) nnmail-split-cache) 1464 (push (cons split regexp) nnmail-split-cache)
1458 ;; Now that it's in the cache, just call nnmail-split-it again 1465 ;; Now that it's in the cache, just call nnmail-split-it again
1459 ;; on the same split, which will find it immediately in the cache. 1466 ;; on the same split, which will find it immediately in the cache.
1460 (nnmail-split-it split)))))) 1467 (nnmail-split-it split))))))
1461 1468
1462(defun nnmail-expand-newtext (newtext) 1469(defun nnmail-expand-newtext (newtext)
diff --git a/lisp/help.el b/lisp/help.el
index bed25366aab..5eef13ff9c9 100644
--- a/lisp/help.el
+++ b/lisp/help.el
@@ -429,8 +429,9 @@ To record all your input on a file, use `open-dribble-file'."
429 (with-current-buffer standard-output 429 (with-current-buffer standard-output
430 (goto-char (point-min)) 430 (goto-char (point-min))
431 (while (progn (move-to-column 50) (not (eobp))) 431 (while (progn (move-to-column 50) (not (eobp)))
432 (search-forward " " nil t) 432 (when (search-forward " " nil t)
433 (insert "\n"))) 433 (delete-char -1))
434 (insert "\n")))
434 (print-help-return-message))) 435 (print-help-return-message)))
435 436
436 437
@@ -577,6 +578,12 @@ temporarily enables it to allow getting help on disabled items and buttons."
577 (setq saved-yank-menu (copy-sequence yank-menu)) 578 (setq saved-yank-menu (copy-sequence yank-menu))
578 (menu-bar-update-yank-menu "(any string)" nil)) 579 (menu-bar-update-yank-menu "(any string)" nil))
579 (setq key (read-key-sequence "Describe key (or click or menu item): ")) 580 (setq key (read-key-sequence "Describe key (or click or menu item): "))
581 ;; If KEY is a down-event, read and discard the
582 ;; corresponding up-event.
583 (if (and (vectorp key)
584 (eventp (elt key 0))
585 (memq 'down (event-modifiers (elt key 0))))
586 (read-event))
580 (list 587 (list
581 key 588 key
582 (if current-prefix-arg (prefix-numeric-value current-prefix-arg)) 589 (if current-prefix-arg (prefix-numeric-value current-prefix-arg))
@@ -658,8 +665,9 @@ temporarily enables it to allow getting help on disabled items and buttons."
658 (prefix-numeric-value current-prefix-arg) 665 (prefix-numeric-value current-prefix-arg)
659 ;; If KEY is a down-event, read the corresponding up-event 666 ;; If KEY is a down-event, read the corresponding up-event
660 ;; and use it as the third argument. 667 ;; and use it as the third argument.
661 (if (and (consp key) (symbolp (car key)) 668 (if (and (vectorp key)
662 (memq 'down (cdr (get (car key) 'event-symbol-elements)))) 669 (eventp (elt key 0))
670 (memq 'down (event-modifiers (elt key 0))))
663 (read-event)))) 671 (read-event))))
664 ;; Put yank-menu back as it was, if we changed it. 672 ;; Put yank-menu back as it was, if we changed it.
665 (when saved-yank-menu 673 (when saved-yank-menu
@@ -705,30 +713,34 @@ temporarily enables it to allow getting help on disabled items and buttons."
705 (princ "\n which is ") 713 (princ "\n which is ")
706 (describe-function-1 defn) 714 (describe-function-1 defn)
707 (when up-event 715 (when up-event
708 (let ((ev (aref up-event 0)) 716 (let ((type (event-basic-type up-event))
709 (descr (key-description up-event))
710 (hdr "\n\n-------------- up event ---------------\n\n") 717 (hdr "\n\n-------------- up event ---------------\n\n")
711 defn 718 defn sequence
712 mouse-1-tricky mouse-1-remapped) 719 mouse-1-tricky mouse-1-remapped)
713 (when (and (consp ev) 720 (setq sequence (vector up-event))
714 (eq (car ev) 'mouse-1) 721 (when (and (eq type 'mouse-1)
715 (windowp window) 722 (windowp window)
716 mouse-1-click-follows-link 723 mouse-1-click-follows-link
717 (not (eq mouse-1-click-follows-link 'double)) 724 (not (eq mouse-1-click-follows-link 'double))
718 (with-current-buffer (window-buffer window) 725 (setq mouse-1-remapped
719 (mouse-on-link-p (posn-point (event-start ev))))) 726 (with-current-buffer (window-buffer window)
720 (setq mouse-1-tricky (integerp mouse-1-click-follows-link) 727 (mouse-on-link-p (posn-point
721 mouse-1-remapped (or (not mouse-1-tricky) 728 (event-start up-event))))))
722 (> mouse-1-click-follows-link 0))) 729 (setq mouse-1-tricky (and (integerp mouse-1-click-follows-link)
723 (if mouse-1-remapped 730 (> mouse-1-click-follows-link 0)))
724 (setcar ev 'mouse-2))) 731 (cond ((stringp mouse-1-remapped)
725 (setq defn (or (string-key-binding up-event) (key-binding up-event))) 732 (setq sequence mouse-1-remapped))
733 ((vectorp mouse-1-remapped)
734 (setcar up-event (elt mouse-1-remapped 0)))
735 (t (setcar up-event 'mouse-2))))
736 (setq defn (or (string-key-binding sequence)
737 (key-binding sequence)))
726 (unless (or (null defn) (integerp defn) (equal defn 'undefined)) 738 (unless (or (null defn) (integerp defn) (equal defn 'undefined))
727 (princ (if mouse-1-tricky 739 (princ (if mouse-1-tricky
728 "\n\n----------------- up-event (short click) ----------------\n\n" 740 "\n\n----------------- up-event (short click) ----------------\n\n"
729 hdr)) 741 hdr))
730 (setq hdr nil) 742 (setq hdr nil)
731 (princ descr) 743 (princ (symbol-name type))
732 (if (windowp window) 744 (if (windowp window)
733 (princ " at that spot")) 745 (princ " at that spot"))
734 (if mouse-1-remapped 746 (if mouse-1-remapped
@@ -738,26 +750,22 @@ temporarily enables it to allow getting help on disabled items and buttons."
738 (princ "\n which is ") 750 (princ "\n which is ")
739 (describe-function-1 defn)) 751 (describe-function-1 defn))
740 (when mouse-1-tricky 752 (when mouse-1-tricky
741 (setcar ev 753 (setcar up-event 'mouse-1)
742 (if (> mouse-1-click-follows-link 0) 'mouse-1 'mouse-2)) 754 (setq defn (or (string-key-binding (vector up-event))
743 (setq defn (or (string-key-binding up-event) (key-binding up-event))) 755 (key-binding (vector up-event))))
744 (unless (or (null defn) (integerp defn) (equal defn 'undefined)) 756 (unless (or (null defn) (integerp defn) (eq defn 'undefined))
745 (princ (or hdr 757 (princ (or hdr
746 "\n\n----------------- up-event (long click) ----------------\n\n")) 758 "\n\n----------------- up-event (long click) ----------------\n\n"))
747 (princ "Pressing ") 759 (princ "Pressing mouse-1")
748 (princ descr)
749 (if (windowp window) 760 (if (windowp window)
750 (princ " at that spot")) 761 (princ " at that spot"))
751 (princ (format " for longer than %d milli-seconds\n" 762 (princ (format " for longer than %d milli-seconds\n"
752 (abs mouse-1-click-follows-link))) 763 mouse-1-click-follows-link))
753 (if (not mouse-1-remapped)
754 (princ " remaps it to <mouse-2> which" ))
755 (princ " runs the command ") 764 (princ " runs the command ")
756 (prin1 defn) 765 (prin1 defn)
757 (princ "\n which is ") 766 (princ "\n which is ")
758 (describe-function-1 defn))))) 767 (describe-function-1 defn)))))
759 (print-help-return-message))))))) 768 (print-help-return-message)))))))
760
761 769
762(defun describe-mode (&optional buffer) 770(defun describe-mode (&optional buffer)
763 "Display documentation of current major mode and minor modes. 771 "Display documentation of current major mode and minor modes.
diff --git a/lisp/international/fontset.el b/lisp/international/fontset.el
index 1e5c9508f4e..e42ab3e5ee9 100644
--- a/lisp/international/fontset.el
+++ b/lisp/international/fontset.el
@@ -542,7 +542,8 @@ It returns a name of the created fontset."
542 (error "Fontset \"%s\" not conforming to XLFD" name)) 542 (error "Fontset \"%s\" not conforming to XLFD" name))
543 543
544 ;; At first, extract pairs of charset and fontname from FONTSET-SPEC. 544 ;; At first, extract pairs of charset and fontname from FONTSET-SPEC.
545 (while (string-match "[, \t\n]*\\([^:]+\\):\\([^,]+\\)" fontset-spec idx) 545 (while (string-match "[, \t\n]*\\([^:]+\\):[ \t]*\\([^,]+\\)"
546 fontset-spec idx)
546 (setq idx (match-end 0)) 547 (setq idx (match-end 0))
547 (setq charset (intern (match-string 1 fontset-spec))) 548 (setq charset (intern (match-string 1 fontset-spec)))
548 (if (charsetp charset) 549 (if (charsetp charset)
diff --git a/lisp/mh-e/ChangeLog b/lisp/mh-e/ChangeLog
index bf6dfd95e6e..0a097cb2f02 100644
--- a/lisp/mh-e/ChangeLog
+++ b/lisp/mh-e/ChangeLog
@@ -1,3 +1,46 @@
12006-03-06 Bill Wohler <wohler@newt.com>
2
3 * mh-e.el (Version, mh-version): Add +cvs to version.
4
52006-03-05 Satyaki Das <satyaki@theforce.stanford.edu>
6
7 * mh-search.el (mh-index-update-single-msg): Fix a bug in the
8 handling of duplicate messages. The test in cond was too strong
9 and wasn't catching the case where origin-map was nil.
10
112006-03-05 Bill Wohler <wohler@newt.com>
12
13 Release MH-E version 7.93.
14
15 * mh-e.el (Version, mh-version): Update for release 7.93.
16
172006-03-05 Bill Wohler <wohler@newt.com>
18
19 * mh-folder.el (mh-folder-mode): Drop 'load-path argument when
20 calling mh-image-load-path-for-library since this is the default.
21
22 * mh-letter.el (mh-letter-mode): Ditto.
23
24 * mh-utils.el (mh-logo-display): Ditto.
25
262006-03-04 Bill Wohler <wohler@newt.com>
27
28 * mh-compat.el (mh-image-load-path-for-library): Move here from
29 mh-utils.el and wrap with mh-defun-compat since this function will
30 be soon added to image.el.
31
32 * mh-utils.el (mh-image-load-path-for-library): Move to
33 mh-compat.el.
34 (mh-normalize-folder-name): Add return-nil-if-folder-empty
35 argument which is useful when calling mh-normalize-folder-name to
36 process the folder argument for the folders command.
37 (mh-sub-folders): Use new flag to mh-normalize-folder-name to make
38 this function more robust. It could too easily list the folders in
39 /.
40 (mh-folder-list): Fix a couple of problems pointed out by Thomas
41 Baumann. Set folder to nil if empty. Don't append "/" if folder
42 nil.
43
12006-03-03 Bill Wohler <wohler@newt.com> 442006-03-03 Bill Wohler <wohler@newt.com>
2 45
3 * mh-folder.el (mh-folder-mode): Rename mh-image-load-path to 46 * mh-folder.el (mh-folder-mode): Rename mh-image-load-path to
@@ -36,8 +79,8 @@
36 (mh-tool-bar-letter-buttons-init): Don't call mh-image-load-path. 79 (mh-tool-bar-letter-buttons-init): Don't call mh-image-load-path.
37 (mh-tool-bar-define call): Format. 80 (mh-tool-bar-define call): Format.
38 81
39 * mh-utils.el (mh-image-directory, 82 * mh-utils.el (mh-image-directory)
40 mh-image-load-path-called-flag): Delete. 83 (mh-image-load-path-called-flag): Delete.
41 (mh-image-load-path): Incorporate changes from Gnus team. Biggest 84 (mh-image-load-path): Incorporate changes from Gnus team. Biggest
42 changes are that it no longer uses/sets mh-image-directory or 85 changes are that it no longer uses/sets mh-image-directory or
43 mh-image-load-path-called-flag, and returns the updated path 86 mh-image-load-path-called-flag, and returns the updated path
diff --git a/lisp/mh-e/mh-compat.el b/lisp/mh-e/mh-compat.el
index faa91a3bca2..77e39de35f5 100644
--- a/lisp/mh-e/mh-compat.el
+++ b/lisp/mh-e/mh-compat.el
@@ -115,6 +115,84 @@ introduced in Emacs 22."
115 `(face-background ,face ,frame) 115 `(face-background ,face ,frame)
116 `(face-background ,face ,frame ,inherit))) 116 `(face-background ,face ,frame ,inherit)))
117 117
118(mh-defun-compat mh-image-load-path-for-library
119 image-load-path-for-library (library image &optional path)
120 "Return a suitable search path for images relative to LIBRARY.
121
122Images for LIBRARY are searched for in \"../../etc/images\" and
123\"../etc/images\" relative to the files in \"lisp/LIBRARY\" as
124well as in `image-load-path' and `load-path'.
125
126This function returns the value of `load-path' augmented with the
127path to IMAGE. If PATH is given, it is used instead of
128`load-path'.
129
130Here is an example that uses a common idiom to provide
131compatibility with versions of Emacs that lack the variable
132`image-load-path':
133
134 (let ((load-path
135 (image-load-path-for-library \"mh-e\" \"mh-logo.xpm\"))
136 (image-load-path
137 (image-load-path-for-library \"mh-e\" \"mh-logo.xpm\" 'image-load-path)))
138 (mh-tool-bar-folder-buttons-init))
139
140This function is used by Emacs versions that don't have
141`image-load-path-for-library'."
142 (unless library (error "No library specified"))
143 (unless image (error "No image specified"))
144 (let ((image-directory))
145 (cond
146 ;; Try relative setting.
147 ((let (library-name d1ei d2ei)
148 ;; First, find library in the load-path.
149 (setq library-name (locate-library library))
150 (if (not library-name)
151 (error "Cannot find library %s in load-path" library))
152 ;; And then set image-directory relative to that.
153 (setq
154 ;; Go down 2 levels.
155 d2ei (expand-file-name
156 (concat (file-name-directory library-name) "../../etc/images"))
157 ;; Go down 1 level.
158 d1ei (expand-file-name
159 (concat (file-name-directory library-name) "../etc/images")))
160 (setq image-directory
161 ;; Set it to nil if image is not found.
162 (cond ((file-exists-p (expand-file-name image d2ei)) d2ei)
163 ((file-exists-p (expand-file-name image d1ei)) d1ei)))))
164 ;; Check for images in image-load-path or load-path.
165 ((let ((img image)
166 (dir (or
167 ;; Images in image-load-path.
168 (mh-image-search-load-path image)
169 ;; Images in load-path.
170 (locate-library image)))
171 parent)
172 ;; Since the image might be in a nested directory (for
173 ;; example, mail/attach.pbm), adjust `image-directory'
174 ;; accordingly.
175 (and dir
176 (setq dir (file-name-directory dir))
177 (progn
178 (while (setq parent (file-name-directory img))
179 (setq img (directory-file-name parent)
180 dir (expand-file-name "../" dir)))
181 (setq image-directory dir)))))
182 (t
183 (error "Could not find image %s for library %s" image library)))
184
185 ;; Return augmented `image-load-path' or `load-path'.
186 (cond ((and path (symbolp path))
187 (nconc (list image-directory)
188 (delete image-directory
189 (if (boundp path)
190 (copy-sequence (symbol-value path))
191 nil))))
192 (t
193 (nconc (list image-directory)
194 (delete image-directory (copy-sequence load-path)))))))
195
118(mh-defun-compat mh-image-search-load-path 196(mh-defun-compat mh-image-search-load-path
119 image-search-load-path (file &optional path) 197 image-search-load-path (file &optional path)
120 "Emacs 21 and XEmacs don't have `image-search-load-path'. 198 "Emacs 21 and XEmacs don't have `image-search-load-path'.
diff --git a/lisp/mh-e/mh-e.el b/lisp/mh-e/mh-e.el
index fa4df0873b1..64b625f3ab6 100644
--- a/lisp/mh-e/mh-e.el
+++ b/lisp/mh-e/mh-e.el
@@ -6,7 +6,7 @@
6 6
7;; Author: Bill Wohler <wohler@newt.com> 7;; Author: Bill Wohler <wohler@newt.com>
8;; Maintainer: Bill Wohler <wohler@newt.com> 8;; Maintainer: Bill Wohler <wohler@newt.com>
9;; Version: 7.92+cvs 9;; Version: 7.93+cvs
10;; Keywords: mail 10;; Keywords: mail
11 11
12;; This file is part of GNU Emacs. 12;; This file is part of GNU Emacs.
@@ -116,7 +116,7 @@
116;; Try to keep variables local to a single file. Provide accessors if 116;; Try to keep variables local to a single file. Provide accessors if
117;; variables are shared. Use this section as a last resort. 117;; variables are shared. Use this section as a last resort.
118 118
119(defconst mh-version "7.92+cvs" "Version number of MH-E.") 119(defconst mh-version "7.93+cvs" "Version number of MH-E.")
120 120
121;; Variants 121;; Variants
122 122
diff --git a/lisp/mh-e/mh-folder.el b/lisp/mh-e/mh-folder.el
index dcf88670f90..f8e37a93cf8 100644
--- a/lisp/mh-e/mh-folder.el
+++ b/lisp/mh-e/mh-folder.el
@@ -591,8 +591,7 @@ perform the operation on all messages in that region.
591\\{mh-folder-mode-map}" 591\\{mh-folder-mode-map}"
592 (mh-do-in-gnu-emacs 592 (mh-do-in-gnu-emacs
593 (unless mh-folder-buttons-init-flag 593 (unless mh-folder-buttons-init-flag
594 (let ((load-path (mh-image-load-path-for-library 594 (let ((load-path (mh-image-load-path-for-library "mh-e" "mh-logo.xpm"))
595 "mh-e" "mh-logo.xpm" 'load-path))
596 (image-load-path (mh-image-load-path-for-library 595 (image-load-path (mh-image-load-path-for-library
597 "mh-e" "mh-logo.xpm" 'image-load-path))) 596 "mh-e" "mh-logo.xpm" 'image-load-path)))
598 (mh-tool-bar-folder-buttons-init) 597 (mh-tool-bar-folder-buttons-init)
diff --git a/lisp/mh-e/mh-letter.el b/lisp/mh-e/mh-letter.el
index 11aef2b51df..9d28ee4ec95 100644
--- a/lisp/mh-e/mh-letter.el
+++ b/lisp/mh-e/mh-letter.el
@@ -313,8 +313,7 @@ order).
313 (make-local-variable 'mh-sent-from-msg) 313 (make-local-variable 'mh-sent-from-msg)
314 (mh-do-in-gnu-emacs 314 (mh-do-in-gnu-emacs
315 (unless mh-letter-buttons-init-flag 315 (unless mh-letter-buttons-init-flag
316 (let ((load-path (mh-image-load-path-for-library 316 (let ((load-path (mh-image-load-path-for-library "mh-e" "mh-logo.xpm"))
317 "mh-e" "mh-logo.xpm" 'load-path))
318 (image-load-path (mh-image-load-path-for-library 317 (image-load-path (mh-image-load-path-for-library
319 "mh-e" "mh-logo.xpm" 'image-load-path))) 318 "mh-e" "mh-logo.xpm" 'image-load-path)))
320 (mh-tool-bar-letter-buttons-init) 319 (mh-tool-bar-letter-buttons-init)
diff --git a/lisp/mh-e/mh-search.el b/lisp/mh-e/mh-search.el
index 9980b6a9b68..17b63c91000 100644
--- a/lisp/mh-e/mh-search.el
+++ b/lisp/mh-e/mh-search.el
@@ -1907,22 +1907,24 @@ copied from. The function updates the hash tables
1907 1907
1908This function should only be called in the appropriate index 1908This function should only be called in the appropriate index
1909folder buffer." 1909folder buffer."
1910 (cond ((and origin-map (gethash checksum mh-index-checksum-origin-map)) 1910 (cond ((gethash checksum mh-index-checksum-origin-map)
1911 (let* ((intermediate (gethash msg origin-map)) 1911 (when origin-map
1912 (ofolder (car intermediate)) 1912 (let* ((intermediate (gethash msg origin-map))
1913 (omsg (cdr intermediate))) 1913 (ofolder (car intermediate))
1914 ;; This is most probably a duplicate. So eliminate it. 1914 (omsg (cdr intermediate)))
1915 (call-process "rm" nil nil nil 1915 ;; This is most probably a duplicate. So eliminate it.
1916 (format "%s%s/%s" mh-user-path 1916 (call-process "rm" nil nil nil
1917 (substring mh-current-folder 1) msg)) 1917 (format "%s%s/%s" mh-user-path
1918 (when (gethash ofolder mh-index-data) 1918 (substring mh-current-folder 1) msg))
1919 (remhash omsg (gethash ofolder mh-index-data))))) 1919 (when (gethash ofolder mh-index-data)
1920 (remhash omsg (gethash ofolder mh-index-data))))))
1920 (t 1921 (t
1921 (setf (gethash msg mh-index-msg-checksum-map) checksum) 1922 (setf (gethash msg mh-index-msg-checksum-map) checksum)
1922 (when origin-map 1923 (when (and origin-map (gethash msg origin-map))
1923 (setf (gethash checksum mh-index-checksum-origin-map) 1924 (setf (gethash checksum mh-index-checksum-origin-map)
1924 (gethash msg origin-map)))))) 1925 (gethash msg origin-map))))))
1925 1926
1927
1926(provide 'mh-search) 1928(provide 'mh-search)
1927 1929
1928;; Local Variables: 1930;; Local Variables:
diff --git a/lisp/mh-e/mh-utils.el b/lisp/mh-e/mh-utils.el
index b23a8f3f613..c45c214e9f0 100644
--- a/lisp/mh-e/mh-utils.el
+++ b/lisp/mh-e/mh-utils.el
@@ -82,81 +82,6 @@ used in lieu of `search' in the CL package."
82 (delete-region (point) (progn (forward-line lines) (point)))) 82 (delete-region (point) (progn (forward-line lines) (point))))
83 83
84;;;###mh-autoload 84;;;###mh-autoload
85(defun mh-image-load-path-for-library (library image &optional path)
86 "Return a suitable search path for images of LIBRARY.
87
88Images for LIBRARY are searched for in \"../../etc/images\" and
89\"../etc/images\" relative to the files in \"lisp/LIBRARY\", in
90`image-load-path', or in `load-path'.
91
92This function returns value of `load-path' augmented with the
93path to IMAGE. If PATH is given, it is used instead of
94`load-path'.
95
96Here is an example that uses a common idiom to provide
97compatibility with versions of Emacs that lack the variable
98`image-load-path':
99
100 (let ((load-path
101 (image-load-path-for-library \"mh-e\" \"mh-logo.xpm\" 'load-path))
102 (image-load-path
103 (image-load-path-for-library \"mh-e\" \"mh-logo.xpm\" 'image-load-path)))
104 (mh-tool-bar-folder-buttons-init))"
105 (unless library (error "No library specified"))
106 (unless image (error "No image specified"))
107 (let ((image-directory))
108 (cond
109 ;; Try relative setting.
110 ((let (library-name d1ei d2ei)
111 ;; First, find library in the load-path.
112 (setq library-name (locate-library library))
113 (if (not library-name)
114 (error "Cannot find library %s in load-path" library))
115 ;; And then set image-directory relative to that.
116 (setq
117 ;; Go down 2 levels.
118 d2ei (expand-file-name
119 (concat (file-name-directory library-name) "../../etc/images"))
120 ;; Go down 1 level.
121 d1ei (expand-file-name
122 (concat (file-name-directory library-name) "../etc/images")))
123 (setq image-directory
124 ;; Set it to nil if image is not found.
125 (cond ((file-exists-p (expand-file-name image d2ei)) d2ei)
126 ((file-exists-p (expand-file-name image d1ei)) d1ei)))))
127 ;; Check for images in image-load-path or load-path.
128 ((let ((img image)
129 (dir (or
130 ;; Images in image-load-path.
131 (mh-image-search-load-path image)
132 ;; Images in load-path.
133 (locate-library image)))
134 parent)
135 ;; Since the image might be in a nested directory (for
136 ;; example, mail/attach.pbm), adjust `image-directory'
137 ;; accordingly.
138 (and dir
139 (setq dir (file-name-directory dir))
140 (progn
141 (while (setq parent (file-name-directory img))
142 (setq img (directory-file-name parent)
143 dir (expand-file-name "../" dir)))
144 (setq image-directory dir)))))
145 (t
146 (error "Could not find image %s for library %s" image library)))
147
148 ;; Return augmented `image-load-path' or `load-path'.
149 (cond ((and path (symbolp path))
150 (nconc (list image-directory)
151 (delete image-directory
152 (if (boundp path)
153 (copy-sequence (symbol-value path))
154 nil))))
155 (t
156 (nconc (list image-directory)
157 (delete image-directory (copy-sequence load-path)))))))
158
159;;;###mh-autoload
160(defun mh-make-local-vars (&rest pairs) 85(defun mh-make-local-vars (&rest pairs)
161 "Initialize local variables according to the variable-value PAIRS." 86 "Initialize local variables according to the variable-value PAIRS."
162 (while pairs 87 (while pairs
@@ -206,8 +131,7 @@ Ignores case when searching for OLD."
206(defun mh-logo-display () 131(defun mh-logo-display ()
207 "Modify mode line to display MH-E logo." 132 "Modify mode line to display MH-E logo."
208 (mh-do-in-gnu-emacs 133 (mh-do-in-gnu-emacs
209 (let ((load-path (mh-image-load-path-for-library 134 (let ((load-path (mh-image-load-path-for-library "mh-e" "mh-logo.xpm"))
210 "mh-e" "mh-logo.xpm" 'load-path))
211 (image-load-path (mh-image-load-path-for-library 135 (image-load-path (mh-image-load-path-for-library
212 "mh-e" "mh-logo.xpm" 'image-load-path))) 136 "mh-e" "mh-logo.xpm" 'image-load-path)))
213 (add-text-properties 137 (add-text-properties
@@ -490,7 +414,8 @@ names and the function is called when OUTPUT is available."
490 do (progn (setf (cdr x) t) (return))))))) 414 do (progn (setf (cdr x) t) (return)))))))
491 415
492(defun mh-normalize-folder-name (folder &optional empty-string-okay 416(defun mh-normalize-folder-name (folder &optional empty-string-okay
493 dont-remove-trailing-slash) 417 dont-remove-trailing-slash
418 return-nil-if-folder-empty)
494 "Normalizes FOLDER name. 419 "Normalizes FOLDER name.
495 420
496Makes sure that two '/' characters never occur next to each 421Makes sure that two '/' characters never occur next to each
@@ -503,8 +428,19 @@ empty string then nothing is added.
503 428
504If optional argument DONT-REMOVE-TRAILING-SLASH is non-nil then a 429If optional argument DONT-REMOVE-TRAILING-SLASH is non-nil then a
505trailing '/' if present is retained (if present), otherwise it is 430trailing '/' if present is retained (if present), otherwise it is
506removed." 431removed.
507 (when (stringp folder) 432
433If optional argument RETURN-NIL-IF-FOLDER-EMPTY is non-nil, then
434return nil if FOLDER is \"\" or \"+\". This is useful when
435normalizing the folder for the \"folders\" command which displays
436the directories in / if passed \"+\". This is usually not
437desired. If this argument is non-nil, then EMPTY-STRING-OKAY has
438no effect."
439 (cond
440 ((if (and (or (equal folder "+") (equal folder ""))
441 return-nil-if-folder-empty)
442 (setq folder nil)))
443 ((stringp folder)
508 ;; Replace two or more consecutive '/' characters with a single '/' 444 ;; Replace two or more consecutive '/' characters with a single '/'
509 (while (string-match "//" folder) 445 (while (string-match "//" folder)
510 (setq folder (replace-match "/" nil t folder))) 446 (setq folder (replace-match "/" nil t folder)))
@@ -517,10 +453,11 @@ removed."
517 (stringp mh-current-folder-name)) 453 (stringp mh-current-folder-name))
518 (setq folder (format "%s/%s/" mh-current-folder-name 454 (setq folder (format "%s/%s/" mh-current-folder-name
519 (substring folder 1)))) 455 (substring folder 1))))
520 ;; XXX: Purge empty strings from the list that split-string returns. In 456 ;; XXX: Purge empty strings from the list that split-string
521 ;; XEmacs, (split-string "+foo/" "/") returns ("+foo" "") while in GNU 457 ;; returns. In XEmacs, (split-string "+foo/" "/") returns
522 ;; Emacs it returns ("+foo"). In the code it is assumed that the 458 ;; ("+foo" "") while in GNU Emacs it returns ("+foo"). In the
523 ;; components list has no empty strings. 459 ;; code it is assumed that the components list has no empty
460 ;; strings.
524 (let ((components (delete "" (split-string folder "/"))) 461 (let ((components (delete "" (split-string folder "/")))
525 (result ())) 462 (result ()))
526 ;; Remove .. and . from the pathname. 463 ;; Remove .. and . from the pathname.
@@ -540,8 +477,10 @@ removed."
540 (when leading-slash-present 477 (when leading-slash-present
541 (setq folder (concat "/" folder))))) 478 (setq folder (concat "/" folder)))))
542 (cond ((and empty-string-okay (equal folder ""))) 479 (cond ((and empty-string-okay (equal folder "")))
543 ((equal folder "") (setq folder "+")) 480 ((equal folder "")
544 ((not (equal (aref folder 0) ?+)) (setq folder (concat "+" folder))))) 481 (setq folder "+"))
482 ((not (equal (aref folder 0) ?+))
483 (setq folder (concat "+" folder))))))
545 folder) 484 folder)
546 485
547(defmacro mh-children-p (folder) 486(defmacro mh-children-p (folder)
@@ -571,23 +510,25 @@ Respects the value of `mh-recursive-folders-flag'. If this flag
571is nil, and the sub-folders have not been explicitly viewed, then 510is nil, and the sub-folders have not been explicitly viewed, then
572they will not be returned." 511they will not be returned."
573 (let ((folder-list)) 512 (let ((folder-list))
574 ;; Normalize folder. Strip leading +. Add trailing slash (done in 513 ;; Normalize folder. Strip leading + and trailing slash(es). If no
575 ;; two steps to avoid infinite loops when replacing "/*$" with "/" 514 ;; folder is specified, ensure it is nil to avoid adding the
576 ;; in XEmacs). If no folder is specified, ensure it is nil to 515 ;; folder to the folder-list and adding a slash to it.
577 ;; ensure we get the top-level folders; otherwise mh-sub-folders
578 ;; returns all the files in / if given an empty string or +.
579 (when folder 516 (when folder
580 (setq folder (mh-replace-regexp-in-string "^\+" "" folder)) 517 (setq folder (mh-replace-regexp-in-string "^\+" "" folder))
581 (setq folder (mh-replace-regexp-in-string "/+$" "" folder))) 518 (setq folder (mh-replace-regexp-in-string "/+$" "" folder))
519 (if (equal folder "")
520 (setq folder nil)))
582 ;; Add provided folder to list, unless all folders are asked for. 521 ;; Add provided folder to list, unless all folders are asked for.
522 ;; Then append slash to separate sub-folders.
583 (unless (null folder) 523 (unless (null folder)
584 (setq folder-list (list folder))) 524 (setq folder-list (list folder))
525 (setq folder (concat folder "/")))
585 (loop for f in (mh-sub-folders folder) do 526 (loop for f in (mh-sub-folders folder) do
586 (setq folder-list 527 (setq folder-list
587 (append folder-list 528 (append folder-list
588 (if (mh-children-p f) 529 (if (mh-children-p f)
589 (mh-folder-list (concat folder "/" (car f))) 530 (mh-folder-list (concat folder (car f)))
590 (list (concat folder "/" (car f))))))) 531 (list (concat folder (car f)))))))
591 folder-list)) 532 folder-list))
592 533
593;;;###mh-autoload 534;;;###mh-autoload
@@ -599,7 +540,7 @@ results of the actual folders call.
599If optional argument ADD-TRAILING-SLASH-FLAG is non-nil then a 540If optional argument ADD-TRAILING-SLASH-FLAG is non-nil then a
600slash is added to each of the sub-folder names that may have 541slash is added to each of the sub-folder names that may have
601nested folders within them." 542nested folders within them."
602 (let* ((folder (mh-normalize-folder-name folder)) 543 (let* ((folder (mh-normalize-folder-name folder nil nil t))
603 (match (gethash folder mh-sub-folders-cache 'no-result)) 544 (match (gethash folder mh-sub-folders-cache 'no-result))
604 (sub-folders (cond ((eq match 'no-result) 545 (sub-folders (cond ((eq match 'no-result)
605 (setf (gethash folder mh-sub-folders-cache) 546 (setf (gethash folder mh-sub-folders-cache)
diff --git a/lisp/outline.el b/lisp/outline.el
index fdbad00ada3..92542bae7e3 100644
--- a/lisp/outline.el
+++ b/lisp/outline.el
@@ -46,7 +46,7 @@
46 :group 'editing) 46 :group 'editing)
47 47
48(defcustom outline-regexp "[*\^L]+" 48(defcustom outline-regexp "[*\^L]+"
49 "*Regular expression to match the beginning of a heading. 49 "Regular expression to match the beginning of a heading.
50Any line whose beginning matches this regexp is considered to start a heading. 50Any line whose beginning matches this regexp is considered to start a heading.
51Note that Outline mode only checks this regexp at the start of a line, 51Note that Outline mode only checks this regexp at the start of a line,
52so the regexp need not (and usually does not) start with `^'. 52so the regexp need not (and usually does not) start with `^'.
@@ -56,7 +56,7 @@ in the file it applies to. See also `outline-heading-end-regexp'."
56 :group 'outlines) 56 :group 'outlines)
57 57
58(defcustom outline-heading-end-regexp "\n" 58(defcustom outline-heading-end-regexp "\n"
59 "*Regular expression to match the end of a heading line. 59 "Regular expression to match the end of a heading line.
60You can assume that point is at the beginning of a heading when this 60You can assume that point is at the beginning of a heading when this
61regexp is searched for. The heading ends at the end of the match. 61regexp is searched for. The heading ends at the end of the match.
62The recommended way to set this is with a `Local Variables:' list 62The recommended way to set this is with a `Local Variables:' list
@@ -828,7 +828,13 @@ Show the heading too, if it is currently invisible."
828 828
829(defun hide-sublevels (levels) 829(defun hide-sublevels (levels)
830 "Hide everything but the top LEVELS levels of headers, in whole buffer." 830 "Hide everything but the top LEVELS levels of headers, in whole buffer."
831 (interactive "p") 831 (interactive (list
832 (cond
833 (current-prefix-arg (prefix-numeric-value current-prefix-arg))
834 ((save-excursion (beginning-of-line)
835 (looking-at outline-regexp))
836 (funcall outline-level))
837 (t 1))))
832 (if (< levels 1) 838 (if (< levels 1)
833 (error "Must keep at least one level of headers")) 839 (error "Must keep at least one level of headers"))
834 (let (outline-view-change-hook) 840 (let (outline-view-change-hook)
diff --git a/lisp/progmodes/gdb-ui.el b/lisp/progmodes/gdb-ui.el
index cbff1835ca6..4340892a9cc 100644
--- a/lisp/progmodes/gdb-ui.el
+++ b/lisp/progmodes/gdb-ui.el
@@ -796,7 +796,12 @@ type=\"\\(.*?\\)\"")
796 (concat "server interpreter mi \"-var-assign " 796 (concat "server interpreter mi \"-var-assign "
797 varnum " " value "\"\n") 797 varnum " " value "\"\n")
798 (concat "-var-assign " varnum " " value "\n")) 798 (concat "-var-assign " varnum " " value "\n"))
799 'ignore)))) 799 `(lambda () (gdb-edit-value-handler ,value))))))
800
801(defun gdb-edit-value-handler (value)
802 (goto-char (point-min))
803 (if (re-search-forward gdb-error-regexp nil t)
804 (message-box "Invalid number or expression (%s)" value)))
800 805
801(defcustom gdb-show-changed-values t 806(defcustom gdb-show-changed-values t
802 "If non-nil change the face of out of scope variables and changed values. 807 "If non-nil change the face of out of scope variables and changed values.
diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el
index 31c8fe0e8a2..41bb24f9e61 100644
--- a/lisp/progmodes/gud.el
+++ b/lisp/progmodes/gud.el
@@ -399,7 +399,7 @@ t means that there is no stack, and we are in display-file mode.")
399 gud-speedbar-key-map 399 gud-speedbar-key-map
400 gud-expansion-speedbar-buttons)) 400 gud-expansion-speedbar-buttons))
401 401
402 (add-to-list 402 (add-to-list
403 'speedbar-mode-functions-list 403 'speedbar-mode-functions-list
404 '("GUD" (speedbar-item-info . gud-speedbar-item-info) 404 '("GUD" (speedbar-item-info . gud-speedbar-item-info)
405 (speedbar-line-directory . ignore)))) 405 (speedbar-line-directory . ignore))))
@@ -493,11 +493,15 @@ required by the caller."
493 'bracket char 493 'bracket char
494 'gdb-speedbar-expand-node varnum 494 'gdb-speedbar-expand-node varnum
495 (concat expr "\t" type "\t" value) 495 (concat expr "\t" type "\t" value)
496 (if (or parent status) 496 (if (or parent (eq status 'out-of-scope))
497 nil 'gdb-edit-value) 497 nil 'gdb-edit-value)
498 nil 498 nil
499 (if (and (or parent (eq status 'out-of-scope)) 499 (if gdb-show-changed-values
500 gdb-show-changed-values) 'shadow t) 500 (or parent (case status
501 (changed 'font-lock-warning-face)
502 (out-of-scope 'shadow)
503 (t t)))
504 t)
501 depth) 505 depth)
502 (speedbar-make-tag-line 506 (speedbar-make-tag-line
503 'bracket char 507 'bracket char
@@ -684,7 +688,7 @@ To run GDB in text command mode, set `gud-gdb-command-name' to
684 (buffer-name gud-comint-buffer) 688 (buffer-name gud-comint-buffer)
685 (with-current-buffer gud-comint-buffer (eq gud-minor-mode 'gdba))) 689 (with-current-buffer gud-comint-buffer (eq gud-minor-mode 'gdba)))
686 (error "Multiple debugging is only supported with \"gdb --fullname\"")) 690 (error "Multiple debugging is only supported with \"gdb --fullname\""))
687 691
688 (gud-common-init command-line nil 'gud-gdb-marker-filter) 692 (gud-common-init command-line nil 'gud-gdb-marker-filter)
689 (set (make-local-variable 'gud-minor-mode) 'gdb) 693 (set (make-local-variable 'gud-minor-mode) 'gdb)
690 694
@@ -2152,7 +2156,7 @@ nil)
2152 ;; print line numbers using LOCALE, inserting a comma or a 2156 ;; print line numbers using LOCALE, inserting a comma or a
2153 ;; period at the thousands positions (how ingenious!). 2157 ;; period at the thousands positions (how ingenious!).
2154 2158
2155 "\\(\[[0-9]+\] \\)*\\([a-zA-Z0-9.$_]+\\)\\.[a-zA-Z0-9$_<>(),]+ \ 2159 "\\(\\[[0-9]+] \\)*\\([a-zA-Z0-9.$_]+\\)\\.[a-zA-Z0-9$_<>(),]+ \
2156\\(([a-zA-Z0-9.$_]+:\\|line=\\)\\([0-9.,]+\\)" 2160\\(([a-zA-Z0-9.$_]+:\\|line=\\)\\([0-9.,]+\\)"
2157 gud-marker-acc) 2161 gud-marker-acc)
2158 2162
@@ -3372,7 +3376,7 @@ For C this would dereference a pointer expression.")
3372 "The mouse movement event that led to a tooltip display. 3376 "The mouse movement event that led to a tooltip display.
3373This event can be examined by forms in GUD-TOOLTIP-DISPLAY.") 3377This event can be examined by forms in GUD-TOOLTIP-DISPLAY.")
3374 3378
3375(defun gud-tooltip-dereference () 3379(defun gud-tooltip-dereference (&optional arg)
3376 "Toggle whether tooltips should show `* expr' or `expr'. 3380 "Toggle whether tooltips should show `* expr' or `expr'.
3377With arg, dereference expr iff arg is positive." 3381With arg, dereference expr iff arg is positive."
3378 (interactive "P") 3382 (interactive "P")
diff --git a/lisp/t-mouse.el b/lisp/t-mouse.el
index 2dae9d1f977..17d486749b3 100644
--- a/lisp/t-mouse.el
+++ b/lisp/t-mouse.el
@@ -6,7 +6,7 @@
6 6
7;; Copyright (C) 1994,1995 Alessandro Rubini <rubini@linux.it> 7;; Copyright (C) 1994,1995 Alessandro Rubini <rubini@linux.it>
8;; parts are by Ian T Zimmermann <itz@rahul.net>, 1995,1998 8;; parts are by Ian T Zimmermann <itz@rahul.net>, 1995,1998
9;; Copyright (C) 2006 9;; Copyright (C) 2006
10;; Free Software Foundation, Inc. 10;; Free Software Foundation, Inc.
11 11
12;; This file is part of GNU Emacs. 12;; This file is part of GNU Emacs.
@@ -29,15 +29,15 @@
29;;; Commentary: 29;;; Commentary:
30 30
31;; This package provides access to mouse event as reported by the 31;; This package provides access to mouse event as reported by the
32;; gpm-Linux package. It uses the program "mev" to get mouse events. 32;; gpm-Linux package. It uses the program "mev" to get mouse events.
33;; It tries to reproduce the functionality offered by emacs under X. 33;; It tries to reproduce the functionality offered by Emacs under X.
34;; The "gpm" server runs under Linux, so this package is rather 34;; The "gpm" server runs under Linux, so this package is rather
35;; Linux-dependent. 35;; Linux-dependent.
36 36
37;; Modified by Nick Roberts for Emacs 22. In particular, the mode-line is 37;; Modified by Nick Roberts for Emacs 22. In particular, the mode-line is
38;; now position sensitive. 38;; now position sensitive.
39 39
40(defvar t-mouse-process nil 40(defvar t-mouse-process nil
41 "Embeds the process which passes mouse events to emacs. 41 "Embeds the process which passes mouse events to emacs.
42It is used by the program t-mouse.") 42It is used by the program t-mouse.")
43 43
@@ -53,7 +53,7 @@ See `t-mouse-start-debug'.")
53 53
54(defvar t-mouse-drag-start nil 54(defvar t-mouse-drag-start nil
55 "Whenever a drag starts in a special part of a window 55 "Whenever a drag starts in a special part of a window
56(not the text), the `translated' starting coordinates including the 56\(not the text), the `translated' starting coordinates including the
57window and part involved are saved here. This is necessary lest they 57window and part involved are saved here. This is necessary lest they
58get re-translated when the button goes up, at which time window 58get re-translated when the button goes up, at which time window
59configuration may have changed.") 59configuration may have changed.")
@@ -63,10 +63,10 @@ configuration may have changed.")
63 63
64(defvar t-mouse-swap-alt-keys nil 64(defvar t-mouse-swap-alt-keys nil
65 "When set, Emacs will handle mouse events with the right Alt 65 "When set, Emacs will handle mouse events with the right Alt
66(a.k.a. Alt-Ger) modifier, not with the regular left Alt modifier. 66\(a.k.a. Alt-Ger) modifier, not with the regular left Alt modifier.
67Useful for people who play strange games with their keyboard tables.") 67Useful for people who play strange games with their keyboard tables.")
68 68
69(defvar t-mouse-fix-21 nil 69(defvar t-mouse-fix-21 nil
70 "Enable brain-dead chords for 2 button mice.") 70 "Enable brain-dead chords for 2 button mice.")
71 71
72 72
@@ -75,7 +75,7 @@ Useful for people who play strange games with their keyboard tables.")
75;; get the number of the current virtual console 75;; get the number of the current virtual console
76 76
77(defun t-mouse-tty () 77(defun t-mouse-tty ()
78 "Returns number of virtual terminal Emacs is running on, as a string. 78 "Return number of virtual terminal Emacs is running on, as a string.
79For example, \"2\" for /dev/tty2." 79For example, \"2\" for /dev/tty2."
80 (with-temp-buffer 80 (with-temp-buffer
81 (call-process "ps" nil t nil "h" (format "%s" (emacs-pid))) 81 (call-process "ps" nil t nil "h" (format "%s" (emacs-pid)))
@@ -148,8 +148,8 @@ For example, \"2\" for /dev/tty2."
148 148
149;;; This fun is partly Copyright (C) 1994 Per Abrahamsen <abraham@iesd.auc.dk> 149;;; This fun is partly Copyright (C) 1994 Per Abrahamsen <abraham@iesd.auc.dk>
150(defun t-mouse-make-event () 150(defun t-mouse-make-event ()
151 "Makes a Lisp style event from the contents of mouse input accumulator. 151 "Make a Lisp style event from the contents of mouse input accumulator.
152Also trims the accumulator by all the data used to build the event." 152Also trim the accumulator by all the data used to build the event."
153 (let (ob (ob-pos (condition-case nil 153 (let (ob (ob-pos (condition-case nil
154 (progn 154 (progn
155 ;; this test is just needed for Fedora Core 3 155 ;; this test is just needed for Fedora Core 3
@@ -185,13 +185,13 @@ Also trims the accumulator by all the data used to build the event."
185 (progn 185 (progn
186 (setq end-of-root-event-name (match-beginning 0)) 186 (setq end-of-root-event-name (match-beginning 0))
187 (setq new-event-name-string 187 (setq new-event-name-string
188 (concat (substring 188 (concat (substring
189 event-name-string 0 189 event-name-string 0
190 end-of-root-event-name) "-3")) 190 end-of-root-event-name) "-3"))
191 191
192 ;;Change the event to the symbol that corresponds to the 192 ;;Change the event to the symbol that corresponds to the
193 ;;name we made. The proper symbol already exists. 193 ;;name we made. The proper symbol already exists.
194 (setq event-type 194 (setq event-type
195 (intern new-event-name-string)))))) 195 (intern new-event-name-string))))))
196 196
197 ;;store current position for mouse-position 197 ;;store current position for mouse-position
@@ -231,7 +231,7 @@ Also trims the accumulator by all the data used to build the event."
231 (concat t-mouse-filter-accumulator string)) 231 (concat t-mouse-filter-accumulator string))
232 (let ((event (t-mouse-make-event))) 232 (let ((event (t-mouse-make-event)))
233 (while event 233 (while event
234 (if (or track-mouse 234 (if (or track-mouse
235 (not (eq 'mouse-movement (event-basic-type event)))) 235 (not (eq 'mouse-movement (event-basic-type event))))
236 (setq unread-command-events 236 (setq unread-command-events
237 (nconc unread-command-events (list event)))) 237 (nconc unread-command-events (list event))))
@@ -249,7 +249,7 @@ The (secret) scrollbar interface is not implemented yet."
249;; stop-process. That doesn't work; mev receives the signal fine but 249;; stop-process. That doesn't work; mev receives the signal fine but
250;; is not really stopped: instead it returns from 250;; is not really stopped: instead it returns from
251;; kill(getpid(), SIGTSTP) immediately. I don't understand what's up 251;; kill(getpid(), SIGTSTP) immediately. I don't understand what's up
252;; itz Tue Mar 24 14:27:38 PST 1998. 252;; itz Tue Mar 24 14:27:38 PST 1998.
253 253
254(add-hook 'suspend-hook 254(add-hook 'suspend-hook
255 (function (lambda () 255 (function (lambda ()
@@ -281,8 +281,8 @@ Turn it on to use emacs mouse commands, and off to use t-mouse commands."
281 (let ((tty (t-mouse-tty)) 281 (let ((tty (t-mouse-tty))
282 (process-connection-type t)) 282 (process-connection-type t))
283 (if (not (stringp tty)) 283 (if (not (stringp tty))
284 (error "Cannot find a virtual terminal.")) 284 (error "Cannot find a virtual terminal"))
285 (setq t-mouse-process 285 (setq t-mouse-process
286 (start-process "t-mouse" nil 286 (start-process "t-mouse" nil
287 "mev" "-i" "-E" "-C" tty 287 "mev" "-i" "-E" "-C" tty
288 (if t-mouse-swap-alt-keys 288 (if t-mouse-swap-alt-keys
diff --git a/lisp/textmodes/org.el b/lisp/textmodes/org.el
index cc822ddb436..717455edc61 100644
--- a/lisp/textmodes/org.el
+++ b/lisp/textmodes/org.el
@@ -5,7 +5,7 @@
5;; Author: Carsten Dominik <dominik at science dot uva dot nl> 5;; Author: Carsten Dominik <dominik at science dot uva dot nl>
6;; Keywords: outlines, hypermedia, calendar, wp 6;; Keywords: outlines, hypermedia, calendar, wp
7;; Homepage: http://www.astro.uva.nl/~dominik/Tools/org/ 7;; Homepage: http://www.astro.uva.nl/~dominik/Tools/org/
8;; Version: 4.07 8;; Version: 4.08
9;; 9;;
10;; This file is part of GNU Emacs. 10;; This file is part of GNU Emacs.
11;; 11;;
@@ -81,6 +81,9 @@
81;; 81;;
82;; Changes since version 4.00: 82;; Changes since version 4.00:
83;; --------------------------- 83;; ---------------------------
84;; Version 4.08
85;;
86;;
84;; Version 4.07 87;; Version 4.07
85;; - Bug fixes. 88;; - Bug fixes.
86;; - Leading stars in headlines can be hidden, so make the outline look 89;; - Leading stars in headlines can be hidden, so make the outline look
@@ -136,7 +139,7 @@
136 139
137;;; Customization variables 140;;; Customization variables
138 141
139(defvar org-version "4.07" 142(defvar org-version "4.08"
140 "The version number of the file org.el.") 143 "The version number of the file org.el.")
141(defun org-version () 144(defun org-version ()
142 (interactive) 145 (interactive)
@@ -796,7 +799,7 @@ as possible."
796(defcustom org-level-color-stars-only nil 799(defcustom org-level-color-stars-only nil
797 "Non-nil means fontify only the stars in each headline. 800 "Non-nil means fontify only the stars in each headline.
798When nil, the entire headline is fontified. 801When nil, the entire headline is fontified.
799Changing it requires restart of Emacs to become effective." 802Changing it requires restart of `font-lock-mode' to become effective."
800 :group 'org-structure 803 :group 'org-structure
801 :type 'boolean) 804 :type 'boolean)
802 805
@@ -806,7 +809,7 @@ This works by using the face `org-hide' for these stars. This
806face is white for a light background, and black for a dark 809face is white for a light background, and black for a dark
807background. You may have to customize the face `org-hide' to 810background. You may have to customize the face `org-hide' to
808make this work. 811make this work.
809Changing the variable requires restart of Emacs to become effective." 812Changing it requires restart of `font-lock-mode' to become effective."
810 :group 'org-structure 813 :group 'org-structure
811 :type 'boolean) 814 :type 'boolean)
812 815
@@ -814,7 +817,9 @@ Changing the variable requires restart of Emacs to become effective."
814 "Non-nil means, skip even levels and only use odd levels for the outline. 817 "Non-nil means, skip even levels and only use odd levels for the outline.
815This has the effect that two stars are being added/taken away in 818This has the effect that two stars are being added/taken away in
816promotion/demotion commands. It also influences how levels are 819promotion/demotion commands. It also influences how levels are
817handled by the exporters." 820handled by the exporters.
821Changing it requires restart of `font-lock-mode' to become effective
822for fontification."
818 :group 'org-structure 823 :group 'org-structure
819 :type 'boolean) 824 :type 'boolean)
820 825
@@ -1157,6 +1162,14 @@ For more examples, see the system specific constants
1157 (string :tag "Command") 1162 (string :tag "Command")
1158 (sexp :tag "Lisp form"))))) 1163 (sexp :tag "Lisp form")))))
1159 1164
1165(defcustom org-mhe-search-all-folders nil
1166 "Non-nil means, that the search for the mh-message will be extended to
1167all folders if the message cannot be found in the folder given in the link.
1168Searching all folders is very effective with one of the search engines
1169supported by MH-E, but will be slow with pick."
1170 :group 'org-link
1171 :type 'boolean)
1172
1160(defgroup org-remember nil 1173(defgroup org-remember nil
1161 "Options concerning interaction with remember.el." 1174 "Options concerning interaction with remember.el."
1162 :tag "Org Remember" 1175 :tag "Org Remember"
@@ -1855,6 +1868,14 @@ When this is non-nil, the headline after the keyword is set to the
1855 "Face for links." 1868 "Face for links."
1856 :group 'org-faces) 1869 :group 'org-faces)
1857 1870
1871(defface org-tag
1872 '((((type tty) (class color)) (:foreground "cyan" :weight bold))
1873 (((class color) (background light)) (:foreground "Purple" :weight bold))
1874 (((class color) (background dark)) (:foreground "Cyan" :weight bold))
1875 (t (:bold t)))
1876 "Face for links."
1877 :group 'org-faces)
1878
1858(defface org-done ;; font-lock-type-face 1879(defface org-done ;; font-lock-type-face
1859 '((((type tty) (class color)) (:foreground "green")) 1880 '((((type tty) (class color)) (:foreground "green"))
1860 (((class color) (background light)) (:foreground "ForestGreen" :bold t)) 1881 (((class color) (background light)) (:foreground "ForestGreen" :bold t))
@@ -1879,25 +1900,10 @@ When this is non-nil, the headline after the keyword is set to the
1879 "Face used for time grids." 1900 "Face used for time grids."
1880 :group 'org-faces) 1901 :group 'org-faces)
1881 1902
1882(defvar org-level-faces nil) 1903(defvar org-level-faces
1883 1904 '(org-level-1 org-level-2 org-level-3 org-level-4
1884(when (not org-level-faces) 1905 org-level-5 org-level-6 org-level-7 org-level-8
1885 (setq org-level-faces 1906 ))
1886 '(
1887 org-level-1
1888 org-level-2
1889 org-level-3
1890 org-level-4
1891 org-level-5
1892 org-level-6
1893 org-level-7
1894 org-level-8
1895 ))
1896 (when org-odd-levels-only
1897 (setq org-level-faces (apply 'append (mapcar (lambda (x) (list x x))
1898 org-level-faces)))
1899 (setq org-level-faces (append (cdr org-level-faces) (list 'org-level-1)))))
1900
1901(defvar org-n-levels (length org-level-faces)) 1907(defvar org-n-levels (length org-level-faces))
1902 1908
1903(defun org-set-regexps-and-options () 1909(defun org-set-regexps-and-options ()
@@ -1985,48 +1991,48 @@ When this is non-nil, the headline after the keyword is set to the
1985 1991
1986;; Tell the compiler about dynamically scoped variables, 1992;; Tell the compiler about dynamically scoped variables,
1987;; and variables from other packages 1993;; and variables from other packages
1988(eval-when-compile 1994(defvar zmacs-regions)
1989 (defvar zmacs-regions) 1995(defvar original-date)
1990 (defvar original-date) 1996(defvar org-transient-mark-mode)
1991 (defvar org-transient-mark-mode) 1997(defvar org-old-auto-fill-inhibit-regexp)
1992 (defvar org-old-auto-fill-inhibit-regexp) 1998(defvar orgtbl-mode-menu)
1993 (defvar orgtbl-mode-menu) 1999(defvar org-html-entities)
1994 (defvar org-html-entities) 2000(defvar org-goto-start-pos)
1995 (defvar org-goto-start-pos) 2001(defvar org-cursor-color)
1996 (defvar org-cursor-color) 2002(defvar org-time-was-given)
1997 (defvar org-time-was-given) 2003(defvar org-ts-what)
1998 (defvar org-ts-what) 2004(defvar mark-active)
1999 (defvar mark-active) 2005(defvar timecnt)
2000 (defvar timecnt) 2006(defvar levels-open)
2001 (defvar levels-open) 2007(defvar title)
2002 (defvar title) 2008(defvar author)
2003 (defvar author) 2009(defvar email)
2004 (defvar email) 2010(defvar text)
2005 (defvar text) 2011(defvar entry)
2006 (defvar entry) 2012(defvar date)
2007 (defvar date) 2013(defvar language)
2008 (defvar language) 2014(defvar options)
2009 (defvar options) 2015(defvar ans1)
2010 (defvar ans1) 2016(defvar ans2)
2011 (defvar ans2) 2017(defvar starting-day)
2012 (defvar starting-day) 2018(defvar include-all-loc)
2013 (defvar include-all-loc) 2019(defvar vm-message-pointer)
2014 (defvar vm-message-pointer) 2020(defvar vm-folder-directory)
2015 (defvar vm-folder-directory) 2021(defvar wl-summary-buffer-elmo-folder)
2016 (defvar wl-summary-buffer-elmo-folder) 2022(defvar wl-summary-buffer-folder-name)
2017 (defvar wl-summary-buffer-folder-name) 2023(defvar gnus-group-name)
2018 (defvar gnus-group-name) 2024(defvar gnus-article-current)
2019 (defvar gnus-article-current) 2025(defvar w3m-current-url)
2020 (defvar w3m-current-url) 2026(defvar mh-progs)
2021 (defvar mh-progs) 2027(defvar mh-current-folder)
2022 (defvar mh-current-folder) 2028(defvar mh-show-folder-buffer)
2023 (defvar mh-show-folder-buffer) 2029(defvar mh-index-folder)
2024 (defvar mh-index-folder) 2030(defvar mh-searcher)
2025 (defvar org-selected-point) 2031(defvar org-selected-point)
2026 (defvar calendar-mode-map) 2032(defvar calendar-mode-map)
2027 (defvar remember-save-after-remembering) 2033(defvar remember-save-after-remembering)
2028 (defvar remember-data-file) 2034(defvar remember-data-file)
2029 (defvar last-arg)) 2035(defvar last-arg)
2030 2036
2031;;; Define the mode 2037;;; Define the mode
2032 2038
@@ -2216,7 +2222,7 @@ The following commands are available:
2216 2222
2217(defun org-activate-target-links (limit) 2223(defun org-activate-target-links (limit)
2218 "Run through the buffer and add overlays to target matches." 2224 "Run through the buffer and add overlays to target matches."
2219 (when org-radio-targets 2225 (when (and org-radio-targets org-target-link-regexp)
2220 (let ((case-fold-search t)) 2226 (let ((case-fold-search t))
2221 (if (re-search-forward org-target-link-regexp limit t) 2227 (if (re-search-forward org-target-link-regexp limit t)
2222 (progn 2228 (progn
@@ -2253,16 +2259,17 @@ With optional argument RADIO, only find radio targets."
2253 "Make regular expression matching all strings in TARGETS. 2259 "Make regular expression matching all strings in TARGETS.
2254The regular expression finds the targets also if there is a line break 2260The regular expression finds the targets also if there is a line break
2255between words." 2261between words."
2256 (concat 2262 (and targets
2257 "\\<\\(" 2263 (concat
2258 (mapconcat 2264 "\\<\\("
2259 (lambda (x) 2265 (mapconcat
2260 (while (string-match " +" x) 2266 (lambda (x)
2261 (setq x (replace-match "\\s-+" t t x))) 2267 (while (string-match " +" x)
2262 x) 2268 (setq x (replace-match "\\s-+" t t x)))
2263 targets 2269 x)
2264 "\\|") 2270 targets
2265 "\\)\\>")) 2271 "\\|")
2272 "\\)\\>")))
2266 2273
2267(defvar org-camel-regexp "\\*?\\<[A-Z]+[a-z]+[A-Z][a-zA-Z]*\\>" 2274(defvar org-camel-regexp "\\*?\\<[A-Z]+[a-z]+[A-Z][a-zA-Z]*\\>"
2268 "Matches CamelCase words, possibly with a star before it.") 2275 "Matches CamelCase words, possibly with a star before it.")
@@ -2302,12 +2309,14 @@ between words."
2302(defun org-set-font-lock-defaults () 2309(defun org-set-font-lock-defaults ()
2303 (let ((org-font-lock-extra-keywords 2310 (let ((org-font-lock-extra-keywords
2304 (list 2311 (list
2312 '("^\\(\\**\\)\\(\\*\\)\\(.*\\)" (1 (org-get-level-face 1))
2313 (2 (org-get-level-face 2)) (3 (org-get-level-face 3)))
2305 '(org-activate-links (0 'org-link t)) 2314 '(org-activate-links (0 'org-link t))
2306 '(org-activate-links2 (0 'org-link t)) 2315 '(org-activate-links2 (0 'org-link t))
2307 '(org-activate-target-links (0 'org-link t)) 2316 '(org-activate-target-links (0 'org-link t))
2308 '(org-activate-dates (0 'org-link t)) 2317 '(org-activate-dates (0 'org-link t))
2309 '(org-activate-camels (0 'org-link t)) 2318 '(org-activate-camels (0 'org-link t))
2310 '(org-activate-tags (1 'org-link t)) 2319 '(org-activate-tags (1 'org-tag t))
2311 (list (concat "^\\*+[ \t]*" org-not-done-regexp) 2320 (list (concat "^\\*+[ \t]*" org-not-done-regexp)
2312 '(1 'org-warning t)) 2321 '(1 'org-warning t))
2313 (list (concat "\\[#[A-Z]\\]") '(0 'org-special-keyword t)) 2322 (list (concat "\\[#[A-Z]\\]") '(0 'org-special-keyword t))
@@ -2334,30 +2343,28 @@ between words."
2334 '("^[ \t]*\\(:.*\\)" (1 'org-table t)) 2343 '("^[ \t]*\\(:.*\\)" (1 'org-table t))
2335 '("| *\\(:?=[^|\n]*\\)" (1 'org-formula t)) 2344 '("| *\\(:?=[^|\n]*\\)" (1 'org-formula t))
2336 '("^[ \t]*| *\\([#!$*_^]\\) *|" (1 'org-formula t)) 2345 '("^[ \t]*| *\\([#!$*_^]\\) *|" (1 'org-formula t))
2337 )) 2346 )))
2338 (exp 2347
2339 ;; The font-lock expression for headlines is complicated. It depends
2340 ;; on two user options, and it needs to determine the level in
2341 ;; order to compute the level.
2342 (cond
2343 ((and org-level-color-stars-only (not org-hide-leading-stars))
2344 '("^\\(\\*+\\).*" 1 (nth (% (- (match-end 1) (match-beginning 1) 1) org-n-levels) org-level-faces) nil t))
2345 ((and (not org-level-color-stars-only) org-hide-leading-stars)
2346 '("^\\(\\**\\)\\(\\*.*\\)" (1 'org-hide) (2 (nth (% (- (match-end 1) (match-beginning 1)) org-n-levels) org-level-faces) nil t)))
2347 ((and org-level-color-stars-only org-hide-leading-stars)
2348 '("^\\(\\**\\)\\(\\*\\).*" (1 'org-hide) (2 (nth (% (- (match-end 1) (match-beginning 1)) org-n-levels) org-level-faces) nil t)))
2349 (t
2350 '("^\\(\\*+\\).*" 0 (nth (% (- (match-end 1) (match-beginning 1) 1) org-n-levels) org-level-faces) nil t)))))
2351
2352 ;; Now set the full font-lock-keywords 2348 ;; Now set the full font-lock-keywords
2353 (set (make-local-variable 'org-font-lock-keywords) 2349 (set (make-local-variable 'org-font-lock-keywords)
2354 (append 2350 org-font-lock-extra-keywords)
2355 (if org-xemacs-p (list exp) (list (cons 'eval (list 'quote exp))))
2356 org-font-lock-extra-keywords))
2357 (set (make-local-variable 'font-lock-defaults) 2351 (set (make-local-variable 'font-lock-defaults)
2358 '(org-font-lock-keywords t nil nil backward-paragraph)) 2352 '(org-font-lock-keywords t nil nil backward-paragraph))
2359 (kill-local-variable 'font-lock-keywords) nil)) 2353 (kill-local-variable 'font-lock-keywords) nil))
2360 2354
2355(defvar org-m nil)
2356(defvar org-l nil)
2357(defvar org-f nil)
2358(defun org-get-level-face (n)
2359 "Get the right face for match N in font-lock matching of healdines."
2360 (setq org-l (- (match-end 2) (match-beginning 1)))
2361 (if org-odd-levels-only (setq org-l (1+ (/ org-l 2))))
2362 (setq org-f (nth (1- (% org-l org-n-levels)) org-level-faces))
2363 (cond
2364 ((eq n 1) (if org-hide-leading-stars 'org-hide org-f))
2365 ((eq n 2) org-f)
2366 (t (if org-level-color-stars-only nil org-f))))
2367
2361(defun org-unfontify-region (beg end &optional maybe_loudly) 2368(defun org-unfontify-region (beg end &optional maybe_loudly)
2362 "Remove fontification and activation overlays from links." 2369 "Remove fontification and activation overlays from links."
2363 (font-lock-default-unfontify-region beg end) 2370 (font-lock-default-unfontify-region beg end)
@@ -2463,7 +2470,7 @@ between words."
2463 (save-excursion 2470 (save-excursion
2464 (org-back-to-heading) 2471 (org-back-to-heading)
2465 (outline-up-heading (if (< arg 0) (- arg) 2472 (outline-up-heading (if (< arg 0) (- arg)
2466 (- (outline-level) arg))) 2473 (- (funcall outline-level) arg)))
2467 (org-show-subtree))) 2474 (org-show-subtree)))
2468 2475
2469 ((save-excursion (beginning-of-line 1) (looking-at outline-regexp)) 2476 ((save-excursion (beginning-of-line 1) (looking-at outline-regexp))
@@ -2820,7 +2827,7 @@ in the region."
2820(defun org-map-tree (fun) 2827(defun org-map-tree (fun)
2821 "Call FUN for every heading underneath the current one." 2828 "Call FUN for every heading underneath the current one."
2822 (org-back-to-heading) 2829 (org-back-to-heading)
2823 (let ((level (outline-level))) 2830 (let ((level (funcall outline-level)))
2824 (save-excursion 2831 (save-excursion
2825 (funcall fun) 2832 (funcall fun)
2826 (while (and (progn 2833 (while (and (progn
@@ -3301,7 +3308,7 @@ heading be marked DONE, and the current time will be added."
3301 (if (string-match "\\(.*\\)::\\(.*\\)" org-archive-location) 3308 (if (string-match "\\(.*\\)::\\(.*\\)" org-archive-location)
3302 (progn 3309 (progn
3303 (setq file (format (match-string 1 org-archive-location) 3310 (setq file (format (match-string 1 org-archive-location)
3304 (file-name-nondirectory (buffer-file-name))) 3311 (file-name-nondirectory buffer-file-name))
3305 heading (match-string 2 org-archive-location))) 3312 heading (match-string 2 org-archive-location)))
3306 (error "Invalid `org-archive-location'")) 3313 (error "Invalid `org-archive-location'"))
3307 (if (> (length file) 0) 3314 (if (> (length file) 0)
@@ -3468,7 +3475,10 @@ At all other locations, this simply calls `ispell-complete-word'."
3468 (message "Making completion list...") 3475 (message "Making completion list...")
3469 (let ((list (sort (all-completions pattern table) 'string<))) 3476 (let ((list (sort (all-completions pattern table) 'string<)))
3470 (with-output-to-temp-buffer "*Completions*" 3477 (with-output-to-temp-buffer "*Completions*"
3471 (display-completion-list list))) 3478 (condition-case nil
3479 ;; Protection needed for XEmacs and emacs 21
3480 (display-completion-list list pattern)
3481 (error (display-completion-list list)))))
3472 (message "Making completion list...%s" "done")))))) 3482 (message "Making completion list...%s" "done"))))))
3473 3483
3474;;; Comments, TODO and DEADLINE 3484;;; Comments, TODO and DEADLINE
@@ -4491,7 +4501,7 @@ first press `1' to indicate that the agenda should be temporarily (until the
4491next use of \\[org-agenda]) restricted to the current file." 4501next use of \\[org-agenda]) restricted to the current file."
4492 (interactive "P") 4502 (interactive "P")
4493 (catch 'exit 4503 (catch 'exit
4494 (let ((restrict-ok (and (buffer-file-name) (eq major-mode 'org-mode))) 4504 (let ((restrict-ok (and buffer-file-name (eq major-mode 'org-mode)))
4495 (custom org-agenda-custom-commands) 4505 (custom org-agenda-custom-commands)
4496 c entry key type string) 4506 c entry key type string)
4497 (put 'org-agenda-files 'org-restrict nil) 4507 (put 'org-agenda-files 'org-restrict nil)
@@ -4526,7 +4536,7 @@ C Configure your own agenda commands")
4526 (message "") 4536 (message "")
4527 (when (equal c ?1) 4537 (when (equal c ?1)
4528 (if restrict-ok 4538 (if restrict-ok
4529 (put 'org-agenda-files 'org-restrict (list (buffer-file-name))) 4539 (put 'org-agenda-files 'org-restrict (list buffer-file-name))
4530 (error "Cannot restrict agenda to current buffer")) 4540 (error "Cannot restrict agenda to current buffer"))
4531 (message "Press key for agenda command%s" 4541 (message "Press key for agenda command%s"
4532 (if restrict-ok " (restricted to current file)" "")) 4542 (if restrict-ok " (restricted to current file)" ""))
@@ -4650,8 +4660,8 @@ dates."
4650 (dotodo include-all) 4660 (dotodo include-all)
4651 (doclosed org-agenda-show-log) 4661 (doclosed org-agenda-show-log)
4652 (org-agenda-keep-modes keep-modes) 4662 (org-agenda-keep-modes keep-modes)
4653 (entry (buffer-file-name)) 4663 (entry buffer-file-name)
4654 (org-agenda-files (list (buffer-file-name))) 4664 (org-agenda-files (list buffer-file-name))
4655 (date (calendar-current-date)) 4665 (date (calendar-current-date))
4656 (win (selected-window)) 4666 (win (selected-window))
4657 (pos1 (point)) 4667 (pos1 (point))
@@ -5178,7 +5188,7 @@ date. It also removes lines that contain only whitespace."
5178 "Make the position visible." 5188 "Make the position visible."
5179 (if (and org-disable-agenda-to-diary ;; called from org-agenda 5189 (if (and org-disable-agenda-to-diary ;; called from org-agenda
5180 (stringp string) 5190 (stringp string)
5181 (buffer-file-name)) 5191 buffer-file-name)
5182 (setq string (org-modify-diary-entry-string string)))))) 5192 (setq string (org-modify-diary-entry-string string))))))
5183 5193
5184(defun org-modify-diary-entry-string (string) 5194(defun org-modify-diary-entry-string (string)
@@ -5190,7 +5200,7 @@ date. It also removes lines that contain only whitespace."
5190 'help-echo 5200 'help-echo
5191 (format 5201 (format
5192 "mouse-2 or RET jump to diary file %s" 5202 "mouse-2 or RET jump to diary file %s"
5193 (abbreviate-file-name (buffer-file-name))) 5203 (abbreviate-file-name buffer-file-name))
5194 'org-agenda-diary-link t 5204 'org-agenda-diary-link t
5195 'org-marker (org-agenda-new-marker (point-at-bol))) 5205 'org-marker (org-agenda-new-marker (point-at-bol)))
5196 string) 5206 string)
@@ -5212,7 +5222,7 @@ If the current buffer visits an agenda file, find the next one in the list.
5212If the current buffer does not, find the first agenda file." 5222If the current buffer does not, find the first agenda file."
5213 (interactive) 5223 (interactive)
5214 (let ((files (append org-agenda-files (list (car org-agenda-files)))) 5224 (let ((files (append org-agenda-files (list (car org-agenda-files))))
5215 (tcf (if (buffer-file-name) (file-truename (buffer-file-name)))) 5225 (tcf (if buffer-file-name (file-truename buffer-file-name)))
5216 file) 5226 file)
5217 (unless files (error "No agenda files")) 5227 (unless files (error "No agenda files"))
5218 (catch 'exit 5228 (catch 'exit
@@ -5223,14 +5233,14 @@ If the current buffer does not, find the first agenda file."
5223 (throw 'exit t)))) 5233 (throw 'exit t))))
5224 (find-file (car org-agenda-files))))) 5234 (find-file (car org-agenda-files)))))
5225 5235
5226(defun org-agenda-file-to-end (&optional file) 5236(defun org-agenda-file-to-end ()
5227 "Move/add the current file to the end of the agenda file list. 5237 "Move/add the current file to the end of the agenda file list.
5228If the file is not present in the list, it is appended to the list. If it is 5238If the file is not present in the list, it is appended to the list. If it is
5229present, it is moved there." 5239present, it is moved there."
5230 (interactive) 5240 (interactive)
5231 (org-agenda-file-to-front 'to-end file)) 5241 (org-agenda-file-to-front 'to-end))
5232 5242
5233(defun org-agenda-file-to-front (&optional to-end file) 5243(defun org-agenda-file-to-front (&optional to-end)
5234 "Move/add the current file to the top of the agenda file list. 5244 "Move/add the current file to the top of the agenda file list.
5235If the file is not present in the list, it is added to the front. If it is 5245If the file is not present in the list, it is added to the front. If it is
5236present, it is moved there. With optional argument TO-END, add/move to the 5246present, it is moved there. With optional argument TO-END, add/move to the
@@ -5239,11 +5249,11 @@ end of the list."
5239 (let ((file-alist (mapcar (lambda (x) 5249 (let ((file-alist (mapcar (lambda (x)
5240 (cons (file-truename x) x)) 5250 (cons (file-truename x) x))
5241 org-agenda-files)) 5251 org-agenda-files))
5242 (ctf (file-truename (buffer-file-name))) 5252 (ctf (file-truename buffer-file-name))
5243 x had) 5253 x had)
5244 (setq x (assoc ctf file-alist) had x) 5254 (setq x (assoc ctf file-alist) had x)
5245 5255
5246 (if (not x) (setq x (cons ctf (abbreviate-file-name (buffer-file-name))))) 5256 (if (not x) (setq x (cons ctf (abbreviate-file-name buffer-file-name))))
5247 (if to-end 5257 (if to-end
5248 (setq file-alist (append (delq x file-alist) (list x))) 5258 (setq file-alist (append (delq x file-alist) (list x)))
5249 (setq file-alist (cons x (delq x file-alist)))) 5259 (setq file-alist (cons x (delq x file-alist))))
@@ -5259,7 +5269,7 @@ end of the list."
5259These are the files which are being checked for agenda entries. 5269These are the files which are being checked for agenda entries.
5260Optional argument FILE means, use this file instead of the current." 5270Optional argument FILE means, use this file instead of the current."
5261 (interactive) 5271 (interactive)
5262 (let* ((file (or file (buffer-file-name))) 5272 (let* ((file (or file buffer-file-name))
5263 (true-file (file-truename file)) 5273 (true-file (file-truename file))
5264 (afile (abbreviate-file-name file)) 5274 (afile (abbreviate-file-name file))
5265 (files (delq nil (mapcar 5275 (files (delq nil (mapcar
@@ -5383,9 +5393,9 @@ function from a program - use `org-agenda-get-day-entries' instead."
5383 (cond 5393 (cond
5384 ((null org-category) 5394 ((null org-category)
5385 (setq org-category 5395 (setq org-category
5386 (if (buffer-file-name) 5396 (if buffer-file-name
5387 (file-name-sans-extension 5397 (file-name-sans-extension
5388 (file-name-nondirectory (buffer-file-name))) 5398 (file-name-nondirectory buffer-file-name))
5389 "???"))) 5399 "???")))
5390 ((symbolp org-category) (symbol-name org-category)) 5400 ((symbolp org-category) (symbol-name org-category))
5391 (t org-category)) 5401 (t org-category))
@@ -5482,7 +5492,7 @@ the documentation of `org-diary'."
5482 'keymap org-agenda-keymap 5492 'keymap org-agenda-keymap
5483 'help-echo 5493 'help-echo
5484 (format "mouse-2 or RET jump to org file %s" 5494 (format "mouse-2 or RET jump to org file %s"
5485 (abbreviate-file-name (buffer-file-name))))) 5495 (abbreviate-file-name buffer-file-name))))
5486 (regexp (concat "[\n\r]\\*+ *\\(" 5496 (regexp (concat "[\n\r]\\*+ *\\("
5487 (if org-select-this-todo-keyword 5497 (if org-select-this-todo-keyword
5488 (concat "\\<\\(" org-select-this-todo-keyword 5498 (concat "\\<\\(" org-select-this-todo-keyword
@@ -5524,7 +5534,7 @@ the documentation of `org-diary'."
5524 'keymap org-agenda-keymap 5534 'keymap org-agenda-keymap
5525 'help-echo 5535 'help-echo
5526 (format "mouse-2 or RET jump to org file %s" 5536 (format "mouse-2 or RET jump to org file %s"
5527 (abbreviate-file-name (buffer-file-name))))) 5537 (abbreviate-file-name buffer-file-name))))
5528 (regexp (regexp-quote 5538 (regexp (regexp-quote
5529 (substring 5539 (substring
5530 (format-time-string 5540 (format-time-string
@@ -5601,7 +5611,7 @@ the documentation of `org-diary'."
5601 'keymap org-agenda-keymap 5611 'keymap org-agenda-keymap
5602 'help-echo 5612 'help-echo
5603 (format "mouse-2 or RET jump to org file %s" 5613 (format "mouse-2 or RET jump to org file %s"
5604 (abbreviate-file-name (buffer-file-name))))) 5614 (abbreviate-file-name buffer-file-name))))
5605 (regexp (concat 5615 (regexp (concat
5606 "\\<" org-closed-string " *\\[" 5616 "\\<" org-closed-string " *\\["
5607 (regexp-quote 5617 (regexp-quote
@@ -5657,7 +5667,7 @@ the documentation of `org-diary'."
5657 'keymap org-agenda-keymap 5667 'keymap org-agenda-keymap
5658 'help-echo 5668 'help-echo
5659 (format "mouse-2 or RET jump to org file %s" 5669 (format "mouse-2 or RET jump to org file %s"
5660 (abbreviate-file-name (buffer-file-name))))) 5670 (abbreviate-file-name buffer-file-name))))
5661 (regexp org-deadline-time-regexp) 5671 (regexp org-deadline-time-regexp)
5662 (todayp (equal date (calendar-current-date))) ; DATE bound by calendar 5672 (todayp (equal date (calendar-current-date))) ; DATE bound by calendar
5663 (d1 (calendar-absolute-from-gregorian date)) ; DATE bound by calendar 5673 (d1 (calendar-absolute-from-gregorian date)) ; DATE bound by calendar
@@ -5719,7 +5729,7 @@ the documentation of `org-diary'."
5719 'keymap org-agenda-keymap 5729 'keymap org-agenda-keymap
5720 'help-echo 5730 'help-echo
5721 (format "mouse-2 or RET jump to org file %s" 5731 (format "mouse-2 or RET jump to org file %s"
5722 (abbreviate-file-name (buffer-file-name))))) 5732 (abbreviate-file-name buffer-file-name))))
5723 (regexp org-scheduled-time-regexp) 5733 (regexp org-scheduled-time-regexp)
5724 (todayp (equal date (calendar-current-date))) ; DATE bound by calendar 5734 (todayp (equal date (calendar-current-date))) ; DATE bound by calendar
5725 (d1 (calendar-absolute-from-gregorian date)) ; DATE bound by calendar 5735 (d1 (calendar-absolute-from-gregorian date)) ; DATE bound by calendar
@@ -5768,7 +5778,7 @@ the documentation of `org-diary'."
5768 'keymap org-agenda-keymap 5778 'keymap org-agenda-keymap
5769 'help-echo 5779 'help-echo
5770 (format "mouse-2 or RET jump to org file %s" 5780 (format "mouse-2 or RET jump to org file %s"
5771 (abbreviate-file-name (buffer-file-name))))) 5781 (abbreviate-file-name buffer-file-name))))
5772 (regexp org-tr-regexp) 5782 (regexp org-tr-regexp)
5773 (d0 (calendar-absolute-from-gregorian date)) 5783 (d0 (calendar-absolute-from-gregorian date))
5774 marker hdmarker ee txt d1 d2 s1 s2 timestr category tags) 5784 marker hdmarker ee txt d1 d2 s1 s2 timestr category tags)
@@ -5861,11 +5871,11 @@ only the correctly processes TXT should be returned - this is used by
5861 (if (string-match "^ +" txt) (setq txt (replace-match "" nil nil txt))) 5871 (if (string-match "^ +" txt) (setq txt (replace-match "" nil nil txt)))
5862 (let* ((category (or category 5872 (let* ((category (or category
5863 org-category 5873 org-category
5864 (if (buffer-file-name) 5874 (if buffer-file-name
5865 (file-name-sans-extension 5875 (file-name-sans-extension
5866 (file-name-nondirectory (buffer-file-name))) 5876 (file-name-nondirectory buffer-file-name))
5867 ""))) 5877 "")))
5868 (tag (or (nth (1- (length tags)) tags) "")) 5878 (tag (or (nth (1- (or (length tags) 0)) tags) ""))
5869 time ;; needed for the eval of the prefix format 5879 time ;; needed for the eval of the prefix format
5870 (ts (if dotime (concat (if (stringp dotime) dotime "") txt))) 5880 (ts (if dotime (concat (if (stringp dotime) dotime "") txt)))
5871 (time-of-day (and dotime (org-get-time-of-day ts))) 5881 (time-of-day (and dotime (org-get-time-of-day ts)))
@@ -6495,7 +6505,7 @@ are included in the output."
6495 'keymap org-agenda-keymap 6505 'keymap org-agenda-keymap
6496 'help-echo 6506 'help-echo
6497 (format "mouse-2 or RET jump to org file %s" 6507 (format "mouse-2 or RET jump to org file %s"
6498 (abbreviate-file-name (buffer-file-name))))) 6508 (abbreviate-file-name buffer-file-name))))
6499 lspos 6509 lspos
6500 tags tags-list tags-alist (llast 0) rtn level category i txt 6510 tags tags-list tags-alist (llast 0) rtn level category i txt
6501 todo marker) 6511 todo marker)
@@ -6507,7 +6517,7 @@ are included in the output."
6507 (setq todo (if (match-end 1) (match-string 2)) 6517 (setq todo (if (match-end 1) (match-string 2))
6508 tags (if (match-end 4) (match-string 4))) 6518 tags (if (match-end 4) (match-string 4)))
6509 (goto-char (setq lspos (1+ (match-beginning 0)))) 6519 (goto-char (setq lspos (1+ (match-beginning 0))))
6510 (setq level (outline-level) 6520 (setq level (funcall outline-level)
6511 category (org-get-category)) 6521 category (org-get-category))
6512 (setq i llast llast level) 6522 (setq i llast llast level)
6513 ;; remove tag lists from same and sublevels 6523 ;; remove tag lists from same and sublevels
@@ -7232,9 +7242,8 @@ sequences, it will now work."
7232 "Returns the name of the message folder in a index folder buffer." 7242 "Returns the name of the message folder in a index folder buffer."
7233 (save-excursion 7243 (save-excursion
7234 (mh-index-previous-folder) 7244 (mh-index-previous-folder)
7235 (if (not (re-search-forward "^\\(+.*\\)$" nil t)) 7245 (re-search-forward "^\\(+.*\\)$" nil t)
7236 (message "Problem getting folder from index.") 7246 (message (match-string 1))))
7237 (message (match-string 1)))))
7238 7247
7239(defun org-mhe-get-message-folder () 7248(defun org-mhe-get-message-folder ()
7240 "Return the name of the current message folder. Be careful if you 7249 "Return the name of the current message folder. Be careful if you
@@ -7278,23 +7287,21 @@ idea..."
7278 "Follow an MHE link to FOLDER and ARTICLE." 7287 "Follow an MHE link to FOLDER and ARTICLE."
7279 (setq article (org-add-angle-brackets article)) 7288 (setq article (org-add-angle-brackets article))
7280 (require 'mh-e) 7289 (require 'mh-e)
7290 (require 'mh-search)
7281 (mh-find-path) 7291 (mh-find-path)
7282 (let* ((show-buf (concat "show-" folder))) 7292 (mh-search-choose)
7283 (mh-visit-folder folder) 7293 (if (equal mh-searcher 'pick)
7284 (get-buffer-create show-buf) 7294 (progn
7285 (mh-show-msg 7295 (mh-search folder (list "--message-id" article))
7286 (string-to-number 7296 (when (and org-mhe-search-all-folders
7287 (car (split-string 7297 (not (org-mhe-get-message-real-folder)))
7288 (with-temp-buffer 7298 (kill-this-buffer)
7289 (call-process 7299 (mh-search "+" (list "--message-id" article))))
7290 (expand-file-name "pick" mh-progs) 7300 (mh-search "+" article))
7291 nil t nil 7301 (if (org-mhe-get-message-real-folder)
7292 folder 7302 (mh-show-msg 1)
7293 "--message-id" 7303 (kill-this-buffer)
7294 article) 7304 (error "Message not found")))
7295 (buffer-string))
7296 "\n"))))
7297 (pop-to-buffer show-buf)))
7298 7305
7299(defun org-open-file (path &optional in-emacs line search) 7306(defun org-open-file (path &optional in-emacs line search)
7300 "Open the file at PATH. 7307 "Open the file at PATH.
@@ -7309,7 +7316,7 @@ opened in Emacs.
7309If the file does not exist, an error is thrown." 7316If the file does not exist, an error is thrown."
7310 (setq in-emacs (or in-emacs line search)) 7317 (setq in-emacs (or in-emacs line search))
7311 (let* ((file (if (equal path "") 7318 (let* ((file (if (equal path "")
7312 (buffer-file-name) 7319 buffer-file-name
7313 (convert-standard-filename (org-expand-file-name path)))) 7320 (convert-standard-filename (org-expand-file-name path))))
7314 (dirp (file-directory-p file)) 7321 (dirp (file-directory-p file))
7315 (dfile (downcase file)) 7322 (dfile (downcase file))
@@ -7345,7 +7352,7 @@ If the file does not exist, an error is thrown."
7345 (shell-command (concat cmd " &")))) 7352 (shell-command (concat cmd " &"))))
7346 ((or (stringp cmd) 7353 ((or (stringp cmd)
7347 (eq cmd 'emacs)) 7354 (eq cmd 'emacs))
7348 (unless (equal (file-truename file) (file-truename (buffer-file-name))) 7355 (unless (equal (file-truename file) (file-truename buffer-file-name))
7349 (funcall (cdr (assq 'file org-link-frame-setup)) file)) 7356 (funcall (cdr (assq 'file org-link-frame-setup)) file))
7350 (if line (goto-line line) 7357 (if line (goto-line line)
7351 (if search (org-link-search search)))) 7358 (if search (org-link-search search))))
@@ -7412,7 +7419,7 @@ For file links, arg negates `org-context-in-file-links'."
7412 (save-excursion 7419 (save-excursion
7413 (vm-select-folder-buffer) 7420 (vm-select-folder-buffer)
7414 (let* ((message (car vm-message-pointer)) 7421 (let* ((message (car vm-message-pointer))
7415 (folder (buffer-file-name)) 7422 (folder buffer-file-name)
7416 (subject (vm-su-subject message)) 7423 (subject (vm-su-subject message))
7417 (author (vm-su-full-name message)) 7424 (author (vm-su-full-name message))
7418 (message-id (vm-su-message-id message))) 7425 (message-id (vm-su-message-id message)))
@@ -7457,7 +7464,7 @@ For file links, arg negates `org-context-in-file-links'."
7457 (save-excursion 7464 (save-excursion
7458 (save-restriction 7465 (save-restriction
7459 (rmail-narrow-to-non-pruned-header) 7466 (rmail-narrow-to-non-pruned-header)
7460 (let ((folder (buffer-file-name)) 7467 (let ((folder buffer-file-name)
7461 (message-id (mail-fetch-field "message-id")) 7468 (message-id (mail-fetch-field "message-id"))
7462 (author (mail-fetch-field "from")) 7469 (author (mail-fetch-field "from"))
7463 (subject (mail-fetch-field "subject"))) 7470 (subject (mail-fetch-field "subject")))
@@ -7512,7 +7519,7 @@ For file links, arg negates `org-context-in-file-links'."
7512 ((eq major-mode 'org-mode) 7519 ((eq major-mode 'org-mode)
7513 ;; Just link to current headline 7520 ;; Just link to current headline
7514 (setq cpltxt (concat "file:" 7521 (setq cpltxt (concat "file:"
7515 (abbreviate-file-name (buffer-file-name)))) 7522 (abbreviate-file-name buffer-file-name)))
7516 ;; Add a context search string 7523 ;; Add a context search string
7517 (when (org-xor org-context-in-file-links arg) 7524 (when (org-xor org-context-in-file-links arg)
7518 ;; Check if we are on a target 7525 ;; Check if we are on a target
@@ -7537,10 +7544,10 @@ For file links, arg negates `org-context-in-file-links'."
7537 (setq cpltxt (substring cpltxt 0 -2))) 7544 (setq cpltxt (substring cpltxt 0 -2)))
7538 (setq link (org-make-link cpltxt))) 7545 (setq link (org-make-link cpltxt)))
7539 7546
7540 ((buffer-file-name) 7547 (buffer-file-name
7541 ;; Just link to this file here. 7548 ;; Just link to this file here.
7542 (setq cpltxt (concat "file:" 7549 (setq cpltxt (concat "file:"
7543 (abbreviate-file-name (buffer-file-name)))) 7550 (abbreviate-file-name buffer-file-name)))
7544 ;; Add a context string 7551 ;; Add a context string
7545 (when (org-xor org-context-in-file-links arg) 7552 (when (org-xor org-context-in-file-links arg)
7546 (setq txt (if (org-region-active-p) 7553 (setq txt (if (org-region-active-p)
@@ -7706,7 +7713,7 @@ is in the current directory or below."
7706 (case-fold-search nil) 7713 (case-fold-search nil)
7707 (search (match-string 2 link))) 7714 (search (match-string 2 link)))
7708 (when (save-match-data 7715 (when (save-match-data
7709 (equal (file-truename (buffer-file-name)) 7716 (equal (file-truename buffer-file-name)
7710 (file-truename path))) 7717 (file-truename path)))
7711 ;; We are linking to this same file 7718 ;; We are linking to this same file
7712 (if (and org-file-link-context-use-camel-case 7719 (if (and org-file-link-context-use-camel-case
@@ -7835,7 +7842,7 @@ See also the variable `org-reverse-note-order'."
7835 ((and (org-on-heading-p nil) (not current-prefix-arg)) 7842 ((and (org-on-heading-p nil) (not current-prefix-arg))
7836 ;; Put it below this entry, at the beg/end of the subtree 7843 ;; Put it below this entry, at the beg/end of the subtree
7837 (org-back-to-heading) 7844 (org-back-to-heading)
7838 (setq level (outline-level)) 7845 (setq level (funcall outline-level))
7839 (if reversed 7846 (if reversed
7840 (outline-end-of-heading) 7847 (outline-end-of-heading)
7841 (outline-end-of-subtree)) 7848 (outline-end-of-subtree))
@@ -7868,7 +7875,7 @@ See also the variable `org-reverse-note-order'."
7868 (let ((all org-reverse-note-order) 7875 (let ((all org-reverse-note-order)
7869 entry) 7876 entry)
7870 (while (setq entry (pop all)) 7877 (while (setq entry (pop all))
7871 (if (string-match (car entry) (buffer-file-name)) 7878 (if (string-match (car entry) buffer-file-name)
7872 (throw 'exit (cdr entry)))) 7879 (throw 'exit (cdr entry))))
7873 nil))))) 7880 nil)))))
7874 7881
@@ -10510,7 +10517,8 @@ translations. There is currently no way for users to extend this.")
10510 "Cleanup a buffer substring so that links can be created safely." 10517 "Cleanup a buffer substring so that links can be created safely."
10511 (interactive) 10518 (interactive)
10512 (let* ((cb (current-buffer)) 10519 (let* ((cb (current-buffer))
10513 (re-radio (concat "\\([^<]\\)\\(" org-target-link-regexp "\\)")) 10520 (re-radio (and org-target-link-regexp
10521 (concat "\\([^<]\\)\\(" org-target-link-regexp "\\)")))
10514 rtn) 10522 rtn)
10515 (save-excursion 10523 (save-excursion
10516 (set-buffer (get-buffer-create " org-mode-tmp")) 10524 (set-buffer (get-buffer-create " org-mode-tmp"))
@@ -10524,8 +10532,9 @@ translations. There is currently no way for users to extend this.")
10524 (replace-match "\\1(INVISIBLE)")) 10532 (replace-match "\\1(INVISIBLE)"))
10525 ;; Find matches for radio targets and turn them into links 10533 ;; Find matches for radio targets and turn them into links
10526 (goto-char (point-min)) 10534 (goto-char (point-min))
10527 (while (re-search-forward re-radio nil t) 10535 (when re-radio
10528 (replace-match "\\1[[\\2]]")) 10536 (while (re-search-forward re-radio nil t)
10537 (replace-match "\\1[[\\2]]")))
10529 ;; Find all links that contain a newline and put them into a single line 10538 ;; Find all links that contain a newline and put them into a single line
10530 (goto-char (point-min)) 10539 (goto-char (point-min))
10531 (while (re-search-forward "\\(\\[\\[[^]]*?\\)[ \t]*\n[ \t]*\\([^]]*\\]\\]\\)" nil t) 10540 (while (re-search-forward "\\(\\[\\[[^]]*?\\)[ \t]*\n[ \t]*\\([^]]*\\]\\]\\)" nil t)
@@ -10590,7 +10599,7 @@ underlined headlines. The default is 3."
10590 (level 0) line txt 10599 (level 0) line txt
10591 (umax nil) 10600 (umax nil)
10592 (case-fold-search nil) 10601 (case-fold-search nil)
10593 (filename (concat (file-name-sans-extension (buffer-file-name)) 10602 (filename (concat (file-name-sans-extension buffer-file-name)
10594 ".txt")) 10603 ".txt"))
10595 (buffer (find-file-noselect filename)) 10604 (buffer (find-file-noselect filename))
10596 (levels-open (make-vector org-level-max nil)) 10605 (levels-open (make-vector org-level-max nil))
@@ -10748,7 +10757,7 @@ underlined headlines. The default is 3."
10748Also removes the first line of the buffer if it specifies a mode, 10757Also removes the first line of the buffer if it specifies a mode,
10749and all options lines." 10758and all options lines."
10750 (interactive) 10759 (interactive)
10751 (let* ((filename (concat (file-name-sans-extension (buffer-file-name)) 10760 (let* ((filename (concat (file-name-sans-extension buffer-file-name)
10752 ".txt")) 10761 ".txt"))
10753 (buffer (find-file-noselect filename)) 10762 (buffer (find-file-noselect filename))
10754 (ore (concat 10763 (ore (concat
@@ -10822,7 +10831,7 @@ Does include HTML export options as well as TODO and CATEGORY stuff."
10822 org-export-with-sub-superscripts 10831 org-export-with-sub-superscripts
10823 org-export-with-emphasize 10832 org-export-with-emphasize
10824 org-export-with-TeX-macros 10833 org-export-with-TeX-macros
10825 (file-name-nondirectory (buffer-file-name)) 10834 (file-name-nondirectory buffer-file-name)
10826 (if (equal org-todo-interpretation 'sequence) 10835 (if (equal org-todo-interpretation 'sequence)
10827 (mapconcat 'identity org-todo-keywords " ") 10836 (mapconcat 'identity org-todo-keywords " ")
10828 "TODO FEEDBACK VERIFY DONE") 10837 "TODO FEEDBACK VERIFY DONE")
@@ -10895,7 +10904,7 @@ The prefix ARG specifies how many levels of the outline should become
10895headlines. The default is 3. Lower levels will become bulleted lists." 10904headlines. The default is 3. Lower levels will become bulleted lists."
10896 (interactive "P") 10905 (interactive "P")
10897 (org-export-as-html arg 'hidden) 10906 (org-export-as-html arg 'hidden)
10898 (org-open-file (buffer-file-name))) 10907 (org-open-file buffer-file-name))
10899 10908
10900(defun org-export-as-html-batch () 10909(defun org-export-as-html-batch ()
10901 "Call `org-export-as-html', may be used in batch processing as 10910 "Call `org-export-as-html', may be used in batch processing as
@@ -10927,7 +10936,7 @@ headlines. The default is 3. Lower levels will become bulleted lists."
10927 (lines (org-export-find-first-heading-line all_lines)) 10936 (lines (org-export-find-first-heading-line all_lines))
10928 (level 0) (line "") (origline "") txt todo 10937 (level 0) (line "") (origline "") txt todo
10929 (umax nil) 10938 (umax nil)
10930 (filename (concat (file-name-sans-extension (buffer-file-name)) 10939 (filename (concat (file-name-sans-extension buffer-file-name)
10931 ".html")) 10940 ".html"))
10932 (buffer (find-file-noselect filename)) 10941 (buffer (find-file-noselect filename))
10933 (levels-open (make-vector org-level-max nil)) 10942 (levels-open (make-vector org-level-max nil))
@@ -11661,7 +11670,7 @@ When LEVEL is non-nil, increase section numbers on that level."
11661The iCalendar file will be located in the same directory as the Org-mode 11670The iCalendar file will be located in the same directory as the Org-mode
11662file, but with extension `.ics'." 11671file, but with extension `.ics'."
11663 (interactive) 11672 (interactive)
11664 (org-export-icalendar nil (buffer-file-name))) 11673 (org-export-icalendar nil buffer-file-name))
11665 11674
11666;;;###autoload 11675;;;###autoload
11667(defun org-export-icalendar-all-agenda-files () 11676(defun org-export-icalendar-all-agenda-files ()
@@ -11698,7 +11707,7 @@ file and store it under the name `org-combined-agenda-icalendar-file'."
11698 (set-buffer (org-get-agenda-file-buffer file)) 11707 (set-buffer (org-get-agenda-file-buffer file))
11699 (setq category (or org-category 11708 (setq category (or org-category
11700 (file-name-sans-extension 11709 (file-name-sans-extension
11701 (file-name-nondirectory (buffer-file-name))))) 11710 (file-name-nondirectory buffer-file-name))))
11702 (if (symbolp category) (setq category (symbol-name category))) 11711 (if (symbolp category) (setq category (symbol-name category)))
11703 (let ((standard-output ical-buffer)) 11712 (let ((standard-output ical-buffer))
11704 (if combine 11713 (if combine
@@ -12842,4 +12851,3 @@ Show the heading too, if it is currently invisible."
12842 12851
12843;; arch-tag: e77da1a7-acc7-4336-b19e-efa25af3f9fd 12852;; arch-tag: e77da1a7-acc7-4336-b19e-efa25af3f9fd
12844;;; org.el ends here 12853;;; org.el ends here
12845
diff --git a/lisp/tree-widget.el b/lisp/tree-widget.el
index 55385d42e95..b868369fc4a 100644
--- a/lisp/tree-widget.el
+++ b/lisp/tree-widget.el
@@ -50,14 +50,16 @@
50;; Specify a function to be called to dynamically provide the 50;; Specify a function to be called to dynamically provide the
51;; tree's children in response to an expand request. This function 51;; tree's children in response to an expand request. This function
52;; will be passed the tree widget and must return a list of child 52;; will be passed the tree widget and must return a list of child
53;; widgets. 53;; widgets. Child widgets returned by the :expander function are
54;; stored in the :args property of the tree widget.
54;; 55;;
55;; *Please note:* Child widgets returned by the :expander function 56;; :expander-p
56;; are stored in the :args property of the tree widget. To speed 57;; Specify a predicate which must return non-nil to indicate that
57;; up successive expand requests, the :expander function is not 58;; the :expander function above has to be called. By default, to
58;; called again when the :args value is non-nil. To refresh child 59;; speed up successive expand requests, the :expander-p predicate
59;; values, it is necessary to set the :args property to nil, then 60;; return non-nil when the :args value is nil. So, by default, to
60;; redraw the tree. 61;; refresh child values, it is necessary to set the :args property
62;; to nil, then redraw the tree.
61;; 63;;
62;; :open-icon (default `tree-widget-open-icon') 64;; :open-icon (default `tree-widget-open-icon')
63;; :close-icon (default `tree-widget-close-icon') 65;; :close-icon (default `tree-widget-close-icon')
@@ -265,19 +267,42 @@ See also the option `widget-image-conversion'."
265 267
266(defsubst tree-widget-theme-name () 268(defsubst tree-widget-theme-name ()
267 "Return the current theme name, or nil if no theme is active." 269 "Return the current theme name, or nil if no theme is active."
268 (and tree-widget--theme (aref tree-widget--theme 0))) 270 (and tree-widget--theme (car (aref tree-widget--theme 0))))
269 271
270(defsubst tree-widget-set-theme (&optional name) 272(defsubst tree-widget-set-parent-theme (name)
273 "Set to NAME the parent theme of the current theme.
274The default parent theme is the \"default\" theme."
275 (unless (member name (aref tree-widget--theme 0))
276 (aset tree-widget--theme 0
277 (append (aref tree-widget--theme 0) (list name)))
278 ;; Load the theme setup
279 (let ((default-directory (tree-widget-themes-directory)))
280 (when default-directory
281 (load (expand-file-name "tree-widget-theme-setup" name) t)))))
282
283(defun tree-widget-set-theme (&optional name)
271 "In the current buffer, set the theme to use for images. 284 "In the current buffer, set the theme to use for images.
272The current buffer must be where the tree widget is drawn. 285The current buffer must be where the tree widget is drawn.
273Optional argument NAME is the name of the theme to use. It defaults 286Optional argument NAME is the name of the theme to use. It defaults
274to the value of the variable `tree-widget-theme'. 287to the value of the variable `tree-widget-theme'.
275Does nothing if NAME is already the current theme." 288Does nothing if NAME is already the current theme.
289
290If there is a \"tree-widget-theme-setup\" library in the theme
291directory, load it to setup a parent theme or the images properties.
292Typically it should contain something like this:
293
294 (tree-widget-set-parent-theme \"my-parent-theme\")
295 (tree-widget-set-image-properties
296 (if (featurep 'xemacs)
297 '(:ascent center)
298 '(:ascent center :mask (heuristic t))
299 ))"
276 (or name (setq name (or tree-widget-theme "default"))) 300 (or name (setq name (or tree-widget-theme "default")))
277 (unless (string-equal name (tree-widget-theme-name)) 301 (unless (string-equal name (tree-widget-theme-name))
278 (set (make-local-variable 'tree-widget--theme) 302 (set (make-local-variable 'tree-widget--theme)
279 (make-vector 4 nil)) 303 (make-vector 4 nil))
280 (aset tree-widget--theme 0 name))) 304 (tree-widget-set-parent-theme name)
305 (tree-widget-set-parent-theme "default")))
281 306
282(defun tree-widget--locate-sub-directory (name path) 307(defun tree-widget--locate-sub-directory (name path)
283 "Locate the sub-directory NAME in PATH. 308 "Locate the sub-directory NAME in PATH.
@@ -328,50 +353,6 @@ specified directory is not accessible."
328 (aset tree-widget--theme 1 (or found 'void)) 353 (aset tree-widget--theme 1 (or found 'void))
329 found)) 354 found))
330 355
331(defsubst tree-widget-set-image-properties (props)
332 "In current theme, set images properties to PROPS."
333 (aset tree-widget--theme 2 props))
334
335(defun tree-widget-image-properties (file)
336 "Return the properties of an image in current theme.
337FILE is the absolute file name of an image.
338
339If there is a \"tree-widget-theme-setup\" library in the theme
340directory, where is located FILE, load it to setup theme images
341properties. Typically it should contain something like this:
342
343 (tree-widget-set-image-properties
344 (if (featurep 'xemacs)
345 '(:ascent center)
346 '(:ascent center :mask (heuristic t))
347 ))
348
349When there is no \"tree-widget-theme-setup\" library in the current
350theme directory, load the one from the default theme, if available.
351Default global properties are provided for respectively Emacs and
352XEmacs in the variables `tree-widget-image-properties-emacs', and
353`tree-widget-image-properties-xemacs'."
354 ;; If properties are in the cache, use them.
355 (let ((plist (aref tree-widget--theme 2)))
356 (unless plist
357 ;; Load tree-widget-theme-setup if available.
358 (load (expand-file-name "tree-widget-theme-setup"
359 (file-name-directory file)) t t)
360 ;; If properties have been setup, use them.
361 (unless (setq plist (aref tree-widget--theme 2))
362 ;; Try from the default theme.
363 (load (expand-file-name "../default/tree-widget-theme-setup"
364 (file-name-directory file)) t t)
365 ;; If properties have been setup, use them.
366 (unless (setq plist (aref tree-widget--theme 2))
367 ;; By default, use supplied global properties.
368 (setq plist (if (featurep 'xemacs)
369 tree-widget-image-properties-xemacs
370 tree-widget-image-properties-emacs))
371 ;; Setup the cache.
372 (tree-widget-set-image-properties plist))))
373 plist))
374
375(defconst tree-widget--cursors 356(defconst tree-widget--cursors
376 ;; Pointer shapes when the mouse pointer is over inactive 357 ;; Pointer shapes when the mouse pointer is over inactive
377 ;; tree-widget images. This feature works since Emacs 22, and 358 ;; tree-widget images. This feature works since Emacs 22, and
@@ -384,35 +365,46 @@ XEmacs in the variables `tree-widget-image-properties-emacs', and
384 ("no-handle" . arrow) 365 ("no-handle" . arrow)
385 )) 366 ))
386 367
368(defsubst tree-widget-set-image-properties (props)
369 "In current theme, set images properties to PROPS.
370Does nothing if images properties have already been set for that
371theme."
372 (or (aref tree-widget--theme 2)
373 (aset tree-widget--theme 2 props)))
374
375(defsubst tree-widget-image-properties (name)
376 "Return the properties of image NAME in current theme.
377Default global properties are provided for respectively Emacs and
378XEmacs in the variables `tree-widget-image-properties-emacs', and
379`tree-widget-image-properties-xemacs'."
380 ;; Add the pointer shape
381 (cons :pointer
382 (cons (or (cdr (assoc name tree-widget--cursors)) 'hand)
383 (tree-widget-set-image-properties
384 (if (featurep 'xemacs)
385 tree-widget-image-properties-xemacs
386 tree-widget-image-properties-emacs)))))
387
387(defun tree-widget-lookup-image (name) 388(defun tree-widget-lookup-image (name)
388 "Look up in current theme for an image with NAME. 389 "Look up in current theme for an image with NAME.
389Search first in current theme, then in default theme (see also the 390Search first in current theme, then in parent themes (see also the
390variable `tree-widget-theme'). 391function `tree-widget-set-parent-theme').
391Return the first image found having a supported format, or nil if not 392Return the first image found having a supported format, or nil if not
392found." 393found."
393 (let ((default-directory (tree-widget-themes-directory))) 394 (let ((default-directory (tree-widget-themes-directory)) file)
394 (when default-directory 395 (when default-directory
395 (let (file (theme (tree-widget-theme-name))) 396 (catch 'found
396 (catch 'found 397 (dolist (dir (aref tree-widget--theme 0))
397 (dolist (dir (if (string-equal theme "default") 398 (dolist (fmt (tree-widget-image-formats))
398 '("default") (list theme "default"))) 399 (dolist (ext (cdr fmt))
399 (dolist (fmt (tree-widget-image-formats)) 400 (setq file (expand-file-name (concat name ext) dir))
400 (dolist (ext (cdr fmt)) 401 (and (file-readable-p file)
401 (setq file (expand-file-name (concat name ext) dir)) 402 (file-regular-p file)
402 (and 403 (throw 'found
403 (file-readable-p file) 404 (tree-widget-create-image
404 (file-regular-p file) 405 (car fmt) file
405 (throw 406 (tree-widget-image-properties name)))))))
406 'found 407 nil))))
407 (tree-widget-create-image
408 (car fmt) file
409 ;; Add the pointer shape
410 (cons :pointer
411 (cons
412 (or (cdr (assoc name tree-widget--cursors))
413 'hand)
414 (tree-widget-image-properties file)))))))))
415 nil)))))
416 408
417(defun tree-widget-find-image (name) 409(defun tree-widget-find-image (name)
418 "Find the image with NAME in current theme. 410 "Find the image with NAME in current theme.
@@ -530,12 +522,13 @@ Handle mouse button 1 click on buttons.")
530(define-widget 'tree-widget 'default 522(define-widget 'tree-widget 'default
531 "Tree widget." 523 "Tree widget."
532 :format "%v" 524 :format "%v"
533 :convert-widget 'widget-types-convert-widget 525 :convert-widget 'tree-widget-convert-widget
534 :value-get 'widget-value-value-get 526 :value-get 'widget-value-value-get
535 :value-delete 'widget-children-value-delete 527 :value-delete 'widget-children-value-delete
536 :value-create 'tree-widget-value-create 528 :value-create 'tree-widget-value-create
537 :action 'tree-widget-action 529 :action 'tree-widget-action
538 :help-echo 'tree-widget-help-echo 530 :help-echo 'tree-widget-help-echo
531 :expander-p 'tree-widget-expander-p
539 :open-icon 'tree-widget-open-icon 532 :open-icon 'tree-widget-open-icon
540 :close-icon 'tree-widget-close-icon 533 :close-icon 'tree-widget-close-icon
541 :empty-icon 'tree-widget-empty-icon 534 :empty-icon 'tree-widget-empty-icon
@@ -646,6 +639,14 @@ This hook should be local in the buffer setup to display widgets.")
646 (1- (point)) (point) 639 (1- (point)) (point)
647 'display (list 'space :width tree-widget-space-width))) 640 'display (list 'space :width tree-widget-space-width)))
648 641
642(defun tree-widget-convert-widget (widget)
643 "Convert :args as widget types in WIDGET."
644 (let ((tree (widget-types-convert-widget widget)))
645 ;; Compatibility
646 (widget-put tree :expander (or (widget-get tree :expander)
647 (widget-get tree :dynargs)))
648 tree))
649
649(defun tree-widget-value-create (tree) 650(defun tree-widget-value-create (tree)
650 "Create the TREE tree-widget." 651 "Create the TREE tree-widget."
651 (let* ((node (tree-widget-node tree)) 652 (let* ((node (tree-widget-node tree))
@@ -662,8 +663,6 @@ This hook should be local in the buffer setup to display widgets.")
662 (if (widget-get tree :open) 663 (if (widget-get tree :open)
663;;;; Expanded node. 664;;;; Expanded node.
664 (let ((args (widget-get tree :args)) 665 (let ((args (widget-get tree :args))
665 (xpandr (or (widget-get tree :expander)
666 (widget-get tree :dynargs)))
667 (guide (widget-get tree :guide)) 666 (guide (widget-get tree :guide))
668 (noguide (widget-get tree :no-guide)) 667 (noguide (widget-get tree :no-guide))
669 (endguide (widget-get tree :end-guide)) 668 (endguide (widget-get tree :end-guide))
@@ -674,9 +673,11 @@ This hook should be local in the buffer setup to display widgets.")
674 (endguidi (tree-widget-find-image "end-guide")) 673 (endguidi (tree-widget-find-image "end-guide"))
675 (handli (tree-widget-find-image "handle")) 674 (handli (tree-widget-find-image "handle"))
676 (nohandli (tree-widget-find-image "no-handle"))) 675 (nohandli (tree-widget-find-image "no-handle")))
677 ;; Request children at run time, when not already done. 676 ;; Request children at run time, when requested.
678 (when (and (not args) xpandr) 677 (when (and (widget-get tree :expander)
679 (setq args (mapcar 'widget-convert (funcall xpandr tree))) 678 (widget-apply tree :expander-p))
679 (setq args (mapcar 'widget-convert
680 (widget-apply tree :expander)))
680 (widget-put tree :args args)) 681 (widget-put tree :args args))
681 ;; Defer the node widget creation after icon creation. 682 ;; Defer the node widget creation after icon creation.
682 (widget-put tree :node (widget-convert node)) 683 (widget-put tree :node (widget-convert node))
@@ -800,6 +801,11 @@ Ignore the EVENT argument."
800 "Collapse node" 801 "Collapse node"
801 "Expand node")) 802 "Expand node"))
802 803
804(defun tree-widget-expander-p (tree)
805 "Return non-nil if the TREE tree-widget :expander has to be called.
806That is, if TREE :args is nil."
807 (null (widget-get tree :args)))
808
803(provide 'tree-widget) 809(provide 'tree-widget)
804 810
805;; arch-tag: c3a1ada2-1663-41dc-9d16-2479ed8320e8 811;; arch-tag: c3a1ada2-1663-41dc-9d16-2479ed8320e8
diff --git a/lisp/tumme.el b/lisp/tumme.el
index 6cec3e73a16..6a53ed16948 100644
--- a/lisp/tumme.el
+++ b/lisp/tumme.el
@@ -169,13 +169,13 @@
169;; probably needs rewriting `tumme-display-thumbs' to be more general. 169;; probably needs rewriting `tumme-display-thumbs' to be more general.
170;; 170;;
171;; * Find some way of toggling on and off really nice keybindings in 171;; * Find some way of toggling on and off really nice keybindings in
172;; dired (for example, using C-n or <down> instead of C-S-n). Richard 172;; dired (for example, using C-n or <down> instead of C-S-n). Richard
173;; suggested that we could keep C-t as prefix for tumme commands as it 173;; suggested that we could keep C-t as prefix for tumme commands as it
174;; is currently not used in dired. He also suggested that 174;; is currently not used in dired. He also suggested that
175;; `dired-next-line' and `dired-previous-line' figure out if tumme is 175;; `dired-next-line' and `dired-previous-line' figure out if tumme is
176;; enabled in the current buffer and, if it is, call 176;; enabled in the current buffer and, if it is, call
177;; `tumme-dired-next-line' and `tumme-dired-previous-line', 177;; `tumme-dired-next-line' and `tumme-dired-previous-line',
178;; respectively. Update: This is partly done; some bindings have now 178;; respectively. Update: This is partly done; some bindings have now
179;; been added to dired. 179;; been added to dired.
180;; 180;;
181;; * Enhanced gallery creation with basic CSS-support and pagination 181;; * Enhanced gallery creation with basic CSS-support and pagination
diff --git a/lisp/url/ChangeLog b/lisp/url/ChangeLog
index cb002731eec..60a279356b8 100644
--- a/lisp/url/ChangeLog
+++ b/lisp/url/ChangeLog
@@ -1,3 +1,14 @@
12006-03-07 Stefan Monnier <monnier@iro.umontreal.ca>
2
3 * url-http.el (url-http-find-free-connection): Fix braino in last fix.
4
52006-03-05 Stefan Monnier <monnier@iro.umontreal.ca>
6
7 * url-http.el (url-http-find-free-connection): Don't kill the process
8 when killing the temp buffer.
9 (url-http-symbol-value-in-buffer): Massage to make it clear to the
10 byte-compiler that the function is defined.
11
12006-02-20 Stefan Monnier <monnier@iro.umontreal.ca> 122006-02-20 Stefan Monnier <monnier@iro.umontreal.ca>
2 13
3 * url.el (url-redirect-buffer): New var. 14 * url.el (url-redirect-buffer): New var.
diff --git a/lisp/url/url-http.el b/lisp/url/url-http.el
index 22ca6010ef9..c401094593e 100644
--- a/lisp/url/url-http.el
+++ b/lisp/url/url-http.el
@@ -121,7 +121,11 @@ request.")
121 (let ((buf (generate-new-buffer " *url-http-temp*"))) 121 (let ((buf (generate-new-buffer " *url-http-temp*")))
122 ;; `url-open-stream' needs a buffer in which to do things 122 ;; `url-open-stream' needs a buffer in which to do things
123 ;; like authentication. But we use another buffer afterwards. 123 ;; like authentication. But we use another buffer afterwards.
124 (unwind-protect (url-open-stream host buf host port) 124 (unwind-protect
125 (let ((proc (url-open-stream host buf host port)))
126 ;; Drop the temp buffer link before killing the buffer.
127 (set-process-buffer proc nil)
128 proc)
125 (kill-buffer buf))))))) 129 (kill-buffer buf)))))))
126 130
127;; Building an HTTP request 131;; Building an HTTP request
@@ -1109,15 +1113,15 @@ CBARGS as the arguments."
1109;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 1113;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
1110;;; file-name-handler stuff from here on out 1114;;; file-name-handler stuff from here on out
1111;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 1115;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
1112(if (not (fboundp 'symbol-value-in-buffer)) 1116(defalias 'url-http-symbol-value-in-buffer
1113 (defun url-http-symbol-value-in-buffer (symbol buffer 1117 (if (fboundp 'symbol-value-in-buffer)
1114 &optional unbound-value) 1118 'symbol-value-in-buffer
1119 (lambda (symbol buffer &optional unbound-value)
1115 "Return the value of SYMBOL in BUFFER, or UNBOUND-VALUE if it is unbound." 1120 "Return the value of SYMBOL in BUFFER, or UNBOUND-VALUE if it is unbound."
1116 (with-current-buffer buffer 1121 (with-current-buffer buffer
1117 (if (not (boundp symbol)) 1122 (if (not (boundp symbol))
1118 unbound-value 1123 unbound-value
1119 (symbol-value symbol)))) 1124 (symbol-value symbol))))))
1120 (defalias 'url-http-symbol-value-in-buffer 'symbol-value-in-buffer))
1121 1125
1122(defun url-http-head (url) 1126(defun url-http-head (url)
1123 (let ((url-request-method "HEAD") 1127 (let ((url-request-method "HEAD")
diff --git a/lisp/wdired.el b/lisp/wdired.el
index 2471ab909c6..1363181524c 100644
--- a/lisp/wdired.el
+++ b/lisp/wdired.el
@@ -103,6 +103,7 @@
103 103
104(defvar dired-backup-overwrite) ; Only in Emacs 20.x this is a custom var 104(defvar dired-backup-overwrite) ; Only in Emacs 20.x this is a custom var
105 105
106(eval-when-compile (require 'cl))
106(require 'dired) 107(require 'dired)
107(autoload 'dired-do-create-files-regexp "dired-aux") 108(autoload 'dired-do-create-files-regexp "dired-aux")
108(autoload 'dired-call-process "dired-aux") 109(autoload 'dired-call-process "dired-aux")