aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaroly Lorentey2006-03-22 15:16:06 +0000
committerKaroly Lorentey2006-03-22 15:16:06 +0000
commitd4717700cc0b7af6197c19e22bd912e3b1ed67ee (patch)
tree4e2a630584b23f670aff57a512a8f2d8182e39c4
parentf1be5774242454844bf21fbf32e0f6541e2add34 (diff)
parentd63cd76657e12b92a5d7736a15bc9b97a7f9990e (diff)
downloademacs-d4717700cc0b7af6197c19e22bd912e3b1ed67ee.tar.gz
emacs-d4717700cc0b7af6197c19e22bd912e3b1ed67ee.zip
Merged from emacs@sv.gnu.org
Patches applied: * emacs@sv.gnu.org/emacs--devo--0--patch-160 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-161 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-162 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-163 Merge from gnus--rel--5.10 * emacs@sv.gnu.org/emacs--devo--0--patch-164 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-165 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-166 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-167 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-168 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-169 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-170 Merge from gnus--rel--5.10 * emacs@sv.gnu.org/emacs--devo--0--patch-171 Update from CVS: man/mh-e.texi (Folders): Various edits. * emacs@sv.gnu.org/emacs--devo--0--patch-172 Update from CVS * emacs@sv.gnu.org/gnus--rel--5.10--patch-58 Update from CVS * emacs@sv.gnu.org/gnus--rel--5.10--patch-59 Update from CVS * emacs@sv.gnu.org/gnus--rel--5.10--patch-60 Update from CVS * emacs@sv.gnu.org/gnus--rel--5.10--patch-61 Update from CVS * emacs@sv.gnu.org/gnus--rel--5.10--patch-62 Merge from emacs--devo--0 * emacs@sv.gnu.org/gnus--rel--5.10--patch-63 Update from CVS * emacs@sv.gnu.org/gnus--rel--5.10--patch-64 Update from CVS git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-534
-rw-r--r--ChangeLog8
-rw-r--r--Makefile.in26
-rw-r--r--etc/ChangeLog4
-rw-r--r--etc/DEBUG40
-rw-r--r--etc/NEWS20
-rw-r--r--etc/orgcard.tex4
-rw-r--r--lib-src/ChangeLog5
-rwxr-xr-xlib-src/vcdiff4
-rw-r--r--lisp/ChangeLog709
-rw-r--r--lisp/cus-edit.el14
-rw-r--r--lisp/custom.el3
-rw-r--r--lisp/diff-mode.el2
-rw-r--r--lisp/emulation/cua-rect.el8
-rw-r--r--lisp/files.el15
-rw-r--r--lisp/font-lock.el11
-rw-r--r--lisp/gnus/ChangeLog62
-rw-r--r--lisp/gnus/gnus-agent.el2
-rw-r--r--lisp/gnus/gnus-art.el34
-rw-r--r--lisp/gnus/gnus-util.el3
-rw-r--r--lisp/gnus/message.el4
-rw-r--r--lisp/gnus/mm-decode.el52
-rw-r--r--lisp/gnus/mm-extern.el104
-rw-r--r--lisp/gnus/mm-uu.el3
-rw-r--r--lisp/gnus/nnimap.el18
-rw-r--r--lisp/gnus/smiley.el1
-rw-r--r--lisp/gnus/spam.el16
-rw-r--r--lisp/help-mode.el61
-rw-r--r--lisp/ido.el140
-rw-r--r--lisp/image.el80
-rw-r--r--lisp/international/mule.el5
-rw-r--r--lisp/isearch.el15
-rw-r--r--lisp/iswitchb.el1
-rw-r--r--lisp/jit-lock.el6
-rw-r--r--lisp/locate.el104
-rw-r--r--lisp/mail/rmail.el8
-rw-r--r--lisp/mh-e/ChangeLog39
-rw-r--r--lisp/mh-e/mh-comp.el26
-rw-r--r--lisp/mh-e/mh-compat.el80
-rw-r--r--lisp/mh-e/mh-e.el31
-rw-r--r--lisp/mh-e/mh-folder.el5
-rw-r--r--lisp/mh-e/mh-letter.el8
-rw-r--r--lisp/mh-e/mh-utils.el7
-rw-r--r--lisp/mouse.el19
-rw-r--r--lisp/pgg-gpg.el83
-rw-r--r--lisp/progmodes/gdb-ui.el98
-rw-r--r--lisp/progmodes/grep.el7
-rw-r--r--lisp/progmodes/gud.el39
-rw-r--r--lisp/simple.el3
-rw-r--r--lisp/sort.el3
-rw-r--r--lisp/term/w32-win.el12
-rw-r--r--lisp/textmodes/bibtex.el99
-rw-r--r--lisp/textmodes/ispell.el7
-rw-r--r--lisp/textmodes/org.el32
-rw-r--r--lispref/ChangeLog47
-rw-r--r--lispref/display.texi27
-rw-r--r--lispref/modes.texi10
-rw-r--r--lispref/text.texi22
-rw-r--r--lispref/tips.texi4
-rw-r--r--man/ChangeLog91
-rw-r--r--man/Makefile.in1
-rw-r--r--man/abbrevs.texi2
-rw-r--r--man/emacs-xtra.texi1183
-rw-r--r--man/emacs.texi37
-rw-r--r--man/files.texi135
-rw-r--r--man/gnus.texi2
-rw-r--r--man/help.texi20
-rw-r--r--man/maintaining.texi388
-rw-r--r--man/makefile.w32-in1
-rw-r--r--man/mh-e.texi284
-rw-r--r--man/org.texi2
-rw-r--r--man/picture.texi277
-rw-r--r--man/programs.texi519
-rw-r--r--man/sending.texi2
-rw-r--r--man/text.texi6
-rw-r--r--nt/INSTALL92
-rw-r--r--src/ChangeLog161
-rw-r--r--src/dispextern.h3
-rw-r--r--src/dispnew.c7
-rw-r--r--src/fileio.c1
-rw-r--r--src/fringe.c16
-rw-r--r--src/image.c73
-rw-r--r--src/keymap.c1
-rw-r--r--src/m/mips.h21
-rw-r--r--src/m/pmax.h14
-rw-r--r--src/macterm.c145
-rw-r--r--src/sheap.c6
-rw-r--r--src/unexelf.c82
-rw-r--r--src/w32fns.c8
-rw-r--r--src/window.c4
-rw-r--r--src/xdisp.c49
-rw-r--r--src/xfns.c3
-rw-r--r--src/xterm.c24
-rw-r--r--src/xterm.h1
93 files changed, 3675 insertions, 2286 deletions
diff --git a/ChangeLog b/ChangeLog
index 50ba76a774b..d10a3aef1a4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
12006-03-18 Claudio Fontana <claudio@gnu.org>
2
3 * Makefile.in (INFO_FILES): New variable, contains all Info file names.
4 (install-arch-indep, uninstall): Use $(INFO_FILES) to specify files
5 to be installed/uninstalled.
6 (uninstall): Invoke "$(INSTALL_INFO) --remove" to remove references
7 to Info files installed by Emacs.
8
12006-03-03 Claudio Fontana <claudio@gnu.org> 92006-03-03 Claudio Fontana <claudio@gnu.org>
2 10
3 * Makefile.in (install, uninstall): Add DESTDIR variable to 11 * Makefile.in (install, uninstall): Add DESTDIR variable to
diff --git a/Makefile.in b/Makefile.in
index f4478308a42..e89159f4a3e 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -134,6 +134,11 @@ man1dir=$(mandir)/man1
134# since there are now many packages documented with the texinfo 134# since there are now many packages documented with the texinfo
135# system, it is inappropriate to imply that it is part of Emacs. 135# system, it is inappropriate to imply that it is part of Emacs.
136infodir=@infodir@ 136infodir=@infodir@
137INFO_FILES=ada-mode autotype calc ccmode cl dired-x ebrowse ediff efaq \
138 elisp eintr emacs emacs-mime emacs-xtra eshell eudc flymake \
139 forms gnus idlwave info message mh-e newsticker org pcl-cvs \
140 pgg reftex sc ses sieve speedbar tramp vip viper widget \
141 woman smtpmail url rcirc erc
137 142
138# Directory for local state files for all programs. 143# Directory for local state files for all programs.
139localstatedir=@localstatedir@ 144localstatedir=@localstatedir@
@@ -497,19 +502,20 @@ install-arch-indep: mkdir info
497 chmod a+r $(DESTDIR)${infodir}/dir); \ 502 chmod a+r $(DESTDIR)${infodir}/dir); \
498 fi; \ 503 fi; \
499 cd ${srcdir}/info ; \ 504 cd ${srcdir}/info ; \
500 for f in ada-mode* autotype* calc* ccmode* cl* dired-x* ebrowse* ediff* efaq* eintr* elisp* emacs* emacs-mime* emacs-xtra* eshell* eudc* flymake* forms* gnus* idlwave* info* message* mh-e* newsticker* org* pcl-cvs* pgg* reftex* sc* ses* sieve* speedbar* tramp* vip* widget* woman* smtpmail* url* rcirc* erc*; do \ 505 for elt in $(INFO_FILES); do \
501 (cd $${thisdir}; \ 506 for f in `ls $$elt $$elt-[1-9] $$elt-[1-9][0-9] 2>/dev/null`; do \
502 ${INSTALL_DATA} ${srcdir}/info/$$f $(DESTDIR)${infodir}/$$f; \ 507 ${INSTALL_DATA} $$f $(DESTDIR)${infodir}/$$f; \
503 chmod a+r $(DESTDIR)${infodir}/$$f); \ 508 chmod a+r $(DESTDIR)${infodir}/$$f; \
509 done; \
504 done); \ 510 done); \
505 else true; fi 511 else true; fi
506 -unset CDPATH; \ 512 -unset CDPATH; \
507 thisdir=`/bin/pwd`; \ 513 thisdir=`/bin/pwd`; \
508 if [ `(cd ${srcdir}/info && /bin/pwd)` != `(cd $(DESTDIR)${infodir} && /bin/pwd)` ]; \ 514 if [ `(cd ${srcdir}/info && /bin/pwd)` != `(cd $(DESTDIR)${infodir} && /bin/pwd)` ]; \
509 then \ 515 then \
510 for f in ada-mode autotype calc ccmode cl dired-x ebrowse ediff efaq elisp eintr emacs emacs-mime emacs-xtra eshell eudc flymake forms gnus idlwave info message mh-e newsticker org pcl-cvs pgg reftex sc ses sieve speedbar tramp vip viper widget woman smtpmail url rcirc erc; do \ 516 for elt in $(INFO_FILES); do \
511 (cd $${thisdir}; \ 517 (cd $${thisdir}; \
512 ${INSTALL_INFO} --info-dir=$(DESTDIR)${infodir} $(DESTDIR)${infodir}/$$f); \ 518 ${INSTALL_INFO} --info-dir=$(DESTDIR)${infodir} $(DESTDIR)${infodir}/$$elt); \
513 done; \ 519 done; \
514 else true; fi 520 else true; fi
515 -chmod -R a+r $(DESTDIR)${datadir}/emacs ${COPYDESTS} $(DESTDIR)${infodir} 521 -chmod -R a+r $(DESTDIR)${datadir}/emacs ${COPYDESTS} $(DESTDIR)${infodir}
@@ -573,7 +579,13 @@ uninstall:
573 done 579 done
574 (cd $(DESTDIR)${archlibdir} && rm -f fns-*) 580 (cd $(DESTDIR)${archlibdir} && rm -f fns-*)
575 -rm -rf $(DESTDIR)${libexecdir}/emacs/${version} 581 -rm -rf $(DESTDIR)${libexecdir}/emacs/${version}
576 (cd $(DESTDIR)${infodir} && rm -f cl* ada-mode* autotype* calc* ccmode* ebrowse* efaq* eintr elisp* eshell* eudc* idlwave* message* pcl-cvs* reftex* speedbar* tramp* widget* woman* dired-x* ediff* emacs* emacs-xtra* flymake* forms* gnus* info* mh-e* newsticker* org* sc* ses* vip* smtpmail* url* rcirc* erc*) 582 (cd $(DESTDIR)${infodir} && \
583 for elt in $(INFO_FILES); do \
584 $(INSTALL_INFO) --remove --info-dir=. $$elt; \
585 for f in `ls $$elt $$elt-[1-9] $$elt-[1-9][0-9] 2>/dev/null`; do \
586 rm -f $$f; \
587 done; \
588 done;)
577 (cd $(DESTDIR)${man1dir} && rm -f emacs${manext} emacsclient${manext} etags${manext} ctags${manext}) 589 (cd $(DESTDIR)${man1dir} && rm -f emacs${manext} emacsclient${manext} etags${manext} ctags${manext})
578 (cd $(DESTDIR)${bindir} && rm -f $(EMACSFULL) $(EMACS)) 590 (cd $(DESTDIR)${bindir} && rm -f $(EMACSFULL) $(EMACS))
579 591
diff --git a/etc/ChangeLog b/etc/ChangeLog
index ae722f53ecb..391c072ca7b 100644
--- a/etc/ChangeLog
+++ b/etc/ChangeLog
@@ -1,3 +1,7 @@
12006-03-15 Carsten Dominik <dominik@science.uva.nl>
2
3 * orgcard.tex: Version number change only.
4
12006-03-15 Nick Roberts <nickrob@snap.net.nz> 52006-03-15 Nick Roberts <nickrob@snap.net.nz>
2 6
3 * DEBUG (Note): Describe features for debugging with GDB in Emacs. 7 * DEBUG (Note): Describe features for debugging with GDB in Emacs.
diff --git a/etc/DEBUG b/etc/DEBUG
index 5b4ccc0f964..b8edb12e474 100644
--- a/etc/DEBUG
+++ b/etc/DEBUG
@@ -506,22 +506,44 @@ the machine where you started GDB and use the debugger from there.
506The array `last_marked' (defined on alloc.c) can be used to display up 506The array `last_marked' (defined on alloc.c) can be used to display up
507to 500 last objects marked by the garbage collection process. 507to 500 last objects marked by the garbage collection process.
508Whenever the garbage collector marks a Lisp object, it records the 508Whenever the garbage collector marks a Lisp object, it records the
509pointer to that object in the `last_marked' array. The variable 509pointer to that object in the `last_marked' array, which is maintained
510`last_marked_index' holds the index into the `last_marked' array one 510as a circular buffer. The variable `last_marked_index' holds the
511place beyond where the pointer to the very last marked object is 511index into the `last_marked' array one place beyond where the pointer
512stored. 512to the very last marked object is stored.
513 513
514The single most important goal in debugging GC problems is to find the 514The single most important goal in debugging GC problems is to find the
515Lisp data structure that got corrupted. This is not easy since GC 515Lisp data structure that got corrupted. This is not easy since GC
516changes the tag bits and relocates strings which make it hard to look 516changes the tag bits and relocates strings which make it hard to look
517at Lisp objects with commands such as `pr'. It is sometimes necessary 517at Lisp objects with commands such as `pr'. It is sometimes necessary
518to convert Lisp_Object variables into pointers to C struct's manually. 518to convert Lisp_Object variables into pointers to C struct's manually.
519Use the `last_marked' array and the source to reconstruct the sequence
520that objects were marked.
521 519
522Once you discover the corrupted Lisp object or data structure, it is 520Use the `last_marked' array and the source to reconstruct the sequence
523useful to look at it in a fresh Emacs session and compare its contents 521that objects were marked. In general, you need to correlate the
524with a session that you are debugging. 522values recorded in the `last_marked' array with the corresponding
523stack frames in the backtrace, beginning with the innermost frame.
524Some subroutines of `mark_object' are invoked recursively, others loop
525over portions of the data structure and mark them as they go. By
526looking at the code of those routines and comparing the frames in the
527backtrace with the values in `last_marked', you will be able to find
528connections between the values in `last_marked'. E.g., when GC finds
529a cons cell, it recursively marks its car and its cdr. Similar things
530happen with properties of symbols, elements of vectors, etc. Use
531these connections to reconstruct the data structure that was being
532marked, paying special attention to the strings and names of symbols
533that you encounter: these strings and symbol names can be used to grep
534the sources to find out what high-level symbols and global variables
535are involved in the crash.
536
537Once you discover the corrupted Lisp object or data structure, grep
538the sources for its uses and try to figure out what could cause the
539corruption. If looking at the sources doesn;t help, you could try
540setting a watchpoint on the corrupted data, and see what code modifies
541it in some invalid way. (Obviously, this technique is only useful for
542data that is modified only very rarely.)
543
544It is also useful to look at the corrupted object or data structure in
545a fresh Emacs session and compare its contents with a session that you
546are debugging.
525 547
526** Debugging problems with non-ASCII characters 548** Debugging problems with non-ASCII characters
527 549
diff --git a/etc/NEWS b/etc/NEWS
index b7d93fe51bb..02635fae29d 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -159,6 +159,10 @@ in the other directories in `load-path'. (-L is short for --directory.)
159** The command line option --no-windows has been changed to 159** The command line option --no-windows has been changed to
160--no-window-system. The old one still works, but is deprecated. 160--no-window-system. The old one still works, but is deprecated.
161 161
162---
163** If the environment variable DISPLAY specifies an unreachable X display,
164Emacs will now startup as if invoked with the --no-window-system option.
165
162+++ 166+++
163** The -f option, used from the command line to call a function, 167** The -f option, used from the command line to call a function,
164now reads arguments for the function interactively if it is 168now reads arguments for the function interactively if it is
@@ -320,6 +324,11 @@ cycle for each frame, using the frame-local buffer list.
320converts whitespace around point to N spaces. 324converts whitespace around point to N spaces.
321 325
322--- 326---
327** C-x 5 C-o displays a specified buffer in another frame
328but does not switch to that frame. It's the multi-frame
329analogue of C-x 4 C-o.
330
331---
323** New commands to operate on pairs of open and close characters: 332** New commands to operate on pairs of open and close characters:
324`insert-pair', `delete-pair', `raise-sexp'. 333`insert-pair', `delete-pair', `raise-sexp'.
325 334
@@ -873,11 +882,6 @@ fontification in Info, remove `turn-on-font-lock' from
873`Info-mode-hook'. 882`Info-mode-hook'.
874 883
875+++ 884+++
876*** font-lock-lines-before specifies a number of lines before the
877current line that should be refontified when you change the buffer.
878The default value is 1.
879
880+++
881*** font-lock: in modes like C and Lisp where the fontification assumes that 885*** font-lock: in modes like C and Lisp where the fontification assumes that
882an open-paren in column 0 is always outside of any string or comment, 886an open-paren in column 0 is always outside of any string or comment,
883font-lock now highlights any such open-paren-in-column-zero in bold-red 887font-lock now highlights any such open-paren-in-column-zero in bold-red
@@ -2597,6 +2601,12 @@ of BibTeX entry to kill ring (bound to C-c C-t).
2597bibtex-autokey-expand-strings control the expansion of strings when 2601bibtex-autokey-expand-strings control the expansion of strings when
2598extracting the content of a BibTeX field. 2602extracting the content of a BibTeX field.
2599 2603
2604*** The variables `bibtex-autokey-name-case-convert' and
2605`bibtex-autokey-titleword-case-convert' have been renamed to
2606`bibtex-autokey-name-case-convert-function' and
2607`bibtex-autokey-titleword-case-convert-function'. The old names are
2608still available as aliases.
2609
2600+++ 2610+++
2601** In Enriched mode, `set-left-margin' and `set-right-margin' are now 2611** In Enriched mode, `set-left-margin' and `set-right-margin' are now
2602by default bound to `C-c [' and `C-c ]' instead of the former `C-c C-l' 2612by default bound to `C-c [' and `C-c ]' instead of the former `C-c C-l'
diff --git a/etc/orgcard.tex b/etc/orgcard.tex
index 1f520df353d..cca7e525d91 100644
--- a/etc/orgcard.tex
+++ b/etc/orgcard.tex
@@ -1,4 +1,4 @@
1% Reference Card for Org Mode 4.09 1% Reference Card for Org Mode 4.10
2% 2%
3%**start of header 3%**start of header
4\newcount\columnsperpage 4\newcount\columnsperpage
@@ -58,7 +58,7 @@
58% Thanks to Paul Rubin, Bob Chassell, Len Tower, and Richard Mlynarik 58% Thanks to Paul Rubin, Bob Chassell, Len Tower, and Richard Mlynarik
59% for their many good ideas. 59% for their many good ideas.
60 60
61\def\orgversionnumber{4.09} 61\def\orgversionnumber{4.10}
62\def\year{2006} 62\def\year{2006}
63 63
64\def\shortcopyrightnotice{\vskip 1ex plus 2 fill 64\def\shortcopyrightnotice{\vskip 1ex plus 2 fill
diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog
index e4e74030200..f59f7296359 100644
--- a/lib-src/ChangeLog
+++ b/lib-src/ChangeLog
@@ -1,3 +1,8 @@
12006-03-18 Andre Spiegel <spiegel@gnu.org>
2
3 * vcdiff: Use "echo" as a default for $echo, otherwise we'll
4 execute $DIFF twice, and once with the wrong options.
5
12006-02-23 Claudio Fontana <claudio@gnu.org> 62006-02-23 Claudio Fontana <claudio@gnu.org>
2 7
3 * Makefile.in (install, uninstall): Add DESTDIR variable to 8 * Makefile.in (install, uninstall): Add DESTDIR variable to
diff --git a/lib-src/vcdiff b/lib-src/vcdiff
index 52fdaee0f7f..2cba89df421 100755
--- a/lib-src/vcdiff
+++ b/lib-src/vcdiff
@@ -29,7 +29,7 @@ usage="$0: Usage: vcdiff [--brief] [-q] [-r<sid1>] [-r<sid2>] [diffopts] sccsfil
29 29
30PATH=$PATH:/usr/ccs/bin:/usr/sccs:/usr/xpg4/bin # common SCCS hangouts 30PATH=$PATH:/usr/ccs/bin:/usr/sccs:/usr/xpg4/bin # common SCCS hangouts
31 31
32echo= 32echo="echo"
33sid1= sid2= 33sid1= sid2=
34 34
35for f 35for f
@@ -96,7 +96,7 @@ do
96 workfile=$rev2 96 workfile=$rev2
97 esac 97 esac
98 then 98 then
99 $echo $DIFF $options $sid1 $sid2 $workfile >&2 99 $echo $DIFF $options $rev1 $workfile >&2
100 $DIFF $options $rev1 $workfile 100 $DIFF $options $rev1 $workfile
101 s=$? 101 s=$?
102 fi 102 fi
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index f58a240c3ec..acfc4975c54 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,239 @@
12006-03-21 Chong Yidong <cyd@stupidchicken.com>
2
3 * cus-edit.el (custom-face-set): Call custom-push-theme before
4 face-spec set so that `changed' theme is correctly saved.
5 (custom-face-reset-standard): Reset to recalculated face rather
6 than defface spec.
7
8 * custom.el (custom-push-theme): Only save `changed' theme if the
9 current face does not match the defface specs.
10
112006-03-21 Simon Josefsson <jas@extundo.com>
12
13 * pgg-gpg.el: Ideas below based on patch from Sascha Wilde
14 <wilde@sha-bang.de>.
15 (pgg-gpg-use-agent): New variable.
16 (pgg-gpg-process-region): Use it.
17 (pgg-gpg-encrypt-region): Likewise.
18 (pgg-gpg-encrypt-symmetric-region): Likewise.
19 (pgg-gpg-decrypt-region): Likewise.
20 (pgg-gpg-sign-region): Likewise.
21 (pgg-gpg-possibly-cache-passphrase): Don't cache a nil password.
22
232006-03-21 Carsten Dominik <dominik@science.uva.nl>
24
25 * textmodes/org.el: (org-open-at-point): Fixed bug in wiki-style
26 bracket links.
27
282006-03-21 Kim F. Storm <storm@cua.dk>
29
30 * progmodes/gdb-ui.el (gdb-reset): Set buffer local value of
31 fringe-indicator-alist instead of modifying global value.
32 (gdb-frame-handler): Likewise.
33
342006-03-21 Nick Roberts <nickrob@snap.net.nz>
35
36 * diff-mode.el (diff-function): Make it inherit from diff-header
37 instead of diff-context.
38
39 * progmodes/gdb-ui.el (hollow-right-triangle): Define as fringe
40 bitmap.
41 (gdb-info-stack-custom): Rename from gdb-info-frames-custom and
42 change names in macro above for consistency.
43 (gdb-frame-handler): Use hollow-right-triangle for all selected
44 frames which except the innermost (where execution has stopped).
45 (gdb-reset): Reset buffer-local values of overlay-arrow.
46
472006-03-20 Richard Stallman <rms@gnu.org>
48
49 * simple.el (set-mark-command): Doc fix.
50
51 * files.el (display-buffer-other-frame): New command.
52 (ctl-x-4-map): Bind C-x 5 C-o to it.
53
542006-03-20 Stefan Monnier <monnier@iro.umontreal.ca>
55
56 * jit-lock.el (jit-lock-function): Check for the actual defer-timer
57 rather than just defer-time, in case defer-time has been changed but
58 the timer isn't running yet.
59 (jit-lock-deferred-fontify): Correspondingly let-bind defer-timer.
60
612006-03-19 Luc Teirlinck <teirllm@auburn.edu>
62
63 * help-mode.el (help-follow-symbol): New function.
64 Essentially identical to the old `help-follow', but do not let
65 `push-button' do the work when on an xref.
66 (help-mode-map): Bind `help-follow-symbol' to "C-c C-c".
67
682006-03-19 Richard Stallman <rms@gnu.org>
69
70 * help-mode.el (help-xref-symbol-regexp): Make no xref for symbol
71 preceded by the word `program'.
72 (help-follow-mouse, help-follow): Throw error if not on xref.
73 Delete no longer used args.
74
752006-03-20 Nick Roberts <nickrob@snap.net.nz>
76
77 * progmodes/gdb-ui.el (gdb-stopped): Even when there is no source
78 annotation ensure gud-overlay-arrow-position is redisplayed.
79
802006-03-19 Roland Winkler <Roland.Winkler@physik.uni-erlangen.de>
81
82 * textmodes/bibtex.el (bibtex-include-OPTkey)
83 (bibtex-entry-field-alist, bibtex-generate-url-list): Mark as risky.
84 (bibtex-autokey-name-case-convert)
85 (bibtex-autokey-titleword-case-convert): Make these the aliases
86 for the following two variables.
87 (bibtex-autokey-name-case-convert-function)
88 (bibtex-autokey-titleword-case-convert-function): Make these the
89 real names.
90 (bibtex-font-lock-keywords): Make bibtex-font-lock-url and
91 bibtex-font-lock-crossref sublists.
92 (bibtex-mode): Revert 2005-12-30 change (which made
93 completion-ignore-case buffer-local).
94 (bibtex-url): Simplify.
95
962006-03-19 Kim F. Storm <storm@cua.dk>
97
98 * emulation/cua-rect.el (cua--highlight-rectangle): Set overlay
99 cursor property value to 2 (to align with C level change).
100
1012006-03-19 Bill Wohler <wohler@newt.com>
102
103 * image.el (image-load-path-for-library): Shorten first line in
104 docstring.
105
1062006-03-18 Richard Stallman <rms@gnu.org>
107
108 * mail/rmail.el (rmail-reply-regexp): Undo previous change.
109
1102006-03-18 Ben North <ben@redfrontdoor.org> (tiny change)
111
112 * isearch.el (isearch-other-meta-char): Handle user bindings for
113 shifted control characters.
114
1152006-03-18 Agustin Martin <agustin.martin@hispalinux.es>
116
117 * textmodes/ispell.el (ispell-skip-region-alist): Add "_+" to the
118 part that matches email addresses, file names, etc.
119
1202006-03-18 Eli Zaretskii <eliz@gnu.org>
121
122 * term/w32-win.el (mouse-set-font):
123 Mention w32-list-proportional-fonts in the doc string.
124
1252006-03-18 Kim F. Storm <storm@cua.dk>
126
127 * ido.el (ido-cache-ftp-work-directory-time): Doc fix.
128 (ido-unc-hosts): New user option to explicitly define list of know
129 UNC-style hosts for completion.
130 (ido-cache-unc-host-shares-time): New user option.
131 (ido-is-unc-root, ido-is-unc-host, ido-cache-unc-valid):
132 New helper functions for UNC file-name support.
133 (ido-may-cache-directory): Check for UNC host. Simplify.
134 (ido-wash-history): Clean out old UNC hosts.
135 (ido-nonreadable-directory-p): UNC hosts are always readable.
136 (ido-directory-too-big-p): UNC hosts are never too big.
137 (ido-set-current-directory): Handle UNC root path.
138 (ido-file-name-all-completions): Complete UNC host names from
139 ido-unc-hosts list. Cache UNC host shares.
140 (ido-make-file-list-1): Don't filter UNC root.
141 (ido-exhibit): Check for // in root directory, and switch to UNC
142 mode by setting ido-current-directory to //.
143
1442006-03-17 Luc Teirlinck <teirllm@auburn.edu>
145
146 * cus-edit.el (customize-changed-options): Mention explicit
147 version number as default in prompt.
148
1492006-03-17 Bill Wohler <wohler@newt.com>
150
151 * image.el (image-load-path-for-library): Minor docstring fix.
152
1532006-03-17 Carsten Dominik <dominik@science.uva.nl>
154
155 * textmodes/org.el (org-read-date): Include subgroup 5 into
156 replacement text.
157 (org-popup-calendar-for-date-prompt): Fix customization type.
158
1592006-03-17 Nick Roberts <nickrob@snap.net.nz>
160
161 * progmodes/gdb-ui.el (gud-watch): Provide completion.
162 (gdb-continuation): New variable.
163 (gdb-send): Deal with continuation lines.
164
165 * progmodes/gud.el (gud-gdb-complete-command)
166 (gud-gdb-run-command-fetch-lines): Adapt for use with watch
167 expressions.
168 (gud-tooltip-mode): Use buffer-local value.
169
1702006-03-16 Kim F. Storm <storm@cua.dk>
171
172 * ido.el (ido-edit-input): Use selected match, if any.
173
1742006-03-16 Bill Wohler <wohler@newt.com>
175
176 * image.el (image-load-path-for-library): Prefer user's images in
177 image-load-path.
178
1792006-03-16 Martin Rudalics <rudalics@gmx.at>
180
181 * mouse.el (mouse-drag-vertical-line): Use window-inside-edges
182 when checking for attempt to drag leftmost or rightmost scrollbar.
183
1842006-03-16 Nick Roberts <nickrob@snap.net.nz>
185
186 * progmodes/gdb-ui.el (gdb-inferior-status): New variable.
187 (gdb-force-mode-line-update): New function.
188 (gdb-resync, gdb-starting, gdb-signal, gdb-exited, gdb-stopped)
189 (gdb-exited): Use them.
190 (gdb-signal): New fuction.
191 (gdb-annotation-rules): Provide a rule for it.
192
1932006-03-16 Kenichi Handa <handa@m17n.org>
194
195 * international/mule.el (auto-coding-regexp-alist): Add entries
196 for Unicode BOM.
197
198 * sort.el (sort-build-lists): Temporarily bind
199 inhibit-field-text-motion to t.
200
2012006-03-15 Luc Teirlinck <teirllm@auburn.edu>
202
203 * locate.el (locate-command, locate-make-command-line)
204 (locate-fcodes-file, locate-update-command)
205 (locate-prompt-for-command, locate, locate-with-filter)
206 (locate-get-file-positions): Doc fixes.
207 (locate-buffer-name, locate-header-face): Remove leading `*' in
208 defcustom.
209 (locate-filter-output): Use `keep-lines' instead of its alias
210 `delete-non-matching-lines'.
211 (locate-get-filename, locate-get-dirname): Add introductory comment.
212 (locate-find-directory-other-window): Give appropriate error
213 message if used outside main listing.
214
2152006-03-15 Stefan Monnier <monnier@iro.umontreal.ca>
216
217 * font-lock.el (font-lock-lines-before): Delete variable, subsumed by
218 the new extend-region feature.
219 (font-lock-after-change-function): Update correspondingly.
220 * jit-lock.el (jit-lock-after-change): Update correspondingly.
221 * progmodes/grep.el (font-lock-lines-before): Don't disable.
222
2232006-03-15 Bill Wohler <wohler@newt.com>
224
225 * image.el (image-load-path-for-library): Fix example by not
226 recommending that one binds image-load-path. Just defvar it to
227 placate compiler and only use it if previously defined.
228
2292006-03-15 Carsten Dominik <dominik@science.uva.nl>
230
231 * textmodes/org.el (org-insert-centered): Use `string-width' to
232 make underlining work for wide characters.
233 (org-goto-map, org-agenda-mode-map, org-mode-map): Explicitly bind
234 TAB to `org-cycle', to make sure that no binding in
235 `outline-mode-map' can supercede it.
236
12006-03-14 Ken Manheimer <ken.manheimer@gmail.com> 2372006-03-14 Ken Manheimer <ken.manheimer@gmail.com>
2 238
3 * allout.el: Increment version to 2.2.1 in file commentary. 239 * allout.el: Increment version to 2.2.1 in file commentary.
@@ -28,8 +264,8 @@
28 264
29 * progmodes/gdb-ui.el (gdb-var-list): Change order of first two 265 * progmodes/gdb-ui.el (gdb-var-list): Change order of first two
30 elements. 266 elements.
31 (gdb-find-watch-expression): Make it work for arrays too. Follow 267 (gdb-find-watch-expression): Make it work for arrays too.
32 change to gdb-var-list. 268 Follow change to gdb-var-list.
33 (gud-watch): Allow the user to enter variable name with a prexix 269 (gud-watch): Allow the user to enter variable name with a prexix
34 arg. Create keybindings. 270 arg. Create keybindings.
35 (gdb-var-create-handler, gdb-var-evaluate-expression-handler) 271 (gdb-var-create-handler, gdb-var-evaluate-expression-handler)
@@ -37,8 +273,7 @@
37 (gdb-var-delete, gdb-edit-value, gdb-speedbar-expand-node) 273 (gdb-var-delete, gdb-edit-value, gdb-speedbar-expand-node)
38 (gdb-var-list-children-handler-1, gdb-var-update-handler-1): 274 (gdb-var-list-children-handler-1, gdb-var-update-handler-1):
39 Follow change to gdb-var-list. 275 Follow change to gdb-var-list.
40 (gdb-starting): Don't show the overlay arrows when program is 276 (gdb-starting): Don't show the overlay arrows when program is running.
41 running.
42 277
43 * progmodes/gud.el (gud-speedbar-buttons): Follow change to 278 * progmodes/gud.el (gud-speedbar-buttons): Follow change to
44 gdb-var-list. 279 gdb-var-list.
@@ -46,27 +281,32 @@
462006-03-14 Bill Wohler <wohler@newt.com> 2812006-03-14 Bill Wohler <wohler@newt.com>
47 282
48 * image.el (image-load-path-for-library): Pass value of path 283 * image.el (image-load-path-for-library): Pass value of path
49 rather than symbol. Always return list of directories. Guarantee 284 rather than symbol. Always return list of directories.
50 that image directory comes first. 285 Guarantee that image directory comes first.
51 286
522006-03-14 Alan Mackenzie <acm@muc.de> 2872006-03-14 Alan Mackenzie <acm@muc.de>
53 288
54 * font-core.el: New function/variable 289 * font-core.el (font-lock-extend-region\(-function\)?.):
55 font-lock-extend-region\(-function\)?. 290 New function/variable.
56 291
57 * font-lock.el (font-lock-after-change-function): Call 292 * font-lock.el (font-lock-after-change-function):
58 font-lock-extend-region. Obey font-lock-lines-before. 293 Call font-lock-extend-region. Obey font-lock-lines-before.
59 (font-lock-default-fontify-region): Remove reference to 294 (font-lock-default-fontify-region): Remove reference to
60 font-lock-lines-before. 295 font-lock-lines-before.
61 296
62 * jit-lock.el (jit-lock-after-change): Call 297 * jit-lock.el (jit-lock-after-change):
63 font-lock-extend-region. Obey font-lock-lines-before. 298 Call font-lock-extend-region. Obey font-lock-lines-before.
64 299
652006-03-14 David Ponce <david@dponce.com> 3002006-03-14 David Ponce <david@dponce.com>
66 301
67 * tree-widget.el (tree-widget-themes-load-path) 302 * tree-widget.el (tree-widget-themes-load-path)
68 (tree-widget-themes-directory, tree-widget-theme): Doc fix. 303 (tree-widget-themes-directory, tree-widget-theme): Doc fix.
69 304
3052006-03-13 Stefan Monnier <monnier@iro.umontreal.ca>
306
307 * pcvs-util.el (cvs-insert-strings): Fix bug with strings longer than
308 wwidth.
309
702006-03-13 Ryan Yeske <rcyeske@gmail.com> 3102006-03-13 Ryan Yeske <rcyeske@gmail.com>
71 311
72 * net/rcirc.el (rcirc) <defgroup>: Add link to manual. 312 * net/rcirc.el (rcirc) <defgroup>: Add link to manual.
@@ -87,18 +327,18 @@
87 themes sub-directory found in tree-widget-themes-load-path. 327 themes sub-directory found in tree-widget-themes-load-path.
88 (tree-widget-themes-directory, tree-widget-theme): Doc fix. 328 (tree-widget-themes-directory, tree-widget-theme): Doc fix.
89 (tree-widget--locate-sub-directory): Return all occurrences. 329 (tree-widget--locate-sub-directory): Return all occurrences.
90 (tree-widget-themes-path): New function. Replace 330 (tree-widget-themes-path): New function.
91 tree-widget-themes-directory, and return a list of directories. 331 Replace tree-widget-themes-directory, and return a list of directories.
92 (tree-widget-set-parent-theme) 332 (tree-widget-set-parent-theme)
93 (tree-widget-lookup-image): Use it. 333 (tree-widget-lookup-image): Use it.
94 334
952006-03-13 Carsten Dominik <dominik@science.uva.nl> 3352006-03-13 Carsten Dominik <dominik@science.uva.nl>
96 336
97 * textmodes/org.el: (org-link-search): Avoid self-matching of 337 * textmodes/org.el (org-link-search): Avoid self-matching of
98 links, allow target text to be distributed over several lines. 338 links, allow target text to be distributed over several lines.
99 (org-search-not-link): New function. 339 (org-search-not-link): New function.
100 (org-set-regexps-and-options, org-get-current-options): New 340 (org-set-regexps-and-options, org-get-current-options):
101 startup options. 341 New startup options.
102 (org-export-as-html): Take odd-level setting from local variable. 342 (org-export-as-html): Take odd-level setting from local variable.
103 (org-fontify-emphasized-text): New option. 343 (org-fontify-emphasized-text): New option.
104 (org-set-font-lock-defaults): Include emphasized text. 344 (org-set-font-lock-defaults): Include emphasized text.
@@ -169,8 +409,8 @@
169 409
1702006-03-11 Kurt Hornik <Kurt.Hornik@wu-wien.ac.at> 4102006-03-11 Kurt Hornik <Kurt.Hornik@wu-wien.ac.at>
171 411
172 * progmodes/octave-mod.el (octave-indent-for-comment): Behave 412 * progmodes/octave-mod.el (octave-indent-for-comment):
173 according to do string. 413 Behave according to do string.
174 414
1752006-03-11 Agustin Martin <agustin.martin@hispalinux.es> 4152006-03-11 Agustin Martin <agustin.martin@hispalinux.es>
176 416
@@ -208,7 +448,7 @@
208 * progmodes/gdb-ui.el (gdb-remove-text-properties): Rename from 448 * progmodes/gdb-ui.el (gdb-remove-text-properties): Rename from
209 gdb-remove-mouse-face and remove help-echo too. 449 gdb-remove-mouse-face and remove help-echo too.
210 (gdb-enqueue-input): Correct conditional clause. 450 (gdb-enqueue-input): Correct conditional clause.
211 451
2122006-03-10 Glenn Morris <rgm@gnu.org> 4522006-03-10 Glenn Morris <rgm@gnu.org>
213 453
214 * calendar/calendar.el (calendar-holidays): Doc fix. 454 * calendar/calendar.el (calendar-holidays): Doc fix.
@@ -233,8 +473,8 @@
233 473
2342006-03-07 Chong Yidong <cyd@stupidchicken.com> 4742006-03-07 Chong Yidong <cyd@stupidchicken.com>
235 475
236 * files.el (hack-local-variables-confirm): Set 476 * files.el (hack-local-variables-confirm):
237 coding-system-for-read to nil before writing to .emacs. 477 Set coding-system-for-read to nil before writing to .emacs.
238 478
239 * arc-mode.el (archive-extract): Check if an existing buffer name 479 * arc-mode.el (archive-extract): Check if an existing buffer name
240 comes from a different archive. 480 comes from a different archive.
@@ -256,8 +496,8 @@
256 496
2572006-03-07 Carsten Dominik <dominik@science.uva.nl> 4972006-03-07 Carsten Dominik <dominik@science.uva.nl>
258 498
259 * textmodes/org.el: Move defvars out of eval-when-compile. Use 499 * textmodes/org.el: Move defvars out of eval-when-compile.
260 buffer-file-name variable. 500 Use buffer-file-name variable.
261 (org-agenda-file-to-end, org-agenda-file-to-front): Remove unused 501 (org-agenda-file-to-end, org-agenda-file-to-front): Remove unused
262 arg `file'. 502 arg `file'.
263 (org-level-faces): Remove startup dependency. 503 (org-level-faces): Remove startup dependency.
@@ -272,8 +512,7 @@
272 (org-tag): New face. 512 (org-tag): New face.
273 (org-get-level-face): New function. 513 (org-get-level-face): New function.
274 (org-set-font-lock-defaults): Simplify setup for headlines. 514 (org-set-font-lock-defaults): Simplify setup for headlines.
275 (org-complete): Pass common substring to 515 (org-complete): Pass common substring to `display-completion-list'.
276 `display-completion-list'.
277 516
2782006-03-06 David Ponce <david@dponce.com> 5172006-03-06 David Ponce <david@dponce.com>
279 518
@@ -445,9 +684,8 @@
445 684
446 * t-mouse.el: New file. 685 * t-mouse.el: New file.
447 (t-mouse-tty): Use with-temp-buffer. Add more terminal types. 686 (t-mouse-tty): Use with-temp-buffer. Add more terminal types.
448 (t-mouse-lispy-buffer-posn-from-coords): Remove. Use the C 687 (t-mouse-lispy-buffer-posn-from-coords): Remove.
449 primitive... 688 (t-mouse-make-event-element): Use posn-at-x-y instead.
450 (t-mouse-make-event-element): ...posn-at-x-y instead.
451 (t-mouse-make-event): Deal with Fedora Core 3. 689 (t-mouse-make-event): Deal with Fedora Core 3.
452 (t-mouse-make-event): Don't sink the `stupid text mode menubar'. 690 (t-mouse-make-event): Don't sink the `stupid text mode menubar'.
453 (t-mouse-mouse-position-function): New function. Use it instead 691 (t-mouse-mouse-position-function): New function. Use it instead
@@ -480,8 +718,7 @@
480 * textmodes/reftex-index.el (reftex-index-map): Add `follow-mouse' 718 * textmodes/reftex-index.el (reftex-index-map): Add `follow-mouse'
481 binding. 719 binding.
482 720
483 * textmodes/reftex-toc.el (reftex-toc-map): Add `follow-mouse' 721 * textmodes/reftex-toc.el (reftex-toc-map): Add `follow-mouse' binding.
484 binding.
485 722
486 * textmodes/reftex-sel.el (reftex-select-label-map) 723 * textmodes/reftex-sel.el (reftex-select-label-map)
487 (reftex-select-bib-map): Add `follow-mouse' binding. 724 (reftex-select-bib-map): Add `follow-mouse' binding.
@@ -4059,20 +4296,20 @@
4059 CC Mode update to 5.31. 4296 CC Mode update to 5.31.
4060 4297
4061 * progmodes/cc-subword.el: Add a dummy `c-subword-mode' for 4298 * progmodes/cc-subword.el: Add a dummy `c-subword-mode' for
4062 Emacsen which lack `define-minor-mode'. (Currently Emacs <21. We 4299 Emacsen which lack `define-minor-mode'. (Currently Emacs <21.
4063 might do this function properly in the future). 4300 We might do this function properly in the future).
4064 4301
4065 * progmodes/cc-cmds.el, cc-defs.el, cc-styles.el, cc-vars.el: New 4302 * progmodes/cc-cmds.el, cc-defs.el, cc-styles.el, cc-vars.el:
4066 macros c-sentence-end and c-default-value-sentence end, to cope 4303 New macros c-sentence-end and c-default-value-sentence end, to cope
4067 with Emacs 22's new function `sentence-end'. 4304 with Emacs 22's new function `sentence-end'.
4068 4305
40692005-12-08 Martin Stjernholm <bug-cc-mode@gnu.org> 43062005-12-08 Martin Stjernholm <bug-cc-mode@gnu.org>
4070 4307
4071 * progmodes/cc-cmds.el (c-show-syntactic-information): Solved the 4308 * progmodes/cc-cmds.el (c-show-syntactic-information): Solve the
4072 compat issue using `c-put-overlay' and `c-delete-overlay'. 4309 compat issue using `c-put-overlay' and `c-delete-overlay'.
4073 4310
4074 * progmodes/cc-defs.el (c-put-overlay, c-delete-overlay): New 4311 * progmodes/cc-defs.el (c-put-overlay, c-delete-overlay):
4075 compat macros to handle overlays/extents. 4312 New compat macros to handle overlays/extents.
4076 4313
40772005-12-08 Alan Mackenzie <bug-cc-mode@gnu.org> 43142005-12-08 Alan Mackenzie <bug-cc-mode@gnu.org>
4078 4315
@@ -4093,20 +4330,19 @@
4093 4330
40942005-12-08 Martin Stjernholm <bug-cc-mode@gnu.org> 43312005-12-08 Martin Stjernholm <bug-cc-mode@gnu.org>
4095 4332
4096 * progmodes/cc-fonts.el (c-make-syntactic-matcher): New internal 4333 * progmodes/cc-fonts.el (c-make-syntactic-matcher):
4097 helper. 4334 New internal helper.
4098 4335
4099 (c-cpp-matchers, c-basic-matchers-before): Use the `eval' 4336 (c-cpp-matchers, c-basic-matchers-before): Use the `eval'
4100 construct to make the indirect face lookup work in XEmacs. 4337 construct to make the indirect face lookup work in XEmacs.
4101 4338
4102 (c-cpp-matchers): Append the negation char face to the existing 4339 (c-cpp-matchers): Append the negation char face to the existing
4103 fontification, so that the cpp face doesn't disappear. Use 4340 fontification, so that the cpp face doesn't disappear.
4104 `c-make-syntactic-matcher' to avoid negation chars in comments and 4341 Use `c-make-syntactic-matcher' to avoid negation chars in comments
4105 strings. 4342 and strings.
4106 4343
4107 * progmodes/cc-fonts.el (c-negation-char-face-name): New variable 4344 * progmodes/cc-fonts.el (c-negation-char-face-name): New variable
4108 to map to `font-lock-negation-char-face' in emacsen where it 4345 to map to `font-lock-negation-char-face' in emacsen where it exists.
4109 exists.
4110 4346
41112005-12-08 Alan Mackenzie <bug-cc-mode@gnu.org> 43472005-12-08 Alan Mackenzie <bug-cc-mode@gnu.org>
4112 4348
@@ -4129,18 +4365,17 @@
4129 (i) Insert a binding for C-c C-backspace into 4365 (i) Insert a binding for C-c C-backspace into
4130 c-bind-special-erase-keys which works in TTYs. 4366 c-bind-special-erase-keys which works in TTYs.
4131 (ii) Make sure that when file styles are used, any explicitly 4367 (ii) Make sure that when file styles are used, any explicitly
4132 given style variables take priority over those in the style. Do 4368 given style variables take priority over those in the style.
4133 this by calling `hack-local-variables' a second time. 4369 Do this by calling `hack-local-variables' a second time.
4134 4370
4135 * progmodes/cc-vars.el: Add language specific customization 4371 * progmodes/cc-vars.el: Add language specific customization
4136 widgets for AWK to c-doc-comment-style, c-require-final-newline 4372 widgets for AWK to c-doc-comment-style, c-require-final-newline
4137 and c-default-style. Add a defcustom for awk-mode-hook. Give 4373 and c-default-style. Add a defcustom for awk-mode-hook.
4138 c-syntactic-element and c-syntactic-context doc-strings by 4374 Give c-syntactic-element and c-syntactic-context doc-strings by
4139 directly setting their `variable-documentation' propery. This 4375 directly setting their `variable-documentation' propery.
4140 allows Emacs 22.1 to read these with C-h v. 4376 This allows Emacs 22.1 to read these with C-h v.
4141 4377
4142 * progmodes/cc-awk.el: Apply a tidy-up patch (from Stefan 4378 * progmodes/cc-awk.el: Apply a tidy-up patch (from Stefan Monnier).
4143 Monnier).
4144 4379
41452005-12-08 Martin Stjernholm <bug-cc-mode@gnu.org> 43802005-12-08 Martin Stjernholm <bug-cc-mode@gnu.org>
4146 4381
@@ -4166,8 +4401,8 @@
4166 * progmodes/cc-mode.el: Give c-hungry-backspace and 4401 * progmodes/cc-mode.el: Give c-hungry-backspace and
4167 c-hungry-delete-forward permanent key bindings. 4402 c-hungry-delete-forward permanent key bindings.
4168 4403
4169 * progmodes/cc-cmds.el (c-electric-semi&comma): Bind 4404 * progmodes/cc-cmds.el (c-electric-semi&comma):
4170 c-syntactic-context for calls to "criteria functions", for 4405 Bind c-syntactic-context for calls to "criteria functions", for
4171 consistency with other calls to user functions. 4406 consistency with other calls to user functions.
4172 4407
4173 * progmodes/cc-cmds.el (c-indent-command): Expunge use of 4408 * progmodes/cc-cmds.el (c-indent-command): Expunge use of
@@ -4181,7 +4416,7 @@
4181 4416
41822005-12-08 Martin Stjernholm <bug-cc-mode@gnu.org> 44172005-12-08 Martin Stjernholm <bug-cc-mode@gnu.org>
4183 4418
4184 * progmodes/cc-engine.el (c-on-identifier): Fixed bug when at the 4419 * progmodes/cc-engine.el (c-on-identifier): Fix bug when at the
4185 first char of an identifier. 4420 first char of an identifier.
4186 4421
4187 * progmodes/cc-engine.el (c-on-identifier): Handle the "operator 4422 * progmodes/cc-engine.el (c-on-identifier): Handle the "operator
@@ -4206,14 +4441,14 @@
42062005-12-08 Martin Stjernholm <bug-cc-mode@gnu.org> 44412005-12-08 Martin Stjernholm <bug-cc-mode@gnu.org>
4207 4442
4208 * progmodes/cc-fonts.el (c-cpp-matchers, c-basic-matchers-before): 4443 * progmodes/cc-fonts.el (c-cpp-matchers, c-basic-matchers-before):
4209 Incorporated the patterns added in the Emacs development branch 4444 Incorporate the patterns added in the Emacs development branch
4210 for the new Emacs 22 face `font-lock-negation-char-face'. 4445 for the new Emacs 22 face `font-lock-negation-char-face'.
4211 4446
4212 * progmodes/cc-fonts.el (c-invalid-face-name): Use "red1" instead 4447 * progmodes/cc-fonts.el (c-invalid-face-name): Use "red1" instead
4213 of "red" since it stands out better in xterms and DOS terminals. 4448 of "red" since it stands out better in xterms and DOS terminals.
4214 4449
4215 * progmodes/cc-engine.el (c-literal-faces): Added 4450 * progmodes/cc-engine.el (c-literal-faces):
4216 `font-lock-comment-delimiter-face' which is new in Emacs 22. 4451 Add `font-lock-comment-delimiter-face' which is new in Emacs 22.
4217 4452
42182005-12-08 Alan Mackenzie <bug-cc-mode@gnu.org> 44532005-12-08 Alan Mackenzie <bug-cc-mode@gnu.org>
4219 4454
@@ -4221,14 +4456,13 @@
4221 forcibly enable c-electric-flag. 4456 forcibly enable c-electric-flag.
4222 4457
4223 * progmodes/cc-vars.el, cc-cmds.el: New clean-up 4458 * progmodes/cc-vars.el, cc-cmds.el: New clean-up
4224 `comment-close-slash' on c-electric-slash: if enabled, typing `/' 4459 `comment-close-slash' on c-electric-slash: if enabled, typing `/' just
4225 just after the comment-prefix of a C-style comment will close that 4460 after the comment-prefix of a C-style comment will close that comment.
4226 comment.
4227 4461
42282005-12-08 Martin Stjernholm <bug-cc-mode@gnu.org> 44622005-12-08 Martin Stjernholm <bug-cc-mode@gnu.org>
4229 4463
4230 * progmodes/cc-fonts.el (c-basic-matchers-before) 4464 * progmodes/cc-fonts.el (c-basic-matchers-before)
4231 (c-complex-decl-matchers): Fixed the "not-arrow-prefix" regexp used 4465 (c-complex-decl-matchers): Fix the "not-arrow-prefix" regexp used
4232 in Pike. 4466 in Pike.
4233 4467
4234 * progmodes/cc-langs.el (c-other-op-syntax-tokens): Only C++ has 4468 * progmodes/cc-langs.el (c-other-op-syntax-tokens): Only C++ has
@@ -4237,10 +4471,10 @@
4237 * progmodes/cc-fonts.el, cc-langs.el, cc-engine.el 4471 * progmodes/cc-fonts.el, cc-langs.el, cc-engine.el
4238 (c-cpp-message-directives, c-cpp-include-directives) 4472 (c-cpp-message-directives, c-cpp-include-directives)
4239 (c-opt-cpp-macro-define, c-opt-cpp-macro-define-start) 4473 (c-opt-cpp-macro-define, c-opt-cpp-macro-define-start)
4240 (c-cpp-expr-directives): Introduced new language constants to 4474 (c-cpp-expr-directives): Introduce new language constants to
4241 control cpp syntax in a cleaner way. 4475 control cpp syntax in a cleaner way.
4242 4476
4243 (c-cpp-expr-functions): Renamed from c-cpp-defined-fns. 4477 (c-cpp-expr-functions): Rename from c-cpp-defined-fns.
4244 4478
4245 (c-cpp-matchers, c-forward-to-cpp-define-body): Use them. 4479 (c-cpp-matchers, c-forward-to-cpp-define-body): Use them.
4246 4480
@@ -4272,22 +4506,21 @@
4272 (c-guess-basic-syntax): Handle C++ operator identifiers in 4506 (c-guess-basic-syntax): Handle C++ operator identifiers in
4273 declarations. 4507 declarations.
4274 4508
4275 * progmodes/cc-langs.el (c-assignment-operators): Added the 4509 * progmodes/cc-langs.el (c-assignment-operators): Add the
4276 trigraph version of ^= too. 4510 trigraph version of ^= too.
4277 4511
4278 * progmodes/cc-langs.el (c-assignment-operators): Added the 4512 * progmodes/cc-langs.el (c-assignment-operators): Add the
4279 trigraph version of |= in C++. 4513 trigraph version of |= in C++.
4280 4514
4281 * progmodes/cc-fonts.el (c-font-lock-declarators): Handle 4515 * progmodes/cc-fonts.el (c-font-lock-declarators):
4282 `c-decl-hangon-kwds' after the identifier name. 4516 Handle `c-decl-hangon-kwds' after the identifier name.
4283 4517
4284 * progmodes/cc-engine.el (c-guess-basic-syntax): When deciding 4518 * progmodes/cc-engine.el (c-guess-basic-syntax): When deciding
4285 whether an arglist is "nonempty", ignore a comment after the open 4519 whether an arglist is "nonempty", ignore a comment after the open
4286 paren if it isn't followed by a non-comment token on the same 4520 paren if it isn't followed by a non-comment token on the same line.
4287 line.
4288 4521
4289 * progmodes/cc-engine.el (c-guess-basic-syntax): Case 4: Enable 4522 * progmodes/cc-engine.el (c-guess-basic-syntax): Case 4:
4290 heuristics below the point to cope with classes inside special 4523 Enable heuristics below the point to cope with classes inside special
4291 brace lists in Pike. 4524 brace lists in Pike.
4292 4525
42932005-12-08 Alan Mackenzie <bug-cc-mode@gnu.org> 45262005-12-08 Alan Mackenzie <bug-cc-mode@gnu.org>
@@ -4326,12 +4559,11 @@
4326 * progmodes/cc-cmds.el: Add `c-bytecomp-defun's for 4559 * progmodes/cc-cmds.el: Add `c-bytecomp-defun's for
4327 c-\(forward\|backward\)-subword. 4560 c-\(forward\|backward\)-subword.
4328 (c-update-modeline): Add the new modeline flag `l' for 4561 (c-update-modeline): Add the new modeline flag `l' for
4329 `c-electric-flag'. Make the auto-newline flag `a' dependent on 4562 `c-electric-flag'. Make the auto-newline flag `a' dependent on `l'.
4330 `l'. 4563 (c-toggle-auto-state): Rename it to `c-toggle-auto-newline'.
4331 (c-toggle-auto-state): Rename it to `c-toggle-auto-newline'. Make 4564 Make the old name an alias of the new name.
4332 the old name an alias of the new name.
4333 (c-toggle-electric-state): New function. 4565 (c-toggle-electric-state): New function.
4334 c-electric-\(pound\|brace\|slash\|star\|semi&comma\|colon\|lt-gt\|paren\|continued-statement\): 4566 (c-electric-\(pound\|brace\|slash\|star\|semi&comma\|colon\|lt-gt\|paren\|continued-statement\)):
4335 Adapt these functions to do electric things only when 4567 Adapt these functions to do electric things only when
4336 c-electric-flag is non-nil. 4568 c-electric-flag is non-nil.
4337 (c-point-syntax, c-brace-newlines, c-try-oneliner): Extract these 4569 (c-point-syntax, c-brace-newlines, c-try-oneliner): Extract these
@@ -4347,18 +4579,17 @@
43472005-12-08 Martin Stjernholm <bug-cc-mode@gnu.org> 45792005-12-08 Martin Stjernholm <bug-cc-mode@gnu.org>
4348 4580
4349 * progmodes/cc-cmds.el (c-show-syntactic-information): Show the 4581 * progmodes/cc-cmds.el (c-show-syntactic-information): Show the
4350 anchor position(s) using faces. Thanks to Masatake YAMATO for the 4582 anchor position(s) using faces. Thanks to Masatake YAMATO for the idea.
4351 idea.
4352 4583
4353 * progmodes/cc-mode.el, cc-cmds.el, cc-defs.el, cc-engine.el 4584 * progmodes/cc-mode.el, cc-cmds.el, cc-defs.el, cc-engine.el
4354 (c-submode-indicators): Changed name from `c-auto-hungry-string' 4585 (c-submode-indicators): Change name from `c-auto-hungry-string'
4355 since it's now used to track another submode. 4586 since it's now used to track another submode.
4356 4587
4357 (c-update-modeline): Converted to function and extended to check 4588 (c-update-modeline): Convert to function and extended to check
4358 `c-subword-move-mode'. 4589 `c-subword-move-mode'.
4359 4590
4360 (c-forward-into-nomenclature, c-backward-into-nomenclature): 4591 (c-forward-into-nomenclature, c-backward-into-nomenclature):
4361 Converted to compat aliases for `c-forward-subword' and 4592 Convert to compat aliases for `c-forward-subword' and
4362 `c-backward-subword'. 4593 `c-backward-subword'.
4363 4594
4364 * progmodes/cc-subword.el: New functions and minor mode to handle 4595 * progmodes/cc-subword.el: New functions and minor mode to handle
@@ -4401,10 +4632,10 @@
4401 4632
44022005-12-08 Martin Stjernholm <bug-cc-mode@gnu.org> 46332005-12-08 Martin Stjernholm <bug-cc-mode@gnu.org>
4403 4634
4404 * progmodes/cc-engine.el (c-forward-label): Fixed fontification of 4635 * progmodes/cc-engine.el (c-forward-label): Fix fontification of
4405 macros inside labels. 4636 macros inside labels.
4406 4637
4407 * progmodes/cc-engine.el (c-looking-at-bos): Obsoleted in favor of 4638 * progmodes/cc-engine.el (c-looking-at-bos): Obsolete in favor of
4408 `c-at-statement-start-p' and `c-at-expression-start-p'. 4639 `c-at-statement-start-p' and `c-at-expression-start-p'.
4409 4640
4410 * progmodes/cc-defs.el (c-tnt-chng-record-state): Don't signal an 4641 * progmodes/cc-defs.el (c-tnt-chng-record-state): Don't signal an
@@ -4418,9 +4649,8 @@
4418 like `c-at-statement-start-p' that additionally recognizes commas 4649 like `c-at-statement-start-p' that additionally recognizes commas
4419 and expression parentheses as delimiters. 4650 and expression parentheses as delimiters.
4420 4651
4421 * progmodes/cc-engine.el (c-looking-at-inexpr-block): Added flag 4652 * progmodes/cc-engine.el (c-looking-at-inexpr-block): Add flag
4422 to avoid heuristics that doesn't work for unclosed blocks. 4653 to avoid heuristics that doesn't work for unclosed blocks.
4423
4424 (c-at-statement-start-p): New function. 4654 (c-at-statement-start-p): New function.
4425 4655
4426 * progmodes/cc-engine.el, cc-fonts.el: Fixes in handling of 4656 * progmodes/cc-engine.el, cc-fonts.el: Fixes in handling of
@@ -4435,54 +4665,53 @@
4435 (c-just-after-func-arglist-p, c-guess-basic-syntax) 4665 (c-just-after-func-arglist-p, c-guess-basic-syntax)
4436 (c-basic-matchers-before): Use it. 4666 (c-basic-matchers-before): Use it.
4437 4667
4438 (c-font-lock-objc-iip-decl): Removed. 4668 (c-font-lock-objc-iip-decl): Remove.
4439 4669
4440 * progmodes/cc-engine.el (c-guess-basic-syntax): Some improvement 4670 * progmodes/cc-engine.el (c-guess-basic-syntax): Some improvement
4441 in the template arglist recognition. 4671 in the template arglist recognition.
4442 4672
4443 * progmodes/cc-styles.el (c-style-alist): Fixed several 4673 * progmodes/cc-styles.el (c-style-alist): Fix several
4444 inconsistencies in the Whitesmith style. 4674 inconsistencies in the Whitesmith style.
4445 4675
4446 * progmodes/cc-align.el (c-lineup-after-whitesmith-blocks): 4676 * progmodes/cc-align.el (c-lineup-after-whitesmith-blocks):
4447 New lineup function to get lines after Whitesmith style blocks 4677 New lineup function to get lines after Whitesmith style blocks
4448 correctly indented. 4678 correctly indented.
4449 4679
4450 (c-lineup-whitesmith-in-block): Backed out the compensation for 4680 (c-lineup-whitesmith-in-block): Back out the compensation for
4451 opening parens since it's done using `add' lists in the style 4681 opening parens since it's done using `add' lists in the style
4452 definition instead. Don't use the anchor position since it varies 4682 definition instead. Don't use the anchor position since it varies
4453 too much between the syntactic symbols. :P 4683 too much between the syntactic symbols. :P
4454 4684
4455 * progmodes/cc-vars.el (c-valid-offset): Updated. 4685 * progmodes/cc-vars.el (c-valid-offset): Update.
4456 4686
4457 * progmodes/cc-engine.el (c-evaluate-offset): Extended to handle 4687 * progmodes/cc-engine.el (c-evaluate-offset): Extend to handle
4458 lists where the offsets are combined according to several 4688 lists where the offsets are combined according to several
4459 different methods: `first', `min', `max', and `add'. Report 4689 different methods: `first', `min', `max', and `add'.
4460 offset evaluation errors with `c-benign-error' so that some kind 4690 Report offset evaluation errors with `c-benign-error' so that some kind
4461 of reindentation still is done. 4691 of reindentation still is done.
4462 4692
4463 * progmodes/cc-engine.el (c-guess-basic-syntax): Anchor 4693 * progmodes/cc-engine.el (c-guess-basic-syntax):
4464 `arglist-intro' the same way as `arglist-cont-nonempty' and 4694 Anchor `arglist-intro' the same way as `arglist-cont-nonempty' and
4465 `arglist-close'. 4695 `arglist-close'.
4466 4696
4467 * progmodes/cc-engine.el (c-guess-basic-syntax): Fixed similar 4697 * progmodes/cc-engine.el (c-guess-basic-syntax): Fix similar
4468 situations for `arglist-cont-nonempty' and `arglist-close'. 4698 situations for `arglist-cont-nonempty' and `arglist-close'.
4469 4699
4470 * progmodes/cc-langs.el (c-opt-identifier-concat-key-depth): New 4700 * progmodes/cc-langs.el (c-opt-identifier-concat-key-depth): New const.
4471 constant.
4472 4701
4473 * progmodes/cc-defs.el: Use `cc-bytecomp-fboundp' and 4702 * progmodes/cc-defs.el: Use `cc-bytecomp-fboundp' and
4474 cc-bytecomp-boundp' in a number of places. 4703 cc-bytecomp-boundp' in a number of places.
4475 4704
4476 * progmodes/cc-engine.el (c-beginning-of-statement-1): Fixed a 4705 * progmodes/cc-engine.el (c-beginning-of-statement-1): Fix a
4477 macro related issue. 4706 macro related issue.
4478 4707
44792005-12-08 Alan Mackenzie <bug-cc-mode@gnu.org> 47082005-12-08 Alan Mackenzie <bug-cc-mode@gnu.org>
4480 4709
4481 * progmodes/cc-awk.el: Change the terminology of regexps: A char 4710 * progmodes/cc-awk.el: Change the terminology of regexps: A char
4482 list is now [asdf], a char class [:alpha:]. Include code for char 4711 list is now [asdf], a char class [:alpha:].
4483 classes. Set c-awk-NL-prop on lines ending in open strings. (Bug 4712 Include code for char classes.
4484 fix.) Add character classes (e.g. "[:alpha:]") into AWK Mode's 4713 Set c-awk-NL-prop on lines ending in open strings. (Bug fix.)
4485 regexps. 4714 Add character classes (e.g. "[:alpha:]") into AWK Mode's regexps.
4486 4715
4487 Remove (nearly all of) the cruft associated with AWK Mode's former 4716 Remove (nearly all of) the cruft associated with AWK Mode's former
4488 concept of "virtual semicolons": 4717 concept of "virtual semicolons":
@@ -4521,15 +4750,14 @@
4521 4750
45222005-12-08 Alan Mackenzie <bug-cc-mode@gnu.org> 47512005-12-08 Alan Mackenzie <bug-cc-mode@gnu.org>
4523 4752
4524 * progmodes/cc-awk.el: Regexps for analysing AWK code have been 4753 * progmodes/cc-awk.el: Move regexps for analysing AWK code to near the
4525 moved to near the start of the file. ^L now separate sections of 4754 start of the file. ^L now separate sections of the file.
4526 the file. New defconsts: c-awk-non-eol-esc-pair-re, 4755 (c-awk-non-eol-esc-pair-re, c-awk-blank-or-comment-line-re)
4527 c-awk-blank-or-comment-line-re, 4756 (c-awk-one-line-possibly-open-string-re)
4528 c-awk-one-line-possibly-open-string-re, 4757 (c-awk-regexp-one-line-possibly-open-char-class-re)
4529 c-awk-regexp-one-line-possibly-open-char-class-re, 4758 (c-awk-one-line-possibly-open-regexp-re)
4530 c-awk-one-line-possibly-open-regexp-re, 4759 (c-awk-one-line-non-syn-ws*-re): New defonsts.
4531 c-awk-one-line-non-syn-ws*-re. New functions: c-awk-at-vsemi-p, 4760 (c-awk-at-vsemi-p, c-awk-vsemi-status-unknown-p): New functions.
4532 c-awk-vsemi-status-unknown-p.
4533 4761
4534 Amend the concept of "virtual semicolons" (in the indentation 4762 Amend the concept of "virtual semicolons" (in the indentation
4535 engine) for languages like AWK, such that they are now 4763 engine) for languages like AWK, such that they are now
@@ -4537,12 +4765,12 @@
4537 the end of the line. (In AWK Mode, however, the pertinent text 4765 the end of the line. (In AWK Mode, however, the pertinent text
4538 property is still physically set on the EOL.) Remove the specific 4766 property is still physically set on the EOL.) Remove the specific
4539 tests for awk-mode, thus facilitating the introduction of other 4767 tests for awk-mode, thus facilitating the introduction of other
4540 language modes where EOLs can end statements. (Note: The 4768 language modes where EOLs can end statements.
4541 funtionality in cc-cmds.el, specifically 4769 (Note: The funtionality in cc-cmds.el, specifically
4542 c-beginning/end-of-statement has yet to be amended.) 4770 c-beginning/end-of-statement has yet to be amended.)
4543 4771
4544 * progmodes/cc-defs.el: New macros c-at-vsemi-p, 4772 * progmodes/cc-defs.el (c-at-vsemi-p, c-vsemi-status-unknown-p):
4545 c-vsemi-status-unknown-p. 4773 New macros.
4546 4774
4547 * progmodes/cc-langs.el: Added `#' into AWK Mode's value of 4775 * progmodes/cc-langs.el: Added `#' into AWK Mode's value of
4548 c-stmt-delim-chars. New c-lang-defvars: c-at-vsemi-p-fn, 4776 c-stmt-delim-chars. New c-lang-defvars: c-at-vsemi-p-fn,
@@ -4552,25 +4780,21 @@
4552 c-crosses-statement-barrier-p, c-guess-basic-syntax, replace 4780 c-crosses-statement-barrier-p, c-guess-basic-syntax, replace
4553 numerous awkward forms like 4781 numerous awkward forms like
4554 (if (c-major-mode-is 'awk-mode) (c-awk-prev-line-incomplete-p)) 4782 (if (c-major-mode-is 'awk-mode) (c-awk-prev-line-incomplete-p))
4555 with 4783 with (c-at-vsemi-p). Fix a few typos. In c-guess-basic-syntax, new
4556 (c-at-vsemi-p). Fix a few typos. In c-guess-basic-syntax, new 4784 variable before-ws-ip, the place just after char-before-ip appears.
4557 variable before-ws-ip, the place just after char-before-ip
4558 appears.
4559 4785
4560 * progmodes/cc-mode.el: Fix what's almost a semantic ambiguity in 4786 * progmodes/cc-mode.el: Fix what's almost a semantic ambiguity in
4561 a comment. 4787 a comment.
4562 4788
45632005-12-08 Martin Stjernholm <bug-cc-mode@gnu.org> 47892005-12-08 Martin Stjernholm <bug-cc-mode@gnu.org>
4564 4790
4565 * progmodes/cc-cmds.el (c-electric-brace): Cleaned up using 4791 * progmodes/cc-cmds.el (c-electric-brace): Clean up using
4566 `c-tentative-buffer-changes'. 4792 `c-tentative-buffer-changes'.
4567 4793
4568 * progmodes/cc-defs.el (c-region-is-active-p): Simplified and 4794 * progmodes/cc-defs.el (c-region-is-active-p): Simplify and
4569 converted to macro to choose between Emacs and XEmacs at compile 4795 convert to macro to choose between Emacs and XEmacs at compile time.
4570 time.
4571 4796
4572 (c-set-region-active): New set counterpart to 4797 (c-set-region-active): New set counterpart to `c-region-is-active-p'.
4573 `c-region-is-active-p'.
4574 4798
4575 (c-tentative-buffer-changes): New macro to handle temporary buffer 4799 (c-tentative-buffer-changes): New macro to handle temporary buffer
4576 changes in a convenient way. 4800 changes in a convenient way.
@@ -4578,7 +4802,7 @@
4578 (c-tnt-chng-record-state, c-tnt-chng-cleanup): Internal helpers 4802 (c-tnt-chng-record-state, c-tnt-chng-cleanup): Internal helpers
4579 for `c-tentative-buffer-changes'. 4803 for `c-tentative-buffer-changes'.
4580 4804
4581 * progmodes/cc-engine.el (c-looking-at-inexpr-block): Tightened up 4805 * progmodes/cc-engine.el (c-looking-at-inexpr-block): Tighten up
4582 the checks for paren sexps between the point and the keyword, to 4806 the checks for paren sexps between the point and the keyword, to
4583 avoid some false alarms. 4807 avoid some false alarms.
4584 4808
@@ -4587,23 +4811,22 @@
4587 parens. Changed to make use of c-keyword-member' to avoid some 4811 parens. Changed to make use of c-keyword-member' to avoid some
4588 repeated regexp matches. 4812 repeated regexp matches.
4589 4813
4590 (c-opt-lambda-key, c-opt-inexpr-block-key, 4814 (c-opt-lambda-key, c-opt-inexpr-block-key, c-opt-inexpr-class-key):
4591 c-opt-inexpr-class-key): These language variable are no longer 4815 These language variable are no longer necessary.
4592 necessary.
4593 4816
4594 (c-block-stmt-kwds): New language constant used by 4817 (c-block-stmt-kwds): New language constant used by
4595 c-looking-at-inexpr-block'. 4818 c-looking-at-inexpr-block'.
4596 4819
4597 (c-guess-basic-syntax): Removed an optional check that looked at 4820 (c-guess-basic-syntax): Remove an optional check that looked at
4598 the existence of the now removed language variables. 4821 the existence of the now removed language variables.
4599 4822
4600 * progmodes/cc-engine.el (c-fdoc-shift-type-backward, 4823 * progmodes/cc-engine.el (c-fdoc-shift-type-backward)
4601 c-forward-decl-or-cast-1): Fixed invalid recognition of C++ style 4824 (c-forward-decl-or-cast-1): Fix invalid recognition of C++ style
4602 object instantiation expressions as declarations in some contexts. 4825 object instantiation expressions as declarations in some contexts.
4603 This bug only affected languages where the declarator can't be 4826 This bug only affected languages where the declarator can't be
4604 enclosed in parentheses. 4827 enclosed in parentheses.
4605 4828
4606 * progmodes/cc-styles.el (c-style-alist): Fixed the GNU style to 4829 * progmodes/cc-styles.el (c-style-alist): Fix the GNU style to
4607 insert newlines before and after substatement braces. 4830 insert newlines before and after substatement braces.
4608 4831
4609 * progmodes/cc-engine.el: Improved the heuristics for recognizing 4832 * progmodes/cc-engine.el: Improved the heuristics for recognizing
@@ -4613,15 +4836,14 @@
4613 (c-just-after-func-arglist-p): Rewritten to use 4836 (c-just-after-func-arglist-p): Rewritten to use
4614 `c-forward-decl-or-cast-1'. Now behaves a bit differently too. 4837 `c-forward-decl-or-cast-1'. Now behaves a bit differently too.
4615 4838
4616 (c-beginning-of-member-init-list): Removed since it isn't used 4839 (c-beginning-of-member-init-list): Remove since it isn't used anymore.
4617 anymore.
4618 4840
4619 (c-guess-basic-syntax): Case 5B adapted for the new 4841 (c-guess-basic-syntax): Adapt case 5B for the new
4620 `c-just-after-func-arglist-p'. Cases 5B.1 and 5B.3 merged. Cases 4842 `c-just-after-func-arglist-p'. Merge cases 5B.1 and 5B.3.
4621 5D.1 and 5D.2 removed since they aren't trigged anymore (case 5B.1 4843 Remove cases 5D.1 and 5D.2 since they aren't trigged anymore (case 5B.1
4622 covers all cases now). 4844 covers all cases now).
4623 4845
4624 * progmodes/cc-defs.el (c-point): Added `bosws' and `eosws'. 4846 * progmodes/cc-defs.el (c-point): Add `bosws' and `eosws'.
4625 4847
46262005-12-08 Alan Mackenzie <bug-cc-mode@gnu.org> 48482005-12-08 Alan Mackenzie <bug-cc-mode@gnu.org>
4627 4849
@@ -4644,15 +4866,15 @@
4644 (c-search-uplist-for-classkey): The old one. It's now a wrapper 4866 (c-search-uplist-for-classkey): The old one. It's now a wrapper
4645 for compatibility. 4867 for compatibility.
4646 4868
4647 (c-add-class-syntax, c-guess-continued-construct, 4869 (c-add-class-syntax, c-guess-continued-construct)
4648 c-guess-basic-syntax): Adapted for `c-looking-at-decl-block'. 4870 (c-guess-basic-syntax): Adapt for `c-looking-at-decl-block'.
4649 4871
4650 (c-decl-block-key): Changed to tell apart ambiguous and 4872 (c-decl-block-key): Change to tell apart ambiguous and
4651 unambiguous keywords. Pike specials are now handled directly in 4873 unambiguous keywords. Pike specials are now handled directly in
4652 the code instead. 4874 the code instead.
4653 4875
4654 (c-block-prefix-disallowed-chars, c-block-prefix-charset): New 4876 (c-block-prefix-disallowed-chars, c-block-prefix-charset):
4655 language constants and variables to make the backward skip in 4877 New language constants and variables to make the backward skip in
4656 `c-looking-at-decl-block' as tight as possible. 4878 `c-looking-at-decl-block' as tight as possible.
4657 4879
4658 (c-nonsymbol-token-char-list): New language constant. 4880 (c-nonsymbol-token-char-list): New language constant.
@@ -4663,7 +4885,7 @@
4663 * progmodes/cc-defs.el (c-make-bare-char-alt): New helper for 4885 * progmodes/cc-defs.el (c-make-bare-char-alt): New helper for
4664 making char classes for `c-syntactic-skip-backward'. 4886 making char classes for `c-syntactic-skip-backward'.
4665 4887
4666 * progmodes/cc-engine.el (c-guess-basic-syntax): Simplified case 4888 * progmodes/cc-engine.el (c-guess-basic-syntax): Simplify case
4667 16D - can't be a class-close at that point. 4889 16D - can't be a class-close at that point.
4668 4890
4669 * progmodes/cc-engine.el (c-guess-basic-syntax) 4891 * progmodes/cc-engine.el (c-guess-basic-syntax)
@@ -4674,17 +4896,16 @@
4674 `c-guess-basic-syntax' never will look at things outside the 4896 `c-guess-basic-syntax' never will look at things outside the
4675 current narrowment now. The anchor position for `topmost-intro' 4897 current narrowment now. The anchor position for `topmost-intro'
4676 is affected by this, but it was so bogus it was basically useless 4898 is affected by this, but it was so bogus it was basically useless
4677 before, and now it's equally bogus but in a slightly different 4899 before, and now it's equally bogus but in a slightly different way.
4678 way.
4679 4900
4680 (c-narrow-out-enclosing-class): Gone. 4901 (c-narrow-out-enclosing-class): Gone.
4681 4902
4682 (c-most-enclosing-brace, c-least-enclosing-brace): Don't filter to 4903 (c-most-enclosing-brace, c-least-enclosing-brace): Don't filter to
4683 the narrowed region. 4904 the narrowed region.
4684 4905
4685 (c-least-enclosing-brace): Removed silly optional argument. 4906 (c-least-enclosing-brace): Remove silly optional argument.
4686 4907
4687 * progmodes/cc-engine.el (c-beginning-of-decl-1): Fixed bug where 4908 * progmodes/cc-engine.el (c-beginning-of-decl-1): Fix bug where
4688 the point could be left directly after an open paren when finding 4909 the point could be left directly after an open paren when finding
4689 the beginning of the first decl in the block. 4910 the beginning of the first decl in the block.
4690 4911
@@ -4709,13 +4930,11 @@
4709 (c-identifier-start, c-identifier-key): Now completely calculated 4930 (c-identifier-start, c-identifier-key): Now completely calculated
4710 from other constants. 4931 from other constants.
4711 4932
4712 (c-identifier-last-sym-match): Decommissioned since it's no longer 4933 (c-identifier-last-sym-match): Decommission since it's no longer used.
4713 used.
4714 4934
4715 (c-operators): Use `c-identifier-ops'. Documented 4935 (c-operators): Use `c-identifier-ops'. Document `postfix-if-paren'.
4716 `postfix-if-paren'.
4717 4936
4718 * progmodes/cc-engine.el (c-forward-name): Removed the 4937 * progmodes/cc-engine.el (c-forward-name): Remove the
4719 optimization when c-identifier-key is equal to c-symbol-key since 4938 optimization when c-identifier-key is equal to c-symbol-key since
4720 it doesn't work in byte compiled files. Don't record empty 4939 it doesn't work in byte compiled files. Don't record empty
4721 regions as identifiers. 4940 regions as identifiers.
@@ -4731,13 +4950,13 @@
4731 * progmodes/cc-defs.el (c-lang-const): Fixes to allow use without 4950 * progmodes/cc-defs.el (c-lang-const): Fixes to allow use without
4732 an explicit language in functions. 4951 an explicit language in functions.
4733 4952
4734 * progmodes/cc-defs.el (c-make-keywords-re): Added an appendable 4953 * progmodes/cc-defs.el (c-make-keywords-re): Add an appendable
4735 variant of adornment. 4954 variant of adornment.
4736 4955
4737 * progmodes/cc-langs.el (c-any-class-key): Removed unused language 4956 * progmodes/cc-langs.el (c-any-class-key): Remove unused language
4738 variable. 4957 variable.
4739 4958
4740 (c-type-decl-prefix-key): Removed some now unnecessary cruft from 4959 (c-type-decl-prefix-key): Remove some now unnecessary cruft from
4741 the Pike value. 4960 the Pike value.
4742 4961
4743 * progmodes/cc-engine.el (c-on-identifier) 4962 * progmodes/cc-engine.el (c-on-identifier)
@@ -4745,7 +4964,7 @@
4745 correctly in `skip-chars-backward'. Affected the operator lfun 4964 correctly in `skip-chars-backward'. Affected the operator lfun
4746 syntax in Pike. 4965 syntax in Pike.
4747 4966
4748 * progmodes/cc-langs.el (c-make-init-lang-vars-fun): Disabled the 4967 * progmodes/cc-langs.el (c-make-init-lang-vars-fun): Disable the
4749 diagnostic message about precompiled language vars not being used. 4968 diagnostic message about precompiled language vars not being used.
4750 4969
4751 * progmodes/cc-langs.el (c-paren-nontype-kwds): The GCC keyword 4970 * progmodes/cc-langs.el (c-paren-nontype-kwds): The GCC keyword
@@ -4755,9 +4974,9 @@
4755 (c-specifier-key, c-not-decl-init-keywords): Some cleanup using new 4974 (c-specifier-key, c-not-decl-init-keywords): Some cleanup using new
4756 language constants `c-type-start-kwds' and `c-prefix-spec-kwds'. 4975 language constants `c-type-start-kwds' and `c-prefix-spec-kwds'.
4757 4976
4758 * progmodes/cc-fonts.el, cc-langs.el, cc-engine.el: Internal 4977 * progmodes/cc-fonts.el, cc-langs.el, cc-engine.el:
4759 cleanups to properly detect the declared identifiers in various 4978 Internal cleanups to properly detect the declared identifiers in
4760 declarations. 4979 various declarations.
4761 4980
4762 (c-decl-start-kwds): New language constant to recognize 4981 (c-decl-start-kwds): New language constant to recognize
4763 declarations that can start anywhere. Used for class declarations 4982 declarations that can start anywhere. Used for class declarations
@@ -4768,7 +4987,7 @@
4768 (c-find-decl-spots): Implement `c-decl-start-kwds'. 4987 (c-find-decl-spots): Implement `c-decl-start-kwds'.
4769 4988
4770 (c-other-decl-kwds, c-postfix-decl-spec-kwds, c-decl-hangon-kwds) 4989 (c-other-decl-kwds, c-postfix-decl-spec-kwds, c-decl-hangon-kwds)
4771 (c-decl-hangon-key, c-forward-decl-or-cast-1): Separated the 4990 (c-decl-hangon-key, c-forward-decl-or-cast-1): Separate the
4772 handling of the compiler specific extension keywords into a new 4991 handling of the compiler specific extension keywords into a new
4773 language constant `c-decl-hangon-kwds' that defines keyword 4992 language constant `c-decl-hangon-kwds' that defines keyword
4774 clauses to be ignored in declarations. 4993 clauses to be ignored in declarations.
@@ -4784,9 +5003,8 @@
4784 (c-forward-decl-or-cast-1): Recognize the declared identifier in 5003 (c-forward-decl-or-cast-1): Recognize the declared identifier in
4785 class and enum declarations as such and not as part of the type. 5004 class and enum declarations as such and not as part of the type.
4786 5005
4787 (c-forward-decl-or-cast-1, c-forward-label): Relaxed the 5006 (c-forward-decl-or-cast-1, c-forward-label): Relax the
4788 interpretation of PRECEDING-TOKEN-END when there's no preceding 5007 interpretation of PRECEDING-TOKEN-END when there's no preceding token.
4789 token.
4790 5008
4791 (c-forward-decl-or-cast-1): Don't disregard sure signs of 5009 (c-forward-decl-or-cast-1): Don't disregard sure signs of
4792 declarations when there's some syntax error later on. 5010 declarations when there's some syntax error later on.
@@ -4799,7 +5017,7 @@
4799 5017
4800 * progmodes/cc-engine.el, cc-fonts.el, cc-langs.el, cc-menus.el 5018 * progmodes/cc-engine.el, cc-fonts.el, cc-langs.el, cc-menus.el
4801 * cc-mode.el, cc-styles.el, cc-vars.el, cc-align.el, cc-awk.el 5019 * cc-mode.el, cc-styles.el, cc-vars.el, cc-align.el, cc-awk.el
4802 * cc-cmds.el, cc-defs.el: Changed the policy for marking up 5020 * cc-cmds.el, cc-defs.el: Change the policy for marking up
4803 functions that might do hidden buffer changes: All such internal 5021 functions that might do hidden buffer changes: All such internal
4804 functions are now marked instead of those that don't. 5022 functions are now marked instead of those that don't.
4805 5023
@@ -4814,10 +5032,10 @@
4814 (c-electric-semi&comma, c-electric-colon, c-electric-lt-gt) 5032 (c-electric-semi&comma, c-electric-colon, c-electric-lt-gt)
4815 (c-electric-paren, c-electric-continued-statement, c-indent-command) 5033 (c-electric-paren, c-electric-continued-statement, c-indent-command)
4816 (c-indent-region, c-mask-paragraph, c-indent-new-comment-line) 5034 (c-indent-region, c-mask-paragraph, c-indent-new-comment-line)
4817 (c-context-line-break): Added `c-save-buffer-state' calls to comply 5035 (c-context-line-break): Add `c-save-buffer-state' calls to comply
4818 with the changed semantics of the functions above. 5036 with the changed semantics of the functions above.
4819 5037
4820 * progmodes/cc-engine.el (c-beginning-of-statement-1): Fixed a bug 5038 * progmodes/cc-engine.el (c-beginning-of-statement-1): Fix a bug
4821 when macros occur in obscure places. Optimized the sexp movement 5039 when macros occur in obscure places. Optimized the sexp movement
4822 a bit. 5040 a bit.
4823 5041
@@ -4849,13 +5067,13 @@
4849 * progmodes/cc-engine.el, cc-fonts.el, cc-langs.el: Cleaned up the 5067 * progmodes/cc-engine.el, cc-fonts.el, cc-langs.el: Cleaned up the
4850 label handling. Labels are now recognized in a uniform and more 5068 label handling. Labels are now recognized in a uniform and more
4851 robust way, regardless of context. Text properties are put on all 5069 robust way, regardless of context. Text properties are put on all
4852 labels to recognize the following declarations better. Multiword 5070 labels to recognize the following declarations better.
4853 labels are handled both in indentation and fontification for the 5071 Multiword labels are handled both in indentation and fontification for
4854 benefit of language extensions like Qt. For consistency, keywords 5072 the benefit of language extensions like Qt. For consistency, keywords
4855 in labels are now fontified with the label face instead. That 5073 in labels are now fontified with the label face instead.
4856 also applies to "case" and "default". 5074 That also applies to "case" and "default".
4857 5075
4858 (c-beginning-of-statement-1): Fixed some bugs in the label 5076 (c-beginning-of-statement-1): Fix some bugs in the label
4859 handling. Disregard `c-nonlabel-token-key' in labels that begin 5077 handling. Disregard `c-nonlabel-token-key' in labels that begin
4860 with `c-label-kwds'. 5078 with `c-label-kwds'.
4861 5079
@@ -4867,70 +5085,68 @@
4867 5085
4868 (c-forward-label): New function to recognize labels. 5086 (c-forward-label): New function to recognize labels.
4869 5087
4870 (c-guess-basic-syntax): Replaced uses of `c-label-key' with 5088 (c-guess-basic-syntax): Replace uses of `c-label-key' with
4871 `c-forward-label'. Moved the label recognition cases (14 and 15) 5089 `c-forward-label'. Moved the label recognition cases (14 and 15)
4872 earlier since they aren't so context sensitive now. Handle labels 5090 earlier since they aren't so context sensitive now. Handle labels
4873 on the top level gracefully. Moved access label recognition to 5091 on the top level gracefully. Moved access label recognition to
4874 the generic label case (CASE 15) - removed CASE 5E. 5092 the generic label case (CASE 15) - removed CASE 5E.
4875 5093
4876 (c-font-lock-declarations): Added recognition of labels in the 5094 (c-font-lock-declarations): Add recognition of labels in the
4877 same round since we need to handle labels in parallell with other 5095 same round since we need to handle labels in parallell with other
4878 declarations to recognize both accurately. It should also improve 5096 declarations to recognize both accurately. It should also improve
4879 speed. 5097 speed.
4880 5098
4881 (c-simple-decl-matchers, c-basic-matchers-after): Moved 5099 (c-simple-decl-matchers, c-basic-matchers-after):
4882 `c-font-lock-labels' so that it only is used on decoration level 2 5100 Move `c-font-lock-labels' so that it only is used on decoration level 2
4883 since `c-font-lock-declarations' handles it otherwise. 5101 since `c-font-lock-declarations' handles it otherwise.
4884 5102
4885 (c-complex-decl-matchers): Removed the simplistic recognition of 5103 (c-complex-decl-matchers): Remove the simplistic recognition of
4886 access labels. 5104 access labels.
4887 5105
4888 (c-decl-prefix-re): Removed the kludges that was necessary to cope 5106 (c-decl-prefix-re): Remove the kludges that was necessary to cope
4889 with labels earlier. 5107 with labels earlier.
4890 5108
4891 (c-decl-start-re): New language variable to make 5109 (c-decl-start-re): New language variable to make
4892 `c-font-lock-declarations' stop for the special protection labels 5110 `c-font-lock-declarations' stop for the special protection labels
4893 in Objective-C that start with `@'. 5111 in Objective-C that start with `@'.
4894 5112
4895 (c-label-key): Removed since it's no longer used. 5113 (c-label-key): Remove since it's no longer used.
4896 5114
4897 (c-recognize-colon-labels, c-label-prefix-re): New language 5115 (c-recognize-colon-labels, c-label-prefix-re): New language
4898 constants to support recognition of generic colon-terminated 5116 constants to support recognition of generic colon-terminated labels.
4899 labels.
4900 5117
4901 (c-type-decl-end-used): `c-decl-end' is now used whenever there 5118 (c-type-decl-end-used): `c-decl-end' is now used whenever there
4902 are colon terminated labels. 5119 are colon terminated labels.
4903 5120
4904 * progmodes/cc-align.el (c-lineup-arglist): Fixed bug when the 5121 * progmodes/cc-align.el (c-lineup-arglist): Fix bug when the
4905 first argument starts with a special brace list. 5122 first argument starts with a special brace list.
4906 5123
4907 * progmodes/cc-engine.el, cc-fonts.el (c-forward-decl-or-cast-1) 5124 * progmodes/cc-engine.el, cc-fonts.el (c-forward-decl-or-cast-1)
4908 (c-font-lock-declarations): Broke out the declaration and cast 5125 (c-font-lock-declarations): Break out the declaration and cast
4909 recognition from `c-font-lock-declarations' to a new function, so 5126 recognition from `c-font-lock-declarations' to a new function, so
4910 that it can be used in the indentation engine. 5127 that it can be used in the indentation engine.
4911 5128
4912 * progmodes/cc-engine.el (c-find-decl-spots): Fixed bug in backing 5129 * progmodes/cc-engine.el (c-find-decl-spots): Fix bug in backing
4913 up to the start of the literal. Fixed bug with the point on the 5130 up to the start of the literal. Fixed bug with the point on the
4914 wrong side of the search limit that could happen when the start 5131 wrong side of the search limit that could happen when the start
4915 position is inside a literal. 5132 position is inside a literal.
4916 5133
4917 * progmodes/cc-engine.el (c-parse-state) 5134 * progmodes/cc-engine.el (c-parse-state)
4918 (c-invalidate-state-cache): Modified the use of `c-state-cache-end' 5135 (c-invalidate-state-cache): Modify the use of `c-state-cache-end'
4919 so that it's kept a little bit back to increase the hit rate. 5136 so that it's kept a little bit back to increase the hit rate.
4920 5137
4921 (c-parse-state): Changed the macro handling and fixed some 5138 (c-parse-state): Change the macro handling and fixed some
4922 glitches. Macro context is checked more often than necessary now, 5139 glitches. Macro context is checked more often than necessary now,
4923 but otoh less garbage conses are generated. 5140 but otoh less garbage conses are generated.
4924 5141
4925 * progmodes/cc-engine.el (c-parse-state) 5142 * progmodes/cc-engine.el (c-parse-state)
4926 (c-invalidate-state-cache): Cache the last position where 5143 (c-invalidate-state-cache): Cache the last position where
4927 `c-state-cache' applies. This can speed up refontification quite 5144 `c-state-cache' applies. This can speed up refontification quite
4928 a bit in blocks where there are many non-brace parens before the 5145 a bit in blocks where there are many non-brace parens before the point.
4929 point.
4930 5146
4931 (c-state-cache-end): New variable for this. 5147 (c-state-cache-end): New variable for this.
4932 5148
4933 (c-guess-basic-syntax, c-debug-parse-state): Adapted for the new 5149 (c-guess-basic-syntax, c-debug-parse-state): Adapt for the new
4934 cache variable. 5150 cache variable.
4935 5151
4936 * progmodes/cc-engine.el (c-find-decl-spots): Take more care to 5152 * progmodes/cc-engine.el (c-find-decl-spots): Take more care to
@@ -4941,39 +5157,39 @@
4941 region is a single line inside a literal or macro (typically when 5157 region is a single line inside a literal or macro (typically when
4942 the current line is refontified). 5158 the current line is refontified).
4943 5159
4944 * progmodes/cc-engine.el (c-guess-basic-syntax): Simplified calls 5160 * progmodes/cc-engine.el (c-guess-basic-syntax): Simplify calls
4945 to `c-add-stmt-syntax' - there's no need to explicitly whack off 5161 to `c-add-stmt-syntax' - there's no need to explicitly whack off
4946 entries from the paren state. 5162 entries from the paren state.
4947 5163
4948 * progmodes/cc-engine.el (c-add-stmt-syntax): Narrowed down the 5164 * progmodes/cc-engine.el (c-add-stmt-syntax): Narrow down the
4949 special case for "else if" clauses. 5165 special case for "else if" clauses.
4950 5166
4951 * progmodes/cc-engine.el (c-looking-at-inexpr-block) 5167 * progmodes/cc-engine.el (c-looking-at-inexpr-block)
4952 (c-add-stmt-syntax): Use `c-recognize-paren-inexpr-blocks'. 5168 (c-add-stmt-syntax): Use `c-recognize-paren-inexpr-blocks'.
4953 5169
4954 * progmodes/cc-langs.el (c-recognize-paren-inexpr-blocks): New 5170 * progmodes/cc-langs.el (c-recognize-paren-inexpr-blocks):
4955 language variable to recognize the gcc extension with statement 5171 New language variable to recognize the gcc extension with statement
4956 blocks inside expressions. 5172 blocks inside expressions.
4957 5173
4958 * progmodes/cc-engine.el (c-add-stmt-syntax): Restructured to make 5174 * progmodes/cc-engine.el (c-add-stmt-syntax): Restructure to make
4959 it somewhat more comprehensible. The argument AT-BLOCK-START is 5175 it somewhat more comprehensible. The argument AT-BLOCK-START is
4960 no longer used and hence removed. 5176 no longer used and hence removed.
4961 5177
4962 (c-guess-continued-construct, c-guess-basic-syntax): Updated calls 5178 (c-guess-continued-construct, c-guess-basic-syntax): Update calls
4963 to `c-add-stmt-syntax'. 5179 to `c-add-stmt-syntax'.
4964 5180
4965 * progmodes/cc-engine.el (c-backward-to-decl-anchor): Use 5181 * progmodes/cc-engine.el (c-backward-to-decl-anchor):
4966 `c-beginning-of-statement-1' instead of duplicating parts of it. 5182 Use `c-beginning-of-statement-1' instead of duplicating parts of it.
4967 This fixes bogus label recognition. 5183 This fixes bogus label recognition.
4968 5184
4969 * progmodes/cc-engine.el (c-add-type, c-check-type) 5185 * progmodes/cc-engine.el (c-add-type, c-check-type)
4970 (c-forward-name, c-forward-type): Improved storage of template 5186 (c-forward-name, c-forward-type): Improve storage of template
4971 types in `c-found-types' so that they can be recognized better. 5187 types in `c-found-types' so that they can be recognized better.
4972 5188
4973 (c-syntactic-content): Added option to skip past nested parens. 5189 (c-syntactic-content): Add option to skip past nested parens.
4974 5190
4975 * progmodes/cc-engine.el (c-forward-name): Set 5191 * progmodes/cc-engine.el (c-forward-name):
4976 `c-last-identifier-range' all the time. It's less work that way. 5192 Set `c-last-identifier-range' all the time. It's less work that way.
4977 Handle that there might not be an identifier to store in 5193 Handle that there might not be an identifier to store in
4978 `c-last-identifier-range'. 5194 `c-last-identifier-range'.
4979 5195
@@ -4981,7 +5197,7 @@
4981 nil from `c-forward-name'. 5197 nil from `c-forward-name'.
4982 5198
4983 * progmodes/cc-defs.el (c-safe-scan-lists) 5199 * progmodes/cc-defs.el (c-safe-scan-lists)
4984 (c-(go-)?(up|down)-list-(forward|backward)): Added limit arguments. 5200 (c-(go-)?(up|down)-list-(forward|backward)): Add limit arguments.
4985 5201
4986 * progmodes/cc-defs.el (c-save-buffer-state): Use `unwind-protect' 5202 * progmodes/cc-defs.el (c-save-buffer-state): Use `unwind-protect'
4987 to work even if the form fails. 5203 to work even if the form fails.
@@ -4989,14 +5205,13 @@
4989 * progmodes/cc-engine.el (c-parse-state): Speedup when moving far 5205 * progmodes/cc-engine.el (c-parse-state): Speedup when moving far
4990 down in a large file in one go. 5206 down in a large file in one go.
4991 5207
4992 (c-get-fallback-start-pos): New helper function for 5208 (c-get-fallback-start-pos): New helper function for `c-parse-state'.
4993 `c-parse-state'.
4994 5209
4995 * progmodes/cc-align.el (c-lineup-assignments): New lineup 5210 * progmodes/cc-align.el (c-lineup-assignments): New lineup
4996 function which is like `c-lineup-math' but returns nil instead of 5211 function which is like `c-lineup-math' but returns nil instead of
4997 `c-basic-offset' when it doesn't match. 5212 `c-basic-offset' when it doesn't match.
4998 5213
4999 (c-lineup-math): Changed to use `c-lineup-assignments'. 5214 (c-lineup-math): Change to use `c-lineup-assignments'.
5000 5215
50012005-12-08 Alan Mackenzie <bug-cc-mode@gnu.org> 52162005-12-08 Alan Mackenzie <bug-cc-mode@gnu.org>
5002 5217
@@ -5011,7 +5226,7 @@
5011 places to use skip by syntax instead of skip by char class. 5226 places to use skip by syntax instead of skip by char class.
5012 5227
5013 * progmodes/cc-langs.el (c-unterminated-block-comment-regexp): 5228 * progmodes/cc-langs.el (c-unterminated-block-comment-regexp):
5014 Fixed a bug in the regexp that caused extreme backtracking. 5229 Fix a bug in the regexp that caused extreme backtracking.
5015 5230
5016 * progmodes/cc-langs.el (c-block-comment-starter) 5231 * progmodes/cc-langs.el (c-block-comment-starter)
5017 (c-block-comment-ender): New language constants to specify in a 5232 (c-block-comment-ender): New language constants to specify in a
@@ -5030,18 +5245,16 @@
5030 5245
5031 (c-simple-ws): New language constant for simple whitespace. 5246 (c-simple-ws): New language constant for simple whitespace.
5032 5247
5033 * progmodes/cc-defs.el (c-concat-separated): New convenience 5248 * progmodes/cc-defs.el (c-concat-separated): New convenience function.
5034 function.
5035 5249
5036 * progmodes/cc-defs.el (c-make-keywords-re): Added kludge for bug 5250 * progmodes/cc-defs.el (c-make-keywords-re): Add kludge for bug
5037 in `regexp-opt' in Emacs 20 and XEmacs when strings contain 5251 in `regexp-opt' in Emacs 20 and XEmacs when strings contain
5038 newlines. Allow and ignore nil elements in the list. 5252 newlines. Allow and ignore nil elements in the list.
5039 5253
50402005-12-08 Alan Mackenzie <bug-cc-mode@gnu.org> 52542005-12-08 Alan Mackenzie <bug-cc-mode@gnu.org>
5041 5255
5042 * progmodes/cc-cmds.el: Comment out a (n almost certainly 5256 * progmodes/cc-cmds.el: Comment out a (n almost certainly
5043 superfluous) check, (eq here (point-max)) in 5257 superfluous) check, (eq here (point-max)) in c-beginning-of-statement.
5044 c-beginning-of-statement.
5045 5258
5046 * progmodes/cc-cmds.el: Tidy up the comments in 5259 * progmodes/cc-cmds.el: Tidy up the comments in
5047 c-beginning-of-statement and subfunctions. 5260 c-beginning-of-statement and subfunctions.
@@ -5050,8 +5263,7 @@
5050 more flexible c-put-char-property and c-clear-char-properties. 5263 more flexible c-put-char-property and c-clear-char-properties.
5051 Add the author's email address. 5264 Add the author's email address.
5052 5265
5053 * progmodes/cc-langs.el: New variable, 5266 * progmodes/cc-langs.el (c-block-comment-start-regexp): New variable.
5054 c-block-comment-start-regexp.
5055 5267
5056 * progmodes/cc-cmds.el: Fix bug with M-e, when point is inside the 5268 * progmodes/cc-cmds.el: Fix bug with M-e, when point is inside the
5057 closing "*/" of a block comment. 5269 closing "*/" of a block comment.
@@ -5075,11 +5287,11 @@
5075 * progmodes/cc-fonts.el (c-font-lock-invalid-string): Fix when 5287 * progmodes/cc-fonts.el (c-font-lock-invalid-string): Fix when
5076 there are several strings on the same line. 5288 there are several strings on the same line.
5077 5289
5078 * progmodes/cc-engine.el (c-literal-limits): Removed the 5290 * progmodes/cc-engine.el (c-literal-limits): Remove the
5079 compatibility function for older emacsen. `c-literal-limits-fast' 5291 compatibility function for older emacsen. `c-literal-limits-fast'
5080 has now taken the place of this function. 5292 has now taken the place of this function.
5081 5293
5082 * progmodes/cc-vars.el (c-emacs-features): Removed compatibility 5294 * progmodes/cc-vars.el (c-emacs-features): Remove compatibility
5083 with older emacsen: We now require `pps-extended-state'. 5295 with older emacsen: We now require `pps-extended-state'.
5084 5296
50852005-12-08 Alan Mackenzie <bug-cc-mode@gnu.org> 52972005-12-08 Alan Mackenzie <bug-cc-mode@gnu.org>
@@ -5095,19 +5307,18 @@
5095 eachother. Correct a few incidental bugs. 5307 eachother. Correct a few incidental bugs.
5096 5308
5097 * progmodes/cc-cmds.el: Restructure c-beginning-of-statement: 5309 * progmodes/cc-cmds.el: Restructure c-beginning-of-statement:
5098 Improve its doc-string. Improve the handling of certain specific 5310 Improve its doc-string. Improve the handling of certain specific cases.
5099 cases.
5100 5311
51012005-12-08 Martin Stjernholm <bug-cc-mode@gnu.org> 53122005-12-08 Martin Stjernholm <bug-cc-mode@gnu.org>
5102 5313
5103 * progmodes/cc-engine.el, cc-fonts.el, cc-langs.el 5314 * progmodes/cc-engine.el, cc-fonts.el, cc-langs.el
5104 (c-guess-basic-syntax): Changed the way class-level labels are 5315 (c-guess-basic-syntax): Change the way class-level labels are
5105 recognized; they can now contain essentially any symbols. 5316 recognized; they can now contain essentially any symbols.
5106 5317
5107 (c-opt-extra-label-key): New language variable to cope with the 5318 (c-opt-extra-label-key): New language variable to cope with the
5108 special protection label syntax in Objective-C. 5319 special protection label syntax in Objective-C.
5109 5320
5110 (c-opt-access-key): Removed; this is now handled better by 5321 (c-opt-access-key): Remove; this is now handled better by
5111 `c-nonlabel-token-key' and `c-opt-extra-label-key'. 5322 `c-nonlabel-token-key' and `c-opt-extra-label-key'.
5112 5323
5113 (c-complex-decl-matchers): Update to handle that 5324 (c-complex-decl-matchers): Update to handle that
@@ -5120,11 +5331,11 @@
5120 Recognize bitfields better. 5331 Recognize bitfields better.
5121 5332
5122 * progmodes/cc-engine.el (c-beginning-of-inheritance-list): 5333 * progmodes/cc-engine.el (c-beginning-of-inheritance-list):
5123 Removed some cruft and fixed a bug that could cause it to go to a 5334 Remove some cruft and fixed a bug that could cause it to go to a
5124 position further down. 5335 position further down.
5125 5336
5126 * progmodes/cc-langs.el, cc-engine.el 5337 * progmodes/cc-langs.el, cc-engine.el
5127 (c-beginning-of-statement-1): Improved detection of labels in 5338 (c-beginning-of-statement-1): Improve detection of labels in
5128 declaration contexts. 5339 declaration contexts.
5129 5340
5130 (c-beginning-of-decl-1): Use it. 5341 (c-beginning-of-decl-1): Use it.
@@ -5132,11 +5343,11 @@
5132 (c-nonlabel-token-key): New language constant and variable needed 5343 (c-nonlabel-token-key): New language constant and variable needed
5133 by `c-beginning-of-statement-1'. 5344 by `c-beginning-of-statement-1'.
5134 5345
5135 * progmodes/cc-engine.el (c-guess-basic-syntax): Fixed bug that 5346 * progmodes/cc-engine.el (c-guess-basic-syntax): Fix bug that
5136 manifested itself due to the correction in `c-forward-sexp'. 5347 manifested itself due to the correction in `c-forward-sexp'.
5137 5348
5138 * progmodes/cc-defs.el (c-forward-sexp, c-backward-sexp): Made 5349 * progmodes/cc-defs.el (c-forward-sexp, c-backward-sexp):
5139 these behave as documented when used at the buffer limits. 5350 Make these behave as documented when used at the buffer limits.
5140 5351
5141 * progmodes/cc-mode.el, cc-engine.el, cc-langs.el 5352 * progmodes/cc-mode.el, cc-engine.el, cc-langs.el
5142 (c-type-decl-end-used): Made this a language variable. 5353 (c-type-decl-end-used): Made this a language variable.
@@ -5145,20 +5356,20 @@
5145 correctly when `combine-after-change-calls' is used together with 5356 correctly when `combine-after-change-calls' is used together with
5146 temporary narrowings. 5357 temporary narrowings.
5147 5358
5148 * progmodes/cc-engine.el (c-beginning-of-statement-1): Report 5359 * progmodes/cc-engine.el (c-beginning-of-statement-1):
5149 labels correctly when the start point is immediately after the 5360 Report labels correctly when the start point is immediately after the
5150 colon. 5361 colon.
5151 5362
5152 * progmodes/cc-defs.el (c-parse-sexp-lookup-properties): Removed 5363 * progmodes/cc-defs.el (c-parse-sexp-lookup-properties):
5153 since it isn't used anymore. 5364 Remove since it isn't used anymore.
5154 5365
5155 * progmodes/cc-cmds.el (c-electric-lt-gt): Detect and mark angle 5366 * progmodes/cc-cmds.el (c-electric-lt-gt): Detect and mark angle
5156 bracket arglists such as template parens in C++. 5367 bracket arglists such as template parens in C++.
5157 5368
5158 * progmodes/cc-engine.el (c-syntactic-skip-backward): Fixed a bug 5369 * progmodes/cc-engine.el (c-syntactic-skip-backward): Fix a bug
5159 in the last check-in. Some optimization. 5370 in the last check-in. Some optimization.
5160 5371
5161 * progmodes/cc-engine.el (c-syntactic-skip-backward): Fixed bug 5372 * progmodes/cc-engine.el (c-syntactic-skip-backward): Fix bug
5162 where it could stop at the same level in a preceding sexp when 5373 where it could stop at the same level in a preceding sexp when
5163 PAREN-LEVEL is set. 5374 PAREN-LEVEL is set.
5164 5375
@@ -5166,7 +5377,7 @@
5166 text property lookup only when it's needed. 5377 text property lookup only when it's needed.
5167 5378
5168 * progmodes/cc-langs.el, cc-engine.el, cc-fonts.el, cc-mode.el: 5379 * progmodes/cc-langs.el, cc-engine.el, cc-fonts.el, cc-mode.el:
5169 Changed the policy for paren marked angle brackets to be more 5380 Change the policy for paren marked angle brackets to be more
5170 persistent; once marked they remain marked even when they're found 5381 persistent; once marked they remain marked even when they're found
5171 to be unbalanced in the searched region. This should keep the 5382 to be unbalanced in the searched region. This should keep the
5172 paren syntax around even when individual lines are refontified in 5383 paren syntax around even when individual lines are refontified in
@@ -5180,7 +5391,7 @@
5180 (c-forward-<>-arglist, c-forward-<>-arglist-recur): The reparse 5391 (c-forward-<>-arglist, c-forward-<>-arglist-recur): The reparse
5181 argument has become `c-parse-and-markup-<>-arglists'. 5392 argument has become `c-parse-and-markup-<>-arglists'.
5182 5393
5183 (c-remove-<>-arglist-properties): Removed - no longer used. 5394 (c-remove-<>-arglist-properties): Remove - no longer used.
5184 5395
5185 (c-after-change-check-<>-operators): New function used on 5396 (c-after-change-check-<>-operators): New function used on
5186 `after-change-functions' to avoid that "<" and ">" characters that 5397 `after-change-functions' to avoid that "<" and ">" characters that
@@ -5192,28 +5403,26 @@
5192 (c-after-change): Call `c-after-change-check-<>-operators'. 5403 (c-after-change): Call `c-after-change-check-<>-operators'.
5193 5404
5194 (c-font-lock-<>-arglists): Use the context properties set by 5405 (c-font-lock-<>-arglists): Use the context properties set by
5195 `c-font-lock-declarations' to set 5406 `c-font-lock-declarations' to set `c-disallow-comma-in-<>-arglists'
5196 `c-disallow-comma-in-<>-arglists' correctly to avoid doing invalid 5407 correctly to avoid doing invalid markup.
5197 markup.
5198 5408
5199 (c-font-lock-declarations): Removed code that undoes the invalid 5409 (c-font-lock-declarations): Remove code that undoes the invalid
5200 markup done by `c-font-lock-<>-arglists'. 5410 markup done by `c-font-lock-<>-arglists'.
5201 5411
5202 (c-complex-decl-matchers): `c-font-lock-<>-arglists' now runs 5412 (c-complex-decl-matchers): `c-font-lock-<>-arglists' now runs
5203 after `c-font-lock-declarations'. 5413 after `c-font-lock-declarations'.
5204 5414
5205 * progmodes/cc-engine.el (c-syntactic-skip-backward): Added 5415 * progmodes/cc-engine.el (c-syntactic-skip-backward):
5206 paren-level feature. 5416 Add paren-level feature.
5207 5417
5208 (c-guess-basic-syntax): Improved the anchor position for 5418 (c-guess-basic-syntax): Improve the anchor position for
5209 `template-args-cont' in nested template arglists. There's still 5419 `template-args-cont' in nested template arglists. There's still
5210 much to be desired in this area, though. 5420 much to be desired in this area, though.
5211 5421
52122005-12-08 Alan Mackenzie <bug-cc-mode@gnu.org> 54222005-12-08 Alan Mackenzie <bug-cc-mode@gnu.org>
5213 5423
5214 * progmodes/cc-cmds.el, cc-engine.el, cc-langs.el, cc-vars.el: 5424 * progmodes/cc-cmds.el, cc-engine.el, cc-langs.el, cc-vars.el:
5215 Make the "Text Filling and Line Breaking" commands work for AWK 5425 Make the "Text Filling and Line Breaking" commands work for AWK buffers.
5216 buffers.
5217 5426
52182005-12-08 Martin Stjernholm <bug-cc-mode@gnu.org> 54272005-12-08 Martin Stjernholm <bug-cc-mode@gnu.org>
5219 5428
@@ -5252,7 +5461,7 @@
5252 5461
52532005-12-08 Kim F. Storm <storm@cua.dk> 54622005-12-08 Kim F. Storm <storm@cua.dk>
5254 5463
5255 * emulation/cua-base.el (cua-use-hyper-key): Replaced by ... 5464 * emulation/cua-base.el (cua-use-hyper-key): Replace by ...
5256 (cua-rectangle-modifier-key): ... this. New defcustom. Can now 5465 (cua-rectangle-modifier-key): ... this. New defcustom. Can now
5257 select either meta, hyper, or super modifier for rectangle commands. 5466 select either meta, hyper, or super modifier for rectangle commands.
5258 (cua--rectangle-modifier-key): New defvar. 5467 (cua--rectangle-modifier-key): New defvar.
@@ -5261,8 +5470,8 @@
5261 on X, to meta otherwise. Always bind C-return to toggle 5470 on X, to meta otherwise. Always bind C-return to toggle
5262 rectangle. Pass ?\s instead of `space' to cua--M/H-key. 5471 rectangle. Pass ?\s instead of `space' to cua--M/H-key.
5263 5472
5264 * emulation/cua-rect.el (cua-help-for-rectangle): Use 5473 * emulation/cua-rect.el (cua-help-for-rectangle):
5265 cua--rectangle-modifier-key. Handle super modifier too. 5474 Use cua--rectangle-modifier-key. Handle super modifier too.
5266 (cua--init-rectangles): Always bind C-return to toggle rectangle. 5475 (cua--init-rectangles): Always bind C-return to toggle rectangle.
5267 Pass ?\s instead of `space' to cua--M/H-key and cua--rect-M/H-key. 5476 Pass ?\s instead of `space' to cua--M/H-key and cua--rect-M/H-key.
5268 5477
@@ -5273,8 +5482,8 @@
5273 keymap if cua--prefix-override-timer is `shift'. 5482 keymap if cua--prefix-override-timer is `shift'.
5274 (cua--shift-control-prefix): New function; emulate "type prefix 5483 (cua--shift-control-prefix): New function; emulate "type prefix
5275 key twice" functionality to handle shifted prefix key override. 5484 key twice" functionality to handle shifted prefix key override.
5276 (cua--shift-control-c-prefix, cua--shift-control-x-prefix): New 5485 (cua--shift-control-c-prefix, cua--shift-control-x-prefix):
5277 commands. 5486 New commands.
5278 (cua--init-keymaps): Bind them to S-C-c and S-C-x. 5487 (cua--init-keymaps): Bind them to S-C-c and S-C-x.
5279 5488
52802005-12-08 Carsten Dominik <dominik@science.uva.nl> 54892005-12-08 Carsten Dominik <dominik@science.uva.nl>
diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el
index 60705b30552..e2275ce356d 100644
--- a/lisp/cus-edit.el
+++ b/lisp/cus-edit.el
@@ -1092,7 +1092,11 @@ or default values have changed since the previous major Emacs release.
1092With argument SINCE-VERSION (a string), customize all settings 1092With argument SINCE-VERSION (a string), customize all settings
1093that were added or redefined since that version." 1093that were added or redefined since that version."
1094 1094
1095 (interactive "sCustomize options changed, since version (default all versions): ") 1095 (interactive
1096 (list
1097 (read-from-minibuffer
1098 (format "Customize options changed, since version (default %s): "
1099 customize-changed-options-previous-release))))
1096 (if (equal since-version "") 1100 (if (equal since-version "")
1097 (setq since-version nil) 1101 (setq since-version nil)
1098 (unless (condition-case nil 1102 (unless (condition-case nil
@@ -3408,12 +3412,12 @@ Optional EVENT is the location for the menu."
3408 ;; Make the comment invisible by hand if it's empty 3412 ;; Make the comment invisible by hand if it's empty
3409 (custom-comment-hide comment-widget)) 3413 (custom-comment-hide comment-widget))
3410 (put symbol 'customized-face value) 3414 (put symbol 'customized-face value)
3415 (custom-push-theme 'theme-face symbol 'user 'set value)
3411 (if (face-spec-choose value) 3416 (if (face-spec-choose value)
3412 (face-spec-set symbol value) 3417 (face-spec-set symbol value)
3413 ;; face-set-spec ignores empty attribute lists, so just give it 3418 ;; face-set-spec ignores empty attribute lists, so just give it
3414 ;; something harmless instead. 3419 ;; something harmless instead.
3415 (face-spec-set symbol '((t :foreground unspecified)))) 3420 (face-spec-set symbol '((t :foreground unspecified))))
3416 (custom-push-theme 'theme-face symbol 'user 'set value)
3417 (put symbol 'customized-face-comment comment) 3421 (put symbol 'customized-face-comment comment)
3418 (put symbol 'face-comment comment) 3422 (put symbol 'face-comment comment)
3419 (custom-face-state-set widget) 3423 (custom-face-state-set widget)
@@ -3486,13 +3490,17 @@ restoring it to the state of a face that has never been customized."
3486 (put symbol 'customized-face nil) 3490 (put symbol 'customized-face nil)
3487 (put symbol 'customized-face-comment nil) 3491 (put symbol 'customized-face-comment nil)
3488 (custom-push-theme 'theme-face symbol 'user 'reset) 3492 (custom-push-theme 'theme-face symbol 'user 'reset)
3493 (face-spec-set symbol value)
3489 (custom-theme-recalc-face symbol) 3494 (custom-theme-recalc-face symbol)
3490 (when (or (get symbol 'saved-face) (get symbol 'saved-face-comment)) 3495 (when (or (get symbol 'saved-face) (get symbol 'saved-face-comment))
3491 (put symbol 'saved-face nil) 3496 (put symbol 'saved-face nil)
3492 (put symbol 'saved-face-comment nil) 3497 (put symbol 'saved-face-comment nil)
3493 (custom-save-all)) 3498 (custom-save-all))
3494 (put symbol 'face-comment nil) 3499 (put symbol 'face-comment nil)
3495 (widget-value-set child value) 3500 (widget-value-set child
3501 (custom-pre-filter-face-spec
3502 (list (list t (custom-face-attributes-get
3503 symbol nil)))))
3496 ;; This call manages the comment visibility 3504 ;; This call manages the comment visibility
3497 (widget-value-set comment-widget "") 3505 (widget-value-set comment-widget "")
3498 (custom-face-state-set widget) 3506 (custom-face-state-set widget)
diff --git a/lisp/custom.el b/lisp/custom.el
index 15b5b4a815c..c67f3b06272 100644
--- a/lisp/custom.el
+++ b/lisp/custom.el
@@ -819,7 +819,8 @@ See `custom-known-themes' for a list of known themes."
819 (not (equal (eval (car (get symbol 'standard-value))) 819 (not (equal (eval (car (get symbol 'standard-value)))
820 (symbol-value symbol))))) 820 (symbol-value symbol)))))
821 (setq old (list (list 'changed (symbol-value symbol)))) 821 (setq old (list (list 'changed (symbol-value symbol))))
822 (if (facep symbol) 822 (if (and (facep symbol)
823 (not (face-spec-match-p symbol (get symbol 'face-defface-spec))))
823 (setq old (list (list 'changed (list 824 (setq old (list (list 'changed (list
824 (append '(t) (custom-face-attributes-get symbol nil))))))))) 825 (append '(t) (custom-face-attributes-get symbol nil)))))))))
825 (put symbol prop (cons (list theme value) old)) 826 (put symbol prop (cons (list theme value) old))
diff --git a/lisp/diff-mode.el b/lisp/diff-mode.el
index 09645864573..7c7f7902d82 100644
--- a/lisp/diff-mode.el
+++ b/lisp/diff-mode.el
@@ -274,7 +274,7 @@ when editing big diffs)."
274(defvar diff-indicator-changed-face 'diff-indicator-changed) 274(defvar diff-indicator-changed-face 'diff-indicator-changed)
275 275
276(defface diff-function 276(defface diff-function
277 '((t :inherit diff-context)) 277 '((t :inherit diff-header))
278 "`diff-mode' face used to highlight function names produced by \"diff -p\"." 278 "`diff-mode' face used to highlight function names produced by \"diff -p\"."
279 :group 'diff-mode) 279 :group 'diff-mode)
280;; backward-compatibility alias 280;; backward-compatibility alias
diff --git a/lisp/emulation/cua-rect.el b/lisp/emulation/cua-rect.el
index 120866e7925..33b38552595 100644
--- a/lisp/emulation/cua-rect.el
+++ b/lisp/emulation/cua-rect.el
@@ -799,8 +799,8 @@ If command is repeated at same position, delete the rectangle."
799 (if cua--virtual-edges-debug ?, ?\s)) 799 (if cua--virtual-edges-debug ?, ?\s))
800 'face rface)) 800 'face rface))
801 (if (cua--rectangle-right-side) 801 (if (cua--rectangle-right-side)
802 (put-text-property (1- (length ms)) (length ms) 'cursor t ms) 802 (put-text-property (1- (length ms)) (length ms) 'cursor 2 ms)
803 (put-text-property 0 1 'cursor t ms)) 803 (put-text-property 0 1 'cursor 2 ms))
804 (setq bs (concat bs ms)) 804 (setq bs (concat bs ms))
805 (setq rface nil)) 805 (setq rface nil))
806 (t 806 (t
@@ -810,8 +810,8 @@ If command is repeated at same position, delete the rectangle."
810 (if cua--virtual-edges-debug ?~ ?\s)) 810 (if cua--virtual-edges-debug ?~ ?\s))
811 'face rface)) 811 'face rface))
812 (if (cua--rectangle-right-side) 812 (if (cua--rectangle-right-side)
813 (put-text-property (1- (length as)) (length as) 'cursor t as) 813 (put-text-property (1- (length as)) (length as) 'cursor 2 as)
814 (put-text-property 0 1 'cursor t as)) 814 (put-text-property 0 1 'cursor 2 as))
815 (if (/= pr le) 815 (if (/= pr le)
816 (setq e (1- e)))))))) 816 (setq e (1- e))))))))
817 ;; Trim old leading overlays. 817 ;; Trim old leading overlays.
diff --git a/lisp/files.el b/lisp/files.el
index c1fbf37da4a..e4610ac1d3c 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -990,6 +990,20 @@ documentation for additional customization information."
990 (pop-to-buffer buffer t norecord) 990 (pop-to-buffer buffer t norecord)
991 (raise-frame (window-frame (selected-window))))) 991 (raise-frame (window-frame (selected-window)))))
992 992
993(defun display-buffer-other-frame (buffer)
994 "Switch to buffer BUFFER in another frame.
995This uses the function `display-buffer' as a subroutine; see its
996documentation for additional customization information."
997 (interactive "BDisplay buffer in other frame: ")
998 (let ((pop-up-frames t)
999 same-window-buffer-names same-window-regexps
1000 (old-window (selected-window))
1001 new-window)
1002 (setq new-window (display-buffer buffer t))
1003 (lower-frame (window-frame new-window))
1004 (make-frame-invisible (window-frame old-window))
1005 (make-frame-visible (window-frame old-window))))
1006
993(defvar find-file-default nil 1007(defvar find-file-default nil
994 "Used within `find-file-read-args'.") 1008 "Used within `find-file-read-args'.")
995 1009
@@ -5154,6 +5168,7 @@ only these files will be asked to be saved."
5154(define-key ctl-x-5-map "f" 'find-file-other-frame) 5168(define-key ctl-x-5-map "f" 'find-file-other-frame)
5155(define-key ctl-x-5-map "\C-f" 'find-file-other-frame) 5169(define-key ctl-x-5-map "\C-f" 'find-file-other-frame)
5156(define-key ctl-x-5-map "r" 'find-file-read-only-other-frame) 5170(define-key ctl-x-5-map "r" 'find-file-read-only-other-frame)
5171(define-key ctl-x-4-map "\C-o" 'display-buffer-other-frame)
5157 5172
5158;; arch-tag: bc68d3ea-19ca-468b-aac6-3a4a7766101f 5173;; arch-tag: bc68d3ea-19ca-468b-aac6-3a4a7766101f
5159;;; files.el ends here 5174;;; files.el ends here
diff --git a/lisp/font-lock.el b/lisp/font-lock.el
index 1b4e79a0c87..c2b8d7200da 100644
--- a/lisp/font-lock.el
+++ b/lisp/font-lock.el
@@ -281,12 +281,6 @@ If a number, only buffers greater than this size have fontification messages."
281 (other :tag "always" t) 281 (other :tag "always" t)
282 (integer :tag "size")) 282 (integer :tag "size"))
283 :group 'font-lock) 283 :group 'font-lock)
284
285(defcustom font-lock-lines-before 0
286 "*Number of lines before the changed text to include in refontification."
287 :type 'integer
288 :group 'font-lock
289 :version "22.1")
290 284
291 285
292;; Originally these variable values were face names such as `bold' etc. 286;; Originally these variable values were face names such as `bold' etc.
@@ -1098,9 +1092,8 @@ what properties to clear before refontifying a region.")
1098 ;; Fontify the region the major mode has specified. 1092 ;; Fontify the region the major mode has specified.
1099 (setq beg (car region) end (cdr region)) 1093 (setq beg (car region) end (cdr region))
1100 ;; Fontify the whole lines which enclose the region. 1094 ;; Fontify the whole lines which enclose the region.
1101 (setq beg (progn (goto-char beg) 1095 (setq beg (progn (goto-char beg) (line-beginning-position))
1102 (forward-line (- font-lock-lines-before))) 1096 end (progn (goto-char end) (line-beginning-position 2))))
1103 end (progn (goto-char end) (forward-line 1) (point))))
1104 (font-lock-fontify-region beg end))))) 1097 (font-lock-fontify-region beg end)))))
1105 1098
1106(defun font-lock-fontify-block (&optional arg) 1099(defun font-lock-fontify-block (&optional arg)
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog
index 8023af47bfd..966451cce3c 100644
--- a/lisp/gnus/ChangeLog
+++ b/lisp/gnus/ChangeLog
@@ -1,3 +1,65 @@
12006-03-21 Daniel Pittman <daniel@rimspace.net>
2
3 * nnimap.el (nnimap-request-update-info-internal): Optimize.
4 Don't `gnus-uncompress-range' to avoid excessive memory usage.
5
62006-03-21 Reiner Steib <Reiner.Steib@gmx.de>
7
8 * gnus-agent.el (gnus-agent-queue-mail): Fix custom tag for `t'.
9
10 * spam.el (spam-mark-new-messages-in-spam-group-as-spam): Add
11 comment on version.
12
132006-03-20 Teodor Zlatanov <tzz@lifelogs.com>
14
15 * spam.el (spam-mark-new-messages-in-spam-group-as-spam): New
16 variable.
17 (spam-mark-junk-as-spam-routine): Use it. Allow to disable
18 assigning the spam-mark to new messages.
19
202006-03-20 Adam Sj,Ax(Bgren <asjo@koldfront.dk> (tiny change)
21
22 (spam-ham-copy-or-move-routine): Don't declare `todo' twice.
23
242006-03-20 Reiner Steib <Reiner.Steib@gmx.de>
25
26 * smiley.el: Add missing test smiley.
27
282006-03-17 Katsumi Yamaoka <yamaoka@jpl.org>
29
30 * mm-decode.el (mm-with-part): New macro.
31 (mm-get-part): Use it; work with message/external-body as well.
32 (mm-save-part): Treat name and filename equally.
33
34 * mm-extern.el (mm-extern-cache-contents): New function.
35 (mm-inline-external-body): Use it; force the part to be displayed;
36 move undisplayer added to the cached handle to the parent.
37
38 * gnus-art.el (gnus-mime-save-part-and-strip): Add name parameter.
39 (gnus-mime-view-part-as-type): Work with message/external-body.
40
41 * gnus-util.el (gnus-tool-bar-update): Bind tool-bar-mode.
42
432006-03-15 Andreas Seltenreich <uwi7@rz.uni-karlsruhe.de>
44
45 * gnus-art.el (gnus-article-only-boring-p): Bind
46 inhibit-point-motion-hooks to avoid infinite loop when entering
47 intangible text. Reported by Ralf Wachinger
48 <rwnewsmampfer@geekmail.de>.
49
502006-03-14 Simon Josefsson <jas@extundo.com>
51
52 * message.el (message-unique-id): Don't use message-number-base36
53 if (user-uid) is a float. Reported by Bjorn Solberg
54 <bjorn_ding1@hekneby.org>.
55
562006-03-13 Katsumi Yamaoka <yamaoka@jpl.org>
57
58 * mm-uu.el (mm-uu-dissect): Dissect all parts correctly.
59
60 * gnus-art.el (gnus-mime-display-single): Make sure there is an
61 empty line between a part and a message part.
62
12006-03-10 Reiner Steib <Reiner.Steib@gmx.de> 632006-03-10 Reiner Steib <Reiner.Steib@gmx.de>
2 64
3 * smiley.el: Add more test smileys. 65 * smiley.el: Add more test smileys.
diff --git a/lisp/gnus/gnus-agent.el b/lisp/gnus/gnus-agent.el
index c467c296fa0..123ad340ae1 100644
--- a/lisp/gnus/gnus-agent.el
+++ b/lisp/gnus/gnus-agent.el
@@ -204,7 +204,7 @@ queue. Otherwise, queue if and only if unplugged."
204 :group 'gnus-agent 204 :group 'gnus-agent
205 :type '(radio (const :format "Always" always) 205 :type '(radio (const :format "Always" always)
206 (const :format "Never" nil) 206 (const :format "Never" nil)
207 (const :format "When plugged" t))) 207 (const :format "When unplugged" t)))
208 208
209(defcustom gnus-agent-prompt-send-queue nil 209(defcustom gnus-agent-prompt-send-queue nil
210 "If non-nil, `gnus-group-send-queue' will prompt if called when 210 "If non-nil, `gnus-group-send-queue' will prompt if called when
diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el
index 0c9cb18506a..69fe8159c10 100644
--- a/lisp/gnus/gnus-art.el
+++ b/lisp/gnus/gnus-art.el
@@ -49,6 +49,7 @@
49(autoload 'gnus-button-mailto "gnus-msg") 49(autoload 'gnus-button-mailto "gnus-msg")
50(autoload 'gnus-button-reply "gnus-msg" nil t) 50(autoload 'gnus-button-reply "gnus-msg" nil t)
51(autoload 'parse-time-string "parse-time" nil nil) 51(autoload 'parse-time-string "parse-time" nil nil)
52(autoload 'mm-extern-cache-contents "mm-extern")
52 53
53(defgroup gnus-article nil 54(defgroup gnus-article nil
54 "Article display." 55 "Article display."
@@ -4151,6 +4152,9 @@ Deleting parts may malfunction or destroy the article; continue? ")
4151 (insert "Content-Type: " (mm-handle-media-type data)) 4152 (insert "Content-Type: " (mm-handle-media-type data))
4152 (mml-insert-parameter-string (cdr (mm-handle-type data)) 4153 (mml-insert-parameter-string (cdr (mm-handle-type data))
4153 '(charset)) 4154 '(charset))
4155 ;; Add a filename for the sake of saving the part again.
4156 (mml-insert-parameter
4157 (mail-header-encode-parameter "name" (file-name-nondirectory file)))
4154 (insert "\n") 4158 (insert "\n")
4155 (insert "Content-ID: " (message-make-message-id) "\n") 4159 (insert "Content-ID: " (message-make-message-id) "\n")
4156 (insert "Content-Transfer-Encoding: binary\n") 4160 (insert "Content-Transfer-Encoding: binary\n")
@@ -4330,6 +4334,10 @@ Deleting parts may malfunction or destroy the article; continue? ")
4330 (gnus-article-check-buffer) 4334 (gnus-article-check-buffer)
4331 (let ((handle (get-text-property (point) 'gnus-data))) 4335 (let ((handle (get-text-property (point) 'gnus-data)))
4332 (when handle 4336 (when handle
4337 (when (equal (mm-handle-media-type handle) "message/external-body")
4338 (unless (mm-handle-cache handle)
4339 (mm-extern-cache-contents handle))
4340 (setq handle (mm-handle-cache handle)))
4333 (setq handle 4341 (setq handle
4334 (mm-make-handle (mm-handle-buffer handle) 4342 (mm-make-handle (mm-handle-buffer handle)
4335 (cons mime-type (cdr (mm-handle-type handle))) 4343 (cons mime-type (cdr (mm-handle-type handle)))
@@ -4889,13 +4897,18 @@ If displaying \"text/html\" is discouraged \(see
4889 (let ((id (1+ (length gnus-article-mime-handle-alist))) 4897 (let ((id (1+ (length gnus-article-mime-handle-alist)))
4890 beg) 4898 beg)
4891 (push (cons id handle) gnus-article-mime-handle-alist) 4899 (push (cons id handle) gnus-article-mime-handle-alist)
4900 (when (and display
4901 (equal (mm-handle-media-supertype handle) "message"))
4902 (insert-char
4903 ?\n
4904 (cond ((not (bolp)) 2)
4905 ((or (bobp) (eq (char-before (1- (point))) ?\n)) 0)
4906 (t 1))))
4892 (when (or (not display) 4907 (when (or (not display)
4893 (not (gnus-unbuttonized-mime-type-p type))) 4908 (not (gnus-unbuttonized-mime-type-p type)))
4894 ;(gnus-article-insert-newline)
4895 (gnus-insert-mime-button 4909 (gnus-insert-mime-button
4896 handle id (list (or display (and not-attachment text)))) 4910 handle id (list (or display (and not-attachment text))))
4897 (gnus-article-insert-newline) 4911 (gnus-article-insert-newline)
4898 ;(gnus-article-insert-newline)
4899 ;; Remember modify the number of forward lines. 4912 ;; Remember modify the number of forward lines.
4900 (setq move t)) 4913 (setq move t))
4901 (setq beg (point)) 4914 (setq beg (point))
@@ -5313,14 +5326,15 @@ not have a face in `gnus-article-boring-faces'."
5313 (boundp 'gnus-article-boring-faces) 5326 (boundp 'gnus-article-boring-faces)
5314 (symbol-value 'gnus-article-boring-faces)) 5327 (symbol-value 'gnus-article-boring-faces))
5315 (save-excursion 5328 (save-excursion
5316 (catch 'only-boring 5329 (let ((inhibit-point-motion-hooks t))
5317 (while (re-search-forward "\\b\\w\\w" nil t) 5330 (catch 'only-boring
5318 (forward-char -1) 5331 (while (re-search-forward "\\b\\w\\w" nil t)
5319 (when (not (gnus-intersection 5332 (forward-char -1)
5320 (gnus-faces-at (point)) 5333 (when (not (gnus-intersection
5321 (symbol-value 'gnus-article-boring-faces))) 5334 (gnus-faces-at (point))
5322 (throw 'only-boring nil))) 5335 (symbol-value 'gnus-article-boring-faces)))
5323 (throw 'only-boring t))))) 5336 (throw 'only-boring nil)))
5337 (throw 'only-boring t))))))
5324 5338
5325(defun gnus-article-refer-article () 5339(defun gnus-article-refer-article ()
5326 "Read article specified by message-id around point." 5340 "Read article specified by message-id around point."
diff --git a/lisp/gnus/gnus-util.el b/lisp/gnus/gnus-util.el
index 686fe1cf837..cb3a4e9209c 100644
--- a/lisp/gnus/gnus-util.el
+++ b/lisp/gnus/gnus-util.el
@@ -1459,6 +1459,9 @@ Return nil otherwise."
1459 display)) 1459 display))
1460 display))))) 1460 display)))))
1461 1461
1462(eval-when-compile
1463 (defvar tool-bar-mode))
1464
1462(defun gnus-tool-bar-update (&rest ignore) 1465(defun gnus-tool-bar-update (&rest ignore)
1463 "Update the tool bar." 1466 "Update the tool bar."
1464 (when (and (boundp 'tool-bar-mode) 1467 (when (and (boundp 'tool-bar-mode)
diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el
index 1bdc2f6a11f..236ec1bc23f 100644
--- a/lisp/gnus/message.el
+++ b/lisp/gnus/message.el
@@ -4671,7 +4671,9 @@ If NOW, use that time instead."
4671 (* 25 25))) 4671 (* 25 25)))
4672 (let ((tm (current-time))) 4672 (let ((tm (current-time)))
4673 (concat 4673 (concat
4674 (if (memq system-type '(ms-dos emx vax-vms)) 4674 (if (or (memq system-type '(ms-dos emx vax-vms))
4675 ;; message-number-base36 doesn't handle bigints.
4676 (floatp (user-uid)))
4675 (let ((user (downcase (user-login-name)))) 4677 (let ((user (downcase (user-login-name))))
4676 (while (string-match "[^a-z0-9_]" user) 4678 (while (string-match "[^a-z0-9_]" user)
4677 (aset user (match-beginning 0) ?_)) 4679 (aset user (match-beginning 0) ?_))
diff --git a/lisp/gnus/mm-decode.el b/lisp/gnus/mm-decode.el
index 01557659fd6..f0f1ee430ff 100644
--- a/lisp/gnus/mm-decode.el
+++ b/lisp/gnus/mm-decode.el
@@ -36,6 +36,7 @@
36 (autoload 'executable-find "executable") 36 (autoload 'executable-find "executable")
37 (autoload 'mm-inline-partial "mm-partial") 37 (autoload 'mm-inline-partial "mm-partial")
38 (autoload 'mm-inline-external-body "mm-extern") 38 (autoload 'mm-inline-external-body "mm-extern")
39 (autoload 'mm-extern-cache-contents "mm-extern")
39 (autoload 'mm-insert-inline "mm-view")) 40 (autoload 'mm-insert-inline "mm-view"))
40 41
41(defvar gnus-current-window-configuration) 42(defvar gnus-current-window-configuration)
@@ -1082,17 +1083,35 @@ external if displayed external."
1082;;; Functions for outputting parts 1083;;; Functions for outputting parts
1083;;; 1084;;;
1084 1085
1086(defmacro mm-with-part (handle &rest forms)
1087 "Run FORMS in the temp buffer containing the contents of HANDLE."
1088 `(let* ((handle ,handle)
1089 ;; The multibyteness of the temp buffer should be turned on
1090 ;; if inserting a multibyte string. Contrarily, the buffer's
1091 ;; multibyteness should be off if inserting a unibyte string,
1092 ;; especially if a string contains 8bit data.
1093 (default-enable-multibyte-characters
1094 (with-current-buffer (mm-handle-buffer handle)
1095 (mm-multibyte-p))))
1096 (with-temp-buffer
1097 (insert-buffer-substring (mm-handle-buffer handle))
1098 (mm-disable-multibyte)
1099 (mm-decode-content-transfer-encoding
1100 (mm-handle-encoding handle)
1101 (mm-handle-media-type handle))
1102 ,@forms)))
1103(put 'mm-with-part 'lisp-indent-function 1)
1104(put 'mm-with-part 'edebug-form-spec '(body))
1105
1085(defun mm-get-part (handle) 1106(defun mm-get-part (handle)
1086 "Return the contents of HANDLE as a string." 1107 "Return the contents of HANDLE as a string."
1087 (let ((default-enable-multibyte-characters 1108 (if (equal (mm-handle-media-type handle) "message/external-body")
1088 (with-current-buffer (mm-handle-buffer handle) 1109 (progn
1089 (mm-multibyte-p)))) 1110 (unless (mm-handle-cache handle)
1090 (with-temp-buffer 1111 (mm-extern-cache-contents handle))
1091 (insert-buffer-substring (mm-handle-buffer handle)) 1112 (with-current-buffer (mm-handle-buffer (mm-handle-cache handle))
1092 (mm-disable-multibyte) 1113 (buffer-string)))
1093 (mm-decode-content-transfer-encoding 1114 (mm-with-part handle
1094 (mm-handle-encoding handle)
1095 (mm-handle-media-type handle))
1096 (buffer-string)))) 1115 (buffer-string))))
1097 1116
1098(defun mm-insert-part (handle) 1117(defun mm-insert-part (handle)
@@ -1148,18 +1167,19 @@ string if you do not like underscores."
1148 1167
1149(defun mm-save-part (handle) 1168(defun mm-save-part (handle)
1150 "Write HANDLE to a file." 1169 "Write HANDLE to a file."
1151 (let* ((name (mail-content-type-get (mm-handle-type handle) 'name)) 1170 (let ((filename (or (mail-content-type-get
1152 (filename (mail-content-type-get 1171 (mm-handle-disposition handle) 'filename)
1153 (mm-handle-disposition handle) 'filename)) 1172 (mail-content-type-get
1154 file) 1173 (mm-handle-type handle) 'name)))
1174 file)
1155 (when filename 1175 (when filename
1156 (setq filename (gnus-map-function mm-file-name-rewrite-functions 1176 (setq filename (gnus-map-function mm-file-name-rewrite-functions
1157 (file-name-nondirectory filename)))) 1177 (file-name-nondirectory filename))))
1158 (setq file 1178 (setq file
1159 (mm-with-multibyte 1179 (mm-with-multibyte
1160 (read-file-name "Save MIME part to: " 1180 (read-file-name "Save MIME part to: "
1161 (or mm-default-directory default-directory) 1181 (or mm-default-directory default-directory)
1162 nil nil (or filename name "")))) 1182 nil nil (or filename ""))))
1163 (setq mm-default-directory (file-name-directory file)) 1183 (setq mm-default-directory (file-name-directory file))
1164 (and (or (not (file-exists-p file)) 1184 (and (or (not (file-exists-p file))
1165 (yes-or-no-p (format "File %s already exists; overwrite? " 1185 (yes-or-no-p (format "File %s already exists; overwrite? "
diff --git a/lisp/gnus/mm-extern.el b/lisp/gnus/mm-extern.el
index da3ecb8f351..b736374f016 100644
--- a/lisp/gnus/mm-extern.el
+++ b/lisp/gnus/mm-extern.el
@@ -112,11 +112,8 @@
112 (insert "[" info "]\n\n"))) 112 (insert "[" info "]\n\n")))
113 113
114;;;###autoload 114;;;###autoload
115(defun mm-inline-external-body (handle &optional no-display) 115(defun mm-extern-cache-contents (handle)
116 "Show the external-body part of HANDLE. 116 "Put the external-body part of HANDLE into its cache."
117This function replaces the buffer of HANDLE with a buffer contains
118the entire message.
119If NO-DISPLAY is nil, display it. Otherwise, do nothing after replacing."
120 (let* ((access-type (cdr (assq 'access-type 117 (let* ((access-type (cdr (assq 'access-type
121 (cdr (mm-handle-type handle))))) 118 (cdr (mm-handle-type handle)))))
122 (func (cdr (assq (intern 119 (func (cdr (assq (intern
@@ -124,48 +121,61 @@ If NO-DISPLAY is nil, display it. Otherwise, do nothing after replacing."
124 (or access-type 121 (or access-type
125 (error "Couldn't find access type")))) 122 (error "Couldn't find access type"))))
126 mm-extern-function-alist))) 123 mm-extern-function-alist)))
127 gnus-displaying-mime buf 124 buf handles)
128 handles) 125 (unless func
129 (unless (mm-handle-cache handle) 126 (error "Access type (%s) is not supported" access-type))
130 (unless func 127 (mm-with-part handle
131 (error "Access type (%s) is not supported" access-type)) 128 (goto-char (point-max))
132 (with-temp-buffer 129 (insert "\n\n")
133 (mm-insert-part handle) 130 ;; It should be just a single MIME handle.
134 (goto-char (point-max)) 131 (setq handles (mm-dissect-buffer t)))
135 (insert "\n\n") 132 (unless (bufferp (car handles))
136 (setq handles (mm-dissect-buffer t))) 133 (mm-destroy-parts handles)
137 (unless (bufferp (car handles)) 134 (error "Multipart external body is not supported"))
138 (mm-destroy-parts handles) 135 (save-excursion
139 (error "Multipart external body is not supported")) 136 (set-buffer (setq buf (mm-handle-buffer handles)))
140 (save-excursion ;; single part 137 (let (good)
141 (set-buffer (setq buf (mm-handle-buffer handles))) 138 (unwind-protect
142 (let (good) 139 (progn
143 (unwind-protect 140 (funcall func handle)
144 (progn 141 (setq good t))
145 (funcall func handle) 142 (unless good
146 (setq good t)) 143 (mm-destroy-parts handles))))
147 (unless good 144 (mm-handle-set-cache handle handles))
148 (mm-destroy-parts handles)))) 145 (setq gnus-article-mime-handles
149 (mm-handle-set-cache handle handles)) 146 (mm-merge-handles gnus-article-mime-handles handles))))
150 (setq gnus-article-mime-handles 147
151 (mm-merge-handles gnus-article-mime-handles handles))) 148;;;###autoload
152 (unless no-display 149(defun mm-inline-external-body (handle &optional no-display)
153 (save-excursion 150 "Show the external-body part of HANDLE.
154 (save-restriction 151This function replaces the buffer of HANDLE with a buffer contains
155 (narrow-to-region (point) (point)) 152the entire message.
156 (gnus-display-mime (mm-handle-cache handle)) 153If NO-DISPLAY is nil, display it. Otherwise, do nothing after replacing."
157 (mm-handle-set-undisplayer 154 (unless (mm-handle-cache handle)
158 handle 155 (mm-extern-cache-contents handle))
159 `(lambda () 156 (unless no-display
160 (let (buffer-read-only) 157 (save-excursion
161 (condition-case nil 158 (save-restriction
162 ;; This is only valid on XEmacs. 159 (narrow-to-region (point) (point))
163 (mapcar (lambda (prop) 160 (let* ((type (regexp-quote
164 (remove-specifier 161 (mm-handle-media-type (mm-handle-cache handle))))
165 (face-property 'default prop) (current-buffer))) 162 ;; Force the part to be displayed (but if there is no
166 '(background background-pixmap foreground)) 163 ;; method to display, a user will be prompted to save).
167 (error nil)) 164 ;; See `gnus-mime-display-single'.
168 (delete-region ,(point-min-marker) ,(point-max-marker)))))))))) 165 (mm-inline-override-types nil)
166 (mm-attachment-override-types
167 (cons type mm-attachment-override-types))
168 (mm-automatic-display (cons type mm-automatic-display))
169 (mm-automatic-external-display
170 (cons type mm-automatic-external-display))
171 ;; Suppress adding of button to the cached part.
172 (gnus-inhibit-mime-unbuttonizing nil))
173 (gnus-display-mime (mm-handle-cache handle)))
174 ;; Move undisplayer added to the cached handle to the parent.
175 (mm-handle-set-undisplayer
176 handle
177 (mm-handle-undisplayer (mm-handle-cache handle)))
178 (mm-handle-set-undisplayer (mm-handle-cache handle) nil)))))
169 179
170(provide 'mm-extern) 180(provide 'mm-extern)
171 181
diff --git a/lisp/gnus/mm-uu.el b/lisp/gnus/mm-uu.el
index eb5afa794f5..9029e0d699c 100644
--- a/lisp/gnus/mm-uu.el
+++ b/lisp/gnus/mm-uu.el
@@ -464,7 +464,8 @@ value of `mm-uu-text-plain-type'."
464 (t (goto-char (point-max)))) 464 (t (goto-char (point-max))))
465 (setq text-start (point)) 465 (setq text-start (point))
466 (while (re-search-forward mm-uu-beginning-regexp nil t) 466 (while (re-search-forward mm-uu-beginning-regexp nil t)
467 (setq start-point (match-beginning 0)) 467 (setq start-point (match-beginning 0)
468 entry nil)
468 (let ((alist mm-uu-type-alist) 469 (let ((alist mm-uu-type-alist)
469 (beginning-regexp (match-string 0))) 470 (beginning-regexp (match-string 0)))
470 (while (not entry) 471 (while (not entry)
diff --git a/lisp/gnus/nnimap.el b/lisp/gnus/nnimap.el
index 3c05b3713ea..bada9da6891 100644
--- a/lisp/gnus/nnimap.el
+++ b/lisp/gnus/nnimap.el
@@ -1127,18 +1127,12 @@ function is generally only called when Gnus is shutting down."
1127 (let (seen unseen) 1127 (let (seen unseen)
1128 ;; read info could contain articles marked unread by other 1128 ;; read info could contain articles marked unread by other
1129 ;; imap clients! we correct this 1129 ;; imap clients! we correct this
1130 (setq seen (gnus-uncompress-range (gnus-info-read info)) 1130 (setq unseen (gnus-compress-sequence
1131 unseen (imap-search "UNSEEN UNDELETED") 1131 (imap-search "UNSEEN UNDELETED"))
1132 seen (gnus-set-difference seen unseen) 1132 seen (gnus-range-difference (gnus-info-read info) unseen)
1133 ;; seen might lack articles marked as read by other 1133 seen (gnus-range-add seen
1134 ;; imap clients! we correct this 1134 (gnus-compress-sequence
1135 seen (append seen (imap-search "SEEN")) 1135 (imap-search "SEEN")))
1136 ;; remove dupes
1137 seen (sort seen '<)
1138 seen (gnus-compress-sequence seen t)
1139 ;; we can't return '(1) since this isn't a "list of ranges",
1140 ;; and we can't return '((1)) since g-list-of-unread-articles
1141 ;; is buggy so we return '((1 . 1)).
1142 seen (if (and (integerp (car seen)) 1136 seen (if (and (integerp (car seen))
1143 (null (cdr seen))) 1137 (null (cdr seen)))
1144 (list (cons (car seen) (car seen))) 1138 (list (cons (car seen) (car seen)))
diff --git a/lisp/gnus/smiley.el b/lisp/gnus/smiley.el
index e8afe9dd10d..6476340f7bf 100644
--- a/lisp/gnus/smiley.el
+++ b/lisp/gnus/smiley.el
@@ -42,6 +42,7 @@
42;; indifferent :-| 42;; indifferent :-|
43;; wry :-/ :-\ 43;; wry :-/ :-\
44;; sad :-( 44;; sad :-(
45;; frown :-{
45;; evil >:-) 46;; evil >:-)
46;; cry ;-( 47;; cry ;-(
47;; dead X-) 48;; dead X-)
diff --git a/lisp/gnus/spam.el b/lisp/gnus/spam.el
index ed5fd6e7980..047035536f2 100644
--- a/lisp/gnus/spam.el
+++ b/lisp/gnus/spam.el
@@ -100,6 +100,12 @@ spam groups."
100 :type 'boolean 100 :type 'boolean
101 :group 'spam) 101 :group 'spam)
102 102
103(defcustom spam-mark-new-messages-in-spam-group-as-spam t
104 "Whether new messages in a spam group should get the spam-mark."
105 :type 'boolean
106 ;; :version "22.1" ;; Gnus 5.10.8 / No Gnus 0.3
107 :group 'spam)
108
103(defcustom spam-log-to-registry nil 109(defcustom spam-log-to-registry nil
104 "Whether spam/ham processing should be logged in the registry." 110 "Whether spam/ham processing should be logged in the registry."
105 :type 'boolean 111 :type 'boolean
@@ -676,15 +682,17 @@ spam-use-* variable.")
676 ;; check the global list of group names spam-junk-mailgroups and the 682 ;; check the global list of group names spam-junk-mailgroups and the
677 ;; group parameters 683 ;; group parameters
678 (when (spam-group-spam-contents-p gnus-newsgroup-name) 684 (when (spam-group-spam-contents-p gnus-newsgroup-name)
679 (gnus-message 5 "Marking %s articles as spam" 685 (gnus-message 6 "Marking %s articles as spam"
680 (if spam-mark-only-unseen-as-spam 686 (if spam-mark-only-unseen-as-spam
681 "unseen" 687 "unseen"
682 "unread")) 688 "unread"))
683 (let ((articles (if spam-mark-only-unseen-as-spam 689 (let ((articles (if spam-mark-only-unseen-as-spam
684 gnus-newsgroup-unseen 690 gnus-newsgroup-unseen
685 gnus-newsgroup-unreads))) 691 gnus-newsgroup-unreads)))
686 (dolist (article articles) 692 (if spam-mark-new-messages-in-spam-group-as-spam
687 (gnus-summary-mark-article article gnus-spam-mark))))) 693 (dolist (article articles)
694 (gnus-summary-mark-article article gnus-spam-mark))
695 (gnus-message 9 "Did not mark new messages as spam.")))))
688 696
689(defun spam-mark-spam-as-expired-and-move-routine (&rest groups) 697(defun spam-mark-spam-as-expired-and-move-routine (&rest groups)
690 (if (and (car-safe groups) (listp (car-safe groups))) 698 (if (and (car-safe groups) (listp (car-safe groups)))
@@ -732,7 +740,7 @@ spam-use-* variable.")
732 (gnus-check-backend-function 740 (gnus-check-backend-function
733 'request-move-article gnus-newsgroup-name)) 741 'request-move-article gnus-newsgroup-name))
734 (respool-method (gnus-find-method-for-group gnus-newsgroup-name)) 742 (respool-method (gnus-find-method-for-group gnus-newsgroup-name))
735 article mark todo deletep respool) 743 article mark deletep respool)
736 744
737 (when (member 'respool groups) 745 (when (member 'respool groups)
738 (setq respool t) ; boolean for later 746 (setq respool t) ; boolean for later
diff --git a/lisp/help-mode.el b/lisp/help-mode.el
index c2e1f59e578..94621535154 100644
--- a/lisp/help-mode.el
+++ b/lisp/help-mode.el
@@ -40,7 +40,7 @@
40 40
41(define-key help-mode-map [mouse-2] 'help-follow-mouse) 41(define-key help-mode-map [mouse-2] 'help-follow-mouse)
42(define-key help-mode-map "\C-c\C-b" 'help-go-back) 42(define-key help-mode-map "\C-c\C-b" 'help-go-back)
43(define-key help-mode-map "\C-c\C-c" 'help-follow) 43(define-key help-mode-map "\C-c\C-c" 'help-follow-symbol)
44;; Documentation only, since we use minor-mode-overriding-map-alist. 44;; Documentation only, since we use minor-mode-overriding-map-alist.
45(define-key help-mode-map "\r" 'help-follow) 45(define-key help-mode-map "\r" 'help-follow)
46 46
@@ -233,10 +233,10 @@ Commands:
233 "Label to use by `help-make-xrefs' for the go-back reference.") 233 "Label to use by `help-make-xrefs' for the go-back reference.")
234 234
235(defconst help-xref-symbol-regexp 235(defconst help-xref-symbol-regexp
236 (purecopy (concat "\\(\\<\\(\\(variable\\|option\\)\\|" 236 (purecopy (concat "\\(\\<\\(\\(variable\\|option\\)\\|" ; Link to var
237 "\\(function\\|command\\)\\|" 237 "\\(function\\|command\\)\\|" ; Link to function
238 "\\(face\\)\\|" 238 "\\(face\\)\\|" ; Link to face
239 "\\(symbol\\)\\|" 239 "\\(symbol\\|program\\)\\|" ; Don't link
240 "\\(source \\(?:code \\)?\\(?:of\\|for\\)\\)\\)" 240 "\\(source \\(?:code \\)?\\(?:of\\|for\\)\\)\\)"
241 "[ \t\n]+\\)?" 241 "[ \t\n]+\\)?"
242 ;; Note starting with word-syntax character: 242 ;; Note starting with word-syntax character:
@@ -584,15 +584,6 @@ help buffer."
584 584
585;; Navigation/hyperlinking with xrefs 585;; Navigation/hyperlinking with xrefs
586 586
587(defun help-follow-mouse (click)
588 "Follow the cross-reference that you CLICK on."
589 (interactive "e")
590 (let* ((start (event-start click))
591 (window (car start))
592 (pos (car (cdr start))))
593 (with-current-buffer (window-buffer window)
594 (help-follow pos))))
595
596(defun help-xref-go-back (buffer) 587(defun help-xref-go-back (buffer)
597 "From BUFFER, go back to previous help buffer text using `help-xref-stack'." 588 "From BUFFER, go back to previous help buffer text using `help-xref-stack'."
598 (let (item position method args) 589 (let (item position method args)
@@ -627,26 +618,38 @@ a proper [back] button."
627 (let ((help-xref-following t)) 618 (let ((help-xref-following t))
628 (apply function args))) 619 (apply function args)))
629 620
630(defun help-follow (&optional pos) 621;; The doc string is meant to explain what buttons do.
631 "Follow cross-reference at POS, defaulting to point. 622(defun help-follow-mouse ()
623 "Follow the cross-reference that you click on."
624 (interactive)
625 (error "No cross-reference here"))
626
627;; The doc string is meant to explain what buttons do.
628(defun help-follow ()
629 "Follow cross-reference at point.
632 630
633For the cross-reference format, see `help-make-xrefs'." 631For the cross-reference format, see `help-make-xrefs'."
632 (interactive)
633 (error "No cross-reference here"))
634
635(defun help-follow-symbol (&optional pos)
636 "In help buffer, show docs for symbol at POS, defaulting to point.
637Show all docs for that symbol as either a variable, function or face."
634 (interactive "d") 638 (interactive "d")
635 (unless pos 639 (unless pos
636 (setq pos (point))) 640 (setq pos (point)))
637 (unless (push-button pos) 641 ;; check if the symbol under point is a function, variable or face
638 ;; check if the symbol under point is a function or variable 642 (let ((sym
639 (let ((sym 643 (intern
640 (intern 644 (save-excursion
641 (save-excursion 645 (goto-char pos) (skip-syntax-backward "w_")
642 (goto-char pos) (skip-syntax-backward "w_") 646 (buffer-substring (point)
643 (buffer-substring (point) 647 (progn (skip-syntax-forward "w_")
644 (progn (skip-syntax-forward "w_") 648 (point)))))))
645 (point))))))) 649 (when (or (boundp sym)
646 (when (or (boundp sym) 650 (get sym 'variable-documentation)
647 (get sym 'variable-documentation) 651 (fboundp sym) (facep sym))
648 (fboundp sym) (facep sym)) 652 (help-do-xref pos #'help-xref-interned (list sym)))))
649 (help-do-xref pos #'help-xref-interned (list sym))))))
650 653
651(defun help-insert-string (string) 654(defun help-insert-string (string)
652 "Insert STRING to the help buffer and install xref info for it. 655 "Insert STRING to the help buffer and install xref info for it.
diff --git a/lisp/ido.el b/lisp/ido.el
index cae5446abcd..6bc2f45709f 100644
--- a/lisp/ido.el
+++ b/lisp/ido.el
@@ -613,6 +613,7 @@ A tramp file name uses the following syntax: /method:user@host:filename."
613 613
614(defcustom ido-cache-ftp-work-directory-time 1.0 614(defcustom ido-cache-ftp-work-directory-time 1.0
615 "*Maximum time to cache contents of an ftp directory (in hours). 615 "*Maximum time to cache contents of an ftp directory (in hours).
616Use C-l in prompt to refresh list.
616If zero, ftp directories are not cached." 617If zero, ftp directories are not cached."
617 :type 'number 618 :type 'number
618 :group 'ido) 619 :group 'ido)
@@ -629,6 +630,18 @@ equivalent function, e.g. `find-file' rather than `ido-find-file'."
629 :type '(repeat regexp) 630 :type '(repeat regexp)
630 :group 'ido) 631 :group 'ido)
631 632
633(defcustom ido-unc-hosts nil
634 "*List of known UNC host names to complete after initial //."
635 :type '(repeat string)
636 :group 'ido)
637
638(defcustom ido-cache-unc-host-shares-time 8.0
639 "*Maximum time to cache shares of an UNC host (in hours).
640Use C-l in prompt to refresh list.
641If zero, unc host shares are not cached."
642 :type 'number
643 :group 'ido)
644
632(defcustom ido-max-work-file-list 10 645(defcustom ido-max-work-file-list 10
633 "*Maximum number of names of recently opened files to record. 646 "*Maximum number of names of recently opened files to record.
634This is the list the file names (sans directory) which have most recently 647This is the list the file names (sans directory) which have most recently
@@ -1103,6 +1116,16 @@ it doesn't interfere with other minibuffer usage.")
1103 (string-match "\\`/[^/]+[@:]\\'" 1116 (string-match "\\`/[^/]+[@:]\\'"
1104 (or dir ido-current-directory)))) 1117 (or dir ido-current-directory))))
1105 1118
1119(defun ido-is-unc-root (&optional dir)
1120 (and ido-unc-hosts
1121 (string-equal "//"
1122 (or dir ido-current-directory))))
1123
1124(defun ido-is-unc-host (&optional dir)
1125 (and ido-unc-hosts
1126 (string-match "\\`//[^/]+/\\'"
1127 (or dir ido-current-directory))))
1128
1106(defun ido-is-root-directory (&optional dir) 1129(defun ido-is-root-directory (&optional dir)
1107 (setq dir (or dir ido-current-directory)) 1130 (setq dir (or dir ido-current-directory))
1108 (or 1131 (or
@@ -1148,6 +1171,12 @@ it doesn't interfere with other minibuffer usage.")
1148 (or (not time) 1171 (or (not time)
1149 (< (- (ido-time-stamp) time) ido-cache-ftp-work-directory-time)))) 1172 (< (- (ido-time-stamp) time) ido-cache-ftp-work-directory-time))))
1150 1173
1174(defun ido-cache-unc-valid (&optional time)
1175 (and (numberp ido-cache-unc-host-shares-time)
1176 (> ido-cache-unc-host-shares-time 0)
1177 (or (not time)
1178 (< (- (ido-time-stamp) time) ido-cache-unc-host-shares-time))))
1179
1151(defun ido-may-cache-directory (&optional dir) 1180(defun ido-may-cache-directory (&optional dir)
1152 (setq dir (or dir ido-current-directory)) 1181 (setq dir (or dir ido-current-directory))
1153 (cond 1182 (cond
@@ -1157,10 +1186,11 @@ it doesn't interfere with other minibuffer usage.")
1157 (or ido-enable-tramp-completion 1186 (or ido-enable-tramp-completion
1158 (memq system-type '(windows-nt ms-dos)))) 1187 (memq system-type '(windows-nt ms-dos))))
1159 nil) 1188 nil)
1160 ((not (ido-is-ftp-directory dir)) 1189 ((ido-is-unc-host dir)
1161 t) 1190 (ido-cache-unc-valid))
1162 ((ido-cache-ftp-valid) 1191 ((ido-is-ftp-directory dir)
1163 t))) 1192 (ido-cache-ftp-valid))
1193 (t t)))
1164 1194
1165(defun ido-pp (list &optional sep) 1195(defun ido-pp (list &optional sep)
1166 (let ((print-level nil) (eval-expression-print-level nil) 1196 (let ((print-level nil) (eval-expression-print-level nil)
@@ -1262,15 +1292,21 @@ Removes badly formatted data and ignored directories."
1262 (and 1292 (and
1263 (stringp dir) 1293 (stringp dir)
1264 (consp time) 1294 (consp time)
1265 (if (integerp (car time)) 1295 (cond
1266 (and (/= (car time) 0) 1296 ((integerp (car time))
1267 (integerp (car (cdr time))) 1297 (and (/= (car time) 0)
1268 (/= (car (cdr time)) 0) 1298 (integerp (car (cdr time)))
1269 (ido-may-cache-directory dir)) 1299 (/= (car (cdr time)) 0)
1270 (and (eq (car time) 'ftp) 1300 (ido-may-cache-directory dir)))
1271 (numberp (cdr time)) 1301 ((eq (car time) 'ftp)
1302 (and (numberp (cdr time))
1272 (ido-is-ftp-directory dir) 1303 (ido-is-ftp-directory dir)
1273 (ido-cache-ftp-valid (cdr time)))) 1304 (ido-cache-ftp-valid (cdr time))))
1305 ((eq (car time) 'unc)
1306 (and (numberp (cdr time))
1307 (ido-is-unc-host dir)
1308 (ido-cache-unc-valid (cdr time))))
1309 (t nil))
1274 (let ((s files) (ok t)) 1310 (let ((s files) (ok t))
1275 (while s 1311 (while s
1276 (if (stringp (car s)) 1312 (if (stringp (car s))
@@ -1535,6 +1571,7 @@ With ARG, turn ido speed-up on if arg is positive, off otherwise."
1535 ;; connect on incomplete tramp paths (after entring just method:). 1571 ;; connect on incomplete tramp paths (after entring just method:).
1536 (let ((ido-enable-tramp-completion nil)) 1572 (let ((ido-enable-tramp-completion nil))
1537 (and (ido-final-slash dir) 1573 (and (ido-final-slash dir)
1574 (not (ido-is-unc-host dir))
1538 (file-directory-p dir) 1575 (file-directory-p dir)
1539 (not (file-readable-p dir))))) 1576 (not (file-readable-p dir)))))
1540 1577
@@ -1545,6 +1582,7 @@ With ARG, turn ido speed-up on if arg is positive, off otherwise."
1545 (let ((ido-enable-tramp-completion nil)) 1582 (let ((ido-enable-tramp-completion nil))
1546 (and (numberp ido-max-directory-size) 1583 (and (numberp ido-max-directory-size)
1547 (ido-final-slash dir) 1584 (ido-final-slash dir)
1585 (not (ido-is-unc-host dir))
1548 (file-directory-p dir) 1586 (file-directory-p dir)
1549 (> (nth 7 (file-attributes dir)) ido-max-directory-size)))) 1587 (> (nth 7 (file-attributes dir)) ido-max-directory-size))))
1550 1588
@@ -1560,8 +1598,18 @@ With ARG, turn ido speed-up on if arg is positive, off otherwise."
1560 (unless (and ido-enable-tramp-completion 1598 (unless (and ido-enable-tramp-completion
1561 (string-match "\\`/[^/]*@\\'" dir)) 1599 (string-match "\\`/[^/]*@\\'" dir))
1562 (setq dir (ido-final-slash dir t)))) 1600 (setq dir (ido-final-slash dir t))))
1563 (if (equal dir ido-current-directory) 1601 (if (get-buffer ido-completion-buffer)
1564 nil 1602 (kill-buffer ido-completion-buffer))
1603 (cond
1604 ((equal dir ido-current-directory)
1605 nil)
1606 ((ido-is-unc-root dir)
1607 (ido-trace "unc" dir)
1608 (setq ido-current-directory dir)
1609 (setq ido-directory-nonreadable nil)
1610 (setq ido-directory-too-big nil)
1611 t)
1612 (t
1565 (ido-trace "cd" dir) 1613 (ido-trace "cd" dir)
1566 (setq ido-current-directory dir) 1614 (setq ido-current-directory dir)
1567 (if (get-buffer ido-completion-buffer) 1615 (if (get-buffer ido-completion-buffer)
@@ -1569,7 +1617,7 @@ With ARG, turn ido speed-up on if arg is positive, off otherwise."
1569 (setq ido-directory-nonreadable (ido-nonreadable-directory-p dir)) 1617 (setq ido-directory-nonreadable (ido-nonreadable-directory-p dir))
1570 (setq ido-directory-too-big (and (not ido-directory-nonreadable) 1618 (setq ido-directory-too-big (and (not ido-directory-nonreadable)
1571 (ido-directory-too-big-p dir))) 1619 (ido-directory-too-big-p dir)))
1572 t)) 1620 t)))
1573 1621
1574(defun ido-set-current-home (&optional dir) 1622(defun ido-set-current-home (&optional dir)
1575 ;; Set ido's current directory to user's home directory 1623 ;; Set ido's current directory to user's home directory
@@ -1940,6 +1988,7 @@ If INITIAL is non-nil, it specifies the initial input string."
1940 (setq ido-exit 'fallback 1988 (setq ido-exit 'fallback
1941 done t) 1989 done t)
1942 (setq ido-set-default-item t))) 1990 (setq ido-set-default-item t)))
1991
1943 ((or (string-match "[/\\][^/\\]" ido-selected) 1992 ((or (string-match "[/\\][^/\\]" ido-selected)
1944 (and (memq system-type '(windows-nt ms-dos)) 1993 (and (memq system-type '(windows-nt ms-dos))
1945 (string-match "\\`.:" ido-selected))) 1994 (string-match "\\`.:" ido-selected)))
@@ -1973,7 +2022,7 @@ If INITIAL is non-nil, it specifies the initial input string."
1973(defun ido-edit-input () 2022(defun ido-edit-input ()
1974 "Edit absolute file name entered so far with ido; terminate by RET." 2023 "Edit absolute file name entered so far with ido; terminate by RET."
1975 (interactive) 2024 (interactive)
1976 (setq ido-text-init ido-text) 2025 (setq ido-text-init (if ido-matches (car ido-matches) ido-text))
1977 (setq ido-exit 'edit) 2026 (setq ido-exit 'edit)
1978 (exit-minibuffer)) 2027 (exit-minibuffer))
1979 2028
@@ -3184,36 +3233,52 @@ for first matching file."
3184(defun ido-file-name-all-completions (dir) 3233(defun ido-file-name-all-completions (dir)
3185 ;; Return name of all files in DIR 3234 ;; Return name of all files in DIR
3186 ;; Uses and updates ido-dir-file-cache 3235 ;; Uses and updates ido-dir-file-cache
3187 (if (and (numberp ido-max-dir-file-cache) (> ido-max-dir-file-cache 0) 3236 (cond
3188 (stringp dir) (> (length dir) 0) 3237 ((ido-is-unc-root dir)
3189 (ido-may-cache-directory dir)) 3238 (mapcar
3190 (let* ((cached (assoc dir ido-dir-file-cache)) 3239 (lambda (host)
3240 (if (string-match "/\\'" host) host (concat host "/")))
3241 ido-unc-hosts))
3242 ((and (numberp ido-max-dir-file-cache) (> ido-max-dir-file-cache 0)
3243 (stringp dir) (> (length dir) 0)
3244 (ido-may-cache-directory dir))
3245 (let* ((cached (assoc dir ido-dir-file-cache))
3191 (ctime (nth 1 cached)) 3246 (ctime (nth 1 cached))
3192 (ftp (ido-is-ftp-directory dir)) 3247 (ftp (ido-is-ftp-directory dir))
3193 (attr (if ftp nil (file-attributes dir))) 3248 (unc (ido-is-unc-host dir))
3249 (attr (if (or ftp unc) nil (file-attributes dir)))
3194 (mtime (nth 5 attr)) 3250 (mtime (nth 5 attr))
3195 valid) 3251 valid)
3196 (when cached ; should we use the cached entry ? 3252 (when cached ; should we use the cached entry ?
3197 (if ftp 3253 (cond
3198 (setq valid (and (eq (car ctime) 'ftp) 3254 (ftp
3199 (ido-cache-ftp-valid (cdr ctime)))) 3255 (setq valid (and (eq (car ctime) 'ftp)
3256 (ido-cache-ftp-valid (cdr ctime)))))
3257 (unc
3258 (setq valid (and (eq (car ctime) 'unc)
3259 (ido-cache-unc-valid (cdr ctime)))))
3260 (t
3200 (if attr 3261 (if attr
3201 (setq valid (and (= (car ctime) (car mtime)) 3262 (setq valid (and (= (car ctime) (car mtime))
3202 (= (car (cdr ctime)) (car (cdr mtime))))))) 3263 (= (car (cdr ctime)) (car (cdr mtime))))))))
3203 (if (not valid) 3264 (unless valid
3204 (setq ido-dir-file-cache (delq cached ido-dir-file-cache) 3265 (setq ido-dir-file-cache (delq cached ido-dir-file-cache)
3205 cached nil))) 3266 cached nil)))
3206 (unless cached 3267 (unless cached
3207 (if (and ftp (file-readable-p dir)) 3268 (cond
3208 (setq mtime (cons 'ftp (ido-time-stamp)))) 3269 (unc
3270 (setq mtime (cons 'unc (ido-time-stamp))))
3271 ((and ftp (file-readable-p dir))
3272 (setq mtime (cons 'ftp (ido-time-stamp)))))
3209 (if mtime 3273 (if mtime
3210 (setq cached (cons dir (cons mtime (ido-file-name-all-completions-1 dir))) 3274 (setq cached (cons dir (cons mtime (ido-file-name-all-completions-1 dir)))
3211 ido-dir-file-cache (cons cached ido-dir-file-cache))) 3275 ido-dir-file-cache (cons cached ido-dir-file-cache)))
3212 (if (> (length ido-dir-file-cache) ido-max-dir-file-cache) 3276 (if (> (length ido-dir-file-cache) ido-max-dir-file-cache)
3213 (setcdr (nthcdr (1- ido-max-dir-file-cache) ido-dir-file-cache) nil))) 3277 (setcdr (nthcdr (1- ido-max-dir-file-cache) ido-dir-file-cache) nil)))
3214 (and cached 3278 (and cached
3215 (cdr (cdr cached)))) 3279 (cdr (cdr cached)))))
3216 (ido-file-name-all-completions-1 dir))) 3280 (t
3281 (ido-file-name-all-completions-1 dir))))
3217 3282
3218(defun ido-remove-cached-dir (dir) 3283(defun ido-remove-cached-dir (dir)
3219 ;; Remove dir from ido-dir-file-cache 3284 ;; Remove dir from ido-dir-file-cache
@@ -3227,7 +3292,8 @@ for first matching file."
3227(defun ido-make-file-list-1 (dir &optional merged) 3292(defun ido-make-file-list-1 (dir &optional merged)
3228 ;; Return list of non-ignored files in DIR 3293 ;; Return list of non-ignored files in DIR
3229 ;; If MERGED is non-nil, each file is cons'ed with DIR 3294 ;; If MERGED is non-nil, each file is cons'ed with DIR
3230 (and (or (ido-is-tramp-root dir) (file-directory-p dir)) 3295 (and (or (ido-is-tramp-root dir) (ido-is-unc-root dir)
3296 (file-directory-p dir))
3231 (delq nil 3297 (delq nil
3232 (mapcar 3298 (mapcar
3233 (lambda (name) 3299 (lambda (name)
@@ -3956,10 +4022,16 @@ For details of keybindings, do `\\[describe-function] ido-find-file'."
3956 ) 4022 )
3957 4023
3958 ((= (length contents) 1) 4024 ((= (length contents) 1)
3959 (when (and (ido-is-tramp-root) (string-equal contents "/")) 4025 (cond
4026 ((and (ido-is-tramp-root) (string-equal contents "/"))
3960 (ido-set-current-directory ido-current-directory contents) 4027 (ido-set-current-directory ido-current-directory contents)
3961 (setq refresh t)) 4028 (setq refresh t))
3962 ) 4029 ((and ido-unc-hosts (string-equal contents "/")
4030 (let ((ido-enable-tramp-completion nil))
4031 (ido-is-root-directory)))
4032 (ido-set-current-directory "//")
4033 (setq refresh t))
4034 ))
3963 4035
3964 ((and (string-match (if ido-enable-tramp-completion "..[:@]\\'" "..:\\'") contents) 4036 ((and (string-match (if ido-enable-tramp-completion "..[:@]\\'" "..:\\'") contents)
3965 (ido-is-root-directory)) ;; Ange-ftp or tramp 4037 (ido-is-root-directory)) ;; Ange-ftp or tramp
diff --git a/lisp/image.el b/lisp/image.el
index 6938dba05cb..2212b0fb471 100644
--- a/lisp/image.el
+++ b/lisp/image.el
@@ -79,12 +79,13 @@ value is used as a list of directories to search.")
79 79
80 80
81(defun image-load-path-for-library (library image &optional path no-error) 81(defun image-load-path-for-library (library image &optional path no-error)
82 "Return a suitable search path for images relative to LIBRARY. 82 "Return a suitable search path for images used by LIBRARY.
83 83
84First it searches for IMAGE in a path suitable for LIBRARY, which 84It searches for IMAGE in `image-load-path' (excluding
85includes \"../../etc/images\" and \"../etc/images\" relative to 85\"`data-directory'/images\") and `load-path', followed by a path
86the library file itself, followed by `image-load-path' and 86suitable for LIBRARY, which includes \"../../etc/images\" and
87`load-path'. 87\"../etc/images\" relative to the library file itself, and then
88in \"`data-directory'/images\".
88 89
89Then this function returns a list of directories which contains 90Then this function returns a list of directories which contains
90first the directory in which IMAGE was found, followed by the 91first the directory in which IMAGE was found, followed by the
@@ -99,16 +100,46 @@ Here is an example that uses a common idiom to provide
99compatibility with versions of Emacs that lack the variable 100compatibility with versions of Emacs that lack the variable
100`image-load-path': 101`image-load-path':
101 102
102 ;; Avoid errors on Emacsen without `image-load-path'. 103 ;; Shush compiler.
103 (if (not (boundp 'image-load-path)) (defvar image-load-path nil)) 104 (defvar image-load-path)
104 105
105 (let* ((load-path (image-load-path-for-library \"mh-e\" \"mh-logo.xpm\")) 106 (let* ((load-path (image-load-path-for-library \"mh-e\" \"mh-logo.xpm\"))
106 (image-load-path (cons (car load-path) image-load-path))) 107 (image-load-path (cons (car load-path)
108 (when (boundp 'image-load-path)
109 image-load-path))))
107 (mh-tool-bar-folder-buttons-init))" 110 (mh-tool-bar-folder-buttons-init))"
108 (unless library (error "No library specified")) 111 (unless library (error "No library specified"))
109 (unless image (error "No image specified")) 112 (unless image (error "No image specified"))
110 (let ((image-directory)) 113 (let (image-directory image-directory-load-path)
114 ;; Check for images in image-load-path or load-path.
115 (let ((img image)
116 (dir (or
117 ;; Images in image-load-path.
118 (image-search-load-path image)
119 ;; Images in load-path.
120 (locate-library image)))
121 parent)
122 ;; Since the image might be in a nested directory (for
123 ;; example, mail/attach.pbm), adjust `image-directory'
124 ;; accordingly.
125 (when dir
126 (setq dir (file-name-directory dir))
127 (while (setq parent (file-name-directory img))
128 (setq img (directory-file-name parent)
129 dir (expand-file-name "../" dir))))
130 (setq image-directory-load-path dir))
131
132 ;; If `image-directory-load-path' isn't Emacs' image directory,
133 ;; it's probably a user preference, so use it. Then use a
134 ;; relative setting if possible; otherwise, use
135 ;; `image-directory-load-path'.
111 (cond 136 (cond
137 ;; User-modified image-load-path?
138 ((and image-directory-load-path
139 (not (equal image-directory-load-path
140 (file-name-as-directory
141 (expand-file-name "images" data-directory)))))
142 (setq image-directory image-directory-load-path))
112 ;; Try relative setting. 143 ;; Try relative setting.
113 ((let (library-name d1ei d2ei) 144 ((let (library-name d1ei d2ei)
114 ;; First, find library in the load-path. 145 ;; First, find library in the load-path.
@@ -118,33 +149,20 @@ compatibility with versions of Emacs that lack the variable
118 ;; And then set image-directory relative to that. 149 ;; And then set image-directory relative to that.
119 (setq 150 (setq
120 ;; Go down 2 levels. 151 ;; Go down 2 levels.
121 d2ei (expand-file-name 152 d2ei (file-name-as-directory
122 (concat (file-name-directory library-name) "../../etc/images")) 153 (expand-file-name
154 (concat (file-name-directory library-name) "../../etc/images")))
123 ;; Go down 1 level. 155 ;; Go down 1 level.
124 d1ei (expand-file-name 156 d1ei (file-name-as-directory
125 (concat (file-name-directory library-name) "../etc/images"))) 157 (expand-file-name
158 (concat (file-name-directory library-name) "../etc/images"))))
126 (setq image-directory 159 (setq image-directory
127 ;; Set it to nil if image is not found. 160 ;; Set it to nil if image is not found.
128 (cond ((file-exists-p (expand-file-name image d2ei)) d2ei) 161 (cond ((file-exists-p (expand-file-name image d2ei)) d2ei)
129 ((file-exists-p (expand-file-name image d1ei)) d1ei))))) 162 ((file-exists-p (expand-file-name image d1ei)) d1ei)))))
130 ;; Check for images in image-load-path or load-path. 163 ;; Use Emacs' image directory.
131 ((let ((img image) 164 (image-directory-load-path
132 (dir (or 165 (setq image-directory image-directory-load-path))
133 ;; Images in image-load-path.
134 (image-search-load-path image)
135 ;; Images in load-path.
136 (locate-library image)))
137 parent)
138 ;; Since the image might be in a nested directory (for
139 ;; example, mail/attach.pbm), adjust `image-directory'
140 ;; accordingly.
141 (and dir
142 (setq dir (file-name-directory dir))
143 (progn
144 (while (setq parent (file-name-directory img))
145 (setq img (directory-file-name parent)
146 dir (expand-file-name "../" dir)))
147 (setq image-directory dir)))))
148 (no-error 166 (no-error
149 (message "Could not find image %s for library %s" image library)) 167 (message "Could not find image %s for library %s" image library))
150 (t 168 (t
diff --git a/lisp/international/mule.el b/lisp/international/mule.el
index ca8e29b52e6..bf9a9570216 100644
--- a/lisp/international/mule.el
+++ b/lisp/international/mule.el
@@ -1593,7 +1593,10 @@ and the contents of `file-coding-system-alist'."
1593 (symbol :tag "Coding system")))) 1593 (symbol :tag "Coding system"))))
1594 1594
1595(defcustom auto-coding-regexp-alist 1595(defcustom auto-coding-regexp-alist
1596 '(("^BABYL OPTIONS:[ \t]*-\\*-[ \t]*rmail[ \t]*-\\*-" . no-conversion)) 1596 '(("^BABYL OPTIONS:[ \t]*-\\*-[ \t]*rmail[ \t]*-\\*-" . no-conversion)
1597 ("\\`\xFE\xFF" . utf-16be-with-signature)
1598 ("\\`\xFF\xFE" . utf-16le-with-signature)
1599 ("\\`\xEF\xBB\xBF" . utf-8))
1597 "Alist of patterns vs corresponding coding systems. 1600 "Alist of patterns vs corresponding coding systems.
1598Each element looks like (REGEXP . CODING-SYSTEM). 1601Each element looks like (REGEXP . CODING-SYSTEM).
1599A file whose first bytes match REGEXP is decoded by CODING-SYSTEM on reading. 1602A file whose first bytes match REGEXP is decoded by CODING-SYSTEM on reading.
diff --git a/lisp/isearch.el b/lisp/isearch.el
index 0a85f10cf40..13b54a02467 100644
--- a/lisp/isearch.el
+++ b/lisp/isearch.el
@@ -1696,12 +1696,15 @@ Isearch mode."
1696 (and (integerp main-event) 1696 (and (integerp main-event)
1697 (memq 'shift mods) 1697 (memq 'shift mods)
1698 (memq 'control mods) 1698 (memq 'control mods)
1699 (lookup-key isearch-mode-map 1699 (not (memq (lookup-key isearch-mode-map
1700 (let ((copy (copy-sequence key))) 1700 (let ((copy (copy-sequence key)))
1701 (aset copy 0 1701 (aset copy 0
1702 (- main-event (- ?\C-\S-a ?\C-a))) 1702 (- main-event
1703 copy) 1703 (- ?\C-\S-a ?\C-a)))
1704 nil))) 1704 copy)
1705 nil)
1706 '(nil
1707 isearch-other-control-char)))))
1705 (setcar keylist (- main-event (- ?\C-\S-a ?\C-a))) 1708 (setcar keylist (- main-event (- ?\C-\S-a ?\C-a)))
1706 (cancel-kbd-macro-events) 1709 (cancel-kbd-macro-events)
1707 (apply 'isearch-unread keylist)) 1710 (apply 'isearch-unread keylist))
diff --git a/lisp/iswitchb.el b/lisp/iswitchb.el
index d7d82ae5551..93d4755cf3a 100644
--- a/lisp/iswitchb.el
+++ b/lisp/iswitchb.el
@@ -6,7 +6,6 @@
6;; Author: Stephen Eglen <stephen@gnu.org> 6;; Author: Stephen Eglen <stephen@gnu.org>
7;; Maintainer: Stephen Eglen <stephen@gnu.org> 7;; Maintainer: Stephen Eglen <stephen@gnu.org>
8;; Keywords: completion convenience 8;; Keywords: completion convenience
9;; location: http://www.anc.ed.ac.uk/~stephen/emacs/
10 9
11;; This file is part of GNU Emacs. 10;; This file is part of GNU Emacs.
12 11
diff --git a/lisp/jit-lock.el b/lisp/jit-lock.el
index f82ead462f0..0e131b665ef 100644
--- a/lisp/jit-lock.el
+++ b/lisp/jit-lock.el
@@ -301,7 +301,7 @@ Only applies to the current buffer."
301This function is added to `fontification-functions' when `jit-lock-mode' 301This function is added to `fontification-functions' when `jit-lock-mode'
302is active." 302is active."
303 (when (and jit-lock-mode (not memory-full)) 303 (when (and jit-lock-mode (not memory-full))
304 (if (null jit-lock-defer-time) 304 (if (null jit-lock-defer-timer)
305 ;; No deferral. 305 ;; No deferral.
306 (jit-lock-fontify-now start (+ start jit-lock-chunk-size)) 306 (jit-lock-fontify-now start (+ start jit-lock-chunk-size))
307 ;; Record the buffer for later fontification. 307 ;; Record the buffer for later fontification.
@@ -510,7 +510,7 @@ This functions is called after Emacs has been idle for
510 (setq pos (next-single-property-change pos 'fontified))))))))) 510 (setq pos (next-single-property-change pos 'fontified)))))))))
511 (setq jit-lock-defer-buffers nil) 511 (setq jit-lock-defer-buffers nil)
512 ;; Force fontification of the visible parts. 512 ;; Force fontification of the visible parts.
513 (let ((jit-lock-defer-time nil)) 513 (let ((jit-lock-defer-timer nil))
514 ;; (message "Jit-Defer Now") 514 ;; (message "Jit-Defer Now")
515 (sit-for 0) 515 (sit-for 0)
516 ;; (message "Jit-Defer Done") 516 ;; (message "Jit-Defer Done")
@@ -571,7 +571,7 @@ will take place when text is fontified stealthily."
571 (setq start (if region 571 (setq start (if region
572 (car region) 572 (car region)
573 (goto-char start) 573 (goto-char start)
574 (line-beginning-position (- 1 font-lock-lines-before)))) 574 (line-beginning-position)))
575 575
576 ;; If we're in text that matches a multi-line font-lock pattern, 576 ;; If we're in text that matches a multi-line font-lock pattern,
577 ;; make sure the whole text will be redisplayed. 577 ;; make sure the whole text will be redisplayed.
diff --git a/lisp/locate.el b/lisp/locate.el
index bca53a32152..702ae98ecd6 100644
--- a/lisp/locate.el
+++ b/lisp/locate.el
@@ -122,7 +122,26 @@
122 :group 'external) 122 :group 'external)
123 123
124(defcustom locate-command "locate" 124(defcustom locate-command "locate"
125 "*The executable program used to search a database of files." 125 "Executable program for searching a database of files.
126The Emacs commands `locate' and `locate-with-filter' use this.
127The value should be a program that can be called from a shell
128with one argument, SEARCH-STRING. The program determines which
129database it searches. The output of the program should consist
130of those file names in the database that match SEARCH-STRING,
131listed one per line, possibly with leading or trailing
132whitespace. If the output is in another form, you may have to
133redefine the function `locate-get-file-positions'.
134
135The program may interpret SEARCH-STRING as a literal string, a
136shell pattern or a regular expression. The exact rules of what
137constitutes a match may also depend on the program.
138
139The standard value of this variable is \"locate\".
140This program normally searches a database of all files on your
141system, or of all files that you have access to. Consult the
142documentation of that program for the details about how it determines
143which file names match SEARCH-STRING. (Those details vary highly with
144the version.)"
126 :type 'string 145 :type 'string
127 :group 'locate) 146 :group 'locate)
128 147
@@ -133,22 +152,34 @@
133 "The history list used by the \\[locate-with-filter] command.") 152 "The history list used by the \\[locate-with-filter] command.")
134 153
135(defcustom locate-make-command-line 'locate-default-make-command-line 154(defcustom locate-make-command-line 'locate-default-make-command-line
136 "*Function used to create the locate command line." 155 "Function used to create the locate command line.
156The Emacs commands `locate' and `locate-with-filter' use this.
157This function should take one argument, a string (the name to find)
158and return a list of strings. The first element of the list should be
159the name of a command to be executed by a shell, the remaining elements
160should be the arguments to that command (including the name to find)."
137 :type 'function 161 :type 'function
138 :group 'locate) 162 :group 'locate)
139 163
140(defcustom locate-buffer-name "*Locate*" 164(defcustom locate-buffer-name "*Locate*"
141 "*Name of the buffer to show results from the \\[locate] command." 165 "Name of the buffer to show results from the \\[locate] command."
142 :type 'string 166 :type 'string
143 :group 'locate) 167 :group 'locate)
144 168
145(defcustom locate-fcodes-file nil 169(defcustom locate-fcodes-file nil
146 "*File name for the database of file names." 170 "File name for the database of file names used by `locate'.
171If non-nil, `locate' uses this name in the header of the `*Locate*'
172buffer. If nil, it mentions no file name in that header.
173
174Just setting this variable does not actually change the database
175that `locate' searches. The executive program that the Emacs
176function `locate' uses, as given by the variables `locate-command'
177or `locate-make-command-line', determines the database."
147 :type '(choice (const :tag "None" nil) file) 178 :type '(choice (const :tag "None" nil) file)
148 :group 'locate) 179 :group 'locate)
149 180
150(defcustom locate-header-face nil 181(defcustom locate-header-face nil
151 "*Face used to highlight the locate header." 182 "Face used to highlight the locate header."
152 :type '(choice (const :tag "None" nil) face) 183 :type '(choice (const :tag "None" nil) face)
153 :group 'locate) 184 :group 'locate)
154 185
@@ -161,12 +192,12 @@ This should contain the \"-l\" switch, but not the \"-F\" or \"-b\" switches."
161 :version "22.1") 192 :version "22.1")
162 193
163(defcustom locate-update-command "updatedb" 194(defcustom locate-update-command "updatedb"
164 "The command used to update the locate database." 195 "The executable program used to update the locate database."
165 :type 'string 196 :type 'string
166 :group 'locate) 197 :group 'locate)
167 198
168(defcustom locate-prompt-for-command nil 199(defcustom locate-prompt-for-command nil
169 "If non-nil, the locate command prompts for a command to run. 200 "If non-nil, the `locate' command prompts for a command to run.
170Otherwise, that behavior is invoked via a prefix argument." 201Otherwise, that behavior is invoked via a prefix argument."
171 :group 'locate 202 :group 'locate
172 :type 'boolean 203 :type 'boolean
@@ -191,7 +222,22 @@ Otherwise, that behavior is invoked via a prefix argument."
191;;;###autoload 222;;;###autoload
192(defun locate (search-string &optional filter) 223(defun locate (search-string &optional filter)
193 "Run the program `locate', putting results in `*Locate*' buffer. 224 "Run the program `locate', putting results in `*Locate*' buffer.
194With prefix arg, prompt for the locate command to run." 225Pass it SEARCH-STRING as argument. Interactively, prompt for SEARCH-STRING.
226With prefix arg, prompt for the exact shell command to run instead.
227
228This program searches for those file names in a database that match
229SEARCH-STRING and normally outputs all matching absolute file names,
230one per line. The database normally consists of all files on your
231system, or of all files that you have access to. Consult the
232documentation of the program for the details about how it determines
233which file names match SEARCH-STRING. (Those details vary highly with
234the version.)
235
236You can specify another program for this command to run by customizing
237the variables `locate-command' or `locate-make-command-line'.
238
239The main use of FILTER is to implement `locate-with-filter'. See
240the docstring of that function for its meaning."
195 (interactive 241 (interactive
196 (list 242 (list
197 (if (or (and current-prefix-arg 243 (if (or (and current-prefix-arg
@@ -255,10 +301,17 @@ With prefix arg, prompt for the locate command to run."
255 301
256;;;###autoload 302;;;###autoload
257(defun locate-with-filter (search-string filter) 303(defun locate-with-filter (search-string filter)
258 "Run the locate command with a filter. 304 "Run the executable program `locate' with a filter.
259 305This function is similar to the function `locate', which see.
260The filter is a regular expression. Only results matching the filter are 306The difference is that, when invoked interactively, the present function
261shown; this is often useful to constrain a big search." 307prompts for both SEARCH-STRING and FILTER. It passes SEARCH-STRING
308to the locate executable program. It produces a `*Locate*' buffer
309that lists only those lines in the output of the locate program that
310contain a match for the regular expression FILTER; this is often useful
311to constrain a big search.
312
313When called from Lisp, this function is identical with `locate',
314except that FILTER is not optional."
262 (interactive 315 (interactive
263 (list (read-from-minibuffer "Locate: " nil nil 316 (list (read-from-minibuffer "Locate: " nil nil
264 nil 'locate-history-list) 317 nil 'locate-history-list)
@@ -269,7 +322,7 @@ shown; this is often useful to constrain a big search."
269(defun locate-filter-output (filter) 322(defun locate-filter-output (filter)
270 "Filter output from the locate command." 323 "Filter output from the locate command."
271 (goto-char (point-min)) 324 (goto-char (point-min))
272 (delete-non-matching-lines filter)) 325 (keep-lines filter))
273 326
274(defvar locate-mode-map nil 327(defvar locate-mode-map nil
275 "Local keymap for Locate mode buffers.") 328 "Local keymap for Locate mode buffers.")
@@ -303,6 +356,15 @@ shown; this is often useful to constrain a big search."
303 "The amount of indentation for each file.") 356 "The amount of indentation for each file.")
304 357
305(defun locate-get-file-positions () 358(defun locate-get-file-positions ()
359 "Return list of start and end of the file name on the current line.
360This is a list of two buffer positions.
361
362You should only call this function on lines that contain a file name
363listed by the locate program. Inside inserted subdirectories, or if
364there is no file name on the current line, the return value is
365meaningless. You can check whether the current line contains a file
366listed by the locate program, using the function
367`locate-main-listing-line-p'."
306 (save-excursion 368 (save-excursion
307 (end-of-line) 369 (end-of-line)
308 (let ((eol (point))) 370 (let ((eol (point)))
@@ -320,6 +382,12 @@ shown; this is often useful to constrain a big search."
320 1 382 1
321 0))) 383 0)))
322 384
385;; You should only call this function on lines that contain a file name
386;; listed by the locate program. Inside inserted subdirectories, or if
387;; there is no file name on the current line, the return value is
388;; meaningless. You can check whether the current line contains a file
389;; listed by the locate program, using the function
390;; `locate-main-listing-line-p'.
323(defun locate-get-filename () 391(defun locate-get-filename ()
324 (let ((pos (locate-get-file-positions)) 392 (let ((pos (locate-get-file-positions))
325 (lineno (locate-current-line-number))) 393 (lineno (locate-current-line-number)))
@@ -516,8 +584,16 @@ Database is updated using the shell command in `locate-update-command'."
516(defun locate-find-directory-other-window () 584(defun locate-find-directory-other-window ()
517 "Visit the directory of the file named on this line in other window." 585 "Visit the directory of the file named on this line in other window."
518 (interactive) 586 (interactive)
519 (find-file-other-window (locate-get-dirname))) 587 (if (locate-main-listing-line-p)
588 (find-file-other-window (locate-get-dirname))
589 (message "This command only works inside main listing.")))
520 590
591;; You should only call this function on lines that contain a file name
592;; listed by the locate program. Inside inserted subdirectories, or if
593;; there is no file name on the current line, the return value is
594;; meaningless. You can check whether the current line contains a file
595;; listed by the locate program, using the function
596;; `locate-main-listing-line-p'.
521(defun locate-get-dirname () 597(defun locate-get-dirname ()
522 "Return the directory name of the file mentioned on this line." 598 "Return the directory name of the file mentioned on this line."
523 (let (file (filepos (locate-get-file-positions))) 599 (let (file (filepos (locate-get-file-positions)))
diff --git a/lisp/mail/rmail.el b/lisp/mail/rmail.el
index 935e7d1b92c..5c06a1fe1ad 100644
--- a/lisp/mail/rmail.el
+++ b/lisp/mail/rmail.el
@@ -453,10 +453,10 @@ examples:
453 "String to prepend to Subject line when replying to a message.") 453 "String to prepend to Subject line when replying to a message.")
454 454
455;; Some mailers use "Re(2):" or "Re^2:" or "Re: Re:" or "Re[2]:". 455;; Some mailers use "Re(2):" or "Re^2:" or "Re: Re:" or "Re[2]:".
456;; This pattern should catch all the common variants. The pattern 456;; This pattern should catch all the common variants.
457;; also ignores mailing list identifiers sometimes added in square 457;; rms: I deleted the change to delete tags in square brackets
458;; brackets at the beginning of subject lines. 458;; because they mess up RT tags.
459(defvar rmail-reply-regexp "\\`\\(\\[.+?\\] \\)?\\(Re\\(([0-9]+)\\|\\[[0-9]+\\]\\|\\^[0-9]+\\)?: *\\)*" 459(defvar rmail-reply-regexp "\\`\\(Re\\(([0-9]+)\\|\\[[0-9]+\\]\\|\\^[0-9]+\\)?: *\\)*"
460 "Regexp to delete from Subject line before inserting `rmail-reply-prefix'.") 460 "Regexp to delete from Subject line before inserting `rmail-reply-prefix'.")
461 461
462(defcustom rmail-display-summary nil 462(defcustom rmail-display-summary nil
diff --git a/lisp/mh-e/ChangeLog b/lisp/mh-e/ChangeLog
index ecdf207d252..7a6cf778bbe 100644
--- a/lisp/mh-e/ChangeLog
+++ b/lisp/mh-e/ChangeLog
@@ -1,3 +1,42 @@
12006-03-19 Bill Wohler <wohler@newt.com>
2
3 * mh-comp.el (mh-reply): Sync docstring with manual.
4
5 * mh-compat.el (mh-image-load-path-for-library): Shorten first line in
6 docstring.
7
82006-03-17 Bill Wohler <wohler@newt.com>
9
10 * mh-compat.el (mh-image-load-path-for-library): Minor docstring
11 fix.
12
132006-03-16 Bill Wohler <wohler@newt.com>
14
15 * mh-comp.el (mh-send-letter): Use split-string to break up
16 mh-send-args (closes SF #1448604).
17 (mh-compose-and-send-mail): Use run-hook-with-args for
18 mh-compose-letter-function.
19
20 * mh-e.el (mh-list-to-string-1): Use dolist.
21
22 * mh-compat.el (mh-image-load-path-for-library): Prefer user's
23 images.
24
252006-03-15 Bill Wohler <wohler@newt.com>
26
27 * mh-compat.el (mh-image-load-path-for-library): Fix example by
28 not recommending that one binds image-load-path. Just defvar it to
29 placate compiler and only use it if previously defined.
30
31 * mh-e.el (image-load-path): Don't bind!
32
33 * mh-folder.el (mh-folder-mode): Only use image-load-path if
34 previously defined.
35
36 * mh-letter.el (mh-letter-mode): Ditto.
37
38 * mh-utils.el (mh-logo-display): Ditto.
39
12006-03-14 Bill Wohler <wohler@newt.com> 402006-03-14 Bill Wohler <wohler@newt.com>
2 41
3 * mh-compat.el (mh-image-load-path-for-library): Incorporate 42 * mh-compat.el (mh-image-load-path-for-library): Incorporate
diff --git a/lisp/mh-e/mh-comp.el b/lisp/mh-e/mh-comp.el
index 0cedc83719c..27806dc9ab9 100644
--- a/lisp/mh-e/mh-comp.el
+++ b/lisp/mh-e/mh-comp.el
@@ -287,7 +287,7 @@ use `mh-send-prog' to tell MH-E the name."
287 (set-buffer draft-buffer)) ; for annotation below 287 (set-buffer draft-buffer)) ; for annotation below
288 (t 288 (t
289 (mh-exec-cmd-daemon mh-send-prog nil "-nodraftfolder" "-noverbose" 289 (mh-exec-cmd-daemon mh-send-prog nil "-nodraftfolder" "-noverbose"
290 mh-send-args file-name))) 290 (split-string mh-send-args) file-name)))
291 (if mh-annotate-char 291 (if mh-annotate-char
292 (mh-annotate-msg mh-sent-from-msg 292 (mh-annotate-msg mh-sent-from-msg
293 mh-sent-from-folder 293 mh-sent-from-folder
@@ -580,14 +580,16 @@ You have several choices here.
580 580
581 Response Reply Goes To 581 Response Reply Goes To
582 582
583 from The person who sent the message. This is the 583 from The person who sent the message. This is the
584 default, so <RET> is sufficient. 584 default, so <RET> is sufficient.
585 585
586 to Replies to the sender, plus all recipients in the 586 to Replies to the sender, plus all recipients in the
587 \"To:\" header field. 587 \"To:\" header field.
588 588
589 all 589 all cc Forms a reply to the addresses in the
590 cc Forms a reply to the sender, plus all recipients. 590 \"Mail-Followup-To:\" header field if one
591 exists; otherwise forms a reply to the sender,
592 plus all recipients.
591 593
592Depending on your answer, \"repl\" is given a different argument 594Depending on your answer, \"repl\" is given a different argument
593to form your reply. Specifically, a choice of \"from\" or none at 595to form your reply. Specifically, a choice of \"from\" or none at
@@ -597,7 +599,11 @@ all runs \"repl -nocc all\", and a choice of \"to\" runs \"repl
597 599
598Two windows are then created. One window contains the message to 600Two windows are then created. One window contains the message to
599which you are replying in an MH-Show buffer. Your draft, in 601which you are replying in an MH-Show buffer. Your draft, in
600MH-Letter mode (see `mh-letter-mode'), is in the other window. 602MH-Letter mode (*note `mh-letter-mode'), is in the other window.
603If the reply draft was not one that you expected, check the
604things that affect the behavior of \"repl\" which include the
605\"repl:\" profile component and the \"replcomps\" and
606\"replgroupcomps\" files.
601 607
602If you supply a prefix argument INCLUDEP, the message you are 608If you supply a prefix argument INCLUDEP, the message you are
603replying to is inserted in your reply after having first been run 609replying to is inserted in your reply after having first been run
@@ -895,15 +901,7 @@ letter."
895 (mh-logo-display) 901 (mh-logo-display)
896 (mh-make-local-hook 'kill-buffer-hook) 902 (mh-make-local-hook 'kill-buffer-hook)
897 (add-hook 'kill-buffer-hook 'mh-tidy-draft-buffer nil t) 903 (add-hook 'kill-buffer-hook 'mh-tidy-draft-buffer nil t)
898 (if (and (boundp 'mh-compose-letter-function) 904 (run-hook-with-args 'mh-compose-letter-function to subject cc))
899 mh-compose-letter-function)
900 ;; run-hooks will not pass arguments.
901 (let ((value mh-compose-letter-function))
902 (if (and (listp value) (not (eq (car value) 'lambda)))
903 (while value
904 (funcall (car value) to subject cc)
905 (setq value (cdr value)))
906 (funcall mh-compose-letter-function to subject cc)))))
907 905
908(defun mh-insert-x-mailer () 906(defun mh-insert-x-mailer ()
909 "Append an X-Mailer field to the header. 907 "Append an X-Mailer field to the header.
diff --git a/lisp/mh-e/mh-compat.el b/lisp/mh-e/mh-compat.el
index 50542d67f4e..256a8cfe831 100644
--- a/lisp/mh-e/mh-compat.el
+++ b/lisp/mh-e/mh-compat.el
@@ -117,12 +117,13 @@ introduced in Emacs 22."
117 117
118(mh-defun-compat mh-image-load-path-for-library 118(mh-defun-compat mh-image-load-path-for-library
119 image-load-path-for-library (library image &optional path no-error) 119 image-load-path-for-library (library image &optional path no-error)
120 "Return a suitable search path for images relative to LIBRARY. 120 "Return a suitable search path for images used by LIBRARY.
121 121
122First it searches for IMAGE in a path suitable for LIBRARY, which 122It searches for IMAGE in `image-load-path' (excluding
123includes \"../../etc/images\" and \"../etc/images\" relative to 123\"`data-directory'/images\") and `load-path', followed by a path
124the library file itself, followed by `image-load-path' and 124suitable for LIBRARY, which includes \"../../etc/images\" and
125`load-path'. 125\"../etc/images\" relative to the library file itself, and then
126in \"`data-directory'/images\".
126 127
127Then this function returns a list of directories which contains 128Then this function returns a list of directories which contains
128first the directory in which IMAGE was found, followed by the 129first the directory in which IMAGE was found, followed by the
@@ -137,16 +138,46 @@ Here is an example that uses a common idiom to provide
137compatibility with versions of Emacs that lack the variable 138compatibility with versions of Emacs that lack the variable
138`image-load-path': 139`image-load-path':
139 140
140 ;; Avoid errors on Emacsen without `image-load-path'. 141 ;; Shush compiler.
141 (if (not (boundp 'image-load-path)) (defvar image-load-path nil)) 142 (defvar image-load-path)
142 143
143 (let* ((load-path (image-load-path-for-library \"mh-e\" \"mh-logo.xpm\")) 144 (let* ((load-path (image-load-path-for-library \"mh-e\" \"mh-logo.xpm\"))
144 (image-load-path (cons (car load-path) image-load-path))) 145 (image-load-path (cons (car load-path)
146 (when (boundp 'image-load-path)
147 image-load-path))))
145 (mh-tool-bar-folder-buttons-init))" 148 (mh-tool-bar-folder-buttons-init))"
146 (unless library (error "No library specified")) 149 (unless library (error "No library specified"))
147 (unless image (error "No image specified")) 150 (unless image (error "No image specified"))
148 (let ((image-directory)) 151 (let (image-directory image-directory-load-path)
152 ;; Check for images in image-load-path or load-path.
153 (let ((img image)
154 (dir (or
155 ;; Images in image-load-path.
156 (mh-image-search-load-path image)
157 ;; Images in load-path.
158 (locate-library image)))
159 parent)
160 ;; Since the image might be in a nested directory (for
161 ;; example, mail/attach.pbm), adjust `image-directory'
162 ;; accordingly.
163 (when dir
164 (setq dir (file-name-directory dir))
165 (while (setq parent (file-name-directory img))
166 (setq img (directory-file-name parent)
167 dir (expand-file-name "../" dir))))
168 (setq image-directory-load-path dir))
169
170 ;; If `image-directory-load-path' isn't Emacs' image directory,
171 ;; it's probably a user preference, so use it. Then use a
172 ;; relative setting if possible; otherwise, use
173 ;; `image-directory-load-path'.
149 (cond 174 (cond
175 ;; User-modified image-load-path?
176 ((and image-directory-load-path
177 (not (equal image-directory-load-path
178 (file-name-as-directory
179 (expand-file-name "images" data-directory)))))
180 (setq image-directory image-directory-load-path))
150 ;; Try relative setting. 181 ;; Try relative setting.
151 ((let (library-name d1ei d2ei) 182 ((let (library-name d1ei d2ei)
152 ;; First, find library in the load-path. 183 ;; First, find library in the load-path.
@@ -156,33 +187,20 @@ compatibility with versions of Emacs that lack the variable
156 ;; And then set image-directory relative to that. 187 ;; And then set image-directory relative to that.
157 (setq 188 (setq
158 ;; Go down 2 levels. 189 ;; Go down 2 levels.
159 d2ei (expand-file-name 190 d2ei (file-name-as-directory
160 (concat (file-name-directory library-name) "../../etc/images")) 191 (expand-file-name
192 (concat (file-name-directory library-name) "../../etc/images")))
161 ;; Go down 1 level. 193 ;; Go down 1 level.
162 d1ei (expand-file-name 194 d1ei (file-name-as-directory
163 (concat (file-name-directory library-name) "../etc/images"))) 195 (expand-file-name
196 (concat (file-name-directory library-name) "../etc/images"))))
164 (setq image-directory 197 (setq image-directory
165 ;; Set it to nil if image is not found. 198 ;; Set it to nil if image is not found.
166 (cond ((file-exists-p (expand-file-name image d2ei)) d2ei) 199 (cond ((file-exists-p (expand-file-name image d2ei)) d2ei)
167 ((file-exists-p (expand-file-name image d1ei)) d1ei))))) 200 ((file-exists-p (expand-file-name image d1ei)) d1ei)))))
168 ;; Check for images in image-load-path or load-path. 201 ;; Use Emacs' image directory.
169 ((let ((img image) 202 (image-directory-load-path
170 (dir (or 203 (setq image-directory image-directory-load-path))
171 ;; Images in image-load-path.
172 (mh-image-search-load-path image)
173 ;; Images in load-path.
174 (locate-library image)))
175 parent)
176 ;; Since the image might be in a nested directory (for
177 ;; example, mail/attach.pbm), adjust `image-directory'
178 ;; accordingly.
179 (and dir
180 (setq dir (file-name-directory dir))
181 (progn
182 (while (setq parent (file-name-directory img))
183 (setq img (directory-file-name parent)
184 dir (expand-file-name "../" dir)))
185 (setq image-directory dir)))))
186 (no-error 204 (no-error
187 (message "Could not find image %s for library %s" image library)) 205 (message "Could not find image %s for library %s" image library))
188 (t 206 (t
diff --git a/lisp/mh-e/mh-e.el b/lisp/mh-e/mh-e.el
index 2f29a678f13..84e569bab81 100644
--- a/lisp/mh-e/mh-e.el
+++ b/lisp/mh-e/mh-e.el
@@ -325,9 +325,6 @@ Name of the Previous sequence.")
325 325
326;; Etc. (alphabetical) 326;; Etc. (alphabetical)
327 327
328;; Avoid errors on Emacsen without image-load-path.
329(if (not (boundp 'image-load-path)) (defvar image-load-path nil))
330
331(defvar mh-flists-present-flag nil 328(defvar mh-flists-present-flag nil
332 "Non-nil means that we have \"flists\".") 329 "Non-nil means that we have \"flists\".")
333 330
@@ -430,20 +427,20 @@ gnus-version)
430 427
431(defun mh-list-to-string-1 (l) 428(defun mh-list-to-string-1 (l)
432 "Flatten the list L and make every element of the new list into a string." 429 "Flatten the list L and make every element of the new list into a string."
433 (let ((new-list nil)) 430 (let (new-list)
434 (while l 431 (dolist (element l)
435 (cond ((null (car l))) 432 (cond ((null element))
436 ((symbolp (car l)) 433 ((symbolp element)
437 (setq new-list (cons (symbol-name (car l)) new-list))) 434 (push (symbol-name element) new-list))
438 ((numberp (car l)) 435 ((numberp element)
439 (setq new-list (cons (int-to-string (car l)) new-list))) 436 (push (int-to-string element) new-list))
440 ((equal (car l) "")) 437 ((equal element ""))
441 ((stringp (car l)) (setq new-list (cons (car l) new-list))) 438 ((stringp element)
442 ((listp (car l)) 439 (push element new-list))
443 (setq new-list (nconc (mh-list-to-string-1 (car l)) 440 ((listp element)
444 new-list))) 441 (setq new-list (nconc (mh-list-to-string-1 element) new-list)))
445 (t (error "Bad element in `mh-list-to-string': %s" (car l)))) 442 (t
446 (setq l (cdr l))) 443 (error "Bad element: %s" element))))
447 new-list)) 444 new-list))
448 445
449 446
diff --git a/lisp/mh-e/mh-folder.el b/lisp/mh-e/mh-folder.el
index 2c32d1433f1..b1b8c7d859c 100644
--- a/lisp/mh-e/mh-folder.el
+++ b/lisp/mh-e/mh-folder.el
@@ -525,6 +525,7 @@ font-lock is done highlighting.")
525(eval-when-compile 525(eval-when-compile
526 (defvar desktop-save-buffer) 526 (defvar desktop-save-buffer)
527 (defvar font-lock-auto-fontify) 527 (defvar font-lock-auto-fontify)
528 (defvar image-load-path)
528 (mh-do-in-xemacs (defvar font-lock-defaults))) 529 (mh-do-in-xemacs (defvar font-lock-defaults)))
529 530
530(defvar mh-folder-buttons-init-flag nil) 531(defvar mh-folder-buttons-init-flag nil)
@@ -592,7 +593,9 @@ perform the operation on all messages in that region.
592 (mh-do-in-gnu-emacs 593 (mh-do-in-gnu-emacs
593 (unless mh-folder-buttons-init-flag 594 (unless mh-folder-buttons-init-flag
594 (let* ((load-path (mh-image-load-path-for-library "mh-e" "mh-logo.xpm")) 595 (let* ((load-path (mh-image-load-path-for-library "mh-e" "mh-logo.xpm"))
595 (image-load-path (cons (car load-path) image-load-path))) 596 (image-load-path (cons (car load-path)
597 (when (boundp 'image-load-path)
598 image-load-path))))
596 (mh-tool-bar-folder-buttons-init) 599 (mh-tool-bar-folder-buttons-init)
597 (setq mh-folder-buttons-init-flag t))) 600 (setq mh-folder-buttons-init-flag t)))
598 (set (make-local-variable 'tool-bar-map) mh-folder-tool-bar-map)) 601 (set (make-local-variable 'tool-bar-map) mh-folder-tool-bar-map))
diff --git a/lisp/mh-e/mh-letter.el b/lisp/mh-e/mh-letter.el
index a7290cf5ae9..024c1875eac 100644
--- a/lisp/mh-e/mh-letter.el
+++ b/lisp/mh-e/mh-letter.el
@@ -278,7 +278,9 @@ searching for `mh-mail-header-separator' in the buffer."
278(defvar mh-letter-buttons-init-flag nil) 278(defvar mh-letter-buttons-init-flag nil)
279 279
280;; Shush compiler. 280;; Shush compiler.
281(eval-when-compile (mh-do-in-xemacs (defvar font-lock-defaults))) 281(eval-when-compile
282 (defvar image-load-path)
283 (mh-do-in-xemacs (defvar font-lock-defaults)))
282 284
283;; Ensure new buffers won't get this mode if default-major-mode is nil. 285;; Ensure new buffers won't get this mode if default-major-mode is nil.
284(put 'mh-letter-mode 'mode-class 'special) 286(put 'mh-letter-mode 'mode-class 'special)
@@ -314,7 +316,9 @@ order).
314 (mh-do-in-gnu-emacs 316 (mh-do-in-gnu-emacs
315 (unless mh-letter-buttons-init-flag 317 (unless mh-letter-buttons-init-flag
316 (let* ((load-path (mh-image-load-path-for-library "mh-e" "mh-logo.xpm")) 318 (let* ((load-path (mh-image-load-path-for-library "mh-e" "mh-logo.xpm"))
317 (image-load-path (cons (car load-path) image-load-path))) 319 (image-load-path (cons (car load-path)
320 (when (boundp 'image-load-path)
321 image-load-path))))
318 (mh-tool-bar-letter-buttons-init) 322 (mh-tool-bar-letter-buttons-init)
319 (setq mh-letter-buttons-init-flag t))) 323 (setq mh-letter-buttons-init-flag t)))
320 (set (make-local-variable 'tool-bar-map) mh-letter-tool-bar-map)) 324 (set (make-local-variable 'tool-bar-map) mh-letter-tool-bar-map))
diff --git a/lisp/mh-e/mh-utils.el b/lisp/mh-e/mh-utils.el
index 44e15f3cb19..e41ee0bcc4f 100644
--- a/lisp/mh-e/mh-utils.el
+++ b/lisp/mh-e/mh-utils.el
@@ -127,12 +127,17 @@ Ignores case when searching for OLD."
127 127
128(defvar mh-logo-cache nil) 128(defvar mh-logo-cache nil)
129 129
130;; Shush compiler.
131(defvar image-load-path)
132
130;;;###mh-autoload 133;;;###mh-autoload
131(defun mh-logo-display () 134(defun mh-logo-display ()
132 "Modify mode line to display MH-E logo." 135 "Modify mode line to display MH-E logo."
133 (mh-do-in-gnu-emacs 136 (mh-do-in-gnu-emacs
134 (let* ((load-path (mh-image-load-path-for-library "mh-e" "mh-logo.xpm")) 137 (let* ((load-path (mh-image-load-path-for-library "mh-e" "mh-logo.xpm"))
135 (image-load-path (cons (car load-path) image-load-path))) 138 (image-load-path (cons (car load-path)
139 (when (boundp 'image-load-path)
140 image-load-path))))
136 (add-text-properties 141 (add-text-properties
137 0 2 142 0 2
138 `(display ,(or mh-logo-cache 143 `(display ,(or mh-logo-cache
diff --git a/lisp/mouse.el b/lisp/mouse.el
index 3a22fb49b04..c399515a3d2 100644
--- a/lisp/mouse.el
+++ b/lisp/mouse.el
@@ -538,19 +538,20 @@ resized by dragging their header-line."
538 (echo-keystrokes 0) 538 (echo-keystrokes 0)
539 (start-event-frame (window-frame (car (car (cdr start-event))))) 539 (start-event-frame (window-frame (car (car (cdr start-event)))))
540 (start-event-window (car (car (cdr start-event)))) 540 (start-event-window (car (car (cdr start-event))))
541 (start-nwindows (count-windows t))
542 event mouse x left right edges wconfig growth 541 event mouse x left right edges wconfig growth
543 (which-side 542 (which-side
544 (or (cdr (assq 'vertical-scroll-bars (frame-parameters start-event-frame))) 543 (or (cdr (assq 'vertical-scroll-bars (frame-parameters start-event-frame)))
545 'right))) 544 'right)))
546 (if (one-window-p t) 545 (cond
547 (error "Attempt to resize sole ordinary window")) 546 ((one-window-p t)
548 (if (eq which-side 'right) 547 (error "Attempt to resize sole ordinary window"))
549 (if (= (nth 2 (window-edges start-event-window)) 548 ((and (eq which-side 'right)
550 (frame-width start-event-frame)) 549 (>= (nth 2 (window-inside-edges start-event-window))
551 (error "Attempt to drag rightmost scrollbar")) 550 (frame-width start-event-frame)))
552 (if (= (nth 0 (window-edges start-event-window)) 0) 551 (error "Attempt to drag rightmost scrollbar"))
553 (error "Attempt to drag leftmost scrollbar"))) 552 ((and (eq which-side 'left)
553 (= (nth 0 (window-inside-edges start-event-window)) 0))
554 (error "Attempt to drag leftmost scrollbar")))
554 (track-mouse 555 (track-mouse
555 (progn 556 (progn
556 ;; enlarge-window only works on the selected window, so 557 ;; enlarge-window only works on the selected window, so
diff --git a/lisp/pgg-gpg.el b/lisp/pgg-gpg.el
index 0c9f45ab5b9..a9608b7f4f2 100644
--- a/lisp/pgg-gpg.el
+++ b/lisp/pgg-gpg.el
@@ -51,6 +51,13 @@
51 :type '(choice (const :tag "New `--recipient' option" "--recipient") 51 :type '(choice (const :tag "New `--recipient' option" "--recipient")
52 (const :tag "Old `--remote-user' option" "--remote-user"))) 52 (const :tag "Old `--remote-user' option" "--remote-user")))
53 53
54(defcustom pgg-gpg-use-agent (if (getenv "GPG_AGENT_INFO") t nil)
55 "Whether to use gnupg agent for key caching.
56By default, it will be enabled iff the environment variable
57\"GPG_AGENT_INFO\" is set."
58 :group 'pgg-gpg
59 :type 'boolean)
60
54(defvar pgg-gpg-user-id nil 61(defvar pgg-gpg-user-id nil
55 "GnuPG ID of your default identity.") 62 "GnuPG ID of your default identity.")
56 63
@@ -58,7 +65,8 @@
58 (let* ((output-file-name (pgg-make-temp-file "pgg-output")) 65 (let* ((output-file-name (pgg-make-temp-file "pgg-output"))
59 (args 66 (args
60 `("--status-fd" "2" 67 `("--status-fd" "2"
61 ,@(if passphrase '("--passphrase-fd" "0")) 68 ,@(if pgg-gpg-use-agent '("--use-agent")
69 (if passphrase '("--passphrase-fd" "0")))
62 "--yes" ; overwrite 70 "--yes" ; overwrite
63 "--output" ,output-file-name 71 "--output" ,output-file-name
64 ,@pgg-gpg-extra-args ,@args)) 72 ,@pgg-gpg-extra-args ,@args))
@@ -100,7 +108,8 @@
100 (set-default-file-modes orig-mode)))) 108 (set-default-file-modes orig-mode))))
101 109
102(defun pgg-gpg-possibly-cache-passphrase (passphrase &optional key notruncate) 110(defun pgg-gpg-possibly-cache-passphrase (passphrase &optional key notruncate)
103 (if (and pgg-cache-passphrase 111 (if (and passphrase
112 pgg-cache-passphrase
104 (progn 113 (progn
105 (goto-char (point-min)) 114 (goto-char (point-min))
106 (re-search-forward "^\\[GNUPG:] \\(GOOD_PASSPHRASE\\>\\)\\|\\(SIG_CREATED\\)" nil t))) 115 (re-search-forward "^\\[GNUPG:] \\(GOOD_PASSPHRASE\\>\\)\\|\\(SIG_CREATED\\)" nil t)))
@@ -154,24 +163,22 @@ Optional ALL non-nil means search all keys, including secret keys."
154 (let ((args (list "--with-colons" "--no-greeting" "--batch" 163 (let ((args (list "--with-colons" "--no-greeting" "--batch"
155 (if all "--list-secret-keys" "--list-keys") 164 (if all "--list-secret-keys" "--list-keys")
156 string)) 165 string))
157 (key-regexp (concat "^\\(sec\\|pub\\)" 166 (key-regexp (concat "^\\(sec\\|pub\\)"
158 ":[^:]*:[^:]*:[^:]*:\\([^:]*\\):[^:]*" 167 ":[^:]*:[^:]*:[^:]*:\\([^:]*\\):[^:]*"
159 ":[^:]*:[^:]*:[^:]*:\\([^:]*\\):")) 168 ":[^:]*:[^:]*:[^:]*:\\([^:]*\\):")))
160 )
161 (with-temp-buffer 169 (with-temp-buffer
162 (apply #'call-process pgg-gpg-program nil t nil args) 170 (apply #'call-process pgg-gpg-program nil t nil args)
163 (goto-char (point-min)) 171 (goto-char (point-min))
164 (if (re-search-forward key-regexp 172 (if (re-search-forward key-regexp
165 nil t) 173 nil t)
166 (match-string 3))))) 174 (match-string 3)))))
167 175
168(defun pgg-gpg-key-id-from-key-owner (key-owner) 176(defun pgg-gpg-key-id-from-key-owner (key-owner)
169 (cond ((not key-owner) nil) 177 (cond ((not key-owner) nil)
170 ;; Extract bare key id from outermost paired angle brackets, if any: 178 ;; Extract bare key id from outermost paired angle brackets, if any:
171 ((string-match "[^<]*<\\(.+\\)>[^>]*" key-owner) 179 ((string-match "[^<]*<\\(.+\\)>[^>]*" key-owner)
172 (substring key-owner (match-beginning 1)(match-end 1))) 180 (substring key-owner (match-beginning 1)(match-end 1)))
173 (key-owner)) 181 (key-owner)))
174 )
175 182
176(defun pgg-gpg-encrypt-region (start end recipients &optional sign passphrase) 183(defun pgg-gpg-encrypt-region (start end recipients &optional sign passphrase)
177 "Encrypt the current region between START and END. 184 "Encrypt the current region between START and END.
@@ -182,11 +189,11 @@ If optional PASSPHRASE is not specified, it will be obtained from the
182passphrase cache or user." 189passphrase cache or user."
183 (let* ((pgg-gpg-user-id (or pgg-gpg-user-id pgg-default-user-id)) 190 (let* ((pgg-gpg-user-id (or pgg-gpg-user-id pgg-default-user-id))
184 (passphrase (or passphrase 191 (passphrase (or passphrase
185 (when sign 192 (when (and sign (not pgg-gpg-use-agent))
186 (pgg-read-passphrase 193 (pgg-read-passphrase
187 (format "GnuPG passphrase for %s: " 194 (format "GnuPG passphrase for %s: "
188 pgg-gpg-user-id) 195 pgg-gpg-user-id)
189 pgg-gpg-user-id)))) 196 pgg-gpg-user-id))))
190 (args 197 (args
191 (append 198 (append
192 (list "--batch" "--armor" "--always-trust" "--encrypt") 199 (list "--batch" "--armor" "--always-trust" "--encrypt")
@@ -214,8 +221,9 @@ passphrase cache or user."
214If optional PASSPHRASE is not specified, it will be obtained from the 221If optional PASSPHRASE is not specified, it will be obtained from the
215passphrase cache or user." 222passphrase cache or user."
216 (let* ((passphrase (or passphrase 223 (let* ((passphrase (or passphrase
217 (pgg-read-passphrase 224 (when (not pgg-gpg-use-agent)
218 "GnuPG passphrase for symmetric encryption: "))) 225 (pgg-read-passphrase
226 "GnuPG passphrase for symmetric encryption: "))))
219 (args 227 (args
220 (append (list "--batch" "--armor" "--symmetric" ) 228 (append (list "--batch" "--armor" "--symmetric" )
221 (if pgg-text-mode (list "--textmode"))))) 229 (if pgg-text-mode (list "--textmode")))))
@@ -232,22 +240,23 @@ passphrase cache or user."
232 (insert-buffer-substring current-buffer) 240 (insert-buffer-substring current-buffer)
233 (pgg-decode-armor-region (point-min) (point-max)))) 241 (pgg-decode-armor-region (point-min) (point-max))))
234 (secret-keys (pgg-gpg-lookup-all-secret-keys)) 242 (secret-keys (pgg-gpg-lookup-all-secret-keys))
235 ;; XXX the user is stuck if they need to use the passphrase for 243 ;; XXX the user is stuck if they need to use the passphrase for
236 ;; any but the first secret key for which the message is 244 ;; any but the first secret key for which the message is
237 ;; encrypted. ideally, we would incrementally give them a 245 ;; encrypted. ideally, we would incrementally give them a
238 ;; chance with subsequent keys each time they fail with one. 246 ;; chance with subsequent keys each time they fail with one.
239 (key (pgg-gpg-select-matching-key message-keys secret-keys)) 247 (key (pgg-gpg-select-matching-key message-keys secret-keys))
240 (key-owner (and key (pgg-gpg-lookup-key-owner key t))) 248 (key-owner (and key (pgg-gpg-lookup-key-owner key t)))
241 (key-id (pgg-gpg-key-id-from-key-owner key-owner)) 249 (key-id (pgg-gpg-key-id-from-key-owner key-owner))
242 (pgg-gpg-user-id (or key-id key 250 (pgg-gpg-user-id (or key-id key
243 pgg-gpg-user-id pgg-default-user-id)) 251 pgg-gpg-user-id pgg-default-user-id))
244 (passphrase (or passphrase 252 (passphrase (or passphrase
245 (pgg-read-passphrase 253 (when (not pgg-gpg-use-agent)
246 (format (if (pgg-gpg-symmetric-key-p message-keys) 254 (pgg-read-passphrase
247 "Passphrase for symmetric decryption: " 255 (format (if (pgg-gpg-symmetric-key-p message-keys)
248 "GnuPG passphrase for %s: ") 256 "Passphrase for symmetric decryption: "
249 (or key-owner "??")) 257 "GnuPG passphrase for %s: ")
250 pgg-gpg-user-id))) 258 (or key-owner "??"))
259 pgg-gpg-user-id))))
251 (args '("--batch" "--decrypt"))) 260 (args '("--batch" "--decrypt")))
252 (pgg-gpg-process-region start end passphrase pgg-gpg-program args) 261 (pgg-gpg-process-region start end passphrase pgg-gpg-program args)
253 (with-current-buffer pgg-errors-buffer 262 (with-current-buffer pgg-errors-buffer
@@ -269,7 +278,7 @@ passphrase cache or user."
269 (loop for message-key in message-keys 278 (loop for message-key in message-keys
270 for message-key-id = (and (equal (car message-key) 1) 279 for message-key-id = (and (equal (car message-key) 1)
271 (cdr (assq 'key-identifier 280 (cdr (assq 'key-identifier
272 (cdr message-key)))) 281 (cdr message-key))))
273 for key = (and message-key-id (pgg-lookup-key message-key-id 'encrypt)) 282 for key = (and message-key-id (pgg-lookup-key message-key-id 'encrypt))
274 when (and key (member key secret-keys)) return key)) 283 when (and key (member key secret-keys)) return key))
275 284
@@ -277,9 +286,11 @@ passphrase cache or user."
277 "Make detached signature from text between START and END." 286 "Make detached signature from text between START and END."
278 (let* ((pgg-gpg-user-id (or pgg-gpg-user-id pgg-default-user-id)) 287 (let* ((pgg-gpg-user-id (or pgg-gpg-user-id pgg-default-user-id))
279 (passphrase (or passphrase 288 (passphrase (or passphrase
280 (pgg-read-passphrase 289 (when (not pgg-gpg-use-agent)
281 (format "GnuPG passphrase for %s: " pgg-gpg-user-id) 290 (pgg-read-passphrase
282 pgg-gpg-user-id))) 291 (format "GnuPG passphrase for %s: "
292 pgg-gpg-user-id)
293 pgg-gpg-user-id))))
283 (args 294 (args
284 (append (list (if cleartext "--clearsign" "--detach-sign") 295 (append (list (if cleartext "--clearsign" "--detach-sign")
285 "--armor" "--batch" "--verbose" 296 "--armor" "--batch" "--verbose"
diff --git a/lisp/progmodes/gdb-ui.el b/lisp/progmodes/gdb-ui.el
index db704985f2a..5b657b1555b 100644
--- a/lisp/progmodes/gdb-ui.el
+++ b/lisp/progmodes/gdb-ui.el
@@ -4,7 +4,7 @@
4;; Maintainer: FSF 4;; Maintainer: FSF
5;; Keywords: unix, tools 5;; Keywords: unix, tools
6 6
7;; Copyright (C) 2002, 2003, 2004, 2005, 2006 7;; Copyright (C) 2002, 2003, 2004, 2005, 2006
8;; Free Software Foundation, Inc. 8;; Free Software Foundation, Inc.
9 9
10;; This file is part of GNU Emacs. 10;; This file is part of GNU Emacs.
@@ -125,6 +125,7 @@ and #define directives otherwise.")
125(defvar gdb-buffer-fringe-width nil) 125(defvar gdb-buffer-fringe-width nil)
126(defvar gdb-signalled nil) 126(defvar gdb-signalled nil)
127(defvar gdb-source-window nil) 127(defvar gdb-source-window nil)
128(defvar gdb-inferior-status nil)
128 129
129(defvar gdb-buffer-type nil 130(defvar gdb-buffer-type nil
130 "One of the symbols bound in `gdb-buffer-rules'.") 131 "One of the symbols bound in `gdb-buffer-rules'.")
@@ -317,6 +318,16 @@ of the inferior. Non-nil means display the layout shown for
317 :group 'gud 318 :group 'gud
318 :version "22.1") 319 :version "22.1")
319 320
321(defun gdb-force-mode-line-update (status)
322 (let ((buffer gud-comint-buffer))
323 (if (and buffer (buffer-name buffer))
324 (with-current-buffer buffer
325 (setq mode-line-process
326 (format ":%s [%s]"
327 (process-status (get-buffer-process buffer)) status))
328 ;; Force mode line redisplay soon.
329 (force-mode-line-update)))))
330
320(defun gdb-many-windows (arg) 331(defun gdb-many-windows (arg)
321 "Toggle the number of windows in the basic arrangement. 332 "Toggle the number of windows in the basic arrangement.
322With arg, display additional buffers iff arg is positive." 333With arg, display additional buffers iff arg is positive."
@@ -524,7 +535,9 @@ With arg, use separate IO iff arg is positive."
524 gdb-buffer-fringe-width (car (window-fringes)) 535 gdb-buffer-fringe-width (car (window-fringes))
525 gdb-debug-ring nil 536 gdb-debug-ring nil
526 gdb-signalled nil 537 gdb-signalled nil
527 gdb-source-window nil) 538 gdb-source-window nil
539 gdb-inferior-status nil
540 gdb-continuation nil)
528 541
529 (setq gdb-buffer-type 'gdba) 542 (setq gdb-buffer-type 'gdba)
530 543
@@ -670,7 +683,8 @@ With arg, enter name of variable to be watched in the minibuffer."
670 (require 'tooltip) 683 (require 'tooltip)
671 (save-selected-window 684 (save-selected-window
672 (let ((expr (if arg 685 (let ((expr (if arg
673 (read-string "Name of variable: ") 686 (completing-read "Name of variable: "
687 'gud-gdb-complete-command)
674 (tooltip-identifier-from-point (point))))) 688 (tooltip-identifier-from-point (point)))))
675 (catch 'already-watched 689 (catch 'already-watched
676 (dolist (var gdb-var-list) 690 (dolist (var gdb-var-list)
@@ -1064,6 +1078,7 @@ The key should be one of the cars in `gdb-buffer-rules-assoc'."
1064;; 1078;;
1065;; These lists are consumed tail first. 1079;; These lists are consumed tail first.
1066;; 1080;;
1081(defvar gdb-continuation nil)
1067 1082
1068(defun gdb-send (proc string) 1083(defun gdb-send (proc string)
1069 "A comint send filter for gdb. 1084 "A comint send filter for gdb.
@@ -1071,12 +1086,15 @@ This filter may simply queue input for a later time."
1071 (with-current-buffer gud-comint-buffer 1086 (with-current-buffer gud-comint-buffer
1072 (let ((inhibit-read-only t)) 1087 (let ((inhibit-read-only t))
1073 (remove-text-properties (point-min) (point-max) '(face)))) 1088 (remove-text-properties (point-min) (point-max) '(face))))
1074 (let ((item (concat string "\n"))) 1089 (if (string-match "\\\\$" string)
1075 (if gud-running 1090 (setq gdb-continuation (concat gdb-continuation string "\n"))
1076 (progn 1091 (let ((item (concat gdb-continuation string "\n")))
1077 (if gdb-enable-debug (push (cons 'send item) gdb-debug-ring)) 1092 (if gud-running
1078 (process-send-string proc item)) 1093 (progn
1079 (gdb-enqueue-input item)))) 1094 (if gdb-enable-debug (push (cons 'send item) gdb-debug-ring))
1095 (process-send-string proc item))
1096 (gdb-enqueue-input item)))
1097 (setq gdb-continuation nil)))
1080 1098
1081;; Note: Stuff enqueued here will be sent to the next prompt, even if it 1099;; Note: Stuff enqueued here will be sent to the next prompt, even if it
1082;; is a query, or other non-top-level prompt. 1100;; is a query, or other non-top-level prompt.
@@ -1152,7 +1170,7 @@ This filter may simply queue input for a later time."
1152 ("starting" gdb-starting) 1170 ("starting" gdb-starting)
1153 ("exited" gdb-exited) 1171 ("exited" gdb-exited)
1154 ("signalled" gdb-signalled) 1172 ("signalled" gdb-signalled)
1155 ("signal" gdb-stopping) 1173 ("signal" gdb-signal)
1156 ("breakpoint" gdb-stopping) 1174 ("breakpoint" gdb-stopping)
1157 ("watchpoint" gdb-stopping) 1175 ("watchpoint" gdb-stopping)
1158 ("frame-begin" gdb-frame-begin) 1176 ("frame-begin" gdb-frame-begin)
@@ -1164,6 +1182,7 @@ This filter may simply queue input for a later time."
1164(defun gdb-resync() 1182(defun gdb-resync()
1165 (setq gdb-flush-pending-output t) 1183 (setq gdb-flush-pending-output t)
1166 (setq gud-running nil) 1184 (setq gud-running nil)
1185 (gdb-force-mode-line-update "stopped")
1167 (setq gdb-output-sink 'user) 1186 (setq gdb-output-sink 'user)
1168 (setq gdb-input-queue nil) 1187 (setq gdb-input-queue nil)
1169 (setq gdb-pending-triggers nil) 1188 (setq gdb-pending-triggers nil)
@@ -1238,6 +1257,8 @@ not GDB."
1238 ((eq sink 'user) 1257 ((eq sink 'user)
1239 (progn 1258 (progn
1240 (setq gud-running t) 1259 (setq gud-running t)
1260 (setq gdb-inferior-status "running")
1261 (gdb-force-mode-line-update gdb-inferior-status)
1241 (gdb-remove-text-properties) 1262 (gdb-remove-text-properties)
1242 (setq gud-overlay-arrow-position nil) 1263 (setq gud-overlay-arrow-position nil)
1243 (setq gdb-overlay-arrow-position nil) 1264 (setq gdb-overlay-arrow-position nil)
@@ -1247,6 +1268,11 @@ not GDB."
1247 (gdb-resync) 1268 (gdb-resync)
1248 (error "Unexpected `starting' annotation"))))) 1269 (error "Unexpected `starting' annotation")))))
1249 1270
1271(defun gdb-signal (ignored)
1272 (setq gdb-inferior-status "signal")
1273 (gdb-force-mode-line-update gdb-inferior-status)
1274 (gdb-stopping ignored))
1275
1250(defun gdb-stopping (ignored) 1276(defun gdb-stopping (ignored)
1251 "An annotation handler for `breakpoint' and other annotations. 1277 "An annotation handler for `breakpoint' and other annotations.
1252They say that I/O for the subprocess is now GDB, not the program 1278They say that I/O for the subprocess is now GDB, not the program
@@ -1269,6 +1295,8 @@ directives."
1269 (setq gdb-active-process nil) 1295 (setq gdb-active-process nil)
1270 (setq gud-overlay-arrow-position nil) 1296 (setq gud-overlay-arrow-position nil)
1271 (setq gdb-overlay-arrow-position nil) 1297 (setq gdb-overlay-arrow-position nil)
1298 (setq gdb-inferior-status "exited")
1299 (gdb-force-mode-line-update gdb-inferior-status)
1272 (gdb-stopping ignored)) 1300 (gdb-stopping ignored))
1273 1301
1274(defun gdb-signalled (ignored) 1302(defun gdb-signalled (ignored)
@@ -1290,6 +1318,11 @@ directives."
1290It is just like `gdb-stopping', except that if we already set the output 1318It is just like `gdb-stopping', except that if we already set the output
1291sink to `user' in `gdb-stopping', that is fine." 1319sink to `user' in `gdb-stopping', that is fine."
1292 (setq gud-running nil) 1320 (setq gud-running nil)
1321 (unless (or gud-overlay-arrow-position gud-last-frame)
1322 (gud-display-line (car gud-last-last-frame) (cdr gud-last-last-frame)))
1323 (unless (member gdb-inferior-status '("exited" "signal"))
1324 (setq gdb-inferior-status "stopped")
1325 (gdb-force-mode-line-update gdb-inferior-status))
1293 (let ((sink gdb-output-sink)) 1326 (let ((sink gdb-output-sink))
1294 (cond 1327 (cond
1295 ((eq sink 'inferior) 1328 ((eq sink 'inferior)
@@ -1628,10 +1661,13 @@ static char *magick[] = {
1628(defvar breakpoint-disabled-icon nil 1661(defvar breakpoint-disabled-icon nil
1629 "Icon for disabled breakpoint in display margin.") 1662 "Icon for disabled breakpoint in display margin.")
1630 1663
1631;; Bitmap for breakpoint in fringe
1632(and (display-images-p) 1664(and (display-images-p)
1665 ;; Bitmap for breakpoint in fringe
1633 (define-fringe-bitmap 'breakpoint 1666 (define-fringe-bitmap 'breakpoint
1634 "\x3c\x7e\xff\xff\xff\xff\x7e\x3c")) 1667 "\x3c\x7e\xff\xff\xff\xff\x7e\x3c")
1668 ;; Bitmap for gud-overlay-arrow in fringe
1669 (define-fringe-bitmap 'hollow-right-triangle
1670 "\xe0\x90\x88\x84\x84\x88\x90\xe0"))
1635 1671
1636(defface breakpoint-enabled 1672(defface breakpoint-enabled
1637 '((t 1673 '((t
@@ -1887,11 +1923,11 @@ static char *magick[] = {
1887 1923
1888(def-gdb-auto-updated-buffer gdb-stack-buffer 1924(def-gdb-auto-updated-buffer gdb-stack-buffer
1889 gdb-invalidate-frames 1925 gdb-invalidate-frames
1890 "server where\n" 1926 "server info stack\n"
1891 gdb-info-frames-handler 1927 gdb-info-stack-handler
1892 gdb-info-frames-custom) 1928 gdb-info-stack-custom)
1893 1929
1894(defun gdb-info-frames-custom () 1930(defun gdb-info-stack-custom ()
1895 (with-current-buffer (gdb-get-buffer 'gdb-stack-buffer) 1931 (with-current-buffer (gdb-get-buffer 'gdb-stack-buffer)
1896 (save-excursion 1932 (save-excursion
1897 (let ((buffer-read-only nil) 1933 (let ((buffer-read-only nil)
@@ -1952,7 +1988,7 @@ static char *magick[] = {
1952 map)) 1988 map))
1953 1989
1954(defun gdb-frames-mode () 1990(defun gdb-frames-mode ()
1955 "Major mode for gdb frames. 1991 "Major mode for gdb call stack.
1956 1992
1957\\{gdb-frames-mode-map}" 1993\\{gdb-frames-mode-map}"
1958 (kill-all-local-variables) 1994 (kill-all-local-variables)
@@ -2033,15 +2069,13 @@ static char *magick[] = {
2033 map)) 2069 map))
2034 2070
2035(defvar gdb-threads-font-lock-keywords 2071(defvar gdb-threads-font-lock-keywords
2036 '( 2072 '((") +\\([^ ]+\\) (" (1 font-lock-function-name-face))
2037 (") +\\([^ ]+\\) (" (1 font-lock-function-name-face))
2038 ("in \\([^ ]+\\) (" (1 font-lock-function-name-face)) 2073 ("in \\([^ ]+\\) (" (1 font-lock-function-name-face))
2039 ("\\(\\(\\sw\\|[_.]\\)+\\)=" (1 font-lock-variable-name-face)) 2074 ("\\(\\(\\sw\\|[_.]\\)+\\)=" (1 font-lock-variable-name-face)))
2040 )
2041 "Font lock keywords used in `gdb-threads-mode'.") 2075 "Font lock keywords used in `gdb-threads-mode'.")
2042 2076
2043(defun gdb-threads-mode () 2077(defun gdb-threads-mode ()
2044 "Major mode for gdb frames. 2078 "Major mode for gdb threads.
2045 2079
2046\\{gdb-threads-mode-map}" 2080\\{gdb-threads-mode-map}"
2047 (kill-all-local-variables) 2081 (kill-all-local-variables)
@@ -2101,7 +2135,7 @@ static char *magick[] = {
2101 (unless (string-equal (match-string 0) "The") 2135 (unless (string-equal (match-string 0) "The")
2102 (put-text-property start (match-end 0) 2136 (put-text-property start (match-end 0)
2103 'face font-lock-variable-name-face) 2137 'face font-lock-variable-name-face)
2104 (add-text-properties start end 2138 (add-text-properties start end
2105 '(help-echo "mouse-2: edit value" 2139 '(help-echo "mouse-2: edit value"
2106 mouse-face highlight)))) 2140 mouse-face highlight))))
2107 (forward-line 1)))))) 2141 (forward-line 1))))))
@@ -2754,6 +2788,7 @@ Kills the gdb buffers, and resets variables and the source buffers."
2754 (setq gdb-overlay-arrow-position nil)) 2788 (setq gdb-overlay-arrow-position nil))
2755 (setq overlay-arrow-variable-list 2789 (setq overlay-arrow-variable-list
2756 (delq 'gdb-overlay-arrow-position overlay-arrow-variable-list)) 2790 (delq 'gdb-overlay-arrow-position overlay-arrow-variable-list))
2791 (setq fringe-indicator-alist '((overlay-arrow . right-triangle)))
2757 (if (and (boundp 'speedbar-frame) (frame-live-p speedbar-frame)) 2792 (if (and (boundp 'speedbar-frame) (frame-live-p speedbar-frame))
2758 (speedbar-refresh)) 2793 (speedbar-refresh))
2759 (setq gud-running nil) 2794 (setq gud-running nil)
@@ -3079,6 +3114,17 @@ BUFFER nil or omitted means use the current buffer."
3079 (goto-char (point-min)) 3114 (goto-char (point-min))
3080 (if (re-search-forward "Stack level \\([0-9]+\\)" nil t) 3115 (if (re-search-forward "Stack level \\([0-9]+\\)" nil t)
3081 (setq gdb-frame-number (match-string 1))) 3116 (setq gdb-frame-number (match-string 1)))
3117 (if gud-overlay-arrow-position
3118 (let ((buffer (marker-buffer gud-overlay-arrow-position))
3119 (position (marker-position gud-overlay-arrow-position)))
3120 (when buffer
3121 (with-current-buffer buffer
3122 (setq fringe-indicator-alist
3123 (if (string-equal gdb-frame-number "0")
3124 nil
3125 '((overlay-arrow . hollow-right-triangle))))
3126 (setq gud-overlay-arrow-position (make-marker))
3127 (set-marker gud-overlay-arrow-position position)))))
3082 (goto-char (point-min)) 3128 (goto-char (point-min))
3083 (if (re-search-forward 3129 (if (re-search-forward
3084 ".*=\\s-+0x0*\\(\\S-*\\)\\s-+in\\s-+\\(\\S-*?\\);? " nil t) 3130 ".*=\\s-+0x0*\\(\\S-*\\)\\s-+in\\s-+\\(\\S-*?\\);? " nil t)
@@ -3123,7 +3169,7 @@ is set in them."
3123 (gdb-enqueue-input 3169 (gdb-enqueue-input
3124 (list 3170 (list
3125 (if (eq (buffer-local-value 'gud-minor-mode gud-comint-buffer) 'gdba) 3171 (if (eq (buffer-local-value 'gud-minor-mode gud-comint-buffer) 'gdba)
3126 (concat "server interpreter mi \"-var-list-children --all-values " 3172 (concat "server interpreter mi \"-var-list-children --all-values "
3127 varnum "\"\n") 3173 varnum "\"\n")
3128 (concat "-var-list-children --all-values " varnum "\n")) 3174 (concat "-var-list-children --all-values " varnum "\n"))
3129 `(lambda () (gdb-var-list-children-handler-1 ,varnum))))) 3175 `(lambda () (gdb-var-list-children-handler-1 ,varnum)))))
@@ -3252,7 +3298,7 @@ value=\\(\".*?\"\\),type=\"\\(.+?\\)\"}")
3252 (unless (string-equal (match-string 0) "No registers.") 3298 (unless (string-equal (match-string 0) "No registers.")
3253 (put-text-property start (match-end 0) 3299 (put-text-property start (match-end 0)
3254 'face font-lock-variable-name-face) 3300 'face font-lock-variable-name-face)
3255 (add-text-properties start end 3301 (add-text-properties start end
3256 '(help-echo "mouse-2: edit value" 3302 '(help-echo "mouse-2: edit value"
3257 mouse-face highlight)))) 3303 mouse-face highlight))))
3258 (forward-line 1)))))) 3304 (forward-line 1))))))
@@ -3334,7 +3380,7 @@ value=\\(\".*?\"\\),type=\"\\(.+?\\)\"}")
3334 help-echo "mouse-2: create watch expression" 3380 help-echo "mouse-2: create watch expression"
3335 local-map ,gdb-locals-watch-map-1) 3381 local-map ,gdb-locals-watch-map-1)
3336 name)) 3382 name))
3337 (insert 3383 (insert
3338 (concat name "\t" (nth 1 local) 3384 (concat name "\t" (nth 1 local)
3339 "\t" (nth 2 local) "\n"))) 3385 "\t" (nth 2 local) "\n")))
3340 (set-window-start window start) 3386 (set-window-start window start)
diff --git a/lisp/progmodes/grep.el b/lisp/progmodes/grep.el
index 0e151ce9be2..6afa3f29348 100644
--- a/lisp/progmodes/grep.el
+++ b/lisp/progmodes/grep.el
@@ -33,8 +33,6 @@
33 33
34(require 'compile) 34(require 'compile)
35 35
36(defvar font-lock-lines-before)
37
38 36
39(defgroup grep nil 37(defgroup grep nil
40 "Run compiler as inferior of Emacs, parse error messages." 38 "Run compiler as inferior of Emacs, parse error messages."
@@ -536,10 +534,7 @@ temporarily highlight in visited source lines."
536 grep-regexp-alist) 534 grep-regexp-alist)
537 (set (make-local-variable 'compilation-process-setup-function) 535 (set (make-local-variable 'compilation-process-setup-function)
538 'grep-process-setup) 536 'grep-process-setup)
539 (set (make-local-variable 'compilation-disable-input) t) 537 (set (make-local-variable 'compilation-disable-input) t))
540 ;; Set `font-lock-lines-before' to 0 to not refontify the previous
541 ;; line where grep markers may be already removed.
542 (set (make-local-variable 'font-lock-lines-before) 0))
543 538
544;;;###autoload 539;;;###autoload
545(defun grep-find (command-args) 540(defun grep-find (command-args)
diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el
index f98ee3540d8..7fa5a0b6dcc 100644
--- a/lisp/progmodes/gud.el
+++ b/lisp/progmodes/gud.el
@@ -740,14 +740,18 @@ To run GDB in text command mode, set `gud-gdb-command-name' to
740 740
741(defvar gud-comint-buffer nil) 741(defvar gud-comint-buffer nil)
742 742
743(defun gud-gdb-complete-command () 743(defun gud-gdb-complete-command (&optional command a b)
744 "Perform completion on the GDB command preceding point. 744 "Perform completion on the GDB command preceding point.
745This is implemented using the GDB `complete' command which isn't 745This is implemented using the GDB `complete' command which isn't
746available with older versions of GDB." 746available with older versions of GDB."
747 (interactive) 747 (interactive)
748 (let* ((end (point)) 748 (if command
749 (command (buffer-substring (comint-line-beginning-position) end)) 749 ;; Used by gud-watch in mini-buffer.
750 (command-word 750 (setq command (concat "p " command))
751 ;; Used in GUD buffer.
752 (let ((end (point)))
753 (setq command (buffer-substring (comint-line-beginning-position) end))))
754 (let* ((command-word
751 ;; Find the word break. This match will always succeed. 755 ;; Find the word break. This match will always succeed.
752 (and (string-match "\\(\\`\\| \\)\\([^ ]*\\)\\'" command) 756 (and (string-match "\\(\\`\\| \\)\\([^ ]*\\)\\'" command)
753 (substring command (match-beginning 2)))) 757 (substring command (match-beginning 2))))
@@ -866,13 +870,14 @@ It is passed through FILTER before we look at it."
866 870
867(defun gud-gdb-run-command-fetch-lines (command buffer &optional skip) 871(defun gud-gdb-run-command-fetch-lines (command buffer &optional skip)
868 "Run COMMAND, and return the list of lines it outputs. 872 "Run COMMAND, and return the list of lines it outputs.
869BUFFER is the GUD buffer in which to run the command. 873BUFFER is the current buffer which may be the GUD buffer in which to run.
870SKIP is the number of chars to skip on each lines, it defaults to 0." 874SKIP is the number of chars to skip on each lines, it defaults to 0."
871 (with-current-buffer buffer 875 (with-current-buffer gud-comint-buffer
872 (if (save-excursion 876 (if (and (eq gud-comint-buffer buffer)
873 (goto-char (point-max)) 877 (save-excursion
874 (forward-line 0) 878 (goto-char (point-max))
875 (not (looking-at comint-prompt-regexp))) 879 (forward-line 0)
880 (not (looking-at comint-prompt-regexp))))
876 nil 881 nil
877 ;; Much of this copied from GDB complete, but I'm grabbing the stack 882 ;; Much of this copied from GDB complete, but I'm grabbing the stack
878 ;; frame instead. 883 ;; frame instead.
@@ -881,12 +886,13 @@ SKIP is the number of chars to skip on each lines, it defaults to 0."
881 (gud-gdb-fetch-lines-string nil) 886 (gud-gdb-fetch-lines-string nil)
882 (gud-gdb-fetch-lines-break (or skip 0)) 887 (gud-gdb-fetch-lines-break (or skip 0))
883 (gud-marker-filter 888 (gud-marker-filter
884 `(lambda (string) (gud-gdb-fetch-lines-filter string ',gud-marker-filter)))) 889 `(lambda (string)
890 (gud-gdb-fetch-lines-filter string ',gud-marker-filter))))
885 ;; Issue the command to GDB. 891 ;; Issue the command to GDB.
886 (gud-basic-call command) 892 (gud-basic-call command)
887 ;; Slurp the output. 893 ;; Slurp the output.
888 (while gud-gdb-fetch-lines-in-progress 894 (while gud-gdb-fetch-lines-in-progress
889 (accept-process-output (get-buffer-process buffer))) 895 (accept-process-output (get-buffer-process gud-comint-buffer)))
890 (nreverse gud-gdb-fetched-lines))))) 896 (nreverse gud-gdb-fetched-lines)))))
891 897
892 898
@@ -3270,11 +3276,10 @@ Treats actions as defuns."
3270 (remove-hook 'tooltip-hook 'gud-tooltip-tips) 3276 (remove-hook 'tooltip-hook 'gud-tooltip-tips)
3271 (define-key global-map [mouse-movement] 'ignore))) 3277 (define-key global-map [mouse-movement] 'ignore)))
3272 (gud-tooltip-activate-mouse-motions-if-enabled) 3278 (gud-tooltip-activate-mouse-motions-if-enabled)
3273 (if (and 3279 (if (and gud-comint-buffer
3274 gud-comint-buffer 3280 (buffer-name gud-comint-buffer); gud-comint-buffer might be killed
3275 (buffer-name gud-comint-buffer); gud-comint-buffer might be killed 3281 (memq (buffer-local-value 'gud-minor-mode gud-comint-buffer)
3276 (with-current-buffer gud-comint-buffer 3282 '(gdbmi gdba)))
3277 (memq gud-minor-mode '(gdbmi gdba))))
3278 (if gud-tooltip-mode 3283 (if gud-tooltip-mode
3279 (progn 3284 (progn
3280 (dolist (buffer (buffer-list)) 3285 (dolist (buffer (buffer-list))
diff --git a/lisp/simple.el b/lisp/simple.el
index 9b232dee4cc..812c2d1fa2e 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -3188,6 +3188,9 @@ With a double \\[universal-argument] prefix argument, e.g. \\[universal-argument
3188\\[universal-argument] \\[set-mark-command], unconditionally 3188\\[universal-argument] \\[set-mark-command], unconditionally
3189set mark where point is. 3189set mark where point is.
3190 3190
3191Setting the mark also sets the \"region\", which is the closest
3192equivalent in Emacs to what some editors call the \"selection\".
3193
3191Novice Emacs Lisp programmers often try to use the mark for the wrong 3194Novice Emacs Lisp programmers often try to use the mark for the wrong
3192purposes. See the documentation of `set-mark' for more information." 3195purposes. See the documentation of `set-mark' for more information."
3193 (interactive "P") 3196 (interactive "P")
diff --git a/lisp/sort.el b/lisp/sort.el
index 5183bf65afa..c3d135f4c66 100644
--- a/lisp/sort.el
+++ b/lisp/sort.el
@@ -121,6 +121,9 @@ it defaults to `<', otherwise it defaults to `string<'."
121(defun sort-build-lists (nextrecfun endrecfun startkeyfun endkeyfun) 121(defun sort-build-lists (nextrecfun endrecfun startkeyfun endkeyfun)
122 (let ((sort-lists ()) 122 (let ((sort-lists ())
123 (start-rec nil) 123 (start-rec nil)
124 ;; To avoid such functins as `end-of-line' being affected by
125 ;; fields.
126 (inhibit-field-text-motion t)
124 done key) 127 done key)
125 ;; Loop over sort records. 128 ;; Loop over sort records.
126 ;(goto-char (point-min)) -- it is the caller's responsibility to 129 ;(goto-char (point-min)) -- it is the caller's responsibility to
diff --git a/lisp/term/w32-win.el b/lisp/term/w32-win.el
index 1b81ef362d2..3987ad66f6a 100644
--- a/lisp/term/w32-win.el
+++ b/lisp/term/w32-win.el
@@ -1198,11 +1198,15 @@ See the documentation of `create-fontset-from-fontset-spec for the format.")
1198(set-fontset-font nil (make-char 'japanese-jisx0208-1978) '("*" . "JISX0208-SJIS")) 1198(set-fontset-font nil (make-char 'japanese-jisx0208-1978) '("*" . "JISX0208-SJIS"))
1199 1199
1200(defun mouse-set-font (&rest fonts) 1200(defun mouse-set-font (&rest fonts)
1201 "Select a font. 1201 "Select an Emacs font from a list of known good fonts and fontsets.
1202
1202If `w32-use-w32-font-dialog' is non-nil (the default), use the Windows 1203If `w32-use-w32-font-dialog' is non-nil (the default), use the Windows
1203font dialog to get the matching FONTS. Otherwise use a pop-up menu 1204font dialog to display the list of possible fonts. Otherwise use a
1204\(like Emacs on other platforms) initialized with the fonts in 1205pop-up menu (like Emacs does on other platforms) initialized with
1205`w32-fixed-font-alist'." 1206the fonts in `w32-fixed-font-alist'.
1207If `w32-list-proportional-fonts' is non-nil, add proportional fonts
1208to the list in the font selection dialog (the fonts listed by the
1209pop-up menu are unaffected by `w32-list-proportional-fonts')."
1206 (interactive 1210 (interactive
1207 (if w32-use-w32-font-dialog 1211 (if w32-use-w32-font-dialog
1208 (let ((chosen-font (w32-select-font (selected-frame) 1212 (let ((chosen-font (w32-select-font (selected-frame)
diff --git a/lisp/textmodes/bibtex.el b/lisp/textmodes/bibtex.el
index f1e055594b7..daca0502454 100644
--- a/lisp/textmodes/bibtex.el
+++ b/lisp/textmodes/bibtex.el
@@ -88,6 +88,7 @@ If this is a function, call it to generate the initial field text."
88 (string :tag "Initial text") 88 (string :tag "Initial text")
89 (function :tag "Initialize Function" :value fun) 89 (function :tag "Initialize Function" :value fun)
90 (other :tag "Default" t))) 90 (other :tag "Default" t)))
91(put 'bibtex-include-OPTkey 'risky-local-variable t)
91 92
92(defcustom bibtex-user-optional-fields 93(defcustom bibtex-user-optional-fields
93 '(("annote" "Personal annotation (ignored)")) 94 '(("annote" "Personal annotation (ignored)"))
@@ -437,6 +438,7 @@ field or a function, which is called to determine the initial content
437of the field, and ALTERNATIVE-FLAG (either nil or t) marks if the 438of the field, and ALTERNATIVE-FLAG (either nil or t) marks if the
438field is an alternative. ALTERNATIVE-FLAG may be t only in the 439field is an alternative. ALTERNATIVE-FLAG may be t only in the
439REQUIRED or CROSSREF-REQUIRED lists.") 440REQUIRED or CROSSREF-REQUIRED lists.")
441(put 'bibtex-entry-field-alist 'risky-local-variable t)
440 442
441(defcustom bibtex-comment-start "@Comment" 443(defcustom bibtex-comment-start "@Comment"
442 "String starting a BibTeX comment." 444 "String starting a BibTeX comment."
@@ -595,7 +597,7 @@ See `bibtex-generate-autokey' for details."
595 :type '(repeat (cons (regexp :tag "Old") 597 :type '(repeat (cons (regexp :tag "Old")
596 (string :tag "New")))) 598 (string :tag "New"))))
597 599
598(defcustom bibtex-autokey-name-case-convert 'downcase 600(defcustom bibtex-autokey-name-case-convert-function 'downcase
599 "Function called for each name to perform case conversion. 601 "Function called for each name to perform case conversion.
600See `bibtex-generate-autokey' for details." 602See `bibtex-generate-autokey' for details."
601 :group 'bibtex-autokey 603 :group 'bibtex-autokey
@@ -604,6 +606,8 @@ See `bibtex-generate-autokey' for details."
604 (const :tag "Capitalize" capitalize) 606 (const :tag "Capitalize" capitalize)
605 (const :tag "Upcase" upcase) 607 (const :tag "Upcase" upcase)
606 (function :tag "Conversion function"))) 608 (function :tag "Conversion function")))
609(defvaralias 'bibtex-autokey-name-case-convert
610 'bibtex-autokey-name-case-convert-function)
607 611
608(defcustom bibtex-autokey-name-length 'infty 612(defcustom bibtex-autokey-name-length 'infty
609 "Number of characters from name to incorporate into key. 613 "Number of characters from name to incorporate into key.
@@ -666,7 +670,7 @@ See `bibtex-generate-autokey' for details."
666 :group 'bibtex-autokey 670 :group 'bibtex-autokey
667 :type '(repeat regexp)) 671 :type '(repeat regexp))
668 672
669(defcustom bibtex-autokey-titleword-case-convert 'downcase 673(defcustom bibtex-autokey-titleword-case-convert-function 'downcase
670 "Function called for each titleword to perform case conversion. 674 "Function called for each titleword to perform case conversion.
671See `bibtex-generate-autokey' for details." 675See `bibtex-generate-autokey' for details."
672 :group 'bibtex-autokey 676 :group 'bibtex-autokey
@@ -675,6 +679,8 @@ See `bibtex-generate-autokey' for details."
675 (const :tag "Capitalize" capitalize) 679 (const :tag "Capitalize" capitalize)
676 (const :tag "Upcase" upcase) 680 (const :tag "Upcase" upcase)
677 (function :tag "Conversion function"))) 681 (function :tag "Conversion function")))
682(defvaralias 'bibtex-autokey-titleword-case-convert
683 'bibtex-autokey-titleword-case-convert-function)
678 684
679(defcustom bibtex-autokey-titleword-abbrevs nil 685(defcustom bibtex-autokey-titleword-abbrevs nil
680 "Determines exceptions to the usual abbreviation mechanism. 686 "Determines exceptions to the usual abbreviation mechanism.
@@ -847,6 +853,7 @@ The following is a complex example, see http://link.aps.org/linkfaq.html.
847 (choice (string :tag "Replacement") 853 (choice (string :tag "Replacement")
848 (integer :tag "Sub-match") 854 (integer :tag "Sub-match")
849 (function :tag "Filter")))))))) 855 (function :tag "Filter"))))))))
856(put 'bibtex-generate-url-list 'risky-local-variable t)
850 857
851(defcustom bibtex-expand-strings nil 858(defcustom bibtex-expand-strings nil
852 "If non-nil, expand strings when extracting the content of a BibTeX field." 859 "If non-nil, expand strings when extracting the content of a BibTeX field."
@@ -1164,7 +1171,7 @@ The CDRs of the elements are t for header keys and nil for crossref keys.")
1164 (,(concat "^[ \t]*\\(" bibtex-field-name "\\)[ \t]*=") 1171 (,(concat "^[ \t]*\\(" bibtex-field-name "\\)[ \t]*=")
1165 1 font-lock-variable-name-face) 1172 1 font-lock-variable-name-face)
1166 ;; url 1173 ;; url
1167 bibtex-font-lock-url bibtex-font-lock-crossref) 1174 (bibtex-font-lock-url) (bibtex-font-lock-crossref))
1168 "*Default expressions to highlight in BibTeX mode.") 1175 "*Default expressions to highlight in BibTeX mode.")
1169 1176
1170(defvar bibtex-font-lock-url-regexp 1177(defvar bibtex-font-lock-url-regexp
@@ -2085,7 +2092,7 @@ and `bibtex-autokey-names-stretch'."
2085 ;; --> take the last token 2092 ;; --> take the last token
2086 (match-string 1 fullname)) 2093 (match-string 1 fullname))
2087 (t (error "Name `%s' is incorrectly formed" fullname))))) 2094 (t (error "Name `%s' is incorrectly formed" fullname)))))
2088 (funcall bibtex-autokey-name-case-convert 2095 (funcall bibtex-autokey-name-case-convert-function
2089 (bibtex-autokey-abbrev name bibtex-autokey-name-length)))) 2096 (bibtex-autokey-abbrev name bibtex-autokey-name-length))))
2090 2097
2091(defun bibtex-autokey-get-year () 2098(defun bibtex-autokey-get-year ()
@@ -2147,7 +2154,7 @@ and `bibtex-autokey-titleword-length'."
2147 (setq alist (cdr alist))) 2154 (setq alist (cdr alist)))
2148 (if alist 2155 (if alist
2149 (cdar alist) 2156 (cdar alist)
2150 (funcall bibtex-autokey-titleword-case-convert 2157 (funcall bibtex-autokey-titleword-case-convert-function
2151 (bibtex-autokey-abbrev titleword bibtex-autokey-titleword-length))))) 2158 (bibtex-autokey-abbrev titleword bibtex-autokey-titleword-length)))))
2152 2159
2153(defun bibtex-generate-autokey () 2160(defun bibtex-generate-autokey ()
@@ -2167,7 +2174,7 @@ The name part:
2167 take at least `bibtex-autokey-name-length' characters (truncate only 2174 take at least `bibtex-autokey-name-length' characters (truncate only
2168 after a consonant or at a word end). 2175 after a consonant or at a word end).
2169 5. Convert all last names using the function 2176 5. Convert all last names using the function
2170 `bibtex-autokey-name-case-convert'. 2177 `bibtex-autokey-name-case-convert-function'.
2171 6. Build the name part of the key by concatenating all abbreviated last 2178 6. Build the name part of the key by concatenating all abbreviated last
2172 names with the string `bibtex-autokey-name-separator' between any two. 2179 names with the string `bibtex-autokey-name-separator' between any two.
2173 If there are more names in the name field than names used in the name 2180 If there are more names in the name field than names used in the name
@@ -2199,7 +2206,7 @@ The title part
2199 `bibtex-autokey-titleword-length' characters (truncate only after 2206 `bibtex-autokey-titleword-length' characters (truncate only after
2200 a consonant or at a word end). 2207 a consonant or at a word end).
2201 5. Convert all title words using the function 2208 5. Convert all title words using the function
2202 `bibtex-autokey-titleword-case-convert'. 2209 `bibtex-autokey-titleword-case-convert-function'.
2203 6. Build the title part by concatenating all abbreviated title words with 2210 6. Build the title part by concatenating all abbreviated title words with
2204 the string `bibtex-autokey-titleword-separator' between any two. 2211 the string `bibtex-autokey-titleword-separator' between any two.
2205 2212
@@ -2531,7 +2538,7 @@ Use `bibtex-summary-function' to generate summary."
2531Used as default value of `bibtex-summary-function'." 2538Used as default value of `bibtex-summary-function'."
2532 ;; It would be neat to customize this function. How? 2539 ;; It would be neat to customize this function. How?
2533 (if (looking-at bibtex-entry-maybe-empty-head) 2540 (if (looking-at bibtex-entry-maybe-empty-head)
2534 (let* ((bibtex-autokey-name-case-convert 'identity) 2541 (let* ((bibtex-autokey-name-case-convert-function 'identity)
2535 (bibtex-autokey-name-length 'infty) 2542 (bibtex-autokey-name-length 'infty)
2536 (bibtex-autokey-names 1) 2543 (bibtex-autokey-names 1)
2537 (bibtex-autokey-names-stretch 0) 2544 (bibtex-autokey-names-stretch 0)
@@ -2542,7 +2549,7 @@ Used as default value of `bibtex-summary-function'."
2542 (year (bibtex-autokey-get-year)) 2549 (year (bibtex-autokey-get-year))
2543 (bibtex-autokey-titlewords 5) 2550 (bibtex-autokey-titlewords 5)
2544 (bibtex-autokey-titlewords-stretch 2) 2551 (bibtex-autokey-titlewords-stretch 2)
2545 (bibtex-autokey-titleword-case-convert 'identity) 2552 (bibtex-autokey-titleword-case-convert-function 'identity)
2546 (bibtex-autokey-titleword-length 5) 2553 (bibtex-autokey-titleword-length 5)
2547 (bibtex-autokey-titleword-separator " ") 2554 (bibtex-autokey-titleword-separator " ")
2548 (title (bibtex-autokey-get-title)) 2555 (title (bibtex-autokey-get-title))
@@ -2785,7 +2792,6 @@ if that value is non-nil.
2785 (list (list nil bibtex-entry-head bibtex-key-in-head)) 2792 (list (list nil bibtex-entry-head bibtex-key-in-head))
2786 imenu-case-fold-search t) 2793 imenu-case-fold-search t)
2787 (make-local-variable 'choose-completion-string-functions) 2794 (make-local-variable 'choose-completion-string-functions)
2788 (make-local-variable 'completion-ignore-case)
2789 ;; XEmacs needs easy-menu-add, Emacs does not care 2795 ;; XEmacs needs easy-menu-add, Emacs does not care
2790 (easy-menu-add bibtex-edit-menu) 2796 (easy-menu-add bibtex-edit-menu)
2791 (easy-menu-add bibtex-entry-menu) 2797 (easy-menu-add bibtex-entry-menu)
@@ -4155,9 +4161,9 @@ An error is signaled if point is outside key or BibTeX field."
4155 4161
4156 (cond ((eq compl 'key) 4162 (cond ((eq compl 'key)
4157 ;; key completion: no cleanup needed 4163 ;; key completion: no cleanup needed
4158 (setq choose-completion-string-functions nil 4164 (setq choose-completion-string-functions nil)
4159 completion-ignore-case nil) 4165 (let (completion-ignore-case)
4160 (bibtex-complete-internal (bibtex-global-key-alist))) 4166 (bibtex-complete-internal (bibtex-global-key-alist))))
4161 4167
4162 ((eq compl 'crossref-key) 4168 ((eq compl 'crossref-key)
4163 ;; crossref key completion 4169 ;; crossref key completion
@@ -4167,40 +4173,35 @@ An error is signaled if point is outside key or BibTeX field."
4167 ;; non-nil. Therefore, `choose-completion-string-functions' is 4173 ;; non-nil. Therefore, `choose-completion-string-functions' is
4168 ;; always set (either to non-nil or nil) when a new completion 4174 ;; always set (either to non-nil or nil) when a new completion
4169 ;; is requested. 4175 ;; is requested.
4170 ;; Also, `choose-completion-delete-max-match' requires 4176 (let (completion-ignore-case)
4171 ;; that we set `completion-ignore-case' (i.e., binding via `let' 4177 (setq choose-completion-string-functions
4172 ;; is not sufficient). 4178 (lambda (choice buffer mini-p base-size)
4173 (setq completion-ignore-case nil 4179 (setq choose-completion-string-functions nil)
4174 choose-completion-string-functions 4180 (choose-completion-string choice buffer base-size)
4175 (lambda (choice buffer mini-p base-size) 4181 (bibtex-complete-crossref-cleanup choice)
4176 (setq choose-completion-string-functions nil) 4182 t)) ; needed by choose-completion-string-functions
4177 (choose-completion-string choice buffer base-size) 4183 (bibtex-complete-crossref-cleanup
4178 (bibtex-complete-crossref-cleanup choice) 4184 (bibtex-complete-internal (bibtex-global-key-alist)))))
4179 t)) ; needed by choose-completion-string-functions
4180
4181 (bibtex-complete-crossref-cleanup (bibtex-complete-internal
4182 (bibtex-global-key-alist))))
4183 4185
4184 ((eq compl 'string) 4186 ((eq compl 'string)
4185 ;; string key completion: no cleanup needed 4187 ;; string key completion: no cleanup needed
4186 (setq choose-completion-string-functions nil 4188 (setq choose-completion-string-functions nil)
4187 completion-ignore-case t) 4189 (let ((completion-ignore-case t))
4188 (bibtex-complete-internal bibtex-strings)) 4190 (bibtex-complete-internal bibtex-strings)))
4189 4191
4190 (compl 4192 (compl
4191 ;; string completion 4193 ;; string completion
4192 (setq completion-ignore-case t 4194 (let ((completion-ignore-case t))
4193 choose-completion-string-functions 4195 (setq choose-completion-string-functions
4194 `(lambda (choice buffer mini-p base-size) 4196 `(lambda (choice buffer mini-p base-size)
4195 (setq choose-completion-string-functions nil) 4197 (setq choose-completion-string-functions nil)
4196 (choose-completion-string choice buffer base-size) 4198 (choose-completion-string choice buffer base-size)
4197 (bibtex-complete-string-cleanup choice ',compl) 4199 (bibtex-complete-string-cleanup choice ',compl)
4198 t)) ; needed by choose-completion-string-functions 4200 t)) ; needed by choose-completion-string-functions
4199 (bibtex-complete-string-cleanup (bibtex-complete-internal compl) 4201 (bibtex-complete-string-cleanup (bibtex-complete-internal compl)
4200 compl)) 4202 compl)))
4201 4203
4202 (t (setq choose-completion-string-functions nil 4204 (t (setq choose-completion-string-functions nil)
4203 completion-ignore-case nil) ; default
4204 (error "Point outside key or BibTeX field"))))) 4205 (error "Point outside key or BibTeX field")))))
4205 4206
4206(defun bibtex-Article () 4207(defun bibtex-Article ()
@@ -4334,16 +4335,16 @@ The URL is generated using the schemes defined in `bibtex-generate-url-list'
4334 (dolist (step scheme) 4335 (dolist (step scheme)
4335 (setq field (cdr (assoc-string (car step) fields-alist t))) 4336 (setq field (cdr (assoc-string (car step) fields-alist t)))
4336 (if (string-match (nth 1 step) field) 4337 (if (string-match (nth 1 step) field)
4337 (setq field (cond ((functionp (nth 2 step)) 4338 (push (cond ((functionp (nth 2 step))
4338 (funcall (nth 2 step) field)) 4339 (funcall (nth 2 step) field))
4339 ((numberp (nth 2 step)) 4340 ((numberp (nth 2 step))
4340 (match-string (nth 2 step) field)) 4341 (match-string (nth 2 step) field))
4341 (t 4342 (t
4342 (replace-match (nth 2 step) t nil field)))) 4343 (replace-match (nth 2 step) t nil field)))
4344 obj)
4343 ;; If the scheme is set up correctly, 4345 ;; If the scheme is set up correctly,
4344 ;; we should never reach this point 4346 ;; we should never reach this point
4345 (error "Match failed: %s" field)) 4347 (error "Match failed: %s" field)))
4346 (push field obj))
4347 (if fmt (apply 'format fmt (nreverse obj)) 4348 (if fmt (apply 'format fmt (nreverse obj))
4348 (apply 'concat (nreverse obj))))) 4349 (apply 'concat (nreverse obj)))))
4349 (browse-url (message "%s" url)))) 4350 (browse-url (message "%s" url))))
diff --git a/lisp/textmodes/ispell.el b/lisp/textmodes/ispell.el
index 1991a73e8e2..64314c772b2 100644
--- a/lisp/textmodes/ispell.el
+++ b/lisp/textmodes/ispell.el
@@ -1325,9 +1325,10 @@ The last occurring definition in the buffer will be used.")
1325 ("^%!PS-Adobe-[123].0" . "\n%%EOF\n") 1325 ("^%!PS-Adobe-[123].0" . "\n%%EOF\n")
1326 ("^---* \\(Start of \\)?[Ff]orwarded [Mm]essage" 1326 ("^---* \\(Start of \\)?[Ff]orwarded [Mm]essage"
1327 . "^---* End of [Ff]orwarded [Mm]essage") 1327 . "^---* End of [Ff]orwarded [Mm]essage")
1328 ;; Matches e-mail addresses, file names, http addresses, etc. The `-+' 1328 ;; Matches e-mail addresses, file names, http addresses, etc. The
1329 ;; pattern necessary for performance reasons when `-' part of word syntax. 1329 ;; `-+' `_+' patterns are necessary for performance reasons when
1330 ("\\(--+\\|\\(/\\w\\|\\(\\(\\w\\|[-_]\\)+[.:@]\\)\\)\\(\\w\\|[-_]\\)*\\([.:/@]+\\(\\w\\|[-_~=?&]\\)+\\)+\\)") 1330 ;; `-' or `_' part of word syntax.
1331 ("\\(--+\\|_+\\|\\(/\\w\\|\\(\\(\\w\\|[-_]\\)+[.:@]\\)\\)\\(\\w\\|[-_]\\)*\\([.:/@]+\\(\\w\\|[-_~=?&]\\)+\\)+\\)")
1331 ;; above checks /.\w sequences 1332 ;; above checks /.\w sequences
1332 ;;("\\(--+\\|\\(/\\|\\(\\(\\w\\|[-_]\\)+[.:@]\\)\\)\\(\\w\\|[-_]\\)*\\([.:/@]+\\(\\w\\|[-_~=?&]\\)+\\)+\\)") 1333 ;;("\\(--+\\|\\(/\\|\\(\\(\\w\\|[-_]\\)+[.:@]\\)\\)\\(\\w\\|[-_]\\)*\\([.:/@]+\\(\\w\\|[-_~=?&]\\)+\\)+\\)")
1333 ;; This is a pretty complex regexp. It can be simplified to the following: 1334 ;; This is a pretty complex regexp. It can be simplified to the following:
diff --git a/lisp/textmodes/org.el b/lisp/textmodes/org.el
index 3c77560a9cc..ad4744adf15 100644
--- a/lisp/textmodes/org.el
+++ b/lisp/textmodes/org.el
@@ -5,7 +5,7 @@
5;; Author: Carsten Dominik <dominik at science dot uva dot nl> 5;; Author: Carsten Dominik <dominik at science dot uva dot nl>
6;; Keywords: outlines, hypermedia, calendar, wp 6;; Keywords: outlines, hypermedia, calendar, wp
7;; Homepage: http://www.astro.uva.nl/~dominik/Tools/org/ 7;; Homepage: http://www.astro.uva.nl/~dominik/Tools/org/
8;; Version: 4.09 8;; Version: 4.10
9;; 9;;
10;; This file is part of GNU Emacs. 10;; This file is part of GNU Emacs.
11;; 11;;
@@ -81,6 +81,9 @@
81;; 81;;
82;; Changes since version 4.00: 82;; Changes since version 4.00:
83;; --------------------------- 83;; ---------------------------
84;; Version 4.10
85;; - Bug fixes.
86;;
84;; Version 4.09 87;; Version 4.09
85;; - Bug fixes. 88;; - Bug fixes.
86;; - Small improvements to font-lock support. 89;; - Small improvements to font-lock support.
@@ -145,7 +148,7 @@
145 148
146;;; Customization variables 149;;; Customization variables
147 150
148(defvar org-version "4.09" 151(defvar org-version "4.10"
149 "The version number of the file org.el.") 152 "The version number of the file org.el.")
150(defun org-version () 153(defun org-version ()
151 (interactive) 154 (interactive)
@@ -445,7 +448,7 @@ In the calendar, the date can be selected with mouse-1. However, the
445minibuffer will also be active, and you can simply enter the date as well. 448minibuffer will also be active, and you can simply enter the date as well.
446When nil, only the minibuffer will be available." 449When nil, only the minibuffer will be available."
447 :group 'org-time 450 :group 'org-time
448 :type 'number) 451 :type 'boolean)
449 452
450(defcustom org-calendar-follow-timestamp-change t 453(defcustom org-calendar-follow-timestamp-change t
451 "Non-nil means, make the calendar window follow timestamp changes. 454 "Non-nil means, make the calendar window follow timestamp changes.
@@ -1739,7 +1742,8 @@ Changing this variable requires a restart of Emacs to take effect."
1739 :type 'boolean) 1742 :type 'boolean)
1740 1743
1741(defface org-hide 1744(defface org-hide
1742 '((((type tty) (class color)) (:foreground "blue" :weight bold)) 1745 '(
1746 (((type tty) (class color)) (:foreground "white"))
1743 (((class color) (background light)) (:foreground "white")) 1747 (((class color) (background light)) (:foreground "white"))
1744 (((class color) (background dark)) (:foreground "black")) 1748 (((class color) (background dark)) (:foreground "black"))
1745; (((class color) (background light)) (:foreground "grey90")) 1749; (((class color) (background light)) (:foreground "grey90"))
@@ -2589,6 +2593,7 @@ Optional argument N means, put the headline into the Nth line of the window."
2589(define-key org-goto-map [(?q)] 'org-goto-quit) 2593(define-key org-goto-map [(?q)] 'org-goto-quit)
2590(define-key org-goto-map [(control ?g)] 'org-goto-quit) 2594(define-key org-goto-map [(control ?g)] 'org-goto-quit)
2591(define-key org-goto-map "\C-i" 'org-cycle) 2595(define-key org-goto-map "\C-i" 'org-cycle)
2596(define-key org-goto-map [(tab)] 'org-cycle)
2592(define-key org-goto-map [(down)] 'outline-next-visible-heading) 2597(define-key org-goto-map [(down)] 'outline-next-visible-heading)
2593(define-key org-goto-map [(up)] 'outline-previous-visible-heading) 2598(define-key org-goto-map [(up)] 'outline-previous-visible-heading)
2594(define-key org-goto-map "n" 'outline-next-visible-heading) 2599(define-key org-goto-map "n" 'outline-next-visible-heading)
@@ -4001,8 +4006,8 @@ used to insert the time stamp into the buffer to include the time."
4001 month (string-to-number (match-string 3 ans)) 4006 month (string-to-number (match-string 3 ans))
4002 day (string-to-number (match-string 4 ans))) 4007 day (string-to-number (match-string 4 ans)))
4003 (if (< year 100) (setq year (+ 2000 year))) 4008 (if (< year 100) (setq year (+ 2000 year)))
4004 (setq ans (replace-match (format "%04d-%02d-%02d" year month day) 4009 (setq ans (replace-match (format "%04d-%02d-%02d\\5" year month day)
4005 t t ans)))) 4010 t nil ans))))
4006 (setq tl (parse-time-string ans) 4011 (setq tl (parse-time-string ans)
4007 year (or (nth 5 tl) (string-to-number (format-time-string "%Y"))) 4012 year (or (nth 5 tl) (string-to-number (format-time-string "%Y")))
4008 month (or (nth 4 tl) (string-to-number (format-time-string "%m"))) 4013 month (or (nth 4 tl) (string-to-number (format-time-string "%m")))
@@ -4377,6 +4382,7 @@ The following commands are available:
4377 (list 'org-agenda-mode-hook))) 4382 (list 'org-agenda-mode-hook)))
4378 4383
4379(define-key org-agenda-mode-map "\C-i" 'org-agenda-goto) 4384(define-key org-agenda-mode-map "\C-i" 'org-agenda-goto)
4385(define-key org-agenda-mode-map [(tab)] 'org-agenda-goto)
4380(define-key org-agenda-mode-map "\C-m" 'org-agenda-switch-to) 4386(define-key org-agenda-mode-map "\C-m" 'org-agenda-switch-to)
4381(define-key org-agenda-mode-map " " 'org-agenda-show) 4387(define-key org-agenda-mode-map " " 'org-agenda-show)
4382(define-key org-agenda-mode-map "\C-c\C-t" 'org-agenda-todo) 4388(define-key org-agenda-mode-map "\C-c\C-t" 'org-agenda-todo)
@@ -6827,8 +6833,8 @@ optional argument IN-EMACS is non-nil, Emacs will visit the file."
6827 (while (string-match " *\n *" link) 6833 (while (string-match " *\n *" link)
6828 (setq link (replace-match " " t t link))) 6834 (setq link (replace-match " " t t link)))
6829 (if (string-match org-link-regexp link) 6835 (if (string-match org-link-regexp link)
6830 (setq type (match-string 1) 6836 (setq type (match-string 1 link)
6831 path (match-string 2)) 6837 path (match-string 2 link))
6832 (setq type "thisfile" 6838 (setq type "thisfile"
6833 path link)) 6839 path link))
6834 (throw 'match t))) 6840 (throw 'match t)))
@@ -6887,6 +6893,10 @@ optional argument IN-EMACS is non-nil, Emacs will visit the file."
6887 6893
6888 (cond 6894 (cond
6889 6895
6896 ((member type '("http" "https" "ftp" "mailto" "news"))
6897 ;; give these to some browser
6898 (browse-url (concat type ":" path)))
6899
6890 ((string= type "tags") 6900 ((string= type "tags")
6891 (org-tags-view in-emacs path)) 6901 (org-tags-view in-emacs path))
6892 ((or (string= type "camel") 6902 ((or (string= type "camel")
@@ -10801,11 +10811,11 @@ underlined headlines. The default is 3."
10801 10811
10802(defun org-insert-centered (s &optional underline) 10812(defun org-insert-centered (s &optional underline)
10803 "Insert the string S centered and underline it with character UNDERLINE." 10813 "Insert the string S centered and underline it with character UNDERLINE."
10804 (let ((ind (max (/ (- 80 (length s)) 2) 0))) 10814 (let ((ind (max (/ (- 80 (string-width s)) 2) 0)))
10805 (insert (make-string ind ?\ ) s "\n") 10815 (insert (make-string ind ?\ ) s "\n")
10806 (if underline 10816 (if underline
10807 (insert (make-string ind ?\ ) 10817 (insert (make-string ind ?\ )
10808 (make-string (length s) underline) 10818 (make-string (string-width s) underline)
10809 "\n")))) 10819 "\n"))))
10810 10820
10811(defun org-ascii-level-start (level title umax) 10821(defun org-ascii-level-start (level title umax)
@@ -11915,6 +11925,7 @@ a time), or the day by one (if it does not contain a time)."
11915 11925
11916;; TAB key with modifiers 11926;; TAB key with modifiers
11917(define-key org-mode-map "\C-i" 'org-cycle) 11927(define-key org-mode-map "\C-i" 'org-cycle)
11928(define-key org-mode-map [(tab)] 'org-cycle)
11918(define-key org-mode-map [(meta tab)] 'org-complete) 11929(define-key org-mode-map [(meta tab)] 'org-complete)
11919(define-key org-mode-map "\M-\C-i" 'org-complete) ; for tty emacs 11930(define-key org-mode-map "\M-\C-i" 'org-complete) ; for tty emacs
11920;; The following line is necessary under Suse GNU/Linux 11931;; The following line is necessary under Suse GNU/Linux
@@ -12925,4 +12936,3 @@ Show the heading too, if it is currently invisible."
12925 12936
12926;; arch-tag: e77da1a7-acc7-4336-b19e-efa25af3f9fd 12937;; arch-tag: e77da1a7-acc7-4336-b19e-efa25af3f9fd
12927;;; org.el ends here 12938;;; org.el ends here
12928
diff --git a/lispref/ChangeLog b/lispref/ChangeLog
index 9d07a2d59c8..8438af1698a 100644
--- a/lispref/ChangeLog
+++ b/lispref/ChangeLog
@@ -1,3 +1,38 @@
12006-03-21 Nick Roberts <nickrob@snap.net.nz>
2
3 * display.texi (Fringe Indicators): Fix typos.
4
52006-03-19 Luc Teirlinck <teirllm@auburn.edu>
6
7 * tips.texi (Documentation Tips): One can now also write `program'
8 in front of a quoted symbol in a docstring to prevent making a
9 hyperlink.
10
112006-03-19 Alan Mackenzie <acm@muc.de>
12
13 * text.texi (Special Properties): Clarify the definition of
14 'fontified.
15
162006-03-16 Richard Stallman <rms@gnu.org>
17
18 * display.texi (Defining Images): Minor cleanup.
19
202006-03-16 Bill Wohler <wohler@newt.com>
21
22 * display.texi (Defining Images): In image-load-path-for-library,
23 prefer user's images.
24
252006-03-15 Stefan Monnier <monnier@iro.umontreal.ca>
26
27 * modes.texi (Region to Fontify): Remove font-lock-lines-before.
28
292006-03-15 Bill Wohler <wohler@newt.com>
30
31 * display.texi (Defining Images): Fix example in
32 image-load-path-for-library by not recommending that one binds
33 image-load-path. Just defvar it to placate compiler and only use
34 it if previously defined.
35
12006-03-14 Bill Wohler <wohler@newt.com> 362006-03-14 Bill Wohler <wohler@newt.com>
2 37
3 * display.texi (Defining Images): In image-load-path-for-library, 38 * display.texi (Defining Images): In image-load-path-for-library,
@@ -7,7 +42,7 @@
7 42
8 * modes.texi: New node, "Region to Fontify" (for Font Lock). 43 * modes.texi: New node, "Region to Fontify" (for Font Lock).
9 This describes font-lock-extend-region-function. 44 This describes font-lock-extend-region-function.
10 ("Other Font Lock Variables"): move "font-lock-lines-before" to 45 ("Other Font Lock Variables"): Move "font-lock-lines-before" to
11 the new node "Region to Fontify". 46 the new node "Region to Fontify".
12 47
132006-03-13 Richard Stallman <rms@gnu.org> 482006-03-13 Richard Stallman <rms@gnu.org>
@@ -104,9 +139,9 @@
104 139
1052006-02-16 Johan Bockg,Ae(Brd <bojohan@dd.chalmers.se> 1402006-02-16 Johan Bockg,Ae(Brd <bojohan@dd.chalmers.se>
106 141
107 * display.texi (Other Display Specs, Image Descriptors): Revert 142 * display.texi (Other Display Specs, Image Descriptors):
108 erroneous changes. The previous description of image-descriptors 143 Revert erroneous changes. The previous description of
109 as `(image . PROPS)' was correct. 144 image-descriptors as `(image . PROPS)' was correct.
110 145
1112006-02-14 Richard M. Stallman <rms@gnu.org> 1462006-02-14 Richard M. Stallman <rms@gnu.org>
112 147
@@ -157,8 +192,8 @@
157 192
1582006-01-29 Chong Yidong <cyd@stupidchicken.com> 1932006-01-29 Chong Yidong <cyd@stupidchicken.com>
159 194
160 * display.texi (Other Display Specs, Image Descriptors): Image 195 * display.texi (Other Display Specs, Image Descriptors):
161 description is a list, not a cons cell. 196 Image description is a list, not a cons cell.
162 197
1632006-01-28 Luc Teirlinck <teirllm@auburn.edu> 1982006-01-28 Luc Teirlinck <teirllm@auburn.edu>
164 199
diff --git a/lispref/display.texi b/lispref/display.texi
index 294a6d64e7e..d9b5a9e5f0b 100644
--- a/lispref/display.texi
+++ b/lispref/display.texi
@@ -2876,12 +2876,12 @@ used in both left and right fringes.
2876When @code{fringe-indicator-alist} has a buffer-local value, and there 2876When @code{fringe-indicator-alist} has a buffer-local value, and there
2877is no bitmap defined for a logical indicator, or the bitmap is 2877is no bitmap defined for a logical indicator, or the bitmap is
2878@code{t}, the corresponding value from the (non-local) 2878@code{t}, the corresponding value from the (non-local)
2879@code{default-fringes-indicator-alist} is used. 2879@code{default-fringe-indicator-alist} is used.
2880 2880
2881To completely hide a specific indicator, set the bitmap to @code{nil}. 2881To completely hide a specific indicator, set the bitmap to @code{nil}.
2882@end defvar 2882@end defvar
2883 2883
2884@defvar default-fringes-indicator-alist 2884@defvar default-fringe-indicator-alist
2885The value of this variable is the default value for 2885The value of this variable is the default value for
2886@code{fringe-indicator-alist} in buffers that do not override it. 2886@code{fringe-indicator-alist} in buffers that do not override it.
2887@end defvar 2887@end defvar
@@ -2891,7 +2891,7 @@ The value of this variable is the default value for
2891@code{left-arrow}, @code{right-arrow}, @code{up-arrow}, @code{down-arrow}, 2891@code{left-arrow}, @code{right-arrow}, @code{up-arrow}, @code{down-arrow},
2892@code{left-curly-arrow}, @code{right-curly-arrow}, 2892@code{left-curly-arrow}, @code{right-curly-arrow},
2893@code{left-triangle}, @code{right-triangle}, 2893@code{left-triangle}, @code{right-triangle},
2894@code{top-left-angle}, @code{ top-right-angle}, 2894@code{top-left-angle}, @code{top-right-angle},
2895@code{bottom-left-angle}, @code{bottom-right-angle}, 2895@code{bottom-left-angle}, @code{bottom-right-angle},
2896@code{left-bracket}, @code{right-bracket}, 2896@code{left-bracket}, @code{right-bracket},
2897@code{filled-rectangle}, @code{hollow-rectangle}, 2897@code{filled-rectangle}, @code{hollow-rectangle},
@@ -4127,13 +4127,14 @@ should specify the image as follows:
4127 4127
4128@defun image-load-path-for-library library image &optional path no-error 4128@defun image-load-path-for-library library image &optional path no-error
4129@tindex image-load-path-for-library 4129@tindex image-load-path-for-library
4130This function returns a suitable search path for images relative to 4130This function returns a suitable search path for images used by the
4131@var{library}. 4131Lisp package @var{library}.
4132 4132
4133First it searches for @var{image} in a path suitable for 4133It searches for @var{image} in @code{image-load-path} (excluding
4134@var{library}, which includes @file{../../etc/images} and 4134@file{@code{data-directory}/images}) and @code{load-path}, followed by
4135@file{../etc/images} relative to the library file itself, followed by 4135a path suitable for @var{library}, which includes
4136@code{image-load-path} and @code{load-path}. 4136@file{../../etc/images} and @file{../etc/images} relative to the
4137library file itself, and then in @file{@code{data-directory}/images}.
4137 4138
4138Then this function returns a list of directories which contains first 4139Then this function returns a list of directories which contains first
4139the directory in which @var{image} was found, followed by the value of 4140the directory in which @var{image} was found, followed by the value of
@@ -4148,11 +4149,13 @@ Here is an example that uses a common idiom to provide compatibility
4148with versions of Emacs that lack the variable @code{image-load-path}: 4149with versions of Emacs that lack the variable @code{image-load-path}:
4149 4150
4150@example 4151@example
4151;; Avoid errors on Emacsen without `image-load-path'. 4152;; Shush compiler.
4152(if (not (boundp 'image-load-path)) (defvar image-load-path nil)) 4153(defvar image-load-path)
4153 4154
4154(let* ((load-path (image-load-path-for-library "mh-e" "mh-logo.xpm")) 4155(let* ((load-path (image-load-path-for-library "mh-e" "mh-logo.xpm"))
4155 (image-load-path (cons (car load-path) image-load-path))) 4156 (image-load-path (cons (car load-path)
4157 (when (boundp 'image-load-path)
4158 image-load-path))))
4156 (mh-tool-bar-folder-buttons-init)) 4159 (mh-tool-bar-folder-buttons-init))
4157@end example 4160@end example
4158@end defun 4161@end defun
diff --git a/lispref/modes.texi b/lispref/modes.texi
index e15392ac85a..fc1953d24d9 100644
--- a/lispref/modes.texi
+++ b/lispref/modes.texi
@@ -2731,16 +2731,6 @@ on an earlier line.
2731You can enlarge (or even reduce) the region to fontify by setting either 2731You can enlarge (or even reduce) the region to fontify by setting either
2732of the following variables: 2732of the following variables:
2733 2733
2734@defvar font-lock-lines-before
2735This variable specifies the number of extra lines to consider when
2736refontifying the buffer after each text change. Font lock begins
2737refontifying from that number of lines before the changed region. The
2738default is 0, but using a larger value can be useful for coping with
2739multi-line patterns. This variable is ignored whenever
2740@code{font-lock-extend-region-function} is set and returns a
2741non-@code{nil} value.
2742@end defvar
2743
2744@defvar font-lock-extend-region-function 2734@defvar font-lock-extend-region-function
2745This buffer-local variable is either @code{nil} or is a function that 2735This buffer-local variable is either @code{nil} or is a function that
2746determines the region to fontify, which Emacs then calls after each 2736determines the region to fontify, which Emacs then calls after each
diff --git a/lispref/text.texi b/lispref/text.texi
index c68a55bedc7..3a0d4f7a585 100644
--- a/lispref/text.texi
+++ b/lispref/text.texi
@@ -2994,9 +2994,25 @@ that all text between the character and where the mouse is have the same
2994 2994
2995@item fontified 2995@item fontified
2996@kindex fontified @r{(text property)} 2996@kindex fontified @r{(text property)}
2997This property, if non-@code{nil}, says that text in the buffer has 2997This property says whether the text has had faces assigned to it by
2998had faces assigned automatically by a feature such as Font-Lock mode. 2998font locking. The display engine tests it to decide whether a buffer
2999@xref{Auto Faces}. 2999portion needs refontifying before display. @xref{Auto Faces}. It
3000takes one of these three values---other values are invalid:
3001
3002@table @asis
3003@item @code{nil}
3004Font locking is disabled, or the @code{face} properties on the text,
3005if any, are invalid.
3006
3007@item The symbol @code{defer}
3008This value states that the text's @code{face} properties are invalid
3009and marks it for deferred fontification. It is used only when ``just
3010in time'' font locking is enabled.
3011
3012@item @code{t}
3013The @code{face} properties, or lack of them, on the text are currently
3014valid.
3015@end table
3000 3016
3001@item display 3017@item display
3002@kindex display @r{(text property)} 3018@kindex display @r{(text property)}
diff --git a/lispref/tips.texi b/lispref/tips.texi
index 07689b4c9a4..8b033139275 100644
--- a/lispref/tips.texi
+++ b/lispref/tips.texi
@@ -741,8 +741,8 @@ then the hyperlink will refer only to the variable documentation of
741 741
742If a symbol has a function definition and/or a variable definition, but 742If a symbol has a function definition and/or a variable definition, but
743those are irrelevant to the use of the symbol that you are documenting, 743those are irrelevant to the use of the symbol that you are documenting,
744you can write the word @samp{symbol} before the symbol name to prevent 744you can write the words @samp{symbol} or @samp{program} before the
745making any hyperlink. For example, 745symbol name to prevent making any hyperlink. For example,
746 746
747@example 747@example
748If the argument KIND-OF-RESULT is the symbol `list', 748If the argument KIND-OF-RESULT is the symbol `list',
diff --git a/man/ChangeLog b/man/ChangeLog
index 7eddcae6b5e..3628ec610c3 100644
--- a/man/ChangeLog
+++ b/man/ChangeLog
@@ -1,12 +1,78 @@
12006-03-21 Bill Wohler <wohler@newt.com>
2
3 * mh-e.texi (Folders): Various edits.
4
52006-03-20 Romain Francoise <romain@orebokech.com>
6
7 * gnus.texi (Mail Folders): Grammar fix.
8
92006-03-21 Juanma Barranquero <lekktu@gmail.com>
10
11 * files.texi (VC Dired Mode): Remove misplaced brackets.
12
132006-03-21 Andre Spiegel <spiegel@gnu.org>
14
15 * files.texi: Various updates and clarifications in the VC
16 chapter.
17
182006-03-19 Luc Teirlinck <teirllm@auburn.edu>
19
20 * help.texi (Help Mode): Document "C-c C-c".
21
222006-03-19 Bill Wohler <wohler@newt.com>
23
24 * mh-e.texi (Replying): Document Mail-Followup-To. Change
25 manually-formatted table to multitable. Add debugging info.
26 Move description of mh-reply-default-reply-to into paragraph
27 that describes its values.
28
292006-03-17 Bill Wohler <wohler@newt.com>
30
31 * mh-e.texi: Use smallexample and smalllisp consistenly.
32 (Sending Mail Tour): Update method of entering
33 addresses and subject.
34 (Sending Mail Tour, Reading Mail Tour, Processing Mail Tour)
35 (Adding Attachments, Searching): Update screenshots for Emacs 22.
36
372006-03-16 Luc Teirlinck <teirllm@auburn.edu>
38
39 * emacs-xtra.texi (Top): Avoid ugly continuation line in
40 menu in the standalone Info reader.
41
422006-03-15 Chong Yidong <cyd@stupidchicken.com>
43
44 * emacs-xtra.texi (Emerge, Picture Mode. Fortran): New chapters,
45 moved here from Emacs manual.
46
47 * programs.texi (Fortran): Section moved to emacs-xtra.
48 (Program Modes): Xref to Fortran in emacs-xtra.
49
50 * maintaining.texi (Emerge): Moved to emacs-xtra.
51 * files.texi (Comparing Files): Xref to Emerge in emacs-xtra.
52
53 * picture.texi: File deleted.
54 * Makefile.in:
55 * makefile.w32-in: Remove picture.texi.
56
57 * text.texi (Text): Xref to Picture Mode in emacs-xtra.
58 * abbrevs.texi (Abbrevs):
59 * sending.texi (Sending Mail): Picture node removed.
60
61 * emacs.texi (Top): Update node listings.
62
632006-03-15 Carsten Dominik <dominik@science.uva.nl>
64
65 * org.texi: Version number change only.
66
12006-03-14 Bill Wohler <wohler@newt.com> 672006-03-14 Bill Wohler <wohler@newt.com>
2 68
3 * mh-e.texi: Add index entries around each paragraph rather than 69 * mh-e.texi: Add index entries around each paragraph rather than
4 depend on entries from beginning of node. Doing so ensures that 70 depend on entries from beginning of node. Doing so ensures that
5 index entries are less likely to be forgotten if text is cut and 71 index entries are less likely to be forgotten if text is cut and
6 pasted, and are necessary anyway if the references are on a 72 pasted, and are necessary anyway if the references are on a
7 separate page. It seems that makeinfo is now (v. 4.8) only 73 separate page. It seems that makeinfo is now (v. 4.8) only
8 producing one index entry per node, so there is no longer any 74 producing one index entry per node, so there is no longer any
9 excuse not to. Use subheading instead of heading. The incorrect 75 excuse not to. Use subheading instead of heading. The incorrect
10 use of heading produced very large fonts in Info--as large as the 76 use of heading produced very large fonts in Info--as large as the
11 main heading. 77 main heading.
12 (From Bill Wohler): MH-E never did appear in Emacs 21--MH-E 78 (From Bill Wohler): MH-E never did appear in Emacs 21--MH-E
@@ -73,9 +139,10 @@
73 139
742006-03-06 Bill Wohler <wohler@newt.com> 1402006-03-06 Bill Wohler <wohler@newt.com>
75 141
76 * mh-e.texi: Move from SourceForge repository to Savannah. This is 142 * mh-e.texi: Move from SourceForge repository to Savannah.
77 version 7.93, which is a total rewrite from the previous edition 143 This is version 7.93, which is a total rewrite from the previous
78 1.3 for MH-E version 5.0.2, and corresponds to MH-E version 7.93. 144 edition 1.3 for MH-E version 5.0.2, and corresponds to MH-E
145 version 7.93.
79 146
802006-03-03 Reiner Steib <Reiner.Steib@gmx.de> 1472006-03-03 Reiner Steib <Reiner.Steib@gmx.de>
81 148
@@ -83,12 +150,12 @@
83 150
842006-03-01 Carsten Dominik <dominik@science.uva.nl> 1512006-03-01 Carsten Dominik <dominik@science.uva.nl>
85 152
86 * org.texi: (Interaction): Added item about `org-mouse.el' by 153 * org.texi (Interaction): Add item about `org-mouse.el' by
87 Piotr Zielinski. 154 Piotr Zielinski.
88 (Managing links): Documented that also mouse-1 can be used to 155 (Managing links): Document that also mouse-1 can be used to
89 activate a link. 156 activate a link.
90 (Headlines, FAQ): Added entry about hiding leading stars. 157 (Headlines, FAQ): Add entry about hiding leading stars.
91 (Miscellaneous): Resorted the sections in this chapter to a more 158 (Miscellaneous): Resort the sections in this chapter to a more
92 logical sequence. 159 logical sequence.
93 160
942006-02-28 Andre Spiegel <spiegel@gnu.org> 1612006-02-28 Andre Spiegel <spiegel@gnu.org>
@@ -154,7 +221,7 @@
154 221
155 * reftex.texi: Version number and date change only. 222 * reftex.texi: Version number and date change only.
156 223
157 * org.texi: (Internal Links): Rewritten to cover the modified 224 * org.texi (Internal Links): Rewrite to cover the modified
158 linking system. 225 linking system.
159 226
1602006-02-21 Nick Roberts <nickrob@snap.net.nz> 2272006-02-21 Nick Roberts <nickrob@snap.net.nz>
@@ -935,7 +1002,7 @@
935 prefix keys even when mark is active. Decribe that RET moves 1002 prefix keys even when mark is active. Decribe that RET moves
936 cursor to next corner in rectangle; clarify insert around rectangle. 1003 cursor to next corner in rectangle; clarify insert around rectangle.
937 1004
9382005-12-08 Alan Mackenzie <bug-cc-mode@gnu.org> 10052005-12-08 Alan Mackenzie <bug-cc-mode@gnu.org>
939 1006
940 * cc-mode.texi: The manual has been extensively revised: the 1007 * cc-mode.texi: The manual has been extensively revised: the
941 information about using CC Mode has been separated from the larger 1008 information about using CC Mode has been separated from the larger
diff --git a/man/Makefile.in b/man/Makefile.in
index 854d3213272..749252f5492 100644
--- a/man/Makefile.in
+++ b/man/Makefile.in
@@ -89,7 +89,6 @@ EMACSSOURCES= \
89 ${srcdir}/building.texi \ 89 ${srcdir}/building.texi \
90 ${srcdir}/maintaining.texi \ 90 ${srcdir}/maintaining.texi \
91 ${srcdir}/abbrevs.texi \ 91 ${srcdir}/abbrevs.texi \
92 ${srcdir}/picture.texi \
93 ${srcdir}/sending.texi \ 92 ${srcdir}/sending.texi \
94 ${srcdir}/rmail.texi \ 93 ${srcdir}/rmail.texi \
95 ${srcdir}/dired.texi \ 94 ${srcdir}/dired.texi \
diff --git a/man/abbrevs.texi b/man/abbrevs.texi
index 683da2204c1..14b6bdbb9f2 100644
--- a/man/abbrevs.texi
+++ b/man/abbrevs.texi
@@ -2,7 +2,7 @@
2@c Copyright (C) 1985, 1986, 1987, 1993, 1994, 1995, 1997, 2002, 2003, 2@c Copyright (C) 1985, 1986, 1987, 1993, 1994, 1995, 1997, 2002, 2003,
3@c 2004, 2005, 2006 Free Software Foundation, Inc. 3@c 2004, 2005, 2006 Free Software Foundation, Inc.
4@c See file emacs.texi for copying conditions. 4@c See file emacs.texi for copying conditions.
5@node Abbrevs, Picture, Maintaining, Top 5@node Abbrevs, Sending Mail, Maintaining, Top
6@chapter Abbrevs 6@chapter Abbrevs
7@cindex abbrevs 7@cindex abbrevs
8@cindex expansion (of abbrevs) 8@cindex expansion (of abbrevs)
diff --git a/man/emacs-xtra.texi b/man/emacs-xtra.texi
index a352bc913c2..34fa1ca70f2 100644
--- a/man/emacs-xtra.texi
+++ b/man/emacs-xtra.texi
@@ -59,6 +59,11 @@ license to the document, as described in section 6 of the license.
59* Autorevert:: Auto Reverting non-file buffers. 59* Autorevert:: Auto Reverting non-file buffers.
60* Subdir switches:: Subdirectory switches in Dired. 60* Subdir switches:: Subdirectory switches in Dired.
61* Advanced Calendar/Diary Usage:: Advanced Calendar/Diary customization. 61* Advanced Calendar/Diary Usage:: Advanced Calendar/Diary customization.
62* Emerge:: A convenient way of merging two versions
63 of a program.
64* Picture Mode:: Editing pictures made up of characters
65 using the quarter-plane screen model.
66* Fortran:: Fortran mode and its special features.
62* Index:: 67* Index::
63@end menu 68@end menu
64 69
@@ -1222,6 +1227,1184 @@ the European style, the order of the parameters is changed to @var{day},
1222If one of these functions decides that it applies to a certain date, 1227If one of these functions decides that it applies to a certain date,
1223it returns a value that contains @var{mark}. 1228it returns a value that contains @var{mark}.
1224 1229
1230@node Emerge
1231@chapter Merging Files with Emerge
1232@cindex Emerge
1233@cindex merging files
1234
1235 It's not unusual for programmers to get their signals crossed and
1236modify the same program in two different directions. To recover from
1237this confusion, you need to merge the two versions. Emerge makes this
1238easier. For other ways to compare files, see @ref{Comparing Files,,,
1239emacs, the Emacs Manual} and @ref{Top, Ediff,, ediff, The Ediff
1240Manual}.
1241
1242@menu
1243* Overview of Emerge:: How to start Emerge. Basic concepts.
1244* Submodes of Emerge:: Fast mode vs. Edit mode.
1245 Skip Prefers mode and Auto Advance mode.
1246* State of Difference:: You do the merge by specifying state A or B
1247 for each difference.
1248* Merge Commands:: Commands for selecting a difference,
1249 changing states of differences, etc.
1250* Exiting Emerge:: What to do when you've finished the merge.
1251* Combining in Emerge:: How to keep both alternatives for a difference.
1252* Fine Points of Emerge:: Misc.
1253@end menu
1254
1255@node Overview of Emerge
1256@section Overview of Emerge
1257
1258 To start Emerge, run one of these four commands:
1259
1260@table @kbd
1261@item M-x emerge-files
1262@findex emerge-files
1263Merge two specified files.
1264
1265@item M-x emerge-files-with-ancestor
1266@findex emerge-files-with-ancestor
1267Merge two specified files, with reference to a common ancestor.
1268
1269@item M-x emerge-buffers
1270@findex emerge-buffers
1271Merge two buffers.
1272
1273@item M-x emerge-buffers-with-ancestor
1274@findex emerge-buffers-with-ancestor
1275Merge two buffers with reference to a common ancestor in a third
1276buffer.
1277@end table
1278
1279@cindex merge buffer (Emerge)
1280@cindex A and B buffers (Emerge)
1281 The Emerge commands compare two files or buffers, and display the
1282comparison in three buffers: one for each input text (the @dfn{A buffer}
1283and the @dfn{B buffer}), and one (the @dfn{merge buffer}) where merging
1284takes place. The merge buffer shows the full merged text, not just the
1285differences. Wherever the two input texts differ, you can choose which
1286one of them to include in the merge buffer.
1287
1288 The Emerge commands that take input from existing buffers use only
1289the accessible portions of those buffers, if they are narrowed.
1290@xref{Narrowing,,, emacs, the Emacs Manual}.
1291
1292
1293 If a common ancestor version is available, from which the two texts to
1294be merged were both derived, Emerge can use it to guess which
1295alternative is right. Wherever one current version agrees with the
1296ancestor, Emerge presumes that the other current version is a deliberate
1297change which should be kept in the merged version. Use the
1298@samp{with-ancestor} commands if you want to specify a common ancestor
1299text. These commands read three file or buffer names---variant A,
1300variant B, and the common ancestor.
1301
1302 After the comparison is done and the buffers are prepared, the
1303interactive merging starts. You control the merging by typing special
1304@dfn{merge commands} in the merge buffer (@pxref{Merge Commands}).
1305For each run of differences between the input texts, you can choose
1306which one of them to keep, or edit them both together.
1307
1308 The merge buffer uses a special major mode, Emerge mode, with commands
1309for making these choices. But you can also edit the buffer with
1310ordinary Emacs commands.
1311
1312 At any given time, the attention of Emerge is focused on one
1313particular difference, called the @dfn{selected} difference. This
1314difference is marked off in the three buffers like this:
1315
1316@example
1317vvvvvvvvvvvvvvvvvvvv
1318@var{text that differs}
1319^^^^^^^^^^^^^^^^^^^^
1320@end example
1321
1322@noindent
1323Emerge numbers all the differences sequentially and the mode
1324line always shows the number of the selected difference.
1325
1326 Normally, the merge buffer starts out with the A version of the text.
1327But when the A version of a difference agrees with the common ancestor,
1328then the B version is initially preferred for that difference.
1329
1330 Emerge leaves the merged text in the merge buffer when you exit. At
1331that point, you can save it in a file with @kbd{C-x C-w}. If you give a
1332numeric argument to @code{emerge-files} or
1333@code{emerge-files-with-ancestor}, it reads the name of the output file
1334using the minibuffer. (This is the last file name those commands read.)
1335Then exiting from Emerge saves the merged text in the output file.
1336
1337 Normally, Emerge commands save the output buffer in its file when you
1338exit. If you abort Emerge with @kbd{C-]}, the Emerge command does not
1339save the output buffer, but you can save it yourself if you wish.
1340
1341@node Submodes of Emerge
1342@section Submodes of Emerge
1343
1344 You can choose between two modes for giving merge commands: Fast mode
1345and Edit mode. In Fast mode, basic merge commands are single
1346characters, but ordinary Emacs commands are disabled. This is
1347convenient if you use only merge commands. In Edit mode, all merge
1348commands start with the prefix key @kbd{C-c C-c}, and the normal Emacs
1349commands are also available. This allows editing the merge buffer, but
1350slows down Emerge operations.
1351
1352 Use @kbd{e} to switch to Edit mode, and @kbd{C-c C-c f} to switch to
1353Fast mode. The mode line indicates Edit and Fast modes with @samp{E}
1354and @samp{F}.
1355
1356 Emerge has two additional submodes that affect how particular merge
1357commands work: Auto Advance mode and Skip Prefers mode.
1358
1359 If Auto Advance mode is in effect, the @kbd{a} and @kbd{b} commands
1360advance to the next difference. This lets you go through the merge
1361faster as long as you simply choose one of the alternatives from the
1362input. The mode line indicates Auto Advance mode with @samp{A}.
1363
1364 If Skip Prefers mode is in effect, the @kbd{n} and @kbd{p} commands
1365skip over differences in states prefer-A and prefer-B (@pxref{State of
1366Difference}). Thus you see only differences for which neither version
1367is presumed ``correct.'' The mode line indicates Skip Prefers mode with
1368@samp{S}.
1369
1370@findex emerge-auto-advance-mode
1371@findex emerge-skip-prefers-mode
1372 Use the command @kbd{s a} (@code{emerge-auto-advance-mode}) to set or
1373clear Auto Advance mode. Use @kbd{s s}
1374(@code{emerge-skip-prefers-mode}) to set or clear Skip Prefers mode.
1375These commands turn on the mode with a positive argument, turns it off
1376with a negative or zero argument, and toggle the mode with no argument.
1377
1378@node State of Difference
1379@section State of a Difference
1380
1381 In the merge buffer, a difference is marked with lines of @samp{v} and
1382@samp{^} characters. Each difference has one of these seven states:
1383
1384@table @asis
1385@item A
1386The difference is showing the A version. The @kbd{a} command always
1387produces this state; the mode line indicates it with @samp{A}.
1388
1389@item B
1390The difference is showing the B version. The @kbd{b} command always
1391produces this state; the mode line indicates it with @samp{B}.
1392
1393@item default-A
1394@itemx default-B
1395The difference is showing the A or the B state by default, because you
1396haven't made a choice. All differences start in the default-A state
1397(and thus the merge buffer is a copy of the A buffer), except those for
1398which one alternative is ``preferred'' (see below).
1399
1400When you select a difference, its state changes from default-A or
1401default-B to plain A or B. Thus, the selected difference never has
1402state default-A or default-B, and these states are never displayed in
1403the mode line.
1404
1405The command @kbd{d a} chooses default-A as the default state, and @kbd{d
1406b} chooses default-B. This chosen default applies to all differences
1407which you haven't ever selected and for which no alternative is preferred.
1408If you are moving through the merge sequentially, the differences you
1409haven't selected are those following the selected one. Thus, while
1410moving sequentially, you can effectively make the A version the default
1411for some sections of the merge buffer and the B version the default for
1412others by using @kbd{d a} and @kbd{d b} between sections.
1413
1414@item prefer-A
1415@itemx prefer-B
1416The difference is showing the A or B state because it is
1417@dfn{preferred}. This means that you haven't made an explicit choice,
1418but one alternative seems likely to be right because the other
1419alternative agrees with the common ancestor. Thus, where the A buffer
1420agrees with the common ancestor, the B version is preferred, because
1421chances are it is the one that was actually changed.
1422
1423These two states are displayed in the mode line as @samp{A*} and @samp{B*}.
1424
1425@item combined
1426The difference is showing a combination of the A and B states, as a
1427result of the @kbd{x c} or @kbd{x C} commands.
1428
1429Once a difference is in this state, the @kbd{a} and @kbd{b} commands
1430don't do anything to it unless you give them a numeric argument.
1431
1432The mode line displays this state as @samp{comb}.
1433@end table
1434
1435@node Merge Commands
1436@section Merge Commands
1437
1438 Here are the Merge commands for Fast mode; in Edit mode, precede them
1439with @kbd{C-c C-c}:
1440
1441@table @kbd
1442@item p
1443Select the previous difference.
1444
1445@item n
1446Select the next difference.
1447
1448@item a
1449Choose the A version of this difference.
1450
1451@item b
1452Choose the B version of this difference.
1453
1454@item C-u @var{n} j
1455Select difference number @var{n}.
1456
1457@item .
1458Select the difference containing point. You can use this command in the
1459merge buffer or in the A or B buffer.
1460
1461@item q
1462Quit---finish the merge.
1463
1464@item C-]
1465Abort---exit merging and do not save the output.
1466
1467@item f
1468Go into Fast mode. (In Edit mode, this is actually @kbd{C-c C-c f}.)
1469
1470@item e
1471Go into Edit mode.
1472
1473@item l
1474Recenter (like @kbd{C-l}) all three windows.
1475
1476@item -
1477Specify part of a prefix numeric argument.
1478
1479@item @var{digit}
1480Also specify part of a prefix numeric argument.
1481
1482@item d a
1483Choose the A version as the default from here down in
1484the merge buffer.
1485
1486@item d b
1487Choose the B version as the default from here down in
1488the merge buffer.
1489
1490@item c a
1491Copy the A version of this difference into the kill ring.
1492
1493@item c b
1494Copy the B version of this difference into the kill ring.
1495
1496@item i a
1497Insert the A version of this difference at point.
1498
1499@item i b
1500Insert the B version of this difference at point.
1501
1502@item m
1503Put point and mark around the difference.
1504
1505@item ^
1506Scroll all three windows down (like @kbd{M-v}).
1507
1508@item v
1509Scroll all three windows up (like @kbd{C-v}).
1510
1511@item <
1512Scroll all three windows left (like @kbd{C-x <}).
1513
1514@item >
1515Scroll all three windows right (like @kbd{C-x >}).
1516
1517@item |
1518Reset horizontal scroll on all three windows.
1519
1520@item x 1
1521Shrink the merge window to one line. (Use @kbd{C-u l} to restore it
1522to full size.)
1523
1524@item x c
1525Combine the two versions of this difference (@pxref{Combining in
1526Emerge}).
1527
1528@item x f
1529Show the names of the files/buffers Emerge is operating on, in a Help
1530window. (Use @kbd{C-u l} to restore windows.)
1531
1532@item x j
1533Join this difference with the following one.
1534(@kbd{C-u x j} joins this difference with the previous one.)
1535
1536@item x s
1537Split this difference into two differences. Before you use this
1538command, position point in each of the three buffers at the place where
1539you want to split the difference.
1540
1541@item x t
1542Trim identical lines off the top and bottom of the difference.
1543Such lines occur when the A and B versions are
1544identical but differ from the ancestor version.
1545@end table
1546
1547@node Exiting Emerge
1548@section Exiting Emerge
1549
1550 The @kbd{q} command (@code{emerge-quit}) finishes the merge, storing
1551the results into the output file if you specified one. It restores the
1552A and B buffers to their proper contents, or kills them if they were
1553created by Emerge and you haven't changed them. It also disables the
1554Emerge commands in the merge buffer, since executing them later could
1555damage the contents of the various buffers.
1556
1557 @kbd{C-]} aborts the merge. This means exiting without writing the
1558output file. If you didn't specify an output file, then there is no
1559real difference between aborting and finishing the merge.
1560
1561 If the Emerge command was called from another Lisp program, then its
1562return value is @code{t} for successful completion, or @code{nil} if you
1563abort.
1564
1565@node Combining in Emerge
1566@section Combining the Two Versions
1567
1568 Sometimes you want to keep @emph{both} alternatives for a particular
1569difference. To do this, use @kbd{x c}, which edits the merge buffer
1570like this:
1571
1572@example
1573@group
1574#ifdef NEW
1575@var{version from A buffer}
1576#else /* not NEW */
1577@var{version from B buffer}
1578#endif /* not NEW */
1579@end group
1580@end example
1581
1582@noindent
1583@vindex emerge-combine-versions-template
1584While this example shows C preprocessor conditionals delimiting the two
1585alternative versions, you can specify the strings to use by setting
1586the variable @code{emerge-combine-versions-template} to a string of your
1587choice. In the string, @samp{%a} says where to put version A, and
1588@samp{%b} says where to put version B. The default setting, which
1589produces the results shown above, looks like this:
1590
1591@example
1592@group
1593"#ifdef NEW\n%a#else /* not NEW */\n%b#endif /* not NEW */\n"
1594@end group
1595@end example
1596
1597@node Fine Points of Emerge
1598@section Fine Points of Emerge
1599
1600 During the merge, you mustn't try to edit the A and B buffers yourself.
1601Emerge modifies them temporarily, but ultimately puts them back the way
1602they were.
1603
1604 You can have any number of merges going at once---just don't use any one
1605buffer as input to more than one merge at once, since the temporary
1606changes made in these buffers would get in each other's way.
1607
1608 Starting Emerge can take a long time because it needs to compare the
1609files fully. Emacs can't do anything else until @code{diff} finishes.
1610Perhaps in the future someone will change Emerge to do the comparison in
1611the background when the input files are large---then you could keep on
1612doing other things with Emacs until Emerge is ready to accept
1613commands.
1614
1615@vindex emerge-startup-hook
1616 After setting up the merge, Emerge runs the hook
1617@code{emerge-startup-hook}. @xref{Hooks,,, emacs, the Emacs Manual}.
1618
1619@node Picture Mode
1620@chapter Editing Pictures
1621@cindex pictures
1622@cindex making pictures out of text characters
1623@findex edit-picture
1624
1625 To edit a picture made out of text characters (for example, a picture
1626of the division of a register into fields, as a comment in a program),
1627use the command @kbd{M-x edit-picture} to enter Picture mode.
1628
1629 In Picture mode, editing is based on the @dfn{quarter-plane} model of
1630text, according to which the text characters lie studded on an area that
1631stretches infinitely far to the right and downward. The concept of the end
1632of a line does not exist in this model; the most you can say is where the
1633last nonblank character on the line is found.
1634
1635 Of course, Emacs really always considers text as a sequence of
1636characters, and lines really do have ends. But Picture mode replaces
1637the most frequently-used commands with variants that simulate the
1638quarter-plane model of text. They do this by inserting spaces or by
1639converting tabs to spaces.
1640
1641 Most of the basic editing commands of Emacs are redefined by Picture mode
1642to do essentially the same thing but in a quarter-plane way. In addition,
1643Picture mode defines various keys starting with the @kbd{C-c} prefix to
1644run special picture editing commands.
1645
1646 One of these keys, @kbd{C-c C-c}, is particularly important. Often a
1647picture is part of a larger file that is usually edited in some other
1648major mode. @kbd{M-x edit-picture} records the name of the previous
1649major mode so you can use the @kbd{C-c C-c} command
1650(@code{picture-mode-exit}) later to go back to that mode. @kbd{C-c C-c}
1651also deletes spaces from the ends of lines, unless given a numeric
1652argument.
1653
1654 The special commands of Picture mode all work in other modes (provided
1655the @file{picture} library is loaded), but are not bound to keys except
1656in Picture mode. The descriptions below talk of moving ``one column''
1657and so on, but all the picture mode commands handle numeric arguments as
1658their normal equivalents do.
1659
1660@vindex picture-mode-hook
1661 Turning on Picture mode runs the hook @code{picture-mode-hook}.
1662Additional extensions to Picture mode can be found in
1663@file{artist.el}.
1664
1665@menu
1666* Basic Picture:: Basic concepts and simple commands of Picture Mode.
1667* Insert in Picture:: Controlling direction of cursor motion
1668 after "self-inserting" characters.
1669* Tabs in Picture:: Various features for tab stops and indentation.
1670* Rectangles in Picture:: Clearing and superimposing rectangles.
1671@end menu
1672
1673@node Basic Picture
1674@section Basic Editing in Picture Mode
1675
1676@findex picture-forward-column
1677@findex picture-backward-column
1678@findex picture-move-down
1679@findex picture-move-up
1680@cindex editing in Picture mode
1681
1682 Most keys do the same thing in Picture mode that they usually do, but
1683do it in a quarter-plane style. For example, @kbd{C-f} is rebound to
1684run @code{picture-forward-column}, a command which moves point one
1685column to the right, inserting a space if necessary so that the actual
1686end of the line makes no difference. @kbd{C-b} is rebound to run
1687@code{picture-backward-column}, which always moves point left one
1688column, converting a tab to multiple spaces if necessary. @kbd{C-n} and
1689@kbd{C-p} are rebound to run @code{picture-move-down} and
1690@code{picture-move-up}, which can either insert spaces or convert tabs
1691as necessary to make sure that point stays in exactly the same column.
1692@kbd{C-e} runs @code{picture-end-of-line}, which moves to after the last
1693nonblank character on the line. There is no need to change @kbd{C-a},
1694as the choice of screen model does not affect beginnings of
1695lines.
1696
1697@findex picture-newline
1698 Insertion of text is adapted to the quarter-plane screen model
1699through the use of Overwrite mode (@pxref{Minor Modes,,, emacs, the
1700Emacs Manual}.) Self-inserting characters replace existing text,
1701column by column, rather than pushing existing text to the right.
1702@key{RET} runs @code{picture-newline}, which just moves to the
1703beginning of the following line so that new text will replace that
1704line.
1705
1706@findex picture-backward-clear-column
1707@findex picture-clear-column
1708@findex picture-clear-line
1709 In Picture mode, the commands that normally delete or kill text,
1710instead erase text (replacing it with spaces). @key{DEL}
1711(@code{picture-backward-clear-column}) replaces the preceding
1712character with a space rather than removing it; this moves point
1713backwards. @kbd{C-d} (@code{picture-clear-column}) replaces the next
1714character or characters with spaces, but does not move point. (If you
1715want to clear characters to spaces and move forward over them, use
1716@key{SPC}.) @kbd{C-k} (@code{picture-clear-line}) really kills the
1717contents of lines, but does not delete the newlines from the buffer.
1718
1719@findex picture-open-line
1720 To do actual insertion, you must use special commands. @kbd{C-o}
1721(@code{picture-open-line}) creates a blank line after the current
1722line; it never splits a line. @kbd{C-M-o} (@code{split-line}) makes
1723sense in Picture mode, so it is not changed. @kbd{C-j}
1724(@code{picture-duplicate-line}) inserts another line with the same
1725contents below the current line.
1726
1727@kindex C-c C-d @r{(Picture mode)}
1728 To do actual deletion in Picture mode, use @kbd{C-w}, @kbd{C-c C-d}
1729(which is defined as @code{delete-char}, as @kbd{C-d} is in other
1730modes), or one of the picture rectangle commands (@pxref{Rectangles in
1731Picture}).
1732
1733@node Insert in Picture
1734@section Controlling Motion after Insert
1735
1736@findex picture-movement-up
1737@findex picture-movement-down
1738@findex picture-movement-left
1739@findex picture-movement-right
1740@findex picture-movement-nw
1741@findex picture-movement-ne
1742@findex picture-movement-sw
1743@findex picture-movement-se
1744@kindex C-c < @r{(Picture mode)}
1745@kindex C-c > @r{(Picture mode)}
1746@kindex C-c ^ @r{(Picture mode)}
1747@kindex C-c . @r{(Picture mode)}
1748@kindex C-c ` @r{(Picture mode)}
1749@kindex C-c ' @r{(Picture mode)}
1750@kindex C-c / @r{(Picture mode)}
1751@kindex C-c \ @r{(Picture mode)}
1752 Since ``self-inserting'' characters in Picture mode overwrite and move
1753point, there is no essential restriction on how point should be moved.
1754Normally point moves right, but you can specify any of the eight
1755orthogonal or diagonal directions for motion after a ``self-inserting''
1756character. This is useful for drawing lines in the buffer.
1757
1758@table @kbd
1759@item C-c <
1760@itemx C-c @key{LEFT}
1761Move left after insertion (@code{picture-movement-left}).
1762@item C-c >
1763@itemx C-c @key{RIGHT}
1764Move right after insertion (@code{picture-movement-right}).
1765@item C-c ^
1766@itemx C-c @key{UP}
1767Move up after insertion (@code{picture-movement-up}).
1768@item C-c .
1769@itemx C-c @key{DOWN}
1770Move down after insertion (@code{picture-movement-down}).
1771@item C-c `
1772@itemx C-c @key{HOME}
1773Move up and left (``northwest'') after insertion (@code{picture-movement-nw}).
1774@item C-c '
1775@itemx C-c @key{PAGEUP}
1776Move up and right (``northeast'') after insertion
1777(@code{picture-movement-ne}).
1778@item C-c /
1779@itemx C-c @key{END}
1780Move down and left (``southwest'') after insertion
1781@*(@code{picture-movement-sw}).
1782@item C-c \
1783@itemx C-c @key{PAGEDOWN}
1784Move down and right (``southeast'') after insertion
1785@*(@code{picture-movement-se}).
1786@end table
1787
1788@kindex C-c C-f @r{(Picture mode)}
1789@kindex C-c C-b @r{(Picture mode)}
1790@findex picture-motion
1791@findex picture-motion-reverse
1792 Two motion commands move based on the current Picture insertion
1793direction. The command @kbd{C-c C-f} (@code{picture-motion}) moves in the
1794same direction as motion after ``insertion'' currently does, while @kbd{C-c
1795C-b} (@code{picture-motion-reverse}) moves in the opposite direction.
1796
1797@node Tabs in Picture
1798@section Picture Mode Tabs
1799
1800@kindex M-TAB @r{(Picture mode)}
1801@findex picture-tab-search
1802@vindex picture-tab-chars
1803 Two kinds of tab-like action are provided in Picture mode. Use
1804@kbd{M-@key{TAB}} (@code{picture-tab-search}) for context-based tabbing.
1805With no argument, it moves to a point underneath the next
1806``interesting'' character that follows whitespace in the previous
1807nonblank line. ``Next'' here means ``appearing at a horizontal position
1808greater than the one point starts out at.'' With an argument, as in
1809@kbd{C-u M-@key{TAB}}, this command moves to the next such interesting
1810character in the current line. @kbd{M-@key{TAB}} does not change the
1811text; it only moves point. ``Interesting'' characters are defined by
1812the variable @code{picture-tab-chars}, which should define a set of
1813characters. The syntax for this variable is like the syntax used inside
1814of @samp{[@dots{}]} in a regular expression---but without the @samp{[}
1815and the @samp{]}. Its default value is @code{"!-~"}.
1816
1817@findex picture-tab
1818 @key{TAB} itself runs @code{picture-tab}, which operates based on the
1819current tab stop settings; it is the Picture mode equivalent of
1820@code{tab-to-tab-stop}. Normally it just moves point, but with a numeric
1821argument it clears the text that it moves over.
1822
1823@kindex C-c TAB @r{(Picture mode)}
1824@findex picture-set-tab-stops
1825 The context-based and tab-stop-based forms of tabbing are brought
1826together by the command @kbd{C-c @key{TAB}} (@code{picture-set-tab-stops}).
1827This command sets the tab stops to the positions which @kbd{M-@key{TAB}}
1828would consider significant in the current line. The use of this command,
1829together with @key{TAB}, can get the effect of context-based tabbing. But
1830@kbd{M-@key{TAB}} is more convenient in the cases where it is sufficient.
1831
1832 It may be convenient to prevent use of actual tab characters in
1833pictures. For example, this prevents @kbd{C-x @key{TAB}} from messing
1834up the picture. You can do this by setting the variable
1835@code{indent-tabs-mode} to @code{nil}.
1836
1837@node Rectangles in Picture
1838@section Picture Mode Rectangle Commands
1839@cindex rectangles and Picture mode
1840@cindex Picture mode and rectangles
1841
1842 Picture mode defines commands for working on rectangular pieces of
1843the text in ways that fit with the quarter-plane model. The standard
1844rectangle commands may also be useful. @xref{Rectangles,,, emacs, the
1845Emacs Manual}.
1846
1847@table @kbd
1848@item C-c C-k
1849Clear out the region-rectangle with spaces
1850(@code{picture-clear-rectangle}). With argument, delete the text.
1851@item C-c C-w @var{r}
1852Similar, but save rectangle contents in register @var{r} first
1853(@code{picture-clear-rectangle-to-register}).
1854@item C-c C-y
1855Copy last killed rectangle into the buffer by overwriting, with upper
1856left corner at point (@code{picture-yank-rectangle}). With argument,
1857insert instead.
1858@item C-c C-x @var{r}
1859Similar, but use the rectangle in register @var{r}
1860(@code{picture-yank-rectangle-from-register}).
1861@end table
1862
1863@kindex C-c C-k @r{(Picture mode)}
1864@kindex C-c C-w @r{(Picture mode)}
1865@findex picture-clear-rectangle
1866@findex picture-clear-rectangle-to-register
1867 The picture rectangle commands @kbd{C-c C-k}
1868(@code{picture-clear-rectangle}) and @kbd{C-c C-w}
1869(@code{picture-clear-rectangle-to-register}) differ from the standard
1870rectangle commands in that they normally clear the rectangle instead of
1871deleting it; this is analogous with the way @kbd{C-d} is changed in Picture
1872mode.
1873
1874 However, deletion of rectangles can be useful in Picture mode, so
1875these commands delete the rectangle if given a numeric argument.
1876@kbd{C-c C-k} either with or without a numeric argument saves the
1877rectangle for @kbd{C-c C-y}.
1878
1879@kindex C-c C-y @r{(Picture mode)}
1880@kindex C-c C-x @r{(Picture mode)}
1881@findex picture-yank-rectangle
1882@findex picture-yank-rectangle-from-register
1883 The Picture mode commands for yanking rectangles differ from the
1884standard ones in that they overwrite instead of inserting. This is
1885the same way that Picture mode insertion of other text differs from
1886other modes. @kbd{C-c C-y} (@code{picture-yank-rectangle}) inserts
1887(by overwriting) the rectangle that was most recently killed, while
1888@kbd{C-c C-x} (@code{picture-yank-rectangle-from-register}) does
1889likewise for the rectangle found in a specified register.
1890
1891@node Fortran
1892@chapter Fortran Mode
1893@cindex Fortran mode
1894@cindex mode, Fortran
1895
1896 Fortran mode provides special motion commands for Fortran statements
1897and subprograms, and indentation commands that understand Fortran
1898conventions of nesting, line numbers and continuation statements.
1899Fortran mode has support for Auto Fill mode that breaks long lines into
1900proper Fortran continuation lines.
1901
1902 Special commands for comments are provided because Fortran comments
1903are unlike those of other languages. Built-in abbrevs optionally save
1904typing when you insert Fortran keywords.
1905
1906 Use @kbd{M-x fortran-mode} to switch to this major mode. This
1907command runs the hook @code{fortran-mode-hook}. @xref{Hooks,,, emacs,
1908the Emacs Manual}.
1909
1910@cindex Fortran77 and Fortran90
1911@findex f90-mode
1912@findex fortran-mode
1913 Fortran mode is meant for editing Fortran77 ``fixed format'' (and also
1914``tab format'') source code. For editing the modern Fortran90 or
1915Fortran95 ``free format'' source code, use F90 mode (@code{f90-mode}).
1916Emacs normally uses Fortran mode for files with extension @samp{.f},
1917@samp{.F} or @samp{.for}, and F90 mode for the extension @samp{.f90} and
1918@samp{.f95}. GNU Fortran supports both kinds of format.
1919
1920@menu
1921* Motion: Fortran Motion. Moving point by statements or subprograms.
1922* Indent: Fortran Indent. Indentation commands for Fortran.
1923* Comments: Fortran Comments. Inserting and aligning comments.
1924* Autofill: Fortran Autofill. Auto fill support for Fortran.
1925* Columns: Fortran Columns. Measuring columns for valid Fortran.
1926* Abbrev: Fortran Abbrev. Built-in abbrevs for Fortran keywords.
1927@end menu
1928
1929@node Fortran Motion
1930@section Motion Commands
1931
1932 In addition to the normal commands for moving by and operating on
1933``defuns'' (Fortran subprograms---functions and subroutines, as well as
1934modules for F90 mode), Fortran mode provides special commands to move by
1935statements and other program units.
1936
1937@table @kbd
1938@kindex C-c C-n @r{(Fortran mode)}
1939@findex fortran-next-statement
1940@findex f90-next-statement
1941@item C-c C-n
1942Move to the beginning of the next statement
1943(@code{fortran-next-statement}/@code{f90-next-statement}).
1944
1945@kindex C-c C-p @r{(Fortran mode)}
1946@findex fortran-previous-statement
1947@findex f90-previous-statement
1948@item C-c C-p
1949Move to the beginning of the previous statement
1950(@code{fortran-previous-statement}/@code{f90-previous-statement}).
1951If there is no previous statement (i.e. if called from the first
1952statement in the buffer), move to the start of the buffer.
1953
1954@kindex C-c C-e @r{(F90 mode)}
1955@findex f90-next-block
1956@item C-c C-e
1957Move point forward to the start of the next code block
1958(@code{f90-next-block}). A code block is a subroutine,
1959@code{if}--@code{endif} statement, and so forth. This command exists
1960for F90 mode only, not Fortran mode. With a numeric argument, this
1961moves forward that many blocks.
1962
1963@kindex C-c C-a @r{(F90 mode)}
1964@findex f90-previous-block
1965@item C-c C-a
1966Move point backward to the previous code block
1967(@code{f90-previous-block}). This is like @code{f90-next-block}, but
1968moves backwards.
1969
1970@kindex C-M-n @r{(Fortran mode)}
1971@findex fortran-end-of-block
1972@findex f90-end-of-block
1973@item C-M-n
1974Move to the end of the current code block
1975(@code{fortran-end-of-block}/@code{f90-end-of-block}). With a numeric
1976agument, move forward that number of blocks. The mark is set before
1977moving point. The F90 mode version of this command checks for
1978consistency of block types and labels (if present), but it does not
1979check the outermost block since that may be incomplete.
1980
1981@kindex C-M-p @r{(Fortran mode)}
1982@findex fortran-beginning-of-block
1983@findex f90-beginning-of-block
1984@item C-M-p
1985Move to the start of the current code block
1986(@code{fortran-beginning-of-block}/@code{f90-beginning-of-block}). This
1987is like @code{fortran-end-of-block}, but moves backwards.
1988@end table
1989
1990@node Fortran Indent
1991@section Fortran Indentation
1992
1993 Special commands and features are needed for indenting Fortran code in
1994order to make sure various syntactic entities (line numbers, comment line
1995indicators and continuation line flags) appear in the columns that are
1996required for standard, fixed (or tab) format Fortran.
1997
1998@menu
1999* Commands: ForIndent Commands. Commands for indenting and filling Fortran.
2000* Contline: ForIndent Cont. How continuation lines indent.
2001* Numbers: ForIndent Num. How line numbers auto-indent.
2002* Conv: ForIndent Conv. Conventions you must obey to avoid trouble.
2003* Vars: ForIndent Vars. Variables controlling Fortran indent style.
2004@end menu
2005
2006@node ForIndent Commands
2007@subsection Fortran Indentation and Filling Commands
2008
2009@table @kbd
2010@item C-M-j
2011Break the current line at point and set up a continuation line
2012(@code{fortran-split-line}).
2013@item M-^
2014Join this line to the previous line (@code{fortran-join-line}).
2015@item C-M-q
2016Indent all the lines of the subprogram point is in
2017(@code{fortran-indent-subprogram}).
2018@item M-q
2019Fill a comment block or statement.
2020@end table
2021
2022@kindex C-M-q @r{(Fortran mode)}
2023@findex fortran-indent-subprogram
2024 The key @kbd{C-M-q} runs @code{fortran-indent-subprogram}, a command
2025to reindent all the lines of the Fortran subprogram (function or
2026subroutine) containing point.
2027
2028@kindex C-M-j @r{(Fortran mode)}
2029@findex fortran-split-line
2030 The key @kbd{C-M-j} runs @code{fortran-split-line}, which splits
2031a line in the appropriate fashion for Fortran. In a non-comment line,
2032the second half becomes a continuation line and is indented
2033accordingly. In a comment line, both halves become separate comment
2034lines.
2035
2036@kindex M-^ @r{(Fortran mode)}
2037@kindex C-c C-d @r{(Fortran mode)}
2038@findex fortran-join-line
2039 @kbd{M-^} or @kbd{C-c C-d} runs the command @code{fortran-join-line},
2040which joins a continuation line back to the previous line, roughly as
2041the inverse of @code{fortran-split-line}. The point must be on a
2042continuation line when this command is invoked.
2043
2044@kindex M-q @r{(Fortran mode)}
2045@kbd{M-q} in Fortran mode fills the comment block or statement that
2046point is in. This removes any excess statement continuations.
2047
2048@node ForIndent Cont
2049@subsection Continuation Lines
2050@cindex Fortran continuation lines
2051
2052@vindex fortran-continuation-string
2053 Most Fortran77 compilers allow two ways of writing continuation lines.
2054If the first non-space character on a line is in column 5, then that
2055line is a continuation of the previous line. We call this @dfn{fixed
2056format}. (In GNU Emacs we always count columns from 0; but note that
2057the Fortran standard counts from 1.) The variable
2058@code{fortran-continuation-string} specifies what character to put in
2059column 5. A line that starts with a tab character followed by any digit
2060except @samp{0} is also a continuation line. We call this style of
2061continuation @dfn{tab format}. (Fortran90 introduced ``free format'',
2062with another style of continuation lines).
2063
2064@vindex indent-tabs-mode @r{(Fortran mode)}
2065@vindex fortran-analyze-depth
2066@vindex fortran-tab-mode-default
2067 Fortran mode can use either style of continuation line. When you
2068enter Fortran mode, it tries to deduce the proper continuation style
2069automatically from the buffer contents. It does this by scanning up to
2070@code{fortran-analyze-depth} (default 100) lines from the start of the
2071buffer. The first line that begins with either a tab character or six
2072spaces determines the choice. If the scan fails (for example, if the
2073buffer is new and therefore empty), the value of
2074@code{fortran-tab-mode-default} (@code{nil} for fixed format, and
2075non-@code{nil} for tab format) is used. @samp{/t} in the mode line
2076indicates tab format is selected. Fortran mode sets the value of
2077@code{indent-tabs-mode} accordingly.
2078
2079 If the text on a line starts with the Fortran continuation marker
2080@samp{$}, or if it begins with any non-whitespace character in column
20815, Fortran mode treats it as a continuation line. When you indent a
2082continuation line with @key{TAB}, it converts the line to the current
2083continuation style. When you split a Fortran statement with
2084@kbd{C-M-j}, the continuation marker on the newline is created according
2085to the continuation style.
2086
2087 The setting of continuation style affects several other aspects of
2088editing in Fortran mode. In fixed format mode, the minimum column
2089number for the body of a statement is 6. Lines inside of Fortran
2090blocks that are indented to larger column numbers always use only the
2091space character for whitespace. In tab format mode, the minimum
2092column number for the statement body is 8, and the whitespace before
2093column 8 must always consist of one tab character.
2094
2095@node ForIndent Num
2096@subsection Line Numbers
2097
2098 If a number is the first non-whitespace in the line, Fortran
2099indentation assumes it is a line number and moves it to columns 0
2100through 4. (Columns always count from 0 in GNU Emacs.)
2101
2102@vindex fortran-line-number-indent
2103 Line numbers of four digits or less are normally indented one space.
2104The variable @code{fortran-line-number-indent} controls this; it
2105specifies the maximum indentation a line number can have. The default
2106value of the variable is 1. Fortran mode tries to prevent line number
2107digits passing column 4, reducing the indentation below the specified
2108maximum if necessary. If @code{fortran-line-number-indent} has the
2109value 5, line numbers are right-justified to end in column 4.
2110
2111@vindex fortran-electric-line-number
2112 Simply inserting a line number is enough to indent it according to
2113these rules. As each digit is inserted, the indentation is recomputed.
2114To turn off this feature, set the variable
2115@code{fortran-electric-line-number} to @code{nil}.
2116
2117
2118@node ForIndent Conv
2119@subsection Syntactic Conventions
2120
2121 Fortran mode assumes that you follow certain conventions that simplify
2122the task of understanding a Fortran program well enough to indent it
2123properly:
2124
2125@itemize @bullet
2126@item
2127Two nested @samp{do} loops never share a @samp{continue} statement.
2128
2129@item
2130Fortran keywords such as @samp{if}, @samp{else}, @samp{then}, @samp{do}
2131and others are written without embedded whitespace or line breaks.
2132
2133Fortran compilers generally ignore whitespace outside of string
2134constants, but Fortran mode does not recognize these keywords if they
2135are not contiguous. Constructs such as @samp{else if} or @samp{end do}
2136are acceptable, but the second word should be on the same line as the
2137first and not on a continuation line.
2138@end itemize
2139
2140@noindent
2141If you fail to follow these conventions, the indentation commands may
2142indent some lines unaesthetically. However, a correct Fortran program
2143retains its meaning when reindented even if the conventions are not
2144followed.
2145
2146@node ForIndent Vars
2147@subsection Variables for Fortran Indentation
2148
2149@vindex fortran-do-indent
2150@vindex fortran-if-indent
2151@vindex fortran-structure-indent
2152@vindex fortran-continuation-indent
2153@vindex fortran-check-all-num@dots{}
2154@vindex fortran-minimum-statement-indent@dots{}
2155 Several additional variables control how Fortran indentation works:
2156
2157@table @code
2158@item fortran-do-indent
2159Extra indentation within each level of @samp{do} statement (default 3).
2160
2161@item fortran-if-indent
2162Extra indentation within each level of @samp{if}, @samp{select case}, or
2163@samp{where} statements (default 3).
2164
2165@item fortran-structure-indent
2166Extra indentation within each level of @samp{structure}, @samp{union},
2167@samp{map}, or @samp{interface} statements (default 3).
2168
2169@item fortran-continuation-indent
2170Extra indentation for bodies of continuation lines (default 5).
2171
2172@item fortran-check-all-num-for-matching-do
2173In Fortran77, a numbered @samp{do} statement is ended by any statement
2174with a matching line number. It is common (but not compulsory) to use a
2175@samp{continue} statement for this purpose. If this variable has a
2176non-@code{nil} value, indenting any numbered statement must check for a
2177@samp{do} that ends there. If you always end @samp{do} statements with
2178a @samp{continue} line (or if you use the more modern @samp{enddo}),
2179then you can speed up indentation by setting this variable to
2180@code{nil}. The default is @code{nil}.
2181
2182@item fortran-blink-matching-if
2183If this is @code{t}, indenting an @samp{endif} (or @samp{enddo}
2184statement moves the cursor momentarily to the matching @samp{if} (or
2185@samp{do}) statement to show where it is. The default is @code{nil}.
2186
2187@item fortran-minimum-statement-indent-fixed
2188Minimum indentation for Fortran statements when using fixed format
2189continuation line style. Statement bodies are never indented less than
2190this much. The default is 6.
2191
2192@item fortran-minimum-statement-indent-tab
2193Minimum indentation for Fortran statements for tab format continuation line
2194style. Statement bodies are never indented less than this much. The
2195default is 8.
2196@end table
2197
2198The variables controlling the indentation of comments are described in
2199the following section.
2200
2201@node Fortran Comments
2202@section Fortran Comments
2203
2204 The usual Emacs comment commands assume that a comment can follow a
2205line of code. In Fortran77, the standard comment syntax requires an
2206entire line to be just a comment. Therefore, Fortran mode replaces the
2207standard Emacs comment commands and defines some new variables.
2208
2209@vindex fortran-comment-line-start
2210 Fortran mode can also handle the Fortran90 comment syntax where comments
2211start with @samp{!} and can follow other text. Because only some Fortran77
2212compilers accept this syntax, Fortran mode will not insert such comments
2213unless you have said in advance to do so. To do this, set the variable
2214@code{fortran-comment-line-start} to @samp{"!"}.
2215
2216@table @kbd
2217@item M-;
2218Align comment or insert new comment (@code{fortran-indent-comment}).
2219
2220@item C-x ;
2221Applies to nonstandard @samp{!} comments only.
2222
2223@item C-c ;
2224Turn all lines of the region into comments, or (with argument) turn them back
2225into real code (@code{fortran-comment-region}).
2226@end table
2227
2228@findex fortran-indent-comment
2229 @kbd{M-;} in Fortran mode is redefined as the command
2230@code{fortran-indent-comment}. Like the usual @kbd{M-;} command, this
2231recognizes any kind of existing comment and aligns its text appropriately;
2232if there is no existing comment, a comment is inserted and aligned. But
2233inserting and aligning comments are not the same in Fortran mode as in
2234other modes.
2235
2236 When a new comment must be inserted, if the current line is blank, a
2237full-line comment is inserted. On a non-blank line, a nonstandard @samp{!}
2238comment is inserted if you have said you want to use them. Otherwise a
2239full-line comment is inserted on a new line before the current line.
2240
2241 Nonstandard @samp{!} comments are aligned like comments in other
2242languages, but full-line comments are different. In a standard full-line
2243comment, the comment delimiter itself must always appear in column zero.
2244What can be aligned is the text within the comment. You can choose from
2245three styles of alignment by setting the variable
2246@code{fortran-comment-indent-style} to one of these values:
2247
2248@vindex fortran-comment-indent-style
2249@vindex fortran-comment-line-extra-indent
2250@table @code
2251@item fixed
2252Align the text at a fixed column, which is the sum of
2253@code{fortran-comment-line-extra-indent} and the minimum statement
2254indentation. This is the default.
2255
2256The minimum statement indentation is
2257@code{fortran-minimum-statement-indent-fixed} for fixed format
2258continuation line style and @code{fortran-minimum-statement-indent-tab}
2259for tab format style.
2260
2261@item relative
2262Align the text as if it were a line of code, but with an additional
2263@code{fortran-comment-line-extra-indent} columns of indentation.
2264
2265@item nil
2266Don't move text in full-line comments automatically.
2267@end table
2268
2269@vindex fortran-comment-indent-char
2270 In addition, you can specify the character to be used to indent within
2271full-line comments by setting the variable
2272@code{fortran-comment-indent-char} to the single-character string you want
2273to use.
2274
2275@vindex fortran-directive-re
2276 Compiler directive lines, or preprocessor lines, have much the same
2277appearance as comment lines. It is important, though, that such lines
2278never be indented at all, no matter what the value of
2279@code{fortran-comment-indent-style}. The variable
2280@code{fortran-directive-re} is a regular expression that specifies which
2281lines are directives. Matching lines are never indented, and receive
2282distinctive font-locking.
2283
2284 The normal Emacs comment command @kbd{C-x ;} has not been redefined. If
2285you use @samp{!} comments, this command can be used with them. Otherwise
2286it is useless in Fortran mode.
2287
2288@kindex C-c ; @r{(Fortran mode)}
2289@findex fortran-comment-region
2290@vindex fortran-comment-region
2291 The command @kbd{C-c ;} (@code{fortran-comment-region}) turns all the
2292lines of the region into comments by inserting the string @samp{C$$$} at
2293the front of each one. With a numeric argument, it turns the region
2294back into live code by deleting @samp{C$$$} from the front of each line
2295in it. The string used for these comments can be controlled by setting
2296the variable @code{fortran-comment-region}. Note that here we have an
2297example of a command and a variable with the same name; these two uses
2298of the name never conflict because in Lisp and in Emacs it is always
2299clear from the context which one is meant.
2300
2301@node Fortran Autofill
2302@section Auto Fill in Fortran Mode
2303
2304 Fortran mode has specialized support for Auto Fill mode, which is a
2305minor mode that automatically splits statements as you insert them
2306when they become too wide. Splitting a statement involves making
2307continuation lines using @code{fortran-continuation-string}
2308(@pxref{ForIndent Cont}). This splitting happens when you type
2309@key{SPC}, @key{RET}, or @key{TAB}, and also in the Fortran
2310indentation commands. You activate Auto Fill in Fortran mode in the
2311normal way. @xref{Auto Fill,,, emacs, the Emacs Manual}.
2312
2313@vindex fortran-break-before-delimiters
2314 Auto Fill breaks lines at spaces or delimiters when the lines get
2315longer than the desired width (the value of @code{fill-column}). The
2316delimiters (besides whitespace) that Auto Fill can break at are
2317@samp{+}, @samp{-}, @samp{/}, @samp{*}, @samp{=}, @samp{<}, @samp{>},
2318and @samp{,}. The line break comes after the delimiter if the
2319variable @code{fortran-break-before-delimiters} is @code{nil}.
2320Otherwise (and by default), the break comes before the delimiter.
2321
2322 To enable Auto Fill in all Fortran buffers, add
2323@code{turn-on-auto-fill} to @code{fortran-mode-hook}. @xref{Hooks,,,
2324emacs, the Emacs Manual}.
2325
2326@node Fortran Columns
2327@section Checking Columns in Fortran
2328
2329@table @kbd
2330@item C-c C-r
2331Display a ``column ruler'' momentarily above the current line
2332(@code{fortran-column-ruler}).
2333@item C-c C-w
2334Split the current window horizontally temporarily so that it is 72
2335columns wide (@code{fortran-window-create-momentarily}). This may
2336help you avoid making lines longer than the 72-character limit that
2337some Fortran compilers impose.
2338@item C-u C-c C-w
2339Split the current window horizontally so that it is 72 columns wide
2340(@code{fortran-window-create}). You can then continue editing.
2341@item M-x fortran-strip-sequence-nos
2342Delete all text in column 72 and beyond.
2343@end table
2344
2345@kindex C-c C-r @r{(Fortran mode)}
2346@findex fortran-column-ruler
2347 The command @kbd{C-c C-r} (@code{fortran-column-ruler}) shows a column
2348ruler momentarily above the current line. The comment ruler is two lines
2349of text that show you the locations of columns with special significance in
2350Fortran programs. Square brackets show the limits of the columns for line
2351numbers, and curly brackets show the limits of the columns for the
2352statement body. Column numbers appear above them.
2353
2354 Note that the column numbers count from zero, as always in GNU Emacs.
2355As a result, the numbers may be one less than those you are familiar
2356with; but the positions they indicate in the line are standard for
2357Fortran.
2358
2359@vindex fortran-column-ruler-fixed
2360@vindex fortran-column-ruler-tabs
2361 The text used to display the column ruler depends on the value of the
2362variable @code{indent-tabs-mode}. If @code{indent-tabs-mode} is
2363@code{nil}, then the value of the variable
2364@code{fortran-column-ruler-fixed} is used as the column ruler.
2365Otherwise, the value of the variable @code{fortran-column-ruler-tab} is
2366displayed. By changing these variables, you can change the column ruler
2367display.
2368
2369@kindex C-c C-w @r{(Fortran mode)}
2370@findex fortran-window-create-momentarily
2371 @kbd{C-c C-w} (@code{fortran-window-create-momentarily}) temporarily
2372splits the current window horizontally, making a window 72 columns
2373wide, so you can see any lines that are too long. Type a space to
2374restore the normal width.
2375
2376@kindex C-u C-c C-w @r{(Fortran mode)}
2377@findex fortran-window-create
2378 You can also split the window horizontally and continue editing with
2379the split in place. To do this, use @kbd{C-u C-c C-w} (@code{M-x
2380fortran-window-create}). By editing in this window you can
2381immediately see when you make a line too wide to be correct Fortran.
2382
2383@findex fortran-strip-sequence-nos
2384 The command @kbd{M-x fortran-strip-sequence-nos} deletes all text in
2385column 72 and beyond, on all lines in the current buffer. This is the
2386easiest way to get rid of old sequence numbers.
2387
2388@node Fortran Abbrev
2389@section Fortran Keyword Abbrevs
2390
2391 Fortran mode provides many built-in abbrevs for common keywords and
2392declarations. These are the same sort of abbrev that you can define
2393yourself. To use them, you must turn on Abbrev mode.
2394@xref{Abbrevs,,, emacs, the Emacs Manual}.
2395
2396 The built-in abbrevs are unusual in one way: they all start with a
2397semicolon. You cannot normally use semicolon in an abbrev, but Fortran
2398mode makes this possible by changing the syntax of semicolon to ``word
2399constituent.''
2400
2401 For example, one built-in Fortran abbrev is @samp{;c} for
2402@samp{continue}. If you insert @samp{;c} and then insert a punctuation
2403character such as a space or a newline, the @samp{;c} expands automatically
2404to @samp{continue}, provided Abbrev mode is enabled.@refill
2405
2406 Type @samp{;?} or @samp{;C-h} to display a list of all the built-in
2407Fortran abbrevs and what they stand for.
1225 2408
1226@node Index 2409@node Index
1227@unnumbered Index 2410@unnumbered Index
diff --git a/man/emacs.texi b/man/emacs.texi
index fc51a6e14dd..2c81305083d 100644
--- a/man/emacs.texi
+++ b/man/emacs.texi
@@ -103,8 +103,6 @@ Text Mode
103Outline Mode 103Outline Mode
104@TeX{} Mode 104@TeX{} Mode
105Formatted Text 105Formatted Text
106Fortran Mode
107Fortran Indentation
108Shell Command History 106Shell Command History
109 107
110The ones for Dired and Rmail have had the items turned into :: items 108The ones for Dired and Rmail have had the items turned into :: items
@@ -182,8 +180,6 @@ Advanced Features
182* Maintaining:: Features for maintaining large programs. 180* Maintaining:: Features for maintaining large programs.
183* Abbrevs:: How to define text abbreviations to reduce 181* Abbrevs:: How to define text abbreviations to reduce
184 the number of characters you must type. 182 the number of characters you must type.
185* Picture:: Editing pictures made up of characters
186 using the quarter-plane screen model.
187* Sending Mail:: Sending mail in Emacs. 183* Sending Mail:: Sending mail in Emacs.
188* Rmail:: Reading mail in Emacs. 184* Rmail:: Reading mail in Emacs.
189* Dired:: You can ``edit'' a directory to manage files in it. 185* Dired:: You can ``edit'' a directory to manage files in it.
@@ -525,7 +521,6 @@ Editing Programs
525* Misc for Programs:: Other Emacs features useful for editing programs. 521* Misc for Programs:: Other Emacs features useful for editing programs.
526* C Modes:: Special commands of C, C++, Objective-C, 522* C Modes:: Special commands of C, C++, Objective-C,
527 Java, and Pike modes. 523 Java, and Pike modes.
528* Fortran:: Fortran mode and its special features.
529* Asm Mode:: Asm mode and its special features. 524* Asm Mode:: Asm mode and its special features.
530 525
531Top-Level Definitions, or Defuns 526Top-Level Definitions, or Defuns
@@ -572,15 +567,6 @@ C and Related Modes
572* Other C Commands:: Filling comments, viewing expansion of macros, 567* Other C Commands:: Filling comments, viewing expansion of macros,
573 and other neat features. 568 and other neat features.
574 569
575Fortran Mode
576
577* Fortran Motion:: Moving point by statements or subprograms.
578* Fortran Indent:: Indentation commands for Fortran.
579* Fortran Comments:: Inserting and aligning comments.
580* Fortran Autofill:: Auto fill minor mode for Fortran.
581* Fortran Columns:: Measuring columns for valid Fortran.
582* Fortran Abbrev:: Built-in abbrevs for Fortran keywords.
583
584Compiling and Testing Programs 570Compiling and Testing Programs
585 571
586* Compilation:: Compiling programs in languages other 572* Compilation:: Compiling programs in languages other
@@ -615,7 +601,6 @@ Maintaining Large Programs
615* Format of ChangeLog:: What the change log file looks like. 601* Format of ChangeLog:: What the change log file looks like.
616* Tags:: Go direct to any function in your program in one 602* Tags:: Go direct to any function in your program in one
617 command. Tags remembers which file it is in. 603 command. Tags remembers which file it is in.
618* Emerge:: A convenient way of merging two versions of a program.
619 604
620Tags Tables 605Tags Tables
621 606
@@ -627,19 +612,6 @@ Tags Tables
627* Tags Search:: Using a tags table for searching and replacing. 612* Tags Search:: Using a tags table for searching and replacing.
628* List Tags:: Listing and finding tags defined in a file. 613* List Tags:: Listing and finding tags defined in a file.
629 614
630Merging Files with Emerge
631
632* Overview of Emerge:: How to start Emerge. Basic concepts.
633* Submodes of Emerge:: Fast mode vs. Edit mode.
634 Skip Prefers mode and Auto Advance mode.
635* State of Difference:: You do the merge by specifying state A or B
636 for each difference.
637* Merge Commands:: Commands for selecting a difference,
638 changing states of differences, etc.
639* Exiting Emerge:: What to do when you've finished the merge.
640* Combining in Emerge:: How to keep both alternatives for a difference.
641* Fine Points of Emerge:: Misc.
642
643Abbrevs 615Abbrevs
644 616
645* Abbrev Concepts:: Fundamentals of defined abbrevs. 617* Abbrev Concepts:: Fundamentals of defined abbrevs.
@@ -650,14 +622,6 @@ Abbrevs
650* Dynamic Abbrevs:: Abbreviations for words already in the buffer. 622* Dynamic Abbrevs:: Abbreviations for words already in the buffer.
651* Dabbrev Customization:: What is a word, for dynamic abbrevs. Case handling. 623* Dabbrev Customization:: What is a word, for dynamic abbrevs. Case handling.
652 624
653Editing Pictures
654
655* Basic Picture:: Basic concepts and simple commands of Picture Mode.
656* Insert in Picture:: Controlling direction of cursor motion
657 after "self-inserting" characters.
658* Tabs in Picture:: Various features for tab stops and indentation.
659* Rectangles in Picture:: Clearing and superimposing rectangles.
660
661Sending Mail 625Sending Mail
662 626
663* Mail Format:: Format of the mail being composed. 627* Mail Format:: Format of the mail being composed.
@@ -1179,7 +1143,6 @@ shell commands.
1179@include building.texi 1143@include building.texi
1180@include maintaining.texi 1144@include maintaining.texi
1181@include abbrevs.texi 1145@include abbrevs.texi
1182@include picture.texi
1183@include sending.texi 1146@include sending.texi
1184@include rmail.texi 1147@include rmail.texi
1185@include dired.texi 1148@include dired.texi
diff --git a/man/files.texi b/man/files.texi
index 23846167b6e..fa65ef32068 100644
--- a/man/files.texi
+++ b/man/files.texi
@@ -1290,7 +1290,7 @@ terms of capabilities, it is the weakest of the six that VC supports.
1290VC compensates for certain features missing in SCCS (snapshots, for 1290VC compensates for certain features missing in SCCS (snapshots, for
1291example) by implementing them itself, but some other VC features, such 1291example) by implementing them itself, but some other VC features, such
1292as multiple branches, are not available with SCCS. Since SCCS is 1292as multiple branches, are not available with SCCS. Since SCCS is
1293non-free, not respecting its users freedom,d, you should not use it; 1293non-free, not respecting its users freedom, you should not use it;
1294use its free replacement CSSC instead. But you should use CSSC only 1294use its free replacement CSSC instead. But you should use CSSC only
1295if for some reason you cannot use RCS, or one of the higher-level 1295if for some reason you cannot use RCS, or one of the higher-level
1296systems such as CVS or GNU Arch. 1296systems such as CVS or GNU Arch.
@@ -1611,8 +1611,8 @@ Examine version @var{version} of the visited file, in a buffer of its
1611own. 1611own.
1612 1612
1613@item C-x v = 1613@item C-x v =
1614Compare the current buffer contents with the latest checked-in version 1614Compare the current buffer contents with the master version from which
1615of the file. 1615you started editing.
1616 1616
1617@item C-u C-x v = @var{file} @key{RET} @var{oldvers} @key{RET} @var{newvers} @key{RET} 1617@item C-u C-x v = @var{file} @key{RET} @var{oldvers} @key{RET} @var{newvers} @key{RET}
1618Compare the specified two versions of @var{file}. 1618Compare the specified two versions of @var{file}.
@@ -1635,10 +1635,11 @@ and create a branch from it. @xref{Branches}.)
1635 It is usually more convenient to compare two versions of the file, 1635 It is usually more convenient to compare two versions of the file,
1636with the command @kbd{C-x v =} (@code{vc-diff}). Plain @kbd{C-x v =} 1636with the command @kbd{C-x v =} (@code{vc-diff}). Plain @kbd{C-x v =}
1637compares the current buffer contents (saving them in the file if 1637compares the current buffer contents (saving them in the file if
1638necessary) with the last checked-in version of the file. @kbd{C-u C-x 1638necessary) with the master version from which you started editing the
1639v =}, with a numeric argument, reads a file name and two version 1639file (this is not necessarily the latest version of the file).
1640numbers, then compares those versions of the specified file. Both 1640@kbd{C-u C-x v =}, with a numeric argument, reads a file name and two
1641forms display the output in a special buffer in another window. 1641version numbers, then compares those versions of the specified file.
1642Both forms display the output in a special buffer in another window.
1642 1643
1643 You can specify a checked-in version by its number; an empty input 1644 You can specify a checked-in version by its number; an empty input
1644specifies the current contents of the work file (which may be different 1645specifies the current contents of the work file (which may be different
@@ -1669,7 +1670,7 @@ versions are not, in general, present as files on your disk.)
1669 1670
1670@findex vc-annotate 1671@findex vc-annotate
1671@kindex C-x v g 1672@kindex C-x v g
1672 For some backends, you can display the file @dfn{annotated} with 1673 For some back ends, you can display the file @dfn{annotated} with
1673per-line version information and using colors to enhance the visual 1674per-line version information and using colors to enhance the visual
1674appearance, with the command @kbd{M-x vc-annotate}. 1675appearance, with the command @kbd{M-x vc-annotate}.
1675It creates a new buffer (the ``annotate buffer'') displaying the 1676It creates a new buffer (the ``annotate buffer'') displaying the
@@ -1720,7 +1721,7 @@ line.
1720@item W 1721@item W
1721Annotate the workfile version--the one you are editing. If you used 1722Annotate the workfile version--the one you are editing. If you used
1722@kbd{P} and @kbd{N} to browse to other revisions, use this key to 1723@kbd{P} and @kbd{N} to browse to other revisions, use this key to
1723return to the latest version. 1724return to your current version.
1724@end table 1725@end table
1725 1726
1726@node Secondary VC Commands 1727@node Secondary VC Commands
@@ -1840,7 +1841,8 @@ current line was committed.
1840 1841
1841@table @kbd 1842@table @kbd
1842@item C-x v u 1843@item C-x v u
1843Revert the buffer and the file to the last checked-in version. 1844Revert the buffer and the file to the version from which you started
1845editing the file.
1844 1846
1845@item C-x v c 1847@item C-x v c
1846Remove the last-entered change from the master for the visited file. 1848Remove the last-entered change from the master for the visited file.
@@ -1850,11 +1852,11 @@ This undoes your last check-in.
1850@kindex C-x v u 1852@kindex C-x v u
1851@findex vc-revert-buffer 1853@findex vc-revert-buffer
1852 If you want to discard your current set of changes and revert to the 1854 If you want to discard your current set of changes and revert to the
1853last version checked in, use @kbd{C-x v u} (@code{vc-revert-buffer}). 1855version from which you started editing the file, use @kbd{C-x v u}
1854This leaves the file unlocked; if locking is in use, you must first lock 1856(@code{vc-revert-buffer}). This leaves the file unlocked; if locking
1855the file again before you change it again. @kbd{C-x v u} requires 1857is in use, you must first lock the file again before you change it
1856confirmation, unless it sees that you haven't made any changes since the 1858again. @kbd{C-x v u} requires confirmation, unless it sees that you
1857last checked-in version. 1859haven't made any changes with respect to the master version.
1858 1860
1859 @kbd{C-x v u} is also the command to unlock a file if you lock it and 1861 @kbd{C-x v u} is also the command to unlock a file if you lock it and
1860then decide not to change it. 1862then decide not to change it.
@@ -1863,9 +1865,11 @@ then decide not to change it.
1863@findex vc-cancel-version 1865@findex vc-cancel-version
1864 To cancel a change that you already checked in, use @kbd{C-x v c} 1866 To cancel a change that you already checked in, use @kbd{C-x v c}
1865(@code{vc-cancel-version}). This command discards all record of the 1867(@code{vc-cancel-version}). This command discards all record of the
1866most recent checked-in version. @kbd{C-x v c} also offers to revert 1868most recent checked-in version, but only if your work file corresponds
1867your work file and buffer to the previous version (the one that precedes 1869to that version---you cannot use @kbd{C-x v c} to cancel a version
1868the version that is deleted). 1870that is not the latest on its branch. @kbd{C-x v c} also offers to
1871revert your work file and buffer to the previous version (the one that
1872precedes the version that is deleted).
1869 1873
1870 If you answer @kbd{no}, VC keeps your changes in the buffer, and locks 1874 If you answer @kbd{no}, VC keeps your changes in the buffer, and locks
1871the file. The no-revert option is useful when you have checked in a 1875the file. The no-revert option is useful when you have checked in a
@@ -1963,6 +1967,24 @@ The files @samp{file1} and @samp{file2} are under version control,
1963have also been checked in to the repository---you need to merge them 1967have also been checked in to the repository---you need to merge them
1964with the work file before you can check it in. 1968with the work file before you can check it in.
1965 1969
1970@vindex vc-stay-local
1971@vindex vc-cvs-stay-local
1972 In the above, if the repository were on a remote machine, VC would
1973only contact it when the variable @code{vc-stay-local} (or
1974@code{vc-cvs-stay-local}) is nil (@pxref{CVS Options}). This is
1975because access to the repository may be slow, or you may be working
1976offline and not have access to the repository at all. As a
1977consequence, VC would not be able to tell you that @samp{file3.c} is
1978in the ``merge'' state; you would learn that only when you try to
1979check-in your modified copy of the file, or use a command such as
1980@kbd{C-x v m}.
1981
1982 In practice, this is not a problem because CVS handles this case
1983consistently whenever it arises. In VC, you'll simply get prompted to
1984merge the remote changes into your work file first. The benefits of
1985less network communication usually outweigh the disadvantage of not
1986seeing remote changes immediately.
1987
1966@vindex vc-directory-exclusion-list 1988@vindex vc-directory-exclusion-list
1967 When VC Dired displays subdirectories (in the ``full'' display mode), 1989 When VC Dired displays subdirectories (in the ``full'' display mode),
1968it omits some that should never contain any files under version control. 1990it omits some that should never contain any files under version control.
@@ -2420,12 +2442,16 @@ or a snapshot against a named version.
2420support. They use RCS's native facilities for this, so 2442support. They use RCS's native facilities for this, so
2421snapshots made using RCS through VC are visible even when you bypass VC. 2443snapshots made using RCS through VC are visible even when you bypass VC.
2422 2444
2445 With CVS, Meta-CVS, and Subversion, VC also uses the native
2446mechanism provided by that back end to make snapshots and retrieve them
2447(@dfn{tags} for CVS and Meta-CVS, @dfn{copies} for Subversion).
2448
2423@c worded verbosely to avoid overfull hbox. 2449@c worded verbosely to avoid overfull hbox.
2424 For SCCS, VC implements snapshots itself. The files it uses contain 2450 For SCCS, VC implements snapshots itself. The files it uses contain
2425name/file/version-number triples. These snapshots are visible only 2451name/file/version-number triples. These snapshots are visible only
2426through VC. 2452through VC.
2427 2453
2428@c ??? What about CVS? 2454 There is no support for VC snapshots using GNU Arch yet.
2429 2455
2430 A snapshot is a set of checked-in versions. So make sure that all the 2456 A snapshot is a set of checked-in versions. So make sure that all the
2431files are checked in and not locked when you make a snapshot. 2457files are checked in and not locked when you make a snapshot.
@@ -2479,9 +2505,8 @@ in that directory, create new entries for versions checked in since the
2479most recent entry in the change log file. 2505most recent entry in the change log file.
2480(@code{vc-update-change-log}). 2506(@code{vc-update-change-log}).
2481 2507
2482This command works with RCS or CVS only, not with SCCS. 2508This command works with RCS or CVS only, not with any of the other
2483 2509back ends.
2484@c ??? What about other back ends?
2485 2510
2486@item C-u C-x v a 2511@item C-u C-x v a
2487As above, but only find entries for the current buffer's file. 2512As above, but only find entries for the current buffer's file.
@@ -2620,7 +2645,7 @@ mention the file, so that they use the new name; despite this, the
2620snapshot thus modified may not completely work (@pxref{Snapshot 2645snapshot thus modified may not completely work (@pxref{Snapshot
2621Caveats}). 2646Caveats}).
2622 2647
2623 Some backends do not provide an explicit rename operation to their 2648 Some back ends do not provide an explicit rename operation to their
2624repositories. After issuing @code{vc-rename-file}, use @kbd{C-x v v} 2649repositories. After issuing @code{vc-rename-file}, use @kbd{C-x v v}
2625on the original and renamed buffers and provide the necessary edit 2650on the original and renamed buffers and provide the necessary edit
2626log. 2651log.
@@ -2634,22 +2659,26 @@ someone else.
2634 Sometimes it is convenient to put version identification strings 2659 Sometimes it is convenient to put version identification strings
2635directly into working files. Certain special strings called 2660directly into working files. Certain special strings called
2636@dfn{version headers} are replaced in each successive version by the 2661@dfn{version headers} are replaced in each successive version by the
2637number of that version. 2662number of that version, the name of the user who created it, and other
2638 2663relevant information. All of the back ends that VC supports have such
2639@c ??? How does this relate to CVS? 2664a mechanism, except GNU Arch.
2640 2665
2641 If you are using RCS, and version headers are present in your working 2666 VC does not normally use the information contained in these headers.
2642files, Emacs can use them to determine the current version and the 2667The exception is RCS---with RCS, version headers are sometimes more
2643locking state of the files. This is more reliable than referring to the 2668reliable than the master file to determine which version of the file
2644master files, which is done when there are no version headers. Note 2669you are editing. Note that in a multi-branch environment, version
2645that in a multi-branch environment, version headers are necessary to 2670headers are necessary to make VC behave correctly (@pxref{Multi-User
2646make VC behave correctly (@pxref{Multi-User Branching}). 2671Branching}).
2647 2672
2648 Searching for version headers is controlled by the variable 2673 Searching for RCS version headers is controlled by the variable
2649@code{vc-consult-headers}. If it is non-@code{nil} (the default), 2674@code{vc-consult-headers}. If it is non-@code{nil} (the default),
2650Emacs searches for headers to determine the version number you are 2675Emacs searches for headers to determine the version number you are
2651editing. Setting it to @code{nil} disables this feature. 2676editing. Setting it to @code{nil} disables this feature.
2652 2677
2678 Note that although CVS uses the same kind of version headers as RCS
2679does, VC never searches for these headers if you are using CVS,
2680regardless of the above setting.
2681
2653@kindex C-x v h 2682@kindex C-x v h
2654@findex vc-insert-headers 2683@findex vc-insert-headers
2655 You can use the @kbd{C-x v h} command (@code{vc-insert-headers}) to 2684 You can use the @kbd{C-x v h} command (@code{vc-insert-headers}) to
@@ -2872,23 +2901,25 @@ and CVS takes care to notify other developers of the fact that you
2872intend to change the file. See the CVS documentation for details on 2901intend to change the file. See the CVS documentation for details on
2873using the watch feature. 2902using the watch feature.
2874 2903
2904@vindex vc-stay-local
2875@vindex vc-cvs-stay-local 2905@vindex vc-cvs-stay-local
2876@cindex remote repositories (CVS) 2906@cindex remote repositories (CVS)
2877 When a file's repository is on a remote machine, VC tries to keep 2907 When a file's repository is on a remote machine, VC tries to keep
2878network interactions to a minimum. This is controlled by the variable 2908network interactions to a minimum. This is controlled by the variable
2879@code{vc-cvs-stay-local}. If it is @code{t} (the default), then VC uses 2909@code{vc-cvs-stay-local}. There is another variable,
2880only the entry in the local CVS subdirectory to determine the file's 2910@code{vc-stay-local}, which enables the feature also for other back
2881state (and possibly information returned by previous CVS commands). One 2911ends that support it, including CVS. In the following, we will talk
2882consequence of this is that when you have modified a file, and somebody 2912only about @code{vc-cvs-stay-local}, but everything applies to
2883else has already checked in other changes to the file, you are not 2913@code{vc-stay-local} as well.
2884notified of it until you actually try to commit. (But you can try to
2885pick up any recent changes from the repository first, using @kbd{C-x v m
2886@key{RET}}, @pxref{Merging}).
2887 2914
2888@vindex vc-cvs-global-switches 2915If @code{vc-cvs-stay-local} is @code{t} (the default), then VC uses
2889 The variable @code{vc-cvs-global-switches}, if non-@code{nil}, 2916only the entry in the local CVS subdirectory to determine the file's
2890should be a string specifying switches to pass to CVS for all CVS 2917state (and possibly information returned by previous CVS commands).
2891operations. 2918One consequence of this is that when you have modified a file, and
2919somebody else has already checked in other changes to the file, you
2920are not notified of it until you actually try to commit. (But you can
2921try to pick up any recent changes from the repository first, using
2922@kbd{C-x v m @key{RET}}, @pxref{Merging}).
2892 2923
2893 When @code{vc-cvs-stay-local} is @code{t}, VC also makes local 2924 When @code{vc-cvs-stay-local} is @code{t}, VC also makes local
2894version backups, so that simple diff and revert operations are 2925version backups, so that simple diff and revert operations are
@@ -2903,6 +2934,12 @@ repositories. It also does not make any version backups.
2903that is matched against the repository host name; VC then stays local 2934that is matched against the repository host name; VC then stays local
2904only for repositories from hosts that match the pattern. 2935only for repositories from hosts that match the pattern.
2905 2936
2937@vindex vc-cvs-global-switches
2938 You can specify additional command line options to pass to all CVS
2939operations in the variable @code{vc-cvs-global-switches}. These
2940switches are inserted immediately after the @code{cvs} command, before
2941the name of the operation to invoke.
2942
2906@node Directories 2943@node Directories
2907@section File Directories 2944@section File Directories
2908 2945
@@ -3037,8 +3074,8 @@ typically the result of a failed merge from a version control system
3037mode provides commands to resolve conflicts by selecting specific 3074mode provides commands to resolve conflicts by selecting specific
3038changes. 3075changes.
3039 3076
3040 See also @ref{Emerge}, and @ref{Top,,, ediff, The Ediff Manual}, for 3077 @inforef{Emerge,, emacs-xtra} for the Emerge facility, which
3041convenient facilities for merging two similar files. 3078provides a powerful interface for merging files.
3042 3079
3043@node Misc File Ops 3080@node Misc File Ops
3044@section Miscellaneous File Operations 3081@section Miscellaneous File Operations
diff --git a/man/gnus.texi b/man/gnus.texi
index c64305a3a66..7aa367bb310 100644
--- a/man/gnus.texi
+++ b/man/gnus.texi
@@ -15293,7 +15293,7 @@ When the marks file is used (which it is by default), @code{nnfolder}
15293servers have the property that you may backup them using @code{tar} or 15293servers have the property that you may backup them using @code{tar} or
15294similar, and later be able to restore them into Gnus (by adding the 15294similar, and later be able to restore them into Gnus (by adding the
15295proper @code{nnfolder} server) and have all your marks be preserved. 15295proper @code{nnfolder} server) and have all your marks be preserved.
15296Marks for a group is usually stored in a file named as the mbox file 15296Marks for a group are usually stored in a file named as the mbox file
15297with @code{.mrk} concatenated to it (but see 15297with @code{.mrk} concatenated to it (but see
15298@code{nnfolder-marks-file-suffix}) within the @code{nnfolder} 15298@code{nnfolder-marks-file-suffix}) within the @code{nnfolder}
15299directory. Individual @code{nnfolder} groups are also possible to 15299directory. Individual @code{nnfolder} groups are also possible to
diff --git a/man/help.texi b/man/help.texi
index 634dca792f0..84a3656ad57 100644
--- a/man/help.texi
+++ b/man/help.texi
@@ -482,14 +482,16 @@ Move point back to the previous cross reference.
482@item Mouse-1 482@item Mouse-1
483@itemx Mouse-2 483@itemx Mouse-2
484Follow a cross reference that you click on. 484Follow a cross reference that you click on.
485@item C-c C-c
486Show all documentation about the symbol at point.
485@end table 487@end table
486 488
487 When a function name (@pxref{M-x,, Running Commands by Name}) or 489 When a function name (@pxref{M-x,, Running Commands by Name}),
488variable name (@pxref{Variables}) appears in the documentation, it 490variable name (@pxref{Variables}), or face name (@pxref{Faces}) appears
489normally appears inside paired single-quotes. You can click on the 491in the documentation, it normally appears inside paired single-quotes.
490name with @kbd{Mouse-1} or @kbd{Mouse-2}, or move point there and type 492You can click on the name with @kbd{Mouse-1} or @kbd{Mouse-2}, or move
491@key{RET}, to view the documentation of that command or variable. Use 493point there and type @key{RET}, to view the documentation of that
492@kbd{C-c C-b} to retrace your steps. 494command, variable or face. Use @kbd{C-c C-b} to retrace your steps.
493 495
494@cindex URL, viewing in help 496@cindex URL, viewing in help
495@cindex help, viewing web pages 497@cindex help, viewing web pages
@@ -510,6 +512,12 @@ the help text. @key{TAB} (@code{help-next-ref}) moves point down to the
510next cross reference. Use @kbd{S-@key{TAB}} to move point up to the 512next cross reference. Use @kbd{S-@key{TAB}} to move point up to the
511previous cross reference (@code{help-previous-ref}). 513previous cross reference (@code{help-previous-ref}).
512 514
515To view all documentation about a symbol, whether quoted or not, move
516point over the symbol and type @kbd{C-c C-c}
517(@code{help-follow-symbol}). This shows all available documentation
518about the symbol as a variable, function or face. Just like for
519quoted cross references, you can use @kbd{C-c C-b} to retrace your steps.
520
513@node Misc Help 521@node Misc Help
514@section Other Help Commands 522@section Other Help Commands
515 523
diff --git a/man/maintaining.texi b/man/maintaining.texi
index 9836aae4e83..f0b5f1c31af 100644
--- a/man/maintaining.texi
+++ b/man/maintaining.texi
@@ -14,7 +14,6 @@ also particularly useful for this purpose.
14* Format of ChangeLog:: What the change log file looks like. 14* Format of ChangeLog:: What the change log file looks like.
15* Tags:: Go direct to any function in your program in one 15* Tags:: Go direct to any function in your program in one
16 command. Tags remembers which file it is in. 16 command. Tags remembers which file it is in.
17* Emerge:: A convenient way of merging two versions of a program.
18@end menu 17@end menu
19 18
20@node Change Log 19@node Change Log
@@ -846,393 +845,6 @@ details.
846 You can also use the collection of tag names to complete a symbol 845 You can also use the collection of tag names to complete a symbol
847name in the buffer. @xref{Symbol Completion}. 846name in the buffer. @xref{Symbol Completion}.
848 847
849@node Emerge
850@section Merging Files with Emerge
851@cindex Emerge
852@cindex merging files
853
854 It's not unusual for programmers to get their signals crossed and
855modify the same program in two different directions. To recover from
856this confusion, you need to merge the two versions. Emerge makes this
857easier. See also @ref{Comparing Files}, for other ways to compare
858files, and @ref{Top, Ediff,, ediff, The Ediff Manual}.
859
860@menu
861* Overview of Emerge:: How to start Emerge. Basic concepts.
862* Submodes of Emerge:: Fast mode vs. Edit mode.
863 Skip Prefers mode and Auto Advance mode.
864* State of Difference:: You do the merge by specifying state A or B
865 for each difference.
866* Merge Commands:: Commands for selecting a difference,
867 changing states of differences, etc.
868* Exiting Emerge:: What to do when you've finished the merge.
869* Combining in Emerge:: How to keep both alternatives for a difference.
870* Fine Points of Emerge:: Misc.
871@end menu
872
873@node Overview of Emerge
874@subsection Overview of Emerge
875
876 To start Emerge, run one of these four commands:
877
878@table @kbd
879@item M-x emerge-files
880@findex emerge-files
881Merge two specified files.
882
883@item M-x emerge-files-with-ancestor
884@findex emerge-files-with-ancestor
885Merge two specified files, with reference to a common ancestor.
886
887@item M-x emerge-buffers
888@findex emerge-buffers
889Merge two buffers.
890
891@item M-x emerge-buffers-with-ancestor
892@findex emerge-buffers-with-ancestor
893Merge two buffers with reference to a common ancestor in a third
894buffer.
895@end table
896
897@cindex merge buffer (Emerge)
898@cindex A and B buffers (Emerge)
899 The Emerge commands compare two files or buffers, and display the
900comparison in three buffers: one for each input text (the @dfn{A buffer}
901and the @dfn{B buffer}), and one (the @dfn{merge buffer}) where merging
902takes place. The merge buffer shows the full merged text, not just the
903differences. Wherever the two input texts differ, you can choose which
904one of them to include in the merge buffer.
905
906 The Emerge commands that take input from existing buffers use only the
907accessible portions of those buffers, if they are narrowed
908(@pxref{Narrowing}).
909
910 If a common ancestor version is available, from which the two texts to
911be merged were both derived, Emerge can use it to guess which
912alternative is right. Wherever one current version agrees with the
913ancestor, Emerge presumes that the other current version is a deliberate
914change which should be kept in the merged version. Use the
915@samp{with-ancestor} commands if you want to specify a common ancestor
916text. These commands read three file or buffer names---variant A,
917variant B, and the common ancestor.
918
919 After the comparison is done and the buffers are prepared, the
920interactive merging starts. You control the merging by typing special
921@dfn{merge commands} in the merge buffer (@pxref{Merge Commands}).
922For each run of differences between the input texts, you can choose
923which one of them to keep, or edit them both together.
924
925 The merge buffer uses a special major mode, Emerge mode, with commands
926for making these choices. But you can also edit the buffer with
927ordinary Emacs commands.
928
929 At any given time, the attention of Emerge is focused on one
930particular difference, called the @dfn{selected} difference. This
931difference is marked off in the three buffers like this:
932
933@example
934vvvvvvvvvvvvvvvvvvvv
935@var{text that differs}
936^^^^^^^^^^^^^^^^^^^^
937@end example
938
939@noindent
940Emerge numbers all the differences sequentially and the mode
941line always shows the number of the selected difference.
942
943 Normally, the merge buffer starts out with the A version of the text.
944But when the A version of a difference agrees with the common ancestor,
945then the B version is initially preferred for that difference.
946
947 Emerge leaves the merged text in the merge buffer when you exit. At
948that point, you can save it in a file with @kbd{C-x C-w}. If you give a
949numeric argument to @code{emerge-files} or
950@code{emerge-files-with-ancestor}, it reads the name of the output file
951using the minibuffer. (This is the last file name those commands read.)
952Then exiting from Emerge saves the merged text in the output file.
953
954 Normally, Emerge commands save the output buffer in its file when you
955exit. If you abort Emerge with @kbd{C-]}, the Emerge command does not
956save the output buffer, but you can save it yourself if you wish.
957
958@node Submodes of Emerge
959@subsection Submodes of Emerge
960
961 You can choose between two modes for giving merge commands: Fast mode
962and Edit mode. In Fast mode, basic merge commands are single
963characters, but ordinary Emacs commands are disabled. This is
964convenient if you use only merge commands. In Edit mode, all merge
965commands start with the prefix key @kbd{C-c C-c}, and the normal Emacs
966commands are also available. This allows editing the merge buffer, but
967slows down Emerge operations.
968
969 Use @kbd{e} to switch to Edit mode, and @kbd{C-c C-c f} to switch to
970Fast mode. The mode line indicates Edit and Fast modes with @samp{E}
971and @samp{F}.
972
973 Emerge has two additional submodes that affect how particular merge
974commands work: Auto Advance mode and Skip Prefers mode.
975
976 If Auto Advance mode is in effect, the @kbd{a} and @kbd{b} commands
977advance to the next difference. This lets you go through the merge
978faster as long as you simply choose one of the alternatives from the
979input. The mode line indicates Auto Advance mode with @samp{A}.
980
981 If Skip Prefers mode is in effect, the @kbd{n} and @kbd{p} commands
982skip over differences in states prefer-A and prefer-B (@pxref{State of
983Difference}). Thus you see only differences for which neither version
984is presumed ``correct.'' The mode line indicates Skip Prefers mode with
985@samp{S}.
986
987@findex emerge-auto-advance-mode
988@findex emerge-skip-prefers-mode
989 Use the command @kbd{s a} (@code{emerge-auto-advance-mode}) to set or
990clear Auto Advance mode. Use @kbd{s s}
991(@code{emerge-skip-prefers-mode}) to set or clear Skip Prefers mode.
992These commands turn on the mode with a positive argument, turns it off
993with a negative or zero argument, and toggle the mode with no argument.
994
995@node State of Difference
996@subsection State of a Difference
997
998 In the merge buffer, a difference is marked with lines of @samp{v} and
999@samp{^} characters. Each difference has one of these seven states:
1000
1001@table @asis
1002@item A
1003The difference is showing the A version. The @kbd{a} command always
1004produces this state; the mode line indicates it with @samp{A}.
1005
1006@item B
1007The difference is showing the B version. The @kbd{b} command always
1008produces this state; the mode line indicates it with @samp{B}.
1009
1010@item default-A
1011@itemx default-B
1012The difference is showing the A or the B state by default, because you
1013haven't made a choice. All differences start in the default-A state
1014(and thus the merge buffer is a copy of the A buffer), except those for
1015which one alternative is ``preferred'' (see below).
1016
1017When you select a difference, its state changes from default-A or
1018default-B to plain A or B. Thus, the selected difference never has
1019state default-A or default-B, and these states are never displayed in
1020the mode line.
1021
1022The command @kbd{d a} chooses default-A as the default state, and @kbd{d
1023b} chooses default-B. This chosen default applies to all differences
1024which you haven't ever selected and for which no alternative is preferred.
1025If you are moving through the merge sequentially, the differences you
1026haven't selected are those following the selected one. Thus, while
1027moving sequentially, you can effectively make the A version the default
1028for some sections of the merge buffer and the B version the default for
1029others by using @kbd{d a} and @kbd{d b} between sections.
1030
1031@item prefer-A
1032@itemx prefer-B
1033The difference is showing the A or B state because it is
1034@dfn{preferred}. This means that you haven't made an explicit choice,
1035but one alternative seems likely to be right because the other
1036alternative agrees with the common ancestor. Thus, where the A buffer
1037agrees with the common ancestor, the B version is preferred, because
1038chances are it is the one that was actually changed.
1039
1040These two states are displayed in the mode line as @samp{A*} and @samp{B*}.
1041
1042@item combined
1043The difference is showing a combination of the A and B states, as a
1044result of the @kbd{x c} or @kbd{x C} commands.
1045
1046Once a difference is in this state, the @kbd{a} and @kbd{b} commands
1047don't do anything to it unless you give them a numeric argument.
1048
1049The mode line displays this state as @samp{comb}.
1050@end table
1051
1052@node Merge Commands
1053@subsection Merge Commands
1054
1055 Here are the Merge commands for Fast mode; in Edit mode, precede them
1056with @kbd{C-c C-c}:
1057
1058@table @kbd
1059@item p
1060Select the previous difference.
1061
1062@item n
1063Select the next difference.
1064
1065@item a
1066Choose the A version of this difference.
1067
1068@item b
1069Choose the B version of this difference.
1070
1071@item C-u @var{n} j
1072Select difference number @var{n}.
1073
1074@item .
1075Select the difference containing point. You can use this command in the
1076merge buffer or in the A or B buffer.
1077
1078@item q
1079Quit---finish the merge.
1080
1081@item C-]
1082Abort---exit merging and do not save the output.
1083
1084@item f
1085Go into Fast mode. (In Edit mode, this is actually @kbd{C-c C-c f}.)
1086
1087@item e
1088Go into Edit mode.
1089
1090@item l
1091Recenter (like @kbd{C-l}) all three windows.
1092
1093@item -
1094Specify part of a prefix numeric argument.
1095
1096@item @var{digit}
1097Also specify part of a prefix numeric argument.
1098
1099@item d a
1100Choose the A version as the default from here down in
1101the merge buffer.
1102
1103@item d b
1104Choose the B version as the default from here down in
1105the merge buffer.
1106
1107@item c a
1108Copy the A version of this difference into the kill ring.
1109
1110@item c b
1111Copy the B version of this difference into the kill ring.
1112
1113@item i a
1114Insert the A version of this difference at point.
1115
1116@item i b
1117Insert the B version of this difference at point.
1118
1119@item m
1120Put point and mark around the difference.
1121
1122@item ^
1123Scroll all three windows down (like @kbd{M-v}).
1124
1125@item v
1126Scroll all three windows up (like @kbd{C-v}).
1127
1128@item <
1129Scroll all three windows left (like @kbd{C-x <}).
1130
1131@item >
1132Scroll all three windows right (like @kbd{C-x >}).
1133
1134@item |
1135Reset horizontal scroll on all three windows.
1136
1137@item x 1
1138Shrink the merge window to one line. (Use @kbd{C-u l} to restore it
1139to full size.)
1140
1141@item x c
1142Combine the two versions of this difference (@pxref{Combining in
1143Emerge}).
1144
1145@item x f
1146Show the names of the files/buffers Emerge is operating on, in a Help
1147window. (Use @kbd{C-u l} to restore windows.)
1148
1149@item x j
1150Join this difference with the following one.
1151(@kbd{C-u x j} joins this difference with the previous one.)
1152
1153@item x s
1154Split this difference into two differences. Before you use this
1155command, position point in each of the three buffers at the place where
1156you want to split the difference.
1157
1158@item x t
1159Trim identical lines off the top and bottom of the difference.
1160Such lines occur when the A and B versions are
1161identical but differ from the ancestor version.
1162@end table
1163
1164@node Exiting Emerge
1165@subsection Exiting Emerge
1166
1167 The @kbd{q} command (@code{emerge-quit}) finishes the merge, storing
1168the results into the output file if you specified one. It restores the
1169A and B buffers to their proper contents, or kills them if they were
1170created by Emerge and you haven't changed them. It also disables the
1171Emerge commands in the merge buffer, since executing them later could
1172damage the contents of the various buffers.
1173
1174 @kbd{C-]} aborts the merge. This means exiting without writing the
1175output file. If you didn't specify an output file, then there is no
1176real difference between aborting and finishing the merge.
1177
1178 If the Emerge command was called from another Lisp program, then its
1179return value is @code{t} for successful completion, or @code{nil} if you
1180abort.
1181
1182@node Combining in Emerge
1183@subsection Combining the Two Versions
1184
1185 Sometimes you want to keep @emph{both} alternatives for a particular
1186difference. To do this, use @kbd{x c}, which edits the merge buffer
1187like this:
1188
1189@example
1190@group
1191#ifdef NEW
1192@var{version from A buffer}
1193#else /* not NEW */
1194@var{version from B buffer}
1195#endif /* not NEW */
1196@end group
1197@end example
1198
1199@noindent
1200@vindex emerge-combine-versions-template
1201While this example shows C preprocessor conditionals delimiting the two
1202alternative versions, you can specify the strings to use by setting
1203the variable @code{emerge-combine-versions-template} to a string of your
1204choice. In the string, @samp{%a} says where to put version A, and
1205@samp{%b} says where to put version B. The default setting, which
1206produces the results shown above, looks like this:
1207
1208@example
1209@group
1210"#ifdef NEW\n%a#else /* not NEW */\n%b#endif /* not NEW */\n"
1211@end group
1212@end example
1213
1214@node Fine Points of Emerge
1215@subsection Fine Points of Emerge
1216
1217 During the merge, you mustn't try to edit the A and B buffers yourself.
1218Emerge modifies them temporarily, but ultimately puts them back the way
1219they were.
1220
1221 You can have any number of merges going at once---just don't use any one
1222buffer as input to more than one merge at once, since the temporary
1223changes made in these buffers would get in each other's way.
1224
1225 Starting Emerge can take a long time because it needs to compare the
1226files fully. Emacs can't do anything else until @code{diff} finishes.
1227Perhaps in the future someone will change Emerge to do the comparison in
1228the background when the input files are large---then you could keep on
1229doing other things with Emacs until Emerge is ready to accept
1230commands.
1231
1232@vindex emerge-startup-hook
1233 After setting up the merge, Emerge runs the hook
1234@code{emerge-startup-hook} (@pxref{Hooks}).
1235
1236@ignore 848@ignore
1237 arch-tag: b9d83dfb-82ea-4ff6-bab5-05a3617091fb 849 arch-tag: b9d83dfb-82ea-4ff6-bab5-05a3617091fb
1238@end ignore 850@end ignore
diff --git a/man/makefile.w32-in b/man/makefile.w32-in
index 34bb5fe6435..93f79f49689 100644
--- a/man/makefile.w32-in
+++ b/man/makefile.w32-in
@@ -90,7 +90,6 @@ EMACSSOURCES= \
90 $(srcdir)/building.texi \ 90 $(srcdir)/building.texi \
91 $(srcdir)/maintaining.texi \ 91 $(srcdir)/maintaining.texi \
92 $(srcdir)/abbrevs.texi \ 92 $(srcdir)/abbrevs.texi \
93 $(srcdir)/picture.texi \
94 $(srcdir)/sending.texi \ 93 $(srcdir)/sending.texi \
95 $(srcdir)/rmail.texi \ 94 $(srcdir)/rmail.texi \
96 $(srcdir)/dired.texi \ 95 $(srcdir)/dired.texi \
diff --git a/man/mh-e.texi b/man/mh-e.texi
index be1d61d930c..180a093ceb8 100644
--- a/man/mh-e.texi
+++ b/man/mh-e.texi
@@ -11,8 +11,8 @@
11@set VERSION 7.93 11@set VERSION 7.93
12@c Edition of the manual. It is either empty for the first edition or 12@c Edition of the manual. It is either empty for the first edition or
13@c has the form ", nth Edition" (without the quotes). 13@c has the form ", nth Edition" (without the quotes).
14@set EDITION , 3rd Edition 14@set EDITION , 5th Edition
15@set UPDATED 2006-03-14 15@set UPDATED 2006-03-19
16@set UPDATE-MONTH March, 2006 16@set UPDATE-MONTH March, 2006
17 17
18@c Other variables. 18@c Other variables.
@@ -22,7 +22,7 @@
22@c Copyright 22@c Copyright
23@copying 23@copying
24This is version @value{VERSION}@value{EDITION} of @cite{The MH-E 24This is version @value{VERSION}@value{EDITION} of @cite{The MH-E
25Manual}, last updated @value{UPDATED} 25Manual}, last updated @value{UPDATED}.
26 26
27Copyright @copyright{} 1995, 27Copyright @copyright{} 1995,
28 2001, 2002, 2003, 2005, 2006 Free Software Foundation, Inc. 28 2001, 2002, 2003, 2005, 2006 Free Software Foundation, Inc.
@@ -664,30 +664,29 @@ get the big picture, and then you can read the manual as you wish.
664@node Sending Mail Tour, Reading Mail Tour, Tour Through MH-E, Tour Through MH-E 664@node Sending Mail Tour, Reading Mail Tour, Tour Through MH-E, Tour Through MH-E
665@section Sending Mail 665@section Sending Mail
666 666
667@cindex MH-Letter mode
668@cindex mode
669@cindex modes, MH-Letter
667@cindex sending mail 670@cindex sending mail
668@findex mh-smail 671@findex mh-smail
669@kindex M-x mh-smail 672@kindex M-x mh-smail
670 673
671Let's start our tour by sending ourselves a message which we can later 674Let's start our tour by sending ourselves a message which we can later
672read and process. Enter @kbd{M-x mh-smail} to invoke the MH-E program 675read and process. Enter @kbd{M-x mh-smail} to invoke the MH-E program
673to send messages. You will be prompted in the minibuffer by 676to send messages. Your message appears in an Emacs buffer whose
674@samp{To:}. Enter your login name. The next prompt is @samp{Cc:}. Hit 677mode@footnote{A @dfn{mode} changes Emacs to make it easier to edit a
675@key{RET} to indicate that no carbon copies are to be sent. At the 678particular type of text.} is MH-Letter.
676@samp{Subject:} prompt, enter @kbd{Test} or anything else that comes
677to mind.
678 679
679@cindex MH-Letter mode 680Enter your login name in the @samp{To:} header field. Press the
680@cindex modes, MH-Letter 681@key{TAB} twice to move the cursor past the @samp{Cc:} field, since no
681@cindex mode 682carbon copies are to be sent, and on to the @samp{Subject:} field.
683Enter @kbd{Test} or anything else that comes to mind.
682 684
683Once you've specified the recipients and subject, your message appears 685Press @key{TAB} again to move the cursor to the body of the message.
684in an Emacs buffer whose mode@footnote{A @dfn{mode} changes Emacs to 686Enter some text, using normal Emacs commands. You should now have
685make it easier to edit a particular type of text.} is MH-Letter. Enter 687something like this@footnote{If you're running Emacs under the X
686some text in the body of the message, using normal Emacs commands. You 688Window System, then you would also see a menu bar and a tool bar. I've
687should now have something like this@footnote{If you're running Emacs 689left out the menu bar and tool bar in all of the example screens.}:
688under the X Window System, then you would also see a menu bar. Under
689Emacs 21, you would also see a tool bar. I've left out the menu bar and
690tool bar in all of the example screens.}:
691 690
692@cartouche 691@cartouche
693@smallexample 692@smallexample
@@ -697,16 +696,17 @@ tool bar in all of the example screens.}:
697 696
698 697
699 698
700--:-- *scratch* (Lisp Interaction)--L1--All------------------------- 699--:-- *scratch* All L1 (Lisp Interaction)-------------------------
701To: wohler 700To: wohler
702cc: 701cc:
703Subject: Test 702Subject: Test
703X-Mailer: MH-E 8.0; nmh 1.1; GNU Emacs 22.1
704-------- 704--------
705This is a test message to get the wheels churning...# 705This is a test message to get the wheels churning...#
706 706
707 707
708--:** @{draft@} (MH-Letter)--L5--All----------------------------------- 708--:** @{draft@} All L5 (MH-Letter)----------------------------------
709 709Type C-c C-c to send message, C-C ? for help
710@end smallexample 710@end smallexample
711@end cartouche 711@end cartouche
712@i{MH-E message composition window} 712@i{MH-E message composition window}
@@ -780,19 +780,18 @@ You should see the scan line for your message, and perhaps others. Use
780 3 t08/24 root received fax files on Wed Aug 24 11:00:13 PDT 1 780 3 t08/24 root received fax files on Wed Aug 24 11:00:13 PDT 1
781# 4+t08/24 To:wohler Test<<This is a test message to get the wheels 781# 4+t08/24 To:wohler Test<<This is a test message to get the wheels
782 782
783-:%% @{+inbox@} 4 msgs (1-4) (MH-Folder Show)--L4--Bot-------------- 783-:%% @{+inbox/select@} 4 msgs (1-4) Bot L4 (MH-Folder Show)---------
784To: wohler 784To: wohler
785Subject: Test 785Subject: Test
786Date: Wed, 24 Aug 1994 13:01:13 -0700 786X-Mailer: MH-E 8.0; nmh 1.1; GNU Emacs 22.1
787Date: Fri, 17 Mar 2006 10:49:11 -0800
787From: Bill Wohler <wohler@@stop.mail-abuse.org> 788From: Bill Wohler <wohler@@stop.mail-abuse.org>
788 789
789This is a test message to get the wheels churning... 790This is a test message to get the wheels churning...
790 791
791 792
792 793
793 794--:-- @{show-+inbox@} 4 All L1 (MH-Show)----------------------------
794
795--:-- @{show-+inbox@} 4 (MH-Show)--L1--All---------------------------
796 795
797@end smallexample 796@end smallexample
798@end cartouche 797@end cartouche
@@ -816,31 +815,37 @@ ourselves. Ensure that the cursor is still on the same line as your
816test message and type @kbd{r}. You are prompted in the minibuffer with 815test message and type @kbd{r}. You are prompted in the minibuffer with
817@samp{Reply to whom:}. Here MH-E is asking whether you'd like to reply 816@samp{Reply to whom:}. Here MH-E is asking whether you'd like to reply
818to the original sender only, to the sender and primary recipients, or 817to the original sender only, to the sender and primary recipients, or
819to the sender and all recipients. If you simply hit @key{RET}, you'll 818to the sender and all recipients. You can press @key{TAB} to see these
820reply only to the sender. Hit @key{RET} now. 819choices. If you simply press @key{RET}, you'll reply only to the
820sender. Press @key{RET} now.
821 821
822You'll find yourself in an Emacs buffer similar to that when you were 822You'll find yourself in an Emacs buffer similar to that when you were
823sending the original message, like this: 823sending the original message, like this:
824 824
825@cartouche 825@cartouche
826@smallexample 826@smallexample
827To: wohler 827To:
828Subject: Re: Test 828cc:
829In-reply-to: Bill Wohler's message of Wed, 24 Aug 1994 13:01:13 -0700 829Subject: Re: Test
830 <199408242001.NAA00505@@stop.mail-abuse.org> 830In-reply-to: <31054.1142621351@@stop.mail-abuse.org>
831References: <31054.1142621351@@stop.mail-abuse.org>
832Comments: In-reply-to Bill Wohler <wohler@@stop.mail-abuse.org>
833 message dated "Fri, 17 Mar 2006 10:49:11 -0800."
834X-Mailer: MH-E 8.0; nmh 1.1; GNU Emacs 22.1
831-------- 835--------
832# 836#
833 837
834--:-- @{draft@} (MH-Letter)--L11--Bot--------------------------------- 838--:-- @{draft@} All L10 (MH-Letter)----------------------------------
835To: wohler 839To: wohler
836Subject: Test 840Subject: Test
837Date: Wed, 24 Aug 1994 13:01:13 -0700 841X-Mailer: MH-E 8.0; nmh 1.1; GNU Emacs 22.1
842Date: Fri, 17 Mar 2006 10:49:11 -0800
838From: Bill Wohler <wohler@@stop.mail-abuse.org> 843From: Bill Wohler <wohler@@stop.mail-abuse.org>
839 844
840This is a test message to get the wheels churning... 845This is a test message to get the wheels churning...
841 846
842--:-- @{show-+inbox@} 4 (MH-Show)--L1--All---------------------------- 847--:-- @{show-+inbox@} 4 All L1 (MH-Show)----------------------------
843Composing a reply...done 848Type C-c C-c to send message, C-c ? for help
844@end smallexample 849@end smallexample
845@end cartouche 850@end cartouche
846@i{Composition window during reply} 851@i{Composition window during reply}
@@ -1418,9 +1423,9 @@ mode line as well, add the following to @file{~/.emacs}:
1418 1423
1419@findex display-time 1424@findex display-time
1420 1425
1421@lisp 1426@smalllisp
1422(display-time) 1427(display-time)
1423@end lisp 1428@end smalllisp
1424 1429
1425@cindex @command{inc} 1430@cindex @command{inc}
1426@cindex incorporating 1431@cindex incorporating
@@ -2297,9 +2302,9 @@ other graphical widgets. @xref{Viewing}.
2297 2302
2298Attachments in MH-E are indicated by @dfn{buttons} like this: 2303Attachments in MH-E are indicated by @dfn{buttons} like this:
2299 2304
2300@example 2305@smallexample
2301[1. image/jpeg; foo.jpg]... 2306[1. image/jpeg; foo.jpg]...
2302@end example 2307@end smallexample
2303 2308
2304@findex mh-next-button 2309@findex mh-next-button
2305@findex mh-press-button 2310@findex mh-press-button
@@ -2488,9 +2493,9 @@ expect if the entire message is HTML, or there is an inline HTML body
2488part. However, if there is an HTML body part that is an attachment, 2493part. However, if there is an HTML body part that is an attachment,
2489then you'll see a button like this: 2494then you'll see a button like this:
2490 2495
2491@example 2496@smallexample
2492[1. text/html; foo.html]... 2497[1. text/html; foo.html]...
2493@end example 2498@end smallexample
2494 2499
2495To see how to read the contents of this body part, see @ref{Viewing 2500To see how to read the contents of this body part, see @ref{Viewing
2496Attachments}. 2501Attachments}.
@@ -3492,8 +3497,7 @@ ahead and delete or refile the messages, use @kbd{x}
3492(@code{mh-execute-commands}). Many MH-E commands that may affect the 3497(@code{mh-execute-commands}). Many MH-E commands that may affect the
3493numbering of the messages (such as @kbd{F r} or @kbd{F p}) will ask if 3498numbering of the messages (such as @kbd{F r} or @kbd{F p}) will ask if
3494you want to process refiles or deletes first and then either run 3499you want to process refiles or deletes first and then either run
3495@kbd{x} for you or undo the pending refiles and deletes, which are 3500@kbd{x} for you or undo the pending refiles and deletes.
3496lost.
3497 3501
3498@kindex x 3502@kindex x
3499@vindex mh-after-commands-processed-hook 3503@vindex mh-after-commands-processed-hook
@@ -3547,12 +3551,13 @@ folder for later examination.
3547@kindex t 3551@kindex t
3548@vindex mh-recenter-summary-flag 3552@vindex mh-recenter-summary-flag
3549 3553
3550When you use @kbd{t} to toggle between show mode and scan mode, the 3554When you use @kbd{t} to toggle from MH-Folder Show mode to MH-Folder
3551MH-Show buffer is hidden and the MH-Folder buffer is left alone. 3555mode, the MH-Show buffer is hidden and the MH-Folder buffer is left
3552Setting @code{mh-recenter-summary-flag} to a non-@code{nil} value 3556alone. Setting @code{mh-recenter-summary-flag} to a non-@code{nil}
3553causes the toggle to display as many scan lines as possible, with the 3557value causes the toggle to display as many scan lines as possible,
3554cursor at the middle. The effect of @code{mh-recenter-summary-flag} is 3558with the cursor at the middle. The effect of
3555rather useful, but it can be annoying on a slow network connection. 3559@code{mh-recenter-summary-flag} is rather useful, but it can be
3560annoying on a slow network connection.
3556 3561
3557@findex mh-visit-folder 3562@findex mh-visit-folder
3558@kindex F v 3563@kindex F v
@@ -3578,8 +3583,6 @@ If you forget where you've refiled your messages, you can find them
3578using @kbd{F s} (@code{mh-search}). @xref{Searching}. 3583using @kbd{F s} (@code{mh-search}). @xref{Searching}.
3579 3584
3580@cindex @command{procmail} 3585@cindex @command{procmail}
3581@cindex @command{rcvstore}
3582@cindex MH commands, @command{rcvstore}
3583@cindex @samp{unseen} sequence 3586@cindex @samp{unseen} sequence
3584@cindex sequence, @samp{unseen} 3587@cindex sequence, @samp{unseen}
3585@cindex Unix commands, @command{procmail} 3588@cindex Unix commands, @command{procmail}
@@ -3588,14 +3591,14 @@ using @kbd{F s} (@code{mh-search}). @xref{Searching}.
3588@kindex F n 3591@kindex F n
3589@vindex mh-new-messages-folders 3592@vindex mh-new-messages-folders
3590 3593
3591If you use a program such as @command{procmail} to use 3594If you use a program such as @command{procmail} to file your incoming
3592@command{rcvstore} to file your incoming mail automatically, you can 3595mail automatically, you can display new, unseen, messages using the
3593display new, unseen, messages using the command @kbd{F n} 3596command @kbd{F n} (@code{mh-index-new-messages}). All messages in the
3594(@code{mh-index-new-messages}). All messages in the @samp{unseen} 3597@samp{unseen} sequence from the folders in
3595sequence from the folders in @code{mh-new-messages-folders} are 3598@code{mh-new-messages-folders} are listed. However, this list of
3596listed. However, this list of folders can be overridden with a prefix 3599folders can be overridden with a prefix argument: with a prefix
3597argument: with a prefix argument, enter a space-separated list of 3600argument, enter a space-separated list of folders, or nothing to
3598folders, or nothing to search all folders. 3601search all folders.
3599 3602
3600@cindex @samp{tick} sequence 3603@cindex @samp{tick} sequence
3601@cindex sequence, @samp{tick} 3604@cindex sequence, @samp{tick}
@@ -3682,7 +3685,7 @@ searching.
3682 3685
3683@quotation 3686@quotation
3684Use this hook with care. If there is a bug in your hook which returns 3687Use this hook with care. If there is a bug in your hook which returns
3685@code{t} on @samp{+inbox} and you hit @kbd{k} by accident in the 3688@code{t} on @samp{+inbox} and you press @kbd{k} by accident in the
3686@code{+inbox} folder, you will not be happy. 3689@code{+inbox} folder, you will not be happy.
3687@end quotation 3690@end quotation
3688@sp 1 3691@sp 1
@@ -3774,9 +3777,9 @@ mh-smail} directly, or from the command line like this:
3774 3777
3775@cindex starting from command line 3778@cindex starting from command line
3776 3779
3777@example 3780@smallexample
3778$ @kbd{emacs -f mh-smail} 3781$ @kbd{emacs -f mh-smail}
3779@end example 3782@end smallexample
3780 3783
3781@findex goto-address-at-point 3784@findex goto-address-at-point
3782@vindex mail-user-agent 3785@vindex mail-user-agent
@@ -4050,31 +4053,47 @@ command.
4050When you reply to a message, you are first prompted with @samp{Reply 4053When you reply to a message, you are first prompted with @samp{Reply
4051to whom?}. You have several choices here. 4054to whom?}. You have several choices here.
4052 4055
4053@smallexample 4056@quotation
4054@group 4057@multitable @columnfractions .20 .80
4055@b{Response} @b{Reply Goes To} 4058@c @headitem Response @tab Reply Goes To
4056 4059@c XXX @headitem not yet supported by SourceForge's texi2pdf.
4057@kbd{from} @r{The person who sent the message. This is the default,} 4060@item @b{Response} @tab @b{Reply Goes To}
4058 @r{so @key{RET} is sufficient.} 4061@c -------------------------
4059 4062@item @kbd{from}
4060@kbd{to} @r{Replies to the sender, plus all recipients in the} 4063@tab
4061 @r{@samp{To:} header field.} 4064The person who sent the message. This is the default, so @key{RET} is
4062 4065sufficient.
4063@kbd{all} 4066@c -------------------------
4064@kbd{cc} @r{Forms a reply to the sender, plus all recipients.} 4067@item @kbd{to}
4065@end group 4068@tab
4066@end smallexample 4069Replies to the sender, plus all recipients in the @samp{To:} header field.
4070@c -------------------------
4071@item @kbd{cc}@*@kbd{all}
4072@tab
4073Forms a reply to the addresses in the @samp{Mail-Followup-To:} header
4074field if one exists; otherwise forms a reply to the sender, plus all
4075recipients.
4076@end multitable
4077@end quotation
4067 4078
4068@cindex @command{repl} 4079@cindex @command{repl}
4069@cindex MH commands, @command{repl} 4080@cindex MH commands, @command{repl}
4081@vindex mh-reply-default-reply-to
4070 4082
4071Depending on your answer, @command{repl}@footnote{See the section 4083Depending on your answer, @command{repl}@footnote{See the section
4072@uref{@value{MH-BOOK-HOME}/reprep.htm, Replying to Messages: repl} in 4084@uref{@value{MH-BOOK-HOME}/reprep.htm, Replying to Messages: repl} in
4073the MH book.} is given a different argument to form your reply. 4085the MH book.} is given a different argument to form your reply.
4074Specifically, a choice of @kbd{from} or none at all runs @samp{repl 4086Specifically, a choice of @kbd{from} or none at all runs @samp{repl
4075-nocc all}, and a choice of @kbd{to} runs @samp{repl -cc to}. Finally, 4087-nocc all}, and a choice of @kbd{to} runs @samp{repl -cc to}. Finally,
4076either @kbd{cc} or @kbd{all} runs @samp{repl -cc all -nocc me}. 4088either @kbd{cc} or @kbd{all} runs @samp{repl -cc all -nocc me}. If you
4077 4089find that most of the time you specify one of these choices when you
4090reply to a message, you can change the option
4091@code{mh-reply-default-reply-to} from its default value of
4092@samp{Prompt} to one of the choices listed above. You can always edit
4093the recipients in the draft.
4094
4095@cindex @samp{repl:} MH profile component
4096@cindex MH profile component, @samp{repl:}
4078@cindex MH-Letter mode 4097@cindex MH-Letter mode
4079@cindex MH-Show mode 4098@cindex MH-Show mode
4080@cindex draft 4099@cindex draft
@@ -4083,7 +4102,10 @@ either @kbd{cc} or @kbd{all} runs @samp{repl -cc all -nocc me}.
4083 4102
4084Two windows are then created. One window contains the message to which 4103Two windows are then created. One window contains the message to which
4085you are replying in an MH-Show buffer. Your draft, in MH-Letter mode 4104you are replying in an MH-Show buffer. Your draft, in MH-Letter mode
4086(@pxref{Editing Drafts}), is in the other window. 4105(@pxref{Editing Drafts}), is in the other window. If the reply draft
4106was not one that you expected, check the things that affect the
4107behavior of @command{repl} which include the @samp{repl:} profile
4108component and the @file{replcomps} and @file{replgroupcomps} files.
4087 4109
4088If you supply a prefix argument (as in @kbd{C-u r}), the message you 4110If you supply a prefix argument (as in @kbd{C-u r}), the message you
4089are replying to is inserted in your reply after having first been run 4111are replying to is inserted in your reply after having first been run
@@ -4110,15 +4132,6 @@ buffer by turning off the option @code{mh-reply-show-message-flag}.
4110If you wish to customize the header or other parts of the reply draft, 4132If you wish to customize the header or other parts of the reply draft,
4111please see @command{repl}(1) and @code{mh-format}(5). 4133please see @command{repl}(1) and @code{mh-format}(5).
4112 4134
4113@vindex mh-reply-default-reply-to
4114
4115The @code{mh-reply-default-reply-to} option is set to @samp{Prompt} by
4116default so that you are prompted for the recipient of a reply. If you
4117find that most of the time that you specify @kbd{cc} when you reply to
4118a message, set this option to @samp{cc}. Other choices include
4119@samp{from}, @samp{to}, or @samp{all}. You can always edit the
4120recipients in the draft.
4121
4122@node Forwarding, Redistributing, Replying, Sending Mail 4135@node Forwarding, Redistributing, Replying, Sending Mail
4123@section Forwarding Mail 4136@section Forwarding Mail
4124 4137
@@ -4781,23 +4794,23 @@ quotes match the value of @code{mh-ins-buf-prefix} (@pxref{Inserting
4781Letter}). For example, let's assume you have the following in your 4794Letter}). For example, let's assume you have the following in your
4782draft: 4795draft:
4783 4796
4784@example 4797@smallexample
4785@group 4798@group
4786> Hopefully this gives you an idea of what I'm currently doing. I'm \ 4799> Hopefully this gives you an idea of what I'm currently doing. I'm \
4787not sure yet whether I'm completely satisfied with my setup, but \ 4800not sure yet whether I'm completely satisfied with my setup, but \
4788it's worked okay for me so far. 4801it's worked okay for me so far.
4789@end group 4802@end group
4790@end example 4803@end smallexample
4791 4804
4792Running @kbd{M-q} on this paragraph produces: 4805Running @kbd{M-q} on this paragraph produces:
4793 4806
4794@example 4807@smallexample
4795@group 4808@group
4796> Hopefully this gives you an idea of what I'm currently doing. I'm not 4809> Hopefully this gives you an idea of what I'm currently doing. I'm not
4797> sure yet whether I'm completely satisfied with my setup, but it's 4810> sure yet whether I'm completely satisfied with my setup, but it's
4798> worked okay for me so far. 4811> worked okay for me so far.
4799@end group 4812@end group
4800@end example 4813@end smallexample
4801 4814
4802@findex mh-open-line 4815@findex mh-open-line
4803@findex open-line 4816@findex open-line
@@ -4812,7 +4825,7 @@ column as it was. This is useful when breaking up paragraphs in
4812replies. For example, if this command was used when point was after 4825replies. For example, if this command was used when point was after
4813the first period in the paragraph above, the result would be this: 4826the first period in the paragraph above, the result would be this:
4814 4827
4815@example 4828@smallexample
4816@group 4829@group
4817> Hopefully this gives you an idea of what I'm currently doing. 4830> Hopefully this gives you an idea of what I'm currently doing.
4818 4831
@@ -4820,7 +4833,7 @@ the first period in the paragraph above, the result would be this:
4820> sure yet whether I'm completely satisfied with my setup, but it's 4833> sure yet whether I'm completely satisfied with my setup, but it's
4821> worked okay for me so far. 4834> worked okay for me so far.
4822@end group 4835@end group
4823@end example 4836@end smallexample
4824 4837
4825@node Inserting Letter, Inserting Messages, Editing Message, Editing Drafts 4838@node Inserting Letter, Inserting Messages, Editing Message, Editing Drafts
4826@section Inserting Letter to Which You're Replying 4839@section Inserting Letter to Which You're Replying
@@ -4839,7 +4852,7 @@ attribution, yanking a portion of text from the message to which
4839you're replying, and inserting @code{mh-ins-buf-prefix} (@samp{> }) 4852you're replying, and inserting @code{mh-ins-buf-prefix} (@samp{> })
4840before each line. 4853before each line.
4841 4854
4842@example 4855@smallexample
4843@group 4856@group
4844Michael W Thelen <thelenm@@stop.mail-abuse.org> wrote: 4857Michael W Thelen <thelenm@@stop.mail-abuse.org> wrote:
4845 4858
@@ -4847,7 +4860,7 @@ Michael W Thelen <thelenm@@stop.mail-abuse.org> wrote:
4847> sure yet whether I'm completely satisfied with my setup, but it's 4860> sure yet whether I'm completely satisfied with my setup, but it's
4848> worked okay for me so far. 4861> worked okay for me so far.
4849@end group 4862@end group
4850@end example 4863@end smallexample
4851 4864
4852@vindex mh-extract-from-attribution-verb 4865@vindex mh-extract-from-attribution-verb
4853 4866
@@ -5318,7 +5331,7 @@ When you are finished editing a @sc{mime} message, it might look like this:
5318 5331
5319 5332
5320 5333
5321--:%% @{+inbox@} 4 msgs (1-4) (MH-Folder Show)--L4--Bot--------------- 5334--:%% @{+inbox@} 4 msgs (1-4) Bot L4 (MH-Folder Show)---------------
5322To: wohler 5335To: wohler
5323cc: 5336cc:
5324Subject: Test of MIME 5337Subject: Test of MIME
@@ -5328,7 +5341,7 @@ Here is the SETI@@Home logo:
5328<#part type="image/x-xpm" filename="~/lib/images/setiathome.xpm" 5341<#part type="image/x-xpm" filename="~/lib/images/setiathome.xpm"
5329disposition=inline description="SETI@@home logo"> 5342disposition=inline description="SETI@@home logo">
5330<#/part> 5343<#/part>
5331--:** @{draft@} (MH-Letter)--L8--All---------------------------------- 5344--:** @{draft@} All L8 (MH-Letter)----------------------------------
5332 5345
5333@end smallexample 5346@end smallexample
5334@end cartouche 5347@end cartouche
@@ -5355,6 +5368,7 @@ details from the user.
5355To: wohler 5368To: wohler
5356cc: 5369cc:
5357Subject: Test of MIME 5370Subject: Test of MIME
5371X-Mailer: MH-E 8.0; nmh 1.1; GNU Emacs 22.1
5358MIME-Version: 1.0 5372MIME-Version: 1.0
5359Content-Type: multipart/mixed; boundary="=-=-=" 5373Content-Type: multipart/mixed; boundary="=-=-="
5360-------- 5374--------
@@ -5369,8 +5383,8 @@ Content-Disposition: inline; filename=setiathome.xpm
5369Content-Transfer-Encoding: base64 5383Content-Transfer-Encoding: base64
5370Content-Description: SETI@@home logo 5384Content-Description: SETI@@home logo
5371 5385
5372LyogWFBNICovCnN0YXRpYyBjaGFyICogc2V0aWF0aG9tZV94cG1bXSA9IHsKIjQ1IDQ1IDc2NCAy 5386LyogWFBNICovCnN0YXRpYyBjaGFyICogc2V0aWF0aG9tZV94cG1bXSA9IHsKIjQ1IDQ1IDc2N
5373--:-- @{draft@} (MH-Letter)--L2--Top---------------------------------- 5387--:-- @{draft@} Top L1 (MH-Letter)----------------------------------
5374 5388
5375@end smallexample 5389@end smallexample
5376@end cartouche 5390@end cartouche
@@ -5447,25 +5461,25 @@ following commands to do so any time before sending your message.
5447The command @kbd{C-c C-m C-s} (@code{mh-mml-secure-message-sign}) 5461The command @kbd{C-c C-m C-s} (@code{mh-mml-secure-message-sign})
5448inserts the following tag: 5462inserts the following tag:
5449 5463
5450@example 5464@smallexample
5451<#secure method=pgpmime mode=sign> 5465<#secure method=pgpmime mode=sign>
5452@end example 5466@end smallexample
5453 5467
5454This is used to sign your message digitally. Likewise, the command 5468This is used to sign your message digitally. Likewise, the command
5455@kbd{C-c C-m C-e} (@code{mh-mml-secure-message-encrypt}) inserts the 5469@kbd{C-c C-m C-e} (@code{mh-mml-secure-message-encrypt}) inserts the
5456following tag: 5470following tag:
5457 5471
5458@example 5472@smallexample
5459<#secure method=pgpmime mode=encrypt> 5473<#secure method=pgpmime mode=encrypt>
5460@end example 5474@end smallexample
5461 5475
5462This is used to encrypt your message. Finally, the command @kbd{C-c 5476This is used to encrypt your message. Finally, the command @kbd{C-c
5463C-m s e} (@code{mh-mml-secure-message-signencrypt}) inserts the 5477C-m s e} (@code{mh-mml-secure-message-signencrypt}) inserts the
5464following tag: 5478following tag:
5465 5479
5466@example 5480@smallexample
5467<#secure method=pgpmime mode=signencrypt> 5481<#secure method=pgpmime mode=signencrypt>
5468@end example 5482@end smallexample
5469 5483
5470@findex mh-mml-unsecure-message 5484@findex mh-mml-unsecure-message
5471@kindex C-c C-m C-n 5485@kindex C-c C-m C-n
@@ -5703,10 +5717,10 @@ make case significant which can be used to segregate completion of
5703your aliases. You might use uppercase for mailing lists and lowercase 5717your aliases. You might use uppercase for mailing lists and lowercase
5704for people. For example, you might have: 5718for people. For example, you might have:
5705 5719
5706@example 5720@smallexample
5707mark.baushke: Mark Baushke <mdb@@stop.mail-abuse.org> 5721mark.baushke: Mark Baushke <mdb@@stop.mail-abuse.org>
5708MH-E: MH-E Mailing List <mh-e-devel@@stop.mail-abuse.org> 5722MH-E: MH-E Mailing List <mh-e-devel@@stop.mail-abuse.org>
5709@end example 5723@end smallexample
5710 5724
5711When this option is turned off, if you were to type @kbd{M} in the 5725When this option is turned off, if you were to type @kbd{M} in the
5712@samp{To:} field and then @kbd{M-@key{TAB}}, then you'd get the list; 5726@samp{To:} field and then @kbd{M-@key{TAB}}, then you'd get the list;
@@ -5767,9 +5781,9 @@ The prefix @samp{local.} can be modified via the option
5767 5781
5768For example, consider the following password file entry: 5782For example, consider the following password file entry:
5769 5783
5770@example 5784@smallexample
5771psg:x:1000:1000:Peter S Galbraith,,,:/home/psg:/bin/tcsh 5785psg:x:1000:1000:Peter S Galbraith,,,:/home/psg:/bin/tcsh
5772@end example 5786@end smallexample
5773 5787
5774@vindex mh-alias-local-users-prefix 5788@vindex mh-alias-local-users-prefix
5775 5789
@@ -5839,7 +5853,8 @@ other prefixes to organize your aliases or disambiguate entries. You
5839might use prefixes for locales, jobs, or activities. For example, I 5853might use prefixes for locales, jobs, or activities. For example, I
5840have: 5854have:
5841 5855
5842@example 5856@smallexample
5857@group
5843; Work 5858; Work
5844attensity.don.mitchell: Don Mitchell <dmitchell@@stop.mail-abuse.com> 5859attensity.don.mitchell: Don Mitchell <dmitchell@@stop.mail-abuse.com>
5845isharp.don.mitchell: Don Mitchell <donaldsmitchell@@stop.mail-abuse.com> 5860isharp.don.mitchell: Don Mitchell <donaldsmitchell@@stop.mail-abuse.com>
@@ -5851,7 +5866,8 @@ sailing.mike.maloney: Mike Maloney <mmaloney@@stop.mail-abuse.com>
5851; Personal 5866; Personal
5852ariane.kolkmann: Ariane Kolkmann <ArianeKolkmann@@stop.mail-abuse.com> 5867ariane.kolkmann: Ariane Kolkmann <ArianeKolkmann@@stop.mail-abuse.com>
5853... 5868...
5854@end example 5869@end group
5870@end smallexample
5855 5871
5856Using prefixes instead of postfixes helps you explore aliases during 5872Using prefixes instead of postfixes helps you explore aliases during
5857completion. If you forget the name of an old dive buddy, you can enter 5873completion. If you forget the name of an old dive buddy, you can enter
@@ -6566,12 +6582,13 @@ Next, an MH-Search buffer appears where you can enter search criteria.
6566 6582
6567@cartouche 6583@cartouche
6568@smallexample 6584@smallexample
6569From: # 6585From:
6570To: 6586To:
6571Cc: 6587Cc:
6572Date: 6588Date:
6573Subject: 6589Subject:
6574-------- 6590--------
6591#
6575 6592
6576 6593
6577 6594
@@ -6580,9 +6597,8 @@ Subject:
6580 6597
6581 6598
6582 6599
6583 6600--:** search-pattern All L7 (MH-Search)---------------------------
6584--:** search-pattern (MH-Search)--L1--All----------------------------- 6601Type C-c C-c to search messages, C-c C-p to use pick, C-c ? for help
6585
6586@end smallexample 6602@end smallexample
6587@end cartouche 6603@end cartouche
6588@i{Search window} 6604@i{Search window}
@@ -8280,9 +8296,9 @@ which displays the sender, the subject, and the message number. This
8280format places a @samp{+} after the message number for the current 8296format places a @samp{+} after the message number for the current
8281message according to MH; it also uses that column for notations. 8297message according to MH; it also uses that column for notations.
8282 8298
8283@example 8299@smallexample
8284%20(decode(friendly@{from@})) %50(decode@{subject@}) %4(msg)%<(cur)+%| %> 8300%20(decode(friendly@{from@})) %50(decode@{subject@}) %4(msg)%<(cur)+%| %>
8285@end example 8301@end smallexample
8286 8302
8287@vindex mh-adaptive-cmd-note-flag 8303@vindex mh-adaptive-cmd-note-flag
8288@vindex mh-scan-format-file 8304@vindex mh-scan-format-file
@@ -8298,9 +8314,9 @@ least display the output of scan in your MH-Folder buffer.
8298 8314
8299@vindex mh-scan-valid-regexp, example 8315@vindex mh-scan-valid-regexp, example
8300 8316
8301@lisp 8317@smalllisp
8302(setq mh-scan-valid-regexp "[0-9]+[+D^ ]$") 8318(setq mh-scan-valid-regexp "[0-9]+[+D^ ]$")
8303@end lisp 8319@end smalllisp
8304 8320
8305Now, in order to get rid of the @samp{Cursor not pointing to message} 8321Now, in order to get rid of the @samp{Cursor not pointing to message}
8306message, you need to tell MH-E how to access the message number. You 8322message, you need to tell MH-E how to access the message number. You
@@ -8310,18 +8326,18 @@ the first place.
8310@vindex mh-scan-msg-number-regexp, example 8326@vindex mh-scan-msg-number-regexp, example
8311@vindex mh-scan-msg-search-regexp, example 8327@vindex mh-scan-msg-search-regexp, example
8312 8328
8313@lisp 8329@smalllisp
8314(setq mh-scan-msg-number-regexp "^.* \\([0-9]+\\)[+D^ ]$") 8330(setq mh-scan-msg-number-regexp "^.* \\([0-9]+\\)[+D^ ]$")
8315(setq mh-scan-msg-search-regexp " %d[+D^ ]$") 8331(setq mh-scan-msg-search-regexp " %d[+D^ ]$")
8316@end lisp 8332@end smalllisp
8317 8333
8318In order to get the next and previous commands working, add this. 8334In order to get the next and previous commands working, add this.
8319 8335
8320@vindex mh-scan-good-msg-regexp, example 8336@vindex mh-scan-good-msg-regexp, example
8321 8337
8322@lisp 8338@smalllisp
8323(setq mh-scan-good-msg-regexp "^.* \\([0-9]+\\)[+D^ ]$") 8339(setq mh-scan-good-msg-regexp "^.* \\([0-9]+\\)[+D^ ]$")
8324@end lisp 8340@end smalllisp
8325 8341
8326Note that the current message isn't marked with a @samp{+} when moving 8342Note that the current message isn't marked with a @samp{+} when moving
8327between the next and previous messages. Here is the code required to 8343between the next and previous messages. Here is the code required to
@@ -8330,20 +8346,20 @@ get this working.
8330@vindex set-mh-cmd-note, example 8346@vindex set-mh-cmd-note, example
8331@vindex mh-scan-cur-msg-number-regexp, example 8347@vindex mh-scan-cur-msg-number-regexp, example
8332 8348
8333@lisp 8349@smalllisp
8334(set-mh-cmd-note 76) 8350(set-mh-cmd-note 76)
8335(setq mh-scan-cur-msg-number-regexp "^.* \\([0-9]+\\)\\+$") 8351(setq mh-scan-cur-msg-number-regexp "^.* \\([0-9]+\\)\\+$")
8336@end lisp 8352@end smalllisp
8337 8353
8338Finally, add the following to delete and refile messages. 8354Finally, add the following to delete and refile messages.
8339 8355
8340@vindex mh-scan-deleted-msg-regexp, example 8356@vindex mh-scan-deleted-msg-regexp, example
8341@vindex mh-scan-refiled-msg-regexp, example 8357@vindex mh-scan-refiled-msg-regexp, example
8342 8358
8343@lisp 8359@smalllisp
8344(setq mh-scan-deleted-msg-regexp "^.* \\([0-9]+\\)D$") 8360(setq mh-scan-deleted-msg-regexp "^.* \\([0-9]+\\)D$")
8345(setq mh-scan-refiled-msg-regexp "^.* \\([0-9]+\\)\\^$") 8361(setq mh-scan-refiled-msg-regexp "^.* \\([0-9]+\\)\\^$")
8346@end lisp 8362@end smalllisp
8347 8363
8348This is just a bare minimum; it's best to adjust all of the regular 8364This is just a bare minimum; it's best to adjust all of the regular
8349expressions to ensure that MH-E and highlighting perform well. 8365expressions to ensure that MH-E and highlighting perform well.
@@ -8439,9 +8455,9 @@ If your version of @command{rcvstore} doesn't add messages to the
8439@samp{unseen} sequence by default, add the following line to your MH 8455@samp{unseen} sequence by default, add the following line to your MH
8440profile: 8456profile:
8441 8457
8442@example 8458@smallexample
8443Unseen-Sequence: unseen 8459Unseen-Sequence: unseen
8444@end example 8460@end smallexample
8445 8461
8446Now view your new messages with the speedbar (@pxref{Speedbar}) or with 8462Now view your new messages with the speedbar (@pxref{Speedbar}) or with
8447@kbd{F n} (@code{mh-index-new-messages}). @xref{Folders}. 8463@kbd{F n} (@code{mh-index-new-messages}). @xref{Folders}.
@@ -8489,14 +8505,14 @@ Next add the following to @file{~/.procmailrc}. If you don't subscribe
8489to the GnuCash mailing list, substitute one to which you are 8505to the GnuCash mailing list, substitute one to which you are
8490subscribed. 8506subscribed.
8491 8507
8492@example 8508@smallexample
8493MAILDIR=$HOME/`mhparam Path` 8509MAILDIR=$HOME/`mhparam Path`
8494# Place mail sent to the GnuCash mailing list in gnucash.spool, where 8510# Place mail sent to the GnuCash mailing list in gnucash.spool, where
8495# Gnus will pick it up. 8511# Gnus will pick it up.
8496:0: 8512:0:
8497* ^TO.*gnucash.*@.*gnucash.org 8513* ^TO.*gnucash.*@.*gnucash.org
8498gnucash.spool 8514gnucash.spool
8499@end example 8515@end smallexample
8500 8516
8501Wait for some messages to appear in @file{gnucash.spool} and run Gnus 8517Wait for some messages to appear in @file{gnucash.spool} and run Gnus
8502with @kbd{M-x gnus @key{RET}}. To view the folder created in the 8518with @kbd{M-x gnus @key{RET}}. To view the folder created in the
diff --git a/man/org.texi b/man/org.texi
index 06deb034a3a..60259e2834c 100644
--- a/man/org.texi
+++ b/man/org.texi
@@ -4,7 +4,7 @@
4@setfilename ../info/org 4@setfilename ../info/org
5@settitle Org Mode Manual 5@settitle Org Mode Manual
6 6
7@set VERSION 4.09 7@set VERSION 4.10
8@set DATE March 2006 8@set DATE March 2006
9 9
10@dircategory Emacs 10@dircategory Emacs
diff --git a/man/picture.texi b/man/picture.texi
deleted file mode 100644
index 2e162c04057..00000000000
--- a/man/picture.texi
+++ /dev/null
@@ -1,277 +0,0 @@
1@c This is part of the Emacs manual.
2@c Copyright (C) 1985, 1986, 1987, 1993, 1994, 1995, 1997, 2002, 2003,
3@c 2004, 2005, 2006 Free Software Foundation, Inc.
4@c See file emacs.texi for copying conditions.
5@node Picture, Sending Mail, Abbrevs, Top
6@chapter Editing Pictures
7@cindex pictures
8@cindex making pictures out of text characters
9@findex edit-picture
10
11 To edit a picture made out of text characters (for example, a picture
12of the division of a register into fields, as a comment in a program),
13use the command @kbd{M-x edit-picture} to enter Picture mode.
14
15 In Picture mode, editing is based on the @dfn{quarter-plane} model of
16text, according to which the text characters lie studded on an area that
17stretches infinitely far to the right and downward. The concept of the end
18of a line does not exist in this model; the most you can say is where the
19last nonblank character on the line is found.
20
21 Of course, Emacs really always considers text as a sequence of
22characters, and lines really do have ends. But Picture mode replaces
23the most frequently-used commands with variants that simulate the
24quarter-plane model of text. They do this by inserting spaces or by
25converting tabs to spaces.
26
27 Most of the basic editing commands of Emacs are redefined by Picture mode
28to do essentially the same thing but in a quarter-plane way. In addition,
29Picture mode defines various keys starting with the @kbd{C-c} prefix to
30run special picture editing commands.
31
32 One of these keys, @kbd{C-c C-c}, is particularly important. Often a
33picture is part of a larger file that is usually edited in some other
34major mode. @kbd{M-x edit-picture} records the name of the previous
35major mode so you can use the @kbd{C-c C-c} command
36(@code{picture-mode-exit}) later to go back to that mode. @kbd{C-c C-c}
37also deletes spaces from the ends of lines, unless given a numeric
38argument.
39
40 The special commands of Picture mode all work in other modes (provided
41the @file{picture} library is loaded), but are not bound to keys except
42in Picture mode. The descriptions below talk of moving ``one column''
43and so on, but all the picture mode commands handle numeric arguments as
44their normal equivalents do.
45
46@vindex picture-mode-hook
47 Turning on Picture mode runs the hook @code{picture-mode-hook}
48(@pxref{Hooks}). Additional extensions to Picture mode can be found
49in @file{artist.el}.
50
51@menu
52* Basic Picture:: Basic concepts and simple commands of Picture Mode.
53* Insert in Picture:: Controlling direction of cursor motion
54 after "self-inserting" characters.
55* Tabs in Picture:: Various features for tab stops and indentation.
56* Rectangles in Picture:: Clearing and superimposing rectangles.
57@end menu
58
59@node Basic Picture, Insert in Picture, Picture, Picture
60@section Basic Editing in Picture Mode
61
62@findex picture-forward-column
63@findex picture-backward-column
64@findex picture-move-down
65@findex picture-move-up
66@cindex editing in Picture mode
67
68 Most keys do the same thing in Picture mode that they usually do, but
69do it in a quarter-plane style. For example, @kbd{C-f} is rebound to
70run @code{picture-forward-column}, a command which moves point one
71column to the right, inserting a space if necessary so that the actual
72end of the line makes no difference. @kbd{C-b} is rebound to run
73@code{picture-backward-column}, which always moves point left one
74column, converting a tab to multiple spaces if necessary. @kbd{C-n} and
75@kbd{C-p} are rebound to run @code{picture-move-down} and
76@code{picture-move-up}, which can either insert spaces or convert tabs
77as necessary to make sure that point stays in exactly the same column.
78@kbd{C-e} runs @code{picture-end-of-line}, which moves to after the last
79nonblank character on the line. There is no need to change @kbd{C-a},
80as the choice of screen model does not affect beginnings of
81lines.
82
83@findex picture-newline
84 Insertion of text is adapted to the quarter-plane screen model through
85the use of Overwrite mode (@pxref{Minor Modes}). Self-inserting characters
86replace existing text, column by column, rather than pushing existing text
87to the right. @key{RET} runs @code{picture-newline}, which just moves to
88the beginning of the following line so that new text will replace that
89line.
90
91@findex picture-backward-clear-column
92@findex picture-clear-column
93@findex picture-clear-line
94 In Picture mode, the commands that normally delete or kill text,
95instead erase text (replacing it with spaces). @key{DEL}
96(@code{picture-backward-clear-column}) replaces the preceding
97character with a space rather than removing it; this moves point
98backwards. @kbd{C-d} (@code{picture-clear-column}) replaces the next
99character or characters with spaces, but does not move point. (If you
100want to clear characters to spaces and move forward over them, use
101@key{SPC}.) @kbd{C-k} (@code{picture-clear-line}) really kills the
102contents of lines, but does not delete the newlines from the buffer.
103
104@findex picture-open-line
105 To do actual insertion, you must use special commands. @kbd{C-o}
106(@code{picture-open-line}) creates a blank line after the current
107line; it never splits a line. @kbd{C-M-o} (@code{split-line}) makes
108sense in Picture mode, so it is not changed. @kbd{C-j}
109(@code{picture-duplicate-line}) inserts another line with the same
110contents below the current line.
111
112@kindex C-c C-d @r{(Picture mode)}
113 To do actual deletion in Picture mode, use @kbd{C-w}, @kbd{C-c C-d}
114(which is defined as @code{delete-char}, as @kbd{C-d} is in other
115modes), or one of the picture rectangle commands (@pxref{Rectangles in
116Picture}).
117
118@node Insert in Picture, Tabs in Picture, Basic Picture, Picture
119@section Controlling Motion after Insert
120
121@findex picture-movement-up
122@findex picture-movement-down
123@findex picture-movement-left
124@findex picture-movement-right
125@findex picture-movement-nw
126@findex picture-movement-ne
127@findex picture-movement-sw
128@findex picture-movement-se
129@kindex C-c < @r{(Picture mode)}
130@kindex C-c > @r{(Picture mode)}
131@kindex C-c ^ @r{(Picture mode)}
132@kindex C-c . @r{(Picture mode)}
133@kindex C-c ` @r{(Picture mode)}
134@kindex C-c ' @r{(Picture mode)}
135@kindex C-c / @r{(Picture mode)}
136@kindex C-c \ @r{(Picture mode)}
137 Since ``self-inserting'' characters in Picture mode overwrite and move
138point, there is no essential restriction on how point should be moved.
139Normally point moves right, but you can specify any of the eight
140orthogonal or diagonal directions for motion after a ``self-inserting''
141character. This is useful for drawing lines in the buffer.
142
143@table @kbd
144@item C-c <
145@itemx C-c @key{LEFT}
146Move left after insertion (@code{picture-movement-left}).
147@item C-c >
148@itemx C-c @key{RIGHT}
149Move right after insertion (@code{picture-movement-right}).
150@item C-c ^
151@itemx C-c @key{UP}
152Move up after insertion (@code{picture-movement-up}).
153@item C-c .
154@itemx C-c @key{DOWN}
155Move down after insertion (@code{picture-movement-down}).
156@item C-c `
157@itemx C-c @key{HOME}
158Move up and left (``northwest'') after insertion (@code{picture-movement-nw}).
159@item C-c '
160@itemx C-c @key{PAGEUP}
161Move up and right (``northeast'') after insertion
162(@code{picture-movement-ne}).
163@item C-c /
164@itemx C-c @key{END}
165Move down and left (``southwest'') after insertion
166@*(@code{picture-movement-sw}).
167@item C-c \
168@itemx C-c @key{PAGEDOWN}
169Move down and right (``southeast'') after insertion
170@*(@code{picture-movement-se}).
171@end table
172
173@kindex C-c C-f @r{(Picture mode)}
174@kindex C-c C-b @r{(Picture mode)}
175@findex picture-motion
176@findex picture-motion-reverse
177 Two motion commands move based on the current Picture insertion
178direction. The command @kbd{C-c C-f} (@code{picture-motion}) moves in the
179same direction as motion after ``insertion'' currently does, while @kbd{C-c
180C-b} (@code{picture-motion-reverse}) moves in the opposite direction.
181
182@node Tabs in Picture, Rectangles in Picture, Insert in Picture, Picture
183@section Picture Mode Tabs
184
185@kindex M-TAB @r{(Picture mode)}
186@findex picture-tab-search
187@vindex picture-tab-chars
188 Two kinds of tab-like action are provided in Picture mode. Use
189@kbd{M-@key{TAB}} (@code{picture-tab-search}) for context-based tabbing.
190With no argument, it moves to a point underneath the next
191``interesting'' character that follows whitespace in the previous
192nonblank line. ``Next'' here means ``appearing at a horizontal position
193greater than the one point starts out at.'' With an argument, as in
194@kbd{C-u M-@key{TAB}}, this command moves to the next such interesting
195character in the current line. @kbd{M-@key{TAB}} does not change the
196text; it only moves point. ``Interesting'' characters are defined by
197the variable @code{picture-tab-chars}, which should define a set of
198characters. The syntax for this variable is like the syntax used inside
199of @samp{[@dots{}]} in a regular expression---but without the @samp{[}
200and the @samp{]}. Its default value is @code{"!-~"}.
201
202@findex picture-tab
203 @key{TAB} itself runs @code{picture-tab}, which operates based on the
204current tab stop settings; it is the Picture mode equivalent of
205@code{tab-to-tab-stop}. Normally it just moves point, but with a numeric
206argument it clears the text that it moves over.
207
208@kindex C-c TAB @r{(Picture mode)}
209@findex picture-set-tab-stops
210 The context-based and tab-stop-based forms of tabbing are brought
211together by the command @kbd{C-c @key{TAB}} (@code{picture-set-tab-stops}).
212This command sets the tab stops to the positions which @kbd{M-@key{TAB}}
213would consider significant in the current line. The use of this command,
214together with @key{TAB}, can get the effect of context-based tabbing. But
215@kbd{M-@key{TAB}} is more convenient in the cases where it is sufficient.
216
217 It may be convenient to prevent use of actual tab characters in
218pictures. For example, this prevents @kbd{C-x @key{TAB}} from messing
219up the picture. You can do this by setting the variable
220@code{indent-tabs-mode} to @code{nil}. @xref{Just Spaces}.
221
222@node Rectangles in Picture,, Tabs in Picture, Picture
223@section Picture Mode Rectangle Commands
224@cindex rectangles and Picture mode
225@cindex Picture mode and rectangles
226
227 Picture mode defines commands for working on rectangular pieces of the
228text in ways that fit with the quarter-plane model. The standard rectangle
229commands may also be useful (@pxref{Rectangles}).
230
231@table @kbd
232@item C-c C-k
233Clear out the region-rectangle with spaces
234(@code{picture-clear-rectangle}). With argument, delete the text.
235@item C-c C-w @var{r}
236Similar, but save rectangle contents in register @var{r} first
237(@code{picture-clear-rectangle-to-register}).
238@item C-c C-y
239Copy last killed rectangle into the buffer by overwriting, with upper
240left corner at point (@code{picture-yank-rectangle}). With argument,
241insert instead.
242@item C-c C-x @var{r}
243Similar, but use the rectangle in register @var{r}
244(@code{picture-yank-rectangle-from-register}).
245@end table
246
247@kindex C-c C-k @r{(Picture mode)}
248@kindex C-c C-w @r{(Picture mode)}
249@findex picture-clear-rectangle
250@findex picture-clear-rectangle-to-register
251 The picture rectangle commands @kbd{C-c C-k}
252(@code{picture-clear-rectangle}) and @kbd{C-c C-w}
253(@code{picture-clear-rectangle-to-register}) differ from the standard
254rectangle commands in that they normally clear the rectangle instead of
255deleting it; this is analogous with the way @kbd{C-d} is changed in Picture
256mode.
257
258 However, deletion of rectangles can be useful in Picture mode, so
259these commands delete the rectangle if given a numeric argument.
260@kbd{C-c C-k} either with or without a numeric argument saves the
261rectangle for @kbd{C-c C-y}.
262
263@kindex C-c C-y @r{(Picture mode)}
264@kindex C-c C-x @r{(Picture mode)}
265@findex picture-yank-rectangle
266@findex picture-yank-rectangle-from-register
267 The Picture mode commands for yanking rectangles differ from the
268standard ones in that they overwrite instead of inserting. This is
269the same way that Picture mode insertion of other text differs from
270other modes. @kbd{C-c C-y} (@code{picture-yank-rectangle}) inserts
271(by overwriting) the rectangle that was most recently killed, while
272@kbd{C-c C-x} (@code{picture-yank-rectangle-from-register}) does
273likewise for the rectangle found in a specified register.
274
275@ignore
276 arch-tag: b7589747-683c-4f40-aed8-1b10403cb666
277@end ignore
diff --git a/man/programs.texi b/man/programs.texi
index 643e6445fb0..9ec4f7ff2d3 100644
--- a/man/programs.texi
+++ b/man/programs.texi
@@ -41,7 +41,6 @@ Highlight program syntax (@pxref{Font Lock}).
41* Misc for Programs:: Other Emacs features useful for editing programs. 41* Misc for Programs:: Other Emacs features useful for editing programs.
42* C Modes:: Special commands of C, C++, Objective-C, 42* C Modes:: Special commands of C, C++, Objective-C,
43 Java, and Pike modes. 43 Java, and Pike modes.
44* Fortran:: Fortran mode and its special features.
45* Asm Mode:: Asm mode and its special features. 44* Asm Mode:: Asm mode and its special features.
46@end menu 45@end menu
47 46
@@ -109,7 +108,8 @@ tab character before point, in these modes.
109 Separate manuals are available for the modes for Ada (@pxref{Top, , Ada 108 Separate manuals are available for the modes for Ada (@pxref{Top, , Ada
110Mode, ada-mode, Ada Mode}), C/C++/Objective C/Java/Corba IDL/Pike/AWK 109Mode, ada-mode, Ada Mode}), C/C++/Objective C/Java/Corba IDL/Pike/AWK
111(@pxref{Top, , CC Mode, ccmode, CC Mode}) and the IDLWAVE modes 110(@pxref{Top, , CC Mode, ccmode, CC Mode}) and the IDLWAVE modes
112(@pxref{Top, , IDLWAVE, idlwave, IDLWAVE User Manual}). 111(@pxref{Top, , IDLWAVE, idlwave, IDLWAVE User Manual}). For Fortran
112mode, @inforef{Fortran,, emacs-xtra}.
113 113
114@cindex mode hook 114@cindex mode hook
115@vindex c-mode-hook 115@vindex c-mode-hook
@@ -1715,521 +1715,6 @@ to a C/C++ source file, or vice versa. The variable
1715names. 1715names.
1716@end table 1716@end table
1717 1717
1718@node Fortran
1719@section Fortran Mode
1720@cindex Fortran mode
1721@cindex mode, Fortran
1722
1723 Fortran mode provides special motion commands for Fortran statements
1724and subprograms, and indentation commands that understand Fortran
1725conventions of nesting, line numbers and continuation statements.
1726Fortran mode has support for Auto Fill mode that breaks long lines into
1727proper Fortran continuation lines.
1728
1729 Special commands for comments are provided because Fortran comments
1730are unlike those of other languages. Built-in abbrevs optionally save
1731typing when you insert Fortran keywords.
1732
1733 Use @kbd{M-x fortran-mode} to switch to this major mode. This command
1734runs the hook @code{fortran-mode-hook} (@pxref{Hooks}).
1735
1736@cindex Fortran77 and Fortran90
1737@findex f90-mode
1738@findex fortran-mode
1739 Fortran mode is meant for editing Fortran77 ``fixed format'' (and also
1740``tab format'') source code. For editing the modern Fortran90 or
1741Fortran95 ``free format'' source code, use F90 mode (@code{f90-mode}).
1742Emacs normally uses Fortran mode for files with extension @samp{.f},
1743@samp{.F} or @samp{.for}, and F90 mode for the extension @samp{.f90} and
1744@samp{.f95}. GNU Fortran supports both kinds of format.
1745
1746@menu
1747* Motion: Fortran Motion. Moving point by statements or subprograms.
1748* Indent: Fortran Indent. Indentation commands for Fortran.
1749* Comments: Fortran Comments. Inserting and aligning comments.
1750* Autofill: Fortran Autofill. Auto fill support for Fortran.
1751* Columns: Fortran Columns. Measuring columns for valid Fortran.
1752* Abbrev: Fortran Abbrev. Built-in abbrevs for Fortran keywords.
1753@end menu
1754
1755@node Fortran Motion
1756@subsection Motion Commands
1757
1758 In addition to the normal commands for moving by and operating on
1759``defuns'' (Fortran subprograms---functions and subroutines, as well as
1760modules for F90 mode), Fortran mode provides special commands to move by
1761statements and other program units.
1762
1763@table @kbd
1764@kindex C-c C-n @r{(Fortran mode)}
1765@findex fortran-next-statement
1766@findex f90-next-statement
1767@item C-c C-n
1768Move to the beginning of the next statement
1769(@code{fortran-next-statement}/@code{f90-next-statement}).
1770
1771@kindex C-c C-p @r{(Fortran mode)}
1772@findex fortran-previous-statement
1773@findex f90-previous-statement
1774@item C-c C-p
1775Move to the beginning of the previous statement
1776(@code{fortran-previous-statement}/@code{f90-previous-statement}).
1777If there is no previous statement (i.e. if called from the first
1778statement in the buffer), move to the start of the buffer.
1779
1780@kindex C-c C-e @r{(F90 mode)}
1781@findex f90-next-block
1782@item C-c C-e
1783Move point forward to the start of the next code block
1784(@code{f90-next-block}). A code block is a subroutine,
1785@code{if}--@code{endif} statement, and so forth. This command exists
1786for F90 mode only, not Fortran mode. With a numeric argument, this
1787moves forward that many blocks.
1788
1789@kindex C-c C-a @r{(F90 mode)}
1790@findex f90-previous-block
1791@item C-c C-a
1792Move point backward to the previous code block
1793(@code{f90-previous-block}). This is like @code{f90-next-block}, but
1794moves backwards.
1795
1796@kindex C-M-n @r{(Fortran mode)}
1797@findex fortran-end-of-block
1798@findex f90-end-of-block
1799@item C-M-n
1800Move to the end of the current code block
1801(@code{fortran-end-of-block}/@code{f90-end-of-block}). With a numeric
1802agument, move forward that number of blocks. The mark is set before
1803moving point. The F90 mode version of this command checks for
1804consistency of block types and labels (if present), but it does not
1805check the outermost block since that may be incomplete.
1806
1807@kindex C-M-p @r{(Fortran mode)}
1808@findex fortran-beginning-of-block
1809@findex f90-beginning-of-block
1810@item C-M-p
1811Move to the start of the current code block
1812(@code{fortran-beginning-of-block}/@code{f90-beginning-of-block}). This
1813is like @code{fortran-end-of-block}, but moves backwards.
1814@end table
1815
1816@node Fortran Indent
1817@subsection Fortran Indentation
1818
1819 Special commands and features are needed for indenting Fortran code in
1820order to make sure various syntactic entities (line numbers, comment line
1821indicators and continuation line flags) appear in the columns that are
1822required for standard, fixed (or tab) format Fortran.
1823
1824@menu
1825* Commands: ForIndent Commands. Commands for indenting and filling Fortran.
1826* Contline: ForIndent Cont. How continuation lines indent.
1827* Numbers: ForIndent Num. How line numbers auto-indent.
1828* Conv: ForIndent Conv. Conventions you must obey to avoid trouble.
1829* Vars: ForIndent Vars. Variables controlling Fortran indent style.
1830@end menu
1831
1832@node ForIndent Commands
1833@subsubsection Fortran Indentation and Filling Commands
1834
1835@table @kbd
1836@item C-M-j
1837Break the current line at point and set up a continuation line
1838(@code{fortran-split-line}).
1839@item M-^
1840Join this line to the previous line (@code{fortran-join-line}).
1841@item C-M-q
1842Indent all the lines of the subprogram point is in
1843(@code{fortran-indent-subprogram}).
1844@item M-q
1845Fill a comment block or statement.
1846@end table
1847
1848@kindex C-M-q @r{(Fortran mode)}
1849@findex fortran-indent-subprogram
1850 The key @kbd{C-M-q} runs @code{fortran-indent-subprogram}, a command
1851to reindent all the lines of the Fortran subprogram (function or
1852subroutine) containing point.
1853
1854@kindex C-M-j @r{(Fortran mode)}
1855@findex fortran-split-line
1856 The key @kbd{C-M-j} runs @code{fortran-split-line}, which splits
1857a line in the appropriate fashion for Fortran. In a non-comment line,
1858the second half becomes a continuation line and is indented
1859accordingly. In a comment line, both halves become separate comment
1860lines.
1861
1862@kindex M-^ @r{(Fortran mode)}
1863@kindex C-c C-d @r{(Fortran mode)}
1864@findex fortran-join-line
1865 @kbd{M-^} or @kbd{C-c C-d} runs the command @code{fortran-join-line},
1866which joins a continuation line back to the previous line, roughly as
1867the inverse of @code{fortran-split-line}. The point must be on a
1868continuation line when this command is invoked.
1869
1870@kindex M-q @r{(Fortran mode)}
1871@kbd{M-q} in Fortran mode fills the comment block or statement that
1872point is in. This removes any excess statement continuations.
1873
1874@node ForIndent Cont
1875@subsubsection Continuation Lines
1876@cindex Fortran continuation lines
1877
1878@vindex fortran-continuation-string
1879 Most Fortran77 compilers allow two ways of writing continuation lines.
1880If the first non-space character on a line is in column 5, then that
1881line is a continuation of the previous line. We call this @dfn{fixed
1882format}. (In GNU Emacs we always count columns from 0; but note that
1883the Fortran standard counts from 1.) The variable
1884@code{fortran-continuation-string} specifies what character to put in
1885column 5. A line that starts with a tab character followed by any digit
1886except @samp{0} is also a continuation line. We call this style of
1887continuation @dfn{tab format}. (Fortran90 introduced ``free format'',
1888with another style of continuation lines).
1889
1890@vindex indent-tabs-mode @r{(Fortran mode)}
1891@vindex fortran-analyze-depth
1892@vindex fortran-tab-mode-default
1893 Fortran mode can use either style of continuation line. When you
1894enter Fortran mode, it tries to deduce the proper continuation style
1895automatically from the buffer contents. It does this by scanning up to
1896@code{fortran-analyze-depth} (default 100) lines from the start of the
1897buffer. The first line that begins with either a tab character or six
1898spaces determines the choice. If the scan fails (for example, if the
1899buffer is new and therefore empty), the value of
1900@code{fortran-tab-mode-default} (@code{nil} for fixed format, and
1901non-@code{nil} for tab format) is used. @samp{/t} in the mode line
1902indicates tab format is selected. Fortran mode sets the value of
1903@code{indent-tabs-mode} accordingly (@pxref{Just Spaces}).
1904
1905 If the text on a line starts with the Fortran continuation marker
1906@samp{$}, or if it begins with any non-whitespace character in column
19075, Fortran mode treats it as a continuation line. When you indent a
1908continuation line with @key{TAB}, it converts the line to the current
1909continuation style. When you split a Fortran statement with
1910@kbd{C-M-j}, the continuation marker on the newline is created according
1911to the continuation style.
1912
1913 The setting of continuation style affects several other aspects of
1914editing in Fortran mode. In fixed format mode, the minimum column
1915number for the body of a statement is 6. Lines inside of Fortran
1916blocks that are indented to larger column numbers always use only the
1917space character for whitespace. In tab format mode, the minimum
1918column number for the statement body is 8, and the whitespace before
1919column 8 must always consist of one tab character.
1920
1921@node ForIndent Num
1922@subsubsection Line Numbers
1923
1924 If a number is the first non-whitespace in the line, Fortran
1925indentation assumes it is a line number and moves it to columns 0
1926through 4. (Columns always count from 0 in GNU Emacs.)
1927
1928@vindex fortran-line-number-indent
1929 Line numbers of four digits or less are normally indented one space.
1930The variable @code{fortran-line-number-indent} controls this; it
1931specifies the maximum indentation a line number can have. The default
1932value of the variable is 1. Fortran mode tries to prevent line number
1933digits passing column 4, reducing the indentation below the specified
1934maximum if necessary. If @code{fortran-line-number-indent} has the
1935value 5, line numbers are right-justified to end in column 4.
1936
1937@vindex fortran-electric-line-number
1938 Simply inserting a line number is enough to indent it according to
1939these rules. As each digit is inserted, the indentation is recomputed.
1940To turn off this feature, set the variable
1941@code{fortran-electric-line-number} to @code{nil}.
1942
1943
1944@node ForIndent Conv
1945@subsubsection Syntactic Conventions
1946
1947 Fortran mode assumes that you follow certain conventions that simplify
1948the task of understanding a Fortran program well enough to indent it
1949properly:
1950
1951@itemize @bullet
1952@item
1953Two nested @samp{do} loops never share a @samp{continue} statement.
1954
1955@item
1956Fortran keywords such as @samp{if}, @samp{else}, @samp{then}, @samp{do}
1957and others are written without embedded whitespace or line breaks.
1958
1959Fortran compilers generally ignore whitespace outside of string
1960constants, but Fortran mode does not recognize these keywords if they
1961are not contiguous. Constructs such as @samp{else if} or @samp{end do}
1962are acceptable, but the second word should be on the same line as the
1963first and not on a continuation line.
1964@end itemize
1965
1966@noindent
1967If you fail to follow these conventions, the indentation commands may
1968indent some lines unaesthetically. However, a correct Fortran program
1969retains its meaning when reindented even if the conventions are not
1970followed.
1971
1972@node ForIndent Vars
1973@subsubsection Variables for Fortran Indentation
1974
1975@vindex fortran-do-indent
1976@vindex fortran-if-indent
1977@vindex fortran-structure-indent
1978@vindex fortran-continuation-indent
1979@vindex fortran-check-all-num@dots{}
1980@vindex fortran-minimum-statement-indent@dots{}
1981 Several additional variables control how Fortran indentation works:
1982
1983@table @code
1984@item fortran-do-indent
1985Extra indentation within each level of @samp{do} statement (default 3).
1986
1987@item fortran-if-indent
1988Extra indentation within each level of @samp{if}, @samp{select case}, or
1989@samp{where} statements (default 3).
1990
1991@item fortran-structure-indent
1992Extra indentation within each level of @samp{structure}, @samp{union},
1993@samp{map}, or @samp{interface} statements (default 3).
1994
1995@item fortran-continuation-indent
1996Extra indentation for bodies of continuation lines (default 5).
1997
1998@item fortran-check-all-num-for-matching-do
1999In Fortran77, a numbered @samp{do} statement is ended by any statement
2000with a matching line number. It is common (but not compulsory) to use a
2001@samp{continue} statement for this purpose. If this variable has a
2002non-@code{nil} value, indenting any numbered statement must check for a
2003@samp{do} that ends there. If you always end @samp{do} statements with
2004a @samp{continue} line (or if you use the more modern @samp{enddo}),
2005then you can speed up indentation by setting this variable to
2006@code{nil}. The default is @code{nil}.
2007
2008@item fortran-blink-matching-if
2009If this is @code{t}, indenting an @samp{endif} (or @samp{enddo}
2010statement moves the cursor momentarily to the matching @samp{if} (or
2011@samp{do}) statement to show where it is. The default is @code{nil}.
2012
2013@item fortran-minimum-statement-indent-fixed
2014Minimum indentation for Fortran statements when using fixed format
2015continuation line style. Statement bodies are never indented less than
2016this much. The default is 6.
2017
2018@item fortran-minimum-statement-indent-tab
2019Minimum indentation for Fortran statements for tab format continuation line
2020style. Statement bodies are never indented less than this much. The
2021default is 8.
2022@end table
2023
2024The variables controlling the indentation of comments are described in
2025the following section.
2026
2027@node Fortran Comments
2028@subsection Fortran Comments
2029
2030 The usual Emacs comment commands assume that a comment can follow a
2031line of code. In Fortran77, the standard comment syntax requires an
2032entire line to be just a comment. Therefore, Fortran mode replaces the
2033standard Emacs comment commands and defines some new variables.
2034
2035@vindex fortran-comment-line-start
2036 Fortran mode can also handle the Fortran90 comment syntax where comments
2037start with @samp{!} and can follow other text. Because only some Fortran77
2038compilers accept this syntax, Fortran mode will not insert such comments
2039unless you have said in advance to do so. To do this, set the variable
2040@code{fortran-comment-line-start} to @samp{"!"}.
2041
2042@table @kbd
2043@item M-;
2044Align comment or insert new comment (@code{fortran-indent-comment}).
2045
2046@item C-x ;
2047Applies to nonstandard @samp{!} comments only.
2048
2049@item C-c ;
2050Turn all lines of the region into comments, or (with argument) turn them back
2051into real code (@code{fortran-comment-region}).
2052@end table
2053
2054@findex fortran-indent-comment
2055 @kbd{M-;} in Fortran mode is redefined as the command
2056@code{fortran-indent-comment}. Like the usual @kbd{M-;} command, this
2057recognizes any kind of existing comment and aligns its text appropriately;
2058if there is no existing comment, a comment is inserted and aligned. But
2059inserting and aligning comments are not the same in Fortran mode as in
2060other modes.
2061
2062 When a new comment must be inserted, if the current line is blank, a
2063full-line comment is inserted. On a non-blank line, a nonstandard @samp{!}
2064comment is inserted if you have said you want to use them. Otherwise a
2065full-line comment is inserted on a new line before the current line.
2066
2067 Nonstandard @samp{!} comments are aligned like comments in other
2068languages, but full-line comments are different. In a standard full-line
2069comment, the comment delimiter itself must always appear in column zero.
2070What can be aligned is the text within the comment. You can choose from
2071three styles of alignment by setting the variable
2072@code{fortran-comment-indent-style} to one of these values:
2073
2074@vindex fortran-comment-indent-style
2075@vindex fortran-comment-line-extra-indent
2076@table @code
2077@item fixed
2078Align the text at a fixed column, which is the sum of
2079@code{fortran-comment-line-extra-indent} and the minimum statement
2080indentation. This is the default.
2081
2082The minimum statement indentation is
2083@code{fortran-minimum-statement-indent-fixed} for fixed format
2084continuation line style and @code{fortran-minimum-statement-indent-tab}
2085for tab format style.
2086
2087@item relative
2088Align the text as if it were a line of code, but with an additional
2089@code{fortran-comment-line-extra-indent} columns of indentation.
2090
2091@item nil
2092Don't move text in full-line comments automatically.
2093@end table
2094
2095@vindex fortran-comment-indent-char
2096 In addition, you can specify the character to be used to indent within
2097full-line comments by setting the variable
2098@code{fortran-comment-indent-char} to the single-character string you want
2099to use.
2100
2101@vindex fortran-directive-re
2102 Compiler directive lines, or preprocessor lines, have much the same
2103appearance as comment lines. It is important, though, that such lines
2104never be indented at all, no matter what the value of
2105@code{fortran-comment-indent-style}. The variable
2106@code{fortran-directive-re} is a regular expression that specifies which
2107lines are directives. Matching lines are never indented, and receive
2108distinctive font-locking.
2109
2110 The normal Emacs comment command @kbd{C-x ;} has not been redefined. If
2111you use @samp{!} comments, this command can be used with them. Otherwise
2112it is useless in Fortran mode.
2113
2114@kindex C-c ; @r{(Fortran mode)}
2115@findex fortran-comment-region
2116@vindex fortran-comment-region
2117 The command @kbd{C-c ;} (@code{fortran-comment-region}) turns all the
2118lines of the region into comments by inserting the string @samp{C$$$} at
2119the front of each one. With a numeric argument, it turns the region
2120back into live code by deleting @samp{C$$$} from the front of each line
2121in it. The string used for these comments can be controlled by setting
2122the variable @code{fortran-comment-region}. Note that here we have an
2123example of a command and a variable with the same name; these two uses
2124of the name never conflict because in Lisp and in Emacs it is always
2125clear from the context which one is meant.
2126
2127@node Fortran Autofill
2128@subsection Auto Fill in Fortran Mode
2129
2130 Fortran mode has specialized support for Auto Fill mode, which is a
2131minor mode that automatically splits statements as you insert them when
2132they become too wide. Splitting a statement involves making
2133continuation lines using @code{fortran-continuation-string}
2134(@pxref{ForIndent Cont}). This splitting happens when you type
2135@key{SPC}, @key{RET}, or @key{TAB}, and also in the Fortran indentation
2136commands. You activate Auto Fill in Fortran mode in the normal way
2137(@pxref{Auto Fill}).
2138
2139@vindex fortran-break-before-delimiters
2140 Auto Fill breaks lines at spaces or delimiters when the lines get
2141longer than the desired width (the value of @code{fill-column}). The
2142delimiters (besides whitespace) that Auto Fill can break at are
2143@samp{+}, @samp{-}, @samp{/}, @samp{*}, @samp{=}, @samp{<}, @samp{>},
2144and @samp{,}. The line break comes after the delimiter if the
2145variable @code{fortran-break-before-delimiters} is @code{nil}.
2146Otherwise (and by default), the break comes before the delimiter.
2147
2148 To enable Auto Fill in all Fortran buffers, add
2149@code{turn-on-auto-fill} to @code{fortran-mode-hook}. @xref{Hooks}.
2150
2151@node Fortran Columns
2152@subsection Checking Columns in Fortran
2153
2154@table @kbd
2155@item C-c C-r
2156Display a ``column ruler'' momentarily above the current line
2157(@code{fortran-column-ruler}).
2158@item C-c C-w
2159Split the current window horizontally temporarily so that it is 72
2160columns wide (@code{fortran-window-create-momentarily}). This may
2161help you avoid making lines longer than the 72-character limit that
2162some Fortran compilers impose.
2163@item C-u C-c C-w
2164Split the current window horizontally so that it is 72 columns wide
2165(@code{fortran-window-create}). You can then continue editing.
2166@item M-x fortran-strip-sequence-nos
2167Delete all text in column 72 and beyond.
2168@end table
2169
2170@kindex C-c C-r @r{(Fortran mode)}
2171@findex fortran-column-ruler
2172 The command @kbd{C-c C-r} (@code{fortran-column-ruler}) shows a column
2173ruler momentarily above the current line. The comment ruler is two lines
2174of text that show you the locations of columns with special significance in
2175Fortran programs. Square brackets show the limits of the columns for line
2176numbers, and curly brackets show the limits of the columns for the
2177statement body. Column numbers appear above them.
2178
2179 Note that the column numbers count from zero, as always in GNU Emacs.
2180As a result, the numbers may be one less than those you are familiar
2181with; but the positions they indicate in the line are standard for
2182Fortran.
2183
2184@vindex fortran-column-ruler-fixed
2185@vindex fortran-column-ruler-tabs
2186 The text used to display the column ruler depends on the value of the
2187variable @code{indent-tabs-mode}. If @code{indent-tabs-mode} is
2188@code{nil}, then the value of the variable
2189@code{fortran-column-ruler-fixed} is used as the column ruler.
2190Otherwise, the value of the variable @code{fortran-column-ruler-tab} is
2191displayed. By changing these variables, you can change the column ruler
2192display.
2193
2194@kindex C-c C-w @r{(Fortran mode)}
2195@findex fortran-window-create-momentarily
2196 @kbd{C-c C-w} (@code{fortran-window-create-momentarily}) temporarily
2197splits the current window horizontally, making a window 72 columns
2198wide, so you can see any lines that are too long. Type a space to
2199restore the normal width.
2200
2201@kindex C-u C-c C-w @r{(Fortran mode)}
2202@findex fortran-window-create
2203 You can also split the window horizontally and continue editing with
2204the split in place. To do this, use @kbd{C-u C-c C-w} (@code{M-x
2205fortran-window-create}). By editing in this window you can
2206immediately see when you make a line too wide to be correct Fortran.
2207
2208@findex fortran-strip-sequence-nos
2209 The command @kbd{M-x fortran-strip-sequence-nos} deletes all text in
2210column 72 and beyond, on all lines in the current buffer. This is the
2211easiest way to get rid of old sequence numbers.
2212
2213@node Fortran Abbrev
2214@subsection Fortran Keyword Abbrevs
2215
2216 Fortran mode provides many built-in abbrevs for common keywords and
2217declarations. These are the same sort of abbrev that you can define
2218yourself. To use them, you must turn on Abbrev mode. @xref{Abbrevs}.
2219
2220 The built-in abbrevs are unusual in one way: they all start with a
2221semicolon. You cannot normally use semicolon in an abbrev, but Fortran
2222mode makes this possible by changing the syntax of semicolon to ``word
2223constituent.''
2224
2225 For example, one built-in Fortran abbrev is @samp{;c} for
2226@samp{continue}. If you insert @samp{;c} and then insert a punctuation
2227character such as a space or a newline, the @samp{;c} expands automatically
2228to @samp{continue}, provided Abbrev mode is enabled.@refill
2229
2230 Type @samp{;?} or @samp{;C-h} to display a list of all the built-in
2231Fortran abbrevs and what they stand for.
2232
2233@node Asm Mode 1718@node Asm Mode
2234@section Asm Mode 1719@section Asm Mode
2235 1720
diff --git a/man/sending.texi b/man/sending.texi
index 2fbf9a189c7..299787e529c 100644
--- a/man/sending.texi
+++ b/man/sending.texi
@@ -2,7 +2,7 @@
2@c Copyright (C) 1985, 1986, 1987, 1993, 1994, 1995, 1997, 2000, 2001, 2002, 2@c Copyright (C) 1985, 1986, 1987, 1993, 1994, 1995, 1997, 2000, 2001, 2002,
3@c 2003, 2004, 2005, 2006 Free Software Foundation, Inc. 3@c 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
4@c See file emacs.texi for copying conditions. 4@c See file emacs.texi for copying conditions.
5@node Sending Mail, Rmail, Picture, Top 5@node Sending Mail, Rmail, Abbrevs, Top
6@chapter Sending Mail 6@chapter Sending Mail
7@cindex sending mail 7@cindex sending mail
8@cindex mail 8@cindex mail
diff --git a/man/text.texi b/man/text.texi
index 2b70c599b89..cf3d03af4d5 100644
--- a/man/text.texi
+++ b/man/text.texi
@@ -51,6 +51,12 @@ Then the formatting appears on the screen in Emacs while you edit.
51@xref{Formatted Text}. 51@xref{Formatted Text}.
52@end iftex 52@end iftex
53 53
54@cindex ASCII art
55 If you need to edit pictures made out of text characters (commonly
56referred to as ``ASCII art''), use @kbd{M-x edit-picture} to enter
57Picture mode, a special major mode for editing such pictures.
58@inforef{Picture Mode,, emacs-xtra}.
59
54@cindex skeletons 60@cindex skeletons
55@cindex templates 61@cindex templates
56@cindex autotyping 62@cindex autotyping
diff --git a/nt/INSTALL b/nt/INSTALL
index c0706e3dadf..f9231d4b704 100644
--- a/nt/INSTALL
+++ b/nt/INSTALL
@@ -1,10 +1,64 @@
1 Building and Installing Emacs 1 Building and Installing Emacs
2 on Windows NT/2K/XP and Windows 95/98/ME 2 on Windows NT/2K/XP and Windows 95/98/ME
3 3
4 Copyright (C) 2001, 2002, 2003, 2004, 2005, 4 Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006
5 2006 Free Software Foundation, Inc. 5 Free Software Foundation, Inc.
6 See the end of the file for copying permissions. 6 See the end of the file for copying permissions.
7 7
8* For the impatient
9
10 Here are the concise instructions for configuring and building the
11 native Win32 binary of Emacs on Windows, for those who want to skip
12 the complex explanations and ``just do it'':
13
14 1. Change to the `nt' directory (the directory of this file):
15
16 cd nt
17
18 2. Run configure.bat. From the COMMAND.COM/CMD.EXE command prompt:
19
20 configure
21
22 from a Unixy shell prompt:
23
24 cmd /c configure.bat
25 or
26 command.com /c configure.bat
27
28 3. Run the Make utility suitable for your environment. If you build
29 with the Microsoft's Visual C compiler:
30
31 nmake
32
33 For the development environments based on GNU GCC (MinGW, MSYS,
34 Cygwin), depending on how Make is called, it could be:
35
36 make
37 or
38 gnumake
39 or
40 gmake
41
42 (If you are building from CVS, say "make bootstrap" or "nmake
43 bootstrap" instead.)
44
45 4. Generate the Info manuals (only if you are building out of CVS):
46
47 make info
48
49 (change "make" to "nmake" if you use MSVC).
50
51 5. Install the produced binaries:
52
53 make install
54
55 That's it!
56
57 If these short instructions somehow fail, read the rest of this
58 file.
59
60* Preliminaries
61
8 If you used WinZip to unpack the distribution, we suggest to 62 If you used WinZip to unpack the distribution, we suggest to
9 remove the files and unpack again with a different program! 63 remove the files and unpack again with a different program!
10 WinZip is known to create some subtle and hard to debug problems, 64 WinZip is known to create some subtle and hard to debug problems,
@@ -28,6 +82,8 @@
28 "touch.exe" in your path, and that it will create files that do not 82 "touch.exe" in your path, and that it will create files that do not
29 yet exist. 83 yet exist.
30 84
85* Supported development environments
86
31 To compile Emacs, you will need either Microsoft Visual C++ 2.0 or 87 To compile Emacs, you will need either Microsoft Visual C++ 2.0 or
32 later and nmake, or a Windows port of GCC 2.95 or later with MinGW 88 later and nmake, or a Windows port of GCC 2.95 or later with MinGW
33 and W32 API support and a port of GNU Make. You can use the Cygwin 89 and W32 API support and a port of GNU Make. You can use the Cygwin
@@ -35,6 +91,11 @@
35 build (latest versions of the Cygwin toolkit, at least since v1.3.3, 91 build (latest versions of the Cygwin toolkit, at least since v1.3.3,
36 include the MinGW headers and libraries as an integral part). 92 include the MinGW headers and libraries as an integral part).
37 93
94 The rest of this file assumes you have a working development
95 environment. If you just installed such an environment, try
96 building a trivial C "Hello world" program, and see if it works. If
97 it doesn't work, resolve that problem first!
98
38 If you use the MinGW port of GCC and GNU Make to build Emacs, there 99 If you use the MinGW port of GCC and GNU Make to build Emacs, there
39 are some compatibility issues wrt Make and the shell that is run by 100 are some compatibility issues wrt Make and the shell that is run by
40 Make, either the standard COMMAND.COM/CMD.EXE supplied with Windows 101 Make, either the standard COMMAND.COM/CMD.EXE supplied with Windows
@@ -90,33 +151,38 @@
90 and other useful Posix utilities can be obtained from one of several 151 and other useful Posix utilities can be obtained from one of several
91 projects: 152 projects:
92 153
154 * http://gnuwin32.sourceforge.net/ ( GnuWin32 )
93 * http://www.mingw.org/ ( MinGW ) 155 * http://www.mingw.org/ ( MinGW )
94 * http://www.cygwin.com/ ( Cygwin ) 156 * http://www.cygwin.com/ ( Cygwin )
95 * http://unxutils.sourceforge.net/ ( UnxUtils ) 157 * http://unxutils.sourceforge.net/ ( UnxUtils )
96 * http://gnuwin32.sourceforge.net/ ( GnuWin32 )
97 158
98 If you build Emacs on Windows 9X or ME, not on Windows 2K/XP or 159 If you build Emacs on Windows 9X or ME, not on Windows 2K/XP or
99 Windows NT, we suggest to install the Cygwin port of Bash. 160 Windows NT, we suggest to install the Cygwin port of Bash. That is
161 because the native Windows shell COMMAND.COM is too limited; the
162 Emacs build procedure tries very hard to support even such limited
163 shells, but as none of the Windows developers of Emacs work on
164 Windows 9x, we cannot guarantee that it works without a more
165 powerful shell.
100 166
101 Additional instructions and help for building Emacs on Windows can be 167 Additional instructions and help for building Emacs on Windows can be
102 found at the Emacs Wiki: 168 found at the Emacs Wiki:
103 169
104 http://www.emacswiki.org/cgi-bin/wiki/WThirtyTwoInstallationKit 170 http://www.emacswiki.org/cgi-bin/wiki/WThirtyTwoInstallationKit
105 171
106 and at this URL: 172 and at this URL:
107 173
108 http://ourcomments.org/Emacs/w32-build-emacs.html 174 http://ourcomments.org/Emacs/w32-build-emacs.html
109 175
110* Configuring 176* Configuring
111 177
112 Configuration of Emacs is now handled by running configure.bat in the 178 Configuration of Emacs is now handled by running configure.bat in the
113 nt subdirectory. It will detect which compiler you have available, 179 `nt' subdirectory. It will detect which compiler you have available,
114 and generate makefiles accordingly. You can override the compiler 180 and generate makefiles accordingly. You can override the compiler
115 detection, and control optimization and debug settings, by specifying 181 detection, and control optimization and debug settings, by specifying
116 options on the command line when invoking configure. 182 options on the command line when invoking configure.
117 183
118 To configure Emacs to build with GCC or MSVC, whichever is available, 184 To configure Emacs to build with GCC or MSVC, whichever is available,
119 simply change to the nt subdirectory and run `configure' with no 185 simply change to the `nt' subdirectory and run `configure.bat' with no
120 options. To see what options are available, run `configure --help'. 186 options. To see what options are available, run `configure --help'.
121 187
122 N.B. It is normal to see a few error messages output while configure 188 N.B. It is normal to see a few error messages output while configure
@@ -169,7 +235,8 @@
169 235
170 After running configure, simply run the appropriate `make' program for 236 After running configure, simply run the appropriate `make' program for
171 your compiler to build Emacs. For MSVC, this is nmake; for GCC, it is 237 your compiler to build Emacs. For MSVC, this is nmake; for GCC, it is
172 GNU make. 238 GNU make. (If you are building out of CVS, say "make bootstrap" or
239 "nmake bootstrap" instead.)
173 240
174 As the files are compiled, you will see some warning messages 241 As the files are compiled, you will see some warning messages
175 declaring that some functions don't return a value, or that some data 242 declaring that some functions don't return a value, or that some data
@@ -177,6 +244,13 @@
177 The warnings may be fixed in the main FSF source at some point, but 244 The warnings may be fixed in the main FSF source at some point, but
178 until then we will just live with them. 245 until then we will just live with them.
179 246
247 If you are building from CVS, the following commands will produce
248 the Info manuals (which are not part of the CVS repository):
249
250 make info
251 or
252 nmake info
253
180* Installing 254* Installing
181 255
182 To install Emacs after it has compiled, simply run `nmake install' 256 To install Emacs after it has compiled, simply run `nmake install'
diff --git a/src/ChangeLog b/src/ChangeLog
index f6edc410276..867306579ab 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,141 @@
12006-03-21 Ken Raeburn <raeburn@raeburn.org>
2
3 * xdisp.c (store_next_glyph): Renamed from append_glyph.
4 (generate_stretch_glyph): Renamed from produce_stretch_glyph.
5 All callers changed accordingly.
6
72006-03-21 Jan Dj,Ad(Brv <jan.h.d@swipnet.se>
8
9 * xterm.c: x_session_initialized new variable.
10 (x_term_init): Use x_session_initialized to check if
11 x_session_initialize should be called.
12 (x_initialize): Initialize x_session_initialized.
13
142006-03-21 Kim F. Storm <storm@cua.dk>
15
16 * fringe.c (draw_fringe_bitmap): Don't calculate default overlay arrow
17 bitmap here, but ...
18 (update_window_fringes): ... here, so we can test if it has changed.
19
202006-03-20 Andreas Schwab <schwab@suse.de>
21
22 * dispnew.c (init_display): Check DISPLAY here.
23
24 * emacs.c (main): Don't check here.
25
26 * xterm.c (x_display_ok): Don't use DISPLAY env var.
27
282006-03-20 Stefan Monnier <monnier@iro.umontreal.ca>
29
30 * window.c (window_scroll_pixel_based): Yet another int/Lisp_Object
31 mixup (YAILOM).
32
332006-03-20 Eli Zaretskii <eliz@gnu.org>
34
35 * emacs.c (main): Fix last change.
36
372006-03-20 Kenichi Handa <handa@m17n.org>
38
39 * fileio.c (Fwrite_region): Set visit_file to Qnil before GCPRO it.
40
41 * keymap.c (map_keymap): Set tail to Qnil before GCPRO it.
42
43 * xfns.c (xg_set_icon): Remove unnecessary GCPRO.
44
45 * xterm.c (x_term_init): Remove unnecessary GCPRO.
46
472006-03-19 Kim F. Storm <storm@cua.dk>
48
49 * xdisp.c (set_cursor_from_row): Fix cursor property on overlay string,
50 so it doesn't associate overlay string with following glyph by default.
51 Allow integer property value to specify explicit number of buffer
52 positions associate with overlay string.
53
542006-03-18 Chong Yidong <cyd@stupidchicken.com>
55
56 * xterm.c (x_display_ok): Fix minor bug and compilation warnings.
57
582006-03-18 Nozomu Ando <nand@mac.com>
59
60 * m/pmax.h (BROKEN_NOCOMBRELOC) [__NetBSD__]: Define.
61 (LIB_STANDARD, START_FILES) [__NetBSD__]: Don't define.
62 (START_FILES, RUN_TIME_REMAP, UNEXEC) [__NetBSD__, __OpenBSD__]:
63 Don't redefine.
64
65 * m/mips.h: Don't use unexmips on NetBSD.
66 (LIBS_MACHINE): Move definition lower, so it doesn't use
67 LD_SWITCH_MACHINE, START_FILES, LIB_STANDARD, LIBS_TERMCAP,
68 C_SWITCH_MACHINE, and C_DEBUG_SWITCH.
69
70 * unexelf.c [BROKEN_NOCOMBRELOC]: Include assert.h.
71 (unexec) [BROKEN_NOCOMBRELOC]: Handle platforms whose nocombreloc
72 option is broken (e.g., MIPS/NetBSD).
73
742006-03-18 Craig McDaniel <craigmcd@gmail.com> (tiny change)
75
76 * sheap.c (STATIC_HEAP_SIZE): Enlarge STATIC_HEAP_SIZE to 12MB.
77 Remove the HAVE_X_WINDOWS conditional.
78
792006-03-18 Vivek Dasmohapatra <vivek@etla.org> (tiny change)
80
81 * emacs.c (main): If user asks for a display that is unavailable,
82 simulate -nw.
83
84 * xterm.c (x_display_ok): New function.
85
86 * xterm.h: Add prototype for x_display_ok.
87
882006-03-18 Eli Zaretskii <eliz@gnu.org>
89
90 * w32fns.c (Fw32_select_font): Doc fix.
91
922006-03-16 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
93
94 * image.c [MAC_OS] (XPutPixel, XGetPixel)
95 [!WORDS_BIG_ENDIAN && USE_CG_DRAWING]: Don't use specialized
96 version when depth is 32.
97 (mac_create_cg_image_from_image) [MAC_OS && USE_CG_DRAWING]:
98 New function.
99 (prepare_image_for_display) [MAC_OS && USE_CG_DRAWING]: Use it.
100 (x_clear_image_1) [MAC_OS && USE_CG_DRAWING]: Release CGImage.
101
102 * macterm.c (XCreatePixmap) [!WORDS_BIG_ENDIAN && USE_CG_DRAWING]:
103 Create GWorld in ARGB pixel format.
104 (mac_copy_area, mac_copy_area_with_mask) [USE_CG_DRAWING]:
105 Remove functions.
106 (x_draw_image_foreground) [USE_CG_DRAWING]: Use mac_draw_cg_image
107 instead of mac_copy_area/mac_copy_area_with_mask.
108
1092006-03-15 Kim F. Storm <storm@cua.dk>
110
111 * xdisp.c (extend_face_to_end_of_line): Always add space glyph to
112 empty row. Fixes memory corruption revealed by 2006-03-02 change.
113 (display_tool_bar_line): Skip empty tool-bar line if HEIGHT < 0.
114 (tool_bar_lines_needed): Fix tool-bar display in case the tool-bar
115 width is exactly the same as the window width. Don't count a final
116 empty tool-bar line (pass HEIGHT = -1 to display_tool_bar_line).
117
1182006-03-15 Juanma Barranquero <lekktu@gmail.com>
119
120 * fringe.c (w32_init_fringe, w32_reset_fringes): Revert to being
121 conditional on HAVE_NTGUI, not WINDOWS_NT.
122
1232006-03-15 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
124
125 * dispextern.h (mac_init_fringe) [MAC_OS]: Add prototype.
126
127 * fringe.c (mac_init_fringe) [MAC_OS]: New function.
128
129 * macterm.c (mac_initialize) [USE_CG_DRAWING]: Call mac_init_fringe.
130 (max_fringe_bmp, fringe_bmp) [USE_CG_DRAWING]: New variables.
131 (mac_define_fringe_bitmap, mac_destroy_fringe_bitmap)
132 (mac_draw_cg_image) [USE_CG_DRAWING]: New functions.
133 (mac_draw_bitmap) [USE_CG_DRAWING]: Remove function.
134 (x_draw_fringe_bitmap) [USE_CG_DRAWING]: Use mac_draw_cg_image
135 instead of mac_draw_bitmap.
136 (x_redisplay_interface) [USE_CG_DRAWING]: Set handlers for
137 define_fringe_bitmap and destroy_fringe_bitmap.
138
12006-03-14 Chong Yidong <cyd@stupidchicken.com> 1392006-03-14 Chong Yidong <cyd@stupidchicken.com>
2 140
3 * xterm.c (x_uncatch_errors): Block input for entire function. 141 * xterm.c (x_uncatch_errors): Block input for entire function.
@@ -5,7 +143,7 @@
52006-03-12 Jason Rumney <jasonr@gnu.org> 1432006-03-12 Jason Rumney <jasonr@gnu.org>
6 144
7 * w32fns.c (Fx_create_frame): Remove call to 145 * w32fns.c (Fx_create_frame): Remove call to
8 Qface_set_after_frame_default. (from xfns.c 2003-05-26) 146 Qface_set_after_frame_default (from xfns.c 2003-05-26).
9 147
10 * w32menu.c (Fx_popup_menu): Call w32_free_menu_strings when 148 * w32menu.c (Fx_popup_menu): Call w32_free_menu_strings when
11 finished with the menu. 149 finished with the menu.
@@ -15,7 +153,7 @@
15 (note_mouse_movement): Say mouse moved if current frame differs 153 (note_mouse_movement): Say mouse moved if current frame differs
16 from last_mouse_glyph_frame, and update last_mouse_glyph_frame. 154 from last_mouse_glyph_frame, and update last_mouse_glyph_frame.
17 (w32_mouse_position): Set last_mouse_glyph_frame. 155 (w32_mouse_position): Set last_mouse_glyph_frame.
18 Remove OLD_REDISPLAY_CODE block. 156 Remove OLD_REDISPLAY_CODE block.
19 157
202006-03-12 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> 1582006-03-12 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
21 159
@@ -68,8 +206,7 @@
68 206
692006-03-11 David Ponce <david@dponce.com> 2072006-03-11 David Ponce <david@dponce.com>
70 208
71 * xfns.c (x_create_tip_frame): Preserve received parms by copying 209 * xfns.c (x_create_tip_frame): Preserve received parms by copying them.
72 them.
73 210
742006-03-11 Eli Zaretskii <eliz@gnu.org> 2112006-03-11 Eli Zaretskii <eliz@gnu.org>
75 212
@@ -90,14 +227,14 @@
90 * keymap.c (describe_map): Shorten string to indicate shadowed binding. 227 * keymap.c (describe_map): Shorten string to indicate shadowed binding.
91 228
92 * vm-limit.c (get_lim_data, lim_data, data_space_start): 229 * vm-limit.c (get_lim_data, lim_data, data_space_start):
93 Moved from mem-limits.h. 230 Move from mem-limits.h.
94 (enum warnlevel): New data type. 231 (enum warnlevel): New data type.
95 (check_memory_limits): Rewrite the logic about warnings. 232 (check_memory_limits): Rewrite the logic about warnings.
96 Use standard `struct rlimit'. Check return values for nonsense. 233 Use standard `struct rlimit'. Check return values for nonsense.
97 (memory_warnings): Always clear lim_data. 234 (memory_warnings): Always clear lim_data.
98 235
99 * mem-limits.h (get_lim_data, lim_data, data_space_start): 236 * mem-limits.h (get_lim_data, lim_data, data_space_start):
100 Moved to vm-limit.c. 237 Move to vm-limit.c.
101 238
102 * xterm.c (x_fully_uncatch_errors, x_catching_errors): New functions. 239 * xterm.c (x_fully_uncatch_errors, x_catching_errors): New functions.
103 240
@@ -193,7 +330,7 @@
193 330
194 * xdisp.c: Minimize the unpleasent visual impact of the requirement 331 * xdisp.c: Minimize the unpleasent visual impact of the requirement
195 that non-toolkit tool-bars must occupy an integral number of screen 332 that non-toolkit tool-bars must occupy an integral number of screen
196 lines, by distributing the rows evenly over the tool-bar screen area. 333 lines, by distributing the rows evenly over the tool-bar screen area.
197 (Vtool_bar_border): New variable. 334 (Vtool_bar_border): New variable.
198 (syms_of_xdisp): DEFVAR_LISP it. 335 (syms_of_xdisp): DEFVAR_LISP it.
199 (display_tool_bar_line): Add HEIGHT arg for desired row height. 336 (display_tool_bar_line): Add HEIGHT arg for desired row height.
@@ -227,9 +364,9 @@
227 364
228 * xterm.h, xterm.c (x_uncatch_errors): Delete unneccessary argument. 365 * xterm.h, xterm.c (x_uncatch_errors): Delete unneccessary argument.
229 366
230 * xterm.c: (x_load_font, x_term_init, XTmouse_position) 367 * xterm.c (x_load_font, x_term_init, XTmouse_position)
231 (handle_one_xevent, x_connection_closed, x_list_fonts): No arg for 368 (handle_one_xevent, x_connection_closed, x_list_fonts):
232 x_uncatch_errors. 369 No arg for x_uncatch_errors.
233 370
234 * xselect.c (x_own_selection, x_decline_selection_request) 371 * xselect.c (x_own_selection, x_decline_selection_request)
235 (x_reply_selection_request, x_get_foreign_selection) 372 (x_reply_selection_request, x_get_foreign_selection)
@@ -357,7 +494,7 @@
357 494
358 * fringe.c (syms_of_fringe) <fringe-bitmaps>: Doc fix. 495 * fringe.c (syms_of_fringe) <fringe-bitmaps>: Doc fix.
359 496
3602006-02-21 Zhang Wei <brep@newsmth.org> 4972006-02-21 Zhang Wei <brep@newsmth.org>
361 498
362 * xfns.c (Fx_file_dialog, Motif and GTK): DECODE_FILE before 499 * xfns.c (Fx_file_dialog, Motif and GTK): DECODE_FILE before
363 returning it. 500 returning it.
@@ -426,7 +563,7 @@
426 (draw_fringe_bitmap_1): Make static. 563 (draw_fringe_bitmap_1): Make static.
427 (get_logical_cursor_bitmap, get_logical_fringe_bitmap): New functions 564 (get_logical_cursor_bitmap, get_logical_fringe_bitmap): New functions
428 to map from logical cursors and indicators to physical bitmaps. 565 to map from logical cursors and indicators to physical bitmaps.
429 (draw_fringe_bitmap): Resolve fringe cursor and overlay-arrow 566 (draw_fringe_bitmap): Resolve fringe cursor and overlay-arrow
430 bitmaps using symbol names instead of bitmap numbers. 567 bitmaps using symbol names instead of bitmap numbers.
431 (update_window_fringes): Use logical indicator symbol names 568 (update_window_fringes): Use logical indicator symbol names
432 instead of bitmap numbers for logical. Add bitmap cache. 569 instead of bitmap numbers for logical. Add bitmap cache.
diff --git a/src/dispextern.h b/src/dispextern.h
index 66ec02d724a..157f49dea6d 100644
--- a/src/dispextern.h
+++ b/src/dispextern.h
@@ -2722,6 +2722,9 @@ void compute_fringe_widths P_ ((struct frame *, int));
2722void w32_init_fringe P_ ((void)); 2722void w32_init_fringe P_ ((void));
2723void w32_reset_fringes P_ ((void)); 2723void w32_reset_fringes P_ ((void));
2724#endif 2724#endif
2725#ifdef MAC_OS
2726void mac_init_fringe P_ ((void));
2727#endif
2725 2728
2726/* Defined in image.c */ 2729/* Defined in image.c */
2727 2730
diff --git a/src/dispnew.c b/src/dispnew.c
index 5f3c8eacc3d..296dbece477 100644
--- a/src/dispnew.c
+++ b/src/dispnew.c
@@ -6705,6 +6705,13 @@ init_display ()
6705#endif 6705#endif
6706 6706
6707 display_arg = (display != 0 && *display != 0); 6707 display_arg = (display != 0 && *display != 0);
6708
6709 if (display_arg && !x_display_ok (display))
6710 {
6711 fprintf (stderr, "Display %s unavailable, simulating -nw\n",
6712 display);
6713 inhibit_window_system = 1;
6714 }
6708 } 6715 }
6709 6716
6710 if (!inhibit_window_system && display_arg 6717 if (!inhibit_window_system && display_arg
diff --git a/src/fileio.c b/src/fileio.c
index e27f87bcbcf..2248963102a 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -5011,6 +5011,7 @@ This does code conversion according to the value of
5011 if (!NILP (start) && !STRINGP (start)) 5011 if (!NILP (start) && !STRINGP (start))
5012 validate_region (&start, &end); 5012 validate_region (&start, &end);
5013 5013
5014 visit_file = Qnil;
5014 GCPRO5 (start, filename, visit, visit_file, lockname); 5015 GCPRO5 (start, filename, visit, visit_file, lockname);
5015 5016
5016 filename = Fexpand_file_name (filename, Qnil); 5017 filename = Fexpand_file_name (filename, Qnil);
diff --git a/src/fringe.c b/src/fringe.c
index 721b572e373..4b8ac34fe09 100644
--- a/src/fringe.c
+++ b/src/fringe.c
@@ -867,10 +867,7 @@ draw_fringe_bitmap (w, row, left_p)
867 draw_fringe_bitmap_1 (w, row, left_p, overlay, NO_FRINGE_BITMAP); 867 draw_fringe_bitmap_1 (w, row, left_p, overlay, NO_FRINGE_BITMAP);
868 868
869 if (left_p && row->overlay_arrow_bitmap != NO_FRINGE_BITMAP) 869 if (left_p && row->overlay_arrow_bitmap != NO_FRINGE_BITMAP)
870 draw_fringe_bitmap_1 (w, row, 1, 1, 870 draw_fringe_bitmap_1 (w, row, 1, 1, row->overlay_arrow_bitmap);
871 (row->overlay_arrow_bitmap < 0
872 ? get_logical_fringe_bitmap (w, Qoverlay_arrow, 0, 0)
873 : row->overlay_arrow_bitmap));
874} 871}
875 872
876 873
@@ -1152,6 +1149,9 @@ update_window_fringes (w, keep_current_p)
1152 } 1149 }
1153 } 1150 }
1154 1151
1152 if (row->overlay_arrow_bitmap < 0)
1153 row->overlay_arrow_bitmap = get_logical_fringe_bitmap (w, Qoverlay_arrow, 0, 0);
1154
1155 if (row->overlay_arrow_bitmap != cur->overlay_arrow_bitmap) 1155 if (row->overlay_arrow_bitmap != cur->overlay_arrow_bitmap)
1156 { 1156 {
1157 redraw_p = row->redraw_fringe_bitmaps_p = cur->redraw_fringe_bitmaps_p = 1; 1157 redraw_p = row->redraw_fringe_bitmaps_p = cur->redraw_fringe_bitmaps_p = 1;
@@ -1695,10 +1695,14 @@ init_fringe ()
1695 } 1695 }
1696} 1696}
1697 1697
1698#ifdef HAVE_NTGUI 1698#if defined (HAVE_NTGUI) || defined (MAC_OS)
1699 1699
1700void 1700void
1701#ifdef HAVE_NTGUI
1701w32_init_fringe () 1702w32_init_fringe ()
1703#else /* MAC_OS */
1704mac_init_fringe ()
1705#endif
1702{ 1706{
1703 int bt; 1707 int bt;
1704 1708
@@ -1711,7 +1715,9 @@ w32_init_fringe ()
1711 rif->define_fringe_bitmap (bt, fb->bits, fb->height, fb->width); 1715 rif->define_fringe_bitmap (bt, fb->bits, fb->height, fb->width);
1712 } 1716 }
1713} 1717}
1718#endif
1714 1719
1720#ifdef HAVE_NTGUI
1715void 1721void
1716w32_reset_fringes () 1722w32_reset_fringes ()
1717{ 1723{
diff --git a/src/image.c b/src/image.c
index ba78a835ef3..8e3a0afe91a 100644
--- a/src/image.c
+++ b/src/image.c
@@ -189,6 +189,7 @@ XPutPixel (ximage, x, y, pixel)
189 PixMapHandle pixmap = GetGWorldPixMap (ximage); 189 PixMapHandle pixmap = GetGWorldPixMap (ximage);
190 short depth = GetPixDepth (pixmap); 190 short depth = GetPixDepth (pixmap);
191 191
192#if defined (WORDS_BIG_ENDIAN) || !USE_CG_DRAWING
192 if (depth == 32) 193 if (depth == 32)
193 { 194 {
194 char *base_addr = GetPixBaseAddr (pixmap); 195 char *base_addr = GetPixBaseAddr (pixmap);
@@ -196,7 +197,9 @@ XPutPixel (ximage, x, y, pixel)
196 197
197 ((unsigned long *) (base_addr + y * row_bytes))[x] = 0xff000000 | pixel; 198 ((unsigned long *) (base_addr + y * row_bytes))[x] = 0xff000000 | pixel;
198 } 199 }
199 else if (depth == 1) 200 else
201#endif
202 if (depth == 1)
200 { 203 {
201 char *base_addr = GetPixBaseAddr (pixmap); 204 char *base_addr = GetPixBaseAddr (pixmap);
202 short row_bytes = GetPixRowBytes (pixmap); 205 short row_bytes = GetPixRowBytes (pixmap);
@@ -233,6 +236,7 @@ XGetPixel (ximage, x, y)
233 PixMapHandle pixmap = GetGWorldPixMap (ximage); 236 PixMapHandle pixmap = GetGWorldPixMap (ximage);
234 short depth = GetPixDepth (pixmap); 237 short depth = GetPixDepth (pixmap);
235 238
239#if defined (WORDS_BIG_ENDIAN) || !USE_CG_DRAWING
236 if (depth == 32) 240 if (depth == 32)
237 { 241 {
238 char *base_addr = GetPixBaseAddr (pixmap); 242 char *base_addr = GetPixBaseAddr (pixmap);
@@ -240,7 +244,9 @@ XGetPixel (ximage, x, y)
240 244
241 return ((unsigned long *) (base_addr + y * row_bytes))[x] & 0x00ffffff; 245 return ((unsigned long *) (base_addr + y * row_bytes))[x] & 0x00ffffff;
242 } 246 }
243 else if (depth == 1) 247 else
248#endif
249 if (depth == 1)
244 { 250 {
245 char *base_addr = GetPixBaseAddr (pixmap); 251 char *base_addr = GetPixBaseAddr (pixmap);
246 short row_bytes = GetPixRowBytes (pixmap); 252 short row_bytes = GetPixRowBytes (pixmap);
@@ -272,6 +278,49 @@ XDestroyImage (ximg)
272{ 278{
273 UnlockPixels (GetGWorldPixMap (ximg)); 279 UnlockPixels (GetGWorldPixMap (ximg));
274} 280}
281
282#if USE_CG_DRAWING
283static CGImageRef
284mac_create_cg_image_from_image (f, img)
285 struct frame *f;
286 struct image *img;
287{
288 Pixmap mask;
289 CGImageRef result = NULL;
290
291 BLOCK_INPUT;
292 if (img->mask)
293 mask = img->mask;
294 else
295 {
296 mask = XCreatePixmap (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
297 img->width, img->height, 1);
298 if (mask)
299 {
300 CGrafPtr old_port;
301 GDHandle old_gdh;
302 Rect r;
303
304 GetGWorld (&old_port, &old_gdh);
305 SetGWorld (mask, NULL);
306 BackColor (blackColor); /* Don't mask. */
307 SetRect (&r, 0, 0, img->width, img->height);
308 EraseRect (&r);
309 SetGWorld (old_port, old_gdh);
310 }
311 }
312 if (mask)
313 {
314 CreateCGImageFromPixMaps (GetGWorldPixMap (img->pixmap),
315 GetGWorldPixMap (mask), &result);
316 if (mask != img->mask)
317 XFreePixmap (FRAME_X_DISPLAY (f), mask);
318 }
319 UNBLOCK_INPUT;
320
321 return result;
322}
323#endif /* USE_CG_DRAWING */
275#endif /* MAC_OS */ 324#endif /* MAC_OS */
276 325
277 326
@@ -1206,6 +1255,18 @@ prepare_image_for_display (f, img)
1206 type dependent loader function. */ 1255 type dependent loader function. */
1207 if (img->pixmap == NO_PIXMAP && !img->load_failed_p) 1256 if (img->pixmap == NO_PIXMAP && !img->load_failed_p)
1208 img->load_failed_p = img->type->load (f, img) == 0; 1257 img->load_failed_p = img->type->load (f, img) == 0;
1258
1259#if defined (MAC_OS) && USE_CG_DRAWING
1260 if (!img->load_failed_p && img->data.ptr_val == NULL)
1261 {
1262 img->data.ptr_val = mac_create_cg_image_from_image (f, img);
1263 if (img->data.ptr_val == NULL)
1264 {
1265 img->load_failed_p = 1;
1266 img->type->free (f, img);
1267 }
1268 }
1269#endif
1209} 1270}
1210 1271
1211 1272
@@ -1452,6 +1513,14 @@ x_clear_image_1 (f, img, pixmap_p, mask_p, colors_p)
1452 img->colors = NULL; 1513 img->colors = NULL;
1453 img->ncolors = 0; 1514 img->ncolors = 0;
1454 } 1515 }
1516
1517#if defined (MAC_OS) && USE_CG_DRAWING
1518 if (img->data.ptr_val)
1519 {
1520 CGImageRelease (img->data.ptr_val);
1521 img->data.ptr_val = NULL;
1522 }
1523#endif
1455} 1524}
1456 1525
1457/* Free X resources of image IMG which is used on frame F. */ 1526/* Free X resources of image IMG which is used on frame F. */
diff --git a/src/keymap.c b/src/keymap.c
index fc7b23f6302..92c67ed1f1a 100644
--- a/src/keymap.c
+++ b/src/keymap.c
@@ -692,6 +692,7 @@ map_keymap (map, fun, args, data, autoload)
692 struct gcpro gcpro1, gcpro2, gcpro3; 692 struct gcpro gcpro1, gcpro2, gcpro3;
693 Lisp_Object tail; 693 Lisp_Object tail;
694 694
695 tail = Qnil;
695 GCPRO3 (map, args, tail); 696 GCPRO3 (map, args, tail);
696 map = get_keymap (map, 1, autoload); 697 map = get_keymap (map, 1, autoload);
697 for (tail = (CONSP (map) && EQ (Qkeymap, XCAR (map))) ? XCDR (map) : map; 698 for (tail = (CONSP (map) && EQ (Qkeymap, XCAR (map))) ? XCDR (map) : map;
diff --git a/src/m/mips.h b/src/m/mips.h
index dc45a99d06b..9ae74178143 100644
--- a/src/m/mips.h
+++ b/src/m/mips.h
@@ -112,10 +112,10 @@ NOTE-END */
112/* This machine requires completely different unexec code 112/* This machine requires completely different unexec code
113 which lives in a separate file. Specify the file name. */ 113 which lives in a separate file. Specify the file name. */
114 114
115#ifndef __linux__ 115#if !defined(__linux__) && !defined(__NetBSD__)
116#undef UNEXEC 116#undef UNEXEC
117#define UNEXEC unexmips.o 117#define UNEXEC unexmips.o
118#endif /* not __linux__ */ 118#endif /* not __linux__ && not __NetBSD__ */
119 119
120/* Describe layout of the address space in an executing process. */ 120/* Describe layout of the address space in an executing process. */
121 121
@@ -142,14 +142,6 @@ NOTE-END */
142#if defined (__NetBSD__) || defined (__OpenBSD__) 142#if defined (__NetBSD__) || defined (__OpenBSD__)
143#else /* bsd with elf */ 143#else /* bsd with elf */
144#define LINKER /bsd43/bin/ld 144#define LINKER /bsd43/bin/ld
145#endif /* bsd with elf */
146#else /* not BSD_SYSTEM */
147
148#if defined(__GNUC__) && defined(_ABIN32)
149#define LIBS_MACHINE
150#else
151#define LIBS_MACHINE -lmld
152#endif
153 145
154#define LD_SWITCH_MACHINE -D 800000 -g3 146#define LD_SWITCH_MACHINE -D 800000 -g3
155#define START_FILES pre-crt0.o /usr/lib/crt1.o 147#define START_FILES pre-crt0.o /usr/lib/crt1.o
@@ -159,6 +151,15 @@ NOTE-END */
159#define C_SWITCH_MACHINE -I/usr/include/bsd 151#define C_SWITCH_MACHINE -I/usr/include/bsd
160#define C_DEBUG_SWITCH -O -g3 152#define C_DEBUG_SWITCH -O -g3
161 153
154#endif /* bsd with elf */
155#else /* not BSD_SYSTEM */
156
157#if defined(__GNUC__) && defined(_ABIN32)
158#define LIBS_MACHINE
159#else
160#define LIBS_MACHINE -lmld
161#endif
162
162#endif /* not BSD_SYSTEM */ 163#endif /* not BSD_SYSTEM */
163#endif /* not NEWSOS5 && not __linux__ */ 164#endif /* not NEWSOS5 && not __linux__ */
164 165
diff --git a/src/m/pmax.h b/src/m/pmax.h
index 911f84d3c8a..c83c514ab98 100644
--- a/src/m/pmax.h
+++ b/src/m/pmax.h
@@ -13,8 +13,12 @@ NOTE-END */
13#ifndef __MIPSEB__ 13#ifndef __MIPSEB__
14#undef WORDS_BIG_ENDIAN 14#undef WORDS_BIG_ENDIAN
15#endif 15#endif
16#if defined (__NetBSD__)
17#define BROKEN_NOCOMBRELOC
18#else
16#undef LIB_STANDARD 19#undef LIB_STANDARD
17#undef START_FILES 20#undef START_FILES
21#endif
18#undef COFF 22#undef COFF
19#undef TERMINFO 23#undef TERMINFO
20#define MAIL_USE_FLOCK 24#define MAIL_USE_FLOCK
@@ -24,18 +28,12 @@ NOTE-END */
24#ifdef MACH 28#ifdef MACH
25#define START_FILES pre-crt0.o /usr/lib/crt0.o 29#define START_FILES pre-crt0.o /usr/lib/crt0.o
26#else 30#else
31#if !defined (__NetBSD__)
27/* This line starts being needed with ultrix 4.0. */ 32/* This line starts being needed with ultrix 4.0. */
28/* You must delete it for version 3.1. */ 33/* You must delete it for version 3.1. */
29#define START_FILES pre-crt0.o /usr/lib/cmplrs/cc/crt0.o 34#define START_FILES pre-crt0.o /usr/lib/cmplrs/cc/crt0.o
30#endif 35#endif
31 36#endif
32#if defined (__NetBSD__) || defined (__OpenBSD__)
33#undef START_FILES
34#define START_FILES pre-crt0.o /usr/lib/crt0.o
35#undef RUN_TIME_REMAP
36#undef UNEXEC
37#define UNEXEC unexelf.o
38#endif /* NetBSD || OpenBSD */
39 37
40/* Supposedly the following will overcome a kernel bug. */ 38/* Supposedly the following will overcome a kernel bug. */
41#undef LD_SWITCH_MACHINE 39#undef LD_SWITCH_MACHINE
diff --git a/src/macterm.c b/src/macterm.c
index d3510dbf516..a51304f21da 100644
--- a/src/macterm.c
+++ b/src/macterm.c
@@ -281,6 +281,11 @@ extern void menubar_selection_callback (FRAME_PTR, int);
281#if USE_CG_DRAWING 281#if USE_CG_DRAWING
282#define FRAME_CG_CONTEXT(f) ((f)->output_data.mac->cg_context) 282#define FRAME_CG_CONTEXT(f) ((f)->output_data.mac->cg_context)
283 283
284/* Fringe bitmaps. */
285
286static int max_fringe_bmp = 0;
287static CGImageRef *fringe_bmp = 0;
288
284static CGContextRef 289static CGContextRef
285mac_begin_cg_clip (f, gc) 290mac_begin_cg_clip (f, gc)
286 struct frame *f; 291 struct frame *f;
@@ -509,6 +514,44 @@ mac_clear_window (f)
509 514
510/* Mac replacement for XCopyArea. */ 515/* Mac replacement for XCopyArea. */
511 516
517#if USE_CG_DRAWING
518static void
519mac_draw_cg_image (image, f, gc, src_x, src_y, width, height,
520 dest_x, dest_y, overlay_p)
521 CGImageRef image;
522 struct frame *f;
523 GC gc;
524 int src_x, src_y;
525 unsigned int width, height;
526 int dest_x, dest_y, overlay_p;
527{
528 CGContextRef context;
529 float port_height = FRAME_PIXEL_HEIGHT (f);
530 CGRect dest_rect = CGRectMake (dest_x, dest_y, width, height);
531
532 context = mac_begin_cg_clip (f, gc);
533 if (!overlay_p)
534 {
535 CG_SET_FILL_COLOR (context, gc->xgcv.background);
536 CGContextFillRect (context, dest_rect);
537 }
538 CGContextClipToRect (context, dest_rect);
539 CGContextScaleCTM (context, 1, -1);
540 CGContextTranslateCTM (context, 0, -port_height);
541 if (CGImageIsMask (image))
542 CG_SET_FILL_COLOR (context, gc->xgcv.foreground);
543 CGContextDrawImage (context,
544 CGRectMake (dest_x - src_x,
545 port_height - (dest_y - src_y
546 + CGImageGetHeight (image)),
547 CGImageGetWidth (image),
548 CGImageGetHeight (image)),
549 image);
550 mac_end_cg_clip (f);
551}
552
553#else /* !USE_CG_DRAWING */
554
512static void 555static void
513mac_draw_bitmap (f, gc, x, y, width, height, bits, overlay_p) 556mac_draw_bitmap (f, gc, x, y, width, height, bits, overlay_p)
514 struct frame *f; 557 struct frame *f;
@@ -524,9 +567,6 @@ mac_draw_bitmap (f, gc, x, y, width, height, bits, overlay_p)
524 bitmap.baseAddr = (char *)bits; 567 bitmap.baseAddr = (char *)bits;
525 SetRect (&(bitmap.bounds), 0, 0, width, height); 568 SetRect (&(bitmap.bounds), 0, 0, width, height);
526 569
527#if USE_CG_DRAWING
528 mac_prepare_for_quickdraw (f);
529#endif
530 SetPortWindowPort (FRAME_MAC_WINDOW (f)); 570 SetPortWindowPort (FRAME_MAC_WINDOW (f));
531 571
532 RGBForeColor (GC_FORE_COLOR (gc)); 572 RGBForeColor (GC_FORE_COLOR (gc));
@@ -552,6 +592,7 @@ mac_draw_bitmap (f, gc, x, y, width, height, bits, overlay_p)
552 592
553 RGBBackColor (GC_BACK_COLOR (FRAME_NORMAL_GC (f))); 593 RGBBackColor (GC_BACK_COLOR (FRAME_NORMAL_GC (f)));
554} 594}
595#endif /* !USE_CG_DRAWING */
555 596
556 597
557/* Mac replacement for XCreateBitmapFromBitmapData. */ 598/* Mac replacement for XCreateBitmapFromBitmapData. */
@@ -612,7 +653,15 @@ XCreatePixmap (display, w, width, height, depth)
612 SetPortWindowPort (w); 653 SetPortWindowPort (w);
613 654
614 SetRect (&r, 0, 0, width, height); 655 SetRect (&r, 0, 0, width, height);
615 err = NewGWorld (&pixmap, depth, &r, NULL, NULL, 0); 656#if !defined (WORDS_BIG_ENDIAN) && USE_CG_DRAWING
657 if (depth == 1)
658#endif
659 err = NewGWorld (&pixmap, depth, &r, NULL, NULL, 0);
660#if !defined (WORDS_BIG_ENDIAN) && USE_CG_DRAWING
661 else
662 /* CreateCGImageFromPixMaps requires ARGB format. */
663 err = QTNewGWorld (&pixmap, k32ARGBPixelFormat, &r, NULL, NULL, 0);
664#endif
616 if (err != noErr) 665 if (err != noErr)
617 return NULL; 666 return NULL;
618 return pixmap; 667 return pixmap;
@@ -1295,6 +1344,7 @@ mac_draw_image_string_cg (f, gc, x, y, buf, nchars, bg_width)
1295#endif 1344#endif
1296 1345
1297 1346
1347#if !USE_CG_DRAWING
1298/* Mac replacement for XCopyArea: dest must be window. */ 1348/* Mac replacement for XCopyArea: dest must be window. */
1299 1349
1300static void 1350static void
@@ -1308,9 +1358,6 @@ mac_copy_area (src, f, gc, src_x, src_y, width, height, dest_x, dest_y)
1308{ 1358{
1309 Rect src_r, dest_r; 1359 Rect src_r, dest_r;
1310 1360
1311#if USE_CG_DRAWING
1312 mac_prepare_for_quickdraw (f);
1313#endif
1314 SetPortWindowPort (FRAME_MAC_WINDOW (f)); 1361 SetPortWindowPort (FRAME_MAC_WINDOW (f));
1315 1362
1316 SetRect (&src_r, src_x, src_y, src_x + width, src_y + height); 1363 SetRect (&src_r, src_x, src_y, src_x + width, src_y + height);
@@ -1355,9 +1402,6 @@ mac_copy_area_with_mask (src, mask, f, gc, src_x, src_y,
1355{ 1402{
1356 Rect src_r, dest_r; 1403 Rect src_r, dest_r;
1357 1404
1358#if USE_CG_DRAWING
1359 mac_prepare_for_quickdraw (f);
1360#endif
1361 SetPortWindowPort (FRAME_MAC_WINDOW (f)); 1405 SetPortWindowPort (FRAME_MAC_WINDOW (f));
1362 1406
1363 SetRect (&src_r, src_x, src_y, src_x + width, src_y + height); 1407 SetRect (&src_r, src_x, src_y, src_x + width, src_y + height);
@@ -1390,6 +1434,7 @@ mac_copy_area_with_mask (src, mask, f, gc, src_x, src_y,
1390 1434
1391 RGBBackColor (GC_BACK_COLOR (FRAME_NORMAL_GC (f))); 1435 RGBBackColor (GC_BACK_COLOR (FRAME_NORMAL_GC (f)));
1392} 1436}
1437#endif /* !USE_CG_DRAWING */
1393 1438
1394 1439
1395/* Mac replacement for XCopyArea: used only for scrolling. */ 1440/* Mac replacement for XCopyArea: used only for scrolling. */
@@ -2001,9 +2046,12 @@ x_draw_fringe_bitmap (w, row, p)
2001#endif 2046#endif
2002 } 2047 }
2003 2048
2004 if (p->which) 2049 if (p->which
2050#if USE_CG_DRAWING
2051 && p->which < max_fringe_bmp
2052#endif
2053 )
2005 { 2054 {
2006 unsigned short *bits = p->bits + p->dh;
2007 XGCValues gcv; 2055 XGCValues gcv;
2008 2056
2009 XGetGCValues (display, face->gc, GCForeground, &gcv); 2057 XGetGCValues (display, face->gc, GCForeground, &gcv);
@@ -2012,14 +2060,64 @@ x_draw_fringe_bitmap (w, row, p)
2012 ? (p->overlay_p ? face->background 2060 ? (p->overlay_p ? face->background
2013 : f->output_data.mac->cursor_pixel) 2061 : f->output_data.mac->cursor_pixel)
2014 : face->foreground)); 2062 : face->foreground));
2063#if USE_CG_DRAWING
2064 mac_draw_cg_image (fringe_bmp[p->which], f, face->gc, 0, p->dh,
2065 p->wd, p->h, p->x, p->y, p->overlay_p);
2066#else
2015 mac_draw_bitmap (f, face->gc, p->x, p->y, 2067 mac_draw_bitmap (f, face->gc, p->x, p->y,
2016 p->wd, p->h, bits, p->overlay_p); 2068 p->wd, p->h, p->bits + p->dh, p->overlay_p);
2069#endif
2017 XSetForeground (display, face->gc, gcv.foreground); 2070 XSetForeground (display, face->gc, gcv.foreground);
2018 } 2071 }
2019 2072
2020 mac_reset_clip_rectangles (display, face->gc); 2073 mac_reset_clip_rectangles (display, face->gc);
2021} 2074}
2022 2075
2076#if USE_CG_DRAWING
2077static void
2078mac_define_fringe_bitmap (which, bits, h, wd)
2079 int which;
2080 unsigned short *bits;
2081 int h, wd;
2082{
2083 unsigned short *mask_bits;
2084 int i;
2085 CGDataProviderRef provider;
2086
2087 if (which >= max_fringe_bmp)
2088 {
2089 i = max_fringe_bmp;
2090 max_fringe_bmp = which + 20;
2091 fringe_bmp = (CGImageRef *) xrealloc (fringe_bmp, max_fringe_bmp * sizeof (CGImageRef));
2092 while (i < max_fringe_bmp)
2093 fringe_bmp[i++] = 0;
2094 }
2095
2096 for (i = 0; i < h; i++)
2097 bits[i] = ~bits[i];
2098 provider = CGDataProviderCreateWithData (NULL, bits,
2099 sizeof (unsigned short) * h, NULL);
2100 if (provider)
2101 {
2102 fringe_bmp[which] = CGImageMaskCreate (wd, h, 1, 1,
2103 sizeof (unsigned short),
2104 provider, NULL, 0);
2105 CGDataProviderRelease (provider);
2106 }
2107}
2108
2109static void
2110mac_destroy_fringe_bitmap (which)
2111 int which;
2112{
2113 if (which >= max_fringe_bmp)
2114 return;
2115
2116 if (fringe_bmp[which])
2117 CGImageRelease (fringe_bmp[which]);
2118 fringe_bmp[which] = 0;
2119}
2120#endif
2023 2121
2024 2122
2025/* This is called when starting Emacs and when restarting after 2123/* This is called when starting Emacs and when restarting after
@@ -3191,15 +3289,26 @@ x_draw_image_foreground (s)
3191 { 3289 {
3192 x_set_glyph_string_clipping (s); 3290 x_set_glyph_string_clipping (s);
3193 3291
3292#if USE_CG_DRAWING
3293 mac_draw_cg_image (s->img->data.ptr_val,
3294 s->f, s->gc, s->slice.x, s->slice.y,
3295 s->slice.width, s->slice.height, x, y, 1);
3296#endif
3194 if (s->img->mask) 3297 if (s->img->mask)
3298#if !USE_CG_DRAWING
3195 mac_copy_area_with_mask (s->img->pixmap, s->img->mask, 3299 mac_copy_area_with_mask (s->img->pixmap, s->img->mask,
3196 s->f, s->gc, s->slice.x, s->slice.y, 3300 s->f, s->gc, s->slice.x, s->slice.y,
3197 s->slice.width, s->slice.height, x, y); 3301 s->slice.width, s->slice.height, x, y);
3302#else
3303 ;
3304#endif
3198 else 3305 else
3199 { 3306 {
3307#if !USE_CG_DRAWING
3200 mac_copy_area (s->img->pixmap, 3308 mac_copy_area (s->img->pixmap,
3201 s->f, s->gc, s->slice.x, s->slice.y, 3309 s->f, s->gc, s->slice.x, s->slice.y,
3202 s->slice.width, s->slice.height, x, y); 3310 s->slice.width, s->slice.height, x, y);
3311#endif
3203 3312
3204 /* When the image has a mask, we can expect that at 3313 /* When the image has a mask, we can expect that at
3205 least part of a mouse highlight or a block cursor will 3314 least part of a mouse highlight or a block cursor will
@@ -10892,8 +11001,13 @@ static struct redisplay_interface x_redisplay_interface =
10892 x_get_glyph_overhangs, 11001 x_get_glyph_overhangs,
10893 x_fix_overlapping_area, 11002 x_fix_overlapping_area,
10894 x_draw_fringe_bitmap, 11003 x_draw_fringe_bitmap,
11004#if USE_CG_DRAWING
11005 mac_define_fringe_bitmap,
11006 mac_destroy_fringe_bitmap,
11007#else
10895 0, /* define_fringe_bitmap */ 11008 0, /* define_fringe_bitmap */
10896 0, /* destroy_fringe_bitmap */ 11009 0, /* destroy_fringe_bitmap */
11010#endif
10897 mac_per_char_metric, 11011 mac_per_char_metric,
10898 mac_encode_char, 11012 mac_encode_char,
10899 mac_compute_glyph_string_overhangs, 11013 mac_compute_glyph_string_overhangs,
@@ -10970,6 +11084,11 @@ mac_initialize ()
10970 MakeMeTheFrontProcess (); 11084 MakeMeTheFrontProcess ();
10971#endif 11085#endif
10972#endif 11086#endif
11087
11088#if USE_CG_DRAWING
11089 mac_init_fringe ();
11090#endif
11091
10973 UNBLOCK_INPUT; 11092 UNBLOCK_INPUT;
10974} 11093}
10975 11094
diff --git a/src/sheap.c b/src/sheap.c
index 192af4030c6..03da2afa813 100644
--- a/src/sheap.c
+++ b/src/sheap.c
@@ -26,11 +26,7 @@ Boston, MA 02110-1301, USA. */
26 26
27#include <unistd.h> 27#include <unistd.h>
28 28
29#ifdef HAVE_X_WINDOWS 29#define STATIC_HEAP_SIZE (12 * 1024 * 1024)
30#define STATIC_HEAP_SIZE (8 * 1024 * 1024)
31#else
32#define STATIC_HEAP_SIZE (8 * 1024 * 1024)
33#endif
34 30
35int debug_sheap = 0; 31int debug_sheap = 0;
36 32
diff --git a/src/unexelf.c b/src/unexelf.c
index 30a35372544..a236b98eab1 100644
--- a/src/unexelf.c
+++ b/src/unexelf.c
@@ -433,6 +433,9 @@ extern void fatal (const char *msgid, ...);
433#if __sgi 433#if __sgi
434#include <syms.h> /* for HDRR declaration */ 434#include <syms.h> /* for HDRR declaration */
435#endif /* __sgi */ 435#endif /* __sgi */
436#ifdef BROKEN_NOCOMBRELOC
437#include <assert.h>
438#endif
436 439
437#ifndef MAP_ANON 440#ifndef MAP_ANON
438#ifdef MAP_ANONYMOUS 441#ifdef MAP_ANONYMOUS
@@ -687,6 +690,9 @@ unexec (new_name, old_name, data_start, bss_start, entry_address)
687 int old_mdebug_index; 690 int old_mdebug_index;
688 struct stat stat_buf; 691 struct stat stat_buf;
689 int old_file_size; 692 int old_file_size;
693#ifdef BROKEN_NOCOMBRELOC
694 int unreloc_sections[10], n_unreloc_sections;
695#endif
690 696
691 /* Open the old file, allocate a buffer of the right size, and read 697 /* Open the old file, allocate a buffer of the right size, and read
692 in the file contents. */ 698 in the file contents. */
@@ -1218,6 +1224,7 @@ unexec (new_name, old_name, data_start, bss_start, entry_address)
1218 1224
1219 /* This loop seeks out relocation sections for the data section, so 1225 /* This loop seeks out relocation sections for the data section, so
1220 that it can undo relocations performed by the runtime linker. */ 1226 that it can undo relocations performed by the runtime linker. */
1227#ifndef BROKEN_NOCOMBRELOC
1221 for (n = new_file_h->e_shnum - 1; n; n--) 1228 for (n = new_file_h->e_shnum - 1; n; n--)
1222 { 1229 {
1223 ElfW(Shdr) section = NEW_SECTION_H (n); 1230 ElfW(Shdr) section = NEW_SECTION_H (n);
@@ -1272,6 +1279,81 @@ unexec (new_name, old_name, data_start, bss_start, entry_address)
1272 break; 1279 break;
1273 } 1280 }
1274 } 1281 }
1282#else /* BROKEN_NOCOMBRELOC */
1283 for (n = 1, n_unreloc_sections = 0; n < new_file_h->e_shnum; n++)
1284 if (!strcmp (old_section_names + NEW_SECTION_H (n).sh_name, ".data")
1285 || !strcmp (old_section_names + NEW_SECTION_H (n).sh_name, ".sdata")
1286 || !strcmp (old_section_names + NEW_SECTION_H (n).sh_name, ".lit4")
1287 || !strcmp (old_section_names + NEW_SECTION_H (n).sh_name, ".lit8")
1288#ifdef IRIX6_5 /* see above */
1289 || !strcmp (old_section_names + NEW_SECTION_H (n).sh_name, ".got")
1290#endif
1291 || !strcmp (old_section_names + NEW_SECTION_H (n).sh_name, ".sdata1")
1292 || !strcmp (old_section_names + NEW_SECTION_H (n).sh_name, ".data1"))
1293 {
1294 assert (n_unreloc_sections
1295 < (sizeof (unreloc_sections) / sizeof (unreloc_sections[0])));
1296 unreloc_sections[n_unreloc_sections++] = n;
1297#ifdef DEBUG
1298 fprintf (stderr, "section %d: %s\n", n,
1299 old_section_names + NEW_SECTION_H (n).sh_name);
1300#endif
1301 }
1302
1303 for (n = new_file_h->e_shnum - 1; n; n--)
1304 {
1305 ElfW(Shdr) section = NEW_SECTION_H (n);
1306 caddr_t reloc, end;
1307 ElfW(Addr) addr, offset;
1308 int target;
1309
1310 switch (section.sh_type)
1311 {
1312 default:
1313 break;
1314 case SHT_REL:
1315 case SHT_RELA:
1316 /* This code handles two different size structs, but there should
1317 be no harm in that provided that r_offset is always the first
1318 member. */
1319 for (reloc = old_base + section.sh_offset,
1320 end = reloc + section.sh_size;
1321 reloc < end;
1322 reloc += section.sh_entsize)
1323 {
1324 addr = ((ElfW(Rel) *) reloc)->r_offset;
1325#ifdef __alpha__
1326 /* The Alpha ELF binutils currently have a bug that
1327 sometimes results in relocs that contain all
1328 zeroes. Work around this for now... */
1329 if (addr == 0)
1330 continue;
1331#endif
1332 for (nn = 0; nn < n_unreloc_sections; nn++)
1333 {
1334 target = unreloc_sections[nn];
1335 if (NEW_SECTION_H (target).sh_addr <= addr
1336 && addr < (NEW_SECTION_H (target).sh_addr +
1337 NEW_SECTION_H (target).sh_size))
1338 {
1339 offset = (NEW_SECTION_H (target).sh_addr -
1340 NEW_SECTION_H (target).sh_offset);
1341 memcpy (new_base + addr - offset,
1342 old_base + addr - offset,
1343 sizeof (ElfW(Addr)));
1344#ifdef DEBUG
1345 fprintf (stderr, "unrelocate: [%08lx] <= %08lx\n",
1346 (long) addr,
1347 (long) *((long *) (new_base + addr - offset)));
1348#endif
1349 break;
1350 }
1351 }
1352 }
1353 break;
1354 }
1355 }
1356#endif /* BROKEN_NOCOMBRELOC */
1275 1357
1276 /* Write out new_file, and free the buffers. */ 1358 /* Write out new_file, and free the buffers. */
1277 1359
diff --git a/src/w32fns.c b/src/w32fns.c
index 08b6ed8b1a4..55f4af03d6e 100644
--- a/src/w32fns.c
+++ b/src/w32fns.c
@@ -7937,8 +7937,12 @@ If ONLY-DIR-P is non-nil, the user can only select directories. */)
7937 ***********************************************************************/ 7937 ***********************************************************************/
7938 7938
7939DEFUN ("w32-select-font", Fw32_select_font, Sw32_select_font, 0, 2, 0, 7939DEFUN ("w32-select-font", Fw32_select_font, Sw32_select_font, 0, 2, 0,
7940 doc: /* Select a font using the W32 font dialog. 7940 doc: /* Select a font for the named FRAME using the W32 font dialog.
7941Returns an X font string corresponding to the selection. */) 7941Returns an X-style font string corresponding to the selection.
7942
7943If FRAME is omitted or nil, it defaults to the selected frame.
7944If INCLUDE-PROPORTIONAL is non-nil, include proportional fonts
7945in the font selection dialog. */)
7942 (frame, include_proportional) 7946 (frame, include_proportional)
7943 Lisp_Object frame, include_proportional; 7947 Lisp_Object frame, include_proportional;
7944{ 7948{
diff --git a/src/window.c b/src/window.c
index 23a4eb98e4b..cbfc7e02401 100644
--- a/src/window.c
+++ b/src/window.c
@@ -4798,8 +4798,8 @@ window_scroll_pixel_based (window, n, whole, noerror)
4798 possibility of point becoming "stuck" on a tall line when 4798 possibility of point becoming "stuck" on a tall line when
4799 scrolling by one line. */ 4799 scrolling by one line. */
4800 if (window_scroll_pixel_based_preserve_y < 0 4800 if (window_scroll_pixel_based_preserve_y < 0
4801 || (current_kboard->Vlast_command != Qscroll_up 4801 || (!EQ (current_kboard->Vlast_command, Qscroll_up)
4802 && current_kboard->Vlast_command != Qscroll_down)) 4802 && !EQ (current_kboard->Vlast_command, Qscroll_down)))
4803 { 4803 {
4804 start_display (&it, w, start); 4804 start_display (&it, w, start);
4805 move_it_to (&it, PT, -1, -1, -1, MOVE_TO_POS); 4805 move_it_to (&it, PT, -1, -1, -1, MOVE_TO_POS);
diff --git a/src/xdisp.c b/src/xdisp.c
index 7bdda29fb0f..b80d21ade80 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -9443,7 +9443,12 @@ build_desired_tool_bar_string (f)
9443 HEIGHT specifies the desired height of the tool-bar line. 9443 HEIGHT specifies the desired height of the tool-bar line.
9444 If the actual height of the glyph row is less than HEIGHT, the 9444 If the actual height of the glyph row is less than HEIGHT, the
9445 row's height is increased to HEIGHT, and the icons are centered 9445 row's height is increased to HEIGHT, and the icons are centered
9446 vertically in the new height. */ 9446 vertically in the new height.
9447
9448 If HEIGHT is -1, we are counting needed tool-bar lines, so don't
9449 count a final empty row in case the tool-bar width exactly matches
9450 the window width.
9451*/
9447 9452
9448static void 9453static void
9449display_tool_bar_line (it, height) 9454display_tool_bar_line (it, height)
@@ -9467,7 +9472,12 @@ display_tool_bar_line (it, height)
9467 9472
9468 /* Get the next display element. */ 9473 /* Get the next display element. */
9469 if (!get_next_display_element (it)) 9474 if (!get_next_display_element (it))
9470 break; 9475 {
9476 /* Don't count empty row if we are counting needed tool-bar lines. */
9477 if (height < 0 && !it->hpos)
9478 return;
9479 break;
9480 }
9471 9481
9472 /* Produce glyphs. */ 9482 /* Produce glyphs. */
9473 x_before = it->current_x; 9483 x_before = it->current_x;
@@ -9565,11 +9575,12 @@ tool_bar_lines_needed (f, n_rows)
9565 { 9575 {
9566 it.glyph_row = w->desired_matrix->rows; 9576 it.glyph_row = w->desired_matrix->rows;
9567 clear_glyph_row (it.glyph_row); 9577 clear_glyph_row (it.glyph_row);
9568 display_tool_bar_line (&it, 0); 9578 display_tool_bar_line (&it, -1);
9569 } 9579 }
9570 9580
9581 /* f->n_tool_bar_rows == 0 means "unknown"; -1 means no tool-bar. */
9571 if (n_rows) 9582 if (n_rows)
9572 *n_rows = it.vpos; 9583 *n_rows = it.vpos > 0 ? it.vpos : -1;
9573 9584
9574 return (it.current_y + FRAME_LINE_HEIGHT (f) - 1) / FRAME_LINE_HEIGHT (f); 9585 return (it.current_y + FRAME_LINE_HEIGHT (f) - 1) / FRAME_LINE_HEIGHT (f);
9575} 9586}
@@ -9645,11 +9656,7 @@ redisplay_tool_bar (f)
9645 reseat_to_string (&it, NULL, f->desired_tool_bar_string, 0, 0, 0, -1); 9656 reseat_to_string (&it, NULL, f->desired_tool_bar_string, 0, 0, 0, -1);
9646 9657
9647 if (f->n_tool_bar_rows == 0) 9658 if (f->n_tool_bar_rows == 0)
9648 { 9659 (void)tool_bar_lines_needed (f, &f->n_tool_bar_rows);
9649 (void)tool_bar_lines_needed (f, &f->n_tool_bar_rows);
9650 if (f->n_tool_bar_rows == 0)
9651 f->n_tool_bar_rows = -1;
9652 }
9653 9660
9654 /* Display as many lines as needed to display all tool-bar items. */ 9661 /* Display as many lines as needed to display all tool-bar items. */
9655 9662
@@ -11607,7 +11614,7 @@ set_cursor_from_row (w, row, matrix, delta, delta_bytes, dy, dvpos)
11607 x += glyph->pixel_width; 11614 x += glyph->pixel_width;
11608 ++glyph; 11615 ++glyph;
11609 if (cursor_from_overlay_pos 11616 if (cursor_from_overlay_pos
11610 && last_pos > cursor_from_overlay_pos) 11617 && last_pos >= cursor_from_overlay_pos)
11611 { 11618 {
11612 cursor_from_overlay_pos = 0; 11619 cursor_from_overlay_pos = 0;
11613 cursor = 0; 11620 cursor = 0;
@@ -11621,10 +11628,12 @@ set_cursor_from_row (w, row, matrix, delta, delta_bytes, dy, dvpos)
11621 /* Skip all glyphs from string. */ 11628 /* Skip all glyphs from string. */
11622 do 11629 do
11623 { 11630 {
11631 Lisp_Object cprop;
11624 int pos; 11632 int pos;
11625 if ((cursor == NULL || glyph > cursor) 11633 if ((cursor == NULL || glyph > cursor)
11626 && !NILP (Fget_char_property (make_number ((glyph)->charpos), 11634 && (cprop = Fget_char_property (make_number ((glyph)->charpos),
11627 Qcursor, (glyph)->object)) 11635 Qcursor, (glyph)->object),
11636 !NILP (cprop))
11628 && (pos = string_buffer_position (w, glyph->object, 11637 && (pos = string_buffer_position (w, glyph->object,
11629 string_before_pos), 11638 string_before_pos),
11630 (pos == 0 /* From overlay */ 11639 (pos == 0 /* From overlay */
@@ -11635,14 +11644,15 @@ set_cursor_from_row (w, row, matrix, delta, delta_bytes, dy, dvpos)
11635 Add 1 to last_pos so that if point corresponds to the 11644 Add 1 to last_pos so that if point corresponds to the
11636 glyph right after the overlay, we still use a 'cursor' 11645 glyph right after the overlay, we still use a 'cursor'
11637 property found in that overlay. */ 11646 property found in that overlay. */
11638 cursor_from_overlay_pos = pos == 0 ? last_pos+1 : 0; 11647 cursor_from_overlay_pos = (pos ? 0 : last_pos
11648 + (INTEGERP (cprop) ? XINT (cprop) : 0));
11639 cursor = glyph; 11649 cursor = glyph;
11640 cursor_x = x; 11650 cursor_x = x;
11641 } 11651 }
11642 x += glyph->pixel_width; 11652 x += glyph->pixel_width;
11643 ++glyph; 11653 ++glyph;
11644 } 11654 }
11645 while (glyph < end && STRINGP (glyph->object)); 11655 while (glyph < end && EQ (glyph->object, string_start->object));
11646 } 11656 }
11647 } 11657 }
11648 11658
@@ -15373,6 +15383,7 @@ extend_face_to_end_of_line (it)
15373 face = FACE_FROM_ID (f, it->face_id); 15383 face = FACE_FROM_ID (f, it->face_id);
15374 15384
15375 if (FRAME_WINDOW_P (f) 15385 if (FRAME_WINDOW_P (f)
15386 && it->glyph_row->displays_text_p
15376 && face->box == FACE_NO_BOX 15387 && face->box == FACE_NO_BOX
15377 && face->background == FRAME_BACKGROUND_PIXEL (f) 15388 && face->background == FRAME_BACKGROUND_PIXEL (f)
15378 && !face->stipple) 15389 && !face->stipple)
@@ -19390,7 +19401,7 @@ draw_glyphs (w, x, row, area, start, end, hl, overlaps)
19390 Called from x_produce_glyphs when IT->glyph_row is non-null. */ 19401 Called from x_produce_glyphs when IT->glyph_row is non-null. */
19391 19402
19392static INLINE void 19403static INLINE void
19393append_glyph (it) 19404store_next_glyph (it)
19394 struct it *it; 19405 struct it *it;
19395{ 19406{
19396 struct glyph *glyph; 19407 struct glyph *glyph;
@@ -19714,7 +19725,7 @@ append_stretch_glyph (it, object, width, height, ascent)
19714 ASCENT must be in the range 0 <= ASCENT <= 100. */ 19725 ASCENT must be in the range 0 <= ASCENT <= 100. */
19715 19726
19716static void 19727static void
19717produce_stretch_glyph (it) 19728generate_stretch_glyph (it)
19718 struct it *it; 19729 struct it *it;
19719{ 19730{
19720 /* (space :width WIDTH :height HEIGHT ...) */ 19731 /* (space :width WIDTH :height HEIGHT ...) */
@@ -20140,7 +20151,7 @@ x_produce_glyphs (it)
20140 it->ascent + it->descent, ascent); 20151 it->ascent + it->descent, ascent);
20141 } 20152 }
20142 else 20153 else
20143 append_glyph (it); 20154 store_next_glyph (it);
20144 20155
20145 /* If characters with lbearing or rbearing are displayed 20156 /* If characters with lbearing or rbearing are displayed
20146 in this line, record that fact in a flag of the 20157 in this line, record that fact in a flag of the
@@ -20322,7 +20333,7 @@ x_produce_glyphs (it)
20322 take_vertical_position_into_account (it); 20333 take_vertical_position_into_account (it);
20323 20334
20324 if (it->glyph_row) 20335 if (it->glyph_row)
20325 append_glyph (it); 20336 store_next_glyph (it);
20326 } 20337 }
20327 it->multibyte_p = saved_multibyte_p; 20338 it->multibyte_p = saved_multibyte_p;
20328 } 20339 }
@@ -20602,7 +20613,7 @@ x_produce_glyphs (it)
20602 else if (it->what == IT_IMAGE) 20613 else if (it->what == IT_IMAGE)
20603 produce_image_glyph (it); 20614 produce_image_glyph (it);
20604 else if (it->what == IT_STRETCH) 20615 else if (it->what == IT_STRETCH)
20605 produce_stretch_glyph (it); 20616 generate_stretch_glyph (it);
20606 20617
20607 /* Accumulate dimensions. Note: can't assume that it->descent > 0 20618 /* Accumulate dimensions. Note: can't assume that it->descent > 0
20608 because this isn't true for images with `:ascent 100'. */ 20619 because this isn't true for images with `:ascent 100'. */
diff --git a/src/xfns.c b/src/xfns.c
index a350f6a7f90..6433f9172ab 100644
--- a/src/xfns.c
+++ b/src/xfns.c
@@ -799,12 +799,9 @@ xg_set_icon (f, file)
799 FRAME_PTR f; 799 FRAME_PTR f;
800 Lisp_Object file; 800 Lisp_Object file;
801{ 801{
802 struct gcpro gcpro1;
803 int result = 0; 802 int result = 0;
804 Lisp_Object found; 803 Lisp_Object found;
805 804
806 GCPRO1 (found);
807
808 found = x_find_image_file (file); 805 found = x_find_image_file (file);
809 806
810 if (! NILP (found)) 807 if (! NILP (found))
diff --git a/src/xterm.c b/src/xterm.c
index 378373fe791..c17a25cbd05 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -10074,6 +10074,10 @@ static XrmOptionDescRec emacs_options[] = {
10074 10074
10075static int x_initialized; 10075static int x_initialized;
10076 10076
10077#ifdef HAVE_X_SM
10078static int x_session_initialized;
10079#endif
10080
10077#ifdef MULTI_KBOARD 10081#ifdef MULTI_KBOARD
10078/* Test whether two display-name strings agree up to the dot that separates 10082/* Test whether two display-name strings agree up to the dot that separates
10079 the screen number from the server number. */ 10083 the screen number from the server number. */
@@ -10151,6 +10155,21 @@ get_bits_and_offset (mask, bits, offset)
10151 *bits = nr; 10155 *bits = nr;
10152} 10156}
10153 10157
10158int
10159x_display_ok (display)
10160 const char * display;
10161{
10162 int dpy_ok = 1;
10163 Display *dpy;
10164
10165 dpy = XOpenDisplay (display);
10166 if (dpy)
10167 XCloseDisplay (dpy);
10168 else
10169 dpy_ok = 0;
10170 return dpy_ok;
10171}
10172
10154struct x_display_info * 10173struct x_display_info *
10155x_term_init (display_name, xrm_option, resource_name) 10174x_term_init (display_name, xrm_option, resource_name)
10156 Lisp_Object display_name; 10175 Lisp_Object display_name;
@@ -10233,11 +10252,9 @@ x_term_init (display_name, xrm_option, resource_name)
10233 10252
10234 /* Load our own gtkrc if it exists. */ 10253 /* Load our own gtkrc if it exists. */
10235 { 10254 {
10236 struct gcpro gcpro1, gcpro2;
10237 char *file = "~/.emacs.d/gtkrc"; 10255 char *file = "~/.emacs.d/gtkrc";
10238 Lisp_Object s, abs_file; 10256 Lisp_Object s, abs_file;
10239 10257
10240 GCPRO2 (s, abs_file);
10241 s = make_string (file, strlen (file)); 10258 s = make_string (file, strlen (file));
10242 abs_file = Fexpand_file_name (s, Qnil); 10259 abs_file = Fexpand_file_name (s, Qnil);
10243 10260
@@ -10899,6 +10916,9 @@ x_initialize ()
10899 last_tool_bar_item = -1; 10916 last_tool_bar_item = -1;
10900 any_help_event_p = 0; 10917 any_help_event_p = 0;
10901 ignore_next_mouse_click_timeout = 0; 10918 ignore_next_mouse_click_timeout = 0;
10919#ifdef HAVE_X_SM
10920 x_session_initialized = 0;
10921#endif
10902 10922
10903#ifdef USE_GTK 10923#ifdef USE_GTK
10904 current_count = -1; 10924 current_count = -1;
diff --git a/src/xterm.h b/src/xterm.h
index b581c0c0159..873b7da2b14 100644
--- a/src/xterm.h
+++ b/src/xterm.h
@@ -423,6 +423,7 @@ extern struct x_display_info *x_display_info_for_display P_ ((Display *));
423extern struct x_display_info *x_display_info_for_name P_ ((Lisp_Object)); 423extern struct x_display_info *x_display_info_for_name P_ ((Lisp_Object));
424 424
425extern struct x_display_info *x_term_init P_ ((Lisp_Object, char *, char *)); 425extern struct x_display_info *x_term_init P_ ((Lisp_Object, char *, char *));
426extern int x_display_ok P_ ((const char *));
426 427
427extern Lisp_Object x_list_fonts P_ ((struct frame *, Lisp_Object, int, int)); 428extern Lisp_Object x_list_fonts P_ ((struct frame *, Lisp_Object, int, int));
428extern void select_visual P_ ((struct x_display_info *)); 429extern void select_visual P_ ((struct x_display_info *));