aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaroly Lorentey2006-03-15 17:22:12 +0000
committerKaroly Lorentey2006-03-15 17:22:12 +0000
commitb336ee388ed5300440e7bab24bf9eec9f250911a (patch)
tree62c9058bd403d158d7d18d1cbd4ead3abf36a7aa
parent47f3c6b4dbed851762dca99273d78642c3794188 (diff)
parent4034b0e259dd59eda180bd0683876c9d0110f719 (diff)
downloademacs-b336ee388ed5300440e7bab24bf9eec9f250911a.tar.gz
emacs-b336ee388ed5300440e7bab24bf9eec9f250911a.zip
Merged from emacs@sv.gnu.org
Patches applied: * emacs@sv.gnu.org/emacs--devo--0--patch-153 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-154 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-155 Remove nick-abbrevs stuff from rcirc.el * emacs@sv.gnu.org/emacs--devo--0--patch-156 rcirc.el update from Ryan Yeske * emacs@sv.gnu.org/emacs--devo--0--patch-157 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-158 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-159 Update from CVS git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-532
-rw-r--r--etc/ChangeLog4
-rw-r--r--etc/DEBUG19
-rw-r--r--etc/orgcard.tex4
-rw-r--r--lisp/ChangeLog125
-rw-r--r--lisp/allout.el220
-rw-r--r--lisp/cus-start.el7
-rw-r--r--lisp/font-core.el28
-rw-r--r--lisp/font-lock.el17
-rw-r--r--lisp/ibuf-ext.el1
-rw-r--r--lisp/image.el52
-rw-r--r--lisp/jit-lock.el68
-rw-r--r--lisp/mh-e/ChangeLog23
-rw-r--r--lisp/mh-e/mh-compat.el51
-rw-r--r--lisp/mh-e/mh-e.el3
-rw-r--r--lisp/mh-e/mh-folder.el5
-rw-r--r--lisp/mh-e/mh-letter.el5
-rw-r--r--lisp/mh-e/mh-utils.el7
-rw-r--r--lisp/net/rcirc.el28
-rw-r--r--lisp/progmodes/gdb-ui.el217
-rw-r--r--lisp/progmodes/gud.el11
-rw-r--r--lisp/textmodes/org.el311
-rw-r--r--lisp/tree-widget.el155
-rw-r--r--lispref/ChangeLog18
-rw-r--r--lispref/display.texi44
-rw-r--r--lispref/modes.texi50
-rw-r--r--man/ChangeLog32
-rw-r--r--man/calendar.texi111
-rw-r--r--man/mh-e.texi1082
-rw-r--r--man/org.texi41
-rw-r--r--nt/ChangeLog9
-rw-r--r--nt/addpm.c24
-rw-r--r--nt/makefile.w32-in2
-rw-r--r--src/ChangeLog60
-rw-r--r--src/mac.c3
-rw-r--r--src/macfns.c1
-rw-r--r--src/macgui.h18
-rw-r--r--src/macterm.c230
-rw-r--r--src/macterm.h8
-rw-r--r--src/w32fns.c36
-rw-r--r--src/w32menu.c8
-rw-r--r--src/w32term.c18
-rw-r--r--src/xterm.c9
42 files changed, 2215 insertions, 950 deletions
diff --git a/etc/ChangeLog b/etc/ChangeLog
index eb85856cdb0..ae722f53ecb 100644
--- a/etc/ChangeLog
+++ b/etc/ChangeLog
@@ -1,3 +1,7 @@
12006-03-15 Nick Roberts <nickrob@snap.net.nz>
2
3 * DEBUG (Note): Describe features for debugging with GDB in Emacs.
4
12006-03-11 Miles Bader <miles@gnu.org> 52006-03-11 Miles Bader <miles@gnu.org>
2 6
3 * images/mail: New directory. 7 * images/mail: New directory.
diff --git a/etc/DEBUG b/etc/DEBUG
index 1695c6e7f07..5b4ccc0f964 100644
--- a/etc/DEBUG
+++ b/etc/DEBUG
@@ -245,6 +245,25 @@ and, assuming that "xtype" says that args[0] is a symbol:
245 245
246 xsymbol 246 xsymbol
247 247
248** Using GDB in Emacs
249
250Debugging with GDB in Emacs offers some advantages over the command line (See
251the GDB Graphical Interface node of the Emacs manual). There are also some
252features available just for debugging Emacs:
253
2541) The command gud-pp isavailable on the tool bar (the `pp' icon) and allows
255 the user to print the s-expression of the variable at point, in the GUD
256 buffer.
257
2582) Pressing `p' on a component of a watch expression that is a lisp object
259 in the speedbar prints its s-expression in the GUD buffer.
260
2613) The STOP button on the tool bar is adjusted so that it sends SIGTSTP
262 instead of the usual SIGINT.
263
2644) The command gud-pv has the global binding 'C-x C-a C-v' and prints the
265 value of the lisp variable at point.
266
248** Debugging what happens while preloading and dumping Emacs 267** Debugging what happens while preloading and dumping Emacs
249 268
250Type `gdb temacs' and start it with `r -batch -l loadup dump'. 269Type `gdb temacs' and start it with `r -batch -l loadup dump'.
diff --git a/etc/orgcard.tex b/etc/orgcard.tex
index 39508baf873..1f520df353d 100644
--- a/etc/orgcard.tex
+++ b/etc/orgcard.tex
@@ -1,4 +1,4 @@
1% Reference Card for Org Mode 4.08 1% Reference Card for Org Mode 4.09
2% 2%
3%**start of header 3%**start of header
4\newcount\columnsperpage 4\newcount\columnsperpage
@@ -58,7 +58,7 @@
58% Thanks to Paul Rubin, Bob Chassell, Len Tower, and Richard Mlynarik 58% Thanks to Paul Rubin, Bob Chassell, Len Tower, and Richard Mlynarik
59% for their many good ideas. 59% for their many good ideas.
60 60
61\def\orgversionnumber{4.08} 61\def\orgversionnumber{4.09}
62\def\year{2006} 62\def\year{2006}
63 63
64\def\shortcopyrightnotice{\vskip 1ex plus 2 fill 64\def\shortcopyrightnotice{\vskip 1ex plus 2 fill
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 50aa28d3b4a..f58a240c3ec 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,128 @@
12006-03-14 Ken Manheimer <ken.manheimer@gmail.com>
2
3 * allout.el: Increment version to 2.2.1 in file commentary.
4
5 (allout-version): Increment to 2.2.1.
6
7 (allout-default-layout): New customization variable, used when the
8 file lacks a specific allout-layout. Uses allout-layout-type for
9 recursively nested definition.
10
11 (allout-layout-type): Widget defining allout layouts, necessary for
12 self-recursive definition.
13
14 (allout-mode): Incorporate allout-default-layout as fallback for
15 allout-layout.
16
17 (allout-layout): Mark as 'safe-local-variable', and refer mention
18 fallback to `allout-default-layout' in absence of a specified value.
19 (allout-passphrase-verifier-string)
20 (allout-passphrase-hint-string): Mark as 'safe-local-variable'.
21
22 (allout-file-passphrase-verifier-string): Obsolete variable, removed.
23
24 (allout-get-encryption-passphrase-verifier): Use correct name of
25 passphrase verifier in docstring.
26
272006-03-15 Nick Roberts <nickrob@snap.net.nz>
28
29 * progmodes/gdb-ui.el (gdb-var-list): Change order of first two
30 elements.
31 (gdb-find-watch-expression): Make it work for arrays too. Follow
32 change to gdb-var-list.
33 (gud-watch): Allow the user to enter variable name with a prexix
34 arg. Create keybindings.
35 (gdb-var-create-handler, gdb-var-evaluate-expression-handler)
36 (gdb-var-list-children-handler, gdb-var-update-handler)
37 (gdb-var-delete, gdb-edit-value, gdb-speedbar-expand-node)
38 (gdb-var-list-children-handler-1, gdb-var-update-handler-1):
39 Follow change to gdb-var-list.
40 (gdb-starting): Don't show the overlay arrows when program is
41 running.
42
43 * progmodes/gud.el (gud-speedbar-buttons): Follow change to
44 gdb-var-list.
45
462006-03-14 Bill Wohler <wohler@newt.com>
47
48 * image.el (image-load-path-for-library): Pass value of path
49 rather than symbol. Always return list of directories. Guarantee
50 that image directory comes first.
51
522006-03-14 Alan Mackenzie <acm@muc.de>
53
54 * font-core.el: New function/variable
55 font-lock-extend-region\(-function\)?.
56
57 * font-lock.el (font-lock-after-change-function): Call
58 font-lock-extend-region. Obey font-lock-lines-before.
59 (font-lock-default-fontify-region): Remove reference to
60 font-lock-lines-before.
61
62 * jit-lock.el (jit-lock-after-change): Call
63 font-lock-extend-region. Obey font-lock-lines-before.
64
652006-03-14 David Ponce <david@dponce.com>
66
67 * tree-widget.el (tree-widget-themes-load-path)
68 (tree-widget-themes-directory, tree-widget-theme): Doc fix.
69
702006-03-13 Ryan Yeske <rcyeske@gmail.com>
71
72 * net/rcirc.el (rcirc) <defgroup>: Add link to manual.
73 (rcirc-print): Mark the start of text at the end of the prompt.
74 (rcirc-track-minor-mode): Add autoload cookie.
75 (rcirc-update-activity-string): Add space to front of mode-line
76 indicator.
77
782006-03-13 Miles Bader <miles@gnu.org>
79
80 * net/rcirc.el (rcirc-nick-abbrevs): Remove variable.
81 (rcirc-abbrev-nick): Remove function.
82 (rcirc-format-response-string): Don't call `rcirc-abbrev-nick'.
83
842006-03-13 David Ponce <david@dponce.com>
85
86 * tree-widget.el: Handle themes across all occurrences of the main
87 themes sub-directory found in tree-widget-themes-load-path.
88 (tree-widget-themes-directory, tree-widget-theme): Doc fix.
89 (tree-widget--locate-sub-directory): Return all occurrences.
90 (tree-widget-themes-path): New function. Replace
91 tree-widget-themes-directory, and return a list of directories.
92 (tree-widget-set-parent-theme)
93 (tree-widget-lookup-image): Use it.
94
952006-03-13 Carsten Dominik <dominik@science.uva.nl>
96
97 * textmodes/org.el: (org-link-search): Avoid self-matching of
98 links, allow target text to be distributed over several lines.
99 (org-search-not-link): New function.
100 (org-set-regexps-and-options, org-get-current-options): New
101 startup options.
102 (org-export-as-html): Take odd-level setting from local variable.
103 (org-fontify-emphasized-text): New option.
104 (org-set-font-lock-defaults): Include emphasized text.
105 (org-follow-mhe-link): Allow folder-only links, fix folder name.
106 (org-font-lock): Customize group renamed from `org-faces'.
107
1082006-03-13 John Paul Wallington <jpw@pobox.com>
109
110 * ibuf-ext.el (ibuffer-never-show-predicates): Add `require'
111 keyword; require `ibuf-ext' feature. Thanks to Zhang Wei.
112
1132006-03-12 Luc Teirlinck <teirllm@auburn.edu>
114
115 * cus-start.el (all): Delete :version keyword for members of the
116 fringe group, since the entire group is new in 22.1.
117
1182006-03-13 Nick Roberts <nickrob@snap.net.nz>
119
120 * progmodes/gdb-ui.el (gdb-stack-list-locals-handler): Add local
121 map if value is hexadecimal (an address).
122 (gud-watch): Only search roots for existing watch expressions.
123 (gdb-speedbar-refresh): Bind speedbar-shown-directories to nil to
124 prevent caching problems with speedbar-update-directory-contents.
125
12006-03-12 Juri Linkov <juri@jurta.org> 1262006-03-12 Juri Linkov <juri@jurta.org>
2 127
3 * battery.el (battery-linux-proc-acpi): Check `capacity' for non-nil 128 * battery.el (battery-linux-proc-acpi): Check `capacity' for non-nil
diff --git a/lisp/allout.el b/lisp/allout.el
index 6690456123e..31ed3a791ea 100644
--- a/lisp/allout.el
+++ b/lisp/allout.el
@@ -6,7 +6,7 @@
6;; Author: Ken Manheimer <ken dot manheimer at gmail dot com> 6;; Author: Ken Manheimer <ken dot manheimer at gmail dot com>
7;; Maintainer: Ken Manheimer <ken dot manheimer at gmail dot com> 7;; Maintainer: Ken Manheimer <ken dot manheimer at gmail dot com>
8;; Created: Dec 1991 - first release to usenet 8;; Created: Dec 1991 - first release to usenet
9;; Version: 2.2 9;; Version: 2.2.1
10;; Keywords: outlines wp languages 10;; Keywords: outlines wp languages
11 11
12;; This file is part of GNU Emacs. 12;; This file is part of GNU Emacs.
@@ -126,38 +126,72 @@ this variable."
126 (const :tag "Mode only" "activate") 126 (const :tag "Mode only" "activate")
127 (const :tag "Off" nil)) 127 (const :tag "Off" nil))
128 :group 'allout) 128 :group 'allout)
129;;;_ = allout-layout 129;;;_ = allout-default-layout
130(defvar allout-layout nil 130(defcustom allout-default-layout '(-2 : 0)
131 "*Layout specification and provisional mode trigger for allout outlines. 131 "*Default allout outline layout specification.
132
133This setting specifies the outline exposure to use when
134`allout-layout' has the local value `t'. This docstring describes the
135layout specifications.
136
137A list value specifies a default layout for the current buffer,
138to be applied upon activation of `allout-mode'. Any non-nil
139value will automatically trigger `allout-mode', provided
140`allout-init' has been called to enable this behavior.
141
142The types of elements in the layout specification are:
143
144 integer - dictate the relative depth to open the corresponding topic(s),
145 where:
146 - negative numbers force the topic to be closed before opening
147 to the absolute value of the number, so all siblings are open
148 only to that level.
149 - positive numbers open to the relative depth indicated by the
150 number, but do not force already opened subtopics to be closed.
151 - 0 means to close topic - hide all subitems.
152 : - repeat spec - apply the preceeding element to all siblings at
153 current level, *up to* those siblings that would be covered by specs
154 following the `:' on the list. Ie, apply to all topics at level but
155 trailing ones accounted for by trailing specs. \(Only the first of
156 multiple colons at the same level is honored - later ones are ignored.)
157 * - completely exposes the topic, including bodies
158 + - exposes all subtopics, but not the bodies
159 - - exposes the body of the corresponding topic, but not subtopics
160 list - a nested layout spec, to be applied intricately to its
161 corresponding item(s)
132 162
133Buffer-specific. 163Examples:
134 164 '(-2 : 0)
135A list value specifies a default layout for the current buffer, to be 165 Collapse the top-level topics to show their children and
136applied upon activation of `allout-mode'. Any non-nil value will 166 grandchildren, but completely collapse the final top-level topic.
137automatically trigger `allout-mode' \(provided `allout-init' has been called 167 '(-1 () : 1 0)
138to enable this behavior). 168 Close the first topic so only the immediate subtopics are shown,
139 169 leave the subsequent topics exposed as they are until the second
140See the docstring for `allout-init' for details on setting up for 170 second to last topic, which is exposed at least one level, and
141auto-mode-activation, and for `allout-expose-topic' for the format of 171 completely close the last topic.
142the layout specification. 172 '(-2 : -1 *)
143 173 Expose children and grandchildren of all topics at current
144You can associate a particular outline layout with a file by setting 174 level except the last two; expose children of the second to
145this var via the file's local variables. For example, the following 175 last and completely expose the last one, including its subtopics.
146lines at the bottom of an Emacs Lisp file:
147
148;;;Local variables:
149;;;allout-layout: \(0 : -1 -1 0)
150;;;End:
151 176
152will, modulo the above-mentioned conditions, cause the mode to be 177See `allout-expose-topic' for more about the exposure process.
153activated when the file is visited, followed by the equivalent of
154`\(allout-expose-topic 0 : -1 -1 0)'. \(This is the layout used for
155the allout.el source file.)
156 178
157Also, allout's mode-specific provisions will make topic prefixes default 179Also, allout's mode-specific provisions will make topic prefixes default
158to the comment-start string, if any, of the language of the file. This 180to the comment-start string, if any, of the language of the file. This
159is modulo the setting of `allout-use-mode-specific-leader', which see.") 181is modulo the setting of `allout-use-mode-specific-leader', which see."
160(make-variable-buffer-local 'allout-layout) 182 :type 'allout-layout-type
183 :group 'allout)
184;;;_ : allout-layout-type
185(define-widget 'allout-layout-type 'lazy
186 "Allout layout format customization basic building blocks."
187 :type '(repeat
188 (choice (integer :tag "integer (<= zero is strict)")
189 (const :tag ": (repeat prior)" :)
190 (const :tag "* (completely expose)" *)
191 (const :tag "+ (expose all offspring, headlines only)" +)
192 (const :tag "- (expose topic body but not offspring)" -)
193 (allout-layout-type :tag "<Nested layout>"))))
194
161;;;_ = allout-show-bodies 195;;;_ = allout-show-bodies
162(defcustom allout-show-bodies nil 196(defcustom allout-show-bodies nil
163 "*If non-nil, show entire body when exposing a topic, rather than 197 "*If non-nil, show entire body when exposing a topic, rather than
@@ -590,7 +624,7 @@ For details, see `allout-toggle-current-subtree-encryption's docstring."
590;;;_ #1 Internal Outline Formatting and Configuration 624;;;_ #1 Internal Outline Formatting and Configuration
591;;;_ : Version 625;;;_ : Version
592;;;_ = allout-version 626;;;_ = allout-version
593(defvar allout-version "2.2" 627(defvar allout-version "2.2.1"
594 "Version of currently loaded outline package. \(allout.el)") 628 "Version of currently loaded outline package. \(allout.el)")
595;;;_ > allout-version 629;;;_ > allout-version
596(defun allout-version (&optional here) 630(defun allout-version (&optional here)
@@ -604,6 +638,36 @@ For details, see `allout-toggle-current-subtree-encryption's docstring."
604;;;_ = allout-mode 638;;;_ = allout-mode
605(defvar allout-mode nil "Allout outline mode minor-mode flag.") 639(defvar allout-mode nil "Allout outline mode minor-mode flag.")
606(make-variable-buffer-local 'allout-mode) 640(make-variable-buffer-local 'allout-mode)
641;;;_ = allout-layout nil
642(defvar allout-layout nil ; LEAVE GLOBAL VALUE NIL - see docstring.
643 "Buffer-specific setting for allout layout.
644
645In buffers where this is non-nil \(and if `allout-init' has been run, to
646enable this behavior), `allout-mode' will be automatically activated. The
647layout dictated by the value will be used to set the initial exposure when
648`allout-mode' is activated.
649
650\*You should not setq-default this variable non-nil unless you want every
651visited file to be treated as an allout file.*
652
653The value would typically be set by a file local variable. For
654example, the following lines at the bottom of an Emacs Lisp file:
655
656;;;Local variables:
657;;;allout-layout: \(0 : -1 -1 0)
658;;;End:
659
660dictate activation of `allout-mode' mode when the file is visited
661\(presuming allout-init was already run), followed by the
662equivalent of `\(allout-expose-topic 0 : -1 -1 0)'. \(This is
663the layout used for the allout.el source file.)
664
665`allout-default-layout' describes the specification format.
666`allout-layout' can additionally have the value `t', in which
667case the value of `allout-default-layout' is used.")
668(make-variable-buffer-local 'allout-layout)
669(put 'allout-layout 'safe-local-variable t)
670
607;;;_ : Topic header format 671;;;_ : Topic header format
608;;;_ = allout-regexp 672;;;_ = allout-regexp
609(defvar allout-regexp "" 673(defvar allout-regexp ""
@@ -973,11 +1037,6 @@ wrapped within allout's automatic fill-prefix setting.")
973 "Horrible hack used to prevent invalid multiple triggering of outline 1037 "Horrible hack used to prevent invalid multiple triggering of outline
974mode from prop-line file-var activation. Used by `allout-mode' function 1038mode from prop-line file-var activation. Used by `allout-mode' function
975to track repeats.") 1039to track repeats.")
976;;;_ = allout-file-passphrase-verifier-string
977(defvar allout-file-passphrase-verifier-string nil
978 "Name for use as a file variable for verifying encryption passphrase
979across sessions.")
980(make-variable-buffer-local 'allout-file-passphrase-verifier-string)
981;;;_ = allout-passphrase-verifier-string 1040;;;_ = allout-passphrase-verifier-string
982(defvar allout-passphrase-verifier-string nil 1041(defvar allout-passphrase-verifier-string nil
983 "Setting used to test solicited encryption passphrases against the one 1042 "Setting used to test solicited encryption passphrases against the one
@@ -993,6 +1052,7 @@ The verifier string is retained as an Emacs file variable, as well as in
993the emacs buffer state, if file variable adjustments are enabled. See 1052the emacs buffer state, if file variable adjustments are enabled. See
994`allout-enable-file-variable-adjustment' for details about that.") 1053`allout-enable-file-variable-adjustment' for details about that.")
995(make-variable-buffer-local 'allout-passphrase-verifier-string) 1054(make-variable-buffer-local 'allout-passphrase-verifier-string)
1055(put 'allout-passphrase-verifier-string 'safe-local-variable t)
996;;;_ = allout-passphrase-hint-string 1056;;;_ = allout-passphrase-hint-string
997(defvar allout-passphrase-hint-string "" 1057(defvar allout-passphrase-hint-string ""
998 "Variable used to retain reminder string for file's encryption passphrase. 1058 "Variable used to retain reminder string for file's encryption passphrase.
@@ -1004,6 +1064,7 @@ The hint is retained as an Emacs file variable, as well as in the emacs buffer
1004state, if file variable adjustments are enabled. See 1064state, if file variable adjustments are enabled. See
1005`allout-enable-file-variable-adjustment' for details about that.") 1065`allout-enable-file-variable-adjustment' for details about that.")
1006(make-variable-buffer-local 'allout-passphrase-hint-string) 1066(make-variable-buffer-local 'allout-passphrase-hint-string)
1067(put 'allout-passphrase-hint-string 'safe-local-variable t)
1007(setq-default allout-passphrase-hint-string "") 1068(setq-default allout-passphrase-hint-string "")
1008;;;_ = allout-after-save-decrypt 1069;;;_ = allout-after-save-decrypt
1009(defvar allout-after-save-decrypt nil 1070(defvar allout-after-save-decrypt nil
@@ -1578,30 +1639,33 @@ OPEN: A topic that is not closed, though its offspring or body may be."
1578 (allout-infer-body-reindent)) 1639 (allout-infer-body-reindent))
1579 ) ; cond 1640 ) ; cond
1580 1641
1581 (if (and do-layout 1642 (let ((use-layout (if (listp allout-layout)
1582 allout-auto-activation 1643 allout-layout
1583 (listp allout-layout) 1644 allout-default-layout)))
1584 (and (not (eq allout-auto-activation 'activate)) 1645 (if (and do-layout
1585 (if (eq allout-auto-activation 'ask) 1646 allout-auto-activation
1586 (if (y-or-n-p (format "Expose %s with layout '%s'? " 1647 use-layout
1587 (buffer-name) 1648 (and (not (eq allout-auto-activation 'activate))
1588 allout-layout)) 1649 (if (eq allout-auto-activation 'ask)
1589 t 1650 (if (y-or-n-p (format "Expose %s with layout '%s'? "
1590 (message "Skipped %s layout." (buffer-name)) 1651 (buffer-name)
1591 nil) 1652 use-layout))
1592 t))) 1653 t
1593 (save-excursion 1654 (message "Skipped %s layout." (buffer-name))
1594 (message "Adjusting '%s' exposure..." (buffer-name)) 1655 nil)
1595 (goto-char 0) 1656 t)))
1596 (allout-this-or-next-heading) 1657 (save-excursion
1597 (condition-case err 1658 (message "Adjusting '%s' exposure..." (buffer-name))
1598 (progn 1659 (goto-char 0)
1599 (apply 'allout-expose-topic (list allout-layout)) 1660 (allout-this-or-next-heading)
1600 (message "Adjusting '%s' exposure... done." (buffer-name))) 1661 (condition-case err
1601 ;; Problem applying exposure - notify user, but don't 1662 (progn
1602 ;; interrupt, eg, file visit: 1663 (apply 'allout-expose-topic (list use-layout))
1603 (error (message "%s" (car (cdr err))) 1664 (message "Adjusting '%s' exposure... done." (buffer-name)))
1604 (sit-for 1))))) 1665 ;; Problem applying exposure - notify user, but don't
1666 ;; interrupt, eg, file visit:
1667 (error (message "%s" (car (cdr err)))
1668 (sit-for 1))))))
1605 allout-mode 1669 allout-mode
1606 ) ; let* 1670 ) ; let*
1607 ) ; defun 1671 ) ; defun
@@ -1660,7 +1724,7 @@ internal functions use this feature cohesively bunch changes."
1660 (if (not 1724 (if (not
1661 (yes-or-no-p 1725 (yes-or-no-p
1662 (substitute-command-keys 1726 (substitute-command-keys
1663 (concat "Modify this concealed text? (\"no\" aborts," 1727 (concat "Modify concealed text? (\"no\" just aborts,"
1664 " \\[keyboard-quit] also reconceals) ")))) 1728 " \\[keyboard-quit] also reconceals) "))))
1665 (progn (goto-char start) 1729 (progn (goto-char start)
1666 (error "Concealed-text change refused."))) 1730 (error "Concealed-text change refused.")))
@@ -1676,7 +1740,7 @@ See allout-overlay-interior-modification-handler for details.
1676 1740
1677This before-change handler is used only where modification-hooks 1741This before-change handler is used only where modification-hooks
1678overlay property is not supported." 1742overlay property is not supported."
1679 (if (not allout-mode) 1743 (if (not (allout-mode-p))
1680 nil 1744 nil
1681 (allout-overlay-interior-modification-handler nil nil beg end nil))) 1745 (allout-overlay-interior-modification-handler nil nil beg end nil)))
1682;;;_ > allout-isearch-end-handler (&optional overlay) 1746;;;_ > allout-isearch-end-handler (&optional overlay)
@@ -2561,7 +2625,6 @@ command/keystrokes to relocate the cursor off of a bullet character to
2561return to regular interpretation of self-insert characters." 2625return to regular interpretation of self-insert characters."
2562 2626
2563 (if (not (allout-mode-p)) 2627 (if (not (allout-mode-p))
2564 ;; Shouldn't be invoked if not in allout-mode, but just in case:
2565 nil 2628 nil
2566 ;; Hot-spot navigation provisions: 2629 ;; Hot-spot navigation provisions:
2567 (if (and (eq this-command 'self-insert-command) 2630 (if (and (eq this-command 'self-insert-command)
@@ -2595,7 +2658,7 @@ return to regular interpretation of self-insert characters."
2595 this-command mapped-binding))))))) 2658 this-command mapped-binding)))))))
2596;;;_ > allout-find-file-hook () 2659;;;_ > allout-find-file-hook ()
2597(defun allout-find-file-hook () 2660(defun allout-find-file-hook ()
2598 "Activate `allout-mode' when `allout-auto-activation', `allout-layout' non-nil. 2661 "Activate `allout-mode' on non-nil `allout-auto-activation', `allout-layout'.
2599 2662
2600See `allout-init' for setup instructions." 2663See `allout-init' for setup instructions."
2601 (if (and allout-auto-activation 2664 (if (and allout-auto-activation
@@ -3415,7 +3478,7 @@ depth, however."
3415 (if (or (not (allout-mode-p)) 3478 (if (or (not (allout-mode-p))
3416 (not (bolp)) 3479 (not (bolp))
3417 (not (looking-at allout-regexp))) 3480 (not (looking-at allout-regexp)))
3418 ;; Above conditions do not obtain - just do a regular kill: 3481 ;; Just do a regular kill:
3419 (kill-line arg) 3482 (kill-line arg)
3420 ;; Ah, have to watch out for adjustments: 3483 ;; Ah, have to watch out for adjustments:
3421 (let* ((beg (point)) 3484 (let* ((beg (point))
@@ -3889,7 +3952,7 @@ If optional INCLUDE-SINGLE-LINERS is true, then include single-line
3889topics \(which intrinsically can be considered both collapsed and 3952topics \(which intrinsically can be considered both collapsed and
3890not\), as collapsed. Otherwise they are considered uncollapsed." 3953not\), as collapsed. Otherwise they are considered uncollapsed."
3891 (save-excursion 3954 (save-excursion
3892 (and 3955 (and
3893 (= (progn (allout-back-to-current-heading) 3956 (= (progn (allout-back-to-current-heading)
3894 (move-end-of-line 1) 3957 (move-end-of-line 1)
3895 (point)) 3958 (point))
@@ -5068,7 +5131,7 @@ Returns the resulting string, or nil if the transformation fails."
5068 ) 5131 )
5069;;;_ > allout-obtain-passphrase (for-key cache-id prompt-id key-type 5132;;;_ > allout-obtain-passphrase (for-key cache-id prompt-id key-type
5070;;; allout-buffer retried fetch-pass) 5133;;; allout-buffer retried fetch-pass)
5071(defun allout-obtain-passphrase (for-key cache-id prompt-id key-type 5134(defun allout-obtain-passphrase (for-key cache-id prompt-id key-type
5072 allout-buffer retried fetch-pass) 5135 allout-buffer retried fetch-pass)
5073 "Obtain passphrase for a key from the cache or else from the user. 5136 "Obtain passphrase for a key from the cache or else from the user.
5074 5137
@@ -5242,7 +5305,7 @@ An error is raised if the text is not encrypted."
5242 nil nil 0 passphrase)) 5305 nil nil 0 passphrase))
5243 ) 5306 )
5244;;;_ > allout-update-passphrase-mnemonic-aids (for-key passphrase 5307;;;_ > allout-update-passphrase-mnemonic-aids (for-key passphrase
5245;;; outline-buffer) 5308;;; outline-buffer)
5246(defun allout-update-passphrase-mnemonic-aids (for-key passphrase 5309(defun allout-update-passphrase-mnemonic-aids (for-key passphrase
5247 outline-buffer) 5310 outline-buffer)
5248 "Update passphrase verifier and hint strings if necessary. 5311 "Update passphrase verifier and hint strings if necessary.
@@ -5298,7 +5361,7 @@ are preserved on Emacs local file variables,
5298(defun allout-get-encryption-passphrase-verifier () 5361(defun allout-get-encryption-passphrase-verifier ()
5299 "Return text of the encrypt passphrase verifier, unmassaged, or nil if none. 5362 "Return text of the encrypt passphrase verifier, unmassaged, or nil if none.
5300 5363
5301Derived from value of `allout-file-passphrase-verifier-string'." 5364Derived from value of `allout-passphrase-verifier-string'."
5302 5365
5303 (let ((verifier-string (and (boundp 'allout-passphrase-verifier-string) 5366 (let ((verifier-string (and (boundp 'allout-passphrase-verifier-string)
5304 allout-passphrase-verifier-string))) 5367 allout-passphrase-verifier-string)))
@@ -5457,7 +5520,7 @@ setup for auto-startup."
5457 (insert (concat "Dummy outline topic header - see" 5520 (insert (concat "Dummy outline topic header - see"
5458 "`allout-mode' docstring: `^Hm'.")) 5521 "`allout-mode' docstring: `^Hm'."))
5459 (allout-adjust-file-variable 5522 (allout-adjust-file-variable
5460 "allout-layout" (format "%s" (or allout-layout '(-1 : 0))))))) 5523 "allout-layout" (or allout-layout '(-1 : 0))))))
5461;;;_ > allout-file-vars-section-data () 5524;;;_ > allout-file-vars-section-data ()
5462(defun allout-file-vars-section-data () 5525(defun allout-file-vars-section-data ()
5463 "Return data identifying the file-vars section, or nil if none. 5526 "Return data identifying the file-vars section, or nil if none.
@@ -5708,13 +5771,7 @@ which are part of the text that an image rests on.)
5708 5771
5709With argument ARG not nil or 1, move forward ARG - 1 lines first. 5772With argument ARG not nil or 1, move forward ARG - 1 lines first.
5710If point reaches the beginning or end of buffer, it stops there. 5773If point reaches the beginning or end of buffer, it stops there.
5711To ignore intangibility, bind `inhibit-point-motion-hooks' to t. 5774To ignore intangibility, bind `inhibit-point-motion-hooks' to t."
5712
5713This function does not move point across a field boundary unless that
5714would move point to a different line than the original, unconstrained
5715result. If N is nil or 1, and a front-sticky field starts at point,
5716the point does not move. To ignore field boundaries bind
5717`inhibit-field-text-motion' to t."
5718 (interactive "p") 5775 (interactive "p")
5719 (or arg (setq arg 1)) 5776 (or arg (setq arg 1))
5720 (if (/= arg 1) 5777 (if (/= arg 1)
@@ -5730,7 +5787,7 @@ the point does not move. To ignore field boundaries bind
5730 (skip-chars-backward "^\n")) 5787 (skip-chars-backward "^\n"))
5731 (vertical-motion 0) 5788 (vertical-motion 0)
5732 (if (/= orig (point)) 5789 (if (/= orig (point))
5733 (goto-char (constrain-to-field (point) orig (/= arg 1) t nil))))) 5790 (goto-char orig))))
5734) 5791)
5735;;;_ > move-end-of-line if necessary - older emacs, xemacs 5792;;;_ > move-end-of-line if necessary - older emacs, xemacs
5736(if (not (fboundp 'move-end-of-line)) 5793(if (not (fboundp 'move-end-of-line))
@@ -5741,13 +5798,7 @@ which are part of the text that an image rests on.)
5741 5798
5742With argument ARG not nil or 1, move forward ARG - 1 lines first. 5799With argument ARG not nil or 1, move forward ARG - 1 lines first.
5743If point reaches the beginning or end of buffer, it stops there. 5800If point reaches the beginning or end of buffer, it stops there.
5744To ignore intangibility, bind `inhibit-point-motion-hooks' to t. 5801To ignore intangibility, bind `inhibit-point-motion-hooks' to t."
5745
5746This function does not move point across a field boundary unless that
5747would move point to a different line than the original, unconstrained
5748result. If N is nil or 1, and a rear-sticky field ends at point,
5749the point does not move. To ignore field boundaries bind
5750`inhibit-field-text-motion' to t."
5751 (interactive "p") 5802 (interactive "p")
5752 (or arg (setq arg 1)) 5803 (or arg (setq arg 1))
5753 (let ((orig (point)) 5804 (let ((orig (point))
@@ -5777,8 +5828,7 @@ the point does not move. To ignore field boundaries bind
5777 (setq arg 1) 5828 (setq arg 1)
5778 (setq done t))))) 5829 (setq done t)))))
5779 (if (/= orig (point)) 5830 (if (/= orig (point))
5780 (goto-char (constrain-to-field (point) orig (/= arg 1) t 5831 (goto-char orig))))
5781 nil)))))
5782 ) 5832 )
5783;;;_ > line-move-invisible-p if necessary 5833;;;_ > line-move-invisible-p if necessary
5784(if (not (fboundp 'line-move-invisible-p)) 5834(if (not (fboundp 'line-move-invisible-p))
diff --git a/lisp/cus-start.el b/lisp/cus-start.el
index 5b4686754f0..f15dc3f7a4c 100644
--- a/lisp/cus-start.el
+++ b/lisp/cus-start.el
@@ -52,7 +52,7 @@
52 (ctl-arrow display boolean) 52 (ctl-arrow display boolean)
53 (truncate-lines display boolean) 53 (truncate-lines display boolean)
54 (selective-display-ellipses display boolean) 54 (selective-display-ellipses display boolean)
55 (indicate-empty-lines fringe boolean "21.1") 55 (indicate-empty-lines fringe boolean)
56 (indicate-buffer-boundaries 56 (indicate-buffer-boundaries
57 fringe 57 fringe
58 (choice 58 (choice
@@ -91,8 +91,7 @@ Leaving \"Default\" unchecked is equivalent with specifying a default of
91 (const :tag "Do not show" (down . nil)) 91 (const :tag "Do not show" (down . nil))
92 (const :tag "On the left" (down . left)) 92 (const :tag "On the left" (down . left))
93 (const :tag "On the right" (down . right)))) 93 (const :tag "On the right" (down . right))))
94 (other :tag "On left, no arrows" t)) 94 (other :tag "On left, no arrows" t)))
95 "22.1")
96 (scroll-up-aggressively windows 95 (scroll-up-aggressively windows
97 (choice (const :tag "off" nil) number) 96 (choice (const :tag "off" nil) number)
98 "21.1") 97 "21.1")
@@ -174,7 +173,7 @@ Leaving \"Default\" unchecked is equivalent with specifying a default of
174 (const :tag "always shown" t) 173 (const :tag "always shown" t)
175 (other :tag "hidden by keypress" 1))) 174 (other :tag "hidden by keypress" 1)))
176 ;; fringe.c 175 ;; fringe.c
177 (overflow-newline-into-fringe fringe boolean "22.1") 176 (overflow-newline-into-fringe fringe boolean)
178 ;; indent.c 177 ;; indent.c
179 (indent-tabs-mode fill boolean) 178 (indent-tabs-mode fill boolean)
180 ;; keyboard.c 179 ;; keyboard.c
diff --git a/lisp/font-core.el b/lisp/font-core.el
index 85bbf60f0d9..d2cb8dccd10 100644
--- a/lisp/font-core.el
+++ b/lisp/font-core.el
@@ -83,6 +83,34 @@ where MAJOR-MODE is a symbol and FONT-LOCK-DEFAULTS is a list of default
83settings. See the variable `font-lock-defaults', which takes precedence.") 83settings. See the variable `font-lock-defaults', which takes precedence.")
84(make-obsolete-variable 'font-lock-defaults-alist 'font-lock-defaults) 84(make-obsolete-variable 'font-lock-defaults-alist 'font-lock-defaults)
85 85
86(defvar font-lock-extend-region-function nil
87 "A function that determines the region to fontify after a change.
88
89This buffer-local variable is either nil, or is a function that determines the
90region to fontify. It is usually set by the major mode. The currently active
91font-lock after-change function calls this function after each buffer change.
92
93The function is given three parameters, the standard BEG, END, and OLD-LEN
94from after-change-functions. It should return either a cons of the beginning
95and end buffer positions \(in that order) of the region to fontify, or nil
96\(which directs the caller to fontify a default region). This function need
97not preserve point or the match-data, but must preserve the current
98restriction. The region it returns may start or end in the middle of a
99line.")
100(make-variable-buffer-local 'font-lock-extend-region-function)
101
102(defun font-lock-extend-region (beg end old-len)
103 "Determine the region to fontify after a buffer change.
104
105BEG END and OLD-LEN are the standard parameters from after-change-functions.
106The return value is either nil \(which directs the caller to chose the region
107itself), or a cons of the beginning and end \(in that order) of the region.
108The region returned may start or end in the middle of a line."
109 (if font-lock-extend-region-function
110 (save-match-data
111 (save-excursion
112 (funcall font-lock-extend-region-function beg end old-len)))))
113
86(defvar font-lock-function 'font-lock-default-function 114(defvar font-lock-function 'font-lock-default-function
87 "A function which is called when `font-lock-mode' is toggled. 115 "A function which is called when `font-lock-mode' is toggled.
88It will be passed one argument, which is the current value of 116It will be passed one argument, which is the current value of
diff --git a/lisp/font-lock.el b/lisp/font-lock.el
index a2dd58d5c92..1b4e79a0c87 100644
--- a/lisp/font-lock.el
+++ b/lisp/font-lock.el
@@ -1039,7 +1039,7 @@ a very meaningful entity to highlight.")
1039 (when font-lock-syntax-table 1039 (when font-lock-syntax-table
1040 (set-syntax-table font-lock-syntax-table)) 1040 (set-syntax-table font-lock-syntax-table))
1041 (goto-char beg) 1041 (goto-char beg)
1042 (setq beg (line-beginning-position (- 1 font-lock-lines-before))) 1042 (setq beg (line-beginning-position))
1043 ;; check to see if we should expand the beg/end area for 1043 ;; check to see if we should expand the beg/end area for
1044 ;; proper multiline matches 1044 ;; proper multiline matches
1045 (when (and (> beg (point-min)) 1045 (when (and (> beg (point-min))
@@ -1090,13 +1090,18 @@ what properties to clear before refontifying a region.")
1090;; Called when any modification is made to buffer text. 1090;; Called when any modification is made to buffer text.
1091(defun font-lock-after-change-function (beg end old-len) 1091(defun font-lock-after-change-function (beg end old-len)
1092 (let ((inhibit-point-motion-hooks t) 1092 (let ((inhibit-point-motion-hooks t)
1093 (inhibit-quit t)) 1093 (inhibit-quit t)
1094 (region (font-lock-extend-region beg end old-len)))
1094 (save-excursion 1095 (save-excursion
1095 (save-match-data 1096 (save-match-data
1096 ;; Rescan between start of lines enclosing the region. 1097 (if region
1097 (font-lock-fontify-region 1098 ;; Fontify the region the major mode has specified.
1098 (progn (goto-char beg) (forward-line 0) (point)) 1099 (setq beg (car region) end (cdr region))
1099 (progn (goto-char end) (forward-line 1) (point))))))) 1100 ;; Fontify the whole lines which enclose the region.
1101 (setq beg (progn (goto-char beg)
1102 (forward-line (- font-lock-lines-before)))
1103 end (progn (goto-char end) (forward-line 1) (point))))
1104 (font-lock-fontify-region beg end)))))
1100 1105
1101(defun font-lock-fontify-block (&optional arg) 1106(defun font-lock-fontify-block (&optional arg)
1102 "Fontify some lines the way `font-lock-fontify-buffer' would. 1107 "Fontify some lines the way `font-lock-fontify-buffer' would.
diff --git a/lisp/ibuf-ext.el b/lisp/ibuf-ext.el
index e5820d066e2..183da83816d 100644
--- a/lisp/ibuf-ext.el
+++ b/lisp/ibuf-ext.el
@@ -74,6 +74,7 @@ If a regexp, then it will be matched against the buffer's name.
74If a function, it will be called with the buffer as an argument, and 74If a function, it will be called with the buffer as an argument, and
75should return non-nil if this buffer should not be shown." 75should return non-nil if this buffer should not be shown."
76 :type '(repeat (choice regexp function)) 76 :type '(repeat (choice regexp function))
77 :require 'ibuf-ext
77 :group 'ibuffer) 78 :group 'ibuffer)
78 79
79(defcustom ibuffer-always-show-predicates nil 80(defcustom ibuffer-always-show-predicates nil
diff --git a/lisp/image.el b/lisp/image.el
index 2d7aea6fa0c..6938dba05cb 100644
--- a/lisp/image.el
+++ b/lisp/image.el
@@ -77,30 +77,34 @@ value is used as a list of directories to search.")
77 (list (file-name-as-directory (expand-file-name "images" data-directory)) 77 (list (file-name-as-directory (expand-file-name "images" data-directory))
78 'data-directory 'load-path))) 78 'data-directory 'load-path)))
79 79
80
80(defun image-load-path-for-library (library image &optional path no-error) 81(defun image-load-path-for-library (library image &optional path no-error)
81 "Return a suitable search path for images relative to LIBRARY. 82 "Return a suitable search path for images relative to LIBRARY.
82 83
83Images for LIBRARY are searched for in \"../../etc/images\" and 84First it searches for IMAGE in a path suitable for LIBRARY, which
84\"../etc/images\" relative to the files in \"lisp/LIBRARY\" as 85includes \"../../etc/images\" and \"../etc/images\" relative to
85well as in `image-load-path' and `load-path'. 86the library file itself, followed by `image-load-path' and
87`load-path'.
86 88
87This function returns the value of `load-path' augmented with the 89Then this function returns a list of directories which contains
88directory containing IMAGE. If PATH is given, it is used instead 90first the directory in which IMAGE was found, followed by the
89of `load-path'. If PATH is t, just return the directory that 91value of `load-path'. If PATH is given, it is used instead of
90contains IMAGE. 92`load-path'.
91 93
92If NO-ERROR is non-nil, return nil if a suitable path can't be 94If NO-ERROR is non-nil and a suitable path can't be found, don't
93found rather than signaling an error. 95signal an error. Instead, return a list of directories as before,
96except that nil appears in place of the image directory.
94 97
95Here is an example that uses a common idiom to provide 98Here is an example that uses a common idiom to provide
96compatibility with versions of Emacs that lack the variable 99compatibility with versions of Emacs that lack the variable
97`image-load-path': 100`image-load-path':
98 101
99 (let ((load-path 102 ;; Avoid errors on Emacsen without `image-load-path'.
100 (image-load-path-for-library \"mh-e\" \"mh-logo.xpm\")) 103 (if (not (boundp 'image-load-path)) (defvar image-load-path nil))
101 (image-load-path 104
102 (image-load-path-for-library \"mh-e\" \"mh-logo.xpm\" 'image-load-path))) 105 (let* ((load-path (image-load-path-for-library \"mh-e\" \"mh-logo.xpm\"))
103 (mh-tool-bar-folder-buttons-init))" 106 (image-load-path (cons (car load-path) image-load-path)))
107 (mh-tool-bar-folder-buttons-init))"
104 (unless library (error "No library specified")) 108 (unless library (error "No library specified"))
105 (unless image (error "No image specified")) 109 (unless image (error "No image specified"))
106 (let ((image-directory)) 110 (let ((image-directory))
@@ -142,26 +146,14 @@ compatibility with versions of Emacs that lack the variable
142 dir (expand-file-name "../" dir))) 146 dir (expand-file-name "../" dir)))
143 (setq image-directory dir))))) 147 (setq image-directory dir)))))
144 (no-error 148 (no-error
145 ;; In this case we will return nil.
146 (message "Could not find image %s for library %s" image library)) 149 (message "Could not find image %s for library %s" image library))
147 (t 150 (t
148 (error "Could not find image %s for library %s" image library))) 151 (error "Could not find image %s for library %s" image library)))
149 152
150 ;; Return the directory, nil if no-error was non-nil and a 153 ;; Return an augmented `path' or `load-path'.
151 ;; suitable path could not be found, or an augmented 154 (nconc (list image-directory)
152 ;; `image-load-path' or `load-path'. 155 (delete image-directory (copy-sequence (or path load-path))))))
153 (cond ((or (null image-directory) 156
154 (eq path t))
155 image-directory)
156 ((and path (symbolp path))
157 (nconc (list image-directory)
158 (delete image-directory
159 (if (boundp path)
160 (copy-sequence (symbol-value path))
161 nil))))
162 (t
163 (nconc (list image-directory)
164 (delete image-directory (copy-sequence load-path)))))))
165 157
166(defun image-jpeg-p (data) 158(defun image-jpeg-p (data)
167 "Value is non-nil if DATA, a string, consists of JFIF image data. 159 "Value is non-nil if DATA, a string, consists of JFIF image data.
diff --git a/lisp/jit-lock.el b/lisp/jit-lock.el
index 09870310584..f82ead462f0 100644
--- a/lisp/jit-lock.el
+++ b/lisp/jit-lock.el
@@ -557,36 +557,44 @@ This function ensures that lines following the change will be refontified
557in case the syntax of those lines has changed. Refontification 557in case the syntax of those lines has changed. Refontification
558will take place when text is fontified stealthily." 558will take place when text is fontified stealthily."
559 (when (and jit-lock-mode (not memory-full)) 559 (when (and jit-lock-mode (not memory-full))
560 (save-excursion 560 (let ((region (font-lock-extend-region start end old-len)))
561 (with-buffer-prepared-for-jit-lock 561 (save-excursion
562 ;; It's important that the `fontified' property be set from the 562 (with-buffer-prepared-for-jit-lock
563 ;; beginning of the line, else font-lock will properly change the 563 ;; It's important that the `fontified' property be set from the
564 ;; text's face, but the display will have been done already and will 564 ;; beginning of the line, else font-lock will properly change the
565 ;; be inconsistent with the buffer's content. 565 ;; text's face, but the display will have been done already and will
566 (goto-char start) 566 ;; be inconsistent with the buffer's content.
567 (setq start (line-beginning-position)) 567 ;;
568 568 ;; FIXME!!! (Alan Mackenzie, 2006-03-14): If start isn't at a BOL,
569 ;; If we're in text that matches a multi-line font-lock pattern, 569 ;; expanding the region to BOL might mis-fontify, should the BOL not
570 ;; make sure the whole text will be redisplayed. 570 ;; be at a "safe" position.
571 ;; I'm not sure this is ever necessary and/or sufficient. -stef 571 (setq start (if region
572 (when (get-text-property start 'font-lock-multiline) 572 (car region)
573 (setq start (or (previous-single-property-change 573 (goto-char start)
574 start 'font-lock-multiline) 574 (line-beginning-position (- 1 font-lock-lines-before))))
575 (point-min)))) 575
576 576 ;; If we're in text that matches a multi-line font-lock pattern,
577 ;; Make sure we change at least one char (in case of deletions). 577 ;; make sure the whole text will be redisplayed.
578 (setq end (min (max end (1+ start)) (point-max))) 578 ;; I'm not sure this is ever necessary and/or sufficient. -stef
579 ;; Request refontification. 579 (when (get-text-property start 'font-lock-multiline)
580 (put-text-property start end 'fontified nil)) 580 (setq start (or (previous-single-property-change
581 ;; Mark the change for deferred contextual refontification. 581 start 'font-lock-multiline)
582 (when jit-lock-context-unfontify-pos 582 (point-min))))
583 (setq jit-lock-context-unfontify-pos 583
584 ;; Here we use `start' because nothing guarantees that the 584 (if region (setq end (cdr region)))
585 ;; text between start and end will be otherwise refontified: 585 ;; Make sure we change at least one char (in case of deletions).
586 ;; usually it will be refontified by virtue of being 586 (setq end (min (max end (1+ start)) (point-max)))
587 ;; displayed, but if it's outside of any displayed area in the 587 ;; Request refontification.
588 ;; buffer, only jit-lock-context-* will re-fontify it. 588 (put-text-property start end 'fontified nil))
589 (min jit-lock-context-unfontify-pos start)))))) 589 ;; Mark the change for deferred contextual refontification.
590 (when jit-lock-context-unfontify-pos
591 (setq jit-lock-context-unfontify-pos
592 ;; Here we use `start' because nothing guarantees that the
593 ;; text between start and end will be otherwise refontified:
594 ;; usually it will be refontified by virtue of being
595 ;; displayed, but if it's outside of any displayed area in the
596 ;; buffer, only jit-lock-context-* will re-fontify it.
597 (min jit-lock-context-unfontify-pos start)))))))
590 598
591(provide 'jit-lock) 599(provide 'jit-lock)
592 600
diff --git a/lisp/mh-e/ChangeLog b/lisp/mh-e/ChangeLog
index ffb73d5425d..ecdf207d252 100644
--- a/lisp/mh-e/ChangeLog
+++ b/lisp/mh-e/ChangeLog
@@ -1,3 +1,26 @@
12006-03-14 Bill Wohler <wohler@newt.com>
2
3 * mh-compat.el (mh-image-load-path-for-library): Incorporate
4 changes from image-load-path-for-library, which are:
5 (image-load-path-for-library): Pass value of path rather than
6 symbol. Always return list of directories. Guarantee that image
7 directory comes first.
8
9 * mh-e.el (image-load-path): Define on those Emacsen that lack it
10 to avoid compile and run-time errors.
11
12 * mh-folder.el (mh-folder-mode): Use new idiom for setting
13 image-load-path.
14
15 * mh-letter.el (mh-letter-mode): Ditto.
16
17 * mh-utils.el (mh-logo-display): Ditto.
18
192006-03-12 Bill Wohler <wohler@newt.com>
20
21 * mh-utils.el (mh-folder-list): Fix docstring (closes SF
22 #1448498).
23
12006-03-10 Bill Wohler <wohler@newt.com> 242006-03-10 Bill Wohler <wohler@newt.com>
2 25
3 * mh-compat.el (mh-replace-regexp-in-string): Pass the literal 26 * mh-compat.el (mh-replace-regexp-in-string): Pass the literal
diff --git a/lisp/mh-e/mh-compat.el b/lisp/mh-e/mh-compat.el
index d6bded8726e..50542d67f4e 100644
--- a/lisp/mh-e/mh-compat.el
+++ b/lisp/mh-e/mh-compat.el
@@ -119,30 +119,30 @@ introduced in Emacs 22."
119 image-load-path-for-library (library image &optional path no-error) 119 image-load-path-for-library (library image &optional path no-error)
120 "Return a suitable search path for images relative to LIBRARY. 120 "Return a suitable search path for images relative to LIBRARY.
121 121
122Images for LIBRARY are searched for in \"../../etc/images\" and 122First it searches for IMAGE in a path suitable for LIBRARY, which
123\"../etc/images\" relative to the files in \"lisp/LIBRARY\" as 123includes \"../../etc/images\" and \"../etc/images\" relative to
124well as in `image-load-path' and `load-path'. 124the library file itself, followed by `image-load-path' and
125`load-path'.
125 126
126This function returns the value of `load-path' augmented with the 127Then this function returns a list of directories which contains
127directory containing IMAGE. If PATH is given, it is used instead 128first the directory in which IMAGE was found, followed by the
128of `load-path'. If PATH is t, just return the directory that 129value of `load-path'. If PATH is given, it is used instead of
129contains IMAGE. 130`load-path'.
130 131
131If NO-ERROR is non-nil, return nil if a suitable path can't be 132If NO-ERROR is non-nil and a suitable path can't be found, don't
132found rather than signaling an error. 133signal an error. Instead, return a list of directories as before,
134except that nil appears in place of the image directory.
133 135
134Here is an example that uses a common idiom to provide 136Here is an example that uses a common idiom to provide
135compatibility with versions of Emacs that lack the variable 137compatibility with versions of Emacs that lack the variable
136`image-load-path': 138`image-load-path':
137 139
138 (let ((load-path 140 ;; Avoid errors on Emacsen without `image-load-path'.
139 (image-load-path-for-library \"mh-e\" \"mh-logo.xpm\")) 141 (if (not (boundp 'image-load-path)) (defvar image-load-path nil))
140 (image-load-path
141 (image-load-path-for-library \"mh-e\" \"mh-logo.xpm\" 'image-load-path)))
142 (mh-tool-bar-folder-buttons-init))
143 142
144This function is used by Emacs versions that don't have 143 (let* ((load-path (image-load-path-for-library \"mh-e\" \"mh-logo.xpm\"))
145`image-load-path-for-library'." 144 (image-load-path (cons (car load-path) image-load-path)))
145 (mh-tool-bar-folder-buttons-init))"
146 (unless library (error "No library specified")) 146 (unless library (error "No library specified"))
147 (unless image (error "No image specified")) 147 (unless image (error "No image specified"))
148 (let ((image-directory)) 148 (let ((image-directory))
@@ -184,26 +184,13 @@ This function is used by Emacs versions that don't have
184 dir (expand-file-name "../" dir))) 184 dir (expand-file-name "../" dir)))
185 (setq image-directory dir))))) 185 (setq image-directory dir)))))
186 (no-error 186 (no-error
187 ;; In this case we will return nil.
188 (message "Could not find image %s for library %s" image library)) 187 (message "Could not find image %s for library %s" image library))
189 (t 188 (t
190 (error "Could not find image %s for library %s" image library))) 189 (error "Could not find image %s for library %s" image library)))
191 190
192 ;; Return the directory, nil if no-error was non-nil and a 191 ;; Return an augmented `path' or `load-path'.
193 ;; suitable path could not be found, or an augmented 192 (nconc (list image-directory)
194 ;; `image-load-path' or `load-path'. 193 (delete image-directory (copy-sequence (or path load-path))))))
195 (cond ((or (null image-directory)
196 (eq path t))
197 image-directory)
198 ((and path (symbolp path))
199 (nconc (list image-directory)
200 (delete image-directory
201 (if (boundp path)
202 (copy-sequence (symbol-value path))
203 nil))))
204 (t
205 (nconc (list image-directory)
206 (delete image-directory (copy-sequence load-path)))))))
207 194
208(mh-defun-compat mh-image-search-load-path 195(mh-defun-compat mh-image-search-load-path
209 image-search-load-path (file &optional path) 196 image-search-load-path (file &optional path)
diff --git a/lisp/mh-e/mh-e.el b/lisp/mh-e/mh-e.el
index 0b8961470a7..2f29a678f13 100644
--- a/lisp/mh-e/mh-e.el
+++ b/lisp/mh-e/mh-e.el
@@ -325,6 +325,9 @@ Name of the Previous sequence.")
325 325
326;; Etc. (alphabetical) 326;; Etc. (alphabetical)
327 327
328;; Avoid errors on Emacsen without image-load-path.
329(if (not (boundp 'image-load-path)) (defvar image-load-path nil))
330
328(defvar mh-flists-present-flag nil 331(defvar mh-flists-present-flag nil
329 "Non-nil means that we have \"flists\".") 332 "Non-nil means that we have \"flists\".")
330 333
diff --git a/lisp/mh-e/mh-folder.el b/lisp/mh-e/mh-folder.el
index f8e37a93cf8..2c32d1433f1 100644
--- a/lisp/mh-e/mh-folder.el
+++ b/lisp/mh-e/mh-folder.el
@@ -591,9 +591,8 @@ 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 "mh-e" "mh-logo.xpm")) 594 (let* ((load-path (mh-image-load-path-for-library "mh-e" "mh-logo.xpm"))
595 (image-load-path (mh-image-load-path-for-library 595 (image-load-path (cons (car load-path) image-load-path)))
596 "mh-e" "mh-logo.xpm" 'image-load-path)))
597 (mh-tool-bar-folder-buttons-init) 596 (mh-tool-bar-folder-buttons-init)
598 (setq mh-folder-buttons-init-flag t))) 597 (setq mh-folder-buttons-init-flag t)))
599 (set (make-local-variable 'tool-bar-map) mh-folder-tool-bar-map)) 598 (set (make-local-variable 'tool-bar-map) mh-folder-tool-bar-map))
diff --git a/lisp/mh-e/mh-letter.el b/lisp/mh-e/mh-letter.el
index 9d28ee4ec95..a7290cf5ae9 100644
--- a/lisp/mh-e/mh-letter.el
+++ b/lisp/mh-e/mh-letter.el
@@ -313,9 +313,8 @@ 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 "mh-e" "mh-logo.xpm")) 316 (let* ((load-path (mh-image-load-path-for-library "mh-e" "mh-logo.xpm"))
317 (image-load-path (mh-image-load-path-for-library 317 (image-load-path (cons (car load-path) image-load-path)))
318 "mh-e" "mh-logo.xpm" 'image-load-path)))
319 (mh-tool-bar-letter-buttons-init) 318 (mh-tool-bar-letter-buttons-init)
320 (setq mh-letter-buttons-init-flag t))) 319 (setq mh-letter-buttons-init-flag t)))
321 (set (make-local-variable 'tool-bar-map) mh-letter-tool-bar-map)) 320 (set (make-local-variable 'tool-bar-map) mh-letter-tool-bar-map))
diff --git a/lisp/mh-e/mh-utils.el b/lisp/mh-e/mh-utils.el
index c45c214e9f0..44e15f3cb19 100644
--- a/lisp/mh-e/mh-utils.el
+++ b/lisp/mh-e/mh-utils.el
@@ -131,9 +131,8 @@ Ignores case when searching for OLD."
131(defun mh-logo-display () 131(defun mh-logo-display ()
132 "Modify mode line to display MH-E logo." 132 "Modify mode line to display MH-E logo."
133 (mh-do-in-gnu-emacs 133 (mh-do-in-gnu-emacs
134 (let ((load-path (mh-image-load-path-for-library "mh-e" "mh-logo.xpm")) 134 (let* ((load-path (mh-image-load-path-for-library "mh-e" "mh-logo.xpm"))
135 (image-load-path (mh-image-load-path-for-library 135 (image-load-path (cons (car load-path) image-load-path)))
136 "mh-e" "mh-logo.xpm" 'image-load-path)))
137 (add-text-properties 136 (add-text-properties
138 0 2 137 0 2
139 `(display ,(or mh-logo-cache 138 `(display ,(or mh-logo-cache
@@ -504,7 +503,7 @@ example, if your Mail directory only contains the folders +inbox,
504 (mh-folder-list nil) 503 (mh-folder-list nil)
505 => (\"inbox\" \"lists\" \"lists/mh-e\" \"outbox\") 504 => (\"inbox\" \"lists\" \"lists/mh-e\" \"outbox\")
506 (mh-folder-list \"+lists\") 505 (mh-folder-list \"+lists\")
507 => (\"lists/mh-e\") 506 => (\"lists\" \"lists/mh-e\")
508 507
509Respects the value of `mh-recursive-folders-flag'. If this flag 508Respects the value of `mh-recursive-folders-flag'. If this flag
510is nil, and the sub-folders have not been explicitly viewed, then 509is nil, and the sub-folders have not been explicitly viewed, then
diff --git a/lisp/net/rcirc.el b/lisp/net/rcirc.el
index f5cf1ecb7e0..19fc89f4293 100644
--- a/lisp/net/rcirc.el
+++ b/lisp/net/rcirc.el
@@ -50,6 +50,7 @@
50 "Simple IRC client." 50 "Simple IRC client."
51 :version "22.1" 51 :version "22.1"
52 :prefix "rcirc-" 52 :prefix "rcirc-"
53 :link '(custom-manual "(rcirc)")
53 :group 'applications) 54 :group 'applications)
54 55
55(defcustom rcirc-server "irc.freenode.net" 56(defcustom rcirc-server "irc.freenode.net"
@@ -195,12 +196,6 @@ Use /ignore to list them, use /ignore NICK to add or remove a nick."
195 :type '(repeat string) 196 :type '(repeat string)
196 :group 'rcirc) 197 :group 'rcirc)
197 198
198(defcustom rcirc-nick-abbrevs nil
199 "List of short replacements for printing nicks."
200 :type '(alist :key-type (string :tag "Nick")
201 :value-type (string :tag "Abbrev"))
202 :group 'rcirc)
203
204(defvar rcirc-ignore-list-automatic () 199(defvar rcirc-ignore-list-automatic ()
205 "List of ignored nicks added to `rcirc-ignore-list' because of renaming. 200 "List of ignored nicks added to `rcirc-ignore-list' because of renaming.
206When an ignored person renames, their nick is added to both lists. 201When an ignored person renames, their nick is added to both lists.
@@ -493,11 +488,6 @@ Function is called with PROCESS, COMMAND, SENDER, ARGS and LINE.")
493 (with-rcirc-process-buffer process 488 (with-rcirc-process-buffer process
494 rcirc-nick)) 489 rcirc-nick))
495 490
496(defun rcirc-abbrev-nick (nick)
497 "If NICK has an entry in `rcirc-nick-abbrevs', return its abbreviation,
498otherwise return NICK."
499 (or (cdr (assoc nick rcirc-nick-abbrevs)) nick))
500
501(defvar rcirc-max-message-length 450 491(defvar rcirc-max-message-length 450
502 "Messages longer than this value will be split.") 492 "Messages longer than this value will be split.")
503 493
@@ -883,7 +873,7 @@ Create the buffer if it doesn't exist."
883(defun rcirc-multiline-edit-submit () 873(defun rcirc-multiline-edit-submit ()
884 "Send the text in buffer back to parent buffer." 874 "Send the text in buffer back to parent buffer."
885 (interactive) 875 (interactive)
886 (assert (and (eq major-mode 'rcirc-multiline-edit-mode))) 876 (assert (eq major-mode 'rcirc-multiline-edit-mode))
887 (assert rcirc-parent-buffer) 877 (assert rcirc-parent-buffer)
888 (untabify (point-min) (point-max)) 878 (untabify (point-min) (point-max))
889 (let ((text (buffer-substring (point-min) (point-max))) 879 (let ((text (buffer-substring (point-min) (point-max)))
@@ -899,7 +889,7 @@ Create the buffer if it doesn't exist."
899(defun rcirc-multiline-edit-cancel () 889(defun rcirc-multiline-edit-cancel ()
900 "Cancel the multiline edit." 890 "Cancel the multiline edit."
901 (interactive) 891 (interactive)
902 (assert (and (eq major-mode 'rcirc-multiline-edit-mode))) 892 (assert (eq major-mode 'rcirc-multiline-edit-mode))
903 (kill-buffer (current-buffer)) 893 (kill-buffer (current-buffer))
904 (set-window-configuration rcirc-window-configuration)) 894 (set-window-configuration rcirc-window-configuration))
905 895
@@ -975,7 +965,7 @@ is found by looking up RESPONSE in `rcirc-response-formats'."
975 process rcirc-server) 965 process rcirc-server)
976 sender) 966 sender)
977 "" 967 ""
978 (rcirc-abbrev-nick sender)) 968 sender)
979 (and target (concat "," target))))) 969 (and target (concat "," target)))))
980 (rcirc-facify nick 970 (rcirc-facify nick
981 (if (eq key ?n) 971 (if (eq key ?n)
@@ -1088,7 +1078,7 @@ record activity."
1088 (set-marker text-start 1078 (set-marker text-start
1089 (or (next-single-property-change fill-start 1079 (or (next-single-property-change fill-start
1090 'rcirc-text) 1080 'rcirc-text)
1091 (point-max))) 1081 rcirc-prompt-end-marker))
1092 ;; squeeze spaces out of text before rcirc-text 1082 ;; squeeze spaces out of text before rcirc-text
1093 (fill-region fill-start (1- text-start)) 1083 (fill-region fill-start (1- text-start))
1094 1084
@@ -1253,9 +1243,7 @@ if NICK is also on `rcirc-ignore-list-automatic'."
1253(define-key rcirc-track-minor-mode-map (kbd "C-c C-@") 'rcirc-next-active-buffer) 1243(define-key rcirc-track-minor-mode-map (kbd "C-c C-@") 'rcirc-next-active-buffer)
1254(define-key rcirc-track-minor-mode-map (kbd "C-c C-SPC") 'rcirc-next-active-buffer) 1244(define-key rcirc-track-minor-mode-map (kbd "C-c C-SPC") 'rcirc-next-active-buffer)
1255 1245
1256;;; FIXME: the code to insert `rcirc-activity-string' into 1246;;;###autoload
1257;;; `global-mode-string' isn't called when the mode is activated by
1258;;; customize. I don't know how to set that up.
1259(define-minor-mode rcirc-track-minor-mode 1247(define-minor-mode rcirc-track-minor-mode
1260 "Global minor mode for tracking activity in rcirc buffers." 1248 "Global minor mode for tracking activity in rcirc buffers."
1261 :init-value nil 1249 :init-value nil
@@ -1357,7 +1345,7 @@ activity. Only run if the buffer is not visible and
1357 (setq rcirc-activity-string 1345 (setq rcirc-activity-string
1358 (if (not rcirc-activity) 1346 (if (not rcirc-activity)
1359 "" 1347 ""
1360 (concat " [" 1348 (concat "-["
1361 (mapconcat 1349 (mapconcat
1362 (lambda (b) 1350 (lambda (b)
1363 (let ((s (rcirc-short-buffer-name b))) 1351 (let ((s (rcirc-short-buffer-name b)))
@@ -1366,7 +1354,7 @@ activity. Only run if the buffer is not visible and
1366 s 1354 s
1367 (rcirc-facify s 'rcirc-mode-line-nick))))) 1355 (rcirc-facify s 'rcirc-mode-line-nick)))))
1368 rcirc-activity ",") 1356 rcirc-activity ",")
1369 "]")))) 1357 "]-"))))
1370 1358
1371(defun rcirc-short-buffer-name (buffer) 1359(defun rcirc-short-buffer-name (buffer)
1372 "Return a short name for BUFFER to use in the modeline indicator." 1360 "Return a short name for BUFFER to use in the modeline indicator."
diff --git a/lisp/progmodes/gdb-ui.el b/lisp/progmodes/gdb-ui.el
index e3e2e2f23c1..db704985f2a 100644
--- a/lisp/progmodes/gdb-ui.el
+++ b/lisp/progmodes/gdb-ui.el
@@ -81,7 +81,7 @@
81 81
82;; 1) They go out of scope when the inferior is re-run. 82;; 1) They go out of scope when the inferior is re-run.
83;; 2) -stack-list-locals has a type field but also prints type in values field. 83;; 2) -stack-list-locals has a type field but also prints type in values field.
84;; 3) VARNUM increments even when vairable object is not created (maybe trivial). 84;; 3) VARNUM increments even when variable object is not created (maybe trivial).
85 85
86;;; TODO: 86;;; TODO:
87 87
@@ -107,7 +107,7 @@
107(defvar gdb-current-language nil) 107(defvar gdb-current-language nil)
108(defvar gdb-var-list nil 108(defvar gdb-var-list nil
109 "List of variables in watch window. 109 "List of variables in watch window.
110Each element has the form (EXPRESSION VARNUM NUMCHILD TYPE VALUE STATUS) where 110Each element has the form (VARNUM EXPRESSION NUMCHILD TYPE VALUE STATUS) where
111STATUS is nil (unchanged), `changed' or `out-of-scope'.") 111STATUS is nil (unchanged), `changed' or `out-of-scope'.")
112(defvar gdb-force-update t 112(defvar gdb-force-update t
113 "Non-nil means that view of watch expressions will be updated in the speedbar.") 113 "Non-nil means that view of watch expressions will be updated in the speedbar.")
@@ -301,12 +301,38 @@ Also display the main routine in the disassembly buffer if present."
301 :group 'gud 301 :group 'gud
302 :version "22.1") 302 :version "22.1")
303 303
304(defcustom gdb-many-windows nil
305 "Nil means just pop up the GUD buffer unless `gdb-show-main' is t.
306In this case it starts with two windows: one displaying the GUD
307buffer and the other with the source file with the main routine
308of the inferior. Non-nil means display the layout shown for
309`gdba'."
310 :type 'boolean
311 :group 'gud
312 :version "22.1")
313
304(defcustom gdb-use-separate-io-buffer nil 314(defcustom gdb-use-separate-io-buffer nil
305 "Non-nil means display output from the inferior in a separate buffer." 315 "Non-nil means display output from the inferior in a separate buffer."
306 :type 'boolean 316 :type 'boolean
307 :group 'gud 317 :group 'gud
308 :version "22.1") 318 :version "22.1")
309 319
320(defun gdb-many-windows (arg)
321 "Toggle the number of windows in the basic arrangement.
322With arg, display additional buffers iff arg is positive."
323 (interactive "P")
324 (setq gdb-many-windows
325 (if (null arg)
326 (not gdb-many-windows)
327 (> (prefix-numeric-value arg) 0)))
328 (message (format "Display of other windows %sabled"
329 (if gdb-many-windows "en" "dis")))
330 (if (and gud-comint-buffer
331 (buffer-name gud-comint-buffer))
332 (condition-case nil
333 (gdb-restore-windows)
334 (error nil))))
335
310(defun gdb-use-separate-io-buffer (arg) 336(defun gdb-use-separate-io-buffer (arg)
311 "Toggle separate IO for inferior. 337 "Toggle separate IO for inferior.
312With arg, use separate IO iff arg is positive." 338With arg, use separate IO iff arg is positive."
@@ -391,12 +417,20 @@ With arg, use separate IO iff arg is positive."
391 417
392(defun gdb-find-watch-expression () 418(defun gdb-find-watch-expression ()
393 (let* ((var (nth (- (line-number-at-pos (point)) 2) gdb-var-list)) 419 (let* ((var (nth (- (line-number-at-pos (point)) 2) gdb-var-list))
394 (varno (nth 1 var)) (expr)) 420 (varnum (car var)) expr array)
395 (string-match "\\(var[0-9]+\\)\\.\\(.*\\)" varno) 421 (string-match "\\(var[0-9]+\\)\\.\\(.*\\)" varnum)
396 (dolist (var1 gdb-var-list) 422 (let ((var1 (assoc (match-string 1 varnum) gdb-var-list)) var2 varnumlet
397 (if (string-equal (nth 1 var1) (match-string 1 varno)) 423 (component-list (split-string (match-string 2 varnum) "\\." t)))
398 (setq expr (concat (car var1) "." (match-string 2 varno))))) 424 (setq expr (nth 1 var1))
399 expr)) 425 (setq varnumlet (car var1))
426 (dolist (component component-list)
427 (setq var2 (assoc varnumlet gdb-var-list))
428 (setq expr (concat expr
429 (if (string-match ".*\\[[0-9]+\\]$" (nth 3 var2))
430 (concat "[" component "]")
431 (concat "." component))))
432 (setq varnumlet (concat varnumlet "." component)))
433 expr)))
400 434
401(defun gdb-init-1 () 435(defun gdb-init-1 ()
402 (set (make-local-variable 'gud-minor-mode) 'gdba) 436 (set (make-local-variable 'gud-minor-mode) 'gdba)
@@ -622,23 +656,36 @@ With arg, automatically raise speedbar iff arg is positive."
622 :group 'gud 656 :group 'gud
623 :version "22.1") 657 :version "22.1")
624 658
625(defun gud-watch (&optional event) 659(define-key gud-minor-mode-map "\C-c\C-w" 'gud-watch)
626 "Watch expression at point." 660(define-key global-map (concat gud-key-prefix "\C-w") 'gud-watch)
627 (interactive (list last-input-event)) 661
628 (if event (posn-set-point (event-end event))) 662(defun gud-watch (&optional arg event)
629 (require 'tooltip) 663 "Watch expression at point.
630 (save-selected-window 664With arg, enter name of variable to be watched in the minibuffer."
631 (let ((expr (tooltip-identifier-from-point (point)))) 665 (interactive (list current-prefix-arg last-input-event))
632 (catch 'already-watched 666 (let ((minor-mode (buffer-local-value 'gud-minor-mode gud-comint-buffer)))
633 (dolist (var gdb-var-list) 667 (if (memq minor-mode '(gdbmi gdba))
634 (if (string-equal expr (car var)) (throw 'already-watched nil))) 668 (progn
635 (set-text-properties 0 (length expr) nil expr) 669 (if event (posn-set-point (event-end event)))
636 (gdb-enqueue-input 670 (require 'tooltip)
637 (list 671 (save-selected-window
638 (if (eq (buffer-local-value 'gud-minor-mode gud-comint-buffer) 'gdba) 672 (let ((expr (if arg
639 (concat "server interpreter mi \"-var-create - * " expr "\"\n") 673 (read-string "Name of variable: ")
640 (concat"-var-create - * " expr "\n")) 674 (tooltip-identifier-from-point (point)))))
641 `(lambda () (gdb-var-create-handler ,expr)))))))) 675 (catch 'already-watched
676 (dolist (var gdb-var-list)
677 (unless (string-match "\\." (car var))
678 (if (string-equal expr (nth 1 var))
679 (throw 'already-watched nil))))
680 (set-text-properties 0 (length expr) nil expr)
681 (gdb-enqueue-input
682 (list
683 (if (eq minor-mode 'gdba)
684 (concat
685 "server interpreter mi \"-var-create - * " expr "\"\n")
686 (concat"-var-create - * " expr "\n"))
687 `(lambda () (gdb-var-create-handler ,expr))))))))
688 (message "gud-watch is a no-op in this mode."))))
642 689
643(defconst gdb-var-create-regexp 690(defconst gdb-var-create-regexp
644 "name=\"\\(.*?\\)\",numchild=\"\\(.*?\\)\",type=\"\\(.*?\\)\"") 691 "name=\"\\(.*?\\)\",numchild=\"\\(.*?\\)\",type=\"\\(.*?\\)\"")
@@ -647,11 +694,11 @@ With arg, automatically raise speedbar iff arg is positive."
647 (goto-char (point-min)) 694 (goto-char (point-min))
648 (if (re-search-forward gdb-var-create-regexp nil t) 695 (if (re-search-forward gdb-var-create-regexp nil t)
649 (let ((var (list 696 (let ((var (list
697 (match-string 1)
650 (if (and (string-equal gdb-current-language "c") 698 (if (and (string-equal gdb-current-language "c")
651 gdb-use-colon-colon-notation gdb-selected-frame) 699 gdb-use-colon-colon-notation gdb-selected-frame)
652 (setq expr (concat gdb-selected-frame "::" expr)) 700 (setq expr (concat gdb-selected-frame "::" expr))
653 expr) 701 expr)
654 (match-string 1)
655 (match-string 2) 702 (match-string 2)
656 (match-string 3) 703 (match-string 3)
657 nil nil))) 704 nil nil)))
@@ -664,10 +711,10 @@ With arg, automatically raise speedbar iff arg is positive."
664 (list 711 (list
665 (if (eq (buffer-local-value 'gud-minor-mode gud-comint-buffer) 'gdba) 712 (if (eq (buffer-local-value 'gud-minor-mode gud-comint-buffer) 'gdba)
666 (concat "server interpreter mi \"-var-evaluate-expression " 713 (concat "server interpreter mi \"-var-evaluate-expression "
667 (nth 1 var) "\"\n") 714 (car var) "\"\n")
668 (concat "-var-evaluate-expression " (nth 1 var) "\n")) 715 (concat "-var-evaluate-expression " (car var) "\n"))
669 `(lambda () (gdb-var-evaluate-expression-handler 716 `(lambda () (gdb-var-evaluate-expression-handler
670 ,(nth 1 var) nil))))) 717 ,(car var) nil)))))
671 (if (search-forward "Undefined command" nil t) 718 (if (search-forward "Undefined command" nil t)
672 (message-box "Watching expressions requires gdb 6.0 onwards") 719 (message-box "Watching expressions requires gdb 6.0 onwards")
673 (message-box "No symbol \"%s\" in current context." expr)))) 720 (message-box "No symbol \"%s\" in current context." expr))))
@@ -675,12 +722,10 @@ With arg, automatically raise speedbar iff arg is positive."
675(defun gdb-var-evaluate-expression-handler (varnum changed) 722(defun gdb-var-evaluate-expression-handler (varnum changed)
676 (goto-char (point-min)) 723 (goto-char (point-min))
677 (re-search-forward ".*value=\\(\".*\"\\)" nil t) 724 (re-search-forward ".*value=\\(\".*\"\\)" nil t)
678 (catch 'var-found 725 (let ((var (assoc varnum gdb-var-list)))
679 (dolist (var gdb-var-list) 726 (when var
680 (when (string-equal varnum (cadr var)) 727 (if changed (setcar (nthcdr 5 var) 'changed))
681 (if changed (setcar (nthcdr 5 var) 'changed)) 728 (setcar (nthcdr 4 var) (read (match-string 1))))))
682 (setcar (nthcdr 4 var) (read (match-string 1)))
683 (throw 'var-found nil)))))
684 729
685(defun gdb-var-list-children (varnum) 730(defun gdb-var-list-children (varnum)
686 (gdb-enqueue-input 731 (gdb-enqueue-input
@@ -696,26 +741,25 @@ type=\"\\(.*?\\)\"")
696 (let ((var-list nil)) 741 (let ((var-list nil))
697 (catch 'child-already-watched 742 (catch 'child-already-watched
698 (dolist (var gdb-var-list) 743 (dolist (var gdb-var-list)
699 (if (string-equal varnum (cadr var)) 744 (if (string-equal varnum (car var))
700 (progn 745 (progn
701 (push var var-list) 746 (push var var-list)
702 (while (re-search-forward gdb-var-list-children-regexp nil t) 747 (while (re-search-forward gdb-var-list-children-regexp nil t)
703 (let ((varchild (list (match-string 2) 748 (let ((varchild (list (match-string 1)
704 (match-string 1) 749 (match-string 2)
705 (match-string 3) 750 (match-string 3)
706 (match-string 4) 751 (match-string 4)
707 nil nil))) 752 nil nil)))
708 (dolist (var1 gdb-var-list) 753 (if (assoc (car varchild) gdb-var-list)
709 (if (string-equal (cadr var1) (cadr varchild)) 754 (throw 'child-already-watched nil))
710 (throw 'child-already-watched nil)))
711 (push varchild var-list) 755 (push varchild var-list)
712 (gdb-enqueue-input 756 (gdb-enqueue-input
713 (list 757 (list
714 (concat 758 (concat
715 "server interpreter mi \"-var-evaluate-expression " 759 "server interpreter mi \"-var-evaluate-expression "
716 (nth 1 varchild) "\"\n") 760 (car varchild) "\"\n")
717 `(lambda () (gdb-var-evaluate-expression-handler 761 `(lambda () (gdb-var-evaluate-expression-handler
718 ,(nth 1 varchild) nil))))))) 762 ,(car varchild) nil)))))))
719 (push var var-list))) 763 (push var var-list)))
720 (setq gdb-var-list (nreverse var-list))))) 764 (setq gdb-var-list (nreverse var-list)))))
721 765
@@ -735,11 +779,8 @@ type=\"\\(.*?\\)\"")
735 (while (re-search-forward gdb-var-update-regexp nil t) 779 (while (re-search-forward gdb-var-update-regexp nil t)
736 (let ((varnum (match-string 1))) 780 (let ((varnum (match-string 1)))
737 (if (string-equal (match-string 2) "false") 781 (if (string-equal (match-string 2) "false")
738 (catch 'var-found 782 (let ((var (assoc varnum gdb-var-list)))
739 (dolist (var gdb-var-list) 783 (if var (setcar (nthcdr 5 var) 'out-of-scope)))
740 (when (string-equal varnum (cadr var))
741 (setcar (nthcdr 5 var) 'out-of-scope)
742 (throw 'var-found nil))))
743 (gdb-enqueue-input 784 (gdb-enqueue-input
744 (list 785 (list
745 (concat "server interpreter mi \"-var-evaluate-expression " 786 (concat "server interpreter mi \"-var-evaluate-expression "
@@ -757,7 +798,8 @@ type=\"\\(.*?\\)\"")
757 (setq gdb-pending-triggers 798 (setq gdb-pending-triggers
758 (delq 'gdb-speedbar-refresh gdb-pending-triggers)) 799 (delq 'gdb-speedbar-refresh gdb-pending-triggers))
759 (with-current-buffer gud-comint-buffer 800 (with-current-buffer gud-comint-buffer
760 (let ((speedbar-verbosity-level 0)) 801 (let ((speedbar-verbosity-level 0)
802 (speedbar-shown-directories nil))
761 (save-excursion 803 (save-excursion
762 (speedbar-refresh))))) 804 (speedbar-refresh)))))
763 805
@@ -768,10 +810,14 @@ type=\"\\(.*?\\)\"")
768 '(gdbmi gdba)) 810 '(gdbmi gdba))
769 (let ((text (speedbar-line-text))) 811 (let ((text (speedbar-line-text)))
770 (string-match "\\(\\S-+\\)" text) 812 (string-match "\\(\\S-+\\)" text)
771 (let* ((expr (match-string 1 text)) 813 (let ((expr (match-string 1 text)) var varnum)
772 (var (assoc expr gdb-var-list)) 814 (catch 'expr-found
773 (varnum (cadr var))) 815 (dolist (var1 gdb-var-list)
774 (unless (string-match "\\." varnum) 816 (when (string-equal expr (nth 1 var1))
817 (setq var var1)
818 (setq varnum (car var1))
819 (throw 'expr-found nil))))
820 (unless (string-match "\\." (car var))
775 (gdb-enqueue-input 821 (gdb-enqueue-input
776 (list 822 (list
777 (if (eq (buffer-local-value 'gud-minor-mode gud-comint-buffer) 823 (if (eq (buffer-local-value 'gud-minor-mode gud-comint-buffer)
@@ -781,13 +827,13 @@ type=\"\\(.*?\\)\"")
781 'ignore)) 827 'ignore))
782 (setq gdb-var-list (delq var gdb-var-list)) 828 (setq gdb-var-list (delq var gdb-var-list))
783 (dolist (varchild gdb-var-list) 829 (dolist (varchild gdb-var-list)
784 (if (string-match (concat (nth 1 var) "\\.") (nth 1 varchild)) 830 (if (string-match (concat (car var) "\\.") (car varchild))
785 (setq gdb-var-list (delq varchild gdb-var-list))))))))) 831 (setq gdb-var-list (delq varchild gdb-var-list)))))))))
786 832
787(defun gdb-edit-value (text token indent) 833(defun gdb-edit-value (text token indent)
788 "Assign a value to a variable displayed in the speedbar." 834 "Assign a value to a variable displayed in the speedbar."
789 (let* ((var (nth (- (count-lines (point-min) (point)) 2) gdb-var-list)) 835 (let* ((var (nth (- (count-lines (point-min) (point)) 2) gdb-var-list))
790 (varnum (cadr var)) (value)) 836 (varnum (car var)) (value))
791 (setq value (read-string "New value: ")) 837 (setq value (read-string "New value: "))
792 (gdb-enqueue-input 838 (gdb-enqueue-input
793 (list 839 (list
@@ -823,7 +869,7 @@ INDENT is the current indentation depth."
823 (gdb-var-list-children-1 token))) 869 (gdb-var-list-children-1 token)))
824 ((string-match "-" text) ;contract this node 870 ((string-match "-" text) ;contract this node
825 (dolist (var gdb-var-list) 871 (dolist (var gdb-var-list)
826 (if (string-match (concat token "\\.") (nth 1 var)) 872 (if (string-match (concat token "\\.") (car var))
827 (setq gdb-var-list (delq var gdb-var-list)))) 873 (setq gdb-var-list (delq var gdb-var-list))))
828 (speedbar-change-expand-button-char ?+) 874 (speedbar-change-expand-button-char ?+)
829 (speedbar-delete-subblock indent)) 875 (speedbar-delete-subblock indent))
@@ -1193,6 +1239,8 @@ not GDB."
1193 (progn 1239 (progn
1194 (setq gud-running t) 1240 (setq gud-running t)
1195 (gdb-remove-text-properties) 1241 (gdb-remove-text-properties)
1242 (setq gud-overlay-arrow-position nil)
1243 (setq gdb-overlay-arrow-position nil)
1196 (if gdb-use-separate-io-buffer 1244 (if gdb-use-separate-io-buffer
1197 (setq gdb-output-sink 'inferior)))) 1245 (setq gdb-output-sink 'inferior))))
1198 (t 1246 (t
@@ -2671,32 +2719,6 @@ corresponding to the mode line clicked."
2671 (gdb-set-window-buffer (gdb-breakpoints-buffer-name)) 2719 (gdb-set-window-buffer (gdb-breakpoints-buffer-name))
2672 (other-window 1)) 2720 (other-window 1))
2673 2721
2674(defcustom gdb-many-windows nil
2675 "Nil means just pop up the GUD buffer unless `gdb-show-main' is t.
2676In this case it starts with two windows: one displaying the GUD
2677buffer and the other with the source file with the main routine
2678of the inferior. Non-nil means display the layout shown for
2679`gdba'."
2680 :type 'boolean
2681 :group 'gud
2682 :version "22.1")
2683
2684(defun gdb-many-windows (arg)
2685 "Toggle the number of windows in the basic arrangement.
2686With arg, display additional buffers iff arg is positive."
2687 (interactive "P")
2688 (setq gdb-many-windows
2689 (if (null arg)
2690 (not gdb-many-windows)
2691 (> (prefix-numeric-value arg) 0)))
2692 (message (format "Display of other windows %sabled"
2693 (if gdb-many-windows "en" "dis")))
2694 (if (and gud-comint-buffer
2695 (buffer-name gud-comint-buffer))
2696 (condition-case nil
2697 (gdb-restore-windows)
2698 (error nil))))
2699
2700(defun gdb-restore-windows () 2722(defun gdb-restore-windows ()
2701 "Restore the basic arrangement of windows used by gdba. 2723 "Restore the basic arrangement of windows used by gdba.
2702This arrangement depends on the value of `gdb-many-windows'." 2724This arrangement depends on the value of `gdb-many-windows'."
@@ -3115,19 +3137,18 @@ value=\\(\".*?\"\\),type=\"\\(.+?\\)\"}")
3115 (let ((var-list nil)) 3137 (let ((var-list nil))
3116 (catch 'child-already-watched 3138 (catch 'child-already-watched
3117 (dolist (var gdb-var-list) 3139 (dolist (var gdb-var-list)
3118 (if (string-equal varnum (cadr var)) 3140 (if (string-equal varnum (car var))
3119 (progn 3141 (progn
3120 (push var var-list) 3142 (push var var-list)
3121 (while (re-search-forward gdb-var-list-children-regexp-1 nil t) 3143 (while (re-search-forward gdb-var-list-children-regexp-1 nil t)
3122 (let ((varchild (list (match-string 2) 3144 (let ((varchild (list (match-string 1)
3123 (match-string 1) 3145 (match-string 2)
3124 (match-string 3) 3146 (match-string 3)
3125 (match-string 5) 3147 (match-string 5)
3126 (read (match-string 4)) 3148 (read (match-string 4))
3127 nil))) 3149 nil)))
3128 (dolist (var1 gdb-var-list) 3150 (if (assoc (car varchild) gdb-var-list)
3129 (if (string-equal (cadr var1) (cadr varchild)) 3151 (throw 'child-already-watched nil))
3130 (throw 'child-already-watched nil)))
3131 (push varchild var-list)))) 3152 (push varchild var-list))))
3132 (push var var-list))) 3153 (push var var-list)))
3133 (setq gdb-var-list (nreverse var-list))))) 3154 (setq gdb-var-list (nreverse var-list)))))
@@ -3152,16 +3173,14 @@ value=\\(\".*?\"\\),type=\"\\(.+?\\)\"}")
3152 (setcar (nthcdr 5 var) nil)) 3173 (setcar (nthcdr 5 var) nil))
3153 (goto-char (point-min)) 3174 (goto-char (point-min))
3154 (while (re-search-forward gdb-var-update-regexp-1 nil t) 3175 (while (re-search-forward gdb-var-update-regexp-1 nil t)
3155 (let ((varnum (match-string 1))) 3176 (let* ((varnum (match-string 1))
3156 (catch 'var-found 3177 (var (assoc varnum gdb-var-list)))
3157 (dolist (var gdb-var-list) 3178 (when var
3158 (when (string-equal varnum (cadr var)) 3179 (if (string-equal (match-string 3) "false")
3159 (if (string-equal (match-string 3) "false") 3180 (setcar (nthcdr 5 var) 'out-of-scope)
3160 (setcar (nthcdr 5 var) 'out-of-scope) 3181 (setcar (nthcdr 5 var) 'changed)
3161 (setcar (nthcdr 5 var) 'changed) 3182 (setcar (nthcdr 4 var)
3162 (setcar (nthcdr 4 var) 3183 (read (match-string 2)))))))
3163 (read (match-string 2))))
3164 (throw 'var-found nil))))))
3165 (setq gdb-pending-triggers 3184 (setq gdb-pending-triggers
3166 (delq 'gdb-var-update gdb-pending-triggers)) 3185 (delq 'gdb-var-update gdb-pending-triggers))
3167 (when (and (boundp 'speedbar-frame) (frame-live-p speedbar-frame)) 3186 (when (and (boundp 'speedbar-frame) (frame-live-p speedbar-frame))
@@ -3309,7 +3328,7 @@ value=\\(\".*?\"\\),type=\"\\(.+?\\)\"}")
3309 (dolist (local locals-list) 3328 (dolist (local locals-list)
3310 (setq name (car local)) 3329 (setq name (car local))
3311 (if (or (not (nth 2 local)) 3330 (if (or (not (nth 2 local))
3312 (string-match "\\*$" (nth 1 local))) 3331 (string-match "\\0x" (nth 2 local)))
3313 (add-text-properties 0 (length name) 3332 (add-text-properties 0 (length name)
3314 `(mouse-face highlight 3333 `(mouse-face highlight
3315 help-echo "mouse-2: create watch expression" 3334 help-echo "mouse-2: create watch expression"
diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el
index 41bb24f9e61..f98ee3540d8 100644
--- a/lisp/progmodes/gud.el
+++ b/lisp/progmodes/gud.el
@@ -174,7 +174,7 @@ Used to grey out relevant togolbar icons.")
174 :enable (and (not gud-running) 174 :enable (and (not gud-running)
175 (memq gud-minor-mode 175 (memq gud-minor-mode
176 '(gdbmi gdba gdb dbx xdb jdb pdb bashdb)))) 176 '(gdbmi gdba gdb dbx xdb jdb pdb bashdb))))
177 ([pp] menu-item "Print the emacs s-expression" gud-pp 177 ([pp] menu-item "Print S-expression" gud-pp
178 :enable (and (not gud-running) 178 :enable (and (not gud-running)
179 gdb-active-process) 179 gdb-active-process)
180 :visible (and (string-equal 180 :visible (and (string-equal
@@ -234,9 +234,6 @@ Used to grey out relevant togolbar icons.")
234 (gud-run . "gud/run") 234 (gud-run . "gud/run")
235 (gud-go . "gud/go") 235 (gud-go . "gud/go")
236 (gud-stop-subjob . "gud/stop") 236 (gud-stop-subjob . "gud/stop")
237 ;; gud-s, gud-si etc. instead of gud-step,
238 ;; gud-stepi, to avoid file-name clashes on DOS
239 ;; 8+3 filesystems.
240 (gud-cont . "gud/cont") 237 (gud-cont . "gud/cont")
241 (gud-until . "gud/until") 238 (gud-until . "gud/until")
242 (gud-next . "gud/next") 239 (gud-next . "gud/next")
@@ -455,7 +452,7 @@ required by the caller."
455 (let ((var-list gdb-var-list) parent) 452 (let ((var-list gdb-var-list) parent)
456 (while var-list 453 (while var-list
457 (let* (char (depth 0) (start 0) (var (car var-list)) 454 (let* (char (depth 0) (start 0) (var (car var-list))
458 (expr (car var)) (varnum (nth 1 var)) 455 (varnum (car var)) (expr (nth 1 var))
459 (type (nth 3 var)) (value (nth 4 var)) 456 (type (nth 3 var)) (value (nth 4 var))
460 (status (nth 5 var))) 457 (status (nth 5 var)))
461 (put-text-property 458 (put-text-property
@@ -483,9 +480,9 @@ required by the caller."
483 t) 480 t)
484 depth) 481 depth)
485 (if (eq status 'out-of-scope) (setq parent 'shadow)) 482 (if (eq status 'out-of-scope) (setq parent 'shadow))
486 (if (and (cadr var-list) 483 (if (and (nth 1 var-list)
487 (string-match (concat varnum "\\.") 484 (string-match (concat varnum "\\.")
488 (cadr (cadr var-list)))) 485 (car (nth 1 var-list))))
489 (setq char ?-) 486 (setq char ?-)
490 (setq char ?+)) 487 (setq char ?+))
491 (if (string-match "\\*$" type) 488 (if (string-match "\\*$" type)
diff --git a/lisp/textmodes/org.el b/lisp/textmodes/org.el
index 717455edc61..3c77560a9cc 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.08 8;; Version: 4.09
9;; 9;;
10;; This file is part of GNU Emacs. 10;; This file is part of GNU Emacs.
11;; 11;;
@@ -81,8 +81,14 @@
81;; 81;;
82;; Changes since version 4.00: 82;; Changes since version 4.00:
83;; --------------------------- 83;; ---------------------------
84;; Version 4.08 84;; Version 4.09
85;; - Bug fixes.
86;; - Small improvements to font-lock support.
87;; - MHE support finalized.
85;; 88;;
89;; Version 4.08
90;; - Bug fixes.
91;; - Improved MHE support
86;; 92;;
87;; Version 4.07 93;; Version 4.07
88;; - Bug fixes. 94;; - Bug fixes.
@@ -139,7 +145,7 @@
139 145
140;;; Customization variables 146;;; Customization variables
141 147
142(defvar org-version "4.08" 148(defvar org-version "4.09"
143 "The version number of the file org.el.") 149 "The version number of the file org.el.")
144(defun org-version () 150(defun org-version ()
145 (interactive) 151 (interactive)
@@ -796,31 +802,15 @@ as possible."
796 :group 'org-structure 802 :group 'org-structure
797 :type 'hook) 803 :type 'hook)
798 804
799(defcustom org-level-color-stars-only nil
800 "Non-nil means fontify only the stars in each headline.
801When nil, the entire headline is fontified.
802Changing it requires restart of `font-lock-mode' to become effective."
803 :group 'org-structure
804 :type 'boolean)
805
806(defcustom org-hide-leading-stars nil
807 "Non-nil means, hide the first N-1 stars in a headline.
808This works by using the face `org-hide' for these stars. This
809face is white for a light background, and black for a dark
810background. You may have to customize the face `org-hide' to
811make this work.
812Changing it requires restart of `font-lock-mode' to become effective."
813 :group 'org-structure
814 :type 'boolean)
815
816(defcustom org-odd-levels-only nil 805(defcustom org-odd-levels-only nil
817 "Non-nil means, skip even levels and only use odd levels for the outline. 806 "Non-nil means, skip even levels and only use odd levels for the outline.
818This has the effect that two stars are being added/taken away in 807This has the effect that two stars are being added/taken away in
819promotion/demotion commands. It also influences how levels are 808promotion/demotion commands. It also influences how levels are
820handled by the exporters. 809handled by the exporters.
821Changing it requires restart of `font-lock-mode' to become effective 810Changing it requires restart of `font-lock-mode' to become effective
822for fontification." 811for fontification also in regions already fontified."
823 :group 'org-structure 812 :group 'org-structure
813 :group 'org-font-lock
824 :type 'boolean) 814 :type 'boolean)
825 815
826(defcustom org-adapt-indentation t 816(defcustom org-adapt-indentation t
@@ -1710,11 +1700,44 @@ This file is created with the command \\[org-export-icalendar-all-agenda-files].
1710 :group 'org-export 1700 :group 'org-export
1711 :type 'string) 1701 :type 'string)
1712 1702
1713(defgroup org-faces nil 1703(defgroup org-font-lock nil
1714 "Faces for highlighting in Org-mode." 1704 "Faces and settings for highlighting in Org-mode."
1715 :tag "Org Faces" 1705 :tag "Org Font Lock"
1716 :group 'org) 1706 :group 'org)
1717 1707
1708(defcustom org-level-color-stars-only nil
1709 "Non-nil means fontify only the stars in each headline.
1710When nil, the entire headline is fontified.
1711Changing it requires restart of `font-lock-mode' to become effective
1712also in regions already fontified."
1713 :group 'org-font-lock
1714 :type 'boolean)
1715
1716(defcustom org-hide-leading-stars nil
1717 "Non-nil means, hide the first N-1 stars in a headline.
1718This works by using the face `org-hide' for these stars. This
1719face is white for a light background, and black for a dark
1720background. You may have to customize the face `org-hide' to
1721make this work.
1722Changing it requires restart of `font-lock-mode' to become effective
1723also in regions already fontified."
1724 :group 'org-font-lock
1725 :type 'boolean)
1726
1727(defcustom org-fontify-done-headline nil
1728 "Non-nil means, change the face of a headline if it is marked DONE.
1729Normally, only the TODO/DONE keyword indicates the state of a headline.
1730When this is non-nil, the headline after the keyword is set to the
1731`org-headline-done' as an additional indication."
1732 :group 'org-font-lock
1733 :type 'boolean)
1734
1735(defcustom org-fontify-emphasized-text t
1736 "Non-nil means fontify *bold*, /italic/ and _underlined_ text.
1737Changing this variable requires a restart of Emacs to take effect."
1738 :group 'org-font-lock
1739 :type 'boolean)
1740
1718(defface org-hide 1741(defface org-hide
1719 '((((type tty) (class color)) (:foreground "blue" :weight bold)) 1742 '((((type tty) (class color)) (:foreground "blue" :weight bold))
1720 (((class color) (background light)) (:foreground "white")) 1743 (((class color) (background light)) (:foreground "white"))
@@ -1723,7 +1746,7 @@ This file is created with the command \\[org-export-icalendar-all-agenda-files].
1723; (((class color) (background dark)) (:foreground "grey10")) 1746; (((class color) (background dark)) (:foreground "grey10"))
1724 (t (:inverse-video nil))) 1747 (t (:inverse-video nil)))
1725 "Face used for level 1 headlines." 1748 "Face used for level 1 headlines."
1726 :group 'org-faces) 1749 :group 'org-font-lock)
1727 1750
1728(defface org-level-1 ;; font-lock-function-name-face 1751(defface org-level-1 ;; font-lock-function-name-face
1729 '((((type tty) (class color)) (:foreground "blue" :weight bold)) 1752 '((((type tty) (class color)) (:foreground "blue" :weight bold))
@@ -1731,7 +1754,7 @@ This file is created with the command \\[org-export-icalendar-all-agenda-files].
1731 (((class color) (background dark)) (:foreground "LightSkyBlue")) 1754 (((class color) (background dark)) (:foreground "LightSkyBlue"))
1732 (t (:inverse-video t :bold t))) 1755 (t (:inverse-video t :bold t)))
1733 "Face used for level 1 headlines." 1756 "Face used for level 1 headlines."
1734 :group 'org-faces) 1757 :group 'org-font-lock)
1735 1758
1736(defface org-level-2 ;; font-lock-variable-name-face 1759(defface org-level-2 ;; font-lock-variable-name-face
1737 '((((type tty) (class color)) (:foreground "yellow" :weight light)) 1760 '((((type tty) (class color)) (:foreground "yellow" :weight light))
@@ -1739,7 +1762,7 @@ This file is created with the command \\[org-export-icalendar-all-agenda-files].
1739 (((class color) (background dark)) (:foreground "LightGoldenrod")) 1762 (((class color) (background dark)) (:foreground "LightGoldenrod"))
1740 (t (:bold t :italic t))) 1763 (t (:bold t :italic t)))
1741 "Face used for level 2 headlines." 1764 "Face used for level 2 headlines."
1742 :group 'org-faces) 1765 :group 'org-font-lock)
1743 1766
1744(defface org-level-3 ;; font-lock-keyword-face 1767(defface org-level-3 ;; font-lock-keyword-face
1745 '((((type tty) (class color)) (:foreground "cyan" :weight bold)) 1768 '((((type tty) (class color)) (:foreground "cyan" :weight bold))
@@ -1747,7 +1770,7 @@ This file is created with the command \\[org-export-icalendar-all-agenda-files].
1747 (((class color) (background dark)) (:foreground "Cyan")) 1770 (((class color) (background dark)) (:foreground "Cyan"))
1748 (t (:bold t))) 1771 (t (:bold t)))
1749 "Face used for level 3 headlines." 1772 "Face used for level 3 headlines."
1750 :group 'org-faces) 1773 :group 'org-font-lock)
1751 1774
1752(defface org-level-4 ;; font-lock-comment-face 1775(defface org-level-4 ;; font-lock-comment-face
1753 '((((type tty pc) (class color) (background light)) (:foreground "red")) 1776 '((((type tty pc) (class color) (background light)) (:foreground "red"))
@@ -1756,7 +1779,7 @@ This file is created with the command \\[org-export-icalendar-all-agenda-files].
1756 (((class color) (background dark)) (:foreground "chocolate1")) 1779 (((class color) (background dark)) (:foreground "chocolate1"))
1757 (t (:bold t :italic t))) 1780 (t (:bold t :italic t)))
1758 "Face used for level 4 headlines." 1781 "Face used for level 4 headlines."
1759 :group 'org-faces) 1782 :group 'org-font-lock)
1760 1783
1761(defface org-level-5 ;; font-lock-type-face 1784(defface org-level-5 ;; font-lock-type-face
1762 '((((type tty) (class color)) (:foreground "green")) 1785 '((((type tty) (class color)) (:foreground "green"))
@@ -1764,7 +1787,7 @@ This file is created with the command \\[org-export-icalendar-all-agenda-files].
1764 (((class color) (background dark)) (:foreground "PaleGreen")) 1787 (((class color) (background dark)) (:foreground "PaleGreen"))
1765 (t (:bold t :underline t))) 1788 (t (:bold t :underline t)))
1766 "Face used for level 5 headlines." 1789 "Face used for level 5 headlines."
1767 :group 'org-faces) 1790 :group 'org-font-lock)
1768 1791
1769(defface org-level-6 ;; font-lock-constant-face 1792(defface org-level-6 ;; font-lock-constant-face
1770 '((((type tty) (class color)) (:foreground "magenta")) 1793 '((((type tty) (class color)) (:foreground "magenta"))
@@ -1772,7 +1795,7 @@ This file is created with the command \\[org-export-icalendar-all-agenda-files].
1772 (((class color) (background dark)) (:foreground "Aquamarine")) 1795 (((class color) (background dark)) (:foreground "Aquamarine"))
1773 (t (:bold t :underline t))) 1796 (t (:bold t :underline t)))
1774 "Face used for level 6 headlines." 1797 "Face used for level 6 headlines."
1775 :group 'org-faces) 1798 :group 'org-font-lock)
1776 1799
1777(defface org-level-7 ;; font-lock-builtin-face 1800(defface org-level-7 ;; font-lock-builtin-face
1778 '((((type tty) (class color)) (:foreground "blue" :weight light)) 1801 '((((type tty) (class color)) (:foreground "blue" :weight light))
@@ -1780,7 +1803,7 @@ This file is created with the command \\[org-export-icalendar-all-agenda-files].
1780 (((class color) (background dark)) (:foreground "LightSteelBlue")) 1803 (((class color) (background dark)) (:foreground "LightSteelBlue"))
1781 (t (:bold t))) 1804 (t (:bold t)))
1782 "Face used for level 7 headlines." 1805 "Face used for level 7 headlines."
1783 :group 'org-faces) 1806 :group 'org-font-lock)
1784 1807
1785(defface org-level-8 ;; font-lock-string-face 1808(defface org-level-8 ;; font-lock-string-face
1786 '((((type tty) (class color)) (:foreground "green")) 1809 '((((type tty) (class color)) (:foreground "green"))
@@ -1788,7 +1811,7 @@ This file is created with the command \\[org-export-icalendar-all-agenda-files].
1788 (((class color) (background dark)) (:foreground "LightSalmon")) 1811 (((class color) (background dark)) (:foreground "LightSalmon"))
1789 (t (:italic t))) 1812 (t (:italic t)))
1790 "Face used for level 8 headlines." 1813 "Face used for level 8 headlines."
1791 :group 'org-faces) 1814 :group 'org-font-lock)
1792 1815
1793(defface org-special-keyword ;; font-lock-string-face 1816(defface org-special-keyword ;; font-lock-string-face
1794 '((((type tty) (class color)) (:foreground "green")) 1817 '((((type tty) (class color)) (:foreground "green"))
@@ -1796,7 +1819,7 @@ This file is created with the command \\[org-export-icalendar-all-agenda-files].
1796 (((class color) (background dark)) (:foreground "LightSalmon")) 1819 (((class color) (background dark)) (:foreground "LightSalmon"))
1797 (t (:italic t))) 1820 (t (:italic t)))
1798 "Face used for special keywords." 1821 "Face used for special keywords."
1799 :group 'org-faces) 1822 :group 'org-font-lock)
1800 1823
1801(defface org-warning ;; font-lock-warning-face 1824(defface org-warning ;; font-lock-warning-face
1802 '((((type tty) (class color)) (:foreground "red")) 1825 '((((type tty) (class color)) (:foreground "red"))
@@ -1805,15 +1828,7 @@ This file is created with the command \\[org-export-icalendar-all-agenda-files].
1805; (((class color) (background dark)) (:foreground "Pink" :bold t)) 1828; (((class color) (background dark)) (:foreground "Pink" :bold t))
1806 (t (:inverse-video t :bold t))) 1829 (t (:inverse-video t :bold t)))
1807 "Face for deadlines and TODO keywords." 1830 "Face for deadlines and TODO keywords."
1808 :group 'org-faces) 1831 :group 'org-font-lock)
1809
1810(defcustom org-fontify-done-headline nil
1811 "Non-nil means, change the face of a headline if it is marked DONE.
1812Normally, only the TODO/DONE keyword indicates the state of a headline.
1813When this is non-nil, the headline after the keyword is set to the
1814`org-headline-done' as an additional indication."
1815 :group 'org-faces
1816 :type 'boolean)
1817 1832
1818(defface org-headline-done ;; font-lock-string-face 1833(defface org-headline-done ;; font-lock-string-face
1819 '((((type tty) (class color)) (:foreground "green")) 1834 '((((type tty) (class color)) (:foreground "green"))
@@ -1822,7 +1837,7 @@ When this is non-nil, the headline after the keyword is set to the
1822 (t (:italic t))) 1837 (t (:italic t)))
1823 "Face used to indicate that a headline is DONE. See also the variable 1838 "Face used to indicate that a headline is DONE. See also the variable
1824`org-fontify-done-headline'." 1839`org-fontify-done-headline'."
1825 :group 'org-faces) 1840 :group 'org-font-lock)
1826 1841
1827;; Inheritance does not yet work for xemacs. So we just copy... 1842;; Inheritance does not yet work for xemacs. So we just copy...
1828 1843
@@ -1832,7 +1847,7 @@ When this is non-nil, the headline after the keyword is set to the
1832 (((class color) (background dark)) (:foreground "LightSkyBlue")) 1847 (((class color) (background dark)) (:foreground "LightSkyBlue"))
1833 (t (:inverse-video t :bold t))) 1848 (t (:inverse-video t :bold t)))
1834 "Face for upcoming deadlines." 1849 "Face for upcoming deadlines."
1835 :group 'org-faces) 1850 :group 'org-font-lock)
1836 1851
1837(defface org-scheduled-today 1852(defface org-scheduled-today
1838 '((((type tty) (class color)) (:foreground "green")) 1853 '((((type tty) (class color)) (:foreground "green"))
@@ -1840,7 +1855,7 @@ When this is non-nil, the headline after the keyword is set to the
1840 (((class color) (background dark)) (:foreground "PaleGreen")) 1855 (((class color) (background dark)) (:foreground "PaleGreen"))
1841 (t (:bold t :underline t))) 1856 (t (:bold t :underline t)))
1842 "Face for items scheduled for a certain day." 1857 "Face for items scheduled for a certain day."
1843 :group 'org-faces) 1858 :group 'org-font-lock)
1844 1859
1845(defface org-scheduled-previously 1860(defface org-scheduled-previously
1846 '((((type tty pc) (class color) (background light)) (:foreground "red")) 1861 '((((type tty pc) (class color) (background light)) (:foreground "red"))
@@ -1849,7 +1864,7 @@ When this is non-nil, the headline after the keyword is set to the
1849 (((class color) (background dark)) (:foreground "chocolate1")) 1864 (((class color) (background dark)) (:foreground "chocolate1"))
1850 (t (:bold t :italic t))) 1865 (t (:bold t :italic t)))
1851 "Face for items scheduled previously, and not yet done." 1866 "Face for items scheduled previously, and not yet done."
1852 :group 'org-faces) 1867 :group 'org-font-lock)
1853 1868
1854(defface org-formula 1869(defface org-formula
1855 '((((type tty pc) (class color) (background light)) (:foreground "red")) 1870 '((((type tty pc) (class color) (background light)) (:foreground "red"))
@@ -1858,7 +1873,7 @@ When this is non-nil, the headline after the keyword is set to the
1858 (((class color) (background dark)) (:foreground "chocolate1")) 1873 (((class color) (background dark)) (:foreground "chocolate1"))
1859 (t (:bold t :italic t))) 1874 (t (:bold t :italic t)))
1860 "Face for formulas." 1875 "Face for formulas."
1861 :group 'org-faces) 1876 :group 'org-font-lock)
1862 1877
1863(defface org-link 1878(defface org-link
1864 '((((type tty) (class color)) (:foreground "cyan" :weight bold)) 1879 '((((type tty) (class color)) (:foreground "cyan" :weight bold))
@@ -1866,15 +1881,15 @@ When this is non-nil, the headline after the keyword is set to the
1866 (((class color) (background dark)) (:foreground "Cyan")) 1881 (((class color) (background dark)) (:foreground "Cyan"))
1867 (t (:bold t))) 1882 (t (:bold t)))
1868 "Face for links." 1883 "Face for links."
1869 :group 'org-faces) 1884 :group 'org-font-lock)
1870 1885
1871(defface org-tag 1886(defface org-tag
1872 '((((type tty) (class color)) (:foreground "cyan" :weight bold)) 1887 '((((type tty) (class color)) (:foreground "cyan" :weight bold))
1873 (((class color) (background light)) (:foreground "Purple" :weight bold)) 1888 (((class color) (background light)) (:foreground "Purple" :weight bold))
1874 (((class color) (background dark)) (:foreground "Cyan" :weight bold)) 1889 (((class color) (background dark)) (:foreground "Cyan" :weight bold))
1875 (t (:bold t))) 1890 (t (:bold t)))
1876 "Face for links." 1891 "Face for tags."
1877 :group 'org-faces) 1892 :group 'org-font-lock)
1878 1893
1879(defface org-done ;; font-lock-type-face 1894(defface org-done ;; font-lock-type-face
1880 '((((type tty) (class color)) (:foreground "green")) 1895 '((((type tty) (class color)) (:foreground "green"))
@@ -1882,7 +1897,7 @@ When this is non-nil, the headline after the keyword is set to the
1882 (((class color) (background dark)) (:foreground "PaleGreen" :bold t)) 1897 (((class color) (background dark)) (:foreground "PaleGreen" :bold t))
1883 (t (:bold t :underline t))) 1898 (t (:bold t :underline t)))
1884 "Face used for DONE." 1899 "Face used for DONE."
1885 :group 'org-faces) 1900 :group 'org-font-lock)
1886 1901
1887(defface org-table ;; font-lock-function-name-face 1902(defface org-table ;; font-lock-function-name-face
1888 '((((type tty) (class color)) (:foreground "blue" :weight bold)) 1903 '((((type tty) (class color)) (:foreground "blue" :weight bold))
@@ -1890,7 +1905,7 @@ When this is non-nil, the headline after the keyword is set to the
1890 (((class color) (background dark)) (:foreground "LightSkyBlue")) 1905 (((class color) (background dark)) (:foreground "LightSkyBlue"))
1891 (t (:inverse-video t :bold t))) 1906 (t (:inverse-video t :bold t)))
1892 "Face used for tables." 1907 "Face used for tables."
1893 :group 'org-faces) 1908 :group 'org-font-lock)
1894 1909
1895(defface org-time-grid ;; font-lock-variable-name-face 1910(defface org-time-grid ;; font-lock-variable-name-face
1896 '((((type tty) (class color)) (:foreground "yellow" :weight light)) 1911 '((((type tty) (class color)) (:foreground "yellow" :weight light))
@@ -1898,7 +1913,7 @@ When this is non-nil, the headline after the keyword is set to the
1898 (((class color) (background dark)) (:foreground "LightGoldenrod")) 1913 (((class color) (background dark)) (:foreground "LightGoldenrod"))
1899 (t (:bold t :italic t))) 1914 (t (:bold t :italic t)))
1900 "Face used for time grids." 1915 "Face used for time grids."
1901 :group 'org-faces) 1916 :group 'org-font-lock)
1902 1917
1903(defvar org-level-faces 1918(defvar org-level-faces
1904 '(org-level-1 org-level-2 org-level-3 org-level-4 1919 '(org-level-1 org-level-2 org-level-3 org-level-4
@@ -1939,6 +1954,10 @@ When this is non-nil, the headline after the keyword is set to the
1939 (set '(("fold" org-startup-folded t) 1954 (set '(("fold" org-startup-folded t)
1940 ("nofold" org-startup-folded nil) 1955 ("nofold" org-startup-folded nil)
1941 ("content" org-startup-folded content) 1956 ("content" org-startup-folded content)
1957 ("hidestars" org-hide-leading-stars t)
1958 ("showstars" org-hide-leading-stars nil)
1959 ("odd" org-odd-levels-only t)
1960 ("oddeven" org-odd-levels-only nil)
1942 ("dlcheck" org-startup-with-deadline-check t) 1961 ("dlcheck" org-startup-with-deadline-check t)
1943 ("nodlcheck" org-startup-with-deadline-check nil))) 1962 ("nodlcheck" org-startup-with-deadline-check nil)))
1944 l var val) 1963 l var val)
@@ -2307,44 +2326,45 @@ between words."
2307(defvar org-font-lock-keywords nil) 2326(defvar org-font-lock-keywords nil)
2308 2327
2309(defun org-set-font-lock-defaults () 2328(defun org-set-font-lock-defaults ()
2310 (let ((org-font-lock-extra-keywords 2329 (let* ((em org-fontify-emphasized-text)
2311 (list 2330 (org-font-lock-extra-keywords
2312 '("^\\(\\**\\)\\(\\*\\)\\(.*\\)" (1 (org-get-level-face 1)) 2331 (list
2313 (2 (org-get-level-face 2)) (3 (org-get-level-face 3))) 2332 '("^\\(\\**\\)\\(\\*\\)\\(.*\\)" (1 (org-get-level-face 1))
2314 '(org-activate-links (0 'org-link t)) 2333 (2 (org-get-level-face 2)) (3 (org-get-level-face 3)))
2315 '(org-activate-links2 (0 'org-link t)) 2334 '(org-activate-links (0 'org-link t))
2316 '(org-activate-target-links (0 'org-link t)) 2335 '(org-activate-links2 (0 'org-link t))
2317 '(org-activate-dates (0 'org-link t)) 2336 '(org-activate-target-links (0 'org-link t))
2318 '(org-activate-camels (0 'org-link t)) 2337 '(org-activate-dates (0 'org-link t))
2319 '(org-activate-tags (1 'org-tag t)) 2338 '(org-activate-camels (0 'org-link t))
2320 (list (concat "^\\*+[ \t]*" org-not-done-regexp) 2339 '(org-activate-tags (1 'org-tag t))
2321 '(1 'org-warning t)) 2340 (list (concat "^\\*+[ \t]*" org-not-done-regexp)
2322 (list (concat "\\[#[A-Z]\\]") '(0 'org-special-keyword t)) 2341 '(1 'org-warning t))
2323 (list (concat "\\<" org-deadline-string) '(0 'org-special-keyword t)) 2342 (list (concat "\\[#[A-Z]\\]") '(0 'org-special-keyword t))
2324 (list (concat "\\<" org-scheduled-string) '(0 'org-special-keyword t)) 2343 (list (concat "\\<" org-deadline-string) '(0 'org-special-keyword t))
2325 (list (concat "\\<" org-closed-string) '(0 'org-special-keyword t)) 2344 (list (concat "\\<" org-scheduled-string) '(0 'org-special-keyword t))
2326 ;; '("\\(\\s-\\|^\\)\\(\\*\\([a-zA-Z]+\\)\\*\\)\\([^a-zA-Z*]\\|$\\)" 2345 (list (concat "\\<" org-closed-string) '(0 'org-special-keyword t))
2327 ;; (3 'bold)) 2346; (if em '("\\(\\s-\\|^\\)\\(\\*\\([a-zA-Z]+\\)\\*\\)\\([^a-zA-Z*]\\|$\\)" (3 'bold)))
2328 ;; '("\\(\\s-\\|^\\)\\(/\\([a-zA-Z]+\\)/\\)\\([^a-zA-Z*]\\|$\\)" 2347; (if em '("\\(\\s-\\|^\\)\\(/\\([a-zA-Z]+\\)/\\)\\([^a-zA-Z*]\\|$\\)" (3 'italic)))
2329 ;; (3 'italic)) 2348; (if em '("\\(\\s-\\|^\\)\\(_\\([a-zA-Z]+\\)_\\)\\([^a-zA-Z*]\\|$\\)" (3 'underline)))
2330 ;; '("\\(\\s-\\|^\\)\\(_\\([a-zA-Z]+\\)_\\)\\([^a-zA-Z*]\\|$\\)" 2349 (if em '("\\*[a-zA-Z]+\\*" 0 'bold))
2331 ;; (3 'underline)) 2350 (if em '("/*[a-zA-Z]+/" 0 'italic))
2332 (list (concat "^\\*+[ \t]*\\<\\(" org-comment-string 2351 (if em '("_[a-zA-Z]+_" 0 'underline))
2333 "\\|" org-quote-string "\\)\\>") 2352 (list (concat "^\\*+[ \t]*\\<\\(" org-comment-string
2334 '(1 'org-special-keyword t)) 2353 "\\|" org-quote-string "\\)\\>")
2335 '("^#.*" (0 'font-lock-comment-face t)) 2354 '(1 'org-special-keyword t))
2336 (if org-fontify-done-headline 2355 '("^#.*" (0 'font-lock-comment-face t))
2337 (list (concat "^[*]+ +\\<\\(" org-done-string "\\)\\(.*\\)\\>") 2356 (if org-fontify-done-headline
2338 '(1 'org-done t) '(2 'org-headline-done t)) 2357 (list (concat "^[*]+ +\\<\\(" org-done-string "\\)\\(.*\\)\\>")
2339 (list (concat "^[*]+ +\\<\\(" org-done-string "\\)\\>") 2358 '(1 'org-done t) '(2 'org-headline-done t))
2340 '(1 'org-done t))) 2359 (list (concat "^[*]+ +\\<\\(" org-done-string "\\)\\>")
2341 '("^[ \t]*\\(\\(|\\|\\+-[-+]\\).*\\S-\\)" 2360 '(1 'org-done t)))
2342 (1 'org-table t)) 2361 '("^[ \t]*\\(\\(|\\|\\+-[-+]\\).*\\S-\\)"
2343 '("^[ \t]*\\(:.*\\)" (1 'org-table t)) 2362 (1 'org-table t))
2344 '("| *\\(:?=[^|\n]*\\)" (1 'org-formula t)) 2363 '("^[ \t]*\\(:.*\\)" (1 'org-table t))
2345 '("^[ \t]*| *\\([#!$*_^]\\) *|" (1 'org-formula t)) 2364 '("| *\\(:?=[^|\n]*\\)" (1 'org-formula t))
2346 ))) 2365 '("^[ \t]*| *\\([#!$*_^]\\) *|" (1 'org-formula t))
2347 2366 )))
2367 (setq org-font-lock-extra-keywords (delq nil org-font-lock-extra-keywords))
2348 ;; Now set the full font-lock-keywords 2368 ;; Now set the full font-lock-keywords
2349 (set (make-local-variable 'org-font-lock-keywords) 2369 (set (make-local-variable 'org-font-lock-keywords)
2350 org-font-lock-extra-keywords) 2370 org-font-lock-extra-keywords)
@@ -6960,7 +6980,7 @@ in all files."
6960 (s0 (mapconcat 'identity (org-split-string s "[ \t\r\n]+") " ")) 6980 (s0 (mapconcat 'identity (org-split-string s "[ \t\r\n]+") " "))
6961 (pos (point)) 6981 (pos (point))
6962 (pre "") (post "") 6982 (pre "") (post "")
6963 words re0 re1 re2 re3 re4 re5 reall camel) 6983 words re0 re1 re2 re3 re4 re5 re2a reall camel)
6964 (cond ((save-excursion 6984 (cond ((save-excursion
6965 (goto-char (point-min)) 6985 (goto-char (point-min))
6966 (and 6986 (and
@@ -6995,11 +7015,13 @@ in all files."
6995 (org-split-string s "[ \n\r\t]+")) 7015 (org-split-string s "[ \n\r\t]+"))
6996 re0 (concat "<<" (regexp-quote s0) ">>") 7016 re0 (concat "<<" (regexp-quote s0) ">>")
6997 re2 (concat "\\<" (mapconcat 'downcase words "[ \t]+") "\\>") 7017 re2 (concat "\\<" (mapconcat 'downcase words "[ \t]+") "\\>")
7018 re2a (concat "\\<" (mapconcat 'downcase words "[ \t\r\n]+") "\\>")
6998 re4 (concat "\\<" (mapconcat 'downcase words "[^a-zA-Z_\r\n]+") "\\>") 7019 re4 (concat "\\<" (mapconcat 'downcase words "[^a-zA-Z_\r\n]+") "\\>")
6999 re1 (concat pre re2 post) 7020 re1 (concat pre re2 post)
7000 re3 (concat pre re4 post) 7021 re3 (concat pre re4 post)
7001 re5 (concat pre ".*" re4) 7022 re5 (concat pre ".*" re4)
7002 re2 (concat pre re2) 7023 re2 (concat pre re2)
7024 re2a (concat pre re2a)
7003 re4 (concat pre re4) 7025 re4 (concat pre re4)
7004 reall (concat "\\(" re0 "\\)\\|\\(" re1 "\\)\\|\\(" re2 7026 reall (concat "\\(" re0 "\\)\\|\\(" re1 "\\)\\|\\(" re2
7005 "\\)\\|\\(" re3 "\\)\\|\\(" re4 "\\)\\|\\(" 7027 "\\)\\|\\(" re3 "\\)\\|\\(" re4 "\\)\\|\\("
@@ -7009,12 +7031,14 @@ in all files."
7009 ((eq type 'org-occur) (org-occur reall)) 7031 ((eq type 'org-occur) (org-occur reall))
7010 ((eq type 'occur) (org-do-occur (downcase reall) 'cleanup)) 7032 ((eq type 'occur) (org-do-occur (downcase reall) 'cleanup))
7011 (t (goto-char (point-min)) 7033 (t (goto-char (point-min))
7012 (if (or (re-search-forward re0 nil t) 7034 (if (or (org-search-not-link re0 nil t)
7013 (re-search-forward re1 nil t) 7035 (org-search-not-link re1 nil t)
7014 (re-search-forward re2 nil t) 7036 (org-search-not-link re2 nil t)
7015 (re-search-forward re3 nil t) 7037 (org-search-not-link re2a nil t) ;; FIXME: Right place???
7016 (re-search-forward re4 nil t) 7038 (org-search-not-link re3 nil t)
7017 (re-search-forward re5 nil t)) 7039 (org-search-not-link re4 nil t)
7040 (org-search-not-link re5 nil t)
7041 )
7018 (goto-char (match-beginning 0)) 7042 (goto-char (match-beginning 0))
7019 (goto-char pos) 7043 (goto-char pos)
7020 (error "No match"))))) 7044 (error "No match")))))
@@ -7026,6 +7050,21 @@ in all files."
7026 (error "No match")))) 7050 (error "No match"))))
7027 (and (eq major-mode 'org-mode) (org-show-hierarchy-above)))) 7051 (and (eq major-mode 'org-mode) (org-show-hierarchy-above))))
7028 7052
7053(defun org-search-not-link (&rest args)
7054 "Execute `re-search-forward', but only accept matches that are not a link."
7055 (catch 'exit
7056 (let ((pos (point)) p1)
7057 (while (apply 're-search-forward args)
7058 (setq p1 (point))
7059 (if (not (save-match-data
7060 (and (re-search-backward "\\[\\[" nil t)
7061 (looking-at org-bracket-link-regexp)
7062 (<= (match-beginning 0) p1)
7063 (>= (match-end 0) p1))))
7064 (progn (goto-char (match-end 0))
7065 (throw 'exit (point)))
7066 (goto-char (match-end 0)))))))
7067
7029(defun org-do-occur (regexp &optional cleanup) 7068(defun org-do-occur (regexp &optional cleanup)
7030 "Call the Emacs command `occur'. 7069 "Call the Emacs command `occur'.
7031If CLEANUP is non-nil, remove the printout of the regular expression 7070If CLEANUP is non-nil, remove the printout of the regular expression
@@ -7284,24 +7323,32 @@ idea..."
7284 header-field))) 7323 header-field)))
7285 7324
7286(defun org-follow-mhe-link (folder article) 7325(defun org-follow-mhe-link (folder article)
7287 "Follow an MHE link to FOLDER and ARTICLE." 7326 "Follow an MHE link to FOLDER and ARTICLE.
7288 (setq article (org-add-angle-brackets article)) 7327If ARTICLE is nil FOLDER is shown. If the configuration variable
7328`org-mhe-search-all-folders' is t and `mh-searcher' is pick,
7329ARTICLE is searched in all folders. Indexed searches (swish++,
7330namazu, and others supported by MH-E) will always search in all
7331folders."
7289 (require 'mh-e) 7332 (require 'mh-e)
7290 (require 'mh-search) 7333 (require 'mh-search)
7334 (require 'mh-utils)
7291 (mh-find-path) 7335 (mh-find-path)
7292 (mh-search-choose) 7336 (if (not article)
7293 (if (equal mh-searcher 'pick) 7337 (mh-visit-folder (mh-normalize-folder-name folder))
7294 (progn 7338 (setq article (org-add-angle-brackets article))
7295 (mh-search folder (list "--message-id" article)) 7339 (mh-search-choose)
7296 (when (and org-mhe-search-all-folders 7340 (if (equal mh-searcher 'pick)
7297 (not (org-mhe-get-message-real-folder))) 7341 (progn
7298 (kill-this-buffer) 7342 (mh-search folder (list "--message-id" article))
7299 (mh-search "+" (list "--message-id" article)))) 7343 (when (and org-mhe-search-all-folders
7300 (mh-search "+" article)) 7344 (not (org-mhe-get-message-real-folder)))
7301 (if (org-mhe-get-message-real-folder) 7345 (kill-this-buffer)
7302 (mh-show-msg 1) 7346 (mh-search "+" (list "--message-id" article))))
7303 (kill-this-buffer) 7347 (mh-search "+" article))
7304 (error "Message not found"))) 7348 (if (org-mhe-get-message-real-folder)
7349 (mh-show-msg 1)
7350 (kill-this-buffer)
7351 (error "Message not found"))))
7305 7352
7306(defun org-open-file (path &optional in-emacs line search) 7353(defun org-open-file (path &optional in-emacs line search)
7307 "Open the file at PATH. 7354 "Open the file at PATH.
@@ -10563,7 +10610,7 @@ translations. There is currently no way for users to extend this.")
10563This will leave level 1 alone, convert level 2 to level 3, level 3 to 10610This will leave level 1 alone, convert level 2 to level 3, level 3 to
10564level 5 etc." 10611level 5 etc."
10565 (interactive) 10612 (interactive)
10566 (when (yes-or-no-p "Are you sure you want to globally change levels? ") 10613 (when (yes-or-no-p "Are you sure you want to globally change levels to odd? ")
10567 (let ((org-odd-levels-only nil) n) 10614 (let ((org-odd-levels-only nil) n)
10568 (save-excursion 10615 (save-excursion
10569 (goto-char (point-min)) 10616 (goto-char (point-min))
@@ -10573,6 +10620,28 @@ level 5 etc."
10573 (org-demote)) 10620 (org-demote))
10574 (end-of-line 1)))))) 10621 (end-of-line 1))))))
10575 10622
10623
10624(defun org-convert-to-oddeven-levels ()
10625 "Convert an org-mode file with only odd levels to one with odd and even levels.
10626This promotes level 3 to level 2, level 5 to level 3 etc. If the file contains a
10627section with an even level, conversion would destroy the structure of the file. An error
10628is signaled in this case."
10629 (interactive)
10630 (goto-char (point-min))
10631 ;; First check if there are no even levels
10632 (when (re-search-forward "^\\(\\*\\*\\)+[^*]" nil t)
10633 (org-show-hierarchy-above)
10634 (error "Not all levels are odd in this file. Conversion not possible."))
10635 (when (yes-or-no-p "Are you sure you want to globally change levels to odd-even? ")
10636 (let ((org-odd-levels-only nil) n)
10637 (save-excursion
10638 (goto-char (point-min))
10639 (while (re-search-forward "^\\*\\*+" nil t)
10640 (setq n (/ (length (match-string 0)) 2))
10641 (while (>= (setq n (1- n)) 0)
10642 (org-promote))
10643 (end-of-line 1))))))
10644
10576(defun org-tr-level (n) 10645(defun org-tr-level (n)
10577 "Make N odd if required." 10646 "Make N odd if required."
10578 (if org-odd-levels-only (1+ (/ n 2)) n)) 10647 (if org-odd-levels-only (1+ (/ n 2)) n))
@@ -10817,7 +10886,7 @@ Does include HTML export options as well as TODO and CATEGORY stuff."
10817#+CATEGORY: %s 10886#+CATEGORY: %s
10818#+SEQ_TODO: %s 10887#+SEQ_TODO: %s
10819#+TYP_TODO: %s 10888#+TYP_TODO: %s
10820#+STARTUP: %s %s 10889#+STARTUP: %s %s %s %s
10821#+ARCHIVE: %s 10890#+ARCHIVE: %s
10822" 10891"
10823 (buffer-name) (user-full-name) user-mail-address org-export-default-language 10892 (buffer-name) (user-full-name) user-mail-address org-export-default-language
@@ -10841,6 +10910,8 @@ Does include HTML export options as well as TODO and CATEGORY stuff."
10841 (cdr (assoc org-startup-folded 10910 (cdr (assoc org-startup-folded
10842 '((nil . "nofold")(t . "fold")(content . "content")))) 10911 '((nil . "nofold")(t . "fold")(content . "content"))))
10843 (if org-startup-with-deadline-check "dlcheck" "nodlcheck") 10912 (if org-startup-with-deadline-check "dlcheck" "nodlcheck")
10913 (if org-odd-levels-only "odd" "oddeven")
10914 (if org-hide-leading-stars "hidestars" "showstars")
10844 org-archive-location 10915 org-archive-location
10845 )) 10916 ))
10846 10917
@@ -10924,6 +10995,7 @@ headlines. The default is 3. Lower levels will become bulleted lists."
10924 (setq-default org-deadline-line-regexp org-deadline-line-regexp) 10995 (setq-default org-deadline-line-regexp org-deadline-line-regexp)
10925 (setq-default org-done-string org-done-string) 10996 (setq-default org-done-string org-done-string)
10926 (let* ((style org-export-html-style) 10997 (let* ((style org-export-html-style)
10998 (odd org-odd-levels-only)
10927 (region-p (org-region-active-p)) 10999 (region-p (org-region-active-p))
10928 (region 11000 (region
10929 (buffer-substring 11001 (buffer-substring
@@ -10987,7 +11059,8 @@ headlines. The default is 3. Lower levels will become bulleted lists."
10987 (switch-to-buffer-other-window buffer)) 11059 (switch-to-buffer-other-window buffer))
10988 (erase-buffer) 11060 (erase-buffer)
10989 (fundamental-mode) 11061 (fundamental-mode)
10990 (let ((case-fold-search nil)) 11062 (let ((case-fold-search nil)
11063 (org-odd-levels-only odd))
10991 (if options (org-parse-export-options options)) 11064 (if options (org-parse-export-options options))
10992 (setq umax (if arg (prefix-numeric-value arg) 11065 (setq umax (if arg (prefix-numeric-value arg)
10993 org-export-headline-levels)) 11066 org-export-headline-levels))
@@ -12372,7 +12445,8 @@ See the individual commands for more information."
12372 "--" 12445 "--"
12373 ["Archive Subtree" org-archive-subtree t] 12446 ["Archive Subtree" org-archive-subtree t]
12374 "--" 12447 "--"
12375 ["Convert file to odd levels" org-convert-to-odd-levels t]) 12448 ["Convert to odd levels" org-convert-to-odd-levels t]
12449 ["Convert to odd/even levels" org-convert-to-oddeven-levels t])
12376 "--" 12450 "--"
12377 ("TODO Lists" 12451 ("TODO Lists"
12378 ["TODO/DONE/-" org-todo t] 12452 ["TODO/DONE/-" org-todo t]
@@ -12851,3 +12925,4 @@ Show the heading too, if it is currently invisible."
12851 12925
12852;; arch-tag: e77da1a7-acc7-4336-b19e-efa25af3f9fd 12926;; arch-tag: e77da1a7-acc7-4336-b19e-efa25af3f9fd
12853;;; org.el ends here 12927;;; org.el ends here
12928
diff --git a/lisp/tree-widget.el b/lisp/tree-widget.el
index b868369fc4a..5fcb2dc8bf1 100644
--- a/lisp/tree-widget.el
+++ b/lisp/tree-widget.el
@@ -140,10 +140,9 @@
140 data-directory))) 140 data-directory)))
141 (and dir (list dir (expand-file-name "images" dir)))) 141 (and dir (list dir (expand-file-name "images" dir))))
142 ) 142 )
143 "List of locations where to search for the themes sub-directory. 143 "List of locations in which to search for the themes sub-directory.
144Each element is an expression that will be evaluated to return a 144Each element is an expression that will be recursively evaluated until
145single directory or a list of directories to search. 145it returns a single directory or a list of directories.
146
147The default is to search in the `load-path' first, then in the 146The default is to search in the `load-path' first, then in the
148\"images\" sub directory in the data directory, then in the data 147\"images\" sub directory in the data directory, then in the data
149directory. 148directory.
@@ -152,22 +151,22 @@ Emacs, and what `(locate-data-directory \"tree-widget\")' returns on
152XEmacs.") 151XEmacs.")
153 152
154(defcustom tree-widget-themes-directory "tree-widget" 153(defcustom tree-widget-themes-directory "tree-widget"
155 "*Name of the directory where to look up for image themes. 154 "*Name of the directory in which to look for an image theme.
156When nil use the directory where the tree-widget library is located. 155When nil use the directory where the tree-widget library is located.
157When a relative name is specified, try to locate that sub directory in 156When it is a relative name, search in all occurrences of that sub
158the locations specified in `tree-widget-themes-load-path'. 157directory in the path specified by `tree-widget-themes-load-path'.
159The default is to use the \"tree-widget\" relative name." 158The default is to use the \"tree-widget\" relative name."
160 :type '(choice (const :tag "Default" "tree-widget") 159 :type '(choice (const :tag "Default" "tree-widget")
161 (const :tag "With the library" nil) 160 (const :tag "Where is this library" nil)
162 (directory :format "%{%t%}:\n%v")) 161 (directory :format "%{%t%}:\n%v"))
163 :group 'tree-widget) 162 :group 'tree-widget)
164 163
165(defcustom tree-widget-theme nil 164(defcustom tree-widget-theme nil
166 "*Name of the theme where to look up for images. 165 "*Name of the theme in which to look for images.
167It must be a sub directory of the directory specified in variable 166This is a sub directory of the themes directory specified by the
168`tree-widget-themes-directory'. The default theme is \"default\". 167`tree-widget-themes-directory' option.
169When an image is not found in a theme, it is searched in the default 168The default theme is \"default\". When an image is not found in a
170theme. 169theme, it is searched in its parent theme.
171 170
172A complete theme must at least contain images with these file names 171A complete theme must at least contain images with these file names
173with a supported extension (see also `tree-widget-image-formats'): 172with a supported extension (see also `tree-widget-image-formats'):
@@ -275,10 +274,15 @@ The default parent theme is the \"default\" theme."
275 (unless (member name (aref tree-widget--theme 0)) 274 (unless (member name (aref tree-widget--theme 0))
276 (aset tree-widget--theme 0 275 (aset tree-widget--theme 0
277 (append (aref tree-widget--theme 0) (list name))) 276 (append (aref tree-widget--theme 0) (list name)))
278 ;; Load the theme setup 277 ;; Load the theme setup from the first directory where the theme
279 (let ((default-directory (tree-widget-themes-directory))) 278 ;; is found.
280 (when default-directory 279 (catch 'found
281 (load (expand-file-name "tree-widget-theme-setup" name) t))))) 280 (dolist (dir (tree-widget-themes-path))
281 (setq dir (expand-file-name name dir))
282 (when (file-accessible-directory-p dir)
283 (throw 'found
284 (load (expand-file-name
285 "tree-widget-theme-setup" dir) t)))))))
282 286
283(defun tree-widget-set-theme (&optional name) 287(defun tree-widget-set-theme (&optional name)
284 "In the current buffer, set the theme to use for images. 288 "In the current buffer, set the theme to use for images.
@@ -304,54 +308,62 @@ Typically it should contain something like this:
304 (tree-widget-set-parent-theme name) 308 (tree-widget-set-parent-theme name)
305 (tree-widget-set-parent-theme "default"))) 309 (tree-widget-set-parent-theme "default")))
306 310
307(defun tree-widget--locate-sub-directory (name path) 311(defun tree-widget--locate-sub-directory (name path &optional found)
308 "Locate the sub-directory NAME in PATH. 312 "Locate all occurrences of the sub-directory NAME in PATH.
309Return the absolute name of the directory found, or nil if not found." 313Return a list of absolute directory names in reverse order, or nil if
310 (let (dir elt) 314not found."
311 (while (and (not dir) (consp path)) 315 (condition-case err
312 (setq elt (condition-case nil (eval (car path)) (error nil)) 316 (dolist (elt path)
313 path (cdr path)) 317 (setq elt (eval elt))
314 (cond 318 (cond
315 ((stringp elt) 319 ((stringp elt)
316 (setq dir (expand-file-name name elt)) 320 (and (file-accessible-directory-p
317 (or (file-accessible-directory-p dir) 321 (setq elt (expand-file-name name elt)))
318 (setq dir nil))) 322 (push elt found)))
319 ((and elt (not (equal elt (car path)))) 323 (elt
320 (setq dir (tree-widget--locate-sub-directory name elt))))) 324 (setq found (tree-widget--locate-sub-directory
321 dir)) 325 name (if (atom elt) (list elt) elt) found)))))
322 326 (error
323(defun tree-widget-themes-directory () 327 (message "In tree-widget--locate-sub-directory: %s"
324 "Locate the directory where to search for a theme. 328 (error-message-string err))))
325It is defined in variable `tree-widget-themes-directory'. 329 found)
326Return the absolute name of the directory found, or nil if the 330
327specified directory is not accessible." 331(defun tree-widget-themes-path ()
328 (let ((found (aref tree-widget--theme 1))) 332 "Return the path where to search for a theme.
333It is specified in variable `tree-widget-themes-directory'.
334Return a list of absolute directory names, or nil when no directory
335has been found accessible."
336 (let ((path (aref tree-widget--theme 1)))
329 (cond 337 (cond
330 ;; The directory was not found. 338 ;; No directory was found.
331 ((eq found 'void) 339 ((eq path 'void) nil)
332 (setq found nil)) 340 ;; The list of directories is available in the cache.
333 ;; The directory is available in the cache. 341 (path)
334 (found)
335 ;; Use the directory where this library is located. 342 ;; Use the directory where this library is located.
336 ((null tree-widget-themes-directory) 343 ((null tree-widget-themes-directory)
337 (setq found (locate-library "tree-widget")) 344 (when (setq path (locate-library "tree-widget"))
338 (when found 345 (setq path (file-name-directory path))
339 (setq found (file-name-directory found)) 346 (setq path (and (file-accessible-directory-p path)
340 (or (file-accessible-directory-p found) 347 (list path)))
341 (setq found nil)))) 348 ;; Store the result in the cache for later use.
349 (aset tree-widget--theme 1 (or path 'void))
350 path))
342 ;; Check accessibility of absolute directory name. 351 ;; Check accessibility of absolute directory name.
343 ((file-name-absolute-p tree-widget-themes-directory) 352 ((file-name-absolute-p tree-widget-themes-directory)
344 (setq found (expand-file-name tree-widget-themes-directory)) 353 (setq path (expand-file-name tree-widget-themes-directory))
345 (or (file-accessible-directory-p found) 354 (setq path (and (file-accessible-directory-p path)
346 (setq found nil))) 355 (list path)))
356 ;; Store the result in the cache for later use.
357 (aset tree-widget--theme 1 (or path 'void))
358 path)
347 ;; Locate a sub-directory in `tree-widget-themes-load-path'. 359 ;; Locate a sub-directory in `tree-widget-themes-load-path'.
348 (t 360 (t
349 (setq found (tree-widget--locate-sub-directory 361 (setq path (nreverse (tree-widget--locate-sub-directory
350 tree-widget-themes-directory 362 tree-widget-themes-directory
351 tree-widget-themes-load-path)))) 363 tree-widget-themes-load-path)))
352 ;; Store the result in the cache for later use. 364 ;; Store the result in the cache for later use.
353 (aset tree-widget--theme 1 (or found 'void)) 365 (aset tree-widget--theme 1 (or path 'void))
354 found)) 366 path))))
355 367
356(defconst tree-widget--cursors 368(defconst tree-widget--cursors
357 ;; Pointer shapes when the mouse pointer is over inactive 369 ;; Pointer shapes when the mouse pointer is over inactive
@@ -391,20 +403,19 @@ Search first in current theme, then in parent themes (see also the
391function `tree-widget-set-parent-theme'). 403function `tree-widget-set-parent-theme').
392Return the first image found having a supported format, or nil if not 404Return the first image found having a supported format, or nil if not
393found." 405found."
394 (let ((default-directory (tree-widget-themes-directory)) file) 406 (catch 'found
395 (when default-directory 407 (dolist (default-directory (tree-widget-themes-path))
396 (catch 'found 408 (dolist (dir (aref tree-widget--theme 0))
397 (dolist (dir (aref tree-widget--theme 0)) 409 (dolist (fmt (tree-widget-image-formats))
398 (dolist (fmt (tree-widget-image-formats)) 410 (dolist (ext (cdr fmt))
399 (dolist (ext (cdr fmt)) 411 (setq file (expand-file-name (concat name ext) dir))
400 (setq file (expand-file-name (concat name ext) dir)) 412 (and (file-readable-p file)
401 (and (file-readable-p file) 413 (file-regular-p file)
402 (file-regular-p file) 414 (throw 'found
403 (throw 'found 415 (tree-widget-create-image
404 (tree-widget-create-image 416 (car fmt) file
405 (car fmt) file 417 (tree-widget-image-properties name))))))))
406 (tree-widget-image-properties name))))))) 418 nil))
407 nil))))
408 419
409(defun tree-widget-find-image (name) 420(defun tree-widget-find-image (name)
410 "Find the image with NAME in current theme. 421 "Find the image with NAME in current theme.
diff --git a/lispref/ChangeLog b/lispref/ChangeLog
index 23e6b78b130..9d07a2d59c8 100644
--- a/lispref/ChangeLog
+++ b/lispref/ChangeLog
@@ -1,3 +1,21 @@
12006-03-14 Bill Wohler <wohler@newt.com>
2
3 * display.texi (Defining Images): In image-load-path-for-library,
4 always return list of directories. Update example.
5
62006-03-14 Alan Mackenzie <acm@muc.de>
7
8 * modes.texi: New node, "Region to Fontify" (for Font Lock).
9 This describes font-lock-extend-region-function.
10 ("Other Font Lock Variables"): move "font-lock-lines-before" to
11 the new node "Region to Fontify".
12
132006-03-13 Richard Stallman <rms@gnu.org>
14
15 * display.texi (Invisible Text): The impossible position is
16 now before the invisible text, not after.
17 (Defining Images): Clean up last change.
18
12006-03-11 Bill Wohler <wohler@newt.com> 192006-03-11 Bill Wohler <wohler@newt.com>
2 20
3 * display.texi (Defining Images): Add image-load-path-for-library. 21 * display.texi (Defining Images): Add image-load-path-for-library.
diff --git a/lispref/display.texi b/lispref/display.texi
index cd46be95b05..294a6d64e7e 100644
--- a/lispref/display.texi
+++ b/lispref/display.texi
@@ -800,15 +800,15 @@ explicitly ignore invisible newlines if
800@code{line-move-ignore-invisible} is non-@code{nil} (the default), but 800@code{line-move-ignore-invisible} is non-@code{nil} (the default), but
801only because they are explicitly programmed to do so. 801only because they are explicitly programmed to do so.
802 802
803 However, if a command ends with point inside or immediately after 803 However, if a command ends with point inside or immediately before
804invisible text, the main editing loop moves point further forward or 804invisible text, the main editing loop moves point further forward or
805further backward (in the same direction that the command already moved 805further backward (in the same direction that the command already moved
806it) until that condition is no longer true. Thus, if the command 806it) until that condition is no longer true. Thus, if the command
807moved point back into an invisible range, Emacs moves point back to 807moved point back into an invisible range, Emacs moves point back to
808the beginning of that range, following the previous visible character. 808the beginning of that range, and then back one more character. If the
809If the command moved point forward into an invisible range, Emacs 809command moved point forward into an invisible range, Emacs moves point
810moves point forward past the first visible character that follows the 810forward up to the first visible character that follows the invisible
811invisible text. 811text.
812 812
813 Incremental search can make invisible overlays visible temporarily 813 Incremental search can make invisible overlays visible temporarily
814and/or permanently when a match includes invisible text. To enable 814and/or permanently when a match includes invisible text. To enable
@@ -4127,30 +4127,32 @@ should specify the image as follows:
4127 4127
4128@defun image-load-path-for-library library image &optional path no-error 4128@defun image-load-path-for-library library image &optional path no-error
4129@tindex image-load-path-for-library 4129@tindex image-load-path-for-library
4130Return a suitable search path for images relative to @var{library}. 4130This function returns a suitable search path for images relative to
4131@var{library}.
4131 4132
4132Images for @var{library} are searched for in @file{../../etc/images} 4133First it searches for @var{image} in a path suitable for
4133and @file{../etc/images} relative to the files in 4134@var{library}, which includes @file{../../etc/images} and
4134@file{lisp/@var{library}} as well as in @code{image-load-path} and 4135@file{../etc/images} relative to the library file itself, followed by
4135@var{load-path}. 4136@code{image-load-path} and @code{load-path}.
4136 4137
4137This function returns the value of @code{load-path} augmented with the 4138Then this function returns a list of directories which contains first
4138directory containing @var{image}. If @var{path} is given, it is used 4139the directory in which @var{image} was found, followed by the value of
4139instead of @code{load-path}. If @code{path} is @code{t}, just return 4140@code{load-path}. If @var{path} is given, it is used instead of
4140the directory that contains @var{image}. 4141@code{load-path}.
4141 4142
4142If @var{no-error} is non-nil, this function returns @code{nil} if a 4143If @var{no-error} is non-@code{nil} and a suitable path can't be
4143suitable path can't be found rather than signaling an error. 4144found, don't signal an error. Instead, return a list of directories as
4145before, except that @code{nil} appears in place of the image directory.
4144 4146
4145Here is an example that uses a common idiom to provide compatibility 4147Here is an example that uses a common idiom to provide compatibility
4146with versions of Emacs that lack the variable @code{image-load-path}: 4148with versions of Emacs that lack the variable @code{image-load-path}:
4147 4149
4148@example 4150@example
4149(let ((load-path 4151;; Avoid errors on Emacsen without `image-load-path'.
4150 (image-load-path-for-library "mh-e" "mh-logo.xpm")) 4152(if (not (boundp 'image-load-path)) (defvar image-load-path nil))
4151 (image-load-path 4153
4152 (image-load-path-for-library "mh-e" "mh-logo.xpm" 4154(let* ((load-path (image-load-path-for-library "mh-e" "mh-logo.xpm"))
4153 'image-load-path))) 4155 (image-load-path (cons (car load-path) image-load-path)))
4154 (mh-tool-bar-folder-buttons-init)) 4156 (mh-tool-bar-folder-buttons-init))
4155@end example 4157@end example
4156@end defun 4158@end defun
diff --git a/lispref/modes.texi b/lispref/modes.texi
index b9eb33dcb88..e15392ac85a 100644
--- a/lispref/modes.texi
+++ b/lispref/modes.texi
@@ -2337,6 +2337,8 @@ Search-based fontification happens second.
2337* Font Lock Basics:: Overview of customizing Font Lock. 2337* Font Lock Basics:: Overview of customizing Font Lock.
2338* Search-based Fontification:: Fontification based on regexps. 2338* Search-based Fontification:: Fontification based on regexps.
2339* Customizing Keywords:: Customizing search-based fontification. 2339* Customizing Keywords:: Customizing search-based fontification.
2340* Region to Fontify:: Controlling which region gets refontified
2341 after a buffer change.
2340* Other Font Lock Variables:: Additional customization facilities. 2342* Other Font Lock Variables:: Additional customization facilities.
2341* Levels of Font Lock:: Each mode can define alternative levels 2343* Levels of Font Lock:: Each mode can define alternative levels
2342 so that the user can select more or less. 2344 so that the user can select more or less.
@@ -2717,6 +2719,46 @@ C mode @emph{and} all modes derived from it, do this instead:
2717 font-lock-keyword-face))))) 2719 font-lock-keyword-face)))))
2718@end smallexample 2720@end smallexample
2719 2721
2722@node Region to Fontify
2723@subsection Region to Fontify after a Buffer Change
2724
2725 When a buffer is changed, the region that Font Lock refontifies is by
2726default the smallest sequence of whole lines that spans the change.
2727While this works well most of the time, sometimes it doesn't---for
2728example, when a buffer change has changed the syntactic meaning of text
2729on an earlier line.
2730
2731You can enlarge (or even reduce) the region to fontify by setting either
2732of the following variables:
2733
2734@defvar font-lock-lines-before
2735This variable specifies the number of extra lines to consider when
2736refontifying the buffer after each text change. Font lock begins
2737refontifying from that number of lines before the changed region. The
2738default is 0, but using a larger value can be useful for coping with
2739multi-line patterns. This variable is ignored whenever
2740@code{font-lock-extend-region-function} is set and returns a
2741non-@code{nil} value.
2742@end defvar
2743
2744@defvar font-lock-extend-region-function
2745This buffer-local variable is either @code{nil} or is a function that
2746determines the region to fontify, which Emacs then calls after each
2747buffer change.
2748
2749The function is given three parameters, the standard @var{beg},
2750@var{end}, and @var{old-len} from after-change-functions (@pxref{Change
2751Hooks}). It should return either a cons of the beginning and end buffer
2752positions (in that order) of the region to fontify, or @code{nil} (which
2753directs the caller to fontify the default region). This function need
2754not preserve point or the match-data, but must preserve the current
2755restriction. The region it returns may start or end in the middle of a
2756line.
2757
2758Since this function is called after every buffer change, it should be
2759reasonably fast.
2760@end defvar
2761
2720@node Other Font Lock Variables 2762@node Other Font Lock Variables
2721@subsection Other Font Lock Variables 2763@subsection Other Font Lock Variables
2722 2764
@@ -2772,14 +2814,6 @@ arguments, the beginning and end of the region. The default value is
2772@code{font-lock-default-unfontify-region}. 2814@code{font-lock-default-unfontify-region}.
2773@end defvar 2815@end defvar
2774 2816
2775@defvar font-lock-lines-before
2776This variable specifies the number of extra lines to consider when
2777refontifying the buffer after each text change. Font lock begins
2778refontifying from that number of lines before the changed region. The
2779default is 0, but using a larger value can be useful for coping with
2780multi-line patterns.
2781@end defvar
2782
2783@ignore 2817@ignore
2784@defvar font-lock-inhibit-thing-lock 2818@defvar font-lock-inhibit-thing-lock
2785List of Font Lock mode related modes that should not be turned on. 2819List of Font Lock mode related modes that should not be turned on.
diff --git a/man/ChangeLog b/man/ChangeLog
index 385a8c81ea0..7eddcae6b5e 100644
--- a/man/ChangeLog
+++ b/man/ChangeLog
@@ -1,3 +1,35 @@
12006-03-14 Bill Wohler <wohler@newt.com>
2
3 * mh-e.texi: Add index entries around each paragraph rather than
4 depend on entries from beginning of node. Doing so ensures that
5 index entries are less likely to be forgotten if text is cut and
6 pasted, and are necessary anyway if the references are on a
7 separate page. It seems that makeinfo is now (v. 4.8) only
8 producing one index entry per node, so there is no longer any
9 excuse not to. Use subheading instead of heading. The incorrect
10 use of heading produced very large fonts in Info--as large as the
11 main heading.
12 (From Bill Wohler): MH-E never did appear in Emacs 21--MH-E
13 versions 6 and 7 appeared *around* the time of these Emacs
14 releases.
15
162006-03-13 Carsten Dominik <dominik@science.uva.nl>
17
18 * org.texi (Clean view): Document new startup options.
19
202006-03-11 Bill Wohler <wohler@newt.com>
21
22 * mh-e.texi (Preface, More About MH-E, Options, HTML, Folders)
23 (Composing, Scan Line Formats): Fix @refs.
24 (Getting Started): Define MH profile and MH profile components.
25 (Incorporating Mail, Reading Mail, Viewing, Printing)
26 (Sending Mail, Forwarding, Editing Drafts, Inserting Letter)
27 (Signature, Aliases, Scan Line Formats): Use @code instead of @samp
28 for string constants.
29 (Tool Bar): Remove spurious quote.
30 (Junk): Use ``...'' instead of "...".
31 (Scan Line Formats): Replace @samp with @kbd.
32
12006-03-11 Luc Teirlinck <teirllm@auburn.edu> 332006-03-11 Luc Teirlinck <teirllm@auburn.edu>
2 34
3 * search.texi (Regexps): Use @samp for regexp that is not in Lisp 35 * search.texi (Regexps): Use @samp for regexp that is not in Lisp
diff --git a/man/calendar.texi b/man/calendar.texi
index 988a509ca02..23aeb191e86 100644
--- a/man/calendar.texi
+++ b/man/calendar.texi
@@ -24,7 +24,7 @@ particular date; @kbd{Mouse-3} brings up a menu of commonly used
24calendar features that are independent of any particular date. To exit 24calendar features that are independent of any particular date. To exit
25the calendar, type @kbd{q}. 25the calendar, type @kbd{q}.
26 26
27The basic features of the Calendar/Diary are described here. 27 This chapter describes the basic calendar features.
28@inforef{Advanced Calendar/Diary Usage,, emacs-xtra}, for information 28@inforef{Advanced Calendar/Diary Usage,, emacs-xtra}, for information
29about more specialized features. 29about more specialized features.
30 30
@@ -49,13 +49,13 @@ about more specialized features.
49@section Movement in the Calendar 49@section Movement in the Calendar
50 50
51@cindex moving inside the calendar 51@cindex moving inside the calendar
52 Calendar mode lets you move through the calendar in logical units of 52 Calendar mode provides commands to move through the calendar in
53time such as days, weeks, months, and years. If you move outside the 53logical units of time such as days, weeks, months, and years. If you
54three months originally displayed, the calendar display ``scrolls'' 54move outside the three months originally displayed, the calendar
55automatically through time to make the selected date visible. Moving to 55display ``scrolls'' automatically through time to make the selected
56a date lets you view its holidays or diary entries, or convert it to other 56date visible. Moving to a date lets you view its holidays or diary
57calendars; moving longer time periods is also useful simply to scroll the 57entries, or convert it to other calendars; moving by long time periods
58calendar. 58is also useful simply to scroll the calendar.
59 59
60@menu 60@menu
61* Calendar Unit Motion:: Moving by days, weeks, months, and years. 61* Calendar Unit Motion:: Moving by days, weeks, months, and years.
@@ -117,16 +117,16 @@ moves to the same day in the previous week.
117@findex calendar-forward-year 117@findex calendar-forward-year
118 The commands for motion by months and years work like those for 118 The commands for motion by months and years work like those for
119weeks, but move a larger distance. The month commands @kbd{M-@}} and 119weeks, but move a larger distance. The month commands @kbd{M-@}} and
120@kbd{M-@{} move forward or backward by an entire month's time. The 120@kbd{M-@{} move forward or backward by an entire month. The year
121year commands @kbd{C-x ]} and @w{@kbd{C-x [}} move forward or backward a 121commands @kbd{C-x ]} and @w{@kbd{C-x [}} move forward or backward a
122whole year. 122whole year.
123 123
124 The easiest way to remember these commands is to consider months and 124 The easiest way to remember these commands is to consider months and
125years analogous to paragraphs and pages of text, respectively. But the 125years analogous to paragraphs and pages of text, respectively. But
126commands themselves are not quite analogous. The ordinary Emacs paragraph 126the commands themselves are not quite analogous. The ordinary Emacs
127commands move to the beginning or end of a paragraph, whereas these month 127paragraph commands move to the beginning or end of a paragraph,
128and year commands move by an entire month or an entire year, which usually 128whereas these month and year commands move by an entire month or an
129involves skipping across the end of a month or year. 129entire year, keeping the same date within the month or year.
130 130
131 All these commands accept a numeric argument as a repeat count. 131 All these commands accept a numeric argument as a repeat count.
132For convenience, the digit keys and the minus sign specify numeric 132For convenience, the digit keys and the minus sign specify numeric
@@ -313,8 +313,8 @@ Exit from calendar (@code{exit-calendar}).
313 To display the number of days elapsed since the start of the year, or 313 To display the number of days elapsed since the start of the year, or
314the number of days remaining in the year, type the @kbd{p d} command 314the number of days remaining in the year, type the @kbd{p d} command
315(@code{calendar-print-day-of-year}). This displays both of those 315(@code{calendar-print-day-of-year}). This displays both of those
316numbers in the echo area. The number of days elapsed includes the 316numbers in the echo area. The count of days elapsed includes the
317selected date. The number of days remaining does not include that 317selected date. The count of days remaining does not include that
318date. 318date.
319 319
320@kindex C-c C-l @r{(Calendar mode)} 320@kindex C-c C-l @r{(Calendar mode)}
@@ -432,8 +432,7 @@ date in the calendar window and use the @kbd{h} command. Alternatively,
432click on that date with @kbd{Mouse-2} and then choose @kbd{Holidays} 432click on that date with @kbd{Mouse-2} and then choose @kbd{Holidays}
433from the menu that appears. Either way, this displays the holidays for 433from the menu that appears. Either way, this displays the holidays for
434that date, in the echo area if they fit there, otherwise in a separate 434that date, in the echo area if they fit there, otherwise in a separate
435window. If the variable @code{view-calendar-holidays-initially} is 435window.
436non-@code{nil}, creating the calendar displays holidays in this way.
437 436
438@kindex x @r{(Calendar mode)} 437@kindex x @r{(Calendar mode)}
439@findex mark-calendar-holidays 438@findex mark-calendar-holidays
@@ -462,9 +461,11 @@ calendar window to scroll that list up and down, respectively.
462@findex holidays 461@findex holidays
463 The command @kbd{M-x holidays} displays the list of holidays for the 462 The command @kbd{M-x holidays} displays the list of holidays for the
464current month and the preceding and succeeding months; this works even 463current month and the preceding and succeeding months; this works even
465if you don't have a calendar window. If you want the list of holidays 464if you don't have a calendar window. If the variable
466centered around a different month, use @kbd{C-u M-x holidays}, which 465@code{view-calendar-holidays-initially} is non-@code{nil}, creating
467prompts for the month and year. 466the calendar displays holidays in this way. If you want the list of
467holidays centered around a different month, use @kbd{C-u M-x
468holidays}, which prompts for the month and year.
468 469
469 The holidays known to Emacs include United States holidays and the 470 The holidays known to Emacs include United States holidays and the
470major Christian, Jewish, and Islamic holidays; also the solstices and 471major Christian, Jewish, and Islamic holidays; also the solstices and
@@ -1017,7 +1018,7 @@ following day.
1017@kbd{Mouse-2} on the date, and then choose @kbd{Diary entries} from 1018@kbd{Mouse-2} on the date, and then choose @kbd{Diary entries} from
1018the menu that appears. If the variable 1019the menu that appears. If the variable
1019@code{view-diary-entries-initially} is non-@code{nil}, creating the 1020@code{view-diary-entries-initially} is non-@code{nil}, creating the
1020calendar also lists diary entries for the current date (provided the 1021calendar lists the diary entries for the current date (provided the
1021current date is visible). 1022current date is visible).
1022 1023
1023@kindex m @r{(Calendar mode)} 1024@kindex m @r{(Calendar mode)}
@@ -1371,10 +1372,10 @@ begins with a recognizable time of day, Emacs can warn you several
1371minutes beforehand that that appointment is pending. Emacs alerts you 1372minutes beforehand that that appointment is pending. Emacs alerts you
1372to the appointment by displaying a message in your chosen format, as 1373to the appointment by displaying a message in your chosen format, as
1373specified by the variable @code{appt-display-format}. If the value of 1374specified by the variable @code{appt-display-format}. If the value of
1374@code{appt-audible} is non-@code{nil}, an audible reminder is also 1375@code{appt-audible} is non-@code{nil}, the warning includes an audible
1375given. In addition, if @code{appt-display-mode-line} is non-@code{nil}, 1376reminder. In addition, if @code{appt-display-mode-line} is
1376Emacs displays the number of minutes to the appointment on the mode 1377non-@code{nil}, Emacs displays the number of minutes to the
1377line. 1378appointment on the mode line.
1378 1379
1379@vindex appt-display-duration 1380@vindex appt-display-duration
1380@vindex appt-disp-window-function 1381@vindex appt-disp-window-function
@@ -1387,12 +1388,12 @@ give the names of functions used to create and destroy the window,
1387respectively. 1388respectively.
1388 1389
1389@findex appt-activate 1390@findex appt-activate
1390 To enable appointment notification, call the function 1391 To enable appointment notification, use the command @kbd{M-x
1391@code{appt-activate} with a positive argument. This sets up an 1392appt-activate}. With a positive argument, it enables notification;
1392appointment list for today from the diary file, giving all diary entries 1393with a negative argument, it disables notification; with no argument,
1393found with recognizable times of day, and reminds you just before each 1394it toggles. Enabling notification also sets up an appointment list
1394of them. Calling @code{appt-activate} with a negative argument disables 1395for today from the diary file, giving all diary entries found with
1395the appointment package. With no argument, it toggles. 1396recognizable times of day, and reminds you just before each of them.
1396 1397
1397 For example, suppose the diary file contains these lines: 1398 For example, suppose the diary file contains these lines:
1398 1399
@@ -1404,10 +1405,10 @@ Monday
1404 1405
1405@vindex appt-message-warning-time 1406@vindex appt-message-warning-time
1406@noindent 1407@noindent
1407Then on Mondays, you will be reminded at around 9:20am about your coffee 1408Then on Mondays, you will be reminded at around 9:20am about your
1408break and at around 11:50am about lunch. How many minutes in advance you 1409coffee break and at around 11:50am about lunch. The variable
1409are first warned is determined by the value of 1410@code{appt-message-warning-time} specifies how many minutes in advance
1410@code{appt-message-warning-time}. 1411to warn you; its default value is 12 (12 minutes).
1411 1412
1412 You can write times in am/pm style (with @samp{12:00am} standing 1413 You can write times in am/pm style (with @samp{12:00am} standing
1413for midnight and @samp{12:00pm} standing for noon), or 24-hour 1414for midnight and @samp{12:00pm} standing for noon), or 24-hour
@@ -1416,12 +1417,12 @@ can have a mixture of the two styles. Times must be at the beginning
1416of lines if they are to be recognized. 1417of lines if they are to be recognized.
1417 1418
1418@vindex appt-display-diary 1419@vindex appt-display-diary
1419 Emacs updates the appointments list from the diary file automatically 1420 Emacs updates the appointments list from the diary file
1420just after midnight. An update can be forced at any time by 1421automatically just after midnight. You can force an update at any
1421re-activating the appointment package. Both these actions also display 1422time by re-enabling appointment notification. Both these actions also
1422the day's diary buffer, unless you set @code{appt-display-diary} to 1423display the day's diary buffer, unless you set
1423@code{nil}. The appointments list is also updated whenever the 1424@code{appt-display-diary} to @code{nil}. The appointments list is
1424diary file is saved. 1425also updated whenever the diary file is saved.
1425 1426
1426@findex appt-add 1427@findex appt-add
1427@findex appt-delete 1428@findex appt-delete
@@ -1450,11 +1451,11 @@ diary file and iCalendar files, which are defined in ``RFC
14502445---Internet Calendaring and Scheduling Core Object Specification 14512445---Internet Calendaring and Scheduling Core Object Specification
1451(iCalendar)'' (as well as the earlier vCalendar format). 1452(iCalendar)'' (as well as the earlier vCalendar format).
1452 1453
1453 Importing works for ``ordinary'' (i.e. non-recurring) events, but (at 1454 Importing works for ``ordinary'' (i.e. non-recurring) events, but
1454present) may not work correctly (if at all) for recurring events. 1455(at present) may not work correctly (if at all) for recurring events.
1455Exporting of diary files into iCalendar files should work correctly for 1456Exporting of diary files into iCalendar files should work correctly
1456most diary entries. Please note that @file{icalendar.el} is work in 1457for most diary entries. This feature is a work in progress, so the
1457progress, so usage may evolve in future. 1458commands may evolve in future.
1458 1459
1459@findex icalendar-import-buffer 1460@findex icalendar-import-buffer
1460 The command @code{icalendar-import-buffer} extracts 1461 The command @code{icalendar-import-buffer} extracts
@@ -1476,7 +1477,7 @@ and adds the results to an Emacs diary file. For example:
1476 1477
1477@noindent 1478@noindent
1478You can use an @code{#include} directive to add the import file contents 1479You can use an @code{#include} directive to add the import file contents
1479to the main diary file, if these are distinct. @inforef{Fancy Diary 1480to the main diary file, if these are different files. @inforef{Fancy Diary
1480Display,, emacs-xtra}. 1481Display,, emacs-xtra}.
1481 1482
1482@findex icalendar-export-file, icalendar-export-region 1483@findex icalendar-export-file, icalendar-export-region
@@ -1485,7 +1486,6 @@ Emacs diary file to iCalendar format. To export only a part of a diary
1485file, mark the relevant area, and call @code{icalendar-export-region}. 1486file, mark the relevant area, and call @code{icalendar-export-region}.
1486In both cases the result is appended to the target file. 1487In both cases the result is appended to the target file.
1487 1488
1488
1489@node Daylight Savings 1489@node Daylight Savings
1490@section Daylight Savings Time 1490@section Daylight Savings Time
1491@cindex daylight savings time 1491@cindex daylight savings time
@@ -1560,7 +1560,8 @@ values are 120.
1560@cindex timeclock 1560@cindex timeclock
1561 1561
1562 The timeclock feature adds up time intervals, so you can (for 1562 The timeclock feature adds up time intervals, so you can (for
1563instance) keep track of how much time you spend working. 1563instance) keep track of how much time you spend working on particular
1564projects.
1564 1565
1565@findex timeclock-in 1566@findex timeclock-in
1566@findex timeclock-out 1567@findex timeclock-out
@@ -1586,11 +1587,11 @@ workday in the mode line, either customize the
1586@code{t}, or invoke the @kbd{M-x timeclock-modeline-display} command. 1587@code{t}, or invoke the @kbd{M-x timeclock-modeline-display} command.
1587 1588
1588@vindex timeclock-ask-before-exiting 1589@vindex timeclock-ask-before-exiting
1589 Terminating the current Emacs session might or might not mean that you 1590 Terminating the current Emacs session might or might not mean that
1590have stopped working on the project and, by default, Emacs queries this. 1591you have stopped working on the project and, by default, Emacs asks
1591You can, however, set the value of the variable 1592you. You can, however, set the value of the variable
1592@code{timeclock-ask-before-exiting} to @code{nil} (via @kbd{M-x 1593@code{timeclock-ask-before-exiting} to @code{nil} (via @kbd{M-x
1593customize}) to avoid this behavior; then, only an explicit @kbd{M-x 1594customize}) to avoid the question; then, only an explicit @kbd{M-x
1594timeclock-out} or @kbd{M-x timeclock-change} will tell Emacs that the 1595timeclock-out} or @kbd{M-x timeclock-change} will tell Emacs that the
1595current interval is over. 1596current interval is over.
1596 1597
diff --git a/man/mh-e.texi b/man/mh-e.texi
index df0595a5c70..be1d61d930c 100644
--- a/man/mh-e.texi
+++ b/man/mh-e.texi
@@ -9,10 +9,10 @@
9 9
10@c Version of the software and manual. 10@c Version of the software and manual.
11@set VERSION 7.93 11@set VERSION 7.93
12@c EDITION of the manual. It is either empty for the first edition or 12@c Edition of the manual. It is either empty for the first edition or
13@c has the form ", nth Edition" (without the quotes). 13@c has the form ", nth Edition" (without the quotes).
14@set EDITION 14@set EDITION , 3rd Edition
15@set UPDATED 2006-03-05 15@set UPDATED 2006-03-14
16@set UPDATE-MONTH March, 2006 16@set UPDATE-MONTH March, 2006
17 17
18@c Other variables. 18@c Other variables.
@@ -203,6 +203,7 @@ History of MH-E
203 203
204@cindex Emacs 204@cindex Emacs
205@cindex Unix commands, Emacs 205@cindex Unix commands, Emacs
206@cindex preface
206 207
207This manual introduces another interface to the MH mail system that is 208This manual introduces another interface to the MH mail system that is
208accessible through the GNU Emacs editor, namely, @emph{MH-E}. MH-E is 209accessible through the GNU Emacs editor, namely, @emph{MH-E}. MH-E is
@@ -218,8 +219,11 @@ in GNU Emacs 21, as well as XEmacs 21 (except for versions
21821.5.9-21.5.16). It is compatible with MH versions 6.8.4 and higher, 21921.5.9-21.5.16). It is compatible with MH versions 6.8.4 and higher,
219all versions of nmh, and GNU mailutils 0.4 and higher.}, so you 220all versions of nmh, and GNU mailutils 0.4 and higher.}, so you
220shouldn't have to do anything special to use it. This manual covers 221shouldn't have to do anything special to use it. This manual covers
221MH-E version @value{VERSION}. @ref{Getting Started} will help you 222MH-E version @value{VERSION}. To help you decide which version you
222decide which version you have. 223have, see @ref{Getting Started}.
224
225@findex help-with-tutorial
226@kindex C-h t
223 227
224If you don't already use GNU Emacs but want to learn more, you can 228If you don't already use GNU Emacs but want to learn more, you can
225read an online tutorial by starting GNU Emacs and typing @kbd{C-h t} 229read an online tutorial by starting GNU Emacs and typing @kbd{C-h t}
@@ -241,10 +245,13 @@ If more information is needed, you can go to the Unix manual pages of
241the individual MH commands. When the name is not obvious, I'll guide 245the individual MH commands. When the name is not obvious, I'll guide
242you to a relevant MH manual page that describes the action more fully. 246you to a relevant MH manual page that describes the action more fully.
243 247
248@cindex info
249@kindex C-h i
250
244This manual is available in both Info and online formats. The Info 251This manual is available in both Info and online formats. The Info
245version is distributed with Emacs and can be accessed with the 252version is distributed with Emacs and can be accessed with the
246@command{info} command (@samp{info mh-e}) or within Emacs (@kbd{M-x 253@command{info} command (@samp{info mh-e}) or within Emacs (@kbd{C-h i
247info @key{RET} m mh-e @key{RET}}). The online version is available at 254m mh-e @key{RET}}). The online version is available at
248@uref{http://mh-e.sourceforge.net/manual/, SourceForge}. Another great 255@uref{http://mh-e.sourceforge.net/manual/, SourceForge}. Another great
249online resource is the book @uref{http://www.ics.uci.edu/~mh/book/, 256online resource is the book @uref{http://www.ics.uci.edu/~mh/book/,
250@cite{MH & nmh: Email for Users & Programmers}} (also known as 257@cite{MH & nmh: Email for Users & Programmers}} (also known as
@@ -265,8 +272,11 @@ Bill Wohler <@i{wohler at newt.com}>@*
265@chapter GNU Emacs Terms and Conventions 272@chapter GNU Emacs Terms and Conventions
266 273
267@cindex Emacs 274@cindex Emacs
268@cindex Emacs, terms and conventions 275@cindex Emacs, conventions
276@cindex Emacs, terms
269@cindex Unix commands, Emacs 277@cindex Unix commands, Emacs
278@cindex conventions, Emacs
279@cindex terms, Emacs
270 280
271If you're an experienced Emacs user, you can skip the following 281If you're an experienced Emacs user, you can skip the following
272conventions and definition of terms and go directly to the next 282conventions and definition of terms and go directly to the next
@@ -325,6 +335,7 @@ earlier of Emacs, you will need to use the @key{DEL} key.}.
325 335
326@cindex Emacs, prefix argument 336@cindex Emacs, prefix argument
327@cindex prefix argument 337@cindex prefix argument
338@kindex C-u
328 339
329A @dfn{prefix argument} allows you to pass an argument to any Emacs 340A @dfn{prefix argument} allows you to pass an argument to any Emacs
330function. To pass an argument, type @kbd{C-u} before the Emacs command 341function. To pass an argument, type @kbd{C-u} before the Emacs command
@@ -348,8 +359,11 @@ numerical argument before entering the command.
348@end quotation 359@end quotation
349@sp 1 360@sp 1
350 361
362@cindex @file{.emacs}
351@cindex Emacs, variables 363@cindex Emacs, variables
364@cindex files, @file{.emacs}
352@cindex variables 365@cindex variables
366@findex setq
353 367
354Emacs uses @dfn{variables} to hold values. These can be changed via 368Emacs uses @dfn{variables} to hold values. These can be changed via
355calls to the function @code{setq} in @file{~/.emacs}. 369calls to the function @code{setq} in @file{~/.emacs}.
@@ -392,9 +406,11 @@ See section
392Face Customization} in @cite{The GNU Emacs Manual}. 406Face Customization} in @cite{The GNU Emacs Manual}.
393@end ifhtml 407@end ifhtml
394 408
409@cindex abnormal hooks
395@cindex hooks 410@cindex hooks
396@cindex normal hooks 411@cindex normal hooks
397@cindex abnormal hooks 412@findex add-hook
413@findex customize-option
398 414
399Commands often offer @dfn{hooks} which enable you to extend or modify 415Commands often offer @dfn{hooks} which enable you to extend or modify
400the way a command works. 416the way a command works.
@@ -409,10 +425,11 @@ Hooks} in @cite{The GNU Emacs Manual}
409@end ifhtml 425@end ifhtml
410for a description about @dfn{normal hooks} and @dfn{abnormal hooks}. 426for a description about @dfn{normal hooks} and @dfn{abnormal hooks}.
411MH-E uses normal hooks in nearly all cases, so you can assume that we 427MH-E uses normal hooks in nearly all cases, so you can assume that we
412are talking about normal hooks unless we explicitly mention that a hook 428are talking about normal hooks unless we explicitly mention that a
413is abnormal. We also follow the conventions described in that section: 429hook is abnormal. We also follow the conventions described in that
414the name of the abnormal hooks end in @code{-hooks} and all the rest 430section: the name of the abnormal hooks end in @code{-hooks} and all
415of the MH-E hooks end in @code{-hook}. 431the rest of the MH-E hooks end in @code{-hook}. You can add hooks with
432either @code{customize-option} or @code{add-hook}.
416 433
417@cindex Emacs, mark 434@cindex Emacs, mark
418@cindex Emacs, point 435@cindex Emacs, point
@@ -420,6 +437,8 @@ of the MH-E hooks end in @code{-hook}.
420@cindex mark 437@cindex mark
421@cindex point 438@cindex point
422@cindex region 439@cindex region
440@kindex C-@@
441@kindex C-@key{SPC}
423 442
424There are several other terms that are used in Emacs that you should 443There are several other terms that are used in Emacs that you should
425know. The @dfn{point} is where the cursor currently is. You can save 444know. The @dfn{point} is where the cursor currently is. You can save
@@ -430,14 +449,16 @@ commands operate on regions, such as those for deleting text or
430filling paragraphs. A mark can be set with @kbd{C-@@} (or 449filling paragraphs. A mark can be set with @kbd{C-@@} (or
431@kbd{C-@key{SPC}}). 450@kbd{C-@key{SPC}}).
432 451
452@cindex completion
433@cindex Emacs, completion 453@cindex Emacs, completion
434@cindex Emacs, file completion 454@cindex Emacs, file completion
435@cindex Emacs, folder completion 455@cindex Emacs, folder completion
436@cindex Emacs, minibuffer 456@cindex Emacs, minibuffer
437@cindex completion
438@cindex file completion 457@cindex file completion
439@cindex folder completion 458@cindex folder completion
440@cindex minibuffer 459@cindex minibuffer
460@kindex SPC
461@kindex TAB
441 462
442The @dfn{minibuffer} is the bottom line of the Emacs window, where all 463The @dfn{minibuffer} is the bottom line of the Emacs window, where all
443prompting and multiple-character input is directed. You can use 464prompting and multiple-character input is directed. You can use
@@ -456,6 +477,10 @@ Completion} in @cite{The GNU Emacs Manual}.
456Note that @key{SPC} cannot be used for completing filenames and 477Note that @key{SPC} cannot be used for completing filenames and
457folders. 478folders.
458 479
480@findex help-with-tutorial
481@kindex C-h t
482@kindex M-x
483
459The minibuffer is also where you enter Emacs function names after 484The minibuffer is also where you enter Emacs function names after
460typing @kbd{M-x}. For example, in the preface, I mentioned that you 485typing @kbd{M-x}. For example, in the preface, I mentioned that you
461could obtain help with @kbd{C-h t} (@code{help-with-tutorial}). What 486could obtain help with @kbd{C-h t} (@code{help-with-tutorial}). What
@@ -518,6 +543,14 @@ message, @samp{Cannot find the commands `inc' and `mhl' and the file
518MH-E, and you may need to install MH too. However, newer versions of 543MH-E, and you may need to install MH too. However, newer versions of
519MH-E are better at finding MH if it is on your system.}. 544MH-E are better at finding MH if it is on your system.}.
520 545
546@cindex @command{mhparam}
547@cindex MH commands, @command{mhparam}
548@vindex exec-path
549@vindex mh-path
550@vindex mh-sys-path
551@vindex mh-variant
552@vindex mh-variant-in-use
553
521The option @code{mh-variant} specifies the variant used by MH-E 554The option @code{mh-variant} specifies the variant used by MH-E
522(@pxref{Options}). The default setting of this option is 555(@pxref{Options}). The default setting of this option is
523@samp{Auto-detect} which means that MH-E will automatically choose the 556@samp{Auto-detect} which means that MH-E will automatically choose the
@@ -525,15 +558,23 @@ first of nmh, MH, or GNU mailutils that it finds in the directories
525listed in @code{mh-path} (which you can customize), 558listed in @code{mh-path} (which you can customize),
526@code{mh-sys-path}, and @code{exec-path}. If MH-E can't find MH at 559@code{mh-sys-path}, and @code{exec-path}. If MH-E can't find MH at
527all, you may have to customize @code{mh-path} and add the directory in 560all, you may have to customize @code{mh-path} and add the directory in
528which the command @code{mhparam} is located. If, on the other hand, 561which the command @command{mhparam} is located. If, on the other hand,
529you have both nmh and mailutils installed (for example) and 562you have both nmh and mailutils installed (for example) and
530@code{mh-variant-in-use} was initialized to nmh but you want to use 563@code{mh-variant-in-use} was initialized to nmh but you want to use
531mailutils, then you can set @code{mh-variant} to @samp{mailutils}. 564mailutils, then you can set @code{mh-variant} to @samp{mailutils}.
532 565
566@vindex mh-flists-present-flag
567@vindex mh-lib
568@vindex mh-lib-progs
569@vindex mh-progs
570
533When @code{mh-variant} is changed, MH-E resets @code{mh-progs}, 571When @code{mh-variant} is changed, MH-E resets @code{mh-progs},
534@code{mh-lib}, @code{mh-lib-progs}, @code{mh-flists-present-flag}, and 572@code{mh-lib}, @code{mh-lib-progs}, @code{mh-flists-present-flag}, and
535@code{mh-variant-in-use} accordingly. 573@code{mh-variant-in-use} accordingly.
536 574
575@cindex @file{.emacs}
576@cindex files, @file{.emacs}
577
537@sp 1 578@sp 1
538@center @strong{NOTE} 579@center @strong{NOTE}
539 580
@@ -554,14 +595,25 @@ environment@footnote{See the section
554If you don't, you'll be greeted with the error message: @samp{Install 595If you don't, you'll be greeted with the error message: @samp{Install
555MH and run install-mh before running MH-E}. 596MH and run install-mh before running MH-E}.
556 597
557@cindex @samp{Draft-Folder:} MH profile component
558@cindex @samp{Path:} MH profile component 598@cindex @samp{Path:} MH profile component
559@cindex @samp{Previous-Sequence:} MH profile component 599@cindex MH profile
560@cindex @samp{Unseen-Sequence:} MH profile component 600@cindex MH profile component
601@cindex MH profile component, @samp{Path:}
602
603Your MH environment includes your @dfn{MH profile} which is found in
604the file @file{~/.mh_profile}. This file contains a number of @dfn{MH
605profile components}. For example, the @samp{Path:} MH profile
606component contains the path to your mail directory, which is
607@file{~/Mail} by default.
608
561@cindex MH profile component, @samp{Draft-Folder:} 609@cindex MH profile component, @samp{Draft-Folder:}
562@cindex MH profile component, @samp{Path:} 610@cindex MH profile component, @samp{Path:}
563@cindex MH profile component, @samp{Previous-Sequence:} 611@cindex MH profile component, @samp{Previous-Sequence:}
564@cindex MH profile component, @samp{Unseen-Sequence:} 612@cindex MH profile component, @samp{Unseen-Sequence:}
613@cindex @samp{Draft-Folder:} MH profile component
614@cindex @samp{Path:} MH profile component
615@cindex @samp{Previous-Sequence:} MH profile component
616@cindex @samp{Unseen-Sequence:} MH profile component
565@findex mh-find-path 617@findex mh-find-path
566@vindex mh-draft-folder 618@vindex mh-draft-folder
567@vindex mh-find-path-hook 619@vindex mh-find-path-hook
@@ -586,6 +638,10 @@ between MH and MH-E.
586@node Tour Through MH-E, Using This Manual, Getting Started, Top 638@node Tour Through MH-E, Using This Manual, Getting Started, Top
587@chapter Tour Through MH-E 639@chapter Tour Through MH-E
588 640
641@cindex introduction
642@cindex tour
643@cindex tutorial
644
589This chapter introduces some of the terms you'll need to know and then 645This chapter introduces some of the terms you'll need to know and then
590takes you on a tour of MH-E@footnote{The keys mentioned in these 646takes you on a tour of MH-E@footnote{The keys mentioned in these
591chapters refer to the default key bindings. If you've changed the 647chapters refer to the default key bindings. If you've changed the
@@ -610,6 +666,7 @@ get the big picture, and then you can read the manual as you wish.
610 666
611@cindex sending mail 667@cindex sending mail
612@findex mh-smail 668@findex mh-smail
669@kindex M-x mh-smail
613 670
614Let's start our tour by sending ourselves a message which we can later 671Let's start our tour by sending ourselves a message which we can later
615read and process. Enter @kbd{M-x mh-smail} to invoke the MH-E program 672read and process. Enter @kbd{M-x mh-smail} to invoke the MH-E program
@@ -660,7 +717,10 @@ present or the body of your message will be considered to be part of
660the header. 717the header.
661 718
662@cindex help 719@cindex help
720@findex describe-mode
721@kindex C-c ?
663@kindex C-c C-c 722@kindex C-c C-c
723@kindex C-h m
664 724
665There are several commands specific to MH-Letter mode@footnote{You can 725There are several commands specific to MH-Letter mode@footnote{You can
666get quick help for the commands used most often with @kbd{C-c ?} or 726get quick help for the commands used most often with @kbd{C-c ?} or
@@ -679,6 +739,7 @@ message. Type @kbd{C-c C-c} now. That's all there is to it!
679@cindex modes, MH-Folder 739@cindex modes, MH-Folder
680@cindex reading mail 740@cindex reading mail
681@findex mh-rmail 741@findex mh-rmail
742@kindex M-x mh-rmail
682 743
683To read the mail you've just sent yourself, enter @kbd{M-x mh-rmail}. 744To read the mail you've just sent yourself, enter @kbd{M-x mh-rmail}.
684This incorporates the new mail and puts the output from 745This incorporates the new mail and puts the output from
@@ -691,10 +752,15 @@ pick Ranges Sequences} in the MH book.} which prints a one-line
691summary of each message) into a buffer called @samp{+inbox} whose 752summary of each message) into a buffer called @samp{+inbox} whose
692major mode is MH-Folder. 753major mode is MH-Folder.
693 754
755@findex mh-rmail
756@kindex F r
757@kindex M-x mh-rmail
758
694@sp 1 759@sp 1
695@center @strong{NOTE} 760@center @strong{NOTE}
696 761
697@quotation 762@quotation
763
698The @kbd{M-x mh-rmail} command will show you only new mail, not mail 764The @kbd{M-x mh-rmail} command will show you only new mail, not mail
699you have already read. If you were to run this tour again, you would 765you have already read. If you were to run this tour again, you would
700use @kbd{F r} to pull all your messages into MH-E. 766use @kbd{F r} to pull all your messages into MH-E.
@@ -742,6 +808,7 @@ If you typed a long message, you can view subsequent pages with
742@section Processing Mail 808@section Processing Mail
743 809
744@cindex processing mail 810@cindex processing mail
811@kindex @key{RET}
745@kindex r 812@kindex r
746 813
747The first thing we want to do is reply to the message that we sent 814The first thing we want to do is reply to the message that we sent
@@ -778,8 +845,17 @@ Composing a reply...done
778@end cartouche 845@end cartouche
779@i{Composition window during reply} 846@i{Composition window during reply}
780 847
848@findex backward-char
849@findex forward-char
850@findex next-line
851@findex previous-line
852@kindex C-b
781@kindex C-c C-c 853@kindex C-c C-c
782@kindex C-c C-f C-t 854@kindex C-c C-f C-t
855@kindex C-f
856@kindex C-n
857@kindex C-p
858@kindex @key{BS}
783 859
784By default, MH will not add you to the address list of your replies, 860By default, MH will not add you to the address list of your replies,
785so if you find that the @samp{To:} header field is missing, don't 861so if you find that the @samp{To:} header field is missing, don't
@@ -791,7 +867,10 @@ move around with the arrow keys or with @kbd{C-p}
791delete the previous character with @key{BS}. When you're finished 867delete the previous character with @key{BS}. When you're finished
792editing your message, send it with @kbd{C-c C-c} as before. 868editing your message, send it with @kbd{C-c C-c} as before.
793 869
870@cindex @command{refile}
871@cindex MH commands, @command{refile}
794@cindex folders 872@cindex folders
873@kindex @key{SPC}
795@kindex o 874@kindex o
796 875
797You'll often want to save messages that were sent to you in an 876You'll often want to save messages that were sent to you in an
@@ -809,9 +888,11 @@ in a moment.
809 888
810@cindex MH-Folder mode 889@cindex MH-Folder mode
811@cindex modes, MH-Folder 890@cindex modes, MH-Folder
812@kindex @key{RET}
813@kindex d 891@kindex d
814@kindex i 892@kindex i
893@kindex @key{RET}
894@kindex n
895@kindex p
815@kindex x 896@kindex x
816 897
817Your previous reply is now waiting in the system mailbox. You 898Your previous reply is now waiting in the system mailbox. You
@@ -826,6 +907,7 @@ command.
826 907
827@findex mh-smail 908@findex mh-smail
828@kindex m 909@kindex m
910@kindex M-x mh-smail
829 911
830If you want to send another message you can use @kbd{m} instead of 912If you want to send another message you can use @kbd{m} instead of
831@kbd{M-x mh-smail}. So go ahead, send some mail to your friends! 913@kbd{M-x mh-smail}. So go ahead, send some mail to your friends!
@@ -835,6 +917,7 @@ If you want to send another message you can use @kbd{m} instead of
835@findex describe-mode 917@findex describe-mode
836@kindex ? 918@kindex ?
837@kindex C-h m 919@kindex C-h m
920@kindex F ?
838 921
839You can get a quick reminder about these commands by typing @kbd{?}. 922You can get a quick reminder about these commands by typing @kbd{?}.
840This lists several @dfn{prefix characters}. To list the commands 923This lists several @dfn{prefix characters}. To list the commands
@@ -847,6 +930,8 @@ available with the @kbd{C-h m} (@code{describe-mode}) command.
847 930
848@cindex Emacs, quitting 931@cindex Emacs, quitting
849@cindex quitting 932@cindex quitting
933@kindex C-x C-c
934@kindex x
850 935
851You may now wish to exit @command{emacs} entirely. Use @kbd{C-x C-c} 936You may now wish to exit @command{emacs} entirely. Use @kbd{C-x C-c}
852to exit @command{emacs}. If you exited without running @kbd{x} in the 937to exit @command{emacs}. If you exited without running @kbd{x} in the
@@ -855,6 +940,9 @@ to exit @command{emacs}. If you exited without running @kbd{x} in the
855perform any refiles and deletes that you did there. 940perform any refiles and deletes that you did there.
856 941
857@findex mh-rmail 942@findex mh-rmail
943@kindex C-x b
944@kindex C-x k
945@kindex M-x mh-rmail
858@kindex q 946@kindex q
859 947
860If you don't want to leave Emacs, you can type @kbd{q} to bury (hide) 948If you don't want to leave Emacs, you can type @kbd{q} to bury (hide)
@@ -886,57 +974,58 @@ to find out how you can:
886 974
887@itemize @bullet 975@itemize @bullet
888@item 976@item
889Print your messages (@ref{Printing}). 977Print your messages (@pxref{Printing}).
890@c ------------------------- 978@c -------------------------
891@item 979@item
892Edit messages and include your signature (@ref{Editing Drafts}). 980Edit messages and include your signature (@pxref{Editing Drafts}).
893@c ------------------------- 981@c -------------------------
894@item 982@item
895Forward messages (@ref{Forwarding}). 983Forward messages (@pxref{Forwarding}).
896@c ------------------------- 984@c -------------------------
897@item 985@item
898Read digests (@ref{Digests}). 986Read digests (@pxref{Digests}).
899@c ------------------------- 987@c -------------------------
900@item 988@item
901Edit bounced messages (@ref{Editing Again}). 989Edit bounced messages (@pxref{Editing Again}).
902@c ------------------------- 990@c -------------------------
903@item 991@item
904Send multimedia messages (@ref{Adding Attachments}). 992Send multimedia messages (@pxref{Adding Attachments}).
905@c ------------------------- 993@c -------------------------
906@item 994@item
907Read HTML messages (@ref{HTML}). 995Read HTML messages (@pxref{HTML}).
908@c ------------------------- 996@c -------------------------
909@item 997@item
910Use @ref{Aliases} and @ref{Identities}. 998Use aliases and identities (see @ref{Aliases}, @pxref{Identities}).
911@c ------------------------- 999@c -------------------------
912@item 1000@item
913Create different views of your mail (@ref{Threading} and @ref{Limits}). 1001Create different views of your mail (see @ref{Threading}, @pxref{Limits}).
914@c ------------------------- 1002@c -------------------------
915@item 1003@item
916Deal with junk mail (@ref{Junk}). 1004Deal with junk mail (@pxref{Junk}).
917@c ------------------------- 1005@c -------------------------
918@item 1006@item
919Handle signed and encrypted messages (@ref{Reading PGP} and 1007Handle signed and encrypted messages (see @ref{Reading PGP},
920@ref{Sending PGP}). 1008@pxref{Sending PGP}).
921@c ------------------------- 1009@c -------------------------
922@item 1010@item
923Process mail that was sent with @command{shar} or @command{uuencode} 1011Process mail that was sent with @command{shar} or @command{uuencode}
924(@ref{Files and Pipes}). 1012(@pxref{Files and Pipes}).
925@c ------------------------- 1013@c -------------------------
926@item 1014@item
927Use sequences conveniently (@ref{Sequences}). 1015Use sequences conveniently (@pxref{Sequences}).
928@c ------------------------- 1016@c -------------------------
929@item 1017@item
930Use the @ref{Speedbar}, @ref{Tool Bar}, and @ref{Menu Bar}. 1018Use the speedbar, tool bar, and menu bar (see @ref{Speedbar}, see @ref{Tool
1019Bar}, @pxref{Menu Bar}).
931@c ------------------------- 1020@c -------------------------
932@item 1021@item
933Show header fields in different fonts (@ref{Reading Mail}). 1022Show header fields in different fonts (@pxref{Reading Mail}).
934@c ------------------------- 1023@c -------------------------
935@item 1024@item
936Find previously refiled messages (@ref{Searching}). 1025Find previously refiled messages (@pxref{Searching}).
937@c ------------------------- 1026@c -------------------------
938@item 1027@item
939Place messages in a file (@ref{Files and Pipes}). 1028Place messages in a file (@pxref{Files and Pipes}).
940@end itemize 1029@end itemize
941 1030
942Remember that you can also use MH commands when you're not running 1031Remember that you can also use MH commands when you're not running
@@ -956,6 +1045,10 @@ about every MH-E command and option.
956@findex mh-help 1045@findex mh-help
957@kindex ? 1046@kindex ?
958@kindex C-c ? 1047@kindex C-c ?
1048@kindex C-h C-h
1049@kindex C-h C-k i
1050@kindex C-h i
1051@kindex C-h m
959 1052
960There are many commands, but don't get intimidated. There are command 1053There are many commands, but don't get intimidated. There are command
961summaries at the beginning of each chapter. In case you have or would 1054summaries at the beginning of each chapter. In case you have or would
@@ -986,7 +1079,8 @@ possible. That way you will get the same behavior inside and outside
986GNU Emacs. Note that MH-E does not provide hooks for customizations 1079GNU Emacs. Note that MH-E does not provide hooks for customizations
987that can be done in MH; this omission is intentional. 1080that can be done in MH; this omission is intentional.
988 1081
989@cindex Emacs, Emacs Lisp manual 1082@cindex Emacs Lisp Manual
1083@cindex Emacs, Emacs Lisp Manual
990@cindex Emacs, info 1084@cindex Emacs, info
991@cindex Emacs, online help 1085@cindex Emacs, online help
992@cindex info 1086@cindex info
@@ -1065,8 +1159,15 @@ mh-lpr-command-format @key{RET}}. In the buffer that appears, modify
1065the string to the right of the variable. For example, you may change 1159the string to the right of the variable. For example, you may change
1066the @command{lpr} command with @samp{nenscript -G -r -2 -i'%s'}. Then 1160the @command{lpr} command with @samp{nenscript -G -r -2 -i'%s'}. Then
1067use the @samp{State} combo box and select @samp{Save for Future 1161use the @samp{State} combo box and select @samp{Save for Future
1068Sessions}. @ref{Printing} talks more about this option. 1162Sessions}. To read more about @code{mh-lpr-command-format}, see
1069 1163@ref{Printing}.
1164
1165@cindex nil
1166@cindex off, option
1167@cindex on, option
1168@cindex option, turning on and off
1169@cindex t
1170@findex customize-option
1070@vindex mh-bury-show-buffer-flag, example 1171@vindex mh-bury-show-buffer-flag, example
1071 1172
1072Options can also hold boolean values. In Emacs Lisp, the boolean 1173Options can also hold boolean values. In Emacs Lisp, the boolean
@@ -1082,14 +1183,16 @@ the @samp{Erase Customization} menu item to reset the option to the
1082default, which places the MH-Show buffer at the bottom of the buffer 1183default, which places the MH-Show buffer at the bottom of the buffer
1083stack. 1184stack.
1084 1185
1186@vindex mh-mhl-format-file, example
1187
1085The text usually says to turn on an option by setting it to a 1188The text usually says to turn on an option by setting it to a
1086@emph{non-@code{nil}} value, because sometimes values other than 1189@emph{non-@code{nil}} value, because sometimes values other than
1087@samp{on} are meaningful (for example, see @code{mh-mhl-format-file}, 1190@samp{on} are meaningful. An example of this is the variable
1088described in @ref{Viewing}). Other options, such as hooks, involve a 1191@code{mh-mhl-format-file} (@pxref{Viewing}). Other options, such as
1089little more Emacs Lisp programming expertise. 1192hooks, involve a little more Emacs Lisp programming expertise.
1090 1193
1091@cindex @samp{mh} customization group
1092@cindex customization group, @samp{mh} 1194@cindex customization group, @samp{mh}
1195@cindex @samp{mh} customization group
1093@findex customize-group 1196@findex customize-group
1094@findex mh-customize 1197@findex mh-customize
1095 1198
@@ -1104,14 +1207,16 @@ customization group is to use @kbd{M-x mh-customize @key{RET}}.
1104 1207
1105@c Sync with mh-folder-mode docstring. 1208@c Sync with mh-folder-mode docstring.
1106 1209
1107@cindex ranges
1108@cindex message abbreviations 1210@cindex message abbreviations
1109@cindex message ranges 1211@cindex message ranges
1212@cindex ranges
1110 1213
1111Many commands that operate on individual messages, such as 1214Many commands that operate on individual messages, such as
1112@code{mh-forward} or @code{mh-refile-msg} take a @code{RANGE} 1215@code{mh-forward} or @code{mh-refile-msg} take a @code{RANGE}
1113argument. This argument can be used in several ways. 1216argument. This argument can be used in several ways.
1114 1217
1218@kindex C-u, with ranges
1219
1115If you provide the prefix argument @kbd{C-u} to these commands, then 1220If you provide the prefix argument @kbd{C-u} to these commands, then
1116you will be prompted for the message range. This can be any valid MH 1221you will be prompted for the message range. This can be any valid MH
1117range which can include messages, sequences (@pxref{Sequences}), and 1222range which can include messages, sequences (@pxref{Sequences}), and
@@ -1143,9 +1248,9 @@ For example, a range that shows all of these things is @samp{1 2 3
1143 1248
1144@vindex transient-mark-mode 1249@vindex transient-mark-mode
1145 1250
1146If the option @code{transient-mark-mode} is set to @code{t} and you 1251If the option @code{transient-mark-mode} is turned on and you set a
1147set a region in the MH-Folder buffer, then the MH-E command will 1252region in the MH-Folder buffer, then the MH-E command will perform the
1148perform the operation on all messages in that region. 1253operation on all messages in that region.
1149 1254
1150@cindex @samp{mh-range} customization group 1255@cindex @samp{mh-range} customization group
1151@cindex customization group, @samp{mh-range} 1256@cindex customization group, @samp{mh-range}
@@ -1158,6 +1263,8 @@ affects how ranges are interpreted.
1158On means interpret a number as a range (default: @samp{on}). 1263On means interpret a number as a range (default: @samp{on}).
1159@end vtable 1264@end vtable
1160 1265
1266@vindex mh-interpret-number-as-range-flag
1267
1161Since one of the most frequent ranges used is @samp{last:N}, MH-E will 1268Since one of the most frequent ranges used is @samp{last:N}, MH-E will
1162interpret input such as @samp{200} as @samp{last:200} if the 1269interpret input such as @samp{200} as @samp{last:200} if the
1163@code{mh-interpret-number-as-range-flag} option is on (which is the 1270@code{mh-interpret-number-as-range-flag} option is on (which is the
@@ -1167,6 +1274,8 @@ default). If you need to scan just the message 200, then use the range
1167@node Folder Selection, , Ranges, Using This Manual 1274@node Folder Selection, , Ranges, Using This Manual
1168@section Folder Selection 1275@section Folder Selection
1169 1276
1277@cindex completion, folders
1278@cindex folders, completion
1170@cindex folders, selecting 1279@cindex folders, selecting
1171 1280
1172When you choose a folder in MH-E via a command such as @kbd{o} 1281When you choose a folder in MH-E via a command such as @kbd{o}
@@ -1182,8 +1291,8 @@ Completion} in @cite{The GNU Emacs Manual}).
1182In addition, MH-E has several ways of choosing a suitable default so 1291In addition, MH-E has several ways of choosing a suitable default so
1183that the folder can often be selected with a single @key{RET} key. 1292that the folder can often be selected with a single @key{RET} key.
1184 1293
1185@cindex @samp{mh-folder-selection} customization group
1186@cindex customization group, @samp{mh-folder-selection} 1294@cindex customization group, @samp{mh-folder-selection}
1295@cindex @samp{mh-folder-selection} customization group
1187 1296
1188The @samp{mh-folder-selection} customization group contains some 1297The @samp{mh-folder-selection} customization group contains some
1189options which are used to help with this. 1298options which are used to help with this.
@@ -1204,6 +1313,8 @@ On means guessed folder name must exist to be used (default:
1204Prefix used for folder names generated from aliases (default: @code{""}). 1313Prefix used for folder names generated from aliases (default: @code{""}).
1205@end vtable 1314@end vtable
1206 1315
1316@vindex mh-default-folder-for-message-function
1317
1207You can set the option @code{mh-default-folder-for-message-function} 1318You can set the option @code{mh-default-folder-for-message-function}
1208to a function that provides a default folder for the message to be 1319to a function that provides a default folder for the message to be
1209refiled. When this function is called, the current buffer contains the 1320refiled. When this function is called, the current buffer contains the
@@ -1217,6 +1328,7 @@ Otherwise, the name of the destination folder is derived from the
1217sender as follows: 1328sender as follows:
1218 1329
1219@enumerate 1330@enumerate
1331@vindex mh-default-folder-list
1220@item 1332@item
1221The folder name associated with the first address found in the list 1333The folder name associated with the first address found in the list
1222@code{mh-default-folder-list} is used. Each element in this list 1334@code{mh-default-folder-list} is used. Each element in this list
@@ -1224,12 +1336,15 @@ contains a @samp{Check Recipient} item. If this item is turned on,
1224then the address is checked against the recipient instead of the 1336then the address is checked against the recipient instead of the
1225sender. This is useful for mailing lists. 1337sender. This is useful for mailing lists.
1226@c ------------------------- 1338@c -------------------------
1339@vindex mh-default-folder-prefix
1227@item 1340@item
1228An alias prefixed by @code{mh-default-folder-prefix} corresponding to 1341An alias prefixed by @code{mh-default-folder-prefix} corresponding to
1229the address is used. The prefix is used to prevent clutter in your 1342the address is used. The prefix is used to prevent clutter in your
1230mail directory. @xref{Aliases}. 1343mail directory. @xref{Aliases}.
1231@end enumerate 1344@end enumerate
1232 1345
1346@vindex mh-default-folder-must-exist-flag
1347
1233If the derived folder does not exist, and 1348If the derived folder does not exist, and
1234@code{mh-default-folder-must-exist-flag} is @code{t}, then the last 1349@code{mh-default-folder-must-exist-flag} is @code{t}, then the last
1235folder name used is suggested. This is useful if you get mail from 1350folder name used is suggested. This is useful if you get mail from
@@ -1239,7 +1354,9 @@ same project folder.
1239@node Incorporating Mail, Reading Mail, Using This Manual, Top 1354@node Incorporating Mail, Reading Mail, Using This Manual, Top
1240@chapter Incorporating Your Mail 1355@chapter Incorporating Your Mail
1241 1356
1357@cindex @samp{Folder} menu
1242@cindex incorporating 1358@cindex incorporating
1359@cindex menu, @samp{Folder}
1243 1360
1244This chapter talks about getting mail from your system mailbox into 1361This chapter talks about getting mail from your system mailbox into
1245your MH @samp{+inbox} folder. The following command accomplishes that 1362your MH @samp{+inbox} folder. The following command accomplishes that
@@ -1262,7 +1379,7 @@ used.
1262 1379
1263@vtable @code 1380@vtable @code
1264@item mh-inc-prog 1381@item mh-inc-prog
1265Program to incorporate mail (default: @samp{"inc"}). 1382Program to incorporate mail (default: @code{"inc"}).
1266@c ------------------------- 1383@c -------------------------
1267@item mh-inc-spool-list 1384@item mh-inc-spool-list
1268Alternate spool files (default: @code{nil}). 1385Alternate spool files (default: @code{nil}).
@@ -1271,11 +1388,16 @@ Alternate spool files (default: @code{nil}).
1271The following hook is available. 1388The following hook is available.
1272 1389
1273@vtable @code 1390@vtable @code
1391@findex mh-inc-folder
1274@item mh-inc-folder-hook 1392@item mh-inc-folder-hook
1275Hook run by @samp{mh-inc-folder} after incorporating mail into a 1393Hook run by @code{mh-inc-folder} after incorporating mail into a
1276folder (default: @code{nil}). 1394folder (default: @code{nil}).
1277@end vtable 1395@end vtable
1278 1396
1397@cindex @samp{+inbox}
1398@findex mh-inc-folder
1399@kindex i
1400
1279If at any time you receive new mail, incorporate the new mail into 1401If at any time you receive new mail, incorporate the new mail into
1280your @samp{+inbox} buffer with @kbd{i} (@code{mh-inc-folder}). Note 1402your @samp{+inbox} buffer with @kbd{i} (@code{mh-inc-folder}). Note
1281that @kbd{i} will display the @samp{+inbox} buffer, even if there 1403that @kbd{i} will display the @samp{+inbox} buffer, even if there
@@ -1292,7 +1414,7 @@ example, @kbd{C-u i ~/mbox @key{RET} +tmp @key{RET}}).
1292 1414
1293Emacs can notify you when you have new mail by displaying @samp{Mail} 1415Emacs can notify you when you have new mail by displaying @samp{Mail}
1294in the mode line. To enable this behavior, and to have a clock in the 1416in the mode line. To enable this behavior, and to have a clock in the
1295mode line besides, add the following to @file{~/.emacs}: 1417mode line as well, add the following to @file{~/.emacs}:
1296 1418
1297@findex display-time 1419@findex display-time
1298 1420
@@ -1301,12 +1423,13 @@ mode line besides, add the following to @file{~/.emacs}:
1301@end lisp 1423@end lisp
1302 1424
1303@cindex @command{inc} 1425@cindex @command{inc}
1304@cindex MH commands, @command{inc}
1305@cindex incorporating 1426@cindex incorporating
1427@cindex MH commands, @command{inc}
1428@vindex mh-inc-prog
1306@vindex mh-progs 1429@vindex mh-progs
1307 1430
1308The name of the program that incorporates new mail is stored in 1431The name of the program that incorporates new mail is stored in
1309@code{mh-inc-prog}; it is @samp{"inc"} by default. This program 1432@code{mh-inc-prog}; it is @code{"inc"} by default. This program
1310generates a one-line summary for each of the new messages. Unless it 1433generates a one-line summary for each of the new messages. Unless it
1311is an absolute pathname, the file is assumed to be in the 1434is an absolute pathname, the file is assumed to be in the
1312@code{mh-progs} directory (@pxref{Getting Started}). You may also link 1435@code{mh-progs} directory (@pxref{Getting Started}). You may also link
@@ -1317,6 +1440,8 @@ prev} and @uref{@value{MH-BOOK-HOME}/mhstr.htm, MH Format Strings} in
1317the MH book). You'll then need to modify several variables 1440the MH book). You'll then need to modify several variables
1318appropriately (@pxref{Scan Line Formats}). 1441appropriately (@pxref{Scan Line Formats}).
1319 1442
1443@vindex mh-inc-spool-list
1444
1320You can use the @code{mh-inc-spool-list} variable to direct MH-E to 1445You can use the @code{mh-inc-spool-list} variable to direct MH-E to
1321retrieve mail from arbitrary spool files other than your system 1446retrieve mail from arbitrary spool files other than your system
1322mailbox, file it in folders other than your @samp{+inbox}, and assign 1447mailbox, file it in folders other than your @samp{+inbox}, and assign
@@ -1338,6 +1463,9 @@ MAILDIR=$HOME/mail
1338mh-e 1463mh-e
1339@end smallexample 1464@end smallexample
1340 1465
1466@findex mh-inc-spool-*
1467@kindex I *
1468
1341In order to incorporate @file{~/mail/mh-e} into @samp{+mh-e} with an 1469In order to incorporate @file{~/mail/mh-e} into @samp{+mh-e} with an
1342@kbd{I m} (@code{mh-inc-spool-mh-e}) command, customize this option, 1470@kbd{I m} (@code{mh-inc-spool-mh-e}) command, customize this option,
1343and click on the @samp{INS} button. Enter a @samp{Spool File} of 1471and click on the @samp{INS} button. Enter a @samp{Spool File} of
@@ -1367,6 +1495,10 @@ box ~/mail/mh-e
1367In XEmacs, the command @command{gnuclient} is used in a similar 1495In XEmacs, the command @command{gnuclient} is used in a similar
1368fashion. 1496fashion.
1369 1497
1498@findex mh-inc-folder
1499@kindex i
1500@vindex mh-inc-folder-hook
1501
1370You can set the hook @code{mh-inc-folder-hook}, which is called after 1502You can set the hook @code{mh-inc-folder-hook}, which is called after
1371new mail is incorporated by the @kbd{i} (@code{mh-inc-folder}) 1503new mail is incorporated by the @kbd{i} (@code{mh-inc-folder})
1372command. A good use of this hook is to rescan the whole folder either 1504command. A good use of this hook is to rescan the whole folder either
@@ -1397,13 +1529,16 @@ the message numbers from outside of MH-E.
1397@node Reading Mail, Folders, Incorporating Mail, Top 1529@node Reading Mail, Folders, Incorporating Mail, Top
1398@chapter Reading Your Mail 1530@chapter Reading Your Mail
1399 1531
1532@cindex @samp{+inbox}
1400@cindex MH-Folder mode 1533@cindex MH-Folder mode
1401@cindex MH-Show mode 1534@cindex MH-Show mode
1402@cindex modes, MH-Folder 1535@cindex modes, MH-Folder
1403@cindex modes, MH-Show 1536@cindex modes, MH-Show
1404@cindex reading mail 1537@cindex reading mail
1405@cindex scan lines
1406@findex mh-rmail 1538@findex mh-rmail
1539@kindex M-x mh-rmail
1540@kindex F r
1541@kindex F v
1407 1542
1408The MH-E entry point for reading mail is @kbd{M-x mh-rmail}. This 1543The MH-E entry point for reading mail is @kbd{M-x mh-rmail}. This
1409command incorporates your mail and creates a buffer called 1544command incorporates your mail and creates a buffer called
@@ -1414,6 +1549,12 @@ into MH-E. Or, give a prefix argument to @code{mh-rmail} so it will
1414prompt you for folder to visit like @kbd{F v} (for example, @kbd{C-u 1549prompt you for folder to visit like @kbd{F v} (for example, @kbd{C-u
1415M-x mh-rmail @key{RET} bob @key{RET}}). @xref{Folders}.}. 1550M-x mh-rmail @key{RET} bob @key{RET}}). @xref{Folders}.}.
1416 1551
1552@cindex @command{scan}
1553@cindex @samp{Message} menu
1554@cindex MH commands, @command{scan}
1555@cindex menu, @samp{Message}
1556@cindex scan lines
1557
1417The @samp{+inbox} buffer contains @dfn{scan lines}, which are one-line 1558The @samp{+inbox} buffer contains @dfn{scan lines}, which are one-line
1418summaries of each incorporated message. You can perform most MH 1559summaries of each incorporated message. You can perform most MH
1419commands on these messages via one- or two-letter commands in either 1560commands on these messages via one- or two-letter commands in either
@@ -1714,7 +1855,7 @@ On means non-reversible commands do not prompt for confirmation
1714@c ------------------------- 1855@c -------------------------
1715@item mh-fetch-x-image-url 1856@item mh-fetch-x-image-url
1716Control fetching of @samp{X-Image-URL:} header field image (default: 1857Control fetching of @samp{X-Image-URL:} header field image (default:
1717@code{Never Fetch}). 1858@samp{Never Fetch}).
1718@c ------------------------- 1859@c -------------------------
1719@item mh-graphical-smileys-flag 1860@item mh-graphical-smileys-flag
1720On means graphical smileys are displayed (default: @samp{on}). 1861On means graphical smileys are displayed (default: @samp{on}).
@@ -1733,14 +1874,14 @@ here).
1733Additional header fields to hide (default: @code{nil}). 1874Additional header fields to hide (default: @code{nil}).
1734@c ------------------------- 1875@c -------------------------
1735@item mh-lpr-command-format 1876@item mh-lpr-command-format
1736Command used to print (default: @samp{"lpr -J '%s'"}). 1877Command used to print (default: @code{"lpr -J '%s'"}).
1737@c ------------------------- 1878@c -------------------------
1738@item mh-max-inline-image-height 1879@item mh-max-inline-image-height
1739Maximum inline image height if \"Content-Disposition:\" is not 1880Maximum inline image height if @samp{Content-Disposition:} is not
1740present (default: 0). 1881present (default: 0).
1741@c ------------------------- 1882@c -------------------------
1742@item mh-max-inline-image-width 1883@item mh-max-inline-image-width
1743Maximum inline image width if \"Content-Disposition:\" is not 1884Maximum inline image width if @samp{Content-Disposition:} is not
1744present(default: 0). 1885present(default: 0).
1745@c ------------------------- 1886@c -------------------------
1746@item mh-mhl-format-file 1887@item mh-mhl-format-file
@@ -1754,12 +1895,16 @@ Default directory to use for @kbd{K a}.
1754On means messages should be printed in the background (default: 1895On means messages should be printed in the background (default:
1755@samp{off}). 1896@samp{off}).
1756@c ------------------------- 1897@c -------------------------
1898@item mh-show-buffer-mode-line-buffer-id
1899Format string to produce @code{mode-line-buffer-identification} for
1900show buffers (default: @code{" @{show-%s@} %d"}).
1901@c -------------------------
1757@item mh-show-maximum-size 1902@item mh-show-maximum-size
1758Maximum size of message (in bytes) to display automatically (default: 1903Maximum size of message (in bytes) to display automatically (default:
17590). 19040).
1760@c ------------------------- 1905@c -------------------------
1761@item mh-show-use-xface-flag 1906@item mh-show-use-xface-flag
1762On means display face images in MH-Show buffers (default: @code{on}). 1907On means display face images in MH-Show buffers (default: @samp{on}).
1763@c ------------------------- 1908@c -------------------------
1764@item mh-store-default-directory 1909@item mh-store-default-directory
1765Default directory for @kbd{X s} (default: @samp{Current}). 1910Default directory for @kbd{X s} (default: @samp{Current}).
@@ -1863,6 +2008,8 @@ header fields that mailers add to a message, but if you wish to see
1863all of them, use the command @kbd{,} (comma; 2008all of them, use the command @kbd{,} (comma;
1864@code{mh-header-display}). 2009@code{mh-header-display}).
1865 2010
2011@vindex mh-show-maximum-size
2012
1866The option @code{mh-show-maximum-size} provides an opportunity to skip 2013The option @code{mh-show-maximum-size} provides an opportunity to skip
1867over large messages which may be slow to load. The default value of 0 2014over large messages which may be slow to load. The default value of 0
1868means that all message are shown regardless of size. 2015means that all message are shown regardless of size.
@@ -1884,8 +2031,8 @@ interesting, header fields.
1884 2031
1885@cindex regular expressions, @code{mh-invisible-header-fields} 2032@cindex regular expressions, @code{mh-invisible-header-fields}
1886@vindex mh-clean-message-header-flag 2033@vindex mh-clean-message-header-flag
1887@vindex mh-invisible-header-fields-default
1888@vindex mh-invisible-header-fields 2034@vindex mh-invisible-header-fields
2035@vindex mh-invisible-header-fields-default
1889 2036
1890Normally messages are delivered with a handful of uninteresting header 2037Normally messages are delivered with a handful of uninteresting header
1891fields. These are hidden by turning on the option 2038fields. These are hidden by turning on the option
@@ -1901,12 +2048,12 @@ entire class of fields that start with the same prefix. If you think a
1901header field should be generally ignored, report a bug (@pxref{Bug 2048header field should be generally ignored, report a bug (@pxref{Bug
1902Reports}). 2049Reports}).
1903 2050
1904@cindex @samp{Face:} header field
1905@cindex @samp{X-Face:} header field
1906@cindex @samp{X-Image-URL:} header field
1907@cindex header field, @samp{Face:} 2051@cindex header field, @samp{Face:}
1908@cindex header field, @samp{X-Face:} 2052@cindex header field, @samp{X-Face:}
1909@cindex header field, @samp{X-Image-URL:} 2053@cindex header field, @samp{X-Image-URL:}
2054@cindex @samp{Face:} header field
2055@cindex @samp{X-Face:} header field
2056@cindex @samp{X-Image-URL:} header field
1910@vindex mh-show-use-xface-flag 2057@vindex mh-show-use-xface-flag
1911 2058
1912MH-E can display the content of @samp{Face:}, @samp{X-Face:}, and 2059MH-E can display the content of @samp{Face:}, @samp{X-Face:}, and
@@ -2005,9 +2152,9 @@ parse the header. Note that @command{mhl} is always used for printing
2005and forwarding; in this case, the value of @code{mh-mhl-format-file} 2152and forwarding; in this case, the value of @code{mh-mhl-format-file}
2006is consulted if you have specified a format file. 2153is consulted if you have specified a format file.
2007 2154
2008@vindex mh-highlight-citation-style
2009@cindex citations, highlighting 2155@cindex citations, highlighting
2010@cindex highlighting citations 2156@cindex highlighting citations
2157@vindex mh-highlight-citation-style
2011 2158
2012If the sender of the message has cited other messages in his message, 2159If the sender of the message has cited other messages in his message,
2013then MH-E will highlight these citations to emphasize the sender's 2160then MH-E will highlight these citations to emphasize the sender's
@@ -2030,9 +2177,9 @@ highlighting of citations entirely, choose @samp{None}.
2030Email addresses and URLs in the message are highlighted if the option 2177Email addresses and URLs in the message are highlighted if the option
2031@code{goto-address-highlight-p} is on, which it is by default. To view 2178@code{goto-address-highlight-p} is on, which it is by default. To view
2032the web page for a highlighted URL or to send a message using a 2179the web page for a highlighted URL or to send a message using a
2033highlighted email address, use @kbd{Mouse-2} or @kbd{C-c @key{RET}}. 2180highlighted email address, use @kbd{Mouse-2} or @kbd{C-c @key{RET}}
2034See @ref{Sending Mail}, to see how to configure Emacs to send the 2181(@code{goto-address-at-point}). @xref{Sending Mail}, to see how to
2035message using MH-E. 2182configure Emacs to send the message using MH-E.
2036 2183
2037@cindex boldface, showing 2184@cindex boldface, showing
2038@cindex emphasis 2185@cindex emphasis
@@ -2074,7 +2221,7 @@ list. Both of these options are disabled if the option
2074 2221
2075MH-E normally renders signatures and vCards in italics so that the 2222MH-E normally renders signatures and vCards in italics so that the
2076body of the message stands out more. MH-E depends on the presence of 2223body of the message stands out more. MH-E depends on the presence of
2077the @dfn{signature separator} (@samp{"-- "}) to do this. You can also 2224the @dfn{signature separator} (@code{"-- "}) to do this. You can also
2078customize the face @code{mh-show-signature} so the appearance of the 2225customize the face @code{mh-show-signature} so the appearance of the
2079signature block is more to your liking. 2226signature block is more to your liking.
2080 2227
@@ -2089,16 +2236,16 @@ thing called after messages are displayed. It's used to affect the
2089behavior of MH-E in general or when @code{mh-show-mode-hook} is too 2236behavior of MH-E in general or when @code{mh-show-mode-hook} is too
2090early. 2237early.
2091 2238
2092@vindex mh-show-buffer-mode-line-buffer-id
2093@cindex MH-Show mode 2239@cindex MH-Show mode
2094@cindex modes, MH-Show 2240@cindex modes, MH-Show
2241@vindex mh-show-buffer-mode-line-buffer-id
2095 2242
2096For those who like to modify their mode lines, use 2243For those who like to modify their mode lines, use
2097@code{mh-show-buffer-mode-line-buffer-id} to modify the mode line in 2244@code{mh-show-buffer-mode-line-buffer-id} to modify the mode line in
2098the MH-Show buffers. Place the two escape strings @samp{%s} and 2245the MH-Show buffers. Place the two escape strings @samp{%s} and
2099@samp{%d}, which will display the folder name and the message number, 2246@samp{%d}, which will display the folder name and the message number,
2100respectively, somewhere in the string in that order. The default value 2247respectively, somewhere in the string in that order. The default value
2101of @samp{"@{show-%s@} %d"} yields a mode line of 2248of @code{"@{show-%s@} %d"} yields a mode line of
2102 2249
2103@smallexample 2250@smallexample
2104-----@{show-+inbox@} 4 (MH-Show)--Bot-------------------------------- 2251-----@{show-+inbox@} 4 (MH-Show)--Bot--------------------------------
@@ -2107,13 +2254,13 @@ of @samp{"@{show-%s@} %d"} yields a mode line of
2107@node Viewing Attachments, HTML, Viewing, Reading Mail 2254@node Viewing Attachments, HTML, Viewing, Reading Mail
2108@section Viewing Attachments 2255@section Viewing Attachments
2109 2256
2257@cindex attachments
2258@cindex body parts
2110@cindex @command{mhshow} 2259@cindex @command{mhshow}
2111@cindex @command{show} 2260@cindex @command{show}
2112@cindex MH commands, @command{mhshow} 2261@cindex MH commands, @command{mhshow}
2113@cindex MH commands, @command{show} 2262@cindex MH commands, @command{show}
2114@cindex MIME 2263@cindex MIME
2115@cindex attachments
2116@cindex body parts
2117@cindex multimedia mail 2264@cindex multimedia mail
2118 2265
2119MH has the ability to display @dfn{@sc{mime}} (Multipurpose Internet 2266MH has the ability to display @dfn{@sc{mime}} (Multipurpose Internet
@@ -2147,21 +2294,22 @@ option also controls the display of quoted-printable messages and
2147other graphical widgets. @xref{Viewing}. 2294other graphical widgets. @xref{Viewing}.
2148 2295
2149@cindex buttons 2296@cindex buttons
2150@kindex Mouse-1
2151@kindex Mouse-2
2152@kindex @key{RET}
2153@findex mh-press-button
2154@findex mh-next-button
2155@findex mh-prev-button
2156@kindex K @key{TAB}
2157@kindex K S-@key{TAB}
2158 2297
2159Attachments in MH-E are indicated by buttons like this: 2298Attachments in MH-E are indicated by @dfn{buttons} like this:
2160 2299
2161@example 2300@example
2162[1. image/jpeg; foo.jpg]... 2301[1. image/jpeg; foo.jpg]...
2163@end example 2302@end example
2164 2303
2304@findex mh-next-button
2305@findex mh-press-button
2306@findex mh-prev-button
2307@kindex @key{RET}
2308@kindex K @key{TAB}
2309@kindex K S-@key{TAB}
2310@kindex Mouse-1
2311@kindex Mouse-2
2312
2165To view the contents of the button, use either @kbd{Mouse-1} or 2313To view the contents of the button, use either @kbd{Mouse-1} or
2166@kbd{Mouse-2} on the button or @key{RET} (@code{mh-press-button}) when 2314@kbd{Mouse-2} on the button or @key{RET} (@code{mh-press-button}) when
2167the cursor is over the button. This command is a toggle so if you use 2315the cursor is over the button. This command is a toggle so if you use
@@ -2214,7 +2362,6 @@ default for the viewer by calling the Emacs function
2214 2362
2215@cindex attachments, saving 2363@cindex attachments, saving
2216@cindex saving attachments 2364@cindex saving attachments
2217
2218@findex mh-folder-save-mime-part 2365@findex mh-folder-save-mime-part
2219@kindex K o 2366@kindex K o
2220 2367
@@ -2244,6 +2391,8 @@ directory. These directories may be superseded by MH profile
2244components, since this function calls on @command{mhstore} 2391components, since this function calls on @command{mhstore}
2245(@command{mhn}) to do the work. 2392(@command{mhn}) to do the work.
2246 2393
2394@vindex mh-mime-save-parts-default-directory
2395
2247The default value for the option 2396The default value for the option
2248@code{mh-mime-save-parts-default-directory} is @samp{Prompt Always} so 2397@code{mh-mime-save-parts-default-directory} is @samp{Prompt Always} so
2249that you are always prompted for the directory in which to save the 2398that you are always prompted for the directory in which to save the
@@ -2275,9 +2424,9 @@ permanently by turning on the option
2275MH-E cannot display all attachments inline however. It can display 2424MH-E cannot display all attachments inline however. It can display
2276text (including @sc{html}) and images. 2425text (including @sc{html}) and images.
2277 2426
2278@cindex @samp{Content-Disposition:} header field
2279@cindex header field, @samp{Content-Disposition:} 2427@cindex header field, @samp{Content-Disposition:}
2280@cindex inline images 2428@cindex inline images
2429@cindex @samp{Content-Disposition:} header field
2281@vindex mh-max-inline-image-height 2430@vindex mh-max-inline-image-height
2282@vindex mh-max-inline-image-width 2431@vindex mh-max-inline-image-width
2283 2432
@@ -2331,7 +2480,6 @@ in the @cite{The Gnus Manual}.
2331 2480
2332@cindex HTML 2481@cindex HTML
2333@cindex Gnus 2482@cindex Gnus
2334@vindex mm-text-html-renderer
2335 2483
2336MH-E can display messages that have been sent in HTML@footnote{This 2484MH-E can display messages that have been sent in HTML@footnote{This
2337feature depends on a version of Gnus that is at least 5.10.}. The 2485feature depends on a version of Gnus that is at least 5.10.}. The
@@ -2344,8 +2492,10 @@ then you'll see a button like this:
2344[1. text/html; foo.html]... 2492[1. text/html; foo.html]...
2345@end example 2493@end example
2346 2494
2347See @ref{Viewing Attachments} to see how to read the contents of this 2495To see how to read the contents of this body part, see @ref{Viewing
2348body part. 2496Attachments}.
2497
2498@vindex mm-text-html-renderer
2349 2499
2350The browser that MH-E uses is determined by the option 2500The browser that MH-E uses is determined by the option
2351@code{mm-text-html-renderer}. The default setting is set automatically 2501@code{mm-text-html-renderer}. The default setting is set automatically
@@ -2356,12 +2506,17 @@ how to use it. In particular, find and disable the option to render
2356images as this can tip off spammers that the email address they have 2506images as this can tip off spammers that the email address they have
2357used is valid. 2507used is valid.
2358 2508
2509@vindex mm-text-html-renderer
2510
2359If you're confused about which @code{mm-text-html-renderer} to use, 2511If you're confused about which @code{mm-text-html-renderer} to use,
2360here's a brief description of each, sorted by popularity, that 2512here's a brief description of each, sorted by popularity, that
2361includes the results of a quick poll of MH-E users from 2005-12-23. 2513includes the results of a quick poll of MH-E users from 2005-12-23.
2362 2514
2363@table @asis 2515@table @asis
2364 2516@cindex browser, @samp{w3m}
2517@cindex @samp{w3m}
2518@kindex Mouse-2
2519@kindex S-Mouse-2
2365@item @samp{w3m} 7 2520@item @samp{w3m} 7
2366The @samp{w3m} browser requires an external program. It's quick, 2521The @samp{w3m} browser requires an external program. It's quick,
2367produces pretty nice output, and best of all, it's the only browser 2522produces pretty nice output, and best of all, it's the only browser
@@ -2372,6 +2527,8 @@ handles tables well and actually respects the table's width parameter
2372(which can cause text to wrap if the author didn't anticipate that the 2527(which can cause text to wrap if the author didn't anticipate that the
2373page would be viewed in Emacs). 2528page would be viewed in Emacs).
2374@c ------------------------- 2529@c -------------------------
2530@cindex browser, @samp{w3m-standalone}
2531@cindex @samp{w3m-standalone}
2375@item @samp{w3m-standalone} 3 2532@item @samp{w3m-standalone} 3
2376This browser, along with @samp{nil} for the external browser, are the 2533This browser, along with @samp{nil} for the external browser, are the
2377only choices that work without having to download a separate lisp 2534only choices that work without having to download a separate lisp
@@ -2381,6 +2538,8 @@ wider than the Emacs frame. This browser was the only one not to
2381handle the escape @samp{&ndash;} (it printed a @samp{?}), but it did 2538handle the escape @samp{&ndash;} (it printed a @samp{?}), but it did
2382render @samp{&reg;}. 2539render @samp{&reg;}.
2383@c ------------------------- 2540@c -------------------------
2541@cindex browser, @samp{links}
2542@cindex @samp{links}
2384@item @samp{links} 1 2543@item @samp{links} 1
2385The @samp{links} browser requires an external program. It's quick, and 2544The @samp{links} browser requires an external program. It's quick, and
2386produces nicer output than @samp{lynx} on single column mails in 2545produces nicer output than @samp{lynx} on single column mails in
@@ -2389,6 +2548,8 @@ on multi-column tables as some lines wrap. At least it fits in 80
2389columns and thus seems better than @samp{w3} and 2548columns and thus seems better than @samp{w3} and
2390@samp{w3m-standalone}. Converts escapes such as @samp{&reg;} to (R). 2549@samp{w3m-standalone}. Converts escapes such as @samp{&reg;} to (R).
2391@c ------------------------- 2550@c -------------------------
2551@cindex browser, @samp{lynx}
2552@cindex @samp{lynx}
2392@item @samp{lynx} 1 2553@item @samp{lynx} 1
2393The @samp{lynx} browser requires an external program. It's quick and 2554The @samp{lynx} browser requires an external program. It's quick and
2394produces pretty decent output but it doesn't show links. It doesn't 2555produces pretty decent output but it doesn't show links. It doesn't
@@ -2402,6 +2563,8 @@ This choice obviously requires an external browser. Like
2402HTML messages have a button for the body part which you can view with 2563HTML messages have a button for the body part which you can view with
2403@kbd{K v} (@code{mh-folder-toggle-mime-part}). 2564@kbd{K v} (@code{mh-folder-toggle-mime-part}).
2404@c ------------------------- 2565@c -------------------------
2566@cindex browser, @samp{w3}
2567@cindex @samp{w3}
2405@item @samp{w3} 0 2568@item @samp{w3} 0
2406This choice does not require an external program as all of the 2569This choice does not require an external program as all of the
2407rendering is done in lisp. You do need to get the package separately. 2570rendering is done in lisp. You do need to get the package separately.
@@ -2414,6 +2577,8 @@ can follow links, but you have to find them first as they are not
2414highlighted. Performs well on single-column tables and handles escapes 2577highlighted. Performs well on single-column tables and handles escapes
2415such as @samp{&reg;}. 2578such as @samp{&reg;}.
2416@c ------------------------- 2579@c -------------------------
2580@cindex browser, @samp{html2text}
2581@cindex @samp{html2text}
2417@item @samp{html2text} 0 2582@item @samp{html2text} 0
2418The @samp{html2text} browser requires an external program. I noticed 2583The @samp{html2text} browser requires an external program. I noticed
2419that it can do some nasty things with simple HTML mails (like filling 2584that it can do some nasty things with simple HTML mails (like filling
@@ -2422,6 +2587,8 @@ On another message, it displayed half of the HTML tags for some
2422reason. 2587reason.
2423@end table 2588@end table
2424 2589
2590@vindex mm-text-html-renderer
2591
2425For a couple more sources of information about 2592For a couple more sources of information about
2426@code{mm-text-html-renderer}, 2593@code{mm-text-html-renderer},
2427@ifinfo 2594@ifinfo
@@ -2442,10 +2609,10 @@ documentation for the Gnus command @kbd{W h} (see section
2442@cindex digests 2609@cindex digests
2443@findex mh-page-digest 2610@findex mh-page-digest
2444@findex mh-page-digest-backwards 2611@findex mh-page-digest-backwards
2445@kindex @key{BS}
2446@kindex @key{SPC}
2447@kindex D @key{BS} 2612@kindex D @key{BS}
2448@kindex D @key{SPC} 2613@kindex D @key{SPC}
2614@kindex @key{BS}
2615@kindex @key{SPC}
2449 2616
2450A digest is a message that contains other messages. Special MH-E 2617A digest is a message that contains other messages. Special MH-E
2451commands let you read digests conveniently. You can use @key{SPC} and 2618commands let you read digests conveniently. You can use @key{SPC} and
@@ -2459,8 +2626,8 @@ use @kbd{D @key{BS}} (@code{mh-page-digest-backwards}).
2459@cindex MH-Folder Show mode 2626@cindex MH-Folder Show mode
2460@cindex modes, MH-Folder Show 2627@cindex modes, MH-Folder Show
2461@findex mh-burst-digest 2628@findex mh-burst-digest
2462@kindex D b
2463@kindex d 2629@kindex d
2630@kindex D b
2464@kindex t 2631@kindex t
2465 2632
2466Another handy command is @kbd{D b} (@code{mh-burst-digest}). This 2633Another handy command is @kbd{D b} (@code{mh-burst-digest}). This
@@ -2622,6 +2789,8 @@ See
2622@findex mh-ps-print-msg-file 2789@findex mh-ps-print-msg-file
2623@kindex P f 2790@kindex P f
2624@kindex P p 2791@kindex P p
2792@vindex mh-lpr-command-format
2793@vindex mh-print-background-flag
2625 2794
2626To print messages in MH-E, use the command @kbd{P p} 2795To print messages in MH-E, use the command @kbd{P p}
2627(@code{mh-ps-print-msg}). You can print all the messages in a range 2796(@code{mh-ps-print-msg}). You can print all the messages in a range
@@ -2677,6 +2846,9 @@ formatted with @command{mhl}@footnote{See the section
2677@uref{@value{MH-BOOK-HOME}/shomes.htm#Usisho, Using mhl} in the MH 2846@uref{@value{MH-BOOK-HOME}/shomes.htm#Usisho, Using mhl} in the MH
2678book.} and printed with the @command{lpr} command. 2847book.} and printed with the @command{lpr} command.
2679 2848
2849@kindex P f
2850@kindex P l
2851@kindex P p
2680@vindex mh-lpr-command-format 2852@vindex mh-lpr-command-format
2681@vindex mh-print-background-flag 2853@vindex mh-print-background-flag
2682 2854
@@ -2685,7 +2857,7 @@ The command @kbd{P l} uses two options. The option
2685performs the actual printing. The string can contain one escape, 2857performs the actual printing. The string can contain one escape,
2686@samp{%s}, which is replaced by the name of the folder and the message 2858@samp{%s}, which is replaced by the name of the folder and the message
2687number and is useful for print job names. The default setting is 2859number and is useful for print job names. The default setting is
2688@samp{"lpr -J '%s'"}. I use @samp{"mpage -h'%s' -b Letter -H1of -mlrtb 2860@code{"lpr -J '%s'"}. I use @code{"mpage -h'%s' -b Letter -H1of -mlrtb
2689-P"} which produces a nice header and adds a bit of margin so the text 2861-P"} which produces a nice header and adds a bit of margin so the text
2690fits within my printer's margins. Normally messages are printed in the 2862fits within my printer's margins. Normally messages are printed in the
2691foreground. If this is slow on your system, you may elect to turn on 2863foreground. If this is slow on your system, you may elect to turn on
@@ -2699,11 +2871,10 @@ commands @kbd{P p} or @kbd{P f}.
2699 2871
2700@cindex files 2872@cindex files
2701@cindex pipes 2873@cindex pipes
2702
2703@findex mh-refile-or-write-again 2874@findex mh-refile-or-write-again
2704@findex mh-write-msg-to-file 2875@findex mh-write-msg-to-file
2705@kindex !
2706@kindex > 2876@kindex >
2877@kindex !
2707 2878
2708MH-E does offer a couple of commands that are not a part of MH@. The 2879MH-E does offer a couple of commands that are not a part of MH@. The
2709first one, @kbd{>} (@code{mh-write-msg-to-file}), writes a message to 2880first one, @kbd{>} (@code{mh-write-msg-to-file}), writes a message to
@@ -2716,6 +2887,7 @@ can be made with the command @kbd{!}
2716 2887
2717@findex mh-pipe-msg 2888@findex mh-pipe-msg
2718@kindex | 2889@kindex |
2890@kindex l
2719 2891
2720You can also pipe the message through a Unix shell command with the 2892You can also pipe the message through a Unix shell command with the
2721command @kbd{|} (@code{mh-pipe-msg}). You are prompted for the Unix 2893command @kbd{|} (@code{mh-pipe-msg}). You are prompted for the Unix
@@ -2744,6 +2916,8 @@ like to change the initial default directory, customize the option
2744directory for storing the content of these messages. 2916directory for storing the content of these messages.
2745 2917
2746@findex mh-store-buffer 2918@findex mh-store-buffer
2919@kindex @key{RET}
2920@kindex X s
2747 2921
2748By the way, @kbd{X s} calls the Emacs Lisp function 2922By the way, @kbd{X s} calls the Emacs Lisp function
2749@code{mh-store-buffer}. I mention this because you can use it directly 2923@code{mh-store-buffer}. I mention this because you can use it directly
@@ -2764,11 +2938,11 @@ typing @kbd{M-x mh-store-buffer @key{RET} ~ @key{RET}}.
2764@findex mh-next-unread-msg 2938@findex mh-next-unread-msg
2765@findex mh-previous-undeleted-msg 2939@findex mh-previous-undeleted-msg
2766@findex mh-previous-unread-msg 2940@findex mh-previous-unread-msg
2941@kindex g
2767@kindex M-< 2942@kindex M-<
2768@kindex M-> 2943@kindex M->
2769@kindex M-n 2944@kindex M-n
2770@kindex M-p 2945@kindex M-p
2771@kindex g
2772@kindex n 2946@kindex n
2773@kindex p 2947@kindex p
2774 2948
@@ -2792,6 +2966,7 @@ message with @kbd{M-<} (@code{mh-first-msg}) and @kbd{M->}
2792@findex previous-line 2966@findex previous-line
2793@kindex C-n 2967@kindex C-n
2794@kindex C-p 2968@kindex C-p
2969@kindex @key{RET}
2795 2970
2796You can also use the Emacs commands @kbd{C-p} (@code{previous-line}) 2971You can also use the Emacs commands @kbd{C-p} (@code{previous-line})
2797and @kbd{C-n} (@code{next-line}) to move up and down the scan lines in 2972and @kbd{C-n} (@code{next-line}) to move up and down the scan lines in
@@ -2801,6 +2976,8 @@ the MH-Folder window. These commands can be used in conjunction with
2801@cindex deleting messages 2976@cindex deleting messages
2802@findex mh-delete-msg 2977@findex mh-delete-msg
2803@kindex d 2978@kindex d
2979@kindex n
2980@kindex p
2804 2981
2805To mark a message for deletion, use the command @kbd{d} 2982To mark a message for deletion, use the command @kbd{d}
2806(@code{mh-delete-msg}). A @samp{D} is placed by the message in the 2983(@code{mh-delete-msg}). A @samp{D} is placed by the message in the
@@ -2822,7 +2999,11 @@ the message.
2822 2999
2823@findex mh-delete-subject 3000@findex mh-delete-subject
2824@findex mh-delete-subject-or-thread 3001@findex mh-delete-subject-or-thread
3002@findex mh-thread-delete
3003@findex mh-undo
2825@kindex k 3004@kindex k
3005@kindex T d
3006@kindex u
2826 3007
2827And to delete more messages faster, you can use @kbd{k} 3008And to delete more messages faster, you can use @kbd{k}
2828(@code{mh-delete-subject-or-thread}) to delete all the messages with 3009(@code{mh-delete-subject-or-thread}) to delete all the messages with
@@ -2861,6 +3042,8 @@ the command @kbd{M} (@code{mh-modify}). It displays the raw message in
2861an editable buffer. When you are done editing, save and kill the 3042an editable buffer. When you are done editing, save and kill the
2862buffer as you would any other. 3043buffer as you would any other.
2863 3044
3045@findex mh-kill-folder
3046@findex mh-pack-folder
2864@vindex mh-do-not-confirm-flag 3047@vindex mh-do-not-confirm-flag
2865 3048
2866Commands such as @code{mh-pack-folder} prompt to confirm whether to 3049Commands such as @code{mh-pack-folder} prompt to confirm whether to
@@ -2960,7 +3143,11 @@ original configuration is displayed.
2960@node Folders, Sending Mail, Reading Mail, Top 3143@node Folders, Sending Mail, Reading Mail, Top
2961@chapter Organizing Your Mail with Folders 3144@chapter Organizing Your Mail with Folders
2962 3145
3146@cindex @samp{Folder} menu
3147@cindex @samp{Message} menu
2963@cindex folders 3148@cindex folders
3149@cindex menu, @samp{Folder}
3150@cindex menu, @samp{Message}
2964@cindex using folders 3151@cindex using folders
2965 3152
2966This chapter discusses the things you can do with folders within MH-E. 3153This chapter discusses the things you can do with folders within MH-E.
@@ -3214,6 +3401,8 @@ Ticked message face.
3214@samp{To:} face. 3401@samp{To:} face.
3215@end vtable 3402@end vtable
3216 3403
3404@vindex mh-folder-mode-hook
3405
3217The hook @code{mh-folder-mode-hook} is called when visiting a new 3406The hook @code{mh-folder-mode-hook} is called when visiting a new
3218folder in MH-Folder mode. This could be used to set your own key 3407folder in MH-Folder mode. This could be used to set your own key
3219bindings, for example: 3408bindings, for example:
@@ -3268,15 +3457,20 @@ create folders. If you specify a folder that does not exist, you will
3268be prompted to create it. The hook @code{mh-refile-msg-hook} is called 3457be prompted to create it. The hook @code{mh-refile-msg-hook} is called
3269after a message is marked to be refiled. 3458after a message is marked to be refiled.
3270 3459
3460@findex mh-write-msg-to-file
3461@kindex !
3462
3271If you are refiling several messages into the same folder, you can use 3463If you are refiling several messages into the same folder, you can use
3272the command @kbd{!} (@code{mh-refile-or-write-again}) to repeat the 3464the command @kbd{!} (@code{mh-refile-or-write-again}) to repeat the
3273last refile or write (see the description of @kbd{>} 3465last refile or write (for the description of @kbd{>}
3274(@code{mh-write-msg-to-file} in @ref{Files and Pipes}). You can use a 3466(@code{mh-write-msg-to-file}), @pxref{Files and Pipes}). You can use a
3275range in either case (for example, @kbd{C-u o 1 3 5-7 last:5 frombob 3467range in either case (for example, @kbd{C-u o 1 3 5-7 last:5 frombob
3276@key{RET}}, @pxref{Ranges}). 3468@key{RET}}, @pxref{Ranges}).
3277 3469
3278@cindex expunging refiles and deletes 3470@cindex expunging refiles and deletes
3279@cindex undoing refiles and deletes 3471@cindex undoing refiles and deletes
3472@findex mh-undo
3473@kindex u
3280 3474
3281If you've deleted a message or refiled it, but changed your mind, you 3475If you've deleted a message or refiled it, but changed your mind, you
3282can cancel the action before you've executed it. Use @kbd{u} 3476can cancel the action before you've executed it. Use @kbd{u}
@@ -3284,9 +3478,15 @@ can cancel the action before you've executed it. Use @kbd{u}
3284You can also undo refiles and deletes for messages that are found in a 3478You can also undo refiles and deletes for messages that are found in a
3285given range (@pxref{Ranges}). 3479given range (@pxref{Ranges}).
3286 3480
3481@findex mh-undo-folder
3482@kindex F u
3483
3287Alternatively, you can use @kbd{F u} (@code{mh-undo-folder}) to undo 3484Alternatively, you can use @kbd{F u} (@code{mh-undo-folder}) to undo
3288all refiles and deletes in the current folder. 3485all refiles and deletes in the current folder.
3289 3486
3487@findex mh-execute-commands
3488@kindex x
3489
3290If you've marked messages to be deleted or refiled and you want to go 3490If you've marked messages to be deleted or refiled and you want to go
3291ahead and delete or refile the messages, use @kbd{x} 3491ahead and delete or refile the messages, use @kbd{x}
3292(@code{mh-execute-commands}). Many MH-E commands that may affect the 3492(@code{mh-execute-commands}). Many MH-E commands that may affect the
@@ -3295,6 +3495,10 @@ you want to process refiles or deletes first and then either run
3295@kbd{x} for you or undo the pending refiles and deletes, which are 3495@kbd{x} for you or undo the pending refiles and deletes, which are
3296lost. 3496lost.
3297 3497
3498@kindex x
3499@vindex mh-after-commands-processed-hook
3500@vindex mh-before-commands-processed-hook
3501
3298The command @kbd{x} runs @code{mh-before-commands-processed-hook} 3502The command @kbd{x} runs @code{mh-before-commands-processed-hook}
3299before the commands are processed and 3503before the commands are processed and
3300@code{mh-after-commands-processed-hook} after the commands are 3504@code{mh-after-commands-processed-hook} after the commands are
@@ -3306,6 +3510,10 @@ hook include @code{mh-folders-changed}, which lists which folders were
3306affected by deletes and refiles. This list will always include the 3510affected by deletes and refiles. This list will always include the
3307current folder @code{mh-current-folder}. 3511current folder @code{mh-current-folder}.
3308 3512
3513@findex mh-copy-msg
3514@kindex c
3515@kindex o
3516
3309If you wish to copy a message to another folder, you can use the 3517If you wish to copy a message to another folder, you can use the
3310command @kbd{c} (@code{mh-copy-msg}) (see the @option{-link} argument 3518command @kbd{c} (@code{mh-copy-msg}) (see the @option{-link} argument
3311to @command{refile}(1)). Like the command @kbd{o}, this command 3519to @command{refile}(1)). Like the command @kbd{o}, this command
@@ -3314,12 +3522,14 @@ range (@pxref{Ranges}). Note that unlike the command @kbd{o}, the copy
3314takes place immediately. The original copy remains in the current 3522takes place immediately. The original copy remains in the current
3315folder. 3523folder.
3316 3524
3317@cindex MH-Folder Show mode
3318@cindex MH-Folder mode
3319@cindex junk mail 3525@cindex junk mail
3526@cindex MH-Folder mode
3527@cindex MH-Folder Show mode
3320@cindex modes, MH-Folder 3528@cindex modes, MH-Folder
3321@cindex modes, MH-Folder Show 3529@cindex modes, MH-Folder Show
3322@cindex spam 3530@cindex spam
3531@findex mh-toggle-showing
3532@kindex t
3323 3533
3324The command @kbd{t} (@code{mh-toggle-showing}) switches between 3534The command @kbd{t} (@code{mh-toggle-showing}) switches between
3325MH-Folder mode and MH-Folder Show mode@footnote{For you Emacs wizards, 3535MH-Folder mode and MH-Folder Show mode@footnote{For you Emacs wizards,
@@ -3334,6 +3544,7 @@ folder for later examination.
3334@cindex modes, MH-Folder 3544@cindex modes, MH-Folder
3335@cindex modes, MH-Show 3545@cindex modes, MH-Show
3336@cindex moving between messages 3546@cindex moving between messages
3547@kindex t
3337@vindex mh-recenter-summary-flag 3548@vindex mh-recenter-summary-flag
3338 3549
3339When you use @kbd{t} to toggle between show mode and scan mode, the 3550When you use @kbd{t} to toggle between show mode and scan mode, the
@@ -3343,6 +3554,10 @@ causes the toggle to display as many scan lines as possible, with the
3343cursor at the middle. The effect of @code{mh-recenter-summary-flag} is 3554cursor at the middle. The effect of @code{mh-recenter-summary-flag} is
3344rather useful, but it can be annoying on a slow network connection. 3555rather useful, but it can be annoying on a slow network connection.
3345 3556
3557@findex mh-visit-folder
3558@kindex F v
3559@vindex mh-large-folder
3560
3346When you want to read the messages that you have refiled into folders, 3561When you want to read the messages that you have refiled into folders,
3347use the command @kbd{F v} (@code{mh-visit-folder}) to visit the 3562use the command @kbd{F v} (@code{mh-visit-folder}) to visit the
3348folder. You are prompted for the folder name. The folder buffer will 3563folder. You are prompted for the folder name. The folder buffer will
@@ -3356,15 +3571,18 @@ to specify the range and @code{mh-large-folder} is ignored. Note that
3356this command can also be used to create folders. If you specify a 3571this command can also be used to create folders. If you specify a
3357folder that does not exist, you will be prompted to create it. 3572folder that does not exist, you will be prompted to create it.
3358 3573
3574@findex mh-search
3575@kindex F s
3576
3359If you forget where you've refiled your messages, you can find them 3577If you forget where you've refiled your messages, you can find them
3360using @kbd{F s} (@code{mh-search}). @xref{Searching}. 3578using @kbd{F s} (@code{mh-search}). @xref{Searching}.
3361 3579
3362@cindex @command{procmail} 3580@cindex @command{procmail}
3363@cindex @command{rcvstore} 3581@cindex @command{rcvstore}
3364@cindex @samp{unseen} sequence
3365@cindex MH commands, @command{rcvstore} 3582@cindex MH commands, @command{rcvstore}
3366@cindex Unix commands, @command{procmail} 3583@cindex @samp{unseen} sequence
3367@cindex sequence, @samp{unseen} 3584@cindex sequence, @samp{unseen}
3585@cindex Unix commands, @command{procmail}
3368@cindex unseen messages, viewing 3586@cindex unseen messages, viewing
3369@findex mh-index-new-messages 3587@findex mh-index-new-messages
3370@kindex F n 3588@kindex F n
@@ -3382,6 +3600,9 @@ folders, or nothing to search all folders.
3382@cindex @samp{tick} sequence 3600@cindex @samp{tick} sequence
3383@cindex sequence, @samp{tick} 3601@cindex sequence, @samp{tick}
3384@cindex ticked messages, viewing 3602@cindex ticked messages, viewing
3603@findex mh-index-ticked-messages
3604@kindex F '
3605@vindex mh-ticked-messages-folders
3385 3606
3386If you have ticked messages (@pxref{Sequences}), you can display them 3607If you have ticked messages (@pxref{Sequences}), you can display them
3387using the command @kbd{F '} (@code{mh-index-ticked-messages}). All 3608using the command @kbd{F '} (@code{mh-index-ticked-messages}). All
@@ -3400,14 +3621,28 @@ You can display messages in any sequence with the command @kbd{F q}
3400With a prefix argument, enter a space-separated list of folders at the 3621With a prefix argument, enter a space-separated list of folders at the
3401prompt, or nothing to search all folders. 3622prompt, or nothing to search all folders.
3402 3623
3624@vindex mh-new-messages-folders
3625@vindex mh-recursive-folders-flag
3626@vindex mh-ticked-messages-folders
3627
3403Set the options @code{mh-new-messages-folders} and 3628Set the options @code{mh-new-messages-folders} and
3404@code{mh-ticked-messages-folders} to @samp{Inbox} to search the 3629@code{mh-ticked-messages-folders} to @samp{Inbox} to search the
3405@samp{+inbox} folder or @samp{All} to search all of the top level 3630@samp{+inbox} folder or @samp{All} to search all of the top level
3406folders. Otherwise, list the folders that should be searched with the 3631folders. Otherwise, list the folders that should be searched with the
3407@samp{Choose Folders} menu item. See @code{mh-recursive-folders-flag}. 3632@samp{Choose Folders} menu item. See @code{mh-recursive-folders-flag}.
3408 3633
3409@cindex @samp{*MH-E Folders*}
3410@cindex buffers, @samp{*MH-E Folders*} 3634@cindex buffers, @samp{*MH-E Folders*}
3635@cindex @samp{*MH-E Folders*}
3636@findex mh-kill-folder
3637@findex mh-list-folders
3638@findex mh-pack-folder
3639@findex mh-rescan-folder
3640@findex mh-sort-folder
3641@kindex F k
3642@kindex F l
3643@kindex F p
3644@kindex F r
3645@kindex F S
3411 3646
3412Other commands you can perform on folders include: @kbd{F l} 3647Other commands you can perform on folders include: @kbd{F l}
3413(@code{mh-list-folders}), to place a listing of all the folders in 3648(@code{mh-list-folders}), to place a listing of all the folders in
@@ -3422,11 +3657,16 @@ to rescan the folder, which is useful to grab all messages in your
3422you don't want to rescan the entire folder, the commands @kbd{F r} or 3657you don't want to rescan the entire folder, the commands @kbd{F r} or
3423@kbd{F p} will accept a range (@pxref{Ranges}). 3658@kbd{F p} will accept a range (@pxref{Ranges}).
3424 3659
3660@kindex @key{TAB}
3661@vindex mh-recursive-folders-flag
3662
3425By default, operations on folders work only one level at a time. Set 3663By default, operations on folders work only one level at a time. Set
3426@code{mh-recursive-folders-flag} to non-@code{nil} to operate on all 3664@code{mh-recursive-folders-flag} to non-@code{nil} to operate on all
3427folders. This mostly means that you'll be able to see all your folders 3665folders. This mostly means that you'll be able to see all your folders
3428when you press @key{TAB} when prompted for a folder name. 3666when you press @key{TAB} when prompted for a folder name.
3429 3667
3668@findex mh-search-p
3669@kindex k
3430@vindex mh-kill-folder-suppress-prompt-hooks 3670@vindex mh-kill-folder-suppress-prompt-hooks
3431 3671
3432The hook @code{mh-kill-folder-suppress-prompt-hooks} is an abnormal 3672The hook @code{mh-kill-folder-suppress-prompt-hooks} is an abnormal
@@ -3449,10 +3689,12 @@ Use this hook with care. If there is a bug in your hook which returns
3449 3689
3450@cindex @command{sortm} 3690@cindex @command{sortm}
3451@cindex @file{.mh_profile} 3691@cindex @file{.mh_profile}
3452@cindex @samp{sortm:} MH profile component 3692@cindex files, @file{.mh_profile}
3453@cindex MH commands, @command{sortm} 3693@cindex MH commands, @command{sortm}
3454@cindex MH profile component, @samp{sortm:} 3694@cindex MH profile component, @samp{sortm:}
3455@cindex files, @file{.mh_profile} 3695@cindex @samp{sortm:} MH profile component
3696@kindex F S
3697@vindex mh-sortm-args
3456 3698
3457The option @code{mh-sortm-args} holds extra arguments to pass on to 3699The option @code{mh-sortm-args} holds extra arguments to pass on to
3458the command @command{sortm}@footnote{See the section 3700the command @command{sortm}@footnote{See the section
@@ -3464,7 +3706,8 @@ This option may be used to provide an alternate view. For example,
3464 3706
3465@cindex exiting 3707@cindex exiting
3466@cindex quitting 3708@cindex quitting
3467@findex mh-rmail 3709@findex mh-quit
3710@kindex q
3468 3711
3469When you want to quit using MH-E and go back to editing, you can use 3712When you want to quit using MH-E and go back to editing, you can use
3470the @kbd{q} (@code{mh-quit}) command. This buries the buffers of the 3713the @kbd{q} (@code{mh-quit}) command. This buries the buffers of the
@@ -3475,18 +3718,20 @@ buffers whose name begins with @samp{ *mh-} or @samp{*MH-E }
3475selecting the @samp{+inbox} buffer or by running @kbd{M-x mh-rmail} 3718selecting the @samp{+inbox} buffer or by running @kbd{M-x mh-rmail}
3476again. 3719again.
3477 3720
3721@findex mh-execute-commands
3722@kindex q
3478@vindex mh-before-quit-hook 3723@vindex mh-before-quit-hook
3479@vindex mh-quit-hook 3724@vindex mh-quit-hook
3480 3725
3481The two hooks @code{mh-before-quit-hook} and @code{mh-quit-hook} are 3726The two hooks @code{mh-before-quit-hook} and @code{mh-quit-hook} are
3482called by @kbd{q} (@code{mh-quit}). The former one is called before 3727called by @kbd{q}. The former one is called before the quit occurs, so
3483the quit occurs, so you might use it to perform any MH-E operations; 3728you might use it to perform any MH-E operations; you could perform
3484you could perform some query and abort the quit or call 3729some query and abort the quit or call @code{mh-execute-commands}, for
3485@code{mh-execute-commands}, for example. The latter is not run in an 3730example. The latter is not run in an MH-E context, so you might use it
3486MH-E context, so you might use it to modify the window setup. For 3731to modify the window setup. For example, if the window configuration
3487example, if the window configuration was saved as in the example in 3732was saved as in the example in @ref{Miscellaneous Commands and
3488@ref{Miscellaneous Commands and Options}, you would also want to set 3733Options}, you would also want to set @code{mh-quit-hook} to the
3489@code{mh-quit-hook} to the following: 3734following:
3490 3735
3491@c XXX Replace this with my example for killing the mail buffers. 3736@c XXX Replace this with my example for killing the mail buffers.
3492 3737
@@ -3508,8 +3753,8 @@ example, if the window configuration was saved as in the example in
3508 3753
3509@cindex folders, renaming 3754@cindex folders, renaming
3510@cindex renaming folders 3755@cindex renaming folders
3756@findex dired
3511@findex dired-do-rename 3757@findex dired-do-rename
3512@kindex R
3513 3758
3514You can use dired to manipulate the folders themselves. For example, I 3759You can use dired to manipulate the folders themselves. For example, I
3515renamed my @samp{+out} folder to the more common @samp{+outbox} by 3760renamed my @samp{+out} folder to the more common @samp{+outbox} by
@@ -3522,6 +3767,7 @@ moving my cursor to @samp{out} and using the command @kbd{R}
3522 3767
3523@cindex sending mail 3768@cindex sending mail
3524@findex mh-smail 3769@findex mh-smail
3770@kindex M-x mh-smail
3525 3771
3526You can send a mail message in several ways. You can call @kbd{M-x 3772You can send a mail message in several ways. You can call @kbd{M-x
3527mh-smail} directly, or from the command line like this: 3773mh-smail} directly, or from the command line like this:
@@ -3540,6 +3786,9 @@ There are some commands that need to send a mail message, such as
3540commands use MH-E by setting the option @code{mail-user-agent} to 3786commands use MH-E by setting the option @code{mail-user-agent} to
3541@samp{Emacs interface to MH}. 3787@samp{Emacs interface to MH}.
3542 3788
3789@cindex @samp{Message} menu
3790@cindex menu, @samp{Message}
3791
3543From within MH-E's MH-Folder mode, other methods of sending mail are 3792From within MH-E's MH-Folder mode, other methods of sending mail are
3544available as well. These can also be found in the @samp{Message} menu. 3793available as well. These can also be found in the @samp{Message} menu.
3545 3794
@@ -3616,7 +3865,7 @@ On means prompt for header fields when composing a new draft (default:
3616@samp{off}). 3865@samp{off}).
3617@c ------------------------- 3866@c -------------------------
3618@item mh-forward-subject-format 3867@item mh-forward-subject-format
3619Format string for forwarded message subject (default: @samp{"%s: 3868Format string for forwarded message subject (default: @code{"%s:
3620%s"}). 3869%s"}).
3621@c ------------------------- 3870@c -------------------------
3622@item mh-insert-x-mailer-flag 3871@item mh-insert-x-mailer-flag
@@ -3671,6 +3920,8 @@ in the following sections.
3671@cindex sending mail 3920@cindex sending mail
3672@findex mh-smail 3921@findex mh-smail
3673@findex mh-smail-other-window 3922@findex mh-smail-other-window
3923@kindex M-x mh-smail
3924@kindex M-x mh-smail-other-window
3674 3925
3675Outside of an MH-Folder buffer, you must call either @kbd{M-x 3926Outside of an MH-Folder buffer, you must call either @kbd{M-x
3676mh-smail} or @kbd{M-x mh-smail-other-window} to compose a new message. 3927mh-smail} or @kbd{M-x mh-smail-other-window} to compose a new message.
@@ -3684,25 +3935,24 @@ following key bindings to @file{~/.emacs} useful:
3684(global-set-key "\C-x4m" 'mh-smail-other-window) 3935(global-set-key "\C-x4m" 'mh-smail-other-window)
3685@end smalllisp 3936@end smalllisp
3686 3937
3687@cindex MH-Letter mode
3688@cindex draft folder 3938@cindex draft folder
3939@cindex MH-Letter mode
3689@cindex modes, MH-Letter 3940@cindex modes, MH-Letter
3690@findex mh-send 3941@findex mh-send
3691@kindex m 3942@kindex m
3692 3943
3693From within a MH-Folder buffer, you can simply use the command @kbd{m} 3944From within a MH-Folder buffer, you can simply use the command @kbd{m}
3694(@code{mh-send}). However you invoke @code{mh-send}, your letter 3945(@code{mh-send}). However you invoke @code{mh-send}, your letter
3695appears in an Emacs buffer whose mode is MH-Letter (see the Figure in 3946appears in an Emacs buffer whose mode is MH-Letter (to see what the
3696@ref{Sending Mail Tour} to see what the buffer looks like). MH-Letter 3947buffer looks like, @pxref{Sending Mail Tour}). MH-Letter mode allows
3697mode allows you to edit your message, to check the validity of the 3948you to edit your message, to check the validity of the recipients, to
3698recipients, to insert attachments and other messages into your 3949insert attachments and other messages into your message, and to send
3699message, and to send the message. We'll go more into depth about 3950the message. We'll go more into depth about editing a
3700editing a @dfn{draft}@footnote{I highly recommend that you use a 3951@dfn{draft}@footnote{I highly recommend that you use a @dfn{draft
3701@dfn{draft folder} so that you can edit several drafts in parallel. To 3952folder} so that you can edit several drafts in parallel. To do so,
3702do so, create a folder named @samp{+drafts} for example, and add the 3953create a folder named @samp{+drafts} for example, and add the profile
3703profile component @samp{Draft-Folder: drafts} (see 3954component @samp{Draft-Folder: drafts} (see @code{mh-profile}(5)).} (a
3704@code{mh-profile}(5)).} (a message you're composing) in just a moment 3955message you're composing) in just a moment (@pxref{Editing Drafts}).
3705(@pxref{Editing Drafts}).
3706 3956
3707@vindex mh-compose-prompt-flag 3957@vindex mh-compose-prompt-flag
3708 3958
@@ -3710,8 +3960,8 @@ If you prefer to be prompted for the recipient and subject fields
3710before the MH-Letter buffer appears, turn on the option 3960before the MH-Letter buffer appears, turn on the option
3711@code{mh-compose-prompt-flag}. 3961@code{mh-compose-prompt-flag}.
3712 3962
3713@cindex @samp{X-Mailer:} header field
3714@cindex header field, @samp{X-Mailer:} 3963@cindex header field, @samp{X-Mailer:}
3964@cindex @samp{X-Mailer:} header field
3715@vindex mh-insert-x-mailer-flag 3965@vindex mh-insert-x-mailer-flag
3716 3966
3717MH-E adds an @samp{X-Mailer:} header field to the header that includes 3967MH-E adds an @samp{X-Mailer:} header field to the header that includes
@@ -3722,8 +3972,10 @@ participate in our marketing, you can turn off the option
3722@cindex @command{repl} 3972@cindex @command{repl}
3723@cindex @file{components} 3973@cindex @file{components}
3724@cindex MH commands, @command{repl} 3974@cindex MH commands, @command{repl}
3975@cindex MH-Letter mode
3725@cindex Mail mode 3976@cindex Mail mode
3726@cindex files, @file{components} 3977@cindex files, @file{components}
3978@cindex modes, MH-Letter
3727@cindex modes, Mail 3979@cindex modes, Mail
3728@vindex mail-mode-hook 3980@vindex mail-mode-hook
3729@vindex mh-letter-mode-hook 3981@vindex mh-letter-mode-hook
@@ -3738,9 +3990,7 @@ order) before @code{mh-letter-mode-hook}.}. For example, you may wish
3738to modify the header after @command{repl} has done its work, or you 3990to modify the header after @command{repl} has done its work, or you
3739may have a complicated @file{components} file and need to tell MH-E 3991may have a complicated @file{components} file and need to tell MH-E
3740where the cursor should go. Here's an example of how you would use 3992where the cursor should go. Here's an example of how you would use
3741this hook. You can add the hook using @code{add-hook} or by running 3993this hook.
3742@kbd{M-x customize-option @key{RET} mh-letter-mode-hook
3743@key{RET}}---all of the other hooks are set in a similar fashion.
3744 3994
3745@findex mh-insert-signature, example 3995@findex mh-insert-signature, example
3746 3996
@@ -3764,8 +4014,6 @@ this hook. You can add the hook using @code{add-hook} or by running
3764 (goto-char (point-max)) ; @r{go to end of message to} 4014 (goto-char (point-max)) ; @r{go to end of message to}
3765 (mh-insert-signature))) ; @r{insert signature} 4015 (mh-insert-signature))) ; @r{insert signature}
3766 4016
3767(add-hook 'mh-letter-mode-hook 'my-mh-letter-mode-hook)
3768
3769@i{Prepare draft for editing via mh-letter-mode-hook} 4017@i{Prepare draft for editing via mh-letter-mode-hook}
3770 4018
3771@end group 4019@end group
@@ -3775,6 +4023,7 @@ The function, @code{add-enriched-text} is defined in the example in
3775@ref{Adding Attachments}. 4023@ref{Adding Attachments}.
3776 4024
3777@vindex mh-compose-letter-function 4025@vindex mh-compose-letter-function
4026@vindex mh-letter-mode-hook
3778 4027
3779The second hook, a function really, is 4028The second hook, a function really, is
3780@code{mh-compose-letter-function}. Like @code{mh-letter-mode-hook}, it 4029@code{mh-compose-letter-function}. Like @code{mh-letter-mode-hook}, it
@@ -3853,6 +4102,8 @@ no effect.
3853Another way to include the message automatically in your draft is to 4102Another way to include the message automatically in your draft is to
3854use @samp{repl: -filter repl.filter} in your MH profile. 4103use @samp{repl: -filter repl.filter} in your MH profile.
3855 4104
4105@vindex mh-reply-show-message-flag
4106
3856If you include the message automatically, you can hide the MH-Show 4107If you include the message automatically, you can hide the MH-Show
3857buffer by turning off the option @code{mh-reply-show-message-flag}. 4108buffer by turning off the option @code{mh-reply-show-message-flag}.
3858 4109
@@ -3872,9 +4123,9 @@ recipients in the draft.
3872@section Forwarding Mail 4123@section Forwarding Mail
3873 4124
3874@cindex @command{forw} 4125@cindex @command{forw}
3875@cindex MH commands, @command{forw}
3876@cindex draft 4126@cindex draft
3877@cindex forwarding 4127@cindex forwarding
4128@cindex MH commands, @command{forw}
3878@findex mh-forward 4129@findex mh-forward
3879@kindex f 4130@kindex f
3880@vindex mh-forward-hook 4131@vindex mh-forward-hook
@@ -3890,9 +4141,9 @@ All of the messages in the range are inserted into your draft. The
3890hook @code{mh-forward-hook} is called on the draft. 4141hook @code{mh-forward-hook} is called on the draft.
3891 4142
3892@cindex @file{.mh_profile} 4143@cindex @file{.mh_profile}
3893@cindex @samp{forw:} MH profile component
3894@cindex MH profile component, @samp{forw:}
3895@cindex files, @file{.mh_profile} 4144@cindex files, @file{.mh_profile}
4145@cindex MH profile component, @samp{forw:}
4146@cindex @samp{forw:} MH profile component
3896@vindex mh-compose-forward-as-mime-flag 4147@vindex mh-compose-forward-as-mime-flag
3897 4148
3898By default, the option @code{mh-compose-forward-as-mime-flag} is on 4149By default, the option @code{mh-compose-forward-as-mime-flag} is on
@@ -3912,7 +4163,7 @@ is controlled by the option @code{mh-forward-subject-format}. This
3912option is a string which includes two escapes (@samp{%s}). The first 4163option is a string which includes two escapes (@samp{%s}). The first
3913@samp{%s} is replaced with the sender of the original message, and the 4164@samp{%s} is replaced with the sender of the original message, and the
3914second one is replaced with the original @samp{Subject:}. The default 4165second one is replaced with the original @samp{Subject:}. The default
3915value of @samp{"%s: %s"} takes a message with the header: 4166value of @code{"%s: %s"} takes a message with the header:
3916 4167
3917@smallexample 4168@smallexample
3918@group 4169@group
@@ -3943,6 +4194,9 @@ does it add your name to the @samp{From:} header field. It appears to
3943the recipient as if the message had come from the original sender. 4194the recipient as if the message had come from the original sender.
3944When you run this command, you are prompted for the recipients. 4195When you run this command, you are prompted for the recipients.
3945 4196
4197@findex mh-edit-again
4198@kindex e
4199
3946For more information on redistributing messages, see 4200For more information on redistributing messages, see
3947@command{dist}(1). Also investigate the command @kbd{e} 4201@command{dist}(1). Also investigate the command @kbd{e}
3948(@code{mh-edit-again}) for another way to redistribute messages 4202(@code{mh-edit-again}) for another way to redistribute messages
@@ -3969,7 +4223,9 @@ a message that has been redistributed before, turn off this option.
3969@cindex files, @file{draft} 4223@cindex files, @file{draft}
3970@cindex re-editing drafts 4224@cindex re-editing drafts
3971@findex mh-edit-again 4225@findex mh-edit-again
4226@kindex F v drafts
3972@kindex e 4227@kindex e
4228@kindex n
3973 4229
3974If you don't complete a draft for one reason or another, and if the 4230If you don't complete a draft for one reason or another, and if the
3975draft buffer is no longer available, you can pick your draft up again 4231draft buffer is no longer available, you can pick your draft up again
@@ -3979,11 +4235,14 @@ folders, you'll need to visit the draft folder with @kbd{F v drafts
3979@key{RET}}, use @kbd{n} to move to the appropriate message, and then 4235@key{RET}}, use @kbd{n} to move to the appropriate message, and then
3980use @kbd{e} to prepare the message for editing. 4236use @kbd{e} to prepare the message for editing.
3981 4237
4238@kindex e
4239
3982The @kbd{e} command can also be used to take messages that were sent 4240The @kbd{e} command can also be used to take messages that were sent
3983to you and to send them to more people. 4241to you and to send them to more people.
3984 4242
3985@cindex Mailer-Daemon 4243@cindex Mailer-Daemon
3986@findex mh-extract-rejected-mail 4244@findex mh-extract-rejected-mail
4245@kindex C-c C-c
3987@kindex E 4246@kindex E
3988 4247
3989Don't use @kbd{e} to re-edit a message from a @i{Mailer-Daemon} who 4248Don't use @kbd{e} to re-edit a message from a @i{Mailer-Daemon} who
@@ -3996,9 +4255,11 @@ send the message again with @kbd{C-c C-c}.
3996@node Editing Drafts, Aliases, Sending Mail, Top 4255@node Editing Drafts, Aliases, Sending Mail, Top
3997@chapter Editing a Draft 4256@chapter Editing a Draft
3998 4257
4258@cindex @samp{Letter} menu
3999@cindex MH-Letter mode 4259@cindex MH-Letter mode
4000@cindex draft 4260@cindex draft
4001@cindex editing draft 4261@cindex editing draft
4262@cindex menu, @samp{Letter}
4002@cindex modes, MH-Letter 4263@cindex modes, MH-Letter
4003 4264
4004When you edit a message that you want to send (called a @dfn{draft} in 4265When you edit a message that you want to send (called a @dfn{draft} in
@@ -4310,11 +4571,11 @@ On means delete any window displaying the message (default: @samp{off}).
4310@c ------------------------- 4571@c -------------------------
4311@item mh-extract-from-attribution-verb 4572@item mh-extract-from-attribution-verb
4312Verb to use for attribution when a message is yanked by @kbd{C-c C-y} 4573Verb to use for attribution when a message is yanked by @kbd{C-c C-y}
4313(default: @samp{"wrote:"}). 4574(default: @code{"wrote:"}).
4314@c ------------------------- 4575@c -------------------------
4315@item mh-ins-buf-prefix 4576@item mh-ins-buf-prefix
4316String to put before each line of a yanked or inserted message 4577String to put before each line of a yanked or inserted message
4317(default: @samp{"> "}). 4578(default: @code{"> "}).
4318@c ------------------------- 4579@c -------------------------
4319@item mh-letter-complete-function 4580@item mh-letter-complete-function
4320Function to call when completing outside of address or folder fields 4581Function to call when completing outside of address or folder fields
@@ -4328,7 +4589,7 @@ Default method to use in security tags (default: @samp{PGP (MIME)} if
4328support for it is available; otherwise @samp{None}). 4589support for it is available; otherwise @samp{None}).
4329@c ------------------------- 4590@c -------------------------
4330@item mh-signature-file-name 4591@item mh-signature-file-name
4331Source of user's signature (default: @samp{"~/.signature"}). 4592Source of user's signature (default: @code{"~/.signature"}).
4332@c ------------------------- 4593@c -------------------------
4333@item mh-signature-separator-flag 4594@item mh-signature-separator-flag
4334On means a signature separator should be inserted (default: 4595On means a signature separator should be inserted (default:
@@ -4336,7 +4597,7 @@ On means a signature separator should be inserted (default:
4336@c ------------------------- 4597@c -------------------------
4337@item mh-x-face-file 4598@item mh-x-face-file
4338File containing X-Face or Face header field to insert in outgoing mail. 4599File containing X-Face or Face header field to insert in outgoing mail.
4339(default: @samp{"~/.face"}). 4600(default: @code{"~/.face"}).
4340@c ------------------------- 4601@c -------------------------
4341@item mh-yank-behavior 4602@item mh-yank-behavior
4342Controls which part of a message is yanked by @kbd{C-c C-y} (default: 4603Controls which part of a message is yanked by @kbd{C-c C-y} (default:
@@ -4433,8 +4694,8 @@ draft. @xref{Folder Selection}.
4433@findex indent-relative 4694@findex indent-relative
4434@findex mh-letter-next-header-field-or-indent 4695@findex mh-letter-next-header-field-or-indent
4435@findex mh-letter-previous-header-field 4696@findex mh-letter-previous-header-field
4436@kindex S-@key{TAB}
4437@kindex @key{TAB} 4697@kindex @key{TAB}
4698@kindex S-@key{TAB}
4438@vindex mh-compose-skipped-header-fields 4699@vindex mh-compose-skipped-header-fields
4439@vindex mh-letter-header-field 4700@vindex mh-letter-header-field
4440 4701
@@ -4460,8 +4721,10 @@ take point to the last field from anywhere in the body.
4460@findex mh-letter-complete-or-space 4721@findex mh-letter-complete-or-space
4461@findex mh-letter-confirm-address 4722@findex mh-letter-confirm-address
4462@kindex , (comma) 4723@kindex , (comma)
4463@kindex M-@key{TAB}
4464@kindex @key{SPC} 4724@kindex @key{SPC}
4725@kindex M-@key{TAB}
4726@vindex mh-alias-flash-on-comma
4727@vindex mh-compose-space-does-completion-flag
4465@vindex mh-letter-complete-function 4728@vindex mh-letter-complete-function
4466 4729
4467If the field contains addresses (for example, @samp{To:} or 4730If the field contains addresses (for example, @samp{To:} or
@@ -4480,10 +4743,11 @@ press the comma, the command @code{mh-letter-confirm-address} flashes
4480the alias expansion in the minibuffer if 4743the alias expansion in the minibuffer if
4481@code{mh-alias-flash-on-comma} is turned on. 4744@code{mh-alias-flash-on-comma} is turned on.
4482 4745
4483@kindex C-c C-t
4484@findex mh-letter-toggle-header-field-display
4485@c XXX Document the replacement for the inaccessible 'long argument. 4746@c XXX Document the replacement for the inaccessible 'long argument.
4486 4747
4748@findex mh-letter-toggle-header-field-display
4749@kindex C-c C-t
4750
4487Use the command @kbd{C-c C-t} 4751Use the command @kbd{C-c C-t}
4488@code{mh-letter-toggle-header-field-display} to display truncated 4752@code{mh-letter-toggle-header-field-display} to display truncated
4489header fields. This command is a toggle so entering it again will hide 4753header fields. This command is a toggle so entering it again will hide
@@ -4566,6 +4830,7 @@ the first period in the paragraph above, the result would be this:
4566@cindex yanking messages 4830@cindex yanking messages
4567@findex mh-yank-cur-msg 4831@findex mh-yank-cur-msg
4568@kindex C-c C-y 4832@kindex C-c C-y
4833@vindex mh-ins-buf-prefix
4569 4834
4570It is often useful to insert a snippet of text from a letter that 4835It is often useful to insert a snippet of text from a letter that
4571someone mailed to provide some context for your reply. The command 4836someone mailed to provide some context for your reply. The command
@@ -4592,9 +4857,11 @@ followed by the content of the option
4592@samp{wrote:}, @samp{a écrit:}, and @samp{schrieb:}. You can also use 4857@samp{wrote:}, @samp{a écrit:}, and @samp{schrieb:}. You can also use
4593the @samp{Custom String} menu item to enter your own verb. 4858the @samp{Custom String} menu item to enter your own verb.
4594 4859
4860@vindex mail-citation-hook
4595@vindex mh-ins-buf-prefix 4861@vindex mh-ins-buf-prefix
4862@vindex mh-yank-behavior
4596 4863
4597The prefix @samp{"> "} is the default setting for the option 4864The prefix @code{"> "} is the default setting for the option
4598@code{mh-ins-buf-prefix}. I suggest that you not modify this option 4865@code{mh-ins-buf-prefix}. I suggest that you not modify this option
4599since it is used by many mailers and news readers: messages are far 4866since it is used by many mailers and news readers: messages are far
4600easier to read if several included messages have all been indented by 4867easier to read if several included messages have all been indented by
@@ -4608,9 +4875,11 @@ You can also turn on the @code{mh-delete-yanked-msg-window-flag}
4608option to delete the window containing the original message after 4875option to delete the window containing the original message after
4609yanking it to make more room on your screen for your reply. 4876yanking it to make more room on your screen for your reply.
4610 4877
4611@vindex mh-yank-behavior
4612@cindex Emacs, packages, supercite 4878@cindex Emacs, packages, supercite
4613@cindex supercite package 4879@cindex supercite package
4880@kindex r
4881@vindex mail-citation-hook
4882@vindex mh-yank-behavior
4614 4883
4615You can control how the message to which you are replying is yanked 4884You can control how the message to which you are replying is yanked
4616into your reply using @code{mh-yank-behavior}. To include the entire 4885into your reply using @code{mh-yank-behavior}. To include the entire
@@ -4628,11 +4897,16 @@ Choose @samp{Invoke supercite}@footnote{@emph{Supercite} is a
4628full-bodied, full-featured, citation package that comes standard with 4897full-bodied, full-featured, citation package that comes standard with
4629Emacs.} to pass the entire message and header through supercite. 4898Emacs.} to pass the entire message and header through supercite.
4630 4899
4900@vindex mh-extract-from-attribution-verb
4901
4631If the @samp{Body With Attribution} setting is used, then the message 4902If the @samp{Body With Attribution} setting is used, then the message
4632minus the header is yanked and a simple attribution line is added at 4903minus the header is yanked and a simple attribution line is added at
4633the top using the value of the option 4904the top using the value of the option
4634@code{mh-extract-from-attribution-verb}. This is the default. 4905@code{mh-extract-from-attribution-verb}. This is the default.
4635 4906
4907@kindex C-c C-y
4908@vindex mh-delete-yanked-msg-window-flag
4909
4636If the @samp{Invoke supercite} or @samp{Body With Attribution} 4910If the @samp{Invoke supercite} or @samp{Body With Attribution}
4637settings are used, the @samp{-noformat} argument is passed to the 4911settings are used, the @samp{-noformat} argument is passed to the
4638@command{repl} program to override a @samp{-filter} or @samp{-format} 4912@command{repl} program to override a @samp{-filter} or @samp{-format}
@@ -4644,12 +4918,16 @@ People who use the automatic variants tend to turn on the option
4644@code{mh-delete-yanked-msg-window-flag} as well so that the show 4918@code{mh-delete-yanked-msg-window-flag} as well so that the show
4645window is never displayed. 4919window is never displayed.
4646 4920
4921@vindex mh-yank-behavior
4922
4647If the show buffer has a region, the option @code{mh-yank-behavior} is 4923If the show buffer has a region, the option @code{mh-yank-behavior} is
4648ignored unless its value is one of @samp{Attribution} variants in 4924ignored unless its value is one of @samp{Attribution} variants in
4649which case the attribution is added to the yanked region. 4925which case the attribution is added to the yanked region.
4650 4926
4651@findex trivial-cite 4927@findex trivial-cite
4652@vindex mail-citation-hook 4928@vindex mail-citation-hook
4929@vindex mh-ins-buf-prefix
4930@vindex mh-yank-behavior
4653 4931
4654If this isn't enough, you can gain full control over the appearance of 4932If this isn't enough, you can gain full control over the appearance of
4655the included text by setting @code{mail-citation-hook} to a function 4933the included text by setting @code{mail-citation-hook} to a function
@@ -4661,6 +4939,10 @@ and it should leave point and mark around the modified citation text
4661for the next hook function. The standard prefix 4939for the next hook function. The standard prefix
4662@code{mh-ins-buf-prefix} is not added if this hook is set. 4940@code{mh-ins-buf-prefix} is not added if this hook is set.
4663 4941
4942@cindex Emacs, packages, trivial-cite
4943@cindex trivial-cite package
4944@vindex mh-yank-behavior
4945
4664For example, if you use the hook function 4946For example, if you use the hook function
4665@uref{http://shasta.cs.uiuc.edu/~lrclause/tc.html, 4947@uref{http://shasta.cs.uiuc.edu/~lrclause/tc.html,
4666@code{trivial-cite}} (which is NOT part of Emacs), set 4948@code{trivial-cite}} (which is NOT part of Emacs), set
@@ -4675,6 +4957,7 @@ For example, if you use the hook function
4675@kindex C-c C-i 4957@kindex C-c C-i
4676@vindex mh-ins-buf-prefix 4958@vindex mh-ins-buf-prefix
4677@vindex mh-invisible-header-fields-compiled 4959@vindex mh-invisible-header-fields-compiled
4960@vindex mh-yank-behavior
4678 4961
4679Messages can be inserted with @kbd{C-c C-i} (@code{mh-insert-letter}). 4962Messages can be inserted with @kbd{C-c C-i} (@code{mh-insert-letter}).
4680This command prompts you for the folder and message number, which 4963This command prompts you for the folder and message number, which
@@ -4701,8 +4984,8 @@ letter and point after it.
4701You can insert your signature at the current cursor location with the 4984You can insert your signature at the current cursor location with the
4702command @kbd{C-c C-s} (@code{mh-insert-signature}). 4985command @kbd{C-c C-s} (@code{mh-insert-signature}).
4703 4986
4704@cindex @file{.signature}
4705@cindex files, @file{.signature} 4987@cindex files, @file{.signature}
4988@cindex @file{.signature}
4706@cindex vCard 4989@cindex vCard
4707@vindex mh-signature-file-name 4990@vindex mh-signature-file-name
4708 4991
@@ -4712,6 +4995,7 @@ option @code{mh-signature-file-name}. This file may contain a
4712@dfn{vCard} in which case an attachment is added with the vCard. 4995@dfn{vCard} in which case an attachment is added with the vCard.
4713 4996
4714@findex mh-signature-separator-p 4997@findex mh-signature-separator-p
4998@vindex mh-signature-file-name
4715@vindex mh-signature-separator 4999@vindex mh-signature-separator
4716@vindex mh-signature-separator-regexp 5000@vindex mh-signature-separator-regexp
4717 5001
@@ -4727,7 +5011,7 @@ if the buffer contains a separator, may be useful as well.
4727@cindex signature separator 5011@cindex signature separator
4728@vindex mh-signature-separator-flag 5012@vindex mh-signature-separator-flag
4729 5013
4730A signature separator (@samp{"-- "}) will be added if the signature 5014A signature separator (@code{"-- "}) will be added if the signature
4731block does not contain one and @code{mh-signature-separator-flag} is 5015block does not contain one and @code{mh-signature-separator-flag} is
4732on. It is not recommended that you change this option since various 5016on. It is not recommended that you change this option since various
4733mail user agents, including MH-E, use the separator to present the 5017mail user agents, including MH-E, use the separator to present the
@@ -4735,6 +5019,7 @@ signature differently, and to suppress the signature when replying or
4735yanking a letter into a draft. 5019yanking a letter into a draft.
4736 5020
4737@vindex mh-insert-signature-hook 5021@vindex mh-insert-signature-hook
5022@vindex mh-signature-file-name
4738 5023
4739The hook @code{mh-insert-signature-hook} is run after the signature is 5024The hook @code{mh-insert-signature-hook} is run after the signature is
4740inserted. Hook functions may access the actual name of the file or the 5025inserted. Hook functions may access the actual name of the file or the
@@ -4786,6 +5071,8 @@ resolution, color, @samp{Face:} header field.
4786The URL of any image can be used for the @samp{X-Image-URL:} field and 5071The URL of any image can be used for the @samp{X-Image-URL:} field and
4787no processing of the image is required. 5072no processing of the image is required.
4788 5073
5074@vindex mh-x-face-file
5075
4789To prevent the setting of any of these header fields, either set 5076To prevent the setting of any of these header fields, either set
4790@code{mh-x-face-file} to @code{nil}, or simply ensure that the file 5077@code{mh-x-face-file} to @code{nil}, or simply ensure that the file
4791defined by this option doesn't exist. 5078defined by this option doesn't exist.
@@ -4810,6 +5097,8 @@ protocol@footnote{@sc{mime} is defined in
4810binary files, and even commands that fetch a file with @samp{ftp} when 5097binary files, and even commands that fetch a file with @samp{ftp} when
4811your recipient reads the message! 5098your recipient reads the message!
4812 5099
5100@kindex C-c C-m
5101
4813If you were to create a multimedia message with plain MH commands, you 5102If you were to create a multimedia message with plain MH commands, you
4814would insert @command{mhbuild} or @command{mhn} directives (henceforth 5103would insert @command{mhbuild} or @command{mhn} directives (henceforth
4815called @dfn{MH-style directives} into your draft and use the 5104called @dfn{MH-style directives} into your draft and use the
@@ -4855,8 +5144,8 @@ whereas others require you to enter one.
4855 5144
4856@cindex @command{file} 5145@cindex @command{file}
4857@cindex @file{/etc/mime.types} 5146@cindex @file{/etc/mime.types}
4858@cindex Unix commands, @command{file}
4859@cindex files, @file{/etc/mime.types} 5147@cindex files, @file{/etc/mime.types}
5148@cindex Unix commands, @command{file}
4860@findex mailcap-mime-types 5149@findex mailcap-mime-types
4861 5150
4862In the cases where MH-E can do so, it will determine the media type 5151In the cases where MH-E can do so, it will determine the media type
@@ -4936,16 +5225,17 @@ You may also be interested in investigating @code{sgml-mode}.
4936 5225
4937@subheading Including Files 5226@subheading Including Files
4938 5227
5228@cindex attachments, inserting
5229@cindex images
4939@cindex MIME, images 5230@cindex MIME, images
4940@cindex MIME, sound 5231@cindex MIME, sound
4941@cindex MIME, video 5232@cindex MIME, video
4942@cindex attachments, inserting
4943@cindex images
4944@cindex sound 5233@cindex sound
4945@cindex video 5234@cindex video
4946@findex mh-compose-insertion 5235@findex mh-compose-insertion
4947@kindex C-c C-m C-i 5236@kindex C-c C-m C-i
4948@kindex C-c C-m i 5237@kindex C-c C-m i
5238@vindex mh-compose-insertion
4949 5239
4950Binaries, images, sound, and video can be inserted in your message 5240Binaries, images, sound, and video can be inserted in your message
4951with the command @kbd{C-c C-m C-i} (@code{mh-compose-insertion}). You 5241with the command @kbd{C-c C-m C-i} (@code{mh-compose-insertion}). You
@@ -4988,7 +5278,9 @@ host and filename, the media type, and the content description.
4988@cindex MIME, @command{tar} 5278@cindex MIME, @command{tar}
4989@cindex Unix commands, @command{ftp} 5279@cindex Unix commands, @command{ftp}
4990@cindex Unix commands, @command{tar} 5280@cindex Unix commands, @command{tar}
5281@findex mh-mh-compose-anon-ftp
4991@findex mh-mh-compose-external-compressed-tar 5282@findex mh-mh-compose-external-compressed-tar
5283@kindex C-c C-m C-g
4992@kindex C-c C-m C-t 5284@kindex C-c C-m C-t
4993@kindex C-c C-m t 5285@kindex C-c C-m t
4994 5286
@@ -5049,6 +5341,9 @@ disposition=inline description="SETI@@home logo">
5049Typically, you send a message with attachments just like any other 5341Typically, you send a message with attachments just like any other
5050message (@pxref{Sending Message}). 5342message (@pxref{Sending Message}).
5051 5343
5344@findex mh-mml-to-mime
5345@kindex C-c C-m C-m
5346
5052However, you may take a sneak preview of the @sc{mime} encoding if you 5347However, you may take a sneak preview of the @sc{mime} encoding if you
5053wish by running the command @kbd{C-c C-m C-m} (@code{mh-mml-to-mime}). 5348wish by running the command @kbd{C-c C-m C-m} (@code{mh-mml-to-mime}).
5054The following screen shows the @sc{mime} encoding specified by the 5349The following screen shows the @sc{mime} encoding specified by the
@@ -5081,15 +5376,19 @@ LyogWFBNICovCnN0YXRpYyBjaGFyICogc2V0aWF0aG9tZV94cG1bXSA9IHsKIjQ1IDQ1IDc2NCAy
5081@end cartouche 5376@end cartouche
5082@i{MH-E @sc{mime} draft ready to send} 5377@i{MH-E @sc{mime} draft ready to send}
5083 5378
5379@cindex undo effects of mh-mml-to-mime
5380
5084This action can be undone by running @kbd{C-_} (@code{undo}). 5381This action can be undone by running @kbd{C-_} (@code{undo}).
5085 5382
5086@cindex @command{mhbuild} 5383@cindex @command{mhbuild}
5087@cindex @command{mhn} 5384@cindex @command{mhn}
5088@cindex MH commands, @command{mhbuild} 5385@cindex MH commands, @command{mhbuild}
5089@cindex MH commands, @command{mhn} 5386@cindex MH commands, @command{mhn}
5387@cindex undo effects of mh-mh-to-mime
5090@findex mh-mh-to-mime 5388@findex mh-mh-to-mime
5091@findex mh-mh-to-mime-undo 5389@findex mh-mh-to-mime-undo
5092@kindex C-c C-e 5390@kindex C-c C-e
5391@kindex C-c C-m C-m
5093@kindex C-c C-m C-u 5392@kindex C-c C-m C-u
5094@kindex C-c C-m u 5393@kindex C-c C-m u
5095 5394
@@ -5104,6 +5403,7 @@ file. You are prompted to confirm this action, but you can avoid the
5104confirmation by adding an argument (for example, @kbd{C-u C-c C-m 5403confirmation by adding an argument (for example, @kbd{C-u C-c C-m
5105C-u}). 5404C-u}).
5106 5405
5406@kindex C-c C-e
5107@vindex mh-mh-to-mime-args 5407@vindex mh-mh-to-mime-args
5108 5408
5109If you wish to pass additional arguments to @command{mhbuild} 5409If you wish to pass additional arguments to @command{mhbuild}
@@ -5113,13 +5413,14 @@ check into the message by setting @code{mh-mh-to-mime-args} to
5113@samp{-check}. The recipient of your message can then run 5413@samp{-check}. The recipient of your message can then run
5114@samp{mhbuild -check} on the message---@command{mhbuild} 5414@samp{mhbuild -check} on the message---@command{mhbuild}
5115(@command{mhn}) will complain if the message has been corrupted on the 5415(@command{mhn}) will complain if the message has been corrupted on the
5116way. The command @kbd{C-c C-e} (@code{mh-mh-to-mime}) only consults 5416way. The command @kbd{C-c C-e} only consults this option when given a
5117this option when given a prefix argument (as in @kbd{C-u C-c C-e}). 5417prefix argument (as in @kbd{C-u C-c C-e}).
5118 5418
5419@kindex C-c C-e
5119@vindex mh-mh-to-mime-hook 5420@vindex mh-mh-to-mime-hook
5120 5421
5121The hook @code{mh-mh-to-mime-hook} is called after the message has 5422The hook @code{mh-mh-to-mime-hook} is called after the message has
5122been formatted by @kbd{C-c C-e} (@code{mh-mh-to-mime}) 5423been formatted by @kbd{C-c C-e}.
5123 5424
5124@node Sending PGP, Checking Recipients, Adding Attachments, Editing Drafts 5425@node Sending PGP, Checking Recipients, Adding Attachments, Editing Drafts
5125@section Signing and Encrypting Messages 5426@section Signing and Encrypting Messages
@@ -5169,6 +5470,7 @@ following tag:
5169@findex mh-mml-unsecure-message 5470@findex mh-mml-unsecure-message
5170@kindex C-c C-m C-n 5471@kindex C-c C-m C-n
5171@kindex C-c C-m n 5472@kindex C-c C-m n
5473@vindex mh-mml-method-default
5172 5474
5173This is used to sign and encrypt your message. In each of these cases, 5475This is used to sign and encrypt your message. In each of these cases,
5174a proper multipart message is created for you when you send the 5476a proper multipart message is created for you when you send the
@@ -5202,8 +5504,8 @@ See
5202@cite{The PGG Manual}}. 5504@cite{The PGG Manual}}.
5203@end ifhtml 5505@end ifhtml
5204 5506
5205@cindex @samp{Fcc:} header field
5206@cindex header field, @samp{Fcc:} 5507@cindex header field, @samp{Fcc:}
5508@cindex @samp{Fcc:} header field
5207@vindex pgg-encrypt-for-me 5509@vindex pgg-encrypt-for-me
5208 5510
5209In particular, I turn on the option @code{pgg-encrypt-for-me} so that 5511In particular, I turn on the option @code{pgg-encrypt-for-me} so that
@@ -5233,8 +5535,8 @@ whatnow Program} in the MH book.}.
5233@node Sending Message, Killing Draft, Checking Recipients, Editing Drafts 5535@node Sending Message, Killing Draft, Checking Recipients, Editing Drafts
5234@section Sending a Message 5536@section Sending a Message
5235 5537
5236@cindex @samp{*MH-E Mail Delivery*}
5237@cindex buffers, @samp{*MH-E Mail Delivery*} 5538@cindex buffers, @samp{*MH-E Mail Delivery*}
5539@cindex @samp{*MH-E Mail Delivery*}
5238@cindex sending mail 5540@cindex sending mail
5239@findex mh-send-letter 5541@findex mh-send-letter
5240@kindex C-c C-c 5542@kindex C-c C-c
@@ -5247,6 +5549,8 @@ Delivery*} (@pxref{Miscellaneous}).
5247 5549
5248@cindex sending mail 5550@cindex sending mail
5249@cindex spell check 5551@cindex spell check
5552@findex ispell-message
5553@kindex C-c C-c
5250@vindex mh-before-send-letter-hook 5554@vindex mh-before-send-letter-hook
5251 5555
5252The hook @code{mh-before-send-letter-hook} is run at the beginning of 5556The hook @code{mh-before-send-letter-hook} is run at the beginning of
@@ -5350,7 +5654,7 @@ If @samp{on}, local users are added to alias completion (default:
5350@c ------------------------- 5654@c -------------------------
5351@item mh-alias-local-users-prefix 5655@item mh-alias-local-users-prefix
5352String prefixed to the real names of users from the password file 5656String prefixed to the real names of users from the password file
5353(default: @samp{"local."}. 5657(default: @code{"local."}.
5354@c ------------------------- 5658@c -------------------------
5355@item mh-alias-passwd-gecos-comma-separator-flag 5659@item mh-alias-passwd-gecos-comma-separator-flag
5356On means the GECOS field in the password file uses a comma separator 5660On means the GECOS field in the password file uses a comma separator
@@ -5365,12 +5669,14 @@ Hook run by @code{mh-alias-reload} after loading aliases (default:
5365@code{nil}). 5669@code{nil}).
5366@end vtable 5670@end vtable
5367 5671
5368@heading Adding Addresses to Draft 5672@subheading Adding Addresses to Draft
5369 5673
5370You can use aliases when you are adding recipients to a message. 5674You can use aliases when you are adding recipients to a message.
5371 5675
5372@findex minibuffer-complete 5676@findex minibuffer-complete
5373@kindex @key{TAB} 5677@kindex @key{TAB}
5678@vindex mh-alias-expand-aliases-flag
5679@vindex mh-compose-prompt-flag
5374 5680
5375In order to use minibuffer prompting for recipients and the subject 5681In order to use minibuffer prompting for recipients and the subject
5376line in the minibuffer, turn on the option 5682line in the minibuffer, turn on the option
@@ -5380,10 +5686,17 @@ line in the minibuffer, turn on the option
5380on the option @code{mh-alias-expand-aliases-flag} if you want these 5686on the option @code{mh-alias-expand-aliases-flag} if you want these
5381aliases to be expanded to their respective addresses in the draft. 5687aliases to be expanded to their respective addresses in the draft.
5382 5688
5689@findex mh-letter-complete
5690@findex mh-letter-complete-or-space
5691@kindex @key{SPC}
5692@kindex M-@key{TAB}
5693
5383Otherwise, you can complete aliases in the header of the draft with 5694Otherwise, you can complete aliases in the header of the draft with
5384@kbd{M-@key{TAB}} (@code{mh-letter-complete}) or @key{SPC} 5695@kbd{M-@key{TAB}} (@code{mh-letter-complete}) or @key{SPC}
5385(@code{mh-letter-complete-or-space}). 5696(@code{mh-letter-complete-or-space}).
5386 5697
5698@vindex mh-alias-completion-ignore-case-flag
5699
5387As MH ignores case in the aliases, so too does MH-E. However, you may 5700As MH ignores case in the aliases, so too does MH-E. However, you may
5388turn off the option @code{mh-alias-completion-ignore-case-flag} to 5701turn off the option @code{mh-alias-completion-ignore-case-flag} to
5389make case significant which can be used to segregate completion of 5702make case significant which can be used to segregate completion of
@@ -5402,6 +5715,11 @@ you'd get Mark's address. Note that this option affects completion
5402only. If you were to enter @kbd{Mark.Baushke}, it would still be 5715only. If you were to enter @kbd{Mark.Baushke}, it would still be
5403identified with your @samp{mark.baushke} alias. 5716identified with your @samp{mark.baushke} alias.
5404 5717
5718@findex mh-alias-minibuffer-confirm-address
5719@findex mh-letter-confirm-address
5720@vindex mh-alias-flash-on-comma
5721@vindex mh-compose-prompt-flag
5722
5405To verify that the alias you've entered is valid, the alias will be 5723To verify that the alias you've entered is valid, the alias will be
5406displayed in the minibuffer when you type a comma 5724displayed in the minibuffer when you type a comma
5407(@code{mh-letter-confirm-address} or 5725(@code{mh-letter-confirm-address} or
@@ -5415,7 +5733,7 @@ Alias}, and @samp{Don't Flash Nor Warn If No Alias}.
5415For another way to verify the alias expansion, see @ref{Checking 5733For another way to verify the alias expansion, see @ref{Checking
5416Recipients}. 5734Recipients}.
5417 5735
5418@heading Loading Aliases 5736@subheading Loading Aliases
5419 5737
5420@cindex @command{ali} 5738@cindex @command{ali}
5421@cindex @file{/etc/nmh/MailAliases} 5739@cindex @file{/etc/nmh/MailAliases}
@@ -5441,6 +5759,8 @@ These aliases have the form @samp{local.@var{first.last}} if a real
5441name is present in the password file. Otherwise, the alias will have 5759name is present in the password file. Otherwise, the alias will have
5442the form @samp{local.@var{login}}. 5760the form @samp{local.@var{login}}.
5443 5761
5762@vindex mh-alias-local-users-prefix
5763
5444The prefix @samp{local.} can be modified via the option 5764The prefix @samp{local.} can be modified via the option
5445@code{mh-alias-local-users-prefix}. This option can also be set to 5765@code{mh-alias-local-users-prefix}. This option can also be set to
5446@samp{Use Login}. 5766@samp{Use Login}.
@@ -5451,6 +5771,8 @@ For example, consider the following password file entry:
5451psg:x:1000:1000:Peter S Galbraith,,,:/home/psg:/bin/tcsh 5771psg:x:1000:1000:Peter S Galbraith,,,:/home/psg:/bin/tcsh
5452@end example 5772@end example
5453 5773
5774@vindex mh-alias-local-users-prefix
5775
5454The following settings of option @code{mh-alias-local-users-prefix} 5776The following settings of option @code{mh-alias-local-users-prefix}
5455will produce the associated aliases: 5777will produce the associated aliases:
5456 5778
@@ -5465,6 +5787,8 @@ peter.galbraith
5465psg 5787psg
5466@end table 5788@end table
5467 5789
5790@vindex mh-alias-passwd-gecos-comma-separator-flag
5791
5468In the example above, commas are used to separate different values 5792In the example above, commas are used to separate different values
5469within the so-called GECOS field. This is a fairly common usage. 5793within the so-called GECOS field. This is a fairly common usage.
5470However, in the rare case that the GECOS field in your password file 5794However, in the rare case that the GECOS field in your password file
@@ -5472,8 +5796,9 @@ is not separated by commas and whose contents may contain commas, you
5472can turn the option @code{mh-alias-passwd-gecos-comma-separator-flag} 5796can turn the option @code{mh-alias-passwd-gecos-comma-separator-flag}
5473off. 5797off.
5474 5798
5475@cindex @samp{ypcat passwd}
5476@cindex NIS, obtaining local aliases from 5799@cindex NIS, obtaining local aliases from
5800@cindex @samp{ypcat passwd}
5801@vindex mh-alias-local-users
5477 5802
5478If you're on a system with thousands of users you don't know, and the 5803If you're on a system with thousands of users you don't know, and the
5479loading of local aliases slows MH-E down noticeably, then the local 5804loading of local aliases slows MH-E down noticeably, then the local
@@ -5482,18 +5807,25 @@ alias feature can be disabled by turning off the option
5482executed to generate the password file. For example, use @samp{ypcat 5807executed to generate the password file. For example, use @samp{ypcat
5483passwd} to obtain the NIS password file. 5808passwd} to obtain the NIS password file.
5484 5809
5810@findex mh-alias-reload
5811@kindex M-x mh-alias-reload
5812@vindex mh-alias-reloaded-hook
5813
5485Since aliases are updated frequently, MH-E reloads aliases 5814Since aliases are updated frequently, MH-E reloads aliases
5486automatically whenever an alias lookup occurs if an alias source has 5815automatically whenever an alias lookup occurs if an alias source has
5487changed. However, you can reload your aliases manually by calling the 5816changed. However, you can reload your aliases manually by calling the
5488command @kbd{M-x mh-alias-reload} directly. This command runs 5817command @kbd{M-x mh-alias-reload} directly. This command runs
5489@code{mh-alias-reloaded-hook} after the aliases have been loaded. 5818@code{mh-alias-reloaded-hook} after the aliases have been loaded.
5490 5819
5491@heading Adding Aliases 5820@subheading Adding Aliases
5492 5821
5493In the past, you have manually added aliases to your alias file(s) 5822In the past, you have manually added aliases to your alias file(s)
5494listed in your @samp{Aliasfile:} profile component. MH-E provides 5823listed in your @samp{Aliasfile:} profile component. MH-E provides
5495other methods for maintaining your alias file(s). 5824other methods for maintaining your alias file(s).
5496 5825
5826@findex mh-alias-add-alias
5827@kindex M-x mh-alias-add-alias
5828
5497You can use the @kbd{M-x mh-alias-add-alias} command which will prompt 5829You can use the @kbd{M-x mh-alias-add-alias} command which will prompt
5498you for the alias and address that you would like to add. If the alias 5830you for the alias and address that you would like to add. If the alias
5499exists already, you will have the choice of inserting the new alias 5831exists already, you will have the choice of inserting the new alias
@@ -5525,6 +5857,9 @@ Using prefixes instead of postfixes helps you explore aliases during
5525completion. If you forget the name of an old dive buddy, you can enter 5857completion. If you forget the name of an old dive buddy, you can enter
5526@samp{div} and then @key{SPC} to get a listing of all your dive buddies. 5858@samp{div} and then @key{SPC} to get a listing of all your dive buddies.
5527 5859
5860@kindex M-x mh-alias-add-address-under-point
5861@kindex M-x mh-alias-grab-from-field
5862
5528An alias for the sender of the current message is added automatically 5863An alias for the sender of the current message is added automatically
5529by clicking on the @samp{Grab From alias} tool bar button or by running 5864by clicking on the @samp{Grab From alias} tool bar button or by running
5530the @kbd{M-x mh-alias-grab-from-field} command. Aliases for other 5865the @kbd{M-x mh-alias-grab-from-field} command. Aliases for other
@@ -5532,24 +5867,33 @@ recipients of the current message are added by placing your cursor
5532over the desired recipient and giving the @kbd{M-x 5867over the desired recipient and giving the @kbd{M-x
5533mh-alias-add-address-under-point} command. 5868mh-alias-add-address-under-point} command.
5534 5869
5870@vindex mh-alias-insert-file
5871@vindex mh-alias-insertion-location
5872
5535The options @code{mh-alias-insert-file} and 5873The options @code{mh-alias-insert-file} and
5536@code{mh-alias-insertion-location} controls how and where these aliases 5874@code{mh-alias-insertion-location} controls how and where these aliases
5537are inserted. 5875are inserted.
5538 5876
5539The default setting of this option is @samp{Use Aliasfile Profile 5877@vindex mh-alias-insert-file
5540Component}. This option can also hold the name of a file or a list a 5878
5541file names. If this option is set to a list of file names, or the 5879The default setting of option @code{mh-alias-insert-file} is @samp{Use
5542@samp{Aliasfile:} profile component contains more than one file name, 5880Aliasfile Profile Component}. This option can also hold the name of a
5543MH-E will prompt for one of them. 5881file or a list a file names. If this option is set to a list of file
5882names, or the @samp{Aliasfile:} profile component contains more than
5883one file name, MH-E will prompt for one of them.
5884
5885@vindex mh-alias-insertion-location
5544 5886
5545The option @code{mh-alias-insertion-location} is set to 5887The option @code{mh-alias-insertion-location} is set to
5546@samp{Alphabetical} by default. If you organize your alias file in 5888@samp{Alphabetical} by default. If you organize your alias file in
5547other ways, then the settings @samp{Top} and @samp{Bottom} might be 5889other ways, then the settings @samp{Top} and @samp{Bottom} might be
5548more appropriate. 5890more appropriate.
5549 5891
5550@heading Querying Aliases 5892@subheading Querying Aliases
5551 5893
5552@cindex regular expressions, @code{mh-alias-apropos} 5894@cindex regular expressions, @code{mh-alias-apropos}
5895@findex mh-alias-apropos
5896@kindex M-x mh-alias-apropos
5553 5897
5554If you can't quite remember an alias, you can use @kbd{M-x 5898If you can't quite remember an alias, you can use @kbd{M-x
5555mh-alias-apropos} to show all aliases or addresses that match a 5899mh-alias-apropos} to show all aliases or addresses that match a
@@ -5575,6 +5919,9 @@ MH-E supports the concept of multiple personalities or identities.
5575This means that you can easily have a different header and signature 5919This means that you can easily have a different header and signature
5576at home and at work. 5920at home and at work.
5577 5921
5922@cindex @samp{Identity} menu
5923@cindex menu, @samp{Identity}
5924
5578A couple of commands are used to insert identities in MH-Letter mode 5925A couple of commands are used to insert identities in MH-Letter mode
5579which are also found in the @samp{Identity} menu. 5926which are also found in the @samp{Identity} menu.
5580 5927
@@ -5623,6 +5970,8 @@ Some of the common header fields that people change depending on the
5623context are the @samp{From:} and @samp{Organization:} fields, as well 5970context are the @samp{From:} and @samp{Organization:} fields, as well
5624as the signature. 5971as the signature.
5625 5972
5973@vindex mh-identity-list
5974
5626This is done by customizing the option @code{mh-identity-list}. In the 5975This is done by customizing the option @code{mh-identity-list}. In the
5627customization buffer for this option, click on the @samp{INS} button 5976customization buffer for this option, click on the @samp{INS} button
5628and enter a label such as @samp{Home} or @samp{Work}. Then click on 5977and enter a label such as @samp{Home} or @samp{Work}. Then click on
@@ -5666,18 +6015,21 @@ Specify a different key to sign or encrypt messages.
5666 6015
5667@cindex Identity menu 6016@cindex Identity menu
5668@cindex menu, Identity 6017@cindex menu, Identity
6018@findex mh-insert-identity
6019@kindex C-c C-d
5669 6020
5670You can select the identities you have added via the menu called 6021You can select the identities you have added via the menu called
5671@samp{Identity} in the MH-Letter buffer. You can also use @kbd{C-c 6022@samp{Identity} in the MH-Letter buffer. You can also use @kbd{C-c
5672C-d} (@code{mh-insert-identity}). To clear the fields and signature 6023C-d} (@code{mh-insert-identity}). To clear the fields and signature
5673added by the identity, select the @samp{None} identity. 6024added by the identity, select the @samp{None} identity.
5674 6025
5675@cindex @samp{Identity > Save as Default} menu item 6026@cindex menu item, @samp{Identity > Customize Identities}
5676@cindex menu item, @samp{Identity > Save as Default} 6027@cindex menu item, @samp{Identity > Save as Default}
5677@cindex @samp{Identity > Set Default for Session} menu item
5678@cindex menu item, @samp{Identity > Set Default for Session} 6028@cindex menu item, @samp{Identity > Set Default for Session}
5679@cindex @samp{Identity > Customize Identities} menu item 6029@cindex @samp{Identity > Customize Identities} menu item
5680@cindex menu item, @samp{Identity > Customize Identities} 6030@cindex @samp{Identity > Save as Default} menu item
6031@cindex @samp{Identity > Set Default for Session} menu item
6032@vindex mh-identity-default
5681 6033
5682The @samp{Identity} menu contains two other items to save you from 6034The @samp{Identity} menu contains two other items to save you from
5683having to set the identity on every message. The menu item @samp{Set 6035having to set the identity on every message. The menu item @samp{Set
@@ -5690,6 +6042,7 @@ need to add another identity, the menu item @samp{Customize
5690Identities} is available for your convenience. 6042Identities} is available for your convenience.
5691 6043
5692@cindex regular expressions, @code{mh-auto-fields-list} 6044@cindex regular expressions, @code{mh-auto-fields-list}
6045@vindex mh-auto-fields-list
5693 6046
5694The option @code{mh-auto-fields-list} can also be used to set the 6047The option @code{mh-auto-fields-list} can also be used to set the
5695identity depending on the recipient to provide even more control. To 6048identity depending on the recipient to provide even more control. To
@@ -5738,6 +6091,10 @@ reply.
5738Other header fields may be added using this menu item. 6091Other header fields may be added using this menu item.
5739@end table 6092@end table
5740 6093
6094@findex mh-insert-auto-fields
6095@kindex C-c M-d
6096@vindex mh-auto-fields-prompt-flag
6097
5741These fields can only be added after the recipient is known. Because 6098These fields can only be added after the recipient is known. Because
5742you can continue to add recipients as you edit the draft, MH-E waits 6099you can continue to add recipients as you edit the draft, MH-E waits
5743until the message is sent to perform the auto-insertions. This seems 6100until the message is sent to perform the auto-insertions. This seems
@@ -5754,10 +6111,16 @@ the header contains one or more recipients, you may run the command
5754manually. However, if you use this command, the automatic insertion 6111manually. However, if you use this command, the automatic insertion
5755when the message is sent is disabled. 6112when the message is sent is disabled.
5756 6113
6114@vindex mh-auto-fields-list
6115@vindex mh-identity-list
6116
5757You should avoid using the same header field in 6117You should avoid using the same header field in
5758@code{mh-auto-fields-list} and @code{mh-identity-list} definitions 6118@code{mh-auto-fields-list} and @code{mh-identity-list} definitions
5759that may apply to the same message as the result is undefined. 6119that may apply to the same message as the result is undefined.
5760 6120
6121@vindex mh-identity-handlers
6122@vindex mh-identity-list
6123
5761The option @code{mh-identity-handlers} is used to change the way that 6124The option @code{mh-identity-handlers} is used to change the way that
5762fields, signatures, and attributions in @code{mh-identity-list} are 6125fields, signatures, and attributions in @code{mh-identity-list} are
5763added. To customize @code{mh-identity-handlers}, replace the name of 6126added. To customize @code{mh-identity-handlers}, replace the name of
@@ -5766,6 +6129,8 @@ change with the name of a function you have written. You can also
5766click on an @samp{INS} button and insert a field of your choice and 6129click on an @samp{INS} button and insert a field of your choice and
5767the name of the function you have written to handle it. 6130the name of the function you have written to handle it.
5768 6131
6132@vindex mh-identity-list
6133
5769The @samp{Field} field can be any field that you've used in your 6134The @samp{Field} field can be any field that you've used in your
5770@code{mh-identity-list}. The special fields @samp{:attribution-verb}, 6135@code{mh-identity-list}. The special fields @samp{:attribution-verb},
5771@samp{:signature}, or @samp{:pgg-default-user-id} are used for the 6136@samp{:signature}, or @samp{:pgg-default-user-id} are used for the
@@ -5786,6 +6151,10 @@ containing the value for the field is given.
5786 6151
5787@cindex folder navigation 6152@cindex folder navigation
5788@cindex speedbar 6153@cindex speedbar
6154@findex mh-visit-folder
6155@kindex F v
6156@kindex M-x speedbar
6157@kindex Mouse-2
5789 6158
5790You can also use the speedbar 6159You can also use the speedbar
5791@ifnothtml 6160@ifnothtml
@@ -5832,6 +6201,10 @@ you've added or deleted a folder, or want to update the unseen message
5832count before the next automatic update (@code{mh-speed-refresh}). 6201count before the next automatic update (@code{mh-speed-refresh}).
5833@end table 6202@end table
5834 6203
6204@findex delete-frame
6205@kindex C-x 5 0
6206@kindex Mouse-3
6207
5835You can click on @kbd{Mouse-3} to bring up a context menu that 6208You can click on @kbd{Mouse-3} to bring up a context menu that
5836contains these items. Dismiss the speedbar with @kbd{C-x 5 0} 6209contains these items. Dismiss the speedbar with @kbd{C-x 5 0}
5837(@code{delete-frame}). 6210(@code{delete-frame}).
@@ -5874,8 +6247,12 @@ Selected folder face when folder contains unread messages.
5874@node Menu Bar, Tool Bar, Speedbar, Top 6247@node Menu Bar, Tool Bar, Speedbar, Top
5875@chapter The Menu Bar 6248@chapter The Menu Bar
5876 6249
5877@cindex menu bar 6250@cindex @samp{Folder} menu
5878 6251@cindex @samp{Identity} menu
6252@cindex @samp{Letter} menu
6253@cindex @samp{Message} menu
6254@cindex @samp{Search} menu
6255@cindex @samp{Sequence} menu
5879@cindex Folder menu 6256@cindex Folder menu
5880@cindex Identity menu 6257@cindex Identity menu
5881@cindex Letter menu 6258@cindex Letter menu
@@ -5885,12 +6262,19 @@ Selected folder face when folder contains unread messages.
5885@cindex Message menu 6262@cindex Message menu
5886@cindex Search menu 6263@cindex Search menu
5887@cindex Sequence menu 6264@cindex Sequence menu
6265@cindex menu bar
5888@cindex menu, Folder 6266@cindex menu, Folder
5889@cindex menu, Identity 6267@cindex menu, Identity
5890@cindex menu, Letter 6268@cindex menu, Letter
5891@cindex menu, Message 6269@cindex menu, Message
5892@cindex menu, Search 6270@cindex menu, Search
5893@cindex menu, Sequence 6271@cindex menu, Sequence
6272@cindex menu, @samp{Folder}
6273@cindex menu, @samp{Identity}
6274@cindex menu, @samp{Letter}
6275@cindex menu, @samp{Message}
6276@cindex menu, @samp{Search}
6277@cindex menu, @samp{Sequence}
5894@cindex modes, MH-Folder 6278@cindex modes, MH-Folder
5895@cindex modes, MH-Letter 6279@cindex modes, MH-Letter
5896@cindex modes, MH-Search 6280@cindex modes, MH-Search
@@ -5924,8 +6308,6 @@ and you can also browse all of the items under the index entry
5924@chapter The Tool Bar 6308@chapter The Tool Bar
5925 6309
5926@cindex tool bar 6310@cindex tool bar
5927@cindex @samp{mh-tool-bar} customization group
5928@cindex customization group, @samp{mh-tool-bar}
5929 6311
5930Emacs also provides a graphical tool bar. For a description of the 6312Emacs also provides a graphical tool bar. For a description of the
5931tool bar, please 6313tool bar, please
@@ -5938,6 +6320,9 @@ see the section
5938Tool Bars} in @cite{The GNU Emacs Manual}. 6320Tool Bars} in @cite{The GNU Emacs Manual}.
5939@end ifhtml 6321@end ifhtml
5940 6322
6323@cindex @samp{mh-tool-bar} customization group
6324@cindex customization group, @samp{mh-tool-bar}
6325
5941MH-E adds several icons to this tool bar; you can modify the MH-E 6326MH-E adds several icons to this tool bar; you can modify the MH-E
5942aspects of the tool bar via the @samp{mh-tool-bar} customization group. 6327aspects of the tool bar via the @samp{mh-tool-bar} customization group.
5943 6328
@@ -5965,6 +6350,9 @@ In GNU Emacs, icons for some of MH-E's functions are added to the tool
5965bar. In XEmacs, you have the opportunity to create a separate tool bar for 6350bar. In XEmacs, you have the opportunity to create a separate tool bar for
5966the MH-E icons. 6351the MH-E icons.
5967 6352
6353@vindex mh-tool-bar-folder-buttons
6354@vindex mh-tool-bar-letter-buttons
6355
5968In either case, you can select which of these functions you'd like to 6356In either case, you can select which of these functions you'd like to
5969see by customizing the options @code{mh-tool-bar-folder-buttons} and 6357see by customizing the options @code{mh-tool-bar-folder-buttons} and
5970@code{mh-tool-bar-letter-buttons}. As you probably guessed, the former 6358@code{mh-tool-bar-letter-buttons}. As you probably guessed, the former
@@ -5973,31 +6361,39 @@ mode. Both of these options present you with a list of functions;
5973check the functions whose icons you want to see and clear the check 6361check the functions whose icons you want to see and clear the check
5974boxes for those you don't. 6362boxes for those you don't.
5975 6363
6364@findex mh-search
6365@vindex mh-tool-bar-search-function
6366
5976The function associated with the searching icon can be set via the 6367The function associated with the searching icon can be set via the
5977option @code{mh-tool-bar-search-function}. By default, this is set to 6368option @code{mh-tool-bar-search-function}. By default, this is set to
5978@code{mh-search}. @xref{Searching}. You can also choose @samp{Other 6369@code{mh-search}. @xref{Searching}. You can also choose @samp{Other
5979Function} from the @samp{Value Menu} and enter a function of your own 6370Function} from the @samp{Value Menu} and enter a function of your own
5980choosing. 6371choosing.
5981 6372
6373@vindex mh-xemacs-use-tool-bar-flag
6374
5982XEmacs provides a couple of extra options. The first, 6375XEmacs provides a couple of extra options. The first,
5983@code{mh-xemacs-use-tool-bar-flag}, controls whether to show the MH-E 6376@code{mh-xemacs-use-tool-bar-flag}, controls whether to show the MH-E
5984icons at all. By default, this option is turned on if the window 6377icons at all. By default, this option is turned on if the window
5985system supports tool bars. If your system doesn't support tool bars, 6378system supports tool bars. If your system doesn't support tool bars,
5986then you won't be able to turn on this option. 6379then you won't be able to turn on this option.
5987 6380
6381@vindex mh-xemacs-tool-bar-position
6382
5988The second extra option is @code{mh-xemacs-tool-bar-position} which 6383The second extra option is @code{mh-xemacs-tool-bar-position} which
5989controls the placement of the tool bar along the four edges of the 6384controls the placement of the tool bar along the four edges of the
5990frame. You can choose from one of @samp{Same As Default Tool Bar}, 6385frame. You can choose from one of @samp{Same As Default Tool Bar},
5991@samp{Top}, @samp{Bottom}, @samp{Left}, or @samp{Right}. If this 6386@samp{Top}, @samp{Bottom}, @samp{Left}, or @samp{Right}. If this
5992variable is set to anything other than @samp{Same As Default Tool Bar} 6387variable is set to anything other than @samp{Same As Default Tool Bar}
5993and the default tool bar is in a different location, then two tool 6388and the default tool bar is in a different location, then two tool
5994bars will be displayed: the MH-E tool bar and the default tool bar." 6389bars will be displayed: the MH-E tool bar and the default tool bar.
5995 6390
5996@node Searching, Threading, Tool Bar, Top 6391@node Searching, Threading, Tool Bar, Top
5997@chapter Searching Through Messages 6392@chapter Searching Through Messages
5998 6393
6394@cindex @samp{Search} menu
6395@cindex menu, @samp{Search}
5999@cindex searching 6396@cindex searching
6000
6001@findex mh-search 6397@findex mh-search
6002@kindex F s 6398@kindex F s
6003 6399
@@ -6141,12 +6537,18 @@ The following face is available.
6141Folder heading face in MH-Folder buffers created by searches. 6537Folder heading face in MH-Folder buffers created by searches.
6142@end vtable 6538@end vtable
6143 6539
6540@findex mh-search-folder
6541@kindex F s
6542
6144The command @kbd{F s} (@code{mh-search-folder}) helps you find 6543The command @kbd{F s} (@code{mh-search-folder}) helps you find
6145messages in your entire corpus of mail. You can search for messages to 6544messages in your entire corpus of mail. You can search for messages to
6146or from a particular person or about a particular subject. In fact, 6545or from a particular person or about a particular subject. In fact,
6147you can also search for messages containing selected strings in any 6546you can also search for messages containing selected strings in any
6148arbitrary header field or any string found within the messages. 6547arbitrary header field or any string found within the messages.
6149 6548
6549@cindex @command{pick}
6550@cindex MH commands, @command{pick}
6551
6150Out of the box, MH-E uses @command{pick} to find messages. With a 6552Out of the box, MH-E uses @command{pick} to find messages. With a
6151little extra effort, you can set an indexing program which rewards you 6553little extra effort, you can set an indexing program which rewards you
6152with extremely quick results. The drawback is that sometimes the index 6554with extremely quick results. The drawback is that sometimes the index
@@ -6213,26 +6615,25 @@ kosciusko
6213@end group 6615@end group
6214@end smallexample 6616@end smallexample
6215 6617
6618@findex mh-to-field
6619@kindex C-c C-f C-t
6620
6216As with MH-Letter mode, MH-Search provides commands like @kbd{C-c C-f 6621As with MH-Letter mode, MH-Search provides commands like @kbd{C-c C-f
6217C-t} (@code{mh-to-field}) to help you fill in the blanks. 6622C-t} (@code{mh-to-field}) to help you fill in the blanks.
6218@xref{Editing Message}. 6623@xref{Editing Message}.
6219 6624
6625@kindex F s
6626@vindex mh-search-mode-hook
6627
6220If you find that you do the same thing over and over when editing the 6628If you find that you do the same thing over and over when editing the
6221search template, you may wish to bind some shortcuts to keys. This can 6629search template, you may wish to bind some shortcuts to keys. This can
6222be done with the variable @code{mh-search-mode-hook}, which is called 6630be done with the variable @code{mh-search-mode-hook}, which is called
6223when @kbd{F s} is run on a new pattern. 6631when @kbd{F s} is run on a new pattern.
6224 6632
6225@cindex @samp{+mhe-index}
6226@cindex folders, @samp{+mhe-index}
6227@findex mh-index-do-search 6633@findex mh-index-do-search
6228@findex mh-index-next-folder
6229@findex mh-index-previous-folder
6230@findex mh-pick-do-search 6634@findex mh-pick-do-search
6231@kindex @key{TAB}
6232@kindex C-c C-c 6635@kindex C-c C-c
6233@kindex F s 6636@kindex C-c C-p
6234@kindex S-@key{TAB}
6235@vindex mh-search-folder
6236 6637
6237To perform the search, type @kbd{C-c C-c} (@code{mh-index-do-search}). 6638To perform the search, type @kbd{C-c C-c} (@code{mh-index-do-search}).
6238Sometimes you're searching for text that is either not indexed, or 6639Sometimes you're searching for text that is either not indexed, or
@@ -6240,6 +6641,14 @@ hasn't been indexed yet. In this case you can override the default
6240method with the pick method by running the command @kbd{C-c C-p} 6641method with the pick method by running the command @kbd{C-c C-p}
6241(@code{mh-pick-do-search}). 6642(@code{mh-pick-do-search}).
6242 6643
6644@cindex folders, @samp{+mhe-index}
6645@cindex @samp{+mhe-index}
6646@findex mh-index-next-folder
6647@findex mh-index-previous-folder
6648@kindex @key{TAB}
6649@kindex S-@key{TAB}
6650@vindex mh-search-folder
6651
6243The messages that are found are put in a temporary sub-folder of 6652The messages that are found are put in a temporary sub-folder of
6244@samp{+mhe-index} and are displayed in an MH-Folder buffer. This 6653@samp{+mhe-index} and are displayed in an MH-Folder buffer. This
6245buffer is special because it displays messages from multiple folders; 6654buffer is special because it displays messages from multiple folders;
@@ -6250,6 +6659,11 @@ headings using the commands @kbd{@key{TAB}}
6250(@code{mh-index-next-folder}) and @kbd{S-@key{TAB}} 6659(@code{mh-index-next-folder}) and @kbd{S-@key{TAB}}
6251(@code{mh-index-previous-folder}). 6660(@code{mh-index-previous-folder}).
6252 6661
6662@findex mh-index-visit-folder
6663@findex mh-rescan-folder
6664@kindex F r
6665@kindex v
6666
6253In addition, the command @kbd{v} (@code{mh-index-visit-folder}) can be 6667In addition, the command @kbd{v} (@code{mh-index-visit-folder}) can be
6254used to visit the folder of the message at point. Initially, only the 6668used to visit the folder of the message at point. Initially, only the
6255messages that matched the search criteria are displayed in the folder. 6669messages that matched the search criteria are displayed in the folder.
@@ -6259,10 +6673,15 @@ command @kbd{v} is useful to find the actual message number of an
6259interesting message, or to view surrounding messages with the command 6673interesting message, or to view surrounding messages with the command
6260@kbd{F r} @code{mh-rescan-folder}. @xref{Folders}. 6674@kbd{F r} @code{mh-rescan-folder}. @xref{Folders}.
6261 6675
6676@findex mh-kill-folder
6677@kindex F k
6678
6262Because this folder is temporary, you'll probably get in the habit of 6679Because this folder is temporary, you'll probably get in the habit of
6263killing it when you're done with @kbd{F k} (@code{mh-kill-folder}). 6680killing it when you're done with @kbd{F k} (@code{mh-kill-folder}).
6264@xref{Folders}. 6681@xref{Folders}.
6265 6682
6683@kindex F s
6684
6266You can regenerate the results by running @kbd{F s} with a prefix 6685You can regenerate the results by running @kbd{F s} with a prefix
6267argument. 6686argument.
6268 6687
@@ -6418,7 +6837,7 @@ Use the following command line to generate the swish index. Run this
6418daily from cron: 6837daily from cron:
6419 6838
6420@smallexample 6839@smallexample
6421 swish-e -c /home/user/Mail/.swish/config 6840swish-e -c /home/user/Mail/.swish/config
6422@end smallexample 6841@end smallexample
6423 6842
6424@subsection mairix 6843@subsection mairix
@@ -6520,6 +6939,10 @@ header field. Other ways to organize messages in a folder include
6520limiting (@pxref{Limits}) or using full-text indexed searches 6939limiting (@pxref{Limits}) or using full-text indexed searches
6521(@pxref{Searching}). 6940(@pxref{Searching}).
6522 6941
6942@cindex root, in threads
6943@cindex siblings, in threads
6944@cindex ancestor, in threads
6945
6523A thread begins with a single message called a @dfn{root}. All replies 6946A thread begins with a single message called a @dfn{root}. All replies
6524to the same message are @dfn{siblings} of each other. Any message that 6947to the same message are @dfn{siblings} of each other. Any message that
6525has replies to it is an @dfn{ancestor} of those replies. 6948has replies to it is an @dfn{ancestor} of those replies.
@@ -6565,6 +6988,9 @@ Display previous sibling (@code{mh-thread-previous-sibling}).
6565Display ancestor of current message (@code{mh-thread-ancestor}). 6988Display ancestor of current message (@code{mh-thread-ancestor}).
6566@end table 6989@end table
6567 6990
6991@cindex @samp{mh-thread} customization group
6992@cindex customization group, @samp{mh-thread}
6993
6568The @samp{mh-thread} customization group contains one option. 6994The @samp{mh-thread} customization group contains one option.
6569 6995
6570@vtable @code 6996@vtable @code
@@ -6572,6 +6998,11 @@ The @samp{mh-thread} customization group contains one option.
6572On means new folders start in threaded mode (default: @samp{off}). 6998On means new folders start in threaded mode (default: @samp{off}).
6573@end vtable 6999@end vtable
6574 7000
7001@findex mh-toggle-threads
7002@kindex T t
7003@vindex mh-large-folder
7004@vindex mh-show-threads-flag
7005
6575Threading large number of messages can be time consuming so the option 7006Threading large number of messages can be time consuming so the option
6576@code{mh-show-threads-flag} is turned off by default. If you turn on 7007@code{mh-show-threads-flag} is turned off by default. If you turn on
6577this option, then threading will be done only if the number of 7008this option, then threading will be done only if the number of
@@ -6579,6 +7010,13 @@ messages being threaded is less than @code{mh-large-folder}. In any
6579event, threading can be turned on (and off) with the command @kbd{T t} 7010event, threading can be turned on (and off) with the command @kbd{T t}
6580(@code{mh-toggle-threads}). 7011(@code{mh-toggle-threads}).
6581 7012
7013@findex mh-thread-ancestor
7014@findex mh-thread-next-sibling
7015@findex mh-thread-previous-sibling
7016@kindex T n
7017@kindex T p
7018@kindex T u
7019
6582There are a few commands to help you navigate threads. If you do not 7020There are a few commands to help you navigate threads. If you do not
6583care for the way a particular thread has turned, you can move up the 7021care for the way a particular thread has turned, you can move up the
6584chain of messages with the command @kbd{T u} 7022chain of messages with the command @kbd{T u}
@@ -6588,6 +7026,13 @@ chain of messages with the command @kbd{T u}
6588sibling, skipping the sub-threads. The command @kbd{T u} can also take 7026sibling, skipping the sub-threads. The command @kbd{T u} can also take
6589a prefix argument to jump to the message that started everything. 7027a prefix argument to jump to the message that started everything.
6590 7028
7029@findex mh-delete-subject-or-thread
7030@findex mh-thread-delete
7031@findex mh-thread-refile
7032@kindex k
7033@kindex T d
7034@kindex T o
7035
6591There are threaded equivalents for the commands that delete and refile 7036There are threaded equivalents for the commands that delete and refile
6592messages. For example, @kbd{T o} (@code{mh-thread-refile}) refiles the 7037messages. For example, @kbd{T o} (@code{mh-thread-refile}) refiles the
6593current message and all its children. Similarly, the command @kbd{T d} 7038current message and all its children. Similarly, the command @kbd{T d}
@@ -6596,11 +7041,13 @@ children. These commands do not refile or delete sibling messages.
6596@xref{Navigating}, for a description of the similar command @kbd{k} 7041@xref{Navigating}, for a description of the similar command @kbd{k}
6597(@code{mh-delete-subject-or-thread}). 7042(@code{mh-delete-subject-or-thread}).
6598 7043
7044@vindex mh-large-folder
7045
6599If you find that threading is too slow, it may be that you have 7046If you find that threading is too slow, it may be that you have
6600@code{mh-large-folder} set too high. Threading is one of the few 7047@code{mh-large-folder} set too high. Also, threading is one of the few
6601features of MH-E that really benefits from compiling. If you haven't 7048features of MH-E that really benefits from compiling. If you haven't
6602compiled MH-E, I encourage you to do so@footnote{If you're not sure 7049compiled MH-E, I encourage you to do so@footnote{If you're not sure if
6603if MH-E has been byte-compiled, you could try running @samp{locate 7050MH-E has been byte-compiled, you could try running @samp{locate
6604mh-thread.elc} or otherwise find MH-E on your system and ensure that 7051mh-thread.elc} or otherwise find MH-E on your system and ensure that
6605@file{mh-thread.elc} exists. If you have multiple versions and you 7052@file{mh-thread.elc} exists. If you have multiple versions and you
6606find that one is compiled but the other is not, then go into your 7053find that one is compiled but the other is not, then go into your
@@ -6679,18 +7126,32 @@ All of the limiting commands above refine the display in some way.
6679 7126
6680@cindex @command{pick} 7127@cindex @command{pick}
6681@cindex MH commands, @command{pick} 7128@cindex MH commands, @command{pick}
7129@findex mh-narrow-to-cc
7130@findex mh-narrow-to-from
7131@findex mh-narrow-to-subject
7132@findex mh-narrow-to-to
7133@kindex / c
7134@kindex / m
7135@kindex / s
7136@kindex / t
6682 7137
6683The commands @kbd{/ c}, @code{/ m}, @code{/ s}, and @code{/ t} 7138The commands @kbd{/ c} (@code{mh-narrow-to-cc}), @kbd{/ m}
6684restrict the display to messages matching the content of the 7139(@code{mh-narrow-to-from}), @kbd{/ s} (@code{mh-narrow-to-subject}),
6685respective field in the current message. However, you can give any of 7140and @kbd{/ t} (@code{mh-narrow-to-to}) restrict the display to
6686these a prefix argument to edit the @command{pick} expression used to 7141messages matching the content of the respective field in the current
6687narrow the view@footnote{See @command{pick}(1) or the section 7142message. However, you can give any of these a prefix argument to edit
7143the @command{pick} expression used to narrow the view@footnote{See
7144@command{pick}(1) or the section
6688@uref{@value{MH-BOOK-HOME}/finpic.htm, Finding Messages with pick} in 7145@uref{@value{MH-BOOK-HOME}/finpic.htm, Finding Messages with pick} in
6689the MH book.}. 7146the MH book.}.
6690 7147
6691@cindex @samp{tick} sequence 7148@cindex @samp{tick} sequence
6692@cindex sequence, @samp{tick} 7149@cindex sequence, @samp{tick}
6693@cindex ticked messages, viewing 7150@cindex ticked messages, viewing
7151@findex mh-narrow-to-range
7152@findex mh-narrow-to-tick
7153@kindex / '
7154@kindex / g
6694 7155
6695You can also limit the display to messages in the @samp{tick} sequence 7156You can also limit the display to messages in the @samp{tick} sequence
6696with the command @kbd{/ '} (@code{mh-narrow-to-tick}). 7157with the command @kbd{/ '} (@code{mh-narrow-to-tick}).
@@ -6698,12 +7159,17 @@ with the command @kbd{/ '} (@code{mh-narrow-to-tick}).
6698@samp{tick} sequence. Use the @kbd{/ g} (@code{mh-narrow-to-range}) 7159@samp{tick} sequence. Use the @kbd{/ g} (@code{mh-narrow-to-range})
6699command to limit the display to messages in a range (@pxref{Ranges}). 7160command to limit the display to messages in a range (@pxref{Ranges}).
6700 7161
7162@findex mh-widen
7163@kindex / w
7164
6701Each limit can be undone in turn with the @kbd{/ w} (@code{mh-widen}) 7165Each limit can be undone in turn with the @kbd{/ w} (@code{mh-widen})
6702command. Give this command a prefix argument to remove all limits. 7166command. Give this command a prefix argument to remove all limits.
6703 7167
6704@node Sequences, Junk, Limits, Top 7168@node Sequences, Junk, Limits, Top
6705@chapter Using Sequences 7169@chapter Using Sequences
6706 7170
7171@cindex @samp{Sequence} menu
7172@cindex menu, @samp{Sequence}
6707@cindex sequences 7173@cindex sequences
6708 7174
6709For the whole scoop on MH sequences, refer to 7175For the whole scoop on MH sequences, refer to
@@ -6819,6 +7285,8 @@ Hook run after the unseen sequence has been updated (default: @code{nil}).
6819 7285
6820@cindex @command{pick} 7286@cindex @command{pick}
6821@cindex MH commands, @command{pick} 7287@cindex MH commands, @command{pick}
7288@findex mh-put-msg-in-seq
7289@kindex S p
6822 7290
6823To place a message in a sequence, use @kbd{S p} 7291To place a message in a sequence, use @kbd{S p}
6824(@code{mh-put-msg-in-seq}). Give @kbd{S p} a range and you can add all 7292(@code{mh-put-msg-in-seq}). Give @kbd{S p} a range and you can add all
@@ -6828,11 +7296,18 @@ S p SourceSequence @key{RET} DestSequence @key{RET}}, @pxref{Ranges}).
6828@cindex @samp{tick} sequence 7296@cindex @samp{tick} sequence
6829@cindex sequence, @samp{tick} 7297@cindex sequence, @samp{tick}
6830@cindex ticking messages 7298@cindex ticking messages
7299@findex mh-index-ticked-messages
7300@findex mh-toggle-tick
7301@kindex '
7302@kindex F '
7303@kindex S p
6831 7304
6832One specific use of the @kbd{S p} command is @kbd{'} 7305One specific use of the @kbd{S p} command is @kbd{'}
6833(@code{mh-toggle-tick}) which adds messages to the @samp{tick} 7306(@code{mh-toggle-tick}) which adds messages to the @samp{tick}
6834sequence. This sequence can be viewed later with the @kbd{F '} command 7307sequence. This sequence can be viewed later with the @kbd{F '}
6835(@pxref{Folders}). 7308(@code{mh-index-ticked-messages}) command (@pxref{Folders}).
7309
7310@vindex mh-tick-seq
6836 7311
6837You can customize the option @code{mh-tick-seq} if you already use the 7312You can customize the option @code{mh-tick-seq} if you already use the
6838@samp{tick} sequence for your own use. You can also disable all of the 7313@samp{tick} sequence for your own use. You can also disable all of the
@@ -6841,6 +7316,12 @@ there isn't much advantage to that.
6841 7316
6842@cindex MH-Folder mode 7317@cindex MH-Folder mode
6843@cindex modes, MH-Folder 7318@cindex modes, MH-Folder
7319@findex mh-narrow-to-seq
7320@findex mh-narrow-to-tick
7321@findex mh-widen
7322@kindex S '
7323@kindex S n
7324@kindex S w
6844 7325
6845Once you've placed some messages in a sequence, you may wish to narrow 7326Once you've placed some messages in a sequence, you may wish to narrow
6846the field of view to just those messages in the sequence you've 7327the field of view to just those messages in the sequence you've
@@ -6853,8 +7334,12 @@ sequence, use @kbd{S '} (@code{mh-narrow-to-tick}). When you want to
6853widen the view to all your messages again, use @kbd{S w} 7334widen the view to all your messages again, use @kbd{S w}
6854(@code{mh-widen}). 7335(@code{mh-widen}).
6855 7336
6856@cindex @samp{*MH-E Sequences*}
6857@cindex buffers, @samp{*MH-E Sequences*} 7337@cindex buffers, @samp{*MH-E Sequences*}
7338@cindex @samp{*MH-E Sequences*}
7339@findex mh-list-sequences
7340@findex mh-msg-is-in-seq
7341@kindex S l
7342@kindex S s
6858 7343
6859You can see which sequences in which a message appears with the 7344You can see which sequences in which a message appears with the
6860command @kbd{S s} (@code{mh-msg-is-in-seq}). Use a prefix argument to 7345command @kbd{S s} (@code{mh-msg-is-in-seq}). Use a prefix argument to
@@ -6864,11 +7349,12 @@ folder (default is current folder) with @kbd{S l}
6864(@code{mh-list-sequences}). The list appears in a buffer named 7349(@code{mh-list-sequences}). The list appears in a buffer named
6865@samp{*MH-E Sequences*} (@pxref{Miscellaneous}). 7350@samp{*MH-E Sequences*} (@pxref{Miscellaneous}).
6866 7351
6867@cindex @samp{Previous-Sequence:} MH profile component
6868@cindex @samp{cur} sequence
6869@cindex MH profile component, @samp{Previous-Sequence:} 7352@cindex MH profile component, @samp{Previous-Sequence:}
6870@cindex sequence, @samp{Previous-Sequence} 7353@cindex @samp{cur} sequence
7354@cindex @samp{Previous-Sequence:} MH profile component
6871@cindex sequence, @samp{cur} 7355@cindex sequence, @samp{cur}
7356@cindex sequence, @samp{Previous-Sequence}
7357@vindex mh-refile-preserves-sequences-flag
6872 7358
6873If a message is in any sequence (except 7359If a message is in any sequence (except
6874@samp{Previous-Sequence:}@footnote{See @samp{mh-profile}(5)).} and 7360@samp{Previous-Sequence:}@footnote{See @samp{mh-profile}(5)).} and
@@ -6876,6 +7362,12 @@ If a message is in any sequence (except
6876sequences in the destination folder. If this behavior is not desired, 7362sequences in the destination folder. If this behavior is not desired,
6877then turn off the option @code{mh-refile-preserves-sequences-flag}. 7363then turn off the option @code{mh-refile-preserves-sequences-flag}.
6878 7364
7365@findex mh-delete-msg-from-seq
7366@findex mh-delete-seq
7367@kindex d
7368@kindex S d
7369@kindex S k
7370
6879If you want to remove a message (or range, @pxref{Ranges}) from a 7371If you want to remove a message (or range, @pxref{Ranges}) from a
6880sequence, use @kbd{S d} (@code{mh-delete-msg-from-seq}). If you want 7372sequence, use @kbd{S d} (@code{mh-delete-msg-from-seq}). If you want
6881to delete an entire sequence, use @kbd{S k} (@code{mh-delete-seq}). In 7373to delete an entire sequence, use @kbd{S k} (@code{mh-delete-seq}). In
@@ -6885,8 +7377,18 @@ you want to delete the messages, use @kbd{C-u d} (@pxref{Reading
6885Mail}). 7377Mail}).
6886 7378
6887@cindex @samp{Unseen-Sequence:} MH profile component 7379@cindex @samp{Unseen-Sequence:} MH profile component
7380@cindex @samp{cur} sequence
7381@cindex @samp{tick} sequence
6888@cindex MH profile component, @samp{Unseen-Sequence:} 7382@cindex MH profile component, @samp{Unseen-Sequence:}
6889@cindex sequence, @samp{Unseen-Sequence} 7383@cindex sequence, @samp{Unseen-Sequence}
7384@cindex sequence, @samp{cur}
7385@cindex sequence, @samp{tick}
7386@findex mh-update-sequences
7387@kindex M-x mh-update-sequences
7388@kindex q
7389@kindex x
7390@vindex mh-tick-seq
7391@vindex mh-update-sequences-after-mh-show-flag
6890 7392
6891Three sequences are maintained internally by MH-E and pushed out to MH 7393Three sequences are maintained internally by MH-E and pushed out to MH
6892when a message is shown. They include the sequence specified by your 7394when a message is shown. They include the sequence specified by your
@@ -6907,6 +7409,8 @@ from the unseen sequence.
6907 7409
6908@cindex @command{mark} 7410@cindex @command{mark}
6909@cindex MH commands, @command{mark} 7411@cindex MH commands, @command{mark}
7412@kindex S n
7413@kindex S w
6910 7414
6911With the exceptions of @kbd{S n} and @kbd{S w}, the underlying MH 7415With the exceptions of @kbd{S n} and @kbd{S w}, the underlying MH
6912command dealing with sequences is @command{mark}@footnote{See the 7416command dealing with sequences is @command{mark}@footnote{See the
@@ -6989,6 +7493,8 @@ away. This chapter describes briefly how to configure these programs
6989to work well with MH-E and how to use MH-E's interface that provides 7493to work well with MH-E and how to use MH-E's interface that provides
6990continuing education for these programs. 7494continuing education for these programs.
6991 7495
7496@vindex mh-junk-program
7497
6992The default setting of the option @code{mh-junk-program} is 7498The default setting of the option @code{mh-junk-program} is
6993@samp{Auto-detect} which means that MH-E will automatically choose one 7499@samp{Auto-detect} which means that MH-E will automatically choose one
6994of SpamAssassin, bogofilter, or SpamProbe in that order. If, for 7500of SpamAssassin, bogofilter, or SpamProbe in that order. If, for
@@ -6996,6 +7502,10 @@ example, you have both SpamAssassin and bogofilter installed and you
6996want to use bogofilter, then you can set this option to 7502want to use bogofilter, then you can set this option to
6997@samp{Bogofilter}. 7503@samp{Bogofilter}.
6998 7504
7505@findex mh-junk-blacklist
7506@kindex J b
7507@vindex mh-junk-disposition
7508
6999The command @kbd{J b} (@code{mh-junk-blacklist}) trains the spam 7509The command @kbd{J b} (@code{mh-junk-blacklist}) trains the spam
7000program in use with the content of the range (@pxref{Ranges}) and then 7510program in use with the content of the range (@pxref{Ranges}) and then
7001handles the message(s) as specified by the option 7511handles the message(s) as specified by the option
@@ -7003,11 +7513,16 @@ handles the message(s) as specified by the option
7003@samp{Delete Spam} but you can also specify the name of the folder 7513@samp{Delete Spam} but you can also specify the name of the folder
7004which is useful for building a corpus of spam for training purposes. 7514which is useful for building a corpus of spam for training purposes.
7005 7515
7516@findex mh-junk-whitelist
7517@kindex J w
7518
7006In contrast, the command @kbd{J w} (@code{mh-junk-whitelist}) 7519In contrast, the command @kbd{J w} (@code{mh-junk-whitelist})
7007reclassifies a range of messages (@pxref{Ranges}) as ham if it were 7520reclassifies a range of messages (@pxref{Ranges}) as ham if it were
7008incorrectly classified as spam. It then refiles the message into the 7521incorrectly classified as spam. It then refiles the message into the
7009@file{+inbox} folder. 7522@file{+inbox} folder.
7010 7523
7524@vindex mh-junk-background
7525
7011By default, the programs are run in the foreground, but this can be 7526By default, the programs are run in the foreground, but this can be
7012slow when junking large numbers of messages. If you have enough memory 7527slow when junking large numbers of messages. If you have enough memory
7013or don't junk that many messages at the same time, you might try 7528or don't junk that many messages at the same time, you might try
@@ -7019,7 +7534,10 @@ MH-E can work with.
7019@cindex @file{.procmailrc} 7534@cindex @file{.procmailrc}
7020@cindex files, @file{.procmailrc} 7535@cindex files, @file{.procmailrc}
7021 7536
7022@heading SpamAssassin 7537@subheading SpamAssassin
7538
7539@cindex Spamassassin
7540@cindex spam filters, Spamassassin
7023 7541
7024SpamAssassin is one of the more popular spam filtering programs. Get 7542SpamAssassin is one of the more popular spam filtering programs. Get
7025it from your local distribution or from the 7543it from your local distribution or from the
@@ -7059,7 +7577,7 @@ works best for you.
7059First, run @samp{spamassassin -t} on every mail message in your 7577First, run @samp{spamassassin -t} on every mail message in your
7060archive and use @command{gnumeric} to verify that the average plus the 7578archive and use @command{gnumeric} to verify that the average plus the
7061standard deviation of good mail is under 5, the SpamAssassin default 7579standard deviation of good mail is under 5, the SpamAssassin default
7062for "spam". 7580for ``spam''.
7063 7581
7064Using @command{gnumeric}, sort the messages by score and view the 7582Using @command{gnumeric}, sort the messages by score and view the
7065messages with the highest score. Determine the score which encompasses 7583messages with the highest score. Determine the score which encompasses
@@ -7072,6 +7590,11 @@ the @samp{+spam} folder for later review. The major weakness of
7072rules-based filters is a plethora of false positives so it is 7590rules-based filters is a plethora of false positives so it is
7073worthwhile to check. 7591worthwhile to check.
7074 7592
7593@findex mh-junk-blacklist
7594@findex mh-junk-whitelist
7595@kindex J b
7596@kindex J w
7597
7075If SpamAssassin classifies a message incorrectly, or is unsure, you can 7598If SpamAssassin classifies a message incorrectly, or is unsure, you can
7076use the MH-E commands @kbd{J b} (@code{mh-junk-blacklist}) and 7599use the MH-E commands @kbd{J b} (@code{mh-junk-blacklist}) and
7077@kbd{J w} (@code{mh-junk-whitelist}). 7600@kbd{J w} (@code{mh-junk-whitelist}).
@@ -7117,7 +7640,10 @@ done by adding the following to your @file{crontab}:
71170 * * * * sa-learn --rebuild > /dev/null 2>&1 76400 * * * * sa-learn --rebuild > /dev/null 2>&1
7118@end smallexample 7641@end smallexample
7119 7642
7120@heading Bogofilter 7643@subheading Bogofilter
7644
7645@cindex bogofilter
7646@cindex spam filters, bogofilter
7121 7647
7122Bogofilter is a Bayesian spam filtering program. Get it from your 7648Bogofilter is a Bayesian spam filtering program. Get it from your
7123local distribution or from the 7649local distribution or from the
@@ -7163,6 +7689,11 @@ spam/.
7163spam/unsure/. 7689spam/unsure/.
7164@end smallexample 7690@end smallexample
7165 7691
7692@findex mh-junk-blacklist
7693@findex mh-junk-whitelist
7694@kindex J b
7695@kindex J w
7696
7166If bogofilter classifies a message incorrectly, or is unsure, you can 7697If bogofilter classifies a message incorrectly, or is unsure, you can
7167use the MH-E commands @kbd{J b} (@code{mh-junk-blacklist}) and @kbd{J 7698use the MH-E commands @kbd{J b} (@code{mh-junk-blacklist}) and @kbd{J
7168w} (@code{mh-junk-whitelist}) to update bogofilter's training. 7699w} (@code{mh-junk-whitelist}) to update bogofilter's training.
@@ -7179,7 +7710,10 @@ mv wordlist.db.new wordlist.db
7179The @cite{Bogofilter tuning HOWTO} describes how you can fine-tune 7710The @cite{Bogofilter tuning HOWTO} describes how you can fine-tune
7180bogofilter. 7711bogofilter.
7181 7712
7182@heading SpamProbe 7713@subheading SpamProbe
7714
7715@cindex SpamProbe
7716@cindex spam filters, SpamProbe
7183 7717
7184SpamProbe is a Bayesian spam filtering program. Get it from your local 7718SpamProbe is a Bayesian spam filtering program. Get it from your local
7185distribution or from the @uref{http://spamprobe.sourceforge.net, 7719distribution or from the @uref{http://spamprobe.sourceforge.net,
@@ -7206,11 +7740,16 @@ SCORE=| spamprobe receive
7206spam/. 7740spam/.
7207@end smallexample 7741@end smallexample
7208 7742
7743@findex mh-junk-blacklist
7744@findex mh-junk-whitelist
7745@kindex J b
7746@kindex J w
7747
7209If SpamProbe classifies a message incorrectly, you can use the MH-E 7748If SpamProbe classifies a message incorrectly, you can use the MH-E
7210commands @kbd{J b} (@code{mh-junk-blacklist}) and @kbd{J w} 7749commands @kbd{J b} (@code{mh-junk-blacklist}) and @kbd{J w}
7211(@code{mh-junk-whitelist}) to update SpamProbe's training. 7750(@code{mh-junk-whitelist}) to update SpamProbe's training.
7212 7751
7213@heading Other Things You Can Do 7752@subheading Other Things You Can Do
7214 7753
7215There are a couple of things that you can add to @file{~/.procmailrc} 7754There are a couple of things that you can add to @file{~/.procmailrc}
7216in order to filter out a lot of spam and viruses. The first is to 7755in order to filter out a lot of spam and viruses. The first is to
@@ -7270,10 +7809,11 @@ Display version information about MH-E and the MH mail handling
7270system. 7809system.
7271@end ftable 7810@end ftable
7272 7811
7273@cindex @samp{*MH-E Info*}
7274@cindex MH-E version
7275@cindex buffers, @samp{*MH-E Info*} 7812@cindex buffers, @samp{*MH-E Info*}
7813@cindex MH-E version
7814@cindex @samp{*MH-E Info*}
7276@cindex version 7815@cindex version
7816@kindex M-x mh-version
7277 7817
7278One command worth noting is @kbd{M-x mh-version}. You can compare the 7818One command worth noting is @kbd{M-x mh-version}. You can compare the
7279version this command prints to the latest release (@pxref{Getting 7819version this command prints to the latest release (@pxref{Getting
@@ -7281,7 +7821,7 @@ MH-E}). The output of @kbd{M-x mh-version}, found in a buffer named
7281@samp{*MH-E Info*}, should usually be included with any bug report you 7821@samp{*MH-E Info*}, should usually be included with any bug report you
7282submit (@pxref{Bug Reports}). 7822submit (@pxref{Bug Reports}).
7283 7823
7284@heading MH-E Buffers 7824@subheading MH-E Buffers
7285 7825
7286Besides the MH-Folder, MH-Show, and MH-Letter buffers, MH-E creates 7826Besides the MH-Folder, MH-Show, and MH-Letter buffers, MH-E creates
7287several other buffers. They are: 7827several other buffers. They are:
@@ -7338,7 +7878,7 @@ This buffer contains the output of @kbd{S l}
7338@c ------------------------- 7878@c -------------------------
7339@cindex @samp{*mh-temp*} 7879@cindex @samp{*mh-temp*}
7340@cindex buffers, @samp{*mh-temp*} 7880@cindex buffers, @samp{*mh-temp*}
7341@item *mh-temp 7881@item *mh-temp*
7342This is a scratch, ephemeral, buffer used by MH-E functions. Note that 7882This is a scratch, ephemeral, buffer used by MH-E functions. Note that
7343it is hidden because the first character in the name is a space. 7883it is hidden because the first character in the name is a space.
7344You'll generally not have any need for this buffer. 7884You'll generally not have any need for this buffer.
@@ -7370,12 +7910,10 @@ Specifies the format file to pass to the scan program (default:
7370@samp{Use MH-E scan Format}). 7910@samp{Use MH-E scan Format}).
7371@c ------------------------- 7911@c -------------------------
7372@item mh-scan-prog 7912@item mh-scan-prog
7373Program used to scan messages (default: @samp{"scan"}). 7913Program used to scan messages (default: @code{"scan"}).
7374@end vtable 7914@end vtable
7375 7915
7376@findex mh-set-cmd-note
7377@vindex mh-adaptive-cmd-note-flag 7916@vindex mh-adaptive-cmd-note-flag
7378@vindex mh-scan-format-file
7379 7917
7380There are a couple of caveats when creating your own scan format file. 7918There are a couple of caveats when creating your own scan format file.
7381First, MH-E will not work if your scan lines do not include message 7919First, MH-E will not work if your scan lines do not include message
@@ -7385,6 +7923,9 @@ the option @code{mh-adaptive-cmd-note-flag} or the threading features
7385(@pxref{Threading}). 7923(@pxref{Threading}).
7386 7924
7387@cindex message numbers 7925@cindex message numbers
7926@findex mh-set-cmd-note
7927@vindex mh-adaptive-cmd-note-flag
7928@vindex mh-scan-format-file
7388 7929
7389If you've created your own format to handle long message numbers, 7930If you've created your own format to handle long message numbers,
7390you'll be pleased to know you no longer need it since MH-E adapts its 7931you'll be pleased to know you no longer need it since MH-E adapts its
@@ -7395,8 +7936,10 @@ and call @code{mh-set-cmd-note} with the width specified by your
7395format file (see @code{mh-scan-format-file}). For example, the default 7936format file (see @code{mh-scan-format-file}). For example, the default
7396width is 4, so you would use @samp{(mh-set-cmd-note 4)}. 7937width is 4, so you would use @samp{(mh-set-cmd-note 4)}.
7397 7938
7398@vindex mh-scan-format-nmh 7939@vindex mh-adaptive-cmd-note-flag
7940@vindex mh-scan-format-file
7399@vindex mh-scan-format-mh 7941@vindex mh-scan-format-mh
7942@vindex mh-scan-format-nmh
7400 7943
7401The default setting for @code{mh-scan-format-file} is @samp{Use MH-E 7944The default setting for @code{mh-scan-format-file} is @samp{Use MH-E
7402scan Format}. This means that the format string will be taken from the 7945scan Format}. This means that the format string will be taken from the
@@ -7409,6 +7952,10 @@ shell. If you have a format file that you want MH-E to use but not MH,
7409you can set this option to @samp{Specify a scan Format File} and enter 7952you can set this option to @samp{Specify a scan Format File} and enter
7410the name of your format file. 7953the name of your format file.
7411 7954
7955@vindex mh-scan-format-file
7956@vindex mh-scan-format-mh
7957@vindex mh-scan-format-nmh
7958
7412The scan format that MH-E uses when @code{mh-scan-format-file} is set 7959The scan format that MH-E uses when @code{mh-scan-format-file} is set
7413to its default of @samp{Use MH-E scan Format} is held in the variables 7960to its default of @samp{Use MH-E scan Format} is held in the variables
7414@code{mh-scan-format-nmh} and @code{mh-scan-format-mh} depending on 7961@code{mh-scan-format-nmh} and @code{mh-scan-format-mh} depending on
@@ -7432,8 +7979,9 @@ The value of @code{mh-scan-format-nmh} is:
7432 "%(decode@{subject@})%<@{body@}<<%@{body@}%>") 7979 "%(decode@{subject@})%<@{body@}<<%@{body@}%>")
7433@end smallexample 7980@end smallexample
7434 7981
7435@cindex RFC 2047, decoding
7436@cindex decoding RFC 2047 7982@cindex decoding RFC 2047
7983@cindex RFC 2047, decoding
7984@vindex mh-scan-format-mh
7437 7985
7438The setting for @code{mh-scan-format-mh} is similar, except that MH 7986The setting for @code{mh-scan-format-mh} is similar, except that MH
7439doesn't have the function @code{decode} (which is used to decode RFC 7987doesn't have the function @code{decode} (which is used to decode RFC
@@ -7459,7 +8007,7 @@ the @samp{Bcc:} field matches, and @samp{n} if a non-empty
7459@vindex mh-scan-prog 8007@vindex mh-scan-prog
7460 8008
7461The name of the program that generates a listing of one line per 8009The name of the program that generates a listing of one line per
7462message is held in @code{mh-scan-prog} (default: @samp{"scan"}). 8010message is held in @code{mh-scan-prog} (default: @code{"scan"}).
7463Unless this variable contains an absolute pathname, it is assumed to 8011Unless this variable contains an absolute pathname, it is assumed to
7464be in the @code{mh-progs} directory (@pxref{Getting Started}). You may 8012be in the @code{mh-progs} directory (@pxref{Getting Started}). You may
7465link another program to @command{scan} (see @samp{mh-profile}(5)) to 8013link another program to @command{scan} (see @samp{mh-profile}(5)) to
@@ -7468,25 +8016,26 @@ produce a different type of listing@footnote{See the section
7468pick Ranges Sequences} in the MH book.}. 8016pick Ranges Sequences} in the MH book.}.
7469 8017
7470@cindex regular expressions, scan line formats 8018@cindex regular expressions, scan line formats
8019@findex mh-set-cmd-note
8020@findex setq
7471 8021
7472If you change the format of the scan lines you'll need to tell MH-E 8022If you change the format of the scan lines you'll need to tell MH-E
7473how to parse the new format. As you will see, quite a lot of variables 8023how to parse the new format. As you will see, quite a lot of variables
7474are involved to do that. Use @samp{M-x apropos @key{RET} mh-scan.*regexp'} 8024are involved to do that. Use @kbd{M-x apropos @key{RET}
7475to obtain a list of these variables. You will also have to call 8025mh-scan.*regexp @key{RET}} to obtain a list of these variables. You
7476@code{mh-set-cmd-note} if your notations are not in column 4 (columns 8026will also have to call @code{mh-set-cmd-note} if your notations are
7477in Emacs start with 0). Note that unlike most of the user options 8027not in column 4 (columns in Emacs start with 0). Note that unlike most
7478described in this manual, these are variables and must be set with 8028of the user options described in this manual, these are variables and
7479@code{setq} instead of in a customization buffer. For help with 8029must be set with @code{setq} instead of in a customization buffer. For
7480regular expressions, see 8030help with regular expressions, see
7481@ifnothtml 8031@ifnothtml
7482@ref{Regexps, , Syntax of Regular Expressions, emacs, The 8032@ref{Regexps, , Syntax of Regular Expressions, emacs, The
7483GNU Emacs Manual} 8033GNU Emacs Manual}.
7484@end ifnothtml 8034@end ifnothtml
7485@ifhtml 8035@ifhtml
7486the section 8036section
7487@uref{http://www.gnu.org/software/emacs/manual/html_node/Regexps.html, 8037@uref{http://www.gnu.org/software/emacs/manual/html_node/Regexps.html,
7488Syntax of Regular Expressions} in 8038Syntax of Regular Expressions} in @cite{The GNU Emacs Manual}.
7489@cite{The GNU Emacs Manual}).
7490@end ifhtml 8039@end ifhtml
7491 8040
7492The first variable has to do with pruning out garbage. 8041The first variable has to do with pruning out garbage.
@@ -7501,13 +8050,11 @@ This regular expression describes a valid scan line. This is used to
7501eliminate error messages that are occasionally produced by 8050eliminate error messages that are occasionally produced by
7502@command{inc}@footnote{See the section 8051@command{inc}@footnote{See the section
7503@uref{@value{MH-BOOK-HOME}/reapre.htm, Reading Mail: inc show next 8052@uref{@value{MH-BOOK-HOME}/reapre.htm, Reading Mail: inc show next
7504prev} in the MH book.} or @command{scan} (default: @samp{"^ *[0-9]"}). 8053prev} in the MH book.} or @command{scan} (default: @code{"^ *[0-9]"}).
7505@end vtable 8054@end vtable
7506 8055
7507Next, many variables control how the scan lines are parsed. 8056Next, many variables control how the scan lines are parsed.
7508 8057
7509@vindex mh-folder-font-lock-keywords
7510
7511@vtable @code 8058@vtable @code
7512@vindex mh-folder-body 8059@vindex mh-folder-body
7513@vindex mh-folder-font-lock-keywords 8060@vindex mh-folder-font-lock-keywords
@@ -7516,7 +8063,7 @@ This regular expression matches the message body fragment. Note that
7516the default setting of @code{mh-folder-font-lock-keywords} expects 8063the default setting of @code{mh-folder-font-lock-keywords} expects
7517this expression to contain at least one parenthesized expression which 8064this expression to contain at least one parenthesized expression which
7518matches the body text as in the default of 8065matches the body text as in the default of
7519@samp{"\\(<<\\([^\n]+\\)?\\)"}. If this regular expression is not 8066@code{"\\(<<\\([^\n]+\\)?\\)"}. If this regular expression is not
7520correct, the body fragment will not be highlighted with the face 8067correct, the body fragment will not be highlighted with the face
7521@code{mh-folder-body}. 8068@code{mh-folder-body}.
7522@c ------------------------- 8069@c -------------------------
@@ -7528,7 +8075,7 @@ This regular expression matches the current message. It must match
7528from the beginning of the line. Note that the default setting of 8075from the beginning of the line. Note that the default setting of
7529@code{mh-folder-font-lock-keywords} expects this expression to contain 8076@code{mh-folder-font-lock-keywords} expects this expression to contain
7530at least one parenthesized expression which matches the message number 8077at least one parenthesized expression which matches the message number
7531as in the default of @w{@samp{"^\\( *[0-9]+\\+\\).*"}}. This 8078as in the default of @w{@code{"^\\( *[0-9]+\\+\\).*"}}. This
7532expression includes the leading space and current message marker 8079expression includes the leading space and current message marker
7533@samp{+} within the parenthesis since it looks better to highlight 8080@samp{+} within the parenthesis since it looks better to highlight
7534these items as well. The highlighting is done with the face 8081these items as well. The highlighting is done with the face
@@ -7545,7 +8092,7 @@ anchored to the beginning or the end of the line. Note that the
7545default setting of @code{mh-folder-font-lock-keywords} expects this 8092default setting of @code{mh-folder-font-lock-keywords} expects this
7546expression to contain only one parenthesized expression which matches 8093expression to contain only one parenthesized expression which matches
7547the date field as in the default of 8094the date field as in the default of
7548@samp{"\\([0-9][0-9]/[0-9][0-9]\\)"}. If this regular expression is 8095@code{"\\([0-9][0-9]/[0-9][0-9]\\)"}. If this regular expression is
7549not correct, the date will not be highlighted with the face 8096not correct, the date will not be highlighted with the face
7550@code{mh-folder-date}. 8097@code{mh-folder-date}.
7551@c ------------------------- 8098@c -------------------------
@@ -7557,7 +8104,7 @@ This regular expression matches deleted messages. It must match from
7557the beginning of the line. Note that the default setting of 8104the beginning of the line. Note that the default setting of
7558@code{mh-folder-font-lock-keywords} expects this expression to contain 8105@code{mh-folder-font-lock-keywords} expects this expression to contain
7559at least one parenthesized expression which matches the message number 8106at least one parenthesized expression which matches the message number
7560as in the default of @samp{"^\\( *[0-9]+\\)D"}. This expression 8107as in the default of @code{"^\\( *[0-9]+\\)D"}. This expression
7561includes the leading space within the parenthesis since it looks 8108includes the leading space within the parenthesis since it looks
7562better to highlight it as well. The highlighting is done with the face 8109better to highlight it as well. The highlighting is done with the face
7563@code{mh-folder-deleted}. This regular expression should be correct as 8110@code{mh-folder-deleted}. This regular expression should be correct as
@@ -7571,7 +8118,7 @@ This regular expression matches ``good'' messages. It must match from
7571the beginning of the line. Note that the default setting of 8118the beginning of the line. Note that the default setting of
7572@code{mh-folder-font-lock-keywords} expects this expression to contain 8119@code{mh-folder-font-lock-keywords} expects this expression to contain
7573at least one parenthesized expression which matches the message number 8120at least one parenthesized expression which matches the message number
7574as in the default of @w{@samp{"^\\( *[0-9]+\\)[^D^0-9]"}}. This 8121as in the default of @w{@code{"^\\( *[0-9]+\\)[^D^0-9]"}}. This
7575expression includes the leading space within the parenthesis since it 8122expression includes the leading space within the parenthesis since it
7576looks better to highlight it as well. The highlighting is done with 8123looks better to highlight it as well. The highlighting is done with
7577the face @code{mh-folder-msg-number}. This regular expression should 8124the face @code{mh-folder-msg-number}. This regular expression should
@@ -7581,7 +8128,7 @@ be correct as it is needed by non-fontification functions.
7581@item mh-scan-msg-format-regexp 8128@item mh-scan-msg-format-regexp
7582This regular expression finds the message number width in a scan 8129This regular expression finds the message number width in a scan
7583format. Note that the message number must be placed in a parenthesized 8130format. Note that the message number must be placed in a parenthesized
7584expression as in the default of @samp{"%\\([0-9]*\\)(msg)"}. This 8131expression as in the default of @code{"%\\([0-9]*\\)(msg)"}. This
7585variable is only consulted if @code{mh-scan-format-file} is set to 8132variable is only consulted if @code{mh-scan-format-file} is set to
7586@samp{Use MH-E scan Format}. 8133@samp{Use MH-E scan Format}.
7587@c ------------------------- 8134@c -------------------------
@@ -7590,22 +8137,22 @@ variable is only consulted if @code{mh-scan-format-file} is set to
7590This is a format string for the width of the message number in a scan 8137This is a format string for the width of the message number in a scan
7591format. Use @samp{0%d} for zero-filled message numbers. This variable 8138format. Use @samp{0%d} for zero-filled message numbers. This variable
7592is only consulted if @code{mh-scan-format-file} is set to @samp{Use 8139is only consulted if @code{mh-scan-format-file} is set to @samp{Use
7593MH-E scan Format} (default: @samp{"%d"}). 8140MH-E scan Format} (default: @code{"%d"}).
7594@c ------------------------- 8141@c -------------------------
7595@item mh-scan-msg-number-regexp 8142@item mh-scan-msg-number-regexp
7596This regular expression extracts the message number. It must match 8143This regular expression extracts the message number. It must match
7597from the beginning of the line. Note that the message number must be 8144from the beginning of the line. Note that the message number must be
7598placed in a parenthesized expression as in the default of @w{@samp{"^ 8145placed in a parenthesized expression as in the default of @w{@code{"^
7599*\\([0-9]+\\)"}}. 8146*\\([0-9]+\\)"}}.
7600@c ------------------------- 8147@c -------------------------
7601@item mh-scan-msg-overflow-regexp 8148@item mh-scan-msg-overflow-regexp
7602This regular expression matches overflowed message numbers (default: 8149This regular expression matches overflowed message numbers (default:
7603@samp{"^[?0-9][0-9]"}). 8150@code{"^[?0-9][0-9]"}).
7604@c ------------------------- 8151@c -------------------------
7605@item mh-scan-msg-search-regexp 8152@item mh-scan-msg-search-regexp
7606This regular expression matches a particular message. It is a format 8153This regular expression matches a particular message. It is a format
7607string; use @samp{%d} to represent the location of the message number 8154string; use @samp{%d} to represent the location of the message number
7608within the expression as in the default of @samp{"^[^0-9]*%d[^0-9]"}. 8155within the expression as in the default of @code{"^[^0-9]*%d[^0-9]"}.
7609@c ------------------------- 8156@c -------------------------
7610@vindex mh-folder-address 8157@vindex mh-folder-address
7611@vindex mh-folder-font-lock-keywords 8158@vindex mh-folder-font-lock-keywords
@@ -7616,7 +8163,7 @@ Note that the default setting of @code{mh-folder-font-lock-keywords}
7616expects this expression to contain two parenthesized expressions. The 8163expects this expression to contain two parenthesized expressions. The
7617first is expected to match the @samp{To:} that the default scan format 8164first is expected to match the @samp{To:} that the default scan format
7618file generates. The second is expected to match the recipient's name 8165file generates. The second is expected to match the recipient's name
7619as in the default of @samp{"\\(To:\\)\\(..............\\)"}. If this 8166as in the default of @code{"\\(To:\\)\\(..............\\)"}. If this
7620regular expression is not correct, the @samp{To:} string will not be 8167regular expression is not correct, the @samp{To:} string will not be
7621highlighted with the face @code{mh-folder-to} and the recipient will not be 8168highlighted with the face @code{mh-folder-to} and the recipient will not be
7622highlighted with the face @code{mh-folder-address}. 8169highlighted with the face @code{mh-folder-address}.
@@ -7629,7 +8176,7 @@ This regular expression matches refiled messages. It must match from
7629the beginning of the line. Note that the default setting of 8176the beginning of the line. Note that the default setting of
7630@code{mh-folder-font-lock-keywords} expects this expression to contain 8177@code{mh-folder-font-lock-keywords} expects this expression to contain
7631at least one parenthesized expression which matches the message number 8178at least one parenthesized expression which matches the message number
7632as in the default of @w{@samp{"^\\( *[0-9]+\\)\\^"}}. This expression 8179as in the default of @w{@code{"^\\( *[0-9]+\\)\\^"}}. This expression
7633includes the leading space within the parenthesis since it looks 8180includes the leading space within the parenthesis since it looks
7634better to highlight it as well. The highlighting is done with the face 8181better to highlight it as well. The highlighting is done with the face
7635@code{mh-folder-refiled}. This regular expression should be correct as 8182@code{mh-folder-refiled}. This regular expression should be correct as
@@ -7647,7 +8194,7 @@ expression to contain at least two parenthesized expressions. The
7647first should match the fontification hint (see 8194first should match the fontification hint (see
7648@code{mh-scan-format-nmh}) and the second should match the user name 8195@code{mh-scan-format-nmh}) and the second should match the user name
7649as in the default of 8196as in the default of
7650@w{@samp{"^ *[0-9]+.\\([bct]\\).....[ ]*\\(..................\\)"}}. 8197@w{@code{"^ *[0-9]+.\\([bct]\\).....[ ]*\\(..................\\)"}}.
7651If this regular expression is not correct, the notation hints will not 8198If this regular expression is not correct, the notation hints will not
7652be highlighted with the face @code{mh-mh-folder-sent-to-me-hint} and 8199be highlighted with the face @code{mh-mh-folder-sent-to-me-hint} and
7653the sender will not be highlighted with the face 8200the sender will not be highlighted with the face
@@ -7667,8 +8214,8 @@ number after @samp{Re:}, such as in @samp{Re[2]:} (and is thus a
7667sub-expression of the first expression). The third is expected to 8214sub-expression of the first expression). The third is expected to
7668match the subject line itself which is highlighted with the face 8215match the subject line itself which is highlighted with the face
7669@code{mh-folder-subject}. For example, the default is 8216@code{mh-folder-subject}. For example, the default is
7670@w{@samp{"^ *[0-9]+........[ ]*...................}}@* 8217@w{@code{"^ *[0-9]+........[ ]*...................}}@*
7671@w{@samp{\\([Rr][Ee]\\(\\[[0-9]+\\]\\)?:\\s-*\\)*\\([^<\n]*\\)"}}. 8218@w{@code{\\([Rr][Ee]\\(\\[[0-9]+\\]\\)?:\\s-*\\)*\\([^<\n]*\\)"}}.
7672This regular expression should be correct as it is needed by 8219This regular expression should be correct as it is needed by
7673non-fontification functions. Note that this example is broken up on 8220non-fontification functions. Note that this example is broken up on
7674two lines for readability, but is actually a single string. 8221two lines for readability, but is actually a single string.
@@ -7678,6 +8225,8 @@ Finally, there are a slew of variables that control how MH-E annotates
7678the scan lines. 8225the scan lines.
7679 8226
7680@vtable @code 8227@vtable @code
8228@findex mh-set-cmd-note
8229@vindex mh-adaptive-cmd-note-flag
7681@item mh-cmd-note 8230@item mh-cmd-note
7682Column for notations (default: 4). This variable should be set with 8231Column for notations (default: 4). This variable should be set with
7683the function @code{mh-set-cmd-note}. This variable may be updated 8232the function @code{mh-set-cmd-note}. This variable may be updated
@@ -7687,39 +8236,42 @@ Emacs start with 0.
7687@c ------------------------- 8236@c -------------------------
7688@item mh-note-copied 8237@item mh-note-copied
7689Messages that have been copied are marked by this character (default: 8238Messages that have been copied are marked by this character (default:
7690@samp{?C}). 8239@code{?C}).
7691@c ------------------------- 8240@c -------------------------
8241@vindex mh-scan-cur-msg-number-regexp
7692@item mh-note-cur 8242@item mh-note-cur
7693The current message (in MH, not in MH-E) is marked by this character 8243The current message (in MH, not in MH-E) is marked by this character
7694(default: @samp{?+}). See also @code{mh-scan-cur-msg-number-regexp}. 8244(default: @code{?+}). See also @code{mh-scan-cur-msg-number-regexp}.
7695@c ------------------------- 8245@c -------------------------
8246@vindex mh-scan-deleted-msg-regexp
7696@item mh-note-deleted 8247@item mh-note-deleted
7697Messages that have been deleted are marked by this character (default: 8248Messages that have been deleted are marked by this character (default:
7698@samp{?D}). See also @code{mh-scan-deleted-msg-regexp}. 8249@code{?D}). See also @code{mh-scan-deleted-msg-regexp}.
7699@c ------------------------- 8250@c -------------------------
7700@item mh-note-dist 8251@item mh-note-dist
7701Messages that have been redistributed are marked by this character 8252Messages that have been redistributed are marked by this character
7702(default: @samp{?R}). 8253(default: @code{?R}).
7703@c ------------------------- 8254@c -------------------------
7704@item mh-note-forw 8255@item mh-note-forw
7705Messages that have been forwarded are marked by this character 8256Messages that have been forwarded are marked by this character
7706(default: @samp{?F}). 8257(default: @code{?F}).
7707@c ------------------------- 8258@c -------------------------
7708@item mh-note-printed 8259@item mh-note-printed
7709Messages that have been printed are marked by this character (default: 8260Messages that have been printed are marked by this character (default:
7710@samp{?P}). 8261@code{?P}).
7711@c ------------------------- 8262@c -------------------------
8263@vindex mh-scan-refiled-msg-regexp
7712@item mh-note-refiled 8264@item mh-note-refiled
7713Messages that have been refiled are marked by this character (default: 8265Messages that have been refiled are marked by this character (default:
7714@samp{?^}). See also @code{mh-scan-refiled-msg-regexp}. 8266@code{?^}). See also @code{mh-scan-refiled-msg-regexp}.
7715@c ------------------------- 8267@c -------------------------
7716@item mh-note-repl 8268@item mh-note-repl
7717Messages that have been replied to are marked by this character 8269Messages that have been replied to are marked by this character
7718(default: @samp{?-}). 8270(default: @code{?-}).
7719@c ------------------------- 8271@c -------------------------
7720@item mh-note-seq 8272@item mh-note-seq
7721Messages in a user-defined sequence are marked by this character 8273Messages in a user-defined sequence are marked by this character
7722(default: @samp{?%}). Messages in the @samp{search} sequence are 8274(default: @code{?%}). Messages in the @samp{search} sequence are
7723marked by this character as well. 8275marked by this character as well.
7724@end vtable 8276@end vtable
7725 8277
@@ -7732,6 +8284,8 @@ message according to MH; it also uses that column for notations.
7732%20(decode(friendly@{from@})) %50(decode@{subject@}) %4(msg)%<(cur)+%| %> 8284%20(decode(friendly@{from@})) %50(decode@{subject@}) %4(msg)%<(cur)+%| %>
7733@end example 8285@end example
7734 8286
8287@vindex mh-adaptive-cmd-note-flag
8288@vindex mh-scan-format-file
7735@vindex mh-scan-format-file, example 8289@vindex mh-scan-format-file, example
7736 8290
7737The first thing you have to do is tell MH-E to use this file. 8291The first thing you have to do is tell MH-E to use this file.
@@ -7916,9 +8470,10 @@ Select the @samp{Several files in a directory} value, check the
7916@samp{Path} box and enter @file{~/Mail} to tell Gnus where to find 8470@samp{Path} box and enter @file{~/Mail} to tell Gnus where to find
7917your mail. 8471your mail.
7918@c ------------------------- 8472@c -------------------------
8473@vindex mail-user-agent
7919@item message-mail-user-agent 8474@item message-mail-user-agent
7920In order to send mail within Gnus using MH-E, set this option to 8475In order to send mail within Gnus using MH-E, set this option to
7921@samp{mail-user-agent} and set the @samp{mail-user-agent} option to 8476@samp{mail-user-agent} and set the @code{mail-user-agent} option to
7922@samp{Emacs interface to MH}. 8477@samp{Emacs interface to MH}.
7923@c ------------------------- 8478@c -------------------------
7924@item nnmail-keep-last-article 8479@item nnmail-keep-last-article
@@ -7966,8 +8521,9 @@ I also point out some additional sources of information.
7966@node Bug Reports, Mailing Lists, Odds and Ends, Odds and Ends 8521@node Bug Reports, Mailing Lists, Odds and Ends, Odds and Ends
7967@appendixsec Bug Reports 8522@appendixsec Bug Reports
7968 8523
7969@cindex SourceForge
7970@cindex bugs 8524@cindex bugs
8525@cindex SourceForge
8526@kindex M-x mh-version
7971 8527
7972Bug reports should be filed at 8528Bug reports should be filed at
7973@uref{https://sourceforge.net/bugs/?group_id=13357, SourceForge}. You 8529@uref{https://sourceforge.net/bugs/?group_id=13357, SourceForge}. You
@@ -8025,7 +8581,6 @@ distribution in @file{miscellany/mh-e}.
8025@cindex change log 8581@cindex change log
8026@cindex release notes 8582@cindex release notes
8027 8583
8028@c intentionally wordy to avoid overfull hbox
8029New MH-E releases are always available for downloading at 8584New MH-E releases are always available for downloading at
8030@uref{https://sourceforge.net/project/showfiles.php?group_id=13357, 8585@uref{https://sourceforge.net/project/showfiles.php?group_id=13357,
8031SourceForge} before they appear in an Emacs release. You can read the 8586SourceForge} before they appear in an Emacs release. You can read the
@@ -8035,11 +8590,12 @@ change log to see if you are interested in what the given release of
8035MH-E has to offer (although we have no doubt that you will be 8590MH-E has to offer (although we have no doubt that you will be
8036extremely interested in all new releases). 8591extremely interested in all new releases).
8037 8592
8038@cindex @samp{MH-E-NEWS}
8039@cindex @samp{README}
8040@cindex files, @samp{MH-E-NEWS} 8593@cindex files, @samp{MH-E-NEWS}
8041@cindex files, @samp{README} 8594@cindex files, @samp{README}
8042@cindex news 8595@cindex news
8596@cindex @samp{MH-E-NEWS}
8597@cindex @samp{README}
8598@kindex M-x mh-version
8043 8599
8044After you download and extract the MH-E tarball, read the 8600After you download and extract the MH-E tarball, read the
8045@file{README} file and @file{MH-E-NEWS}. These correspond to the 8601@file{README} file and @file{MH-E-NEWS}. These correspond to the
@@ -8232,20 +8788,24 @@ was incorporated into @w{Emacs 19.29}.
8232After a long break, Stephen handed the reins over to me in 2000. I 8788After a long break, Stephen handed the reins over to me in 2000. I
8233moved the project to a new site called SourceForge and organized a 8789moved the project to a new site called SourceForge and organized a
8234great team of developers. Our first release in late 2001 was version 8790great team of developers. Our first release in late 2001 was version
82356. It appeared in Emacs 21.2 and had menus and tool bar buttons. 87916. It appeared around the time of Emacs 21.2 and had menus and tool
8792bar buttons.
8236 8793
8237Then, indexed searches, improved MIME handling, a speedbar, multiple 8794Then, indexed searches, improved MIME handling, a speedbar, multiple
8238identities, alias completion, an index view of unseen messages, spam 8795identities, alias completion, an index view of unseen messages, spam
8239software support, Face and X-Image-URL header field support, Fcc 8796software support, Face and X-Image-URL header field support, Fcc
8240completion, arbitrary range handling, and draft form editing were 8797completion, arbitrary range handling, and draft form editing were
8241introduced in the version 7 series in Emacs 21.4 (2004). 8798introduced in the version 7 series around the time of Emacs 21.4
8799(2004). Still, Emacs itself contained version 5 of MH-E released back
8800in 1994.
8242 8801
8243Version 8 development was mostly driven by the rewrite of the manual. 8802Version 8 development was mostly driven by the rewrite of the manual.
8244It also brought mailutils support, S/MIME support, picon support, and 8803It also brought mailutils support, S/MIME support, picon support, and
8245an improved interface for hiding header fields. The CVS repository was 8804an improved interface for hiding header fields. The CVS repository was
8246migrated from SourceForge to Savannah (only for those files that were 8805migrated from SourceForge to Savannah (only for those files that were
8247already part of Emacs) and the software was completely reorganized to 8806already part of Emacs) and the software was completely reorganized to
8248push back two decades of entropy. It appeared in Emacs 22.1 (2006). 8807push back two decades of entropy. Version 8 will appear in Emacs 22.1,
8808expected to be released in 2006.
8249 8809
8250Bill Wohler, February 2006 8810Bill Wohler, February 2006
8251 8811
diff --git a/man/org.texi b/man/org.texi
index 29436365feb..06deb034a3a 100644
--- a/man/org.texi
+++ b/man/org.texi
@@ -4,7 +4,7 @@
4@setfilename ../info/org 4@setfilename ../info/org
5@settitle Org Mode Manual 5@settitle Org Mode Manual
6 6
7@set VERSION 4.08 7@set VERSION 4.09
8@set DATE March 2006 8@set DATE March 2006
9 9
10@dircategory Emacs 10@dircategory Emacs
@@ -22,6 +22,7 @@
22 22
23@c Macro definitions 23@c Macro definitions
24 24
25@c FIXME: does not look good in html
25@c Subheadings inside a table. Need a difference between info and the rest. 26@c Subheadings inside a table. Need a difference between info and the rest.
26@macro tsubheading{text} 27@macro tsubheading{text}
27@ifinfo 28@ifinfo
@@ -3063,8 +3064,18 @@ to read. To do this, customize the variable
3063@end lisp 3064@end lisp
3064 3065
3065@noindent 3066@noindent
3066and restart emacs (this is necessary to make this change effective). 3067or change this on a per-file basis with one of the lines (anywhere in
3067The tree then becomes 3068the buffer)
3069
3070@example
3071#+STARTUP: showstars
3072#+STARTUP: hidestars
3073@end example
3074@noindent
3075Press @kbd{C-c C-c} with the cursor in a @samp{STARTUP} line to activate
3076the modifications.
3077
3078With stars hidden, the tree becomes:
3068 3079
3069@example 3080@example
3070* Top level headline 3081* Top level headline
@@ -3101,17 +3112,28 @@ outline level to the next:
3101 3112
3102@noindent 3113@noindent
3103In order to make the structure editing and export commands handle this 3114In order to make the structure editing and export commands handle this
3104convention correctly, use (again a restart of emacs will be needed) 3115convention correctly, use
3105 3116
3106@lisp 3117@lisp
3107(setq org-odd-levels-only t) 3118(setq org-odd-levels-only t)
3108@end lisp 3119@end lisp
3109 3120
3110@noindent 3121@noindent
3122or set this on a per-file basis with one of the following lines (don't
3123forget to press @kbd{C-c C-c} with the cursor in the startup line to
3124activate changes immediately).
3125
3126@example
3127#+STARTUP: odd
3128#+STARTUP: oddeven
3129@end example
3130
3111You can convert an Org-mode file from single-star-per-level to 3131You can convert an Org-mode file from single-star-per-level to
3112double-star-per-level convention with @kbd{M-x org-convert-to-odd-levels 3132double-star-per-level convention with @kbd{M-x org-convert-to-odd-levels
3113RET} in that file. It is not possible to use this setting on a 3133RET} in that file. There is no command for the back conversion because
3114file-local basis, so you need to decide which format to use. 3134such a command might merge levels and in this way destroy the
3135structure of the tree.
3136@c FIXME: Maybe we should have such a command...
3115 3137
3116@node TTY keys, FAQ, Clean view, Miscellaneous 3138@node TTY keys, FAQ, Clean view, Miscellaneous
3117@section Using org-mode on a tty 3139@section Using org-mode on a tty
@@ -3130,7 +3152,6 @@ work-around can be better. For example changing a time stamp is
3130really only fun with @kbd{S-@key{cursor}} keys. On a tty you would 3152really only fun with @kbd{S-@key{cursor}} keys. On a tty you would
3131rather use @kbd{C-c .} to re-insert the timestamp. 3153rather use @kbd{C-c .} to re-insert the timestamp.
3132 3154
3133@page
3134@multitable @columnfractions 0.15 0.2 0.2 3155@multitable @columnfractions 0.15 0.2 0.2
3135@item @b{Default} @tab @b{Alternative 1} @tab @b{Alternative 2} 3156@item @b{Default} @tab @b{Alternative 1} @tab @b{Alternative 2}
3136@item @kbd{S-@key{TAB}} @tab @kbd{C-u @key{TAB}} @tab 3157@item @kbd{S-@key{TAB}} @tab @kbd{C-u @key{TAB}} @tab
@@ -3339,7 +3360,7 @@ to have other replacement keys, look at the variable
3339@code{org-disputed-keys}. 3360@code{org-disputed-keys}.
3340@item @file{remember.el} by John Wiegley 3361@item @file{remember.el} by John Wiegley
3341Org mode cooperates with remember, see @ref{Remember}. 3362Org mode cooperates with remember, see @ref{Remember}.
3342@file{remember.el} is not part of Emacs, find it on the web. 3363@file{Remember.el} is not part of Emacs, find it on the web.
3343@cindex @file{planner.el} 3364@cindex @file{planner.el}
3344@item @file{planner.el} by John Wiegley 3365@item @file{planner.el} by John Wiegley
3345Planner is another tool to plan work and keep track of tasks. Planner 3366Planner is another tool to plan work and keep track of tasks. Planner
@@ -3388,7 +3409,7 @@ However, from Org-mode's timeline and agenda buffers (created with
3388@kbd{C-c C-r} and @kbd{C-c a}), things do work correctly. 3409@kbd{C-c C-r} and @kbd{C-c a}), things do work correctly.
3389@item 3410@item
3390You can only make a single word boldface or italic. To emphasize 3411You can only make a single word boldface or italic. To emphasize
3391several words in a row, each much have the emphasize markers, like in 3412several words in a row, each must have the emphasize markers, like in
3392@samp{*three* *bold* *words*}. 3413@samp{*three* *bold* *words*}.
3393@item 3414@item
3394The exporters work well, but could be made more efficient. 3415The exporters work well, but could be made more efficient.
@@ -3452,6 +3473,8 @@ Linking to VM/BBDB/GNUS was inspired by Tom Shannon's
3452Juergen Vollmer contributed code generating the table of contents 3473Juergen Vollmer contributed code generating the table of contents
3453in HTML output, and other export improvements. 3474in HTML output, and other export improvements.
3454@item 3475@item
3476Chris Wallace provided a patch implementing the @samp{QUOTE} keyword.
3477@item
3455David Wainberg suggested the archiving mechanism and shaped the 3478David Wainberg suggested the archiving mechanism and shaped the
3456internal link system with many suggestions and ideas. 3479internal link system with many suggestions and ideas.
3457@item 3480@item
diff --git a/nt/ChangeLog b/nt/ChangeLog
index 12b8cf20967..e0a5a417528 100644
--- a/nt/ChangeLog
+++ b/nt/ChangeLog
@@ -1,3 +1,12 @@
12006-03-12 Jason Rumney <jasonr@gnu.org>
2
3 * addpm.c (add_registry): Don't change the registry unless keys
4 already exist from a previous version.
5
6 * makefile.w32-in (install): Use -q when invoking addpm.
7
8 * addpm.c (main): Accept -q as alternative for /q.
9
12006-03-11 Jason Rumney <jasonr@gnu.org> 102006-03-11 Jason Rumney <jasonr@gnu.org>
2 11
3 * runemacs.c (WinMain): Set screen buffer to 80x25. 12 * runemacs.c (WinMain): Set screen buffer to 80x25.
diff --git a/nt/addpm.c b/nt/addpm.c
index 65a403b7eaf..08d84c70b81 100644
--- a/nt/addpm.c
+++ b/nt/addpm.c
@@ -71,19 +71,23 @@ add_registry (path)
71 char *path; 71 char *path;
72{ 72{
73 HKEY hrootkey = NULL; 73 HKEY hrootkey = NULL;
74 DWORD dwDisp;
75 int i; 74 int i;
76 BOOL ok = TRUE; 75 BOOL ok = TRUE;
77 76
77 /* Previous versions relied on registry settings, but we do not need
78 them any more. If registry settings are installed from a previous
79 version, replace them to ensure they are the current settings.
80 Otherwise, do nothing. */
81
78 /* Check both the current user and the local machine to see if we 82 /* Check both the current user and the local machine to see if we
79 have any resources. */ 83 have any resources. */
80 84
81 if (RegCreateKeyEx (HKEY_LOCAL_MACHINE, REG_ROOT, 85 if (RegOpenKeyEx (HKEY_LOCAL_MACHINE, REG_ROOT,
82 0, "", REG_OPTION_NON_VOLATILE, 86 REG_OPTION_NON_VOLATILE,
83 KEY_WRITE, NULL, &hrootkey, &dwDisp) != ERROR_SUCCESS 87 KEY_WRITE, &hrootkey) != ERROR_SUCCESS
84 && RegCreateKeyEx (HKEY_CURRENT_USER, REG_ROOT, 88 && RegOpenKeyEx (HKEY_CURRENT_USER, REG_ROOT,
85 0, "", REG_OPTION_NON_VOLATILE, 89 REG_OPTION_NON_VOLATILE,
86 KEY_WRITE, NULL, &hrootkey, &dwDisp) != ERROR_SUCCESS) 90 KEY_WRITE, &hrootkey) != ERROR_SUCCESS)
87 { 91 {
88 return FALSE; 92 return FALSE;
89 } 93 }
@@ -122,12 +126,14 @@ main (argc, argv)
122#if 0 126#if 0
123 if (argc < 2 || argc > 3) 127 if (argc < 2 || argc > 3)
124 { 128 {
125 fprintf (stderr, "usage: addpm [/q] [emacs_path [icon_path]]\n"); 129 fprintf (stderr, "usage: addpm [-q] [emacs_path [icon_path]]\n");
126 exit (1); 130 exit (1);
127 } 131 }
128#endif 132#endif
129 133
130 if (argc > 1 && argv[1][0] == '/' && argv[1][1] == 'q') 134 if (argc > 1
135 && (argv[1][0] == '/' || argv[1][0] == '-')
136 && argv[1][1] == 'q')
131 { 137 {
132 quiet = 1; 138 quiet = 1;
133 --argc; 139 --argc;
diff --git a/nt/makefile.w32-in b/nt/makefile.w32-in
index ca1e22b93bb..5e8de8bdf65 100644
--- a/nt/makefile.w32-in
+++ b/nt/makefile.w32-in
@@ -180,7 +180,7 @@ install: all $(INSTALL_DIR)/bin install-other-dirs-$(MAKETYPE)
180 - $(CP) $(BLD)/ddeclient.exe $(INSTALL_DIR)/bin 180 - $(CP) $(BLD)/ddeclient.exe $(INSTALL_DIR)/bin
181 - $(CP) $(BLD)/cmdproxy.exe $(INSTALL_DIR)/bin 181 - $(CP) $(BLD)/cmdproxy.exe $(INSTALL_DIR)/bin
182 - $(CP) $(BLD)/runemacs.exe $(INSTALL_DIR)/bin 182 - $(CP) $(BLD)/runemacs.exe $(INSTALL_DIR)/bin
183 - "$(INSTALL_DIR)/bin/addpm" /q 183 - "$(INSTALL_DIR)/bin/addpm" -q
184 - $(DEL) ../same-dir.tst 184 - $(DEL) ../same-dir.tst
185 - $(DEL) $(INSTALL_DIR)/same-dir.tst 185 - $(DEL) $(INSTALL_DIR)/same-dir.tst
186 echo SameDirTest > "$(INSTALL_DIR)/same-dir.tst" 186 echo SameDirTest > "$(INSTALL_DIR)/same-dir.tst"
diff --git a/src/ChangeLog b/src/ChangeLog
index 389538b1617..f6edc410276 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,61 @@
12006-03-14 Chong Yidong <cyd@stupidchicken.com>
2
3 * xterm.c (x_uncatch_errors): Block input for entire function.
4
52006-03-12 Jason Rumney <jasonr@gnu.org>
6
7 * w32fns.c (Fx_create_frame): Remove call to
8 Qface_set_after_frame_default. (from xfns.c 2003-05-26)
9
10 * w32menu.c (Fx_popup_menu): Call w32_free_menu_strings when
11 finished with the menu.
12
13 * w32term.c: Sync 2005-10-24 xterm.c changes.
14 (last_mouse_glyph_frame): New var.
15 (note_mouse_movement): Say mouse moved if current frame differs
16 from last_mouse_glyph_frame, and update last_mouse_glyph_frame.
17 (w32_mouse_position): Set last_mouse_glyph_frame.
18 Remove OLD_REDISPLAY_CODE block.
19
202006-03-12 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
21
22 * macgui.h [USE_ATSUI && MAC_OSX]: Define USE_CG_TEXT_DRAWING to 1.
23
24 * macterm.h (struct mac_output) [USE_CG_DRAWING]: New member cg_context.
25 (mac_prepare_for_quickdraw) [USE_CG_DRAWING]: Add prototype.
26
27 * mac.c (sys_select) [USE_CG_DRAWING]: Call mac_prepare_for_quickdraw.
28
29 * macfns.c (x_create_tip_frame): Apply 2006-03-11 change for xfns.c.
30
31 * macterm.c (mac_draw_rectangle, x_draw_glyph_string_foreground)
32 (x_draw_composite_glyph_string_foreground)
33 (x_draw_image_foreground): Undo previous changes.
34 (x_draw_hollow_cursor): Likewise. Subtract 1 from the last
35 argument of mac_draw_rectangle.
36 (CG_SET_FILL_COLOR, CG_SET_STROKE_COLOR): New macros.
37 (mac_draw_string_common, mac_draw_image_string_cg): Use them.
38 (FRAME_CG_CONTEXT) [USE_CG_DRAWING]: New macro.
39 (mac_begin_cg_clip, mac_end_cg_clip, mac_prepare_for_quickdraw)
40 [USE_CG_DRAWING]: New functions.
41 (mac_draw_line, mac_erase_rectangle, mac_clear_window)
42 (mac_fill_rectangle, mac_draw_rectangle, mac_draw_string_common)
43 (mac_draw_image_string_cg) [USE_CG_DRAWING]: Add Quartz 2D drawing part.
44 (mac_draw_bitmap, mac_invert_rectangle, mac_draw_string_common)
45 (mac_copy_area, mac_scroll_area, x_scroll_bar_create)
46 (x_scroll_bar_remove, XTset_vertical_scroll_bar, x_set_window_size)
47 (XTread_socket) [USE_CG_DRAWING]: Call mac_prepare_for_quickdraw.
48
492006-03-12 L$,1 q(Brentey K,Aa(Broly <lorentey@elte.hu>
50
51 * xfns.c (x_icon): Disable redundant call to `x_wm_set_window_state'.
52
532006-03-11 Jason Rumney <jasonr@gnu.org>
54
55 * w32fns.c (signal_user_input): New function.
56 (post_character_message): Use it for keyboard input.
57 (w32_msg_pump): Use it for mouse input.
58
12006-03-11 Luc Teirlinck <teirllm@auburn.edu> 592006-03-11 Luc Teirlinck <teirllm@auburn.edu>
2 60
3 * window.c: Rename preserve_y to window_scroll_pixel_based_preserve_y. 61 * window.c: Rename preserve_y to window_scroll_pixel_based_preserve_y.
@@ -95,7 +153,7 @@
95 153
96 * image.c [MAC_OS] (XPutPixel): Set alpha channel bits if pixmap 154 * image.c [MAC_OS] (XPutPixel): Set alpha channel bits if pixmap
97 depth is 32. 155 depth is 32.
98 [MAC_OS] (XGetPixel): Strip off alpha channel bits if pixmap 156 [MAC_OS] (XGetPixel): Strip off alpha channel bits if pixmap
99 depth is 32. 157 depth is 32.
100 158
1012006-03-06 Chong Yidong <cyd@stupidchicken.com> 1592006-03-06 Chong Yidong <cyd@stupidchicken.com>
diff --git a/src/mac.c b/src/mac.c
index a71194f9aee..40bbacf15ce 100644
--- a/src/mac.c
+++ b/src/mac.c
@@ -4829,6 +4829,9 @@ sys_select (n, rfds, wfds, efds, timeout)
4829 return 0; 4829 return 0;
4830 } 4830 }
4831 4831
4832#if USE_CG_DRAWING
4833 mac_prepare_for_quickdraw (NULL);
4834#endif
4832 /* Avoid initial overhead of RunLoop setup for the case that 4835 /* Avoid initial overhead of RunLoop setup for the case that
4833 some input is already available. */ 4836 some input is already available. */
4834 EMACS_SET_SECS_USECS (select_timeout, 0, 0); 4837 EMACS_SET_SECS_USECS (select_timeout, 0, 0);
diff --git a/src/macfns.c b/src/macfns.c
index 92a78a7319b..8e241205cd4 100644
--- a/src/macfns.c
+++ b/src/macfns.c
@@ -3591,6 +3591,7 @@ x_create_tip_frame (dpyinfo, parms, text)
3591 3591
3592 check_mac (); 3592 check_mac ();
3593 3593
3594 parms = Fcopy_alist (parms);
3594 3595
3595#ifdef MULTI_KBOARD 3596#ifdef MULTI_KBOARD
3596 kb = dpyinfo->kboard; 3597 kb = dpyinfo->kboard;
diff --git a/src/macgui.h b/src/macgui.h
index a84fea1ae91..7eb6c9942ab 100644
--- a/src/macgui.h
+++ b/src/macgui.h
@@ -79,6 +79,18 @@ typedef unsigned long Time;
79#include <Gestalt.h> 79#include <Gestalt.h>
80#endif /* not HAVE_CARBON */ 80#endif /* not HAVE_CARBON */
81 81
82#ifndef USE_CG_TEXT_DRAWING
83#if USE_ATSUI && MAC_OS_X_VERSION_MAX_ALLOWED >= 1030
84#define USE_CG_TEXT_DRAWING 1
85#endif
86#endif
87
88#ifndef USE_CG_DRAWING
89#if USE_ATSUI && defined (MAC_OSX)
90#define USE_CG_DRAWING 1
91#endif
92#endif
93
82typedef WindowPtr Window; 94typedef WindowPtr Window;
83typedef GWorldPtr Pixmap; 95typedef GWorldPtr Pixmap;
84 96
@@ -92,12 +104,6 @@ typedef GWorldPtr Pixmap;
92#endif 104#endif
93 105
94 106
95#ifndef USE_CG_TEXT_DRAWING
96#if USE_ATSUI && MAC_OS_X_VERSION_MAX_ALLOWED >= 1030
97#define USE_CG_TEXT_DRAWING 1
98#endif
99#endif
100
101/* Emulate XCharStruct. */ 107/* Emulate XCharStruct. */
102typedef struct _XCharStruct 108typedef struct _XCharStruct
103{ 109{
diff --git a/src/macterm.c b/src/macterm.c
index 9252d3bd914..d3510dbf516 100644
--- a/src/macterm.c
+++ b/src/macterm.c
@@ -268,6 +268,72 @@ extern void menubar_selection_callback (FRAME_PTR, int);
268#define GC_BACK_COLOR(gc) (&(gc)->back_color) 268#define GC_BACK_COLOR(gc) (&(gc)->back_color)
269#define GC_FONT(gc) ((gc)->xgcv.font) 269#define GC_FONT(gc) ((gc)->xgcv.font)
270#define FRAME_NORMAL_GC(f) ((f)->output_data.mac->normal_gc) 270#define FRAME_NORMAL_GC(f) ((f)->output_data.mac->normal_gc)
271#define CG_SET_FILL_COLOR(context, color) \
272 CGContextSetRGBFillColor (context, \
273 RED_FROM_ULONG (color) / 255.0f, \
274 GREEN_FROM_ULONG (color) / 255.0f, \
275 BLUE_FROM_ULONG (color) / 255.0f, 1.0f)
276#define CG_SET_STROKE_COLOR(context, color) \
277 CGContextSetRGBStrokeColor (context, \
278 RED_FROM_ULONG (color) / 255.0f, \
279 GREEN_FROM_ULONG (color) / 255.0f, \
280 BLUE_FROM_ULONG (color) / 255.0f, 1.0f)
281#if USE_CG_DRAWING
282#define FRAME_CG_CONTEXT(f) ((f)->output_data.mac->cg_context)
283
284static CGContextRef
285mac_begin_cg_clip (f, gc)
286 struct frame *f;
287 GC gc;
288{
289 CGContextRef context = FRAME_CG_CONTEXT (f);
290
291 if (!context)
292 {
293 QDBeginCGContext (GetWindowPort (FRAME_MAC_WINDOW (f)), &context);
294 FRAME_CG_CONTEXT (f) = context;
295 }
296
297 CGContextSaveGState (context);
298 CGContextTranslateCTM (context, 0, FRAME_PIXEL_HEIGHT (f));
299 CGContextScaleCTM (context, 1, -1);
300 if (gc && gc->n_clip_rects)
301 CGContextClipToRects (context, gc->clip_rects, gc->n_clip_rects);
302
303 return context;
304}
305
306static void
307mac_end_cg_clip (f)
308 struct frame *f;
309{
310 CGContextRestoreGState (FRAME_CG_CONTEXT (f));
311}
312
313void
314mac_prepare_for_quickdraw (f)
315 struct frame *f;
316{
317 if (f == NULL)
318 {
319 Lisp_Object rest, frame;
320 FOR_EACH_FRAME (rest, frame)
321 if (FRAME_MAC_P (XFRAME (frame)))
322 mac_prepare_for_quickdraw (XFRAME (frame));
323 }
324 else
325 {
326 CGContextRef context = FRAME_CG_CONTEXT (f);
327
328 if (context)
329 {
330 CGContextSynchronize (context);
331 QDEndCGContext (GetWindowPort (FRAME_MAC_WINDOW (f)),
332 &FRAME_CG_CONTEXT (f));
333 }
334 }
335}
336#endif
271 337
272static RgnHandle saved_port_clip_region = NULL; 338static RgnHandle saved_port_clip_region = NULL;
273 339
@@ -318,6 +384,18 @@ mac_draw_line (f, gc, x1, y1, x2, y2)
318 GC gc; 384 GC gc;
319 int x1, y1, x2, y2; 385 int x1, y1, x2, y2;
320{ 386{
387#if USE_CG_DRAWING
388 CGContextRef context;
389
390 context = mac_begin_cg_clip (f, gc);
391 CG_SET_STROKE_COLOR (context, gc->xgcv.foreground);
392 CGContextBeginPath (context);
393 CGContextMoveToPoint (context, x1 + 0.5f, y1 + 0.5f);
394 CGContextAddLineToPoint (context, x2 + 0.5f, y2 + 0.5f);
395 CGContextClosePath (context);
396 CGContextStrokePath (context);
397 mac_end_cg_clip (f);
398#else
321 SetPortWindowPort (FRAME_MAC_WINDOW (f)); 399 SetPortWindowPort (FRAME_MAC_WINDOW (f));
322 400
323 RGBForeColor (GC_FORE_COLOR (gc)); 401 RGBForeColor (GC_FORE_COLOR (gc));
@@ -326,6 +404,7 @@ mac_draw_line (f, gc, x1, y1, x2, y2)
326 MoveTo (x1, y1); 404 MoveTo (x1, y1);
327 LineTo (x2, y2); 405 LineTo (x2, y2);
328 mac_end_clip (gc); 406 mac_end_clip (gc);
407#endif
329} 408}
330 409
331void 410void
@@ -359,6 +438,14 @@ mac_erase_rectangle (f, gc, x, y, width, height)
359 int x, y; 438 int x, y;
360 unsigned int width, height; 439 unsigned int width, height;
361{ 440{
441#if USE_CG_DRAWING
442 CGContextRef context;
443
444 context = mac_begin_cg_clip (f, gc);
445 CG_SET_FILL_COLOR (context, gc->xgcv.background);
446 CGContextFillRect (context, CGRectMake (x, y, width, height));
447 mac_end_cg_clip (f);
448#else
362 Rect r; 449 Rect r;
363 450
364 SetPortWindowPort (FRAME_MAC_WINDOW (f)); 451 SetPortWindowPort (FRAME_MAC_WINDOW (f));
@@ -371,6 +458,7 @@ mac_erase_rectangle (f, gc, x, y, width, height)
371 mac_end_clip (gc); 458 mac_end_clip (gc);
372 459
373 RGBBackColor (GC_BACK_COLOR (FRAME_NORMAL_GC (f))); 460 RGBBackColor (GC_BACK_COLOR (FRAME_NORMAL_GC (f)));
461#endif
374} 462}
375 463
376 464
@@ -391,6 +479,16 @@ static void
391mac_clear_window (f) 479mac_clear_window (f)
392 struct frame *f; 480 struct frame *f;
393{ 481{
482#if USE_CG_DRAWING
483 CGContextRef context;
484 GC gc = FRAME_NORMAL_GC (f);
485
486 context = mac_begin_cg_clip (f, NULL);
487 CG_SET_FILL_COLOR (context, gc->xgcv.background);
488 CGContextFillRect (context, CGRectMake (0, 0, FRAME_PIXEL_WIDTH (f),
489 FRAME_PIXEL_HEIGHT (f)));
490 mac_end_cg_clip (f);
491#else
394 SetPortWindowPort (FRAME_MAC_WINDOW (f)); 492 SetPortWindowPort (FRAME_MAC_WINDOW (f));
395 493
396 RGBBackColor (GC_BACK_COLOR (FRAME_NORMAL_GC (f))); 494 RGBBackColor (GC_BACK_COLOR (FRAME_NORMAL_GC (f)));
@@ -405,6 +503,7 @@ mac_clear_window (f)
405#else /* not TARGET_API_MAC_CARBON */ 503#else /* not TARGET_API_MAC_CARBON */
406 EraseRect (&(FRAME_MAC_WINDOW (f)->portRect)); 504 EraseRect (&(FRAME_MAC_WINDOW (f)->portRect));
407#endif /* not TARGET_API_MAC_CARBON */ 505#endif /* not TARGET_API_MAC_CARBON */
506#endif
408} 507}
409 508
410 509
@@ -425,6 +524,9 @@ mac_draw_bitmap (f, gc, x, y, width, height, bits, overlay_p)
425 bitmap.baseAddr = (char *)bits; 524 bitmap.baseAddr = (char *)bits;
426 SetRect (&(bitmap.bounds), 0, 0, width, height); 525 SetRect (&(bitmap.bounds), 0, 0, width, height);
427 526
527#if USE_CG_DRAWING
528 mac_prepare_for_quickdraw (f);
529#endif
428 SetPortWindowPort (FRAME_MAC_WINDOW (f)); 530 SetPortWindowPort (FRAME_MAC_WINDOW (f));
429 531
430 RGBForeColor (GC_FORE_COLOR (gc)); 532 RGBForeColor (GC_FORE_COLOR (gc));
@@ -571,6 +673,14 @@ mac_fill_rectangle (f, gc, x, y, width, height)
571 int x, y; 673 int x, y;
572 unsigned int width, height; 674 unsigned int width, height;
573{ 675{
676#if USE_CG_DRAWING
677 CGContextRef context;
678
679 context = mac_begin_cg_clip (f, gc);
680 CG_SET_FILL_COLOR (context, gc->xgcv.foreground);
681 CGContextFillRect (context, CGRectMake (x, y, width, height));
682 mac_end_cg_clip (f);
683#else
574 Rect r; 684 Rect r;
575 685
576 SetPortWindowPort (FRAME_MAC_WINDOW (f)); 686 SetPortWindowPort (FRAME_MAC_WINDOW (f));
@@ -581,6 +691,7 @@ mac_fill_rectangle (f, gc, x, y, width, height)
581 mac_begin_clip (gc); 691 mac_begin_clip (gc);
582 PaintRect (&r); /* using foreground color of gc */ 692 PaintRect (&r); /* using foreground color of gc */
583 mac_end_clip (gc); 693 mac_end_clip (gc);
694#endif
584} 695}
585 696
586 697
@@ -593,16 +704,26 @@ mac_draw_rectangle (f, gc, x, y, width, height)
593 int x, y; 704 int x, y;
594 unsigned int width, height; 705 unsigned int width, height;
595{ 706{
707#if USE_CG_DRAWING
708 CGContextRef context;
709
710 context = mac_begin_cg_clip (f, gc);
711 CG_SET_STROKE_COLOR (context, gc->xgcv.foreground);
712 CGContextStrokeRect (context,
713 CGRectMake (x + 0.5f, y + 0.5f, width, height));
714 mac_end_cg_clip (f);
715#else
596 Rect r; 716 Rect r;
597 717
598 SetPortWindowPort (FRAME_MAC_WINDOW (f)); 718 SetPortWindowPort (FRAME_MAC_WINDOW (f));
599 719
600 RGBForeColor (GC_FORE_COLOR (gc)); 720 RGBForeColor (GC_FORE_COLOR (gc));
601 SetRect (&r, x, y, x + width, y + height); 721 SetRect (&r, x, y, x + width + 1, y + height + 1);
602 722
603 mac_begin_clip (gc); 723 mac_begin_clip (gc);
604 FrameRect (&r); /* using foreground color of gc */ 724 FrameRect (&r); /* using foreground color of gc */
605 mac_end_clip (gc); 725 mac_end_clip (gc);
726#endif
606} 727}
607 728
608 729
@@ -672,6 +793,9 @@ mac_invert_rectangle (f, x, y, width, height)
672{ 793{
673 Rect r; 794 Rect r;
674 795
796#if USE_CG_DRAWING
797 mac_prepare_for_quickdraw (f);
798#endif
675 SetPortWindowPort (FRAME_MAC_WINDOW (f)); 799 SetPortWindowPort (FRAME_MAC_WINDOW (f));
676 800
677 SetRect (&r, x, y, x + width, y + height); 801 SetRect (&r, x, y, x + width, y + height);
@@ -717,6 +841,9 @@ mac_draw_string_common (f, gc, x, y, buf, nchars, bg_width, bytes_per_char)
717 if (!mac_use_core_graphics) 841 if (!mac_use_core_graphics)
718 { 842 {
719#endif 843#endif
844#if USE_CG_DRAWING
845 mac_prepare_for_quickdraw (f);
846#endif
720 mac_begin_clip (gc); 847 mac_begin_clip (gc);
721 RGBForeColor (GC_FORE_COLOR (gc)); 848 RGBForeColor (GC_FORE_COLOR (gc));
722 if (bg_width) 849 if (bg_width)
@@ -745,6 +872,9 @@ mac_draw_string_common (f, gc, x, y, buf, nchars, bg_width, bytes_per_char)
745 ByteCount sizes[] = {sizeof (CGContextRef)}; 872 ByteCount sizes[] = {sizeof (CGContextRef)};
746 ATSUAttributeValuePtr values[] = {&context}; 873 ATSUAttributeValuePtr values[] = {&context};
747 874
875#if USE_CG_DRAWING
876 context = mac_begin_cg_clip (f, gc);
877#else
748 GetPort (&port); 878 GetPort (&port);
749 QDBeginCGContext (port, &context); 879 QDBeginCGContext (port, &context);
750 if (gc->n_clip_rects || bg_width) 880 if (gc->n_clip_rects || bg_width)
@@ -754,14 +884,10 @@ mac_draw_string_common (f, gc, x, y, buf, nchars, bg_width, bytes_per_char)
754 if (gc->n_clip_rects) 884 if (gc->n_clip_rects)
755 CGContextClipToRects (context, gc->clip_rects, 885 CGContextClipToRects (context, gc->clip_rects,
756 gc->n_clip_rects); 886 gc->n_clip_rects);
887#endif
757 if (bg_width) 888 if (bg_width)
758 { 889 {
759 CGContextSetRGBFillColor 890 CG_SET_FILL_COLOR (context, gc->xgcv.background);
760 (context,
761 RED_FROM_ULONG (gc->xgcv.background) / 255.0f,
762 GREEN_FROM_ULONG (gc->xgcv.background) / 255.0f,
763 BLUE_FROM_ULONG (gc->xgcv.background) / 255.0f,
764 1.0);
765 CGContextFillRect 891 CGContextFillRect
766 (context, 892 (context,
767 CGRectMake (x, y - FONT_BASE (GC_FONT (gc)), 893 CGRectMake (x, y - FONT_BASE (GC_FONT (gc)),
@@ -769,13 +895,10 @@ mac_draw_string_common (f, gc, x, y, buf, nchars, bg_width, bytes_per_char)
769 } 895 }
770 CGContextScaleCTM (context, 1, -1); 896 CGContextScaleCTM (context, 1, -1);
771 CGContextTranslateCTM (context, 0, -port_height); 897 CGContextTranslateCTM (context, 0, -port_height);
898#if !USE_CG_DRAWING
772 } 899 }
773 CGContextSetRGBFillColor 900#endif
774 (context, 901 CG_SET_FILL_COLOR (context, gc->xgcv.foreground);
775 RED_FROM_ULONG (gc->xgcv.foreground) / 255.0f,
776 GREEN_FROM_ULONG (gc->xgcv.foreground) / 255.0f,
777 BLUE_FROM_ULONG (gc->xgcv.foreground) / 255.0f,
778 1.0);
779 err = ATSUSetLayoutControls (text_layout, 902 err = ATSUSetLayoutControls (text_layout,
780 sizeof (tags) / sizeof (tags[0]), 903 sizeof (tags) / sizeof (tags[0]),
781 tags, sizes, values); 904 tags, sizes, values);
@@ -783,8 +906,13 @@ mac_draw_string_common (f, gc, x, y, buf, nchars, bg_width, bytes_per_char)
783 ATSUDrawText (text_layout, 906 ATSUDrawText (text_layout,
784 kATSUFromTextBeginning, kATSUToTextEnd, 907 kATSUFromTextBeginning, kATSUToTextEnd,
785 Long2Fix (x), Long2Fix (port_height - y)); 908 Long2Fix (x), Long2Fix (port_height - y));
909#if USE_CG_DRAWING
910 mac_end_cg_clip (f);
911 context = NULL;
912#else
786 CGContextSynchronize (context); 913 CGContextSynchronize (context);
787 QDEndCGContext (port, &context); 914 QDEndCGContext (port, &context);
915#endif
788#if 0 916#if 0
789 /* This doesn't work on Mac OS X 10.1. */ 917 /* This doesn't work on Mac OS X 10.1. */
790 ATSUClearLayoutControls (text_layout, 918 ATSUClearLayoutControls (text_layout,
@@ -806,6 +934,9 @@ mac_draw_string_common (f, gc, x, y, buf, nchars, bg_width, bytes_per_char)
806 if (mac_use_core_graphics) 934 if (mac_use_core_graphics)
807 savedFlags = SwapQDTextFlags (kQDUseCGTextRendering); 935 savedFlags = SwapQDTextFlags (kQDUseCGTextRendering);
808#endif 936#endif
937#if USE_CG_DRAWING
938 mac_prepare_for_quickdraw (f);
939#endif
809 mac_begin_clip (gc); 940 mac_begin_clip (gc);
810 RGBForeColor (GC_FORE_COLOR (gc)); 941 RGBForeColor (GC_FORE_COLOR (gc));
811#ifdef MAC_OS8 942#ifdef MAC_OS8
@@ -1113,6 +1244,9 @@ mac_draw_image_string_cg (f, gc, x, y, buf, nchars, bg_width)
1113 buf++; 1244 buf++;
1114 } 1245 }
1115 1246
1247#if USE_CG_DRAWING
1248 context = mac_begin_cg_clip (f, gc);
1249#else
1116 QDBeginCGContext (port, &context); 1250 QDBeginCGContext (port, &context);
1117 if (gc->n_clip_rects || bg_width) 1251 if (gc->n_clip_rects || bg_width)
1118 { 1252 {
@@ -1120,14 +1254,10 @@ mac_draw_image_string_cg (f, gc, x, y, buf, nchars, bg_width)
1120 CGContextScaleCTM (context, 1, -1); 1254 CGContextScaleCTM (context, 1, -1);
1121 if (gc->n_clip_rects) 1255 if (gc->n_clip_rects)
1122 CGContextClipToRects (context, gc->clip_rects, gc->n_clip_rects); 1256 CGContextClipToRects (context, gc->clip_rects, gc->n_clip_rects);
1257#endif
1123 if (bg_width) 1258 if (bg_width)
1124 { 1259 {
1125 CGContextSetRGBFillColor 1260 CG_SET_FILL_COLOR (context, gc->xgcv.background);
1126 (context,
1127 RED_FROM_ULONG (gc->xgcv.background) / 255.0f,
1128 GREEN_FROM_ULONG (gc->xgcv.background) / 255.0f,
1129 BLUE_FROM_ULONG (gc->xgcv.background) / 255.0f,
1130 1.0);
1131 CGContextFillRect 1261 CGContextFillRect
1132 (context, 1262 (context,
1133 CGRectMake (gx, y - FONT_BASE (GC_FONT (gc)), 1263 CGRectMake (gx, y - FONT_BASE (GC_FONT (gc)),
@@ -1135,12 +1265,10 @@ mac_draw_image_string_cg (f, gc, x, y, buf, nchars, bg_width)
1135 } 1265 }
1136 CGContextScaleCTM (context, 1, -1); 1266 CGContextScaleCTM (context, 1, -1);
1137 CGContextTranslateCTM (context, 0, -port_height); 1267 CGContextTranslateCTM (context, 0, -port_height);
1268#if !USE_CG_DRAWING
1138 } 1269 }
1139 CGContextSetRGBFillColor (context, 1270#endif
1140 RED_FROM_ULONG (gc->xgcv.foreground) / 255.0f, 1271 CG_SET_FILL_COLOR (context, gc->xgcv.foreground);
1141 GREEN_FROM_ULONG (gc->xgcv.foreground) / 255.0f,
1142 BLUE_FROM_ULONG (gc->xgcv.foreground) / 255.0f,
1143 1.0);
1144 CGContextSetFont (context, GC_FONT (gc)->cg_font); 1272 CGContextSetFont (context, GC_FONT (gc)->cg_font);
1145 CGContextSetFontSize (context, GC_FONT (gc)->mac_fontsize); 1273 CGContextSetFontSize (context, GC_FONT (gc)->mac_fontsize);
1146 if (GC_FONT (gc)->mac_fontsize <= cg_text_anti_aliasing_threshold) 1274 if (GC_FONT (gc)->mac_fontsize <= cg_text_anti_aliasing_threshold)
@@ -1155,8 +1283,12 @@ mac_draw_image_string_cg (f, gc, x, y, buf, nchars, bg_width)
1155 gx += advances[i].width; 1283 gx += advances[i].width;
1156 } 1284 }
1157#endif 1285#endif
1286#if USE_CG_DRAWING
1287 mac_end_cg_clip (f);
1288#else
1158 CGContextSynchronize (context); 1289 CGContextSynchronize (context);
1159 QDEndCGContext (port, &context); 1290 QDEndCGContext (port, &context);
1291#endif
1160 1292
1161 return 1; 1293 return 1;
1162} 1294}
@@ -1176,6 +1308,9 @@ mac_copy_area (src, f, gc, src_x, src_y, width, height, dest_x, dest_y)
1176{ 1308{
1177 Rect src_r, dest_r; 1309 Rect src_r, dest_r;
1178 1310
1311#if USE_CG_DRAWING
1312 mac_prepare_for_quickdraw (f);
1313#endif
1179 SetPortWindowPort (FRAME_MAC_WINDOW (f)); 1314 SetPortWindowPort (FRAME_MAC_WINDOW (f));
1180 1315
1181 SetRect (&src_r, src_x, src_y, src_x + width, src_y + height); 1316 SetRect (&src_r, src_x, src_y, src_x + width, src_y + height);
@@ -1220,6 +1355,9 @@ mac_copy_area_with_mask (src, mask, f, gc, src_x, src_y,
1220{ 1355{
1221 Rect src_r, dest_r; 1356 Rect src_r, dest_r;
1222 1357
1358#if USE_CG_DRAWING
1359 mac_prepare_for_quickdraw (f);
1360#endif
1223 SetPortWindowPort (FRAME_MAC_WINDOW (f)); 1361 SetPortWindowPort (FRAME_MAC_WINDOW (f));
1224 1362
1225 SetRect (&src_r, src_x, src_y, src_x + width, src_y + height); 1363 SetRect (&src_r, src_x, src_y, src_x + width, src_y + height);
@@ -1269,6 +1407,9 @@ mac_scroll_area (f, gc, src_x, src_y, width, height, dest_x, dest_y)
1269 RgnHandle dummy = NewRgn (); /* For avoiding update events. */ 1407 RgnHandle dummy = NewRgn (); /* For avoiding update events. */
1270 1408
1271 SetRect (&src_r, src_x, src_y, src_x + width, src_y + height); 1409 SetRect (&src_r, src_x, src_y, src_x + width, src_y + height);
1410#if USE_CG_DRAWING
1411 mac_prepare_for_quickdraw (f);
1412#endif
1272 ScrollWindowRect (FRAME_MAC_WINDOW (f), 1413 ScrollWindowRect (FRAME_MAC_WINDOW (f),
1273 &src_r, dest_x - src_x, dest_y - src_y, 1414 &src_r, dest_x - src_x, dest_y - src_y,
1274 kScrollWindowNoOptions, dummy); 1415 kScrollWindowNoOptions, dummy);
@@ -1527,6 +1668,9 @@ x_flush (f)
1527{ 1668{
1528#if TARGET_API_MAC_CARBON 1669#if TARGET_API_MAC_CARBON
1529 BLOCK_INPUT; 1670 BLOCK_INPUT;
1671#if USE_CG_DRAWING
1672 mac_prepare_for_quickdraw (f);
1673#endif
1530 if (f) 1674 if (f)
1531 QDFlushPortBuffer (GetWindowPort (FRAME_MAC_WINDOW (f)), NULL); 1675 QDFlushPortBuffer (GetWindowPort (FRAME_MAC_WINDOW (f)), NULL);
1532 else 1676 else
@@ -2436,7 +2580,7 @@ x_draw_glyph_string_foreground (s)
2436 { 2580 {
2437 struct glyph *g = s->first_glyph + i; 2581 struct glyph *g = s->first_glyph + i;
2438 mac_draw_rectangle (s->f, s->gc, x, s->y, 2582 mac_draw_rectangle (s->f, s->gc, x, s->y,
2439 g->pixel_width, s->height); 2583 g->pixel_width - 1, s->height - 1);
2440 x += g->pixel_width; 2584 x += g->pixel_width;
2441 } 2585 }
2442 } 2586 }
@@ -2515,7 +2659,7 @@ x_draw_composite_glyph_string_foreground (s)
2515 { 2659 {
2516 if (s->gidx == 0) 2660 if (s->gidx == 0)
2517 mac_draw_rectangle (s->f, s->gc, x, s->y, 2661 mac_draw_rectangle (s->f, s->gc, x, s->y,
2518 s->width, s->height); 2662 s->width - 1, s->height - 1);
2519 } 2663 }
2520 else 2664 else
2521 { 2665 {
@@ -3068,15 +3212,15 @@ x_draw_image_foreground (s)
3068 int r = s->img->relief; 3212 int r = s->img->relief;
3069 if (r < 0) r = -r; 3213 if (r < 0) r = -r;
3070 mac_draw_rectangle (s->f, s->gc, x - r, y - r, 3214 mac_draw_rectangle (s->f, s->gc, x - r, y - r,
3071 s->slice.width + r*2, 3215 s->slice.width + r*2 - 1,
3072 s->slice.height + r*2); 3216 s->slice.height + r*2 - 1);
3073 } 3217 }
3074 } 3218 }
3075 } 3219 }
3076 else 3220 else
3077 /* Draw a rectangle if image could not be loaded. */ 3221 /* Draw a rectangle if image could not be loaded. */
3078 mac_draw_rectangle (s->f, s->gc, x, y, 3222 mac_draw_rectangle (s->f, s->gc, x, y,
3079 s->slice.width, s->slice.height); 3223 s->slice.width - 1, s->slice.height - 1);
3080} 3224}
3081 3225
3082 3226
@@ -4593,6 +4737,9 @@ x_scroll_bar_create (w, top, left, width, height, disp_top, disp_height)
4593 r.right = left + width; 4737 r.right = left + width;
4594 r.bottom = disp_top + disp_height; 4738 r.bottom = disp_top + disp_height;
4595 4739
4740#if USE_CG_DRAWING
4741 mac_prepare_for_quickdraw (f);
4742#endif
4596#if TARGET_API_MAC_CARBON 4743#if TARGET_API_MAC_CARBON
4597 ch = NewControl (FRAME_MAC_WINDOW (f), &r, "\p", 4744 ch = NewControl (FRAME_MAC_WINDOW (f), &r, "\p",
4598#if USE_TOOLKIT_SCROLL_BARS 4745#if USE_TOOLKIT_SCROLL_BARS
@@ -4719,6 +4866,9 @@ x_scroll_bar_remove (bar)
4719 4866
4720 BLOCK_INPUT; 4867 BLOCK_INPUT;
4721 4868
4869#if USE_CG_DRAWING
4870 mac_prepare_for_quickdraw (f);
4871#endif
4722 /* Destroy the Mac scroll bar control */ 4872 /* Destroy the Mac scroll bar control */
4723 DisposeControl (SCROLL_BAR_CONTROL_HANDLE (bar)); 4873 DisposeControl (SCROLL_BAR_CONTROL_HANDLE (bar));
4724 4874
@@ -4815,6 +4965,9 @@ XTset_vertical_scroll_bar (w, portion, whole, position)
4815 for them on the frame, we have to clear "under" them. */ 4965 for them on the frame, we have to clear "under" them. */
4816 mac_clear_area (f, left, top, width, height); 4966 mac_clear_area (f, left, top, width, height);
4817 4967
4968#if USE_CG_DRAWING
4969 mac_prepare_for_quickdraw (f);
4970#endif
4818 HideControl (ch); 4971 HideControl (ch);
4819 MoveControl (ch, sb_left + VERTICAL_SCROLL_BAR_WIDTH_TRIM, disp_top); 4972 MoveControl (ch, sb_left + VERTICAL_SCROLL_BAR_WIDTH_TRIM, disp_top);
4820 SizeControl (ch, sb_width - VERTICAL_SCROLL_BAR_WIDTH_TRIM * 2, 4973 SizeControl (ch, sb_width - VERTICAL_SCROLL_BAR_WIDTH_TRIM * 2,
@@ -5245,7 +5398,7 @@ x_draw_hollow_cursor (w, row)
5245 /* Compute frame-relative coordinates for phys cursor. */ 5398 /* Compute frame-relative coordinates for phys cursor. */
5246 x = WINDOW_TEXT_TO_FRAME_PIXEL_X (w, w->phys_cursor.x); 5399 x = WINDOW_TEXT_TO_FRAME_PIXEL_X (w, w->phys_cursor.x);
5247 y = get_phys_cursor_geometry (w, row, cursor_glyph, &h); 5400 y = get_phys_cursor_geometry (w, row, cursor_glyph, &h);
5248 wd = w->phys_cursor_width + 1; 5401 wd = w->phys_cursor_width;
5249 5402
5250 /* The foreground of cursor_gc is typically the same as the normal 5403 /* The foreground of cursor_gc is typically the same as the normal
5251 background color, which can cause the cursor box to be invisible. */ 5404 background color, which can cause the cursor box to be invisible. */
@@ -5259,7 +5412,7 @@ x_draw_hollow_cursor (w, row)
5259 5412
5260 /* Set clipping, draw the rectangle, and reset clipping again. */ 5413 /* Set clipping, draw the rectangle, and reset clipping again. */
5261 x_clip_to_row (w, row, TEXT_AREA, gc); 5414 x_clip_to_row (w, row, TEXT_AREA, gc);
5262 mac_draw_rectangle (f, gc, x, y, wd, h); 5415 mac_draw_rectangle (f, gc, x, y, wd, h - 1);
5263 mac_reset_clip_rectangles (dpy, gc); 5416 mac_reset_clip_rectangles (dpy, gc);
5264} 5417}
5265 5418
@@ -5786,8 +5939,13 @@ x_set_window_size (f, change_gravity, cols, rows)
5786 SizeWindow (FRAME_MAC_WINDOW (f), pixelwidth, pixelheight, 0); 5939 SizeWindow (FRAME_MAC_WINDOW (f), pixelwidth, pixelheight, 0);
5787#if TARGET_API_MAC_CARBON 5940#if TARGET_API_MAC_CARBON
5788 if (f->output_data.mac->hourglass_control) 5941 if (f->output_data.mac->hourglass_control)
5789 MoveControl (f->output_data.mac->hourglass_control, 5942 {
5790 pixelwidth - HOURGLASS_WIDTH, 0); 5943#if USE_CG_DRAWING
5944 mac_prepare_for_quickdraw (f);
5945#endif
5946 MoveControl (f->output_data.mac->hourglass_control,
5947 pixelwidth - HOURGLASS_WIDTH, 0);
5948 }
5791#endif 5949#endif
5792 5950
5793 /* Now, strictly speaking, we can't be sure that this is accurate, 5951 /* Now, strictly speaking, we can't be sure that this is accurate,
@@ -9672,7 +9830,11 @@ XTread_socket (sd, expected, hold_quit)
9672#if USE_CARBON_EVENTS 9830#if USE_CARBON_EVENTS
9673 toolbox_dispatcher = GetEventDispatcherTarget (); 9831 toolbox_dispatcher = GetEventDispatcherTarget ();
9674 9832
9675 while (!ReceiveNextEvent (0, NULL, kEventDurationNoWait, 9833 while (
9834#if USE_CG_DRAWING
9835 mac_prepare_for_quickdraw (NULL),
9836#endif
9837 !ReceiveNextEvent (0, NULL, kEventDurationNoWait,
9676 kEventRemoveFromQueue, &eventRef)) 9838 kEventRemoveFromQueue, &eventRef))
9677#else /* !USE_CARBON_EVENTS */ 9839#else /* !USE_CARBON_EVENTS */
9678 while (mac_wait_next_event (&er, 0, true)) 9840 while (mac_wait_next_event (&er, 0, true))
diff --git a/src/macterm.h b/src/macterm.h
index 42020811e6c..f6807d93487 100644
--- a/src/macterm.h
+++ b/src/macterm.h
@@ -334,6 +334,11 @@ struct mac_output {
334 334
335 /* Hints for the size and the position of a window. */ 335 /* Hints for the size and the position of a window. */
336 XSizeHints *size_hints; 336 XSizeHints *size_hints;
337
338#if USE_CG_DRAWING
339 /* Quartz 2D graphics context. */
340 CGContextRef cg_context;
341#endif
337}; 342};
338 343
339typedef struct mac_output mac_output; 344typedef struct mac_output mac_output;
@@ -563,6 +568,9 @@ extern void mac_unload_font P_ ((struct mac_display_info *, XFontStruct *));
563extern OSErr install_window_handler P_ ((WindowPtr)); 568extern OSErr install_window_handler P_ ((WindowPtr));
564extern void remove_window_handler P_ ((WindowPtr)); 569extern void remove_window_handler P_ ((WindowPtr));
565extern Lisp_Object mac_make_lispy_event_code P_ ((int)); 570extern Lisp_Object mac_make_lispy_event_code P_ ((int));
571#if USE_CG_DRAWING
572extern void mac_prepare_for_quickdraw P_ ((struct frame *));
573#endif
566 574
567#define FONT_TYPE_FOR_UNIBYTE(font, ch) 0 575#define FONT_TYPE_FOR_UNIBYTE(font, ch) 0
568#define FONT_TYPE_FOR_MULTIBYTE(font, ch) 0 576#define FONT_TYPE_FOR_MULTIBYTE(font, ch) 0
diff --git a/src/w32fns.c b/src/w32fns.c
index c116c51603b..08b6ed8b1a4 100644
--- a/src/w32fns.c
+++ b/src/w32fns.c
@@ -2695,6 +2695,24 @@ w32_msg_worker (dw)
2695} 2695}
2696 2696
2697static void 2697static void
2698signal_user_input ()
2699{
2700 /* Interrupt any lisp that wants to be interrupted by input. */
2701 if (!NILP (Vthrow_on_input))
2702 {
2703 Vquit_flag = Vthrow_on_input;
2704 /* If we're inside a function that wants immediate quits,
2705 do it now. */
2706 if (immediate_quit && NILP (Vinhibit_quit))
2707 {
2708 immediate_quit = 0;
2709 QUIT;
2710 }
2711 }
2712}
2713
2714
2715static void
2698post_character_message (hwnd, msg, wParam, lParam, modifiers) 2716post_character_message (hwnd, msg, wParam, lParam, modifiers)
2699 HWND hwnd; 2717 HWND hwnd;
2700 UINT msg; 2718 UINT msg;
@@ -2751,6 +2769,8 @@ post_character_message (hwnd, msg, wParam, lParam, modifiers)
2751 to receive C-g to interrupt the lisp thread. */ 2769 to receive C-g to interrupt the lisp thread. */
2752 cancel_all_deferred_msgs (); 2770 cancel_all_deferred_msgs ();
2753 } 2771 }
2772 else
2773 signal_user_input ();
2754 } 2774 }
2755 2775
2756 my_post_msg (&wmsg, hwnd, msg, wParam, lParam); 2776 my_post_msg (&wmsg, hwnd, msg, wParam, lParam);
@@ -3270,6 +3290,7 @@ w32_wnd_proc (hwnd, msg, wParam, lParam)
3270 3290
3271 wmsg.dwModifiers = w32_get_modifiers (); 3291 wmsg.dwModifiers = w32_get_modifiers ();
3272 my_post_msg (&wmsg, hwnd, msg, wParam, lParam); 3292 my_post_msg (&wmsg, hwnd, msg, wParam, lParam);
3293 signal_user_input ();
3273 3294
3274 /* Need to return true for XBUTTON messages, false for others, 3295 /* Need to return true for XBUTTON messages, false for others,
3275 to indicate that we processed the message. */ 3296 to indicate that we processed the message. */
@@ -3324,11 +3345,13 @@ w32_wnd_proc (hwnd, msg, wParam, lParam)
3324 case WM_MOUSEWHEEL: 3345 case WM_MOUSEWHEEL:
3325 wmsg.dwModifiers = w32_get_modifiers (); 3346 wmsg.dwModifiers = w32_get_modifiers ();
3326 my_post_msg (&wmsg, hwnd, msg, wParam, lParam); 3347 my_post_msg (&wmsg, hwnd, msg, wParam, lParam);
3348 signal_user_input ();
3327 return 0; 3349 return 0;
3328 3350
3329 case WM_DROPFILES: 3351 case WM_DROPFILES:
3330 wmsg.dwModifiers = w32_get_modifiers (); 3352 wmsg.dwModifiers = w32_get_modifiers ();
3331 my_post_msg (&wmsg, hwnd, msg, wParam, lParam); 3353 my_post_msg (&wmsg, hwnd, msg, wParam, lParam);
3354 signal_user_input ();
3332 return 0; 3355 return 0;
3333 3356
3334 case WM_TIMER: 3357 case WM_TIMER:
@@ -3338,6 +3361,7 @@ w32_wnd_proc (hwnd, msg, wParam, lParam)
3338 if (saved_mouse_button_msg.msg.hwnd) 3361 if (saved_mouse_button_msg.msg.hwnd)
3339 { 3362 {
3340 post_msg (&saved_mouse_button_msg); 3363 post_msg (&saved_mouse_button_msg);
3364 signal_user_input ();
3341 saved_mouse_button_msg.msg.hwnd = 0; 3365 saved_mouse_button_msg.msg.hwnd = 0;
3342 } 3366 }
3343 KillTimer (hwnd, mouse_button_timer); 3367 KillTimer (hwnd, mouse_button_timer);
@@ -3840,6 +3864,7 @@ w32_wnd_proc (hwnd, msg, wParam, lParam)
3840 { 3864 {
3841 wmsg.dwModifiers = w32_get_modifiers (); 3865 wmsg.dwModifiers = w32_get_modifiers ();
3842 my_post_msg (&wmsg, hwnd, msg, wParam, lParam); 3866 my_post_msg (&wmsg, hwnd, msg, wParam, lParam);
3867 signal_user_input ();
3843 return 0; 3868 return 0;
3844 } 3869 }
3845 3870
@@ -4344,17 +4369,6 @@ This function is an internal primitive--use `make-frame' instead. */)
4344 x_wm_set_size_hint (f, window_prompting, 0); 4369 x_wm_set_size_hint (f, window_prompting, 0);
4345 UNBLOCK_INPUT; 4370 UNBLOCK_INPUT;
4346 4371
4347 /* Avoid a bug that causes the new frame to never become visible if
4348 an echo area message is displayed during the following call1. */
4349 specbind(Qredisplay_dont_pause, Qt);
4350
4351 /* Set up faces after all frame parameters are known. This call
4352 also merges in face attributes specified for new frames. If we
4353 don't do this, the `menu' face for instance won't have the right
4354 colors, and the menu bar won't appear in the specified colors for
4355 new frames. */
4356 call1 (Qface_set_after_frame_default, frame);
4357
4358 /* Make the window appear on the frame and enable display, unless 4372 /* Make the window appear on the frame and enable display, unless
4359 the caller says not to. However, with explicit parent, Emacs 4373 the caller says not to. However, with explicit parent, Emacs
4360 cannot control visibility, so don't try. */ 4374 cannot control visibility, so don't try. */
diff --git a/src/w32menu.c b/src/w32menu.c
index 57db01ac9e9..389e6c5b856 100644
--- a/src/w32menu.c
+++ b/src/w32menu.c
@@ -819,8 +819,10 @@ cached information about equivalent key sequences. */)
819 } 819 }
820 820
821#ifdef HAVE_MENUS 821#ifdef HAVE_MENUS
822 /* If resources from a previous popup menu exist yet, does nothing 822 /* If resources from a previous popup menu still exist, does nothing
823 until the `menu_free_timer' has freed them (see w32fns.c). 823 until the `menu_free_timer' has freed them (see w32fns.c). This
824 can occur if you press ESC or click outside a menu without selecting
825 a menu item.
824 */ 826 */
825 if (current_popup_menu) 827 if (current_popup_menu)
826 { 828 {
@@ -837,6 +839,8 @@ cached information about equivalent key sequences. */)
837 UNBLOCK_INPUT; 839 UNBLOCK_INPUT;
838 840
839 discard_menu_items (); 841 discard_menu_items ();
842 w32_free_menu_strings (FRAME_W32_WINDOW (f));
843
840#endif /* HAVE_MENUS */ 844#endif /* HAVE_MENUS */
841 845
842 UNGCPRO; 846 UNGCPRO;
diff --git a/src/w32term.c b/src/w32term.c
index bd04f0cb4b5..d7c9bc8c159 100644
--- a/src/w32term.c
+++ b/src/w32term.c
@@ -183,6 +183,7 @@ int last_scroll_bar_drag_pos;
183/* Where the mouse was last time we reported a mouse event. */ 183/* Where the mouse was last time we reported a mouse event. */
184 184
185static RECT last_mouse_glyph; 185static RECT last_mouse_glyph;
186static FRAME_PTR last_mouse_glyph_frame;
186static Lisp_Object last_mouse_press_frame; 187static Lisp_Object last_mouse_press_frame;
187 188
188int w32_num_mouse_buttons; 189int w32_num_mouse_buttons;
@@ -3221,11 +3222,13 @@ note_mouse_movement (frame, msg)
3221 frame->mouse_moved = 1; 3222 frame->mouse_moved = 1;
3222 last_mouse_scroll_bar = Qnil; 3223 last_mouse_scroll_bar = Qnil;
3223 note_mouse_highlight (frame, -1, -1); 3224 note_mouse_highlight (frame, -1, -1);
3225 last_mouse_glyph_frame = 0;
3224 return 1; 3226 return 1;
3225 } 3227 }
3226 3228
3227 /* Has the mouse moved off the glyph it was on at the last sighting? */ 3229 /* Has the mouse moved off the glyph it was on at the last sighting? */
3228 if (mouse_x < last_mouse_glyph.left 3230 if (frame != last_mouse_glyph_frame
3231 || mouse_x < last_mouse_glyph.left
3229 || mouse_x >= last_mouse_glyph.right 3232 || mouse_x >= last_mouse_glyph.right
3230 || mouse_y < last_mouse_glyph.top 3233 || mouse_y < last_mouse_glyph.top
3231 || mouse_y >= last_mouse_glyph.bottom) 3234 || mouse_y >= last_mouse_glyph.bottom)
@@ -3238,6 +3241,7 @@ note_mouse_movement (frame, msg)
3238 to keep track of the mouse for help_echo and highlighting at 3241 to keep track of the mouse for help_echo and highlighting at
3239 other times. */ 3242 other times. */
3240 remember_mouse_glyph (frame, mouse_x, mouse_y, &last_mouse_glyph); 3243 remember_mouse_glyph (frame, mouse_x, mouse_y, &last_mouse_glyph);
3244 last_mouse_glyph_frame = frame;
3241 return 1; 3245 return 1;
3242 } 3246 }
3243 3247
@@ -3361,19 +3365,9 @@ w32_mouse_position (fp, insist, bar_window, part, x, y, time)
3361 on it, i.e. into the same rectangles that matrices on 3365 on it, i.e. into the same rectangles that matrices on
3362 the frame are divided into. */ 3366 the frame are divided into. */
3363 3367
3364#if OLD_REDISPLAY_CODE
3365 int ignore1, ignore2;
3366
3367 ScreenToClient (FRAME_W32_WINDOW (f1), &pt);
3368
3369 pixel_to_glyph_coords (f1, pt.x, pt.y, &ignore1, &ignore2,
3370 &last_mouse_glyph,
3371 FRAME_W32_DISPLAY_INFO (f1)->grabbed
3372 || insist);
3373#else
3374 ScreenToClient (FRAME_W32_WINDOW (f1), &pt); 3368 ScreenToClient (FRAME_W32_WINDOW (f1), &pt);
3375 remember_mouse_glyph (f1, pt.x, pt.y, &last_mouse_glyph); 3369 remember_mouse_glyph (f1, pt.x, pt.y, &last_mouse_glyph);
3376#endif 3370 last_mouse_glyph_frame = f1;
3377 3371
3378 *bar_window = Qnil; 3372 *bar_window = Qnil;
3379 *part = 0; 3373 *part = 0;
diff --git a/src/xterm.c b/src/xterm.c
index 80b8c914f5b..378373fe791 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -7547,18 +7547,17 @@ x_uncatch_errors ()
7547{ 7547{
7548 struct x_error_message_stack *tmp; 7548 struct x_error_message_stack *tmp;
7549 7549
7550 BLOCK_INPUT;
7551
7550 /* The display may have been closed before this function is called. 7552 /* The display may have been closed before this function is called.
7551 Check if it is still open before calling XSync. */ 7553 Check if it is still open before calling XSync. */
7552 if (x_display_info_for_display (x_error_message->dpy) != 0) 7554 if (x_display_info_for_display (x_error_message->dpy) != 0)
7553 { 7555 XSync (x_error_message->dpy, False);
7554 BLOCK_INPUT;
7555 XSync (x_error_message->dpy, False);
7556 UNBLOCK_INPUT;
7557 }
7558 7556
7559 tmp = x_error_message; 7557 tmp = x_error_message;
7560 x_error_message = x_error_message->prev; 7558 x_error_message = x_error_message->prev;
7561 xfree (tmp); 7559 xfree (tmp);
7560 UNBLOCK_INPUT;
7562} 7561}
7563 7562
7564/* If any X protocol errors have arrived since the last call to 7563/* If any X protocol errors have arrived since the last call to