aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaroly Lorentey2005-11-23 01:35:21 +0000
committerKaroly Lorentey2005-11-23 01:35:21 +0000
commit950bed4bb96d2a580818bdaab64a164c7c9a1c1e (patch)
tree131973e52125af75637cd0417215ba3c5b7d1de4
parent59e085e04d44b0331620b55a64eb94bf99cf81b1 (diff)
parent5fdd4cf709ffb9c92cb565a60117afbd6fc43aa5 (diff)
downloademacs-950bed4bb96d2a580818bdaab64a164c7c9a1c1e.tar.gz
emacs-950bed4bb96d2a580818bdaab64a164c7c9a1c1e.zip
Merged from miles@gnu.org--gnu-2005 (patch 656-658)
Patches applied: * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-656 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-657 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-658 Update from CVS git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-444
-rw-r--r--etc/ChangeLog4
-rw-r--r--etc/NEWS35
-rw-r--r--etc/orgcard.tex16
-rw-r--r--lib-src/ChangeLog5
-rw-r--r--lib-src/etags.c18
-rw-r--r--lisp/ChangeLog160
-rw-r--r--lisp/complete.el9
-rw-r--r--lisp/custom.el25
-rw-r--r--lisp/descr-text.el38
-rw-r--r--lisp/emacs-lisp/shadow.el7
-rw-r--r--lisp/faces.el16
-rw-r--r--lisp/ffap.el4
-rw-r--r--lisp/gnus/ChangeLog5
-rw-r--r--lisp/gnus/message.el177
-rw-r--r--lisp/international/mule-cmds.el4
-rw-r--r--lisp/longlines.el49
-rw-r--r--lisp/ls-lisp.el4
-rw-r--r--lisp/man.el41
-rw-r--r--lisp/menu-bar.el2
-rw-r--r--lisp/net/browse-url.el4
-rw-r--r--lisp/net/rcirc.el171
-rw-r--r--lisp/newcomment.el29
-rw-r--r--lisp/paren.el7
-rw-r--r--lisp/progmodes/gdb-ui.el37
-rw-r--r--lisp/progmodes/sh-script.el6
-rw-r--r--lisp/simple.el24
-rw-r--r--lisp/startup.el4
-rw-r--r--lisp/subr.el2
-rw-r--r--lisp/textmodes/org.el653
-rw-r--r--lisp/url/ChangeLog7
-rw-r--r--lisp/url/url-http.el52
-rw-r--r--lisp/widget.el2
-rw-r--r--lispref/ChangeLog20
-rw-r--r--lispref/customize.texi33
-rw-r--r--lispref/display.texi13
-rw-r--r--lispref/loading.texi3
-rw-r--r--lispref/processes.texi2
-rw-r--r--man/ChangeLog44
-rw-r--r--man/basic.texi28
-rw-r--r--man/building.texi22
-rw-r--r--man/display.texi41
-rw-r--r--man/files.texi8
-rw-r--r--man/mini.texi11
-rw-r--r--man/org.texi89
-rw-r--r--nt/INSTALL80
-rw-r--r--src/.gdbinit8
-rw-r--r--src/ChangeLog43
-rw-r--r--src/charset.c2
-rw-r--r--src/image.c2
-rw-r--r--src/keymap.c3
-rw-r--r--src/lisp.h2
-rw-r--r--src/macterm.c18
-rw-r--r--src/xfaces.c23
53 files changed, 1414 insertions, 698 deletions
diff --git a/etc/ChangeLog b/etc/ChangeLog
index baebe91ebf2..ef8059b68b3 100644
--- a/etc/ChangeLog
+++ b/etc/ChangeLog
@@ -1,3 +1,7 @@
12005-11-18 Carsten Dominik <dominik@science.uva.nl>
2
3 * orgcard.tex: Version 3.20
4
12005-11-16 Nick Roberts <nickrob@snap.net.nz> 52005-11-16 Nick Roberts <nickrob@snap.net.nz>
2 6
3 * images/gud/go.xpm, images/gud/go.pbm: Old gud-remove icons. 7 * images/gud/go.xpm, images/gud/go.pbm: Old gud-remove icons.
diff --git a/etc/NEWS b/etc/NEWS
index d19051d8002..76348145174 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -300,36 +300,6 @@ a new Emacs.
300On 32bit machines, it is now 256M (i.e. 268435455). 300On 32bit machines, it is now 256M (i.e. 268435455).
301 301
302+++ 302+++
303** M-g is now a prefix key.
304M-g g and M-g M-g run goto-line.
305M-g n and M-g M-n run next-error (like C-x `).
306M-g p and M-g M-p run previous-error.
307
308+++
309** C-u M-g M-g switches to the most recent previous buffer,
310and goes to the specified line in that buffer.
311
312When goto-line starts to execute, if there's a number in the buffer at
313point then it acts as the default argument for the minibuffer.
314
315+++
316** The old bindings C-M-delete and C-M-backspace have been deleted,
317since there are situations where one or the other will shut down
318the operating system or your X server.
319
320+++
321** line-move-ignore-invisible now defaults to t.
322
323+++
324** When the undo information of the current command gets really large
325(beyond the value of `undo-outer-limit'), Emacs discards it and warns
326you about it.
327
328+++
329** `apply-macro-to-region-lines' now operates on all lines that begin
330in the region, rather than on all complete lines in the region.
331
332+++
333** You can now switch buffers in a cyclic order with C-x C-left and 303** You can now switch buffers in a cyclic order with C-x C-left and
334(prev-buffer) and C-x C-right (next-buffer). C-x left and C-x right 304(prev-buffer) and C-x C-right (next-buffer). C-x left and C-x right
335can be used as well. 305can be used as well.
@@ -4935,11 +4905,6 @@ was inconsistent with the face behavior under X.
4935*** `set-fontset-font', `fontset-info', `fontset-font' now operate on 4905*** `set-fontset-font', `fontset-info', `fontset-font' now operate on
4936the default fontset if the argument NAME is nil.. 4906the default fontset if the argument NAME is nil..
4937 4907
4938+++
4939*** In `set-face-attribute', you can assign any attribute the value
4940`:ignore-defface'. This forces the attribute value to be acquired
4941from some other face during face merging.
4942
4943** Font-Lock changes: 4908** Font-Lock changes:
4944 4909
4945+++ 4910+++
diff --git a/etc/orgcard.tex b/etc/orgcard.tex
index 7f84c2807f3..96261a7fc2d 100644
--- a/etc/orgcard.tex
+++ b/etc/orgcard.tex
@@ -1,4 +1,4 @@
1% Reference Card for Org Mode 3.19 1% Reference Card for Org Mode 3.20
2% 2%
3%**start of header 3%**start of header
4\newcount\columnsperpage 4\newcount\columnsperpage
@@ -32,8 +32,8 @@
32 32
33% You should have received a copy of the GNU General Public License 33% You should have received a copy of the GNU General Public License
34% along with GNU Emacs; see the file COPYING. If not, write to 34% along with GNU Emacs; see the file COPYING. If not, write to
35% the Free Software Foundation, 51 Franklin Street, Fifth Floor, 35% the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
36% Boston, MA 02110-1301, USA. 36% Boston, MA 02111-1307, USA.
37 37
38% This file is intended to be processed by plain TeX (TeX82). 38% This file is intended to be processed by plain TeX (TeX82).
39% 39%
@@ -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{3.19} 61\def\orgversionnumber{3.20}
62\def\year{2005} 62\def\year{2005}
63 63
64\def\shortcopyrightnotice{\vskip 1ex plus 2 fill 64\def\shortcopyrightnotice{\vskip 1ex plus 2 fill
@@ -449,9 +449,9 @@ Outside of tables, the same keys may have other functionality.
449\key{move the current row down}{M-DOWN} 449\key{move the current row down}{M-DOWN}
450\key{kill the current row or horizontal line}{M-S-UP} 450\key{kill the current row or horizontal line}{M-S-UP}
451\key{insert new row above the current row}{M-S-DOWN} 451\key{insert new row above the current row}{M-S-DOWN}
452
453\key{insert horizontal line below the current row}{C-c -} 452\key{insert horizontal line below the current row}{C-c -}
454\key{insert horizontal line above the current row}{C-u C-c -} 453\key{insert horizontal line above the current row}{C-u C-c -}
454\key{sort lines in region}{C-c \^{}}
455 455
456{\bf Regions} 456{\bf Regions}
457 457
@@ -462,8 +462,7 @@ Outside of tables, the same keys may have other functionality.
462 462
463{\bf Calculations} 463{\bf Calculations}
464 464
465Except for the summation commands, these need the Emacs calc package 465These need the Emacs calc package installed.
466installed.
467 466
468\key{set and eval column formula}{C-c =} 467\key{set and eval column formula}{C-c =}
469\key{set and eval named-field formula}{C-u C-c =} 468\key{set and eval named-field formula}{C-u C-c =}
@@ -512,8 +511,9 @@ introduces a column formula, \kbd{:=} a named-field formula.
512\key{show timeline of current org file}{C-c C-r} 511\key{show timeline of current org file}{C-c C-r}
513\key{... include past dates}{C-u C-c C-r} 512\key{... include past dates}{C-u C-c C-r}
514 513
515\key{add current file to your agenda}{C-c [} 514\key{add/move current file to front of agenda}{C-c [}
516\key{remove current file from your agenda}{C-c ]} 515\key{remove current file from your agenda}{C-c ]}
516\key{cycle through agenda file list}{C-,}
517\key{compile agenda for the current week}{C-c a$^2$} 517\key{compile agenda for the current week}{C-c a$^2$}
518\key{agenda for date at cursor}{C-c C-o} 518\key{agenda for date at cursor}{C-c C-o}
519\vskip 1mm 519\vskip 1mm
diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog
index 2f584879147..bab6d6cea38 100644
--- a/lib-src/ChangeLog
+++ b/lib-src/ChangeLog
@@ -1,3 +1,8 @@
12005-11-18 Hideki IWAMOTO <h-iwamoto@kit.hi-ho.ne.jp> (tiny change)
2
3 * etags.c (main): Cxref mode writes to stdout: do not close tagf,
4 which was never opened.
5
12005-10-20 Olli Savia <ops@iki.fi> (tiny change) 62005-10-20 Olli Savia <ops@iki.fi> (tiny change)
2 7
3 * etags.c: Undef STDIN if defined. (LynxOS defines it in system 8 * etags.c: Undef STDIN if defined. (LynxOS defines it in system
diff --git a/lib-src/etags.c b/lib-src/etags.c
index de0a2cf950b..fecf7904117 100644
--- a/lib-src/etags.c
+++ b/lib-src/etags.c
@@ -41,7 +41,7 @@
41 * configuration file containing regexp definitions for etags. 41 * configuration file containing regexp definitions for etags.
42 */ 42 */
43 43
44char pot_etags_version[] = "@(#) pot revision number is 17.14"; 44char pot_etags_version[] = "@(#) pot revision number is 17.15";
45 45
46#define TRUE 1 46#define TRUE 1
47#define FALSE 0 47#define FALSE 0
@@ -479,7 +479,7 @@ static bool packages_only; /* --packages-only: in Ada, only tag packages*/
479 479
480/* STDIN is defined in LynxOS system headers */ 480/* STDIN is defined in LynxOS system headers */
481#ifdef STDIN 481#ifdef STDIN
482#undef STDIN 482# undef STDIN
483#endif 483#endif
484 484
485#define STDIN 0x1001 /* returned by getopt_long on --parse-stdin */ 485#define STDIN 0x1001 /* returned by getopt_long on --parse-stdin */
@@ -994,9 +994,9 @@ Relative ones are stored relative to the output file's directory.\n");
994 if (CTAGS) 994 if (CTAGS)
995 { 995 {
996 puts ("-v, --vgrind\n\ 996 puts ("-v, --vgrind\n\
997 Generates an index of items intended for human consumption,\n\ 997 Print on the standard output an index of items intended for\n\
998 similar to the output of vgrind. The index is sorted, and\n\ 998 human consumption, similar to the output of vgrind. The index\n\
999 gives the page number of each item."); 999 is sorted, and gives the page number of each item.");
1000 puts ("-w, --no-warn\n\ 1000 puts ("-w, --no-warn\n\
1001 Suppress warning messages about entries defined in multiple\n\ 1001 Suppress warning messages about entries defined in multiple\n\
1002 files."); 1002 files.");
@@ -1428,7 +1428,8 @@ main (argc, argv)
1428 1428
1429 if (!CTAGS || cxref_style) 1429 if (!CTAGS || cxref_style)
1430 { 1430 {
1431 put_entries (nodehead); /* write the remaining tags (ETAGS) */ 1431 /* Write the remaining tags to tagf (ETAGS) or stdout (CXREF). */
1432 put_entries (nodehead);
1432 free_tree (nodehead); 1433 free_tree (nodehead);
1433 nodehead = NULL; 1434 nodehead = NULL;
1434 if (!CTAGS) 1435 if (!CTAGS)
@@ -1442,10 +1443,11 @@ main (argc, argv)
1442 1443
1443 while (nincluded_files-- > 0) 1444 while (nincluded_files-- > 0)
1444 fprintf (tagf, "\f\n%s,include\n", *included_files++); 1445 fprintf (tagf, "\f\n%s,include\n", *included_files++);
1446
1447 if (fclose (tagf) == EOF)
1448 pfatal (tagfile);
1445 } 1449 }
1446 1450
1447 if (fclose (tagf) == EOF)
1448 pfatal (tagfile);
1449 exit (EXIT_SUCCESS); 1451 exit (EXIT_SUCCESS);
1450 } 1452 }
1451 1453
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 79a91eb29af..3a9e3f9c83d 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,151 @@
12005-11-21 Luc Teirlinck <teirllm@auburn.edu>
2
3 * startup.el (command-line): Make sure that loaddefs.el is handled
4 correctly in load-history.
5
62005-11-22 Nick Roberts <nickrob@snap.net.nz>
7
8 * progmodes/gdb-ui.el (gdb-locals-watch-keymap): New local map.
9 (gdb-struct-string, gdb-array-string): New constants.
10 (gdb-info-locals-handler): Use them.
11 (gdb-reset): Reset gdb-var-list to nil.
12
132005-11-21 Stefan Monnier <monnier@iro.umontreal.ca>
14
15 * progmodes/sh-script.el (sh-font-lock-paren): Handle continued lines
16 in patterns.
17
182005-11-21 Juri Linkov <juri@jurta.org>
19
20 * custom.el (defcustom): Update link types in docstring.
21
222005-11-20 Martin Rudalics <rudalics@gmx.at> (tiny change)
23
24 * custom.el (defgroup): Add doc-string-elt info.
25
26 * widget.el (define-widget): Don't use declare for the doc-string-elt.
27
282005-11-20 Stefan Monnier <monnier@iro.umontreal.ca>
29
30 * newcomment.el (comment-enter-backward): Fix last fix.
31
32 * simple.el (blink-matching-open):
33 * paren.el (show-paren-function): Allow new paren-class info.
34
352005-11-20 Chong Yidong <cyd@stupidchicken.com>
36
37 * faces.el: Revert 2005-11-17 change. :ignore-defface is now
38 handled automagically.
39
402005-11-20 Juri Linkov <juri@jurta.org>
41
42 * simple.el (what-cursor-position):
43 * descr-text.el (describe-char): Use Lisp-readable syntax
44 for octal and hex. Reorder decimal, octal and hex values.
45 Remove excess whitespace in the output. Use `=' in `column='
46 like in `point=' and `Hscroll='.
47
48 * international/mule-cmds.el (encoded-string-description):
49 Use Lisp-readable syntax for hex.
50
512005-11-19 Stefan Monnier <monnier@iro.umontreal.ca>
52
53 * newcomment.el (comment-enter-backward): Handle the case where the
54 comment is closed by EOB.
55
562005-11-19 Chong Yidong <cyd@stupidchicken.com>
57
58 * longlines.el (longlines-before-revert-hook)
59 (longlines-after-revert-hook): New functions.
60 (longlines-mode): Turn off longlines temporarily when reverting.
61 Add a message-setup-hook.
62 (longlines-decode-buffer): New function.
63 (longlines-wrap-line): Preserve marker positions.
64
652005-11-19 Andreas Schwab <schwab@suse.de>
66
67 * emacs-lisp/shadow.el: Handle compressed files.
68
692005-11-19 Romain Francoise <romain@orebokech.com>
70
71 * net/browse-url.el (browse-url-default-browser): Signal an error
72 if no usable browser can be found, rather than try to load w3.
73
742005-11-16 Ryan Yeske <rcyeske@gmail.com>
75
76 * net/rcirc.el (rcirc-mangle-text): Add bold face property without
77 replacing existing properties.
78 (rcirc-my-nick, rcirc-other-nick, rcirc-server)
79 (rcirc-nick-in-message, rcirc-prompt): Use min-colors and remove
80 tty specs.
81 (rcirc-server-prefix, rcirc-server): New faces.
82 (rcirc-url-regexp): Generate with rx macro.
83 (rcirc-last-server-message-time): New variable.
84 (rcirc-filter): Record time of last message.
85 (rcirc-keepalive): Kill processes that did not send a message
86 since the last ping.
87 (rcirc-mode): Give rcirc-topic a local binding here.
88
892005-11-19 Michael Cadilhac <michael.cadilhac@lrde.org> (tiny change)
90
91 * subr.el (read-passwd): Fontify the prompt as we do with other
92 prompts.
93
942005-11-19 Ryan Yeske <rcyeske@gmail.com>
95
96 * ffap.el (ffap-menu-rescan): Use inhibit-read-only instead of
97 binding buffer-read-only to nil.
98
992005-11-19 Eli Zaretskii <eliz@gnu.org>
100
101 * complete.el (partial-completion-mode):
102 Mention completion-auto-help in the doc string.
103
104 * man.el (Man-highlight-references): Doc fix. Reformat code in a
105 more Lisp-ish way.
106
1072005-11-19 Slawomir Nowaczyk <slawomir.nowaczyk.847@student.lu.se> (tiny change)
108
109 * ls-lisp.el (ls-lisp-format-file-size): Format file size with 9
110 digits, not 8, to avoid misalignment for files larger than 100MB.
111
1122005-11-19 Eli Zaretskii <eliz@gnu.org>
113
114 * menu-bar.el (menu-bar-describe-menu) <list-keybindings>:
115 Mention "keyboard shortcuts" in the help text.
116
1172005-11-19 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
118
119 * startup.el (fancy-splash-default-action): Discard only
120 mouse-down and succeeding mouse-up events in the splash screen
121 window so that drag-n-drop event can be processed.
122
1232005-11-18 Chong Yidong <cyd@stupidchicken.com>
124
125 * longlines.el (longlines-mode): Add hacks for mail-mode and
126 message-mode.
127
1282005-11-18 Carsten Dominik <dominik@science.uva.nl>
129
130 * textmodes/org.el: (org-table-sort-lines): New command.
131 (org-tbl-menu): Add entry for `org-table-sort-lines'.
132 (org-add-file): Command removed, use `org-agenda-file-to-front'
133 instead.
134 (org-export-icalendar): Use `org-icalendar-combined-name'.
135 (org-cycle-agenda-files, org-agenda-file-to-end)
136 (org-agenda-file-to-front): New commands.
137 (org-table-tab-jumps-over-hlines,org-export-html-style): New
138 options.
139 (org-table-next-field): Use `org-table-tab-jumps-over-hlines'.
140 (org-at-table.el-p, org-set-autofill-regexps,org-html-protect):
141 New functions.
142 (org-fill-paragraph): Call `org-table-align' in tables.
143 (org-mode): Call `org-set-autofill-regexps'.
144 (org-export-as-html): Support for local handformatted lists.
145 Modified to produce valid HTML 4.0. Use `org-export-html-style'.
146 (org-export-local-list-max-depth): New option.
147 (org-html-expand): Use `org-html-protect'.
148
12005-11-18 Nick Roberts <nickrob@snap.net.nz> 1492005-11-18 Nick Roberts <nickrob@snap.net.nz>
2 150
3 * progmodes/gud.el (gud-install-speedbar-variables): Bind gud-pp 151 * progmodes/gud.el (gud-install-speedbar-variables): Bind gud-pp
@@ -7,7 +155,7 @@
7 * progmodes/gdb-ui.el (gdb-ann3): ...here. Make it work in the 155 * progmodes/gdb-ui.el (gdb-ann3): ...here. Make it work in the
8 speedbar. 156 speedbar.
9 (gdb-find-watch-expression): New function. 157 (gdb-find-watch-expression): New function.
10 158
112005-11-17 Chong Yidong <cyd@stupidchicken.com> 1592005-11-17 Chong Yidong <cyd@stupidchicken.com>
12 160
13 * faces.el (face-attribute, set-face-attribute): Mention existence 161 * faces.el (face-attribute, set-face-attribute): Mention existence
@@ -2033,14 +2181,6 @@
2033 2181
20342005-10-19 Stefan Monnier <monnier@iro.umontreal.ca> 21822005-10-19 Stefan Monnier <monnier@iro.umontreal.ca>
2035 2183
2036 * simple.el (eval-expression-print-format): Put the char-string
2037 inside the parenthesis, like the other alternative notations.
2038 (kill-new): Use push.
2039 (copy-to-buffer): Use with-current-buffer.
2040 (completion-setup-function): Simplify.
2041 (minibuffer-local-must-match-map): Don't add redundant bindings which
2042 are already present in its parent (minibuffer-local-completion-map).
2043
2044 * savehist.el (savehist-coding-system): Revert to checking XEmacs. 2184 * savehist.el (savehist-coding-system): Revert to checking XEmacs.
2045 2185
20462005-10-19 Jay Belanger <belanger@truman.edu> 21862005-10-19 Jay Belanger <belanger@truman.edu>
@@ -2448,7 +2588,7 @@
24482005-10-12 Kim F. Storm <storm@cua.dk> 25882005-10-12 Kim F. Storm <storm@cua.dk>
2449 2589
2450 * startup.el (fancy-splash-default-action): Discard mouse click in 2590 * startup.el (fancy-splash-default-action): Discard mouse click in
2451 the spash screen window, as it has no sensible meaning in the 2591 the splash screen window, as it has no sensible meaning in the
2452 next window to be selected. Fixes error reported by Jan D. 2592 next window to be selected. Fixes error reported by Jan D.
2453 2593
24542005-10-12 Reiner Steib <Reiner.Steib@gmx.de> 25942005-10-12 Reiner Steib <Reiner.Steib@gmx.de>
diff --git a/lisp/complete.el b/lisp/complete.el
index d3ff6c53988..4a2ce48f152 100644
--- a/lisp/complete.el
+++ b/lisp/complete.el
@@ -203,7 +203,14 @@ other file in that directory begin with that sequence of characters.
203Unless `PC-disable-includes' is non-nil, the `<...>' sequence is interpreted 203Unless `PC-disable-includes' is non-nil, the `<...>' sequence is interpreted
204specially in \\[find-file]. For example, 204specially in \\[find-file]. For example,
205\\[find-file] <sys/time.h> RET finds the file `/usr/include/sys/time.h'. 205\\[find-file] <sys/time.h> RET finds the file `/usr/include/sys/time.h'.
206See also the variable `PC-include-file-path'." 206See also the variable `PC-include-file-path'.
207
208Partial Completion mode extends the meaning of `completion-auto-help' (which
209see) so that if it is neither nil nor t, Emacs will show the *Completions*
210buffer only on the second attempt to complete. I.e. if TAB finds nothing
211to complete, the first TAB will just say \"Next char not unique\" without
212bringing up the *Completions* buffer, and the second TAB will then bring up
213the *Completions* buffer."
207 :global t :group 'partial-completion 214 :global t :group 'partial-completion
208 ;; Deal with key bindings... 215 ;; Deal with key bindings...
209 (PC-bindings partial-completion-mode) 216 (PC-bindings partial-completion-mode)
diff --git a/lisp/custom.el b/lisp/custom.el
index 9d74335a007..0c6085c714f 100644
--- a/lisp/custom.el
+++ b/lisp/custom.el
@@ -210,12 +210,11 @@ The following keywords are meaningful:
210 item. This is a sentence containing an active field which 210 item. This is a sentence containing an active field which
211 references some other documentation. 211 references some other documentation.
212 212
213 There are three alternatives you can use for LINK-DATA: 213 There are several alternatives you can use for LINK-DATA:
214 214
215 (custom-manual INFO-NODE) 215 (custom-manual INFO-NODE)
216 Link to an Info node; INFO-NODE is a string which specifies 216 Link to an Info node; INFO-NODE is a string which specifies
217 the node name, as in \"(emacs)Top\". The link appears as 217 the node name, as in \"(emacs)Top\".
218 `[manual]' in the customization buffer.
219 218
220 (info-link INFO-NODE) 219 (info-link INFO-NODE)
221 Like `custom-manual' except that the link appears in the 220 Like `custom-manual' except that the link appears in the
@@ -223,7 +222,24 @@ The following keywords are meaningful:
223 222
224 (url-link URL) 223 (url-link URL)
225 Link to a web page; URL is a string which specifies the URL. 224 Link to a web page; URL is a string which specifies the URL.
226 The link appears in the customization buffer as URL. 225
226 (emacs-commentary-link LIBRARY)
227 Link to the commentary section of LIBRARY.
228
229 (emacs-library-link LIBRARY)
230 Link to an Emacs Lisp LIBRARY file.
231
232 (file-link FILE)
233 Link to FILE.
234
235 (function-link FUNCTION)
236 Link to the documentation of FUNCTION.
237
238 (variable-link VARIABLE)
239 Link to the documentation of VARIABLE.
240
241 (custom-group-link GROUP)
242 Link to another customization GROUP.
227 243
228 You can specify the text to use in the customization buffer by 244 You can specify the text to use in the customization buffer by
229 adding `:tag NAME' after the first element of the LINK-DATA; for 245 adding `:tag NAME' after the first element of the LINK-DATA; for
@@ -420,6 +436,7 @@ The following KEYWORDs are defined:
420 436
421Read the section about customization in the Emacs Lisp manual for more 437Read the section about customization in the Emacs Lisp manual for more
422information." 438information."
439 (declare (doc-string 3))
423 ;; It is better not to use backquote in this file, 440 ;; It is better not to use backquote in this file,
424 ;; because that makes a bootstrapping problem 441 ;; because that makes a bootstrapping problem
425 ;; if you need to recompile all the Lisp files using interpreted code. 442 ;; if you need to recompile all the Lisp files using interpreted code.
diff --git a/lisp/descr-text.el b/lisp/descr-text.el
index 5f410da17a7..547970a585b 100644
--- a/lisp/descr-text.el
+++ b/lisp/descr-text.el
@@ -458,6 +458,12 @@ as well as widgets, buttons, overlays, and text properties."
458 (multibyte-p enable-multibyte-characters) 458 (multibyte-p enable-multibyte-characters)
459 (overlays (mapcar #'(lambda (o) (overlay-properties o)) 459 (overlays (mapcar #'(lambda (o) (overlay-properties o))
460 (overlays-at pos))) 460 (overlays-at pos)))
461 (char-description (if (not multibyte-p)
462 (single-key-description char)
463 (if (< char 128)
464 (single-key-description char)
465 (string-to-multibyte
466 (char-to-string char)))))
461 item-list max-width unicode) 467 item-list max-width unicode)
462 468
463 (if (or (< char 256) 469 (if (or (< char 256)
@@ -467,13 +473,8 @@ as well as widgets, buttons, overlays, and text properties."
467 (encode-char char 'ucs)))) 473 (encode-char char 'ucs))))
468 (setq item-list 474 (setq item-list
469 `(("character" 475 `(("character"
470 ,(format "%s (0%o, %d, 0x%x%s)" 476 ,(format "%s (%d, #o%o, #x%x%s)"
471 (apply 'propertize (if (not multibyte-p) 477 (apply 'propertize char-description
472 (single-key-description char)
473 (if (< char 128)
474 (single-key-description char)
475 (string-to-multibyte
476 (char-to-string char))))
477 (text-properties-at pos)) 478 (text-properties-at pos))
478 char char char 479 char char char
479 (if unicode 480 (if unicode
@@ -510,7 +511,7 @@ as well as widgets, buttons, overlays, and text properties."
510 ,@(let ((category-set (char-category-set char))) 511 ,@(let ((category-set (char-category-set char)))
511 (if (not category-set) 512 (if (not category-set)
512 '("-- none --") 513 '("-- none --")
513 (mapcar #'(lambda (x) (format "%c:%s " 514 (mapcar #'(lambda (x) (format "%c:%s"
514 x (category-docstring x))) 515 x (category-docstring x)))
515 (category-set-mnemonics category-set))))) 516 (category-set-mnemonics category-set)))))
516 ,@(let ((props (aref char-code-property-table char)) 517 ,@(let ((props (aref char-code-property-table char))
@@ -583,7 +584,7 @@ as well as widgets, buttons, overlays, and text properties."
583 (if display 584 (if display
584 (concat 585 (concat
585 "by this font (glyph code)\n" 586 "by this font (glyph code)\n"
586 (format " %s (0x%02X)" 587 (format " %s (#x%02X)"
587 (car display) (cdr display))) 588 (car display) (cdr display)))
588 "no font available") 589 "no font available")
589 (if display 590 (if display
@@ -639,13 +640,14 @@ as well as widgets, buttons, overlays, and text properties."
639 (goto-char (point-min)) 640 (goto-char (point-min))
640 (re-search-forward "character:[ \t\n]+") 641 (re-search-forward "character:[ \t\n]+")
641 (setq pos (point))) 642 (setq pos (point)))
642 (if overlays 643 (let ((end (+ pos (length char-description))))
643 (mapc #'(lambda (props) 644 (if overlays
644 (let ((o (make-overlay pos (1+ pos)))) 645 (mapc #'(lambda (props)
645 (while props 646 (let ((o (make-overlay pos end)))
646 (overlay-put o (car props) (nth 1 props)) 647 (while props
647 (setq props (cddr props))))) 648 (overlay-put o (car props) (nth 1 props))
648 overlays)) 649 (setq props (cddr props)))))
650 overlays)))
649 651
650 (when disp-vector 652 (when disp-vector
651 (insert 653 (insert
@@ -657,7 +659,7 @@ as well as widgets, buttons, overlays, and text properties."
657 (insert (logand (car (aref disp-vector i)) #x7ffff) ?: 659 (insert (logand (car (aref disp-vector i)) #x7ffff) ?:
658 (propertize " " 'display '(space :align-to 5)) 660 (propertize " " 'display '(space :align-to 5))
659 (if (cdr (aref disp-vector i)) 661 (if (cdr (aref disp-vector i))
660 (format "%s (0x%02X)" (cadr (aref disp-vector i)) 662 (format "%s (#x%02X)" (cadr (aref disp-vector i))
661 (cddr (aref disp-vector i))) 663 (cddr (aref disp-vector i)))
662 "-- no font --") 664 "-- no font --")
663 "\n") 665 "\n")
@@ -708,7 +710,7 @@ as well as widgets, buttons, overlays, and text properties."
708 (insert "\n " (car elt) ?: 710 (insert "\n " (car elt) ?:
709 (propertize " " 'display '(space :align-to 5)) 711 (propertize " " 'display '(space :align-to 5))
710 (if (cdr elt) 712 (if (cdr elt)
711 (format "%s (0x%02X)" (cadr elt) (cddr elt)) 713 (format "%s (#x%02X)" (cadr elt) (cddr elt))
712 "-- no font --")))) 714 "-- no font --"))))
713 (insert "these terminal codes:") 715 (insert "these terminal codes:")
714 (dolist (elt component-chars) 716 (dolist (elt component-chars)
diff --git a/lisp/emacs-lisp/shadow.el b/lisp/emacs-lisp/shadow.el
index 9cea82d7780..9e68fb08967 100644
--- a/lisp/emacs-lisp/shadow.el
+++ b/lisp/emacs-lisp/shadow.el
@@ -104,7 +104,7 @@ See the documentation for `list-load-path-shadows' for further information."
104 (setq true-names (append true-names (list dir))) 104 (setq true-names (append true-names (list dir)))
105 (setq dir (directory-file-name (or (car path) "."))) 105 (setq dir (directory-file-name (or (car path) ".")))
106 (setq curr-files (if (file-accessible-directory-p dir) 106 (setq curr-files (if (file-accessible-directory-p dir)
107 (directory-files dir nil ".\\.elc?$" t))) 107 (directory-files dir nil ".\\.elc?\\(\\.gz\\)?$" t)))
108 (and curr-files 108 (and curr-files
109 (not noninteractive) 109 (not noninteractive)
110 (message "Checking %d files in %s..." (length curr-files) dir)) 110 (message "Checking %d files in %s..." (length curr-files) dir))
@@ -114,6 +114,8 @@ See the documentation for `list-load-path-shadows' for further information."
114 (while curr-files 114 (while curr-files
115 115
116 (setq file (car curr-files)) 116 (setq file (car curr-files))
117 (if (string-match "\\.gz$" file)
118 (setq file (substring file 0 -3)))
117 (setq file (substring 119 (setq file (substring
118 file 0 (if (string= (substring file -1) "c") -4 -3))) 120 file 0 (if (string= (substring file -1) "c") -4 -3)))
119 121
@@ -209,7 +211,8 @@ buffer called `*Shadows*'. Shadowings are located by calling the
209 toplevs) 211 toplevs)
210 ;; If we can find simple.el in two places, 212 ;; If we can find simple.el in two places,
211 (while tem 213 (while tem
212 (if (file-exists-p (expand-file-name "simple.el" (car tem))) 214 (if (or (file-exists-p (expand-file-name "simple.el" (car tem)))
215 (file-exists-p (expand-file-name "simple.el.gz" (car tem))))
213 (setq toplevs (cons (car tem) toplevs))) 216 (setq toplevs (cons (car tem) toplevs)))
214 (setq tem (cdr tem))) 217 (setq tem (cdr tem)))
215 (if (> (length toplevs) 1) 218 (if (> (length toplevs) 1)
diff --git a/lisp/faces.el b/lisp/faces.el
index 2437cd8caf0..d0e4162b0ec 100644
--- a/lisp/faces.el
+++ b/lisp/faces.el
@@ -357,12 +357,11 @@ If the optional argument FRAME is given, report on face FACE in that frame.
357If FRAME is t, report on the defaults for face FACE (for new frames). 357If FRAME is t, report on the defaults for face FACE (for new frames).
358If FRAME is omitted or nil, use the selected frame. 358If FRAME is omitted or nil, use the selected frame.
359 359
360If INHERIT is nil, only attributes directly defined by FACE are 360If INHERIT is nil, only attributes directly defined by FACE are considered,
361 considered, so the return value may be `unspecified', 361 so the return value may be `unspecified', or a relative value.
362 `:ignore-defface', or a relative value.
363If INHERIT is non-nil, FACE's definition of ATTRIBUTE is merged with the 362If INHERIT is non-nil, FACE's definition of ATTRIBUTE is merged with the
364 faces specified by its `:inherit' attribute; however the return value 363 faces specified by its `:inherit' attribute; however the return value
365 may still be relative. 364 may still be `unspecified' or relative.
366If INHERIT is a face or a list of faces, then the result is further merged 365If INHERIT is a face or a list of faces, then the result is further merged
367 with that face (or faces), until it becomes specified and absolute. 366 with that face (or faces), until it becomes specified and absolute.
368 367
@@ -561,13 +560,8 @@ the default for new frames (this is done automatically each time an
561attribute is changed on all frames). 560attribute is changed on all frames).
562 561
563ARGS must come in pairs ATTRIBUTE VALUE. ATTRIBUTE must be a valid 562ARGS must come in pairs ATTRIBUTE VALUE. ATTRIBUTE must be a valid
564face attribute name. 563face attribute name. All attributes can be set to `unspecified';
565 564this fact is not further mentioned below.
566Unless you're certain you know what you're doing, don't set an
567attribute to `unspecified' . To make a face ignore the attribute
568given in the defface spec, assign it the value `:ignore-defface'.
569You can do this for any attribute; this fact is not further
570mentioned below.
571 565
572The following attributes are recognized: 566The following attributes are recognized:
573 567
diff --git a/lisp/ffap.el b/lisp/ffap.el
index 6eb598d434d..ff35ae0deac 100644
--- a/lisp/ffap.el
+++ b/lisp/ffap.el
@@ -1519,7 +1519,9 @@ Applies `ffap-menu-text-plist' text properties at all matches."
1519 (let ((ffap-next-regexp (or ffap-menu-regexp ffap-next-regexp)) 1519 (let ((ffap-next-regexp (or ffap-menu-regexp ffap-next-regexp))
1520 (range (- (point-max) (point-min))) 1520 (range (- (point-max) (point-min)))
1521 (mod (buffer-modified-p)) ; was buffer modified? 1521 (mod (buffer-modified-p)) ; was buffer modified?
1522 buffer-read-only ; to set text-properties 1522 ;; inhibit-read-only works on read-only text properties
1523 ;; as well as read-only buffers.
1524 (inhibit-read-only t) ; to set text-properties
1523 item 1525 item
1524 ;; Avoid repeated searches of the *mode-alist: 1526 ;; Avoid repeated searches of the *mode-alist:
1525 (major-mode (if (assq major-mode ffap-string-at-point-mode-alist) 1527 (major-mode (if (assq major-mode ffap-string-at-point-mode-alist)
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog
index 10e5ba0dc88..b6d62bf9b83 100644
--- a/lisp/gnus/ChangeLog
+++ b/lisp/gnus/ChangeLog
@@ -1,3 +1,8 @@
12005-11-19 Chong Yidong <cyd@stupidchicken.com>
2
3 * message.el: Revert last changes.
4 (message-insert-citation-line): Use newlines.
5
12005-11-17 Chong Yidong <cyd@stupidchicken.com> 62005-11-17 Chong Yidong <cyd@stupidchicken.com>
2 7
3 * message.el (message-courtesy-message) 8 * message.el (message-courtesy-message)
diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el
index 9a5f910290a..ec420ea4b2e 100644
--- a/lisp/gnus/message.el
+++ b/lisp/gnus/message.el
@@ -141,11 +141,7 @@ mailbox format."
141 :group 'message-sending) 141 :group 'message-sending)
142 142
143(defcustom message-courtesy-message 143(defcustom message-courtesy-message
144 (concat 144 "The following message is a courtesy copy of an article\nthat has been posted to %s as well.\n\n"
145 "The following message is a courtesy copy of an article"
146 hard-newline
147 "that has been posted to %s as well."
148 hard-newline hard-newline)
149 "*This is inserted at the start of a mailed copy of a posted message. 145 "*This is inserted at the start of a mailed copy of a posted message.
150If the string contains the format spec \"%s\", the Newsgroups 146If the string contains the format spec \"%s\", the Newsgroups
151the article has been posted to will be inserted there. 147the article has been posted to will be inserted there.
@@ -343,9 +339,7 @@ few false positives here."
343;;; marking inserted text 339;;; marking inserted text
344 340
345(defcustom message-mark-insert-begin 341(defcustom message-mark-insert-begin
346 (concat 342 "--8<---------------cut here---------------start------------->8---\n"
347 "--8<---------------cut here---------------start------------->8---"
348 hard-newline)
349 "How to mark the beginning of some inserted text." 343 "How to mark the beginning of some inserted text."
350 :version "22.1" 344 :version "22.1"
351 :type 'string 345 :type 'string
@@ -353,16 +347,14 @@ few false positives here."
353 :group 'message-various) 347 :group 'message-various)
354 348
355(defcustom message-mark-insert-end 349(defcustom message-mark-insert-end
356 (concat 350 "--8<---------------cut here---------------end--------------->8---\n"
357 "--8<---------------cut here---------------end--------------->8---"
358 hard-newline)
359 "How to mark the end of some inserted text." 351 "How to mark the end of some inserted text."
360 :version "22.1" 352 :version "22.1"
361 :type 'string 353 :type 'string
362 :link '(custom-manual "(message)Insertion Variables") 354 :link '(custom-manual "(message)Insertion Variables")
363 :group 'message-various) 355 :group 'message-various)
364 356
365(defcustom message-archive-header "X-No-Archive: Yes" 357(defcustom message-archive-header "X-No-Archive: Yes\n"
366 "Header to insert when you don't want your article to be archived. 358 "Header to insert when you don't want your article to be archived.
367Archives \(such as groups.google.com\) respect this header." 359Archives \(such as groups.google.com\) respect this header."
368 :version "22.1" 360 :version "22.1"
@@ -426,8 +418,7 @@ for `message-cross-post-insert-note'."
426 :link '(custom-manual "(message)Various Message Variables") 418 :link '(custom-manual "(message)Various Message Variables")
427 :group 'message-various) 419 :group 'message-various)
428 420
429(defcustom message-elide-ellipsis 421(defcustom message-elide-ellipsis "\n[...]\n\n"
430 (concat hard-newline "[...]" hard-newline hard-newline)
431 "*The string which is inserted for elided text." 422 "*The string which is inserted for elided text."
432 :type 'string 423 :type 'string
433 :link '(custom-manual "(message)Various Commands") 424 :link '(custom-manual "(message)Various Commands")
@@ -587,8 +578,7 @@ Done before generating the new subject of a forward."
587 :link '(custom-manual "(message)Insertion Variables") 578 :link '(custom-manual "(message)Insertion Variables")
588 :type 'regexp) 579 :type 'regexp)
589 580
590(defcustom message-cancel-message 581(defcustom message-cancel-message "I am canceling my own article.\n"
591 (concat "I am canceling my own article." hard-newline)
592 "Message to be inserted in the cancel message." 582 "Message to be inserted in the cancel message."
593 :group 'message-interface 583 :group 'message-interface
594 :link '(custom-manual "(message)Canceling News") 584 :link '(custom-manual "(message)Canceling News")
@@ -1744,7 +1734,7 @@ see `message-narrow-to-headers-or-head'."
1744 (goto-char (point-max)) 1734 (goto-char (point-max))
1745 (if (string-match "\n$" (car headers)) 1735 (if (string-match "\n$" (car headers))
1746 (insert (car headers)) 1736 (insert (car headers))
1747 (insert (car headers) hard-newline))))) 1737 (insert (car headers) ?\n)))))
1748 (setq headers (cdr headers)))) 1738 (setq headers (cdr headers))))
1749 1739
1750(defmacro message-with-reply-buffer (&rest forms) 1740(defmacro message-with-reply-buffer (&rest forms)
@@ -1851,7 +1841,7 @@ Leading \"Re: \" is not stripped by this function. Use the function
1851 (insert (concat "Subject: " 1841 (insert (concat "Subject: "
1852 new-subject 1842 new-subject
1853 " (was: " 1843 " (was: "
1854 old-subject ")" hard-newline))))))))) 1844 old-subject ")\n")))))))))
1855 1845
1856(defun message-mark-inserted-region (beg end) 1846(defun message-mark-inserted-region (beg end)
1857 "Mark some region in the current article with enclosing tags. 1847 "Mark some region in the current article with enclosing tags.
@@ -1935,7 +1925,7 @@ With prefix-argument just set Follow-Up, don't cross-post."
1935 target-group 1925 target-group
1936 "[ \t]*$") 1926 "[ \t]*$")
1937 (message-fetch-field "Newsgroups"))) 1927 (message-fetch-field "Newsgroups")))
1938 (insert (concat hard-newline "Followup-To: " target-group))) 1928 (insert (concat "\nFollowup-To: " target-group)))
1939 (setq message-cross-post-old-target target-group)) 1929 (setq message-cross-post-old-target target-group))
1940 1930
1941(defun message-cross-post-insert-note (target-group cross-post in-old 1931(defun message-cross-post-insert-note (target-group cross-post in-old
@@ -1967,8 +1957,8 @@ been made to before the user asked for a Crosspost."
1967 (if (or in-old 1957 (if (or in-old
1968 (not cross-post) 1958 (not cross-post)
1969 (string-match "^[ \t]*poster[ \t]*$" target-group)) 1959 (string-match "^[ \t]*poster[ \t]*$" target-group))
1970 (insert message-followup-to-note target-group hard-newline) 1960 (insert (concat message-followup-to-note target-group "\n"))
1971 (insert message-cross-post-note target-group hard-newline)))) 1961 (insert (concat message-cross-post-note target-group "\n")))))
1972 1962
1973(defun message-cross-post-followup-to (target-group) 1963(defun message-cross-post-followup-to (target-group)
1974 "Crossposts message and set Followup-To to TARGET-GROUP. 1964 "Crossposts message and set Followup-To to TARGET-GROUP.
@@ -2028,7 +2018,7 @@ With prefix-argument just set Follow-Up, don't cross-post."
2028 (save-excursion 2018 (save-excursion
2029 (message-goto-to) 2019 (message-goto-to)
2030 (message-delete-line) 2020 (message-delete-line)
2031 (insert (concat "To: " cc-content hard-newline)) 2021 (insert (concat "To: " cc-content "\n"))
2032 (save-restriction 2022 (save-restriction
2033 (message-narrow-to-headers) 2023 (message-narrow-to-headers)
2034 (message-remove-header (if bcc 2024 (message-remove-header (if bcc
@@ -2793,7 +2783,7 @@ or in the synonym headers, defined by `message-header-synonyms'."
2793 (message-remove-header (symbol-name (car elem))) 2783 (message-remove-header (symbol-name (car elem)))
2794 (goto-char (point-min)) 2784 (goto-char (point-min))
2795 (insert (symbol-name (car elem)) ": " 2785 (insert (symbol-name (car elem)) ": "
2796 (cdr elem) hard-newline)))))) 2786 (cdr elem) "\n"))))))
2797 2787
2798(defun message-insert-newsgroups () 2788(defun message-insert-newsgroups ()
2799 "Insert the Newsgroups header from the article being replied to." 2789 "Insert the Newsgroups header from the article being replied to."
@@ -2823,7 +2813,7 @@ or in the synonym headers, defined by `message-header-synonyms'."
2823 (point) 2813 (point)
2824 (forward-line -2) 2814 (forward-line -2)
2825 (point))) 2815 (point)))
2826 (insert hard-newline) 2816 (insert "\n")
2827 (goto-char beg) 2817 (goto-char beg)
2828 (delete-region beg (progn (message-goto-body) 2818 (delete-region beg (progn (message-goto-body)
2829 (forward-line 2) 2819 (forward-line 2)
@@ -2842,7 +2832,7 @@ or in the synonym headers, defined by `message-header-synonyms'."
2842 (end-of-line -1)) 2832 (end-of-line -1))
2843 (kill-region point (point)) 2833 (kill-region point (point))
2844 (unless (bolp) 2834 (unless (bolp)
2845 (insert hard-newline)))) 2835 (insert "\n"))))
2846 2836
2847(defun message-newline-and-reformat (&optional arg not-break) 2837(defun message-newline-and-reformat (&optional arg not-break)
2848 "Insert four newlines, and then reformat if inside quoted text. 2838 "Insert four newlines, and then reformat if inside quoted text.
@@ -2984,15 +2974,15 @@ Prefix arg means justify as well."
2984 (goto-char (point-max)) 2974 (goto-char (point-max))
2985 ;; Insert the signature. 2975 ;; Insert the signature.
2986 (unless (bolp) 2976 (unless (bolp)
2987 (insert hard-newline)) 2977 (insert "\n"))
2988 (when message-signature-insert-empty-line 2978 (when message-signature-insert-empty-line
2989 (insert hard-newline)) 2979 (insert "\n"))
2990 (insert "-- " hard-newline) 2980 (insert "-- \n")
2991 (if (eq signature t) 2981 (if (eq signature t)
2992 (insert-file-contents message-signature-file) 2982 (insert-file-contents message-signature-file)
2993 (insert signature)) 2983 (insert signature))
2994 (goto-char (point-max)) 2984 (goto-char (point-max))
2995 (or (bolp) (insert hard-newline))))) 2985 (or (bolp) (insert "\n")))))
2996 2986
2997(defun message-insert-importance-high () 2987(defun message-insert-importance-high ()
2998 "Insert header to mark message as important." 2988 "Insert header to mark message as important."
@@ -3002,7 +2992,7 @@ Prefix arg means justify as well."
3002 (message-narrow-to-headers) 2992 (message-narrow-to-headers)
3003 (message-remove-header "Importance")) 2993 (message-remove-header "Importance"))
3004 (message-goto-eoh) 2994 (message-goto-eoh)
3005 (insert "Importance: high" hard-newline))) 2995 (insert "Importance: high\n")))
3006 2996
3007(defun message-insert-importance-low () 2997(defun message-insert-importance-low ()
3008 "Insert header to mark message as unimportant." 2998 "Insert header to mark message as unimportant."
@@ -3012,7 +3002,7 @@ Prefix arg means justify as well."
3012 (message-narrow-to-headers) 3002 (message-narrow-to-headers)
3013 (message-remove-header "Importance")) 3003 (message-remove-header "Importance"))
3014 (message-goto-eoh) 3004 (message-goto-eoh)
3015 (insert "Importance: low" hard-newline))) 3005 (insert "Importance: low\n")))
3016 3006
3017(defun message-insert-or-toggle-importance () 3007(defun message-insert-or-toggle-importance ()
3018 "Insert a \"Importance: high\" header, or cycle through the header values. 3008 "Insert a \"Importance: high\" header, or cycle through the header values.
@@ -3034,7 +3024,7 @@ and `low'."
3034 (t 3024 (t
3035 "high"))))) 3025 "high")))))
3036 (message-goto-eoh) 3026 (message-goto-eoh)
3037 (insert (format "Importance: %s" new) hard-newline)))) 3027 (insert (format "Importance: %s\n" new)))))
3038 3028
3039(defun message-insert-disposition-notification-to () 3029(defun message-insert-disposition-notification-to ()
3040 "Request a disposition notification (return receipt) to this message. 3030 "Request a disposition notification (return receipt) to this message.
@@ -3045,11 +3035,10 @@ Note that this should not be used in newsgroups."
3045 (message-narrow-to-headers) 3035 (message-narrow-to-headers)
3046 (message-remove-header "Disposition-Notification-To")) 3036 (message-remove-header "Disposition-Notification-To"))
3047 (message-goto-eoh) 3037 (message-goto-eoh)
3048 (insert (format "Disposition-Notification-To: %s" 3038 (insert (format "Disposition-Notification-To: %s\n"
3049 (or (message-field-value "Reply-to") 3039 (or (message-field-value "Reply-to")
3050 (message-field-value "From") 3040 (message-field-value "From")
3051 (message-make-from))) 3041 (message-make-from))))))
3052 hard-newline)))
3053 3042
3054(defun message-elide-region (b e) 3043(defun message-elide-region (b e)
3055 "Elide the text in the region. 3044 "Elide the text in the region.
@@ -3184,7 +3173,7 @@ However, if `message-yank-prefix' is non-nil, insert that prefix on each line."
3184 ;; Delete blank lines at the end of the buffer. 3173 ;; Delete blank lines at the end of the buffer.
3185 (goto-char (point-max)) 3174 (goto-char (point-max))
3186 (unless (eolp) 3175 (unless (eolp)
3187 (insert hard-newline)) 3176 (insert "\n"))
3188 (while (and (zerop (forward-line -1)) 3177 (while (and (zerop (forward-line -1))
3189 (looking-at "$")) 3178 (looking-at "$"))
3190 (message-delete-line)) 3179 (message-delete-line))
@@ -3222,7 +3211,7 @@ prefix, and don't delete any headers."
3222 (funcall message-cite-function)) 3211 (funcall message-cite-function))
3223 (message-exchange-point-and-mark) 3212 (message-exchange-point-and-mark)
3224 (unless (bolp) 3213 (unless (bolp)
3225 (insert hard-newline)) 3214 (insert ?\n))
3226 (unless modified 3215 (unless modified
3227 (setq message-checksum (message-checksum)))))) 3216 (setq message-checksum (message-checksum))))))
3228 3217
@@ -3280,13 +3269,13 @@ prefix, and don't delete any headers."
3280 (delete-region (point) end) 3269 (delete-region (point) end)
3281 (unless (search-backward "\n\n" start t) 3270 (unless (search-backward "\n\n" start t)
3282 ;; Insert a blank line if it is peeled off. 3271 ;; Insert a blank line if it is peeled off.
3283 (insert hard-newline))) 3272 (insert "\n")))
3284 (goto-char start) 3273 (goto-char start)
3285 (while functions 3274 (while functions
3286 (funcall (pop functions))) 3275 (funcall (pop functions)))
3287 (when message-citation-line-function 3276 (when message-citation-line-function
3288 (unless (bolp) 3277 (unless (bolp)
3289 (insert hard-newline)) 3278 (insert "\n"))
3290 (funcall message-citation-line-function)))) 3279 (funcall message-citation-line-function))))
3291 3280
3292(eval-when-compile (defvar mail-citation-hook)) ;Compiler directive 3281(eval-when-compile (defvar mail-citation-hook)) ;Compiler directive
@@ -3322,14 +3311,15 @@ prefix, and don't delete any headers."
3322 (funcall (pop functions))) 3311 (funcall (pop functions)))
3323 (when message-citation-line-function 3312 (when message-citation-line-function
3324 (unless (bolp) 3313 (unless (bolp)
3325 (insert hard-newline)) 3314 (insert "\n"))
3326 (funcall message-citation-line-function))))) 3315 (funcall message-citation-line-function)))))
3327 3316
3328(defun message-insert-citation-line () 3317(defun message-insert-citation-line ()
3329 "Insert a simple citation line." 3318 "Insert a simple citation line."
3330 (when message-reply-headers 3319 (when message-reply-headers
3331 (insert (mail-header-from message-reply-headers) 3320 (insert (mail-header-from message-reply-headers) " writes:")
3332 " writes:" hard-newline hard-newline))) 3321 (newline)
3322 (newline)))
3333 3323
3334(defun message-position-on-field (header &rest afters) 3324(defun message-position-on-field (header &rest afters)
3335 (let ((case-fold-search t)) 3325 (let ((case-fold-search t))
@@ -3355,7 +3345,7 @@ prefix, and don't delete any headers."
3355 (when afters 3345 (when afters
3356 (re-search-forward "^[^ \t]" nil 'move) 3346 (re-search-forward "^[^ \t]" nil 'move)
3357 (beginning-of-line)) 3347 (beginning-of-line))
3358 (insert header ": " hard-newline) 3348 (insert header ": \n")
3359 (forward-char -1) 3349 (forward-char -1)
3360 nil)))) 3350 nil))))
3361 3351
@@ -3551,7 +3541,7 @@ It should typically alter the sending method in some way or other."
3551 ;; Make sure there's a newline at the end of the message. 3541 ;; Make sure there's a newline at the end of the message.
3552 (goto-char (point-max)) 3542 (goto-char (point-max))
3553 (unless (bolp) 3543 (unless (bolp)
3554 (insert hard-newline)) 3544 (insert "\n"))
3555 ;; Make the hidden headers visible. 3545 ;; Make the hidden headers visible.
3556 (let ((points (message-text-with-property 'message-hidden))) 3546 (let ((points (message-text-with-property 'message-hidden)))
3557 (when points 3547 (when points
@@ -3656,7 +3646,7 @@ It should typically alter the sending method in some way or other."
3656 (goto-char (point-min)) 3646 (goto-char (point-min))
3657 (re-search-forward 3647 (re-search-forward
3658 (concat "^" (regexp-quote mail-header-separator) "\n")) 3648 (concat "^" (regexp-quote mail-header-separator) "\n"))
3659 (replace-match hard-newline) 3649 (replace-match "\n")
3660 (run-hooks 'message-send-mail-hook) 3650 (run-hooks 'message-send-mail-hook)
3661 (let ((p (goto-char (point-min))) 3651 (let ((p (goto-char (point-min)))
3662 (tembuf (message-generate-new-buffer-clone-locals " message temp")) 3652 (tembuf (message-generate-new-buffer-clone-locals " message temp"))
@@ -3698,18 +3688,17 @@ It should typically alter the sending method in some way or other."
3698 (message-remove-header "Message-ID") 3688 (message-remove-header "Message-ID")
3699 (message-remove-header "Lines") 3689 (message-remove-header "Lines")
3700 (goto-char (point-max)) 3690 (goto-char (point-max))
3701 (insert "Mime-Version: 1.0" hard-newline) 3691 (insert "Mime-Version: 1.0\n")
3702 (setq header (buffer-string))) 3692 (setq header (buffer-string)))
3703 (goto-char (point-max)) 3693 (goto-char (point-max))
3704 (insert (format "Content-Type: message/partial; id=\"%s\"; number=%d; total=%d" 3694 (insert (format "Content-Type: message/partial; id=\"%s\"; number=%d; total=%d\n\n"
3705 id n total) 3695 id n total))
3706 hard-newline hard-newline)
3707 (forward-char -1) 3696 (forward-char -1)
3708 (let ((mail-header-separator "")) 3697 (let ((mail-header-separator ""))
3709 (when (memq 'Message-ID message-required-mail-headers) 3698 (when (memq 'Message-ID message-required-mail-headers)
3710 (insert "Message-ID: " (message-make-message-id) hard-newline)) 3699 (insert "Message-ID: " (message-make-message-id) "\n"))
3711 (when (memq 'Lines message-required-mail-headers) 3700 (when (memq 'Lines message-required-mail-headers)
3712 (insert "Lines: " (message-make-lines) hard-newline)) 3701 (insert "Lines: " (message-make-lines) "\n"))
3713 (message-goto-subject) 3702 (message-goto-subject)
3714 (end-of-line) 3703 (end-of-line)
3715 (insert (format " (%d/%d)" n total)) 3704 (insert (format " (%d/%d)" n total))
@@ -3774,7 +3763,7 @@ It should typically alter the sending method in some way or other."
3774 (goto-char (point-max)) 3763 (goto-char (point-max))
3775 ;; require one newline at the end. 3764 ;; require one newline at the end.
3776 (or (= (preceding-char) ?\n) 3765 (or (= (preceding-char) ?\n)
3777 (insert hard-newline)) 3766 (insert ?\n))
3778 (message-cleanup-headers) 3767 (message-cleanup-headers)
3779 ;; FIXME: we're inserting the courtesy copy after encoding. 3768 ;; FIXME: we're inserting the courtesy copy after encoding.
3780 ;; This is wrong if the courtesy copy string contains 3769 ;; This is wrong if the courtesy copy string contains
@@ -3850,7 +3839,7 @@ If you always want Gnus to send messages in one piece, set
3850 (goto-char (point-min)) 3839 (goto-char (point-min))
3851 (re-search-forward 3840 (re-search-forward
3852 (concat "^" (regexp-quote mail-header-separator) "\n")) 3841 (concat "^" (regexp-quote mail-header-separator) "\n"))
3853 (replace-match hard-newline) 3842 (replace-match "\n")
3854 (backward-char 1) 3843 (backward-char 1)
3855 (setq delimline (point-marker)) 3844 (setq delimline (point-marker))
3856 (run-hooks 'message-send-mail-hook) 3845 (run-hooks 'message-send-mail-hook)
@@ -3912,7 +3901,7 @@ to find out how to use this."
3912 (goto-char (point-min)) 3901 (goto-char (point-min))
3913 (re-search-forward 3902 (re-search-forward
3914 (concat "^" (regexp-quote mail-header-separator) "\n")) 3903 (concat "^" (regexp-quote mail-header-separator) "\n"))
3915 (replace-match hard-newline) 3904 (replace-match "\n")
3916 (run-hooks 'message-send-mail-hook) 3905 (run-hooks 'message-send-mail-hook)
3917 ;; send the message 3906 ;; send the message
3918 (case 3907 (case
@@ -4080,13 +4069,13 @@ Otherwise, generate and save a value for `canlock-password' first."
4080 (goto-char (point-max)) 4069 (goto-char (point-max))
4081 ;; require one newline at the end. 4070 ;; require one newline at the end.
4082 (or (= (preceding-char) ?\n) 4071 (or (= (preceding-char) ?\n)
4083 (insert hard-newline)) 4072 (insert ?\n))
4084 (let ((case-fold-search t)) 4073 (let ((case-fold-search t))
4085 ;; Remove the delimiter. 4074 ;; Remove the delimiter.
4086 (goto-char (point-min)) 4075 (goto-char (point-min))
4087 (re-search-forward 4076 (re-search-forward
4088 (concat "^" (regexp-quote mail-header-separator) "\n")) 4077 (concat "^" (regexp-quote mail-header-separator) "\n"))
4089 (replace-match hard-newline) 4078 (replace-match "\n")
4090 (backward-char 1)) 4079 (backward-char 1))
4091 (run-hooks 'message-send-news-hook) 4080 (run-hooks 'message-send-news-hook)
4092 (gnus-open-server method) 4081 (gnus-open-server method)
@@ -4213,7 +4202,7 @@ Otherwise, generate and save a value for `canlock-password' first."
4213 (message-tokenize-header 4202 (message-tokenize-header
4214 newsgroups))))))))) 4203 newsgroups)))))))))
4215 (goto-char (point-min)) 4204 (goto-char (point-min))
4216 (insert "Followup-To: " to hard-newline)) 4205 (insert "Followup-To: " to "\n"))
4217 t)) 4206 t))
4218 ;; Check "Shoot me". 4207 ;; Check "Shoot me".
4219 (message-check 'shoot 4208 (message-check 'shoot
@@ -5112,7 +5101,7 @@ Headers already prepared in the buffer are not modified."
5112 ;; We check whether the value was ended by a 5101 ;; We check whether the value was ended by a
5113 ;; newline. If now, we insert one. 5102 ;; newline. If now, we insert one.
5114 (unless (bolp) 5103 (unless (bolp)
5115 (insert hard-newline)) 5104 (insert "\n"))
5116 (forward-line -1))) 5105 (forward-line -1)))
5117 ;; The value of this header was empty, so we clear 5106 ;; The value of this header was empty, so we clear
5118 ;; totally and insert the new value. 5107 ;; totally and insert the new value.
@@ -5152,7 +5141,7 @@ Headers already prepared in the buffer are not modified."
5152 (beginning-of-line)) 5141 (beginning-of-line))
5153 (when (or (message-news-p) 5142 (when (or (message-news-p)
5154 (string-match "@.+\\.." secure-sender)) 5143 (string-match "@.+\\.." secure-sender))
5155 (insert "Sender: " secure-sender hard-newline)))) 5144 (insert "Sender: " secure-sender "\n"))))
5156 ;; Check for IDNA 5145 ;; Check for IDNA
5157 (message-idna-to-ascii-rhs)))) 5146 (message-idna-to-ascii-rhs))))
5158 5147
@@ -5164,7 +5153,7 @@ Headers already prepared in the buffer are not modified."
5164 (message-narrow-to-headers) 5153 (message-narrow-to-headers)
5165 (when (setq newsgroups (message-fetch-field "newsgroups")) 5154 (when (setq newsgroups (message-fetch-field "newsgroups"))
5166 (goto-char (point-max)) 5155 (goto-char (point-max))
5167 (insert "Posted-To: " newsgroups hard-newline))) 5156 (insert "Posted-To: " newsgroups "\n")))
5168 (forward-line 1) 5157 (forward-line 1)
5169 (when message-courtesy-message 5158 (when message-courtesy-message
5170 (cond 5159 (cond
@@ -5183,7 +5172,7 @@ Headers already prepared in the buffer are not modified."
5183 (insert (capitalize (symbol-name header)) 5172 (insert (capitalize (symbol-name header))
5184 ": " 5173 ": "
5185 (if (consp value) (car value) value) 5174 (if (consp value) (car value) value)
5186 hard-newline) 5175 "\n")
5187 (narrow-to-region (point-min) (1- (point-max))) 5176 (narrow-to-region (point-min) (1- (point-max)))
5188 (let (quoted last) 5177 (let (quoted last)
5189 (goto-char (point-min)) 5178 (goto-char (point-min))
@@ -5197,7 +5186,7 @@ Headers already prepared in the buffer are not modified."
5197 (progn 5186 (progn
5198 (save-excursion 5187 (save-excursion
5199 (goto-char last) 5188 (goto-char last)
5200 (insert hard-newline "\t")) 5189 (insert "\n\t"))
5201 (setq last (1+ (point)))) 5190 (setq last (1+ (point))))
5202 (setq last (1+ (point))))) 5191 (setq last (1+ (point)))))
5203 (setq quoted (not quoted))) 5192 (setq quoted (not quoted)))
@@ -5223,7 +5212,7 @@ If the current line has `message-yank-prefix', insert it on the new line."
5223 (insert (capitalize (symbol-name header)) 5212 (insert (capitalize (symbol-name header))
5224 ": " 5213 ": "
5225 (if (consp value) (car value) value) 5214 (if (consp value) (car value) value)
5226 hard-newline) 5215 "\n")
5227 (save-restriction 5216 (save-restriction
5228 (narrow-to-region begin (point)) 5217 (narrow-to-region begin (point))
5229 (fill-region-as-paragraph begin (point)) 5218 (fill-region-as-paragraph begin (point))
@@ -5292,7 +5281,7 @@ than 988 characters long, and if they are not, trim them until they are."
5292 (let ((refstring (mapconcat #'identity refs " "))) 5281 (let ((refstring (mapconcat #'identity refs " ")))
5293 (if (and message-this-is-news message-cater-to-broken-inn) 5282 (if (and message-this-is-news message-cater-to-broken-inn)
5294 (insert (capitalize (symbol-name header)) ": " 5283 (insert (capitalize (symbol-name header)) ": "
5295 refstring hard-newline) 5284 refstring "\n")
5296 (message-fill-header header refstring))))) 5285 (message-fill-header header refstring)))))
5297 5286
5298(defun message-position-point () 5287(defun message-position-point ()
@@ -5521,18 +5510,18 @@ are not included."
5521 (delete-region (point) (progn (forward-line -1) (point))) 5510 (delete-region (point) (progn (forward-line -1) (point)))
5522 (when message-default-headers 5511 (when message-default-headers
5523 (insert message-default-headers) 5512 (insert message-default-headers)
5524 (or (bolp) (insert hard-newline))) 5513 (or (bolp) (insert ?\n)))
5525 (put-text-property 5514 (put-text-property
5526 (point) 5515 (point)
5527 (progn 5516 (progn
5528 (insert mail-header-separator hard-newline) 5517 (insert mail-header-separator "\n")
5529 (1- (point))) 5518 (1- (point)))
5530 'read-only nil) 5519 'read-only nil)
5531 (forward-line -1) 5520 (forward-line -1)
5532 (when (message-news-p) 5521 (when (message-news-p)
5533 (when message-default-news-headers 5522 (when message-default-news-headers
5534 (insert message-default-news-headers) 5523 (insert message-default-news-headers)
5535 (or (bolp) (insert hard-newline))) 5524 (or (bolp) (insert ?\n)))
5536 (when message-generate-headers-first 5525 (when message-generate-headers-first
5537 (message-generate-headers 5526 (message-generate-headers
5538 (message-headers-to-generate 5527 (message-headers-to-generate
@@ -5543,7 +5532,7 @@ are not included."
5543 (when (message-mail-p) 5532 (when (message-mail-p)
5544 (when message-default-mail-headers 5533 (when message-default-mail-headers
5545 (insert message-default-mail-headers) 5534 (insert message-default-mail-headers)
5546 (or (bolp) (insert hard-newline))) 5535 (or (bolp) (insert ?\n)))
5547 (save-restriction 5536 (save-restriction
5548 (message-narrow-to-headers) 5537 (message-narrow-to-headers)
5549 (if message-alternative-emails 5538 (if message-alternative-emails
@@ -6025,14 +6014,14 @@ If ARG, allow editing of the cancellation message."
6025 (message-news) 6014 (message-news)
6026 (setq buf (set-buffer (get-buffer-create " *message cancel*")))) 6015 (setq buf (set-buffer (get-buffer-create " *message cancel*"))))
6027 (erase-buffer) 6016 (erase-buffer)
6028 (insert "Newsgroups: " newsgroups hard-newline 6017 (insert "Newsgroups: " newsgroups "\n"
6029 "From: " from hard-newline 6018 "From: " from "\n"
6030 "Subject: cmsg cancel " message-id hard-newline 6019 "Subject: cmsg cancel " message-id "\n"
6031 "Control: cancel " message-id hard-newline 6020 "Control: cancel " message-id "\n"
6032 (if distribution 6021 (if distribution
6033 (concat "Distribution: " distribution hard-newline) 6022 (concat "Distribution: " distribution "\n")
6034 "") 6023 "")
6035 mail-header-separator hard-newline 6024 mail-header-separator "\n"
6036 message-cancel-message) 6025 message-cancel-message)
6037 (run-hooks 'message-cancel-hook) 6026 (run-hooks 'message-cancel-hook)
6038 (unless arg 6027 (unless arg
@@ -6221,9 +6210,7 @@ Optional DIGEST will use digest to forward."
6221 6210
6222(defun message-forward-make-body-plain (forward-buffer) 6211(defun message-forward-make-body-plain (forward-buffer)
6223 (insert 6212 (insert
6224 hard-newline 6213 "\n-------------------- Start of forwarded message --------------------\n")
6225 "-------------------- Start of forwarded message --------------------"
6226 hard-newline)
6227 (let ((b (point)) e) 6214 (let ((b (point)) e)
6228 (insert 6215 (insert
6229 (with-temp-buffer 6216 (with-temp-buffer
@@ -6239,9 +6226,7 @@ Optional DIGEST will use digest to forward."
6239 (buffer-string))) 6226 (buffer-string)))
6240 (setq e (point)) 6227 (setq e (point))
6241 (insert 6228 (insert
6242 hard-newline 6229 "\n-------------------- End of forwarded message --------------------\n")
6243 "-------------------- End of forwarded message --------------------"
6244 hard-newline)
6245 (when message-forward-ignored-headers 6230 (when message-forward-ignored-headers
6246 (save-restriction 6231 (save-restriction
6247 (narrow-to-region b e) 6232 (narrow-to-region b e)
@@ -6251,10 +6236,7 @@ Optional DIGEST will use digest to forward."
6251 (message-remove-header message-forward-ignored-headers t))))) 6236 (message-remove-header message-forward-ignored-headers t)))))
6252 6237
6253(defun message-forward-make-body-mime (forward-buffer) 6238(defun message-forward-make-body-mime (forward-buffer)
6254 (insert 6239 (insert "\n\n<#part type=message/rfc822 disposition=inline raw=t>\n")
6255 hard-newline hard-newline
6256 "<#part type=message/rfc822 disposition=inline raw=t>"
6257 hard-newline)
6258 (let ((b (point)) e) 6240 (let ((b (point)) e)
6259 (save-restriction 6241 (save-restriction
6260 (narrow-to-region (point) (point)) 6242 (narrow-to-region (point) (point))
@@ -6264,13 +6246,10 @@ Optional DIGEST will use digest to forward."
6264 (replace-match "X-From-Line: ")) 6246 (replace-match "X-From-Line: "))
6265 (goto-char (point-max))) 6247 (goto-char (point-max)))
6266 (setq e (point)) 6248 (setq e (point))
6267 (insert "<#/part>" hard-newline))) 6249 (insert "<#/part>\n")))
6268 6250
6269(defun message-forward-make-body-mml (forward-buffer) 6251(defun message-forward-make-body-mml (forward-buffer)
6270 (insert 6252 (insert "\n\n<#mml type=message/rfc822 disposition=inline>\n")
6271 hard-newline hard-newline
6272 "<#mml type=message/rfc822 disposition=inline>"
6273 hard-newline)
6274 (let ((b (point)) e) 6253 (let ((b (point)) e)
6275 (if (not message-forward-decoded-p) 6254 (if (not message-forward-decoded-p)
6276 (insert 6255 (insert
@@ -6293,7 +6272,7 @@ Optional DIGEST will use digest to forward."
6293 (replace-match "X-From-Line: ")) 6272 (replace-match "X-From-Line: "))
6294 (goto-char (point-max)))) 6273 (goto-char (point-max))))
6295 (setq e (point)) 6274 (setq e (point))
6296 (insert "<#/mml>" hard-newline) 6275 (insert "<#/mml>\n")
6297 (when (and (not message-forward-decoded-p) 6276 (when (and (not message-forward-decoded-p)
6298 message-forward-ignored-headers) 6277 message-forward-ignored-headers)
6299 (save-restriction 6278 (save-restriction
@@ -6305,23 +6284,19 @@ Optional DIGEST will use digest to forward."
6305 6284
6306(defun message-forward-make-body-digest-plain (forward-buffer) 6285(defun message-forward-make-body-digest-plain (forward-buffer)
6307 (insert 6286 (insert
6308 hard-newline 6287 "\n-------------------- Start of forwarded message --------------------\n")
6309 "-------------------- Start of forwarded message --------------------"
6310 hard-newline)
6311 (let ((b (point)) e) 6288 (let ((b (point)) e)
6312 (mml-insert-buffer forward-buffer) 6289 (mml-insert-buffer forward-buffer)
6313 (setq e (point)) 6290 (setq e (point))
6314 (insert 6291 (insert
6315 hard-newline 6292 "\n-------------------- End of forwarded message --------------------\n")))
6316 "-------------------- End of forwarded message --------------------"
6317 hard-newline)))
6318 6293
6319(defun message-forward-make-body-digest-mime (forward-buffer) 6294(defun message-forward-make-body-digest-mime (forward-buffer)
6320 (insert hard-newline "<#multipart type=digest>" hard-newline) 6295 (insert "\n<#multipart type=digest>\n")
6321 (let ((b (point)) e) 6296 (let ((b (point)) e)
6322 (insert-buffer-substring forward-buffer) 6297 (insert-buffer-substring forward-buffer)
6323 (setq e (point)) 6298 (setq e (point))
6324 (insert "<#/multipart>" hard-newline) 6299 (insert "<#/multipart>\n")
6325 (save-restriction 6300 (save-restriction
6326 (narrow-to-region b e) 6301 (narrow-to-region b e)
6327 (goto-char b) 6302 (goto-char b)
@@ -6826,7 +6801,7 @@ regexp VARSTR."
6826 (message-narrow-to-headers-or-head) 6801 (message-narrow-to-headers-or-head)
6827 (message-remove-header "Mime-Version") 6802 (message-remove-header "Mime-Version")
6828 (goto-char (point-max)) 6803 (goto-char (point-max))
6829 (insert "MIME-Version: 1.0" hard-newline) 6804 (insert "MIME-Version: 1.0\n")
6830 (when lines 6805 (when lines
6831 (insert lines)) 6806 (insert lines))
6832 (setq content-type-p 6807 (setq content-type-p
@@ -6846,7 +6821,7 @@ regexp VARSTR."
6846 ;; For unknown reason, MIME-Version doesn't exist. 6821 ;; For unknown reason, MIME-Version doesn't exist.
6847 (when (re-search-forward "^MIME-Version:" nil t) 6822 (when (re-search-forward "^MIME-Version:" nil t)
6848 (forward-line 1) 6823 (forward-line 1)
6849 (insert "Content-Type: text/plain; charset=us-ascii" hard-newline)))))) 6824 (insert "Content-Type: text/plain; charset=us-ascii\n"))))))
6850 6825
6851(defun message-read-from-minibuffer (prompt &optional initial-contents) 6826(defun message-read-from-minibuffer (prompt &optional initial-contents)
6852 "Read from the minibuffer while providing abbrev expansion." 6827 "Read from the minibuffer while providing abbrev expansion."
@@ -6875,7 +6850,7 @@ regexp VARSTR."
6875 (pop emails)) 6850 (pop emails))
6876 (unless (or (not email) (equal email user-mail-address)) 6851 (unless (or (not email) (equal email user-mail-address))
6877 (goto-char (point-max)) 6852 (goto-char (point-max))
6878 (insert "From: " email hard-newline)))) 6853 (insert "From: " email "\n"))))
6879 6854
6880(defun message-options-get (symbol) 6855(defun message-options-get (symbol)
6881 (cdr (assq symbol message-options))) 6856 (cdr (assq symbol message-options)))
diff --git a/lisp/international/mule-cmds.el b/lisp/international/mule-cmds.el
index 0de1777f6cb..712728fcd2a 100644
--- a/lisp/international/mule-cmds.el
+++ b/lisp/international/mule-cmds.el
@@ -2659,8 +2659,8 @@ It can be retrieved with `(get-char-code-property CHAR PROPNAME)'."
2659 (if (and coding-system (eq (coding-system-type coding-system) 2)) 2659 (if (and coding-system (eq (coding-system-type coding-system) 2))
2660 ;; Try to get a pretty description for ISO 2022 escape sequences. 2660 ;; Try to get a pretty description for ISO 2022 escape sequences.
2661 (function (lambda (x) (or (cdr (assq x iso-2022-control-alist)) 2661 (function (lambda (x) (or (cdr (assq x iso-2022-control-alist))
2662 (format "0x%02X" x)))) 2662 (format "#x%02X" x))))
2663 (function (lambda (x) (format "0x%02X" x)))) 2663 (function (lambda (x) (format "#x%02X" x))))
2664 str " ")) 2664 str " "))
2665 2665
2666(defun encode-coding-char (char coding-system) 2666(defun encode-coding-char (char coding-system)
diff --git a/lisp/longlines.el b/lisp/longlines.el
index 4ee85d646e5..93f3daa4ee8 100644
--- a/lisp/longlines.el
+++ b/lisp/longlines.el
@@ -108,6 +108,7 @@ are indicated with a symbol."
108 (set (make-local-variable 'require-final-newline) nil) 108 (set (make-local-variable 'require-final-newline) nil)
109 (add-to-list 'buffer-file-format 'longlines) 109 (add-to-list 'buffer-file-format 'longlines)
110 (add-hook 'change-major-mode-hook 'longlines-mode-off nil t) 110 (add-hook 'change-major-mode-hook 'longlines-mode-off nil t)
111 (add-hook 'before-revert-hook 'longlines-before-revert-hook nil t)
111 (make-local-variable 'buffer-substring-filters) 112 (make-local-variable 'buffer-substring-filters)
112 (set (make-local-variable 'isearch-search-fun-function) 113 (set (make-local-variable 'isearch-search-fun-function)
113 'longlinges-search-function) 114 'longlinges-search-function)
@@ -126,12 +127,27 @@ are indicated with a symbol."
126 ;; longlines-wrap-lines that we'll never encounter from here 127 ;; longlines-wrap-lines that we'll never encounter from here
127 (save-restriction 128 (save-restriction
128 (widen) 129 (widen)
129 (longlines-decode-region (point-min) (point-max))) 130 (longlines-decode-buffer))
130 (longlines-wrap-region (point-min) (point-max)) 131 (longlines-wrap-region (point-min) (point-max))
131 (set-buffer-modified-p mod)) 132 (set-buffer-modified-p mod))
132 (when (and longlines-show-hard-newlines 133 (when (and longlines-show-hard-newlines
133 (not longlines-showing)) 134 (not longlines-showing))
134 (longlines-show-hard-newlines)) 135 (longlines-show-hard-newlines))
136
137 ;; Hacks to make longlines play nice with various modes.
138 (cond ((eq major-mode 'mail-mode)
139 (or mail-citation-hook
140 (add-hook 'mail-citation-hook 'mail-indent-citation nil t))
141 (add-hook 'mail-citation-hook 'longlines-decode-region nil t))
142 ((eq major-mode 'message-mode)
143 (add-hook 'message-setup-hook 'longlines-decode-buffer nil t)
144 (make-local-variable 'message-indent-citation-function)
145 (if (not (listp message-indent-citation-function))
146 (setq message-indent-citation-function
147 (list message-indent-citation-function)))
148 (add-to-list 'message-indent-citation-function
149 'longlines-decode-region t)))
150
135 (when longlines-auto-wrap 151 (when longlines-auto-wrap
136 (auto-fill-mode 0) 152 (auto-fill-mode 0)
137 (add-hook 'after-change-functions 153 (add-hook 'after-change-functions
@@ -152,6 +168,7 @@ are indicated with a symbol."
152 (remove-hook 'before-kill-functions 'longlines-encode-region t) 168 (remove-hook 'before-kill-functions 'longlines-encode-region t)
153 (remove-hook 'after-change-functions 'longlines-after-change-function t) 169 (remove-hook 'after-change-functions 'longlines-after-change-function t)
154 (remove-hook 'post-command-hook 'longlines-post-command-function t) 170 (remove-hook 'post-command-hook 'longlines-post-command-function t)
171 (remove-hook 'before-revert-hook 'longlines-before-revert-hook t)
155 (remove-hook 'window-configuration-change-hook 172 (remove-hook 'window-configuration-change-hook
156 'longlines-window-change-function t) 173 'longlines-window-change-function t)
157 (when longlines-wrap-follows-window-size 174 (when longlines-wrap-follows-window-size
@@ -222,9 +239,10 @@ end of the buffer."
222If wrapping is performed, point remains on the line. If the line does 239If wrapping is performed, point remains on the line. If the line does
223not need to be wrapped, move point to the next line and return t." 240not need to be wrapped, move point to the next line and return t."
224 (if (longlines-set-breakpoint) 241 (if (longlines-set-breakpoint)
225 (progn (backward-char 1) 242 (progn (insert-before-markers ?\n)
226 (delete-char 1) 243 (backward-char 1)
227 (insert-char ?\n 1) 244 (delete-char -1)
245 (forward-char 1)
228 nil) 246 nil)
229 (if (longlines-merge-lines-p) 247 (if (longlines-merge-lines-p)
230 (progn (end-of-line) 248 (progn (end-of-line)
@@ -298,14 +316,21 @@ Otherwise, return nil. Text cannot be moved across hard newlines."
298 (1+ (current-column))) 316 (1+ (current-column)))
299 space)))))) 317 space))))))
300 318
301(defun longlines-decode-region (beg end) 319(defun longlines-decode-region (&optional beg end)
302 "Turn all newlines between BEG and END into hard newlines." 320 "Turn all newlines between BEG and END into hard newlines.
321If BEG and END are nil, the point and mark are used."
322 (if (null beg) (setq beg (point)))
323 (if (null end) (setq end (mark t)))
303 (save-excursion 324 (save-excursion
304 (goto-char (min beg end)) 325 (goto-char (min beg end))
305 (while (search-forward "\n" (max beg end) t) 326 (while (search-forward "\n" (max beg end) t)
306 (set-hard-newline-properties 327 (set-hard-newline-properties
307 (match-beginning 0) (match-end 0))))) 328 (match-beginning 0) (match-end 0)))))
308 329
330(defun longlines-decode-buffer ()
331 "Turn all newlines in the buffer into hard newlines."
332 (longlines-decode-region (point-min) (point-max)))
333
309(defun longlines-encode-region (beg end &optional buffer) 334(defun longlines-encode-region (beg end &optional buffer)
310 "Replace each soft newline between BEG and END with exactly one space. 335 "Replace each soft newline between BEG and END with exactly one space.
311Hard newlines are left intact. The optional argument BUFFER exists for 336Hard newlines are left intact. The optional argument BUFFER exists for
@@ -413,10 +438,18 @@ This is called by `window-size-change-functions'."
413 438
414;; Loading and saving 439;; Loading and saving
415 440
441(defun longlines-before-revert-hook ()
442 (add-hook 'after-revert-hook 'longlines-after-revert-hook nil t)
443 (longlines-mode 0))
444
445(defun longlines-after-revert-hook ()
446 (remove-hook 'after-revert-hook 'longlines-after-revert-hook t)
447 (longlines-mode 1))
448
416(add-to-list 449(add-to-list
417 'format-alist 450 'format-alist
418 (list 'longlines "Automatically wrap long lines." nil 451 (list 'longlines "Automatically wrap long lines." nil nil
419 'longlines-decode-region 'longlines-encode-region t nil)) 452 'longlines-encode-region t nil))
420 453
421(provide 'longlines) 454(provide 'longlines)
422 455
diff --git a/lisp/ls-lisp.el b/lisp/ls-lisp.el
index feadbb5e2be..5f5a53b0df0 100644
--- a/lisp/ls-lisp.el
+++ b/lisp/ls-lisp.el
@@ -588,11 +588,11 @@ All ls time options, namely c, t and u, are handled."
588(defun ls-lisp-format-file-size (file-size human-readable) 588(defun ls-lisp-format-file-size (file-size human-readable)
589 (if (or (not human-readable) 589 (if (or (not human-readable)
590 (< file-size 1024)) 590 (< file-size 1024))
591 (format (if (floatp file-size) " %8.0f" " %8d") file-size) 591 (format (if (floatp file-size) " %9.0f" " %9d") file-size)
592 (do ((file-size (/ file-size 1024.0) (/ file-size 1024.0)) 592 (do ((file-size (/ file-size 1024.0) (/ file-size 1024.0))
593 ;; kilo, mega, giga, tera, peta, exa 593 ;; kilo, mega, giga, tera, peta, exa
594 (post-fixes (list "k" "M" "G" "T" "P" "E") (cdr post-fixes))) 594 (post-fixes (list "k" "M" "G" "T" "P" "E") (cdr post-fixes)))
595 ((< file-size 1024) (format " %7.0f%s" file-size (car post-fixes)))))) 595 ((< file-size 1024) (format " %8.0f%s" file-size (car post-fixes))))))
596 596
597(provide 'ls-lisp) 597(provide 'ls-lisp)
598 598
diff --git a/lisp/man.el b/lisp/man.el
index 5b5096f157d..52645db16f5 100644
--- a/lisp/man.el
+++ b/lisp/man.el
@@ -919,35 +919,30 @@ Same for the ANSI bold and normal escape sequences."
919(defun Man-highlight-references (&optional xref-man-type) 919(defun Man-highlight-references (&optional xref-man-type)
920 "Highlight the references on mouse-over. 920 "Highlight the references on mouse-over.
921References include items in the SEE ALSO section, 921References include items in the SEE ALSO section,
922header file (#include <foo.h>) and files in FILES. 922header file (#include <foo.h>), and files in FILES.
923If XREF-MAN-TYPE is used as the button type for items 923If optional argument XREF-MAN-TYPE is non-nil, it used as the
924in SEE ALSO section. If it is nil, default type, 924button type for items in SEE ALSO section. If it is nil, the
925`Man-xref-man-page' is used." 925default type, `Man-xref-man-page' is used for the buttons."
926 ;; `Man-highlight-references' is used from woman.el, too. 926 ;; `Man-highlight-references' is used from woman.el, too.
927 ;; woman.el doesn't set `Man-arguments'. 927 ;; woman.el doesn't set `Man-arguments'.
928 (unless Man-arguments 928 (unless Man-arguments
929 (setq Man-arguments "")) 929 (setq Man-arguments ""))
930 (if (string-match "-k " Man-arguments) 930 (if (string-match "-k " Man-arguments)
931 (progn 931 (progn
932 (Man-highlight-references0 932 (Man-highlight-references0 nil Man-reference-regexp 1 nil
933 nil Man-reference-regexp 1 nil 933 (or xref-man-type 'Man-xref-man-page))
934 (or xref-man-type 'Man-xref-man-page)) 934 (Man-highlight-references0 nil Man-apropos-regexp 1
935 (Man-highlight-references0 935 (lambda ()
936 nil Man-apropos-regexp 1 (lambda () 936 (format "%s(%s)"
937 (format "%s(%s)" 937 (match-string 1)
938 (match-string 1) 938 (match-string 2)))
939 (match-string 2))) 939 (or xref-man-type 'Man-xref-man-page)))
940 (or xref-man-type 'Man-xref-man-page)) 940 (Man-highlight-references0 Man-see-also-regexp Man-reference-regexp 1 nil
941 ) 941 (or xref-man-type 'Man-xref-man-page))
942 (Man-highlight-references0 942 (Man-highlight-references0 Man-synopsis-regexp Man-header-regexp 0 2
943 Man-see-also-regexp Man-reference-regexp 1 nil 943 'Man-xref-header-file)
944 (or xref-man-type 'Man-xref-man-page)) 944 (Man-highlight-references0 Man-files-regexp Man-normal-file-regexp 0 0
945 (Man-highlight-references0 945 'Man-xref-normal-file)))
946 Man-synopsis-regexp Man-header-regexp 0 2
947 'Man-xref-header-file)
948 (Man-highlight-references0
949 Man-files-regexp Man-normal-file-regexp 0 0
950 'Man-xref-normal-file)))
951 946
952(defun Man-highlight-references0 (start-section regexp button-pos target type) 947(defun Man-highlight-references0 (start-section regexp button-pos target type)
953 ;; Based on `Man-build-references-alist' 948 ;; Based on `Man-build-references-alist'
diff --git a/lisp/menu-bar.el b/lisp/menu-bar.el
index 007fd4190fe..64dad08988c 100644
--- a/lisp/menu-bar.el
+++ b/lisp/menu-bar.el
@@ -1239,7 +1239,7 @@ mail status in mode line"))
1239 1239
1240(define-key menu-bar-describe-menu [list-keybindings] 1240(define-key menu-bar-describe-menu [list-keybindings]
1241 '(menu-item "List Key Bindings" describe-bindings 1241 '(menu-item "List Key Bindings" describe-bindings
1242 :help "Display a list of all current keybindings")) 1242 :help "Display all current keybindings (keyboard shortcuts)"))
1243(define-key menu-bar-describe-menu [describe-current-display-table] 1243(define-key menu-bar-describe-menu [describe-current-display-table]
1244 '(menu-item "Describe Display Table" describe-current-display-table 1244 '(menu-item "Describe Display Table" describe-current-display-table
1245 :help "Describe the current display table")) 1245 :help "Describe the current display table"))
diff --git a/lisp/net/browse-url.el b/lisp/net/browse-url.el
index 54fddf9261c..8d57bb30c11 100644
--- a/lisp/net/browse-url.el
+++ b/lisp/net/browse-url.el
@@ -864,7 +864,9 @@ xterm, MMM, and then W3."
864 ((executable-find "tellw3b") 'browse-url-iximosaic) 864 ((executable-find "tellw3b") 'browse-url-iximosaic)
865 ((executable-find browse-url-xterm-program) 'browse-url-lynx-xterm) 865 ((executable-find browse-url-xterm-program) 'browse-url-lynx-xterm)
866 ((executable-find "mmm") 'browse-url-mmm) 866 ((executable-find "mmm") 'browse-url-mmm)
867 (t 'browse-url-w3)) 867 ((locate-library "w3") 'browse-url-w3)
868 (t
869 (lambda (&ignore args) (error "No usable browser found"))))
868 url args)) 870 url args))
869 871
870;;;###autoload 872;;;###autoload
diff --git a/lisp/net/rcirc.el b/lisp/net/rcirc.el
index 7df8e5a5603..93476a0997e 100644
--- a/lisp/net/rcirc.el
+++ b/lisp/net/rcirc.el
@@ -257,7 +257,7 @@ respectively."
257(defvar rcirc-process-output nil) 257(defvar rcirc-process-output nil)
258(defvar rcirc-topic nil) 258(defvar rcirc-topic nil)
259(defvar rcirc-keepalive-timer nil) 259(defvar rcirc-keepalive-timer nil)
260(make-variable-buffer-local 'rcirc-topic) 260(defvar rcirc-last-server-message-time nil)
261(defun rcirc-connect (server port nick user-name full-name startup-channels) 261(defun rcirc-connect (server port nick user-name full-name startup-channels)
262 "Return a connection to SERVER on PORT. 262 "Return a connection to SERVER on PORT.
263 263
@@ -290,6 +290,8 @@ STARTUP-CHANNELS will automatically be joined on startup."
290 (setq rcirc-process-output nil) 290 (setq rcirc-process-output nil)
291 (make-local-variable 'rcirc-startup-channels) 291 (make-local-variable 'rcirc-startup-channels)
292 (setq rcirc-startup-channels startup-channels) 292 (setq rcirc-startup-channels startup-channels)
293 (make-local-variable 'rcirc-last-server-message-time)
294 (setq rcirc-last-server-message-time (current-time))
293 295
294 ;; identify 296 ;; identify
295 (rcirc-send-string process (concat "NICK " nick)) 297 (rcirc-send-string process (concat "NICK " nick))
@@ -313,11 +315,16 @@ STARTUP-CHANNELS will automatically be joined on startup."
313 ,@body)) 315 ,@body))
314 316
315(defun rcirc-keepalive () 317(defun rcirc-keepalive ()
316 "Send keep alive pings to active rcirc processes." 318 "Send keep alive pings to active rcirc processes.
319Kill processes that have not received a server message since the
320last ping."
317 (if (rcirc-process-list) 321 (if (rcirc-process-list)
318 (mapc (lambda (process) 322 (mapc (lambda (process)
319 (with-rcirc-process-buffer process 323 (with-rcirc-process-buffer process
320 (rcirc-send-string process (concat "PING " rcirc-server)))) 324 (if (> (cadr (time-since rcirc-last-server-message-time))
325 rcirc-keepalive-seconds)
326 (kill-process process)
327 (rcirc-send-string process (concat "PING " rcirc-server)))))
321 (rcirc-process-list)) 328 (rcirc-process-list))
322 (cancel-timer rcirc-keepalive-timer) 329 (cancel-timer rcirc-keepalive-timer)
323 (setq rcirc-keepalive-timer nil))) 330 (setq rcirc-keepalive-timer nil)))
@@ -380,6 +387,7 @@ Function is called with PROCESS COMMAND SENDER ARGS and LINE.")
380 "Called when PROCESS receives OUTPUT." 387 "Called when PROCESS receives OUTPUT."
381 (rcirc-debug process output) 388 (rcirc-debug process output)
382 (with-rcirc-process-buffer process 389 (with-rcirc-process-buffer process
390 (setq rcirc-last-server-message-time (current-time))
383 (setq rcirc-process-output (concat rcirc-process-output output)) 391 (setq rcirc-process-output (concat rcirc-process-output output))
384 (when (= (aref rcirc-process-output 392 (when (= (aref rcirc-process-output
385 (1- (length rcirc-process-output))) ?\n) 393 (1- (length rcirc-process-output))) ?\n)
@@ -582,6 +590,8 @@ If buffer is nil, return the target of the current buffer."
582 (setq rcirc-process process) 590 (setq rcirc-process process)
583 (make-local-variable 'rcirc-target) 591 (make-local-variable 'rcirc-target)
584 (setq rcirc-target target) 592 (setq rcirc-target target)
593 (make-local-variable 'rcirc-topic)
594 (setq rcirc-topic nil)
585 595
586 (make-local-variable 'rcirc-short-buffer-name) 596 (make-local-variable 'rcirc-short-buffer-name)
587 (setq rcirc-short-buffer-name nil) 597 (setq rcirc-short-buffer-name nil)
@@ -850,8 +860,8 @@ Create the buffer if it doesn't exist."
850 (process-buffer process)))) 860 (process-buffer process))))
851 861
852(defun rcirc-format-response-string (process sender response target text) 862(defun rcirc-format-response-string (process sender response target text)
853 (concat (when rcirc-time-format 863 (concat (rcirc-facify (format-time-string rcirc-time-format (current-time))
854 (format-time-string rcirc-time-format (current-time))) 864 'rcirc-timestamp)
855 (cond ((or (string= response "PRIVMSG") 865 (cond ((or (string= response "PRIVMSG")
856 (string= response "NOTICE") 866 (string= response "NOTICE")
857 (string= response "ACTION")) 867 (string= response "ACTION"))
@@ -880,14 +890,15 @@ Create the buffer if it doesn't exist."
880 (t 890 (t
881 (rcirc-mangle-text 891 (rcirc-mangle-text
882 process 892 process
883 (rcirc-facify 893 (concat (rcirc-facify "*** " 'rcirc-server-prefix)
884 (concat "*** " 894 (rcirc-facify
885 (when (not (string= sender (rcirc-server process))) 895 (concat
886 (concat (rcirc-user-nick sender) " ")) 896 (when (not (string= sender (rcirc-server process)))
887 (when (zerop (string-to-number response)) 897 (concat (rcirc-user-nick sender) " "))
888 (concat response " ")) 898 (when (zerop (string-to-number response))
889 text) 899 (concat response " "))
890 'rcirc-server)))))) 900 text)
901 'rcirc-server)))))))
891 902
892(defvar rcirc-activity-type nil) 903(defvar rcirc-activity-type nil)
893(make-variable-buffer-local 'rcirc-activity-type) 904(make-variable-buffer-local 'rcirc-activity-type)
@@ -1446,11 +1457,16 @@ With a prefix arg, prompt for new topic."
1446 "Return a copy of STRING with FACE property added." 1457 "Return a copy of STRING with FACE property added."
1447 (propertize (or string "") 'face face 'rear-nonsticky t)) 1458 (propertize (or string "") 'face face 'rear-nonsticky t))
1448 1459
1449;; shy grouping must be used within this regexp
1450(defvar rcirc-url-regexp 1460(defvar rcirc-url-regexp
1451 "\\b\\(?:\\(?:www\\.\\|\\(?:s?https?\\|ftp\\|file\\|gopher\\|news\\|telnet\ 1461 (rx word-boundary
1452\\|wais\\|mailto\\):\\)\\(?://[-a-zA-Z0-9_.]+:[0-9]*\\)?\\(?:[-a-zA-Z0-9_=!?#$\ 1462 (or "www."
1453@~`%&*+|\\/:;.,]\\|\\w\\)+\\(?:[-a-zA-Z0-9_=#$@~`%&*+|\\/]\\|\\w\\)\\)" 1463 (and (or "http" "https" "ftp" "file" "gopher" "news" "telnet" "wais"
1464 "mailto")
1465 "://"
1466 (1+ (char "a-zA-Z0-9_."))
1467 (optional ":" (1+ (char "0-9")))))
1468 (1+ (char "-a-zA-Z0-9_=!?#$\@~`%&*+|\\/:;.,"))
1469 (char "-a-zA-Z0-9_=!?#$\@~`%&*+|\\/:;"))
1454 "Regexp matching URL's. Set to nil to disable URL features in rcirc.") 1470 "Regexp matching URL's. Set to nil to disable URL features in rcirc.")
1455 1471
1456(defun rcirc-browse-url (&optional arg) 1472(defun rcirc-browse-url (&optional arg)
@@ -1498,14 +1514,21 @@ FUNCTION takes 3 arguments, MATCH-START, MATCH-END, and STRING."
1498 "Return TEXT with properties added based on various patterns." 1514 "Return TEXT with properties added based on various patterns."
1499 ;; ^B 1515 ;; ^B
1500 (setq text 1516 (setq text
1501 (rcirc-map-regexp (lambda (start end string) 1517 (rcirc-map-regexp
1502 (add-text-properties 1518 (lambda (start end string)
1503 start end 1519 (let ((orig-face (get-text-property start 'face string)))
1504 (list 'face 'bold 'rear-nonsticky t) 1520 (add-text-properties
1505 string)) 1521 start end
1506 ".*?" 1522 (list 'face (if (listp orig-face)
1507 text)) 1523 (append orig-face
1508 (while (string-match "\\(.*\\)[]\\(.*\\)" text) ; deal with  1524 (list 'bold))
1525 (list orig-face 'bold))
1526 'rear-nonsticky t)
1527 string)))
1528 ".*?"
1529 text))
1530 ;; TODO: deal with ^_ and ^C colors sequences
1531 (while (string-match "\\(.*\\)[]\\(.*\\)" text)
1509 (setq text (concat (match-string 1 text) 1532 (setq text (concat (match-string 1 text)
1510 (match-string 2 text)))) 1533 (match-string 2 text))))
1511 ;; my nick 1534 ;; my nick
@@ -1527,7 +1550,10 @@ FUNCTION takes 3 arguments, MATCH-START, MATCH-END, and STRING."
1527 (lambda (start end string) 1550 (lambda (start end string)
1528 (let ((orig-face (get-text-property start 'face string))) 1551 (let ((orig-face (get-text-property start 'face string)))
1529 (add-text-properties start end 1552 (add-text-properties start end
1530 (list 'face (list orig-face 'bold) 1553 (list 'face (if (listp orig-face)
1554 (append orig-face
1555 (list 'bold))
1556 (list orig-face 'bold))
1531 'rear-nonsticky t 1557 'rear-nonsticky t
1532 'mouse-face 'highlight 1558 'mouse-face 'highlight
1533 'keymap rcirc-browse-url-map) 1559 'keymap rcirc-browse-url-map)
@@ -1836,51 +1862,82 @@ Passwords are read from `rcirc-authinfo-file-name' (which see)."
1836 :group 'rcirc 1862 :group 'rcirc
1837 :group 'faces) 1863 :group 'faces)
1838 1864
1839(defface rcirc-my-nick 1865(defface rcirc-my-nick ; font-lock-function-name-face
1840 '((((type tty) (class color)) (:foreground "blue" :weight bold)) 1866 '((((class color) (min-colors 88) (background light)) (:foreground "Blue1"))
1841 (((class color) (background light)) (:foreground "Blue")) 1867 (((class color) (min-colors 88) (background dark)) (:foreground "LightSkyBlue"))
1842 (((class color) (background dark)) (:foreground "LightSkyBlue")) 1868 (((class color) (min-colors 16) (background light)) (:foreground "Blue"))
1843 (t (:inverse-video t :bold t))) 1869 (((class color) (min-colors 16) (background dark)) (:foreground "LightSkyBlue"))
1870 (((class color) (min-colors 8)) (:foreground "blue" :weight bold))
1871 (t (:inverse-video t :weight bold)))
1844 "The face used to highlight my messages." 1872 "The face used to highlight my messages."
1845 :group 'rcirc-faces) 1873 :group 'rcirc-faces)
1846 1874
1847(defface rcirc-other-nick 1875(defface rcirc-other-nick ; font-lock-variable-name-face
1848 '((((type tty) (class color)) (:foreground "yellow" :weight light)) 1876 '((((class grayscale) (background light))
1849 (((class grayscale) (background light)) 1877 (:foreground "Gray90" :weight bold :slant italic))
1850 (:foreground "Gray90" :bold t :italic t))
1851 (((class grayscale) (background dark)) 1878 (((class grayscale) (background dark))
1852 (:foreground "DimGray" :bold t :italic t)) 1879 (:foreground "DimGray" :weight bold :slant italic))
1853 (((class color) (background light)) (:foreground "DarkGoldenrod")) 1880 (((class color) (min-colors 88) (background light)) (:foreground "DarkGoldenrod"))
1854 (((class color) (background dark)) (:foreground "LightGoldenrod")) 1881 (((class color) (min-colors 88) (background dark)) (:foreground "LightGoldenrod"))
1855 (t (:bold t :italic t))) 1882 (((class color) (min-colors 16) (background light)) (:foreground "DarkGoldenrod"))
1883 (((class color) (min-colors 16) (background dark)) (:foreground "LightGoldenrod"))
1884 (((class color) (min-colors 8)) (:foreground "yellow" :weight light))
1885 (t (:weight bold :slant italic)))
1856 "The face used to highlight other messages." 1886 "The face used to highlight other messages."
1857 :group 'rcirc-faces) 1887 :group 'rcirc-faces)
1858 1888
1859(defface rcirc-server 1889(defface rcirc-server ; font-lock-comment-face
1860 '((((type tty pc) (class color) (background light)) (:foreground "red")) 1890 '((((class grayscale) (background light))
1861 (((type tty pc) (class color) (background dark)) (:foreground "red1")) 1891 (:foreground "DimGray" :weight bold :slant italic))
1862 (((class grayscale) (background light))
1863 (:foreground "DimGray" :bold t :italic t))
1864 (((class grayscale) (background dark)) 1892 (((class grayscale) (background dark))
1865 (:foreground "LightGray" :bold t :italic t)) 1893 (:foreground "LightGray" :weight bold :slant italic))
1866 (((class color) (background light)) (:foreground "gray40")) 1894 (((class color) (min-colors 88) (background light))
1867 (((class color) (background dark)) (:foreground "chocolate1")) 1895 (:foreground "Firebrick"))
1868 (t (:bold t :italic t))) 1896 (((class color) (min-colors 88) (background dark))
1897 (:foreground "chocolate1"))
1898 (((class color) (min-colors 16) (background light))
1899 (:foreground "red"))
1900 (((class color) (min-colors 16) (background dark))
1901 (:foreground "red1"))
1902 (((class color) (min-colors 8) (background light))
1903 )
1904 (((class color) (min-colors 8) (background dark))
1905 )
1906 (t (:weight bold :slant italic)))
1869 "The face used to highlight server messages." 1907 "The face used to highlight server messages."
1870 :group 'rcirc-faces) 1908 :group 'rcirc-faces)
1871 1909
1872(defface rcirc-nick-in-message 1910(defface rcirc-server-prefix ; font-lock-comment-delimiter-face
1873 '((((type tty) (class color)) (:foreground "cyan" :weight bold)) 1911 '((default :inherit font-lock-comment-face)
1874 (((class grayscale) (background light)) (:foreground "LightGray" :bold t)) 1912 (((class grayscale)))
1875 (((class grayscale) (background dark)) (:foreground "DimGray" :bold t)) 1913 (((class color) (min-colors 16)))
1876 (((class color) (background light)) (:foreground "Purple")) 1914 (((class color) (min-colors 8) (background light))
1877 (((class color) (background dark)) (:foreground "Cyan")) 1915 :foreground "red")
1878 (t (:bold t))) 1916 (((class color) (min-colors 8) (background dark))
1917 :foreground "red1"))
1918 "The face used to highlight server prefixes."
1919 :group 'rcirc-faces)
1920
1921(defface rcirc-timestamp
1922 '((t (:inherit default)))
1923 "The face used to highlight timestamps."
1924 :group 'rcirc-faces)
1925
1926(defface rcirc-nick-in-message ; font-lock-keyword-face
1927 '((((class grayscale) (background light)) (:foreground "LightGray" :weight bold))
1928 (((class grayscale) (background dark)) (:foreground "DimGray" :weight bold))
1929 (((class color) (min-colors 88) (background light)) (:foreground "Purple"))
1930 (((class color) (min-colors 88) (background dark)) (:foreground "Cyan1"))
1931 (((class color) (min-colors 16) (background light)) (:foreground "Purple"))
1932 (((class color) (min-colors 16) (background dark)) (:foreground "Cyan"))
1933 (((class color) (min-colors 8)) (:foreground "cyan" :weight bold))
1934 (t (:weight bold)))
1879 "The face used to highlight instances of nick within messages." 1935 "The face used to highlight instances of nick within messages."
1880 :group 'rcirc-faces) 1936 :group 'rcirc-faces)
1881 1937
1882(defface rcirc-prompt 1938(defface rcirc-prompt ; comint-highlight-prompt
1883 '((((background dark)) (:foreground "cyan")) 1939 '((((min-colors 88) (background dark)) (:foreground "cyan1"))
1940 (((background dark)) (:foreground "cyan"))
1884 (t (:foreground "dark blue"))) 1941 (t (:foreground "dark blue")))
1885 "The face to use to highlight prompts." 1942 "The face to use to highlight prompts."
1886 :group 'rcirc-faces) 1943 :group 'rcirc-faces)
diff --git a/lisp/newcomment.el b/lisp/newcomment.el
index 938cd5fe141..9995b4b9156 100644
--- a/lisp/newcomment.el
+++ b/lisp/newcomment.el
@@ -478,19 +478,22 @@ Point is assumed to be just at the end of a comment."
478 (if (bolp) 478 (if (bolp)
479 ;; comment-end = "" 479 ;; comment-end = ""
480 (progn (backward-char) (skip-syntax-backward " ")) 480 (progn (backward-char) (skip-syntax-backward " "))
481 (let ((end (point))) 481 (cond
482 (beginning-of-line) 482 ((save-restriction
483 (save-restriction 483 (narrow-to-region (line-beginning-position) (point))
484 (narrow-to-region (point) end) 484 (goto-char (point-min))
485 (if (re-search-forward (concat comment-end-skip "\\'") nil t) 485 (re-search-forward (concat comment-end-skip "\\'") nil t))
486 (goto-char (match-beginning 0)) 486 (goto-char (match-beginning 0)))
487 ;; comment-end-skip not found probably because it was not set right. 487 ;; comment-end-skip not found. Maybe we're at EOB which implicitly
488 ;; Since \\s> should catch the single-char case, we'll blindly 488 ;; closes the comment.
489 ;; assume we're at the end of a two-char comment-end. 489 ((eobp) (skip-syntax-backward " "))
490 (goto-char (point-max)) 490 (t
491 (backward-char 2) 491 ;; else comment-end-skip was not found probably because it was not
492 (skip-chars-backward (string (char-after))) 492 ;; set right. Since \\s> should catch the single-char case, we'll
493 (skip-syntax-backward " ")))))) 493 ;; blindly assume we're at the end of a two-char comment-end.
494 (backward-char 2)
495 (skip-chars-backward (string (char-after)))
496 (skip-syntax-backward " ")))))
494 497
495;;;; 498;;;;
496;;;; Commands 499;;;; Commands
diff --git a/lisp/paren.el b/lisp/paren.el
index a1cc12712f7..ece3ed3c606 100644
--- a/lisp/paren.el
+++ b/lisp/paren.el
@@ -181,7 +181,12 @@ in `show-paren-style' after `show-paren-delay' seconds of Emacs idle time."
181 (cdr (syntax-after beg))) 181 (cdr (syntax-after beg)))
182 (eq (char-after beg) 182 (eq (char-after beg)
183 ;; This can give nil. 183 ;; This can give nil.
184 (cdr (syntax-after (1- end))))))))))))) 184 (cdr (syntax-after (1- end))))
185 ;; The cdr might hold a new paren-class
186 ;; info rather than a matching-char info,
187 ;; in which case the two CDRs should match.
188 (eq (cdr (syntax-after (1- end)))
189 (cdr (syntax-after beg))))))))))))
185 ;; 190 ;;
186 ;; Highlight the other end of the sexp, or unhighlight if none. 191 ;; Highlight the other end of the sexp, or unhighlight if none.
187 (if (not pos) 192 (if (not pos)
diff --git a/lisp/progmodes/gdb-ui.el b/lisp/progmodes/gdb-ui.el
index 92265dd46da..961ee0747ff 100644
--- a/lisp/progmodes/gdb-ui.el
+++ b/lisp/progmodes/gdb-ui.el
@@ -75,9 +75,11 @@
75;; of 'info registers'. 75;; of 'info registers'.
76;; 3) Use tree-widget.el instead of the speedbar for watch-expressions? 76;; 3) Use tree-widget.el instead of the speedbar for watch-expressions?
77;; 4) Mark breakpoint locations on scroll-bar of source buffer? 77;; 4) Mark breakpoint locations on scroll-bar of source buffer?
78;; 5) After release of 22.1 use '-var-list-children --all-values' 78;; 5) After release of 22.1, use "-var-list-children --all-values"
79;; and '-stack-list-locals 2' which need GDB 6.1 onwards. 79;; and "-stack-list-locals --simple-values" which need GDB 6.1 onwards.
80;; 6) With gud-print and gud-pstar, print the variable name in the GUD 80;; 6) After release of 22.1, use "-var-update --all-values" which needs
81;; GDB 6.4 onwards.
82;; 7) With gud-print and gud-pstar, print the variable name in the GUD
81;; buffer instead of the value's history number. 83;; buffer instead of the value's history number.
82 84
83;;; Code: 85;;; Code:
@@ -2230,6 +2232,30 @@ corresponding to the mode line clicked."
2230 "server info locals\n" 2232 "server info locals\n"
2231 gdb-info-locals-handler) 2233 gdb-info-locals-handler)
2232 2234
2235(defvar gdb-locals-watch-keymap
2236 (let ((map (make-sparse-keymap)))
2237 (define-key map "\r" '(lambda () (interactive)
2238 (beginning-of-line)
2239 (gud-watch)))
2240 (define-key map [mouse-2] '(lambda (event) (interactive "e")
2241 (mouse-set-point event)
2242 (beginning-of-line)
2243 (gud-watch)))
2244 map)
2245 "Keymap to create watch expression of a complex data type local variable.")
2246
2247(defconst gdb-struct-string
2248 (concat (propertize "[struct/union];"
2249 'mouse-face 'highlight
2250 'help-echo "mouse-2: create watch expression"
2251 'local-map gdb-locals-watch-keymap) "\n"))
2252
2253(defconst gdb-array-string
2254 (concat " " (propertize "[array];"
2255 'mouse-face 'highlight
2256 'help-echo "mouse-2: create watch expression"
2257 'local-map gdb-locals-watch-keymap) "\n"))
2258
2233;; Abbreviate for arrays and structures. 2259;; Abbreviate for arrays and structures.
2234;; These can be expanded using gud-display. 2260;; These can be expanded using gud-display.
2235(defun gdb-info-locals-handler () 2261(defun gdb-info-locals-handler ()
@@ -2242,10 +2268,10 @@ corresponding to the mode line clicked."
2242 (replace-match "" nil nil)) 2268 (replace-match "" nil nil))
2243 (goto-char (point-min)) 2269 (goto-char (point-min))
2244 (while (re-search-forward "{\\(.*=.*\n\\|\n\\)" nil t) 2270 (while (re-search-forward "{\\(.*=.*\n\\|\n\\)" nil t)
2245 (replace-match "(structure);\n" nil nil)) 2271 (replace-match gdb-struct-string nil nil))
2246 (goto-char (point-min)) 2272 (goto-char (point-min))
2247 (while (re-search-forward "\\s-*{.*\n" nil t) 2273 (while (re-search-forward "\\s-*{.*\n" nil t)
2248 (replace-match " (array);\n" nil nil)))) 2274 (replace-match gdb-array-string nil nil))))
2249 (let ((buf (gdb-get-buffer 'gdb-locals-buffer))) 2275 (let ((buf (gdb-get-buffer 'gdb-locals-buffer)))
2250 (and buf 2276 (and buf
2251 (with-current-buffer buf 2277 (with-current-buffer buf
@@ -2504,6 +2530,7 @@ Kills the gdb buffers and resets the source buffers."
2504 (delq 'gdb-overlay-arrow-position overlay-arrow-variable-list)) 2530 (delq 'gdb-overlay-arrow-position overlay-arrow-variable-list))
2505 (setq gud-running nil) 2531 (setq gud-running nil)
2506 (setq gdb-active-process nil) 2532 (setq gdb-active-process nil)
2533 (setq gdb-var-list nil)
2507 (remove-hook 'after-save-hook 'gdb-create-define-alist t)) 2534 (remove-hook 'after-save-hook 'gdb-create-define-alist t))
2508 2535
2509(defun gdb-source-info () 2536(defun gdb-source-info ()
diff --git a/lisp/progmodes/sh-script.el b/lisp/progmodes/sh-script.el
index bc4ca59f96a..f6928a72554 100644
--- a/lisp/progmodes/sh-script.el
+++ b/lisp/progmodes/sh-script.el
@@ -986,7 +986,11 @@ Point is at the beginning of the next line."
986 (when (memq (char-before) '(?\" ?\')) 986 (when (memq (char-before) '(?\" ?\'))
987 (condition-case nil (progn (backward-sexp 1) t) 987 (condition-case nil (progn (backward-sexp 1) t)
988 (error nil))))) 988 (error nil)))))
989 (forward-comment (- (point-max))) 989 (while (progn
990 (forward-comment (- (point-max)))
991 ;; Maybe we've bumped into an escaped newline.
992 (sh-is-quoted-p (point)))
993 (backward-char 1))
990 (when (eq (char-before) ?|) 994 (when (eq (char-before) ?|)
991 (backward-char 1) t))) 995 (backward-char 1) t)))
992 (when (save-excursion (backward-char 2) (looking-at ";;\\|in")) 996 (when (save-excursion (backward-char 2) (looking-at ";;\\|in"))
diff --git a/lisp/simple.el b/lisp/simple.el
index 35a42965ef7..a1be91f5abf 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -893,9 +893,9 @@ in *Help* buffer. See also the command `describe-char'."
893 (col (current-column))) 893 (col (current-column)))
894 (if (= pos end) 894 (if (= pos end)
895 (if (or (/= beg 1) (/= end (1+ total))) 895 (if (or (/= beg 1) (/= end (1+ total)))
896 (message "point=%d of %d (%d%%) <%d - %d> column %d %s" 896 (message "point=%d of %d (%d%%) <%d-%d> column=%d%s"
897 pos total percent beg end col hscroll) 897 pos total percent beg end col hscroll)
898 (message "point=%d of %d (EOB) column %d %s" 898 (message "point=%d of %d (EOB) column=%d%s"
899 pos total col hscroll)) 899 pos total col hscroll))
900 (let ((coding buffer-file-coding-system) 900 (let ((coding buffer-file-coding-system)
901 encoded encoding-msg display-prop under-display) 901 encoded encoding-msg display-prop under-display)
@@ -904,7 +904,7 @@ in *Help* buffer. See also the command `describe-char'."
904 (setq coding default-buffer-file-coding-system)) 904 (setq coding default-buffer-file-coding-system))
905 (if (not (char-valid-p char)) 905 (if (not (char-valid-p char))
906 (setq encoding-msg 906 (setq encoding-msg
907 (format "(0%o, %d, 0x%x, invalid)" char char char)) 907 (format "(%d, #o%o, #x%x, invalid)" char char char))
908 ;; Check if the character is displayed with some `display' 908 ;; Check if the character is displayed with some `display'
909 ;; text property. In that case, set under-display to the 909 ;; text property. In that case, set under-display to the
910 ;; buffer substring covered by that property. 910 ;; buffer substring covered by that property.
@@ -923,27 +923,27 @@ in *Help* buffer. See also the command `describe-char'."
923 (setq encoding-msg 923 (setq encoding-msg
924 (if display-prop 924 (if display-prop
925 (if (not (stringp display-prop)) 925 (if (not (stringp display-prop))
926 (format "(0%o, %d, 0x%x, part of display \"%s\")" 926 (format "(%d, #o%o, #x%x, part of display \"%s\")"
927 char char char under-display) 927 char char char under-display)
928 (format "(0%o, %d, 0x%x, part of display \"%s\"->\"%s\")" 928 (format "(%d, #o%o, #x%x, part of display \"%s\"->\"%s\")"
929 char char char under-display display-prop)) 929 char char char under-display display-prop))
930 (if encoded 930 (if encoded
931 (format "(0%o, %d, 0x%x, file %s)" 931 (format "(%d, #o%o, #x%x, file %s)"
932 char char char 932 char char char
933 (if (> (length encoded) 1) 933 (if (> (length encoded) 1)
934 "..." 934 "..."
935 (encoded-string-description encoded coding))) 935 (encoded-string-description encoded coding)))
936 (format "(0%o, %d, 0x%x)" char char char))))) 936 (format "(%d, #o%o, #x%x)" char char char)))))
937 (if detail 937 (if detail
938 ;; We show the detailed information about CHAR. 938 ;; We show the detailed information about CHAR.
939 (describe-char (point))) 939 (describe-char (point)))
940 (if (or (/= beg 1) (/= end (1+ total))) 940 (if (or (/= beg 1) (/= end (1+ total)))
941 (message "Char: %s %s point=%d of %d (%d%%) <%d - %d> column %d %s" 941 (message "Char: %s %s point=%d of %d (%d%%) <%d-%d> column=%d%s"
942 (if (< char 256) 942 (if (< char 256)
943 (single-key-description char) 943 (single-key-description char)
944 (buffer-substring-no-properties (point) (1+ (point)))) 944 (buffer-substring-no-properties (point) (1+ (point))))
945 encoding-msg pos total percent beg end col hscroll) 945 encoding-msg pos total percent beg end col hscroll)
946 (message "Char: %s %s point=%d of %d (%d%%) column %d %s" 946 (message "Char: %s %s point=%d of %d (%d%%) column=%d%s"
947 (if enable-multibyte-characters 947 (if enable-multibyte-characters
948 (if (< char 128) 948 (if (< char 128)
949 (single-key-description char) 949 (single-key-description char)
@@ -4320,7 +4320,11 @@ If nil, search stops at the beginning of the accessible portion of the buffer."
4320 (eq (syntax-class syntax) 4) 4320 (eq (syntax-class syntax) 4)
4321 (cdr syntax))))) 4321 (cdr syntax)))))
4322 (cond 4322 (cond
4323 ((not (eq matching-paren (char-before oldpos))) 4323 ((not (or (eq matching-paren (char-before oldpos))
4324 ;; The cdr might hold a new paren-class info rather than
4325 ;; a matching-char info, in which case the two CDRs
4326 ;; should match.
4327 (eq matching-paren (cdr (syntax-after oldpos)))))
4324 (message "Mismatched parentheses")) 4328 (message "Mismatched parentheses"))
4325 ((not blinkpos) 4329 ((not blinkpos)
4326 (if (not blink-matching-paren-distance) 4330 (if (not blink-matching-paren-distance)
diff --git a/lisp/startup.el b/lisp/startup.el
index b56aa331e71..863c621de6c 100644
--- a/lisp/startup.el
+++ b/lisp/startup.el
@@ -653,7 +653,7 @@ opening the first frame (e.g. open a connection to an X server).")
653 (if (and (stringp (car elt)) 653 (if (and (stringp (car elt))
654 (not (file-name-absolute-p (car elt)))) 654 (not (file-name-absolute-p (car elt))))
655 (cons (locate-file (car elt) load-path 655 (cons (locate-file (car elt) load-path
656 load-suffixes) 656 (append load-suffixes '("")))
657 (cdr elt)) 657 (cdr elt))
658 elt)) 658 elt))
659 load-history)) 659 load-history))
@@ -1285,7 +1285,7 @@ This is an internal function used to turn off the splash screen after
1285the user caused an input event by hitting a key or clicking with the 1285the user caused an input event by hitting a key or clicking with the
1286mouse." 1286mouse."
1287 (interactive) 1287 (interactive)
1288 (if (and (consp last-command-event) 1288 (if (and (memq 'down (event-modifiers last-command-event))
1289 (eq (posn-window (event-start last-command-event)) 1289 (eq (posn-window (event-start last-command-event))
1290 (selected-window))) 1290 (selected-window)))
1291 ;; This is a mouse-down event in the spash screen window. 1291 ;; This is a mouse-down event in the spash screen window.
diff --git a/lisp/subr.el b/lisp/subr.el
index 561394038c5..b6063c18638 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -1541,6 +1541,8 @@ by doing (clear-string STRING)."
1541 (c 0) 1541 (c 0)
1542 (echo-keystrokes 0) 1542 (echo-keystrokes 0)
1543 (cursor-in-echo-area t)) 1543 (cursor-in-echo-area t))
1544 (add-text-properties 0 (length prompt)
1545 minibuffer-prompt-properties prompt)
1544 (while (progn (message "%s%s" 1546 (while (progn (message "%s%s"
1545 prompt 1547 prompt
1546 (make-string (length pass) ?.)) 1548 (make-string (length pass) ?.))
diff --git a/lisp/textmodes/org.el b/lisp/textmodes/org.el
index ef1c66bf166..0dcde3d69d5 100644
--- a/lisp/textmodes/org.el
+++ b/lisp/textmodes/org.el
@@ -1,11 +1,11 @@
1;;; org.el --- Outline-based notes management and organizer 1;;; org.el --- Outline-based notes management and organize
2;; Carstens outline-mode for keeping track of everything. 2;; Carstens outline-mode for keeping track of everything.
3;; Copyright (c) 2004, 2005 Free Software Foundation 3;; Copyright (c) 2004, 2005 Free Software Foundation
4;; 4;;
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 6;; Keywords: outlines, hypermedia, calendar
7;; Homepage: http://www.astro.uva.nl/~dominik/Tools/org/ 7;; Homepage: http://www.astro.uva.nl/~dominik/Tools/org/
8;; Version: 3.19 8;; Version: 3.20
9;; 9;;
10;; This file is part of GNU Emacs. 10;; This file is part of GNU Emacs.
11;; 11;;
@@ -80,6 +80,20 @@
80;; 80;;
81;; Changes: 81;; Changes:
82;; ------- 82;; -------
83;; Version 3.20
84;; - There is finally an option to make TAB jump over horizontal lines
85;; in tables instead of creating a new line before that line.
86;; The option is `org-table-tab-jumps-over-hlines', default nil.
87;; - New command for sorting tables, on `C-c ^'.
88;; - Changes to the HTML exporter
89;; - hand-formatted lists are exported correctly, similar to
90;; markdown lists. Nested lists are possible. See the docstring
91;; of the variable `org-export-local-list-max-depth'.
92;; - cleaned up to produce valid HTML 4.0 (transitional).
93;; - support for cascading style sheets.
94;; - New command to cycle through all agenda files, on C-,
95;; - C-c [ can now also be used to change the sequence of agenda files.
96;;
83;; Version 3.19 97;; Version 3.19
84;; - Bug fixes 98;; - Bug fixes
85;; 99;;
@@ -220,7 +234,7 @@
220 234
221;;; Customization variables 235;;; Customization variables
222 236
223(defvar org-version "3.19" 237(defvar org-version "3.20"
224 "The version number of the file org.el.") 238 "The version number of the file org.el.")
225(defun org-version () 239(defun org-version ()
226 (interactive) 240 (interactive)
@@ -530,7 +544,7 @@ moved to the new date."
530 544
531(defcustom org-agenda-files nil 545(defcustom org-agenda-files nil
532 "A list of org files for agenda/diary display. 546 "A list of org files for agenda/diary display.
533Entries are added to this list with \\[org-add-file] and removed with 547Entries are added to this list with \\[org-agenda-file-to-front] and removed with
534\\[org-remove-file]. You can also use customize to edit the list." 548\\[org-remove-file]. You can also use customize to edit the list."
535 :group 'org-agenda 549 :group 'org-agenda
536 :type '(repeat file)) 550 :type '(repeat file))
@@ -1128,6 +1142,17 @@ See also the variable `org-table-auto-blank-field'."
1128 (const :tag "on" t) 1142 (const :tag "on" t)
1129 (const :tag "on, optimized" optimized))) 1143 (const :tag "on, optimized" optimized)))
1130 1144
1145;; FIXME: We could have a third option which makes it jump onle over the first
1146;; hline in a table.
1147(defcustom org-table-tab-jumps-over-hlines t
1148 "Non-nil means, tab in the last column of a table with jump over a hline.
1149If a horizontal separator line is following the current line,
1150`org-table-next-field' can either create a new row before that line, or jump
1151over the line. When this option is nil, a new line will be created before
1152this line."
1153 :group 'org-table
1154 :type 'boolean)
1155
1131(defcustom org-table-auto-blank-field t 1156(defcustom org-table-auto-blank-field t
1132 "Non-nil means, automatically blank table field when starting to type into it. 1157 "Non-nil means, automatically blank table field when starting to type into it.
1133This only happens when typing immediately after a field motion 1158This only happens when typing immediately after a field motion
@@ -1313,7 +1338,28 @@ or use the +OPTION lines for a per-file setting."
1313 1338
1314(defcustom org-export-default-language "en" 1339(defcustom org-export-default-language "en"
1315 "The default language of HTML export, as a string. 1340 "The default language of HTML export, as a string.
1316This should have an association in `org-export-language-setup'" 1341This should have an association in `org-export-language-setup'."
1342 :group 'org-export
1343 :type 'string)
1344
1345(defcustom org-export-html-style ""
1346 "The default style specification for exported HTML files.
1347Since there are different ways of setting style information, this variable
1348needs to contain the full HTML structure to provide a style, including the
1349surrounding HTML tags. For example, legal values would be
1350
1351 <style type=\"text/css\">
1352 p {font-weight: normal; color: gray; }
1353 h1 {color: black; }
1354 </style>
1355
1356or
1357
1358 <link rel=\"stylesheet\" type=\"text/css\" href=\"mystyles.css\">
1359
1360As the value of this option simply gets inserted into the HTML <head> header,
1361you can \"misuse\" it to add arbitrary text to the header.
1362"
1317 :group 'org-export 1363 :group 'org-export
1318 :type 'string) 1364 :type 'string)
1319 1365
@@ -1347,6 +1393,30 @@ This option can also be set with the +OPTIONS line, e.g. \"toc:nil\"."
1347 :group 'org-export 1393 :group 'org-export
1348 :type 'boolean) 1394 :type 'boolean)
1349 1395
1396(defcustom org-export-local-list-max-depth 1
1397 "Maximum depth of hand-formatted lists in HTML export.
1398Org-mode parses hand-formatted enumeration and bullet lists and
1399transforms them to HTML open export. Different indentation of the bullet
1400or number indicates different list nesting levels. To avoid confusion,
1401only a single level is allowed by default. This means that a list is started
1402with an item, and that all further items are consitered as long as the
1403indentation is larger or equal to the indentation of the first item. When this
1404is larger than 1, deeper indentation leads to deeper list nesting.
1405If you are careful with hand formatting, you can increase this limit and
1406get lists of arbitrary depth. For example, by setting this option to 3, the
1407following list would look correct in HTML:
1408
1409 * Fruit
1410 - Apple
1411 - Banana
1412 1. from Africa
1413 2. from South America
1414 - Pineapple
1415 * Bread
1416 * Dairy products"
1417 :group 'org-export
1418 :type 'integer)
1419
1350(defcustom org-export-preserve-breaks nil 1420(defcustom org-export-preserve-breaks nil
1351 "Non-nil means, preserve all line breaks when exporting. 1421 "Non-nil means, preserve all line breaks when exporting.
1352Normally, in HTML output paragraphs will be reformatted. In ASCII 1422Normally, in HTML output paragraphs will be reformatted. In ASCII
@@ -1874,19 +1944,8 @@ The following commands are available:
1874 (make-local-hook 'before-change-functions) ;; needed for XEmacs 1944 (make-local-hook 'before-change-functions) ;; needed for XEmacs
1875 (add-hook 'before-change-functions 'org-before-change-function nil 1945 (add-hook 'before-change-functions 'org-before-change-function nil
1876 'local) 1946 'local)
1877 ;; Paragraph regular expressions 1947 ;; Paragraphs and auto-filling
1878 (set (make-local-variable 'paragraph-separate) "\f\\|[ ]*$\\|\\([*\f]+\\)") 1948 (org-set-autofill-regexps)
1879 (set (make-local-variable 'paragraph-start) "\f\\|[ ]*$\\|\\([*\f]+\\)")
1880 ;; Inhibit auto-fill for headers, tables and fixed-width lines.
1881 (set (make-local-variable 'auto-fill-inhibit-regexp)
1882 (concat "\\*\\|#"
1883 (if (or org-enable-table-editor org-enable-fixed-width-editor)
1884 (concat
1885 "\\|[ \t]*["
1886 (if org-enable-table-editor "|" "")
1887 (if org-enable-fixed-width-editor ":" "")
1888 "]"))))
1889 (set (make-local-variable 'fill-paragraph-function) 'org-fill-paragraph)
1890 ;; Settings for Calc embedded mode 1949 ;; Settings for Calc embedded mode
1891 (set (make-local-variable 'calc-embedded-open-formula) "|\\|\n") 1950 (set (make-local-variable 'calc-embedded-open-formula) "|\\|\n")
1892 (set (make-local-variable 'calc-embedded-close-formula) "|\\|\n") 1951 (set (make-local-variable 'calc-embedded-close-formula) "|\\|\n")
@@ -1918,12 +1977,6 @@ The following commands are available:
1918 (let ((this-command 'org-cycle) (last-command 'org-cycle)) 1977 (let ((this-command 'org-cycle) (last-command 'org-cycle))
1919 (org-cycle '(4)) (org-cycle '(4)))))))) 1978 (org-cycle '(4)) (org-cycle '(4))))))))
1920 1979
1921(defun org-fill-paragraph (&optional justify)
1922 "Re-align a table, pass through to fill-paragraph if no table."
1923 (save-excursion
1924 (beginning-of-line 1)
1925 (looking-at "\\s-*\\(|\\|\\+-+\\)")))
1926
1927(defsubst org-current-line (&optional pos) 1980(defsubst org-current-line (&optional pos)
1928 (+ (if (bolp) 1 0) (count-lines (point-min) (or pos (point))))) 1981 (+ (if (bolp) 1 0) (count-lines (point-min) (or pos (point)))))
1929 1982
@@ -4230,34 +4283,53 @@ Needed to avoid empty dates which mess up holiday display."
4230 (error 4283 (error
4231 (add-to-diary-list original-date "Org-mode dummy" "" nil))))) 4284 (add-to-diary-list original-date "Org-mode dummy" "" nil)))))
4232 4285
4233(defun org-add-file (&optional file) 4286(defun org-cycle-agenda-files ()
4234 "Add current file to the list of files in variable `org-agenda-files'. 4287 "Cycle through the files in `org-agenda-files'.
4235These are the files which are being checked for agenda entries. 4288If the current buffer visits an agenda file, find the next one in the list.
4236Optional argument FILE means, use this file instead of the current. 4289If the current buffer does not, find the first agenda file."
4237It is possible (but not recommended) to add this function to the
4238`org-mode-hook'."
4239 (interactive) 4290 (interactive)
4240 (catch 'exit 4291 (let ((files (append org-agenda-files (list (car org-agenda-files))))
4241 (let* ((file (or file (buffer-file-name) 4292 (tcf (if (buffer-file-name) (file-truename (buffer-file-name))))
4242 (if (interactive-p) 4293 file)
4243 (error "Buffer is not visiting a file") 4294 (unless files (error "No agenda files"))
4244 (throw 'exit nil)))) 4295 (catch 'exit
4245 (true-file (file-truename file)) 4296 (while (setq file (pop files))
4246 (afile (abbreviate-file-name file)) 4297 (if (equal (file-truename file) tcf)
4247 (present (delq nil (mapcar 4298 (when (car files)
4248 (lambda (x) 4299 (find-file (car files))
4249 (equal true-file (file-truename x))) 4300 (throw 'exit t))))
4250 org-agenda-files)))) 4301 (find-file (car org-agenda-files)))))
4251 (if (not present) 4302
4252 (progn 4303(defun org-agenda-file-to-end (&optional file)
4253 (setq org-agenda-files 4304 "Move/add the current file to the end of the agenda fiole list.
4254 (cons afile org-agenda-files)) 4305I the file is not present in the list, it is appended ot the list. If it is
4255 ;; Make sure custom.el does not end up with Org-mode 4306present, it is moved there."
4256 (let ((org-mode-hook nil) (default-major-mode 'fundamental-mode)) 4307 (interactive)
4257 (customize-save-variable 'org-agenda-files org-agenda-files)) 4308 (org-agenda-file-to-front 'to-end file))
4258 (org-install-agenda-files-menu) 4309
4259 (message "Added file: %s" afile)) 4310(defun org-agenda-file-to-front (&optional to-end file)
4260 (message "File was already in list: %s" afile))))) 4311 "Move/add the current file to the top of the agenda file list.
4312If the file is not present in the list, it is added to the front. If it is
4313present, it is moved there. With optional argument TO-END, add/move to the
4314end of the list."
4315 (interactive "P")
4316 (let ((file-alist (mapcar (lambda (x)
4317 (cons (file-truename x) x))
4318 org-agenda-files))
4319 (ctf (file-truename (buffer-file-name)))
4320 x had)
4321 (setq x (assoc ctf file-alist) had x)
4322
4323 (if (not x) (setq x (cons ctf (abbreviate-file-name (buffer-file-name)))))
4324 (if to-end
4325 (setq file-alist (append (delq x file-alist) (list x)))
4326 (setq file-alist (cons x (delq x file-alist))))
4327 (setq org-agenda-files (mapcar 'cdr file-alist))
4328 (let ((org-mode-hook nil) (default-major-mode 'fundamental-mode))
4329 (customize-save-variable 'org-agenda-files org-agenda-files))
4330 (org-install-agenda-files-menu)
4331 (message "File %s to %s of agenda file list"
4332 (if had "moved" "added") (if to-end "end" "front"))))
4261 4333
4262(defun org-remove-file (&optional file) 4334(defun org-remove-file (&optional file)
4263 "Remove current file from the list of files in variable `org-agenda-files'. 4335 "Remove current file from the list of files in variable `org-agenda-files'.
@@ -6300,7 +6372,7 @@ Optional argument NEW may specify text to replace the current field content."
6300 (goto-char pos)))))) 6372 (goto-char pos))))))
6301 6373
6302(defun org-table-next-field () 6374(defun org-table-next-field ()
6303 "Go to the next field in the current table. 6375 "Go to the next field in the current table, creating new lines as needed.
6304Before doing so, re-align the table if necessary." 6376Before doing so, re-align the table if necessary."
6305 (interactive) 6377 (interactive)
6306 (org-table-maybe-eval-formula) 6378 (org-table-maybe-eval-formula)
@@ -6308,20 +6380,25 @@ Before doing so, re-align the table if necessary."
6308 (if (and org-table-automatic-realign 6380 (if (and org-table-automatic-realign
6309 org-table-may-need-update) 6381 org-table-may-need-update)
6310 (org-table-align)) 6382 (org-table-align))
6311 (if (org-at-table-hline-p) 6383 (let ((end (org-table-end)))
6312 (end-of-line 1)) 6384 (if (org-at-table-hline-p)
6313 (condition-case nil 6385 (end-of-line 1))
6314 (progn 6386 (condition-case nil
6315 (re-search-forward "|" (org-table-end)) 6387 (progn
6316 (if (looking-at "[ \t]*$") 6388 (re-search-forward "|" end)
6317 (re-search-forward "|" (org-table-end))) 6389 (if (looking-at "[ \t]*$")
6318 (if (looking-at "-") 6390 (re-search-forward "|" end))
6319 (progn 6391 (if (and (looking-at "-")
6320 (beginning-of-line 0) 6392 org-table-tab-jumps-over-hlines
6321 (org-table-insert-row 'below)) 6393 (re-search-forward "^[ \t]*|\\([^-]\\)" end t))
6322 (if (looking-at " ") (forward-char 1)))) 6394 (goto-char (match-beginning 1)))
6323 (error 6395 (if (looking-at "-")
6324 (org-table-insert-row 'below)))) 6396 (progn
6397 (beginning-of-line 0)
6398 (org-table-insert-row 'below))
6399 (if (looking-at " ") (forward-char 1))))
6400 (error
6401 (org-table-insert-row 'below)))))
6325 6402
6326(defun org-table-previous-field () 6403(defun org-table-previous-field ()
6327 "Go to the previous field in the table. 6404 "Go to the previous field in the table.
@@ -6472,6 +6549,7 @@ With optional argument ON-DELIM, stop with point before the left delimiter
6472of the field. 6549of the field.
6473If there are less than N fields, just go to after the last delimiter. 6550If there are less than N fields, just go to after the last delimiter.
6474However, when FORCE is non-nil, create new columns if necessary." 6551However, when FORCE is non-nil, create new columns if necessary."
6552 (interactive "p")
6475 (let ((pos (point-at-eol))) 6553 (let ((pos (point-at-eol)))
6476 (beginning-of-line 1) 6554 (beginning-of-line 1)
6477 (when (> n 0) 6555 (when (> n 0)
@@ -6490,7 +6568,7 @@ However, when FORCE is non-nil, create new columns if necessary."
6490 6568
6491(defun org-at-table-p (&optional table-type) 6569(defun org-at-table-p (&optional table-type)
6492 "Return t if the cursor is inside an org-type table. 6570 "Return t if the cursor is inside an org-type table.
6493If TABLE-TYPE is non-nil, also chack for table.el-type tables." 6571If TABLE-TYPE is non-nil, also check for table.el-type tables."
6494 (if org-enable-table-editor 6572 (if org-enable-table-editor
6495 (save-excursion 6573 (save-excursion
6496 (beginning-of-line 1) 6574 (beginning-of-line 1)
@@ -6498,6 +6576,13 @@ If TABLE-TYPE is non-nil, also chack for table.el-type tables."
6498 org-table-line-regexp))) 6576 org-table-line-regexp)))
6499 nil)) 6577 nil))
6500 6578
6579(defun org-at-table.el-p ()
6580 "Return t if and only if we are at a table.el table."
6581 (and (org-at-table-p 'any)
6582 (save-excursion
6583 (goto-char (org-table-begin 'any))
6584 (looking-at org-table1-hline-regexp))))
6585
6501(defun org-table-recognize-table.el () 6586(defun org-table-recognize-table.el ()
6502 "If there is a table.el table nearby, recognize it and move into it." 6587 "If there is a table.el table nearby, recognize it and move into it."
6503 (if org-table-tab-recognizes-table.el 6588 (if org-table-tab-recognizes-table.el
@@ -6524,15 +6609,6 @@ If TABLE-TYPE is non-nil, also chack for table.el-type tables."
6524 nil) 6609 nil)
6525 nil)) 6610 nil))
6526 6611
6527(defun org-at-table.el-p ()
6528 "Return t if the cursor is inside a table.el-type table."
6529 (save-excursion
6530 (if (org-at-table-p 'any)
6531 (progn
6532 (goto-char (org-table-begin 'any))
6533 (looking-at org-table1-hline-regexp))
6534 nil)))
6535
6536(defun org-at-table-hline-p () 6612(defun org-at-table-hline-p ()
6537 "Return t if the cursor is inside a hline in a table." 6613 "Return t if the cursor is inside a hline in a table."
6538 (if org-enable-table-editor 6614 (if org-enable-table-editor
@@ -6745,6 +6821,49 @@ With prefix ARG, insert above the current line."
6745 (if (not (org-at-table-p)) (beginning-of-line 0)) 6821 (if (not (org-at-table-p)) (beginning-of-line 0))
6746 (move-to-column col))) 6822 (move-to-column col)))
6747 6823
6824(defun org-table-sort-lines (beg end numericp)
6825 "Sort table lines in region.
6826Point and mark define the first and last line to include. Both point and
6827mark should be in the column that is used for sorting. For example, to
6828sort according to column 3, put the mark in the first line to sort, in
6829table column 3. Put point into the last line to be included in the sorting,
6830also in table column 3. The command will prompt for the sorting method (n for
6831numerical, a for alphanumeric)."
6832 (interactive "r\nsSorting method: [n]=numeric [a]=alpha: ")
6833 (setq numericp (string-match "[nN]" numericp))
6834 (org-table-align) ;; Just to be safe
6835 (let* (bcol ecol cmp column lns)
6836 (goto-char beg)
6837 (org-table-check-inside-data-field)
6838 (setq column (org-table-current-column)
6839 beg (move-marker (make-marker) (point-at-bol)))
6840 (goto-char end)
6841 (org-table-check-inside-data-field)
6842 (setq end (move-marker (make-marker) (1+ (point-at-eol))))
6843 (untabify beg end)
6844 (goto-char beg)
6845 (org-table-goto-column column)
6846 (skip-chars-backward "^|")
6847 (setq bcol (current-column))
6848 (org-table-goto-column (1+ column))
6849 (skip-chars-backward "^|")
6850 (setq ecol (1- (current-column)))
6851 (setq cmp (if numericp
6852 (lambda (a b) (< (car a) (car b)))
6853 (lambda (a b) (string< (car a) (car b)))))
6854 (setq lns (mapcar (lambda(x) (cons (org-trim (substring x bcol ecol)) x))
6855 (split-string (buffer-substring beg end) "\n")))
6856 (if numericp
6857 (setq lns (mapcar (lambda(x)
6858 (cons (string-to-number (car x)) (cdr x)))
6859 lns)))
6860 (delete-region beg end)
6861 (move-marker beg nil)
6862 (move-marker end nil)
6863 (insert (mapconcat 'cdr (setq lns (sort lns cmp)) "\n") "\n")
6864 (message "%d lines sorted %s based on column %d"
6865 (length lns)
6866 (if numericp "numerically" "alphabetically") column)))
6748 6867
6749(defun org-table-cut-region (beg end) 6868(defun org-table-cut-region (beg end)
6750 "Copy region in table to the clipboard and blank all relevant fields." 6869 "Copy region in table to the clipboard and blank all relevant fields."
@@ -8013,6 +8132,7 @@ to execute outside of tables."
8013 '("\C-c=" org-table-eval-formula) 8132 '("\C-c=" org-table-eval-formula)
8014 '("\C-c'" org-table-edit-formulas) 8133 '("\C-c'" org-table-edit-formulas)
8015 '("\C-c*" org-table-recalculate) 8134 '("\C-c*" org-table-recalculate)
8135 '("\C-c^" org-table-sort-lines)
8016 '([(control ?#)] org-table-rotate-recalc-marks))) 8136 '([(control ?#)] org-table-rotate-recalc-marks)))
8017 elt key fun cmd) 8137 elt key fun cmd)
8018 (while (setq elt (pop bindings)) 8138 (while (setq elt (pop bindings))
@@ -8063,6 +8183,7 @@ to execute outside of tables."
8063 ["Move Row Down" org-metadown :active (org-at-table-p) :keys "M-<down>"] 8183 ["Move Row Down" org-metadown :active (org-at-table-p) :keys "M-<down>"]
8064 ["Delete Row" org-shiftmetaup :active (org-at-table-p) :keys "M-S-<up>"] 8184 ["Delete Row" org-shiftmetaup :active (org-at-table-p) :keys "M-S-<up>"]
8065 ["Insert Row" org-shiftmetadown :active (org-at-table-p) :keys "M-S-<down>"] 8185 ["Insert Row" org-shiftmetadown :active (org-at-table-p) :keys "M-S-<down>"]
8186 ["Sort lines in region" org-table-sort-lines (org-at-table-p) :keys "C-c ^"]
8066 "--" 8187 "--"
8067 ["Insert Hline" org-table-insert-hline :active (org-at-table-p) :keys "C-c -"]) 8188 ["Insert Hline" org-table-insert-hline :active (org-at-table-p) :keys "C-c -"])
8068 ("Rectangle" 8189 ("Rectangle"
@@ -8838,7 +8959,8 @@ headlines. The default is 3. Lower levels will become bulleted lists."
8838 (setq-default org-todo-line-regexp org-todo-line-regexp) 8959 (setq-default org-todo-line-regexp org-todo-line-regexp)
8839 (setq-default org-deadline-line-regexp org-deadline-line-regexp) 8960 (setq-default org-deadline-line-regexp org-deadline-line-regexp)
8840 (setq-default org-done-string org-done-string) 8961 (setq-default org-done-string org-done-string)
8841 (let* ((region-p (org-region-active-p)) 8962 (let* ((style org-export-html-style)
8963 (region-p (org-region-active-p))
8842 (region 8964 (region
8843 (buffer-substring 8965 (buffer-substring
8844 (if region-p (region-beginning) (point-min)) 8966 (if region-p (region-beginning) (point-min))
@@ -8859,6 +8981,10 @@ headlines. The default is 3. Lower levels will become bulleted lists."
8859 (options nil) 8981 (options nil)
8860 (quote-re (concat "^\\*+[ \t]*" org-quote-string "\\>")) 8982 (quote-re (concat "^\\*+[ \t]*" org-quote-string "\\>"))
8861 (inquote nil) 8983 (inquote nil)
8984 (infixed nil)
8985 (in-local-list nil)
8986 (local-list-num nil)
8987 (local-list-indent nil)
8862 (email user-mail-address) 8988 (email user-mail-address)
8863 (language org-export-default-language) 8989 (language org-export-default-language)
8864 (text nil) 8990 (text nil)
@@ -8875,6 +9001,7 @@ headlines. The default is 3. Lower levels will become bulleted lists."
8875 (coding-system-get coding-system 'mime-charset))) 9001 (coding-system-get coding-system 'mime-charset)))
8876 table-open type 9002 table-open type
8877 table-buffer table-orig-buffer 9003 table-buffer table-orig-buffer
9004 ind start-is-num starter
8878 ) 9005 )
8879 (message "Exporting...") 9006 (message "Exporting...")
8880 9007
@@ -8899,16 +9026,19 @@ headlines. The default is 3. Lower levels will become bulleted lists."
8899 9026
8900 ;; File header 9027 ;; File header
8901 (insert (format 9028 (insert (format
8902 "<html lang=\"%s\"><head> 9029 "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\"
9030 \"http://www.w3.org/TR/REC-html40/loose.dtd\">
9031<html lang=\"%s\"><head>
8903<title>%s</title> 9032<title>%s</title>
8904<meta http-equiv=\"Content-Type\" content=\"text/html;charset=%s\"> 9033<meta http-equiv=\"Content-Type\" content=\"text/html;charset=%s\">
8905<meta name=generator content=\"Org-mode\"> 9034<meta name=generator content=\"Org-mode\">
8906<meta name=generated content=\"%s %s\"> 9035<meta name=generated content=\"%s %s\">
8907<meta name=author content=\"%s\"> 9036<meta name=author content=\"%s\">
9037%s
8908</head><body> 9038</head><body>
8909" 9039"
8910 language (org-html-expand title) (or charset "iso-8859-1") 9040 language (org-html-expand title) (or charset "iso-8859-1")
8911 date time author)) 9041 date time author style))
8912 (if title (insert (concat "<H1 align=\"center\">" 9042 (if title (insert (concat "<H1 align=\"center\">"
8913 (org-html-expand title) "</H1>\n"))) 9043 (org-html-expand title) "</H1>\n")))
8914 (if author (insert (concat (nth 1 lang-words) ": " author "\n"))) 9044 (if author (insert (concat (nth 1 lang-words) ": " author "\n")))
@@ -8959,8 +9089,8 @@ headlines. The default is 3. Lower levels will become bulleted lists."
8959 (insert 9089 (insert
8960 (format 9090 (format
8961 (if todo 9091 (if todo
8962 "<li><a href=\"#sec-%d\"><span style='color:red'>%s</span></a></li>\n" 9092 "<li><a href=\"#sec-%d\"><span style='color:red'>%s</span></a>\n"
8963 "<li><a href=\"#sec-%d\">%s</a></li>\n") 9093 "<li><a href=\"#sec-%d\">%s</a>\n")
8964 head-count txt)) 9094 head-count txt))
8965 (setq org-last-level level)) 9095 (setq org-last-level level))
8966 )))) 9096 ))))
@@ -8973,15 +9103,30 @@ headlines. The default is 3. Lower levels will become bulleted lists."
8973 (org-init-section-numbers) 9103 (org-init-section-numbers)
8974 9104
8975 (while (setq line (pop lines) origline line) 9105 (while (setq line (pop lines) origline line)
8976 ;; end of quote? 9106 (catch 'nextline
8977 (when (and inquote (string-match "^\\*+" line)) 9107
8978 (insert "</pre>\n") 9108 ;; end of quote section?
8979 (setq inquote nil)) 9109 (when (and inquote (string-match "^\\*+" line))
8980 ;; inquote 9110 (insert "</pre>\n")
8981 (if inquote 9111 (setq inquote nil))
8982 (progn 9112 ;; inside a quote section?
8983 (insert line "\n") 9113 (when inquote
8984 (setq line (org-html-expand line))) ;;????? FIXME: not needed? 9114 (insert (org-html-protect line) "\n")
9115 (throw 'nextline nil))
9116
9117 ;; verbatim lines
9118 (when (and org-export-with-fixed-width
9119 (string-match "^[ \t]*:\\(.*\\)" line))
9120 (when (not infixed)
9121 (setq infixed t)
9122 (insert "<pre>\n"))
9123 (insert (org-html-protect (match-string 1 line)) "\n")
9124 (when (and lines
9125 (not (string-match "^[ \t]+\\(:.*\\)"
9126 (car lines))))
9127 (setq infixed nil)
9128 (insert "</pre>\n"))
9129 (throw 'nextline nil))
8985 9130
8986 ;; Protect the links 9131 ;; Protect the links
8987 (setq start 0) 9132 (setq start 0)
@@ -8991,121 +9136,145 @@ headlines. The default is 3. Lower levels will become bulleted lists."
8991 (concat "\000" (match-string 1 line) "\000") 9136 (concat "\000" (match-string 1 line) "\000")
8992 t t line))) 9137 t t line)))
8993 9138
8994 ;; replace "<" and ">" by "&lt;" and "&gt;" 9139 ;; replace "&" by "&amp;", "<" and ">" by "&lt;" and "&gt;"
8995 ;; handle @<..> HTML tags (replace "@&gt;..&lt;" by "<..>") 9140 ;; handle @<..> HTML tags (replace "@&gt;..&lt;" by "<..>")
8996 (setq line (org-html-expand line)) 9141 (setq line (org-html-expand line))
8997 9142
8998 ;; Verbatim lines 9143 ;; Format the links
8999 (if (and org-export-with-fixed-width 9144 (setq start 0)
9000 (string-match "^[ \t]*:\\(.*\\)" line)) 9145 (while (string-match org-protected-link-regexp line start)
9001 (progn 9146 (setq start (- (match-end 0) 2))
9002 (let ((l (match-string 1 line))) 9147 (setq type (match-string 1 line))
9003 (while (string-match " " l) 9148 (cond
9004 (setq l (replace-match "&nbsp;" t t l))) 9149 ((member type '("http" "https" "ftp" "mailto" "news"))
9005 (insert "\n<span style='font-family:Courier'>" 9150 ;; standard URL
9006 l "</span>" 9151 (setq line (replace-match
9007 (if (and lines
9008 (not (string-match "^[ \t]+\\(:.*\\)"
9009 (car lines))))
9010 "<br>\n" "\n"))))
9011
9012 (setq start 0)
9013 (while (string-match org-protected-link-regexp line start)
9014 (setq start (- (match-end 0) 2))
9015 (setq type (match-string 1 line))
9016 (cond
9017 ((member type '("http" "https" "ftp" "mailto" "news"))
9018 ;; standard URL
9019 (setq line (replace-match
9020 ; "<a href=\"\\1:\\2\">&lt;\\1:\\2&gt;</a>" 9152 ; "<a href=\"\\1:\\2\">&lt;\\1:\\2&gt;</a>"
9021 "<a href=\"\\1:\\2\">\\1:\\2</a>" 9153 "<a href=\"\\1:\\2\">\\1:\\2</a>"
9022 nil nil line))) 9154 nil nil line)))
9023 ((string= type "file") 9155 ((string= type "file")
9024 ;; FILE link 9156 ;; FILE link
9025 (let* ((filename (match-string 2 line)) 9157 (let* ((filename (match-string 2 line))
9026 (abs-p (file-name-absolute-p filename)) 9158 (abs-p (file-name-absolute-p filename))
9027 (thefile (if abs-p (expand-file-name filename) filename)) 9159 (thefile (if abs-p (expand-file-name filename) filename))
9028 (thefile (save-match-data 9160 (thefile (save-match-data
9029 (if (string-match ":[0-9]+$" thefile) 9161 (if (string-match ":[0-9]+$" thefile)
9030 (replace-match "" t t thefile) 9162 (replace-match "" t t thefile)
9031 thefile))) 9163 thefile)))
9032 (file-is-image-p 9164 (file-is-image-p
9033 (save-match-data 9165 (save-match-data
9034 (string-match (org-image-file-name-regexp) thefile)))) 9166 (string-match (org-image-file-name-regexp) thefile))))
9167 (setq line (replace-match
9168 (if (and org-export-html-inline-images
9169 file-is-image-p)
9170 (concat "<img src=\"" thefile "\"/>")
9171 (concat "<a href=\"" thefile "\">\\1:\\2</a>"))
9172 nil nil line))))
9173
9174 ((member type '("bbdb" "vm" "wl" "rmail" "gnus" "shell"))
9175 (setq line (replace-match
9176 "<i>&lt;\\1:\\2&gt;</i>" nil nil line)))))
9177
9178 ;; TODO items
9179 (if (and (string-match org-todo-line-regexp line)
9180 (match-beginning 2))
9181 (if (equal (match-string 2 line) org-done-string)
9035 (setq line (replace-match 9182 (setq line (replace-match
9036 (if (and org-export-html-inline-images 9183 "<span style='color:green'>\\2</span>"
9037 file-is-image-p) 9184 nil nil line 2))
9038 (concat "<img src=\"" thefile "\"/>") 9185 (setq line (replace-match "<span style='color:red'>\\2</span>"
9039 (concat "<a href=\"" thefile "\">\\1:\\2</a>")) 9186 nil nil line 2))))
9040 nil nil line))))
9041 9187
9042 ((member type '("bbdb" "vm" "wl" "rmail" "gnus" "shell")) 9188 ;; DEADLINES
9043 (setq line (replace-match 9189 (if (string-match org-deadline-line-regexp line)
9044 "<i>&lt;\\1:\\2&gt;</i>" nil nil line))))) 9190 (progn
9045 9191 (if (save-match-data
9046 ;; TODO items 9192 (string-match "<a href"
9047 (if (and (string-match org-todo-line-regexp line) 9193 (substring line 0 (match-beginning 0))))
9048 (match-beginning 2)) 9194 nil ; Don't do the replacement - it is inside a link
9049 (if (equal (match-string 2 line) org-done-string) 9195 (setq line (replace-match "<span style='color:red'>\\&</span>"
9050 (setq line (replace-match 9196 nil nil line 1)))))
9051 "<span style='color:green'>\\2</span>"
9052 nil nil line 2))
9053 (setq line (replace-match "<span style='color:red'>\\2</span>"
9054 nil nil line 2))))
9055
9056 ;; DEADLINES
9057 (if (string-match org-deadline-line-regexp line)
9058 (progn
9059 (if (save-match-data
9060 (string-match "<a href"
9061 (substring line 0 (match-beginning 0))))
9062 nil ; Don't do the replacement - it is inside a link
9063 (setq line (replace-match "<span style='color:red'>\\&</span>"
9064 nil nil line 1)))))
9065 9197
9198 (cond
9199 ((string-match "^\\(\\*+\\)[ \t]*\\(.*\\)" line)
9200 ;; This is a headline
9201 (setq level (- (match-end 1) (match-beginning 1))
9202 txt (match-string 2 line))
9203 (if (<= level umax) (setq head-count (+ head-count 1)))
9204 (when in-local-list
9205 ;; Close any local lists before inserting a new header line
9206 (while local-list-num
9207 (insert (if (car local-list-num) "</ol>\n" "</ul>"))
9208 (pop local-list-num))
9209 (setq local-list-indent nil
9210 in-local-list nil))
9211 (org-html-level-start level txt umax
9212 (and org-export-with-toc (<= level umax))
9213 head-count)
9214 ;; QUOTES
9215 (when (string-match quote-re line)
9216 (insert "<pre>")
9217 (setq inquote t)))
9218
9219 ((and org-export-with-tables
9220 (string-match "^\\([ \t]*\\)\\(|\\|\\+-+\\+\\)" line))
9221 (if (not table-open)
9222 ;; New table starts
9223 (setq table-open t table-buffer nil table-orig-buffer nil))
9224 ;; Accumulate lines
9225 (setq table-buffer (cons line table-buffer)
9226 table-orig-buffer (cons origline table-orig-buffer))
9227 (when (or (not lines)
9228 (not (string-match "^\\([ \t]*\\)\\(|\\|\\+-+\\+\\)"
9229 (car lines))))
9230 (setq table-open nil
9231 table-buffer (nreverse table-buffer)
9232 table-orig-buffer (nreverse table-orig-buffer))
9233 (insert (org-format-table-html table-buffer table-orig-buffer))))
9234 (t
9235 ;; Normal lines
9236 (when (and (> org-export-local-list-max-depth 0)
9237 (string-match
9238 "^\\( *\\)\\(\\([-+*]\\)\\|\\([0-9]+\\.\\)\\)? *\\([^ \t\n\r]\\)"
9239 line))
9240 (setq ind (- (match-end 1) (match-beginning 1))
9241 start-is-num (match-beginning 4)
9242 starter (if (match-beginning 2) (match-string 2 line)))
9243 (while (and in-local-list
9244 (or (and (= ind (car local-list-indent))
9245 (not starter))
9246 (< ind (car local-list-indent))))
9247 (insert (if (car local-list-num) "</ol>\n" "</ul>"))
9248 (pop local-list-num) (pop local-list-indent)
9249 (setq in-local-list local-list-indent))
9066 9250
9067 (cond 9251 (cond
9068 ((string-match "^\\(\\*+\\)[ \t]*\\(.*\\)" line) 9252 ((and starter
9069 ;; This is a headline 9253 (or (not in-local-list)
9070 (setq level (- (match-end 1) (match-beginning 1)) 9254 (> ind (car local-list-indent)))
9071 txt (match-string 2 line)) 9255 (< (length local-list-indent)
9072 (if (<= level umax) (setq head-count (+ head-count 1))) 9256 org-export-local-list-max-depth))
9073 (org-html-level-start level txt umax 9257 ;; Start new (level of ) list
9074 (and org-export-with-toc (<= level umax)) 9258 (insert (if start-is-num "<ol>\n<li>\n" "<ul>\n<li>\n"))
9075 head-count) 9259 (push start-is-num local-list-num)
9076 ;; QUOTES 9260 (push ind local-list-indent)
9077 (when (string-match quote-re line) 9261 (setq in-local-list t))
9078 (insert "<pre>") 9262 (starter
9079 (setq inquote t))) 9263 ;; continue current list
9080 9264 (insert "<li>\n")))
9081 ((and org-export-with-tables 9265 (setq line (substring line (match-beginning 5))))
9082 (string-match "^\\([ \t]*\\)\\(|\\|\\+-+\\+\\)" line)) 9266 ;; Empty lines start a new paragraph. If hand-formatted lists
9083 (if (not table-open) 9267 ;; are not fully interpreted, lines starting with "-", "+", "*"
9084 ;; New table starts 9268 ;; also start a new paragraph.
9085 (setq table-open t table-buffer nil table-orig-buffer nil)) 9269 (if (string-match "^ [-+*]-\\|^[ \t]*$" line) (insert "<p>"))
9086 ;; Accumulate lines 9270 (insert line (if org-export-preserve-breaks "<br>\n" "\n"))))
9087 (setq table-buffer (cons line table-buffer) 9271 ))
9088 table-orig-buffer (cons origline table-orig-buffer)) 9272 (if org-export-html-with-timestamp
9089 (when (or (not lines) 9273 (insert org-export-html-html-helper-timestamp))
9090 (not (string-match "^\\([ \t]*\\)\\(|\\|\\+-+\\+\\)" 9274 (insert "</body>\n</html>\n")
9091 (car lines)))) 9275 (normal-mode)
9092 (setq table-open nil 9276 (save-buffer)
9093 table-buffer (nreverse table-buffer) 9277 (goto-char (point-min)))))
9094 table-orig-buffer (nreverse table-orig-buffer))
9095 (insert (org-format-table-html table-buffer table-orig-buffer))))
9096 (t
9097 ;; Normal lines
9098 ;; Lines starting with "-", and empty lines make new paragraph.
9099 ;; FIXME: Should we add + and *?
9100 (if (string-match "^ *-\\|^[ \t]*$" line) (insert "<p>"))
9101 (insert line (if org-export-preserve-breaks "<br>\n" "\n"))))
9102 )))
9103 (if org-export-html-with-timestamp
9104 (insert org-export-html-html-helper-timestamp))
9105 (insert "</body>\n</html>\n")
9106 (normal-mode)
9107 (save-buffer)
9108 (goto-char (point-min)))))
9109 9278
9110(defun org-format-table-html (lines olines) 9279(defun org-format-table-html (lines olines)
9111 "Find out which HTML converter to use and return the HTML code." 9280 "Find out which HTML converter to use and return the HTML code."
@@ -9235,18 +9404,28 @@ But it has the disadvantage, that Org-mode's HTML conversions cannot be used."
9235 (set-buffer " org-tmp2 ") 9404 (set-buffer " org-tmp2 ")
9236 (buffer-substring (point-min) (point-max)))) 9405 (buffer-substring (point-min) (point-max))))
9237 9406
9407(defun org-html-protect (s)
9408 ;; convert & to &amp;, < to &lt; and > to &gt;
9409 (let ((start 0))
9410 (while (string-match "&" s start)
9411 (setq s (replace-match "&amp;" t t s)
9412 start (1+ (match-beginning 0))))
9413 (while (string-match "<" s)
9414 (setq s (replace-match "&lt;" t t s)))
9415 (while (string-match ">" s)
9416 (setq s (replace-match "&gt;" t t s))))
9417 s)
9418
9238(defun org-html-expand (string) 9419(defun org-html-expand (string)
9239 "Prepare STRING for HTML export. Applies all active conversions." 9420 "Prepare STRING for HTML export. Applies all active conversions."
9240 ;; First check if there is a link in the line - if yes, apply conversions 9421 ;; First check if there is a link in the line - if yes, apply conversions
9241 ;; only before the start of the link. 9422 ;; only before the start of the link.
9423 ;; FIXME: This is no longer correct, because links now have an end.
9242 (let* ((m (string-match org-link-regexp string)) 9424 (let* ((m (string-match org-link-regexp string))
9243 (s (if m (substring string 0 m) string)) 9425 (s (if m (substring string 0 m) string))
9244 (r (if m (substring string m) ""))) 9426 (r (if m (substring string m) "")))
9245 ;; convert < to &lt; and > to &gt; 9427 ;; convert & to &amp;, < to &lt; and > to &gt;
9246 (while (string-match "<" s) 9428 (setq s (org-html-protect s))
9247 (setq s (replace-match "&lt;" t t s)))
9248 (while (string-match ">" s)
9249 (setq s (replace-match "&gt;" t t s)))
9250 (if org-export-html-expand 9429 (if org-export-html-expand
9251 (while (string-match "@&lt;\\([^&]*\\)&gt;" s) 9430 (while (string-match "@&lt;\\([^&]*\\)&gt;" s)
9252 (setq s (replace-match "<\\1>" nil nil s)))) 9431 (setq s (replace-match "<\\1>" nil nil s))))
@@ -9446,9 +9625,6 @@ When LEVEL is non-nil, increase section numbers on that level."
9446 string)) 9625 string))
9447 9626
9448 9627
9449
9450
9451
9452(defun org-export-icalendar-this-file () 9628(defun org-export-icalendar-this-file ()
9453 "Export current file as an iCalendar file. 9629 "Export current file as an iCalendar file.
9454The iCalendar file will be located in the same directory as the Org-mode 9630The iCalendar file will be located in the same directory as the Org-mode
@@ -9496,7 +9672,7 @@ file and store it under the name `org-combined-agenda-icalendar-file'."
9496 (let ((standard-output ical-buffer)) 9672 (let ((standard-output ical-buffer))
9497 (if combine 9673 (if combine
9498 (and (not started) (setq started t) 9674 (and (not started) (setq started t)
9499 (org-start-icalendar-file "OrgMode")) 9675 (org-start-icalendar-file org-icalendar-combined-name))
9500 (org-start-icalendar-file category)) 9676 (org-start-icalendar-file category))
9501 (org-print-icalendar-entries combine category) 9677 (org-print-icalendar-entries combine category)
9502 (when (or (and combine (not files)) (not combine)) 9678 (when (or (and combine (not files)) (not combine))
@@ -9540,7 +9716,7 @@ When COMBINE is non nil, add the category to each line."
9540 donep (org-entry-is-done-p))) 9716 donep (org-entry-is-done-p)))
9541 (if (or (string-match org-tr-regexp hd) 9717 (if (or (string-match org-tr-regexp hd)
9542 (string-match org-ts-regexp hd)) 9718 (string-match org-ts-regexp hd))
9543 (setq hd (replace-match "" t t hd))) 9719 (setq hd (replace-match "" t t hd)))
9544 (if combine 9720 (if combine
9545 (setq hd (concat hd " (category " category ")"))) 9721 (setq hd (concat hd " (category " category ")")))
9546 (if deadlinep (setq hd (concat "DL: " hd " This is a deadline"))) 9722 (if deadlinep (setq hd (concat "DL: " hd " This is a deadline")))
@@ -9693,10 +9869,12 @@ a time), or the day by one (if it does not contain a time)."
9693(define-key org-mode-map "\C-c\C-y" 'org-evaluate-time-range) 9869(define-key org-mode-map "\C-c\C-y" 'org-evaluate-time-range)
9694(define-key org-mode-map "\C-c>" 'org-goto-calendar) 9870(define-key org-mode-map "\C-c>" 'org-goto-calendar)
9695(define-key org-mode-map "\C-c<" 'org-date-from-calendar) 9871(define-key org-mode-map "\C-c<" 'org-date-from-calendar)
9696(define-key org-mode-map "\C-c[" 'org-add-file) 9872(define-key org-mode-map [(control ?,)] 'org-cycle-agenda-files)
9873(define-key org-mode-map "\C-c[" 'org-agenda-file-to-front)
9697(define-key org-mode-map "\C-c]" 'org-remove-file) 9874(define-key org-mode-map "\C-c]" 'org-remove-file)
9698(define-key org-mode-map "\C-c\C-r" 'org-timeline) 9875(define-key org-mode-map "\C-c\C-r" 'org-timeline)
9699(define-key org-mode-map "\C-c-" 'org-table-insert-hline) 9876(define-key org-mode-map "\C-c-" 'org-table-insert-hline)
9877(define-key org-mode-map "\C-c^" 'org-table-sort-lines)
9700(define-key org-mode-map "\C-c\C-c" 'org-ctrl-c-ctrl-c) 9878(define-key org-mode-map "\C-c\C-c" 'org-ctrl-c-ctrl-c)
9701(define-key org-mode-map "\C-m" 'org-return) 9879(define-key org-mode-map "\C-m" 'org-return)
9702(define-key org-mode-map "\C-c?" 'org-table-current-column) 9880(define-key org-mode-map "\C-c?" 'org-table-current-column)
@@ -9807,7 +9985,7 @@ COMMANDS is a list of alternating OLDDEF NEWDEF command names."
9807 (if (fboundp 'command-remapping) 9985 (if (fboundp 'command-remapping)
9808 (define-key map (vector 'remap old) new) 9986 (define-key map (vector 'remap old) new)
9809 (substitute-key-definition old new map global-map))))) 9987 (substitute-key-definition old new map global-map)))))
9810 9988
9811(when (eq org-enable-table-editor 'optimized) 9989(when (eq org-enable-table-editor 'optimized)
9812 ;; If the user wants maximum table support, we need to hijack 9990 ;; If the user wants maximum table support, we need to hijack
9813 ;; some standard editing functions 9991 ;; some standard editing functions
@@ -10044,6 +10222,7 @@ See the individual commands for more information."
10044 ["Move Row Down" org-metadown (org-at-table-p)] 10222 ["Move Row Down" org-metadown (org-at-table-p)]
10045 ["Delete Row" org-shiftmetaup (org-at-table-p)] 10223 ["Delete Row" org-shiftmetaup (org-at-table-p)]
10046 ["Insert Row" org-shiftmetadown (org-at-table-p)] 10224 ["Insert Row" org-shiftmetadown (org-at-table-p)]
10225 ["Sort lines in region" org-table-sort-lines (org-at-table-p)]
10047 "--" 10226 "--"
10048 ["Insert Hline" org-table-insert-hline (org-at-table-p)]) 10227 ["Insert Hline" org-table-insert-hline (org-at-table-p)])
10049 ("Rectangle" 10228 ("Rectangle"
@@ -10185,8 +10364,9 @@ With optional NODE, go directly to that node."
10185 (append 10364 (append
10186 (list 10365 (list
10187 ["Edit File List" (customize-variable 'org-agenda-files) t] 10366 ["Edit File List" (customize-variable 'org-agenda-files) t]
10188 ["Add Current File to List" org-add-file t] 10367 ["Add/Move Current File to Front of List" org-agenda-file-to-front t]
10189 ["Remove Current File from List" org-remove-file t] 10368 ["Remove Current File from List" org-remove-file t]
10369 ["Cycle through agenda files" org-cycle-agenda-files t]
10190 "--") 10370 "--")
10191 (mapcar 'org-file-menu-entry org-agenda-files)))) 10371 (mapcar 'org-file-menu-entry org-agenda-files))))
10192 10372
@@ -10243,6 +10423,58 @@ With optional NODE, go directly to that node."
10243 (goto-char pos) 10423 (goto-char pos)
10244 (move-to-column col))) 10424 (move-to-column col)))
10245 10425
10426;; Paragraph filling stuff.
10427;; We want this to be just right, so use the full arsenal.
10428;; FIXME: This very likely does not work correctly for XEmacs, because the
10429;; filladapt package works slightly differently.
10430
10431(defun org-set-autofill-regexps ()
10432 (interactive)
10433 ;; In the paragraph separator we include headlines, because filling
10434 ;; text in a line directly attached to a headline would otherwise
10435 ;; fill the headline as well.
10436 (set (make-local-variable 'paragraph-separate) "\f\\|\\*\\|[ ]*$\\|[ \t]*[:|]")
10437 ;; The paragraph starter includes hand-formatted lists.
10438 (set (make-local-variable 'paragraph-start)
10439 "\f\\|[ ]*$\\|\\([*\f]+\\)\\|[ \t]*\\([-+*]\\|[0-9]+\\.[ \t]+\\)\\|[ \t]*[:|]")
10440 ;; Inhibit auto-fill for headers, tables and fixed-width lines.
10441 ;; But only if the user has not turned off tables or fixed-width regions
10442 (set (make-local-variable 'auto-fill-inhibit-regexp)
10443 (concat "\\*\\|#"
10444 (if (or org-enable-table-editor org-enable-fixed-width-editor)
10445 (concat
10446 "\\|[ \t]*["
10447 (if org-enable-table-editor "|" "")
10448 (if org-enable-fixed-width-editor ":" "")
10449 "]"))))
10450 ;; We use our own fill-paragraph function, to make sure that tables
10451 ;; and fixed-width regions are not wrapped. That function will pass
10452 ;; through to `fill-paragraph' when appropriate.
10453 (set (make-local-variable 'fill-paragraph-function) 'org-fill-paragraph)
10454 ;; Adaptive filling: To get full control, first make sure that
10455 ;; `adaptive-fill-regexp' never matches. Then install our won matcher.
10456 (setq adaptive-fill-regexp "\000")
10457 (setq adaptive-fill-function 'org-adaptive-fill-function))
10458
10459(defun org-fill-paragraph (&optional justify)
10460 "Re-align a table, pass through to fill-paragraph if no table."
10461 (let ((table-p (org-at-table-p))
10462 (table.el-p (org-at-table.el-p)))
10463 (cond ((equal (char-after (point-at-bol)) ?*) t) ; skip headlines
10464 (table.el-p t) ; skip table.el tables
10465 (table-p (org-table-align) t) ; align org-mode tables
10466 (t nil)))) ; call paragraph-fill
10467
10468;; For reference, this is the default value of adaptive-fill-regexp
10469;; "[ \t]*\\([-|#;>*]+[ \t]*\\|(?[0-9]+[.)][ \t]*\\)*"
10470
10471(defun org-adaptive-fill-function ()
10472 "Return a fill prefix for org-mode files.
10473In particular, this makes sure hanging paragraphs for hand-formatted lists
10474work correctly."
10475 (if (looking-at " *\\([-*+] \\|[0-9]+\\. \\)?")
10476 (make-string (- (match-end 0) (match-beginning 0)) ?\ )))
10477
10246;; Functions needed for Emacs/XEmacs region compatibility 10478;; Functions needed for Emacs/XEmacs region compatibility
10247 10479
10248(defun org-region-active-p () 10480(defun org-region-active-p ()
@@ -10474,3 +10706,4 @@ Show the heading too, if it is currently invisible."
10474 10706
10475;; arch-tag: e77da1a7-acc7-4336-b19e-efa25af3f9fd 10707;; arch-tag: e77da1a7-acc7-4336-b19e-efa25af3f9fd
10476;;; org.el ends here 10708;;; org.el ends here
10709
diff --git a/lisp/url/ChangeLog b/lisp/url/ChangeLog
index e0a68349ce1..9a8c8955fc5 100644
--- a/lisp/url/ChangeLog
+++ b/lisp/url/ChangeLog
@@ -1,3 +1,10 @@
12005-11-18 Stefan Monnier <monnier@iro.umontreal.ca>
2
3 * url-http.el: Use with-current-buffer.
4 (url-http-target-url): Rename from url-http-cookies-sources.
5 (url-http-parse-headers): Use it.
6 (url-http-handle-authentication): Use subst-char-in-string.
7
12005-11-16 Juergen Hoetzel <emacs@hoetzel.info> (tiny change) 82005-11-16 Juergen Hoetzel <emacs@hoetzel.info> (tiny change)
2 9
3 * url-handlers.el (url-insert-file-contents): Use the charset info 10 * url-handlers.el (url-insert-file-contents): Use the charset info
diff --git a/lisp/url/url-http.el b/lisp/url/url-http.el
index 39db321c080..725f4bc1c8a 100644
--- a/lisp/url/url-http.el
+++ b/lisp/url/url-http.el
@@ -26,10 +26,9 @@
26 26
27;;; Code: 27;;; Code:
28 28
29(eval-when-compile 29(eval-when-compile (require 'cl))
30 (require 'cl) 30(defvar url-http-extra-headers)
31 (defvar url-http-extra-headers) 31(defvar url-http-target-url)
32 (defvar url-http-cookies-sources))
33(require 'url-gw) 32(require 'url-gw)
34(require 'url-util) 33(require 'url-util)
35(require 'url-parse) 34(require 'url-parse)
@@ -320,16 +319,9 @@ This allows us to use `mail-fetch-field', etc."
320 " authentication. If you'd like to write it," 319 " authentication. If you'd like to write it,"
321 " send it to " url-bug-address ".<hr>") 320 " send it to " url-bug-address ".<hr>")
322 (setq status t)) 321 (setq status t))
323 (let* ((args auth) 322 (let* ((args (url-parse-args (subst-char-in-string ?, ?\; auth)))
324 (ctr (1- (length args))) 323 (auth (url-get-authentication url (cdr-safe (assoc "realm" args))
325 auth) 324 type t args)))
326 (while (/= 0 ctr)
327 (if (char-equal ?, (aref args ctr))
328 (aset args ctr ?\;))
329 (setq ctr (1- ctr)))
330 (setq args (url-parse-args args)
331 auth (url-get-authentication url (cdr-safe (assoc "realm" args))
332 type t args))
333 (if (not auth) 325 (if (not auth)
334 (setq success t) 326 (setq success t)
335 (push (cons (if proxy "Proxy-Authorization" "Authorization") auth) 327 (push (cons (if proxy "Proxy-Authorization" "Authorization") auth)
@@ -358,7 +350,7 @@ The buffer must already be narrowed to the headers, so mail-fetch-field will
358work correctly." 350work correctly."
359 (let ((cookies (mail-fetch-field "Set-Cookie" nil nil t)) 351 (let ((cookies (mail-fetch-field "Set-Cookie" nil nil t))
360 (cookies2 (mail-fetch-field "Set-Cookie2" nil nil t)) 352 (cookies2 (mail-fetch-field "Set-Cookie2" nil nil t))
361 (url-current-object url-http-cookies-sources)) 353 (url-current-object url-http-target-url))
362 (and cookies (url-http-debug "Found %d Set-Cookie headers" (length cookies))) 354 (and cookies (url-http-debug "Found %d Set-Cookie headers" (length cookies)))
363 (and cookies2 (url-http-debug "Found %d Set-Cookie2 headers" (length cookies2))) 355 (and cookies2 (url-http-debug "Found %d Set-Cookie2 headers" (length cookies2)))
364 (while cookies 356 (while cookies
@@ -510,8 +502,11 @@ should be shown to the user."
510 ;; non-fully-qualified URL (ie: /), which royally confuses 502 ;; non-fully-qualified URL (ie: /), which royally confuses
511 ;; the URL library. 503 ;; the URL library.
512 (if (not (string-match url-nonrelative-link redirect-uri)) 504 (if (not (string-match url-nonrelative-link redirect-uri))
513 (setq redirect-uri (url-expand-file-name redirect-uri))) 505 ;; Be careful to use the real target URL, otherwise we may
514 (let ((url-request-method url-http-method) 506 ;; compute the redirection relative to the URL of the proxy.
507 (setq redirect-uri
508 (url-expand-file-name redirect-uri url-http-target-url)))
509 (let ((url-request-method url-http-method)
515 (url-request-data url-http-data) 510 (url-request-data url-http-data)
516 (url-request-extra-headers url-http-extra-headers)) 511 (url-request-extra-headers url-http-extra-headers))
517 (url-retrieve redirect-uri url-callback-function 512 (url-retrieve redirect-uri url-callback-function
@@ -727,8 +722,7 @@ should be shown to the user."
727 (url-http-debug "url-http-end-of-document-sentinel in buffer (%s)" 722 (url-http-debug "url-http-end-of-document-sentinel in buffer (%s)"
728 (process-buffer proc)) 723 (process-buffer proc))
729 (url-http-idle-sentinel proc why) 724 (url-http-idle-sentinel proc why)
730 (save-excursion 725 (with-current-buffer (process-buffer proc)
731 (set-buffer (process-buffer proc))
732 (goto-char (point-min)) 726 (goto-char (point-min))
733 (if (not (looking-at "HTTP/")) 727 (if (not (looking-at "HTTP/"))
734 ;; HTTP/0.9 just gets passed back no matter what 728 ;; HTTP/0.9 just gets passed back no matter what
@@ -1039,8 +1033,7 @@ CBARGS as the arguments."
1039 (setq buffer nil) 1033 (setq buffer nil)
1040 (error "Could not create connection to %s:%d" (url-host url) 1034 (error "Could not create connection to %s:%d" (url-host url)
1041 (url-port url))) 1035 (url-port url)))
1042 (save-excursion 1036 (with-current-buffer buffer
1043 (set-buffer buffer)
1044 (mm-disable-multibyte) 1037 (mm-disable-multibyte)
1045 (setq url-current-object url 1038 (setq url-current-object url
1046 mode-line-format "%b [%s]") 1039 mode-line-format "%b [%s]")
@@ -1060,7 +1053,7 @@ CBARGS as the arguments."
1060 url-http-method 1053 url-http-method
1061 url-http-extra-headers 1054 url-http-extra-headers
1062 url-http-data 1055 url-http-data
1063 url-http-cookies-sources)) 1056 url-http-target-url))
1064 (set (make-local-variable var) nil)) 1057 (set (make-local-variable var) nil))
1065 1058
1066 (setq url-http-method (or url-request-method "GET") 1059 (setq url-http-method (or url-request-method "GET")
@@ -1073,9 +1066,9 @@ CBARGS as the arguments."
1073 url-callback-function callback 1066 url-callback-function callback
1074 url-callback-arguments cbargs 1067 url-callback-arguments cbargs
1075 url-http-after-change-function 'url-http-wait-for-headers-change-function 1068 url-http-after-change-function 'url-http-wait-for-headers-change-function
1076 url-http-cookies-sources (if (boundp 'proxy-object) 1069 url-http-target-url (if (boundp 'proxy-object)
1077 proxy-object 1070 proxy-object
1078 url-current-object)) 1071 url-current-object))
1079 1072
1080 (set-process-buffer connection buffer) 1073 (set-process-buffer connection buffer)
1081 (set-process-sentinel connection 'url-http-end-of-document-sentinel) 1074 (set-process-sentinel connection 'url-http-end-of-document-sentinel)
@@ -1096,8 +1089,7 @@ CBARGS as the arguments."
1096 (declare (special url-http-after-change-function)) 1089 (declare (special url-http-after-change-function))
1097 (and (process-buffer proc) 1090 (and (process-buffer proc)
1098 (/= (length data) 0) 1091 (/= (length data) 0)
1099 (save-excursion 1092 (with-current-buffer (process-buffer proc)
1100 (set-buffer (process-buffer proc))
1101 (url-http-debug "Calling after change function `%s' for `%S'" url-http-after-change-function proc) 1093 (url-http-debug "Calling after change function `%s' for `%S'" url-http-after-change-function proc)
1102 (funcall url-http-after-change-function 1094 (funcall url-http-after-change-function
1103 (point-max) 1095 (point-max)
@@ -1114,8 +1106,7 @@ CBARGS as the arguments."
1114 (defun url-http-symbol-value-in-buffer (symbol buffer 1106 (defun url-http-symbol-value-in-buffer (symbol buffer
1115 &optional unbound-value) 1107 &optional unbound-value)
1116 "Return the value of SYMBOL in BUFFER, or UNBOUND-VALUE if it is unbound." 1108 "Return the value of SYMBOL in BUFFER, or UNBOUND-VALUE if it is unbound."
1117 (save-excursion 1109 (with-current-buffer buffer
1118 (set-buffer buffer)
1119 (if (not (boundp symbol)) 1110 (if (not (boundp symbol))
1120 unbound-value 1111 unbound-value
1121 (symbol-value symbol)))) 1112 (symbol-value symbol))))
@@ -1198,10 +1189,9 @@ p3p
1198 (when (and buffer (= 2 (/ (url-http-symbol-value-in-buffer 1189 (when (and buffer (= 2 (/ (url-http-symbol-value-in-buffer
1199 'url-http-response-status buffer 0) 100))) 1190 'url-http-response-status buffer 0) 100)))
1200 ;; Only parse the options if we got a 2xx response code! 1191 ;; Only parse the options if we got a 2xx response code!
1201 (save-excursion 1192 (with-current-buffer buffer
1202 (save-restriction 1193 (save-restriction
1203 (save-match-data 1194 (save-match-data
1204 (set-buffer buffer)
1205 (mail-narrow-to-head) 1195 (mail-narrow-to-head)
1206 1196
1207 ;; Figure out what methods are supported. 1197 ;; Figure out what methods are supported.
diff --git a/lisp/widget.el b/lisp/widget.el
index 1985efb7cd6..f99429b5910 100644
--- a/lisp/widget.el
+++ b/lisp/widget.el
@@ -71,6 +71,7 @@
71;; :button-face-get :button-face :value-face :keymap :entry-from 71;; :button-face-get :button-face :value-face :keymap :entry-from
72;; :entry-to :help-echo :documentation-property :tab-order) 72;; :entry-to :help-echo :documentation-property :tab-order)
73 73
74(put 'define-widget 'doc-string-elt 3) ;`declare' doesn't work in functions.
74(defun define-widget (name class doc &rest args) 75(defun define-widget (name class doc &rest args)
75 "Define a new widget type named NAME from CLASS. 76 "Define a new widget type named NAME from CLASS.
76 77
@@ -85,7 +86,6 @@ create identical widgets:
85* (apply 'widget-create CLASS ARGS) 86* (apply 'widget-create CLASS ARGS)
86 87
87The third argument DOC is a documentation string for the widget." 88The third argument DOC is a documentation string for the widget."
88 (declare (doc-string 3))
89 (put name 'widget-type (cons class args)) 89 (put name 'widget-type (cons class args))
90 (put name 'widget-documentation doc) 90 (put name 'widget-documentation doc)
91 name) 91 name)
diff --git a/lispref/ChangeLog b/lispref/ChangeLog
index 3e07a51a007..12fb6e42460 100644
--- a/lispref/ChangeLog
+++ b/lispref/ChangeLog
@@ -1,3 +1,23 @@
12005-11-21 Juri Linkov <juri@jurta.org>
2
3 * customize.texi (Common Keywords): Update links types
4 custom-manual and url-link. Add link types emacs-library-link,
5 file-link, function-link, variable-link, custom-group-link.
6
72005-11-20 Chong Yidong <cyd@stupidchicken.com>
8
9 * display.texi: Revert 2005-11-20 change.
10
112005-11-20 Thien-Thi Nguyen <ttn@gnu.org>
12
13 * processes.texi (Bindat Functions):
14 Say "third" to refer to zero-based index "2".
15
162005-11-18 Luc Teirlinck <teirllm@auburn.edu>
17
18 * loading.texi (Library Search): Update the default value of
19 `load-suffixes'.
20
12005-11-17 Chong Yidong <cyd@stupidchicken.com> 212005-11-17 Chong Yidong <cyd@stupidchicken.com>
2 22
3 * display.texi (Attribute Functions): Mention :ignore-defface. 23 * display.texi (Attribute Functions): Mention :ignore-defface.
diff --git a/lispref/customize.texi b/lispref/customize.texi
index 176165294f9..1bf54f4f210 100644
--- a/lispref/customize.texi
+++ b/lispref/customize.texi
@@ -51,25 +51,50 @@ Include an external link after the documentation string for this item.
51This is a sentence containing an active field which references some 51This is a sentence containing an active field which references some
52other documentation. 52other documentation.
53 53
54There are four alternatives you can use for @var{link-data}: 54There are several alternatives you can use for @var{link-data}:
55 55
56@table @code 56@table @code
57@item (custom-manual @var{info-node}) 57@item (custom-manual @var{info-node})
58Link to an Info node; @var{info-node} is a string which specifies the 58Link to an Info node; @var{info-node} is a string which specifies the
59node name, as in @code{"(emacs)Top"}. The link appears as 59node name, as in @code{"(emacs)Top"}. The link appears as
60@samp{[manual]} in the customization buffer. 60@samp{[Manual]} in the customization buffer and enters the built-in
61Info reader on @var{info-node}.
61 62
62@item (info-link @var{info-node}) 63@item (info-link @var{info-node})
63Like @code{custom-manual} except that the link appears 64Like @code{custom-manual} except that the link appears
64in the customization buffer with the Info node name. 65in the customization buffer with the Info node name.
65 66
66@item (url-link @var{url}) 67@item (url-link @var{url})
67Link to a web page; @var{url} is a string which specifies the @acronym{URL}. 68Link to a web page; @var{url} is a string which specifies the
68The link appears in the customization buffer as @var{url}. 69@acronym{URL}. The link appears in the customization buffer as
70@var{url} and invokes the WWW browser specified by
71@var{browse-url-browser-function}.
69 72
70@item (emacs-commentary-link @var{library}) 73@item (emacs-commentary-link @var{library})
71Link to the commentary section of a library; @var{library} is a string 74Link to the commentary section of a library; @var{library} is a string
72which specifies the library name. 75which specifies the library name.
76
77@item (emacs-library-link @var{library})
78Link to an Emacs Lisp library file; @var{library} is a string which
79specifies the library name.
80
81@item (file-link @var{file})
82Link to a file; @var{file} is a string which specifies the name of the
83file to visit with @code{find-file} when the user invokes this link.
84
85@item (function-link @var{function})
86Link to the documentation of a function; @var{function} is a string
87which specifies the name of the function to describe with
88@code{describe-function} when the user invokes this link.
89
90@item (variable-link @var{variable})
91Link to the documentation of a variable; @var{variable} is a string
92which specifies the name of the variable to describe with
93@code{describe-variable} when the user invokes this link.
94
95@item (custom-group-link @var{group})
96Link to another customization group. Invoking it creates a new
97customization buffer for @var{group}.
73@end table 98@end table
74 99
75You can specify the text to use in the customization buffer by adding 100You can specify the text to use in the customization buffer by adding
diff --git a/lispref/display.texi b/lispref/display.texi
index 00d9313aa24..75a64924516 100644
--- a/lispref/display.texi
+++ b/lispref/display.texi
@@ -1859,11 +1859,6 @@ the first face fails to specify a particular attribute, that means the
1859next face gets a chance. However, the @code{default} face must 1859next face gets a chance. However, the @code{default} face must
1860specify all attributes. 1860specify all attributes.
1861 1861
1862 Any attribute can have the value @code{:ignore-defface}. The effect
1863of this is identical to @code{unspecified}. It exists because of an
1864technical ambiguity in giving attributes the value @code{unspecified}.
1865@xref{Attribute Functions}.
1866
1867 Some of these font attributes are meaningful only on certain kinds of 1862 Some of these font attributes are meaningful only on certain kinds of
1868displays---if your display cannot handle a certain attribute, the 1863displays---if your display cannot handle a certain attribute, the
1869attribute is ignored. (The attributes @code{:family}, @code{:width}, 1864attribute is ignored. (The attributes @code{:family}, @code{:width},
@@ -2056,14 +2051,6 @@ This function sets one or more attributes of face @var{face}
2056for frame @var{frame}. If @var{frame} is @code{nil}, it sets 2051for frame @var{frame}. If @var{frame} is @code{nil}, it sets
2057the attribute for all frames, and the defaults for new frames. 2052the attribute for all frames, and the defaults for new frames.
2058 2053
2059Unless you know what you're doing, don't set an attribute to
2060@code{unspecified}. This is ambiguous---it is unclear whether it
2061means to unspecify the value stored in the frame-local copies of the
2062face (which means reverting to the original face spec), or the value
2063in the face spec itself. What you probably want is to set the
2064attribute to @code{:ignore-defface}. This forces the attribute value
2065to be acquired from some other face during face merging.
2066
2067The extra arguments @var{arguments} specify the attributes to set, and 2054The extra arguments @var{arguments} specify the attributes to set, and
2068the values for them. They should consist of alternating attribute names 2055the values for them. They should consist of alternating attribute names
2069(such as @code{:family} or @code{:underline}) and corresponding values. 2056(such as @code{:family} or @code{:underline}) and corresponding values.
diff --git a/lispref/loading.texi b/lispref/loading.texi
index a9f3913bb84..260b96f6ccf 100644
--- a/lispref/loading.texi
+++ b/lispref/loading.texi
@@ -291,7 +291,8 @@ tells @code{locate-library} to display the file name in the echo area.
291@defvar load-suffixes 291@defvar load-suffixes
292This variable is a list of suffixes (strings) that @code{load} should 292This variable is a list of suffixes (strings) that @code{load} should
293try adding to the specified file name. The default value is 293try adding to the specified file name. The default value is
294@code{(".elc" ".el")}. There is no need to include the null suffix. 294@code{(".elc" ".elc.gz" ".el" ".el.gz" ".gz")}. There is no need to
295include the null suffix.
295@end defvar 296@end defvar
296 297
297@node Loading Non-ASCII 298@node Loading Non-ASCII
diff --git a/lispref/processes.texi b/lispref/processes.texi
index d63ddc4aa3e..624fd5f912f 100644
--- a/lispref/processes.texi
+++ b/lispref/processes.texi
@@ -2244,7 +2244,7 @@ arguments specify repeated lookup of sub-structures. An integer name
2244acts as an array index. 2244acts as an array index.
2245 2245
2246For example, if @var{name} is @code{(a b 2 c)}, that means to find 2246For example, if @var{name} is @code{(a b 2 c)}, that means to find
2247field @code{c} in the second element of subfield @code{b} of field 2247field @code{c} in the third element of subfield @code{b} of field
2248@code{a}. (This corresponds to @code{struct.a.b[2].c} in C.) 2248@code{a}. (This corresponds to @code{struct.a.b[2].c} in C.)
2249@end defun 2249@end defun
2250 2250
diff --git a/man/ChangeLog b/man/ChangeLog
index 55492a523f7..959fa4fcc41 100644
--- a/man/ChangeLog
+++ b/man/ChangeLog
@@ -1,3 +1,45 @@
12005-11-22 Nick Roberts <nickrob@snap.net.nz>
2
3 * building.texi (Watch Expressions): Expand description.
4 (Other GDB User Interface Buffers): Describe local map for
5 gud-watch.
6
72005-11-21 Chong Yidong <cyd@stupidchicken.com>
8
9 * display.texi (Font Lock): Font lock is enabled by default now.
10
112005-11-20 Juri Linkov <juri@jurta.org>
12
13 * basic.texi (Position Info): Update examples of the output.
14 Remove the fact that examples are produced in the TeXinfo buffer,
15 because in the Info reader users will get a different output from
16 `C-x ='.
17
18 * building.texi (Compilation Mode): Remove paragraph duplicated
19 from the node `Compilation'. Add `compilation-skip-threshold'.
20
21 * display.texi (Font Lock): Suggest more user-friendly method of
22 finding all Font Lock faces (M-x customize-group RET font-lock-faces).
23
242005-11-18 Richard M. Stallman <rms@gnu.org>
25
26 * files.texi (Registering): Mention @@ in mode line.
27
28 * mini.texi (Minibuffer File): Clarify previous change. Add @findex.
29
302005-11-08 Aaron S. Hawley <Aaron.Hawley@uvm.edu> (tiny change)
31
32 * files.texi (Renaming and VC): Some back-ends don't
33 handle renaming.
34
352005-11-18 Carsten Dominik <dominik@science.uva.nl>
36
37 * org.texi: (FAQ): Document `org-table-tab-jumps-over-hlines'.
38 (Agenda): Document commands `org-cycle-agenda-files' and
39 `org-agenda-file-to-front'
40 (Built-in table editor): Document `org-table-sort-lines'.
41 (HTML formatting): Export of hand-formatted lists.
42
12005-11-17 Juri Linkov <juri@jurta.org> 432005-11-17 Juri Linkov <juri@jurta.org>
2 44
3 * emacs.texi (Top): 45 * emacs.texi (Top):
@@ -71,7 +113,7 @@
71 (Installation): No installation necessary when using autoload. 113 (Installation): No installation necessary when using autoload.
72 (Configuration): Rename "RSS" to "news". 114 (Configuration): Rename "RSS" to "news".
73 115
742005-11-04 Ken Manheimer <ken.manheimer@gmail.com> 1162005-11-04 Ken Manheimer <ken.manheimer@gmail.com>
75 117
76 * pgg.texi (User Commands): Document additional passphrase 118 * pgg.texi (User Commands): Document additional passphrase
77 argument for pgg-encrypt-*, pgg-decrypt-*, and pgg-sign-* functions. 119 argument for pgg-encrypt-*, pgg-decrypt-*, and pgg-sign-* functions.
diff --git a/man/basic.texi b/man/basic.texi
index 2c78de612ad..e8c36d405c1 100644
--- a/man/basic.texi
+++ b/man/basic.texi
@@ -626,16 +626,12 @@ point and the character after it. It displays a line in the echo area
626that looks like this: 626that looks like this:
627 627
628@smallexample 628@smallexample
629Char: c (0143, 99, 0x63) point=21044 of 26883(78%) column 53 629Char: c (99, #o143, #x63) point=28062 of 36168 (78%) column=53
630@end smallexample 630@end smallexample
631 631
632@noindent
633(In fact, this is the output produced when point is before the
634@samp{column} in the example.)
635
636 The four values after @samp{Char:} describe the character that follows 632 The four values after @samp{Char:} describe the character that follows
637point, first by showing it and then by giving its character code in 633point, first by showing it and then by giving its character code in
638octal, decimal and hex. For a non-@acronym{ASCII} multibyte character, these are 634decimal, octal and hex. For a non-@acronym{ASCII} multibyte character, these are
639followed by @samp{file} and the character's representation, in hex, in 635followed by @samp{file} and the character's representation, in hex, in
640the buffer's coding system, if that coding system encodes the character 636the buffer's coding system, if that coding system encodes the character
641safely and with a single byte (@pxref{Coding Systems}). If the 637safely and with a single byte (@pxref{Coding Systems}). If the
@@ -654,7 +650,7 @@ as 2, and so on. The next, larger, number is the total number of characters
654in the buffer. Afterward in parentheses comes the position expressed as a 650in the buffer. Afterward in parentheses comes the position expressed as a
655percentage of the total size. 651percentage of the total size.
656 652
657 @samp{column} is followed by the horizontal position of point, in 653 @samp{column=} is followed by the horizontal position of point, in
658columns from the left edge of the window. 654columns from the left edge of the window.
659 655
660 If the buffer has been narrowed, making some of the text at the 656 If the buffer has been narrowed, making some of the text at the
@@ -663,7 +659,7 @@ additional text describing the currently accessible range. For example, it
663might display this: 659might display this:
664 660
665@smallexample 661@smallexample
666Char: C (0103, 67, 0x43) point=252 of 889(28%) <231 - 599> column 0 662Char: C (67, #o103, #x43) point=252 of 889 (28%) <231-599> column=0
667@end smallexample 663@end smallexample
668 664
669@noindent 665@noindent
@@ -676,7 +672,7 @@ part), the @w{@kbd{C-x =}} output does not describe a character after
676point. The output might look like this: 672point. The output might look like this:
677 673
678@smallexample 674@smallexample
679point=26957 of 26956(100%) column 0 675point=36169 of 36168 (EOB) column=0
680@end smallexample 676@end smallexample
681 677
682@cindex character set of character at point 678@cindex character set of character at point
@@ -720,16 +716,16 @@ displays the character as @samp{@`A}), and which has font-lock-mode
720(@pxref{Font Lock}) enabled: 716(@pxref{Font Lock}) enabled:
721 717
722@smallexample 718@smallexample
723 character: @`A (04300, 2240, 0x8c0, U+00C0) 719 character: @`A (2240, #o4300, #x8c0, U+00C0)
724 charset: latin-iso8859-1 720 charset: [latin-iso8859-1]
725 (Right-Hand Part of Latin Alphabet 1@dots{} 721 (Right-Hand Part of Latin Alphabet 1@dots{}
726 code point: 64 722 code point: [64]
727 syntax: w which means: word 723 syntax: w which means: word
728 category: l:Latin 724 category: l:Latin
729 to input: type "`A" 725 to input: type "`A" with [latin-1-prefix]
730buffer code: 0x81 0xC0 726buffer code: #x81 #xC0
731 file code: ESC 2C 41 40 (encoded by coding system iso-2022-7bit) 727 file code: ESC #x2C #x41 #x40 (encoded by coding system iso-2022-7bit)
732 display: terminal code 0xC0 728 display: terminal code #xC0
733 729
734There are text properties here: 730There are text properties here:
735 fontified t 731 fontified t
diff --git a/man/building.texi b/man/building.texi
index 218bba63900..5b63467de15 100644
--- a/man/building.texi
+++ b/man/building.texi
@@ -153,10 +153,6 @@ variable settings override the usual ones.
153mode, whose main feature is to provide a convenient way to look at the 153mode, whose main feature is to provide a convenient way to look at the
154source line where the error happened. 154source line where the error happened.
155 155
156 If you set the variable @code{compilation-scroll-output} to a
157non-@code{nil} value, then the compilation buffer always scrolls to
158follow output as it comes in.
159
160@table @kbd 156@table @kbd
161@item M-g M-n 157@item M-g M-n
162@itemx M-g n 158@itemx M-g n
@@ -215,6 +211,12 @@ commands advance from there. When @kbd{C-x `} gets to the end of the
215buffer and finds no more error messages to visit, it fails and signals 211buffer and finds no more error messages to visit, it fails and signals
216an Emacs error. 212an Emacs error.
217 213
214@vindex compilation-skip-threshold
215 By default, @kbd{C-x `} skips less important messages. The variable
216@code{compilation-skip-threshold} controls this. If its value is 2,
217@kbd{C-x `} skips anything less than error, 1 skips anything less
218than warning, and 0 doesn't skip any messages.
219
218When the left fringe is displayed, an arrow points to the 220When the left fringe is displayed, an arrow points to the
219current message in the compilation buffer. The variable 221current message in the compilation buffer. The variable
220@code{compilation-context-lines} controls the number of lines of 222@code{compilation-context-lines} controls the number of lines of
@@ -900,7 +902,11 @@ icon in the tool bar (@code{gud-watch}).
900 902
901Each watch expression is displayed in the speedbar. Complex data 903Each watch expression is displayed in the speedbar. Complex data
902types, such as arrays, structures and unions are represented in a tree 904types, such as arrays, structures and unions are represented in a tree
903format. To expand or contract a complex data type, click @kbd{Mouse-2} 905format. Leaves and simple data types show the name of the expression
906and its value, and display the type as a tooltip. Higher levels
907just show the name and the data type.
908
909To expand or contract a complex data type, click @kbd{Mouse-2}
904on the tag to the left of the expression. 910on the tag to the left of the expression.
905 911
906@findex gdb-var-delete 912@findex gdb-var-delete
@@ -947,8 +953,10 @@ The locals buffer displays the values of local variables of the
947current frame for simple data types (@pxref{Frame Info, Frame Info, 953current frame for simple data types (@pxref{Frame Info, Frame Info,
948Information on a frame, gdb, The GNU debugger}). 954Information on a frame, gdb, The GNU debugger}).
949 955
950Arrays and structures display their type only. You must display them 956Arrays and structures display their type only. Move point to their
951separately to examine their values. @xref{Watch Expressions}. 957type description ([struct/union] or [array]) and press @key{RET}, or
958alternatively click @kbd{Mouse-2} there, to examine their values.
959@xref{Watch Expressions}.
952 960
953@item Registers Buffer 961@item Registers Buffer
954@findex toggle-gdb-all-registers 962@findex toggle-gdb-all-registers
diff --git a/man/display.texi b/man/display.texi
index ea8bb79d83a..cc345b93b8f 100644
--- a/man/display.texi
+++ b/man/display.texi
@@ -258,37 +258,40 @@ Some special modes, such as Occur mode and Info mode, have completely
258specialized ways of assigning fonts for Font Lock mode. 258specialized ways of assigning fonts for Font Lock mode.
259 259
260@findex font-lock-mode 260@findex font-lock-mode
261@findex turn-on-font-lock 261 Font Lock mode is turned on by default in all modes which support it.
262 The command @kbd{M-x font-lock-mode} turns Font Lock mode on with 262You can toggle font-lock for each buffer with the command @kbd{M-x
263positive argument, off with negative or zero argument, and toggles the 263font-lock-mode}. Using a positive argument unconditionally turns Font
264mode when it has no argument. The function @code{turn-on-font-lock} 264Lock mode on, and a negative or zero argument turns it off.
265unconditionally enables Font Lock mode. This is useful in mode-hook
266functions. For example, to enable Font Lock mode whenever you edit a
267C file, you can do this:
268
269@example
270(add-hook 'c-mode-hook 'turn-on-font-lock)
271@end example
272 265
273@findex global-font-lock-mode 266@findex global-font-lock-mode
274@vindex global-font-lock-mode 267@vindex global-font-lock-mode
275 To turn on Font Lock mode automatically in all modes which support 268 If you do not wish Font Lock mode to be turned on by default,
276it, customize the variable @code{global-font-lock-mode} using the 269customize the variable @code{global-font-lock-mode} using the Customize
277Customize interface (@pxref{Easy Customization}) or use the function 270interface (@pxref{Easy Customization}), or use the function
278@code{global-font-lock-mode} in your @file{.emacs} file, like this: 271@code{global-font-lock-mode} in your @file{.emacs} file, like this:
279 272
280@example 273@example
281(global-font-lock-mode 1) 274(global-font-lock-mode 0)
282@end example 275@end example
283 276
284@noindent 277@noindent
285You can also specify this using the menu bar Options menu, specifying 278Global Font Lock mode can also be set using the menu bar Options menu,
286first Syntax Highlighting and then Save Options. 279specifying first Syntax Highlighting and then Save Options.
280
281@findex turn-on-font-lock
282 If you have disabled Global Font Lock mode, you can still enable font
283lock for specific major modes by adding the function
284@code{turn-on-font-lock} to the mode hooks (@pxref{Hooks}). For
285example, to enable Font Lock mode for editing C files, you can do this:
286
287@example
288(add-hook 'c-mode-hook 'turn-on-font-lock)
289@end example
287 290
288 Font Lock mode uses several specifically named faces to do its job, 291 Font Lock mode uses several specifically named faces to do its job,
289including @code{font-lock-string-face}, @code{font-lock-comment-face}, 292including @code{font-lock-string-face}, @code{font-lock-comment-face},
290and others. The easiest way to find them all is to use completion 293and others. The easiest way to find them all is to use
291on the face name in @code{set-face-foreground}. 294@kbd{M-x customize-group @key{RET} font-lock-faces @key{RET}}.
292 295
293 To change the colors or the fonts used by Font Lock mode to fontify 296 To change the colors or the fonts used by Font Lock mode to fontify
294different parts of text, just change these faces. There are 297different parts of text, just change these faces. There are
diff --git a/man/files.texi b/man/files.texi
index b42bf52fb39..f5adc28f168 100644
--- a/man/files.texi
+++ b/man/files.texi
@@ -1762,7 +1762,8 @@ this situation.
1762 If locking is in use, @kbd{C-x v i} leaves the file unlocked and 1762 If locking is in use, @kbd{C-x v i} leaves the file unlocked and
1763read-only. Type @kbd{C-x v v} if you wish to start editing it. After 1763read-only. Type @kbd{C-x v v} if you wish to start editing it. After
1764registering a file with CVS, you must subsequently commit the initial 1764registering a file with CVS, you must subsequently commit the initial
1765version by typing @kbd{C-x v v}. 1765version by typing @kbd{C-x v v}. Until you do that, the version
1766appears as @samp{@@@@} in the mode line.
1766 1767
1767@vindex vc-default-init-version 1768@vindex vc-default-init-version
1768@cindex initial version number to register 1769@cindex initial version number to register
@@ -2573,6 +2574,11 @@ mention the file, so that they use the new name; despite this, the
2573snapshot thus modified may not completely work (@pxref{Snapshot 2574snapshot thus modified may not completely work (@pxref{Snapshot
2574Caveats}). 2575Caveats}).
2575 2576
2577 Some backends do not provide an explicit rename operation to their
2578repositories. After issuing @code{vc-rename-file}, use @kbd{C-x v v}
2579on the original and renamed buffers and provide the necessary edit
2580log.
2581
2576 You cannot use @code{vc-rename-file} on a file that is locked by 2582 You cannot use @code{vc-rename-file} on a file that is locked by
2577someone else. 2583someone else.
2578 2584
diff --git a/man/mini.texi b/man/mini.texi
index 20295e86071..5264a13bd9a 100644
--- a/man/mini.texi
+++ b/man/mini.texi
@@ -105,12 +105,13 @@ Find File: /u2/emacs/src//etc/termcap
105@cindex // in file name 105@cindex // in file name
106@cindex double slash in file name 106@cindex double slash in file name
107@cindex slashes repeated in file name 107@cindex slashes repeated in file name
108@findex file-name-shadow-mode
108GNU Emacs gives a special meaning to a double slash (which is not 109GNU Emacs gives a special meaning to a double slash (which is not
109normally a useful thing to write): it means, ``ignore everything before 110normally a useful thing to write): it means, ``ignore everything
110the second slash in the pair.'' Thus, @samp{/u2/emacs/src/} is ignored 111before the second slash in the pair.'' Thus, @samp{/u2/emacs/src/} is
111in the example above, and you get the file @file{/etc/termcap}. 112ignored in the example above, and you get the file
112By default the ignored part of the file name is made dim if the 113@file{/etc/termcap}. The ignored part of the file name is dimmed if
113terminal allows it. This is affected by the 114the terminal allows it; to disable this, turn off
114@code{file-name-shadow-mode} minor mode. 115@code{file-name-shadow-mode} minor mode.
115 116
116 If you set @code{insert-default-directory} to @code{nil}, the default 117 If you set @code{insert-default-directory} to @code{nil}, the default
diff --git a/man/org.texi b/man/org.texi
index 88c22dc35a7..5a8d45638bd 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 3.19 7@set VERSION 3.20
8@set DATE October 2005 8@set DATE October 2005
9 9
10@dircategory Emacs 10@dircategory Emacs
@@ -698,6 +698,13 @@ Insert a new row above (with arg: below) the current row.
698Insert a horizontal line below current row. With prefix arg, the line 698Insert a horizontal line below current row. With prefix arg, the line
699is created above the current line. 699is created above the current line.
700 700
701@kindex C-c ^
702@item C-c ^
703Sort the table lines in the region. Point and mark must be in the first
704and last line to be included, and must be in the column that should be
705used for sorting. The command prompts for numerical versus
706alphnumerical sorting.
707
701@tsubheading{Regions} 708@tsubheading{Regions}
702@kindex C-c C-x M-w 709@kindex C-c C-x M-w
703@item C-c C-x M-w 710@item C-c C-x M-w
@@ -859,13 +866,13 @@ substitution takes place:
859@end example 866@end example
860 867
861The range vectors can be directly fed into the calc vector functions 868The range vectors can be directly fed into the calc vector functions
862like functions @samp{vmean} and @samp{vsum}. 869like @samp{vmean} and @samp{vsum}.
863 870
864@samp{$name} is interpreted as the name of a column, parameter or 871@samp{$name} is interpreted as the name of a column, parameter or
865constant. Constants are defined globally through the variable 872constant. Constants are defined globally through the variable
866@code{org-table-formula-constants}. If you have the 873@code{org-table-formula-constants}. If you have the
867@file{constants.el} package, it will also be used to resolve 874@file{constants.el} package, it will also be used to resolve
868constants, including natural constants like @samp{$k} for Planck's 875constants, including natural constants like @samp{$h} for Planck's
869constant, units like @samp{$km} for kilometers. Column names and 876constant, units like @samp{$km} for kilometers. Column names and
870parameters can be specified in special table lines. These are 877parameters can be specified in special table lines. These are
871described below, see @ref{Advanced features}. 878described below, see @ref{Advanced features}.
@@ -972,7 +979,7 @@ The marking characters have the following meaning:
972The fields in this line define names for the columns, so that you may 979The fields in this line define names for the columns, so that you may
973refer to a column as @samp{$Tot} instead of @samp{$6}. 980refer to a column as @samp{$Tot} instead of @samp{$6}.
974@item ^ 981@item ^
975This row define names for the fields @emph{above} the row. With such 982This row defines names for the fields @emph{above} the row. With such
976a definition, any formula in the table may use @samp{$m1} to refer to 983a definition, any formula in the table may use @samp{$m1} to refer to
977the value @samp{10}. Also, named fields can have their own formula 984the value @samp{10}. Also, named fields can have their own formula
978associated with them. 985associated with them.
@@ -1762,10 +1769,15 @@ following commands
1762@table @kbd 1769@table @kbd
1763@kindex C-c [ 1770@kindex C-c [
1764@item C-c [ 1771@item C-c [
1765Add current file to the list of agenda files 1772Add current file to the list of agenda files. The file is added to
1773the front of the list. If it was already in the list, it is moved to
1774the front. With prefix arg, file is added/moved to the end.
1766@kindex C-c ] 1775@kindex C-c ]
1767@item C-c ] 1776@item C-c ]
1768Remove current file from the list of agenda files. 1777Remove current file from the list of agenda files.
1778@kindex C-,
1779@item C-,
1780Cycle through agenda file list.
1769@end table 1781@end table
1770@noindent 1782@noindent
1771The Org menu contains the list of all files and can be used to quickly 1783The Org menu contains the list of all files and can be used to quickly
@@ -2202,7 +2214,9 @@ will not be exported.
2202@section HTML export 2214@section HTML export
2203@cindex HTML export 2215@cindex HTML export
2204 2216
2205Org-mode contains an HTML exporter with extensive HTML formatting. 2217Org-mode contains an HTML exporter with extensive HTML formatting, in
2218ways similar to John Grubers @emph{markdown} language, but with
2219additional support for tables.
2206 2220
2207@cindex region, active 2221@cindex region, active
2208@cindex active region 2222@cindex active region
@@ -2246,6 +2260,34 @@ Not all text is transferred literally to the exported HTML file. The
2246exporter implements the following interpretation: 2260exporter implements the following interpretation:
2247 2261
2248@itemize @bullet 2262@itemize @bullet
2263
2264@cindex hand-formatted lists
2265@cindex lists, hand-formatted
2266@item
2267Hand-formatted lists with @samp{-}, @samp{*} or @samp{+} as
2268bullet@footnote{When using @samp{*} as a bullet, lines must be
2269indented or they will be seen as top-level headlines.}, or
2270with @samp{1.}, @samp{2.} as enumerator will be recognized and
2271transformed into HTML lists. The
2272lists is terminated by the next headline, or by a line that is
2273indented like the bullet/enumerator in the first line, or less. For
2274example:
2275@example
2276** Lord of the Rings
2277Some of my favorite scenes are
2278- Eowyns fight
2279- The attack of the Roherim
2280 (this may be favorite one)
2281- Peter Jackson being shot by Legolas,
2282 in the extended DVD edition only
2283My favorite characters are (in this sequence):
2284 1. Sam
2285 2. Eowyn
2286 3. Aragorn
2287Among the others I don't really have a preference.
2288@end example
2289By default, only no nesting of lists is allowed, but see the variable
2290@code{org-export-local-list-max-depth}.
2249@cindex underlined text 2291@cindex underlined text
2250@cindex bold text 2292@cindex bold text
2251@cindex italic text 2293@cindex italic text
@@ -2337,6 +2379,26 @@ toc: @r{turn on/off table of contents}
2337TeX: @r{turn on/off @TeX{} macros} 2379TeX: @r{turn on/off @TeX{} macros}
2338@end example 2380@end example
2339 2381
2382You can also give style information for the exported file. The
2383default specification can be configured through the option
2384@code{org-export-html-style}. If you want to use a file-local style,
2385you may use file variables, best wrapped into a COMMENT section at the
2386end of the outline tree. For example:
2387
2388@example
2389* COMMENT HTML style specifications
2390
2391# Local Variables:
2392# org-export-html-style: " <style type=\"text/css\">
2393 p @{font-weight: normal; color: gray; @}
2394 h1 @{color: black; @}
2395 </style>"
2396# End: ***
2397@end example
2398
2399Remember to execute @kbd{M-x normal-mode} after changing this to make
2400the new style visible to Emacs.
2401
2340@node Comment lines, , Export options, HTML export 2402@node Comment lines, , Export options, HTML export
2341@subsection Comment lines 2403@subsection Comment lines
2342@cindex comment lines 2404@cindex comment lines
@@ -2532,6 +2594,7 @@ horizontal line in the table, pressing TAB creates a new table line
2532@i{before} the horizontal line. How can I quickly move to the line 2594@i{before} the horizontal line. How can I quickly move to the line
2533@i{below} the horizontal line instead?}@* 2595@i{below} the horizontal line instead?}@*
2534Press @key{down} (to get on the separator line) and then @key{TAB}. 2596Press @key{down} (to get on the separator line) and then @key{TAB}.
2597Or configure the variable @code{org-table-tab-jumps-over-hlines}.
2535 2598
2536@item @b{How can I change the indentation of an entire table without 2599@item @b{How can I change the indentation of an entire table without
2537fixing every line by hand?}@* 2600fixing every line by hand?}@*
@@ -2649,13 +2712,13 @@ Here is a list of things which should work differently, but which I
2649have found too hard to fix. 2712have found too hard to fix.
2650 2713
2651@itemize @bullet 2714@itemize @bullet
2652@item 2715@c @item
2653If you call @code{fill-paragraph} (bound to @kbd{M-q}) in a table, the 2716@c If you call @code{fill-paragraph} (bound to @kbd{M-q}) in a table, the
2654filling is correctly disabled. However, if some text directly 2717@c filling is correctly disabled. However, if some text directly
2655(without an empty line in between) precedes or follows a table, calling 2718@c (without an empty line in between) precedes or follows a table, calling
2656@code{fill-paragraph} in that text will also fill the table like 2719@c @code{fill-paragraph} in that text will also fill the table like
2657normal text. Also, @code{fill-region} does bypass the 2720@c normal text. Also, @code{fill-region} does bypass the
2658@code{fill-paragraph} code and will fill tables like normal text. 2721@c @code{fill-paragraph} code and will fill tables like normal text.
2659@item 2722@item
2660Text in an entry protected with the @samp{QUOTE} keyword should not 2723Text in an entry protected with the @samp{QUOTE} keyword should not
2661autowrap. 2724autowrap.
diff --git a/nt/INSTALL b/nt/INSTALL
index ed960b06bdd..2fb673d47d2 100644
--- a/nt/INSTALL
+++ b/nt/INSTALL
@@ -29,50 +29,26 @@
29 29
30 To compile Emacs, you will need either Microsoft Visual C++ 2.0 or 30 To compile Emacs, you will need either Microsoft Visual C++ 2.0 or
31 later and nmake, or a Windows port of GCC 2.95 or later with MinGW 31 later and nmake, or a Windows port of GCC 2.95 or later with MinGW
32 and W32 API support and a port of GNU make. You can use the Cygwin 32 and W32 API support and a port of GNU Make. You can use the Cygwin
33 ports of GCC, but Emacs requires the MinGW headers and libraries to 33 ports of GCC, but Emacs requires the MinGW headers and libraries to
34 build (latest versions of the Cygwin toolkit, at least since v1.3.3, 34 build (latest versions of the Cygwin toolkit, at least since v1.3.3,
35 include the MinGW headers and libraries as an integral part). 35 include the MinGW headers and libraries as an integral part).
36 36
37 Other compilers may work, but specific reports from people that have 37 If you use the MinGW port of GCC and GNU Make to build Emacs, there
38 tried suggest that the Intel C compiler (for example) may produce an 38 are some compatibility issues wrt Make and the shell that is run by
39 Emacs executable with strange filename completion behaviour. Unless 39 Make, either the standard COMMAND.COM/CMD.EXE supplied with Windows
40 you would like to assist by finding and fixing the cause of any bugs 40 or sh.exe., a port of a Unixy shell. For reference, here is a list
41 like this, we recommend the use of the supported compilers mentioned 41 of which builds of GNU Make are known to work or not, and whether
42 in the previous paragraph. 42 they work in the presence and/or absence of sh.exe, the Cygwin port
43 43 of Bash. Note that any version of Make that is compiled with Cygwin
44 You will also need a copy of the Posix cp, rm and mv programs. These 44 will only work with Cygwin tools, due to the use of cygwin style
45 and other useful Posix utilities can be obtained from one of several 45 paths. This means Cygwin Make is unsuitable for building parts of
46 projects: 46 Emacs that need to invoke Emacs itself (leim and "make bootstrap",
47 47 for example). Also see the Trouble-shooting section below if you
48 * http://www.mingw.org/ ( MinGW ) 48 decide to go ahead and use Cygwin make.
49 * http://www.cygwin.com/ ( Cygwin )
50 * http://unxutils.sourceforge.net/ ( UnxUtils )
51 * http://gnuwin32.sourceforge.net/ ( GnuWin32 )
52
53 If you build Emacs on Windows 9X or ME, not on Windows 2K/XP or
54 Windows NT, we suggest to install the Cygwin port of Bash.
55
56 Additional instructions and help for building Emacs on Windows can be
57 found at the Emacs Wiki:
58
59 http://www.emacswiki.org/cgi-bin/wiki/WThirtyTwoInstallationKit
60
61 and at this URL:
62
63 http://ourcomments.org/Emacs/w32-build-emacs.html
64
65 For reference, here is a list of which builds of GNU make are known
66 to work or not, and whether they work in the presence and/or absence
67 of sh.exe, the Cygwin port of Bash. Note that any version of make
68 that is compiled with Cygwin will only work with Cygwin tools, due to
69 the use of cygwin style paths. This means Cygwin make is unsuitable
70 for building parts of Emacs that need to invoke Emacs itself (leim and
71 "make bootstrap", for example). Also see the Trouble-shooting section
72 below if you decide to go ahead and use Cygwin make.
73 49
74 In addition, using 4NT as your shell is known to fail the build process, 50 In addition, using 4NT as your shell is known to fail the build process,
75 at least for 4NT version 3.01. Use cmd.exe, the default NT shell, 51 at least for 4NT version 3.01. Use CMD.EXE, the default Windows shell,
76 instead. MSYS sh.exe also appears to cause various problems. If you have 52 instead. MSYS sh.exe also appears to cause various problems. If you have
77 MSYS installed, try "make SHELL=cmd.exe" to force the use of cmd.exe 53 MSYS installed, try "make SHELL=cmd.exe" to force the use of cmd.exe
78 instead of sh.exe. 54 instead of sh.exe.
@@ -102,6 +78,34 @@
102 May work if building emacs without leim. 78 May work if building emacs without leim.
103 [6] please report if you try this combination. 79 [6] please report if you try this combination.
104 80
81 Other compilers may work, but specific reports from people that have
82 tried suggest that the Intel C compiler (for example) may produce an
83 Emacs executable with strange filename completion behaviour. Unless
84 you would like to assist by finding and fixing the cause of any bugs
85 like this, we recommend the use of the supported compilers mentioned
86 in the previous paragraph.
87
88 You will also need a copy of the Posix cp, rm and mv programs. These
89 and other useful Posix utilities can be obtained from one of several
90 projects:
91
92 * http://www.mingw.org/ ( MinGW )
93 * http://www.cygwin.com/ ( Cygwin )
94 * http://unxutils.sourceforge.net/ ( UnxUtils )
95 * http://gnuwin32.sourceforge.net/ ( GnuWin32 )
96
97 If you build Emacs on Windows 9X or ME, not on Windows 2K/XP or
98 Windows NT, we suggest to install the Cygwin port of Bash.
99
100 Additional instructions and help for building Emacs on Windows can be
101 found at the Emacs Wiki:
102
103 http://www.emacswiki.org/cgi-bin/wiki/WThirtyTwoInstallationKit
104
105 and at this URL:
106
107 http://ourcomments.org/Emacs/w32-build-emacs.html
108
105* Configuring 109* Configuring
106 110
107 Configuration of Emacs is now handled by running configure.bat in the 111 Configuration of Emacs is now handled by running configure.bat in the
diff --git a/src/.gdbinit b/src/.gdbinit
index 3f7755a3d8e..7af2f7d5721 100644
--- a/src/.gdbinit
+++ b/src/.gdbinit
@@ -1,4 +1,4 @@
1# Copyright (C) 1992, 93, 94, 95, 96, 97, 1998, 2000, 01, 2004 1# Copyright (C) 1992, 93, 94, 95, 96, 97, 1998, 2000, 01, 2004, 2005
2# Free Software Foundation, Inc. 2# Free Software Foundation, Inc.
3# 3#
4# This file is part of GNU Emacs. 4# This file is part of GNU Emacs.
@@ -628,7 +628,7 @@ Print the contents of $, assuming it is an Emacs Lisp cons.
628end 628end
629 629
630define nextcons 630define nextcons
631 p $.cdr 631 p $.u.cdr
632 xcons 632 xcons
633end 633end
634document nextcons 634document nextcons
@@ -648,7 +648,7 @@ end
648define xcdr 648define xcdr
649 xgetptr $ 649 xgetptr $
650 xgettype $ 650 xgettype $
651 print/x ($type == Lisp_Cons ? ((struct Lisp_Cons *) $ptr)->cdr : 0) 651 print/x ($type == Lisp_Cons ? ((struct Lisp_Cons *) $ptr)->u.cdr : 0)
652end 652end
653document xcdr 653document xcdr
654Print the cdr of $, assuming it is an Emacs Lisp pair. 654Print the cdr of $, assuming it is an Emacs Lisp pair.
@@ -656,7 +656,7 @@ end
656 656
657define xfloat 657define xfloat
658 xgetptr $ 658 xgetptr $
659 print ((struct Lisp_Float *) $ptr)->data 659 print ((struct Lisp_Float *) $ptr)->u.data
660end 660end
661document xfloat 661document xfloat
662Print $ assuming it is a lisp floating-point number. 662Print $ assuming it is a lisp floating-point number.
diff --git a/src/ChangeLog b/src/ChangeLog
index 1a9fd720167..105a03a2b8c 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,46 @@
12005-11-21 Ken Raeburn <raeburn@mit.edu>
2
3 * keymap.c (shadow_lookup): Use make_number to pass a number to
4 Fsubstring.
5
62005-11-21 Juri Linkov <juri@jurta.org>
7
8 * puresize.h (BASE_PURESIZE): Increment to 1180000.
9
102005-11-20 Chong Yidong <cyd@stupidchicken.com>
11
12 * xfaces.c (Finternal_set_lisp_face_attribute): Use
13 :ignore-defface for new frame defaults when `unspecified' is
14 supplied.
15 (Finternal_get_lisp_face_attribute): Hide :ignore-defface.
16 (merge_face_vectors): Don't do :ignore-defface overwriting here.
17 (Finternal_merge_in_global_face): Do it here.
18
192005-11-20 Juri Linkov <juri@jurta.org>
20
21 * charset.c (invalid_character): Use Lisp-readable syntax
22 for octal and hex. Reorder decimal, octal and hex values.
23
242005-11-20 Nick Roberts <nickrob@snap.net.nz>
25
26 * lisp.h: Use typedef when Lisp_Object is EMACS_INT so that
27 this type is recognised when debugging.
28
292005-11-19 Andreas Schwab <schwab@suse.de>
30
31 * .gdbinit (nextcons, xcdr, xfloat): Update for changes in
32 Lisp_Cons and Lisp_Float.
33
342005-11-19 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
35
36 * macterm.c [USE_CG_TEXT_DRAWING] (cg_text_anti_aliasing_threshold):
37 New variable.
38 [USE_CG_TEXT_DRAWING] (init_cg_text_anti_aliasing_threshold): New
39 function.
40 (init_font_name_table) [USE_ATSUI && USE_CG_TEXT_DRAWING]: Use it.
41 [USE_CG_TEXT_DRAWING] (mac_draw_string_cg): Don't do antialiasing if
42 font size is smaller than or equal to cg_text_anti_aliasing_threshold.
43
12005-11-17 Chong Yidong <cyd@stupidchicken.com> 442005-11-17 Chong Yidong <cyd@stupidchicken.com>
2 45
3 * image.c (x_create_bitmap_from_xpm_data): Free attributes on 46 * image.c (x_create_bitmap_from_xpm_data): Free attributes on
diff --git a/src/charset.c b/src/charset.c
index b4f84a9e785..23b2cc75c1f 100644
--- a/src/charset.c
+++ b/src/charset.c
@@ -115,7 +115,7 @@ void
115invalid_character (c) 115invalid_character (c)
116 int c; 116 int c;
117{ 117{
118 error ("Invalid character: 0%o, %d, 0x%x", c, c, c); 118 error ("Invalid character: %d, #o%o, #x%x", c, c, c);
119} 119}
120 120
121/* Parse string STR of length LENGTH and fetch information of a 121/* Parse string STR of length LENGTH and fetch information of a
diff --git a/src/image.c b/src/image.c
index c7bc71ee909..d020b2ac394 100644
--- a/src/image.c
+++ b/src/image.c
@@ -3755,7 +3755,7 @@ x_create_bitmap_from_xpm_data (f, bits)
3755 XpmFreeAttributes (&attrs); 3755 XpmFreeAttributes (&attrs);
3756 return id; 3756 return id;
3757} 3757}
3758#endif /* HAVE_X_WINDOWS */ 3758#endif /* defined (HAVE_XPM) && defined (HAVE_X_WINDOWS) */
3759 3759
3760/* Load image IMG which will be displayed on frame F. Value is 3760/* Load image IMG which will be displayed on frame F. Value is
3761 non-zero if successful. */ 3761 non-zero if successful. */
diff --git a/src/keymap.c b/src/keymap.c
index a19b0102127..a6d5ccbbc2d 100644
--- a/src/keymap.c
+++ b/src/keymap.c
@@ -2372,7 +2372,8 @@ shadow_lookup (shadow, key, flag)
2372 value = Flookup_key (XCAR (tail), key, flag); 2372 value = Flookup_key (XCAR (tail), key, flag);
2373 if (NATNUMP (value)) 2373 if (NATNUMP (value))
2374 { 2374 {
2375 value = Flookup_key (XCAR (tail), Fsubstring (key, 0, value), flag); 2375 value = Flookup_key (XCAR (tail),
2376 Fsubstring (key, make_number (0), value), flag);
2376 if (!NILP (value)) 2377 if (!NILP (value))
2377 return Qnil; 2378 return Qnil;
2378 } 2379 }
diff --git a/src/lisp.h b/src/lisp.h
index 767e97a94a6..f440f104cb9 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -253,7 +253,7 @@ LISP_MAKE_RVALUE (Lisp_Object o)
253/* If union type is not wanted, define Lisp_Object as just a number. */ 253/* If union type is not wanted, define Lisp_Object as just a number. */
254 254
255#ifdef NO_UNION_TYPE 255#ifdef NO_UNION_TYPE
256#define Lisp_Object EMACS_INT 256typedef EMACS_INT Lisp_Object;
257#define LISP_MAKE_RVALUE(o) (0+(o)) 257#define LISP_MAKE_RVALUE(o) (0+(o))
258#endif /* NO_UNION_TYPE */ 258#endif /* NO_UNION_TYPE */
259 259
diff --git a/src/macterm.c b/src/macterm.c
index 169e3d60855..6c74e429726 100644
--- a/src/macterm.c
+++ b/src/macterm.c
@@ -867,6 +867,19 @@ mac_draw_image_string_16 (f, gc, x, y, buf, nchars)
867#if USE_CG_TEXT_DRAWING 867#if USE_CG_TEXT_DRAWING
868static XCharStruct *x_per_char_metric P_ ((XFontStruct *, XChar2b *)); 868static XCharStruct *x_per_char_metric P_ ((XFontStruct *, XChar2b *));
869 869
870static int cg_text_anti_aliasing_threshold = 8;
871
872static void
873init_cg_text_anti_aliasing_threshold ()
874{
875 Lisp_Object val =
876 Fmac_get_preference (build_string ("AppleAntiAliasingThreshold"),
877 Qnil, Qnil, Qnil);
878
879 if (INTEGERP (val))
880 cg_text_anti_aliasing_threshold = XINT (val);
881}
882
870static int 883static int
871mac_draw_string_cg (f, gc, x, y, buf, nchars) 884mac_draw_string_cg (f, gc, x, y, buf, nchars)
872 struct frame *f; 885 struct frame *f;
@@ -915,6 +928,8 @@ mac_draw_string_cg (f, gc, x, y, buf, nchars)
915 1.0); 928 1.0);
916 CGContextSetFont (context, GC_FONT (gc)->cg_font); 929 CGContextSetFont (context, GC_FONT (gc)->cg_font);
917 CGContextSetFontSize (context, GC_FONT (gc)->mac_fontsize); 930 CGContextSetFontSize (context, GC_FONT (gc)->mac_fontsize);
931 if (GC_FONT (gc)->mac_fontsize <= cg_text_anti_aliasing_threshold)
932 CGContextSetShouldAntialias (context, false);
918#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1030 933#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1030
919 CGContextSetTextPosition (context, gx, gy); 934 CGContextSetTextPosition (context, gx, gy);
920 CGContextShowGlyphsWithAdvances (context, glyphs, advances, nchars); 935 CGContextShowGlyphsWithAdvances (context, glyphs, advances, nchars);
@@ -6784,6 +6799,9 @@ init_font_name_table ()
6784 text_encoding_info_alist = create_text_encoding_info_alist (); 6799 text_encoding_info_alist = create_text_encoding_info_alist ();
6785 6800
6786#if USE_ATSUI 6801#if USE_ATSUI
6802#if USE_CG_TEXT_DRAWING
6803 init_cg_text_anti_aliasing_threshold ();
6804#endif
6787 if (!NILP (assq_no_quit (make_number (kTextEncodingMacUnicode), 6805 if (!NILP (assq_no_quit (make_number (kTextEncodingMacUnicode),
6788 text_encoding_info_alist))) 6806 text_encoding_info_alist)))
6789 { 6807 {
diff --git a/src/xfaces.c b/src/xfaces.c
index 647cf7bb337..c096b15ba1f 100644
--- a/src/xfaces.c
+++ b/src/xfaces.c
@@ -3593,8 +3593,6 @@ merge_face_vectors (f, from, to, named_merge_points)
3593 { 3593 {
3594 if (i == LFACE_HEIGHT_INDEX && !INTEGERP (from[i])) 3594 if (i == LFACE_HEIGHT_INDEX && !INTEGERP (from[i]))
3595 to[i] = merge_face_heights (from[i], to[i], to[i]); 3595 to[i] = merge_face_heights (from[i], to[i], to[i]);
3596 else if (IGNORE_DEFFACE_P (from[i]))
3597 to[i] = Qunspecified;
3598 else 3596 else
3599 to[i] = from[i]; 3597 to[i] = from[i];
3600 } 3598 }
@@ -4071,7 +4069,18 @@ FRAME 0 means change the face on all frames, and change the default
4071 4069
4072 /* Set lface to the Lisp attribute vector of FACE. */ 4070 /* Set lface to the Lisp attribute vector of FACE. */
4073 if (EQ (frame, Qt)) 4071 if (EQ (frame, Qt))
4074 lface = lface_from_face_name (NULL, face, 1); 4072 {
4073 lface = lface_from_face_name (NULL, face, 1);
4074
4075 /* When updating face-new-frame-defaults, we put :ignore-defface
4076 where the caller wants `unspecified'. This forces the frame
4077 defaults to ignore the defface value. Otherwise, the defface
4078 will take effect, which is generally not what is intended.
4079 The value of that attribute will be inherited from some other
4080 face during face merging. See internal_merge_in_global_face. */
4081 if (UNSPECIFIEDP (value))
4082 value = Qignore_defface;
4083 }
4075 else 4084 else
4076 { 4085 {
4077 if (NILP (frame)) 4086 if (NILP (frame))
@@ -4897,6 +4906,9 @@ frames). If FRAME is omitted or nil, use the selected frame. */)
4897 else 4906 else
4898 signal_error ("Invalid face attribute name", keyword); 4907 signal_error ("Invalid face attribute name", keyword);
4899 4908
4909 if (IGNORE_DEFFACE_P (value))
4910 return Qunspecified;
4911
4900 return value; 4912 return value;
4901} 4913}
4902 4914
@@ -4979,7 +4991,10 @@ Default face attributes override any local face attributes. */)
4979 gvec = XVECTOR (global_lface)->contents; 4991 gvec = XVECTOR (global_lface)->contents;
4980 for (i = 1; i < LFACE_VECTOR_SIZE; ++i) 4992 for (i = 1; i < LFACE_VECTOR_SIZE; ++i)
4981 if (! UNSPECIFIEDP (gvec[i])) 4993 if (! UNSPECIFIEDP (gvec[i]))
4982 lvec[i] = gvec[i]; 4994 if (IGNORE_DEFFACE_P (gvec[i]))
4995 lvec[i] = Qunspecified;
4996 else
4997 lvec[i] = gvec[i];
4983 4998
4984 return Qnil; 4999 return Qnil;
4985} 5000}