aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoakim Verona2011-12-28 11:34:15 +0100
committerJoakim Verona2011-12-28 11:34:15 +0100
commit2f74c36bf173b5ad01f99e0d1b31b9b8fa5c8f2f (patch)
tree034e65ef002631d0aba8fc1a41e9984fc557e630
parentbb29f044aa967831cd664c54eba0de0c701436ce (diff)
parentd23ab8e8726ecb7e3554644857b4a58e5f7408f1 (diff)
downloademacs-2f74c36bf173b5ad01f99e0d1b31b9b8fa5c8f2f.tar.gz
emacs-2f74c36bf173b5ad01f99e0d1b31b9b8fa5c8f2f.zip
upstream
-rw-r--r--ChangeLog23
-rw-r--r--admin/FOR-RELEASE40
-rw-r--r--admin/grammars/bovine-grammar.el2
-rw-r--r--admin/grammars/js.wy2
-rwxr-xr-xautogen.sh2
-rw-r--r--autogen/Makefile.in1
-rw-r--r--configure.in24
-rw-r--r--doc/emacs/ChangeLog231
-rw-r--r--doc/emacs/abbrevs.texi82
-rw-r--r--doc/emacs/ack.texi4
-rw-r--r--doc/emacs/building.texi1534
-rw-r--r--doc/emacs/cal-xtra.texi4
-rw-r--r--doc/emacs/dired-xtra.texi26
-rw-r--r--doc/emacs/dired.texi148
-rw-r--r--doc/emacs/emacs.texi42
-rw-r--r--doc/emacs/files.texi13
-rw-r--r--doc/emacs/frames.texi2
-rw-r--r--doc/emacs/maintaining.texi1829
-rw-r--r--doc/emacs/msdog.texi19
-rw-r--r--doc/emacs/programs.texi1032
-rw-r--r--doc/emacs/rmail.texi27
-rw-r--r--doc/emacs/text.texi735
-rw-r--r--doc/emacs/vc1-xtra.texi811
-rw-r--r--doc/lispref/ChangeLog30
-rw-r--r--doc/lispref/commands.texi7
-rw-r--r--doc/lispref/elisp.texi4
-rw-r--r--doc/lispref/files.texi11
-rw-r--r--doc/lispref/internals.texi4
-rw-r--r--doc/lispref/modes.texi2
-rw-r--r--doc/lispref/nonascii.texi2
-rw-r--r--doc/lispref/spellfile1
-rw-r--r--doc/lispref/text.texi6
-rw-r--r--doc/lispref/variables.texi4
-rw-r--r--doc/lispref/vol1.texi6
-rw-r--r--doc/lispref/vol2.texi4
-rw-r--r--doc/lispref/windows.texi34
-rw-r--r--doc/misc/ChangeLog15
-rw-r--r--doc/misc/auth.texi2
-rw-r--r--doc/misc/calc.texi30
-rw-r--r--doc/misc/cc-mode.texi6
-rw-r--r--doc/misc/dbus.texi4
-rw-r--r--doc/misc/ebrowse.texi2
-rw-r--r--doc/misc/ede.texi8
-rw-r--r--doc/misc/emacs-mime.texi2
-rw-r--r--doc/misc/eshell.texi2
-rw-r--r--doc/misc/gnus-faq.texi18
-rw-r--r--doc/misc/gnus.texi16
-rw-r--r--doc/misc/idlwave.texi6
-rw-r--r--doc/misc/message.texi2
-rw-r--r--doc/misc/org.texi8
-rw-r--r--doc/misc/rcirc.texi10
-rw-r--r--doc/misc/semantic.texi2
-rw-r--r--doc/misc/tramp.texi6
-rw-r--r--etc/ChangeLog5
-rw-r--r--etc/MH-E-NEWS10
-rw-r--r--etc/NEWS33
-rw-r--r--etc/NEWS.194
-rw-r--r--etc/NEWS.222
-rw-r--r--etc/NEWS.234
-rw-r--r--etc/TODO2
-rw-r--r--etc/srecode/doc-cpp.srt2
-rw-r--r--etc/srecode/doc-default.srt2
-rw-r--r--etc/srecode/doc-java.srt2
-rw-r--r--etc/srecode/el.srt2
-rw-r--r--etc/srecode/template.srt4
-rw-r--r--leim/ChangeLog11
-rw-r--r--leim/quail/croatian.el2
-rw-r--r--leim/quail/czech.el2
-rw-r--r--leim/quail/ethiopic.el2
-rw-r--r--leim/quail/greek.el8
-rw-r--r--leim/quail/hanja3.el2
-rw-r--r--leim/quail/persian.el6
-rw-r--r--lib-src/ChangeLog15
-rw-r--r--lib-src/emacsclient.c24
-rw-r--r--lib-src/etags.c36
-rw-r--r--lisp/ChangeLog435
-rw-r--r--lisp/ChangeLog.102
-rw-r--r--lisp/ChangeLog.112
-rw-r--r--lisp/ChangeLog.1210
-rw-r--r--lisp/ChangeLog.136
-rw-r--r--lisp/ChangeLog.146
-rw-r--r--lisp/ChangeLog.156
-rw-r--r--lisp/ChangeLog.22
-rw-r--r--lisp/ChangeLog.34
-rw-r--r--lisp/ChangeLog.720
-rw-r--r--lisp/ChangeLog.92
-rw-r--r--lisp/align.el6
-rw-r--r--lisp/allout-widgets.el2
-rw-r--r--lisp/allout.el12
-rw-r--r--lisp/ansi-color.el4
-rw-r--r--lisp/arc-mode.el4
-rw-r--r--lisp/battery.el35
-rw-r--r--lisp/calc/calc-alg.el2
-rw-r--r--lisp/calc/calc-menu.el289
-rw-r--r--lisp/calc/calc-misc.el4
-rw-r--r--lisp/calc/calc-poly.el26
-rw-r--r--lisp/calc/calc-yank.el12
-rw-r--r--lisp/calculator.el2
-rw-r--r--lisp/calendar/appt.el4
-rw-r--r--lisp/calendar/holidays.el2
-rw-r--r--lisp/calendar/solar.el2
-rw-r--r--lisp/cedet/ChangeLog9
-rw-r--r--lisp/cedet/data-debug.el4
-rw-r--r--lisp/cedet/ede/pmake.el6
-rw-r--r--lisp/cedet/ede/proj-archive.el2
-rw-r--r--lisp/cedet/ede/proj-shared.el2
-rw-r--r--lisp/cedet/inversion.el4
-rw-r--r--lisp/cedet/semantic.el2
-rw-r--r--lisp/cedet/semantic/analyze/debug.el2
-rw-r--r--lisp/cedet/semantic/bovine/c.el4
-rw-r--r--lisp/cedet/semantic/bovine/el.el8
-rw-r--r--lisp/cedet/semantic/db-file.el12
-rw-r--r--lisp/cedet/semantic/db-find.el12
-rw-r--r--lisp/cedet/semantic/db.el4
-rw-r--r--lisp/cedet/semantic/debug.el2
-rw-r--r--lisp/cedet/semantic/edit.el3
-rw-r--r--lisp/cedet/semantic/find.el2
-rw-r--r--lisp/cedet/semantic/grammar.el2
-rw-r--r--lisp/cedet/semantic/idle.el8
-rw-r--r--lisp/cedet/semantic/lex.el6
-rw-r--r--lisp/cedet/semantic/scope.el2
-rw-r--r--lisp/cedet/semantic/tag-ls.el2
-rw-r--r--lisp/cedet/semantic/util-modes.el6
-rw-r--r--lisp/cedet/semantic/wisent/comp.el4
-rw-r--r--lisp/cedet/srecode/args.el3
-rw-r--r--lisp/cedet/srecode/fields.el2
-rw-r--r--lisp/cedet/srecode/insert.el2
-rw-r--r--lisp/cedet/srecode/srt-mode.el2
-rw-r--r--lisp/comint.el2
-rw-r--r--lisp/delim-col.el18
-rw-r--r--lisp/delsel.el2
-rw-r--r--lisp/descr-text.el16
-rw-r--r--lisp/desktop.el4
-rw-r--r--lisp/dframe.el2
-rw-r--r--lisp/dired-x.el2
-rw-r--r--lisp/dired.el4
-rw-r--r--lisp/electric.el2
-rw-r--r--lisp/emacs-lisp/assoc.el7
-rw-r--r--lisp/emacs-lisp/bytecomp.el2
-rw-r--r--lisp/emacs-lisp/edebug.el2
-rw-r--r--lisp/emacs-lisp/eieio.el2
-rw-r--r--lisp/emacs-lisp/lisp-mode.el1
-rw-r--r--lisp/emacs-lisp/package.el7
-rw-r--r--lisp/emacs-lisp/pcase.el10
-rw-r--r--lisp/emacs-lisp/syntax.el4
-rw-r--r--lisp/emulation/cua-base.el4
-rw-r--r--lisp/emulation/cua-gmrk.el2
-rw-r--r--lisp/emulation/cua-rect.el4
-rw-r--r--lisp/emulation/vip.el4
-rw-r--r--lisp/emulation/viper-cmd.el22
-rw-r--r--lisp/emulation/viper-init.el2
-rw-r--r--lisp/emulation/viper-macs.el2
-rw-r--r--lisp/emulation/viper.el2
-rw-r--r--lisp/epa-dired.el2
-rw-r--r--lisp/epa-file.el4
-rw-r--r--lisp/erc/ChangeLog.028
-rw-r--r--lisp/erc/ChangeLog.0316
-rw-r--r--lisp/erc/erc-backend.el2
-rw-r--r--lisp/eshell/em-dirs.el2
-rw-r--r--lisp/eshell/em-rebind.el2
-rw-r--r--lisp/faces.el11
-rw-r--r--lisp/files.el57
-rw-r--r--lisp/filesets.el2
-rw-r--r--lisp/follow.el4
-rw-r--r--lisp/font-lock.el2
-rw-r--r--lisp/forms.el2
-rw-r--r--lisp/gnus/ChangeLog129
-rw-r--r--lisp/gnus/ChangeLog.24
-rw-r--r--lisp/gnus/gnus-art.el2
-rw-r--r--lisp/gnus/gnus-fun.el6
-rw-r--r--lisp/gnus/gnus-group.el2
-rw-r--r--lisp/gnus/gnus-msg.el4
-rw-r--r--lisp/gnus/gnus-spec.el4
-rw-r--r--lisp/gnus/gnus-sum.el15
-rw-r--r--lisp/gnus/gnus-win.el4
-rw-r--r--lisp/gnus/gnus.el2
-rw-r--r--lisp/gnus/message.el23
-rw-r--r--lisp/gnus/mm-decode.el2
-rw-r--r--lisp/gnus/mm-view.el1
-rw-r--r--lisp/gnus/nndiary.el10
-rw-r--r--lisp/gnus/nnir.el4
-rw-r--r--lisp/gnus/nntp.el2
-rw-r--r--lisp/gnus/plstore.el2
-rw-r--r--lisp/gnus/rfc2231.el2
-rw-r--r--lisp/gs.el4
-rw-r--r--lisp/hilit-chg.el2
-rw-r--r--lisp/htmlfontify.el2
-rw-r--r--lisp/ibuf-ext.el2
-rw-r--r--lisp/ibuffer.el6
-rw-r--r--lisp/ido.el2
-rw-r--r--lisp/international/ccl.el4
-rw-r--r--lisp/international/mule-cmds.el2
-rw-r--r--lisp/international/mule-util.el2
-rw-r--r--lisp/international/mule.el2
-rw-r--r--lisp/international/quail.el6
-rw-r--r--lisp/international/robin.el6
-rw-r--r--lisp/international/titdic-cnv.el8
-rw-r--r--lisp/international/ucs-normalize.el2
-rw-r--r--lisp/kmacro.el2
-rw-r--r--lisp/language/chinese.el14
-rw-r--r--lisp/language/cyrillic.el4
-rw-r--r--lisp/language/ethio-util.el6
-rw-r--r--lisp/language/lao-util.el2
-rw-r--r--lisp/language/viet-util.el4
-rw-r--r--lisp/ldefs-boot.el2
-rw-r--r--lisp/loadhist.el2
-rw-r--r--lisp/mail/emacsbug.el2
-rw-r--r--lisp/mail/rmail.el4
-rw-r--r--lisp/mail/rmailmm.el2
-rw-r--r--lisp/mail/rmailsum.el6
-rw-r--r--lisp/makefile.w32-in7
-rw-r--r--lisp/man.el5
-rw-r--r--lisp/mh-e/ChangeLog5
-rw-r--r--lisp/mh-e/ChangeLog.16
-rw-r--r--lisp/net/ange-ftp.el8
-rw-r--r--lisp/net/dbus.el2
-rw-r--r--lisp/net/netrc.el2
-rw-r--r--lisp/net/network-stream.el2
-rw-r--r--lisp/net/ntlm.el2
-rw-r--r--lisp/net/tramp-gvfs.el2
-rw-r--r--lisp/net/tramp-sh.el16
-rw-r--r--lisp/net/tramp.el6
-rw-r--r--lisp/net/xesam.el6
-rw-r--r--lisp/net/zeroconf.el2
-rw-r--r--lisp/nxml/rng-valid.el4
-rw-r--r--lisp/obsolete/old-whitespace.el8
-rw-r--r--lisp/obsolete/pgg.el2
-rw-r--r--lisp/org/ChangeLog17
-rw-r--r--lisp/org/ob-ref.el2
-rw-r--r--lisp/org/ob.el4
-rw-r--r--lisp/org/org-agenda.el4
-rw-r--r--lisp/org/org-clock.el4
-rw-r--r--lisp/org/org-list.el2
-rw-r--r--lisp/org/org-protocol.el8
-rw-r--r--lisp/org/org-publish.el6
-rw-r--r--lisp/org/org-taskjuggler.el2
-rw-r--r--lisp/org/org.el6
-rw-r--r--lisp/pcmpl-gnu.el17
-rw-r--r--lisp/play/gametree.el2
-rw-r--r--lisp/printing.el12
-rw-r--r--lisp/proced.el2
-rw-r--r--lisp/progmodes/ada-mode.el6
-rw-r--r--lisp/progmodes/ada-stmt.el2
-rw-r--r--lisp/progmodes/ada-xref.el2
-rw-r--r--lisp/progmodes/cc-awk.el8
-rw-r--r--lisp/progmodes/cc-cmds.el6
-rw-r--r--lisp/progmodes/cc-defs.el2
-rw-r--r--lisp/progmodes/cc-engine.el234
-rw-r--r--lisp/progmodes/cc-fonts.el32
-rw-r--r--lisp/progmodes/cc-langs.el72
-rw-r--r--lisp/progmodes/cc-mode.el196
-rw-r--r--lisp/progmodes/cc-vars.el2
-rw-r--r--lisp/progmodes/cfengine.el142
-rw-r--r--lisp/progmodes/cperl-mode.el14
-rw-r--r--lisp/progmodes/dcl-mode.el4
-rw-r--r--lisp/progmodes/ebnf2ps.el8
-rw-r--r--lisp/progmodes/gdb-mi.el223
-rw-r--r--lisp/progmodes/grep.el7
-rw-r--r--lisp/progmodes/gud.el108
-rw-r--r--lisp/progmodes/hideif.el2
-rw-r--r--lisp/progmodes/idlwave.el4
-rw-r--r--lisp/progmodes/inf-lisp.el2
-rw-r--r--lisp/progmodes/js.el2
-rw-r--r--lisp/progmodes/make-mode.el58
-rw-r--r--lisp/progmodes/pascal.el1
-rw-r--r--lisp/progmodes/prolog.el6
-rw-r--r--lisp/progmodes/python.el2
-rw-r--r--lisp/progmodes/sql.el2
-rw-r--r--lisp/progmodes/vera-mode.el4
-rw-r--r--lisp/progmodes/verilog-mode.el20
-rw-r--r--lisp/progmodes/vhdl-mode.el26
-rw-r--r--lisp/ps-mule.el6
-rw-r--r--lisp/ps-print.el2
-rw-r--r--lisp/reveal.el6
-rw-r--r--lisp/server.el18
-rw-r--r--lisp/ses.el181
-rw-r--r--lisp/shell.el2
-rw-r--r--lisp/simple.el54
-rw-r--r--lisp/speedbar.el4
-rw-r--r--lisp/term.el4
-rw-r--r--lisp/term/ns-win.el21
-rw-r--r--lisp/term/rxvt.el2
-rw-r--r--lisp/term/x-win.el2
-rw-r--r--lisp/term/xterm.el2
-rw-r--r--lisp/textmodes/artist.el8
-rw-r--r--lisp/textmodes/fill.el4
-rw-r--r--lisp/textmodes/ispell.el4
-rw-r--r--lisp/textmodes/picture.el2
-rw-r--r--lisp/textmodes/reftex-dcr.el2
-rw-r--r--lisp/textmodes/remember.el2
-rw-r--r--lisp/textmodes/rst.el2
-rw-r--r--lisp/textmodes/table.el8
-rw-r--r--lisp/textmodes/texinfmt.el4
-rw-r--r--lisp/textmodes/texnfo-upd.el122
-rw-r--r--lisp/time.el2
-rw-r--r--lisp/url/ChangeLog4
-rw-r--r--lisp/url/url-cookie.el2
-rw-r--r--lisp/url/url-gw.el4
-rw-r--r--lisp/url/url-http.el4
-rw-r--r--lisp/url/url-vars.el1
-rw-r--r--lisp/vc/ediff-init.el2
-rw-r--r--lisp/vc/ediff-ptch.el2
-rw-r--r--lisp/vc/emerge.el2
-rw-r--r--lisp/vc/pcvs.el2
-rw-r--r--lisp/vc/vc-bzr.el5
-rw-r--r--lisp/vc/vc-dir.el100
-rw-r--r--lisp/vc/vc-hg.el2
-rw-r--r--lisp/vc/vc-hooks.el6
-rw-r--r--lisp/vc/vc.el61
-rw-r--r--lisp/vcursor.el2
-rw-r--r--lisp/view.el4
-rw-r--r--lisp/wid-edit.el6
-rw-r--r--lisp/window.el121
-rw-r--r--nt/addpm.c3
-rw-r--r--oldXMenu/X10.h2
-rw-r--r--oldXMenu/XMenu.h4
-rw-r--r--src/ChangeLog283
-rw-r--r--src/ChangeLog.108
-rw-r--r--src/ChangeLog.116
-rw-r--r--src/ChangeLog.28
-rw-r--r--src/ChangeLog.72
-rw-r--r--src/ChangeLog.88
-rw-r--r--src/alloc.c2
-rw-r--r--src/callint.c11
-rw-r--r--src/ccl.c6
-rw-r--r--src/charset.c2
-rw-r--r--src/charset.h4
-rw-r--r--src/cm.h4
-rw-r--r--src/coding.c192
-rw-r--r--src/coding.h2
-rw-r--r--src/data.c2
-rw-r--r--src/dbusbind.c2
-rw-r--r--src/editfns.c2
-rw-r--r--src/emacs.c17
-rw-r--r--src/emacsgtkfixed.c2
-rw-r--r--src/emacsgtkfixed.h2
-rw-r--r--src/eval.c14
-rw-r--r--src/fileio.c20
-rw-r--r--src/font.c8
-rw-r--r--src/font.h6
-rw-r--r--src/fontset.c4
-rw-r--r--src/frame.c2
-rw-r--r--src/ftfont.c9
-rw-r--r--src/ftxfont.c9
-rw-r--r--src/image.c33
-rw-r--r--src/keyboard.c56
-rw-r--r--src/lastfile.c3
-rw-r--r--src/lisp.h15
-rw-r--r--src/lread.c28
-rw-r--r--src/minibuf.c34
-rw-r--r--src/nsfns.m62
-rw-r--r--src/nsfont.m30
-rw-r--r--src/nsmenu.m46
-rw-r--r--src/nsselect.m168
-rw-r--r--src/nsterm.h2
-rw-r--r--src/nsterm.m44
-rw-r--r--src/print.c2
-rw-r--r--src/process.c5
-rw-r--r--src/regex.c2
-rw-r--r--src/regex.h4
-rw-r--r--src/region-cache.c4
-rw-r--r--src/region-cache.h4
-rw-r--r--src/s/gnu-linux.h2
-rw-r--r--src/sysdep.c2
-rw-r--r--src/termhooks.h4
-rw-r--r--src/textprop.c4
-rw-r--r--src/unexelf.c12
-rw-r--r--src/w16select.c9
-rw-r--r--src/w32.c18
-rw-r--r--src/w32fns.c10
-rw-r--r--src/w32font.c2
-rw-r--r--src/w32select.c7
-rw-r--r--src/w32term.c6
-rw-r--r--src/w32term.h2
-rw-r--r--src/window.c19
-rw-r--r--src/window.h2
-rw-r--r--src/xdisp.c23
-rw-r--r--src/xfns.c10
-rw-r--r--src/xftfont.c2
-rw-r--r--src/xmenu.c23
-rw-r--r--src/xselect.c10
-rw-r--r--src/xterm.c12
-rw-r--r--src/xterm.h2
-rw-r--r--test/cedet/tests/test.el2
-rw-r--r--test/cedet/tests/testpolymorph.cpp2
-rw-r--r--test/indent/pascal.pas1088
-rw-r--r--test/indent/prolog.prolog2
-rwxr-xr-xupdate-subdirs3
388 files changed, 7768 insertions, 5508 deletions
diff --git a/ChangeLog b/ChangeLog
index fe4b74535ae..605ef32b598 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,20 @@
12011-12-17 Paul Eggert <eggert@cs.ucla.edu>
2
3 Port HAVE_PTHREAD configuration to MirBSD 10 (Bug#10201).
4 * configure.in (HAVE_PTHREAD): Check for pthread_atfork if linking
5 to gmalloc.c. This should prevent a MirBSD 10 build failure reported
6 by Nelson H. F. Beebe in
7 <http://lists.gnu.org/archive/html/emacs-devel/2011-12/msg00065.html>.
8
92011-12-10 Juanma Barranquero <lekktu@gmail.com>
10
11 * update-subdirs: Don't set no-byte-compile twice (bug#10260).
12
132011-12-10 Jan Djärv <jan.h.d@swipnet.se>
14
15 * configure.in (HAVE_ALSA, HAVE_GSETTINGS): Save and restore LIBS
16 instead of LDFLAGS (Bug#10230).
17
12011-12-03 Paul Eggert <eggert@cs.ucla.edu> 182011-12-03 Paul Eggert <eggert@cs.ucla.edu>
2 19
3 * INSTALL.BZR: Mention configure -C, --disable-maintainer-mode. 20 * INSTALL.BZR: Mention configure -C, --disable-maintainer-mode.
@@ -2245,7 +2262,7 @@
2245 2262
22462009-12-10 Jan Djärv <jan.h.d@swipnet.se> 22632009-12-10 Jan Djärv <jan.h.d@swipnet.se>
2247 2264
2248 * configure.in: Check for RSVG if GNUStep is used. 2265 * configure.in: Check for RSVG if GNUstep is used.
2249 2266
22502009-12-09 Jan Djärv <jan.h.d@swipnet.se> 22672009-12-09 Jan Djärv <jan.h.d@swipnet.se>
2251 2268
@@ -2430,7 +2447,7 @@
2430 2447
24312009-05-06 Stefan Monnier <monnier@iro.umontreal.ca> 24482009-05-06 Stefan Monnier <monnier@iro.umontreal.ca>
2432 2449
2433 * configure.in: Don't define CANNOT_DUMP for GNUStep any more. 2450 * configure.in: Don't define CANNOT_DUMP for GNUstep any more.
2434 2451
24352009-05-05 Per Starbäck <per@starback.se> (tiny change) 24522009-05-05 Per Starbäck <per@starback.se> (tiny change)
2436 2453
@@ -8171,7 +8188,7 @@
81711994-01-08 Roland McGrath (roland@churchy.gnu.ai.mit.edu) 81881994-01-08 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
8172 8189
8173 * configure.in (creating src/Makefile): Put code inside 2nd arg to 8190 * configure.in (creating src/Makefile): Put code inside 2nd arg to
8174 AC_OUTPUT as it should be; hopefully noone will again see fit to 8191 AC_OUTPUT as it should be; hopefully no one will again see fit to
8175 gratuitously break this and not make a change log entry. 8192 gratuitously break this and not make a change log entry.
8176 Optimized sed processing of Makefile.in and cpp output; now 8193 Optimized sed processing of Makefile.in and cpp output; now
8177 preserves comments previously removed from the cpp input. 8194 preserves comments previously removed from the cpp input.
diff --git a/admin/FOR-RELEASE b/admin/FOR-RELEASE
index 23d2bd2b16a..65f98c85496 100644
--- a/admin/FOR-RELEASE
+++ b/admin/FOR-RELEASE
@@ -61,13 +61,6 @@ sk Miroslav Vaško
61 61
62* BUGS 62* BUGS
63 63
64** Does deleting frames run Lisp code? If so, can we get rid of that?
65It is a dangerous design.
66http://lists.gnu.org/archive/html/emacs-devel/2007-09/msg01330.html
67
68** Why were the calls to x_fully_uncatch_errors commented out in eval.c?
69http://lists.gnu.org/archive/html/emacs-devel/2007-09/msg01987.html
70
71** rms: gnus-dired.el is a mistake. Those features should not 64** rms: gnus-dired.el is a mistake. Those features should not
72be part of Gnus. They should be moved to some other part of Emacs. 65be part of Gnus. They should be moved to some other part of Emacs.
73rsteib: Gnus dependencies in `gnus-dired.el' (and `mailcap.el') have been 66rsteib: Gnus dependencies in `gnus-dired.el' (and `mailcap.el') have been
@@ -90,25 +83,8 @@ and change key bindings where necessary. The current list of modes:
90 `log-edit-comment-search-forward'. Perhaps search commands 83 `log-edit-comment-search-forward'. Perhaps search commands
91 on the global key binding `M-s' are useless in these modes. 84 on the global key binding `M-s' are useless in these modes.
92 85
93** sdl.web@gmail.com, 30 Oct: ps-lpr-switches has no effect
94http://lists.gnu.org/archive/html/emacs-devel/2007-10/msg02091.html
95
96Fixed by this change?
97
982007-11-09 Vinicius Jose Latorre <viniciusjl@ig.com.br>
99
100 * ps-print.el: [...]
101 (ps-do-despool): If ps-lpr-switches is not a list, force it to be one.
102
103** In C, use EMACS_INT for variables and structure members
104for buffer/string positions. E.g. struct it, struct text_pos.
105
106* DOCUMENTATION 86* DOCUMENTATION
107 87
108** Clean up Emacs.app references in code and documentation.
109
110** Document new font backend
111
112** Document XEmbed support 88** Document XEmbed support
113 89
114** Check the Emacs Tutorial. 90** Check the Emacs Tutorial.
@@ -148,19 +124,19 @@ TUTORIAL.zh
148 124
149** Check the manual. 125** Check the manual.
150 126
151abbrevs.texi 127abbrevs.texi cyd
152ack.texi 128ack.texi
153anti.texi 129anti.texi
154arevert-xtra.texi cyd 130arevert-xtra.texi cyd
155basic.texi cyd 131basic.texi cyd
156buffers.texi cyd 132buffers.texi cyd
157building.texi 133building.texi cyd
158calendar.texi 134calendar.texi
159cal-xtra.texi 135cal-xtra.texi
160cmdargs.texi 136cmdargs.texi
161commands.texi cyd 137commands.texi cyd
162custom.texi 138custom.texi
163dired.texi 139dired.texi cyd
164dired-xtra.texi 140dired-xtra.texi
165display.texi cyd 141display.texi cyd
166emacs.texi 142emacs.texi
@@ -177,7 +153,7 @@ indent.texi cyd
177killing.texi cyd 153killing.texi cyd
178kmacro.texi cyd 154kmacro.texi cyd
179macos.texi 155macos.texi
180maintaining.texi 156maintaining.texi cyd
181major.texi 157major.texi
182mark.texi cyd 158mark.texi cyd
183mini.texi 159mini.texi
@@ -188,16 +164,16 @@ msdog-xtra.texi
188mule.texi 164mule.texi
189m-x.texi cyd 165m-x.texi cyd
190picture-xtra.texi 166picture-xtra.texi
191programs.texi 167programs.texi cyd
192regs.texi cyd 168regs.texi cyd
193rmail.texi 169rmail.texi
194screen.texi cyd 170screen.texi cyd
195search.texi cyd 171search.texi cyd
196sending.texi 172sending.texi
197text.texi 173text.texi cyd
198trouble.texi 174trouble.texi
199vc-xtra.texi 175vc-xtra.texi cyd
200vc1-xtra.texi 176vc1-xtra.texi cyd
201windows.texi cyd 177windows.texi cyd
202xresources.texi 178xresources.texi
203 179
diff --git a/admin/grammars/bovine-grammar.el b/admin/grammars/bovine-grammar.el
index eda7b42adbd..a7fe955acf4 100644
--- a/admin/grammars/bovine-grammar.el
+++ b/admin/grammars/bovine-grammar.el
@@ -298,7 +298,7 @@ VALUE is a value, or range of values to match against. For
298example, a SYMBOL might need to match \"foo\". Some TYPES will not 298example, a SYMBOL might need to match \"foo\". Some TYPES will not
299have matching criteria. 299have matching criteria.
300 300
301LAMBDA is a lambda expression which is evaled with the text of the 301LAMBDA is a lambda expression which is evalled with the text of the
302type when it is found. It is passed the list of all buffer text 302type when it is found. It is passed the list of all buffer text
303elements found since the last lambda expression. It should return a 303elements found since the last lambda expression. It should return a
304semantic element (see below.) 304semantic element (see below.)
diff --git a/admin/grammars/js.wy b/admin/grammars/js.wy
index a13abf56e6e..ffa324806cf 100644
--- a/admin/grammars/js.wy
+++ b/admin/grammars/js.wy
@@ -66,7 +66,7 @@
66;; Other Goals 66;; Other Goals
67%start FormalParameterList 67%start FormalParameterList
68 68
69;; with the terminals stuff, I used the javacript.y names, 69;; with the terminals stuff, I used the javascript.y names,
70;; but the semantic/wisent/java-tags.wy types 70;; but the semantic/wisent/java-tags.wy types
71;; when possible 71;; when possible
72;; ------------------ 72;; ------------------
diff --git a/autogen.sh b/autogen.sh
index d15817d0596..4778d6ca2ad 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -67,7 +67,7 @@ minor_version ()
67 67
68## $1 = program 68## $1 = program
69## $2 = minimum version. 69## $2 = minimum version.
70## Return 0 if program is present with version >= minumum version. 70## Return 0 if program is present with version >= minimum version.
71## Return 1 if program is missing. 71## Return 1 if program is missing.
72## Return 2 if program is present but too old. 72## Return 2 if program is present but too old.
73## Return 3 for unexpected error (eg failed to parse version). 73## Return 3 for unexpected error (eg failed to parse version).
diff --git a/autogen/Makefile.in b/autogen/Makefile.in
index 743dd02917d..c3cca3f9f1b 100644
--- a/autogen/Makefile.in
+++ b/autogen/Makefile.in
@@ -723,6 +723,7 @@ build_cpu = @build_cpu@
723build_os = @build_os@ 723build_os = @build_os@
724build_vendor = @build_vendor@ 724build_vendor = @build_vendor@
725builddir = @builddir@ 725builddir = @builddir@
726cache_file = @cache_file@
726canonical = @canonical@ 727canonical = @canonical@
727configuration = @configuration@ 728configuration = @configuration@
728datadir = @datadir@ 729datadir = @datadir@
diff --git a/configure.in b/configure.in
index 22cec282202..60ba7a740c2 100644
--- a/configure.in
+++ b/configure.in
@@ -1176,9 +1176,9 @@ if test "${with_sound}" != "no"; then
1176 PKG_CHECK_MODULES(ALSA, $ALSA_MODULES, HAVE_ALSA=yes, HAVE_ALSA=no) 1176 PKG_CHECK_MODULES(ALSA, $ALSA_MODULES, HAVE_ALSA=yes, HAVE_ALSA=no)
1177 if test $HAVE_ALSA = yes; then 1177 if test $HAVE_ALSA = yes; then
1178 SAVE_CFLAGS="$CFLAGS" 1178 SAVE_CFLAGS="$CFLAGS"
1179 SAVE_LDFLAGS="$LDFLAGS" 1179 SAVE_LIBS="$LIBS"
1180 CFLAGS="$ALSA_CFLAGS $CFLAGS" 1180 CFLAGS="$ALSA_CFLAGS $CFLAGS"
1181 LDFLAGS="$ALSA_LIBS $LDFLAGS" 1181 LIBS="$ALSA_LIBS $LIBS"
1182 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <asoundlib.h>]], [[snd_lib_error_set_handler (0);]])], 1182 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <asoundlib.h>]], [[snd_lib_error_set_handler (0);]])],
1183 emacs_alsa_normal=yes, 1183 emacs_alsa_normal=yes,
1184 emacs_alsa_normal=no) 1184 emacs_alsa_normal=no)
@@ -1194,7 +1194,7 @@ if test "${with_sound}" != "no"; then
1194 fi 1194 fi
1195 1195
1196 CFLAGS="$SAVE_CFLAGS" 1196 CFLAGS="$SAVE_CFLAGS"
1197 LDFLAGS="$SAVE_LDFLAGS" 1197 LIBS="$SAVE_LIBS"
1198 LIBSOUND="$LIBSOUND $ALSA_LIBS" 1198 LIBSOUND="$LIBSOUND $ALSA_LIBS"
1199 CFLAGS_SOUND="$CFLAGS_SOUND $ALSA_CFLAGS" 1199 CFLAGS_SOUND="$CFLAGS_SOUND $ALSA_CFLAGS"
1200 AC_DEFINE(HAVE_ALSA, 1, [Define to 1 if ALSA is available.]) 1200 AC_DEFINE(HAVE_ALSA, 1, [Define to 1 if ALSA is available.])
@@ -1685,7 +1685,7 @@ if test "$doug_lea_malloc" = "yes" ; then
1685 ## Use mmap directly for allocating larger buffers. 1685 ## Use mmap directly for allocating larger buffers.
1686 ## FIXME this comes from src/s/{gnu,gnu-linux}.h: 1686 ## FIXME this comes from src/s/{gnu,gnu-linux}.h:
1687 ## #ifdef DOUG_LEA_MALLOC; #undef REL_ALLOC; #endif 1687 ## #ifdef DOUG_LEA_MALLOC; #undef REL_ALLOC; #endif
1688 ## Does the AC_FUNC_MMAP test below make this check unecessary? 1688 ## Does the AC_FUNC_MMAP test below make this check unnecessary?
1689 case "$opsys" in 1689 case "$opsys" in
1690 gnu*) REL_ALLOC=no ;; 1690 gnu*) REL_ALLOC=no ;;
1691 esac 1691 esac
@@ -1722,7 +1722,15 @@ dnl Check if pthreads is available.
1722LIB_PTHREAD= 1722LIB_PTHREAD=
1723AC_CHECK_HEADERS(pthread.h) 1723AC_CHECK_HEADERS(pthread.h)
1724if test "$ac_cv_header_pthread_h"; then 1724if test "$ac_cv_header_pthread_h"; then
1725 AC_CHECK_LIB(pthread, pthread_self, HAVE_PTHREAD=yes) 1725 dnl gmalloc.c uses pthread_atfork, which is not available on older-style
1726 dnl hosts such as MirBSD 10, so test for pthread_atfork instead of merely
1727 dnl testing for pthread_self if Emacs uses gmalloc.c.
1728 if test "$GMALLOC_OBJ" = gmalloc.o; then
1729 emacs_pthread_function=pthread_atfork
1730 else
1731 emacs_pthread_function=pthread_self
1732 fi
1733 AC_CHECK_LIB(pthread, $emacs_pthread_function, HAVE_PTHREAD=yes)
1726fi 1734fi
1727if test "$HAVE_PTHREAD" = yes; then 1735if test "$HAVE_PTHREAD" = yes; then
1728 case "${canonical}" in 1736 case "${canonical}" in
@@ -2089,12 +2097,12 @@ fi
2089 2097
2090if test "$HAVE_GSETTINGS" = "yes" || test "$HAVE_GCONF" = "yes"; then 2098if test "$HAVE_GSETTINGS" = "yes" || test "$HAVE_GCONF" = "yes"; then
2091 SAVE_CFLAGS="$CFLAGS" 2099 SAVE_CFLAGS="$CFLAGS"
2092 SAVE_LDFLAGS="$LDFLAGS" 2100 SAVE_LIBS="$LIBS"
2093 CFLAGS="$SETTINGS_CFLAGS $CFLAGS" 2101 CFLAGS="$SETTINGS_CFLAGS $CFLAGS"
2094 LDFLAGS="$SETTINGS_LIBS $LDFLAGS" 2102 LIBS="$SETTINGS_LIBS $LIBS"
2095 AC_CHECK_FUNCS([g_type_init]) 2103 AC_CHECK_FUNCS([g_type_init])
2096 CFLAGS="$SAVE_CFLAGS" 2104 CFLAGS="$SAVE_CFLAGS"
2097 LDFLAGS="$SAVE_LDFLAGS" 2105 LIBS="$SAVE_LIBS"
2098fi 2106fi
2099AC_SUBST(SETTINGS_CFLAGS) 2107AC_SUBST(SETTINGS_CFLAGS)
2100AC_SUBST(SETTINGS_LIBS) 2108AC_SUBST(SETTINGS_LIBS)
diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog
index d16443ccf31..7857295de92 100644
--- a/doc/emacs/ChangeLog
+++ b/doc/emacs/ChangeLog
@@ -1,3 +1,232 @@
12011-12-26 Chong Yidong <cyd@gnu.org>
2
3 * dired.texi (Dired Enter, Misc Dired Features): Document
4 dired-use-ls-dired changes. Mention quit-window.
5 (Dired Navigation): Add index entries.
6 (Dired Visiting): Fix View Mode xref.
7 (Marks vs Flags): Prefer C-/ binding for undo.
8 (Subdirectories in Dired): Add xrefs.
9 (Misc Dired Features): Document some Emacs 24 changes. Add index
10 entries.
11
12 * abbrevs.texi (Abbrev Concepts): No need to mention abbrev-mode
13 variable, since it is explained in Minor Modes node.
14 (Defining Abbrevs): Copyedits.
15 (Expanding Abbrevs): State default of abbrev-all-caps. Prefer the
16 C-/ binding for undo.
17 (Dabbrev Customization): Add xrefs for case-fold-search and
18 case-replace.
19
20 * dired-xtra.texi (Subdir Switches): Add xref.
21
22 * maintaining.texi (VC Directory Commands): Mention quit-window.
23
242011-12-25 Chong Yidong <cyd@gnu.org>
25
26 * maintaining.texi (Tags): Mention Semantic.
27 (Create Tags Table, Etags Regexps): Copyedits.
28 (Find Tag): Mention minibuffer completion.
29 (List Tags): Mention completion-at-point. Completion is actually
30 available in M-x list-tags.
31
32 * vc1-xtra.texi (VC Delete/Rename): Rename from Renaming and VC.
33 Document vc-delete-file.
34
35 * files.texi (Misc File Ops): Mention vc-delete-file.
36
37 * programs.texi (Symbol Completion): Mention completion-at-point
38 explicitly.
39
402011-12-22 Chong Yidong <cyd@gnu.org>
41
42 * maintaining.texi (Change Log Commands): Don't specially mention
43 vc-update-change-log which is CVS-only.
44
45 * vc1-xtra.texi (Version Headers): Note that these are for
46 Subversion, CVS, etc. only.
47 (General VC Options): De-document vc-keep-workfiles. Fix
48 RCS-isms.
49
502011-12-22 Eli Zaretskii <eliz@gnu.org>
51
52 * building.texi (Debugger Operation): Fix a typo: "@end iftext"
53 should be @end iftex".
54
552011-12-21 Chong Yidong <cyd@gnu.org>
56
57 * maintaining.texi (Advanced C-x v v): Use fileset terminology.
58 (VC With A Merging VCS, VC Change Log): Add xref to VC Pull node.
59 (VC Pull): Mention vc-log-incoming.
60 (Log Buffer): Add CVS/RCS only disclaimer.
61
62 * vc1-xtra.texi (Remote Repositories): Update introduction.
63 (Local Version Control): Node deleted (obsolete with DVCSes).
64 (Remote Repositories, Version Backups): Node deleted. Move
65 documentation of vc-cvs-stay-local to CVS Options.
66 (CVS Options): Reduce verbosity of description of obscure CVS
67 locking feature.
68 (Making Revision Tags, Revision Tag Caveats): Merge into Revision
69 Tags node.
70 (Revision Tags): Move under Miscellaneous VC subsection.
71 (Change Logs and VC): Note that this is wrong for DVCSs.
72 De-document log entry manipulating features.
73 (Renaming and VC): Describe how it works on modern VCSes.
74
75 * files.texi (Misc File Ops): Mention vc-rename-file.
76
77 * programs.texi (Custom C Indent): Add index entries.
78
792011-12-20 Alan Mackenzie <acm@muc.de>
80
81 * programs.texi (Motion in C): Update the description of C-M-a and
82 C-M-e, they now DTRT in enclosing scopes.
83 (Custom C Indent): Add @dfn{guessing} of the indentation style.
84
852011-12-20 Chong Yidong <cyd@gnu.org>
86
87 * maintaining.texi (VCS Concepts): Add "working tree" terminology.
88 (Old Revisions): Use it.
89 (VCS Repositories): Add "distributed" terminology.
90 (Log Buffer): Remove duplicate description
91 about changesets. Fix "current VC fileset" ambiguity.
92 (Multi-User Branching): Node deleted.
93 (Branches, Switching Branches): Discuss decentralized version
94 control systems.
95 (VC Pull): New node.
96 (Merging): Document merging on decentralized systems.
97 (Creating Branches): Note that this is specific to CVS and related
98 systems.
99
1002011-12-19 Chong Yidong <cyd@gnu.org>
101
102 * maintaining.texi (VCS Merging, VCS Changesets): Index entries.
103 (VC Mode Line): Add index entry for "version control status".
104 (VC Undo): Use vc-revert instead of its vc-revert-buffer alias.
105 Document vc-revert-show-diff. De-document vc-rollback.
106 (VC Directory Mode): Rewrite introduction. Move prefix arg
107 documentation here from VC Directory Buffer node.
108 (VC Directory Buffer): Use a decentralized VCS example.
109 (VC Directory Commands): Use a table. Remove material duplicated
110 in previous nodes on multi-file VC filsets.
111
1122011-12-17 Chong Yidong <cyd@gnu.org>
113
114 * maintaining.texi (VCS Concepts): Make "revision" terminology
115 less CVS-specific.
116 (VC With A Merging VCS, VC With A Locking VCS): Add xref to
117 Registering node.
118 (Secondary VC Commands): Deleted. Promote subnodes.
119 (Log Buffer): Add command name for C-c C-c. Fix the name of the
120 log buffer. Add index entries.
121 (VCS Changesets, Types of Log File, VC With A Merging VCS): Use
122 "commit" terminology.
123 (Old Revisions): Move it to just before VC Change Log. "Tag" here
124 doesn't refer to tags tables. Note other possible forms of the
125 revision ID. C-x v = does not save.
126 (Registering): Note similarity to C-x v v action. Fix description
127 of how backends are chosen. De-document vc-default-init-revision.
128 (VC Change Log): Document C-x v l in VC-Dir buffer. Document RET
129 in root log buffers.
130
1312011-12-16 Chong Yidong <cyd@gnu.org>
132
133 * maintaining.texi (Version Control Systems): Drop Meta-CVS.
134 (Basic VC Editing): Remove redundant descriptions.
135 (VC With A Merging VCS): Make description more general instead of
136 CVS-specific.
137 (VC With A Locking VCS): Use VC fileset terminology.
138
1392011-12-12 Chong Yidong <cyd@gnu.org>
140
141 * building.texi (Executing Lisp): Fix xref for C-M-x.
142 (Lisp Libraries): Add xref to node explaining `load' in Lisp
143 manual. Note that load-path is not customizable.
144 (Lisp Eval): Note that listed commands are available globally.
145 Explain the meaning of "defun" in the C-M-x context.
146 (Lisp Interaction): Copyedits.
147 (External Lisp): Fix name of inferior Lisp buffer. Mention
148 Scheme.
149 (Compilation): Define "inferior process".
150
1512011-12-10 Eli Zaretskii <eliz@gnu.org>
152
153 * msdog.texi (Windows Fonts): Document how to force GDI font
154 backend on MS-Windows.
155
1562011-12-10 Chong Yidong <cyd@gnu.org>
157
158 * building.texi (Compilation): Say what the -k flag to make does.
159 Move subprocess discussion to Compilation Shell.
160 (Compilation Mode): Add xref for grep, occur, and mouse
161 references. Define "locus".
162 (Grep Searching): Use @command.
163 (Debuggers, Commands of GUD, GDB Graphical Interface): Clarify
164 intro.
165 (Starting GUD): Clarify how arguments are specified.
166 (Debugger Operation): Index entry for "GUD interaction buffer",
167 and move basic description here from Commands of GUD node.
168 (GDB User Interface Layout): Copyedits.
169 (Source Buffers): Remove gdb-find-source-frame, which is not in
170 gdb-mi.el.
171 (Other GDB Buffers): Remove gdb-use-separate-io-buffer and
172 toggle-gdb-all-registers, which are not in gdb-mi.el. Don't
173 re-document GUD interaction buffers.
174
175 * programs.texi (Symbol Completion): M-TAB can now use Semantic.
176 (Semantic): Add cindex entries for Semantic.
177
1782011-12-06 Chong Yidong <cyd@gnu.org>
179
180 * programs.texi (Man Page): Clarify how to use Man-switches.
181 Don't bother documenting Man-fontify-manpage-flag.
182 (Lisp Doc): Add xref to Name Help node.
183 (Hideshow): Add cindex. Mention role of ellipses, and default
184 value of hs-isearch-open. Don't bother documenting
185 hs-special-modes-alist.
186 (Symbol Completion): Add kindex for C-M-i. Don't recommend
187 changing the window manager binding of M-TAB.
188
1892011-12-05 Chong Yidong <cyd@gnu.org>
190
191 * programs.texi (Comment Commands): Fix description of for M-; on
192 blank lines. Move documentation of comment-region here.
193 (Multi-Line Comments): Clarify the role of comment-multi-line.
194 Refer to Comment Commands for comment-region doc.
195 (Options for Comments): Refer to Multi-Line Comments for
196 comment-multi-line doc, instead of duplicating it. Fix default
197 values of comment-padding and comment-start-skip.
198
1992011-12-04 Chong Yidong <cyd@gnu.org>
200
201 * programs.texi (Program Modes): Mention modes that are not
202 included with Emacs. Fix references to other manuals for tex.
203 Add index entry for backward-delete-char-untabify. Mention
204 prog-mode-hook.
205 (Which Function): Use "global minor mode" terminology.
206 (Basic Indent, Multi-line Indent): Refer to previous descriptions
207 in Indentation chapter to avoid duplication.
208 (Expressions): Copyedit.
209 (Matching): Document Electric Pair mode.
210
211 * ack.texi (Acknowledgments):
212 * rmail.texi (Movemail, Other Mailbox Formats):
213 * frames.texi (Frames): Don't capitalize "Unix".
214
2152011-12-04 Chong Yidong <cyd@gnu.org>
216
217 * text.texi (Nroff Mode): Mention what nroff is.
218 (Text Based Tables, Table Recognition): Don't say "Table mode"
219 since it's not a major or minor mode.
220 (Text Based Tables): Reduce the size of the example.
221 (Table Definition): Clarify definitions.
222 (Table Creation): Add key table.
223 (Cell Commands): Use kbd for commands.
224 (Table Rows and Columns): Combine nodes Row Commands and Column
225 Commands.
226 (Fixed Width Mode): Node deleted; contents moved to parent.
227 (Table Conversion): Shorten example.
228 (Measuring Tables): Merge into Table Misc.
229
12011-12-03 Chong Yidong <cyd@gnu.org> 2302011-12-03 Chong Yidong <cyd@gnu.org>
2 231
3 * text.texi (TeX Mode): Mention AUCTeX package. 232 * text.texi (TeX Mode): Mention AUCTeX package.
@@ -1597,7 +1826,7 @@
15972009-08-31 Nick Roberts <nickrob@snap.net.nz> 18262009-08-31 Nick Roberts <nickrob@snap.net.nz>
1598 1827
1599 * building.texi (Threads Buffer, Multithreaded Debugging): 1828 * building.texi (Threads Buffer, Multithreaded Debugging):
1600 Re-organise these two sections. 1829 Reorganize these two sections.
1601 1830
16022009-08-29 Eli Zaretskii <eliz@gnu.org> 18312009-08-29 Eli Zaretskii <eliz@gnu.org>
1603 1832
diff --git a/doc/emacs/abbrevs.texi b/doc/emacs/abbrevs.texi
index 2eafadf4841..5868010806c 100644
--- a/doc/emacs/abbrevs.texi
+++ b/doc/emacs/abbrevs.texi
@@ -45,17 +45,14 @@ expanding to @samp{find outer otter}, then you can insert @samp{find
45outer otter.} into the buffer by typing @kbd{f o o .}. 45outer otter.} into the buffer by typing @kbd{f o o .}.
46 46
47@findex abbrev-mode 47@findex abbrev-mode
48@vindex abbrev-mode
49@cindex Abbrev mode 48@cindex Abbrev mode
50@cindex mode, Abbrev 49@cindex mode, Abbrev
51 Abbrevs expand only when Abbrev mode (a minor mode) is enabled. 50 Abbrevs expand only when Abbrev mode, a buffer-local minor mode, is
52Disabling Abbrev mode does not cause abbrev definitions to be forgotten, 51enabled. Disabling Abbrev mode does not cause abbrev definitions to
53but they do not expand until Abbrev mode is enabled again. The command 52be forgotten, but they do not expand until Abbrev mode is enabled
54@kbd{M-x abbrev-mode} toggles Abbrev mode; with a numeric argument, it 53again. The command @kbd{M-x abbrev-mode} toggles Abbrev mode; with a
55turns Abbrev mode on if the argument is positive, off otherwise. 54numeric argument, it turns Abbrev mode on if the argument is positive,
56@xref{Minor Modes}. @code{abbrev-mode} is also a variable; Abbrev mode is 55off otherwise. @xref{Minor Modes}.
57on when the variable is non-@code{nil}. The variable @code{abbrev-mode}
58automatically becomes local to the current buffer when it is set.
59 56
60 Abbrevs can have @dfn{mode-specific} definitions, active only in one major 57 Abbrevs can have @dfn{mode-specific} definitions, active only in one major
61mode. Abbrevs can also have @dfn{global} definitions that are active in 58mode. Abbrevs can also have @dfn{global} definitions that are active in
@@ -108,22 +105,18 @@ region as the expansion of the abbrev being defined.
108@kindex C-x a l 105@kindex C-x a l
109@findex add-mode-abbrev 106@findex add-mode-abbrev
110 The command @kbd{C-x a l} (@code{add-mode-abbrev}) is similar, but 107 The command @kbd{C-x a l} (@code{add-mode-abbrev}) is similar, but
111defines a mode-specific abbrev. Mode-specific abbrevs are active only in a 108defines a mode-specific abbrev for the current major mode. The
112particular major mode. @kbd{C-x a l} defines an abbrev for the major mode 109arguments work the same as for @kbd{C-x a g}.
113in effect at the time @kbd{C-x a l} is typed. The arguments work the same
114as for @kbd{C-x a g}.
115 110
116@kindex C-x a i g 111@kindex C-x a i g
117@findex inverse-add-global-abbrev 112@findex inverse-add-global-abbrev
118@kindex C-x a i l 113@kindex C-x a i l
119@findex inverse-add-mode-abbrev 114@findex inverse-add-mode-abbrev
120 If the abbrev text itself is already in the buffer, you can use the 115 @kbd{C-x a i g} (@code{inverse-add-global-abbrev}) and @kbd{C-x a i
121commands @kbd{C-x a i g} (@code{inverse-add-global-abbrev}) and 116l} (@code{inverse-add-mode-abbrev}) perform the opposite task: if the
122@kbd{C-x a i l} (@code{inverse-add-mode-abbrev}) to define it as an 117abbrev text is already in the buffer, you use these commands to define
123abbrev by specify the expansion in the minibuffer. These commands are 118an abbrev by specifying the expansion in the minibuffer. These
124called ``inverse'' because they invert the meaning of the two text 119commands will expand the abbrev text used for the definition.
125strings they use (one from the buffer and one read with the
126minibuffer).
127 120
128@findex define-mode-abbrev 121@findex define-mode-abbrev
129@findex define-global-abbrev 122@findex define-global-abbrev
@@ -132,8 +125,8 @@ expansion in the buffer using the command @code{define-global-abbrev}.
132It reads two arguments---the abbrev, and its expansion. The command 125It reads two arguments---the abbrev, and its expansion. The command
133@code{define-mode-abbrev} does likewise for a mode-specific abbrev. 126@code{define-mode-abbrev} does likewise for a mode-specific abbrev.
134 127
135 To change the definition of an abbrev, just define a new definition. 128 To change the definition of an abbrev, just make a new definition.
136When the abbrev has a prior definition, the abbrev definition commands 129When an abbrev has a prior definition, the abbrev definition commands
137ask for confirmation before replacing it. 130ask for confirmation before replacing it.
138 131
139@findex kill-all-abbrevs 132@findex kill-all-abbrevs
@@ -155,11 +148,11 @@ The most common way to use an abbrev is to insert it and then insert a
155punctuation or whitespace character to expand it. 148punctuation or whitespace character to expand it.
156 149
157@vindex abbrev-all-caps 150@vindex abbrev-all-caps
158 Abbrev expansion preserves case; thus, @samp{foo} expands into @samp{find 151 Abbrev expansion preserves case: @samp{foo} expands to @samp{find
159outer otter}; @samp{Foo} into @samp{Find outer otter}, and @samp{FOO} into 152outer otter}, and @samp{Foo} to @samp{Find outer otter}. @samp{FOO}
160@samp{FIND OUTER OTTER} or @samp{Find Outer Otter} according to the 153expands to @samp{Find Outer Otter} by default, but if you change the
161variable @code{abbrev-all-caps} (setting it non-@code{nil} specifies 154variable @code{abbrev-all-caps} to a non-@code{nil} value, it expands
162@samp{FIND OUTER OTTER}). 155to @samp{FIND OUTER OTTER}.
163 156
164 These commands are used to control abbrev expansion: 157 These commands are used to control abbrev expansion:
165 158
@@ -196,14 +189,14 @@ punctuation with @kbd{C-q}. Thus, @kbd{foo C-q ,} leaves @samp{foo,} in
196the buffer, not expanding it. 189the buffer, not expanding it.
197 190
198@findex unexpand-abbrev 191@findex unexpand-abbrev
199 If you expand an abbrev by mistake, you can undo the expansion and 192 If you expand an abbrev by mistake, you can undo the expansion by
200bring back the abbrev itself by typing @kbd{C-_} to undo (@pxref{Undo}). 193typing @kbd{C-/} (@code{undo}). @xref{Undo}. This undoes the
201This also undoes the insertion of the non-word character that expanded 194insertion of the abbrev expansion and brings back the abbrev text. If
202the abbrev. If the result you want is the terminating non-word 195the result you want is the terminating non-word character plus the
203character plus the unexpanded abbrev, you must reinsert the terminating 196unexpanded abbrev, you must reinsert the terminating character,
204character, quoting it with @kbd{C-q}. You can also use the command 197quoting it with @kbd{C-q}. You can also use the command @kbd{M-x
205@kbd{M-x unexpand-abbrev} to cancel the last expansion without 198unexpand-abbrev} to cancel the last expansion without deleting the
206deleting the terminating character. 199terminating character.
207 200
208@findex expand-region-abbrevs 201@findex expand-region-abbrevs
209 @kbd{M-x expand-region-abbrevs} searches through the region for defined 202 @kbd{M-x expand-region-abbrevs} searches through the region for defined
@@ -409,12 +402,11 @@ you are expanding.
409 402
410@vindex dabbrev-case-fold-search 403@vindex dabbrev-case-fold-search
411 This feature is controlled by the variable 404 This feature is controlled by the variable
412@code{dabbrev-case-fold-search}. If it is @code{t}, case is ignored in 405@code{dabbrev-case-fold-search}. If it is @code{t}, case is ignored
413this search; if it is @code{nil}, the word and the expansion must match 406in this search; if it is @code{nil}, the word and the expansion must
414in case. If the value of @code{dabbrev-case-fold-search} is 407match in case. If the value is @code{case-fold-search} (the default),
415@code{case-fold-search}, which is true by default, then the variable 408then the variable @code{case-fold-search} controls whether to ignore
416@code{case-fold-search} controls whether to ignore case while searching 409case while searching for expansions (@pxref{Search Case}).
417for expansions.
418 410
419@vindex dabbrev-case-replace 411@vindex dabbrev-case-replace
420 Normally, dynamic abbrev expansion preserves the case pattern 412 Normally, dynamic abbrev expansion preserves the case pattern
@@ -425,10 +417,10 @@ expansion to that case pattern.
425 The variable @code{dabbrev-case-replace} controls whether to 417 The variable @code{dabbrev-case-replace} controls whether to
426preserve the case pattern of the dynamic abbrev. If it is @code{t}, 418preserve the case pattern of the dynamic abbrev. If it is @code{t},
427the dynamic abbrev's case pattern is preserved in most cases; if it is 419the dynamic abbrev's case pattern is preserved in most cases; if it is
428@code{nil}, the expansion is always copied verbatim. If the value of 420@code{nil}, the expansion is always copied verbatim. If the value is
429@code{dabbrev-case-replace} is @code{case-replace}, which is true by 421@code{case-replace} (the default), then the variable
430default, then the variable @code{case-replace} controls whether to 422@code{case-replace} controls whether to copy the expansion verbatim
431copy the expansion verbatim. 423(@pxref{Replacement and Case}).
432 424
433 However, if the expansion contains a complex mixed case pattern, and 425 However, if the expansion contains a complex mixed case pattern, and
434the dynamic abbrev matches this pattern as far as it goes, then the 426the dynamic abbrev matches this pattern as far as it goes, then the
diff --git a/doc/emacs/ack.texi b/doc/emacs/ack.texi
index d7022ba739b..ae6338ce5a6 100644
--- a/doc/emacs/ack.texi
+++ b/doc/emacs/ack.texi
@@ -1272,8 +1272,8 @@ Colin Walters wrote Ibuffer, an enhanced buffer menu.
1272Barry Warsaw wrote @file{assoc.el}, a set of utility functions for 1272Barry Warsaw wrote @file{assoc.el}, a set of utility functions for
1273working with association lists; @file{cc-mode.el}, a mode for editing 1273working with association lists; @file{cc-mode.el}, a mode for editing
1274C, C@t{++}, and Java code, based on earlier work by Dave Detlefs, 1274C, C@t{++}, and Java code, based on earlier work by Dave Detlefs,
1275Stewart Clamen, and Richard Stallman; @file{elp.el}, a profiler 1275Stewart Clamen, and Richard Stallman; @file{elp.el}, a profiler for
1276for Emacs Lisp programs; @file{man.el}, a mode for reading UNIX manual 1276Emacs Lisp programs; @file{man.el}, a mode for reading Unix manual
1277pages; @file{regi.el}, providing an AWK-like functionality for use in 1277pages; @file{regi.el}, providing an AWK-like functionality for use in
1278lisp programs; @file{reporter.el}, providing customizable bug 1278lisp programs; @file{reporter.el}, providing customizable bug
1279reporting for lisp packages; and @file{supercite.el}, a minor mode for 1279reporting for lisp packages; and @file{supercite.el}, a minor mode for
diff --git a/doc/emacs/building.texi b/doc/emacs/building.texi
index 9c5b2e7dcd7..963bd510f67 100644
--- a/doc/emacs/building.texi
+++ b/doc/emacs/building.texi
@@ -8,9 +8,9 @@
8@cindex program building 8@cindex program building
9@cindex running Lisp functions 9@cindex running Lisp functions
10 10
11 The previous chapter discusses the Emacs commands that are useful for 11 The previous chapter discusses the Emacs commands that are useful
12making changes in programs. This chapter deals with commands that assist 12for making changes in programs. This chapter deals with commands that
13in the larger process of compiling and testing programs. 13assist in the process of compiling and testing programs.
14 14
15@menu 15@menu
16* Compilation:: Compiling programs in languages other 16* Compilation:: Compiling programs in languages other
@@ -24,7 +24,7 @@ in the larger process of compiling and testing programs.
24* Executing Lisp:: Various modes for editing Lisp programs, 24* Executing Lisp:: Various modes for editing Lisp programs,
25 with different facilities for running 25 with different facilities for running
26 the Lisp programs. 26 the Lisp programs.
27* Libraries: Lisp Libraries. Creating Lisp programs to run in Emacs. 27* Libraries: Lisp Libraries. How Lisp programs are loaded into Emacs.
28* Eval: Lisp Eval. Executing a single Lisp expression in Emacs. 28* Eval: Lisp Eval. Executing a single Lisp expression in Emacs.
29* Interaction: Lisp Interaction. Executing Lisp in an Emacs buffer. 29* Interaction: Lisp Interaction. Executing Lisp in an Emacs buffer.
30* External Lisp:: Communicating through Emacs with a separate Lisp. 30* External Lisp:: Communicating through Emacs with a separate Lisp.
@@ -37,10 +37,9 @@ in the larger process of compiling and testing programs.
37@cindex compilation errors 37@cindex compilation errors
38@cindex error log 38@cindex error log
39 39
40 Emacs can run compilers for noninteractive languages such as C and 40 Emacs can run compilers for languages such as C and Fortran, feeding
41Fortran as inferior processes, feeding the error log into an Emacs buffer. 41the compilation log into an Emacs buffer. It can also parse the error
42It can also parse the error messages and show you the source lines where 42messages and show you where the errors occurred.
43compilation errors occurred.
44 43
45@table @kbd 44@table @kbd
46@item M-x compile 45@item M-x compile
@@ -54,65 +53,60 @@ Kill the running compilation subprocess.
54@end table 53@end table
55 54
56@findex compile 55@findex compile
57 To run @code{make} or another compilation command, do @kbd{M-x 56 To run @code{make} or another compilation command, type @kbd{M-x
58compile}. This command reads a shell command line using the minibuffer, 57compile}. This reads a shell command line using the minibuffer, and
59and then executes the command in an inferior shell, putting output in 58then executes the command by running a shell as a subprocess (or
60the buffer named @samp{*compilation*}. The current buffer's default 59@dfn{inferior process}) of Emacs. The output is inserted in a buffer
61directory is used as the working directory for the execution of the 60named @samp{*compilation*}. The current buffer's default directory is
62command; normally, therefore, the compilation happens in this 61used as the working directory for the execution of the command;
63directory. 62normally, therefore, compilation takes place in this directory.
64 63
65@vindex compile-command 64@vindex compile-command
66 The default for the compilation command is normally @samp{make -k}, 65 The default compilation command is @samp{make -k}, which is usually
67which is correct most of the time for nontrivial programs. 66correct for programs compiled using the @command{make} utility (the
68@xref{Top,, Make, make, GNU Make Manual}. If you have done @kbd{M-x 67@samp{-k} flag tells @command{make} to continue compiling as much as
69compile} before, the default each time is the command you used the 68possible after an error). @xref{Top,, Make, make, GNU Make Manual}.
70previous time. @code{compile} stores this command in the variable 69If you have done @kbd{M-x compile} before, the command that you
71@code{compile-command}, so setting that variable specifies the default 70specified is automatically stored in the variable
72for the next use of @kbd{M-x compile}. If a file specifies a file 71@code{compile-command}; this is used as the default the next time you
73local value for @code{compile-command}, that provides the default when 72type @kbd{M-x compile}. A file can also specify a file-local value
74you type @kbd{M-x compile} in that file's buffer. @xref{File 73for @code{compile-command} (@pxref{File Variables}).
75Variables}. 74
76 75 Starting a compilation displays the @samp{*compilation*} buffer in
77 Starting a compilation displays the buffer @samp{*compilation*} in 76another window but does not select it. While the compilation is
78another window but does not select it. The buffer's mode line tells 77running, the word @samp{run} is shown in the major mode indicator for
79you whether compilation is finished, with the word @samp{run}, 78the @samp{*compilation*} buffer, and the word @samp{Compiling} appears
80@samp{signal} or @samp{exit} inside the parentheses. You do not have 79in all mode lines. You do not have to keep the @samp{*compilation*}
81to keep this buffer visible; compilation continues in any case. While 80buffer visible while compilation is running; it continues in any case.
82a compilation is going on, the string @samp{Compiling} appears in the 81When the compilation ends, for whatever reason, the mode line of the
83mode lines of all windows. When this string disappears, the 82@samp{*compilation*} buffer changes to say @samp{exit} (followed by
84compilation is finished. 83the exit code: @samp{[0]} for a normal exit), or @samp{signal} (if a
85 84signal terminated the process).
86 If you want to watch the compilation transcript as it appears, switch 85
87to the @samp{*compilation*} buffer and move point to the end of the 86 If you want to watch the compilation transcript as it appears,
88buffer. When point is at the end, new compilation output is inserted 87switch to the @samp{*compilation*} buffer and move point to the end of
89above point, which remains at the end. If point is not at the end of 88the buffer. When point is at the end, new compilation output is
90the buffer, it remains fixed while more compilation output is added at 89inserted above point, which remains at the end. Otherwise, point
91the end of the buffer. 90remains fixed while compilation output is added at the end of the
91buffer.
92 92
93@cindex compilation buffer, keeping point at end 93@cindex compilation buffer, keeping point at end
94@vindex compilation-scroll-output 94@vindex compilation-scroll-output
95 If you change the variable @code{compilation-scroll-output} to a 95 If you change the variable @code{compilation-scroll-output} to a
96non-@code{nil} value, the compilation buffer will scroll automatically 96non-@code{nil} value, the @samp{*compilation*} buffer scrolls
97to follow the output as it comes in. If the value is 97automatically to follow the output. If the value is
98@code{first-error}, the scrolling stops at the first error that 98@code{first-error}, scrolling stops when the first error appears,
99appears, leaving point at that error. For any other non-@code{nil} 99leaving point at that error. For any other non-@code{nil} value,
100value, the buffer continues scrolling until there is no more output. 100scrolling continues until there is no more output.
101 101
102@findex recompile 102@findex recompile
103 To rerun the last compilation with the same command, type @kbd{M-x 103 To rerun the last compilation with the same command, type @kbd{M-x
104recompile}. This automatically reuses the compilation command from 104recompile}. This reuses the compilation command from the last
105the last invocation of @kbd{M-x compile}. It also reuses the 105invocation of @kbd{M-x compile}. It also reuses the
106@samp{*compilation*} buffer and starts the compilation in its default 106@samp{*compilation*} buffer and starts the compilation in its default
107directory, which is the directory in which the previous compilation 107directory, which is the directory in which the previous compilation
108was started. 108was started.
109 109
110 When the compiler process terminates, for whatever reason, the mode
111line of the @samp{*compilation*} buffer changes to say @samp{exit}
112(followed by the exit code, @samp{[0]} for a normal exit), or
113@samp{signal} (if a signal terminated the process), instead of
114@samp{run}.
115
116@findex kill-compilation 110@findex kill-compilation
117 Starting a new compilation also kills any compilation already 111 Starting a new compilation also kills any compilation already
118running in @samp{*compilation*}, as the buffer can only handle one 112running in @samp{*compilation*}, as the buffer can only handle one
@@ -126,27 +120,6 @@ the @samp{*compilation*} buffer (perhaps using @code{rename-uniquely};
126@pxref{Misc Buffer}), then switch buffers and start the other 120@pxref{Misc Buffer}), then switch buffers and start the other
127compilation. This will create a new @samp{*compilation*} buffer. 121compilation. This will create a new @samp{*compilation*} buffer.
128 122
129 Emacs does not expect a compiler process to launch asynchronous
130subprocesses; if it does, and they keep running after the main
131compiler process has terminated, Emacs may kill them or their output
132may not arrive in Emacs. To avoid this problem, make the main process
133wait for its subprocesses to finish. In a shell script, you can do this
134using @samp{$!} and @samp{wait}, like this:
135
136@example
137(sleep 10; echo 2nd)& pid=$! # @r{Record pid of subprocess}
138echo first message
139wait $pid # @r{Wait for subprocess}
140@end example
141
142 If the background process does not output to the compilation buffer,
143so you only need to prevent it from being killed when the main
144compilation process terminates, this is sufficient:
145
146@example
147nohup @var{command}; sleep 1
148@end example
149
150@vindex compilation-environment 123@vindex compilation-environment
151 You can control the environment passed to the compilation command 124 You can control the environment passed to the compilation command
152with the variable @code{compilation-environment}. Its value is a list 125with the variable @code{compilation-environment}. Its value is a list
@@ -159,153 +132,154 @@ variable settings override the usual ones.
159 132
160@cindex Compilation mode 133@cindex Compilation mode
161@cindex mode, Compilation 134@cindex mode, Compilation
162 The @samp{*compilation*} buffer uses a special major mode, 135@cindex locus
163Compilation mode, whose main feature is to provide a convenient way to 136 The @samp{*compilation*} buffer uses a major mode called Compilation
164visit the source line corresponding to an error message. These 137mode. Compilation mode turns each error message in the buffer into a
165commands are also available in other special buffers that list 138hyperlink; you can move point to it and type @key{RET}, or click on it
166locations in files, including those made by @kbd{M-x grep} and 139with the mouse (@pxref{Mouse References}), to visit the @dfn{locus} of
167@kbd{M-x occur}. 140the error message in a separate window. The locus is the specific
141position in a file where that error occurred.
142
143@findex compile-goto-error
144@vindex compilation-auto-jump-to-first-error
145 If you change the variable
146@code{compilation-auto-jump-to-first-error} to a non-@code{nil} value,
147Emacs automatically visits the locus of the first error message that
148appears in the @samp{*compilation*} buffer.
149
150 Compilation mode provides the following additional commands. These
151commands can also be used in @samp{*grep*} buffers, where the
152hyperlinks are search matches rather than error messages (@pxref{Grep
153Searching}).
168 154
169@table @kbd 155@table @kbd
170@item M-g M-n 156@item M-g M-n
171@itemx M-g n 157@itemx M-g n
172@itemx C-x ` 158@itemx C-x `
173Visit the locus of the next error message or match. 159Visit the locus of the next error message or match (@code{next-error}).
174@item M-g M-p 160@item M-g M-p
175@itemx M-g p 161@itemx M-g p
176Visit the locus of the previous error message or match. 162Visit the locus of the previous error message or match
177@item @key{RET} 163(@code{previous-error}).
178Visit the locus of the error message that point is on.
179This command is used in the compilation buffer.
180@item Mouse-2
181Visit the locus of the error message that you click on.
182@item M-n 164@item M-n
183Find and highlight the locus of the next error message, without 165Move point to the next error message or match, without visiting its
184selecting the source buffer. 166locus (@code{compilation-next-error}).
185@item M-p 167@item M-p
186Find and highlight the locus of the previous error message, without 168Move point to the previous error message or match, without visiting
187selecting the source buffer. 169its locus (@code{compilation-previous-error}).
188@item M-@} 170@item M-@}
189Move point to the next error for a different file than the current 171Move point to the next error message or match occurring in a different
190one. 172file (@code{compilation-next-file}).
191@item M-@{ 173@item M-@{
192Move point to the previous error for a different file than the current 174Move point to the previous error message or match occurring in a
193one. 175different file (@code{compilation-previous-file}).
194@item C-c C-f 176@item C-c C-f
195Toggle Next Error Follow minor mode, which makes cursor motion in the 177Toggle Next Error Follow minor mode, which makes cursor motion in the
196compilation buffer produce automatic source display. 178compilation buffer produce automatic source display.
197@end table 179@end table
198 180
199@findex compile-goto-error
200@vindex compilation-auto-jump-to-first-error
201 You can visit the source for any particular error message by moving
202point in the @samp{*compilation*} buffer to that error message and
203typing @key{RET} (@code{compile-goto-error}). Alternatively, you can
204click @kbd{Mouse-2} on the error message; you need not switch to the
205@samp{*compilation*} buffer first. If you set the variable
206@code{compilation-auto-jump-to-first-error} to a non-@code{nil} value,
207Emacs automatically jumps to the first error, if any, as soon as it
208appears in the @samp{*compilation*} buffer.
209
210@kindex M-g M-n 181@kindex M-g M-n
211@kindex M-g n 182@kindex M-g n
212@kindex C-x ` 183@kindex C-x `
213@findex next-error 184@findex next-error
214@vindex next-error-highlight 185@vindex next-error-highlight
215 To parse the compiler error messages sequentially, type @kbd{C-x `} 186 To visit errors sequentially, type @w{@kbd{C-x `}}
216(@code{next-error}). The character following the @kbd{C-x} is the 187(@code{next-error}), or equivalently @kbd{M-g M-n} or @kbd{M-g n}.
217backquote or ``grave accent,'' not the single-quote. This command is 188This command can be invoked from any buffer, not just a Compilation
218available in all buffers, not just in @samp{*compilation*}; it 189mode buffer. The first time you invoke it after a compilation, it
219displays the next error message at the top of one window and source 190visits the locus of the first error message. Each subsequent
220location of the error in another window. It also temporarily 191@w{@kbd{C-x `}} visits the next error, in a similar fashion. If you
221highlights the relevant source line, for a period controlled by the 192visit a specific error with @key{RET} or a mouse click in the
222variable @code{next-error-highlight}. 193@samp{*compilation*} buffer, subsequent @w{@kbd{C-x `}} commands
223 194advance from there. When @w{@kbd{C-x `}} finds no more error messages
224 The first time @w{@kbd{C-x `}} is used after the start of a compilation, 195to visit, it signals an error. @w{@kbd{C-u C-x `}} starts again from
225it moves to the first error's location. Subsequent uses of @kbd{C-x 196the beginning of the compilation buffer, and visits the first locus.
226`} advance down to subsequent errors. If you visit a specific error 197
227message with @key{RET} or @kbd{Mouse-2}, subsequent @w{@kbd{C-x `}} 198 @kbd{M-g M-p} or @kbd{M-g p} (@code{previous-error}) iterates
228commands advance from there. When @w{@kbd{C-x `}} gets to the end of the 199through errors in the opposite direction.
229buffer and finds no more error messages to visit, it fails and signals 200
230an Emacs error. @w{@kbd{C-u C-x `}} starts scanning from the beginning of 201 The @code{next-error} and @code{previous-error} commands don't just
231the compilation buffer, and goes to the first error's location. 202act on the errors or matches listed in @samp{*compilation*} and
203@samp{*grep*} buffers; they also know how to iterate through error or
204match lists produced by other commands, such as @kbd{M-x occur}
205(@pxref{Other Repeating Search}). If you are already in a buffer
206containing error messages or matches, those are the ones that are
207iterated through; otherwise, Emacs looks for a buffer containing error
208messages or matches amongst the windows of the selected frame, then
209for one that @code{next-error} or @code{previous-error} previously
210iterated through, and finally amongst all other buffers. If the
211buffer chosen for iterating through is not currently displayed in a
212window, it will be displayed.
232 213
233@vindex compilation-skip-threshold 214@vindex compilation-skip-threshold
234 By default, @w{@kbd{C-x `}} skips less important messages. The variable 215 By default, the @code{next-error} and @code{previous-error} commands
235@code{compilation-skip-threshold} controls this. If its value is 2, 216skip less important messages. The variable
236@w{@kbd{C-x `}} skips anything less than error, 1 skips anything less 217@code{compilation-skip-threshold} controls this. The default value,
237than warning, and 0 doesn't skip any messages. The default is 1. 2181, means to skip anything less important than a warning. A value of 2
238 219means to skip anything less important than an error, while 0 means not
239 When the window has a left fringe, an arrow in the fringe points to 220to skip any messages.
240the current message in the compilation buffer. The variable 221
241@code{compilation-context-lines} controls the number of lines of 222 When Emacs visits the locus of an error message, it momentarily
242leading context to display before the current message. Going to an 223highlights the relevant source line. The duration of this highlight
243error message location scrolls the @samp{*compilation*} buffer to put 224is determined by the variable @code{next-error-highlight}.
244the message that far down from the top. The value @code{nil} is 225
245special: if there's a left fringe, the window doesn't scroll at all 226@vindex compilation-context-lines
246if the message is already visible. If there is no left fringe, 227 If the @samp{*compilation*} buffer is shown in a window with a left
247@code{nil} means display the message at the top of the window. 228fringe (@pxref{Fringes}), the locus-visiting commands put an arrow in
248 229the fringe, pointing to the current error message. If the window has
249 If you're not in the compilation buffer when you run 230no left fringe, such as on a text-only terminal, these commands scroll
250@code{next-error}, Emacs will look for a buffer that contains error 231the window so that the current message is at the top of the window.
251messages. First, it looks for one displayed in the selected frame, 232If you change the variable @code{compilation-context-lines} to an
252then for one that previously had @code{next-error} called on it, and 233integer value @var{n}, these commands scroll the window so that the
253then at the current buffer. Finally, Emacs looks at all the remaining 234current error message is @var{n} lines from the top, whether or not
254buffers. @code{next-error} signals an error if it can't find any such 235there is a fringe; the default value, @code{nil}, gives the behavior
255buffer. 236described above.
256 237
257@vindex compilation-error-regexp-alist 238@vindex compilation-error-regexp-alist
258@vindex grep-regexp-alist 239@vindex grep-regexp-alist
259 To parse messages from the compiler, Compilation mode uses the 240 To parse messages from the compiler, Compilation mode uses the
260variable @code{compilation-error-regexp-alist} which lists various 241variable @code{compilation-error-regexp-alist} which lists various
261formats of error messages and tells Emacs how to extract the source file 242error message formats and tells Emacs how to extract the locus from
262and the line number from the text of a message. If your compiler isn't 243each. A similar variable, @code{grep-regexp-alist}, tells Emacs how
263supported, you can tailor Compilation mode to it by adding elements to 244to parse output from a @code{grep} command (@pxref{Grep Searching}).
264that list. A similar variable @code{grep-regexp-alist} tells Emacs how
265to parse output of a @code{grep} command.
266 245
267@findex compilation-next-error 246@findex compilation-next-error
268@findex compilation-previous-error 247@findex compilation-previous-error
269@findex compilation-next-file 248@findex compilation-next-file
270@findex compilation-previous-file 249@findex compilation-previous-file
271 Compilation mode also redefines the keys @key{SPC} and @key{DEL} to 250 Compilation mode also defines the keys @key{SPC} and @key{DEL} to
272scroll by screenfuls, and @kbd{M-n} (@code{compilation-next-error}) 251scroll by screenfuls; @kbd{M-n} (@code{compilation-next-error}) and
273and @kbd{M-p} (@code{compilation-previous-error}) to move to the next 252@kbd{M-p} (@code{compilation-previous-error}) to move to the next or
274or previous error message. You can also use @kbd{M-@{} 253previous error message; and @kbd{M-@{} (@code{compilation-next-file})
275(@code{compilation-next-file} and @kbd{M-@}} 254and @kbd{M-@}} (@code{compilation-previous-file}) to move to the next
276(@code{compilation-previous-file}) to move up or down to an error 255or previous error message for a different source file.
277message for a different source file.
278 256
279@cindex Next Error Follow mode 257@cindex Next Error Follow mode
280@findex next-error-follow-minor-mode 258@findex next-error-follow-minor-mode
281 You can type @kbd{C-c C-f} to toggle Next Error Follow mode. In 259 You can type @kbd{C-c C-f} to toggle Next Error Follow mode. In
282this minor mode, ordinary cursor motion in the compilation buffer 260this minor mode, ordinary cursor motion in the compilation buffer
283automatically updates the source buffer. For instance, moving the 261automatically updates the source buffer, i.e.@: moving the cursor over
284cursor to the next error message causes the location of that error to 262an error message causes the locus of that error to be displayed.
285be displayed immediately.
286 263
287 The features of Compilation mode are also available in a minor mode 264 The features of Compilation mode are also available in a minor mode
288called Compilation Minor mode. This lets you parse error messages in 265called Compilation Minor mode. This lets you parse error messages in
289any buffer, not just a normal compilation output buffer. Type @kbd{M-x 266any buffer, not just a normal compilation output buffer. Type
290compilation-minor-mode} to enable the minor mode. This defines the keys 267@kbd{M-x compilation-minor-mode} to enable the minor mode. For
291@key{RET} and @kbd{Mouse-2}, as in the Compilation major mode. 268instance, in an Rlogin buffer (@pxref{Remote Host}), Compilation minor
292 269mode automatically accesses remote source files by FTP (@pxref{File
293 Compilation minor mode works in any buffer, as long as the contents 270Names}).
294are in a format that it understands. In an Rlogin buffer (@pxref{Remote
295Host}), Compilation minor mode automatically accesses remote source
296files by FTP (@pxref{File Names}).
297 271
298@node Compilation Shell 272@node Compilation Shell
299@section Subshells for Compilation 273@section Subshells for Compilation
300 274
301 Emacs uses a shell to run the compilation command, but specifies the 275 The @kbd{M-x compile} command uses a shell to run the compilation
302option for a noninteractive shell. This means, in particular, that 276command, but specifies the option for a noninteractive shell. This
303the shell should start with no prompt. If you find your usual shell 277means, in particular, that the shell should start with no prompt. If
304prompt making an unsightly appearance in the @samp{*compilation*} 278you find your usual shell prompt making an unsightly appearance in the
305buffer, it means you have made a mistake in your shell's init file by 279@samp{*compilation*} buffer, it means you have made a mistake in your
306setting the prompt unconditionally. (This init file's name may be 280shell's init file by setting the prompt unconditionally. (This init
307@file{.bashrc}, @file{.profile}, @file{.cshrc}, @file{.shrc}, or 281file may be named @file{.bashrc}, @file{.profile}, @file{.cshrc},
308various other things, depending on the shell you use.) The shell init 282@file{.shrc}, etc., depending on what shell you use.) The shell init
309file should set the prompt only if there already is a prompt. Here's 283file should set the prompt only if there already is a prompt. Here's
310how to do it in bash: 284how to do it in bash:
311 285
@@ -322,67 +296,80 @@ And here's how to do it in csh:
322if ($?prompt) set prompt = @dots{} 296if ($?prompt) set prompt = @dots{}
323@end example 297@end example
324 298
325 There may well be other things that your shell's init file 299 Emacs does not expect a compiler process to launch asynchronous
326ought to do only for an interactive shell. You can use the same 300subprocesses; if it does, and they keep running after the main
327method to conditionalize them. 301compiler process has terminated, Emacs may kill them or their output
302may not arrive in Emacs. To avoid this problem, make the main
303compilation process wait for its subprocesses to finish. In a shell
304script, you can do this using @samp{$!} and @samp{wait}, like this:
305
306@example
307(sleep 10; echo 2nd)& pid=$! # @r{Record pid of subprocess}
308echo first message
309wait $pid # @r{Wait for subprocess}
310@end example
311
312@noindent
313If the background process does not output to the compilation buffer,
314so you only need to prevent it from being killed when the main
315compilation process terminates, this is sufficient:
316
317@example
318nohup @var{command}; sleep 1
319@end example
328 320
329 The MS-DOS ``operating system'' does not support asynchronous
330subprocesses; to work around this lack, @kbd{M-x compile} runs the
331compilation command synchronously on MS-DOS. As a consequence, you must
332wait until the command finishes before you can do anything else in
333Emacs.
334@iftex
335@inforef{MS-DOS,,emacs-xtra}.
336@end iftex
337@ifnottex 321@ifnottex
338@xref{MS-DOS}. 322 On the MS-DOS ``operating system'', asynchronous subprocesses are
323not supported, so @kbd{M-x compile} runs the compilation command
324synchronously (i.e.@: you must wait until the command finishes before
325you can do anything else in Emacs). @xref{MS-DOS}.
339@end ifnottex 326@end ifnottex
340 327
341@node Grep Searching 328@node Grep Searching
342@section Searching with Grep under Emacs 329@section Searching with Grep under Emacs
343 330
344 Just as you can run a compiler from Emacs and then visit the lines 331 Just as you can run a compiler from Emacs and then visit the lines
345with compilation errors, you can also run @code{grep} and then visit 332with compilation errors, you can also run @command{grep} and then
346the lines on which matches were found. This works by treating the 333visit the lines on which matches were found. This works by treating
347matches reported by @code{grep} as if they were ``errors.'' The 334the matches reported by @command{grep} as if they were ``errors.''
348buffer of matches uses Grep mode, which is a variant of Compilation 335The output buffer uses Grep mode, which is a variant of Compilation
349mode (@pxref{Compilation Mode}). 336mode (@pxref{Compilation Mode}).
350 337
351@table @kbd 338@table @kbd
352@item M-x grep 339@item M-x grep
353@itemx M-x lgrep 340@itemx M-x lgrep
354Run @code{grep} asynchronously under Emacs, with matching lines 341Run @command{grep} asynchronously under Emacs, listing matching lines in
355listed in the buffer named @samp{*grep*}. 342the buffer named @samp{*grep*}.
356@item M-x grep-find 343@item M-x grep-find
357@itemx M-x find-grep 344@itemx M-x find-grep
358@itemx M-x rgrep 345@itemx M-x rgrep
359Run @code{grep} via @code{find}, and collect output in the buffer 346Run @command{grep} via @code{find}, and collect output in the
360named @samp{*grep*}. 347@samp{*grep*} buffer.
361@item M-x zrgrep 348@item M-x zrgrep
362Run @code{zgrep} and collect output in the buffer named @samp{*grep*}. 349Run @code{zgrep} and collect output in the @samp{*grep*} buffer.
363@item M-x kill-grep 350@item M-x kill-grep
364Kill the running @code{grep} subprocess. 351Kill the running @command{grep} subprocess.
365@end table 352@end table
366 353
367@findex grep 354@findex grep
368 To run @code{grep}, type @kbd{M-x grep}, then enter a command line 355 To run @command{grep}, type @kbd{M-x grep}, then enter a command line
369that specifies how to run @code{grep}. Use the same arguments you 356that specifies how to run @command{grep}. Use the same arguments you
370would give @code{grep} when running it normally: a @code{grep}-style 357would give @command{grep} when running it normally: a @command{grep}-style
371regexp (usually in single-quotes to quote the shell's special 358regexp (usually in single-quotes to quote the shell's special
372characters) followed by file names, which may use wildcards. If you 359characters) followed by file names, which may use wildcards. If you
373specify a prefix argument for @kbd{M-x grep}, it finds the tag 360specify a prefix argument for @kbd{M-x grep}, it finds the tag
374(@pxref{Tags}) in the buffer around point, and puts that into the 361(@pxref{Tags}) in the buffer around point, and puts that into the
375default @code{grep} command. 362default @command{grep} command.
376 363
377 Your command need not simply run @code{grep}; you can use any shell 364 Your command need not simply run @command{grep}; you can use any shell
378command that produces output in the same format. For instance, you 365command that produces output in the same format. For instance, you
379can chain @code{grep} commands, like this: 366can chain @command{grep} commands, like this:
380 367
381@example 368@example
382grep -nH -e foo *.el | grep bar | grep toto 369grep -nH -e foo *.el | grep bar | grep toto
383@end example 370@end example
384 371
385 The output from @code{grep} goes in the @samp{*grep*} buffer. You 372 The output from @command{grep} goes in the @samp{*grep*} buffer. You
386can find the corresponding lines in the original files using @w{@kbd{C-x 373can find the corresponding lines in the original files using @w{@kbd{C-x
387`}}, @key{RET}, and so forth, just like compilation errors. 374`}}, @key{RET}, and so forth, just like compilation errors.
388 375
@@ -397,30 +384,31 @@ match will be highlighted, instead of the entire source line.
397 The command @kbd{M-x grep-find} (also available as @kbd{M-x 384 The command @kbd{M-x grep-find} (also available as @kbd{M-x
398find-grep}) is similar to @kbd{M-x grep}, but it supplies a different 385find-grep}) is similar to @kbd{M-x grep}, but it supplies a different
399initial default for the command---one that runs both @code{find} and 386initial default for the command---one that runs both @code{find} and
400@code{grep}, so as to search every file in a directory tree. See also 387@command{grep}, so as to search every file in a directory tree. See also
401the @code{find-grep-dired} command, in @ref{Dired and Find}. 388the @code{find-grep-dired} command, in @ref{Dired and Find}.
402 389
403@findex lgrep 390@findex lgrep
404@findex rgrep 391@findex rgrep
405@findex zrgrep 392@findex zrgrep
406 The commands @kbd{M-x lgrep} (local grep) and @kbd{M-x rgrep} 393 The commands @kbd{M-x lgrep} (local grep) and @kbd{M-x rgrep}
407(recursive grep) are more user-friendly versions of @code{grep} and 394(recursive grep) are more user-friendly versions of @command{grep} and
408@code{grep-find}, which prompt separately for the regular expression 395@code{grep-find}, which prompt separately for the regular expression
409to match, the files to search, and the base directory for the search. 396to match, the files to search, and the base directory for the search.
410Case sensitivity of the search is controlled by the current value of 397Case sensitivity of the search is controlled by the current value of
411@code{case-fold-search}. The command @kbd{M-x zrgrep} is similar to 398@code{case-fold-search}. The command @kbd{M-x zrgrep} is similar to
412@code{rgrep}, but it calls @code{zgrep} instead of @code{grep} to 399@kbd{M-x rgrep}, but it calls @command{zgrep} instead of
413search the contents of gzipped files. 400@command{grep} to search the contents of gzipped files.
414 401
415 These commands build the shell commands based on the variables 402 These commands build the shell commands based on the variables
416@code{grep-template} (for @code{lgrep}) and @code{grep-find-template} 403@code{grep-template} (for @code{lgrep}) and @code{grep-find-template}
417(for @code{rgrep}). The files to search can use aliases defined in 404(for @code{rgrep}). The files to search can use aliases defined in
418the variable @code{grep-files-aliases}. 405the variable @code{grep-files-aliases}.
419 406
420 Subdirectories listed in the variable 407@vindex grep-find-ignored-directories
421@code{grep-find-ignored-directories} such as those typically used by 408 Directories listed in the variable
422various version control systems, like CVS and arch, are automatically 409@code{grep-find-ignored-directories} are automatically skipped by
423skipped by @code{rgrep}. 410@kbd{M-x rgrep}. The default value includes the data directories used
411by various version control systems.
424 412
425@node Flymake 413@node Flymake
426@section Finding Syntax Errors On The Fly 414@section Finding Syntax Errors On The Fly
@@ -444,8 +432,13 @@ flymake-goto-next-error} and @kbd{M-x flymake-goto-prev-error}. To
444display any error messages associated with the current line, use 432display any error messages associated with the current line, use
445@kbd{M-x flymake-display-err-menu-for-current-line}. 433@kbd{M-x flymake-display-err-menu-for-current-line}.
446 434
447 For more details about using Flymake, see @ref{Top, Flymake, 435 For more details about using Flymake,
448Flymake, flymake, The Flymake Manual}. 436@ifnottex
437see @ref{Top, Flymake, Flymake, flymake, The Flymake Manual}.
438@end ifnottex
439@iftex
440see the Flymake Info manual, which is distributed with Emacs.
441@end iftex
449 442
450@node Debuggers 443@node Debuggers
451@section Running Debuggers Under Emacs 444@section Running Debuggers Under Emacs
@@ -459,16 +452,18 @@ Flymake, flymake, The Flymake Manual}.
459@cindex JDB 452@cindex JDB
460@cindex PDB 453@cindex PDB
461 454
462@c Do you believe in GUD?
463The GUD (Grand Unified Debugger) library provides an Emacs interface 455The GUD (Grand Unified Debugger) library provides an Emacs interface
464to a wide variety of symbolic debuggers. Unlike the GDB graphical 456to a wide variety of symbolic debuggers. It can run the GNU Debugger
465interface, which only runs GDB (@pxref{GDB Graphical Interface}), GUD 457(GDB), as well as DBX, SDB, XDB, Perl's debugging mode, the Python
466can also run DBX, SDB, XDB, Perl's debugging mode, the Python debugger 458debugger PDB, and the Java Debugger JDB.
467PDB, or the Java Debugger JDB.
468 459
469 In addition, Emacs contains a built-in system for debugging Emacs 460 Emacs provides a special interface to GDB, which uses extra Emacs
470Lisp programs. @xref{Debugging,, The Lisp Debugger, elisp, the Emacs 461windows to display the state of the debugged program. @xref{GDB
471Lisp Reference Manual}, for information on the Emacs Lisp debugger. 462Graphical Interface}.
463
464 Emacs also has a built-in debugger for Emacs Lisp programs.
465@xref{Debugging,, The Lisp Debugger, elisp, the Emacs Lisp Reference
466Manual}.
472 467
473@menu 468@menu
474* Starting GUD:: How to start a debugger subprocess. 469* Starting GUD:: How to start a debugger subprocess.
@@ -483,146 +478,136 @@ Lisp Reference Manual}, for information on the Emacs Lisp debugger.
483@node Starting GUD 478@node Starting GUD
484@subsection Starting GUD 479@subsection Starting GUD
485 480
486 There are several commands for starting a debugger under GUD, each 481 There are several commands for starting a debugger subprocess, each
487corresponding to a particular debugger program. 482corresponding to a particular debugger program.
488 483
489@table @kbd 484@table @kbd
490@item M-x gdb @key{RET} @var{file} @key{RET} 485@item M-x gdb
491@findex gdb 486@findex gdb
492Run GDB as a subprocess of Emacs. This uses an IDE-like graphical 487Run GDB as a subprocess, and interact with it via an IDE-like Emacs
493interface; see @ref{GDB Graphical Interface}. Only GDB works with the 488interface. @xref{GDB Graphical Interface}, for more information about
494graphical interface. 489this command.
495 490
496@item M-x gud-gdb @key{RET} @var{file} @key{RET} 491@item M-x gud-gdb
497@findex gud-gdb 492@findex gud-gdb
498Run GDB as a subprocess of Emacs. This command creates a buffer for 493Run GDB, using a GUD interaction buffer for input and output to the
499input and output to GDB, and switches to it. If a GDB buffer already 494GDB subprocess (@pxref{Debugger Operation}). If such a buffer already
500exists, it just switches to that buffer. 495exists, switch to it; otherwise, create the buffer and switch to it.
501
502@item M-x dbx @key{RET} @var{file} @key{RET}
503@findex dbx
504Run DBX as a subprocess of Emacs. Since Emacs does not implement a
505graphical interface for DBX, communication with DBX works by typing
506commands in the GUD interaction buffer. The same is true for all
507the other supported debuggers.
508 496
509@item M-x xdb @key{RET} @var{file} @key{RET} 497The other commands in this list do the same, for other debugger
510@findex xdb 498programs.
511@vindex gud-xdb-directories
512Run XDB as a subprocess of Emacs. Use the variable
513@code{gud-xdb-directories} to specify directories to search for source
514files.
515
516@item M-x sdb @key{RET} @var{file} @key{RET}
517@findex sdb
518Run SDB as a subprocess of Emacs.
519 499
520Some versions of SDB do not mention source file names in their 500@item M-x perldb
521messages. When you use them, you need to have a valid tags table
522(@pxref{Tags}) in order for GUD to find functions in the source code.
523If you have not visited a tags table or the tags table doesn't list
524one of the functions, you get a message saying @samp{The sdb support
525requires a valid tags table to work}. If this happens, generate a
526valid tags table in the working directory and try again.
527
528@item M-x perldb @key{RET} @var{file} @key{RET}
529@findex perldb 501@findex perldb
530Run the Perl interpreter in debug mode to debug @var{file}, a Perl program. 502Run the Perl interpreter in debug mode.
531 503
532@item M-x jdb @key{RET} @var{file} @key{RET} 504@item M-x jdb
533@findex jdb 505@findex jdb
534Run the Java debugger to debug @var{file}. 506Run the Java debugger.
535 507
536@item M-x pdb @key{RET} @var{file} @key{RET} 508@item M-x pdb
537@findex pdb 509@findex pdb
538Run the Python debugger to debug @var{file}. 510Run the Python debugger.
511
512@item M-x dbx
513@findex dbx
514Run the DBX debugger.
515
516@item M-x xdb
517@findex xdb
518@vindex gud-xdb-directories
519Run the XDB debugger.
520
521@item M-x sdb
522@findex sdb
523Run the SDB debugger.
539@end table 524@end table
540 525
541 Each of these commands takes one argument: a command line to invoke 526 Each of these commands reads a command line to invoke the debugger,
542the debugger. In the simplest case, specify just the name of the 527using the minibuffer. The minibuffer's initial contents contain the
543executable file you want to debug. You may also use options that the 528standard executable name and options for the debugger, and sometimes
544debugger supports. However, shell wildcards and variables are not 529also a guess for the name of the executable file you want to debug.
545allowed. GUD assumes that the first argument not starting with a 530Shell wildcards and variables are not allowed in this command line.
546@samp{-} is the executable file name. 531Emacs assumes that the first command argument which does not start
532with a @samp{-} is the executable file name.
547 533
548@cindex remote host, debugging on 534@cindex remote host, debugging on
549Tramp provides a facility to debug programs on remote hosts 535 Tramp provides a facility for remote debugging, whereby both the
550(@pxref{Running a debugger on a remote host, Running a debugger on a 536debugger and the program being debugged are on the same remote host.
551remote host,, tramp, The Tramp Manual}), whereby both the debugger and 537@xref{Running a debugger on a remote host,,, tramp, The Tramp Manual},
552the program being debugged are on the same remote host. This should 538for details. This is separate from GDB's remote debugging feature,
553not be confused with debugging programs remotely, where the program 539where the program and the debugger run on different machines
554and the debugger run on different machines, as can be done using the 540(@pxref{Remote Debugging,, Debugging Remote Programs, gdb, The GNU
555GDB remote debugging feature, for example (@pxref{Remote Debugging,, 541debugger}).
556Debugging Remote Programs, gdb, The GNU debugger}).
557 542
558@node Debugger Operation 543@node Debugger Operation
559@subsection Debugger Operation 544@subsection Debugger Operation
545@cindex GUD interaction buffer
546
547 The @dfn{GUD interaction buffer} is an Emacs buffer which is used to
548send text commands to a debugger subprocess, and record its output.
549This is the basic interface for interacting with a debugger, used by
550@kbd{M-x gud-gdb} and other commands listed in
551@iftex
552the preceding section.
553@end iftex
554@ifnottex
555@ref{Starting GUD}.
556@end ifnottex
557The @kbd{M-x gdb} command extends this interface with additional
558specialized buffers for controlling breakpoints, stack frames, and
559other aspects of the debugger state (@pxref{GDB Graphical Interface}).
560 560
561@cindex fringes, and current execution line in GUD 561 The GUD interaction buffer uses a variant of Shell mode, so the
562 Generally when you run a debugger with GUD, the debugger uses an Emacs 562Emacs commands defined by Shell mode are available (@pxref{Shell
563buffer for its ordinary input and output. This is called the GUD 563Mode}). Completion is available for most debugger commands
564buffer. Input and output from the program you are debugging also use 564(@pxref{Completion}), and you can use the usual Shell mode history
565this buffer. We call this @dfn{text command mode}. The GDB Graphical 565commands to repeat them.
566Interface can use further buffers (@pxref{GDB Graphical Interface}). 566@iftex
567 567See the next section
568 The debugger displays the source files of the program by visiting 568@end iftex
569them in Emacs buffers. An arrow in the left fringe indicates the 569@ifnottex
570current execution line.@footnote{On a text-only terminal, the arrow 570@xref{Commands of GUD},
571appears as @samp{=>} and overlays the first two text columns.} Moving 571@end ifnottex
572point in this buffer does not move the arrow. The arrow is not part 572for special commands that can be used in the GUD interaction buffer.
573of the file's text; it appears only on the screen. 573
574 574 As you debug a program, Emacs displays the relevant source files by
575 You can start editing these source files at any time in the buffers 575visiting them in Emacs buffers, with an arrow in the left fringe
576that display them. If you do modify a source file, keep in mind that 576indicating the current execution line. (On a text-only terminal, the
577inserting or deleting lines will throw off the arrow's positioning; 577arrow appears as @samp{=>}, overlaid on the first two text columns.)
578GUD has no way of figuring out which line corresponded before your 578Moving point in such a buffer does not move the arrow. You are free
579changes to the line number in a debugger message. Also, you'll 579to edit these source files, but note that inserting or deleting lines
580typically have to recompile and restart the program for your changes 580will throw off the arrow's positioning, as Emacs has no way to figure
581to be reflected in the debugger's tables. 581out which edited source line corresponds to the line reported by the
582 582debugger subprocess. To update this information, you typically have
583@cindex tooltips with GUD 583to recompile and restart the program.
584@vindex tooltip-gud-modes 584
585@vindex gud-tooltip-mode 585@cindex GUD Tooltip mode
586@cindex mode, GUD Tooltip
587@findex gud-tooltip-mode
586@vindex gud-tooltip-echo-area 588@vindex gud-tooltip-echo-area
587 The Tooltip facility (@pxref{Tooltips}) provides support for GUD@. 589 GUD Tooltip mode is a global minor mode that adds tooltip support to
588You activate this feature by turning on the minor mode 590GUD. To toggle this mode, type @kbd{M-x gud-tooltip-mode}. It is
589@code{gud-tooltip-mode}. Then you can display a variable's value in a 591disabled by default. If enabled, you can move the mouse cursor over a
590tooltip simply by pointing at it with the mouse. This operates in the 592variable to show its value in a tooltip (@pxref{Tooltips}); this takes
591GUD buffer and in source buffers with major modes in the list 593effect in the GUD interaction buffer, and in all source buffers with
592@code{gud-tooltip-modes}. If the variable @code{gud-tooltip-echo-area} 594major modes listed in the variable @code{gud-tooltip-modes}. If the
593is non-@code{nil} then the variable's value is displayed in the echo 595variable @code{gud-tooltip-echo-area} is non-@code{nil}, values are
594area. When debugging a C program using the GDB Graphical Interface, you 596shown in the echo area instead of a tooltip.
595can also display macro definitions associated with an identifier when 597
596the program is not executing. 598 When using GUD Tooltip mode with @kbd{M-x gud-gdb}, you should note
597 599that displaying an expression's value in GDB can sometimes expand a
598 GUD tooltips are disabled when you use GDB in text command mode 600macro, potentially causing side effects in the debugged program. If
599(@pxref{GDB Graphical Interface}), because displaying an expression's 601you use the @kbd{M-x gdb} interface, this problem does not occur, as
600value in GDB can sometimes expand a macro and result in a side effect 602there is special code to avoid side-effects; furthermore, you can
601that interferes with the program's operation. The GDB graphical 603display macro definitions associated with an identifier when the
602interface supports GUD tooltips and assures they will not cause side 604program is not executing.
603effects.
604 605
605@node Commands of GUD 606@node Commands of GUD
606@subsection Commands of GUD 607@subsection Commands of GUD
607 608
608 The GUD interaction buffer uses a variant of Shell mode, so the 609 GUD provides commands for setting and clearing breakpoints,
609Emacs commands of Shell mode are available (@pxref{Shell Mode}). All 610selecting stack frames, and stepping through the program.
610the usual commands for your debugger are available, and you can use
611the Shell mode history commands to repeat them. If you wish, you can
612control your debugger process entirely through this buffer.
613
614 GUD mode also provides commands for setting and clearing
615breakpoints, for selecting stack frames, and for stepping through the
616program. These commands are available both in the GUD buffer and
617globally, but with different key bindings. It also has its own tool
618bar from which you can invoke the more common commands by clicking on
619the appropriate icon. This is particularly useful for repetitive
620commands like @code{gud-next} and @code{gud-step}, and allows you to
621keep the GUD buffer hidden.
622
623 The breakpoint commands are normally used in source file buffers,
624because that is the easiest way to specify where to set or clear the
625breakpoint. Here's the global command to set a breakpoint:
626 611
627@table @kbd 612@table @kbd
628@item C-x @key{SPC} 613@item C-x @key{SPC}
@@ -630,35 +615,42 @@ breakpoint. Here's the global command to set a breakpoint:
630Set a breakpoint on the source line that point is on. 615Set a breakpoint on the source line that point is on.
631@end table 616@end table
632 617
618 @kbd{C-x @key{SPC}} (@code{gud-break}), when called in a source
619buffer, sets a debugger breakpoint on the current source line. This
620command is available only after starting GUD. If you call it in a
621buffer that is not associated with any debugger subprocess, it signals
622a error.
623
633@kindex C-x C-a @r{(GUD)} 624@kindex C-x C-a @r{(GUD)}
634 Here are the other special commands provided by GUD@. The keys 625 The following commands are available both in the GUD interaction
626buffer and globally, but with different key bindings. The keys
635starting with @kbd{C-c} are available only in the GUD interaction 627starting with @kbd{C-c} are available only in the GUD interaction
636buffer. The key bindings that start with @kbd{C-x C-a} are available 628buffer, while those starting with @kbd{C-x C-a} are available
637in the GUD interaction buffer and also in source files. Some of these 629globally. Some of these commands are also available via the tool bar;
638commands are not available to all the supported debuggers. 630some are not supported by certain debuggers.
639 631
640@table @kbd 632@table @kbd
641@item C-c C-l 633@item C-c C-l
642@kindex C-c C-l @r{(GUD)} 634@kindex C-c C-l @r{(GUD)}
643@itemx C-x C-a C-l 635@itemx C-x C-a C-l
644@findex gud-refresh 636@findex gud-refresh
645Display in another window the last line referred to in the GUD 637Display, in another window, the last source line referred to in the
646buffer (that is, the line indicated in the last location message). 638GUD interaction buffer (@code{gud-refresh}).
647This runs the command @code{gud-refresh}.
648 639
649@item C-c C-s 640@item C-c C-s
650@kindex C-c C-s @r{(GUD)} 641@kindex C-c C-s @r{(GUD)}
651@itemx C-x C-a C-s 642@itemx C-x C-a C-s
652@findex gud-step 643@findex gud-step
653Execute a single line of code (@code{gud-step}). If the line contains 644Execute the next single line of code (@code{gud-step}). If the line
654a function call, execution stops after entering the called function. 645contains a function call, execution stops after entering the called
646function.
655 647
656@item C-c C-n 648@item C-c C-n
657@kindex C-c C-n @r{(GUD)} 649@kindex C-c C-n @r{(GUD)}
658@itemx C-x C-a C-n 650@itemx C-x C-a C-n
659@findex gud-next 651@findex gud-next
660Execute a single line of code, stepping across entire function calls 652Execute the next single line of code, stepping across function calls
661at full speed (@code{gud-next}). 653without stopping inside the functions (@code{gud-next}).
662 654
663@item C-c C-i 655@item C-c C-i
664@kindex C-c C-i @r{(GUD)} 656@kindex C-c C-i @r{(GUD)}
@@ -769,17 +761,17 @@ Instead, type @kbd{C-q @key{TAB}} to enter a tab.
769@vindex perldb-mode-hook 761@vindex perldb-mode-hook
770@vindex pdb-mode-hook 762@vindex pdb-mode-hook
771@vindex jdb-mode-hook 763@vindex jdb-mode-hook
772 On startup, GUD runs one of the following hooks: @code{gdb-mode-hook}, 764 On startup, GUD runs one of the following hooks:
773if you are using GDB; @code{dbx-mode-hook}, if you are using DBX; 765@code{gdb-mode-hook}, if you are using GDB; @code{dbx-mode-hook}, if
774@code{sdb-mode-hook}, if you are using SDB; @code{xdb-mode-hook}, if you 766you are using DBX; @code{sdb-mode-hook}, if you are using SDB;
775are using XDB; @code{perldb-mode-hook}, for Perl debugging mode; 767@code{xdb-mode-hook}, if you are using XDB; @code{perldb-mode-hook},
776@code{pdb-mode-hook}, for PDB; @code{jdb-mode-hook}, for JDB. You can 768for Perl debugging mode; @code{pdb-mode-hook}, for PDB;
777use these hooks to define custom key bindings for the debugger 769@code{jdb-mode-hook}, for JDB. @xref{Hooks}.
778interaction buffer. @xref{Hooks}. 770
779 771 The @code{gud-def} Lisp macro (@pxref{Defining Macros,,, elisp, the
780 Here is a convenient way to define a command that sends a particular 772Emacs Lisp Reference Manual}) provides a convenient way to define an
781command string to the debugger, and set up a key binding for it in the 773Emacs command that sends a particular command string to the debugger,
782debugger interaction buffer: 774and set up a key binding for in the GUD interaction buffer:
783 775
784@findex gud-def 776@findex gud-def
785@example 777@example
@@ -835,21 +827,22 @@ Fully qualified class name derived from the expression surrounding point
835@node GDB Graphical Interface 827@node GDB Graphical Interface
836@subsection GDB Graphical Interface 828@subsection GDB Graphical Interface
837 829
838 The command @code{gdb} starts GDB in a graphical interface, using 830 The command @kbd{M-x gdb} starts GDB in an IDE-like interface, with
839Emacs windows for display program state information. With it, you do 831specialized buffers for controlling breakpoints, stack frames, and
840not need to use textual GDB commands; you can control the debugging 832other aspects of the debugger state. It also provides additional ways
841session with the mouse. For example, you can click in the fringe of a 833to control the debugging session with the mouse, such as clicking in
842source buffer to set a breakpoint there, or on a stack frame in the 834the fringe of a source buffer to set a breakpoint there.
843stack buffer to select that frame.
844
845 This mode requires telling GDB that its ``screen size'' is
846unlimited, so it sets the height and width accordingly. For correct
847operation you must not change these values during the GDB session.
848 835
849@vindex gud-gdb-command-name 836@vindex gud-gdb-command-name
850 To run GDB in text command mode, like the other debuggers in Emacs, 837 To run GDB using just the GUD interaction buffer interface, without
851use @kbd{M-x gud-gdb}. You need to use text command mode to debug 838these additional features, use @kbd{M-x gud-gdb} (@pxref{Starting
852multiple programs within one Emacs session. 839GUD}). You must use this if you want to debug multiple programs
840within one Emacs session, as that is currently unsupported by @kbd{M-x
841gdb}.
842
843 Internally, @kbd{M-x gdb} informs GDB that its ``screen size'' is
844unlimited; for correct operation, you must not change GDB's screen
845height and width values during the debugging session.
853 846
854@menu 847@menu
855* GDB User Interface Layout:: Control the number of displayed buffers. 848* GDB User Interface Layout:: Control the number of displayed buffers.
@@ -858,8 +851,7 @@ multiple programs within one Emacs session.
858* Breakpoints Buffer:: A breakpoint control panel. 851* Breakpoints Buffer:: A breakpoint control panel.
859* Threads Buffer:: Displays your threads. 852* Threads Buffer:: Displays your threads.
860* Stack Buffer:: Select a frame from the call stack. 853* Stack Buffer:: Select a frame from the call stack.
861* Other GDB Buffers:: Input/output, locals, registers, 854* Other GDB Buffers:: Other buffers for controlling the GDB state.
862 assembler, threads and memory buffers.
863* Watch Expressions:: Monitor variable values in the speedbar. 855* Watch Expressions:: Monitor variable values in the speedbar.
864* Multithreaded Debugging:: Debugging programs with several threads. 856* Multithreaded Debugging:: Debugging programs with several threads.
865@end menu 857@end menu
@@ -869,12 +861,12 @@ multiple programs within one Emacs session.
869@cindex GDB User Interface layout 861@cindex GDB User Interface layout
870 862
871@vindex gdb-many-windows 863@vindex gdb-many-windows
872 If the variable @code{gdb-many-windows} is @code{nil} (the default 864 If the variable @code{gdb-many-windows} is @code{nil} (the default),
873value) then @kbd{M-x gdb} normally displays only the GUD buffer. 865@kbd{M-x gdb} normally displays only the GUD interaction buffer.
874However, if the variable @code{gdb-show-main} is also non-@code{nil}, 866However, if the variable @code{gdb-show-main} is also non-@code{nil},
875it starts with two windows: one displaying the GUD buffer, and the 867it starts with two windows: one displaying the GUD interaction buffer,
876other showing the source for the @code{main} function of the program 868and the other showing the source for the @code{main} function of the
877you are debugging. 869program you are debugging.
878 870
879 If @code{gdb-many-windows} is non-@code{nil}, then @kbd{M-x gdb} 871 If @code{gdb-many-windows} is non-@code{nil}, then @kbd{M-x gdb}
880displays the following frame layout: 872displays the following frame layout:
@@ -882,7 +874,7 @@ displays the following frame layout:
882@smallexample 874@smallexample
883@group 875@group
884+--------------------------------+--------------------------------+ 876+--------------------------------+--------------------------------+
885| GUD buffer (I/O of GDB) | Locals/Registers buffer | 877| GUD interaction buffer | Locals/Registers buffer |
886|--------------------------------+--------------------------------+ 878|--------------------------------+--------------------------------+
887| Primary Source buffer | I/O buffer for debugged pgm | 879| Primary Source buffer | I/O buffer for debugged pgm |
888|--------------------------------+--------------------------------+ 880|--------------------------------+--------------------------------+
@@ -896,264 +888,233 @@ buffer does not appear and the primary source buffer occupies the full
896width of the frame. 888width of the frame.
897 889
898@findex gdb-restore-windows 890@findex gdb-restore-windows
899 If you change the window layout, for example, while editing and
900re-compiling your program, then you can restore this standard window
901layout with the command @code{gdb-restore-windows}.
902
903@findex gdb-many-windows 891@findex gdb-many-windows
904 To switch between this standard layout and a simple layout 892 If you ever change the window layout, you can restore the ``many
905containing just the GUD buffer and a source file, type @kbd{M-x 893windows'' layout by typing @kbd{M-x gdb-restore-windows}. To toggle
906gdb-many-windows}. 894between the many windows layout and a simple layout with just the GUD
895interaction buffer and a source file, type @kbd{M-x gdb-many-windows}.
907 896
908 You may also specify additional GDB-related buffers to display, 897 You may also specify additional GDB-related buffers to display,
909either in the same frame or a different one. Select the buffers you 898either in the same frame or a different one. Select the buffers you
910want with the @samp{GUD->GDB-Windows} and @samp{GUD->GDB-Frames} 899want by typing @code{M-x gdb-display-@var{buffertype}-buffer} or
911sub-menus. If the menu-bar is unavailable, type @code{M-x 900@code{M-x gdb-frame-@var{buffertype}-buffer}, where @var{buffertype}
912gdb-display-@var{buffertype}-buffer} or @code{M-x 901is the relevant buffer type, such as @samp{breakpoints}. You can do
913gdb-frame-@var{buffertype}-buffer} respectively, where 902the same with the menu bar, with the @samp{GDB-Windows} and
914@var{buffertype} is the relevant buffer type, such as 903@samp{GDB-Frames} sub-menus of the @samp{GUD} menu.
915@samp{breakpoints}. Most of these buffers are read-only, and typing 904
916@kbd{q} in them kills them. 905 When you finish debugging, kill the GUD interaction buffer with
917 906@kbd{C-x k}, which will also kill all the buffers associated with the
918 When you finish debugging, kill the GUD buffer with @kbd{C-x k}, 907session. However you need not do this if, after editing and
919which will also kill all the buffers associated with the session. 908re-compiling your source code within Emacs, you wish to continue
920However you need not do this if, after editing and re-compiling your 909debugging. When you restart execution, GDB automatically finds the
921source code within Emacs, you wish continue debugging. When you 910new executable. Keeping the GUD interaction buffer has the advantage
922restart execution, GDB will automatically find your new executable. 911of keeping the shell history as well as GDB's breakpoints. You do
923Keeping the GUD buffer has the advantage of keeping the shell history 912need to check that the breakpoints in recently edited source files are
924as well as GDB's breakpoints. You do need to check that the 913still in the right places.
925breakpoints in recently edited source files are still in the right
926places.
927 914
928@node Source Buffers 915@node Source Buffers
929@subsubsection Source Buffers 916@subsubsection Source Buffers
930@cindex GDB commands in Fringe 917@cindex fringes, for debugging
931
932@c @findex gdb-mouse-set-clear-breakpoint
933@c @findex gdb-mouse-toggle-breakpoint
934Many GDB commands can be entered using key bindings or the tool bar but
935sometimes it is quicker to use the fringe. These commands either
936manipulate breakpoints or control program execution. When there is no
937fringe, you can use the margin but this is only present when the
938source file already has a breakpoint.
939
940You can click @kbd{Mouse-1} in the fringe or display margin of a
941source buffer to set a breakpoint there and, on a graphical display, a
942red bullet will appear on that line. If a breakpoint already exists
943on that line, the same click will remove it. You can also enable or
944disable a breakpoint by clicking @kbd{C-Mouse-1} on the bullet.
945
946A solid arrow in the left fringe of a source buffer indicates the line
947of the innermost frame where the debugged program has stopped. A
948hollow arrow indicates the current execution line of higher level
949frames.
950
951If you drag the arrow in the fringe with @kbd{Mouse-1}
952(@code{gdb-mouse-until}), execution will continue to the line where
953you release the button, provided it is still in the same frame.
954Alternatively, you can click @kbd{Mouse-3} at some point in the fringe
955of this buffer and execution will advance to there. A similar command
956(@code{gdb-mouse-jump}) allows you to jump to a source line without
957executing the intermediate lines by clicking @kbd{C-Mouse-3}. This
958command allows you to go backwards which can be useful for running
959through code that has already executed, in order to examine its
960execution in more detail.
961 918
962@table @kbd 919@table @asis
963@item Mouse-1 920@item @kbd{Mouse-1} (in fringe)
964Set or clear a breakpoint. 921Set or clear a breakpoint on that line.
965 922
966@item C-Mouse-1 923@item @kbd{C-Mouse-1} (in fringe)
967Enable or disable a breakpoint. 924Enable or disable a breakpoint on that line.
968 925
969@item Mouse-3 926@item @kbd{Mouse-3} (in fringe)
970Continue execution to here. 927Continue execution to that line.
971 928
972@item C-Mouse-3 929@item @kbd{C-Mouse-3} (in fringe)
973Jump to here. 930Jump to that line.
974@end table 931@end table
975 932
976If the variable @code{gdb-find-source-frame} is non-@code{nil} and 933 On a graphical display, you can click @kbd{Mouse-1} in the fringe of
977execution stops in a frame for which there is no source code e.g after 934a source buffer, to set a breakpoint on that line (@pxref{Fringes}).
978an interrupt, then Emacs finds and displays the first frame further up 935A red dot appears in the fringe, where you clicked. If a breakpoint
979stack for which there is source. If it is @code{nil} then the source 936already exists there, the click removes it. A @kbd{C-Mouse-1} click
980buffer continues to display the last frame which maybe more useful, 937enables or disables an existing breakpoint; a breakpoint that is
981for example, when re-setting a breakpoint. 938disabled, but not unset, is indicated by a gray dot.
939
940 On a text-only terminal, or when fringes are disabled, enabled
941breakpoints are indicated with a @samp{B} character in the left margin
942of the window. Disabled breakpoints are indicated with @samp{b}.
943(The margin is only displayed if a breakpoint is present.)
944
945 A solid arrow in the left fringe of a source buffer indicates the
946line of the innermost frame where the debugged program has stopped. A
947hollow arrow indicates the current execution line of a higher-level
948frame. If you drag the arrow in the fringe with @kbd{Mouse-1}, that
949causes execution to advance to the line where you release the button.
950Alternatively, you can click @kbd{Mouse-3} in the fringe to advance to
951that line. You can click @kbd{C-Mouse-3} in the fringe to jump to
952that line without executing the intermediate lines. This command
953allows you to go backwards, which can be useful for running through
954code that has already executed, in order to examine its execution in
955more detail.
982 956
983@node Breakpoints Buffer 957@node Breakpoints Buffer
984@subsubsection Breakpoints Buffer 958@subsubsection Breakpoints Buffer
985 959
986 The breakpoints buffer shows the existing breakpoints, watchpoints and 960 The GDB Breakpoints buffer shows the breakpoints, watchpoints and
987catchpoints (@pxref{Breakpoints,,, gdb, The GNU debugger}). It has 961catchpoints in the debugger session. @xref{Breakpoints,,, gdb, The
988these special commands, which mostly apply to the @dfn{current 962GNU debugger}. It provides the following commands, which mostly apply
989breakpoint}, the breakpoint which point is on. 963to the @dfn{current breakpoint} (the breakpoint which point is on):
990 964
991@table @kbd 965@table @kbd
992@item @key{SPC} 966@item @key{SPC}
993@kindex SPC @r{(GDB breakpoints buffer)} 967@kindex SPC @r{(GDB Breakpoints buffer)}
994@findex gdb-toggle-breakpoint 968@findex gdb-toggle-breakpoint
995Enable/disable current breakpoint (@code{gdb-toggle-breakpoint}). 969Enable/disable current breakpoint (@code{gdb-toggle-breakpoint}). On
996On a graphical display, this changes the color of a bullet in the 970a graphical display, this changes the color of the dot in the fringe
997margin of a source buffer at the relevant line. This is red when 971of the source buffer at that line. The dot is red when the breakpoint
998the breakpoint is enabled and gray when it is disabled. Text-only 972is enabled, and gray when it is disabled.
999terminals correspondingly display a @samp{B} or @samp{b}.
1000 973
1001@item D 974@item D
1002@kindex D @r{(GDB breakpoints buffer)} 975@kindex D @r{(GDB Breakpoints buffer)}
1003@findex gdb-delete-breakpoint 976@findex gdb-delete-breakpoint
1004Delete the current breakpoint (@code{gdb-delete-breakpoint}). 977Delete the current breakpoint (@code{gdb-delete-breakpoint}).
1005 978
1006@item @key{RET} 979@item @key{RET}
1007@kindex RET @r{(GDB breakpoints buffer)} 980@kindex RET @r{(GDB Breakpoints buffer)}
1008@findex gdb-goto-breakpoint 981@findex gdb-goto-breakpoint
1009Visit the source line for the current breakpoint 982Visit the source line for the current breakpoint
1010(@code{gdb-goto-breakpoint}). 983(@code{gdb-goto-breakpoint}).
1011 984
1012@item Mouse-2 985@item Mouse-2
1013@kindex Mouse-2 @r{(GDB breakpoints buffer)} 986@kindex Mouse-2 @r{(GDB Breakpoints buffer)}
1014Visit the source line for the breakpoint you click on. 987Visit the source line for the breakpoint you click on.
1015@end table 988@end table
1016 989
1017@vindex gdb-show-threads-by-default 990@vindex gdb-show-threads-by-default
1018When @code{gdb-many-windows} is non-@code{nil}, the breakpoints buffer 991 When @code{gdb-many-windows} is non-@code{nil}, the GDB Breakpoints
1019shares its window with the threads buffer. To switch from one to the 992buffer shares its window with the GDB Threads buffer. To switch from
1020other click with @kbd{Mouse-1} on the relevant button in the header 993one to the other click with @kbd{Mouse-1} on the relevant button in
1021line. If @code{gdb-show-threads-by-default} is non-@code{nil}, the 994the header line. If @code{gdb-show-threads-by-default} is
1022threads buffer, rather than the breakpoints buffer, is shown at start 995non-@code{nil}, the GDB Threads buffer is the one shown by default.
1023up.
1024 996
1025@node Threads Buffer 997@node Threads Buffer
1026@subsubsection Threads Buffer 998@subsubsection Threads Buffer
1027 999
1028@findex gdb-select-thread 1000@findex gdb-select-thread
1029The threads buffer displays a summary of all threads currently in your 1001 The GDB Threads buffer displays a summary of the threads in the
1030program (@pxref{Threads, Threads, Debugging programs with multiple 1002debugged program. @xref{Threads, Threads, Debugging programs with
1031threads, gdb, The GNU debugger}). Move point to any thread in the list 1003multiple threads, gdb, The GNU debugger}. To select a thread, move
1032and press @key{RET} to select it (@code{gdb-select-thread}) and 1004point there and type @key{RET} (@code{gdb-select-thread}), or click on
1033display the associated source in the primary source buffer. 1005it with @kbd{Mouse-2}. This also displays the associated source
1034Alternatively, click @kbd{Mouse-2} on a thread to select it. Contents 1006buffer, and updates the contents of the other GDB buffers.
1035of all GDB buffers are updated whenever you select a thread.
1036 1007
1037 You can customize variables under @code{gdb-buffers} group to select 1008 You can customize variables under @code{gdb-buffers} group to select
1038fields included in threads buffer. 1009fields included in GDB Threads buffer.
1039 1010
1040@table @code 1011@table @code
1041@item gdb-thread-buffer-verbose-names 1012@item gdb-thread-buffer-verbose-names
1042@vindex gdb-thread-buffer-verbose-names 1013@vindex gdb-thread-buffer-verbose-names
1043Show long thread names like @samp{Thread 0x4e2ab70 (LWP 1983)} in 1014Show long thread names like @samp{Thread 0x4e2ab70 (LWP 1983)}.
1044threads buffer.
1045 1015
1046@item gdb-thread-buffer-arguments 1016@item gdb-thread-buffer-arguments
1047@vindex gdb-thread-buffer-arguments 1017@vindex gdb-thread-buffer-arguments
1048Show arguments of thread top frames in threads buffer. 1018Show arguments of thread top frames.
1049 1019
1050@item gdb-thread-buffer-locations 1020@item gdb-thread-buffer-locations
1051@vindex gdb-thread-buffer-locations 1021@vindex gdb-thread-buffer-locations
1052Show file information or library names in threads buffer. 1022Show file information or library names.
1053 1023
1054@item gdb-thread-buffer-addresses 1024@item gdb-thread-buffer-addresses
1055@vindex gdb-thread-buffer-addresses 1025@vindex gdb-thread-buffer-addresses
1056Show addresses for thread frames in threads buffer. 1026Show addresses for thread frames in threads buffer.
1057@end table 1027@end table
1058 1028
1059 It's possible to observe information for several threads 1029 To view information for several threads simultaneously, use the
1060simultaneously (in addition to buffers which show information for 1030following commands from the GDB Threads buffer.
1061currently selected thread) using the following keys from the threads
1062buffer.
1063 1031
1064@table @kbd 1032@table @kbd
1065@item d 1033@item d
1066@kindex d @r{(GDB threads buffer)} 1034@kindex d @r{(GDB threads buffer)}
1067@findex gdb-display-disassembly-for-thread 1035@findex gdb-display-disassembly-for-thread
1068Display disassembly buffer for the thread at current line. 1036Display disassembly buffer for the thread at current line
1069(@code{gdb-display-disassembly-for-thread}) 1037(@code{gdb-display-disassembly-for-thread}).
1070 1038
1071@item f 1039@item f
1072@kindex f @r{(GDB threads buffer)} 1040@kindex f @r{(GDB threads buffer)}
1073@findex gdb-display-stack-for-thread 1041@findex gdb-display-stack-for-thread
1074Display stack buffer for the thread at current line. 1042Display the GDB Stack buffer for the thread at current line
1075(@code{gdb-display-stack-for-thread}). 1043(@code{gdb-display-stack-for-thread}).
1076 1044
1077@item l 1045@item l
1078@kindex l @r{(GDB threads buffer)} 1046@kindex l @r{(GDB threads buffer)}
1079@findex gdb-display-locals-for-thread 1047@findex gdb-display-locals-for-thread
1080Display locals buffer for the thread at current line. 1048Display the GDB Locals buffer for the thread at current line
1081(@code{gdb-display-locals-for-thread}). 1049(@code{gdb-display-locals-for-thread}).
1082 1050
1083@item r 1051@item r
1084@kindex r @r{(GDB threads buffer)} 1052@kindex r @r{(GDB threads buffer)}
1085@findex gdb-display-registers-for-thread 1053@findex gdb-display-registers-for-thread
1086Display registers buffer for the thread at current line. 1054Display the GDB Registers buffer for the thread at current line
1087(@code{gdb-display-registers-for-thread}). 1055(@code{gdb-display-registers-for-thread}).
1088@end table 1056@end table
1089 1057
1090Pressing their upper-case counterparts, @kbd{D}, @kbd{F} ,@kbd{L} and 1058@noindent
1091@kbd{R} displays the corresponding buffer in a new frame. 1059Their upper-case counterparts, @kbd{D}, @kbd{F} ,@kbd{L} and @kbd{R},
1060display the corresponding buffer in a new frame.
1092 1061
1093 When you create a buffer showing information about some specific 1062 When you create a buffer showing information about some specific
1094thread, it becomes bound to that thread and keeps showing actual 1063thread, it becomes bound to that thread and keeps showing actual
1095information while you debug your program. Every GDB buffer contains a 1064information while you debug your program. The mode indicator for each
1096number of thread it shows information for in its mode name. Thread 1065GDB buffer shows the number of thread it is showing information about.
1097number is also included in the buffer name of bound buffers to prevent 1066The thread number is also included in the buffer name of bound
1098buffer names clashing. 1067buffers.
1099 1068
1100Further commands are available in the threads buffer which depend on the 1069 Further commands are available in the GDB Threads buffer which
1101mode of GDB that is used for controlling execution of your program. 1070depend on the mode of GDB that is used for controlling execution of
1102(@pxref{Multithreaded Debugging, Stopping and Starting Multi-threaded Programs}). 1071your program. @xref{Multithreaded Debugging}.
1103 1072
1104@node Stack Buffer 1073@node Stack Buffer
1105@subsubsection Stack Buffer 1074@subsubsection Stack Buffer
1106 1075
1107 The stack buffer displays a @dfn{call stack}, with one line for each 1076 The GDB Stack buffer displays a @dfn{call stack}, with one line for
1108of the nested subroutine calls (@dfn{stack frames}) now active in the 1077each of the nested subroutine calls (@dfn{stack frames}) in the
1109program. @xref{Backtrace,, Backtraces, gdb, The GNU debugger}. 1078debugger session. @xref{Backtrace,, Backtraces, gdb, The GNU
1079debugger}.
1110 1080
1111@findex gdb-frames-select 1081@findex gdb-frames-select
1112An arrow in the fringe points to the selected frame or, if the fringe is 1082 On graphical displays, the selected stack frame is indicated by an
1113not present, the number of the selected frame is displayed in reverse 1083arrow in the fringe. On text-only terminals, or when fringes are
1114contrast. To select a frame in GDB, move point in the stack buffer to 1084disabled, the selected stack frame is displayed in reverse contrast.
1115that stack frame and type @key{RET} (@code{gdb-frames-select}), or click 1085To select a stack frame, move point in its line and type @key{RET}
1116@kbd{Mouse-2} on a stack frame. If the locals buffer is visible, 1086(@code{gdb-frames-select}), or click @kbd{Mouse-2} on it. Doing so
1117selecting a stack frame updates it to display the local variables of the 1087also updates the Locals buffer
1118new frame. 1088@ifnottex
1089(@pxref{Other GDB Buffers}).
1090@end ifnottex
1091@iftex
1092(described in the next section).
1093@end iftex
1119 1094
1120@node Other GDB Buffers 1095@node Other GDB Buffers
1121@subsubsection Other Buffers 1096@subsubsection Other GDB Buffers
1122 1097
1123@table @asis 1098@table @asis
1124@item Input/Output Buffer
1125@vindex gdb-use-separate-io-buffer
1126If the variable @code{gdb-use-separate-io-buffer} is non-@code{nil},
1127the program being debugged takes its input and displays its output
1128here. Otherwise it uses the GUD buffer for that. To toggle whether
1129GUD mode uses this buffer, do @kbd{M-x gdb-use-separate-io-buffer}.
1130This takes effect when you next restart the program you are debugging.
1131
1132The history and replay commands from Shell mode are available here,
1133as are the commands to send signals to the debugged program.
1134@xref{Shell Mode}.
1135
1136@item Locals Buffer 1099@item Locals Buffer
1137The locals buffer displays the values of local variables of the 1100This buffer displays the values of local variables of the current
1138current frame for simple data types (@pxref{Frame Info, Frame Info, 1101frame for simple data types (@pxref{Frame Info, Frame Info,
1139Information on a frame, gdb, The GNU debugger}). Press @key{RET} or 1102Information on a frame, gdb, The GNU debugger}). Press @key{RET} or
1140click @kbd{Mouse-2} on the value if you want to edit it. 1103click @kbd{Mouse-2} on the value if you want to edit it.
1141 1104
1142Arrays and structures display their type only. With GDB 6.4 or later, 1105Arrays and structures display their type only. With GDB 6.4 or later,
1143move point to their name and press @key{RET}, or alternatively click 1106you can examine the value of the local variable at point by typing
1144@kbd{Mouse-2} there, to examine their values. With earlier versions 1107@key{RET}, or with a @kbd{Mouse-2} click. With earlier versions of
1145of GDB, use @kbd{Mouse-2} or @key{RET} on the type description 1108GDB, use @key{RET} or @kbd{Mouse-2} on the type description
1146(@samp{[struct/union]} or @samp{[array]}). @xref{Watch Expressions}. 1109(@samp{[struct/union]} or @samp{[array]}). @xref{Watch Expressions}.
1147 1110
1148@item Registers Buffer 1111@item Registers Buffer
1149@findex toggle-gdb-all-registers 1112@findex toggle-gdb-all-registers
1150The registers buffer displays the values held by the registers 1113This buffer displays the values held by the registers
1151(@pxref{Registers,,, gdb, The GNU debugger}). Press @key{RET} or 1114(@pxref{Registers,,, gdb, The GNU debugger}). Press @key{RET} or
1152click @kbd{Mouse-2} on a register if you want to edit its value. 1115click @kbd{Mouse-2} on a register if you want to edit its value. With
1153With GDB 6.4 or later, recently changed register values display with 1116GDB 6.4 or later, recently changed register values display with
1154@code{font-lock-warning-face}. With earlier versions of GDB, you can 1117@code{font-lock-warning-face}.
1155press @key{SPC} to toggle the display of floating point registers
1156(@code{toggle-gdb-all-registers}).
1157 1118
1158@item Assembler Buffer 1119@item Assembler Buffer
1159The assembler buffer displays the current frame as machine code. An 1120The assembler buffer displays the current frame as machine code. An
@@ -1172,8 +1133,8 @@ size for these data items.
1172@end table 1133@end table
1173 1134
1174When @code{gdb-many-windows} is non-@code{nil}, the locals buffer 1135When @code{gdb-many-windows} is non-@code{nil}, the locals buffer
1175shares its window with the registers buffer, just like breakpoints 1136shares its window with the registers buffer, just like breakpoints and
1176and threads buffers. To switch from one to the other click with 1137threads buffers. To switch from one to the other, click with
1177@kbd{Mouse-1} on the relevant button in the header line. 1138@kbd{Mouse-1} on the relevant button in the header line.
1178 1139
1179@node Watch Expressions 1140@node Watch Expressions
@@ -1188,14 +1149,15 @@ in the tool bar (@code{gud-watch}) or type @kbd{C-x C-a C-w}. If you
1188specify a prefix argument, you can enter the variable name in the 1149specify a prefix argument, you can enter the variable name in the
1189minibuffer. 1150minibuffer.
1190 1151
1191 Each watch expression is displayed in the speedbar. Complex data 1152 Each watch expression is displayed in the speedbar
1192types, such as arrays, structures and unions are represented in a tree 1153(@pxref{Speedbar}). Complex data types, such as arrays, structures
1193format. Leaves and simple data types show the name of the expression 1154and unions are represented in a tree format. Leaves and simple data
1194and its value and, when the speedbar frame is selected, display the 1155types show the name of the expression and its value and, when the
1195type as a tooltip. Higher levels show the name, type and address 1156speedbar frame is selected, display the type as a tooltip. Higher
1196value for pointers and just the name and type otherwise. Root expressions 1157levels show the name, type and address value for pointers and just the
1197also display the frame address as a tooltip to help identify the frame 1158name and type otherwise. Root expressions also display the frame
1198in which they were defined. 1159address as a tooltip to help identify the frame in which they were
1160defined.
1199 1161
1200 To expand or contract a complex data type, click @kbd{Mouse-2} or 1162 To expand or contract a complex data type, click @kbd{Mouse-2} or
1201press @key{SPC} on the tag to the left of the expression. Emacs asks 1163press @key{SPC} on the tag to the left of the expression. Emacs asks
@@ -1243,51 +1205,43 @@ non-@code{nil}. This can be useful if you are debugging with a full
1243screen Emacs frame. 1205screen Emacs frame.
1244 1206
1245@node Multithreaded Debugging 1207@node Multithreaded Debugging
1246@subsubsection Stopping and Starting Multi-threaded Programs 1208@subsubsection Multithreaded Debugging
1247@cindex Multithreaded debugging in GDB 1209@cindex Multithreaded debugging in GDB
1248
1249@subsubheading All-stop Debugging
1250
1251In all-stop mode, whenever your program stops, @emph{all} threads of
1252execution stop. Likewise, whenever you restart the program, all
1253threads start executing. @xref{All-Stop Mode, , All-Stop Mode, gdb,
1254The GNU debugger}. You can enable this behavior in Emacs by setting
1255@code{gdb-non-stop-setting} to @code{nil} before starting a debugging
1256session.
1257
1258@subsubheading Non-stop Debugging
1259@cindex Non-stop debugging in GDB 1210@cindex Non-stop debugging in GDB
1260 1211
1261For some multi-threaded targets, GDB supports a further mode of 1212 In GDB's @dfn{all-stop mode}, whenever your program stops, all
1262operation in which you can examine stopped program threads in the 1213execution threads stop. Likewise, whenever you restart the program,
1263debugger while other threads continue to execute freely. 1214all threads start executing. @xref{All-Stop Mode, , All-Stop Mode,
1264@xref{Non-Stop Mode, , Non-Stop Mode, gdb, The GNU debugger}. 1215gdb, The GNU debugger}. For some multi-threaded targets, GDB supports
1265This is referred to as @dfn{non-stop} mode. 1216a further mode of operation, called @dfn{non-stop mode}, in which you
1266 1217can examine stopped program threads in the debugger while other
1267Versions of GDB prior to 7.0 do not support non-stop mode and it does 1218threads continue to execute freely. @xref{Non-Stop Mode, , Non-Stop
1268not work on all targets. In such cases, Emacs uses all-stop mode 1219Mode, gdb, The GNU debugger}. Versions of GDB prior to 7.0 do not
1269regardless of the value of @code{gdb-non-stop-setting}. 1220support non-stop mode, and it does not work on all targets.
1270 1221
1271@vindex gdb-non-stop-setting 1222@vindex gdb-non-stop-setting
1272If the variable @code{gdb-non-stop-setting} is non-@code{nil} (the 1223 The variable @code{gdb-non-stop-setting} determines whether Emacs
1273default value), Emacs tries to start GDB in non-stop mode. Note that 1224runs GDB in all-stop mode or non-stop mode. The default is @code{t},
1274GDB debugging session needs to be restarted for change of this setting 1225which means it tries to use non-stop mode if that is available. If
1275to take effect. 1226you change the value to @code{nil}, or if non-stop mode is
1227unavailable, Emacs runs GDB in all-stop mode. The variable takes
1228effect when Emacs begins a debugging session; if you change its value,
1229you should restart any active debugging session.
1276 1230
1277@vindex gdb-switch-when-another-stopped 1231@vindex gdb-switch-when-another-stopped
1278When a thread stops in non-stop mode, Emacs automatically switches to 1232 When a thread stops in non-stop mode, Emacs usually switches to that
1279that thread. It may be undesirable to allow switching of current 1233thread. If you don't want Emacs to do this switch if another stopped
1280thread when some other stopped thread is already selected. Set 1234thread is already selected, change the variable
1281@code{gdb-switch-when-another-stopped} to @code{nil} to prevent this. 1235@code{gdb-switch-when-another-stopped} to @code{nil}.
1282 1236
1283@vindex gdb-switch-reasons 1237@vindex gdb-switch-reasons
1284Emacs can decide whether or not to switch to the stopped thread 1238 Emacs can decide whether or not to switch to the stopped thread
1285depending on the reason which caused the stop. Customize 1239depending on the reason which caused the stop. Customize the variable
1286@code{gdb-switch-reasons} to select stop reasons which make Emacs 1240@code{gdb-switch-reasons} to select the stop reasons which will cause
1287switch thread. 1241a thread switch.
1288 1242
1289@vindex gdb-stopped-hooks 1243@vindex gdb-stopped-hooks
1290The variable @code{gdb-stopped-hooks} allows you to execute your 1244 The variable @code{gdb-stopped-hooks} allows you to execute your
1291functions whenever some thread stops. 1245functions whenever some thread stops.
1292 1246
1293 In non-stop mode, you can switch between different modes for GUD 1247 In non-stop mode, you can switch between different modes for GUD
@@ -1297,7 +1251,7 @@ execution control commands.
1297@table @dfn 1251@table @dfn
1298@item Non-stop/A 1252@item Non-stop/A
1299 1253
1300When @code{gdb-gud-control-all-threads} is @code{t} (the default 1254 When @code{gdb-gud-control-all-threads} is @code{t} (the default
1301value), interruption and continuation commands apply to all threads, 1255value), interruption and continuation commands apply to all threads,
1302so you can halt or continue all your threads with one command using 1256so you can halt or continue all your threads with one command using
1303@code{gud-stop-subjob} and @code{gud-cont}, respectively. The 1257@code{gud-stop-subjob} and @code{gud-cont}, respectively. The
@@ -1318,127 +1272,132 @@ from the tool bar or from @samp{GUD->GDB-MI} menu.
1318 1272
1319 Stepping commands always apply to the current thread. 1273 Stepping commands always apply to the current thread.
1320 1274
1321@subsubheading Fine Thread Control
1322
1323 In non-stop mode, you can interrupt/continue your threads without 1275 In non-stop mode, you can interrupt/continue your threads without
1324selecting them. Hitting @kbd{i} in threads buffer interrupts thread 1276selecting them. Hitting @kbd{i} in threads buffer interrupts thread
1325under point, @kbd{c} continues it, @kbd{s} steps through. More such 1277under point, @kbd{c} continues it, @kbd{s} steps through. More such
1326commands may be added in the future. 1278commands may be added in the future.
1327 1279
1328Combined with creating bound buffers for any thread, this allows you 1280 Note that when you interrupt a thread, it stops with the
1329to change and track state of many threads in the same time. 1281@samp{signal received} reason. If that reason is included in your
1330
1331 Note that when you interrupt a thread, it stops with @samp{signal
1332received} reason. If that reason is included in your
1333@code{gdb-switch-reasons} (it is by default), Emacs will switch to 1282@code{gdb-switch-reasons} (it is by default), Emacs will switch to
1334that thread. 1283that thread.
1335 1284
1336@node Executing Lisp 1285@node Executing Lisp
1337@section Executing Lisp Expressions 1286@section Executing Lisp Expressions
1338 1287
1339 Emacs has several different major modes for Lisp and Scheme. They are 1288 Emacs has major modes for several variants of Lisp. They use the
1340the same in terms of editing commands, but differ in the commands for 1289same editing commands as other programming language modes
1341executing Lisp expressions. Each mode has its own purpose. 1290(@pxref{Programs}). In addition, they provide special commands for
1291executing Lisp expressions.
1342 1292
1343@table @asis 1293@table @asis
1344@item Emacs-Lisp mode 1294@item Emacs Lisp mode
1345The mode for editing source files of programs to run in Emacs Lisp. 1295The mode for editing Emacs Lisp source files. It defines @kbd{C-M-x}
1346This mode defines @kbd{C-M-x} to evaluate the current defun. 1296to evaluate the current top-level Lisp expression. @xref{Lisp Eval}.
1347@xref{Lisp Libraries}. 1297
1348@item Lisp Interaction mode 1298@item Lisp Interaction mode
1349The mode for an interactive session with Emacs Lisp. It defines 1299The mode for an interactive Emacs Lisp session. It defines @kbd{C-j}
1350@kbd{C-j} to evaluate the sexp before point and insert its value in the 1300to evaluate the expression before point and insert its value in the
1351buffer. @xref{Lisp Interaction}. 1301buffer. @xref{Lisp Interaction}.
1302
1352@item Lisp mode 1303@item Lisp mode
1353The mode for editing source files of programs that run in Lisps other 1304The mode for editing source files of programs that run in Lisps other
1354than Emacs Lisp. This mode defines @kbd{C-M-x} to send the current defun 1305than Emacs Lisp. It defines @kbd{C-M-x} to evaluate the current
1355to an inferior Lisp process. @xref{External Lisp}. 1306top-level expression in an external Lisp. @xref{External Lisp}.
1307
1356@item Inferior Lisp mode 1308@item Inferior Lisp mode
1357The mode for an interactive session with an inferior Lisp process. 1309The mode for an interactive session with an external Lisp which is
1358This mode combines the special features of Lisp mode and Shell mode 1310being run as a subprocess (or @dfn{inferior process}) of Emacs.
1359(@pxref{Shell Mode}). 1311@ifnottex
1312@xref{External Lisp}.
1313@end ifnottex
1314
1360@item Scheme mode 1315@item Scheme mode
1361Like Lisp mode but for Scheme programs. 1316Like Lisp mode, but for Scheme programs.
1317
1362@item Inferior Scheme mode 1318@item Inferior Scheme mode
1363The mode for an interactive session with an inferior Scheme process. 1319Like Inferior Lisp mode, but for Scheme.
1364@end table 1320@end table
1365 1321
1366 Most editing commands for working with Lisp programs are in fact
1367available globally. @xref{Programs}.
1368
1369@node Lisp Libraries 1322@node Lisp Libraries
1370@section Libraries of Lisp Code for Emacs 1323@section Libraries of Lisp Code for Emacs
1371@cindex libraries 1324@cindex libraries
1372@cindex loading Lisp code 1325@cindex loading Lisp code
1373 1326
1374 Lisp code for Emacs editing commands is stored in files whose names 1327 Emacs Lisp code is stored in files whose names conventionally end in
1375conventionally end in @file{.el}. This ending tells Emacs to edit them in 1328@file{.el}. Such files are automatically visited in Emacs Lisp mode.
1376Emacs-Lisp mode (@pxref{Executing Lisp}).
1377 1329
1378@cindex byte code 1330@cindex byte code
1379 Emacs Lisp code can be compiled into byte-code, which loads faster, 1331 Emacs Lisp code can be compiled into byte-code, which loads faster,
1380takes up less space, and executes faster. @xref{Byte Compilation,, 1332takes up less space, and executes faster. By convention, compiled
1381Byte Compilation, elisp, the Emacs Lisp Reference Manual}. By 1333Emacs Lisp code goes in a separate file whose name ends in
1382convention, the compiled code for a library goes in a separate file 1334@samp{.elc}. For example, the compiled code for @file{foo.el} goes in
1383whose name ends in @samp{.elc}. Thus, the compiled code for 1335@file{foo.elc}. @xref{Byte Compilation,, Byte Compilation, elisp, the
1384@file{foo.el} goes in @file{foo.elc}. 1336Emacs Lisp Reference Manual}.
1385 1337
1386@findex load-file 1338@findex load-file
1387 To execute a file of Emacs Lisp code, use @kbd{M-x load-file}. This 1339 To @dfn{load} an Emacs Lisp file, type @kbd{M-x load-file}. This
1388command reads a file name using the minibuffer and then executes the 1340command reads a file name using the minibuffer, and executes the
1389contents of that file as Lisp code. It is not necessary to visit the 1341contents of that file as Emacs Lisp code. It is not necessary to
1390file first; in any case, this command reads the file as found on disk, 1342visit the file first; this command reads the file directly from disk,
1391not text in an Emacs buffer. 1343not from an existing Emacs buffer.
1392 1344
1393@findex load 1345@findex load
1394@findex load-library 1346@findex load-library
1395 Once a file of Lisp code is installed in the Emacs Lisp library 1347@cindex load path for Emacs Lisp
1396directories, users can load it using @kbd{M-x load-library}. Programs 1348 If an Emacs Lisp file is installed in the Emacs Lisp @dfn{load path}
1397can load it by calling @code{load}, a more primitive function that is 1349(defined below), you can load it by typing @kbd{M-x load-library},
1398similar but accepts some additional arguments. 1350instead of using @kbd{M-x load-file}. The @kbd{M-x load-library}
1399 1351command prompts for a @dfn{library name} rather than a file name; it
1400 @kbd{M-x load-library} differs from @kbd{M-x load-file} in that it 1352searches through each directory in the Emacs Lisp load path, trying to
1401searches a sequence of directories and tries three file names in each 1353find a file matching that library name. If the library name is
1402directory. Suppose your argument is @var{lib}; the three names are 1354@samp{@var{foo}}, it tries looking for files named
1403@file{@var{lib}.elc}, @file{@var{lib}.el}, and lastly just 1355@file{@var{foo}.elc}, @file{@var{foo}.el}, and lastly just
1404@file{@var{lib}}. If @file{@var{lib}.elc} exists, it is by convention 1356@file{@var{foo}}; the first one found is loaded. This command prefers
1405the result of compiling @file{@var{lib}.el}; it is better to load the 1357@file{.elc} files over @file{.el} files because compiled files load
1406compiled file, since it will load and run faster. 1358and run faster. If it finds that @file{@var{lib}.el} is newer than
1407 1359@file{@var{lib}.elc}, it issues a warning, in case someone made
1408 If @code{load-library} finds that @file{@var{lib}.el} is newer than 1360changes to the @file{.el} file and forgot to recompile it, but loads
1409@file{@var{lib}.elc} file, it issues a warning, because it's likely 1361the @file{.elc} file anyway. (Due to this behavior, you can save
1410that somebody made changes to the @file{.el} file and forgot to 1362unfinished edits to Emacs Lisp source files, and not recompile until
1411recompile it. Nonetheless, it loads @file{@var{lib}.elc}. This is 1363your changes are ready for use.)
1412because people often leave unfinished edits the source file, and don't 1364
1413recompile it until they think it is ready to use. 1365 Emacs Lisp programs usually load Emacs Lisp files using the
1366@code{load} function. This is similar to @code{load-library}, but is
1367lower-level and accepts additional arguments. @xref{How Programs Do
1368Loading,,, elisp, the Emacs Lisp Reference Manual}.
1414 1369
1415@vindex load-path 1370@vindex load-path
1416 The variable @code{load-path} specifies the sequence of directories 1371 The Emacs Lisp load path is specified by the variable
1417searched by @kbd{M-x load-library}. Its value should be a list of 1372@code{load-path}. Its value should be a list of directory names
1418strings that are directory names; in addition, @code{nil} in this list 1373(strings). These directories are searched, in the specified order, by
1419stands for the current default directory. (Generally, it is not a 1374the @kbd{M-x load-library} command, the lower-level @code{load}
1420good idea to put @code{nil} in the list; if you find yourself wishing 1375function, and other Emacs functions that find Emacs Lisp libraries. A
1376list entry in @code{load-path} can also have the special value
1377@code{nil}, which stands for the current default directory, but it is
1378almost always a bad idea to use this. (If you find yourself wishing
1421that @code{nil} were in the list, most likely what you really want is 1379that @code{nil} were in the list, most likely what you really want is
1422to do @kbd{M-x load-file} this once.) 1380to use @kbd{M-x load-file}.)
1423 1381
1424 The default value of @code{load-path} is a list of directories where 1382 The default value of @code{load-path} is a list of directories where
1425the Lisp code for Emacs itself is stored. If you have libraries of 1383the Lisp code for Emacs itself is stored. If you have libraries of
1426your own, put them in a single directory and add that directory to 1384your own in another directory, you can add that directory to the load
1427@code{load-path}, by adding a line like this to your init file 1385path. Unlike most other variables described in this manual,
1428(@pxref{Init File}): 1386@code{load-path} cannot be changed via the Customize interface
1387(@pxref{Easy Customization}), but you can add a directory to it by
1388putting a line like this in your init file (@pxref{Init File}):
1429 1389
1430@example 1390@example
1431(add-to-list 'load-path "/path/to/lisp/libraries") 1391(add-to-list 'load-path "/path/to/my/lisp/library")
1432@end example 1392@end example
1433 1393
1434@cindex autoload 1394@cindex autoload
1435 Some commands are @dfn{autoloaded}: when you run them, Emacs will 1395 Some commands are @dfn{autoloaded}: when you run them, Emacs
1436automatically load the associated library first. For instance, the 1396automatically loads the associated library first. For instance, the
1437@code{compile} and @code{compilation-mode} commands 1397@kbd{M-x compile} command (@pxref{Compilation}) is autoloaded; if you
1438(@pxref{Compilation}) are autoloaded; if you call either command, 1398call it, Emacs automatically loads the @code{compile} library first.
1439Emacs automatically loads the @code{compile} library. In contrast, 1399In contrast, the command @kbd{M-x recompile} is not autoloaded, so it
1440the command @code{recompile} is not autoloaded, so it is unavailable 1400is unavailable until you load the @code{compile} library.
1441until you load the @code{compile} library.
1442 1401
1443@vindex load-dangerous-libraries 1402@vindex load-dangerous-libraries
1444@cindex Lisp files byte-compiled by XEmacs 1403@cindex Lisp files byte-compiled by XEmacs
@@ -1449,38 +1408,35 @@ Emacs to crash. Set the variable @code{load-dangerous-libraries} to
1449 1408
1450@node Lisp Eval 1409@node Lisp Eval
1451@section Evaluating Emacs Lisp Expressions 1410@section Evaluating Emacs Lisp Expressions
1452@cindex Emacs-Lisp mode 1411@cindex Emacs Lisp mode
1453@cindex mode, Emacs-Lisp 1412@cindex mode, Emacs Lisp
1454 1413
1455@findex emacs-lisp-mode 1414@findex emacs-lisp-mode
1456 Lisp programs intended to be run in Emacs should be edited in 1415 Emacs Lisp mode is the major mode for editing Emacs Lisp. Its mode
1457Emacs-Lisp mode; this happens automatically for file names ending in 1416command is @kbd{M-x emacs-lisp-mode}.
1458@file{.el}. By contrast, Lisp mode itself is used for editing Lisp
1459programs intended for other Lisp systems. To switch to Emacs-Lisp mode
1460explicitly, use the command @kbd{M-x emacs-lisp-mode}.
1461
1462 For testing of Lisp programs to run in Emacs, it is often useful to
1463evaluate part of the program as it is found in the Emacs buffer. For
1464example, after changing the text of a Lisp function definition,
1465evaluating the definition installs the change for future calls to the
1466function. Evaluation of Lisp expressions is also useful in any kind of
1467editing, for invoking noninteractive functions (functions that are
1468not commands).
1469 1417
1470@table @kbd 1418 Emacs provides several commands for evaluating Emacs Lisp
1471@item M-: 1419expressions. You can use these commands in Emacs Lisp mode, to test
1472Read a single Lisp expression in the minibuffer, evaluate it, and print 1420your Emacs Lisp code as it is being written. For example, after
1473the value in the echo area (@code{eval-expression}). 1421re-writing a function, you can evaluate the function definition to
1474@item C-x C-e 1422make it take effect for subsequent function calls. These commands are
1475Evaluate the Lisp expression before point, and print the value in the 1423also available globally, and can be used outside Emacs Lisp mode.
1476echo area (@code{eval-last-sexp}). 1424
1477@item C-M-x 1425@table @asis
1426@item @kbd{M-:}
1427Read a single Emacs Lisp expression in the minibuffer, evaluate it,
1428and print the value in the echo area (@code{eval-expression}).
1429@item @kbd{C-x C-e}
1430Evaluate the Emacs Lisp expression before point, and print the value
1431in the echo area (@code{eval-last-sexp}).
1432@item @kbd{C-M-x} @r{(in Emacs Lisp mode)}
1433@itemx @kbd{M-x eval-defun}
1478Evaluate the defun containing or after point, and print the value in 1434Evaluate the defun containing or after point, and print the value in
1479the echo area (@code{eval-defun}). 1435the echo area (@code{eval-defun}).
1480@item M-x eval-region 1436@item @kbd{M-x eval-region}
1481Evaluate all the Lisp expressions in the region. 1437Evaluate all the Emacs Lisp expressions in the region.
1482@item M-x eval-buffer 1438@item @kbd{M-x eval-buffer}
1483Evaluate all the Lisp expressions in the buffer. 1439Evaluate all the Emacs Lisp expressions in the buffer.
1484@end table 1440@end table
1485 1441
1486@ifinfo 1442@ifinfo
@@ -1492,150 +1448,144 @@ Evaluate all the Lisp expressions in the buffer.
1492@kindex M-: 1448@kindex M-:
1493@end ifnotinfo 1449@end ifnotinfo
1494@findex eval-expression 1450@findex eval-expression
1495 @kbd{M-:} (@code{eval-expression}) is the most basic command for evaluating 1451 @kbd{M-:} (@code{eval-expression}) reads an expression using the
1496a Lisp expression interactively. It reads the expression using the 1452minibuffer, and evaluates it. (Before evaluating the expression, the
1497minibuffer, so you can execute any expression on a buffer regardless of 1453current buffer switches back to the buffer that was current when you
1498what the buffer contains. When the expression is evaluated, the current 1454typed @kbd{M-:}, not the minibuffer into which you typed the
1499buffer is once again the buffer that was current when @kbd{M-:} was 1455expression.)
1500typed.
1501
1502@kindex C-M-x @r{(Emacs-Lisp mode)}
1503@findex eval-defun
1504 In Emacs-Lisp mode, the key @kbd{C-M-x} is bound to the command
1505@code{eval-defun}, which parses the defun containing or following point
1506as a Lisp expression and evaluates it. The value is printed in the echo
1507area. This command is convenient for installing in the Lisp environment
1508changes that you have just made in the text of a function definition.
1509
1510 @kbd{C-M-x} treats @code{defvar} expressions specially. Normally,
1511evaluating a @code{defvar} expression does nothing if the variable it
1512defines already has a value. But @kbd{C-M-x} unconditionally resets the
1513variable to the initial value specified in the @code{defvar} expression.
1514@code{defcustom} expressions are treated similarly.
1515This special feature is convenient for debugging Lisp programs.
1516Typing @kbd{C-M-x} on a @code{defface} expression reinitializes
1517the face according to the @code{defface} specification.
1518 1456
1519@kindex C-x C-e 1457@kindex C-x C-e
1520@findex eval-last-sexp 1458@findex eval-last-sexp
1521 The command @kbd{C-x C-e} (@code{eval-last-sexp}) evaluates the Lisp 1459 The command @kbd{C-x C-e} (@code{eval-last-sexp}) evaluates the
1522expression preceding point in the buffer, and displays the value in the 1460Emacs Lisp expression preceding point in the buffer, and displays the
1523echo area. It is available in all major modes, not just Emacs-Lisp 1461value in the echo area. When the result of an evaluation is an
1524mode. It does not treat @code{defvar} specially. 1462integer, you can type @kbd{C-x C-e} a second time to display the value
1525 1463of the integer result in additional formats (octal, hexadecimal, and
1526 When the result of an evaluation is an integer, you can type 1464character).
1527@kbd{C-x C-e} a second time to display the value of the integer result 1465
1528in additional formats (octal, hexadecimal, and character). 1466 If @kbd{M-:} or @kbd{C-x C-e} is given a prefix argument, it inserts
1529 1467the value into the current buffer at point, rather than displaying it
1530 If @kbd{C-x C-e}, or @kbd{M-:} is given a numeric argument, it 1468in the echo area. The argument's value does not matter.
1531inserts the value into the current buffer at point, rather than 1469
1532displaying it in the echo area. The argument's value does not matter. 1470@kindex C-M-x @r{(Emacs Lisp mode)}
1533@kbd{C-M-x} with a numeric argument instruments the function 1471@findex eval-defun
1534definition for Edebug (@pxref{Instrumenting, Instrumenting for Edebug,, elisp, the Emacs Lisp Reference Manual}). 1472 The @code{eval-defun} command is bound to @kbd{C-M-x} in Emacs Lisp
1473mode. It evaluates the top-level Lisp expression containing or
1474following point, and prints the value in the echo area. In this
1475context, a top-level expression is referred to as a ``defun'', but it
1476need not be an actual @code{defun} (function definition). In
1477particular, this command treats @code{defvar} expressions specially.
1478Normally, evaluating a @code{defvar} expression does nothing if the
1479variable it defines already has a value. But this command
1480unconditionally resets the variable to the initial value specified by
1481the @code{defvar}; this is convenient for debugging Emacs Lisp
1482programs. @code{defcustom} and @code{defface} expressions are treated
1483similarly. Note that the other commands documented in this section do
1484not have this special feature.
1485
1486 With a prefix argument, @kbd{C-M-x} instruments the function
1487definition for Edebug, the Emacs Lisp Debugger. @xref{Instrumenting,
1488Instrumenting for Edebug,, elisp, the Emacs Lisp Reference Manual}.
1535 1489
1536@findex eval-region 1490@findex eval-region
1537@findex eval-buffer 1491@findex eval-buffer
1538 The most general command for evaluating Lisp expressions from a buffer 1492 The command @kbd{M-x eval-region} parses the text of the region as
1539is @code{eval-region}. @kbd{M-x eval-region} parses the text of the 1493one or more Lisp expressions, evaluating them one by one. @kbd{M-x
1540region as one or more Lisp expressions, evaluating them one by one. 1494eval-buffer} is similar but evaluates the entire buffer.
1541@kbd{M-x eval-buffer} is similar but evaluates the entire
1542buffer. This is a reasonable way to install the contents of a file of
1543Lisp code that you are ready to test. Later, as you find bugs and
1544change individual functions, use @kbd{C-M-x} on each function that you
1545change. This keeps the Lisp world in step with the source file.
1546 1495
1547@vindex eval-expression-print-level 1496@vindex eval-expression-print-level
1548@vindex eval-expression-print-length 1497@vindex eval-expression-print-length
1549@vindex eval-expression-debug-on-error 1498@vindex eval-expression-debug-on-error
1550 The two customizable variables @code{eval-expression-print-level} and 1499 The customizable variables @code{eval-expression-print-level} and
1551@code{eval-expression-print-length} control the maximum depth and length 1500@code{eval-expression-print-length} control the maximum depth and
1552of lists to print in the result of the evaluation commands before 1501length of lists to print in the result of the evaluation commands
1553abbreviating them. @code{eval-expression-debug-on-error} controls 1502before abbreviating them. @code{eval-expression-debug-on-error}
1554whether evaluation errors invoke the debugger when these commands are 1503controls whether evaluation errors invoke the debugger when these
1555used; its default is @code{t}. 1504commands are used; its default is @code{t}.
1556 1505
1557@node Lisp Interaction 1506@node Lisp Interaction
1558@section Lisp Interaction Buffers 1507@section Lisp Interaction Buffers
1559 1508
1509@findex lisp-interaction-mode
1560 When Emacs starts up, it contains a buffer named @samp{*scratch*}, 1510 When Emacs starts up, it contains a buffer named @samp{*scratch*},
1561which is provided for evaluating Lisp expressions interactively inside 1511which is provided for evaluating Emacs Lisp expressions interactively.
1562Emacs. Its major mode is Lisp Interaction mode. 1512Its major mode is Lisp Interaction mode. You can also enable Lisp
1513Interaction mode by typing @kbd{M-x lisp-interaction-mode}.
1563 1514
1564@findex eval-print-last-sexp 1515@findex eval-print-last-sexp
1565@kindex C-j @r{(Lisp Interaction mode)} 1516@kindex C-j @r{(Lisp Interaction mode)}
1566 The simplest way to use the @samp{*scratch*} buffer is to insert 1517 In the @samp{*scratch*} buffer, and other Lisp Interaction mode
1567Lisp expressions and type @kbd{C-j} (@code{eval-print-last-sexp}) 1518buffers, @kbd{C-j} (@code{eval-print-last-sexp}) evaluates the Lisp
1568after each expression. This command reads the Lisp expression before 1519expression before point, and inserts the value at point. Thus, as you
1569point, evaluates it, and inserts the value in printed representation 1520type expressions into the buffer followed by @kbd{C-j} after each
1570before point. The result is a complete typescript of the expressions 1521expression, the buffer records a transcript of the evaluated
1571you have evaluated and their values. 1522expressions and their values. All other commands in Lisp Interaction
1523mode are the same as in Emacs Lisp mode.
1572 1524
1573@vindex initial-scratch-message 1525@vindex initial-scratch-message
1574 At startup, the @samp{*scratch*} buffer contains a short message, in 1526 At startup, the @samp{*scratch*} buffer contains a short message, in
1575the form of a Lisp comment, that explains what it is for. This 1527the form of a Lisp comment, that explains what it is for. This
1576message is controlled by the variable @code{initial-scratch-message}, 1528message is controlled by the variable @code{initial-scratch-message},
1577which should be either a string or @code{nil}. If you set it to the 1529which should be either a string, or @code{nil} (which means to
1578empty string, or @code{nil}, the initial message is suppressed. 1530suppress the message).
1579
1580@findex lisp-interaction-mode
1581 All other commands in Lisp Interaction mode are the same as in Emacs
1582Lisp mode. You can enable Lisp Interaction mode by typing @kbd{M-x
1583lisp-interaction-mode}.
1584 1531
1585@findex ielm 1532@findex ielm
1586 An alternative way of evaluating Emacs Lisp expressions interactively 1533 An alternative way of evaluating Emacs Lisp expressions
1587is to use Inferior Emacs-Lisp mode, which provides an interface rather 1534interactively is to use Inferior Emacs Lisp mode, which provides an
1588like Shell mode (@pxref{Shell Mode}) for evaluating Emacs Lisp 1535interface rather like Shell mode (@pxref{Shell Mode}) for evaluating
1589expressions. Type @kbd{M-x ielm} to create an @samp{*ielm*} buffer 1536Emacs Lisp expressions. Type @kbd{M-x ielm} to create an
1590which uses this mode. For more information see that command's 1537@samp{*ielm*} buffer which uses this mode. For more information, see
1591documentation. 1538that command's documentation.
1592 1539
1593@node External Lisp 1540@node External Lisp
1594@section Running an External Lisp 1541@section Running an External Lisp
1542@cindex Lisp mode
1543@cindex mode, Lisp
1544@cindex Common Lisp
1595 1545
1596 Emacs has facilities for running programs in other Lisp systems. You can 1546 Lisp mode is the major mode for editing programs written in
1597run a Lisp process as an inferior of Emacs, and pass expressions to it to 1547general-purpose Lisp dialects, such as Common Lisp. Its mode command
1598be evaluated. You can also pass changed function definitions directly from 1548is @kbd{M-x lisp-mode}. Emacs uses Lisp mode automatically for files
1599the Emacs buffers in which you edit the Lisp programs to the inferior Lisp 1549whose names end in @file{.l}, @file{.lsp}, or @file{.lisp}.
1600process.
1601 1550
1602@findex run-lisp 1551@findex run-lisp
1603@vindex inferior-lisp-program 1552@vindex inferior-lisp-program
1604@kindex C-x C-z 1553@kindex C-x C-z
1605 To run an inferior Lisp process, type @kbd{M-x run-lisp}. This runs 1554 You can run an external Lisp session as a subprocess or
1606the program named @code{lisp}, the same program you would run by typing 1555@dfn{inferior process} of Emacs, and pass expressions to it to be
1607@code{lisp} as a shell command, with both input and output going through 1556evaluated. To begin an external Lisp session, type @kbd{M-x
1608an Emacs buffer named @samp{*lisp*}. That is to say, any ``terminal 1557run-lisp}. This runs the program named @command{lisp}, and sets it up
1609output'' from Lisp will go into the buffer, advancing point, and any 1558so that both input and output go through an Emacs buffer named
1610``terminal input'' for Lisp comes from text in the buffer. (You can 1559@samp{*inferior-lisp*}. To change the name of the Lisp program run by
1611change the name of the Lisp executable file by setting the variable 1560@kbd{M-x run-lisp}, change the variable @code{inferior-lisp-program}.
1612@code{inferior-lisp-program}.) 1561
1613 1562 The major mode for the @samp{*lisp*} buffer is Inferior Lisp mode,
1614 To give input to Lisp, go to the end of the buffer and type the input, 1563which combines the characteristics of Lisp mode and Shell mode
1615terminated by @key{RET}. The @samp{*lisp*} buffer is in Inferior Lisp 1564(@pxref{Shell Mode}). To send input to the Lisp session, go to the
1616mode, which combines the special characteristics of Lisp mode with most 1565end of the @samp{*lisp*} buffer and type the input, followed by
1617of the features of Shell mode (@pxref{Shell Mode}). The definition of 1566@key{RET}. Terminal output from the Lisp session is automatically
1618@key{RET} to send a line to a subprocess is one of the features of Shell 1567inserted in the buffer.
1619mode.
1620
1621@findex lisp-mode
1622 For the source files of programs to run in external Lisps, use Lisp
1623mode. You can switch to this mode with @kbd{M-x lisp-mode}, and it is
1624used automatically for files whose names end in @file{.l},
1625@file{.lsp}, or @file{.lisp}.
1626 1568
1627@kindex C-M-x @r{(Lisp mode)} 1569@kindex C-M-x @r{(Lisp mode)}
1628@findex lisp-eval-defun 1570@findex lisp-eval-defun
1629 When you edit a function in a Lisp program you are running, the easiest 1571 When you edit a Lisp program in Lisp mode, you can type @kbd{C-M-x}
1630way to send the changed definition to the inferior Lisp process is the key 1572(@code{lisp-eval-defun}) to send an expression from the Lisp mode
1631@kbd{C-M-x}. In Lisp mode, this runs the function @code{lisp-eval-defun}, 1573buffer to a Lisp session that you had started with @kbd{M-x run-lisp}.
1632which finds the defun around or following point and sends it as input to 1574The expression sent is the top-level Lisp expression at or following
1633the Lisp process. (Emacs can send input to any inferior process regardless 1575point. The resulting value goes as usual into the
1634of what buffer is current.) 1576@samp{*inferior-lisp*} buffer. Note that the effect of @kbd{C-M-x} in
1635 1577Lisp mode is thus very similar to its effect in Emacs Lisp mode
1636 Contrast the meanings of @kbd{C-M-x} in Lisp mode (for editing 1578(@pxref{Lisp Eval}), except that the expression is sent to a different
1637programs to be run in another Lisp system) and Emacs-Lisp mode (for 1579Lisp environment instead of being evaluated in Emacs.
1638editing Lisp programs to be run in Emacs; see @pxref{Lisp Eval}): in 1580
1639both modes it has the effect of installing the function definition 1581@findex scheme-mode
1640that point is in, but the way of doing so is different according to 1582@findex run-scheme
1641where the relevant Lisp environment is found. 1583@cindex Scheme mode
1584@cindex mode, Scheme
1585@kindex C-M-x @r{(Scheme mode)}
1586 The facilities for editing Scheme code, and for sending expressions
1587to a Scheme subprocess, are very similar. Scheme source files are
1588edited in Scheme mode, which can be explicitly enabled with @kbd{M-x
1589scheme-mode}. You can initiate a Scheme session by typing @kbd{M-x
1590run-scheme} (the buffer for interacting with Scheme is named
1591@samp{*scheme*}), and send expressions to it by typing @kbd{C-M-x}.
diff --git a/doc/emacs/cal-xtra.texi b/doc/emacs/cal-xtra.texi
index 6d20c92a6d9..2d2b32943f5 100644
--- a/doc/emacs/cal-xtra.texi
+++ b/doc/emacs/cal-xtra.texi
@@ -41,12 +41,12 @@ customize the variables @code{calendar-intermonth-header} and
41 41
42@vindex calendar-holiday-marker 42@vindex calendar-holiday-marker
43@vindex diary-entry-marker 43@vindex diary-entry-marker
44@vindex calenday-today-marker 44@vindex calendar-today-marker
45 The variable @code{calendar-holiday-marker} specifies how to mark a 45 The variable @code{calendar-holiday-marker} specifies how to mark a
46date as being a holiday. Its value may be a single-character string to 46date as being a holiday. Its value may be a single-character string to
47insert next to the date, or a face name to use for displaying the date. 47insert next to the date, or a face name to use for displaying the date.
48Likewise, the variable @code{diary-entry-marker} specifies how to mark a 48Likewise, the variable @code{diary-entry-marker} specifies how to mark a
49date that has diary entries, and @code{calenday-today-marker} is used by 49date that has diary entries, and @code{calendar-today-marker} is used by
50the function @code{calendar-mark-today} to mark today's date. By 50the function @code{calendar-mark-today} to mark today's date. By
51default, the calendar uses faces named @code{holiday}, @code{diary}, and 51default, the calendar uses faces named @code{holiday}, @code{diary}, and
52@code{calendar-today} for these purposes. 52@code{calendar-today} for these purposes.
diff --git a/doc/emacs/dired-xtra.texi b/doc/emacs/dired-xtra.texi
index efb05226ba8..52ccccce58c 100644
--- a/doc/emacs/dired-xtra.texi
+++ b/doc/emacs/dired-xtra.texi
@@ -7,24 +7,24 @@
7@node Subdir Switches 7@node Subdir Switches
8@section Subdirectory Switches in Dired 8@section Subdirectory Switches in Dired
9 9
10You can insert subdirectories with specified @code{ls} switches in 10You can insert subdirectories with specified @command{ls} switches in
11Dired buffers using @kbd{C-u i}. You can change the @code{ls} 11Dired buffers using @kbd{C-u i}. You can change the @command{ls}
12switches of an already inserted subdirectory using @kbd{C-u l}. 12switches of an already inserted subdirectory using @kbd{C-u l}.
13 13
14Dired preserves the switches if you revert the buffer. Deleting a 14Dired preserves the switches if you revert the buffer. Deleting a
15subdirectory forgets about its switches. 15subdirectory forgets about its switches.
16 16
17Using @code{dired-undo} (usually bound to @kbd{C-_} and @kbd{C-x u}) 17Using @code{dired-undo} (@pxref{Marks vs Flags}) to reinsert or delete
18to reinsert or delete subdirectories that were inserted with explicit 18subdirectories that were inserted with explicit switches can bypass
19switches can bypass Dired's machinery for remembering (or forgetting) 19Dired's machinery for remembering (or forgetting) switches. Deleting
20switches. Deleting a subdirectory using @code{dired-undo} does not 20a subdirectory using @code{dired-undo} does not forget its switches.
21forget its switches. When later reinserted using @kbd{i}, it will be 21When later reinserted using @kbd{i}, it will be reinserted using its
22reinserted using its old switches. Using @code{dired-undo} to 22old switches. Using @code{dired-undo} to reinsert a subdirectory that
23reinsert a subdirectory that was deleted using the regular 23was deleted using the regular Dired commands (not @code{dired-undo})
24Dired commands (not @code{dired-undo}) will originally insert it with 24will originally insert it with its old switches. Reverting the
25its old switches. Reverting the buffer, however, will relist it using 25buffer, however, will relist it using the buffer's default switches.
26the buffer's default switches. If any of this yields problems, you 26If any of this yields problems, you can easily correct the situation
27can easily correct the situation using @kbd{C-u i} or @kbd{C-u l}. 27using @kbd{C-u i} or @kbd{C-u l}.
28 28
29Dired does not remember the @code{R} switch. Inserting a subdirectory 29Dired does not remember the @code{R} switch. Inserting a subdirectory
30with switches that include the @code{R} switch is equivalent to 30with switches that include the @code{R} switch is equivalent to
diff --git a/doc/emacs/dired.texi b/doc/emacs/dired.texi
index b6ed47fdb3f..5097565830e 100644
--- a/doc/emacs/dired.texi
+++ b/doc/emacs/dired.texi
@@ -73,32 +73,45 @@ completion commands can be used in the minibuffer; in particular,
73a directory name. 73a directory name.
74 74
75 The variable @code{dired-listing-switches} specifies the options to 75 The variable @code{dired-listing-switches} specifies the options to
76give to @code{ls} for listing the directory; this string @emph{must} 76give to @command{ls} for listing the directory; this string
77contain @samp{-l}. If you use a prefix argument with the @code{dired} 77@emph{must} contain @samp{-l}. If you use a prefix argument with the
78command, you can specify the @code{ls} switches with the minibuffer 78@code{dired} command, you can specify the @command{ls} switches with the
79before you enter the directory specification. No matter how they are 79minibuffer before you enter the directory specification. No matter
80specified, the @code{ls} switches can include short options (that is, 80how they are specified, the @command{ls} switches can include short
81single characters) requiring no arguments, and long options (starting 81options (that is, single characters) requiring no arguments, and long
82with @samp{--}) whose arguments are specified with @samp{=}. 82options (starting with @samp{--}) whose arguments are specified with
83@samp{=}.
83 84
84@vindex dired-use-ls-dired 85@vindex dired-use-ls-dired
85 Note that Dired automatically adds the option @samp{--dired}, if 86 If your @command{ls} program supports the @samp{--dired} option,
86your @code{ls} program supports it, unless you explicitly set 87Dired automatically passes it that option; this causes @command{ls} to
87the variable @code{dired-use-ls-dired} to @code{nil}. Without this 88emit special escape sequences for certain unusual file names, without
88option, Dired will have trouble parsing some @samp{unusual} file-names. 89which Dired will not be able to parse those names. The first time you
89See the documentation of @code{dired-use-ls-dired} for more details. 90run Dired in an Emacs session, it checks whether @command{ls} supports
90 91the @samp{--dired} option by calling it once with that option. If the
91 On MS-Windows and MS-DOS systems, Emacs @emph{emulates} @code{ls}; 92exit code is 0, Dired will subsequently use the @samp{--dired} option;
92see @ref{ls in Lisp}, for options and peculiarities of that emulation. 93otherwise it will not. You can inhibit this check by customizing the
94variable @code{dired-use-ls-dired}. The value @code{unspecified} (the
95default) means to perform the check; any other non-@code{nil} value
96means to use the @samp{--dired} option; and @code{nil} means not to
97use the @samp{--dired} option.
98
99 On MS-Windows and MS-DOS systems, Emacs emulates @command{ls}.
100@xref{ls in Lisp}, for options and peculiarities of this emulation.
93 101
94@findex dired-other-window 102@findex dired-other-window
95@kindex C-x 4 d 103@kindex C-x 4 d
96@findex dired-other-frame 104@findex dired-other-frame
97@kindex C-x 5 d 105@kindex C-x 5 d
98 To display the Dired buffer in another window rather than in the 106 To display the Dired buffer in another window, use @kbd{C-x 4 d}
99selected window, use @kbd{C-x 4 d} (@code{dired-other-window}) instead 107(@code{dired-other-window}) instead of @kbd{C-x d}. @kbd{C-x 5 d}
100of @kbd{C-x d}. @kbd{C-x 5 d} (@code{dired-other-frame}) uses a 108(@code{dired-other-frame}) displays the Dired buffer in a separate
101separate frame to display the Dired buffer. 109frame.
110
111@kindex q @r{(Dired)}
112@findex quit-window
113 Typing @kbd{q} (@code{quit-window}) buries the Dired buffer, and
114deletes its window if the window was created just for that buffer.
102 115
103@node Dired Navigation 116@node Dired Navigation
104@section Navigation in the Dired Buffer 117@section Navigation in the Dired Buffer
@@ -124,7 +137,11 @@ minibuffer, and moves point to the line in the Dired buffer describing
124that file. 137that file.
125 138
126@cindex searching Dired buffers 139@cindex searching Dired buffers
140@findex dired-isearch-filenames
127@vindex dired-isearch-filenames 141@vindex dired-isearch-filenames
142@findex dired-isearch-filenames-regexp
143@kindex M-s f C-s @r{(Dired)}
144@kindex M-s f M-C-s @r{(Dired)}
128 @kbd{M-s f C-s} (@code{dired-isearch-filenames}) performs a forward 145 @kbd{M-s f C-s} (@code{dired-isearch-filenames}) performs a forward
129incremental search in the Dired buffer, looking for matches only 146incremental search in the Dired buffer, looking for matches only
130amongst the file names and ignoring the rest of the text in the 147amongst the file names and ignoring the rest of the text in the
@@ -331,18 +348,16 @@ another window, but do not select that window (@code{dired-display-file}).
331@item Mouse-1 348@item Mouse-1
332@itemx Mouse-2 349@itemx Mouse-2
333@findex dired-mouse-find-file-other-window 350@findex dired-mouse-find-file-other-window
334Visit the file named by the line you click on 351Visit the file whose name you clicked on
335(@code{dired-mouse-find-file-other-window}). This uses another window 352(@code{dired-mouse-find-file-other-window}). This uses another window
336to display the file, like the @kbd{o} command. 353to display the file, like the @kbd{o} command.
337 354
338@item v 355@item v
339@kindex v @r{(Dired)} 356@kindex v @r{(Dired)}
340@findex dired-view-file 357@findex dired-view-file
341View the file described on the current line, using @kbd{M-x view-file} 358View the file described on the current line, with View mode
342(@code{dired-view-file}). Viewing a file with @code{view-file} is 359(@code{dired-view-file}). View mode provides convenient commands to
343like visiting it, but is slanted toward moving around in the file 360navigate the buffer but forbids changing it; @xref{View Mode}.
344conveniently and does not allow changing the file. @xref{Misc File
345Ops, View File, Miscellaneous File Operations}.
346 361
347@item ^ 362@item ^
348@kindex ^ @r{(Dired)} 363@kindex ^ @r{(Dired)}
@@ -520,9 +535,9 @@ the regular expression @var{regexp}
520@kbd{% m}, except that it searches the file contents instead of the file 535@kbd{% m}, except that it searches the file contents instead of the file
521name. 536name.
522 537
523@item C-x u 538@item C-/
539@itemx C-x u
524@itemx C-_ 540@itemx C-_
525@itemx C-/
526@kindex C-_ @r{(Dired)} 541@kindex C-_ @r{(Dired)}
527@findex dired-undo 542@findex dired-undo
528Undo changes in the Dired buffer, such as adding or removing 543Undo changes in the Dired buffer, such as adding or removing
@@ -615,7 +630,7 @@ Like the other commands in this section, this command operates on the
615Rename the specified files (@code{dired-do-rename}). If you rename a 630Rename the specified files (@code{dired-do-rename}). If you rename a
616single file, the argument @var{new} is the new name of the file. If 631single file, the argument @var{new} is the new name of the file. If
617you rename several files, the argument @var{new} is the directory into 632you rename several files, the argument @var{new} is the directory into
618which to move the files (this is like the shell command @code{mv}). 633which to move the files (this is like the shell command @command{mv}).
619 634
620Dired automatically changes the visited file name of buffers associated 635Dired automatically changes the visited file name of buffers associated
621with renamed files so that they refer to the new names. 636with renamed files so that they refer to the new names.
@@ -625,7 +640,7 @@ with renamed files so that they refer to the new names.
625@cindex hard links (in Dired) 640@cindex hard links (in Dired)
626@item H @var{new} @key{RET} 641@item H @var{new} @key{RET}
627Make hard links to the specified files (@code{dired-do-hardlink}). 642Make hard links to the specified files (@code{dired-do-hardlink}).
628This is like the shell command @code{ln}. The argument @var{new} is 643This is like the shell command @command{ln}. The argument @var{new} is
629the directory to make the links in, or (if making just one link) the 644the directory to make the links in, or (if making just one link) the
630name to give the link. 645name to give the link.
631 646
@@ -642,9 +657,10 @@ link.
642@kindex M @r{(Dired)} 657@kindex M @r{(Dired)}
643@cindex changing file permissions (in Dired) 658@cindex changing file permissions (in Dired)
644@item M @var{modespec} @key{RET} 659@item M @var{modespec} @key{RET}
645Change the mode (also called ``permission bits'') of the specified files 660Change the mode (also called @dfn{permission bits}) of the specified
646(@code{dired-do-chmod}). @var{modespec} can be in octal or symbolic 661files (@code{dired-do-chmod}). @var{modespec} can be in octal or
647notation like arguments handled by the @code{chmod} program. 662symbolic notation, like arguments handled by the @command{chmod}
663program.
648 664
649@findex dired-do-chgrp 665@findex dired-do-chgrp
650@kindex G @r{(Dired)} 666@kindex G @r{(Dired)}
@@ -663,8 +679,8 @@ this.)
663 679
664@vindex dired-chown-program 680@vindex dired-chown-program
665The variable @code{dired-chown-program} specifies the name of the 681The variable @code{dired-chown-program} specifies the name of the
666program to use to do the work (different systems put @code{chown} in 682program to use to do the work (different systems put @command{chown}
667different places). 683in different places).
668 684
669@findex dired-do-touch 685@findex dired-do-touch
670@kindex T @r{(Dired)} 686@kindex T @r{(Dired)}
@@ -952,17 +968,17 @@ The backup file is the first file given to @code{diff}.
952@cindex subdirectories in Dired 968@cindex subdirectories in Dired
953@cindex expanding subdirectories in Dired 969@cindex expanding subdirectories in Dired
954 970
955 A Dired buffer displays just one directory in the normal case; 971 A Dired buffer usually displays just one directory, but you can
956but you can optionally include its subdirectories as well. 972optionally include its subdirectories as well.
957 973
958 The simplest way to include multiple directories in one Dired buffer is 974 The simplest way to include multiple directories in one Dired buffer is
959to specify the options @samp{-lR} for running @code{ls}. (If you give a 975to specify the options @samp{-lR} for running @command{ls}. (If you give a
960numeric argument when you run Dired, then you can specify these options 976numeric argument when you run Dired, then you can specify these options
961in the minibuffer.) That produces a recursive directory listing showing 977in the minibuffer.) That produces a recursive directory listing showing
962all subdirectories at all levels. 978all subdirectories at all levels.
963 979
964 More often, you will want to show only specific subdirectories. You 980 More often, you will want to show only specific subdirectories. You
965can do this with the @kbd{i} command: 981can do this with @kbd{i} (@code{dired-maybe-insert-subdir}):
966 982
967@table @kbd 983@table @kbd
968@findex dired-maybe-insert-subdir 984@findex dired-maybe-insert-subdir
@@ -973,25 +989,27 @@ can do this with the @kbd{i} command:
973Insert the contents of a subdirectory later in the buffer. 989Insert the contents of a subdirectory later in the buffer.
974@end table 990@end table
975 991
976Use the @kbd{i} (@code{dired-maybe-insert-subdir}) command on a line 992@noindent
977that describes a file which is a directory. It inserts the contents of 993If you use this command on a line that describes a file which is a
978that directory into the same Dired buffer, and moves there. Inserted 994directory, it inserts the contents of that directory into the same
979subdirectory contents follow the top-level directory of the Dired 995Dired buffer, and moves there. Inserted subdirectory contents follow
980buffer, just as they do in @samp{ls -lR} output. 996the top-level directory of the Dired buffer, just as they do in
981 997@samp{ls -lR} output.
982If the subdirectory's contents are already present in the buffer, the 998
983@kbd{i} command just moves to it. 999 If the subdirectory's contents are already present in the buffer,
984 1000the @kbd{i} command just moves to it.
985In either case, @kbd{i} sets the Emacs mark before moving, so @kbd{C-u 1001
986C-@key{SPC}} takes you back to the old position in the buffer (the line 1002 In either case, @kbd{i} sets the Emacs mark before moving, so
987describing that subdirectory). You can also use @samp{^} to return 1003@kbd{C-u C-@key{SPC}} returns to your previous position in the Dired
988to the parent directory in the same Dired buffer. 1004buffer (@pxref{Setting Mark}). You can also use @samp{^} to return to
989 1005the parent directory in the same Dired buffer (@pxref{Dired
990Use the @kbd{l} command (@code{dired-do-redisplay}) to update the 1006Visiting}).
991subdirectory's contents. Use @kbd{C-u k} on the subdirectory header 1007
992line to remove the subdirectory listing (@pxref{Dired Updating}). You 1008 Use the @kbd{l} command (@code{dired-do-redisplay}) to update the
993can also hide and show inserted subdirectories (@pxref{Hiding 1009subdirectory's contents, and use @kbd{C-u k} on the subdirectory
994Subdirectories}). 1010header line to remove the subdirectory listing (@pxref{Dired
1011Updating}). You can also hide and show inserted subdirectories
1012(@pxref{Hiding Subdirectories}).
995 1013
996@ifnottex 1014@ifnottex
997@include dired-xtra.texi 1015@include dired-xtra.texi
@@ -1209,10 +1227,10 @@ tell @command{find} what condition to test. To use this command, you
1209need to know how to use @command{find}. 1227need to know how to use @command{find}.
1210 1228
1211@vindex find-ls-option 1229@vindex find-ls-option
1212 The format of listing produced by these commands is controlled by the 1230 The format of listing produced by these commands is controlled by
1213variable @code{find-ls-option}, whose default value specifies using 1231the variable @code{find-ls-option}, whose default value specifies
1214options @samp{-ld} for @code{ls}. If your listings are corrupted, you 1232using options @samp{-ld} for @command{ls}. If your listings are
1215may need to change the value of this variable. 1233corrupted, you may need to change the value of this variable.
1216 1234
1217@findex locate 1235@findex locate
1218@findex locate-with-filter 1236@findex locate-with-filter
@@ -1338,10 +1356,14 @@ rotation is lossless, and uses an external utility called JpegTRAN.
1338@kindex + @r{(Dired)} 1356@kindex + @r{(Dired)}
1339@findex dired-create-directory 1357@findex dired-create-directory
1340 The command @kbd{+} (@code{dired-create-directory}) reads a 1358 The command @kbd{+} (@code{dired-create-directory}) reads a
1341directory name, and creates the directory if it does not already 1359directory name, and creates that directory. It signals an error if
1342exist. 1360the directory already exists.
1343 1361
1344@cindex searching multiple files via Dired 1362@cindex searching multiple files via Dired
1363@kindex M-s a C-s @r{(Dired)}
1364@kindex M-s a M-C-s @r{(Dired)}
1365@findex dired-do-isearch
1366@findex dired-do-isearch-regexp
1345 The command @kbd{M-s a C-s} (@code{dired-do-isearch}) begins a 1367 The command @kbd{M-s a C-s} (@code{dired-do-isearch}) begins a
1346``multi-file'' incremental search on the marked files. If a search 1368``multi-file'' incremental search on the marked files. If a search
1347fails at the end of a file, typing @kbd{C-s} advances to the next 1369fails at the end of a file, typing @kbd{C-s} advances to the next
diff --git a/doc/emacs/emacs.texi b/doc/emacs/emacs.texi
index aca3735ff03..7f703fbaad0 100644
--- a/doc/emacs/emacs.texi
+++ b/doc/emacs/emacs.texi
@@ -602,11 +602,8 @@ Editing Text-based Tables
602* Table Recognition:: How to activate and deactivate tables. 602* Table Recognition:: How to activate and deactivate tables.
603* Cell Commands:: Cell-oriented commands in a table. 603* Cell Commands:: Cell-oriented commands in a table.
604* Cell Justification:: Justifying cell contents. 604* Cell Justification:: Justifying cell contents.
605* Row Commands:: Manipulating rows of table cell. 605* Table Rows and Columns:: Inserting and deleting rows and columns.
606* Column Commands:: Manipulating columns of table cell.
607* Fixed Width Mode:: Fixing cell width.
608* Table Conversion:: Converting between plain text and tables. 606* Table Conversion:: Converting between plain text and tables.
609* Measuring Tables:: Analyzing table dimension.
610* Table Misc:: Table miscellany. 607* Table Misc:: Table miscellany.
611 608
612Editing Programs 609Editing Programs
@@ -702,7 +699,7 @@ Compiling and Testing Programs
702* Executing Lisp:: Various modes for editing Lisp programs, 699* Executing Lisp:: Various modes for editing Lisp programs,
703 with different facilities for running 700 with different facilities for running
704 the Lisp programs. 701 the Lisp programs.
705* Lisp Libraries:: Creating Lisp programs to run in Emacs. 702* Lisp Libraries:: How Lisp programs are loaded into Emacs.
706* Lisp Eval:: Executing a single Lisp expression in Emacs. 703* Lisp Eval:: Executing a single Lisp expression in Emacs.
707* Lisp Interaction:: Executing Lisp in an Emacs buffer. 704* Lisp Interaction:: Executing Lisp in an Emacs buffer.
708* External Lisp:: Communicating through Emacs with a separate Lisp. 705* External Lisp:: Communicating through Emacs with a separate Lisp.
@@ -725,8 +722,7 @@ GDB Graphical Interface
725* Breakpoints Buffer:: A breakpoint control panel. 722* Breakpoints Buffer:: A breakpoint control panel.
726* Threads Buffer:: Displays your threads. 723* Threads Buffer:: Displays your threads.
727* Stack Buffer:: Select a frame from the call stack. 724* Stack Buffer:: Select a frame from the call stack.
728* Other GDB Buffers:: Input/output, locals, registers, 725* Other GDB Buffers:: Other buffers for controlling the GDB state.
729 assembler, threads and memory buffers.
730* Watch Expressions:: Monitor variable values in the speedbar. 726* Watch Expressions:: Monitor variable values in the speedbar.
731* Multithreaded Debugging:: Debugging programs with several threads. 727* Multithreaded Debugging:: Debugging programs with several threads.
732 728
@@ -745,15 +741,16 @@ Version Control
745* VC Mode Line:: How the mode line shows version control status. 741* VC Mode Line:: How the mode line shows version control status.
746* Basic VC Editing:: How to edit a file under version control. 742* Basic VC Editing:: How to edit a file under version control.
747* Log Buffer:: Features available in log entry buffers. 743* Log Buffer:: Features available in log entry buffers.
744* Registering:: Putting a file under version control.
748* Old Revisions:: Examining and comparing old versions. 745* Old Revisions:: Examining and comparing old versions.
749* Secondary VC Commands:: The commands used a little less frequently. 746* VC Change Log:: Viewing the VC Change Log.
747* VC Undo:: Canceling changes before or after committing.
750* VC Directory Mode:: Listing files managed by version control. 748* VC Directory Mode:: Listing files managed by version control.
751* Branches:: Multiple lines of development. 749* Branches:: Multiple lines of development.
752* Remote Repositories:: Efficient access to remote CVS servers.
753* Revision Tags:: Symbolic names for revisions. 750* Revision Tags:: Symbolic names for revisions.
754* Miscellaneous VC:: Various other commands and features of VC. 751* Miscellaneous VC:: Various other commands and features of VC.
755* Customizing VC:: Variables that change VC's behavior. 752* Customizing VC:: Variables that change VC's behavior.
756 753
757Introduction to Version Control 754Introduction to Version Control
758 755
759* Why Version Control?:: Understanding the problems it addresses. 756* Why Version Control?:: Understanding the problems it addresses.
@@ -770,12 +767,6 @@ Basic Editing under Version Control
770* VC With A Locking VCS:: RCS in its default mode, SCCS, and optionally CVS. 767* VC With A Locking VCS:: RCS in its default mode, SCCS, and optionally CVS.
771* Advanced C-x v v:: Advanced features available with a prefix argument. 768* Advanced C-x v v:: Advanced features available with a prefix argument.
772 769
773The Secondary Commands of VC
774
775* Registering:: Putting a file under version control.
776* VC Change Log:: Viewing the VC Change Log.
777* VC Undo:: Canceling changes before or after check-in.
778
779VC Directory Mode 770VC Directory Mode
780 771
781* VC Directory Buffer:: What the buffer looks like and means. 772* VC Directory Buffer:: What the buffer looks like and means.
@@ -784,26 +775,15 @@ VC Directory Mode
784Multiple Branches of a File 775Multiple Branches of a File
785 776
786* Switching Branches:: How to get to another existing branch. 777* Switching Branches:: How to get to another existing branch.
787* Creating Branches:: How to start a new branch. 778* VC Pull:: Updating a branch from another branch.
788* Merging:: Transferring changes between branches. 779* Merging:: Transferring changes between branches.
789* Multi-User Branching:: Multiple users working at multiple branches 780* Creating Branches:: How to start a new branch.
790 in parallel.
791
792Remote Repositories
793
794* Version Backups:: Keeping local copies of repository versions.
795* Local Version Control:: Using another version system for local editing.
796
797Revision Tags
798
799* Making Revision Tags:: The tag facilities.
800* Revision Tag Caveats:: Things to be careful of when using tags.
801 781
802Miscellaneous Commands and Features of VC 782Miscellaneous Commands and Features of VC
803 783
804* Change Logs and VC:: Generating a change log file from log entries. 784* Change Logs and VC:: Generating a change log file from log entries.
805* Renaming and VC:: A command to rename both the source and master 785* VC Delete/Rename:: Deleting and renaming version-controlled files.
806 file correctly. 786* Revision Tags:: Symbolic names for revisions.
807* Version Headers:: Inserting version control headers into working files. 787* Version Headers:: Inserting version control headers into working files.
808 788
809Customizing VC 789Customizing VC
diff --git a/doc/emacs/files.texi b/doc/emacs/files.texi
index e3da0ca44e6..9b2322e1850 100644
--- a/doc/emacs/files.texi
+++ b/doc/emacs/files.texi
@@ -1485,6 +1485,12 @@ argument to @kbd{M-x delete-file} or @kbd{M-x delete-directory} makes
1485them delete outright, instead of using the Trash, regardless of 1485them delete outright, instead of using the Trash, regardless of
1486@code{delete-by-moving-to-trash}. 1486@code{delete-by-moving-to-trash}.
1487 1487
1488@ifnottex
1489 If a file is under version control (@pxref{Version Control}), you
1490should delete it using @kbd{M-x vc-delete-file} instead of @kbd{M-x
1491delete-file}. @xref{VC Delete/Rename}.
1492@end ifnottex
1493
1488@findex copy-file 1494@findex copy-file
1489@cindex copying files 1495@cindex copying files
1490 @kbd{M-x copy-file} reads the file @var{old} and writes a new file 1496 @kbd{M-x copy-file} reads the file @var{old} and writes a new file
@@ -1498,6 +1504,7 @@ it creates a copy of the @var{old} directory and puts it in @var{new}.
1498If @var{new} is not an existing directory, it copies all the contents 1504If @var{new} is not an existing directory, it copies all the contents
1499of @var{old} into a new directory named @var{new}. 1505of @var{old} into a new directory named @var{new}.
1500 1506
1507@cindex renaming files
1501@findex rename-file 1508@findex rename-file
1502 @kbd{M-x rename-file} reads two file names @var{old} and @var{new} 1509 @kbd{M-x rename-file} reads two file names @var{old} and @var{new}
1503using the minibuffer, then renames file @var{old} as @var{new}. If 1510using the minibuffer, then renames file @var{old} as @var{new}. If
@@ -1512,6 +1519,12 @@ RET /tmp RET} renames @file{~/foo} to @file{/tmp/foo}. The same rule
1512applies to all the remaining commands in this section. All of them 1519applies to all the remaining commands in this section. All of them
1513ask for confirmation when the new file name already exists, too. 1520ask for confirmation when the new file name already exists, too.
1514 1521
1522@ifnottex
1523 If a file is under version control (@pxref{Version Control}), you
1524should rename it using @kbd{M-x vc-rename-file} instead of @kbd{M-x
1525rename-file}. @xref{VC Delete/Rename}.
1526@end ifnottex
1527
1515@findex add-name-to-file 1528@findex add-name-to-file
1516@cindex hard links (creation) 1529@cindex hard links (creation)
1517 @kbd{M-x add-name-to-file} adds an additional name to an existing 1530 @kbd{M-x add-name-to-file} adds an additional name to an existing
diff --git a/doc/emacs/frames.texi b/doc/emacs/frames.texi
index 1445d25be15..dec5aa771ea 100644
--- a/doc/emacs/frames.texi
+++ b/doc/emacs/frames.texi
@@ -32,7 +32,7 @@ unavailable. However, it is still possible to create multiple
32``frames'' on text-only terminals; such frames are displayed one at a 32``frames'' on text-only terminals; such frames are displayed one at a
33time, filling the entire terminal screen (@pxref{Non-Window 33time, filling the entire terminal screen (@pxref{Non-Window
34Terminals}). It is also possible to use the mouse on some text-only 34Terminals}). It is also possible to use the mouse on some text-only
35terminals (@pxref{Text-Only Mouse}, for doing so on GNU and UNIX 35terminals (@pxref{Text-Only Mouse}, for doing so on GNU and Unix
36systems; and 36systems; and
37@iftex 37@iftex
38@pxref{MS-DOS Mouse,,,emacs-xtra,Specialized Emacs Features}, 38@pxref{MS-DOS Mouse,,,emacs-xtra,Specialized Emacs Features},
diff --git a/doc/emacs/maintaining.texi b/doc/emacs/maintaining.texi
index 354812edc1f..6ce298c1795 100644
--- a/doc/emacs/maintaining.texi
+++ b/doc/emacs/maintaining.texi
@@ -49,13 +49,13 @@ variable @code{vc-handled-backends} to @code{nil}
49* VC Mode Line:: How the mode line shows version control status. 49* VC Mode Line:: How the mode line shows version control status.
50* Basic VC Editing:: How to edit a file under version control. 50* Basic VC Editing:: How to edit a file under version control.
51* Log Buffer:: Features available in log entry buffers. 51* Log Buffer:: Features available in log entry buffers.
52* Registering:: Putting a file under version control.
52* Old Revisions:: Examining and comparing old versions. 53* Old Revisions:: Examining and comparing old versions.
53* Secondary VC Commands:: The commands used a little less frequently. 54* VC Change Log:: Viewing the VC Change Log.
55* VC Undo:: Canceling changes before or after committing.
54* VC Directory Mode:: Listing files managed by version control. 56* VC Directory Mode:: Listing files managed by version control.
55* Branches:: Multiple lines of development. 57* Branches:: Multiple lines of development.
56@ifnottex 58@ifnottex
57* Remote Repositories:: Efficient access to remote CVS servers.
58* Revision Tags:: Symbolic names for revisions.
59* Miscellaneous VC:: Various other commands and features of VC. 59* Miscellaneous VC:: Various other commands and features of VC.
60* Customizing VC:: Variables that change VC's behavior. 60* Customizing VC:: Variables that change VC's behavior.
61@end ifnottex 61@end ifnottex
@@ -71,7 +71,7 @@ control operations.
71 71
72 Some uncommon or intricate version control operations, such as 72 Some uncommon or intricate version control operations, such as
73altering repository settings, are not supported in VC. You should 73altering repository settings, are not supported in VC. You should
74perform such tasks outside Emacs, e.g. via the command line. 74perform such tasks outside Emacs, e.g.@: via the command line.
75 75
76 This section provides a general overview of version control, and 76 This section provides a general overview of version control, and
77describes the version control systems that VC supports. You can skip 77describes the version control systems that VC supports. You can skip
@@ -125,7 +125,7 @@ which it refers to as @dfn{back ends}:
125@item 125@item
126SCCS was the first version control system ever built, and was long ago 126SCCS was the first version control system ever built, and was long ago
127superseded by more advanced ones. VC compensates for certain features 127superseded by more advanced ones. VC compensates for certain features
128missing in SCCS (e.g., tag names for releases) by implementing them 128missing in SCCS (e.g.@: tag names for releases) by implementing them
129itself. Other VC features, such as multiple branches, are simply 129itself. Other VC features, such as multiple branches, are simply
130unavailable. Since SCCS is non-free, we recommend avoiding it. 130unavailable. Since SCCS is non-free, we recommend avoiding it.
131 131
@@ -154,7 +154,7 @@ moving/renaming. VC supports all basic editing operations under CVS.
154@cindex SVN 154@cindex SVN
155@cindex Subversion 155@cindex Subversion
156@item 156@item
157Subversion (SVN) is a free version control system designed to be 157Subversion (svn) is a free version control system designed to be
158similar to CVS but without its problems (e.g., it supports atomic 158similar to CVS but without its problems (e.g., it supports atomic
159commits of filesets, and versioning of directories, symbolic links, 159commits of filesets, and versioning of directories, symbolic links,
160meta-data, renames, copies, and deletes). 160meta-data, renames, copies, and deletes).
@@ -162,37 +162,33 @@ meta-data, renames, copies, and deletes).
162@cindex GNU Arch 162@cindex GNU Arch
163@cindex Arch 163@cindex Arch
164@item 164@item
165GNU Arch is one of the earliest @dfn{distributed} version control 165GNU Arch is one of the earliest @dfn{decentralized} version control
166systems (the other being Monotone). @xref{VCS Concepts}, for a 166systems (the other being Monotone). @xref{VCS Concepts}, for a
167description of distributed version control systems. It is no longer 167description of decentralized version control systems. It is no longer
168under active development, and has been deprecated in favor of Bazaar. 168under active development, and has been deprecated in favor of Bazaar.
169 169
170@cindex git 170@cindex git
171@item 171@item
172Git is a distributed version control system originally invented by 172Git is a decentralized version control system originally invented by
173Linus Torvalds to support development of Linux (his kernel). VC 173Linus Torvalds to support development of Linux (his kernel). VC
174supports many common git operations, but others, such as repository 174supports many common Git operations, but others, such as repository
175syncing, must be done from the command line. 175syncing, must be done from the command line.
176 176
177@cindex hg 177@cindex hg
178@cindex Mercurial 178@cindex Mercurial
179@item 179@item
180Mercurial (hg) is a distributed version control system broadly 180Mercurial (hg) is a decentralized version control system broadly
181resembling git. VC supports most Mercurial commands, with the 181resembling Git. VC supports most Mercurial commands, with the
182exception of repository sync operations. 182exception of repository sync operations.
183 183
184@cindex bzr 184@cindex bzr
185@cindex Bazaar 185@cindex Bazaar
186@item 186@item
187Bazaar (bzr) is a distributed version control system that supports 187Bazaar (bzr) is a decentralized version control system that supports
188both repository-based and distributed versioning. VC supports most 188both repository-based and decentralized versioning. VC supports most
189basic editing operations under Bazaar. 189basic editing operations under Bazaar.
190@end itemize 190@end itemize
191 191
192 Previous versions of VC supported a version control system known as
193Meta-CVS. This support was dropped due to limited interest from users
194and developers.
195
196@node VCS Concepts 192@node VCS Concepts
197@subsubsection Concepts of Version Control 193@subsubsection Concepts of Version Control
198 194
@@ -210,16 +206,19 @@ as @dfn{log entries} that describe the changes made to each file.
210 The copy of a version-controlled file that you actually edit is 206 The copy of a version-controlled file that you actually edit is
211called the @dfn{work file}. You can change each work file as you 207called the @dfn{work file}. You can change each work file as you
212would an ordinary file. After you are done with a set of changes, you 208would an ordinary file. After you are done with a set of changes, you
213@dfn{commit} (or @dfn{check in}) the changes; this records the changes 209may @dfn{commit} (or @dfn{check in}) the changes; this records the
214in the repository, along with a descriptive log entry. 210changes in the repository, along with a descriptive log entry.
211
212@cindex working tree
213 A directory tree of work files is called a @dfn{working tree}.
215 214
216@cindex revision 215@cindex revision
217@cindex revision ID 216@cindex revision ID
218 A copy of a file stored in a repository is called a @dfn{revision}. 217 Each commit creates a new @dfn{revision} in the repository. The
219The history of a file is a sequence of revisions. Each revision is 218version control system keeps track of all past revisions and the
220named by a @dfn{revision ID}. The format of the revision ID depends 219changes that were made in each revision. Each revision is named by a
221on the version control system; in the simplest case, it is just an 220@dfn{revision ID}, whose format depends on the version control system;
222integer. 221in the simplest case, it is just an integer.
223 222
224 To go beyond these basic concepts, you will need to understand three 223 To go beyond these basic concepts, you will need to understand three
225aspects in which version control systems differ. As explained in the 224aspects in which version control systems differ. As explained in the
@@ -229,17 +228,18 @@ these modes of operation, but it cannot hide the differences.
229 228
230@node VCS Merging 229@node VCS Merging
231@subsubsection Merge-based vs lock-based Version Control 230@subsubsection Merge-based vs lock-based Version Control
232@cindex locking versus merging
233 231
234 A version control system typically has some mechanism to coordinate 232 A version control system typically has some mechanism to coordinate
235between users who want to change the same file. There are two ways to 233between users who want to change the same file. There are two ways to
236do this: merging and locking. 234do this: merging and locking.
237 235
238 In a version control system that uses merging, each user may check 236@cindex merging-based version
239out and modify a work file at any time. The system lets you 237 In a version control system that uses merging, each user may modify
240@dfn{merge} your work file, which may contain changes that have not 238a work file at any time. The system lets you @dfn{merge} your work
241been committed, with the latest changes that others have committed. 239file, which may contain changes that have not been committed, with the
240latest changes that others have committed.
242 241
242@cindex locking-based version
243 Older version control systems use a @dfn{locking} scheme instead. 243 Older version control systems use a @dfn{locking} scheme instead.
244Here, work files are normally read-only. To edit a file, you ask the 244Here, work files are normally read-only. To edit a file, you ask the
245version control system to make it writable for you by @dfn{locking} 245version control system to make it writable for you by @dfn{locking}
@@ -264,7 +264,7 @@ number and severity of conflicts that actually occur.
264 SCCS always uses locking. RCS is lock-based by default but can be 264 SCCS always uses locking. RCS is lock-based by default but can be
265told to operate in a merging style. CVS and Subversion are 265told to operate in a merging style. CVS and Subversion are
266merge-based by default but can be told to operate in a locking mode. 266merge-based by default but can be told to operate in a locking mode.
267Distributed version control systems, such as GNU Arch, git, and 267Decentralized version control systems, such as GNU Arch, Git, and
268Mercurial, are exclusively merging-based. 268Mercurial, are exclusively merging-based.
269 269
270 VC mode supports both locking and merging version control. The 270 VC mode supports both locking and merging version control. The
@@ -276,15 +276,16 @@ possible.
276@node VCS Changesets 276@node VCS Changesets
277@subsubsection Changeset-based vs File-based Version Control 277@subsubsection Changeset-based vs File-based Version Control
278 278
279@cindex changesets 279@cindex file-based version control
280 On SCCS, RCS, CVS, and other early version control systems, version 280 On SCCS, RCS, CVS, and other early version control systems, version
281control operations are @dfn{file-based}: each file has its own comment 281control operations are @dfn{file-based}: each file has its own comment
282and revision history separate from that of all other files. Newer 282and revision history separate from that of all other files. Newer
283systems, beginning with Subversion, are @dfn{changeset-based}: a 283systems, beginning with Subversion, are @dfn{changeset-based}: a
284checkin may include changes to several files, and the entire set of 284commit may include changes to several files, and the entire set of
285changes is handled as a unit. Any comment associated with the change 285changes is handled as a unit. Any comment associated with the change
286does not belong to a single file, but to the changeset itself. 286does not belong to a single file, but to the changeset itself.
287 287
288@cindex changeset-based version control
288 Changeset-based version control is more flexible and powerful than 289 Changeset-based version control is more flexible and powerful than
289file-based version control; usually, when a change to multiple files 290file-based version control; usually, when a change to multiple files
290has to be reversed, it's good to be able to easily identify and remove 291has to be reversed, it's good to be able to easily identify and remove
@@ -295,18 +296,20 @@ all of it.
295 296
296@cindex centralized version control 297@cindex centralized version control
297@cindex decentralized version control 298@cindex decentralized version control
299@cindex distributed version control
298 Early version control systems were designed around a 300 Early version control systems were designed around a
299@dfn{centralized} model in which each project has only one repository 301@dfn{centralized} model in which each project has only one repository
300used by all developers. SCCS, RCS, CVS, and Subversion share this 302used by all developers. SCCS, RCS, CVS, and Subversion share this
301kind of model. One of its drawbacks is that the repository is a choke 303kind of model. One of its drawbacks is that the repository is a choke
302point for reliability and efficiency. 304point for reliability and efficiency.
303 305
304 GNU Arch pioneered the concept of @dfn{decentralized} version 306 GNU Arch pioneered the concept of @dfn{distributed} or
305control, later implemented in git, Mercurial, and Bazaar. A project 307@dfn{decentralized} version control, later implemented in Git,
306may have several different repositories, and these systems support a 308Mercurial, and Bazaar. A project may have several different
307sort of super-merge between repositories that tries to reconcile their 309repositories, and these systems support a sort of super-merge between
308change histories. In effect, there is one repository for each 310repositories that tries to reconcile their change histories. In
309developer, and repository merges take the place of commit operations. 311effect, there is one repository for each developer, and repository
312merges take the place of commit operations.
310 313
311 VC helps you manage the traffic between your personal workfiles and 314 VC helps you manage the traffic between your personal workfiles and
312a repository. Whether the repository is a single master, or one of a 315a repository. Whether the repository is a single master, or one of a
@@ -346,10 +349,9 @@ policy, which you should follow.
346 When the policy is to use both, you typically want to write an entry 349 When the policy is to use both, you typically want to write an entry
347for each change just once, then put it into both logs. You can write 350for each change just once, then put it into both logs. You can write
348the entry in @file{ChangeLog}, then copy it to the log buffer with 351the entry in @file{ChangeLog}, then copy it to the log buffer with
349@kbd{C-c C-a} when checking in the change (@pxref{Log Buffer}). Or 352@kbd{C-c C-a} when committing the change (@pxref{Log Buffer}). Or you
350you can write the entry in the log buffer while checking in the 353can write the entry in the log buffer while committing the change, and
351change, and later use the @kbd{C-x v a} command to copy it to 354later use the @kbd{C-x v a} command to copy it to @file{ChangeLog}
352@file{ChangeLog}
353@iftex 355@iftex
354(@pxref{Change Logs and VC,,,emacs-xtra, Specialized Emacs Features}). 356(@pxref{Change Logs and VC,,,emacs-xtra, Specialized Emacs Features}).
355@end iftex 357@end iftex
@@ -359,20 +361,22 @@ change, and later use the @kbd{C-x v a} command to copy it to
359 361
360@node VC Mode Line 362@node VC Mode Line
361@subsection Version Control and the Mode Line 363@subsection Version Control and the Mode Line
362@cindex VC, mode line indicator 364@cindex VC mode line indicator
363 365
364 When you visit a file that is under version control, Emacs indicates 366 When you visit a file that is under version control, Emacs indicates
365this on the mode line. For example, @samp{Bzr-1223} says that Bazaar 367this on the mode line. For example, @samp{Bzr-1223} says that Bazaar
366is used for that file, and the current revision ID is 1223. 368is used for that file, and the current revision ID is 1223.
367 369
370@cindex version control status
368 The character between the back-end name and the revision ID 371 The character between the back-end name and the revision ID
369indicates the status of the work file. In a merge-based version 372indicates the @dfn{version control status} of the work file. In a
370control system, a @samp{-} character indicates that the work file is 373merge-based version control system, a @samp{-} character indicates
371unmodified, and @samp{:} indicates that it has been modified. 374that the work file is unmodified, and @samp{:} indicates that it has
372@samp{!} indicates that the file contains conflicts as result of a 375been modified. @samp{!} indicates that the file contains conflicts as
373recent merge operation (@pxref{Merging}), or that the file was removed 376result of a recent merge operation (@pxref{Merging}), or that the file
374from the version control. Finally, @samp{?} means that the file is 377was removed from the version control. Finally, @samp{?} means that
375under version control, but is missing from the working tree. 378the file is under version control, but is missing from the working
379tree.
376 380
377 In a lock-based system, @samp{-} indicates an unlocked file, and 381 In a lock-based system, @samp{-} indicates an unlocked file, and
378@samp{:} a locked file; if the file is locked by another user (for 382@samp{:} a locked file; if the file is locked by another user (for
@@ -402,6 +406,7 @@ system, but is usually not excessive.
402@subsection Basic Editing under Version Control 406@subsection Basic Editing under Version Control
403 407
404@cindex filesets, VC 408@cindex filesets, VC
409@cindex VC filesets
405 Most VC commands operate on @dfn{VC filesets}. A VC fileset is a 410 Most VC commands operate on @dfn{VC filesets}. A VC fileset is a
406collection of one or more files that a VC operation acts on. When you 411collection of one or more files that a VC operation acts on. When you
407type VC commands in a buffer visiting a version-controlled file, the 412type VC commands in a buffer visiting a version-controlled file, the
@@ -409,37 +414,34 @@ VC fileset is simply that one file. When you type them in a VC
409Directory buffer, and some files in it are marked, the VC fileset 414Directory buffer, and some files in it are marked, the VC fileset
410consists of the marked files (@pxref{VC Directory Mode}). 415consists of the marked files (@pxref{VC Directory Mode}).
411 416
412 The principal VC command is an all-purpose command, @kbd{C-x v v} 417 On modern changeset-based version control systems (@pxref{VCS
413(@code{vc-next-action}), that performs either registration, locking, 418Changesets}), VC commands handle multi-file VC filesets as a group.
414merging or a check-in (depending on the situation) on the current VC 419For example, committing a multi-file VC fileset generates a single
415fileset. You can use @kbd{C-x v v} in a file-visiting buffer or in a 420revision, containing the changes to all those files. On older
416VC Directory buffer. 421file-based version control systems like CVS, each file in a multi-file
422VC fileset is handled individually; for example, a commit generates
423one revision for each changed file.
417 424
418@table @kbd 425@table @kbd
419@itemx C-x v v 426@itemx C-x v v
420Perform the appropriate next version control operation on the VC fileset. 427Perform the next appropriate version control operation on the current
428VC fileset.
421@end table 429@end table
422 430
423@findex vc-next-action 431@findex vc-next-action
424@kindex C-x v v 432@kindex C-x v v
425 The precise action of @kbd{C-x v v} depends on the state of the VC 433 The principal VC command is a multi-purpose command, @kbd{C-x v v}
426fileset, and whether the version control system uses locking or 434(@code{vc-next-action}), which performs the ``most appropriate''
427merging. This is described in detail in the subsequent sections. 435action on the current VC fileset: either registering it with a version
428 436control system, or committing it, or unlocking it, or merging changes
429 VC filesets are the way that VC mode bridges the gap between 437into it. The precise actions are described in detail in the following
430file-based and changeset-based version control systems. They are, 438subsections. You can use @kbd{C-x v v} either in a file-visiting
431essentially, a way to pass multiple file arguments as a group to 439buffer or in a VC Directory buffer.
432version control commands. For example, on Subversion, a checkin with 440
433a multi-file VC fileset becomes a joint commit, as though you had 441 Note that VC filesets are distinct from the ``named filesets'' used
434typed @command{svn commit} with those file arguments at the shell 442for viewing and visiting files in functional groups
435command line. All files in a VC fileset must be under the same 443(@pxref{Filesets}). Unlike named filesets, VC filesets are not named
436version control system; if they are not, Emacs signals an error when 444and don't persist across sessions.
437you attempt to execute a command on the fileset.
438
439 VC filesets are distinct from the ``named filesets'' used for
440viewing and visiting files in functional groups (@pxref{Filesets}).
441Unlike named filesets, VC filesets are not named and don't persist
442across sessions.
443 445
444@menu 446@menu
445* VC With A Merging VCS:: Without locking: default mode for CVS. 447* VC With A Merging VCS:: Without locking: default mode for CVS.
@@ -450,46 +452,44 @@ across sessions.
450@node VC With A Merging VCS 452@node VC With A Merging VCS
451@subsubsection Basic Version Control with Merging 453@subsubsection Basic Version Control with Merging
452 454
453 When your version control system is merging-based (the default for 455 On a merging-based version control system (i.e.@: most modern ones;
454CVS and all newer version control systems), work files are always 456@pxref{VCS Merging}), @kbd{C-x v v} does the following:
455writable; you need not do anything special to begin editing a file.
456The status indicator on the mode line is @samp{-} if the file is
457unmodified; it flips to @samp{:} as soon as you save any changes
458(@pxref{VC Mode Line}).
459
460 Here is what @kbd{C-x v v} does when using a merging-based system:
461 457
462@itemize @bullet 458@itemize @bullet
463@item 459@item
464If the work file is in a directory that is not controlled by any 460If there is more than one file in the VC fileset and the files have
465version control system, prompt for a repository type. Then, create a 461inconsistent version control statuses, signal an error. (Note,
466version control repository of that type and register the file with it. 462however, that a fileset is allowed to include both ``newly-added''
463files and ``modified'' files; @pxref{Registering}.)
467 464
468@item 465@item
469If the work file is in a directory that is controlled by a version 466If none of the files in the VC fileset are registered with a version
470control system but not registered with it, register the file. 467control system, register the VC fileset, i.e.@: place it under version
468control. @xref{Registering}. If Emacs cannot find a system to
469register under, it prompts for a repository type, creates a new
470repository, and registers the VC fileset with it.
471 471
472@item 472@item
473If the work file is the same as in the repository, do nothing. 473If every work file in the VC fileset is unchanged, do nothing.
474 474
475@item 475@item
476If you have not changed the work file, but some other user has checked 476If every work file in the VC fileset has been modified, commit the
477in changes to the repository, merge those changes into the work file. 477changes. To do this, Emacs pops up a @samp{*vc-log*} buffer; type the
478desired log entry for the new revision, followed by @kbd{C-c C-c} to
479commit. @xref{Log Buffer}.
480
481If committing to a shared repository, the commit may fail if the
482repository that has been changed since your last update. In that
483case, you must perform an update before trying again. On a
484decentralized version control system, use @kbd{C-x v +} (@pxref{VC
485Pull}) or @kbd{C-x v m} (@pxref{Merging}). On a centralized version
486control system, type @kbd{C-x v v} again to merge in the repository
487changes.
478 488
479@item 489@item
480If you have made modifications to the work file, attempt to commit 490Finally, if you are using a centralized version control system, check
481the changes. To do this, Emacs first reads the log entry for the new 491if each work file in the VC fileset is up-to-date. If any file has
482revision (@pxref{Log Buffer}). If some other user has committed 492been changed in the repository, offer to update it.
483changes to the repository since you last checked it out, the checkin
484fails. In that case, type @kbd{C-x v v} again to merge those changes
485into your own work file; this puts the work file into a ``conflicted''
486state. Type @kbd{C-x v v} to clear the ``conflicted'' state; VC then
487regards the file as up-to-date and modified, and you can try to check
488it in again.
489
490To pick up any recent changes from the repository @emph{without}
491trying to commit your own changes, type @kbd{C-x v m @key{RET}}.
492@xref{Merging}.
493@end itemize 493@end itemize
494 494
495 These rules also apply when you use RCS in its ``non-locking'' mode, 495 These rules also apply when you use RCS in its ``non-locking'' mode,
@@ -498,7 +498,7 @@ Nothing informs you if another user has committed changes in the same
498file since you began editing it; when you commit your revision, his 498file since you began editing it; when you commit your revision, his
499changes are removed (however, they remain in the repository and are 499changes are removed (however, they remain in the repository and are
500thus not irrevocably lost). Therefore, you must verify that the 500thus not irrevocably lost). Therefore, you must verify that the
501current revision is unchanged before checking in your changes. In 501current revision is unchanged before committing your changes. In
502addition, locking is possible with RCS even in this mode: @kbd{C-x v 502addition, locking is possible with RCS even in this mode: @kbd{C-x v
503v} with an unmodified file locks the file, just as it does with RCS in 503v} with an unmodified file locks the file, just as it does with RCS in
504its normal locking mode (@pxref{VC With A Locking VCS}). 504its normal locking mode (@pxref{VC With A Locking VCS}).
@@ -506,32 +506,44 @@ its normal locking mode (@pxref{VC With A Locking VCS}).
506@node VC With A Locking VCS 506@node VC With A Locking VCS
507@subsubsection Basic Version Control with Locking 507@subsubsection Basic Version Control with Locking
508 508
509 Under a locking-based version control system (such as SCCS, and RCS 509 On a locking-based version control system (such as SCCS, and RCS in
510in its default mode), @kbd{C-x v v} does the following: 510its default mode), @kbd{C-x v v} does the following:
511 511
512@itemize @bullet 512@itemize @bullet
513@item 513@item
514If the file is not locked, lock it and make it writable, so that you 514If there is more than one file in the VC fileset and the files have
515can change it. 515inconsistent version control statuses, signal an error.
516
517@item
518If each file in the VC fileset is not registered with a version
519control system, register the VC fileset. @xref{Registering}. If
520Emacs cannot find a system to register under, it prompts for a
521repository type, creates a new repository, and registers the VC
522fileset with it.
523
524@item
525If each file is registered and unlocked, lock it and make it writable,
526so that you can begin to edit it.
516 527
517@item 528@item
518If the file is locked by you, and contains changes, commit the 529If each file is locked by you and contains changes, commit the
519changes. In order to do this, Emacs first reads the log entry for the 530changes. To do this, Emacs pops up a @samp{*vc-log*} buffer; type the
520new revision. @xref{Log Buffer}. 531desired log entry for the new revision, followed by @kbd{C-c C-c} to
532commit (@pxref{Log Buffer}).
521 533
522@item 534@item
523If the file is locked by you, but you have not changed it since you 535If each file is locked by you, but you have not changed it, release
524locked it, release the lock and makes the file read-only again. 536the lock and make the file read-only again.
525 537
526@item 538@item
527If the file is locked by some other user, ask whether you want to 539If each file is locked by another user, ask whether you want to
528``steal the lock'' from that user. If you say yes, the file becomes 540``steal the lock''. If you say yes, the file becomes locked by you,
529locked by you, but a message is sent to the person who had formerly 541and a warning message is sent to the user who had formerly locked the
530locked the file, to inform him of what has happened. 542file.
531@end itemize 543@end itemize
532 544
533 These rules also apply when you use CVS in locking mode, except 545 These rules also apply when you use CVS in locking mode, except
534that CVS does not support stealing a lock. 546that CVS does not support stealing locks.
535 547
536@node Advanced C-x v v 548@node Advanced C-x v v
537@subsubsection Advanced Control in @kbd{C-x v v} 549@subsubsection Advanced Control in @kbd{C-x v v}
@@ -544,49 +556,55 @@ to do the operation.
544 556
545@itemize @bullet 557@itemize @bullet
546@item 558@item
547If the file is modified (or locked), you can specify the revision ID 559@cindex specific version control system
548to use for the new version that you commit. This is one way to create 560You can specify the name of a version control system. This is useful
549a new branch (@pxref{Branches}). 561if the fileset can be managed by more than one version control system,
562and Emacs fails to detect the correct one.
550 563
551@item 564@item
552If the file is not modified (and unlocked), you can specify the 565Otherwise, if using CVS or RCS, you can specify a revision ID.
553revision to select; this lets you start working from an older
554revision, or on another branch. If you do not enter any revision,
555that takes you to the highest (``head'') revision on the current
556branch; therefore @kbd{C-u C-x v v @key{RET}} is a convenient way to
557get the latest version of a file from the repository.
558 566
559@item 567If the fileset is modified (or locked), this makes Emacs commit with
560@cindex specific version control system 568that revision ID. You can create a new branch by supplying an
561Instead of the revision ID, you can also specify the name of a 569appropriate revision ID (@pxref{Branches}).
562version control system. This is useful when one file is being managed 570
563with two version control systems at the same time 571If the fileset is unmodified (and unlocked), this checks the specified
564@iftex 572revision into the working tree. You can also specify a revision on
565(@pxref{Local Version Control,,,emacs-xtra, Specialized Emacs 573another branch by giving its revision or branch ID (@pxref{Switching
566Features}). 574Branches}). An empty argument (i.e.@: @kbd{C-u C-x v v @key{RET}})
567@end iftex 575checks out the latest (``head'') revision on the current branch.
568@ifnottex
569(@pxref{Local Version Control}).
570@end ifnottex
571 576
577This signals an error on a decentralized version control system.
578Those systems do not let you specify your own revision IDs, nor do
579they use the concept of ``checking out'' individual files.
572@end itemize 580@end itemize
573 581
574@node Log Buffer 582@node Log Buffer
575@subsection Features of the Log Entry Buffer 583@subsection Features of the Log Entry Buffer
576 584
577 When you tell VC to commit a change, it pops up a buffer called 585@cindex C-c C-c @r{(Log Edit mode)}
578@samp{*VC-Log*}. In this buffer, you should write a @dfn{log entry} 586@findex log-edit-done
587 When you tell VC to commit a change, it pops up a buffer named
588@samp{*vc-log*}. In this buffer, you should write a @dfn{log entry}
579describing the changes you have made (@pxref{Why Version Control?}). 589describing the changes you have made (@pxref{Why Version Control?}).
580After you are done, type @kbd{C-c C-c}; this exits the buffer and 590After you are done, type @kbd{C-c C-c} (@code{log-edit-done}) to exit
581commits the change, together with your log entry. 591the buffer and commit the change, together with your log entry.
582 592
583 While in the @samp{*VC-Log*} buffer, you can write one or more 593@cindex Log Edit mode
584@dfn{header lines}, specifying additional information to be supplied 594@cindex mode, Log Edit
585to the version control system. Each header line must occupy a single 595@vindex vc-log-mode-hook
586line at the top of the buffer; the first line that is not a header 596 The major mode for the @samp{*vc-log*} buffer is Log Edit mode, a
587line is treated as the start of the log entry. For example, the 597variant of Text mode (@pxref{Text Mode}). On entering Log Edit mode,
588following header line states that the present change was not written 598Emacs runs the hooks @code{text-mode-hook} and @code{vc-log-mode-hook}
589by you, but by another developer: 599(@pxref{Hooks}).
600
601 In the @samp{*vc-log*} buffer, you can write one or more @dfn{header
602lines}, specifying additional information to be supplied to the
603version control system. Each header line must occupy a single line at
604the top of the buffer; the first line that is not a header line is
605treated as the start of the log entry. For example, the following
606header line states that the present change was not written by you, but
607by another developer:
590 608
591@smallexample 609@smallexample
592Author: J. R. Hacker <jrh@@example.com> 610Author: J. R. Hacker <jrh@@example.com>
@@ -597,196 +615,215 @@ Apart from the @samp{Author} header, Emacs recognizes the headers
597@samp{Date} (a manually-specified commit time) and @samp{Fixes} (a 615@samp{Date} (a manually-specified commit time) and @samp{Fixes} (a
598reference to a bug fixed by the change). Not all version control 616reference to a bug fixed by the change). Not all version control
599systems recognize all headers: Bazaar recognizes all three headers, 617systems recognize all headers: Bazaar recognizes all three headers,
600while git, Mercurial, and Monotone recognizes only @samp{Author} and 618while Git, Mercurial, and Monotone recognize only @samp{Author} and
601@samp{Summary}. If you specify a header for a version control that 619@samp{Date}. If you specify a header for a system that does not
602does not support it, the header is treated as part of the log entry. 620support it, the header is treated as part of the log entry.
603 621
622@kindex C-c C-f @r{(Log Edit mode)}
604@findex log-edit-show-files 623@findex log-edit-show-files
624@kindex C-c C-d @r{(Log Edit mode)}
605@findex log-edit-show-diff 625@findex log-edit-show-diff
606 Type @kbd{C-c C-f} (@code{log-edit-show-files}) to display a list of 626 While in the @samp{*vc-log*} buffer, the ``current VC fileset'' is
607files in the current VC fileset. If you called @kbd{C-x v v} directly 627considered to be the fileset that will be committed if you type
608from a work file, the fileset consists of that single file; if you 628@w{@kbd{C-c C-c}}. To view a list of the files in the VC fileset,
609called @kbd{C-x v v} from a VC directory buffer (@pxref{VC Directory 629type @w{@kbd{C-c C-f}} (@code{log-edit-show-files}). To view a diff
610Mode}), the fileset may consist of multiple files. 630of changes between the VC fileset and the version from which you
611 631started editing (@pxref{Old Revisions}), type @kbd{C-c C-d}
632(@code{log-edit-show-diff}).
633
634@kindex C-c C-a @r{(Log Edit mode)}
612@findex log-edit-insert-changelog 635@findex log-edit-insert-changelog
613 Type @kbd{C-c C-d} (@code{log-edit-show-diff}) to show a @dfn{diff} 636 If the VC fileset includes one or more @file{ChangeLog} files
614of the changes you have made (i.e., the differences between the work 637(@pxref{Change Log}), type @kbd{C-c C-a}
615file and the repository revision from which you started editing).
616@xref{Old Revisions}.
617
618 If the current VC fileset includes one or more @file{ChangeLog}
619files (@pxref{Change Log}), type @kbd{C-c C-a}
620(@code{log-edit-insert-changelog}) to pull the relevant entries into 638(@code{log-edit-insert-changelog}) to pull the relevant entries into
621the @samp{*VC-Log*} buffer. If the topmost item in each 639the @samp{*vc-log*} buffer. If the topmost item in each
622@file{ChangeLog} was made under your user name on the current date, 640@file{ChangeLog} was made under your user name on the current date,
623this command searches that item for entries that match the file(s) to 641this command searches that item for entries matching the file(s) to be
624be committed; if found, these entries are inserted. 642committed, and inserts them.
625@iftex
626@xref{Change Logs and VC,,,emacs-xtra, Specialized Emacs Features},
627@end iftex
628@ifnottex 643@ifnottex
629@xref{Change Logs and VC}, 644If you are using CVS or RCS, see @ref{Change Logs and VC}, for the
645opposite way of working---generating ChangeLog entries from the Log
646Edit buffer.
630@end ifnottex 647@end ifnottex
631for the opposite way of working---generating ChangeLog entries from
632the revision control log.
633 648
634 To abort a check-in, just @strong{don't} type @kbd{C-c C-c} in that 649 To abort a commit, just @strong{don't} type @kbd{C-c C-c} in that
635buffer. You can switch buffers and do other editing. As long as you 650buffer. You can switch buffers and do other editing. As long as you
636don't try to commit another file, the entry you were editing remains 651don't try to make another commit, the entry you were editing remains
637in the @samp{*VC-Log*} buffer, and you can go back to that buffer at 652in the @samp{*vc-log*} buffer, and you can go back to that buffer at
638any time to complete the check-in. 653any time to complete the commit.
639 654
640 If you change several source files for the same reason, it is often 655@kindex M-n @r{(Log Edit mode)}
641convenient to specify the same log entry for many of the files. (This 656@kindex M-p @r{(Log Edit mode)}
642is the normal way to do things on a changeset-oriented system, where 657@kindex M-s @r{(Log Edit mode)}
643comments are attached to changesets rather than the history of 658@kindex M-r @r{(Log Edit mode)}
644individual files.) The most convenient way to do this is to mark all
645the files in VC Directory Mode and commit from there; the log buffer
646will carry the fileset information with it and do a group commit when
647you type @kbd{C-c C-c}.
648
649 You can also browse the history of previous log entries to duplicate 659 You can also browse the history of previous log entries to duplicate
650a checkin comment. This can be useful when you want several files to 660a commit comment. This can be useful when you want to make several
651have checkin comments that vary only slightly from each other. The 661commits with similar comments. The commands @kbd{M-n}, @kbd{M-p},
652commands @kbd{M-n}, @kbd{M-p}, @kbd{M-s} and @kbd{M-r} for doing this 662@kbd{M-s} and @kbd{M-r} for doing this work just like the minibuffer
653work just like the minibuffer history commands (except that these 663history commands (@pxref{Minibuffer History}), except that they are
654versions are used outside the minibuffer). 664used outside the minibuffer.
655 665
656@vindex vc-log-mode-hook 666@node Registering
657 Each time you commit a change, the log entry buffer is put into VC 667@subsection Registering a File for Version Control
658Log Edit mode, which involves running two hooks: @code{text-mode-hook} 668
659and @code{vc-log-mode-hook}. @xref{Hooks}. 669@table @kbd
670@item C-x v i
671Register the visited file for version control.
672@end table
673
674@kindex C-x v i
675@findex vc-register
676 The command @kbd{C-x v i} (@code{vc-register}) @dfn{registers} each
677file in the current VC fileset, placing it under version control.
678This is essentially equivalent to the action of @kbd{C-x v v} on an
679unregistered VC fileset (@pxref{Basic VC Editing}), except that if the
680VC fileset is already registered, @kbd{C-x v i} signals an error
681whereas @kbd{C-x v v} performs some other action.
682
683 To register a file, Emacs must choose a version control system. For
684a multi-file VC fileset, the VC Directory buffer specifies the system
685to use (@pxref{VC Directory Mode}). For a single-file VC fileset, if
686the file's directory already contains files registered in a version
687control system, or if the directory is part of a directory tree
688controlled by a version control system, Emacs chooses that system. In
689the event that more than one version control system is applicable,
690Emacs uses the one that appears first in the variable
691@iftex
692@code{vc-handled-backends}.
693@end iftex
694@ifnottex
695@code{vc-handled-backends} (@pxref{Customizing VC}).
696@end ifnottex
697If Emacs cannot find a version control system to register the file
698under, it prompts for a repository type, creates a new repository, and
699registers the file into that repository.
700
701 On most version control systems, registering a file with @kbd{C-x v
702i} or @kbd{C-x v v} adds it to the ``working tree'' but not to the
703repository. Such files are labeled as @samp{added} in the VC
704Directory buffer, and show a revision ID of @samp{@@@@} in the mode
705line. To make the registration take effect in the repository, you
706must perform a commit (@pxref{Basic VC Editing}). Note that a single
707commit can include both file additions and edits to existing files.
708
709 On a locking-based version control system (@pxref{VCS Merging}),
710registering a file leaves it unlocked and read-only. Type @kbd{C-x v
711v} if you wish to start editing it.
660 712
661@node Old Revisions 713@node Old Revisions
662@subsection Examining And Comparing Old Revisions 714@subsection Examining And Comparing Old Revisions
663 715
664 One of the convenient features of version control is the ability
665to examine any revision of a file, or compare two revisions.
666
667@table @kbd 716@table @kbd
668@item C-x v ~
669Prompt for a revision of the current file, and visit it in a buffer of
670its own (@code{vc-revision-other-window}).
671
672@item C-x v = 717@item C-x v =
673Compare the files in the current fileset with the working revision(s) 718Compare the work files in the current VC fileset with the versions you
674you started from (@code{vc-diff}). With a prefix argument, prompt for 719started from (@code{vc-diff}). With a prefix argument, prompt for two
675two revisions of the current fileset and compare them. You can call 720revisions of the current VC fileset and compare them. You can also
676this command from a Dired buffer (@pxref{Dired}). 721call this command from a Dired buffer (@pxref{Dired}).
722
723@ifnottex
724@item M-x vc-ediff
725Like @kbd{C-x v =}, but using Ediff. @xref{Top, Ediff, ediff, The
726Ediff Manual}.
727@end ifnottex
677 728
678@item C-x v D 729@item C-x v D
679Compare the entire tree corresponding to the current fileset with the 730Compare the entire working tree to the revision you started from
680tree you started from (@code{vc-root-diff}). With a prefix argument, 731(@code{vc-root-diff}). With a prefix argument, prompt for two
681prompt for two revisions and compare their trees. 732revisions and compare their trees.
733
734@item C-x v ~
735Prompt for a revision of the current file, and visit it in a separate
736buffer (@code{vc-revision-other-window}).
682 737
683@item C-x v g 738@item C-x v g
684Display an annotated version of the file: for each line, show the 739Display an annotated version of the current file: for each line, show
685latest revision in which it was modified (@code{vc-annotate}). 740the latest revision in which it was modified (@code{vc-annotate}).
686@end table 741@end table
687 742
688@findex vc-revision-other-window
689@kindex C-x v ~
690 To examine an old revision, visit the work file and type @kbd{C-x v
691~ @var{revision} @key{RET}} (@code{vc-revision-other-window}). Here,
692@var{revision} is either the desired revision ID (@pxref{VCS
693Concepts}), or the name of a tag or branch
694@iftex
695(@pxref{Tags,,,emacs-xtra, Specialized Emacs Features}).
696@end iftex
697@ifnottex
698(@pxref{Tags}).
699@end ifnottex
700This command puts the text of the old revision in a file named
701@file{@var{filename}.~@var{revision}~}, and visits it in its own
702buffer in a separate window.
703
704@findex vc-diff 743@findex vc-diff
705@kindex C-x v = 744@kindex C-x v =
706 @kbd{C-x v =} (@code{vc-diff}) compares each file in the current VC 745 @kbd{C-x v =} (@code{vc-diff}) displays a @dfn{diff} which compares
707fileset (saving them if necessary) with the repository revision(s) 746each work file in the current VC fileset to the version(s) from which
708from which you started editing. Note that the latter may or may not 747you started editing. The diff is displayed in another window, in a
709be the latest revision of the file(s). 748Diff mode buffer (@pxref{Diff Mode}) named @file{*vc-diff*}. The
710 749usual Diff mode commands are available in this buffer. In particular,
711 The diff is displayed in another window, in a Diff mode buffer 750the @kbd{g} (@code{revert-buffer}) command performs the file
712(@pxref{Diff Mode}) named @file{*vc-diff*}. In this buffer, the 751comparison again, generating a new diff.
713@kbd{g} (@code{revert-buffer}) command performs the file comparison
714again, generating a new diff.
715 752
716@findex vc-diff
717@kindex C-u C-x v = 753@kindex C-u C-x v =
718 To compare two arbitrary revisions of the current VC fileset, call 754 To compare two arbitrary revisions of the current VC fileset, call
719@code{vc-diff} with a prefix argument: @kbd{C-u C-x v =}. This 755@code{vc-diff} with a prefix argument: @kbd{C-u C-x v =}. This
720prompts for two revision IDs, using the minibuffer, and displays the 756prompts for two revision IDs (@pxref{VCS Concepts}), and displays a
721diff in a special buffer in another window. Instead of providing a 757diff between those versions of the fileset. This will not work
722revision ID, you can give an empty input, which specifies the current 758reliably for multi-file VC filesets, if the version control system is
723contents of the work file; or a tag or branch name 759file-based rather than changeset-based (e.g.@: CVS), since then
724@iftex 760revision IDs for different files would not be related in any
725(@pxref{Tags,,,emacs-xtra, Specialized Emacs Features}). 761meaningful way.
726@end iftex 762
763 Instead of the revision ID, some version control systems let you
764specify revisions in other formats. For instance, under Bazaar you
765can enter @samp{date:yesterday} for the argument to @kbd{C-u C-x v =}
766(and related commands) to specify the first revision committed after
767yesterday. See the documentation of the version control system for
768details.
769
770 If you invoke @kbd{C-x v =} or @kbd{C-u C-x v =} from a Dired buffer
771(@pxref{Dired}), the file listed on the current line is treated as the
772current VC fileset.
773
727@ifnottex 774@ifnottex
728(@pxref{Tags}). 775@findex vc-ediff
776 @kbd{M-x vc-ediff} works like @kbd{C-x v =}, except that it uses an
777Ediff session. @xref{Top, Ediff, ediff, The Ediff Manual}.
729@end ifnottex 778@end ifnottex
730If your version control system is file-based (e.g. CVS) rather than
731changeset-based (Subversion, GNU Arch, git, Mercurial), supplying a
732revision ID for a multi-file fileset (as opposed to a symbolic tag
733name) is unlikely to return diffs that are connected in any meaningful
734way.
735
736 The command @kbd{C-x v D} (@code{vc-root-diff}) is similar to
737@kbd{C-x v =}, but it compares the entire tree associated with the
738current VC fileset with the tree you started with. This means all the
739files controlled by the current version control repository, even those
740that are not part of the current VC fileset.
741
742 If you invoke @kbd{C-x v =} or @kbd{C-u C-x v =} from a buffer that
743is neither visiting a version-controlled file nor a VC directory
744buffer, these commands generate a diff of all registered files in the
745current directory and its subdirectories.
746 779
747@findex vc-ediff 780@findex vc-root-diff
748The function @code{vc-ediff} works like @code{vc-diff} and provides a way to 781@kindex C-x v D
749visually compare two revisions of a file in an Ediff session, @pxref{Top, 782 @kbd{C-x v D} (@code{vc-root-diff}) is similar to @kbd{C-x v =}, but
750Ediff, ediff, The Ediff Manual}. It compares the file associated with the 783it displays the changes in the entire current working tree (i.e.@: the
751current buffer with the last repository revision. To compare two arbitrary 784working tree containing the current VC fileset). If you invoke this
752revisions of the current file, call @code{vc-ediff} with a prefix argument. 785command from a Dired buffer, it applies to the working tree containing
786the directory.
753 787
754@vindex vc-diff-switches 788@vindex vc-diff-switches
755@vindex vc-rcs-diff-switches 789 You can customize the @command{diff} options that @kbd{C-x v =} and
756 @kbd{C-x v =} works by running a variant of the @code{diff} utility 790@kbd{C-x v D} use for generating diffs. The options used are taken
757designed to work with the version control system in use. The options 791from the first non-@code{nil} value amongst the variables
758to pass to the @code{diff} command are taken from the first non-@code{nil} 792@code{vc-@var{backend}-diff-switches}, @code{vc-diff-switches}, and
759value of @code{vc-@var{backend}-diff-switches}, @code{vc-diff-switches}, 793@code{diff-switches} (@pxref{Comparing Files}), in that order. Here,
760and @code{diff-switches} (@pxref{Comparing Files}), in that order. 794@var{backend} stands for the relevant version control system,
761Since @code{nil} means to check the next variable in the sequence, 795e.g.@: @code{bzr} for Bazaar. Since @code{nil} means to check the
762either of the first two may use the value @code{t} to mean no switches at all. 796next variable in the sequence, either of the first two may use the
763Most of the @samp{vc@dots{}diff-switches} variables default to 797value @code{t} to mean no switches at all. Most of the
764@code{nil}, but some default to @code{t}. These are for those version 798@code{vc-@var{backend}-diff-switches} variables default to @code{nil},
765control systems (e.g. SVN) whose @code{diff} implementations do not 799but some default to @code{t}; these are for version control systems
766accept common options (e.g. @samp{-c}) likely to be in 800whose @code{diff} implementations do not accept common diff options,
767@code{diff-switches}. 801such as Subversion.
768 802
769 The buffer produced by @kbd{C-x v =} supports the commands of 803@findex vc-revision-other-window
770Compilation mode (@pxref{Compilation Mode}), such as @kbd{C-x `} and 804@kindex C-x v ~
771@kbd{C-c C-c}, in both the ``old'' and ``new'' text, and they always 805 To directly examine an older version of a file, visit the work file
772find the corresponding locations in the current work file. (Older 806and type @kbd{C-x v ~ @var{revision} @key{RET}}
773revisions are not, in general, present as files on your disk.) 807(@code{vc-revision-other-window}). This retrieves the file version
808corresponding to @var{revision}, saves it to
809@file{@var{filename}.~@var{revision}~}, and visits it in a separate
810window.
774 811
775@findex vc-annotate 812@findex vc-annotate
776@kindex C-x v g 813@kindex C-x v g
777 For some back ends, you can display the file @dfn{annotated} with 814 Many version control systems allow you to view files @dfn{annotated}
778per-line revision information, by typing @kbd{C-x v g} 815with per-line revision information, by typing @kbd{C-x v g}
779(@code{vc-annotate}). This creates a new buffer (the ``annotate 816(@code{vc-annotate}). This creates a new buffer (the ``annotate
780buffer'') displaying the file's text, with each part colored to show 817buffer'') displaying the file's text, with each line colored to show
781how old it is. Text colored red is new, blue means old, and 818how old it is. Red text is new, blue is old, and intermediate colors
782intermediate colors indicate intermediate ages. By default, the color 819indicate intermediate ages. By default, the color is scaled over the
783is scaled over the full range of ages, such that the oldest changes 820full range of ages, such that the oldest changes are blue, and the
784are blue, and the newest changes are red. 821newest changes are red.
785 822
786 When you give a prefix argument to this command, Emacs reads two 823 When you give a prefix argument to this command, Emacs reads two
787arguments using the minibuffer: the ID of which revision to display and 824arguments using the minibuffer: the revision to display and annotate
788annotate (instead of the current file contents), and the time span in 825(instead of the current file contents), and the time span in days the
789days the color range should cover. 826color range should cover.
790 827
791 From the annotate buffer, these and other color scaling options are 828 From the annotate buffer, these and other color scaling options are
792available from the @samp{VC-Annotate} menu. In this buffer, you can 829available from the @samp{VC-Annotate} menu. In this buffer, you can
@@ -795,13 +832,13 @@ view diffs, or view log entries:
795 832
796@table @kbd 833@table @kbd
797@item p 834@item p
798Annotate the previous revision, that is to say, the revision before 835Annotate the previous revision, i.e.@: the revision before the one
799the one currently annotated. A numeric prefix argument is a repeat 836currently annotated. A numeric prefix argument is a repeat count, so
800count, so @kbd{C-u 10 p} would take you back 10 revisions. 837@kbd{C-u 10 p} would take you back 10 revisions.
801 838
802@item n 839@item n
803Annotate the next revision---the one after the revision currently 840Annotate the next revision, i.e.@: the revision after the one
804annotated. A numeric prefix argument is a repeat count. 841currently annotated. A numeric prefix argument is a repeat count.
805 842
806@item j 843@item j
807Annotate the revision indicated by the current line. 844Annotate the revision indicated by the current line.
@@ -840,76 +877,12 @@ Toggle the annotation visibility. This is useful for looking just at
840the file contents without distraction from the annotations. 877the file contents without distraction from the annotations.
841@end table 878@end table
842 879
843@node Secondary VC Commands
844@subsection The Secondary Commands of VC
845
846 This section explains the secondary commands of VC.
847
848@menu
849* Registering:: Putting a file under version control.
850* VC Change Log:: Viewing the VC Change Log.
851* VC Undo:: Canceling changes before or after check-in.
852@end menu
853
854@node Registering
855@subsubsection Registering a File for Version Control
856
857@kindex C-x v i
858@findex vc-register
859 You can put any file under version control by simply visiting it, and
860then typing @w{@kbd{C-x v i}} (@code{vc-register}).
861
862@table @kbd
863@item C-x v i
864Register the visited file for version control.
865@end table
866
867 To register the file, Emacs must choose which version control system
868to use for it. If the file's directory already contains files
869registered in a version control system, Emacs uses that system. If
870there is more than one system in use for a directory, Emacs uses the
871one that appears first in @code{vc-handled-backends}
872@iftex
873(@pxref{Customizing VC,,,emacs-xtra, Specialized Emacs Features}).
874@end iftex
875@ifnottex
876(@pxref{Customizing VC}).
877@end ifnottex
878On the other hand, if there are no files already registered, Emacs uses
879the first system from @code{vc-handled-backends} that could register
880the file (for example, you cannot register a file under CVS if its
881directory is not already part of a CVS tree); with the default value
882of @code{vc-handled-backends}, this means that Emacs uses RCS in this
883situation.
884
885 If locking is in use, @kbd{C-x v i} leaves the file unlocked and
886read-only. Type @kbd{C-x v v} if you wish to start editing it. After
887registering a file with CVS, you must subsequently commit the initial
888revision by typing @kbd{C-x v v}. Until you do that, the revision ID
889appears as @samp{@@@@} in the mode line.
890
891@vindex vc-default-init-revision
892@cindex initial revision ID to register
893 The default initial revision ID for a newly registered file
894varies by what VCS you are using; normally it will be 1.1 on VCSes
895that use dot-pair revision IDs and 1 on VCSes that use monotonic IDs.
896You can specify a different default by setting the variable
897@code{vc-default-init-revision}, or you can give @kbd{C-x v i} a
898numeric argument; then it reads the initial revision ID for this
899particular file using the minibuffer.
900
901@c See http://debbugs.gnu.org/9745
902@c @vindex vc-initial-comment
903@c If @code{vc-initial-comment} is non-@code{nil}, @kbd{C-x v i} reads an
904@c initial comment to describe the purpose of this source file. Reading
905@c the initial comment works like reading a log entry (@pxref{Log Buffer}).
906
907@node VC Change Log 880@node VC Change Log
908@subsubsection VC Change Log 881@subsection VC Change Log
909 882
910@table @kbd 883@table @kbd
911@item C-x v l 884@item C-x v l
912Display revision control state and change history 885Display the change history for the current fileset
913(@code{vc-print-log}). 886(@code{vc-print-log}).
914 887
915@item C-x v L 888@item C-x v L
@@ -928,85 +901,91 @@ Display the changes that will be sent by the next push operation
928@kindex C-x v l 901@kindex C-x v l
929@findex vc-print-log 902@findex vc-print-log
930 The command @kbd{C-x v l} (@code{vc-print-log}) displays a buffer 903 The command @kbd{C-x v l} (@code{vc-print-log}) displays a buffer
931named @samp{*vc-change-log*} in a new window. This buffer lists the 904named @samp{*vc-change-log*}, showing the history of changes made to
932changes to the current file, including the associated log entries. 905the current file, including who made the changes, the dates, and the
933(These are the log entries associated with the version control system, 906log entry for each change (these are the same log entries you would
934i.e. the ones you enter via the @samp{*VC-Log*} buffer. @xref{Log 907enter via the @samp{*vc-log*} buffer; @pxref{Log Buffer}). Point is
935Buffer}.) Point is centered at the revision of the file currently 908centered at the revision of the file currently being visited. With a
936being visited. With a prefix argument, the command prompts for the 909prefix argument, the command prompts for the revision to center on,
937revision to center on, and the maximum number of revisions to display. 910and the maximum number of revisions to display.
938You can call this command from a Dired buffer (@pxref{Dired}). 911
912 If you call @kbd{C-x v l} from a VC Directory buffer (@pxref{VC
913Directory Mode}) or a Dired buffer (@pxref{Dired}), it applies to the
914file listed on the current line.
939 915
940@findex vc-print-root-log 916@findex vc-print-root-log
941 Type @kbd{C-x v L} (@code{vc-print-root-log}) to display a 917@findex log-view-toggle-entry-display
942@samp{*vc-change-log*} buffer showing the history of the 918 @kbd{C-x v L} (@code{vc-print-root-log}) displays a
943version-controlled directory tree as a whole. With a prefix argument, 919@samp{*vc-change-log*} buffer showing the history of the entire
944the command prompts for the maximum number of revisions to display. 920version-controlled directory tree (RCS, SCCS, and CVS do not support
945RCS, SCCS, and CVS do not support this feature. 921this feature). With a prefix argument, the command prompts for the
946 922maximum number of revisions to display.
947 On a distributed version control system, the @kbd{C-x v I} 923
924 The @kbd{C-x v L} history is shown in a compact form, usually
925showing only the first line of each log entry. However, you can type
926@key{RET} (@code{log-view-toggle-entry-display}) in the
927@samp{*vc-change-log*} buffer to reveal the entire log entry for the
928revision at point. A second @key{RET} hides it again.
929
930 On a decentralized version control system, the @kbd{C-x v I}
948(@code{vc-log-incoming}) command displays a log buffer showing the 931(@code{vc-log-incoming}) command displays a log buffer showing the
949changes that will be applied, the next time you run the version 932changes that will be applied, the next time you run the version
950control system's ``pull'' command to get new revisions from another 933control system's ``pull'' command to get new revisions from another
951repository. This other repository is the default one from which 934repository (@pxref{VC Pull}). This other repository is the default
952changes are pulled, as defined by the version control system; with a 935one from which changes are pulled, as defined by the version control
953prefix argument, @code{vc-log-incoming} prompts for a specific 936system; with a prefix argument, @code{vc-log-incoming} prompts for a
954repository from which changes would be pulled, and lists the changes 937specific repository. Similarly, @kbd{C-x v O}
955accordingly. Similarly, @kbd{C-x v O} (@code{vc-log-outgoing}) shows 938(@code{vc-log-outgoing}) shows the changes that will be sent to
956the changes that will be sent to another repository, the next time you 939another repository, the next time you run the ``push'' command; with a
957run the ``push'' command; with a prefix argument, it prompts for a 940prefix argument, it prompts for a specific destination repository.
958specific repository to which changes would be pushed.
959 941
960 In the @samp{*vc-change-log*} buffer, you can use the following keys 942 In the @samp{*vc-change-log*} buffer, you can use the following keys
961to move between the logs of revisions and of files, to view past 943to move between the logs of revisions and of files, and to examine and
962revisions, to modify change comments, to view annotations and to view 944compare past revisions (@pxref{Old Revisions}):
963diffs:
964 945
965@table @kbd 946@table @kbd
966@item p 947@item p
967Move to the previous revision-item in the buffer. (Revision entries in the log 948Move to the previous revision entry. (Revision entries in the log
968buffer are usually in reverse-chronological order, so the previous 949buffer are usually in reverse-chronological order, so the previous
969revision-item usually corresponds to a newer revision.) A numeric 950revision-item usually corresponds to a newer revision.) A numeric
970prefix argument is a repeat count. 951prefix argument is a repeat count.
971 952
972@item n 953@item n
973Move to the next revision-item (which most often corresponds to the 954Move to the next revision entry. A numeric prefix argument is a
974previous revision of the file). A numeric prefix argument is a repeat 955repeat count.
975count.
976 956
977@item P 957@item P
978Move to the log of the previous file, when the logs of multiple files 958Move to the log of the previous file, if showing logs for a multi-file
979are in the log buffer (@pxref{VC Directory Mode}). Otherwise, just 959VC fileset. Otherwise, just move to the beginning of the log. A
980move to the beginning of the log. A numeric prefix argument is a 960numeric prefix argument is a repeat count.
981repeat count, so @kbd{C-u 10 P} would move backward 10 files.
982 961
983@item N 962@item N
984Move to the log of the next file, when the logs of multiple files are 963Move to the log of the next file, if showing logs for a multi-file VC
985in the log buffer (@pxref{VC Directory Mode}). It also takes a 964fileset. A numeric prefix argument is a repeat count.
986numeric prefix argument as a repeat count.
987 965
988@item a 966@item a
989Annotate the revision indicated by the current line. 967Annotate the revision on the current line (@pxref{Old Revisions}).
990 968
991@item e 969@item e
992Modify the change comment displayed at point. Note that not all VC 970Modify the change comment displayed at point. Note that not all VC
993systems support modifying change comments. 971systems support modifying change comments.
994 972
995@item f 973@item f
996Visit the revision indicated at the current line, like typing @kbd{C-x 974Visit the revision indicated at the current line.
997v ~} and specifying this revision's ID (@pxref{Old Revisions}).
998 975
999@item d 976@item d
1000Display the diff (@pxref{Comparing Files}) between the revision 977Display a diff between the revision at point and the next earlier
1001indicated at the current line and the next earlier revision. This is 978revision, for the specific file.
1002useful to see what actually changed in the file when the revision
1003indicated on the current line was committed.
1004 979
1005@item D 980@item D
1006Display the changeset diff (@pxref{Comparing Files}) between the 981Display the changeset diff between the revision at point and the next
1007revision indicated at the current line and the next earlier revision. 982earlier revision. This shows the changes to all files made in that
1008This is useful to see all the changes to all files that the revision 983revision.
1009indicated on the current line did when it was committed. 984
985@item @key{RET}
986In a compact-style log buffer (e.g.@: the one created by @kbd{C-x v
987L}), toggle between showing and hiding the full log entry for the
988revision at point.
1010@end table 989@end table
1011 990
1012@vindex vc-log-show-limit 991@vindex vc-log-show-limit
@@ -1020,62 +999,71 @@ entries} or @samp{Show unlimited entries} buttons at the end of the
1020buffer. However, RCS, SCCS, and CVS do not support this feature. 999buffer. However, RCS, SCCS, and CVS do not support this feature.
1021 1000
1022@node VC Undo 1001@node VC Undo
1023@subsubsection Undoing Version Control Actions 1002@subsection Undoing Version Control Actions
1024 1003
1025@table @kbd 1004@table @kbd
1026@item C-x v u 1005@item C-x v u
1027Revert the buffer and the file to the working revision from which you started 1006Revert the work file(s) in the current VC fileset to the last revision
1028editing the file. 1007(@code{vc-revert}).
1029
1030@item C-x v c
1031Remove the last-entered change from the master for the visited file.
1032This undoes your last check-in.
1033@end table 1008@end table
1034 1009
1010@c `C-x v c' (vc-rollback) was removed, since it's RCS/SCCS specific.
1011
1035@kindex C-x v u 1012@kindex C-x v u
1036@findex vc-revert-buffer 1013@findex vc-revert
1037 If you want to discard your current set of changes and revert to the 1014@vindex vc-revert-show-diff
1038working revision from which you started editing the file, use @kbd{C-x 1015 If you want to discard all the changes you have made to the current
1039v u} (@code{vc-revert-buffer}). If the version control system is 1016VC fileset, type @kbd{C-x v u} (@code{vc-revert-buffer}). This shows
1040locking-based, this leaves the file unlocked, and you must lock it 1017you a diff between the work file(s) and the revision from which you
1041again before making new changes. @kbd{C-x v u} requires confirmation, 1018started editing, and asks for confirmation for discarding the changes.
1042unless it sees that you haven't made any changes with respect to the 1019If you agree, the fileset is reverted. If you don't want @kbd{C-x v
1043master copy of the working revision. 1020u} to show a diff, set the variable @code{vc-revert-show-diff} to
1044 1021@code{nil} (you can still view the diff directly with @kbd{C-x v =};
1045 @kbd{C-x v u} is also the command to unlock a file if you lock it and 1022@pxref{Old Revisions}). Note that @kbd{C-x v u} cannot be reversed
1046then decide not to change it. 1023with the usual undo commands (@pxref{Undo}), so use it with care.
1047 1024
1048@kindex C-x v c 1025 On locking-based version control systems, @kbd{C-x v u} leaves files
1049@findex vc-rollback 1026unlocked; you must lock again to resume editing. You can also use
1050 To cancel a change that you already committed, use @kbd{C-x v c} 1027@kbd{C-x v u} to unlock a file if you lock it and then decide not to
1051(@code{vc-rollback}). This command discards all record of the most 1028change it.
1052recent checked-in revision, but only if your work file corresponds to
1053that revision---you cannot use @kbd{C-x v c} to cancel a revision that
1054is not the latest on its branch. Note that many version control
1055systems do not support rollback at all; this command is something of a
1056historical relic.
1057 1029
1058@node VC Directory Mode 1030@node VC Directory Mode
1059@subsection VC Directory Mode 1031@subsection VC Directory Mode
1060 1032
1033@cindex VC Directory buffer
1034 The @dfn{VC Directory buffer} is a specialized buffer for viewing
1035the version control statuses of the files in a directory tree, and
1036performing version control operations on those files. In particular,
1037it is used to specify multi-file VC filesets for commands like
1038@w{@kbd{C-x v v}} to act on (@pxref{VC Directory Commands}).
1039
1061@kindex C-x v d 1040@kindex C-x v d
1062@findex vc-dir 1041@findex vc-dir
1063 When you are working on a large program, it is often useful to find 1042 To use the VC Directory buffer, type @kbd{C-x v d} (@code{vc-dir}).
1064out which files have changed within an entire directory tree, or to 1043This reads a directory name using the minibuffer, and switches to a VC
1065view the status of all files under version control at once, and to 1044Directory buffer for that directory. By default, the buffer is named
1066perform version control operations on collections of files. You can 1045@samp{*vc-dir*}. Its contents are described
1067use the command @kbd{C-x v d} (@code{vc-dir}) to make a directory 1046@iftex
1068listing that includes only files relevant for version control. This 1047below.
1069creates a @dfn{VC Directory buffer} and displays it in a separate 1048@end iftex
1070window. 1049@ifnottex
1050in @ref{VC Directory Buffer}.
1051@end ifnottex
1052
1053 The @code{vc-dir} command automatically detects the version control
1054system to be used in the specified directory. In the event that more
1055than one system is being used in the directory, you should invoke the
1056command with a prefix argument, @kbd{C-u C-x v d}; this prompts for
1057the version control system which the VC Directory buffer should use.
1071 1058
1059@ifnottex
1072@cindex PCL-CVS 1060@cindex PCL-CVS
1073@pindex cvs 1061@pindex cvs
1074@cindex CVS directory mode 1062@cindex CVS directory mode
1075 The VC Directory buffer works with all the version control systems 1063 In addition to the VC Directory buffer, Emacs has a similar facility
1076that VC supports. For CVS, Emacs also offers a more powerful facility 1064called PCL-CVS which is specialized for CVS. @xref{Top, , About
1077called PCL-CVS. @xref{Top, , About PCL-CVS, pcl-cvs, PCL-CVS --- The 1065PCL-CVS, pcl-cvs, PCL-CVS --- The Emacs Front-End to CVS}.
1078Emacs Front-End to CVS}. 1066@end ifnottex
1079 1067
1080@menu 1068@menu
1081* Buffer: VC Directory Buffer. What the buffer looks like and means. 1069* Buffer: VC Directory Buffer. What the buffer looks like and means.
@@ -1086,369 +1074,367 @@ Emacs Front-End to CVS}.
1086@subsubsection The VC Directory Buffer 1074@subsubsection The VC Directory Buffer
1087 1075
1088 The VC Directory buffer contains a list of version-controlled files 1076 The VC Directory buffer contains a list of version-controlled files
1089in the current directory and its subdirectories. Files which are 1077and their version control statuses. It lists files in the current
1090up-to-date (have no local differences from the repository copy) are 1078directory (the one specified when you called @kbd{C-x v d}) and its
1091usually hidden; if all files in a subdirectory are up-to-date, the 1079subdirectories, but only those with a ``noteworthy'' status. Files
1092subdirectory is hidden as well. There is an exception to this rule: 1080that are up-to-date (i.e.@: the same as in the repository) are
1093if VC mode detects that a file has changed to an up-to-date state 1081omitted. If all the files in a subdirectory are up-to-date, the
1094since you last looked at it, that file and its state are shown. 1082subdirectory is not listed either. As an exception, if a file has
1095 1083become up-to-date as a direct result of a VC command, it is listed.
1096 If a directory uses more that one version control system, you can 1084
1097select which system to use for the @code{vc-dir} command by invoking 1085 Here is an example of a VC Directory buffer listing:
1098@code{vc-dir} with a prefix argument: @kbd{C-u C-x v d}.
1099
1100 The line for an individual file shows the version control state of
1101the file. Under RCS and SCCS, the name of the user locking the file
1102is shown; under CVS, an abbreviated version of the @samp{cvs status}
1103output is used. Here is an example using CVS:
1104 1086
1105@smallexample 1087@smallexample
1106@group 1088@group
1107 ./ 1089 ./
1108 modified file1.c 1090 edited configure.ac
1109 needs-update file2.c 1091* added README
1110 needs-merge file3.c 1092 unregistered temp.txt
1093 src/
1094* edited src/main.c
1111@end group 1095@end group
1112@end smallexample 1096@end smallexample
1113 1097
1114@noindent 1098@noindent
1115In this example, @samp{file1.c} is modified with respect to the 1099Two work files have been modified but not committed:
1116repository, and @samp{file2.c} is not. @samp{file3.c} is modified, 1100@file{configure.ac} in the current directory, and @file{foo.c} in the
1117but other changes have also been committed---you need to merge them 1101@file{src/} subdirectory. The file named @file{README} has been added
1118with the work file before you can check it in. 1102but is not yet committed, while @file{temp.txt} is not under version
1119 1103control (@pxref{Registering}).
1120@vindex vc-stay-local 1104
1121@vindex vc-cvs-stay-local 1105The @samp{*} characters next to the entries for @file{README} and
1122 In the above, if the repository were on a remote machine, VC only 1106@file{src/main.c} indicate that the user has marked out these files as
1123contacts it when the variable @code{vc-stay-local} (or 1107the current VC fileset
1124@code{vc-cvs-stay-local}) is @code{nil}
1125@iftex 1108@iftex
1126(@pxref{CVS Options,,,emacs-xtra, Specialized Emacs Features}). 1109(see below).
1127@end iftex 1110@end iftex
1128@ifnottex 1111@ifnottex
1129(@pxref{CVS Options}). 1112(@pxref{VC Directory Commands}).
1113@end ifnottex
1114
1115 The above example is typical for a decentralized version control
1116system like Bazaar, Git, or Mercurial. Other systems can show other
1117statuses. For instance, CVS shows the @samp{needs-update} status if
1118the repository has changes that have not been applied to the work
1119file. RCS and SCCS show the name of the user locking a file as its
1120status.
1121
1122@ifnottex
1123@vindex vc-stay-local
1124@vindex vc-cvs-stay-local
1125 On CVS and Subversion, the @code{vc-dir} command normally contacts
1126the repository, which may be on a remote machine, to check for
1127updates. If you change the variable @code{vc-stay-local} or
1128@code{vc-cvs-stay-local} (for CVS) to @code{nil} (@pxref{CVS
1129Options}), then Emacs avoids contacting a remote repository when
1130generating the VC Directory buffer (it will still contact it when
1131necessary, e.g.@: when doing a commit). This may be desirable if you
1132are working offline or the network is slow.
1130@end ifnottex 1133@end ifnottex
1131This is because access to the repository may be slow, or you may be
1132working offline and not have access to the repository at all. As a
1133consequence, VC would not be able to tell you that @samp{file3.c} is
1134in the ``merge'' state; you would learn that only when you try to
1135check-in your modified copy of the file, or use a command such as
1136@kbd{C-x v m}.
1137
1138 In practice, this is not a problem because CVS handles this case
1139consistently whenever it arises. In VC, you'll simply get prompted to
1140merge the remote changes into your work file first. The benefits of
1141less network communication usually outweigh the disadvantage of not
1142seeing remote changes immediately.
1143 1134
1144@vindex vc-directory-exclusion-list 1135@vindex vc-directory-exclusion-list
1145 When a VC directory displays subdirectories it omits some that 1136 The VC Directory buffer omits subdirectories listed in the variable
1146should never contain any files under version control. By default, 1137@code{vc-directory-exclusion-list}. Its default value contains
1147this includes Version Control subdirectories such as @samp{RCS} and 1138directories that are used internally by version control systems.
1148@samp{CVS}; you can customize this by setting the variable
1149@code{vc-directory-exclusion-list}.
1150 1139
1151@node VC Directory Commands 1140@node VC Directory Commands
1152@subsubsection VC Directory Commands 1141@subsubsection VC Directory Commands
1153 1142
1154 VC Directory mode has a full set of navigation and marking commands 1143 Emacs provides several commands for navigating the VC Directory
1155for picking out filesets. Some of these are also available in a 1144buffer, and for ``marking'' files as belonging to the current VC
1156context menu invoked by @kbd{mouse-2}. 1145fileset.
1157 1146
1158 Up- and down-arrow keys move in the buffer; @kbd{n} and @kbd{p} also 1147@table @kbd
1159move vertically as in other list-browsing modes. @key{SPC} and 1148@item n
1160@key{TAB} behave like down-arrow, and @key{BackTab} behaves like 1149@itemx @key{SPC}
1161up-arrow. 1150Move point to the next entry (@code{vc-dir-next-line}).
1162 1151
1163 Both @kbd{C-m} and @kbd{f} visit the file on the current 1152@item p
1164line. @kbd{o} visits that file in another window. @kbd{q} dismisses 1153Move point to the previous entry (@code{vc-dir-previous-line}).
1165the directory buffer.
1166 1154
1167 @kbd{x} hides up-to-date files. 1155@item @key{TAB}
1156Move to the next directory entry (@code{vc-dir-next-directory}).
1168 1157
1169 @kbd{m} marks the file or directory on the current line. If the 1158@item S-@key{TAB}
1170region is active, @kbd{m} marks all the files in the region. There 1159Move to the previous directory entry
1171are some restrictions when marking: a file cannot be marked if any of 1160(@code{vc-dir-previous-directory}).
1172its parent directories are marked, and a directory cannot be marked if
1173any files in it or in its child directories are marked.
1174 1161
1175 @kbd{M} marks all the files with the same VC state as the current 1162@item @key{RET}
1176file if the cursor is on a file. If the cursor is on a directory, it 1163@itemx f
1177marks all child files. With a prefix argument: marks all files and 1164Visit the file or directory listed on the current line
1178directories. 1165(@code{vc-dir-find-file}).
1179 1166
1180 @kbd{u} unmarks the file or directory on the current line. If the 1167@item o
1181region is active, it unmarks all the files in the region. 1168Visit the file or directory on the current line, in a separate window
1169(@code{vc-dir-find-file-other-window}).
1182 1170
1183 @kbd{U} marks all the files with the same VC state as the current file 1171@item m
1184if the cursor is on a file. If the cursor is on a directory, it 1172Mark the file or directory on the current line (@code{vc-dir-mark}),
1185unmarks all child files. With a prefix argument: unmarks all marked 1173putting it in the current VC fileset. If the region is active, mark
1174all files in the region.
1175
1176A file cannot be marked with this command if it is already in a marked
1177directory, or one of its subdirectories. Similarly, a directory
1178cannot be marked with this command if any file in its tree is marked.
1179
1180@item M
1181If point is on a file entry, mark all files with the same status; if
1182point is on a directory entry, mark all files in that directory tree
1183(@code{vc-dir-mark-all-files}). With a prefix argument, mark all
1184listed files and directories.
1185
1186@kindex q @r{(VC Directory)}
1187@findex quit-window
1188@item q
1189Bury the VC Directory buffer, and delete its window if the window was
1190created just for that buffer.
1191
1192@item u
1193Unmark the file or directory on the current line. If the region is
1194active, unmark all the files in the region (@code{vc-dir-unmark}).
1195
1196@item U
1197If point is on a file entry, unmark all files with the same status; if
1198point is on a directory entry, unmark all files in that directory tree
1199(@code{vc-dir-unmark-all-files}). With a prefix argument, unmark all
1186files and directories. 1200files and directories.
1187 1201
1188 It is possible to do search, search and replace, incremental search, 1202@item x
1189and incremental regexp search on multiple files. These commands will 1203Hide files with @samp{up-to-date} status
1190work on all the marked files or the current file if nothing is marked. 1204(@code{vc-dir-hide-up-to-date}).
1191If a directory is marked, the files in that directory shown in the VC
1192directory buffer will be used.
1193 1205
1194 @kbd{S} searches the marked files. 1206@item q
1207Quit the VC Directory buffer, and bury it (@code{quit-window}).
1208@end table
1195 1209
1196 @kbd{Q} does a query replace on the marked files. 1210@findex vc-dir-mark
1211@findex vc-dir-mark-all-files
1212 While in the VC Directory buffer, all the files that you mark with
1213@kbd{m} (@code{vc-dir-mark}) or @kbd{M} (@code{vc-dir-mark}) are in
1214the current VC fileset. If you mark a directory entry with @kbd{m},
1215all the listed files in that directory tree are in the current VC
1216fileset. The files and directories that belong to the current VC
1217fileset are indicated with a @samp{*} character in the VC Directory
1218buffer, next to their VC status. In this way, you can set up a
1219multi-file VC fileset to be acted on by VC commands like @w{@kbd{C-x v
1220v}} (@pxref{Basic VC Editing}), @w{@kbd{C-x v =}} (@pxref{Old
1221Revisions}), and @w{@kbd{C-x v u}} (@pxref{VC Undo}).
1222
1223 The VC Directory buffer also defines some single-key shortcuts for
1224VC commands with the @kbd{C-x v} prefix: @kbd{=}, @kbd{+}, @kbd{l},
1225@kbd{i}, and @kbd{v}.
1226
1227 For example, you can commit a set of edited files by opening a VC
1228Directory buffer, where the files are listed with the @samp{edited}
1229status; marking the files; and typing @kbd{v} or @kbd{C-x v v}
1230(@code{vc-next-action}). If the version control system is
1231changeset-based, Emacs will commit the files in a single revision.
1232
1233 While in the VC Directory buffer, you can also perform search and
1234replace on the current VC fileset, with the following commands:
1197 1235
1198 @kbd{M-s a C-s} does an incremental search on the marked files. 1236@table @kbd
1237@item S
1238Search the fileset (@code{vc-dir-search}).
1199 1239
1200 @kbd{M-s a C-M-s} does an incremental regular expression search 1240@item Q
1201on the marked files. 1241Do a regular expression query replace on the fileset
1242(@code{vc-dir-query-replace-regexp}).
1243
1244@item M-s a C-s
1245Do an incremental search on the fileset (@code{vc-dir-isearch}).
1246
1247@item M-s a C-M-s
1248Do an incremental regular expression search on the fileset
1249(@code{vc-dir-isearch-regexp}).
1250@end table
1251
1252@noindent
1253Apart from acting on multiple files, these commands behave much like
1254their single-buffer counterparts (@pxref{Search}).
1202 1255
1203@cindex stashes in version control 1256@cindex stashes in version control
1204@cindex shelves in version control 1257@cindex shelves in version control
1205 Commands are also accessible from the VC-dir menu. Note that some 1258 The above commands are also available via the menu bar, and via a
1206VC backends use the VC-dir menu to make available extra, 1259context menu invoked by @kbd{Mouse-2}. Furthermore, some VC backends
1207backend-specific, commands. For example, Git and Bazaar allow you to 1260use the menu to provide extra backend-specific commands. For example,
1208manipulate @dfn{stashes} and @dfn{shelves}. (These provide a 1261Git and Bazaar allow you to manipulate @dfn{stashes} and @dfn{shelves}
1209mechanism to temporarily store uncommitted changes somewhere out of 1262(where are a way to temporarily put aside uncommitted changes, and
1210the way, and bring them back at a later time.) 1263bring them back at a later time).
1211
1212 Normal VC commands with the @kbd{C-x v} prefix work in VC directory
1213buffers. Some single-key shortcuts are available as well; @kbd{=},
1214@kbd{+}, @kbd{l}, @kbd{i}, and @kbd{v} behave as through prefixed with
1215@kbd{C-x v}.
1216
1217 The command @kbd{C-x v v} (@code{vc-next-action}) operates on all
1218the marked files, so that you can commit several files at once. If
1219the underlying VC supports atomic commits of multiple-file changesets,
1220@kbd{C-x v v} with a selected set of modified but not committed files
1221will commit all of them at once as a single changeset.
1222
1223 When @kbd{C-x v v} (@code{vc-next-action}) operates on multiple
1224files, all of those files must be either in the same state or in
1225compatible states (added, modified and removed states are considered
1226compatible). Otherwise it signals an error. This differs from the
1227behavior of older versions of VC, which did not have fileset
1228operations and simply did @code{vc-next-action} on each file
1229individually.
1230
1231 If any files are in a state that calls for commit, @kbd{C-x v v} reads a
1232single log entry and uses it for the changeset as a whole. If the
1233underling VCS is file- rather than changeset-oriented, the log entry
1234will be replicated into the history of each file.
1235 1264
1236@node Branches 1265@node Branches
1237@subsection Multiple Branches of a File 1266@subsection Version Control Branches
1238@cindex branch (version control) 1267@cindex branch (version control)
1239@cindex trunk (version control) 1268
1240 1269 One use of version control is to support multiple independent lines
1241 One use of version control is to maintain multiple ``current'' 1270of development, which are called @dfn{branches}. Branches are used
1242revisions of a file. For example, you might have different revisions of a 1271for maintaining separate ``stable'' and ``development'' versions of a
1243program in which you are gradually adding various unfinished new 1272program, and for developing unrelated features in isolation from one
1244features. Each such independent line of development is called a 1273another.
1245@dfn{branch}. VC allows you to create branches, switch between 1274
1246different branches, and merge changes from one branch to another. 1275 VC's support for branch operations is currently fairly limited. For
1247Please note, however, that branches are not supported for SCCS. 1276decentralized version control systems, it provides commands for
1248 1277@dfn{updating} one branch with the contents of another, and for
1249 A file's main line of development is usually called the @dfn{trunk}. 1278@dfn{merging} the changes made to two different branches
1250You can create multiple branches from the trunk. How the difference 1279(@pxref{Merging}). For centralized version control systems, it
1251between trunk and branch is made visible is dependent on whether the 1280supports checking out different branches and committing into new or
1252VCS uses dot-pair or monotonic version IDs. 1281different branches.
1253
1254 In VCSes with dot-pair revision IDs, the revisions on the trunk are
1255normally IDed 1.1, 1.2, 1.3, etc. At any such revision, you can
1256start an independent branch. A branch starting at revision 1.2 would
1257have revision ID 1.2.1.1, and consecutive revisions on this branch
1258would have IDs 1.2.1.2, 1.2.1.3, 1.2.1.4, and so on. If there is
1259a second branch also starting at revision 1.2, it would consist of
1260revisions 1.2.2.1, 1.2.2.2, 1.2.2.3, etc.
1261
1262 In VCSes with monotonic revision IDs, trunk revisions are IDed as
12631, 2, 3, etc. A branch from (say) revision 2 might start with 2.1 and
1264continue through 2.2, 2.3, etc. But naming conventions for branches
1265and subbranches vary widely on these systems, and some (like
1266Mercurial) never depart from the monotonic integer sequence at all.
1267Consult the documentation of the VCS you are using.
1268
1269@cindex head revision
1270 If you omit the final component of a dot-pair revision ID, that is called a
1271@dfn{branch ID}. It refers to the highest existing revision on that
1272branch---the @dfn{head revision} of that branch. The branches in the
1273dot-pair example above have branch IDs 1.2.1 and 1.2.2.
1274 1282
1275@menu 1283@menu
1276* Switching Branches:: How to get to another existing branch. 1284* Switching Branches:: How to get to another existing branch.
1277* Creating Branches:: How to start a new branch. 1285* VC Pull:: Updating the contents of a branch.
1278* Merging:: Transferring changes between branches. 1286* Merging:: Transferring changes between branches.
1279* Multi-User Branching:: Multiple users working at multiple branches 1287* Creating Branches:: How to start a new branch.
1280 in parallel.
1281@end menu 1288@end menu
1282 1289
1283@node Switching Branches 1290@node Switching Branches
1284@subsubsection Switching between Branches 1291@subsubsection Switching between Branches
1285 1292
1286 To switch between branches, type @kbd{C-u C-x v v} and specify the 1293 The various version control systems differ in how branches are
1287revision ID you want to select. On a locking-based system, this 1294implemented, and these differences cannot be entirely concealed by VC.
1288version is then visited @emph{unlocked} (write-protected), so you can 1295
1289examine it before locking it. Switching branches in this way is allowed 1296 On some decentralized version control systems, including Bazaar and
1290only when the file is not locked. 1297Mercurial in its normal mode of operation, each branch has its own
1291 1298working directory tree, so switching between branches just involves
1292 On a VCS with dot-pair IDs, you can omit the minor part, thus giving 1299switching directories. On Git, switching between branches is done
1293only the branch ID; this takes you to the head version on the 1300using the @command{git branch} command, which changes the contents of
1294chosen branch. If you only type @key{RET}, Emacs goes to the highest 1301the working tree itself.
1295version on the trunk. 1302
1303 On centralized version control systems, you can switch between
1304branches by typing @kbd{C-u C-x v v} in an up-to-date work file
1305(@pxref{Advanced C-x v v}), and entering the revision ID for a
1306revision on another branch. On CVS, for instance, revisions on the
1307@dfn{trunk} (the main line of development) normally have IDs of the
1308form 1.1, 1.2, 1.3, @dots{}, while the first branch created from (say)
1309revision 1.2 has revision IDs 1.2.1.1, 1.2.1.2, @dots{}, the second
1310branch created from revision 1.2 has revision IDs 1.2.2.1, 1.2.2.2,
1311@dots{}, and so forth. You can also specify the @dfn{branch ID},
1312which is a branch revision ID omitting its final component
1313(e.g.@: 1.2.1), to switch to the latest revision on that branch.
1314
1315 On a locking-based system, switching to a different branch also
1316unlocks (write-protects) the working tree.
1317
1318 Once you have switched to a branch, VC commands will apply to that
1319branch until you switch away; for instance, any VC filesets that you
1320commit will be committed to that specific branch.
1321
1322@node VC Pull
1323@subsubsection Pulling Changes into a Branch
1296 1324
1297 After you have switched to any branch (including the main branch), you 1325@table @kbd
1298stay on it for subsequent VC commands, until you explicitly select some 1326@itemx C-x v +
1299other branch. 1327On a decentralized version control system, update the current branch
1328by ``pulling in'' changes from another location.
1300 1329
1301@node Creating Branches 1330On a centralized version control system, update the current VC
1302@subsubsection Creating New Branches 1331fileset.
1332@end table
1303 1333
1304 To create a new branch from a head revision (one that is the latest 1334@kindex C-x v +
1305in the branch that contains it), first select that revision if 1335@findex vc-pull
1306necessary, lock it with @kbd{C-x v v}, and make whatever changes you 1336 On a decentralized version control system, the command @kbd{C-x v +}
1307want. Then, when you commit the changes, use @kbd{C-u C-x v v}. This 1337(@code{vc-pull}) updates the current branch and working tree. It is
1308lets you specify the revision ID for the new revision. You should 1338typically used to update a copy of a remote branch. If you supply a
1309specify a suitable branch ID for a branch starting at the current 1339prefix argument, the command prompts for the exact version control
1310revision. For example, if the current revision is 2.5, the branch ID 1340command to use, which lets you specify where to pull changes from.
1311should be 2.5.1, 2.5.2, and so on, depending on the number of existing 1341Otherwise, it pulls from a default location determined by the version
1312branches at that point. 1342control system.
1313
1314 To create a new branch at an older revision (one that is no longer the
1315head of a branch), first select that revision (@pxref{Switching
1316Branches}). Your procedure will then differ depending on whether you
1317are using a locking or merging-based VCS.
1318 1343
1319 On a locking VCS, you will need to lock the old revision branch with 1344 Amongst decentralized version control systems, @kbd{C-x v +} is
1320@kbd{C-x v v}. You'll be asked to confirm, when you lock the old 1345currently supported only by Bazaar, Git, and Mercurial. On Bazaar, it
1321revision, that you really mean to create a new branch---if you say no, 1346calls @command{bzr pull} for ordinary branches (to pull from a master
1322you'll be offered a chance to lock the latest revision instead. On 1347branch into a mirroring branch), and @command{bzr update} for a bound
1323a merging-based VCS you will skip this step. 1348branch (to pull from a central repository). On Git, it calls
1349@command{git pull} to fetch changes from a remote repository and merge
1350it into the current branch. On Mercurial, it calls @command{hg pull
1351-u} to fetch changesets from the default remote repository and update
1352the working directory.
1324 1353
1325 Then make your changes and type @kbd{C-x v v} again to commit a new 1354 Prior to pulling, you can use @kbd{C-x v I} (@code{vc-log-incoming})
1326revision. This automatically creates a new branch starting from the 1355to view a log buffer of the changes to be applied. @xref{VC Change
1327selected revision. You need not specially request a new branch, 1356Log}.
1328because that's the only way to add a new revision at a point that is
1329not the head of a branch.
1330 1357
1331 After the branch is created, you ``stay'' on it. That means that 1358 On a centralized version control system like CVS, @kbd{C-x v +}
1332subsequent check-ins create new revisions on that branch. To leave the 1359updates the current VC fileset from the repository.
1333branch, you must explicitly select a different revision with @kbd{C-u C-x
1334v v}. To transfer changes from one branch to another, use the merge
1335command, described in the next section.
1336 1360
1337@node Merging 1361@node Merging
1338@subsubsection Merging Branches 1362@subsubsection Merging Branches
1339
1340@cindex merging changes 1363@cindex merging changes
1341 When you have finished the changes on a certain branch, you will
1342often want to incorporate them into the file's main line of development
1343(the trunk). This is not a trivial operation, because development might
1344also have proceeded on the trunk, so that you must @dfn{merge} the
1345changes into a file that has already been changed otherwise. VC allows
1346you to do this (and other things) with the @code{vc-merge} command.
1347 1364
1348@table @kbd 1365@table @kbd
1349@item C-x v m (vc-merge) 1366@itemx C-x v m
1350Merge changes into the work file. 1367On a decentralized version control system, merge changes from another
1368branch into the current one.
1369
1370On a centralized version control system, merge changes from another
1371branch into the current VC fileset.
1351@end table 1372@end table
1352 1373
1353@kindex C-x v m 1374 While developing a branch, you may sometimes need to @dfn{merge} in
1354@findex vc-merge 1375changes that have already been made in another branch. This is not a
1355 @kbd{C-x v m} (@code{vc-merge}) takes a set of changes and merges it 1376trivial operation, as overlapping changes may have been made to the
1356into the current version of the work file. It firsts asks you in the 1377two branches.
1357minibuffer where the changes should come from. If you just type 1378
1358@key{RET}, Emacs merges any changes that were made on the same branch 1379 On a decentralized version control system, merging is done with the
1359since you checked the file out (we call this @dfn{merging the news}). 1380command @kbd{C-x v m} (@code{vc-merge}). On Bazaar, this prompts for
1360This is the common way to pick up recent changes from the repository, 1381the exact arguments to pass to @command{bzr merge}, offering a
1361regardless of whether you have already changed the file yourself. 1382sensible default if possible. On Git, this prompts for the name of a
1362 1383branch to merge from, with completion (based on the branch names known
1363 You can also enter a branch ID or a pair of revision IDs in 1384to the current repository). The output from running the merge command
1364the minibuffer. Then @kbd{C-x v m} finds the changes from that 1385is shown in a separate buffer.
1365branch, or the differences between the two revisions you specified, and 1386
1366merges them into the current revision of the current file. 1387 On a centralized version control system like CVS, @kbd{C-x v m}
1367 1388prompts for a branch ID, or a pair of revision IDs (@pxref{Switching
1368 As an example, suppose that you have finished a certain feature on 1389Branches}); then it finds the changes from that branch, or the changes
1369branch 1.3.1. In the meantime, development on the trunk has proceeded 1390between the two revisions you specified, and merges those changes into
1370to revision 1.5. To merge the changes from the branch to the trunk, 1391the current VC fileset. If you just type @key{RET}, Emacs simply
1371first go to the head revision of the trunk, by typing @kbd{C-u C-x v v 1392merges any changes that were made on the same branch since you checked
1372@key{RET}}. Revision 1.5 is now current. If locking is used for the file, 1393the file out.
1373type @kbd{C-x v v} to lock revision 1.5 so that you can change it. Next,
1374type @kbd{C-x v m 1.3.1 @key{RET}}. This takes the entire set of changes on
1375branch 1.3.1 (relative to revision 1.3, where the branch started, up to
1376the last revision on the branch) and merges it into the current revision
1377of the work file. You can now commit the changed file, thus creating
1378revision 1.6 containing the changes from the branch.
1379
1380 It is possible to do further editing after merging the branch, before
1381the next check-in. But it is usually wiser to commit the merged
1382revision, then lock it and make the further changes. This will keep
1383a better record of the history of changes.
1384 1394
1385@cindex conflicts 1395@cindex conflicts
1386@cindex resolving conflicts 1396@cindex resolving conflicts
1387 When you merge changes into a file that has itself been modified, the 1397 Immediately after performing a merge, only the working tree is
1388changes might overlap. We call this situation a @dfn{conflict}, and 1398modified, and you can review the changes produced by the merge with
1389reconciling the conflicting changes is called @dfn{resolving a 1399@kbd{C-x v D} and related commands (@pxref{Old Revisions}). If the
1390conflict}. 1400two branches contained overlapping changes, merging produces a
1391 1401@dfn{conflict}; a warning appears in the output of the merge command,
1392 Whenever conflicts occur during merging, VC detects them, tells you 1402and @dfn{conflict markers} are inserted into each affected work file,
1393about them in the echo area, and asks whether you want help in merging. 1403surrounding the two sets of conflicting changes. You must then
1394If you say yes, it starts an Ediff session (@pxref{Top, 1404resolve the conflict by editing the conflicted files. Once you are
1395Ediff, Ediff, ediff, The Ediff Manual}). 1405done, the modified files must be committed in the usual way for the
1396 1406merge to take effect (@pxref{Basic VC Editing}).
1397 If you say no, the conflicting changes are both inserted into the
1398file, surrounded by @dfn{conflict markers}. The example below shows how
1399a conflict region looks; the file is called @samp{name} and the current
1400master file revision with user B's changes in it is 1.11.
1401
1402@c @w here is so CVS won't think this is a conflict.
1403@smallexample
1404@group
1405@w{<}<<<<<< name
1406 @var{User A's version}
1407=======
1408 @var{User B's version}
1409@w{>}>>>>>> 1.11
1410@end group
1411@end smallexample
1412 1407
1413@findex vc-resolve-conflicts 1408@node Creating Branches
1414 Then you can resolve the conflicts by editing the file manually. Or 1409@subsubsection Creating New Branches
1415you can type @code{M-x vc-resolve-conflicts} after visiting the file. 1410
1416This starts an Ediff session, as described above. Don't forget to 1411 On centralized version control systems like CVS, Emacs supports
1417commit the merged version afterwards. 1412creating new branches as part of a commit operation. When committing
1418 1413a modified VC fileset, type @kbd{C-u C-x v v} (@code{vc-next-action}
1419@findex vc-find-conflicted-file 1414with a prefix argument; @pxref{Advanced C-x v v}). Then Emacs prompts
1420 If there is more than one conflicted file in a merge, type @kbd{M-x 1415for a revision ID for the new revision. You should specify a suitable
1421vc-find-conflicted-file} after resolving the conflicts in each file. 1416branch ID for a branch starting at the current revision. For example,
1422This command visits the next conflicted file, and moves point to the 1417if the current revision is 2.5, the branch ID should be 2.5.1, 2.5.2,
1423first conflict marker in that file. 1418and so on, depending on the number of existing branches at that point.
1424 1419
1425@node Multi-User Branching 1420 To create a new branch at an older revision (one that is no longer
1426@subsubsection Multi-User Branching 1421the head of a branch), first select that revision (@pxref{Switching
1427 1422Branches}). Your procedure will then differ depending on whether you
1428 It is often useful for multiple developers to work simultaneously on 1423are using a locking or merging-based VCS.
1429different branches of a file. CVS and later systems allow this by 1424
1430default; for RCS, it is possible if you create multiple source 1425 On a locking VCS, you will need to lock the old revision branch with
1431directories. Each source directory should have a link named 1426@kbd{C-x v v}. You'll be asked to confirm, when you lock the old
1432@file{RCS} which points to a common directory of RCS master files. 1427revision, that you really mean to create a new branch---if you say no,
1433Then each source directory can have its own choice of selected 1428you'll be offered a chance to lock the latest revision instead. On a
1434revisions, but all share the same common RCS records. 1429merging-based VCS you will skip this step.
1435 1430
1436 This technique works reliably and automatically, provided that the 1431 Then make your changes and type @kbd{C-x v v} again to commit a new
1437source files contain RCS version headers 1432revision. This creates a new branch starting from the selected
1438@iftex 1433revision.
1439(@pxref{Version Headers,,,emacs-xtra, Specialized Emacs Features}).
1440@end iftex
1441@ifnottex
1442(@pxref{Version Headers}).
1443@end ifnottex
1444The headers enable Emacs to be sure, at all times, which revision
1445ID is present in the work file.
1446 1434
1447 If the files do not have version headers, you must instead tell Emacs 1435 After the branch is created, subsequent commits create new revisions
1448explicitly in each session which branch you are working on. To do this, 1436on that branch. To leave the branch, you must explicitly select a
1449first find the file, then type @kbd{C-u C-x v v} and specify the correct 1437different revision with @kbd{C-u C-x v v}.
1450branch ID. This ensures that Emacs knows which branch it is using
1451during this particular editing session.
1452 1438
1453@ifnottex 1439@ifnottex
1454@include vc1-xtra.texi 1440@include vc1-xtra.texi
@@ -1458,13 +1444,11 @@ during this particular editing session.
1458@section Change Logs 1444@section Change Logs
1459 1445
1460@cindex change log 1446@cindex change log
1461 A change log file contains a chronological record of when and why you 1447 Many software projects keep a @dfn{change log}. This is a file,
1462have changed a program, consisting of a sequence of entries describing 1448normally named @file{ChangeLog}, containing a chronological record of
1463individual changes. Normally it is kept in a file called 1449when and how the program was changed. Sometimes, there are several
1464@file{ChangeLog} in the same directory as the file you are editing, or 1450change log files, each recording the changes in one directory or
1465one of its parent directories. A single @file{ChangeLog} file can 1451directory tree.
1466record changes for all the files in its directory and all its
1467subdirectories.
1468 1452
1469@menu 1453@menu
1470* Change Log Commands:: Commands for editing change log files. 1454* Change Log Commands:: Commands for editing change log files.
@@ -1496,7 +1480,7 @@ rather than starting a new item.
1496 1480
1497You can combine multiple changes of the same nature. If you don't 1481You can combine multiple changes of the same nature. If you don't
1498enter any text after the initial @kbd{C-x 4 a}, any subsequent 1482enter any text after the initial @kbd{C-x 4 a}, any subsequent
1499@kbd{C-x 4 a} adds another symbol to the change. 1483@kbd{C-x 4 a} adds another symbol to the change log entry.
1500 1484
1501@vindex add-log-always-start-new-record 1485@vindex add-log-always-start-new-record
1502 If @code{add-log-always-start-new-record} is non-@code{nil}, 1486 If @code{add-log-always-start-new-record} is non-@code{nil},
@@ -1534,15 +1518,7 @@ ordering of entries.
1534 Version control systems are another way to keep track of changes in 1518 Version control systems are another way to keep track of changes in
1535your program and keep a change log. In the VC log buffer, typing 1519your program and keep a change log. In the VC log buffer, typing
1536@kbd{C-c C-a} (@code{log-edit-insert-changelog}) inserts the relevant 1520@kbd{C-c C-a} (@code{log-edit-insert-changelog}) inserts the relevant
1537Change Log entry, if one exists (@pxref{Log Buffer}). You can also 1521Change Log entry, if one exists. @xref{Log Buffer}.
1538insert a VC log entry into a Change Log buffer by typing @kbd{C-x v a}
1539(@code{vc-update-change-log}) in the Change Log buffer
1540@iftex
1541(@pxref{Change Logs and VC,,,emacs-xtra, Specialized Emacs Features}).
1542@end iftex
1543@ifnottex
1544(@pxref{Change Logs and VC}).
1545@end ifnottex
1546 1522
1547@node Format of ChangeLog 1523@node Format of ChangeLog
1548@subsection Format of ChangeLog 1524@subsection Format of ChangeLog
@@ -1597,8 +1573,8 @@ Of course, you should substitute the proper years and copyright holder.
1597@cindex tags and tag tables 1573@cindex tags and tag tables
1598 1574
1599 A @dfn{tag} is a reference to a subunit in a program or in a 1575 A @dfn{tag} is a reference to a subunit in a program or in a
1600document. In program source code, tags reference syntactic elements 1576document. In source code, tags reference syntactic elements of the
1601of the program: functions, subroutines, data types, macros, etc. In a 1577program: functions, subroutines, data types, macros, etc. In a
1602document, tags reference chapters, sections, appendices, etc. Each 1578document, tags reference chapters, sections, appendices, etc. Each
1603tag specifies the name of the file where the corresponding subunit is 1579tag specifies the name of the file where the corresponding subunit is
1604defined, and the position of the subunit's definition in that file. 1580defined, and the position of the subunit's definition in that file.
@@ -1612,34 +1588,36 @@ a Yacc parser, or from Lex scanner definitions; @file{.i} preprocessed
1612C files; and Fortran files produced by preprocessing @file{.fpp} 1588C files; and Fortran files produced by preprocessing @file{.fpp}
1613source files. 1589source files.
1614 1590
1615 To produce a tags table, you use the @samp{etags} command, 1591@cindex etags
1616submitting it a document or the source code of a program. 1592 To produce a tags table, you run the @command{etags} shell command
1617@samp{etags} writes the tags to a @dfn{tags table file}, or @dfn{tags 1593on a document or the source code file. The @samp{etags} program
1618file} in short. The conventional name for a tags file is @file{TAGS}. 1594writes the tags to a @dfn{tags table file}, or @dfn{tags file} in
1595short. The conventional name for a tags file is @file{TAGS}.
1596@xref{Create Tags Table}.
1619 1597
1620 Emacs uses the information recorded in tags tables in commands that 1598 Emacs provides many commands for searching and replacing using the
1621search or replace through multiple source files: these commands use 1599information recorded in tags tables. For instance, the @kbd{M-.}
1622the names of the source files recorded in the tags table to know which 1600(@code{find-tag}) jumps to the location of a specified function
1623files to search. Other commands, such as @kbd{M-.}, which finds the 1601definition in its source file. @xref{Find Tag}.
1624definition of a function, use the recorded information about the
1625function names and positions to find the source file and the position
1626within that file where the function is defined.
1627 1602
1628@cindex C++ class browser, tags 1603@cindex C++ class browser, tags
1629@cindex tags, C++ 1604@cindex tags, C++
1630@cindex class browser, C++ 1605@cindex class browser, C++
1631@cindex Ebrowse 1606@cindex Ebrowse
1632 See also the Ebrowse facility, which is tailored for C++. 1607 The Ebrowse facility is similar to @command{etags} but specifically
1633@xref{Top,, Ebrowse, ebrowse, Ebrowse User's Manual}. 1608tailored for C++. @xref{Top,, Ebrowse, ebrowse, Ebrowse User's
1609Manual}. The Semantic package provides another way to generate and
1610use tags, separate from the @command{etags} facility.
1611@xref{Semantic}.
1634 1612
1635@menu 1613@menu
1636* Tag Syntax:: Tag syntax for various types of code and text files. 1614* Tag Syntax:: Tag syntax for various types of code and text files.
1637* Create Tags Table:: Creating a tags table with @code{etags}. 1615* Create Tags Table:: Creating a tags table with @command{etags}.
1638* Etags Regexps:: Create arbitrary tags using regular expressions. 1616* Etags Regexps:: Create arbitrary tags using regular expressions.
1639* Select Tags Table:: How to visit a tags table. 1617* Select Tags Table:: How to visit a tags table.
1640* Find Tag:: Commands to find the definition of a specific tag. 1618* Find Tag:: Commands to find the definition of a specific tag.
1641* Tags Search:: Using a tags table for searching and replacing. 1619* Tags Search:: Using a tags table for searching and replacing.
1642* List Tags:: Listing and finding tags defined in a file. 1620* List Tags:: Using tags for completion, and listing them.
1643@end menu 1621@end menu
1644 1622
1645@node Tag Syntax 1623@node Tag Syntax
@@ -1661,7 +1639,7 @@ and @samp{--no-members} can make the tags table file much smaller.
1661 1639
1662You can tag function declarations and external variables in addition 1640You can tag function declarations and external variables in addition
1663to function definitions by giving the @samp{--declarations} option to 1641to function definitions by giving the @samp{--declarations} option to
1664@code{etags}. 1642@command{etags}.
1665 1643
1666@item 1644@item
1667In C++ code, in addition to all the tag constructs of C code, member 1645In C++ code, in addition to all the tag constructs of C code, member
@@ -1678,15 +1656,15 @@ Tags for variables and functions in classes are named
1678@samp{@var{class}.@var{variable}} and @samp{@var{class}.@var{function}}. 1656@samp{@var{class}.@var{variable}} and @samp{@var{class}.@var{function}}.
1679 1657
1680@item 1658@item
1681In La@TeX{} text, the argument of any of the commands @code{\chapter}, 1659In La@TeX{} documents, the arguments for @code{\chapter},
1682@code{\section}, @code{\subsection}, @code{\subsubsection}, 1660@code{\section}, @code{\subsection}, @code{\subsubsection},
1683@code{\eqno}, @code{\label}, @code{\ref}, @code{\cite}, 1661@code{\eqno}, @code{\label}, @code{\ref}, @code{\cite},
1684@code{\bibitem}, @code{\part}, @code{\appendix}, @code{\entry}, 1662@code{\bibitem}, @code{\part}, @code{\appendix}, @code{\entry},
1685@code{\index}, @code{\def}, @code{\newcommand}, @code{\renewcommand}, 1663@code{\index}, @code{\def}, @code{\newcommand}, @code{\renewcommand},
1686@code{\newenvironment} or @code{\renewenvironment} is a tag.@refill 1664@code{\newenvironment} and @code{\renewenvironment} are tags.
1687 1665
1688Other commands can make tags as well, if you specify them in the 1666Other commands can make tags as well, if you specify them in the
1689environment variable @env{TEXTAGS} before invoking @code{etags}. The 1667environment variable @env{TEXTAGS} before invoking @command{etags}. The
1690value of this environment variable should be a colon-separated list of 1668value of this environment variable should be a colon-separated list of
1691command names. For example, 1669command names. For example,
1692 1670
@@ -1818,9 +1796,9 @@ Regexps}) to handle other formats and languages.
1818 1796
1819@node Create Tags Table 1797@node Create Tags Table
1820@subsection Creating Tags Tables 1798@subsection Creating Tags Tables
1821@cindex @code{etags} program 1799@cindex @command{etags} program
1822 1800
1823 The @code{etags} program is used to create a tags table file. It knows 1801 The @command{etags} program is used to create a tags table file. It knows
1824the syntax of several languages, as described in 1802the syntax of several languages, as described in
1825@iftex 1803@iftex
1826the previous section. 1804the previous section.
@@ -1828,58 +1806,51 @@ the previous section.
1828@ifnottex 1806@ifnottex
1829@ref{Tag Syntax}. 1807@ref{Tag Syntax}.
1830@end ifnottex 1808@end ifnottex
1831Here is how to run @code{etags}: 1809Here is how to run @command{etags}:
1832 1810
1833@example 1811@example
1834etags @var{inputfiles}@dots{} 1812etags @var{inputfiles}@dots{}
1835@end example 1813@end example
1836 1814
1837@noindent 1815@noindent
1838The @code{etags} program reads the specified files, and writes a tags 1816The @command{etags} program reads the specified files, and writes a tags
1839table named @file{TAGS} in the current working directory. You can 1817table named @file{TAGS} in the current working directory. You can
1840optionally specify a different file name for the tags table by using the 1818optionally specify a different file name for the tags table by using the
1841@samp{--output=@var{file}} option; specifying @file{-} as a file name 1819@samp{--output=@var{file}} option; specifying @file{-} as a file name
1842prints the tags table to standard output. 1820prints the tags table to standard output.
1843 1821
1844 If the specified files don't exist, @code{etags} looks for 1822 If the specified files don't exist, @command{etags} looks for
1845compressed versions of them and uncompresses them to read them. Under 1823compressed versions of them and uncompresses them to read them. Under
1846MS-DOS, @code{etags} also looks for file names like @file{mycode.cgz} 1824MS-DOS, @command{etags} also looks for file names like @file{mycode.cgz}
1847if it is given @samp{mycode.c} on the command line and @file{mycode.c} 1825if it is given @samp{mycode.c} on the command line and @file{mycode.c}
1848does not exist. 1826does not exist.
1849 1827
1850 @code{etags} recognizes the language used in an input file based on 1828 If the tags table becomes outdated due to changes in the files
1851its file name and contents. You can specify the language with the 1829described in it, you can update it by running the @command{etags}
1852@samp{--language=@var{name}} option, described below. 1830program again. If the tags table does not record a tag, or records it
1853 1831for the wrong file, then Emacs will not be able to find that
1854 If the tags table data become outdated due to changes in the files 1832definition until you update the tags table. But if the position
1855described in the table, the way to update the tags table is the same 1833recorded in the tags table becomes a little bit wrong (due to other
1856way it was made in the first place. If the tags table fails to record 1834editing), Emacs will still be able to find the right position, with a
1857a tag, or records it for the wrong file, then Emacs cannot possibly 1835slight delay.
1858find its definition until you update the tags table. However, if the
1859position recorded in the tags table becomes a little bit wrong (due to
1860other editing), the worst consequence is a slight delay in finding the
1861tag. Even if the stored position is very far wrong, Emacs will still
1862find the tag, after searching most of the file for it. That delay is
1863hardly noticeable with today's computers.
1864 1836
1865 Thus, there is no need to update the tags table after each edit. 1837 Thus, there is no need to update the tags table after each edit.
1866You should update a tags table when you define new tags that you want 1838You should update a tags table when you define new tags that you want
1867to have listed, or when you move tag definitions from one file to 1839to have listed, or when you move tag definitions from one file to
1868another, or when changes become substantial. 1840another, or when changes become substantial.
1869 1841
1870 One tags table can virtually include another. Specify the included 1842 You can make a tags table @dfn{include} another tags table, by
1871tags file name with the @samp{--include=@var{file}} option when 1843passing the @samp{--include=@var{file}} option to @command{etags}. It
1872creating the file that is to include it. The latter file then acts as 1844then covers all the files covered by the included tags file, as well
1873if it covered all the source files specified in the included file, as 1845as its own.
1874well as the files it directly contains.
1875 1846
1876 If you specify the source files with relative file names when you run 1847 If you specify the source files with relative file names when you run
1877@code{etags}, the tags file will contain file names relative to the 1848@command{etags}, the tags file will contain file names relative to the
1878directory where the tags file was initially written. This way, you can 1849directory where the tags file was initially written. This way, you can
1879move an entire directory tree containing both the tags file and the 1850move an entire directory tree containing both the tags file and the
1880source files, and the tags file will still refer correctly to the source 1851source files, and the tags file will still refer correctly to the source
1881files. If the tags file is @file{-} or is in the @file{/dev} directory, 1852files. If the tags file is @file{-} or is in the @file{/dev} directory,
1882however, the file names are 1853however, the file names are
1883made relative to the current working directory. This is useful, for 1854made relative to the current working directory. This is useful, for
1884example, when writing the tags to @file{/dev/stdout}. 1855example, when writing the tags to @file{/dev/stdout}.
1885 1856
@@ -1887,40 +1858,41 @@ example, when writing the tags to @file{/dev/stdout}.
1887pointing to a tags file in a different directory, because this would 1858pointing to a tags file in a different directory, because this would
1888generally render the file names invalid. 1859generally render the file names invalid.
1889 1860
1890 If you specify absolute file names as arguments to @code{etags}, then 1861 If you specify absolute file names as arguments to @command{etags}, then
1891the tags file will contain absolute file names. This way, the tags file 1862the tags file will contain absolute file names. This way, the tags file
1892will still refer to the same files even if you move it, as long as the 1863will still refer to the same files even if you move it, as long as the
1893source files remain in the same place. Absolute file names start with 1864source files remain in the same place. Absolute file names start with
1894@samp{/}, or with @samp{@var{device}:/} on MS-DOS and MS-Windows. 1865@samp{/}, or with @samp{@var{device}:/} on MS-DOS and MS-Windows.
1895 1866
1896 When you want to make a tags table from a great number of files, you 1867 When you want to make a tags table from a great number of files,
1897may have problems listing them on the command line, because some systems 1868you may have problems listing them on the command line, because some
1898have a limit on its length. The simplest way to circumvent this limit 1869systems have a limit on its length. You can circumvent this limit by
1899is to tell @code{etags} to read the file names from its standard input, 1870telling @command{etags} to read the file names from its standard
1900by typing a dash in place of the file names, like this: 1871input, by typing a dash in place of the file names, like this:
1901 1872
1902@smallexample 1873@smallexample
1903find . -name "*.[chCH]" -print | etags - 1874find . -name "*.[chCH]" -print | etags -
1904@end smallexample 1875@end smallexample
1905 1876
1906 Use the option @samp{--language=@var{name}} to specify the language 1877 @command{etags} recognizes the language used in an input file based
1907explicitly. You can intermix these options with file names; each one 1878on its file name and contents. You can specify the language
1908applies to the file names that follow it. Specify 1879explicitly with the @samp{--language=@var{name}} option. You can
1909@samp{--language=auto} to tell @code{etags} to resume guessing the 1880intermix these options with file names; each one applies to the file
1910language from the file names and file contents. Specify 1881names that follow it. Specify @samp{--language=auto} to tell
1911@samp{--language=none} to turn off language-specific processing 1882@command{etags} to resume guessing the language from the file names
1912entirely; then @code{etags} recognizes tags by regexp matching alone 1883and file contents. Specify @samp{--language=none} to turn off
1913(@pxref{Etags Regexps}). 1884language-specific processing entirely; then @command{etags} recognizes
1885tags by regexp matching alone (@pxref{Etags Regexps}).
1914 1886
1915 The option @samp{--parse-stdin=@var{file}} is mostly useful when 1887 The option @samp{--parse-stdin=@var{file}} is mostly useful when
1916calling @code{etags} from programs. It can be used (only once) in 1888calling @command{etags} from programs. It can be used (only once) in
1917place of a file name on the command line. @code{Etags} will read from 1889place of a file name on the command line. @command{etags} will read from
1918standard input and mark the produced tags as belonging to the file 1890standard input and mark the produced tags as belonging to the file
1919@var{file}. 1891@var{file}.
1920 1892
1921 @samp{etags --help} outputs the list of the languages @code{etags} 1893 @samp{etags --help} outputs the list of the languages @command{etags}
1922knows, and the file name rules for guessing the language. It also prints 1894knows, and the file name rules for guessing the language. It also prints
1923a list of all the available @code{etags} options, together with a short 1895a list of all the available @command{etags} options, together with a short
1924explanation. If followed by one or more @samp{--language=@var{lang}} 1896explanation. If followed by one or more @samp{--language=@var{lang}}
1925options, it outputs detailed information about how tags are generated for 1897options, it outputs detailed information about how tags are generated for
1926@var{lang}. 1898@var{lang}.
@@ -1928,21 +1900,22 @@ options, it outputs detailed information about how tags are generated for
1928@node Etags Regexps 1900@node Etags Regexps
1929@subsection Etags Regexps 1901@subsection Etags Regexps
1930 1902
1931 The @samp{--regex} option provides a general way of recognizing tags 1903 The @samp{--regex} option to @command{etags} allows tags to be
1932based on regexp matching. You can freely intermix this option with 1904recognized by regular expression matching. You can intermix this
1933file names, and each one applies to the source files that follow it. 1905option with file names; each one applies to the source files that
1934If you specify multiple @samp{--regex} options, all of them are used 1906follow it. If you specify multiple @samp{--regex} options, all of
1935in parallel. The syntax is: 1907them are used in parallel. The syntax is:
1936 1908
1937@smallexample 1909@smallexample
1938--regex=[@var{@{language@}}]/@var{tagregexp}/[@var{nameregexp}/]@var{modifiers} 1910--regex=[@var{@{language@}}]/@var{tagregexp}/[@var{nameregexp}/]@var{modifiers}
1939@end smallexample 1911@end smallexample
1940 1912
1941 The essential part of the option value is @var{tagregexp}, the 1913@noindent
1942regexp for matching tags. It is always used anchored, that is, it 1914The essential part of the option value is @var{tagregexp}, the regexp
1943only matches at the beginning of a line. If you want to allow 1915for matching tags. It is always used anchored, that is, it only
1944indented tags, use a regexp that matches initial whitespace; start it 1916matches at the beginning of a line. If you want to allow indented
1945with @samp{[ \t]*}. 1917tags, use a regexp that matches initial whitespace; start it with
1918@samp{[ \t]*}.
1946 1919
1947 In these regular expressions, @samp{\} quotes the next character, and 1920 In these regular expressions, @samp{\} quotes the next character, and
1948all the GCC character escape sequences are supported (@samp{\a} for 1921all the GCC character escape sequences are supported (@samp{\a} for
@@ -1959,7 +1932,7 @@ completion on tag names more reliably. You can find some examples
1959below. 1932below.
1960 1933
1961 The @var{modifiers} are a sequence of zero or more characters that 1934 The @var{modifiers} are a sequence of zero or more characters that
1962modify the way @code{etags} does the matching. A regexp with no 1935modify the way @command{etags} does the matching. A regexp with no
1963modifiers is applied sequentially to each line of the input file, in a 1936modifiers is applied sequentially to each line of the input file, in a
1964case-sensitive way. The modifiers and their meanings are: 1937case-sensitive way. The modifiers and their meanings are:
1965 1938
@@ -1984,22 +1957,22 @@ etags --regex=/@var{reg1}/i voo.doo --regex=/@var{reg2}/m \
1984@end smallexample 1957@end smallexample
1985 1958
1986@noindent 1959@noindent
1987Here @code{etags} chooses the parsing language for @file{voo.doo} and 1960Here @command{etags} chooses the parsing language for @file{voo.doo} and
1988@file{bar.ber} according to their contents. @code{etags} also uses 1961@file{bar.ber} according to their contents. @command{etags} also uses
1989@var{reg1} to recognize additional tags in @file{voo.doo}, and both 1962@var{reg1} to recognize additional tags in @file{voo.doo}, and both
1990@var{reg1} and @var{reg2} to recognize additional tags in 1963@var{reg1} and @var{reg2} to recognize additional tags in
1991@file{bar.ber}. @var{reg1} is checked against each line of 1964@file{bar.ber}. @var{reg1} is checked against each line of
1992@file{voo.doo} and @file{bar.ber}, in a case-insensitive way, while 1965@file{voo.doo} and @file{bar.ber}, in a case-insensitive way, while
1993@var{reg2} is checked against the whole @file{bar.ber} file, 1966@var{reg2} is checked against the whole @file{bar.ber} file,
1994permitting multi-line matches, in a case-sensitive way. @code{etags} 1967permitting multi-line matches, in a case-sensitive way. @command{etags}
1995uses only the Lisp tags rules, with no user-specified regexp matching, 1968uses only the Lisp tags rules, with no user-specified regexp matching,
1996to recognize tags in @file{los.er}. 1969to recognize tags in @file{los.er}.
1997 1970
1998 You can restrict a @samp{--regex} option to match only files of a 1971 You can restrict a @samp{--regex} option to match only files of a
1999given language by using the optional prefix @var{@{language@}}. 1972given language by using the optional prefix @var{@{language@}}.
2000(@samp{etags --help} prints the list of languages recognized by 1973(@samp{etags --help} prints the list of languages recognized by
2001@code{etags}.) This is particularly useful when storing many 1974@command{etags}.) This is particularly useful when storing many
2002predefined regular expressions for @code{etags} in a file. The 1975predefined regular expressions for @command{etags} in a file. The
2003following example tags the @code{DEFVAR} macros in the Emacs source 1976following example tags the @code{DEFVAR} macros in the Emacs source
2004files, for the C language only: 1977files, for the C language only:
2005 1978
@@ -2009,7 +1982,7 @@ files, for the C language only:
2009 1982
2010@noindent 1983@noindent
2011When you have complex regular expressions, you can store the list of 1984When you have complex regular expressions, you can store the list of
2012them in a file. The following option syntax instructs @code{etags} to 1985them in a file. The following option syntax instructs @command{etags} to
2013read two files of regular expressions. The regular expressions 1986read two files of regular expressions. The regular expressions
2014contained in the second file are matched without regard to case. 1987contained in the second file are matched without regard to case.
2015 1988
@@ -2018,9 +1991,9 @@ contained in the second file are matched without regard to case.
2018@end smallexample 1991@end smallexample
2019 1992
2020@noindent 1993@noindent
2021A regex file for @code{etags} contains one regular expression per 1994A regex file for @command{etags} contains one regular expression per
2022line. Empty lines, and lines beginning with space or tab are ignored. 1995line. Empty lines, and lines beginning with space or tab are ignored.
2023When the first character in a line is @samp{@@}, @code{etags} assumes 1996When the first character in a line is @samp{@@}, @command{etags} assumes
2024that the rest of the line is the name of another file of regular 1997that the rest of the line is the name of another file of regular
2025expressions; thus, one such file can include another file. All the 1998expressions; thus, one such file can include another file. All the
2026other lines are taken to be regular expressions. If the first 1999other lines are taken to be regular expressions. If the first
@@ -2083,14 +2056,14 @@ etags --language=none \
2083@node Select Tags Table 2056@node Select Tags Table
2084@subsection Selecting a Tags Table 2057@subsection Selecting a Tags Table
2085 2058
2086@vindex tags-file-name
2087@findex visit-tags-table 2059@findex visit-tags-table
2088 Emacs has at any time one @dfn{selected} tags table, and all the 2060 Emacs has at any time one @dfn{selected} tags table. All the
2089commands for working with tags tables use the selected one. To select 2061commands for working with tags tables use the selected one. To select
2090a tags table, type @kbd{M-x visit-tags-table}, which reads the tags 2062a tags table, type @kbd{M-x visit-tags-table}, which reads the tags
2091table file name as an argument, with @file{TAGS} in the default 2063table file name as an argument, with @file{TAGS} in the default
2092directory as the default. 2064directory as the default.
2093 2065
2066@vindex tags-file-name
2094 Emacs does not actually read in the tags table contents until you 2067 Emacs does not actually read in the tags table contents until you
2095try to use them; all @code{visit-tags-table} does is store the file 2068try to use them; all @code{visit-tags-table} does is store the file
2096name in the variable @code{tags-file-name}, and setting the variable 2069name in the variable @code{tags-file-name}, and setting the variable
@@ -2154,27 +2127,25 @@ Pop back to where you previously invoked @kbd{M-.} and friends.
2154 2127
2155@kindex M-. 2128@kindex M-.
2156@findex find-tag 2129@findex find-tag
2157 @kbd{M-.}@: (@code{find-tag}) is the command to find the definition of 2130 @kbd{M-.}@: (@code{find-tag}) prompts for a tag name and jumps to
2158a specified tag. It searches through the tags table for that tag, as a 2131its source definition. It works by searching through the tags table
2159string, and then uses the tags table info to determine the file that the 2132for that tag's file and approximate character position, visiting that
2160definition is in and the approximate character position in the file of 2133file, and searching for the tag definition at ever-increasing
2161the definition. Then @code{find-tag} visits that file, moves point to 2134distances away from the recorded approximate position.
2162the approximate character position, and searches ever-increasing 2135
2163distances away to find the tag definition. 2136 When entering the tag argument to @kbd{M-.}, the usual minibuffer
2164 2137completion commands can be used (@pxref{Completion}), with the tag
2165 If an empty argument is given (just type @key{RET}), the balanced 2138names in the selected tags table as completion candidates. If you
2166expression in the buffer before or around point is used as the 2139specify an empty argument, the balanced expression in the buffer
2167@var{tag} argument. @xref{Expressions}. 2140before or around point is the default argument. @xref{Expressions}.
2168 2141
2169 You don't need to give @kbd{M-.} the full name of the tag; a part 2142 You don't need to give @kbd{M-.} the full name of the tag; a part
2170will do. This is because @kbd{M-.} finds tags in the table which 2143will do. @kbd{M-.} finds tags which contain that argument as a
2171contain @var{tag} as a substring. However, it prefers an exact match 2144substring. However, it prefers an exact match to a substring match.
2172to a substring match. To find other tags that match the same 2145To find other tags that match the same substring, give @code{find-tag}
2173substring, give @code{find-tag} a numeric argument, as in @kbd{C-u 2146a numeric argument, as in @kbd{C-u M-.} or @kbd{M-0 M-.}; this does
2174M-.}; this does not read a tag name, but continues searching the tags 2147not read a tag name, but continues searching the tags table's text for
2175table's text for another tag containing the same substring last used. 2148another tag containing the same substring last used.
2176If you have a real @key{META} key, @kbd{M-0 M-.}@: is an easier
2177alternative to @kbd{C-u M-.}.
2178 2149
2179@kindex C-x 4 . 2150@kindex C-x 4 .
2180@findex find-tag-other-window 2151@findex find-tag-other-window
@@ -2182,23 +2153,23 @@ alternative to @kbd{C-u M-.}.
2182@findex find-tag-other-frame 2153@findex find-tag-other-frame
2183 Like most commands that can switch buffers, @code{find-tag} has a 2154 Like most commands that can switch buffers, @code{find-tag} has a
2184variant that displays the new buffer in another window, and one that 2155variant that displays the new buffer in another window, and one that
2185makes a new frame for it. The former is @w{@kbd{C-x 4 .}}, which invokes 2156makes a new frame for it. The former is @w{@kbd{C-x 4 .}}
2186the command @code{find-tag-other-window}. The latter is @w{@kbd{C-x 5 .}}, 2157(@code{find-tag-other-window}), and the latter is @w{@kbd{C-x 5 .}}
2187which invokes @code{find-tag-other-frame}. 2158(@code{find-tag-other-frame}).
2188 2159
2189 To move back to places you've found tags recently, use @kbd{C-u - 2160 To move back to previous tag definitions, use @kbd{C-u - M-.}; more
2190M-.}; more generally, @kbd{M-.} with a negative numeric argument. This 2161generally, @kbd{M-.} with a negative numeric argument. Similarly,
2191command can take you to another buffer. @w{@kbd{C-x 4 .}} with a negative 2162@w{@kbd{C-x 4 .}} with a negative argument finds the previous tag
2192argument finds the previous tag location in another window. 2163location in another window.
2193 2164
2194@kindex M-* 2165@kindex M-*
2195@findex pop-tag-mark 2166@findex pop-tag-mark
2196@vindex find-tag-marker-ring-length 2167@vindex find-tag-marker-ring-length
2197 As well as going back to places you've found tags recently, you can go 2168 As well as going back to places you've found tags recently, you can
2198back to places @emph{from where} you found them. Use @kbd{M-*}, which 2169go back to places @emph{from where} you found them, using @kbd{M-*}
2199invokes the command @code{pop-tag-mark}, for this. Typically you would 2170(@code{pop-tag-mark}). Thus you can find and examine the definition
2200find and study the definition of something with @kbd{M-.} and then 2171of something with @kbd{M-.} and then return to where you were with
2201return to where you were with @kbd{M-*}. 2172@kbd{M-*}.
2202 2173
2203 Both @kbd{C-u - M-.} and @kbd{M-*} allow you to retrace your steps to 2174 Both @kbd{C-u - M-.} and @kbd{M-*} allow you to retrace your steps to
2204a depth determined by the variable @code{find-tag-marker-ring-length}. 2175a depth determined by the variable @code{find-tag-marker-ring-length}.
@@ -2242,10 +2213,10 @@ can follow its progress. As soon as it finds an occurrence,
2242 2213
2243@kindex M-, 2214@kindex M-,
2244@findex tags-loop-continue 2215@findex tags-loop-continue
2245 Having found one match, you probably want to find all the rest. To find 2216 Having found one match, you probably want to find all the rest.
2246one more match, type @kbd{M-,} (@code{tags-loop-continue}) to resume the 2217Type @kbd{M-,} (@code{tags-loop-continue}) to resume the
2247@code{tags-search}. This searches the rest of the current buffer, followed 2218@code{tags-search}, finding one more match. This searches the rest of
2248by the remaining files of the tags table.@refill 2219the current buffer, followed by the remaining files of the tags table.
2249 2220
2250@findex tags-query-replace 2221@findex tags-query-replace
2251 @kbd{M-x tags-query-replace} performs a single 2222 @kbd{M-x tags-query-replace} performs a single
@@ -2282,56 +2253,56 @@ have to search (those which are not already visited in Emacs buffers).
2282Buffers in which no match is found are quickly killed; the others 2253Buffers in which no match is found are quickly killed; the others
2283continue to exist. 2254continue to exist.
2284 2255
2285 It may have struck you that @code{tags-search} is a lot like 2256 As an alternative to @code{tags-search}, you can run @command{grep}
2286@code{grep}. You can also run @code{grep} itself as an inferior of 2257as a subprocess and have Emacs show you the matching lines one by one.
2287Emacs and have Emacs show you the matching lines one by one.
2288@xref{Grep Searching}. 2258@xref{Grep Searching}.
2289 2259
2290@node List Tags 2260@node List Tags
2291@subsection Tags Table Inquiries 2261@subsection Tags Table Inquiries
2292 2262
2293@table @kbd 2263@table @kbd
2264@item C-M-i
2265@itemx M-@key{TAB}
2266Perform completion on the text around point, using the selected tags
2267table if one is loaded (@code{completion-at-point}).
2294@item M-x list-tags @key{RET} @var{file} @key{RET} 2268@item M-x list-tags @key{RET} @var{file} @key{RET}
2295Display a list of the tags defined in the program file @var{file}. 2269Display a list of the tags defined in the program file @var{file}.
2296@item M-x tags-apropos @key{RET} @var{regexp} @key{RET} 2270@item M-x tags-apropos @key{RET} @var{regexp} @key{RET}
2297Display a list of all tags matching @var{regexp}. 2271Display a list of all tags matching @var{regexp}.
2298@end table 2272@end table
2299 2273
2274@cindex completion (symbol names)
2275 In most programming language modes, you can type @kbd{C-M-i} or
2276@kbd{M-@key{TAB}} (@code{completion-at-point}) to complete the symbol
2277at point. If there is a selected tags table, this command can use it
2278to generate completion candidates. @xref{Symbol Completion}.
2279
2300@findex list-tags 2280@findex list-tags
2301 @kbd{M-x list-tags} reads the name of one of the files described by 2281 @kbd{M-x list-tags} reads the name of one of the files covered by
2302the selected tags table, and displays a list of all the tags defined in 2282the selected tags table, and displays a list of tags defined in that
2303that file. The ``file name'' argument is really just a string to 2283file. Do not include a directory as part of the file name unless the
2304compare against the file names recorded in the tags table; it is read as 2284file name recorded in the tags table includes a directory.
2305a string rather than as a file name. Therefore, completion and
2306defaulting are not available, and you must enter the file name the same
2307way it appears in the tags table. Do not include a directory as part of
2308the file name unless the file name recorded in the tags table includes a
2309directory.
2310 2285
2311@findex tags-apropos 2286@findex tags-apropos
2312@vindex tags-apropos-verbose 2287@vindex tags-apropos-verbose
2313 @kbd{M-x tags-apropos} is like @code{apropos} for tags
2314(@pxref{Apropos}). It finds all the tags in the selected tags table
2315whose entries match @var{regexp}, and displays them. If the variable
2316@code{tags-apropos-verbose} is non-@code{nil}, it displays the names
2317of the tags files together with the tag names.
2318
2319@vindex tags-tag-face 2288@vindex tags-tag-face
2320@vindex tags-apropos-additional-actions 2289@vindex tags-apropos-additional-actions
2321 You can customize the appearance of the output by setting the 2290 @kbd{M-x tags-apropos} is like @code{apropos} for tags
2322variable @code{tags-tag-face} to a face. You can display additional 2291(@pxref{Apropos}). It displays a list of tags in the selected tags
2323output with @kbd{M-x tags-apropos} by customizing the variable 2292table whose entries match @var{regexp}. If the variable
2324@code{tags-apropos-additional-actions}---see its documentation for 2293@code{tags-apropos-verbose} is non-@code{nil}, it displays the names
2325details. 2294of the tags files together with the tag names. You can customize the
2326 2295appearance of the output by setting the variable @code{tags-tag-face}
2327 You can also use the collection of tag names to complete a symbol 2296to a face. You can display additional output by customizing the
2328name in the buffer. @xref{Symbol Completion}. 2297variable @code{tags-apropos-additional-actions}; see its documentation
2329 2298for details.
2330 You can use @kbd{M-x next-file} to visit the files in the selected 2299
2331tags table. The first time this command is called, it visits the 2300@findex next-file
2332first file in the tags table. Each subsequent call visits the next 2301 @kbd{M-x next-file} visits files covered by the selected tags table.
2333file in the table, unless a prefix argument is supplied, in which case 2302The first time it is called, it visits the first file covered by the
2334it returns to the first file. 2303table. Each subsequent call visits the next covered file, unless a
2304prefix argument is supplied, in which case it returns to the first
2305file.
2335 2306
2336@node EDE 2307@node EDE
2337@section Emacs Development Environment 2308@section Emacs Development Environment
diff --git a/doc/emacs/msdog.texi b/doc/emacs/msdog.texi
index e3c9b8d4fc2..547d8cbadd9 100644
--- a/doc/emacs/msdog.texi
+++ b/doc/emacs/msdog.texi
@@ -863,15 +863,22 @@ fontconfig library used in modern Free desktops:
863 863
864 The old XLFD based format is also supported for backwards compatibility. 864 The old XLFD based format is also supported for backwards compatibility.
865 865
866 Emacs 23 supports a number of backends. Currently, the @code{gdi} 866@cindex font backend selection (MS-Windows)
867and @code{uniscribe} font backends are supported on Windows. The 867 Emacs 23 and later supports a number of font backends. Currently,
868@code{gdi} font backend is available on all versions of Windows, and 868the @code{gdi} and @code{uniscribe} backends are supported on Windows.
869supports all fonts that are natively supported by Windows. The 869The @code{gdi} font backend is available on all versions of Windows,
870and supports all fonts that are natively supported by Windows. The
870@code{uniscribe} font backend is available on Windows 2000 and later, 871@code{uniscribe} font backend is available on Windows 2000 and later,
871and supports TrueType and OpenType fonts. Some languages requiring 872and supports TrueType and OpenType fonts. Some languages requiring
872complex layout can only be properly supported by the uniscribe 873complex layout can only be properly supported by the Uniscribe
873backend. By default, both backends are enabled if supported, with 874backend. By default, both backends are enabled if supported, with
874@code{uniscribe} taking priority over @code{gdi}. 875@code{uniscribe} taking priority over @code{gdi}. To override that
876and use the GDI backend even if Uniscribe is available, invoke Emacs
877with the @kbd{-xrm Emacs.fontBackend:gdi} command-line argument, or
878add a @code{Emacs.fontBackend} resource with the value @code{gdi} in
879the Registry under either the
880@samp{HKEY_CURRENT_USER\SOFTWARE\GNU\Emacs} or the
881@samp{HKEY_LOCAL_MACHINE\SOFTWARE\GNU\Emacs} key (@pxref{Resources}).
875 882
876@cindex font properties (MS Windows) 883@cindex font properties (MS Windows)
877@noindent 884@noindent
diff --git a/doc/emacs/programs.texi b/doc/emacs/programs.texi
index 675977c2c35..7301ecfea8a 100644
--- a/doc/emacs/programs.texi
+++ b/doc/emacs/programs.texi
@@ -8,8 +8,8 @@
8@cindex C editing 8@cindex C editing
9@cindex program editing 9@cindex program editing
10 10
11 Emacs provides many features to facilitate editing programs. Some 11 This chapter describes Emacs features for facilitating editing
12of these features can 12programs. Some of these features can:
13 13
14@itemize @bullet 14@itemize @bullet
15@item 15@item
@@ -25,8 +25,6 @@ Insert, kill or align comments (@pxref{Comments}).
25Highlight program syntax (@pxref{Font Lock}). 25Highlight program syntax (@pxref{Font Lock}).
26@end itemize 26@end itemize
27 27
28 This chapter describes these features and many more.
29
30@menu 28@menu
31* Program Modes:: Major modes for editing programs. 29* Program Modes:: Major modes for editing programs.
32* Defuns:: Commands to operate on major top-level parts 30* Defuns:: Commands to operate on major top-level parts
@@ -40,8 +38,8 @@ Highlight program syntax (@pxref{Font Lock}).
40* Glasses:: Making identifiersLikeThis more readable. 38* Glasses:: Making identifiersLikeThis more readable.
41* Semantic:: Suite of editing tools based on source code parsing. 39* Semantic:: Suite of editing tools based on source code parsing.
42* Misc for Programs:: Other Emacs features useful for editing programs. 40* Misc for Programs:: Other Emacs features useful for editing programs.
43* C Modes:: Special commands of C, C++, Objective-C, 41* C Modes:: Special commands of C, C++, Objective-C, Java,
44 Java, and Pike modes. 42 IDL, Pike and AWK modes.
45* Asm Mode:: Asm mode and its special features. 43* Asm Mode:: Asm mode and its special features.
46@ifnottex 44@ifnottex
47* Fortran:: Fortran mode and its special features. 45* Fortran:: Fortran mode and its special features.
@@ -52,21 +50,14 @@ Highlight program syntax (@pxref{Font Lock}).
52@section Major Modes for Programming Languages 50@section Major Modes for Programming Languages
53@cindex modes for programming languages 51@cindex modes for programming languages
54 52
55 Emacs has specialized major modes for various programming languages. 53 Emacs has specialized major modes (@pxref{Major Modes}) for many
56@xref{Major Modes}. A programming language major mode typically 54programming languages. A programming language mode typically
57specifies the syntax of expressions, the customary rules for 55specifies the syntax of expressions, the customary rules for
58indentation, how to do syntax highlighting for the language, and how 56indentation, how to do syntax highlighting for the language, and how
59to find the beginning or end of a function definition. It often 57to find the beginning or end of a function definition. It often has
60customizes or provides facilities for compiling and debugging programs 58features for compiling and debugging programs as well. The major mode
61as well. 59for each language is named after the language; for instance, the major
62 60mode for the C programming language is @code{c-mode}.
63 Ideally, Emacs should provide a major mode for each programming
64language that you might want to edit; if it doesn't have a mode for
65your favorite language, you can contribute one. But often the mode
66for one language can serve for other syntactically similar languages.
67The major mode for language @var{l} is called @code{@var{l}-mode},
68and you can select it by typing @kbd{M-x @var{l}-mode @key{RET}}.
69@xref{Choosing Modes}.
70 61
71@cindex Perl mode 62@cindex Perl mode
72@cindex Icon mode 63@cindex Icon mode
@@ -89,40 +80,32 @@ and you can select it by typing @kbd{M-x @var{l}-mode @key{RET}}.
89@cindex Conf mode 80@cindex Conf mode
90@cindex DNS mode 81@cindex DNS mode
91@cindex Javascript mode 82@cindex Javascript mode
92 The existing programming language major modes include Lisp, Scheme 83 Emacs has programming language modes for Lisp, Scheme, the
93(a variant of Lisp) and the Scheme-based DSSSL expression language, 84Scheme-based DSSSL expression language, Ada, ASM, AWK, C, C++, Delphi,
94Ada, ASM, AWK, C, C++, Delphi (Object Pascal), Fortran, Icon, IDL 85Fortran, Icon, IDL (CORBA), IDLWAVE, Java, Javascript, Metafont
95(CORBA), IDLWAVE, Java, Javascript, Metafont (@TeX{}'s companion for 86(@TeX{}'s companion for font creation), Modula2, Objective-C, Octave,
96font creation), Modula2, Objective-C, Octave, Pascal, Perl, Pike, 87Pascal, Perl, Pike, PostScript, Prolog, Python, Ruby, Simula, Tcl, and
97PostScript, Prolog, Python, Ruby, Simula, Tcl, and VHDL. An 88VHDL. An alternative mode for Perl is called CPerl mode. Modes are
98alternative mode for Perl is called CPerl mode. Modes are available 89also available for the scripting languages of the common GNU and Unix
99for the scripting languages of the common GNU and Unix shells, VMS 90shells, VMS DCL, and MS-DOS/MS-Windows @samp{BAT} files, and for
100DCL, and MS-DOS/MS-Windows @samp{BAT} files. There are also major 91makefiles, DNS master files, and various sorts of configuration files.
101modes for editing makefiles, DNS master files, and various sorts of 92
102configuration files. 93 Ideally, Emacs should have a major mode for each programming
94language that you might want to edit. If it doesn't have a mode for
95your favorite language, the mode might be implemented in a package not
96distributed with Emacs (@pxref{Packages}); or you can contribute one.
103 97
104@kindex DEL @r{(programming modes)} 98@kindex DEL @r{(programming modes)}
105@findex c-electric-backspace 99@findex c-electric-backspace
100@findex backward-delete-char-untabify
106 In most programming languages, indentation should vary from line to 101 In most programming languages, indentation should vary from line to
107line to illustrate the structure of the program. So the major modes 102line to illustrate the structure of the program. Therefore, in most
108for programming languages arrange for @key{TAB} to update the 103programming language modes, typing @key{TAB} updates the indentation
109indentation of the current line (@pxref{Program Indent}). They also 104of the current line (@pxref{Program Indent}). Furthermore, @key{DEL}
110rebind @key{DEL} to treat a tab as if it were the equivalent number of 105is usually bound to @code{backward-delete-char-untabify}, which
111spaces; this lets you delete one column of indentation without 106deletes backward treating each tab as if it were the equivalent number
112worrying whether the whitespace consists of spaces or tabs. Use 107of spaces, so that you can delete one column of indentation without
113@kbd{C-b C-d} to delete a tab character before point, in these modes. 108worrying whether the whitespace consists of spaces or tabs.
114
115 Separate manuals are available for the modes for Ada (@pxref{Top, , Ada
116Mode, ada-mode, Ada Mode}), C/C++/Objective C/Java/Corba IDL/Pike/AWK
117(@pxref{Top, , CC Mode, ccmode, CC Mode}) and the IDLWAVE modes
118(@pxref{Top, , IDLWAVE, idlwave, IDLWAVE User Manual}). For Fortran
119mode, see
120@iftex
121@ref{Fortran,,, emacs-xtra, Specialized Emacs Features}.
122@end iftex
123@ifnottex
124@ref{Fortran}.
125@end ifnottex
126 109
127@cindex mode hook 110@cindex mode hook
128@vindex c-mode-hook 111@vindex c-mode-hook
@@ -130,13 +113,24 @@ mode, see
130@vindex emacs-lisp-mode-hook 113@vindex emacs-lisp-mode-hook
131@vindex lisp-interaction-mode-hook 114@vindex lisp-interaction-mode-hook
132@vindex scheme-mode-hook 115@vindex scheme-mode-hook
133 Turning on a major mode runs a normal hook called the @dfn{mode 116 Entering a programming language mode runs the custom Lisp functions
134hook}, which is the value of a Lisp variable. Each major mode has a 117specified in the hook variable @code{prog-mode-hook}, followed by
135mode hook, and the hook's name is always made from the mode command's 118those specified in the mode's own mode hook (@pxref{Major Modes}).
136name by adding @samp{-hook}. For example, turning on C mode runs the 119For instance, entering C mode runs the hooks @code{prog-mode-hook} and
137hook @code{c-mode-hook}, while turning on Lisp mode runs the hook 120@code{c-mode-hook}. @xref{Hooks}, for information about hooks.
138@code{lisp-mode-hook}. The purpose of the mode hook is to give you a 121
139place to set up customizations for that major mode. @xref{Hooks}. 122@ifinfo
123 Separate manuals are available for the modes for Ada (@pxref{Top,,
124Ada Mode, ada-mode, Ada Mode}), C/C++/Objective C/Java/Corba
125IDL/Pike/AWK (@pxref{Top, , CC Mode, ccmode, CC Mode}), and IDLWAVE
126(@pxref{Top,, IDLWAVE, idlwave, IDLWAVE User Manual}).
127@end ifinfo
128@ifnotinfo
129 The Emacs distribution contains Info manuals for the major modes for
130Ada, C/C++/Objective C/Java/Corba IDL/Pike/AWK, and IDLWAVE. For
131Fortran mode, see the ``Fortran'' section in the Info version of the
132Emacs manual, which is not included in this printed version.
133@end ifnotinfo
140 134
141@node Defuns 135@node Defuns
142@section Top-Level Definitions, or Defuns 136@section Top-Level Definitions, or Defuns
@@ -328,20 +322,19 @@ The Speedbar can also use it (@pxref{Speedbar}).
328@subsection Which Function Mode 322@subsection Which Function Mode
329@cindex current function name in mode line 323@cindex current function name in mode line
330 324
331 Which Function mode is a minor mode that displays the current 325 Which Function mode is a global minor mode (@pxref{Minor Modes})
332function name in the mode line, updating it as you move around in a 326which displays the current function name in the mode line, updating it
333buffer. 327as you move around in a buffer.
334 328
335@findex which-function-mode 329@findex which-function-mode
336@vindex which-func-modes 330@vindex which-func-modes
337 To either enable or disable Which Function mode, use the command 331 To either enable or disable Which Function mode, use the command
338@kbd{M-x which-function-mode}. This command applies to all buffers, 332@kbd{M-x which-function-mode}. Although Which Function mode is a
339both existing ones and those yet to be created. However, it takes 333global minor mode, it takes effect only in certain major modes: those
340effect only in certain major modes, those listed in the value of 334listed in the variable @code{which-func-modes}. If the value of
341@code{which-func-modes}. If the value of @code{which-func-modes} is 335@code{which-func-modes} is @code{t} rather than a list of modes, then
342@code{t} rather than a list of modes, then Which Function mode applies 336Which Function mode applies to all major modes that know how to
343to all major modes that know how to support it---in other words, all 337support it---in other words, all the major modes that support Imenu.
344the major modes that support Imenu.
345 338
346@node Program Indent 339@node Program Indent
347@section Indentation for Programs 340@section Indentation for Programs
@@ -352,6 +345,10 @@ reindent it as you change it. Emacs has commands to indent either a
352single line, a specified number of lines, or all of the lines inside a 345single line, a specified number of lines, or all of the lines inside a
353single parenthetical grouping. 346single parenthetical grouping.
354 347
348 @xref{Indentation}, for general information about indentation. This
349section describes indentation features specific to programming
350language modes.
351
355@menu 352@menu
356* Basic Indent:: Indenting a single line. 353* Basic Indent:: Indenting a single line.
357* Multi-line Indent:: Commands to reindent many lines at once. 354* Multi-line Indent:: Commands to reindent many lines at once.
@@ -361,18 +358,15 @@ single parenthetical grouping.
361@end menu 358@end menu
362 359
363@cindex pretty-printer 360@cindex pretty-printer
364 Emacs also provides a Lisp pretty-printer in the library @code{pp}. 361 Emacs also provides a Lisp pretty-printer in the @code{pp} package,
365This program reformats a Lisp object with indentation chosen to look nice. 362which reformats Lisp objects with nice-looking indentation.
366 363
367@node Basic Indent 364@node Basic Indent
368@subsection Basic Program Indentation Commands 365@subsection Basic Program Indentation Commands
369 366
370 The basic indentation commands indent a single line according to the
371usual conventions of the language you are editing.
372
373@table @kbd 367@table @kbd
374@item @key{TAB} 368@item @key{TAB}
375Adjust indentation of current line. 369Adjust indentation of current line (@code{indent-for-tab-command}).
376@item C-j 370@item C-j
377Insert a newline, then adjust indentation of following line 371Insert a newline, then adjust indentation of following line
378(@code{newline-and-indent}). 372(@code{newline-and-indent}).
@@ -382,65 +376,50 @@ Insert a newline, then adjust indentation of following line
382@findex c-indent-command 376@findex c-indent-command
383@findex indent-line-function 377@findex indent-line-function
384@findex indent-for-tab-command 378@findex indent-for-tab-command
385 The basic indentation command is @key{TAB}. In any 379 The basic indentation command is @key{TAB}
386programming-language major mode, @key{TAB} gives the current line the 380(@code{indent-for-tab-command}), which was documented in
387correct indentation as determined from the previous lines. It does 381@ref{Indentation}. In programming language modes, @key{TAB} indents
388this by inserting or deleting whitespace at the beginning of the 382the current line, based on the indentation and syntactic content of
389current line. If point was inside the whitespace at the beginning of 383the preceding lines; if the region is active, @key{TAB} indents each
390the line, @key{TAB} puts it at the end of that whitespace; otherwise, 384line within the region, not just the current line.
391@key{TAB} keeps point fixed with respect to the characters around it.
392If the region is active (@pxref{Mark}), @key{TAB} indents every line
393within the region instead of just the current line. The function that
394@key{TAB} runs depends on the major mode; for instance, it is
395@code{c-indent-line-or-region} in C mode. Each function is aware of
396the syntax and conventions for its particular language.
397
398 Use @kbd{C-q @key{TAB}} to insert a tab character at point.
399 385
400@kindex C-j @r{(indenting source code)} 386@kindex C-j @r{(indenting source code)}
401@findex newline-and-indent 387@findex newline-and-indent
402 When entering lines of new code, use @kbd{C-j} 388 The command @kbd{C-j} (@code{newline-and-indent}), which was
403(@code{newline-and-indent}), which inserts a newline and then adjusts 389documented in @ref{Indentation Commands}, does the same as @key{RET}
404indentation after it. (It also deletes any trailing whitespace which 390followed by @key{TAB}: it inserts a new line, then adjusts the line's
405remains before the new newline.) For instance, @kbd{C-j} at the end 391indentation.
406of a line creates a blank line with appropriate indentation. In 392
407programming language modes, it is equivalent to @key{RET} @key{TAB}. 393 When indenting a line that starts within a parenthetical grouping,
408 394Emacs usually places the start of the line under the preceding line
409 When Emacs indents a line that starts within a parenthetical 395within the group, or under the text after the parenthesis. If you
410grouping, it usually places the start of the line under the preceding 396manually give one of these lines a nonstandard indentation (e.g.@: for
411line within the group, or under the text after the parenthesis. If 397aesthetic purposes), the lines below will follow it.
412you manually give one of these lines a nonstandard indentation, the 398
413lines below will tend to follow it. This behavior is convenient in 399 The indentation commands for most programming language modes assume
414cases where you have overridden the standard result of @key{TAB} 400that a open-parenthesis, open-brace or other opening delimiter at the
415indentation (e.g., for aesthetic purposes). 401left margin is the start of a function. If the code you are editing
416 402violates this assumption---even if the delimiters occur in strings or
417 Many programming-language modes assume that an open-parenthesis, 403comments---you must set @code{open-paren-in-column-0-is-defun-start}
418open-brace or other opening delimiter at the left margin is the start 404to @code{nil} for indentation to work properly. @xref{Left Margin
419of a function. This assumption speeds up indentation commands. If
420the text you are editing contains opening delimiters in column zero
421that aren't the beginning of a functions---even if these delimiters
422occur inside strings or comments---then you must set
423@code{open-paren-in-column-0-is-defun-start}. @xref{Left Margin
424Paren}. 405Paren}.
425 406
426 Normally, Emacs indents lines using an ``optimal'' mix of tab and
427space characters. If you want Emacs to use spaces only, set
428@code{indent-tabs-mode} (@pxref{Just Spaces}).
429
430@node Multi-line Indent 407@node Multi-line Indent
431@subsection Indenting Several Lines 408@subsection Indenting Several Lines
432 409
433 Sometimes, you may want to reindent several lines of code at a time. 410 Sometimes, you may want to reindent several lines of code at a time.
434One way to do this is to use the mark; when the mark is active and the 411One way to do this is to use the mark; when the mark is active and the
435region is non-empty, @key{TAB} indents every line within the region. 412region is non-empty, @key{TAB} indents every line in the region.
436In addition, Emacs provides several other commands for indenting large 413Alternatively, the command @kbd{C-M-\} (@code{indent-region}) indents
437chunks of code: 414every line in the region, whether or not the mark is active
415(@pxref{Indentation Commands}).
416
417 In addition, Emacs provides the following commands for indenting
418large chunks of code:
438 419
439@table @kbd 420@table @kbd
440@item C-M-q 421@item C-M-q
441Reindent all the lines within one parenthetical grouping. 422Reindent all the lines within one parenthetical grouping.
442@item C-M-\
443Reindent all lines in the region (@code{indent-region}).
444@item C-u @key{TAB} 423@item C-u @key{TAB}
445Shift an entire parenthetical grouping rigidly sideways so that its 424Shift an entire parenthetical grouping rigidly sideways so that its
446first line is properly indented. 425first line is properly indented.
@@ -454,18 +433,13 @@ lines that start inside comments and strings.
454 To reindent the contents of a single parenthetical grouping, 433 To reindent the contents of a single parenthetical grouping,
455position point before the beginning of the grouping and type 434position point before the beginning of the grouping and type
456@kbd{C-M-q}. This changes the relative indentation within the 435@kbd{C-M-q}. This changes the relative indentation within the
457grouping, without affecting its overall indentation (i.e., the 436grouping, without affecting its overall indentation (i.e.@: the
458indentation of the line where the grouping starts). The function that 437indentation of the line where the grouping starts). The function that
459@kbd{C-M-q} runs depends on the major mode; it is 438@kbd{C-M-q} runs depends on the major mode; it is
460@code{indent-pp-sexp} in Lisp mode, @code{c-indent-exp} in C mode, 439@code{indent-pp-sexp} in Lisp mode, @code{c-indent-exp} in C mode,
461etc. To correct the overall indentation as well, type @key{TAB} 440etc. To correct the overall indentation as well, type @key{TAB}
462first. 441first.
463 442
464 @kbd{C-M-\} (@code{indent-region}) applies @key{TAB} to the region.
465This is useful when Transient Mark mode is disabled (@pxref{Disabled
466Transient Mark}), because in that case @key{TAB} does not act on the
467region.
468
469@kindex C-u TAB 443@kindex C-u TAB
470 If you like the relative indentation within a grouping but not the 444 If you like the relative indentation within a grouping but not the
471indentation of its first line, move point to that first line and type 445indentation of its first line, move point to that first line and type
@@ -516,9 +490,9 @@ expression.
516@cindex @code{lisp-indent-function} property 490@cindex @code{lisp-indent-function} property
517 You can override the standard pattern in various ways for individual 491 You can override the standard pattern in various ways for individual
518functions, according to the @code{lisp-indent-function} property of 492functions, according to the @code{lisp-indent-function} property of
519the function name. Normally you would use this for macro definitions 493the function name. This is normally done for macro definitions, using
520and specify it using the @code{declare} construct (@pxref{Defining 494the @code{declare} construct. @xref{Defining Macros,,, elisp, the
521Macros,,, elisp, the Emacs Lisp Reference Manual}). 495Emacs Lisp Reference Manual}.
522 496
523@node C Indent 497@node C Indent
524@subsection Commands for C Indentation 498@subsection Commands for C Indentation
@@ -632,6 +606,14 @@ information on customizing indentation for C and related modes,
632including how to override parts of an existing style and how to define 606including how to override parts of an existing style and how to define
633your own styles. 607your own styles.
634 608
609@findex c-guess
610@findex c-guess-install
611 As an alternative to specifying a style, you can tell Emacs to guess
612a style by typing @kbd{M-x c-guess} in a sample code buffer. You can
613then apply the guessed style to other buffers with @kbd{M-x
614c-guess-install}. @xref{Guessing the Style,,, ccmode, the CC Mode
615Manual}, for details.
616
635@node Parentheses 617@node Parentheses
636@section Commands for Editing with Parentheses 618@section Commands for Editing with Parentheses
637 619
@@ -664,9 +646,13 @@ parentheses and unbalanced string quotes in the buffer.
664@cindex sexp 646@cindex sexp
665@cindex expression 647@cindex expression
666@cindex balanced expression 648@cindex balanced expression
667 These commands deal with balanced expressions, also called 649 Each programming language mode has its own definition of a
668@dfn{sexps}@footnote{The word ``sexp'' is used to refer to an 650@dfn{balanced expression}. Balanced expressions typically include
669expression in Lisp.}. 651individual symbols, numbers, and string constants, as well as pieces
652of code enclosed in a matching pair of delimiters. The following
653commands deal with balanced expressions (in Emacs, such expressions
654are referred to internally as @dfn{sexps}@footnote{The word ``sexp''
655is used to refer to an expression in Lisp.}).
670 656
671@table @kbd 657@table @kbd
672@item C-M-f 658@item C-M-f
@@ -682,90 +668,71 @@ Transpose expressions (@code{transpose-sexps}).
682Put mark after following expression (@code{mark-sexp}). 668Put mark after following expression (@code{mark-sexp}).
683@end table 669@end table
684 670
685 Each programming language major mode customizes the definition of
686balanced expressions to suit that language. Balanced expressions
687typically include symbols, numbers, and string constants, as well as
688any pair of matching delimiters and their contents. Some languages
689have obscure forms of expression syntax that nobody has bothered to
690implement in Emacs.
691
692@cindex Control-Meta
693 By convention, the keys for these commands are all Control-Meta
694characters. They usually act on expressions just as the corresponding
695Meta characters act on words. For instance, the command @kbd{C-M-b}
696moves backward over a balanced expression, just as @kbd{M-b} moves
697back over a word.
698
699@kindex C-M-f 671@kindex C-M-f
700@kindex C-M-b 672@kindex C-M-b
701@findex forward-sexp 673@findex forward-sexp
702@findex backward-sexp 674@findex backward-sexp
703 To move forward over a balanced expression, use @kbd{C-M-f} 675 To move forward over a balanced expression, use @kbd{C-M-f}
704(@code{forward-sexp}). If the first significant character after point 676(@code{forward-sexp}). If the first significant character after point
705is an opening delimiter (@samp{(} in Lisp; @samp{(}, @samp{[} or 677is an opening delimiter (e.g.@: @samp{(}, @samp{[} or @samp{@{} in C),
706@samp{@{} in C), @kbd{C-M-f} moves past the matching closing 678this command moves past the matching closing delimiter. If the
707delimiter. If the character begins a symbol, string, or number, 679character begins a symbol, string, or number, the command moves over
708@kbd{C-M-f} moves over that. 680that.
709 681
710 The command @kbd{C-M-b} (@code{backward-sexp}) moves backward over a 682 The command @kbd{C-M-b} (@code{backward-sexp}) moves backward over a
711balanced expression. The detailed rules are like those above for 683balanced expression---like @kbd{C-M-f}, but in the reverse direction.
712@kbd{C-M-f}, but with directions reversed. If there are prefix 684If the expression is preceded by any prefix characters (single-quote,
713characters (single-quote, backquote and comma, in Lisp) preceding the 685backquote and comma, in Lisp), the command moves back over them as
714expression, @kbd{C-M-b} moves back over them as well. The balanced 686well.
715expression commands move across comments as if they were whitespace, 687
716in most modes. 688 @kbd{C-M-f} or @kbd{C-M-b} with an argument repeats that operation
717 689the specified number of times; with a negative argument means to move
718 @kbd{C-M-f} or @kbd{C-M-b} with an argument repeats that operation the 690in the opposite direction. In most modes, these two commands move
719specified number of times; with a negative argument, it moves in the 691across comments as if they were whitespace. Note that their keys,
720opposite direction. 692@kbd{C-M-f} and @kbd{C-M-b}, are analogous to @kbd{C-f} and @kbd{C-b},
693which move by characters (@pxref{Moving Point}), and @kbd{M-f} and
694@kbd{M-b}, which move by words (@pxref{Words}).
721 695
722@cindex killing expressions 696@cindex killing expressions
723@kindex C-M-k 697@kindex C-M-k
724@findex kill-sexp 698@findex kill-sexp
725 Killing a whole balanced expression can be done with @kbd{C-M-k} 699 To kill a whole balanced expression, type @kbd{C-M-k}
726(@code{kill-sexp}). @kbd{C-M-k} kills the characters that @kbd{C-M-f} 700(@code{kill-sexp}). This kills the text that @kbd{C-M-f} would move
727would move over. 701over.
728 702
729@cindex transposition of expressions 703@cindex transposition of expressions
730@kindex C-M-t 704@kindex C-M-t
731@findex transpose-sexps 705@findex transpose-sexps
732 A somewhat random-sounding command which is nevertheless handy is 706 @kbd{C-M-t} (@code{transpose-sexps}) switches the positions of the
733@kbd{C-M-t} (@code{transpose-sexps}), which drags the previous 707previous balanced expression and the next one. It is analogous to the
734balanced expression across the next one. An argument serves as a 708@kbd{C-t} command, which transposes characters (@pxref{Transpose}).
735repeat count, moving the previous expression over that many following 709An argument to @kbd{C-M-t} serves as a repeat count, moving the
736ones. A negative argument drags the previous balanced expression 710previous expression over that many following ones. A negative
737backwards across those before it (thus canceling out the effect of 711argument moves the previous balanced expression backwards across those
738@kbd{C-M-t} with a positive argument). An argument of zero, rather 712before it. An argument of zero, rather than doing nothing, transposes
739than doing nothing, transposes the balanced expressions ending at or 713the balanced expressions ending at or after point and the mark.
740after point and the mark.
741 714
742@kindex C-M-@@ 715@kindex C-M-@@
743@kindex C-M-@key{SPC} 716@kindex C-M-@key{SPC}
744@findex mark-sexp 717@findex mark-sexp
745 To operate on balanced expressions with an operation which acts on 718 To operate on balanced expressions with a command which acts on the
746the region, use the command @kbd{C-M-@key{SPC}} (@code{mark-sexp}). 719region, type @kbd{C-M-@key{SPC}} (@code{mark-sexp}). This sets the
747This sets the mark at the same place that @kbd{C-M-f} would move to. 720mark where @kbd{C-M-f} would move to. While the mark is active, each
748@xref{Marking Objects}, for more information about this command. 721successive call to this command extends the region by shifting the
749 722mark by one expression. Positive or negative numeric arguments move
750@kbd{C-M-@key{SPC}} treats 723the mark forward or backward by the specified number of expressions.
751numeric arguments in the same way as @kbd{C-M-f}; in particular, a 724The alias @kbd{C-M-@@} is equivalent to @kbd{C-M-@key{SPC}}.
752negative argument puts the mark at the beginning of the previous 725@xref{Marking Objects}, for more information about this and related
753balanced expression. The alias @kbd{C-M-@@} is equivalent to 726commands.
754@kbd{C-M-@key{SPC}}. While the mark is active, each successive use of
755@kbd{C-M-@key{SPC}} extends the region by shifting the mark by one
756sexp.
757 727
758 In languages that use infix operators, such as C, it is not possible 728 In languages that use infix operators, such as C, it is not possible
759to recognize all balanced expressions as such because there can be 729to recognize all balanced expressions because there can be multiple
760multiple possibilities at a given position. For example, C mode does 730possibilities at a given position. For example, C mode does not treat
761not treat @samp{foo + bar} as a single expression, even though it 731@samp{foo + bar} as a single expression, even though it @emph{is} one
762@emph{is} one C expression; instead, it recognizes @samp{foo} as one 732C expression; instead, it recognizes @samp{foo} as one expression and
763expression and @samp{bar} as another, with the @samp{+} as punctuation 733@samp{bar} as another, with the @samp{+} as punctuation between them.
764between them. Both @samp{foo + bar} and @samp{foo} are legitimate 734However, C mode recognizes @samp{(foo + bar)} as a single expression,
765choices for ``the expression following point'' when point is at the 735because of the parentheses.
766@samp{f}, so the expression commands must perforce choose one or the
767other to operate on. Note that @samp{(foo + bar)} is recognized as a
768single expression in C mode, because of the parentheses.
769 736
770@node Moving by Parens 737@node Moving by Parens
771@subsection Moving in the Parenthesis Structure 738@subsection Moving in the Parenthesis Structure
@@ -776,19 +743,18 @@ single expression in C mode, because of the parentheses.
776@cindex braces, moving across 743@cindex braces, moving across
777@cindex list commands 744@cindex list commands
778 745
779 The Emacs commands for handling parenthetical groupings see nothing 746 The following commands move over groupings delimited by parentheses
780except parentheses (or whatever characters must balance in the 747(or whatever else serves as delimiters in the language you are working
781language you are working with). They ignore strings and comments 748with). They ignore strings and comments, including any parentheses
782(including any parentheses within them) and ignore parentheses quoted 749within them, and also ignore parentheses that are ``quoted'' with an
783by an escape character. They are mainly intended for editing 750escape character. These commands are mainly intended for editing
784programs, but can be useful for editing any text that has parentheses. 751programs, but can be useful for editing any text containing
785They are sometimes called ``list'' commands because in Lisp these 752parentheses. They are referred to internally as ``list'' commands
786groupings are lists. 753because in Lisp these groupings are lists.
787 754
788These commands assume that the starting point is not inside a string 755 These commands assume that the starting point is not inside a string
789or a comment. Sometimes you can invoke them usefully from one of 756or a comment. If you invoke them from inside a string or comment, the
790these places (for example, when you have a parenthesised clause in a 757results are unreliable.
791comment) but this is unreliable.
792 758
793@table @kbd 759@table @kbd
794@item C-M-n 760@item C-M-n
@@ -826,52 +792,62 @@ delimiter, this is nearly the same as searching for a @samp{(}. An
826argument specifies the number of levels to go down. 792argument specifies the number of levels to go down.
827 793
828@node Matching 794@node Matching
829@subsection Automatic Display Of Matching Parentheses 795@subsection Matching Parentheses
830@cindex matching parentheses 796@cindex matching parentheses
831@cindex parentheses, displaying matches 797@cindex parentheses, displaying matches
832 798
833 The Emacs parenthesis-matching feature is designed to show 799 Emacs has a number of @dfn{parenthesis matching} features, which
834automatically how parentheses (and other matching delimiters) match in 800make it easy to see how and whether parentheses (or other delimiters)
835the text. Whenever you type a self-inserting character that is a 801match up.
836closing delimiter, the cursor moves momentarily to the location of the 802
803 Whenever you type a self-inserting character that is a closing
804delimiter, the cursor moves momentarily to the location of the
837matching opening delimiter, provided that is on the screen. If it is 805matching opening delimiter, provided that is on the screen. If it is
838not on the screen, Emacs displays some of the text near it in the echo 806not on the screen, Emacs displays some of the text near it in the echo
839area. Either way, you can tell which grouping you are closing off. 807area. Either way, you can tell which grouping you are closing off.
840 808If the opening delimiter and closing delimiter are mismatched---such
841 If the opening delimiter and closing delimiter are mismatched---such
842as in @samp{[x)}---a warning message is displayed in the echo area. 809as in @samp{[x)}---a warning message is displayed in the echo area.
843 810
844@vindex blink-matching-paren 811@vindex blink-matching-paren
845@vindex blink-matching-paren-distance 812@vindex blink-matching-paren-distance
846@vindex blink-matching-delay 813@vindex blink-matching-delay
847 Three variables control parenthesis match display: 814 Three variables control the display of matching parentheses:
848 815
849 @code{blink-matching-paren} turns the feature on or off: @code{nil} 816@itemize @bullet
850disables it, but the default is @code{t} to enable match display. 817@item
818@code{blink-matching-paren} turns the feature on or off: @code{nil}
819disables it, but the default is @code{t} to enable it.
851 820
852 @code{blink-matching-delay} says how many seconds to leave the 821@item
853cursor on the matching opening delimiter, before bringing it back to 822@code{blink-matching-delay} says how many seconds to leave the cursor
854the real location of point; the default is 1, but on some systems it 823on the matching opening delimiter, before bringing it back to the real
855is useful to specify a fraction of a second. 824location of point. This may be an integer or floating-point number;
825the default is 1.
856 826
857 @code{blink-matching-paren-distance} specifies how many characters 827@item
828@code{blink-matching-paren-distance} specifies how many characters
858back to search to find the matching opening delimiter. If the match 829back to search to find the matching opening delimiter. If the match
859is not found in that distance, scanning stops, and nothing is displayed. 830is not found in that distance, Emacs stops scanning and nothing is
860This is to prevent the scan for the matching delimiter from wasting 831displayed. The default is 102400.
861lots of time when there is no match. The default is 102400. 832@end itemize
862 833
863@cindex Show Paren mode 834@cindex Show Paren mode
864@cindex highlighting matching parentheses 835@cindex highlighting matching parentheses
865@findex show-paren-mode 836@findex show-paren-mode
866 Show Paren mode provides a more powerful kind of automatic matching. 837 Show Paren mode, a global minor mode, provides a more powerful kind
867Whenever point is before an opening delimiter or after a closing 838of automatic matching. Whenever point is before an opening delimiter
868delimiter, both that delimiter and its opposite delimiter are 839or after a closing delimiter, both that delimiter and its opposite
869highlighted. Use the command @kbd{M-x show-paren-mode} to enable or 840delimiter are highlighted. To toggle Show Paren mode, type @kbd{M-x
870disable this mode. 841show-paren-mode}.
871 842
872 Show Paren mode uses the faces @code{show-paren-match} and 843@cindex Electric Pair mode
873@code{show-paren-mismatch} to highlight parentheses; you can customize 844@cindex inserting matching parentheses
874them to control how highlighting looks. @xref{Face Customization}. 845@findex electric-pair-mode
846 Electric Pair mode, a global minor mode, provides a way to easily
847insert matching delimiters. Whenever you insert an opening delimiter,
848the matching closing delimiter is automatically inserted as well,
849leaving point between the two. To toggle Electric Pair mode, type
850@kbd{M-x electric-pair-mode}.
875 851
876@node Comments 852@node Comments
877@section Manipulating Comments 853@section Manipulating Comments
@@ -882,6 +858,23 @@ provides special commands for editing and inserting comments. It can
882also do spell checking on comments with Flyspell Prog mode 858also do spell checking on comments with Flyspell Prog mode
883(@pxref{Spelling}). 859(@pxref{Spelling}).
884 860
861 Some major modes have special rules for indenting different kinds of
862comments. For example, in Lisp code, comments starting with two
863semicolons are indented as if they were lines of code, while those
864starting with three semicolons are supposed to be aligned to the left
865margin and are often used for sectioning purposes. Emacs understand
866these conventions; for instance, typing @key{TAB} on a comment line
867will indent the comment to the appropriate position.
868
869@example
870;; This function is just an example.
871;;; Here either two or three semicolons are appropriate.
872(defun foo (x)
873;;; And now, the first part of the function:
874 ;; The following line adds one.
875 (1+ x)) ; This line adds one.
876@end example
877
885@menu 878@menu
886* Comment Commands:: Inserting, killing, and aligning comments. 879* Comment Commands:: Inserting, killing, and aligning comments.
887* Multi-Line Comments:: Commands for adding and editing multi-line comments. 880* Multi-Line Comments:: Commands for adding and editing multi-line comments.
@@ -893,12 +886,12 @@ also do spell checking on comments with Flyspell Prog mode
893@cindex indentation for comments 886@cindex indentation for comments
894@cindex alignment for comments 887@cindex alignment for comments
895 888
896 The commands in this table insert, kill and align comments: 889 The following commands operate on comments:
897 890
898@table @asis 891@table @asis
899@item @kbd{M-;} 892@item @kbd{M-;}
900Insert or realign comment on current line; alternatively, comment or 893Insert or realign comment on current line; if the region is active,
901uncomment the region (@code{comment-dwim}). 894comment or uncomment the region instead (@code{comment-dwim}).
902@item @kbd{C-u M-;} 895@item @kbd{C-u M-;}
903Kill comment on current line (@code{comment-kill}). 896Kill comment on current line (@code{comment-kill}).
904@item @kbd{C-x ;} 897@item @kbd{C-x ;}
@@ -909,7 +902,7 @@ Like @key{RET} followed by inserting and aligning a comment
909(@code{comment-indent-new-line}). @xref{Multi-Line Comments}. 902(@code{comment-indent-new-line}). @xref{Multi-Line Comments}.
910@item @kbd{M-x comment-region} 903@item @kbd{M-x comment-region}
911@itemx @kbd{C-c C-c} (in C-like modes) 904@itemx @kbd{C-c C-c} (in C-like modes)
912Add or remove comment delimiters on all the lines in the region. 905Add comment delimiters to all the lines in the region.
913@end table 906@end table
914 907
915@kindex M-; 908@kindex M-;
@@ -920,65 +913,61 @@ I Mean''; it indicates that this command can be used for many
920different jobs relating to comments, depending on the situation where 913different jobs relating to comments, depending on the situation where
921you use it. 914you use it.
922 915
923 When a region is active, @kbd{M-;} either adds or removes comment 916 When a region is active (@pxref{Mark}), @kbd{M-;} either adds
924delimiters on each line of the region. @xref{Mark}. If every line in 917comment delimiters to the region, or removes them. If every line in
925the region is a comment, it removes comment delimiters from each; 918the region is already a comment, it ``uncomments'' each of those lines
926otherwise, it adds comment delimiters to each. You can also use the 919by removing their comment delimiters. Otherwise, it adds comment
927commands @code{comment-region} and @code{uncomment-region} to 920delimiters to enclose the text in the region.
928explicitly comment or uncomment the text in the region 921
929(@pxref{Multi-Line Comments}). If you supply a prefix argument to 922 If you supply a prefix argument to @kbd{M-;} when a region is
930@kbd{M-;} when a region is active, that specifies how many comment 923active, that specifies the number of comment delimiters to add or
931delimiters to add or how many to delete. 924delete. A positive argument @var{n} adds @var{n} delimiters, while a
932 925negative argument @var{-n} removes @var{n} delimiters.
933 If the region is not active, @kbd{M-;} inserts a new comment if 926
934there is no comment already on the line. The new comment is normally 927 If the region is not active, and there is no existing comment on the
935aligned at a specific column called the @dfn{comment column}; if the 928current line, @kbd{M-;} adds a new comment to the current line. If
936text of the line extends past the comment column, @kbd{M-;} aligns the 929the line is blank (i.e.@: empty or containing only whitespace
937comment start string to a suitable boundary (usually, at least one 930characters), the comment is indented to the same position where
938space is inserted). The comment begins with the string Emacs thinks 931@key{TAB} would indent to (@pxref{Basic Indent}). If the line is
939comments should start with (the value of @code{comment-start}; see 932non-blank, the comment is placed after the last non-whitespace
940below). Emacs places point after that string, so you can insert the 933character on the line; normally, Emacs tries putting it at the column
941text of the comment right away. If the major mode has specified a 934specified by the variable @code{comment-column} (@pxref{Options for
942string to terminate comments, @kbd{M-;} inserts that string after 935Comments}), but if the line already extends past that column, it puts
943point, to keep the syntax valid. 936the comment at some suitable position, usually separated from the
937non-comment text by at least one space. In each case, Emacs places
938point after the comment's starting delimiter, so that you can start
939typing the comment text right away.
944 940
945 You can also use @kbd{M-;} to align an existing comment. If a line 941 You can also use @kbd{M-;} to align an existing comment. If a line
946already contains the comment-start string, @kbd{M-;} realigns it to 942already contains the comment-start string, @kbd{M-;} realigns it to
947the conventional alignment and moves point after it. (Exception: 943the conventional alignment and moves point after the comment's
948comments starting in column 0 are not moved.) Even when an existing 944starting delimiter. As an exception, comments starting in column 0
949comment is properly aligned, @kbd{M-;} is still useful for moving 945are not moved. Even when an existing comment is properly aligned,
950directly to the start of the text inside the comment. 946@kbd{M-;} is still useful for moving directly to the start of the
947comment text.
951 948
952@findex comment-kill 949@findex comment-kill
953@kindex C-u M-; 950@kindex C-u M-;
954 @kbd{C-u M-;} kills any comment on the current line, along with the 951 @kbd{C-u M-;} (@code{comment-dwim} with a prefix argument) kills any
955whitespace before it. To reinsert the comment on another line, move 952comment on the current line, along with the whitespace before it.
956to the end of that line, do @kbd{C-y}, and then do @kbd{M-;} to 953Since the comment is saved to the kill ring, you can reinsert it on
957realign it. 954another line by moving to the end of that line, doing @kbd{C-y}, and
958 955then @kbd{M-;} to realign the command. You can achieve the same
959 Note that @kbd{C-u M-;} is not a distinct key; it is @kbd{M-;} 956effect as @kbd{C-u M-;} by typing @kbd{M-x comment-kill}
960(@code{comment-dwim}) with a prefix argument. That command is 957(@code{comment-dwim} actually calls @code{comment-kill} as a
961programmed so that when it receives a prefix argument it calls 958subroutine when it is given a prefix argument).
962@code{comment-kill}. However, @code{comment-kill} is a valid command
963in its own right, and you can bind it directly to a key if you wish.
964
965 Some major modes have special rules for aligning certain kinds of
966comments in certain contexts. For example, in Lisp code, comments which
967start with two semicolons are indented as if they were lines of code,
968instead of at the comment column. Comments which start with three
969semicolons are supposed to start at the left margin and are often used
970for sectioning purposes. Emacs understands
971these conventions by indenting a double-semicolon comment using @key{TAB},
972and by not changing the indentation of a triple-semicolon comment at all.
973 959
974@example 960@kindex C-c C-c (C mode)
975;; This function is just an example. 961@findex comment-region
976;;; Here either two or three semicolons are appropriate. 962@findex uncomment-region
977(defun foo (x) 963 The command @kbd{M-x comment-region} is equivalent to calling
978;;; And now, the first part of the function: 964@kbd{M-;} on an active region, except that it always acts on the
979 ;; The following line adds one. 965region, even if the mark is inactive. In C mode and related modes,
980 (1+ x)) ; This line adds one. 966this command is bound to @kbd{C-c C-c}. The command @kbd{M-x
981@end example 967uncomment-region} uncomments each line in the region; a numeric prefix
968argument specifies the number of comment delimiters to remove
969(negative arguments specify the number of comment to delimiters to
970add).
982 971
983 For C-like modes, you can configure the exact effect of @kbd{M-;} by 972 For C-like modes, you can configure the exact effect of @kbd{M-;} by
984setting the variables @code{c-indent-comment-alist} and 973setting the variables @code{c-indent-comment-alist} and
@@ -994,32 +983,31 @@ the brace rather than at @code{comment-column}. For full details see
994@kindex M-j 983@kindex M-j
995@cindex blank lines in programs 984@cindex blank lines in programs
996@findex comment-indent-new-line 985@findex comment-indent-new-line
997 986@vindex comment-multi-line
998 If you are typing a comment and wish to continue it on another line, 987 If you are typing a comment and wish to continue it to another line,
999you can use the command @kbd{C-M-j} or @kbd{M-j} 988type @kbd{M-j} or @kbd{C-M-j} (@code{comment-indent-new-line}). This
1000(@code{comment-indent-new-line}). If @code{comment-multi-line} 989breaks the current line, and inserts the necessary comment delimiters
1001(@pxref{Options for Comments}) is non-@code{nil}, it moves to a new 990and indentation to continue the comment.
1002line within the comment. Otherwise it closes the comment and starts a 991
1003new comment on a new line. When Auto Fill mode is on, going past the 992 For languages with closing comment delimiters (e.g.@: @samp{*/} in
1004fill column while typing a comment causes the comment to be continued 993C), the exact behavior of @kbd{M-j} depends on the value of the
1005in just this fashion. 994variable @code{comment-multi-line}. If the value is @code{nil}, the
1006 995command closes the comment on the old line and starts a new comment on
1007@kindex C-c C-c (C mode) 996the new line. Otherwise, it opens a new line within the current
1008@findex comment-region 997comment delimiters.
1009 To turn existing lines into comment lines, use the @kbd{M-x 998
1010comment-region} command (or type @kbd{C-c C-c} in C-like modes). It 999 When Auto Fill mode is on, going past the fill column while typing a
1011adds comment delimiters to the lines that start in the region, thus 1000comment also continues the comment, in the same way as an explicit
1012commenting them out. With a negative argument, it does the 1001invocation of @kbd{M-j}.
1013opposite---it deletes comment delimiters from the lines in the region. 1002
1014 1003 To turn existing lines into comment lines, use @kbd{M-;} with the
1015 With a positive argument, @code{comment-region} duplicates the last 1004region active, or use @kbd{M-x comment-region}
1016character of the comment start sequence it adds; the argument 1005@ifinfo
1017specifies how many copies of the character to insert. Thus, in Lisp 1006(@pxref{Comment Commands}).
1018mode, @kbd{C-u 2 M-x comment-region} adds @samp{;;} to each line. 1007@end ifinfo
1019Duplicating the comment delimiter is a way of calling attention to the 1008@ifnotinfo
1020comment. It can also affect how the comment is aligned or indented. 1009as described in the preceding section.
1021In Lisp, for proper indentation, you should use an argument of two or 1010@end ifnotinfo
1022three, if between defuns; if within a defun, it must be three.
1023 1011
1024 You can configure C Mode such that when you type a @samp{/} at the 1012 You can configure C Mode such that when you type a @samp{/} at the
1025start of a line in a multi-line block comment, this closes the 1013start of a line in a multi-line block comment, this closes the
@@ -1032,19 +1020,16 @@ comment. Enable the @code{comment-close-slash} clean-up for this.
1032@vindex comment-column 1020@vindex comment-column
1033@kindex C-x ; 1021@kindex C-x ;
1034@findex comment-set-column 1022@findex comment-set-column
1035 The @dfn{comment column}, the column at which Emacs tries to place 1023 As mentioned in @ref{Comment Commands}, when the @kbd{M-j} command
1036comments, is stored in the variable @code{comment-column}. You can 1024adds a comment to a line, it tries to place the comment at the column
1037set it to a number explicitly. Alternatively, the command @kbd{C-x ;} 1025specified by the buffer-local variable @code{comment-column}. You can
1038(@code{comment-set-column}) sets the comment column to the column 1026set either the local value or the default value of this buffer-local
1039point is at. @kbd{C-u C-x ;} sets the comment column to match the 1027variable in the usual way (@pxref{Locals}). Alternatively, you can
1040last comment before point in the buffer, and then does a @kbd{M-;} to 1028type @kbd{C-x ;} (@code{comment-set-column}) to set the value of
1041align the current line's comment under the previous one. 1029@code{comment-column} in the current buffer to the column where point
1042 1030is currently located. @kbd{C-u C-x ;} sets the comment column to
1043 The variable @code{comment-column} is per-buffer: setting the variable 1031match the last comment before point in the buffer, and then does a
1044in the normal fashion affects only the current buffer, but there is a 1032@kbd{M-;} to align the current line's comment under the previous one.
1045default value which you can change with @code{setq-default}.
1046@xref{Locals}. Many major modes initialize this variable for the
1047current buffer.
1048 1033
1049@vindex comment-start-skip 1034@vindex comment-start-skip
1050 The comment commands recognize comments based on the regular 1035 The comment commands recognize comments based on the regular
@@ -1053,39 +1038,32 @@ Make sure this regexp does not match the null string. It may match more
1053than the comment starting delimiter in the strictest sense of the word; 1038than the comment starting delimiter in the strictest sense of the word;
1054for example, in C mode the value of the variable is 1039for example, in C mode the value of the variable is
1055@c This stops M-q from breaking the line inside that @code. 1040@c This stops M-q from breaking the line inside that @code.
1056@code{@w{"/\\*+ *\\|//+ *"}}, which matches extra stars and spaces 1041@code{@w{"\\(//+\\|/\\*+\\)\\s *"}}, which matches extra stars and
1057after the @samp{/*} itself, and accepts C++ style comments also. 1042spaces after the @samp{/*} itself, and accepts C++ style comments
1058(Note that @samp{\\} is needed in Lisp syntax to include a @samp{\} in 1043also. (Note that @samp{\\} is needed in Lisp syntax to include a
1059the string, which is needed to deny the first star its special meaning 1044@samp{\} in the string, which is needed to deny the first star its
1060in regexp syntax. @xref{Regexp Backslash}.) 1045special meaning in regexp syntax. @xref{Regexp Backslash}.)
1061 1046
1062@vindex comment-start 1047@vindex comment-start
1063@vindex comment-end 1048@vindex comment-end
1064 When a comment command makes a new comment, it inserts the value of 1049 When a comment command makes a new comment, it inserts the value of
1065@code{comment-start} to begin it. The value of @code{comment-end} is 1050@code{comment-start} as an opening comment delimiter. It also inserts
1066inserted after point, so that it will follow the text that you will 1051the value of @code{comment-end} after point, as a closing comment
1067insert into the comment. When @code{comment-end} is non-empty, it 1052delimiter. For example, in Lisp mode, @code{comment-start} is
1068should start with a space. For example, in C mode, 1053@samp{";"} and @code{comment-end} is @code{""} (the empty string). In
1069@code{comment-start} has the value @w{@code{"/* "}} and 1054C mode, @code{comment-start} is @code{"/* "} and @code{comment-end} is
1070@code{comment-end} has the value @w{@code{" */"}}. 1055@code{" */"}.
1071 1056
1072@vindex comment-padding 1057@vindex comment-padding
1073 The variable @code{comment-padding} specifies how many spaces 1058 The variable @code{comment-padding} specifies a string that the
1074@code{comment-region} should insert on each line between the comment 1059commenting commands should insert between the comment delimiter(s) and
1075delimiter and the line's original text. The default is 1, to insert 1060the comment text. The default, @samp{" "}, specifies a single space.
1076one space. @code{nil} means 0. Alternatively, @code{comment-padding} 1061Alternatively, the value can be a number, which specifies that number
1077can hold the actual string to insert. 1062of spaces, or @code{nil}, which means no spaces at all.
1078 1063
1079@vindex comment-multi-line 1064 The variable @code{comment-multi-line} controls how @kbd{M-j} and
1080 The variable @code{comment-multi-line} controls how @kbd{C-M-j} 1065Auto Fill mode continue comments over multiple lines.
1081(@code{indent-new-comment-line}) behaves when used inside a comment. 1066@xref{Multi-Line Comments}.
1082Specifically, when @code{comment-multi-line} is @code{nil}, the
1083command inserts a comment terminator, begins a new line, and finally
1084inserts a comment starter. Otherwise it does not insert the
1085terminator and starter, so it effectively continues the current
1086comment across multiple lines. In languages that allow multi-line
1087comments, the choice of value for this variable is a matter of taste.
1088The default for this variable depends on the major mode.
1089 1067
1090@vindex comment-indent-function 1068@vindex comment-indent-function
1091 The variable @code{comment-indent-function} should contain a function 1069 The variable @code{comment-indent-function} should contain a function
@@ -1139,7 +1117,7 @@ mode which @kbd{C-h S} does support.
1139@node Man Page 1117@node Man Page
1140@subsection Man Page Lookup 1118@subsection Man Page Lookup
1141 1119
1142@cindex manual page 1120@cindex man page
1143 On Unix, the main form of on-line documentation was the @dfn{manual 1121 On Unix, the main form of on-line documentation was the @dfn{manual
1144page} or @dfn{man page}. In the GNU operating system, we aim to 1122page} or @dfn{man page}. In the GNU operating system, we aim to
1145replace man pages with better-organized manuals that you can browse 1123replace man pages with better-organized manuals that you can browse
@@ -1148,71 +1126,51 @@ still useful to read manual pages.
1148 1126
1149@findex manual-entry 1127@findex manual-entry
1150 You can read the man page for an operating system command, library 1128 You can read the man page for an operating system command, library
1151function, or system call, with the @kbd{M-x man} command. It 1129function, or system call, with the @kbd{M-x man} command. This
1152runs the @code{man} program to format the man page; if the system 1130prompts for a topic, with completion (@pxref{Completion}), and runs
1153permits, it runs @code{man} asynchronously, so that you can keep on 1131the @command{man} program to format the corresponding man page. If
1154editing while the page is being formatted. (On MS-DOS and MS-Windows 1132the system permits, it runs @command{man} asynchronously, so that you
11553, you cannot edit while Emacs waits for @code{man} to finish.) The 1133can keep on editing while the page is being formatted. The result
1156result goes in a buffer named @samp{*Man @var{topic}*}. These buffers 1134goes in a buffer named @samp{*Man @var{topic}*}. These buffers use a
1157use a special major mode, Man mode, that facilitates scrolling and 1135special major mode, Man mode, that facilitates scrolling and jumping
1158jumping to other manual pages. For details, type @kbd{C-h m} while in 1136to other manual pages. For details, type @kbd{C-h m} while in a Man
1159a man page buffer. 1137mode buffer.
1160 1138
1161@cindex sections of manual pages 1139@cindex sections of manual pages
1162 Each man page belongs to one of ten or more @dfn{sections}, each 1140 Each man page belongs to one of ten or more @dfn{sections}, each
1163named by a digit or by a digit and a letter. Sometimes there are 1141named by a digit or by a digit and a letter. Sometimes there are man
1164multiple man pages with the same name in different sections. To read 1142pages with the same name in different sections. To read a man page
1165a man page from a specific section, type 1143from a specific section, type @samp{@var{topic}(@var{section})} or
1166@samp{@var{topic}(@var{section})} or @samp{@var{section} @var{topic}} 1144@samp{@var{section} @var{topic}} when @kbd{M-x manual-entry} prompts
1167when @kbd{M-x manual-entry} prompts for the topic. For example, to 1145for the topic. For example, the man page for the C library function
1168read the man page for the C library function @code{chmod} (as opposed 1146@code{chmod} is in section 2, but there is a shell command of the same
1169to a command of the same name), type @kbd{M-x manual-entry @key{RET} 1147name, whose man page is in section 1; to view the former, type
1170chmod(2) @key{RET}}. (@code{chmod} is a system call, so it is in 1148@kbd{M-x manual-entry @key{RET} chmod(2) @key{RET}}.
1171section @samp{2}.)
1172 1149
1173@vindex Man-switches 1150@vindex Man-switches
1174 If you do not specify a section, the results depend on how the 1151@kindex M-n @r{(Man mode)}
1175@code{man} program works on your system. Some of them display only 1152@kindex M-p @r{(Man mode)}
1176the first man page they find. Others display all man pages that have 1153 If you do not specify a section, @kbd{M-x man} normally displays
1177the specified name, so you can move between them with the @kbd{M-n} 1154only the first man page found. On some systems, the @code{man}
1178and @kbd{M-p} keys@footnote{On some systems, the @code{man} program 1155program accepts a @samp{-a} command-line option, which tells it to
1179accepts a @samp{-a} command-line option which tells it to display all 1156display all the man pages for the specified topic. To make use of
1180the man pages for the specified topic. If you want this behavior, you 1157this, change the value of the variable @code{Man-switches} to
1181can add this option to the value of the variable @code{Man-switches}.}. 1158@samp{"-a"}. Then, in the Man mode buffer, you can type @kbd{M-n} and
1182The mode line shows how many manual pages are present in the Man buffer. 1159@kbd{M-p} to switch between man pages in different sections. The mode
1183 1160line shows how many manual pages are available.
1184@vindex Man-fontify-manpage-flag
1185 By default, Emacs highlights the text in man pages. For a long man
1186page, highlighting can take substantial time. You can turn off
1187highlighting of man pages by setting the variable
1188@code{Man-fontify-manpage-flag} to @code{nil}.
1189
1190@findex Man-fontify-manpage
1191 If you insert the text of a man page into an Emacs buffer in some
1192other fashion, you can use the command @kbd{M-x Man-fontify-manpage} to
1193perform the same conversions that @kbd{M-x manual-entry} does.
1194 1161
1195@findex woman 1162@findex woman
1196@cindex manual pages, on MS-DOS/MS-Windows 1163@cindex manual pages, on MS-DOS/MS-Windows
1197 An alternative way of reading manual pages is the @kbd{M-x woman} 1164 An alternative way of reading manual pages is the @kbd{M-x woman}
1198command@footnote{The name of the command, @code{woman}, is an acronym 1165command. Unlike @kbd{M-x man}, it does not run any external programs
1199for ``w/o (without) man,'' since it doesn't use the @code{man} 1166to format and display the man pages; the formatting is done by Emacs,
1200program.}. Unlike @kbd{M-x man}, it does not run any external 1167so it works on systems such as MS-Windows where the @command{man}
1201programs to format and display the man pages; instead it does the job 1168program may be unavailable. It prompts for a man page, and displays
1202in Emacs Lisp, so it works on systems such as MS-Windows, where the 1169it in a buffer named @samp{*WoMan @var{section} @var{topic}}.
1203@code{man} program (and other programs it uses) are not generally 1170
1204available. 1171 @kbd{M-x woman} computes the completion list for manpages the first
1205 1172time you invoke the command. With a numeric argument, it recomputes
1206 @kbd{M-x woman} prompts for a name of a manual page, and provides 1173this list; this is useful if you add or delete manual pages.
1207completion based on the list of manual pages that are installed on
1208your machine; the list of available manual pages is computed
1209automatically the first time you invoke @code{woman}. The word at
1210point in the current buffer is used to suggest the default for the
1211name of the manual page.
1212
1213 With a numeric argument, @kbd{M-x woman} recomputes the list of the
1214manual pages used for completion. This is useful if you add or delete
1215manual pages.
1216 1174
1217 If you type a name of a manual page and @kbd{M-x woman} finds that 1175 If you type a name of a manual page and @kbd{M-x woman} finds that
1218several manual pages by the same name exist in different sections, it 1176several manual pages by the same name exist in different sections, it
@@ -1220,48 +1178,51 @@ pops up a window with possible candidates asking you to choose one of
1220them. 1178them.
1221 1179
1222 For more information about setting up and using @kbd{M-x woman}, see 1180 For more information about setting up and using @kbd{M-x woman}, see
1223@ref{Top, WoMan, Browse UN*X Manual Pages WithOut Man, woman, The WoMan 1181@ifinfo
1224Manual}. 1182@ref{Top, WoMan, Browse UN*X Manual Pages WithOut Man, woman, The
1183WoMan Manual}.
1184@end ifinfo
1185@ifnotinfo
1186the WoMan Info manual, which is distributed with Emacs.
1187@end ifnotinfo
1225 1188
1226@node Lisp Doc 1189@node Lisp Doc
1227@subsection Emacs Lisp Documentation Lookup 1190@subsection Emacs Lisp Documentation Lookup
1228 1191
1229 As you edit Lisp code to be run in Emacs, you can use the commands 1192 When editing Emacs Lisp code, you can use the commands @kbd{C-h f}
1230@kbd{C-h f} (@code{describe-function}) and @kbd{C-h v} 1193(@code{describe-function}) and @kbd{C-h v} (@code{describe-variable})
1231(@code{describe-variable}) to view documentation of functions and 1194to view the built-in documentation for the Lisp functions and
1232variables that you want to use. These commands use the minibuffer to 1195variables that you want to use. @xref{Name Help}.
1233read the name of a function or variable to document, and display the
1234documentation in a window. Their default arguments are based on the
1235code in the neighborhood of point. For @kbd{C-h f}, the default is
1236the function called in the innermost list containing point. @kbd{C-h
1237v} uses the symbol name around or adjacent to point as its default.
1238 1196
1239@cindex Eldoc mode 1197@cindex Eldoc mode
1240@findex eldoc-mode 1198@findex eldoc-mode
1241 A more automatic but less powerful method is Eldoc mode. This minor 1199 Eldoc is a buffer-local minor mode that helps with looking up Lisp
1242mode constantly displays in the echo area the argument list for the 1200documention. When it is enabled, the echo area displays some useful
1243function being called at point. (In other words, it finds the 1201information whenever there is a Lisp function or variable at point;
1244function call that point is contained in, and displays the argument 1202for a function, it shows the argument list, and for a variable it
1245list of that function.) If point is over a documented variable, it 1203shows the first line of the variable's documentation string. To
1246shows the first line of the variable's docstring. Eldoc mode applies 1204toggle Eldoc mode, type @kbd{M-x eldoc-mode}. Eldoc mode can be used
1247in Emacs Lisp and Lisp Interaction modes, and perhaps a few others 1205with the Emacs Lisp and Lisp Interaction major modes.
1248that provide special support for looking up doc strings. Use the
1249command @kbd{M-x eldoc-mode} to enable or disable this feature.
1250 1206
1251@node Hideshow 1207@node Hideshow
1252@section Hideshow minor mode 1208@section Hideshow minor mode
1209@cindex Hideshow mode
1210@cindex mode, Hideshow
1253 1211
1254@findex hs-minor-mode 1212@findex hs-minor-mode
1255 Hideshow minor mode provides selective display of portions of a 1213 Hideshow mode is a buffer-local minor mode that allows you to
1256program, known as @dfn{blocks}. You can use @kbd{M-x hs-minor-mode} 1214selectively display portions of a program, which are referred to as
1257to enable or disable this mode, or add @code{hs-minor-mode} to the 1215@dfn{blocks}. Type @kbd{M-x hs-minor-mode} to toggle this minor mode
1258mode hook for certain major modes in order to enable it automatically 1216(@pxref{Minor Modes}).
1259for those modes. 1217
1218 When you use Hideshow mode to hide a block, the block disappears
1219from the screen, to be replaced by an ellipsis (three periods in a
1220row). Just what constitutes a block depends on the major mode. In C
1221mode and related modes, blocks are delimited by braces, while in Lisp
1222mode they are delimited by parentheses. Multi-line comments also
1223count as blocks.
1260 1224
1261 Just what constitutes a block depends on the major mode. In C mode 1225 Hideshow mode provides the following commands:
1262or C++ mode, they are delimited by braces, while in Lisp mode and
1263similar modes they are delimited by parentheses. Multi-line comments
1264also count as blocks.
1265 1226
1266@findex hs-hide-all 1227@findex hs-hide-all
1267@findex hs-hide-block 1228@findex hs-hide-block
@@ -1285,11 +1246,11 @@ Show the current block (@code{hs-show-block}).
1285@item C-c @@ C-c 1246@item C-c @@ C-c
1286Either hide or show the current block (@code{hs-toggle-hiding}). 1247Either hide or show the current block (@code{hs-toggle-hiding}).
1287@item S-Mouse-2 1248@item S-Mouse-2
1288Either hide or show the block you click on (@code{hs-mouse-toggle-hiding}). 1249Toggle hiding for the block you click on (@code{hs-mouse-toggle-hiding}).
1289@item C-c @@ C-M-h 1250@item C-c @@ C-M-h
1290Hide all top-level blocks (@code{hs-hide-all}). 1251Hide all top-level blocks (@code{hs-hide-all}).
1291@item C-c @@ C-M-s 1252@item C-c @@ C-M-s
1292Show everything in the buffer (@code{hs-show-all}). 1253Show all blocks in the buffer (@code{hs-show-all}).
1293@item C-c @@ C-l 1254@item C-c @@ C-l
1294Hide all blocks @var{n} levels below this block 1255Hide all blocks @var{n} levels below this block
1295(@code{hs-hide-level}). 1256(@code{hs-hide-level}).
@@ -1298,80 +1259,55 @@ Hide all blocks @var{n} levels below this block
1298@vindex hs-hide-comments-when-hiding-all 1259@vindex hs-hide-comments-when-hiding-all
1299@vindex hs-isearch-open 1260@vindex hs-isearch-open
1300@vindex hs-special-modes-alist 1261@vindex hs-special-modes-alist
1301 These variables exist for customizing Hideshow mode. 1262 These variables can be used to customize Hideshow mode:
1302 1263
1303@table @code 1264@table @code
1304@item hs-hide-comments-when-hiding-all 1265@item hs-hide-comments-when-hiding-all
1305Non-@code{nil} says that @kbd{hs-hide-all} should hide comments too. 1266If non-@code{nil}, @kbd{C-c @@ C-M-h} (@code{hs-hide-all}) hides
1267comments too.
1306 1268
1307@item hs-isearch-open 1269@item hs-isearch-open
1308Specifies what kind of hidden blocks incremental search should make 1270This variable specifies the conditions under which incremental search
1309visible. The value should be one of these four symbols: 1271should unhide a hidden block when matching text occurs within the
1310 1272block. Its value should be either @code{code} (unhide only code
1311@table @code 1273blocks), @code{comment} (unhide only comments), @code{t} (unhide both
1312@item code 1274code blocks and comments), or @code{nil} (unhide neither code blocks
1313Open only code blocks. 1275nor comments). The default value is @code{code}.
1314@item comment
1315Open only comments.
1316@item t
1317Open both code blocks and comments.
1318@item nil
1319Open neither code blocks nor comments.
1320@end table
1321
1322@item hs-special-modes-alist
1323A list of elements, each specifying how to initialize Hideshow
1324variables for one major mode. See the variable's documentation string
1325for more information.
1326@end table 1276@end table
1327 1277
1328@node Symbol Completion 1278@node Symbol Completion
1329@section Completion for Symbol Names 1279@section Completion for Symbol Names
1330@cindex completion (symbol names) 1280@cindex completion (symbol names)
1331 1281
1332 In Emacs, completion is something you normally do in the minibuffer 1282 Completion is normally done in the minibuffer (@pxref{Completion}),
1333(@pxref{Completion}). But one kind of completion is available in all 1283but you can also complete symbol names in ordinary Emacs buffers.
1334buffers: completion for symbol names.
1335 1284
1336@kindex M-TAB 1285@kindex M-TAB
1337 The character @kbd{M-@key{TAB}} runs a command to complete the 1286@kindex C-M-i
1338partial symbol before point against the set of meaningful symbol 1287 In programming language modes, type @kbd{C-M-i} or @kbd{M-@key{TAB}}
1339names. This command inserts at point any additional characters that 1288to complete the partial symbol before point. On graphical displays,
1340it can determine from the partial name. 1289the @kbd{M-@key{TAB}} key is usually reserved by the window manager
1341 1290for switching graphical windows, so you should type @kbd{C-M-i} or
1342 If your window manager defines @kbd{M-@key{TAB}} to switch windows, 1291@kbd{@key{ESC} @key{TAB}} instead.
1343you can type @kbd{@key{ESC} @key{TAB}} or @kbd{C-M-i} instead.
1344However, most window managers let you customize these shortcuts, so
1345you can change any that interfere with the way you use Emacs.
1346
1347 If the partial name in the buffer has multiple possible completions
1348that differ in the very next character, so that it is impossible to
1349complete even one more character, @kbd{M-@key{TAB}} displays a list of
1350all possible completions in another window.
1351 1292
1352@cindex tags-based completion 1293@cindex tags-based completion
1353@cindex Info index completion 1294@findex completion-at-point
1354@findex complete-symbol
1355 In most programming language major modes, @kbd{M-@key{TAB}} runs the
1356command @code{complete-symbol}, which provides two kinds of completion.
1357Normally it does completion based on a tags table (@pxref{Tags}); with a
1358numeric argument (regardless of the value), it does completion based on
1359the names listed in the Info file indexes for your language. Thus, to
1360complete the name of a symbol defined in your own program, use
1361@kbd{M-@key{TAB}} with no argument; to complete the name of a standard
1362library function, use @kbd{C-u M-@key{TAB}}. Of course, Info-based
1363completion works only if there is an Info file for the standard library
1364functions of your language, and only if it is installed at your site.
1365
1366@cindex Lisp symbol completion 1295@cindex Lisp symbol completion
1367@cindex completion (Lisp symbols) 1296@cindex completion (Lisp symbols)
1368@findex lisp-complete-symbol 1297 In most programming language modes, @kbd{C-M-i} (or
1369 In Emacs-Lisp mode, the name space for completion normally consists of 1298@kbd{M-@key{TAB}}) invokes the command @code{completion-at-point},
1370nontrivial symbols present in Emacs---those that have function 1299which generates its completion list in a flexible way. If Semantic
1371definitions, values or properties. However, if there is an 1300mode is enabled, it tries to use the Semantic parser data for
1372open-parenthesis immediately before the beginning of the partial symbol, 1301completion (@pxref{Semantic}). If Semantic mode is not enabled or
1373only symbols with function definitions are considered as completions. 1302fails at performing completion, it tries to complete using the
1374The command which implements this is @code{lisp-complete-symbol}. 1303selected tags table (@pxref{Tags}). If in Emacs Lisp mode, it
1304performs completion using the function, variable, or property names
1305defined in the current Emacs session.
1306
1307 In all other respects, in-buffer symbol completion behaves like
1308minibuffer completion. For instance, if Emacs cannot complete to a
1309unique symbol, it displays a list of completion alternatives in
1310another window. @xref{Completion}.
1375 1311
1376 In Text mode and related modes, @kbd{M-@key{TAB}} completes words 1312 In Text mode and related modes, @kbd{M-@key{TAB}} completes words
1377based on the spell-checker's dictionary. @xref{Spelling}. 1313based on the spell-checker's dictionary. @xref{Spelling}.
@@ -1379,20 +1315,20 @@ based on the spell-checker's dictionary. @xref{Spelling}.
1379@node Glasses 1315@node Glasses
1380@section Glasses minor mode 1316@section Glasses minor mode
1381@cindex Glasses mode 1317@cindex Glasses mode
1382@cindex identifiers, making long ones readable 1318@cindex camel case
1383@cindex StudlyCaps, making them readable 1319@findex mode, Glasses
1384@findex glasses-mode 1320
1385 1321 Glasses mode is a buffer-local minor mode that makes it easier to
1386 Glasses minor mode makes @samp{unreadableIdentifiersLikeThis} 1322read mixed-case (or ``CamelCase'') symbols like
1387readable by altering the way they display. It knows two different 1323@samp{unReadableSymbol}, by altering how they are displayed. By
1388ways to do this: by displaying underscores between a lower-case letter 1324default, it displays extra underscores between each lower-case letter
1389and the following capital letter, and by emboldening the capital 1325and the following capital letter. This does not alter the buffer
1390letters. It does not alter the buffer text, only the way they 1326text, only how it is displayed.
1391display, so you can use it even on read-only buffers. You can use the 1327
1392command @kbd{M-x glasses-mode} to enable or disable the mode in the 1328 To toggle Glasses mode, type @kbd{M-x glasses-mode} (@pxref{Minor
1393current buffer; you can also add @code{glasses-mode} to the mode hook 1329Modes}). When Glasses mode is enabled, the minor mode indicator
1394of the programming language major modes in which you normally want 1330@samp{o^o} appears in the mode line. For more information about
1395to use Glasses mode. 1331Glasses mode, type @kbd{C-h P glasses @key{RET}}.
1396 1332
1397@node Semantic 1333@node Semantic
1398@section Semantic 1334@section Semantic
@@ -1400,23 +1336,24 @@ to use Glasses mode.
1400 1336
1401Semantic is a package that provides language-aware editing commands 1337Semantic is a package that provides language-aware editing commands
1402based on @code{source code parsers}. This section provides a brief 1338based on @code{source code parsers}. This section provides a brief
1403description of Semantic; 1339description of Semantic; for full details,
1404@ifnottex 1340@ifnottex
1405for full details, see @ref{Top, Semantic,, semantic, Semantic}. 1341see @ref{Top, Semantic,, semantic, Semantic}.
1406@end ifnottex 1342@end ifnottex
1407@iftex 1343@iftex
1408for full details, type @kbd{C-h i} (@code{info}) and then select the 1344see the Semantic Info manual, which is distributed with Emacs.
1409Semantic manual.
1410@end iftex 1345@end iftex
1411 1346
1412 Most of the ``language aware'' features in Emacs, such as font lock 1347 Most of the ``language aware'' features in Emacs, such as Font Lock
1413(@pxref{Font Lock}), rely on ``rules of thumb''@footnote{Regular 1348mode (@pxref{Font Lock}), rely on ``rules of thumb''@footnote{Regular
1414expressions and syntax tables.} that usually give good results but are 1349expressions and syntax tables.} that usually give good results but are
1415never completely exact. In contrast, the parsers used by Semantic 1350never completely exact. In contrast, the parsers used by Semantic
1416have an exact understanding of programming language syntax. This 1351have an exact understanding of programming language syntax. This
1417allows Semantic to provide search, navigation, and completion commands 1352allows Semantic to provide search, navigation, and completion commands
1418that are powerful and precise. 1353that are powerful and precise.
1419 1354
1355@cindex Semantic mode
1356@cindex mode, Semantic
1420 To begin using Semantic, type @kbd{M-x semantic-mode} or click on 1357 To begin using Semantic, type @kbd{M-x semantic-mode} or click on
1421the menu item named @samp{Source Code Parsers (Semantic)} in the 1358the menu item named @samp{Source Code Parsers (Semantic)} in the
1422@samp{Tools} menu. This enables Semantic mode, a global minor mode. 1359@samp{Tools} menu. This enables Semantic mode, a global minor mode.
@@ -1464,30 +1401,30 @@ is idle.
1464@node Misc for Programs 1401@node Misc for Programs
1465@section Other Features Useful for Editing Programs 1402@section Other Features Useful for Editing Programs
1466 1403
1467 A number of Emacs commands that aren't designed specifically for 1404 Some Emacs commands that aren't designed specifically for editing
1468editing programs are useful for that nonetheless. 1405programs are useful for that nonetheless.
1469 1406
1470 The Emacs commands that operate on words, sentences and paragraphs 1407 The Emacs commands that operate on words, sentences and paragraphs
1471are useful for editing code. Most symbols names contain words 1408are useful for editing code. Most symbols names contain words
1472(@pxref{Words}); sentences can be found in strings and comments 1409(@pxref{Words}), while sentences can be found in strings and comments
1473(@pxref{Sentences}). Paragraphs in the strict sense can be found in 1410(@pxref{Sentences}). As for paragraphs, they are defined in most
1474program code (in long comments), but the paragraph commands are useful 1411programming language modes to begin and end at blank lines
1475in other places too, because programming language major modes define 1412(@pxref{Paragraphs}). Therefore, judicious use of blank lines to make
1476paragraphs to begin and end at blank lines (@pxref{Paragraphs}). 1413the program clearer will also provide useful chunks of text for the
1477Judicious use of blank lines to make the program clearer will also 1414paragraph commands to work on. Auto Fill mode, if enabled in a
1478provide useful chunks of text for the paragraph commands to work on. 1415programming language major mode, indents the new lines which it
1479Auto Fill mode, if enabled in a programming language major mode, 1416creates.
1480indents the new lines which it creates. 1417
1481 1418 Apart from Hideshow mode (@pxref{Hideshow}), another way to
1482 The selective display feature is useful for looking at the overall 1419selectively display parts of a program is to use the selective display
1483structure of a function (@pxref{Selective Display}). This feature 1420feature (@pxref{Selective Display}). Programming modes often also
1484hides the lines that are indented more than a specified amount. 1421support Outline minor mode (@pxref{Outline Mode}), which can be used
1485Programming modes often support Outline minor mode (@pxref{Outline 1422with the Foldout package (@pxref{Foldout}).
1486Mode}). The Foldout package provides folding-editor features 1423
1487(@pxref{Foldout}). 1424@ifinfo
1488
1489 The ``automatic typing'' features may be useful for writing programs. 1425 The ``automatic typing'' features may be useful for writing programs.
1490@xref{Top,,Autotyping, autotype, Autotyping}. 1426@xref{Top,,Autotyping, autotype, Autotyping}.
1427@end ifinfo
1491 1428
1492@node C Modes 1429@node C Modes
1493@section C and Related Modes 1430@section C and Related Modes
@@ -1509,9 +1446,14 @@ Mode}). The Foldout package provides folding-editor features
1509 1446
1510 This section gives a brief description of the special features 1447 This section gives a brief description of the special features
1511available in C, C++, Objective-C, Java, CORBA IDL, Pike and AWK modes. 1448available in C, C++, Objective-C, Java, CORBA IDL, Pike and AWK modes.
1512(These are called ``C mode and related modes.'') @xref{Top, , CC Mode, 1449(These are called ``C mode and related modes.'')
1513ccmode, CC Mode}, for a more extensive description of these modes 1450@ifinfo
1514and their special features. 1451@xref{Top,, CC Mode, ccmode, CC Mode}, for more details.
1452@end ifinfo
1453@ifnotinfo
1454For more details, see the CC mode Info manual, which is distributed
1455with Emacs.
1456@end ifnotinfo
1515 1457
1516@menu 1458@menu
1517* Motion in C:: Commands to move by C statements, etc. 1459* Motion in C:: Commands to move by C statements, etc.
@@ -1528,17 +1470,17 @@ and their special features.
1528related modes. 1470related modes.
1529 1471
1530@table @code 1472@table @code
1531@item M-x c-beginning-of-defun 1473@item C-M-a
1532@itemx M-x c-end-of-defun 1474@itemx C-M-e
1533@findex c-beginning-of-defun 1475@findex c-beginning-of-defun
1534@findex c-end-of-defun 1476@findex c-end-of-defun
1535Move point to the beginning or end of the current function or 1477Move point to the beginning or end of the current function or
1536top-level definition. These are found by searching for the least 1478top-level definition. In languages with enclosing scopes (such as
1479C++'s classes) the @dfn{current function} is the immediate one,
1480possibly inside a scope. Otherwise it is the one defined by the least
1537enclosing braces. (By contrast, @code{beginning-of-defun} and 1481enclosing braces. (By contrast, @code{beginning-of-defun} and
1538@code{end-of-defun} search for braces in column zero.) If you are 1482@code{end-of-defun} search for braces in column zero.) @xref{Moving
1539editing code where the opening brace of a function isn't placed in 1483by Defuns}.
1540column zero, you may wish to bind @code{C-M-a} and @code{C-M-e} to
1541these commands. @xref{Moving by Defuns}.
1542 1484
1543@item C-c C-u 1485@item C-c C-u
1544@kindex C-c C-u @r{(C mode)} 1486@kindex C-c C-u @r{(C mode)}
diff --git a/doc/emacs/rmail.texi b/doc/emacs/rmail.texi
index 0df4a3a7bb5..d05af468fa1 100644
--- a/doc/emacs/rmail.texi
+++ b/doc/emacs/rmail.texi
@@ -1340,17 +1340,18 @@ included in GNU mailutils (the ``mailutils version,''
1340command line syntax and the same basic subset of options. However, the 1340command line syntax and the same basic subset of options. However, the
1341Mailutils version offers additional features. 1341Mailutils version offers additional features.
1342 1342
1343 The Emacs version of @code{movemail} is able to retrieve mail from the 1343 The Emacs version of @code{movemail} is able to retrieve mail from
1344usual UNIX mailbox formats and from remote mailboxes using the POP3 1344the usual Unix mailbox formats and from remote mailboxes using the
1345protocol. 1345POP3 protocol.
1346 1346
1347 The Mailutils version is able to handle a wide set of mailbox 1347 The Mailutils version is able to handle a wide set of mailbox
1348formats, such as plain UNIX mailboxes, @code{maildir} and @code{MH} 1348formats, such as plain Unix mailboxes, @code{maildir} and @code{MH}
1349mailboxes, etc. It is able to access remote mailboxes using the POP3 or 1349mailboxes, etc. It is able to access remote mailboxes using the POP3
1350IMAP4 protocol, and can retrieve mail from them using a TLS encrypted 1350or IMAP4 protocol, and can retrieve mail from them using a TLS
1351channel. It also accepts mailbox arguments in @acronym{URL} form. 1351encrypted channel. It also accepts mailbox arguments in @acronym{URL}
1352The detailed description of mailbox @acronym{URL}s can be found in 1352form. The detailed description of mailbox @acronym{URL}s can be found
1353@ref{URL,,,mailutils,Mailbox URL Formats}. In short, a @acronym{URL} is: 1353in @ref{URL,,,mailutils,Mailbox URL Formats}. In short, a
1354@acronym{URL} is:
1354 1355
1355@smallexample 1356@smallexample
1356@var{proto}://[@var{user}[:@var{password}]@@]@var{host-or-file-name} 1357@var{proto}://[@var{user}[:@var{password}]@@]@var{host-or-file-name}
@@ -1381,9 +1382,9 @@ local mailbox.
1381 1382
1382@table @code 1383@table @code
1383@item mbox 1384@item mbox
1384Usual UNIX mailbox format. In this case, neither @var{user} nor 1385Usual Unix mailbox format. In this case, neither @var{user} nor
1385@var{pass} are used, and @var{host-or-file-name} denotes the file name of 1386@var{pass} are used, and @var{host-or-file-name} denotes the file name
1386the mailbox file, e.g., @code{mbox://var/spool/mail/smith}. 1387of the mailbox file, e.g., @code{mbox://var/spool/mail/smith}.
1387 1388
1388@item mh 1389@item mh
1389A local mailbox in the @acronym{MH} format. @var{User} and 1390A local mailbox in the @acronym{MH} format. @var{User} and
@@ -1524,7 +1525,7 @@ use it, add the @samp{--tls} flag to @code{rmail-movemail-flags}.
1524@section Retrieving Mail from Local Mailboxes in Various Formats 1525@section Retrieving Mail from Local Mailboxes in Various Formats
1525 1526
1526 If your incoming mail is stored on a local machine in a format other 1527 If your incoming mail is stored on a local machine in a format other
1527than UNIX mailbox, you will need the Mailutils @code{movemail} to 1528than Unix mailbox, you will need the Mailutils @code{movemail} to
1528retrieve it. @xref{Movemail}, for the detailed description of 1529retrieve it. @xref{Movemail}, for the detailed description of
1529@code{movemail} versions. For example, to access mail from a inbox in 1530@code{movemail} versions. For example, to access mail from a inbox in
1530@code{maildir} format located in @file{/var/spool/mail/in}, you would 1531@code{maildir} format located in @file{/var/spool/mail/in}, you would
diff --git a/doc/emacs/text.texi b/doc/emacs/text.texi
index 8f353961afb..37a85a89ea2 100644
--- a/doc/emacs/text.texi
+++ b/doc/emacs/text.texi
@@ -21,7 +21,10 @@ are also often useful for editing programs.
21the file contains ordinary text, use Text mode, which customizes Emacs 21the file contains ordinary text, use Text mode, which customizes Emacs
22in small ways for the syntactic conventions of text. Outline mode 22in small ways for the syntactic conventions of text. Outline mode
23provides special commands for operating on text with an outline 23provides special commands for operating on text with an outline
24structure. 24structure. Org mode extends Outline mode and turn Emacs into a
25full-fledged organizer: you can manage TODO lists, store notes and
26publish them in many formats.
27
25@iftex 28@iftex
26@xref{Outline Mode}. 29@xref{Outline Mode}.
27@end iftex 30@end iftex
@@ -32,9 +35,14 @@ structure.
32@findex nxml-mode 35@findex nxml-mode
33 Emacs has other major modes for text which contains ``embedded'' 36 Emacs has other major modes for text which contains ``embedded''
34commands, such as @TeX{} and La@TeX{} (@pxref{TeX Mode}); HTML and 37commands, such as @TeX{} and La@TeX{} (@pxref{TeX Mode}); HTML and
35SGML (@pxref{HTML Mode}); XML (@pxref{Top,The nXML Mode 38SGML (@pxref{HTML Mode}); XML
36Manual,,nxml-mode, nXML Mode}); and Groff and Nroff (@pxref{Nroff 39@ifinfo
37Mode}). 40(@pxref{Top,The nXML Mode Manual,,nxml-mode, nXML Mode});
41@end ifinfo
42@ifnotinfo
43(see the nXML mode Info manual, which is distributed with Emacs);
44@end ifnotinfo
45and Groff and Nroff (@pxref{Nroff Mode}).
38 46
39@cindex ASCII art 47@cindex ASCII art
40 If you need to edit pictures made out of text characters (commonly 48 If you need to edit pictures made out of text characters (commonly
@@ -65,6 +73,7 @@ for editing such pictures.
65* Case:: Changing the case of text. 73* Case:: Changing the case of text.
66* Text Mode:: The major modes for editing text files. 74* Text Mode:: The major modes for editing text files.
67* Outline Mode:: Editing outlines. 75* Outline Mode:: Editing outlines.
76* Org Mode:: The Emacs organizer.
68* TeX Mode:: Editing input to the formatter TeX. 77* TeX Mode:: Editing input to the formatter TeX.
69* HTML Mode:: Editing HTML and SGML files. 78* HTML Mode:: Editing HTML and SGML files.
70* Nroff Mode:: Editing input to the formatter nroff. 79* Nroff Mode:: Editing input to the formatter nroff.
@@ -1245,6 +1254,143 @@ automatically by putting this in your init file (@pxref{Init File}):
1245(eval-after-load "outline" '(require 'foldout)) 1254(eval-after-load "outline" '(require 'foldout))
1246@end example 1255@end example
1247 1256
1257@node Org Mode
1258@section Org Mode
1259@kindex TAB @r{(Org Mode)}
1260@kindex S-TAB @r{(Org Mode)}
1261@cindex organizer
1262@cindex planner
1263@findex org-mode
1264@cindex fold
1265@cindex headline
1266@kindex M-<up> @r{(Org Mode)}
1267@kindex M-<down> @r{(Org Mode)}
1268@kindex M-<left> @r{(Org Mode)}
1269@kindex M-<right> @r{(Org Mode)}
1270@kindex S-M-<up> @r{(Org Mode)}
1271@kindex S-M-<down> @r{(Org Mode)}
1272@kindex S-M-<left> @r{(Org Mode)}
1273@kindex S-M-<right> @r{(Org Mode)}
1274
1275Org mode extends Outline mode to turn Emacs into an organizer and an
1276authoring system.
1277
1278When editing a file ending with the @file{.org} extension, Emacs
1279automatically uses @code{org-mode} as the major mode. In this mode,
1280headlines start with one (or more) leading star(s) and comments start
1281with the @code{#} character at the beginning of a line.
1282
1283@example
1284* This is the first headline
1285** This is a first sub-headline
1286* This is the second headline
1287
1288Some content here.
1289
1290# Some comment here.
1291@end example
1292
1293From here, you can use Org mode as a simple outliner: @key{TAB} on a
1294headline will cycle through the various folding states of a subtree,
1295and @key{S-TAB} anywhere in the buffer will (un)fold the whole
1296structure.
1297
1298You can also manipulate the structure of your document by moving a
1299headline up and down with @key{M-<up>} and @key{M-<down>}, or by
1300promoting and demoting a headline with @key{M-<left>} and
1301@key{M-<left>}. If you want to act on the whole subtree (i.e. the
1302headline and its content, including other headlines), simply add the
1303@kbd{Shift} key and use @key{S-M-<up>}, @key{S-M-<down>},
1304@key{S-M-<left>} and @key{S-M-<right>}.
1305
1306For further details, see @ref{Document Structure,,,org, The Org Manual}.
1307
1308@menu
1309* Org as an organizer:: Manage TODO lists and agendas
1310* Org as an authoring system:: Export to various formats
1311@end menu
1312
1313@node Org as an organizer
1314@subsection Org as an organizer
1315
1316@cindex TODO keywords
1317@kindex C-c C-t @r{(Org Mode)}
1318@kindex C-c C-s @r{(Org Mode)}
1319@kindex C-c C-d @r{(Org Mode)}
1320@vindex org-todo-keywords
1321@findex org-todo
1322@findex org-agenda
1323@cindex scheduled
1324@cindex deadline
1325@cindex agenda
1326
1327Each headline can be turned into a TODO item calling @code{org-todo}
1328with @key{C-c C-t} anywhere on it. This will add the TODO keyword
1329@code{TODO}. Hit @key{C-c C-t} to cycle through the list of available
1330TODO keywords: you can configure the variable @code{org-todo-keywords}
1331to use your own list of keywords.
1332
1333Now that you have something to do, let's add a date to it: pressing
1334@key{C-c C-s} on a headline will add @code{SCHEDULED} below it, and
1335you will be prompted for a date through the calendar. @key{C-c C-d}
1336has the same effect, except that the item will have a @code{DEADLINE}
1337instead.
1338
1339Now that some TODO items are planned in the current file, add it to
1340the list of agenda files with @key{C-c [}. Calling the interactive
1341command @code{org-agenda} will prompt you for what you want to see: a
1342list of things to do this week, a list of TODO items with specific
1343keywords, etc.
1344
1345For further details, see @ref{TODO items,,,org, The Org Manual} and
1346@ref{Dates and times,,,org, The Org Manual}.
1347
1348@node Org as an authoring system
1349@subsection Org as an authoring system
1350@cindex export
1351@findex org-export
1352@cindex publish
1353@cindex code block
1354@cindex quote
1355
1356You may want to format your Org notes nicely and to prepare them for
1357export and publication. Org supports simple text formatting:
1358
1359@example
1360- This text is /emphasized/
1361- This item uses *a bold font*
1362- This text is _underlined_
1363- This text uses =a teletype font=
1364@end example
1365
1366If a paragraph is a quote or an example, you can use specific
1367environments:
1368
1369@example
1370#+begin_quote
1371``This is a quote.''
1372#+end_quote
1373
1374#+begin_example
1375This is an example.
1376#+end_example
1377@end example
1378
1379These environments will be displayed in a specific way with respect
1380to the selected export/publish backend.
1381
1382To export the current buffer, press the @key{C-c C-e} key anywhere in
1383an Org buffer. Supported export formats include @code{HTML}, La@TeX{}
1384and @file{.odt} (OpenDocument format.) Depending on your system
1385installation, you can also directly export to @code{pdf}.
1386
1387To export several files at once to a specific directory either locally
1388or on the Internet, you will need to define a list of projects through
1389the variable @code{org-publish-project-alist}.
1390
1391For further details, see @ref{Exporting,,,org, The Org Manual} and
1392@ref{Publishing,,,org, The Org Manual}.
1393
1248@node TeX Mode 1394@node TeX Mode
1249@section @TeX{} Mode 1395@section @TeX{} Mode
1250@cindex @TeX{} mode 1396@cindex @TeX{} mode
@@ -1298,8 +1444,8 @@ more information, see the documentation string for the command
1298@code{bibtex-mode}. 1444@code{bibtex-mode}.
1299 1445
1300@item 1446@item
1301The Ref@TeX{} package provides a minor mode which can be used in 1447The Ref@TeX{} package provides a minor mode which can be used with
1302conjunction with La@TeX{} mode to manage bibliographic references. 1448La@TeX{} mode to manage bibliographic references.
1303@ifinfo 1449@ifinfo
1304@xref{Top,The Ref@TeX{} Manual,,reftex}. 1450@xref{Top,The Ref@TeX{} Manual,,reftex}.
1305@end ifinfo 1451@end ifinfo
@@ -1764,8 +1910,15 @@ xml-mode}. Emacs uses nXML mode for files which have the extension
1764@file{.xml}. For XHTML files, which have the extension @file{.xhtml}, 1910@file{.xml}. For XHTML files, which have the extension @file{.xhtml},
1765Emacs uses HTML mode by default; you can make it use nXML mode by 1911Emacs uses HTML mode by default; you can make it use nXML mode by
1766customizing the variable @code{auto-mode-alist} (@pxref{Choosing 1912customizing the variable @code{auto-mode-alist} (@pxref{Choosing
1767Modes}). nXML mode is described in its own manual: @xref{Top, nXML 1913Modes}).
1914@ifinfo
1915nXML mode is described in its own manual: @xref{Top, nXML
1768Mode,,nxml-mode, nXML Mode}. 1916Mode,,nxml-mode, nXML Mode}.
1917@end ifinfo
1918@ifnotinfo
1919nXML mode is described in an Info manual, which is distributed with
1920Emacs.
1921@end ifnotinfo
1769 1922
1770@vindex sgml-xml-mode 1923@vindex sgml-xml-mode
1771 You may choose to use the less powerful SGML mode for editing XML, 1924 You may choose to use the less powerful SGML mode for editing XML,
@@ -1781,13 +1934,16 @@ always insert explicit closing tags as well.
1781 1934
1782@cindex nroff 1935@cindex nroff
1783@findex nroff-mode 1936@findex nroff-mode
1784 Nroff mode is a mode like Text mode but modified to handle nroff commands 1937@vindex nroff-mode-hook
1785present in the text. Invoke @kbd{M-x nroff-mode} to enter this mode. It 1938 Nroff mode is a major mode derived from Text mode, which is
1786differs from Text mode in only a few ways. All nroff command lines are 1939specialized for editing nroff files (e.g.@: Unix man pages). Type
1787considered paragraph separators, so that filling will never garble the 1940@kbd{M-x nroff-mode} to enter this mode. Entering Nroff mode runs the
1788nroff commands. Pages are separated by @samp{.bp} commands. Comments 1941hook @code{text-mode-hook}, followed by @code{nroff-mode-hook}
1789start with backslash-doublequote. Also, three special commands are 1942(@pxref{Hooks}).
1790provided that are not in Text mode: 1943
1944 In Nroff mode, nroff command lines are treated as paragraph
1945separators, pages are separated by @samp{.bp} commands, and comments
1946start with backslash-doublequote. It also defines these commands:
1791 1947
1792@findex forward-text-line 1948@findex forward-text-line
1793@findex backward-text-line 1949@findex backward-text-line
@@ -1807,23 +1963,16 @@ nroff commands) in the region (@code{count-text-lines}).
1807@end table 1963@end table
1808 1964
1809@findex electric-nroff-mode 1965@findex electric-nroff-mode
1810 The other feature of Nroff mode is that you can turn on Electric Nroff 1966 Electric Nroff mode is a buffer-local minor mode that can be used
1811mode. This is a minor mode that you can turn on or off with @kbd{M-x 1967with Nroff mode. To toggle this minor mode, type @kbd{M-x
1812electric-nroff-mode} (@pxref{Minor Modes}). When the mode is on, each 1968electric-nroff-mode} (@pxref{Minor Modes}). When the mode is on, each
1813time you use @key{RET} to end a line that contains an nroff command that 1969time you type @key{RET} to end a line containing an nroff command that
1814opens a kind of grouping, the matching nroff command to close that 1970opens a kind of grouping, the nroff command to close that grouping is
1815grouping is automatically inserted on the following line. For example, 1971automatically inserted on the following line.
1816if you are at the beginning of a line and type @kbd{.@: ( b @key{RET}},
1817this inserts the matching command @samp{.)b} on a new line following
1818point.
1819 1972
1820 If you use Outline minor mode with Nroff mode (@pxref{Outline Mode}), 1973 If you use Outline minor mode with Nroff mode (@pxref{Outline
1821heading lines are lines of the form @samp{.H} followed by a number (the 1974Mode}), heading lines are lines of the form @samp{.H} followed by a
1822header level). 1975number (the header level).
1823
1824@vindex nroff-mode-hook
1825 Entering Nroff mode runs the hook @code{text-mode-hook}, followed by
1826the hook @code{nroff-mode-hook} (@pxref{Hooks}).
1827 1976
1828@node Enriched Text 1977@node Enriched Text
1829@section Enriched Text 1978@section Enriched Text
@@ -2149,18 +2298,16 @@ hides text), and @code{intangible} (which disallows moving point
2149within the text). The @samp{Remove Special} menu item removes all of 2298within the text). The @samp{Remove Special} menu item removes all of
2150these special properties from the text in the region. 2299these special properties from the text in the region.
2151 2300
2152 The @code{invisible} and @code{intangible} properties are @emph{not} 2301 The @code{invisible} and @code{intangible} properties are not saved
2153saved in the text/enriched format. The @code{read-only} property is 2302in the @samp{text/enriched} format.
2154saved, but it is not a standard part of the text/enriched format, so
2155other editors may not respect it.
2156 2303
2157@node Text Based Tables 2304@node Text Based Tables
2158@section Editing Text-based Tables 2305@section Editing Text-based Tables
2159@cindex table mode 2306@cindex table mode
2160@cindex text-based tables 2307@cindex text-based tables
2161 2308
2162 Table mode provides an easy and intuitive way to create and edit 2309 The @code{table} package provides commands to easily edit text-based
2163text-based tables. Here is an example of such a table: 2310tables. Here is an example of what such a table looks like:
2164 2311
2165@smallexample 2312@smallexample
2166@group 2313@group
@@ -2170,27 +2317,23 @@ text-based tables. Here is an example of such a table:
2170| forward-char |Move point right N characters | C-f | 2317| forward-char |Move point right N characters | C-f |
2171| |(left if N is negative). | | 2318| |(left if N is negative). | |
2172| | | | 2319| | | |
2173| |On reaching end of buffer, stop | |
2174| |and signal error. | |
2175+-----------------+--------------------------------+-----------------+ 2320+-----------------+--------------------------------+-----------------+
2176| backward-char |Move point left N characters | C-b | 2321| backward-char |Move point left N characters | C-b |
2177| |(right if N is negative). | | 2322| |(right if N is negative). | |
2178| | | | 2323| | | |
2179| |On attempt to pass beginning or | |
2180| |end of buffer, stop and signal | |
2181| |error. | |
2182+-----------------+--------------------------------+-----------------+ 2324+-----------------+--------------------------------+-----------------+
2183@end group 2325@end group
2184@end smallexample 2326@end smallexample
2185 2327
2186 Table mode allows the contents of the table such as this one to be 2328 When Emacs recognizes such a stretch of text as a table
2187easily manipulated by inserting or deleting characters inside a cell. 2329(@pxref{Table Recognition}), editing the contents of each table cell
2188A cell is effectively a localized rectangular edit region and edits to 2330will automatically resize the table, whenever the contents become too
2189a cell do not affect the contents of the surrounding cells. If the 2331large to fit in the cell. You can use the commands defined in the
2190contents do not fit into a cell, then the cell is automatically 2332following sections for navigating and editing the table layout.
2191expanded in the vertical and/or horizontal directions and the rest of 2333
2192the table is restructured and reformatted in accordance with the 2334@findex table-fixed-width-mode
2193growth of the cell. 2335 To toggle the automatic table resizing feature, type @kbd{M-x
2336table-fixed-width-mode}.
2194 2337
2195@menu 2338@menu
2196* Table Definition:: What is a text based table. 2339* Table Definition:: What is a text based table.
@@ -2198,102 +2341,87 @@ growth of the cell.
2198* Table Recognition:: How to activate and deactivate tables. 2341* Table Recognition:: How to activate and deactivate tables.
2199* Cell Commands:: Cell-oriented commands in a table. 2342* Cell Commands:: Cell-oriented commands in a table.
2200* Cell Justification:: Justifying cell contents. 2343* Cell Justification:: Justifying cell contents.
2201* Row Commands:: Manipulating rows of table cell. 2344* Table Rows and Columns:: Inserting and deleting rows and columns.
2202* Column Commands:: Manipulating columns of table cell.
2203* Fixed Width Mode:: Fixing cell width.
2204* Table Conversion:: Converting between plain text and tables. 2345* Table Conversion:: Converting between plain text and tables.
2205* Measuring Tables:: Analyzing table dimension.
2206* Table Misc:: Table miscellany. 2346* Table Misc:: Table miscellany.
2207@end menu 2347@end menu
2208 2348
2209@node Table Definition 2349@node Table Definition
2210@subsection What is a Text-based Table? 2350@subsection What is a Text-based Table?
2351@cindex cells, for text-based tables
2211 2352
2212 Keep the following examples of valid tables in mind as a reference 2353 A @dfn{table} consists of a rectangular text area which is divided
2213while you read this section: 2354into @dfn{cells}. Each cell must be at least one character wide and
2214 2355one character high, not counting its border lines. A cell can be
2215@example 2356subdivided into more cells, but they cannot overlap.
2216 +--+----+---+ +-+ +--+-----+
2217 | | | | | | | | |
2218 +--+----+---+ +-+ | +--+--+
2219 | | | | | | | |
2220 +--+----+---+ +--+--+ |
2221 | | |
2222 +-----+--+
2223@end example
2224
2225 A table consists of a rectangular frame whose inside is divided into
2226cells. Each cell must be at least one character wide and one
2227character high, not counting its border lines. A cell can be
2228subdivided into multiple rectangular cells, but cells cannot overlap.
2229 2357
2230 The table frame and cell border lines are made of three special 2358 Cell border lines are drawn with three special characters, specified
2231characters. These variables specify those characters: 2359by the following variables:
2232 2360
2233@table @code 2361@table @code
2234@vindex table-cell-vertical-char 2362@vindex table-cell-vertical-char
2235@item table-cell-vertical-char 2363@item table-cell-vertical-char
2236Holds the character used for vertical lines. The default value is 2364The character used for vertical lines. The default is @samp{|}.
2237@samp{|}.
2238 2365
2239@vindex table-cell-horizontal-chars 2366@vindex table-cell-horizontal-chars
2240@item table-cell-horizontal-chars 2367@item table-cell-horizontal-chars
2241Holds the characters used for horizontal lines. The default value is 2368The characters used for horizontal lines. The default is @samp{"-="}.
2242@samp{"-="}.
2243 2369
2244@vindex table-cell-intersection-char 2370@vindex table-cell-intersection-char
2245@item table-cell-intersection-char 2371@item table-cell-intersection-char
2246Holds the character used at where horizontal line and vertical line 2372The character used for the intersection of horizontal and vertical
2247meet. The default value is @samp{+}. 2373lines. The default is @samp{+}.
2248@end table 2374@end table
2249 2375
2250@noindent 2376@noindent
2251Based on this definition, the following five tables are examples of invalid 2377The following are examples of @emph{invalid} tables:
2252tables:
2253 2378
2254@example 2379@example
2255 +-----+ +-----+ +--+ +-++--+ ++ 2380 +-----+ +--+ +-++--+
2256 | | | | | | | || | ++ 2381 | | | | | || |
2257 | +-+ | | | | | | || | 2382 | | | | | || |
2258 | | | | +--+ | +--+--+ +-++--+ 2383 +--+ | +--+--+ +-++--+
2259 | +-+ | | | | | | | +-++--+ 2384 | | | | | | +-++--+
2260 | | | | | | | | | || | 2385 | | | | | | | || |
2261 +-----+ +--+--+ +--+--+ +-++--+ 2386 +--+--+ +--+--+ +-++--+
2262 a b c d e 2387 a b c
2263@end example 2388@end example
2264 2389
2390@noindent
2265From left to right: 2391From left to right:
2266 2392
2267@enumerate a 2393@enumerate a
2268@item 2394@item
2269Overlapped cells or non-rectangular cells are not allowed. 2395Overlapped cells or non-rectangular cells are not allowed.
2270@item 2396@item
2271Same as a.
2272@item
2273The border must be rectangular. 2397The border must be rectangular.
2274@item 2398@item
2275Cells must have a minimum width/height of one character. 2399Cells must have a minimum width/height of one character.
2276@item
2277Same as d.
2278@end enumerate 2400@end enumerate
2279 2401
2280@node Table Creation 2402@node Table Creation
2281@subsection How to Create a Table? 2403@subsection Creating a Table
2282@cindex create a text-based table 2404@cindex create a text-based table
2283@cindex table creation 2405@cindex table creation
2284 2406
2285@findex table-insert 2407@findex table-insert
2286 The command to create a table is @code{table-insert}. When called 2408 To create a text-based table from scratch, type @kbd{M-x
2287interactively, it asks for the number of columns, number of rows, cell 2409table-insert}. This command prompts for the number of table columns,
2288width and cell height. The number of columns is the number of cells 2410the number of table rows, cell width and cell height. The cell width
2289horizontally side by side. The number of rows is the number of cells 2411and cell height do not include the cell borders; each can be specified
2290vertically within the table's height. The cell width is a number of 2412as a single integer (which means each cell is given the same
2291characters that each cell holds, left to right. The cell height is a 2413width/height), or as a sequence of integers separated by spaces or
2292number of lines each cell holds. The cell width and the cell height 2414commas (which specify the width/height of the individual table
2293can be either an integer (when the value is constant across the table) 2415columns/rows, counting from left to right for table columns and from
2294or a series of integer, separated by spaces or commas, where each 2416top to bottom for table rows). The specified table is then inserted
2295number corresponds to the next cell within a row from left to right, 2417at point.
2296or the next cell within a column from top to bottom. 2418
2419 The table inserted by @kbd{M-x table-insert} contains special text
2420properties, which tell Emacs to treat it specially as a text-based
2421table. If you save the buffer to a file and visit it again later,
2422those properties are lost, and the table appears to Emacs as an
2423ordinary piece of text. See the next section, for how to convert it
2424back into a table.
2297 2425
2298@node Table Recognition 2426@node Table Recognition
2299@subsection Table Recognition 2427@subsection Table Recognition
@@ -2301,103 +2429,97 @@ or the next cell within a column from top to bottom.
2301 2429
2302@findex table-recognize 2430@findex table-recognize
2303@findex table-unrecognize 2431@findex table-unrecognize
2304 Table mode maintains special text properties in the buffer to allow 2432 Existing text-based tables in a buffer, which lack the special text
2305editing in a convenient fashion. When a buffer with tables is saved 2433properties applied by @kbd{M-x table-insert}, are not treated
2306to its file, these text properties are lost, so when you visit this 2434specially as tables. To apply those text properties, type @kbd{M-x
2307file again later, Emacs does not see a table, but just formatted text. 2435table-recognize}. This command scans the current buffer,
2308To resurrect the table text properties, issue the @kbd{M-x 2436@dfn{recognizes} valid table cells, and applies the relevant text
2309table-recognize} command. It scans the current buffer, recognizes 2437properties. Conversely, type @kbd{M-x table-unrecognize} to
2310valid table cells, and attaches appropriate text properties to allow 2438@dfn{unrecognize} all tables in the current buffer, removing the
2311for table editing. The converse command, @code{table-unrecognize}, is 2439special text properties and converting tables back to plain text.
2312used to remove the special text properties and convert the buffer back 2440
2313to plain text. 2441 You can also use the following commands to selectively recognize or
2314 2442unrecognize tables:
2315 Special commands exist to enable or disable tables within a region,
2316enable or disable individual tables, and enable/disable individual
2317cells. These commands are:
2318 2443
2319@table @kbd 2444@table @kbd
2320@findex table-recognize-region 2445@findex table-recognize-region
2321@item M-x table-recognize-region 2446@item M-x table-recognize-region
2322Recognize tables within the current region and activate them. 2447Recognize tables within the current region.
2448
2323@findex table-unrecognize-region 2449@findex table-unrecognize-region
2324@item M-x table-unrecognize-region 2450@item M-x table-unrecognize-region
2325Deactivate tables within the current region. 2451Unrecognize tables within the current region.
2452
2326@findex table-recognize-table 2453@findex table-recognize-table
2327@item M-x table-recognize-table 2454@item M-x table-recognize-table
2328Recognize the table at point and activate it. 2455Recognize the table at point and activate it.
2456
2329@findex table-unrecognize-table 2457@findex table-unrecognize-table
2330@item M-x table-unrecognize-table 2458@item M-x table-unrecognize-table
2331Deactivate the table at point. 2459Deactivate the table at point.
2460
2332@findex table-recognize-cell 2461@findex table-recognize-cell
2333@item M-x table-recognize-cell 2462@item M-x table-recognize-cell
2334Recognize the cell at point and activate it. 2463Recognize the cell at point and activate it.
2464
2335@findex table-unrecognize-cell 2465@findex table-unrecognize-cell
2336@item M-x table-unrecognize-cell 2466@item M-x table-unrecognize-cell
2337Deactivate the cell at point. 2467Deactivate the cell at point.
2338@end table 2468@end table
2339 2469
2340 For another way of converting text into tables, see @ref{Table 2470 @xref{Table Conversion}, for another way to recognize a table.
2341Conversion}.
2342 2471
2343@node Cell Commands 2472@node Cell Commands
2344@subsection Commands for Table Cells 2473@subsection Commands for Table Cells
2345 2474
2346@findex table-forward-cell 2475@findex table-forward-cell
2347@findex table-backward-cell 2476@findex table-backward-cell
2348 The commands @code{table-forward-cell} and 2477 The commands @kbd{M-x table-forward-cell} and @kbd{M-x
2349@code{table-backward-cell} move point from the current cell to an 2478table-backward-cell} move point from the current cell to an adjacent
2350adjacent cell forward and backward respectively. The order of the 2479cell. The order is cyclic: when point is in the last cell of a table,
2351cells is cyclic: when point is in the last cell of a table, typing 2480@kbd{M-x table-forward-cell} moves to the first cell. Likewise, when
2352@kbd{M-x table-forward-cell} moves to the first cell in the table. 2481point is on the first cell, @kbd{M-x table-backward-cell} moves to the
2353Likewise @kbd{M-x table-backward-cell} from the first cell in a table 2482last cell.
2354moves to the last cell.
2355 2483
2356@findex table-span-cell 2484@findex table-span-cell
2357 The command @code{table-span-cell} merges the current cell with the 2485 @kbd{M-x table-span-cell} prompts for a direction---right, left,
2358adjacent cell in a specified direction---right, left, above or below. 2486above, or below---and merges the current cell with the adjacent cell
2359You specify the direction with the minibuffer. It does not allow 2487in that direction. This command signals an error if the merge would
2360merges which don't result in a legitimate cell layout. 2488result in an illegitimate cell layout.
2361 2489
2362@findex table-split-cell 2490@findex table-split-cell
2363@cindex text-based tables, split a cell
2364@cindex split table cell
2365 The command @code{table-split-cell} splits the current cell
2366vertically or horizontally. This command is a wrapper to the
2367direction specific commands @code{table-split-cell-vertically} and
2368@code{table-split-cell-horizontally}. You specify the direction with
2369a minibuffer argument.
2370
2371@findex table-split-cell-vertically 2491@findex table-split-cell-vertically
2372 The command @code{table-split-cell-vertically} splits the current
2373cell vertically and creates a pair of cells above and below where
2374point is located. The content in the original cell is split as well.
2375
2376@findex table-split-cell-horizontally 2492@findex table-split-cell-horizontally
2377 The command @code{table-split-cell-horizontally} splits the current 2493@cindex text-based tables, splitting cells
2378cell horizontally and creates a pair of cells right and left of where 2494@cindex splitting table cells
2379point is located. If the cell being split is not empty, this asks you 2495 @kbd{M-x table-split-cell} splits the current cell vertically or
2380how to handle the cell contents. The three options are: @code{split}, 2496horizontally, prompting for the direction with the minibuffer. The
2381@code{left}, or @code{right}. @code{split} splits the contents at 2497commands @kbd{M-x table-split-cell-vertically} and @kbd{M-x
2382point literally, while the @code{left} and @code{right} options move 2498table-split-cell-horizontally} split in a specific direction. When
2383the entire contents into the left or right cell respectively. 2499splitting vertically, the old cell contents are automatically split
2384 2500between the two new cells. When splitting horizontally, you are
2385@cindex enlarge a table cell 2501prompted for how to divide the cell contents, if the cell is
2386@cindex shrink a table cell 2502non-empty; the options are @samp{split} (divide the contents at
2387 The next four commands enlarge or shrink a cell. They use numeric 2503point), @samp{left} (put all the contents in the left cell), and
2388arguments (@pxref{Arguments}) to specify how many columns or rows to 2504@samp{right} (put all the contents in the right cell).
2389enlarge or shrink a particular table. 2505
2506 The following commands enlarge or shrink a cell. By default, they
2507resize by one row or column; if a numeric argument is supplied, that
2508specifies the number of rows or columns to resize by.
2390 2509
2391@table @kbd 2510@table @kbd
2392@findex table-heighten-cell 2511@findex table-heighten-cell
2393@item M-x table-heighten-cell 2512@item M-x table-heighten-cell
2394Enlarge the current cell vertically. 2513Enlarge the current cell vertically.
2514
2395@findex table-shorten-cell 2515@findex table-shorten-cell
2396@item M-x table-shorten-cell 2516@item M-x table-shorten-cell
2397Shrink the current cell vertically. 2517Shrink the current cell vertically.
2518
2398@findex table-widen-cell 2519@findex table-widen-cell
2399@item M-x table-widen-cell 2520@item M-x table-widen-cell
2400Enlarge the current cell horizontally. 2521Enlarge the current cell horizontally.
2522
2401@findex table-narrow-cell 2523@findex table-narrow-cell
2402@item M-x table-narrow-cell 2524@item M-x table-narrow-cell
2403Shrink the current cell horizontally. 2525Shrink the current cell horizontally.
@@ -2405,107 +2527,76 @@ Shrink the current cell horizontally.
2405 2527
2406@node Cell Justification 2528@node Cell Justification
2407@subsection Cell Justification 2529@subsection Cell Justification
2408@cindex cell text justification 2530@cindex justification in text-based tables
2409 2531
2410 You can specify text justification for each cell. The justification 2532 The command @kbd{M-x table-justify} imposes @dfn{justification} on
2411is remembered independently for each cell and the subsequent editing 2533one or more cells in a text-based table. Justification determines how
2412of cell contents is subject to the specified justification. 2534the text in the cell is aligned, relative to the edges of the cell.
2535Each cell in a table can be separately justified.
2413 2536
2414@findex table-justify 2537@findex table-justify
2415 The command @code{table-justify} ask you to specify what to justify: 2538 @kbd{M-x table-justify} first prompts for what to justify; the
2416a cell, a column, or a row. If you select cell justification, this 2539options are @samp{cell} (just the current cell), @samp{column} (all
2417command sets the justification only for the current cell. Selecting 2540cells in the current table column) and @samp{row} (all cells in the
2418column or row justification sets the justification for all the cells 2541current table row). The command then prompts for the justification
2419within a column or row respectively. The command then ask you which 2542style; the options are @code{left}, @code{center}, @code{right},
2420kind of justification to apply: @code{left}, @code{center}, 2543@code{top}, @code{middle}, @code{bottom}, or @code{none} (meaning no
2421@code{right}, @code{top}, @code{middle}, @code{bottom}, or 2544vertical justification).
2422@code{none}. Horizontal justification and vertical justification are 2545
2423specified independently. The options @code{left}, @code{center}, and 2546 Horizontal and vertical justification styles are specified
2424@code{right} specify horizontal justification while the options 2547independently, and both types can be in effect simultaneously; for
2425@code{top}, @code{middle}, @code{bottom}, and @code{none} specify 2548instance, you can call @kbd{M-x table-justify} twice, once to specify
2426vertical justification. The vertical justification @code{none} 2549@code{right} justification and once to specify @code{bottom}
2427effectively removes vertical justification. Horizontal justification 2550justification, to align the contents of a cell to the bottom right.
2428must be one of @code{left}, @code{center}, or @code{right}.
2429 2551
2430@vindex table-detect-cell-alignment 2552@vindex table-detect-cell-alignment
2431 Justification information is stored in the buffer as a part of text 2553 The justification style is stored in the buffer as a text property,
2432property. Therefore, this information is ephemeral and does not 2554and is lost when you kill the buffer or exit Emacs. However, the
2433survive through the loss of the buffer (closing the buffer and 2555table recognition commands, such as @kbd{M-x table-recognize}
2434revisiting the buffer erase any previous text properties). To 2556(@pxref{Table Recognition}), attempt to determine and re-apply each
2435countermand for this, the command @code{table-recognize} and other 2557cell's justification style, by examining its contents. To disable
2436recognition commands (@pxref{Table Recognition}) are equipped with a 2558this feature, change the variable @code{table-detect-cell-alignment}
2437convenience feature (turned on by default). During table recognition, 2559to @code{nil}.
2438the contents of a cell are examined to determine which justification 2560
2439was originally applied to the cell and then applies this justification 2561@node Table Rows and Columns
2440to the cell. This is a speculative algorithm and is therefore not 2562@subsection Table Rows and Columns
2441perfect, however, the justification is deduced correctly most of the 2563@cindex inserting rows and columns in text-based tables
2442time. To disable this feature, customize the variable 2564
2443@code{table-detect-cell-alignment} and set it to @code{nil}.
2444
2445@node Row Commands
2446@subsection Commands for Table Rows
2447@cindex table row commands
2448
2449@cindex insert row in table
2450@findex table-insert-row 2565@findex table-insert-row
2451 The command @code{table-insert-row} inserts a row of cells before 2566 @kbd{M-x table-insert-row} inserts a row of cells before the current
2452the current row in a table. The current row where point is located is 2567table row. The current row, together with point, is pushed down past
2453pushed down after the newly inserted row. A numeric prefix argument 2568the new row. To insert rows after the last row at the bottom of a
2454specifies the number of rows to insert. Note that in order to insert 2569table, invoke this command with point below the table, just below the
2455rows @emph{after} the last row at the bottom of a table, you must 2570bottom edge. A numeric prefix argument specifies the number of rows
2456place point below the table---that is, outside the table---prior to 2571to insert.
2457invoking this command.
2458
2459@cindex delete row in table
2460@findex table-delete-row
2461 The command @code{table-delete-row} deletes a row of cells at point.
2462A numeric prefix argument specifies the number of rows to delete.
2463
2464@node Column Commands
2465@subsection Commands for Table Columns
2466@cindex table column commands
2467
2468@cindex insert column in table
2469@findex table-insert-column
2470 The command @code{table-insert-column} inserts a column of cells to
2471the left of the current row in a table. This pushes the current
2472column to the right. To insert a column to the right side of the
2473rightmost column, place point to the right of the rightmost column,
2474which is outside of the table, prior to invoking this command. A
2475numeric prefix argument specifies the number of columns to insert.
2476
2477@cindex delete column in table
2478 A command @code{table-delete-column} deletes a column of cells at
2479point. A numeric prefix argument specifies the number of columns to
2480delete.
2481
2482@node Fixed Width Mode
2483@subsection Fix Width of Cells
2484@cindex fix width of table cells
2485 2572
2486@findex table-fixed-width-mode 2573@findex table-insert-column
2487 The command @code{table-fixed-width-mode} toggles fixed width mode 2574 Similarly, @kbd{M-x table-insert-column} inserts a column of cells
2488on and off. When fixed width mode is turned on, editing inside a 2575to the left of the current table column. To insert a column to the
2489cell never changes the cell width; when it is off, the cell width 2576right side of the rightmost column, invoke this command with point to
2490expands automatically in order to prevent a word from being folded 2577the right of the rightmost column, outside the table. A numeric
2491into multiple lines. By default, fixed width mode is disabled. 2578prefix argument specifies the number of columns to insert.
2579
2580@cindex deleting rows and column in text-based tables
2581 @kbd{M-x table-delete-column} deletes the column of cells at point.
2582Similarly, @kbd{M-x table-delete-row} deletes the row of cells at
2583point. A numeric prefix argument to either command specifies the
2584number of columns or rows to delete.
2492 2585
2493@node Table Conversion 2586@node Table Conversion
2494@subsection Conversion Between Plain Text and Tables 2587@subsection Converting Between Plain Text and Tables
2495@cindex text to table 2588@cindex text to table
2496@cindex table to text 2589@cindex table to text
2497 2590
2498@findex table-capture 2591@findex table-capture
2499 The command @code{table-capture} captures plain text in a region and 2592 The command @kbd{M-x table-capture} captures plain text in a region
2500turns it into a table. Unlike @code{table-recognize} (@pxref{Table 2593and turns it into a table. Unlike @kbd{M-x table-recognize}
2501Recognition}), the original text does not have a table appearance but 2594(@pxref{Table Recognition}), the original text does not need to have a
2502may hold a logical table structure. For example, some elements 2595table appearance; it only needs to have a logical table-like
2503separated by known patterns form a two dimensional structure which can 2596structure.
2504be turned into a table.
2505 2597
2506 Here's an example of data that @code{table-capture} can operate on. 2598 For example, suppose we have the following numbers, which are
2507The numbers are horizontally separated by a comma and vertically 2599divided into three lines and separated horizontally by commas:
2508separated by a newline character.
2509 2600
2510@example 2601@example
25111, 2, 3, 4 26021, 2, 3, 4
@@ -2526,136 +2617,92 @@ Invoking @kbd{M-x table-capture} on that text produces this table:
2526+-----+-----+-----+-----+ 2617+-----+-----+-----+-----+
2527@end example 2618@end example
2528 2619
2529@noindent
2530The conversion uses @samp{,} for the column delimiter and newline for
2531a row delimiter, cells are left justified, and minimum cell width is
25325.
2533
2534@findex table-release 2620@findex table-release
2535 The command @code{table-release} does the opposite of 2621 @kbd{M-x table-release} does the opposite: it converts a table back
2536@code{table-capture}. It releases a table by removing the table frame 2622to plain text, removing its cell borders.
2537and cell borders. This leaves the table contents as plain text. One 2623
2538of the useful applications of @code{table-capture} and 2624 One application of this pair of commands is to edit a text in
2539@code{table-release} is to edit a text in layout. Look at the 2625layout. Look at the following three paragraphs (the latter two are
2540following three paragraphs (the latter two are indented with header 2626indented with header lines):
2541lines):
2542 2627
2543@example 2628@example
2544table-capture is a powerful command. 2629table-capture is a powerful command.
2545Here are some things it can do: 2630Here are some things it can do:
2546 2631
2547Parse Cell Items By using column delimiter regular 2632Parse Cell Items Using row and column delimiter regexps,
2548 expression and raw delimiter regular 2633 it parses the specified text area and
2549 expression, it parses the specified text 2634 extracts cell items into a table.
2550 area and extracts cell items from
2551 non-table text and then forms a table out
2552 of them.
2553
2554Capture Text Area When no delimiters are specified it
2555 creates a single cell table. The text in
2556 the specified region is placed in that
2557 cell.
2558@end example 2635@end example
2559 2636
2560@noindent 2637@noindent
2561Applying @code{table-capture} to a region containing the above three 2638Applying @code{table-capture} to a region containing the above text,
2562paragraphs, with empty strings for column delimiter regexp and row 2639with empty strings for the column and row delimiter regexps, creates a
2563delimiter regexp, creates a table with a single cell like the 2640table with a single cell like the following one.
2564following one. 2641
2565
2566@c The first line's right-hand frame in the following two examples
2567@c sticks out to accommodate for the removal of @samp in the
2568@c produced output!!
2569@smallexample 2642@smallexample
2570@group 2643@group
2571+-------------------------------------------------------------+ 2644+----------------------------------------------------------+
2572|table-capture is a powerful command. | 2645|table-capture is a powerful command. |
2573|Here are some things it can do: | 2646|Here are some things it can do: |
2574| | 2647| |
2575|Parse Cell Items By using column delimiter regular | 2648|Parse Cell Items Using row and column delimiter regexps,|
2576| expression and raw delimiter regular | 2649| it parses the specified text area and |
2577| expression, it parses the specified text | 2650| extracts cell items into a table. |
2578| area and extracts cell items from | 2651+----------------------------------------------------------+
2579| non-table text and then forms a table out |
2580| of them. |
2581| |
2582|Capture Text Area When no delimiters are specified it |
2583| creates a single cell table. The text in |
2584| the specified region is placed in that |
2585| cell. |
2586+-------------------------------------------------------------+
2587@end group 2652@end group
2588@end smallexample 2653@end smallexample
2589 2654
2590@noindent 2655@noindent
2591By splitting the cell appropriately we now have a table consisting of 2656We can then use the cell splitting commands (@pxref{Cell Commands}) to
2592paragraphs occupying its own cell. Each cell can now be edited 2657subdivide the table so that each paragraph occupies a cell:
2593independently without affecting the layout of other cells.
2594 2658
2595@smallexample 2659@smallexample
2596+--------------------------------------------------------------+ 2660+----------------------------------------------------------+
2597|table-capture is a powerful command. | 2661|table-capture is a powerful command. |
2598|Here are some things it can do: | 2662|Here are some things it can do: |
2599+------------------+-------------------------------------------+ 2663+-----------------+----------------------------------------+
2600|Parse Cell Items |By using column delimiter regular | 2664|Parse Cell Items | Using row and column delimiter regexps,|
2601| |expression and raw delimiter regular | 2665| | it parses the specified text area and |
2602| |expression, it parses the specified text | 2666| | extracts cell items into a table. |
2603| |area and extracts cell items from | 2667+-----------------+----------------------------------------+
2604| |non-table text and then forms a table out |
2605| |of them. |
2606+------------------+-------------------------------------------+
2607|Capture Text Area |When no delimiters are specified it |
2608| |creates a single cell table. The text in |
2609| |the specified region is placed in that |
2610| |cell. |
2611+------------------+-------------------------------------------+
2612@end smallexample 2668@end smallexample
2613 2669
2614@noindent 2670@noindent
2615By applying @code{table-release}, which does the opposite process, the 2671Each cell can now be edited independently without affecting the layout
2616contents become once again plain text. @code{table-release} works as 2672of other cells. When finished, we can invoke @kbd{M-x table-release}
2617a companion command to @code{table-capture}. 2673to convert the table back to plain text.
2618 2674
2619@node Measuring Tables 2675@node Table Misc
2620@subsection Analyzing Table Dimensions 2676@subsection Table Miscellany
2621@cindex table dimensions
2622 2677
2678@cindex table dimensions
2623@findex table-query-dimension 2679@findex table-query-dimension
2624 The command @code{table-query-dimension} analyzes a table structure 2680 The command @code{table-query-dimension} reports the layout of the
2625and reports information regarding its dimensions. In case of the 2681table and table cell at point. Here is an example of its output:
2626above example table, the @code{table-query-dimension} command displays
2627in echo area:
2628 2682
2629@smallexample 2683@smallexample
2630Cell: (21w, 6h), Table: (67w, 16h), Dim: (2c, 3r), Total Cells: 5 2684Cell: (21w, 6h), Table: (67w, 16h), Dim: (2c, 3r), Total Cells: 5
2631@end smallexample 2685@end smallexample
2632 2686
2633@noindent 2687@noindent
2634This indicates that the current cell is 21 character wide and 6 lines 2688This indicates that the current cell is 21 characters wide and 6 lines
2635high, the entire table is 67 characters wide and 16 lines high. The 2689high, the table is 67 characters wide and 16 lines high with 2 columns
2636table has 2 columns and 3 rows. It has a total of 5 cells, since the 2690and 3 rows, and a total of 5 cells.
2637first row has a spanned cell.
2638 2691
2639@node Table Misc
2640@subsection Table Miscellany
2641
2642@cindex insert string into table cells
2643@findex table-insert-sequence 2692@findex table-insert-sequence
2644 The command @code{table-insert-sequence} inserts a string into each 2693 @kbd{M-x table-insert-sequence} inserts a string into each cell.
2645cell. Each string is a part of a sequence i.e.@: a series of 2694Each string is a part of a sequence i.e.@: a series of increasing
2646increasing integer numbers. 2695integer numbers.
2647 2696
2648@cindex table in language format
2649@cindex table for HTML and LaTeX 2697@cindex table for HTML and LaTeX
2650@findex table-generate-source 2698@findex table-generate-source
2651 The command @code{table-generate-source} generates a table formatted 2699 @kbd{M-x table-generate-source} generates a table formatted for a
2652for a specific markup language. It asks for a language (which must be 2700specific markup language. It asks for a language (which must be one
2653one of @code{html}, @code{latex}, or @code{cals}), a destination 2701of @code{html}, @code{latex}, or @code{cals}), a destination buffer in
2654buffer where to put the result, and the table caption (a string), and 2702which to put the result, and a table caption, and then inserts the
2655then inserts the generated table in the proper syntax into the 2703generated table into the specified buffer. The default destination
2656destination buffer. The default destination buffer is 2704buffer is @code{table.@var{lang}}, where @var{lang} is the language
2657@code{table.@var{lang}}, where @var{lang} is the language you 2705you specified.
2658specified.
2659 2706
2660@node Two-Column 2707@node Two-Column
2661@section Two-Column Editing 2708@section Two-Column Editing
@@ -2663,11 +2710,9 @@ specified.
2663@cindex splitting columns 2710@cindex splitting columns
2664@cindex columns, splitting 2711@cindex columns, splitting
2665 2712
2666 Two-column mode lets you conveniently edit two side-by-side columns of 2713 Two-column mode lets you conveniently edit two side-by-side columns
2667text. It uses two side-by-side windows, each showing its own 2714of text. It uses two side-by-side windows, each showing its own
2668buffer. 2715buffer. There are three ways to enter two-column mode:
2669
2670 There are three ways to enter two-column mode:
2671 2716
2672@table @asis 2717@table @asis
2673@item @kbd{@key{F2} 2} or @kbd{C-x 6 2} 2718@item @kbd{@key{F2} 2} or @kbd{C-x 6 2}
diff --git a/doc/emacs/vc1-xtra.texi b/doc/emacs/vc1-xtra.texi
index 05e89e69f0e..b65e6f96a6e 100644
--- a/doc/emacs/vc1-xtra.texi
+++ b/doc/emacs/vc1-xtra.texi
@@ -5,301 +5,6 @@
5@c This file is included either in vc-xtra.texi (when producing the 5@c This file is included either in vc-xtra.texi (when producing the
6@c printed version) or in the main Emacs manual (for the on-line version). 6@c printed version) or in the main Emacs manual (for the on-line version).
7 7
8@node Remote Repositories
9@subsection Remote Repositories
10@cindex remote repositories
11
12 A common way of using CVS and other more advanced VCSes is to set up
13a central repository on some Internet host, then have each
14developer check out a personal working copy of the files on his local
15machine. Committing changes to the repository, and picking up changes
16from other users into one's own working area, then works by direct
17interactions with the repository server.
18
19 One difficulty is that access to a repository server is often slow,
20and that developers might need to work off-line as well. While only
21third-generation decentralized VCses such as GNU Arch or Mercurial
22really solve this problem, VC is designed to reduce the amount of
23network interaction necessary.
24
25 If you are using a truly decentralized VCS you can skip the rest of
26this section. It describes backup and local-repository techniques
27that are only useful for Subversion and earlier VCSes.
28
29@menu
30* Version Backups:: Keeping local copies of repository versions.
31* Local Version Control:: Using another version system for local editing.
32@end menu
33
34@node Version Backups
35@subsubsection Version Backups
36@cindex version backups
37
38@cindex automatic version backups
39 When VC sees that the repository for a file is on a remote
40machine, it automatically makes local backups of unmodified versions
41of the file---@dfn{automatic version backups}. This means that you
42can compare the file to the repository version (@kbd{C-x v =}), or
43revert to that version (@kbd{C-x v u}), without any network
44interactions.
45
46 The local copy of the unmodified file is called a @dfn{version
47backup} to indicate that it corresponds exactly to a version that is
48stored in the repository. Note that version backups are not the same
49as ordinary Emacs backup files
50@iftex
51(@pxref{Backup,,,emacs, the Emacs Manual}).
52@end iftex
53@ifnottex
54(@pxref{Backup}).
55@end ifnottex
56But they follow a similar naming convention.
57
58 For a file that comes from a remote repository, VC makes a
59version backup whenever you save the first changes to the file, and
60removes it after you have committed your modified version to the
61repository. You can disable the making of automatic version backups by
62setting @code{vc-cvs-stay-local} to @code{nil} (@pxref{CVS Options}).
63
64@cindex manual version backups
65 The name of the automatic version backup for version @var{version}
66of file @var{file} is @code{@var{file}.~@var{version}.~}. This is
67almost the same as the name used by @kbd{C-x v ~}
68@iftex
69(@pxref{Old Revisions,,,emacs, the Emacs Manual}),
70@end iftex
71@ifnottex
72(@pxref{Old Revisions}),
73@end ifnottex
74the only difference being the additional dot (@samp{.}) after the
75version number. This similarity is intentional, because both kinds of
76files store the same kind of information. The file made by @kbd{C-x v
77~} acts as a @dfn{manual version backup}.
78
79 All the VC commands that operate on old versions of a file can use
80both kinds of version backups. For instance, @kbd{C-x v ~} uses
81either an automatic or a manual version backup, if possible, to get
82the contents of the version you request. Likewise, @kbd{C-x v =} and
83@kbd{C-x v u} use either an automatic or a manual version backup, if
84one of them exists, to get the contents of a version to compare or
85revert to. If you changed a file outside of Emacs, so that no
86automatic version backup was created for the previous text, you can
87create a manual backup of that version using @kbd{C-x v ~}, and thus
88obtain the benefit of the local copy for Emacs commands.
89
90 The only difference in Emacs's handling of manual and automatic
91version backups, once they exist, is that Emacs deletes automatic
92version backups when you commit to the repository. By contrast,
93manual version backups remain until you delete them.
94
95@node Local Version Control
96@subsubsection Local Version Control
97@cindex local version control
98@cindex local back end (version control)
99
100When you make many changes to a file that comes from a remote
101repository, it can be convenient to have version control on your local
102machine as well. You can then record intermediate versions, revert to
103a previous state, etc., before you actually commit your changes to the
104remote server.
105
106VC lets you do this by putting a file under a second, local version
107control system, so that the file is effectively registered in two
108systems at the same time. For the description here, we will assume
109that the remote system is CVS, and you use RCS locally, although the
110mechanism works with any combination of version control systems
111(@dfn{back ends}).
112
113To make it work with other back ends, you must make sure that the
114``more local'' back end comes before the ``more remote'' back end in
115the setting of @code{vc-handled-backends} (@pxref{Customizing VC}). By
116default, this variable is set up so that you can use remote CVS and
117local RCS as described here.
118
119To start using local RCS for a file that comes from a remote CVS
120server, you must @emph{register the file in RCS}, by typing @kbd{C-u
121C-x v v rcs @key{RET}}. (In other words, use @code{vc-next-action} with a
122prefix argument, and specify RCS as the back end.)
123
124You can do this at any time; it does not matter whether you have
125already modified the file with respect to the version in the CVS
126repository. If possible, VC tries to make the RCS master start with
127the unmodified repository version, then checks in any local changes
128as a new version. This works if you have not made any changes yet, or
129if the unmodified repository version exists locally as a version
130backup (@pxref{Version Backups}). If the unmodified version is not
131available locally, the RCS master starts with the modified version;
132the only drawback to this is that you cannot compare your changes
133locally to what is stored in the repository.
134
135The version number of the RCS master is derived from the current CVS
136version, starting a branch from it. For example, if the current CVS
137version is 1.23, the local RCS branch will be 1.23.1. Version 1.23 in
138the RCS master will be identical to version 1.23 under CVS; your first
139changes are checked in as 1.23.1.1. (If the unmodified file is not
140available locally, VC will check in the modified file twice, both as
1411.23 and 1.23.1.1, to make the revision numbers consistent.)
142
143If you do not use locking under CVS (the default), locking is also
144disabled for RCS, so that editing under RCS works exactly as under
145CVS.
146
147When you are done with local editing, you can commit the final version
148back to the CVS repository by typing @kbd{C-u C-x v v cvs @key{RET}}.
149This initializes the log entry buffer
150@iftex
151(@pxref{Log Buffer,,,emacs, the Emacs Manual})
152@end iftex
153@ifnottex
154(@pxref{Log Buffer})
155@end ifnottex
156to contain all the log entries you have recorded in the RCS master;
157you can edit them as you wish, and then commit in CVS by typing
158@kbd{C-c C-c}. If the commit is successful, VC removes the RCS
159master, so that the file is once again registered under CVS only.
160(The RCS master is not actually deleted, just renamed by appending
161@samp{~} to the name, so that you can refer to it later if you wish.)
162
163While using local RCS, you can pick up recent changes from the CVS
164repository into your local file, or commit some of your changes back
165to CVS, without terminating local RCS version control. To do this,
166switch to the CVS back end temporarily, with the @kbd{C-x v b} command:
167
168@table @kbd
169@item C-x v b
170Switch to another back end that the current file is registered
171under (@code{vc-switch-backend}).
172
173@item C-u C-x v b @var{backend} @key{RET}
174Switch to @var{backend} for the current file.
175@end table
176
177@kindex C-x v b
178@findex vc-switch-backend
179@kbd{C-x v b} does not change the buffer contents, or any files; it
180only changes VC's perspective on how to handle the file. Any
181subsequent VC commands for that file will operate on the back end that
182is currently selected.
183
184If the current file is registered in more than one back end, typing
185@kbd{C-x v b} ``cycles'' through all of these back ends. With a
186prefix argument, it asks for the back end to use in the minibuffer.
187
188Thus, if you are using local RCS, and you want to pick up some recent
189changes in the file from remote CVS, first visit the file, then type
190@kbd{C-x v b} to switch to CVS, and finally use @kbd{C-x v m
191@key{RET}} to merge the news
192@iftex
193(@pxref{Merging,,,emacs, the Emacs Manual}).
194@end iftex
195@ifnottex
196(@pxref{Merging}).
197@end ifnottex
198You can then switch back to RCS by typing @kbd{C-x v b} again, and
199continue to edit locally.
200
201But if you do this, the revision numbers in the RCS master no longer
202correspond to those of CVS. Technically, this is not a problem, but
203it can become difficult to keep track of what is in the CVS repository
204and what is not. So we suggest that you return from time to time to
205CVS-only operation, by committing your local changes back to the
206repository using @kbd{C-u C-x v v cvs @key{RET}}.
207
208@node Revision Tags
209@subsection Revision Tags
210@cindex tags and version control
211
212 In a VCS with per-file revision numbers (such as SCCS, RCS, or CVS)
213@dfn{tag} is a named set of file versions (one for each registered
214file) that you can treat as a unit. In a VCS with per-repository
215version numbers (Subversion and most later ones) a tag is simply
216a symbolic name for a revision.
217
218 One important kind of tag is a @dfn{release}, a (theoretically)
219stable version of the system that is ready for distribution to users.
220
221@menu
222* Making Revision Tags:: The tag facilities.
223* Revision Tag Caveats:: Things to be careful of when using tags.
224@end menu
225
226@node Making Revision Tags
227@subsubsection Making and Using Revision Tags
228
229 There are two basic commands for tags; one makes a
230tag with a given name, the other retrieves a named tag.
231
232@table @code
233@kindex C-x v s
234@findex vc-create-tag
235@item C-x v s @var{name} @key{RET}
236Define the working revision of every registered file in or under the
237current directory as a tag named @var{name}
238(@code{vc-create-tag}).
239
240@kindex C-x v r
241@findex vc-retrieve-tag
242@item C-x v r @var{name} @key{RET}
243For all registered files at or below the current directory level,
244retrieve the tagged revision @var{name}. This command will
245switch to a branch if @var{name} is a branch name and your VCS
246distinguishes branches from tags.
247(@code{vc-retrieve-tag}).
248
249This command reports an error if any files are locked at or below the
250current directory, without changing anything; this is to avoid
251overwriting work in progress.
252@end table
253
254Tags are inexpensive, so you need not hesitate to create them whenever
255they are useful. Branches vary in cost depending on your VCS; in
256older ones they may be expensive.
257
258 You can give a tag or branch name as an argument to @kbd{C-x v =} or
259@kbd{C-x v ~}
260@iftex
261(@pxref{Old Revisions,,,emacs, the Emacs Manual}).
262@end iftex
263@ifnottex
264(@pxref{Old Revisions}).
265@end ifnottex
266Thus, you can use it to compare a tagged version against the current files,
267or two tagged versions against each other.
268
269@node Revision Tag Caveats
270@subsubsection Revision Tag Caveats
271
272 For SCCS, VC implements tags itself; these tags are visible only
273through VC. Most later systems (including CVS, Subversion, bzr, git,
274and hg) have a native tag facility, and VC uses it where
275available; those tags will be visible even when you bypass VC.
276
277 There is no support for VC tags using GNU Arch yet.
278
279 Under older VCSes (SCCS, RCS, CVS, early versions of Subversion),
280renaming and deletion could create some difficulties with tags. This is
281not a VC-specific problem, but a general design issue in version
282control systems that was not solved effectively until the earliest
283third-generation systems.
284
285 In a file-oriented VCS, when you rename a registered file you need
286to rename its master along with it; the command @code{vc-rename-file}
287will do this automatically. If you are using SCCS, you must also
288update the records of the tag, to mention the file by its new name
289(@code{vc-rename-file} does this, too). An old tag that refers to a
290master file that no longer exists under the recorded name is invalid;
291VC can no longer retrieve it. It would be beyond the scope of this
292manual to explain enough about RCS and SCCS to explain how to update
293the tags by hand.
294
295 Using @code{vc-rename-file} makes the tag remain valid for
296retrieval, but it does not solve all problems. For example, some of the
297files in your program probably refer to others by name. At the very
298least, the makefile probably mentions the file that you renamed. If you
299retrieve an old tag, the renamed file is retrieved under its new
300name, which is not the name that the makefile expects. So the program
301won't really work as retrieved.
302
303@node Miscellaneous VC 8@node Miscellaneous VC
304@subsection Miscellaneous Commands and Features of VC 9@subsection Miscellaneous Commands and Features of VC
305 10
@@ -307,52 +12,55 @@ won't really work as retrieved.
307 12
308@menu 13@menu
309* Change Logs and VC:: Generating a change log file from log entries. 14* Change Logs and VC:: Generating a change log file from log entries.
310* Renaming and VC:: A command to rename both the source and master 15* VC Delete/Rename:: Deleting and renaming version-controlled files.
311 file correctly. 16* Revision Tags:: Symbolic names for revisions.
312* Version Headers:: Inserting version control headers into working files. 17* Version Headers:: Inserting version control headers into working files.
313@end menu 18@end menu
314 19
315@node Change Logs and VC 20@node Change Logs and VC
316@subsubsection Change Logs and VC 21@subsubsection Change Logs and VC
317 22
318 If you use RCS or CVS for a program and also maintain a change log 23 If you use RCS or CVS for a program with a @file{ChangeLog} file
319file for it
320@iftex 24@iftex
321(@pxref{Change Log,,,emacs, the Emacs Manual}), 25(@pxref{Change Log,,,emacs, the Emacs Manual}),
322@end iftex 26@end iftex
323@ifnottex 27@ifnottex
324(@pxref{Change Log}), 28(@pxref{Change Log}),
325@end ifnottex 29@end ifnottex
326you can generate change log entries automatically from the version 30you can generate change log entries from the version control log
327control log entries: 31entries of previous commits.
32
33 Note that this only works with RCS or CVS. This procedure would be
34particularly incorrect on a modern changeset-based version control
35system, where changes to the @file{ChangeLog} file would normally be
36committed as part of a changeset. In that case, you should write the
37change log entries first, then pull them into the @samp{*vc-log*}
38buffer when you commit
39@iftex
40(@pxref{Log Buffer,,,emacs, the Emacs Manual}).
41@end iftex
42@ifnottex
43(@pxref{Log Buffer}).
44@end ifnottex
328 45
329@table @kbd 46@table @kbd
330@item C-x v a 47@item C-x v a
331@kindex C-x v a 48@kindex C-x v a
332@findex vc-update-change-log 49@findex vc-update-change-log
333Visit the current directory's change log file and, for registered files 50Visit the current directory's @file{ChangeLog} file and, for
334in that directory, create new entries for versions checked in since the 51registered files in that directory, create new entries for versions
335most recent entry in the change log file. 52committed since the most recent change log entry
336(@code{vc-update-change-log}). 53(@code{vc-update-change-log}).
337 54
338This command works with RCS or CVS only, not with any of the other
339back ends.
340
341@item C-u C-x v a 55@item C-u C-x v a
342As above, but only find entries for the current buffer's file. 56As above, but only find entries for the current buffer's file.
343
344@item M-1 C-x v a
345As above, but find entries for all the currently visited files that are
346maintained with version control. This works only with RCS, and it puts
347all entries in the log for the default directory, which may not be
348appropriate.
349@end table 57@end table
350 58
351 For example, suppose the first line of @file{ChangeLog} is dated 59 For example, suppose the first line of @file{ChangeLog} is dated
3521999-04-10, and that the only check-in since then was by Nathaniel 601999-04-10, and that the only check-in since then was by Nathaniel
353Bowditch to @file{rcs2log} on 1999-05-22 with log text @samp{Ignore log 61Bowditch to @file{rcs2log} on 1999-05-22 with log entry @samp{Ignore
354messages that start with `#'.}. Then @kbd{C-x v a} visits 62log messages that start with `#'.}. Then @kbd{C-x v a} inserts this
355@file{ChangeLog} and inserts text like this: 63@file{ChangeLog} entry:
356 64
357@iftex 65@iftex
358@medbreak 66@medbreak
@@ -369,17 +77,11 @@ messages that start with `#'.}. Then @kbd{C-x v a} visits
369@end iftex 77@end iftex
370 78
371@noindent 79@noindent
372You can then edit the new change log entry further as you wish. 80If the version control log entry specifies a function name (in
373 81parenthesis at the beginning of a line), that is reflected in the
374 Some of the new change log entries may duplicate what's already in 82@file{ChangeLog} entry. For example, if a log entry for @file{vc.el}
375ChangeLog. You will have to remove these duplicates by hand. 83is @samp{(vc-do-command): Check call-process status.}, the
376 84@file{ChangeLog} entry is:
377 Normally, the log entry for file @file{foo} is displayed as @samp{*
378foo: @var{text of log entry}}. The @samp{:} after @file{foo} is omitted
379if the text of the log entry starts with @w{@samp{(@var{functionname}):
380}}. For example, if the log entry for @file{vc.el} is
381@samp{(vc-do-command): Check call-process status.}, then the text in
382@file{ChangeLog} looks like this:
383 85
384@iftex 86@iftex
385@medbreak 87@medbreak
@@ -395,221 +97,184 @@ if the text of the log entry starts with @w{@samp{(@var{functionname}):
395@medbreak 97@medbreak
396@end iftex 98@end iftex
397 99
398 When @kbd{C-x v a} adds several change log entries at once, it groups 100 When @kbd{C-x v a} adds several change log entries at once, it
399related log entries together if they all are checked in by the same 101groups related log entries together if they all are checked in by the
400author at nearly the same time. If the log entries for several such 102same author at nearly the same time. If the log entries for several
401files all have the same text, it coalesces them into a single entry. 103such files all have the same text, it coalesces them into a single
402For example, suppose the most recent check-ins have the following log 104entry.
403entries:
404 105
405@flushleft 106@node VC Delete/Rename
406@bullet{} For @file{vc.texinfo}: @samp{Fix expansion typos.} 107@subsubsection Deleting and Renaming Version-Controlled Files
407@bullet{} For @file{vc.el}: @samp{Don't call expand-file-name.} 108@cindex renaming version-controlled files
408@bullet{} For @file{vc-hooks.el}: @samp{Don't call expand-file-name.}
409@end flushleft
410 109
411@noindent 110@table @kbd
412They appear like this in @file{ChangeLog}: 111@item M-x vc-delete-file
413 112Prompt for a file name, delete the file from the working tree, and
414@iftex 113schedule the deletion for committing.
415@medbreak
416@end iftex
417@smallexample
418@group
4191999-04-01 Nathaniel Bowditch <nat@@apn.org>
420 114
421 * vc.texinfo: Fix expansion typos. 115@item M-x vc-rename-file
116Prompt for two file names, @var{VAR} and @var{OLD}, rename them in the
117working tree, and schedule the renaming for committing.
118@end table
422 119
423 * vc.el, vc-hooks.el: Don't call expand-file-name. 120@findex vc-delete-file
424@end group 121 If you wish to delete a version-controlled file, use the command
425@end smallexample 122@kbd{M-x vc-delete-file}. This prompts for the file name, and deletes
123it via the version control system. The file is removed from the
124working tree, and in the VC Directory buffer
426@iftex 125@iftex
427@medbreak 126(@pxref{VC Directory Mode}),
428@end iftex 127@end iftex
128@ifnottex
129(@pxref{VC Directory Mode}),
130@end ifnottex
131it is displayed with the @samp{removed} status. When you commit it,
132the deletion takes effect in the repository.
429 133
430 Normally, @kbd{C-x v a} separates log entries by a blank line, but you 134@findex vc-rename-file
431can mark several related log entries to be clumped together (without an 135 To rename a version-controlled file, type @kbd{M-x vc-rename-file}.
432intervening blank line) by starting the text of each related log entry 136This prompts for two arguments: the name of the file you wish to
433with a label of the form @w{@samp{@{@var{clumpname}@} }}. The label 137rename, and the new name; then it performs the renaming via the
434itself is not copied to @file{ChangeLog}. For example, suppose the log 138version control system. The renaming takes effect immediately in the
435entries are: 139working tree, and takes effect in the repository when you commit the
140renamed file.
141
142 On modern version control systems that have built-in support for
143renaming, the renamed file retains the full change history of the
144original file. On CVS and older version control systems, the
145@code{vc-rename-file} command actually works by creating a copy of the
146old file under the new name, registering it, and deleting the old
147file. In this case, the change history is not preserved.
436 148
437@flushleft 149@node Revision Tags
438@bullet{} For @file{vc.texinfo}: @samp{@{expand@} Fix expansion typos.} 150@subsubsection Revision Tags
439@bullet{} For @file{vc.el}: @samp{@{expand@} Don't call expand-file-name.} 151@cindex revision tag
440@bullet{} For @file{vc-hooks.el}: @samp{@{expand@} Don't call expand-file-name.} 152@cindex tags for version control
441@end flushleft
442 153
443@noindent 154 Most version control systems allow you to apply a @dfn{revision tag}
444Then the text in @file{ChangeLog} looks like this: 155to a specific version of a version-controlled tree. On modern
156changeset-based version control systems, a revision tag is simply a
157symbolic name for a particular revision. On older file-based systems
158like CVS, each tag is added to the entire set of version-controlled
159files, allowing them to be handled as a unit. Revision tags are
160commonly used to identify releases that are distributed to users.
445 161
446@iftex 162 There are two basic commands for tags; one makes a tag with a given
447@medbreak 163name, the other retrieves a named tag.
448@end iftex
449@smallexample
450@group
4511999-04-01 Nathaniel Bowditch <nat@@apn.org>
452 164
453 * vc.texinfo: Fix expansion typos. 165@table @code
454 * vc.el, vc-hooks.el: Don't call expand-file-name. 166@kindex C-x v s
455@end group 167@findex vc-create-tag
456@end smallexample 168@item C-x v s @var{name} @key{RET}
457@iftex 169Define the working revision of every registered file in or under the
458@medbreak 170current directory as a tag named @var{name}
459@end iftex 171(@code{vc-create-tag}).
460 172
461 A log entry whose text begins with @samp{#} is not copied to 173@kindex C-x v r
462@file{ChangeLog}. For example, if you merely fix some misspellings in 174@findex vc-retrieve-tag
463comments, you can log the change with an entry beginning with @samp{#} 175@item C-x v r @var{name} @key{RET}
464to avoid putting such trivia into @file{ChangeLog}. 176For all registered files at or below the current directory level,
177retrieve the tagged revision @var{name}. This command will switch to a
178branch if @var{name} is a branch name and your VCS distinguishes
179branches from tags. (@code{vc-retrieve-tag}).
465 180
466@node Renaming and VC 181This command reports an error if any files are locked at or below the
467@subsubsection Renaming VC Work Files and Master Files 182current directory, without changing anything; this is to avoid
183overwriting work in progress.
184@end table
468 185
469@findex vc-rename-file 186 You can give a tag or branch name as an argument to @kbd{C-x v =} or
470 When you rename a registered file, you must also rename its master 187@kbd{C-x v ~}
471file correspondingly to get proper results. Use @code{vc-rename-file} 188@iftex
472to rename the source file as you specify, and rename its master file 189(@pxref{Old Revisions,,,emacs, the Emacs Manual}).
473accordingly. It also updates any tags (@pxref{Revision Tags}) that 190@end iftex
474mention the file, so that they use the new name; despite this, the 191@ifnottex
475tag thus modified may not completely work (@pxref{Revision Tag Caveats}). 192(@pxref{Old Revisions}).
193@end ifnottex
194Thus, you can use it to compare a tagged version against the current files,
195or two tagged versions against each other.
476 196
477 Some back ends do not provide an explicit rename operation to their 197 On SCCS, VC implements tags itself; these tags are visible only
478repositories. After issuing @code{vc-rename-file}, use @kbd{C-x v v} 198through VC. Most later systems (including CVS, Subversion, bzr, git,
479on the original and renamed buffers and provide the necessary edit 199and hg) have a native tag facility, and VC uses it where available;
480log. 200those tags will be visible even when you bypass VC.
481 201
482 You cannot use @code{vc-rename-file} on a file that is locked by 202 In a file-oriented VCS, when you rename a registered file you need
483someone else. 203to rename its master along with it; the command @code{vc-rename-file}
204will do this automatically. If you are using SCCS, you must also
205update the records of the tag, to mention the file by its new name
206(@code{vc-rename-file} does this, too). An old tag that refers to a
207master file that no longer exists under the recorded name is invalid;
208VC can no longer retrieve it. It would be beyond the scope of this
209manual to explain enough about RCS and SCCS to explain how to update
210the tags by hand. Using @code{vc-rename-file} makes the tag remain
211valid for retrieval, but it does not solve all problems. For example,
212some of the files in your program probably refer to others by name.
213At the very least, the makefile probably mentions the file that you
214renamed. If you retrieve an old tag, the renamed file is retrieved
215under its new name, which is not the name that the makefile expects.
216So the program won't really work as retrieved.
484 217
485@node Version Headers 218@node Version Headers
486@subsubsection Inserting Version Control Headers 219@subsubsection Inserting Version Control Headers
487 220
488 Sometimes it is convenient to put version identification strings 221 On Subversion, CVS, RCS, and SCCS, you can put certain special
489directly into working files. Certain special strings called 222strings called @dfn{version headers} into a work file. When the file
490@dfn{version headers} are replaced in each successive version by the 223is committed, the version control system automatically puts the
491number of that version, the name of the user who created it, and other 224revision number, the name of the user who made the commit, and other
492relevant information. All of the back ends that VC supports have such 225relevant information into the version header.
493a mechanism, except GNU Arch.
494
495 VC does not normally use the information contained in these headers.
496The exception is RCS---with RCS, version headers are sometimes more
497reliable than the master file to determine which version of the file
498you are editing. Note that in a multi-branch environment, version
499headers are necessary to make VC behave correctly
500@iftex
501(@pxref{Multi-User Branching,,,emacs, the Emacs Manual}).
502@end iftex
503@ifnottex
504(@pxref{Multi-User Branching}).
505@end ifnottex
506
507 Searching for RCS version headers is controlled by the variable
508@code{vc-consult-headers}. If it is non-@code{nil} (the default),
509Emacs searches for headers to determine the version number you are
510editing. Setting it to @code{nil} disables this feature.
511 226
512 Note that although CVS uses the same kind of version headers as RCS 227@vindex vc-consult-headers
513does, VC never searches for these headers if you are using CVS, 228 VC does not normally use the information in the version headers. As
514regardless of the above setting. 229an exception, when using RCS, Emacs uses the version header, if there
230is one, to determine the file version, since it is often more reliable
231than the RCS master file. To inhibit using the version header this
232way, change the variable @code{vc-consult-headers} to @code{nil}.
515 233
516@kindex C-x v h 234@kindex C-x v h
517@findex vc-insert-headers 235@findex vc-insert-headers
518 You can use the @kbd{C-x v h} command (@code{vc-insert-headers}) to
519insert a suitable header string.
520
521@table @kbd
522@item C-x v h
523Insert headers in a file for use with your version-control system.
524@end table
525
526@vindex vc-@var{backend}-header 236@vindex vc-@var{backend}-header
527 The default header string is @samp{@w{$}Id$} for RCS and 237 To insert a suitable header string into the current buffer, type
528@samp{@w{%}W%} for SCCS. You can specify other headers to insert by 238@kbd{C-x v h} (@code{vc-insert-headers}). This command works only on
529setting the variables @code{vc-@var{backend}-header} where 239Subversion, CVS, RCS, and SCCS. The variable
530@var{backend} is @code{rcs} or @code{sccs}. 240@code{vc-@var{backend}-header} contains the list of keywords to insert
531 241into the version header; for instance, CVS uses @code{vc-cvs-header},
532 Instead of a single string, you can specify a list of strings; then 242whose default value is @code{'("\$Id\$")}. (The extra backslashes
533each string in the list is inserted as a separate header on a line of 243prevent the string constant from being interpreted as a header, if the
534its own. 244Emacs Lisp file defining it is maintained with version control.) The
535 245@kbd{C-x v h} command inserts each keyword in the list on a new line
536 It may be necessary to use apparently-superfluous backslashes when 246at point, surrounded by tabs, and inside comment delimiters if
537writing the strings that you put in this variable. For instance, you 247necessary.
538might write @code{"$Id\$"} rather than @code{"$Id@w{$}"}. The extra
539backslash prevents the string constant from being interpreted as a
540header, if the Emacs Lisp file containing it is maintained with
541version control.
542
543@vindex vc-comment-alist
544 Each header is inserted surrounded by tabs, inside comment delimiters,
545on a new line at point. Normally the ordinary comment
546start and comment end strings of the current mode are used, but for
547certain modes, there are special comment delimiters for this purpose;
548the variable @code{vc-comment-alist} specifies them. Each element of
549this list has the form @code{(@var{mode} @var{starter} @var{ender})}.
550 248
551@vindex vc-static-header-alist 249@vindex vc-static-header-alist
552 The variable @code{vc-static-header-alist} specifies further strings 250 The variable @code{vc-static-header-alist} specifies further strings
553to add based on the name of the buffer. Its value should be a list of 251to add based on the name of the buffer. Its value should be a list of
554elements of the form @code{(@var{regexp} . @var{format})}. Whenever 252elements of the form @code{(@var{regexp} . @var{format})}. Whenever
555@var{regexp} matches the buffer name, @var{format} is inserted as part 253@var{regexp} matches the buffer name, @var{format} is also inserted as
556of the header. A header line is inserted for each element that matches 254part of the version header. A @samp{%s} in @var{format} is replaced
557the buffer name, and for each string specified by 255with the file's version control type.
558@code{vc-@var{backend}-header}. The header line is made by processing the
559string from @code{vc-@var{backend}-header} with the format taken from the
560element. The default value for @code{vc-static-header-alist} is as follows:
561
562@example
563@group
564(("\\.c$" .
565 "\n#ifndef lint\nstatic char vcid[] = \"\%s\";\n\
566#endif /* lint */\n"))
567@end group
568@end example
569
570@noindent
571It specifies insertion of text of this form:
572
573@example
574@group
575
576#ifndef lint
577static char vcid[] = "@var{string}";
578#endif /* lint */
579@end group
580@end example
581
582@noindent
583Note that the text above starts with a blank line.
584
585 If you use more than one version header in a file, put them close
586together in the file. The mechanism in @code{revert-buffer} that
587preserves markers may not handle markers positioned between two version
588headers.
589 256
590@node Customizing VC 257@node Customizing VC
591@subsection Customizing VC 258@subsection Customizing VC
592 259
593@vindex vc-handled-backends 260@vindex vc-handled-backends
594The variable @code{vc-handled-backends} determines which version 261 The variable @code{vc-handled-backends} determines which version
595control systems VC should handle. The default value is @code{(RCS CVS 262control systems VC should handle. The default value is @code{(RCS CVS
596SVN SCCS Bzr Git Hg Mtn Arch)}, so it contains all the version systems 263SVN SCCS Bzr Git Hg Mtn Arch)}, so it contains all the version systems
597that are currently supported. If you want VC to ignore one or more of 264that are currently supported. If you want VC to ignore one or more of
598these systems, exclude its name from the list. To disable VC entirely, 265these systems, exclude its name from the list. To disable VC
599set this variable to @code{nil}. 266entirely, set this variable to @code{nil}.
600 267
601The order of systems in the list is significant: when you visit a file 268 The order of systems in the list is significant: when you visit a
602registered in more than one system (@pxref{Local Version Control}), VC 269file registered in more than one system, VC uses the system that comes
603uses the system that comes first in @code{vc-handled-backends} by 270first in @code{vc-handled-backends} by default. The order is also
604default. The order is also significant when you register a file for 271significant when you register a file for the first time
605the first time, see
606@iftex 272@iftex
607@ref{Registering,,,emacs, the Emacs Manual}, 273(@pxref{Registering,,,emacs, the Emacs Manual}).
608@end iftex 274@end iftex
609@ifnottex 275@ifnottex
610@ref{Registering}, 276(@pxref{Registering}).
611@end ifnottex 277@end ifnottex
612for details.
613 278
614@menu 279@menu
615* General VC Options:: Options that apply to multiple back ends. 280* General VC Options:: Options that apply to multiple back ends.
@@ -626,40 +291,27 @@ maintained with version control. If you want to make backup files even
626for files that use version control, set the variable 291for files that use version control, set the variable
627@code{vc-make-backup-files} to a non-@code{nil} value. 292@code{vc-make-backup-files} to a non-@code{nil} value.
628 293
629@vindex vc-keep-workfiles
630 Normally the work file exists all the time, whether it is locked or
631not. If you set @code{vc-keep-workfiles} to @code{nil}, then checking
632in a new version with @kbd{C-x v v} deletes the work file; but any
633attempt to visit the file with Emacs creates it again. (With CVS, work
634files are always kept.)
635
636@vindex vc-follow-symlinks 294@vindex vc-follow-symlinks
637 Editing a version-controlled file through a symbolic link can be 295@cindex symbolic links (and version control)
638dangerous. It bypasses the version control system---you can edit the 296 Editing a version-controlled file through a symbolic link may cause
639file without locking it, and fail to check your changes in. Also, 297unexpected results, if you are unaware that the underlying file is
640your changes might overwrite those of another user. To protect against 298version-controlled. The variable @code{vc-follow-symlinks} controls
641this, VC checks each symbolic link that you visit, to see if it points 299what Emacs does if you try to visit a symbolic link pointing to a
642to a file under version control. 300version-controlled file. If the value is @code{ask} (the default),
643 301Emacs asks for confirmation. If it is @code{nil}, Emacs just displays
644 The variable @code{vc-follow-symlinks} controls what to do when a 302a warning message. If it is @code{t}, Emacs automatically follows the
645symbolic link points to a version-controlled file. If it is @code{nil}, 303link and visits the real file instead.
646VC only displays a warning message. If it is @code{t}, VC automatically
647follows the link, and visits the real file instead, telling you about
648this in the echo area. If the value is @code{ask} (the default), VC
649asks you each time whether to follow the link.
650 304
651@vindex vc-suppress-confirm 305@vindex vc-suppress-confirm
652 If @code{vc-suppress-confirm} is non-@code{nil}, then @kbd{C-x v v} 306 If @code{vc-suppress-confirm} is non-@code{nil}, then @kbd{C-x v v}
653and @kbd{C-x v i} can save the current buffer without asking, and 307and @kbd{C-x v i} can save the current buffer without asking, and
654@kbd{C-x v u} also operates without asking for confirmation. (This 308@kbd{C-x v u} also operates without asking for confirmation.
655variable does not affect @kbd{C-x v c}; that operation is so drastic
656that it should always ask for confirmation.)
657 309
658@vindex vc-command-messages 310@vindex vc-command-messages
659 VC mode does much of its work by running the shell commands for the 311 VC mode does much of its work by running the shell commands for the
660appropriate backend. If @code{vc-command-messages} is non-@code{nil}, VC 312appropriate version control system. If @code{vc-command-messages} is
661displays messages to indicate which shell commands it runs, and 313non-@code{nil}, VC displays messages to indicate which shell commands
662additional messages when the commands finish. 314it runs, and additional messages when the commands finish.
663 315
664@vindex vc-path 316@vindex vc-path
665 You can specify additional directories to search for version control 317 You can specify additional directories to search for version control
@@ -715,37 +367,16 @@ the variable @code{vc-mistrust-permissions} affects SCCS use, but
715@node CVS Options 367@node CVS Options
716@subsubsection Options specific for CVS 368@subsubsection Options specific for CVS
717 369
718@cindex locking (CVS) 370@vindex vc-cvs-global-switches
719 By default, CVS does not use locking to coordinate the activities of 371 You can specify additional command line options to pass to all CVS
720several users; anyone can change a work file at any time. However, 372operations in the variable @code{vc-cvs-global-switches}. These
721there are ways to restrict this, resulting in behavior that resembles 373switches are inserted immediately after the @code{cvs} command, before
722locking. 374the name of the operation to invoke.
723
724@cindex CVSREAD environment variable (CVS)
725 For one thing, you can set the @env{CVSREAD} environment variable
726(the value you use makes no difference). If this variable is defined,
727CVS makes your work files read-only by default. In Emacs, you must
728type @kbd{C-x v v} to make the file writable, so that editing works
729in fact similar as if locking was used. Note however, that no actual
730locking is performed, so several users can make their files writable
731at the same time. When setting @env{CVSREAD} for the first time, make
732sure to check out all your modules anew, so that the file protections
733are set correctly.
734
735@cindex cvs watch feature
736@cindex watching files (CVS)
737 Another way to achieve something similar to locking is to use the
738@dfn{watch} feature of CVS. If a file is being watched, CVS makes it
739read-only by default, and you must also use @kbd{C-x v v} in Emacs to
740make it writable. VC calls @code{cvs edit} to make the file writable,
741and CVS takes care to notify other developers of the fact that you
742intend to change the file. See the CVS documentation for details on
743using the watch feature.
744 375
745@vindex vc-stay-local 376@vindex vc-stay-local
746@vindex vc-cvs-stay-local 377@vindex vc-cvs-stay-local
747@cindex remote repositories (CVS) 378@cindex remote repositories (CVS)
748 When a file's repository is on a remote machine, VC tries to keep 379 When using a CVS repository on a remote machine, VC can try keeping
749network interactions to a minimum. This is controlled by the variable 380network interactions to a minimum. This is controlled by the variable
750@code{vc-cvs-stay-local}. There is another variable, 381@code{vc-cvs-stay-local}. There is another variable,
751@code{vc-stay-local}, which enables the feature also for other back 382@code{vc-stay-local}, which enables the feature also for other back
@@ -753,36 +384,58 @@ ends that support it, including CVS. In the following, we will talk
753only about @code{vc-cvs-stay-local}, but everything applies to 384only about @code{vc-cvs-stay-local}, but everything applies to
754@code{vc-stay-local} as well. 385@code{vc-stay-local} as well.
755 386
756If @code{vc-cvs-stay-local} is @code{t} (the default), then VC uses 387 If @code{vc-cvs-stay-local} is @code{t} (the default), VC determines
757only the entry in the local CVS subdirectory to determine the file's 388the version control status of each file using only the entry in the
758state (and possibly information returned by previous CVS commands). 389local CVS subdirectory and the information returned by previous CVS
759One consequence of this is that when you have modified a file, and 390commands. As a consequence, if you have modified a file and somebody
760somebody else has already checked in other changes to the file, you 391else has checked in other changes, you will not be notified of the
761are not notified of it until you actually try to commit. (But you can 392conflict until you try to commit.
762try to pick up any recent changes from the repository first, using 393
763@kbd{C-x v m @key{RET}}, 394 If you change @code{vc-cvs-stay-local} to @code{nil}, VC queries the
395remote repository @emph{before} it decides what to do in
396@code{vc-next-action} (@kbd{C-x v v}), just as it does for local
397repositories.
398
399 You can also set @code{vc-cvs-stay-local} to a regular expression
400that is matched against the repository host name; VC then stays local
401only for repositories from hosts that match the pattern.
402
403@cindex automatic version backups
404 When using a remote repository, Emacs normally makes @dfn{automatic
405version backups} of the original versions of each edited file. These
406local backups are made whenever you save the first changes to a file,
407and they are removed after you commit your changes to the repository.
408(Note that these are not the same as ordinary Emacs backup files;
764@iftex 409@iftex
765@pxref{Merging,,,emacs, the Emacs Manual}). 410@pxref{Backup,,,emacs, the Emacs Manual}.)
766@end iftex 411@end iftex
767@ifnottex 412@ifnottex
768@pxref{Merging}). 413@pxref{Backup}.)
769@end ifnottex 414@end ifnottex
415Commands like @kbd{C-x v =} and @kbd{C-x v u} make use of automatic
416version backups, if possible, to avoid having to access the network.
770 417
771 When @code{vc-cvs-stay-local} is @code{t}, VC also makes local 418 Setting @code{vc-cvs-stay-local} to @code{nil} disables the making
772version backups, so that simple diff and revert operations are 419of automatic version backups.
773completely local (@pxref{Version Backups}).
774
775 On the other hand, if you set @code{vc-cvs-stay-local} to @code{nil},
776then VC queries the remote repository @emph{before} it decides what to
777do in @code{vc-next-action} (@kbd{C-x v v}), just as it does for local
778repositories. It also does not make any version backups.
779 420
780 You can also set @code{vc-cvs-stay-local} to a regular expression 421@cindex manual version backups
781that is matched against the repository host name; VC then stays local 422 Automatic version backups have names of the form
782only for repositories from hosts that match the pattern. 423@w{@code{@var{file}.~@var{version}.~}}. This is similar to the name
424that @kbd{C-x v ~} saves old versions to
425@iftex
426(@pxref{Old Revisions,,,emacs, the Emacs Manual}),
427@end iftex
428@ifnottex
429(@pxref{Old Revisions}),
430@end ifnottex
431except for the additional dot (@samp{.}) after the version. The
432relevant VC commands can use both kinds of version backups. The main
433difference is that the ``manual'' version backups made by @kbd{C-x v
434~} are not deleted automatically when you commit.
783 435
784@vindex vc-cvs-global-switches 436@cindex locking (CVS)
785 You can specify additional command line options to pass to all CVS 437 CVS does not use locking by default, but there are ways to enable
786operations in the variable @code{vc-cvs-global-switches}. These 438locking-like behavior using its @env{CVSREAD} or @dfn{watch} feature;
787switches are inserted immediately after the @code{cvs} command, before 439see the CVS documentation for details. If that case, you can use
788the name of the operation to invoke. 440@kbd{C-x v v} in Emacs to toggle locking, as you would for a
441locking-based version control system (@pxref{VC With A Locking VCS}).
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog
index 37de62be976..d4f9ab747ed 100644
--- a/doc/lispref/ChangeLog
+++ b/doc/lispref/ChangeLog
@@ -1,3 +1,23 @@
12011-12-28 Paul Eggert <eggert@cs.ucla.edu>
2
3 * files.texi (File Attributes, Changing Files):
4 Use a more-natural notation for octal numbers.
5
62011-12-23 Juanma Barranquero <lekktu@gmail.com>
7
8 * variables.texi (Variables with Restricted Values):
9 Change reference to variable (bug#10354).
10
112011-12-13 Martin Rudalics <rudalics@gmx.at>
12
13 * windows.texi (Splitting Windows): Use t instead of non-nil
14 when describing window-combination-resize.
15
162011-12-05 Stefan Monnier <monnier@iro.umontreal.ca>
17
18 * text.texi (Special Properties): Warn against `intangible' properties
19 (bug#10222).
20
12011-11-26 Eli Zaretskii <eliz@gnu.org> 212011-11-26 Eli Zaretskii <eliz@gnu.org>
2 22
3 * display.texi (Truncation): 23 * display.texi (Truncation):
@@ -23,8 +43,8 @@
23 43
242011-11-21 Martin Rudalics <rudalics@gmx.at> 442011-11-21 Martin Rudalics <rudalics@gmx.at>
25 45
26 * windows.texi (Windows and Frames, Splitting Windows): Fix 46 * windows.texi (Windows and Frames, Splitting Windows):
27 typos. 47 Fix typos.
28 48
292011-11-21 Chong Yidong <cyd@gnu.org> 492011-11-21 Chong Yidong <cyd@gnu.org>
30 50
@@ -36,8 +56,8 @@
36 (Buffers and Windows): Copyedits. 56 (Buffers and Windows): Copyedits.
37 (Choosing Window): Document special handling of special-display-*. 57 (Choosing Window): Document special handling of special-display-*.
38 (Choosing Window Options): Fix display-buffer-reuse-frames doc. 58 (Choosing Window Options): Fix display-buffer-reuse-frames doc.
39 Don't document even-window-heights, which is going away. Clarify 59 Don't document even-window-heights, which is going away.
40 which options are obeyed by which action functions. 60 Clarify which options are obeyed by which action functions.
41 61
422011-11-20 Stefan Monnier <monnier@iro.umontreal.ca> 622011-11-20 Stefan Monnier <monnier@iro.umontreal.ca>
43 63
@@ -9749,7 +9769,7 @@
9749 directory have been changed to reflect this. 9769 directory have been changed to reflect this.
9750 9770
9751 * All instances of @indentedresultt{} have been changed to 9771 * All instances of @indentedresultt{} have been changed to
9752 ` @result{}', using 5 spaces at the begining of the line. 9772 ` @result{}', using 5 spaces at the beginning of the line.
9753 9773
97541989-04-24 Robert J. Chassell (bob@rice-chex.ai.mit.edu) 97741989-04-24 Robert J. Chassell (bob@rice-chex.ai.mit.edu)
9755 9775
diff --git a/doc/lispref/commands.texi b/doc/lispref/commands.texi
index e76b2bafd79..41392273fbd 100644
--- a/doc/lispref/commands.texi
+++ b/doc/lispref/commands.texi
@@ -946,10 +946,9 @@ If the last event came from a keyboard macro, the value is @code{macro}.
946 946
947 It is not easy to display a value of point in the middle of a 947 It is not easy to display a value of point in the middle of a
948sequence of text that has the @code{display}, @code{composition} or 948sequence of text that has the @code{display}, @code{composition} or
949@code{intangible} property, or is invisible. Therefore, after a 949is invisible. Therefore, after a command finishes and returns to the
950command finishes and returns to the command loop, if point is within 950command loop, if point is within such a sequence, the command loop
951such a sequence, the command loop normally moves point to the edge of 951normally moves point to the edge of the sequence.
952the sequence.
953 952
954 A command can inhibit this feature by setting the variable 953 A command can inhibit this feature by setting the variable
955@code{disable-point-adjustment}: 954@code{disable-point-adjustment}:
diff --git a/doc/lispref/elisp.texi b/doc/lispref/elisp.texi
index cefa917a4e1..98eaf1f8ade 100644
--- a/doc/lispref/elisp.texi
+++ b/doc/lispref/elisp.texi
@@ -1381,7 +1381,7 @@ Operating System Interface
1381* System Environment:: Distinguish the name and kind of system. 1381* System Environment:: Distinguish the name and kind of system.
1382* User Identification:: Finding the name and user id of the user. 1382* User Identification:: Finding the name and user id of the user.
1383* Time of Day:: Getting the current time. 1383* Time of Day:: Getting the current time.
1384* Time Conversion:: Converting a time from numeric form to 1384* Time Conversion:: Converting a time from numeric form to
1385 calendrical data and vice versa. 1385 calendrical data and vice versa.
1386* Time Parsing:: Converting a time from numeric form to text 1386* Time Parsing:: Converting a time from numeric form to text
1387 and vice versa. 1387 and vice versa.
@@ -1438,7 +1438,7 @@ Tips and Conventions
1438GNU Emacs Internals 1438GNU Emacs Internals
1439 1439
1440* Building Emacs:: How the dumped Emacs is made. 1440* Building Emacs:: How the dumped Emacs is made.
1441* Pure Storage:: A kludge to make preloaded Lisp functions sharable. 1441* Pure Storage:: Kludge to make preloaded Lisp functions shareable.
1442* Garbage Collection:: Reclaiming space for Lisp objects no longer used. 1442* Garbage Collection:: Reclaiming space for Lisp objects no longer used.
1443* Memory Usage:: Info about total size of Lisp objects made so far. 1443* Memory Usage:: Info about total size of Lisp objects made so far.
1444* Writing Emacs Primitives:: Writing C code for Emacs. 1444* Writing Emacs Primitives:: Writing C code for Emacs.
diff --git a/doc/lispref/files.texi b/doc/lispref/files.texi
index 86ecfd122ef..b6d0b5c7ed2 100644
--- a/doc/lispref/files.texi
+++ b/doc/lispref/files.texi
@@ -1115,16 +1115,11 @@ This function recursively follows symbolic links at all levels.
1115@end group 1115@end group
1116 1116
1117@group 1117@group
1118(set-file-modes "~/junk/diffs" 438) 1118(set-file-modes "~/junk/diffs" #o666)
1119 @result{} nil 1119 @result{} nil
1120@end group 1120@end group
1121 1121
1122@group 1122@group
1123(format "%o" 438)
1124 @result{} "666" ; @r{Convert to octal.}
1125@end group
1126
1127@group
1128% ls -l diffs 1123% ls -l diffs
1129 -rw-rw-rw- 1 lewis 0 3063 Oct 30 16:00 diffs 1124 -rw-rw-rw- 1 lewis 0 3063 Oct 30 16:00 diffs
1130@end group 1125@end group
@@ -1570,10 +1565,10 @@ the bitwise complement of the ``umask'' value.
1570 1565
1571The argument @var{mode} must be an integer. On most systems, only the 1566The argument @var{mode} must be an integer. On most systems, only the
1572low 9 bits of @var{mode} are meaningful. You can use the Lisp construct 1567low 9 bits of @var{mode} are meaningful. You can use the Lisp construct
1573for octal character codes to enter @var{mode}; for example, 1568for octal numbers to enter @var{mode}; for example,
1574 1569
1575@example 1570@example
1576(set-default-file-modes ?\644) 1571(set-default-file-modes #o644)
1577@end example 1572@end example
1578 1573
1579Saving a modified version of an existing file does not count as creating 1574Saving a modified version of an existing file does not count as creating
diff --git a/doc/lispref/internals.texi b/doc/lispref/internals.texi
index 0168c564e34..9ef4646b50b 100644
--- a/doc/lispref/internals.texi
+++ b/doc/lispref/internals.texi
@@ -13,7 +13,7 @@ internal aspects of GNU Emacs that may be of interest to C programmers.
13 13
14@menu 14@menu
15* Building Emacs:: How the dumped Emacs is made. 15* Building Emacs:: How the dumped Emacs is made.
16* Pure Storage:: A kludge to make preloaded Lisp functions sharable. 16* Pure Storage:: Kludge to make preloaded Lisp functions shareable.
17* Garbage Collection:: Reclaiming space for Lisp objects no longer used. 17* Garbage Collection:: Reclaiming space for Lisp objects no longer used.
18* Memory Usage:: Info about total size of Lisp objects made so far. 18* Memory Usage:: Info about total size of Lisp objects made so far.
19* Writing Emacs Primitives:: Writing C code for Emacs. 19* Writing Emacs Primitives:: Writing C code for Emacs.
@@ -196,7 +196,7 @@ function definition in pure storage. If it is non-@code{nil}, then the
196function definition is copied into pure storage. 196function definition is copied into pure storage.
197 197
198This flag is @code{t} while loading all of the basic functions for 198This flag is @code{t} while loading all of the basic functions for
199building Emacs initially (allowing those functions to be sharable and 199building Emacs initially (allowing those functions to be shareable and
200non-collectible). Dumping Emacs as an executable always writes 200non-collectible). Dumping Emacs as an executable always writes
201@code{nil} in this variable, regardless of the value it actually has 201@code{nil} in this variable, regardless of the value it actually has
202before and after dumping. 202before and after dumping.
diff --git a/doc/lispref/modes.texi b/doc/lispref/modes.texi
index 9d652901e53..fcb7c772936 100644
--- a/doc/lispref/modes.texi
+++ b/doc/lispref/modes.texi
@@ -701,7 +701,7 @@ init file.)
701@cindex help for major mode 701@cindex help for major mode
702@cindex documentation for major mode 702@cindex documentation for major mode
703 703
704 The @code{describe-mode} function is provides information about major 704 The @code{describe-mode} function provides information about major
705modes. It is normally bound to @kbd{C-h m}. It uses the value of the 705modes. It is normally bound to @kbd{C-h m}. It uses the value of the
706variable @code{major-mode} (@pxref{Major Modes}), which is why every 706variable @code{major-mode} (@pxref{Major Modes}), which is why every
707major mode command needs to set that variable. 707major mode command needs to set that variable.
diff --git a/doc/lispref/nonascii.texi b/doc/lispref/nonascii.texi
index 298c7c3d1a8..46dbbb08e57 100644
--- a/doc/lispref/nonascii.texi
+++ b/doc/lispref/nonascii.texi
@@ -1580,7 +1580,7 @@ decoding functions (@pxref{Explicit Encoding}).
1580 Sometimes, you need to prefer several coding systems for some 1580 Sometimes, you need to prefer several coding systems for some
1581operation, rather than fix a single one. Emacs lets you specify a 1581operation, rather than fix a single one. Emacs lets you specify a
1582priority order for using coding systems. This ordering affects the 1582priority order for using coding systems. This ordering affects the
1583sorting of lists of coding sysems returned by functions such as 1583sorting of lists of coding systems returned by functions such as
1584@code{find-coding-systems-region} (@pxref{Lisp and Coding Systems}). 1584@code{find-coding-systems-region} (@pxref{Lisp and Coding Systems}).
1585 1585
1586@defun coding-system-priority-list &optional highestp 1586@defun coding-system-priority-list &optional highestp
diff --git a/doc/lispref/spellfile b/doc/lispref/spellfile
index e0d77ee0541..18fb633acfd 100644
--- a/doc/lispref/spellfile
+++ b/doc/lispref/spellfile
@@ -337,7 +337,6 @@ fset
337fstab 337fstab
338ftp 338ftp
339fu 339fu
340funtions
341garbles 340garbles
342gc 341gc
343gcpro 342gcpro
diff --git a/doc/lispref/text.texi b/doc/lispref/text.texi
index fc12939bec5..f7f9c716162 100644
--- a/doc/lispref/text.texi
+++ b/doc/lispref/text.texi
@@ -3145,6 +3145,12 @@ group is separately treated as described above.
3145When the variable @code{inhibit-point-motion-hooks} is non-@code{nil}, 3145When the variable @code{inhibit-point-motion-hooks} is non-@code{nil},
3146the @code{intangible} property is ignored. 3146the @code{intangible} property is ignored.
3147 3147
3148Beware: this property operates at a very low level, and affects a lot of code
3149in unexpected ways. So use it with extreme caution. A common misuse is to put
3150an intangible property on invisible text, which is actually unnecessary since
3151the command loop will move point outside of the invisible text at the end of
3152each command anyway. @xref{Adjusting Point}.
3153
3148@item field 3154@item field
3149@kindex field @r{(text property)} 3155@kindex field @r{(text property)}
3150Consecutive characters with the same @code{field} property constitute a 3156Consecutive characters with the same @code{field} property constitute a
diff --git a/doc/lispref/variables.texi b/doc/lispref/variables.texi
index 091765043e3..62f5092497a 100644
--- a/doc/lispref/variables.texi
+++ b/doc/lispref/variables.texi
@@ -1998,6 +1998,6 @@ This variable holds a list of all variables of type @code{DEFVAR_BOOL}.
1998Attempting to assign them any other value will result in an error: 1998Attempting to assign them any other value will result in an error:
1999 1999
2000@example 2000@example
2001(setq window-min-height 5.0) 2001(setq undo-limit 1000.0)
2002@error{} Wrong type argument: integerp, 5.0 2002@error{} Wrong type argument: integerp, 1000.0
2003@end example 2003@end example
diff --git a/doc/lispref/vol1.texi b/doc/lispref/vol1.texi
index 914ba5b1fd8..c89447fc139 100644
--- a/doc/lispref/vol1.texi
+++ b/doc/lispref/vol1.texi
@@ -44,7 +44,7 @@
44@end ifset 44@end ifset
45 45
46@c per rms and peterb, use 10pt fonts for the main text, mostly to 46@c per rms and peterb, use 10pt fonts for the main text, mostly to
47@c save on paper cost. 47@c save on paper cost.
48@c Do this inside @tex for now, so current makeinfo does not complain. 48@c Do this inside @tex for now, so current makeinfo does not complain.
49@tex 49@tex
50@ifset smallbook 50@ifset smallbook
@@ -1402,7 +1402,7 @@ Operating System Interface
1402* System Environment:: Distinguish the name and kind of system. 1402* System Environment:: Distinguish the name and kind of system.
1403* User Identification:: Finding the name and user id of the user. 1403* User Identification:: Finding the name and user id of the user.
1404* Time of Day:: Getting the current time. 1404* Time of Day:: Getting the current time.
1405* Time Conversion:: Converting a time from numeric form to 1405* Time Conversion:: Converting a time from numeric form to
1406 calendrical data and vice versa. 1406 calendrical data and vice versa.
1407* Time Parsing:: Converting a time from numeric form to text 1407* Time Parsing:: Converting a time from numeric form to text
1408 and vice versa. 1408 and vice versa.
@@ -1458,7 +1458,7 @@ Tips and Conventions
1458GNU Emacs Internals 1458GNU Emacs Internals
1459 1459
1460* Building Emacs:: How the dumped Emacs is made. 1460* Building Emacs:: How the dumped Emacs is made.
1461* Pure Storage:: A kludge to make preloaded Lisp functions sharable. 1461* Pure Storage:: Kludge to make preloaded Lisp functions shareable.
1462* Garbage Collection:: Reclaiming space for Lisp objects no longer used. 1462* Garbage Collection:: Reclaiming space for Lisp objects no longer used.
1463* Memory Usage:: Info about total size of Lisp objects made so far. 1463* Memory Usage:: Info about total size of Lisp objects made so far.
1464* Writing Emacs Primitives:: Writing C code for Emacs. 1464* Writing Emacs Primitives:: Writing C code for Emacs.
diff --git a/doc/lispref/vol2.texi b/doc/lispref/vol2.texi
index 1f84b267c9b..d45d23da365 100644
--- a/doc/lispref/vol2.texi
+++ b/doc/lispref/vol2.texi
@@ -1401,7 +1401,7 @@ Operating System Interface
1401* System Environment:: Distinguish the name and kind of system. 1401* System Environment:: Distinguish the name and kind of system.
1402* User Identification:: Finding the name and user id of the user. 1402* User Identification:: Finding the name and user id of the user.
1403* Time of Day:: Getting the current time. 1403* Time of Day:: Getting the current time.
1404* Time Conversion:: Converting a time from numeric form to 1404* Time Conversion:: Converting a time from numeric form to
1405 calendrical data and vice versa. 1405 calendrical data and vice versa.
1406* Time Parsing:: Converting a time from numeric form to text 1406* Time Parsing:: Converting a time from numeric form to text
1407 and vice versa. 1407 and vice versa.
@@ -1457,7 +1457,7 @@ Tips and Conventions
1457GNU Emacs Internals 1457GNU Emacs Internals
1458 1458
1459* Building Emacs:: How the dumped Emacs is made. 1459* Building Emacs:: How the dumped Emacs is made.
1460* Pure Storage:: A kludge to make preloaded Lisp functions sharable. 1460* Pure Storage:: Kludge to make preloaded Lisp functions shareable.
1461* Garbage Collection:: Reclaiming space for Lisp objects no longer used. 1461* Garbage Collection:: Reclaiming space for Lisp objects no longer used.
1462* Memory Usage:: Info about total size of Lisp objects made so far. 1462* Memory Usage:: Info about total size of Lisp objects made so far.
1463* Writing Emacs Primitives:: Writing C code for Emacs. 1463* Writing Emacs Primitives:: Writing C code for Emacs.
diff --git a/doc/lispref/windows.texi b/doc/lispref/windows.texi
index 437b6db8d58..df631158689 100644
--- a/doc/lispref/windows.texi
+++ b/doc/lispref/windows.texi
@@ -793,20 +793,20 @@ the new root window.
793 793
794@defopt window-combination-resize 794@defopt window-combination-resize
795If this variable is @code{nil}, @code{split-window} can only split a 795If this variable is @code{nil}, @code{split-window} can only split a
796window (denoted by @var{window}) if @var{window}'s screen area is 796window (denoted by @var{window}) if @var{window}'s screen area is large
797large enough to accommodate both itself and the new window. This is 797enough to accommodate both itself and the new window.
798the default. 798
799 799If this variable is @code{t}, @code{split-window} tries to resize all
800If this variable is non-@code{nil}, @code{split-window} tries to 800windows that are part of the same combination as @var{window}, in order
801resize all windows that are part of the same combination as 801to accommodate the new window. In particular, this may allow
802@var{window}, in order to accommodate the new window. In particular, 802@code{split-window} to succeed even if @var{window} is a fixed-size
803this may allow @code{split-window} to succeed even if @var{window} is 803window or too small to ordinarily split. Furthermore, subsequently
804a fixed-size window or too small to ordinarily split. Furthermore, 804resizing or deleting @var{window} may resize all other windows in its
805subsequently resizing or deleting @var{window} may resize all other 805combination.
806windows in its combination. 806
807 807The default is @code{nil}. Other values are reserved for future use.
808This variable has no effect if @code{window-combination-limit} is 808The value of this variable is ignored when
809non-@code{nil} (see below). 809@code{window-combination-limit} is non-@code{nil} (see below).
810@end defopt 810@end defopt
811 811
812 To illustrate the effect of @code{window-combination-resize}, 812 To illustrate the effect of @code{window-combination-resize},
@@ -857,9 +857,9 @@ If @code{window-combination-resize} is @code{nil}, splitting window
857@end smallexample 857@end smallexample
858 858
859@noindent 859@noindent
860If @code{window-combination-resize} is non-@code{nil}, splitting 860If @code{window-combination-resize} is @code{t}, splitting @code{W3}
861@code{W3} instead leaves all three live windows with approximately the 861instead leaves all three live windows with approximately the same
862same height: 862height:
863 863
864@smallexample 864@smallexample
865@group 865@group
diff --git a/doc/misc/ChangeLog b/doc/misc/ChangeLog
index f94153479a8..3b0e5251d5e 100644
--- a/doc/misc/ChangeLog
+++ b/doc/misc/ChangeLog
@@ -1,3 +1,18 @@
12011-12-28 Paul Eggert <eggert@cs.ucla.edu>
2
3 * gnus.texi (Mail Source Customization, Mail Back End Variables):
4 Use octal notation for file permissions, which are normally
5 thought of in octal.
6 (Mail Back End Variables): Use more-plausible modes in example.
7
82011-12-20 Alan Mackenzie <acm@muc.de>
9
10 * cc-mode.texi: Update version string 5.31 -> 5.32.
11
122011-12-06 Juanma Barranquero <lekktu@gmail.com>
13
14 * gnus-faq.texi (FAQ 2-1, FAQ 3-8, FAQ 4-14, FAQ 9-1): Fix typos.
15
12011-11-24 Glenn Morris <rgm@gnu.org> 162011-11-24 Glenn Morris <rgm@gnu.org>
2 17
3 * gnus.texi, smtpmail.texi: Fix case of "GnuTLS". 18 * gnus.texi, smtpmail.texi: Fix case of "GnuTLS".
diff --git a/doc/misc/auth.texi b/doc/misc/auth.texi
index b64562f6875..60bb6e7cdac 100644
--- a/doc/misc/auth.texi
+++ b/doc/misc/auth.texi
@@ -281,7 +281,7 @@ for any of the prompts.
281Note that the password needs to be evaluated if it's a function. It's 281Note that the password needs to be evaluated if it's a function. It's
282wrapped in a function to provide some security. 282wrapped in a function to provide some security.
283 283
284Later, after a successful login, @code{nnimal.el} calls the 284Later, after a successful login, @code{nnimap.el} calls the
285@code{:save-function} like so: 285@code{:save-function} like so:
286 286
287@example 287@example
diff --git a/doc/misc/calc.texi b/doc/misc/calc.texi
index 32311ff5c3e..d0c15c1940e 100644
--- a/doc/misc/calc.texi
+++ b/doc/misc/calc.texi
@@ -12878,7 +12878,7 @@ To declare specifically that @code{x} is real and non-zero,
12878use @samp{[[-inf .. 0), (0 .. inf]]}. (There is no way in the 12878use @samp{[[-inf .. 0), (0 .. inf]]}. (There is no way in the
12879current notation to say that @code{x} is nonzero but not necessarily 12879current notation to say that @code{x} is nonzero but not necessarily
12880real.) The @kbd{a e} command does ``unsafe'' simplifications, 12880real.) The @kbd{a e} command does ``unsafe'' simplifications,
12881including cancelling @samp{x} from the equation when @samp{x} is 12881including canceling @samp{x} from the equation when @samp{x} is
12882not known to be nonzero. 12882not known to be nonzero.
12883 12883
12884Another set of type symbols distinguish between scalars and vectors. 12884Another set of type symbols distinguish between scalars and vectors.
@@ -16873,7 +16873,7 @@ The @kbd{t U} (@code{calc-unix-time}) [@code{unixtime}] command
16873converts a date form into a Unix time value, which is the number of 16873converts a date form into a Unix time value, which is the number of
16874seconds since midnight on Jan 1, 1970, or vice-versa. The numeric result 16874seconds since midnight on Jan 1, 1970, or vice-versa. The numeric result
16875will be an integer if the current precision is 12 or less; for higher 16875will be an integer if the current precision is 12 or less; for higher
16876precisions, the result may be a float with (@var{precision}@minus{}12) 16876precision, the result may be a float with (@var{precision}@minus{}12)
16877digits after the decimal. Just as for @kbd{t J}, the numeric time 16877digits after the decimal. Just as for @kbd{t J}, the numeric time
16878is interpreted in the GMT time zone and the date form is interpreted 16878is interpreted in the GMT time zone and the date form is interpreted
16879in the current or specified zone. Some systems use Unix-like 16879in the current or specified zone. Some systems use Unix-like
@@ -16943,7 +16943,7 @@ from a date form as an integer in the range 0 to 59.
16943The @kbd{M-6 t P} [@code{second}] function extracts the second 16943The @kbd{M-6 t P} [@code{second}] function extracts the second
16944from a date form. If the current precision is 12 or less, 16944from a date form. If the current precision is 12 or less,
16945the result is an integer in the range 0 to 59. For higher 16945the result is an integer in the range 0 to 59. For higher
16946precisions, the result may instead be a floating-point number. 16946precision, the result may instead be a floating-point number.
16947 16947
16948@tindex weekday 16948@tindex weekday
16949The @kbd{M-7 t P} [@code{weekday}] function extracts the weekday 16949The @kbd{M-7 t P} [@code{weekday}] function extracts the weekday
@@ -18499,7 +18499,7 @@ counterparts, which are also available separately as @code{calc-sech}
18499Calc can compute a variety of less common functions that arise in 18499Calc can compute a variety of less common functions that arise in
18500various branches of mathematics. All of the functions described in 18500various branches of mathematics. All of the functions described in
18501this section allow arbitrary complex arguments and, except as noted, 18501this section allow arbitrary complex arguments and, except as noted,
18502will work to arbitrarily large precisions. They can not at present 18502will work to arbitrarily large precision. They can not at present
18503handle error forms or intervals as arguments. 18503handle error forms or intervals as arguments.
18504 18504
18505NOTE: These functions are still experimental. In particular, their 18505NOTE: These functions are still experimental. In particular, their
@@ -21903,7 +21903,7 @@ of our sample formula by selecting it and pressing @kbd{n}
21903@end smallexample 21903@end smallexample
21904 21904
21905Unselecting the sub-formula reveals that the minus sign, which would 21905Unselecting the sub-formula reveals that the minus sign, which would
21906normally have cancelled out with the subtraction automatically, has 21906normally have canceled out with the subtraction automatically, has
21907not been able to do so because the subtraction was not part of the 21907not been able to do so because the subtraction was not part of the
21908selected portion. Pressing @kbd{=} (@code{calc-evaluate}) or doing 21908selected portion. Pressing @kbd{=} (@code{calc-evaluate}) or doing
21909any other mathematical operation on the whole formula will cause it 21909any other mathematical operation on the whole formula will cause it
@@ -22590,7 +22590,7 @@ described for multiplication.
22590 22590
22591Quotients of products cancel only in the leading terms of the 22591Quotients of products cancel only in the leading terms of the
22592numerator and denominator. In other words, @expr{a x b / a y b} 22592numerator and denominator. In other words, @expr{a x b / a y b}
22593is cancelled to @expr{x b / y b} but not to @expr{x / y}. Once 22593is canceled to @expr{x b / y b} but not to @expr{x / y}. Once
22594again this is because full cancellation can be slow; use @kbd{a s} 22594again this is because full cancellation can be slow; use @kbd{a s}
22595to cancel all terms of the quotient. 22595to cancel all terms of the quotient.
22596 22596
@@ -22810,7 +22810,7 @@ the distributive law. For example, @expr{a x^2 b / c x^3 d} will
22810cancel @expr{x^2} from the top and bottom to get @expr{a b / c x d}. 22810cancel @expr{x^2} from the top and bottom to get @expr{a b / c x d}.
22811(The terms in the denominator will then be rearranged to @expr{c d x} 22811(The terms in the denominator will then be rearranged to @expr{c d x}
22812as described above.) If there is any common integer or fractional 22812as described above.) If there is any common integer or fractional
22813factor in the numerator and denominator, it is cancelled out; 22813factor in the numerator and denominator, it is canceled out;
22814for example, @expr{(4 x + 6) / 8 x} simplifies to @expr{(2 x + 3) / 4 x}. 22814for example, @expr{(4 x + 6) / 8 x} simplifies to @expr{(2 x + 3) / 4 x}.
22815 22815
22816Non-constant common factors are not found even by @kbd{a s}. To 22816Non-constant common factors are not found even by @kbd{a s}. To
@@ -22858,7 +22858,7 @@ example, @samp{(x - 23) % 10} is simplified to @samp{(x + 7) % 10}.
22858 22858
22859If the argument is multiplied by a constant, and this constant 22859If the argument is multiplied by a constant, and this constant
22860has a common integer divisor with the modulus, then this factor is 22860has a common integer divisor with the modulus, then this factor is
22861cancelled out. For example, @samp{12 x % 15} is changed to 22861canceled out. For example, @samp{12 x % 15} is changed to
22862@samp{3 (4 x % 5)} by factoring out 3. Also, @samp{(12 x + 1) % 15} 22862@samp{3 (4 x % 5)} by factoring out 3. Also, @samp{(12 x + 1) % 15}
22863is changed to @samp{3 ((4 x + 1:3) % 5)}. While these forms may 22863is changed to @samp{3 ((4 x + 1:3) % 5)}. While these forms may
22864not seem ``simpler,'' they allow Calc to discover useful information 22864not seem ``simpler,'' they allow Calc to discover useful information
@@ -22938,13 +22938,13 @@ function.
22938\bigskip 22938\bigskip
22939@end tex 22939@end tex
22940 22940
22941Equations and inequalities are simplified by cancelling factors 22941Equations and inequalities are simplified by canceling factors
22942of products, quotients, or sums on both sides. Inequalities 22942of products, quotients, or sums on both sides. Inequalities
22943change sign if a negative multiplicative factor is cancelled. 22943change sign if a negative multiplicative factor is canceled.
22944Non-constant multiplicative factors as in @expr{a b = a c} are 22944Non-constant multiplicative factors as in @expr{a b = a c} are
22945cancelled from equations only if they are provably nonzero (generally 22945canceled from equations only if they are provably nonzero (generally
22946because they were declared so; @pxref{Declarations}). Factors 22946because they were declared so; @pxref{Declarations}). Factors
22947are cancelled from inequalities only if they are nonzero and their 22947are canceled from inequalities only if they are nonzero and their
22948sign is known. 22948sign is known.
22949 22949
22950Simplification also replaces an equation or inequality with 22950Simplification also replaces an equation or inequality with
@@ -23035,9 +23035,9 @@ The simplifications of @expr{@tfn{ln}(@tfn{exp}(x))},
23035unsafe because of problems with principal values (although these 23035unsafe because of problems with principal values (although these
23036simplifications are safe if @expr{x} is known to be real). 23036simplifications are safe if @expr{x} is known to be real).
23037 23037
23038Common factors are cancelled from products on both sides of an 23038Common factors are canceled from products on both sides of an
23039equation, even if those factors may be zero: @expr{a x / b x} 23039equation, even if those factors may be zero: @expr{a x / b x}
23040to @expr{a / b}. Such factors are never cancelled from 23040to @expr{a / b}. Such factors are never canceled from
23041inequalities: Even @kbd{a e} is not bold enough to reduce 23041inequalities: Even @kbd{a e} is not bold enough to reduce
23042@expr{a x < b x} to @expr{a < b} (or @expr{a > b}, depending 23042@expr{a x < b x} to @expr{a < b} (or @expr{a > b}, depending
23043on whether you believe @expr{x} is positive or negative). 23043on whether you believe @expr{x} is positive or negative).
@@ -23071,7 +23071,7 @@ If units auto-ranging mode is enabled, products or quotients in
23071which the first argument is a number which is out of range for the 23071which the first argument is a number which is out of range for the
23072leading unit are modified accordingly. 23072leading unit are modified accordingly.
23073 23073
23074When cancelling and combining units in products and quotients, 23074When canceling and combining units in products and quotients,
23075Calc accounts for unit names that differ only in the prefix letter. 23075Calc accounts for unit names that differ only in the prefix letter.
23076For example, @samp{2 km m} is simplified to @samp{2000 m^2}. 23076For example, @samp{2 km m} is simplified to @samp{2000 m^2}.
23077However, compatible but different units like @code{ft} and @code{in} 23077However, compatible but different units like @code{ft} and @code{in}
diff --git a/doc/misc/cc-mode.texi b/doc/misc/cc-mode.texi
index d5f403e5cdb..8b589259a48 100644
--- a/doc/misc/cc-mode.texi
+++ b/doc/misc/cc-mode.texi
@@ -190,7 +190,7 @@ developing GNU and promoting software freedom.''
190@titlepage 190@titlepage
191@sp 10 191@sp 10
192 192
193@center @titlefont{CC Mode 5.31} 193@center @titlefont{CC Mode 5.32}
194@sp 2 194@sp 2
195@center @subtitlefont{A GNU Emacs mode for editing C and C-like languages} 195@center @subtitlefont{A GNU Emacs mode for editing C and C-like languages}
196@sp 2 196@sp 2
@@ -378,7 +378,7 @@ was added in version 5.30.
378 378
379This manual describes @ccmode{} 379This manual describes @ccmode{}
380@comment The following line must appear on its own, so that the 380@comment The following line must appear on its own, so that the
381version 5.31. 381version 5.32.
382@comment Release.py script can update the version number automatically 382@comment Release.py script can update the version number automatically
383 383
384@ccmode{} supports the editing of K&R and ANSI C, C++, Objective-C, 384@ccmode{} supports the editing of K&R and ANSI C, C++, Objective-C,
@@ -2160,7 +2160,7 @@ A space between the function name and opening parenthesis when calling
2160a user function. The last character of the function name and the 2160a user function. The last character of the function name and the
2161opening parenthesis are highlighted. This font-locking rule will 2161opening parenthesis are highlighted. This font-locking rule will
2162spuriously highlight a valid concatenation expression where an 2162spuriously highlight a valid concatenation expression where an
2163identifier precedes a parenthesised expression. Unfortunately. 2163identifier precedes a parenthesized expression. Unfortunately.
2164 2164
2165@item 2165@item
2166Whitespace following the @samp{\} in what otherwise looks like an 2166Whitespace following the @samp{\} in what otherwise looks like an
diff --git a/doc/misc/dbus.texi b/doc/misc/dbus.texi
index 88b068ccd5b..f515109bf76 100644
--- a/doc/misc/dbus.texi
+++ b/doc/misc/dbus.texi
@@ -1677,7 +1677,7 @@ Establish the connection to D-Bus @var{bus}.
1677 1677
1678@var{bus} can be either the symbol @code{:system} or the symbol 1678@var{bus} can be either the symbol @code{:system} or the symbol
1679@code{:session}, or it can be a string denoting the address of the 1679@code{:session}, or it can be a string denoting the address of the
1680corresponding bus. For the system and session busses, this function 1680corresponding bus. For the system and session buses, this function
1681is called when loading @file{dbus.el}, there is no need to call it 1681is called when loading @file{dbus.el}, there is no need to call it
1682again. 1682again.
1683 1683
@@ -1816,7 +1816,7 @@ handled by a hook function.
1816@defvar dbus-event-error-hooks 1816@defvar dbus-event-error-hooks
1817This hook variable keeps a list of functions, which are called when a 1817This hook variable keeps a list of functions, which are called when a
1818D-Bus error happens in the event handler. Every function must accept 1818D-Bus error happens in the event handler. Every function must accept
1819two arguments, the event and the error variable catched in 1819two arguments, the event and the error variable caught in
1820@code{condition-case} by @code{dbus-error}. 1820@code{condition-case} by @code{dbus-error}.
1821 1821
1822Such functions can be used the adapt the error signal to be raised. 1822Such functions can be used the adapt the error signal to be raised.
diff --git a/doc/misc/ebrowse.texi b/doc/misc/ebrowse.texi
index 19ee9705484..a2a4017eb64 100644
--- a/doc/misc/ebrowse.texi
+++ b/doc/misc/ebrowse.texi
@@ -482,7 +482,7 @@ name.
482@table @kbd 482@table @kbd
483@item SPC 483@item SPC
484This command views the class declaration if the database 484This command views the class declaration if the database
485contains informations about it. If you don't parse the entire source 485contains information about it. If you don't parse the entire source
486you are working on, some classes will only be known to exist but the 486you are working on, some classes will only be known to exist but the
487location of their declarations and definitions will not be known.@refill 487location of their declarations and definitions will not be known.@refill
488 488
diff --git a/doc/misc/ede.texi b/doc/misc/ede.texi
index cc566086f44..2b2a6a21b7f 100644
--- a/doc/misc/ede.texi
+++ b/doc/misc/ede.texi
@@ -705,11 +705,11 @@ A brief description of the project or target. This is currently used
705by the @samp{ede-speedbar} interface. 705by the @samp{ede-speedbar} interface.
706@item ede-want-file-p 706@item ede-want-file-p
707Return non-nil if a target will accept a given file. 707Return non-nil if a target will accept a given file.
708It is generally unecessary to override this. See the section on source 708It is generally unnecessary to override this. See the section on source
709code. 709code.
710@item ede-buffer-mine 710@item ede-buffer-mine
711Return non-nil if a buffer belongs to this target. Used during 711Return non-nil if a buffer belongs to this target. Used during
712association when a file is loaded. It is generally unecessary to 712association when a file is loaded. It is generally unnecessary to
713override this unless you keep auxiliary files. 713override this unless you keep auxiliary files.
714@end table 714@end table
715 715
@@ -2483,7 +2483,7 @@ Create the make rule needed to create an archive for @var{THIS}.
2483 2483
2484@deffn Method ede-proj-makefile-insert-source-variables :PRIMARY this 2484@deffn Method ede-proj-makefile-insert-source-variables :PRIMARY this
2485Insert bin_PROGRAMS variables needed by target @var{THIS}. 2485Insert bin_PROGRAMS variables needed by target @var{THIS}.
2486We aren't acutally inserting SOURCE details, but this is used by the 2486We aren't actually inserting SOURCE details, but this is used by the
2487Makefile.am generator, so use it to add this important bin program. 2487Makefile.am generator, so use it to add this important bin program.
2488@end deffn 2488@end deffn
2489 2489
@@ -2624,7 +2624,7 @@ Return the name of the main target for @var{THIS} target.
2624 2624
2625@deffn Method ede-proj-makefile-insert-automake-pre-variables :AFTER this 2625@deffn Method ede-proj-makefile-insert-automake-pre-variables :AFTER this
2626Insert bin_PROGRAMS variables needed by target @var{THIS}. 2626Insert bin_PROGRAMS variables needed by target @var{THIS}.
2627We aren't acutally inserting SOURCE details, but this is used by the 2627We aren't actually inserting SOURCE details, but this is used by the
2628Makefile.am generator, so use it to add this important bin program. 2628Makefile.am generator, so use it to add this important bin program.
2629@end deffn 2629@end deffn
2630 2630
diff --git a/doc/misc/emacs-mime.texi b/doc/misc/emacs-mime.texi
index c44cc1c9b09..91440dcfe8f 100644
--- a/doc/misc/emacs-mime.texi
+++ b/doc/misc/emacs-mime.texi
@@ -417,7 +417,7 @@ called with a @acronym{MIME} handle as the argument.
417@vindex mm-inline-text-html-with-images 417@vindex mm-inline-text-html-with-images
418Some @acronym{HTML} mails might have the trick of spammers using 418Some @acronym{HTML} mails might have the trick of spammers using
419@samp{<img>} tags. It is likely to be intended to verify whether you 419@samp{<img>} tags. It is likely to be intended to verify whether you
420have read the mail. You can prevent your personal informations from 420have read the mail. You can prevent your personal information from
421leaking by setting this option to @code{nil} (which is the default). 421leaking by setting this option to @code{nil} (which is the default).
422It is currently ignored by Emacs/w3. For emacs-w3m, you may use the 422It is currently ignored by Emacs/w3. For emacs-w3m, you may use the
423command @kbd{t} on the image anchor to show an image even if it is 423command @kbd{t} on the image anchor to show an image even if it is
diff --git a/doc/misc/eshell.texi b/doc/misc/eshell.texi
index b0090f0fb84..7c178757927 100644
--- a/doc/misc/eshell.texi
+++ b/doc/misc/eshell.texi
@@ -608,7 +608,7 @@ scrolls back.
608 608
609@item Using C-p and C-n with rebind gets into a locked state 609@item Using C-p and C-n with rebind gets into a locked state
610 610
611This happened a few times in Emacs 21, but has been unreproducible 611This happened a few times in Emacs 21, but has been irreproducible
612since. 612since.
613 613
614@item If an interactive process is currently running, @kbd{M-!} doesn't work 614@item If an interactive process is currently running, @kbd{M-!} doesn't work
diff --git a/doc/misc/gnus-faq.texi b/doc/misc/gnus-faq.texi
index b5bb75f7284..7bd3e4ac7fa 100644
--- a/doc/misc/gnus-faq.texi
+++ b/doc/misc/gnus-faq.texi
@@ -266,9 +266,9 @@ and how to prevent it?
266@subsubheading Answer 266@subsubheading Answer
267 267
268This message means that the last time you used Gnus, it 268This message means that the last time you used Gnus, it
269wasn't properly exited and therefor couldn't write its 269wasn't properly exited and therefore couldn't write its
270informations to disk (e.g. which messages you read), you 270information to disk (e.g. which messages you read), you
271are now asked if you want to restore those informations 271are now asked if you want to restore that information
272from the auto-save file. 272from the auto-save file.
273 273
274To prevent this message make sure you exit Gnus 274To prevent this message make sure you exit Gnus
@@ -563,7 +563,7 @@ However, the first thing to do is to tell Gnus in which way
563it should store the mail, in Gnus terminology which back end 563it should store the mail, in Gnus terminology which back end
564to use. Gnus supports many different back ends, the most 564to use. Gnus supports many different back ends, the most
565commonly used one is nnml. It stores every mail in one file 565commonly used one is nnml. It stores every mail in one file
566and is therefor quite fast. However you might prefer a one 566and is therefore quite fast. However you might prefer a one
567file per group approach if your file system has problems with 567file per group approach if your file system has problems with
568many small files, the nnfolder back end is then probably the 568many small files, the nnfolder back end is then probably the
569choice for you. To use nnml add the following to ~/.gnus.el: 569choice for you. To use nnml add the following to ~/.gnus.el:
@@ -580,7 +580,7 @@ As you might have guessed, if you want nnfolder, it's
580@end example 580@end example
581@noindent 581@noindent
582 582
583Now we need to tell Gnus, where to get it's mail from. If 583Now we need to tell Gnus, where to get its mail from. If
584it's a POP3 server, then you need something like this: 584it's a POP3 server, then you need something like this:
585 585
586@example 586@example
@@ -1104,11 +1104,11 @@ I don't like the way the Summary buffer looks, how to tweak it?
1104@subsubheading Answer 1104@subsubheading Answer
1105 1105
1106You've got to play around with the variable 1106You've got to play around with the variable
1107gnus-summary-line-format. It's value is a string of 1107gnus-summary-line-format. Its value is a string of
1108symbols which stand for things like author, date, subject 1108symbols which stand for things like author, date, subject
1109etc. A list of the available specifiers can be found in the 1109etc. A list of the available specifiers can be found in the
1110manual node "Summary Buffer Lines" and the often forgotten 1110manual node "Summary Buffer Lines" and the often forgotten
1111node "Formatting Variables" and it's sub-nodes. There 1111node "Formatting Variables" and its sub-nodes. There
1112you'll find useful things like positioning the cursor and 1112you'll find useful things like positioning the cursor and
1113tabulators which allow you a summary in table form, but 1113tabulators which allow you a summary in table form, but
1114sadly hard tabulators are broken in 5.8.8. 1114sadly hard tabulators are broken in 5.8.8.
@@ -1838,7 +1838,7 @@ inconvenient since you are not displaying the found mail
1838in Gnus. Here comes nnir into action. Nnir is a front end 1838in Gnus. Here comes nnir into action. Nnir is a front end
1839to search engines like swish-e or swish++ and 1839to search engines like swish-e or swish++ and
1840others. You index your mail with one of those search 1840others. You index your mail with one of those search
1841engines and with the help of nnir you can search trough 1841engines and with the help of nnir you can search through
1842the indexed mail and generate a temporary group with all 1842the indexed mail and generate a temporary group with all
1843messages which met your search criteria. If this sound 1843messages which met your search criteria. If this sound
1844cool to you get nnir.el from 1844cool to you get nnir.el from
@@ -2190,7 +2190,7 @@ Starting Gnus is really slow, how to speed it up?
2190 2190
2191@subsubheading Answer 2191@subsubheading Answer
2192 2192
2193The reason for this could be the way Gnus reads it's 2193The reason for this could be the way Gnus reads its
2194active file, see the node "The Active File" in the Gnus 2194active file, see the node "The Active File" in the Gnus
2195manual for things you might try to speed the process up. 2195manual for things you might try to speed the process up.
2196An other idea would be to byte compile your ~/.gnus.el (say 2196An other idea would be to byte compile your ~/.gnus.el (say
diff --git a/doc/misc/gnus.texi b/doc/misc/gnus.texi
index 69b17a94d68..86aaadf8ae8 100644
--- a/doc/misc/gnus.texi
+++ b/doc/misc/gnus.texi
@@ -4622,7 +4622,7 @@ Sieve is a server-side mail filtering language. In Gnus you can use
4622the @code{sieve} group parameter (@pxref{Group Parameters}) to specify 4622the @code{sieve} group parameter (@pxref{Group Parameters}) to specify
4623sieve rules that should apply to each group. Gnus provides two 4623sieve rules that should apply to each group. Gnus provides two
4624commands to translate all these group parameters into a proper Sieve 4624commands to translate all these group parameters into a proper Sieve
4625script that can be transfered to the server somehow. 4625script that can be transferred to the server somehow.
4626 4626
4627@vindex gnus-sieve-file 4627@vindex gnus-sieve-file
4628@vindex gnus-sieve-region-start 4628@vindex gnus-sieve-region-start
@@ -8332,7 +8332,7 @@ Files with name matching this regular expression won't be viewed.
8332Files with a @acronym{MIME} type matching this variable won't be viewed. 8332Files with a @acronym{MIME} type matching this variable won't be viewed.
8333Note that Gnus tries to guess what type the file is based on the name. 8333Note that Gnus tries to guess what type the file is based on the name.
8334@code{gnus-uu} is not a @acronym{MIME} package (yet), so this is slightly 8334@code{gnus-uu} is not a @acronym{MIME} package (yet), so this is slightly
8335kludgey. 8335kludgy.
8336 8336
8337@item gnus-uu-tmp-dir 8337@item gnus-uu-tmp-dir
8338@vindex gnus-uu-tmp-dir 8338@vindex gnus-uu-tmp-dir
@@ -8976,7 +8976,7 @@ Translate many non-@acronym{ASCII} characters into their
8976@acronym{ASCII} equivalents (@code{gnus-article-treat-non-ascii}). 8976@acronym{ASCII} equivalents (@code{gnus-article-treat-non-ascii}).
8977This is mostly useful if you're on a terminal that has a limited font 8977This is mostly useful if you're on a terminal that has a limited font
8978and doesn't show accented characters, ``advanced'' punctuation, and the 8978and doesn't show accented characters, ``advanced'' punctuation, and the
8979like. For instance, @samp{»} is tranlated into @samp{>>}, and so on. 8979like. For instance, @samp{»} is translated into @samp{>>}, and so on.
8980 8980
8981@item W Y f 8981@item W Y f
8982@kindex W Y f (Summary) 8982@kindex W Y f (Summary)
@@ -11634,7 +11634,7 @@ message/external-body @acronym{MIME} type.
11634@item r (Article) 11634@item r (Article)
11635@kindex r (Article) 11635@kindex r (Article)
11636Prompt for a file name, replace the @acronym{MIME} object with an 11636Prompt for a file name, replace the @acronym{MIME} object with an
11637external body refering to the file via the message/external-body 11637external body referring to the file via the message/external-body
11638@acronym{MIME} type. (@code{gnus-mime-replace-part}). 11638@acronym{MIME} type. (@code{gnus-mime-replace-part}).
11639 11639
11640@findex gnus-mime-delete-part 11640@findex gnus-mime-delete-part
@@ -15033,7 +15033,7 @@ number.
15033 15033
15034@item mail-source-default-file-modes 15034@item mail-source-default-file-modes
15035@vindex mail-source-default-file-modes 15035@vindex mail-source-default-file-modes
15036All new mail files will get this file mode. The default is 384. 15036All new mail files will get this file mode. The default is @code{#o600}.
15037 15037
15038@item mail-source-movemail-program 15038@item mail-source-movemail-program
15039@vindex mail-source-movemail-program 15039@vindex mail-source-movemail-program
@@ -15123,10 +15123,10 @@ default file modes the new mail files get:
15123 15123
15124@lisp 15124@lisp
15125(add-hook 'nnmail-pre-get-new-mail-hook 15125(add-hook 'nnmail-pre-get-new-mail-hook
15126 (lambda () (set-default-file-modes 511))) 15126 (lambda () (set-default-file-modes #o700)))
15127 15127
15128(add-hook 'nnmail-post-get-new-mail-hook 15128(add-hook 'nnmail-post-get-new-mail-hook
15129 (lambda () (set-default-file-modes 551))) 15129 (lambda () (set-default-file-modes #o775)))
15130@end lisp 15130@end lisp
15131 15131
15132@item nnmail-use-long-file-names 15132@item nnmail-use-long-file-names
@@ -30012,7 +30012,7 @@ this:
30012@node Score File Syntax 30012@node Score File Syntax
30013@subsection Score File Syntax 30013@subsection Score File Syntax
30014 30014
30015Score files are meant to be easily parseable, but yet extremely 30015Score files are meant to be easily parsable, but yet extremely
30016malleable. It was decided that something that had the same read syntax 30016malleable. It was decided that something that had the same read syntax
30017as an Emacs Lisp list would fit that spec. 30017as an Emacs Lisp list would fit that spec.
30018 30018
diff --git a/doc/misc/idlwave.texi b/doc/misc/idlwave.texi
index 3e13dbb0f23..c7495d8cc93 100644
--- a/doc/misc/idlwave.texi
+++ b/doc/misc/idlwave.texi
@@ -669,7 +669,7 @@ We have already used the routine info display in the first part of this
669tutorial. This was the invoked using @kbd{C-c ?}, and displays 669tutorial. This was the invoked using @kbd{C-c ?}, and displays
670information about the IDL routine near the cursor position. Wouldn't it 670information about the IDL routine near the cursor position. Wouldn't it
671be nice to have the same kind of information available for your own 671be nice to have the same kind of information available for your own
672routines and for the huge amount of code in major libraries like JHUPL 672routines and for the huge amount of code in major libraries like JHUAPL
673or the IDL-Astro library? In many cases, you may already have this 673or the IDL-Astro library? In many cases, you may already have this
674information. Files named @file{.idlwave_catalog} in library directories 674information. Files named @file{.idlwave_catalog} in library directories
675contain scanned information on the routines in that directory; many 675contain scanned information on the routines in that directory; many
@@ -1580,8 +1580,8 @@ available will be emphasized (e.g. colored blue). For other items, the
1580corresponding source code or DocLib header will be used as the help 1580corresponding source code or DocLib header will be used as the help
1581text. 1581text.
1582 1582
1583@cindex Completion, cancelling 1583@cindex Completion, canceling
1584@cindex Cancelling completion 1584@cindex Canceling completion
1585Completion is not a blocking operation --- you are free to continue 1585Completion is not a blocking operation --- you are free to continue
1586editing, enter commands, or simply ignore the @file{*Completions*} 1586editing, enter commands, or simply ignore the @file{*Completions*}
1587buffer during a completion operation. If, however, the most recent 1587buffer during a completion operation. If, however, the most recent
diff --git a/doc/misc/message.texi b/doc/misc/message.texi
index d9062a32572..774bf180266 100644
--- a/doc/misc/message.texi
+++ b/doc/misc/message.texi
@@ -1974,7 +1974,7 @@ that look like:
1974Hallvard B Furuseth <h.b.furuseth@@usit.uio.no> writes: 1974Hallvard B Furuseth <h.b.furuseth@@usit.uio.no> writes:
1975@end example 1975@end example
1976 1976
1977@c FIXME: Add `message-insert-formated-citation-line' and 1977@c FIXME: Add `message-insert-formatted-citation-line' and
1978@c `message-citation-line-format' 1978@c `message-citation-line-format'
1979 1979
1980Point will be at the beginning of the body of the message when this 1980Point will be at the beginning of the body of the message when this
diff --git a/doc/misc/org.texi b/doc/misc/org.texi
index 181e00f8e02..adc9cf0b139 100644
--- a/doc/misc/org.texi
+++ b/doc/misc/org.texi
@@ -11399,16 +11399,16 @@ a file is retrieved with @code{org-publish-find-date}.
11399@tab Should sorting be case-sensitive? Default @code{nil}. 11399@tab Should sorting be case-sensitive? Default @code{nil}.
11400 11400
11401@item @code{:sitemap-file-entry-format} 11401@item @code{:sitemap-file-entry-format}
11402@tab With this option one can tell how a sitemap's entry is formated in the 11402@tab With this option one can tell how a sitemap's entry is formatted in the
11403sitemap. This is a format string with some escape sequences: @code{%t} stands 11403sitemap. This is a format string with some escape sequences: @code{%t} stands
11404for the title of the file, @code{%a} stands for the author of the file and 11404for the title of the file, @code{%a} stands for the author of the file and
11405@code{%d} stands for the date of the file. The date is retrieved with the 11405@code{%d} stands for the date of the file. The date is retrieved with the
11406@code{org-publish-find-date} function and formated with 11406@code{org-publish-find-date} function and formatted with
11407@code{org-publish-sitemap-date-format}. Default @code{%t}. 11407@code{org-publish-sitemap-date-format}. Default @code{%t}.
11408 11408
11409@item @code{:sitemap-date-format} 11409@item @code{:sitemap-date-format}
11410@tab Format string for the @code{format-time-string} function that tells how 11410@tab Format string for the @code{format-time-string} function that tells how
11411a sitemap entry's date is to be formated. This property bypasses 11411a sitemap entry's date is to be formatted. This property bypasses
11412@code{org-publish-sitemap-date-format} which defaults to @code{%Y-%m-%d}. 11412@code{org-publish-sitemap-date-format} which defaults to @code{%Y-%m-%d}.
11413 11413
11414@item @code{:sitemap-sans-extension} 11414@item @code{:sitemap-sans-extension}
@@ -12469,7 +12469,7 @@ block. E.g., @code{:results value html}.
12469Results assumed to be LaTeX and are enclosed in a @code{begin_latex} block. 12469Results assumed to be LaTeX and are enclosed in a @code{begin_latex} block.
12470E.g., @code{:results value latex}. 12470E.g., @code{:results value latex}.
12471@item @code{code} 12471@item @code{code}
12472Result are assumed to be parseable code and are enclosed in a code block. 12472Result are assumed to be parsable code and are enclosed in a code block.
12473E.g., @code{:results value code}. 12473E.g., @code{:results value code}.
12474@item @code{pp} 12474@item @code{pp}
12475The result is converted to pretty-printed code and is enclosed in a code 12475The result is converted to pretty-printed code and is enclosed in a code
diff --git a/doc/misc/rcirc.texi b/doc/misc/rcirc.texi
index 3e9ee928822..192afe33cb4 100644
--- a/doc/misc/rcirc.texi
+++ b/doc/misc/rcirc.texi
@@ -524,7 +524,7 @@ your full name, you might want to set it to some pseudonym.
524 524
525@item rcirc-authinfo 525@item rcirc-authinfo
526@vindex rcirc-authinfo 526@vindex rcirc-authinfo
527@cindex authentification 527@cindex authentication
528@cindex identification 528@cindex identification
529@cindex nickserv 529@cindex nickserv
530@cindex login 530@cindex login
@@ -547,7 +547,7 @@ And here are the valid method symbols and the arguments they require:
547 547
548@table @code 548@table @code
549@item nickserv 549@item nickserv
550@cindex nickserv authentification 550@cindex nickserv authentication
551Use this symbol if you need to identify yourself as follows when 551Use this symbol if you need to identify yourself as follows when
552connecting to a network: @code{/msg nickserv identify secret}. The 552connecting to a network: @code{/msg nickserv identify secret}. The
553necessary arguments are the nickname you want to use this for, and the 553necessary arguments are the nickname you want to use this for, and the
@@ -558,7 +558,7 @@ pick a password for it. Contact @code{nickserv} and check out the
558details. (Using @code{/msg nickserv help}, for example.) 558details. (Using @code{/msg nickserv help}, for example.)
559 559
560@item chanserv 560@item chanserv
561@cindex chanserv authentification 561@cindex chanserv authentication
562Use this symbol if you need to identify yourself as follows if you want 562Use this symbol if you need to identify yourself as follows if you want
563to join a particular channel: @code{/msg chanserv identify #underground 563to join a particular channel: @code{/msg chanserv identify #underground
564secret}. The necessary arguments are the nickname and channel you want 564secret}. The necessary arguments are the nickname and channel you want
@@ -569,7 +569,7 @@ the password to use. Contact @code{chanserv} and check out the details.
569(Using @code{/msg chanserv help}, for example.) 569(Using @code{/msg chanserv help}, for example.)
570 570
571@item bitlbee 571@item bitlbee
572@cindex bitlbee authentification 572@cindex bitlbee authentication
573Use this symbol if you need to identify yourself in the Bitlbee channel 573Use this symbol if you need to identify yourself in the Bitlbee channel
574as follows: @code{identify secret}. The necessary arguments are the 574as follows: @code{identify secret}. The necessary arguments are the
575nickname you want to use this for, and the password to use. 575nickname you want to use this for, and the password to use.
@@ -585,7 +585,7 @@ Bitlbee acts like an IRC server, but in fact it is a gateway to a lot of
585other instant messaging services. You can either install Bitlbee 585other instant messaging services. You can either install Bitlbee
586locally or use a public Bitlbee server. There, you need to create an 586locally or use a public Bitlbee server. There, you need to create an
587account with a password. This is the nick and password you need to 587account with a password. This is the nick and password you need to
588provide for the bitlbee authentification method. 588provide for the bitlbee authentication method.
589 589
590Later, you will tell Bitlbee about your accounts and passwords on all 590Later, you will tell Bitlbee about your accounts and passwords on all
591the other instant messaging services, and Bitlbee will log you in. All 591the other instant messaging services, and Bitlbee will log you in. All
diff --git a/doc/misc/semantic.texi b/doc/misc/semantic.texi
index dcfff1fcb96..8c56d2dc9f8 100644
--- a/doc/misc/semantic.texi
+++ b/doc/misc/semantic.texi
@@ -380,7 +380,7 @@ with the search results format.
380 380
381@item semanticdb-ref.el 381@item semanticdb-ref.el
382Tracks crossreferences. Cross references are needed when buffer is 382Tracks crossreferences. Cross references are needed when buffer is
383reparsed, and must alert other tables that any dependant caches may 383reparsed, and must alert other tables that any dependent caches may
384need to be flushed. References are in the form of include files. 384need to be flushed. References are in the form of include files.
385 385
386@end table 386@end table
diff --git a/doc/misc/tramp.texi b/doc/misc/tramp.texi
index f7f340074a2..1cea074fa2b 100644
--- a/doc/misc/tramp.texi
+++ b/doc/misc/tramp.texi
@@ -528,8 +528,8 @@ differ.
528@cindex methods, inline 528@cindex methods, inline
529@cindex methods, external 529@cindex methods, external
530Loading or saving a remote file requires that the content of the file 530Loading or saving a remote file requires that the content of the file
531be transfered between the two machines. The content of the file can 531be transferred between the two machines. The content of the file can
532be transfered using one of two methods: the @dfn{inline method} over 532be transferred using one of two methods: the @dfn{inline method} over
533the same connection used to log in to the remote machine, or the 533the same connection used to log in to the remote machine, or the
534@dfn{external method} through another connection using a remote copy 534@dfn{external method} through another connection using a remote copy
535program such as @command{rcp}, @command{scp} or @command{rsync}. 535program such as @command{rcp}, @command{scp} or @command{rsync}.
@@ -3704,4 +3704,4 @@ for @value{emacsothername}.
3704@c host and then send commands to it. 3704@c host and then send commands to it.
3705@c * Use `filename' resp. `file name' consistently. 3705@c * Use `filename' resp. `file name' consistently.
3706@c * Use `host' resp. `machine' consistently. 3706@c * Use `host' resp. `machine' consistently.
3707@c * Consistent small or capitalized words especially in menues. 3707@c * Consistent small or capitalized words especially in menus.
diff --git a/etc/ChangeLog b/etc/ChangeLog
index 64479f7987f..758025c6c3e 100644
--- a/etc/ChangeLog
+++ b/etc/ChangeLog
@@ -1,3 +1,8 @@
12011-12-10 Lars Magne Ingebrigtsen <larsi@gnus.org>
2
3 * NEWS: Mention auth-source twice in connection with smtpmail to
4 clarify that smtpmail uses auth-source.
5
12011-11-20 Bill Wohler <wohler@newt.com> 62011-11-20 Bill Wohler <wohler@newt.com>
2 7
3 Release MH-E version 8.3.1. 8 Release MH-E version 8.3.1.
diff --git a/etc/MH-E-NEWS b/etc/MH-E-NEWS
index f02b795a6b9..8b96d08c17a 100644
--- a/etc/MH-E-NEWS
+++ b/etc/MH-E-NEWS
@@ -39,6 +39,16 @@ addition of "trunk."
39The `mh-showing-mode' variable is now defined with `define-minor-mode' 39The `mh-showing-mode' variable is now defined with `define-minor-mode'
40(closes SF #482666). 40(closes SF #482666).
41 41
42*** Desktop fails to restore MH-Folder buffers
43
44When restoring MH folders from ".emacs.desktop", Emacs now opens them in
45the expected `mh-folder' mode instead of `dired-mode' (closes SF #1510145)
46
47*** *MH-E Log* buffer can point to removed directory
48This was caused by using `set-buffer' instead of
49`with-current-buffer.' This has been fixed thanks to Stefan Monnier
50(closes SF #1903293).
51
42 52
43 53
44* Changes in MH-E 8.2 54* Changes in MH-E 8.2
diff --git a/etc/NEWS b/etc/NEWS
index fe481c4ed8f..f37f562ec82 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -97,10 +97,10 @@ and also when HOME is set to C:\ by default.
97** Completion 97** Completion
98 98
99*** shell-mode uses pcomplete rules, with the standard completion UI. 99*** shell-mode uses pcomplete rules, with the standard completion UI.
100 100+++
101*** Many packages have been changed to use `completion-at-point' 101*** Many packages have been changed to use `completion-at-point'
102rather than their own completion code. 102rather than their own completion code.
103 103+++
104*** `completion-at-point' now handles tags and semantic completion. 104*** `completion-at-point' now handles tags and semantic completion.
105--- 105---
106*** Completion in a non-minibuffer now tries to detect the end of completion 106*** Completion in a non-minibuffer now tries to detect the end of completion
@@ -133,7 +133,10 @@ That variable used to have the default value "~/.authinfo", in which
133case you won't see any difference. But if you changed it to be a list 133case you won't see any difference. But if you changed it to be a list
134of user names and passwords, that setting is now ignored; you will be 134of user names and passwords, that setting is now ignored; you will be
135prompted for the user name and the password, which will then be saved 135prompted for the user name and the password, which will then be saved
136to ~/.authinfo. 136to ~/.authinfo. (To control where and how the credentials are stored,
137see the auth-source manual. You may want to change the auth-source
138preferences if you want to store the credentials encrypted, for
139instance.)
137 140
138You can also manually copy the credentials to your ~/.authinfo file. 141You can also manually copy the credentials to your ~/.authinfo file.
139For example, if you had 142For example, if you had
@@ -545,7 +548,7 @@ the lines in the current rectangle. With a prefix argument, this
545prompts for a number to count from and for a format string. 548prompts for a number to count from and for a format string.
546 549
547+++ 550+++
548** The default value of redisplay-dont-change is now t 551** The default value of redisplay-dont-pause is now t
549This makes Emacs feel more responsive to editing commands that arrive 552This makes Emacs feel more responsive to editing commands that arrive
550at high rate, e.g. if you lean on some key, because stopping redisplay 553at high rate, e.g. if you lean on some key, because stopping redisplay
551in the middle (when this variable is nil) forces more expensive 554in the middle (when this variable is nil) forces more expensive
@@ -567,6 +570,7 @@ region (or with the left margin if there is no previous line).
567** browse-url has a new variable `browse-url-mailto-function' 570** browse-url has a new variable `browse-url-mailto-function'
568specifies how mailto: URLs are handled. The default is `browse-url-mail'. 571specifies how mailto: URLs are handled. The default is `browse-url-mail'.
569 572
573---
570** BibTeX mode 574** BibTeX mode
571 575
572*** BibTeX mode now supports biblatex. 576*** BibTeX mode now supports biblatex.
@@ -622,7 +626,7 @@ view-diary-entries, list-diary-entries, show-all-diary-entries
622** comint and modes derived from it use the generic completion code. 626** comint and modes derived from it use the generic completion code.
623 627
624** Compilation mode 628** Compilation mode
625 629---
626*** Compilation mode can be used without font-lock-mode. 630*** Compilation mode can be used without font-lock-mode.
627`compilation-parse-errors-function' is now obsolete. 631`compilation-parse-errors-function' is now obsolete.
628 632
@@ -661,7 +665,7 @@ The new function dbus-register-service registers a service known name
661on a D-Bus without simultaneously registering a property or a method. 665on a D-Bus without simultaneously registering a property or a method.
662 666
663** Dired-x 667** Dired-x
664 668---
665*** dired-jump and dired-jump-other-window called with a prefix argument 669*** dired-jump and dired-jump-other-window called with a prefix argument
666read a file name from the minibuffer instead of using buffer-file-name. 670read a file name from the minibuffer instead of using buffer-file-name.
667 671
@@ -829,25 +833,29 @@ controlling the degree of parallelism.
829 833
830** VC and related modes 834** VC and related modes
831 835
836+++
832*** Support for pulling on distributed version control systems. 837*** Support for pulling on distributed version control systems.
833The vc-pull command runs a "pull" operation, if it is supported. 838`C-x v +' (`vc-pull') runs a "pull" operation, if it is supported, to
834This updates the current branch from upstream. A prefix argument 839update the current branch and working tree. A prefix argument means
835means to prompt the user for specifics, e.g. a pull location. 840to prompt the user for specifics, e.g. a pull location.
836 841
837**** `vc-update' is now an alias for `vc-pull'. 842**** `vc-update' is now an alias for `vc-pull'.
838 843
839**** Currently supported by Bzr, Git, and Mercurial. 844**** Currently supported by Bzr, Git, and Mercurial.
840 845
846+++
841*** Support for merging on distributed version control systems. 847*** Support for merging on distributed version control systems.
842The vc-merge command now runs a "merge" operation, if it is supported. 848The vc-merge command now runs a "merge" operation, if it is supported,
843This merges another branch into the current one. This command prompts 849to merge changes from another branch into the current one. It prompts
844the user for specifics, e.g. a merge source. 850for specifics, e.g. a merge source.
845 851
846**** Currently supported for Bzr, Git, and Mercurial. 852**** Currently supported for Bzr, Git, and Mercurial.
847 853
854+++
848*** New option `vc-revert-show-diff' controls whether `vc-revert' 855*** New option `vc-revert-show-diff' controls whether `vc-revert'
849shows a diff while querying the user. It defaults to t. 856shows a diff while querying the user. It defaults to t.
850 857
858+++
851*** Log entries in some Log View buffers can be toggled to display a 859*** Log entries in some Log View buffers can be toggled to display a
852longer description by typing RET (log-view-toggle-entry-display). 860longer description by typing RET (log-view-toggle-entry-display).
853In the Log View buffers made by `C-x v L' (vc-print-root-log), you can 861In the Log View buffers made by `C-x v L' (vc-print-root-log), you can
@@ -858,6 +866,7 @@ use this to display the full log entry for the revision at point.
858**** Packages using Log View mode can enable this functionality by 866**** Packages using Log View mode can enable this functionality by
859binding `log-view-expanded-log-entry-function' to a suitable function. 867binding `log-view-expanded-log-entry-function' to a suitable function.
860 868
869+++
861*** New command `vc-ediff' allows visual comparison of two revisions 870*** New command `vc-ediff' allows visual comparison of two revisions
862of a file similar to `vc-diff', but using ediff backend. 871of a file similar to `vc-diff', but using ediff backend.
863 872
diff --git a/etc/NEWS.19 b/etc/NEWS.19
index 16a9d9dc4cb..df6c4893f87 100644
--- a/etc/NEWS.19
+++ b/etc/NEWS.19
@@ -4457,7 +4457,7 @@ highlighting, etc.
4457 4457
4458So that such output processing may be done efficiently, there is a new 4458So that such output processing may be done efficiently, there is a new
4459variable, comint-last-output-start, that records the position of the start of 4459variable, comint-last-output-start, that records the position of the start of
4460the lastest output inserted into the buffer (effectively the previous value 4460the last output inserted into the buffer (effectively the previous value
4461of process-mark). Output processing functions should process the text 4461of process-mark). Output processing functions should process the text
4462between comint-last-output-start (or perhaps the beginning of the line that 4462between comint-last-output-start (or perhaps the beginning of the line that
4463the position lies on) and process-mark. 4463the position lies on) and process-mark.
@@ -6114,7 +6114,7 @@ When you have edited both buffers as you wish, merge them with C-x 6
61141. This copies the text from the right-hand buffer as a second column 61141. This copies the text from the right-hand buffer as a second column
6115in the other buffer. To go back to two-column editing, use C-x 6 s. 6115in the other buffer. To go back to two-column editing, use C-x 6 s.
6116 6116
6117Use C-x 6 d to disassociate the two buffers, leaving each as it 6117Use C-x 6 d to dissociate the two buffers, leaving each as it
6118stands. (If the other buffer, the one that was not current when you 6118stands. (If the other buffer, the one that was not current when you
6119type C-x 6 d, is empty, C-x 6 d kills it.) 6119type C-x 6 d, is empty, C-x 6 d kills it.)
6120 6120
diff --git a/etc/NEWS.22 b/etc/NEWS.22
index 87d77cf52fc..70c7b0e018b 100644
--- a/etc/NEWS.22
+++ b/etc/NEWS.22
@@ -4273,7 +4273,7 @@ of suffixes. The function also accepts a predicate argument to
4273further filter candidate files. 4273further filter candidate files.
4274 4274
4275One advantage of using this function is that the list of suffixes in 4275One advantage of using this function is that the list of suffixes in
4276`exec-suffixes' is OS-dependant, so this function will find 4276`exec-suffixes' is OS-dependent, so this function will find
4277executables without polluting Lisp code with OS dependencies. 4277executables without polluting Lisp code with OS dependencies.
4278 4278
4279*** The new function `file-remote-p' tests a file name and returns 4279*** The new function `file-remote-p' tests a file name and returns
diff --git a/etc/NEWS.23 b/etc/NEWS.23
index 4e541c0deb3..b9570ee9e29 100644
--- a/etc/NEWS.23
+++ b/etc/NEWS.23
@@ -903,7 +903,7 @@ mode-line information (e.g. waiting for a VC command to finish).
903 903
904*** The mode-line tooltips have been improved to provide more details. 904*** The mode-line tooltips have been improved to provide more details.
905 905
906*** The VC, line/colum number and minor mode indicators on the mode 906*** The VC, line/column number and minor mode indicators on the mode
907line are now interactive: mouse-1 can be used on them to pop up a menu. 907line are now interactive: mouse-1 can be used on them to pop up a menu.
908 908
909** File deletion can make use of the Recycle Bin or system Trash folder. 909** File deletion can make use of the Recycle Bin or system Trash folder.
@@ -1677,7 +1677,7 @@ Running processes on a remote host can be controlled by settings in
1677When the variable `file-precious-flag' is set, the success of a remote 1677When the variable `file-precious-flag' is set, the success of a remote
1678file copy is checked via the file's checksum. 1678file copy is checked via the file's checksum.
1679 1679
1680*** Passwords can be read from an authentification file. 1680*** Passwords can be read from an authentication file.
1681Tramp uses the package `auth-source' to read passwords from a file, if 1681Tramp uses the package `auth-source' to read passwords from a file, if
1682necessary. 1682necessary.
1683 1683
diff --git a/etc/TODO b/etc/TODO
index 5acd8734ad0..2470747bfb5 100644
--- a/etc/TODO
+++ b/etc/TODO
@@ -674,7 +674,7 @@ with toolkit-specific code to display the menu bar right to left.
674 674
675*** image-type-header-regexps priorities the jpeg loader over the 675*** image-type-header-regexps priorities the jpeg loader over the
676ImageMagick one. This is not wrong, but how should a user go about 676ImageMagick one. This is not wrong, but how should a user go about
677prefering the ImageMagick loader? The user might like zooming etc in jpegs. 677preferring the ImageMagick loader? The user might like zooming etc in jpegs.
678 678
679Try (setq image-type-header-regexps nil) for a quick hack to prefer 679Try (setq image-type-header-regexps nil) for a quick hack to prefer
680ImageMagick over the jpg loader. 680ImageMagick over the jpg loader.
diff --git a/etc/srecode/doc-cpp.srt b/etc/srecode/doc-cpp.srt
index 957986e8eda..a9ea16d1811 100644
--- a/etc/srecode/doc-cpp.srt
+++ b/etc/srecode/doc-cpp.srt
@@ -43,7 +43,7 @@ Recycle doxygen comment code from the more general template set."
43---- 43----
44 44
45template variable-same-line-comment :tag 45template variable-same-line-comment :tag
46"A comment occurring after a veriable declaration. 46"A comment occurring after a variable declaration.
47Recycle doxygen comment code from the more general template set." 47Recycle doxygen comment code from the more general template set."
48---- 48----
49{{>:declaration:doxygen-variable-same-line}} 49{{>:declaration:doxygen-variable-same-line}}
diff --git a/etc/srecode/doc-default.srt b/etc/srecode/doc-default.srt
index 24741fa7741..ac8d8bc1ac2 100644
--- a/etc/srecode/doc-default.srt
+++ b/etc/srecode/doc-default.srt
@@ -43,7 +43,7 @@ template function-comment :tag :indent :blank
43---- 43----
44 44
45template variable-same-line-comment :tag 45template variable-same-line-comment :tag
46"A comment occurring after a veriable declaration." 46"A comment occurring after a variable declaration."
47---- 47----
48{{comment_start}} {{?DOC}} {{comment_end}} 48{{comment_start}} {{?DOC}} {{comment_end}}
49---- 49----
diff --git a/etc/srecode/doc-java.srt b/etc/srecode/doc-java.srt
index c6d2ef1fd54..aeae1c2c389 100644
--- a/etc/srecode/doc-java.srt
+++ b/etc/srecode/doc-java.srt
@@ -44,7 +44,7 @@ Recycle javadoc comment code from the more general template set."
44---- 44----
45 45
46template variable-same-line-comment :tag 46template variable-same-line-comment :tag
47"A comment occurring after a veriable declaration. 47"A comment occurring after a variable declaration.
48Recycle javadoc comment code from the more general template set." 48Recycle javadoc comment code from the more general template set."
49---- 49----
50{{>:declaration:javadoc-variable-same-line}} 50{{>:declaration:javadoc-variable-same-line}}
diff --git a/etc/srecode/el.srt b/etc/srecode/el.srt
index 6117e72be2a..03a797bb709 100644
--- a/etc/srecode/el.srt
+++ b/etc/srecode/el.srt
@@ -109,7 +109,7 @@ $<MODEFCN:declaration:function$
109 '($MODESYM$-mode-font-lock-keywords 109 '($MODESYM$-mode-font-lock-keywords
110 nil ;; perform string/comment fontification 110 nil ;; perform string/comment fontification
111 nil ;; keywords are case sensitive. 111 nil ;; keywords are case sensitive.
112 ;; This puts _ & - as a word constituant, 112 ;; This puts _ & - as a word constituent,
113 ;; simplifying our keywords significantly 113 ;; simplifying our keywords significantly
114 ((?_ . "w") (?- . "w")))) 114 ((?_ . "w") (?- . "w"))))
115 (run-hooks '$MODESYM$-mode-hook) 115 (run-hooks '$MODESYM$-mode-hook)
diff --git a/etc/srecode/template.srt b/etc/srecode/template.srt
index 3c9aff7ff0d..adbe554216b 100644
--- a/etc/srecode/template.srt
+++ b/etc/srecode/template.srt
@@ -125,13 +125,13 @@ prompt $?NAME$ "$?PROMPT$"
125bind "p" 125bind "p"
126 126
127template priority :blank 127template priority :blank
128"Insert a priority statemept." 128"Insert a priority statement."
129---- 129----
130set priority $^$ 130set priority $^$
131---- 131----
132 132
133template application :blank 133template application :blank
134"Insert a priority statemept." 134"Insert an application statement."
135---- 135----
136set application "$^$" 136set application "$^$"
137---- 137----
diff --git a/leim/ChangeLog b/leim/ChangeLog
index ed8aec0b16d..57c5a406785 100644
--- a/leim/ChangeLog
+++ b/leim/ChangeLog
@@ -1,3 +1,8 @@
12011-12-15 Kenichi Handa <handa@m17n.org>
2
3 * quail/ethiopic.el ("ethiopic"): Do not refer to
4 ethio-prefer-ascii-punctuation.
5
12011-11-20 Juanma Barranquero <lekktu@gmail.com> 62011-11-20 Juanma Barranquero <lekktu@gmail.com>
2 7
3 * quail/hangul.el (hangul-character): Fix typo. 8 * quail/hangul.el (hangul-character): Fix typo.
@@ -1801,7 +1806,7 @@
18011998-07-21 Kenichi Handa <handa@etl.go.jp> 18061998-07-21 Kenichi Handa <handa@etl.go.jp>
1802 1807
1803 * quail/japanese.el (quail-japanese-kanji-kkc): Handle the case 1808 * quail/japanese.el (quail-japanese-kanji-kkc): Handle the case
1804 that conversion is cancelled in kkc-region. 1809 that conversion is canceled in kkc-region.
1805 (quail-japanese-switch-package): Fix previous change. 1810 (quail-japanese-switch-package): Fix previous change.
1806 1811
18071998-07-19 Kenichi Handa <handa@etl.go.jp> 18121998-07-19 Kenichi Handa <handa@etl.go.jp>
@@ -1890,7 +1895,7 @@
1890 * Makefile.in (${TIT}): To byte-compile quail packages, use just 1895 * Makefile.in (${TIT}): To byte-compile quail packages, use just
1891 built quail. 1896 built quail.
1892 1897
18931997-12-09 Koaunghi Un <koanughi.un@zdv.uni-tuebingen.de> 18981997-12-09 Koaunghi Un <koaunghi.un@zdv.uni-tuebingen.de>
1894 1899
1895 * quail/hanja3.el: New file. 1900 * quail/hanja3.el: New file.
1896 1901
@@ -1998,7 +2003,7 @@
1998 (quail-mode-map): Change binding for ethio-insert-ethio-space. 2003 (quail-mode-map): Change binding for ethio-insert-ethio-space.
1999 (quail-mode-hook): Check the current Quail package name. 2004 (quail-mode-hook): Check the current Quail package name.
2000 2005
2001 * quail/latin-post.el: Add rules for cancelling accents by typing 2006 * quail/latin-post.el: Add rules for canceling accents by typing
2002 two accent keys (e.g. a~ => a-tilde, a~~ => a~) to all Quail 2007 two accent keys (e.g. a~ => a-tilde, a~~ => a~) to all Quail
2003 packages. 2008 packages.
2004 2009
diff --git a/leim/quail/croatian.el b/leim/quail/croatian.el
index 7f394979261..885ac238398 100644
--- a/leim/quail/croatian.el
+++ b/leim/quail/croatian.el
@@ -1,4 +1,4 @@
1;;; quail/croatian.el -- Quail package for inputing Croatian -*-coding: iso-8859-2;-*- 1;;; quail/croatian.el -- Quail package for inputting Croatian -*-coding: iso-8859-2;-*-
2 2
3;; Copyright (C) 2003-2011 Free Software Foundation, Inc. 3;; Copyright (C) 2003-2011 Free Software Foundation, Inc.
4 4
diff --git a/leim/quail/czech.el b/leim/quail/czech.el
index 334045eac32..fc1fb5f6e1f 100644
--- a/leim/quail/czech.el
+++ b/leim/quail/czech.el
@@ -461,7 +461,7 @@ keyboard from the obsolete `emacs-czech' package.
461All digits except of `1' are replaced by Czech characters as on the standard 461All digits except of `1' are replaced by Czech characters as on the standard
462Czech keyboard. 462Czech keyboard.
463`[' and `]' are replaced with `,Bz(B' and `,By(B', respectively. 463`[' and `]' are replaced with `,Bz(B' and `,By(B', respectively.
464There are two dead keys on `=' and `+'. Characters with diaresis are 464There are two dead keys on `=' and `+'. Characters with diaereses are
465accessible through `+='. 465accessible through `+='.
466All other keys are the same as on standard US keyboard." 466All other keys are the same as on standard US keyboard."
467 nil t nil nil t nil nil nil nil nil t) 467 nil t nil nil t nil nil nil nil nil t)
diff --git a/leim/quail/ethiopic.el b/leim/quail/ethiopic.el
index 7e108a71a60..569d6e6b245 100644
--- a/leim/quail/ethiopic.el
+++ b/leim/quail/ethiopic.el
@@ -39,7 +39,7 @@
39 "ethiopic" "Ethiopic" 39 "ethiopic" "Ethiopic"
40 '("$(3$Q#U!.(B " 40 '("$(3$Q#U!.(B "
41 (ethio-prefer-ascii-space "_" "$(3$h(B") 41 (ethio-prefer-ascii-space "_" "$(3$h(B")
42 (ethio-prefer-ascii-punctuation "." "$(3$i(B")) 42 "$(3$i(B")
43 t " Quail package for Ethiopic (Tigrigna and Amharic) 43 t " Quail package for Ethiopic (Tigrigna and Amharic)
44 44
45When you are in Ethiopic language environment, the following special 45When you are in Ethiopic language environment, the following special
diff --git a/leim/quail/greek.el b/leim/quail/greek.el
index 4deeb86fb4d..407b52f1f39 100644
--- a/leim/quail/greek.el
+++ b/leim/quail/greek.el
@@ -152,7 +152,7 @@ eta H h
152theta Q q 152theta Q q
153iota I i 153iota I i
154kappa K k 154kappa K k
155lamda L l 155lambda L l
156mu M m 156mu M m
157nu N n 157nu N n
158xi X x 158xi X x
@@ -433,7 +433,7 @@ eta H h
433theta J j 433theta J j
434iota I i 434iota I i
435kappa K k 435kappa K k
436lamda L l 436lambda L l
437mu M m 437mu M m
438nu N n 438nu N n
439xi X x 439xi X x
@@ -1147,7 +1147,7 @@ nil t t nil nil nil nil nil nil nil t)
1147 1147
1148In the right of ,Fk(B key is a combination key, where 1148In the right of ,Fk(B key is a combination key, where
1149 ,F4(B acute 1149 ,F4(B acute
1150 ,F((B diaresis 1150 ,F((B diaeresis
1151 1151
1152e.g. 1152e.g.
1153 ,F4(B + ,Fa(B -> ,F\(B 1153 ,F4(B + ,Fa(B -> ,F\(B
@@ -1289,7 +1289,7 @@ e.g.
1289 1289
1290In the right of ,Fk(B key is a combination key, where 1290In the right of ,Fk(B key is a combination key, where
1291 ,F4(B acute 1291 ,F4(B acute
1292 ,F((B diaresis 1292 ,F((B diaeresis
1293 1293
1294e.g. 1294e.g.
1295 ,Fa(B + ,F4(B -> ,F\(B 1295 ,Fa(B + ,F4(B -> ,F\(B
diff --git a/leim/quail/hanja3.el b/leim/quail/hanja3.el
index aa0fc7948af..dae716c7a8b 100644
--- a/leim/quail/hanja3.el
+++ b/leim/quail/hanja3.el
@@ -2,7 +2,7 @@
2 2
3;; Copyright (C) 1997, 1999, 2001-2011 Free Software Foundation, Inc. 3;; Copyright (C) 1997, 1999, 2001-2011 Free Software Foundation, Inc.
4 4
5;; Author: Koaunghi Un <koanughi.un@zdv.uni-tuebingen.de> 5;; Author: Koaunghi Un <koaunghi.un@zdv.uni-tuebingen.de>
6;; Keywords: mule, quail, multilingual, input method, Korean, Hanja 6;; Keywords: mule, quail, multilingual, input method, Korean, Hanja
7 7
8;; This file is part of GNU Emacs. 8;; This file is part of GNU Emacs.
diff --git a/leim/quail/persian.el b/leim/quail/persian.el
index b664eb5995b..b6b3146cc8d 100644
--- a/leim/quail/persian.el
+++ b/leim/quail/persian.el
@@ -27,7 +27,7 @@
27;;; Commentary: 27;;; Commentary:
28;; 28;;
29;; This file contains a collection of input methods for 29;; This file contains a collection of input methods for
30;; Persian languages (Farsi, Urdu, Pashto/Afghanic, ...) 30;; Persian languages - Farsi, Urdu, Pashto (Afghani), ...
31;; 31;;
32;; At this time, the following input methods are specified: 32;; At this time, the following input methods are specified:
33;; 33;;
@@ -194,11 +194,11 @@ Based on ISIRI-9149 Layout of Persian Letters and Symbols on Computer Keyboards.
194;;; 194;;;
195;;; This translit keyboard is designed to be intuitive such that 195;;; This translit keyboard is designed to be intuitive such that
196;;; mapping are easy and natural to remember for a persian writer. 196;;; mapping are easy and natural to remember for a persian writer.
197;;; For some persian characters there are multiple ways of inputing 197;;; For some persian characters there are multiple ways of inputting
198;;; the same character. 198;;; the same character.
199;;; 199;;;
200;;; The letter 'h' is used for a number of two character mappings, 200;;; The letter 'h' is used for a number of two character mappings,
201;;; this means that some character sequence inputs need to be repeated 201;;; this means that some character sequence inputs need to be repeated
202;;; followed by a backspace followed by the 'h'. 202;;; followed by a backspace followed by the 'h'.
203;;; For example: سحر = 's' 's' '<bs>' 'h' 'h' 'r' 203;;; For example: سحر = 's' 's' '<bs>' 'h' 'h' 'r'
204;;; In practice such sequences are rare. 204;;; In practice such sequences are rare.
diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog
index 1eb67eb6c71..e989473219c 100644
--- a/lib-src/ChangeLog
+++ b/lib-src/ChangeLog
@@ -1,3 +1,16 @@
12011-12-25 Andreas Schwab <schwab@linux-m68k.org>
2
3 * etags.c (C_entries): Properly skip over string and character
4 constants and comments inside brackets. (Bug#10357)
5
62011-12-04 Juanma Barranquero <lekktu@gmail.com>
7
8 * emacsclient.c (decode_options) [WINDOWSNT]: Don't force tty = 0;
9 instead, treat both -c and -t as always requesting a new "tty" frame,
10 and let server.el decide which kind is actually required.
11 Reported by Uwe Siart <usenet@siart.de> in this thread:
12 http://lists.gnu.org/archive/html/emacs-devel/2011-11/msg00303.html
13
12011-11-30 Chong Yidong <cyd@gnu.org> 142011-11-30 Chong Yidong <cyd@gnu.org>
2 15
3 * emacsclient.c (main): Condition last change on WINDOWSNT 16 * emacsclient.c (main): Condition last change on WINDOWSNT
@@ -3129,7 +3142,7 @@
3129 (main): Call put_entries here even in CTAGS mode. 3142 (main): Call put_entries here even in CTAGS mode.
3130 (main, process_file): Check the return values of fclose and pclose. 3143 (main, process_file): Check the return values of fclose and pclose.
3131 (process_file): Do not call put_entries after parsing each file. 3144 (process_file): Do not call put_entries after parsing each file.
3132 (process_file): Canonicalise file names even for ctags. 3145 (process_file): Canonicalize file names even for ctags.
3133 (process_file): Set curfile here... 3146 (process_file): Set curfile here...
3134 (find_entries): ... not here any more. 3147 (find_entries): ... not here any more.
3135 (add_node): In etags mode, build a linked list of entries (on 3148 (add_node): In etags mode, build a linked list of entries (on
diff --git a/lib-src/emacsclient.c b/lib-src/emacsclient.c
index 0ae1f0bddea..5e1c2d61b89 100644
--- a/lib-src/emacsclient.c
+++ b/lib-src/emacsclient.c
@@ -638,6 +638,22 @@ decode_options (int argc, char **argv)
638 if (display && strlen (display) == 0) 638 if (display && strlen (display) == 0)
639 display = NULL; 639 display = NULL;
640 640
641#ifdef WINDOWSNT
642 /* Emacs on Windows does not support GUI and console frames in the same
643 instance. So, it makes sense to treat the -t and -c options as
644 equivalent, and open a new frame regardless of whether the running
645 instance is GUI or console. Ideally, we would only set tty = 1 when
646 the instance is running in a console, but alas we don't know that.
647 The simplest workaround is to always ask for a tty frame, and let
648 server.el check whether it makes sense. */
649 if (tty || !current_frame)
650 {
651 display = (const char *) ttyname;
652 current_frame = 0;
653 tty = 1;
654 }
655#endif
656
641 /* If no display is available, new frames are tty frames. */ 657 /* If no display is available, new frames are tty frames. */
642 if (!current_frame && !display) 658 if (!current_frame && !display)
643 tty = 1; 659 tty = 1;
@@ -654,14 +670,6 @@ decode_options (int argc, char **argv)
654an empty string"); 670an empty string");
655 exit (EXIT_FAILURE); 671 exit (EXIT_FAILURE);
656 } 672 }
657
658 /* TTY frames not supported on Windows. Continue using GUI rather than
659 forcing the user to change their command-line. This is required since
660 tty is set above if certain options are given and $DISPLAY is not set,
661 which is not obvious to users. */
662 if (tty)
663 tty = 0;
664
665#endif /* WINDOWSNT */ 673#endif /* WINDOWSNT */
666} 674}
667 675
diff --git a/lib-src/etags.c b/lib-src/etags.c
index 30d90e9d911..8852c9faea4 100644
--- a/lib-src/etags.c
+++ b/lib-src/etags.c
@@ -3189,24 +3189,12 @@ C_entries (int c_ext, FILE *inf)
3189 } 3189 }
3190 continue; 3190 continue;
3191 } 3191 }
3192 else if (bracketlev > 0)
3193 {
3194 switch (c)
3195 {
3196 case ']':
3197 if (--bracketlev > 0)
3198 continue;
3199 break;
3200 case '\0':
3201 CNL_SAVE_DEFINEDEF ();
3202 break;
3203 }
3204 continue;
3205 }
3206 else switch (c) 3192 else switch (c)
3207 { 3193 {
3208 case '"': 3194 case '"':
3209 inquote = TRUE; 3195 inquote = TRUE;
3196 if (bracketlev > 0)
3197 continue;
3210 if (inattribute) 3198 if (inattribute)
3211 break; 3199 break;
3212 switch (fvdef) 3200 switch (fvdef)
@@ -3224,9 +3212,11 @@ C_entries (int c_ext, FILE *inf)
3224 continue; 3212 continue;
3225 case '\'': 3213 case '\'':
3226 inchar = TRUE; 3214 inchar = TRUE;
3215 if (bracketlev > 0)
3216 continue;
3227 if (inattribute) 3217 if (inattribute)
3228 break; 3218 break;
3229 if (fvdef != finlist && fvdef != fignore && fvdef !=vignore) 3219 if (fvdef != finlist && fvdef != fignore && fvdef != vignore)
3230 { 3220 {
3231 fvextern = FALSE; 3221 fvextern = FALSE;
3232 fvdef = fvnone; 3222 fvdef = fvnone;
@@ -3238,6 +3228,8 @@ C_entries (int c_ext, FILE *inf)
3238 incomm = TRUE; 3228 incomm = TRUE;
3239 lp++; 3229 lp++;
3240 c = ' '; 3230 c = ' ';
3231 if (bracketlev > 0)
3232 continue;
3241 } 3233 }
3242 else if (/* cplpl && */ *lp == '/') 3234 else if (/* cplpl && */ *lp == '/')
3243 { 3235 {
@@ -3270,7 +3262,7 @@ C_entries (int c_ext, FILE *inf)
3270 for (cp = newlb.buffer; cp < lp-1; cp++) 3262 for (cp = newlb.buffer; cp < lp-1; cp++)
3271 if (!iswhite (*cp)) 3263 if (!iswhite (*cp))
3272 { 3264 {
3273 if (*cp == '*' && *(cp+1) == '/') 3265 if (*cp == '*' && cp[1] == '/')
3274 { 3266 {
3275 cp++; 3267 cp++;
3276 cpptoken = TRUE; 3268 cpptoken = TRUE;
@@ -3284,7 +3276,17 @@ C_entries (int c_ext, FILE *inf)
3284 continue; 3276 continue;
3285 case '[': 3277 case '[':
3286 bracketlev++; 3278 bracketlev++;
3287 continue; 3279 continue;
3280 default:
3281 if (bracketlev > 0)
3282 {
3283 if (c == ']')
3284 --bracketlev;
3285 else if (c == '\0')
3286 CNL_SAVE_DEFINEDEF ();
3287 continue;
3288 }
3289 break;
3288 } /* switch (c) */ 3290 } /* switch (c) */
3289 3291
3290 3292
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index c77ace6d483..78cc1862c2f 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,383 @@
12011-12-28 Chong Yidong <cyd@gnu.org>
2
3 * progmodes/gdb-mi.el (gdb-get-source-file-list)
4 (gdb-get-source-file): Move mode line update to
5 gdb-get-source-file (Bug#10087).
6
72011-12-25 Chong Yidong <cyd@gnu.org>
8
9 * progmodes/gud.el (gud-gdb-fetch-lines-filter): Just use
10 gud-gdb-marker-filter without taking it as an argument.
11 (gud-gdb-run-command-fetch-lines): Caller changed.
12 (gud-gdb-completion-function): New variable.
13 (gud-gdb-completion-at-point): Use it.
14 (gud-gdb-completions-1): Split from gud-gdb-completions.
15
16 * progmodes/gdb-mi.el (gdb-input): Accept command and handler
17 function as separate arguments.
18 (gdb-init-1, gdb-non-stop-handler, gdb-check-target-async)
19 (gdb-tooltip-print-1, gud-watch, gdb-speedbar-update)
20 (gdb-var-list-children, gdb-var-set-format, gdb-var-delete-1)
21 (gdb-var-delete-children, gdb-edit-value, gdb-var-update)
22 (gdb-stopped, def-gdb-auto-update-trigger)
23 (gdb-place-breakpoints, gdb-select-thread, gdb-select-frame)
24 (gdb-get-changed-registers, gdb-get-main-selected-frame): Callers
25 changed.
26 (gud-gdbmi-completions): New function.
27 (gdb): Use it for generating the completion table.
28
292011-12-24 Alan Mackenzie <acm@muc.de>
30
31 Introduce a mechanism to widen the region used in context font
32 locking. Use this to protect declarations from losing their
33 contexts.
34
35 * progmodes/cc-langs.el (c-before-font-lock-functions): replace
36 c-set-fl-decl-start with c-change-set-fl-decl-start (Renaming).
37 (c-before-context-fontification-functions): new defvar, a list of
38 functions to be run just before context (etc.) font locking.
39
40 * progmodes/cc-mode.el (c-extend-font-lock-region-for-macros):
41 new, functionality extracted from
42 c-neutralize-syntax-in-and-mark-CPP.
43 (c-in-after-change-fontification): new variable.
44 (c-after-change): Set c-in-after-change-fontification.
45 (c-set-fl-decl-start): Rejig its interface, so it can be called
46 from both after-change and context fontifying.
47 (c-change-set-fl-decl-start, c-context-set-fl-decl-start): new
48 functions.
49 (c-standard-font-lock-fontify-region-function): new variable.
50 (c-font-lock-fontify-region): new function.
51
522011-12-24 Juri Linkov <juri@jurta.org>
53
54 * window.el (window--state-get-1): Set `FORCE' arg of `mark' to t.
55 (Bug#10348)
56
572011-12-23 Michael Albinus <michael.albinus@gmx.de>
58
59 * net/ange-ftp.el (ange-ftp-copy-file-internal): Check for
60 existence of source file. (Bug#10325)
61
622011-12-23 Alan Mackenzie <acm@muc.de>
63
64 Fix unstable fontification inside templates.
65
66 * progmodes/cc-langs.el (c-before-font-lock-functions): newly
67 created from the singular version. The (c c++ objc) entry now
68 additionally has c-set-fl-decl-start. The other languages (apart
69 from AWK) have that as a single entry.
70
71 * progmodes/cc-fonts.el (c-font-lock-enclosing-decls): The
72 functionality for "local" declarations has been extracted to
73 c-set-fl-decl-start.
74
75 * progmodes/cc-mode.el: (c-common-init, c-after-change): Changes
76 due to pluralisation of c-before-font-lock-functions.
77 (c-set-fl-decl-start): New function, extracted from
78 c-font-lock-enclosing-decls and enhanced.
79
802011-12-23 Juanma Barranquero <lekktu@gmail.com>
81
82 * desktop.el (desktop-internal-v2s): Fix typos in docstring (bug#10353).
83
842011-12-22 Juri Linkov <juri@jurta.org>
85
86 * progmodes/grep.el (rgrep): Fix docstring. (Bug#10185)
87
882011-12-22 Chong Yidong <cyd@gnu.org>
89
90 * vc/vc-hooks.el (vc-keep-workfiles): Doc fix.
91
922011-12-21 Drew Adams <drew.adams@oracle.com>
93
94 * files.el (file-remote-p): Fix docstring. (Bug#10319)
95
962011-12-21 Jérémy Compostella <jeremy.compostella@gmail.com>
97
98 * battery.el (battery-linux-sysfs): Add missing parameters from acpi.
99
1002011-12-21 Teodor Zlatanov <tzz@lifelogs.com>
101
102 * progmodes/cfengine.el: Add Version.
103
104 Add CFEngine 3.x syntax highlighting and support with
105 `cfengine3-mode', and rename the old `cfengine-mode' to
106 `cfengine2-mode'. Make `cfengine-mode' an automatic content-based
107 switcher between `cfengine3-mode' and `cfengine2-mode' by aliasing
108 it to `cfengine-auto-mode'. Rename variables specific to
109 `cfengine2-mode' from cfengine-* to cfengine2-*. Change the
110 modeline indicator to "CFE2" and "CFE3" depending on the mode, to
111 save space. Mark `cfengine-mode-abbrevs' as obsolete.
112
1132011-12-21 Chong Yidong <cyd@gnu.org>
114
115 * vc/vc-bzr.el (vc-bzr-rename-file): Don't pass ~ to Bzr in
116 filename argument.
117
1182011-12-20 Martin Rudalics <rudalics@gmx.at>
119
120 * window.el (window-normalize-buffer-to-display): Remove.
121 (display-buffer): Handle buffer-or-name argument as in Emacs 23.
122
1232011-12-19 Chong Yidong <cyd@gnu.org>
124
125 * vc/vc-dir.el (vc-dir-parent-marked-p, vc-dir-children-marked-p):
126 Don't signal an error in a predicate function; return non-nil.
127 (vc-dir-mark-file): Move the error here.
128 (vc-dir-mark-unmark): If acting on the region, keep going if one
129 of the entries cannot be marked/unmarked.
130 (vc-dir-mark-all-files): If current entry is a directory, mark
131 only child files, as documented.
132
1332011-12-19 Vincent Belaïche <vincentb1@users.sourceforge.net>
134
135 * ses.el: Ooops... undo changes of 2011-12-11T14:49:48Z!vincentb1@users.sourceforge.net, as trunk
136 branch is feature frozen, and 2011-12-11T14:49:48Z!vincentb1@users.sourceforge.net was a feature
137 addition.
138
1392011-12-18 Jan Djärv <jan.h.d@swipnet.se>
140
141 * term/ns-win.el (ns-get-selection-internal)
142 (ns-store-selection-internal): Declare.
143 (ns-store-cut-buffer-internal, ns-get-cut-buffer-internal):
144 Declare as obsolete.
145 (ns-get-pasteboard, ns-paste-secondary):
146 Use ns-get-selection-internal.
147 (ns-set-pasteboard, ns-copy-including-secondary):
148 Use ns-store-selection-internal.
149
1502011-12-17 Chong Yidong <cyd@gnu.org>
151
152 * vc/vc.el (vc-next-action): Doc fix; remove CVS-isms.
153 (vc-deduce-fileset): Doc fix.
154
1552011-12-16 Andreas Schwab <schwab@linux-m68k.org>
156
157 * calc/calc-misc.el (calc-help): Avoid wrapping help message.
158
1592011-12-13 Sam Steingold <sds@gnu.org>
160
161 * man.el (Man-getpage-in-background): When running under a
162 window-system, ignore $MANWIDTH and $COLUMNS.
163
1642011-12-15 Kenichi Handa <handa@m17n.org>
165
166 * language/ethio-util.el: Change coding tag to utf-8-emacs.
167 (setup-ethiopic-environment-internal): Comment out key-binding for
168 ethio-toggle-punctuation.
169
1702011-12-13 Alan Mackenzie <acm@muc.de>
171
172 Add the switch statement to AWK Mode.
173
174 * progmodes/cc-awk (awk-font-lock-keywords): Add "switch", "case",
175 "default" to the keywords regexp.
176
177 * progmodes/cc-langs (c-label-kwds): Let AWK take the same
178 expression as the rest.
179 (c-nonlabel-token-key): Allow string literals for AWK. Refactor
180 for the other modes.
181
182 Large brace-block initialisation makes CC Mode slow: Fix.
183 Tidy up and accelerate c-in-literal, etc. by using the
184 c-parse-state
185 routines. Limit backward searching in c-font-lock-enclosing.decl.
186
187 * progmodes/cc-engine.el (c-state-pp-to-literal): Return the
188 pp-state and literal type in addition to the limits.
189 (c-state-safe-place): New defun, extracted from
190 c-state-literal-at.
191 (c-state-literal-at): Use the above new defun.
192 (c-slow-in-literal, c-fast-in-literal): Removed.
193 (c-in-literal, c-literal-limits): Amended to use
194 c-state-pp-to-literal.
195
196 * progmodes/cc-fonts.el (c-font-lock-enclosing-decls): Check for
197 being in a literal. Add a limit for backward searching.
198
199 * progmodes/cc-mode.el (awk-mode): Don't alias c-in-literal to
200 c-slow-in-literal.
201
2022011-12-13 Stefan Monnier <monnier@iro.umontreal.ca>
203
204 * progmodes/pascal.el: Declare `ind' as dyn-bound (bug#10264).
205
2062011-12-13 Martin Rudalics <rudalics@gmx.at>
207
208 * window.el (delete-other-windows): Use correct frame in call to
209 window-with-parameter.
210
2112011-12-12 Daniel Pfeiffer <occitan@t-online.de>
212
213 * progmodes/make-mode.el: Bring it up to date with makepp V2.0.
214 (makefile-make-font-lock-keywords): Extend meaning of `keywords'.
215 (makefile-gmake-statements, makefile-makepp-statements):
216 Use it and add new makepp keywords.
217 (makefile-makepp-font-lock-keywords): Add new patterns.
218 (makefile-match-function-end): Match new [...] and [[...]].
219
2202011-12-11 Juanma Barranquero <lekktu@gmail.com>
221
222 * ses.el (ses-call-printer-return, ses-cell-property-get)
223 (ses-sym-rowcol, ses-printer-validate, ses-formula-record)
224 (ses-create-cell-variable, ses-reset-header-string)
225 (ses-cell-set-formula, ses-repair-cell-reference-all)
226 (ses-self-reference-early-detection, ses-in-print-area, ses-set-curcell)
227 (ses-check-curcell, ses-call-printer, ses-adjust-print-width)
228 (ses-print-cell-new-width, ses-formula-references, ses-relocate-formula)
229 (ses-aset-with-undo, ses-load, ses-truncate-cell)
230 (ses-read-column-printer, ses-read-default-printer, ses-insert-row)
231 (ses-delete-row, ses-delete-column, ses-append-row-jump-first-column)
232 (ses-kill-override, ses-yank-pop, ses-yank-cells, ses-yank-tsf)
233 (ses-yank-resize, ses-export-tab, ses-mark-row, ses-mark-column)
234 (ses-renarrow-buffer, ses-insert-range, ses-insert-ses-range)
235 (ses-safe-printer, ses-safe-formula, ses-warn-unsafe, ses--clean-!)
236 (ses--clean-_, ses-range, ses-select, ses-center, ses-center-span)
237 (ses-dashfill, ses-unsafe): Fix typos and reflow docstrings.
238
2392011-12-11 Vincent Belaïche <vincentb1@users.sourceforge.net>
240
241 * ses.el: The overall change is to add cell renaming, that is
242 setting fancy names for cell symbols other than name matching
243 "\\`[A-Z]+[0-9]+\\'" regexp .
244 (ses-create-cell-variable): New defun.
245 (ses-relocate-formula): Relocate formulas only for cells the
246 symbols of which are not renamed, i.e. symbols whose names do not
247 match regexp "\\`[A-Z]+[0-9]+\\'".
248 (ses-relocate-all): Relocate values only for cells the symbols of
249 which are not renamed.
250 (ses-load): Create cells variables as the (ses-cell ...) are read,
251 in order to check row col consistency with cell symbol name only
252 for cells that are not renamed.
253 (ses-replace-name-in-formula): New defun.
254 (ses-rename-cell): New defun.
255
2562011-12-11 Chong Yidong <cyd@gnu.org>
257
258 * progmodes/gdb-mi.el (gdb): Set comint-prompt-regexp, required
259 for completion via gud-gdb-fetch-lines-filter (Bug#10274).
260
2612011-12-11 Eric Hanchrow <eric.hanchrow@gmail.com>
262
263 * window.el (other-window): Fix docstring.
264
2652011-12-10 Eli Zaretskii <eliz@gnu.org>
266
267 * mail/rmailsum.el (rmail-header-summary): RFC2047 decode the
268 `from' or `to' address before taking its substring. Fixes
269 incorrect display in Rmail summary buffer whereby an RFC2047
270 encoded name is chopped in the middle of the encoded string, and
271 thus displayed encoded.
272
2732011-12-10 Juanma Barranquero <lekktu@gmail.com>
274
275 * makefile.w32-in (update-subdirs-CMD): Use a Local Variables section.
276
2772011-12-10 Eli Zaretskii <eliz@gnu.org>
278
279 * textmodes/texnfo-upd.el: Update commentary. Add a warning not
280 to use texinfo-update-node and commands that call it if the
281 Texinfo file uses @node lines without next/prev/up pointers.
282 Correct outdated description about texinfo-master-menu.
283 (texinfo-all-menus-update, texinfo-master-menu)
284 (texinfo-update-node, texinfo-every-node-update)
285 (texinfo-multiple-files-update): Doc fix. Warn against updating
286 all the @node lines.
287 (texinfo-master-menu): Only call texinfo-update-node if the prefix
288 argument is numeric. Explain better in the doc string what the
289 function really does.
290 (texinfo-insert-master-menu-list): Improve the error message
291 displayed if there's no menu in the Top node.
292 (Bug#2975) See also this thread:
293 http://lists.gnu.org/archive/html/emacs-devel/2011-12/msg00156.html.
294
2952011-12-09 Manuel Gómez <mgrojo@gmail.com> (tiny change)
296
297 * speedbar.el (speedbar-supported-extension-expressions):
298 Add .adb and .ads, commonly used for Ada source code (bug#10256).
299
3002011-12-09 Juanma Barranquero <lekktu@gmail.com>
301
302 * printing.el (pr-mode-alist):
303 * simple.el (filter-buffer-substring-functions)
304 (completion-list-insert-choice-function):
305 * window.el (window-with-parameter, window-atom-root)
306 (window-sides-slots, window-size-fixed, window-min-delta)
307 (window-max-delta, window--resize-mini-window)
308 (window--resize-child-windows-normal, window-tree)
309 (delete-other-windows, quit-window, split-window)
310 (display-buffer-record-window, special-display-buffer-names)
311 (special-display-regexps, special-display-popup-frame)
312 (same-window-p, split-window-sensibly)
313 (display-buffer-overriding-action, display-buffer-alist)
314 (display-buffer-base-action, display-buffer, switch-to-buffer)
315 (switch-to-buffer-other-window, switch-to-buffer-other-frame)
316 (fit-window-to-buffer, recenter-positions)
317 (mouse-autoselect-window-state, mouse-autoselect-window-select):
318 * emacs-lisp/syntax.el (syntax-propertize-function): Fix typos
319 and remove unneeded backslashes in docstrings.
320
3212011-12-08 Stefan Monnier <monnier@iro.umontreal.ca>
322
323 * emacs-lisp/lisp-mode.el (defmethod): Add doc-string-elt (bug#10244).
324
325 * pcmpl-gnu.el: Don't fail when there is no Makefile nor -f arg.
326 (pcmpl-gnu-makefile-regexps): Accept "makefile" as well as files that
327 end in ".mk".
328 (pcmpl-gnu-make-rule-names): Check "makefile" and ignore errors
329 when reading the makefile (bug#10116).
330
3312011-12-06 Stefan Monnier <monnier@iro.umontreal.ca>
332
333 * pcmpl-gnu.el (pcomplete/make): Also allow filename arguments
334 (bug#10116).
335
3362011-12-06 Glenn Morris <rgm@gnu.org>
337
338 * emacs-lisp/package.el (package-archives): Doc fix re riskiness.
339
3402011-12-06 Chong Yidong <cyd@gnu.org>
341
342 * progmodes/cc-fonts.el (c-annotation-face): Use defface.
343
3442011-12-06 Juanma Barranquero <lekktu@gmail.com>
345
346 * textmodes/table.el (table-shorten-cell): Fix typo.
347
3482011-12-05 Christopher Genovese <genovese.cr@gmail.com> (tiny change)
349
350 * emacs-lisp/assoc.el (aput): Fix return value (bug#10146)
351
3522011-12-05 Eli Zaretskii <eliz@gnu.org>
353
354 * descr-text.el (describe-char): Fix display of strong
355 right-to-left characters and directional embeddings and overrides.
356
357 * simple.el (what-cursor-position): Fix display of codepoints of
358 strong right-to-left characters.
359
3602011-12-05 Chong Yidong <cyd@gnu.org>
361
362 * faces.el (read-color): Doc fix.
363
3642011-12-05 Glenn Morris <rgm@gnu.org>
365
366 * align.el (align--set-marker): Add doc-string.
367 Don't try to move something that is not a marker. (Bug#10216)
368
3692011-12-04 Glenn Morris <rgm@gnu.org>
370
371 * calendar/appt.el (appt-add): Rewrite the interactive-spec to avoid
372 overly zealous deletion of trailing whitespace.
373
3742011-12-04 Juanma Barranquero <lekktu@gmail.com>
375
376 * server.el (server-delete-client): On Windows, do not try to delete
377 the only terminal.
378 (server-process-filter): On Windows, treat requests for a tty frame as
379 if they were for a GUI frame if the running server is in GUI mode.
380
12011-12-03 Glenn Morris <rgm@gnu.org> 3812011-12-03 Glenn Morris <rgm@gnu.org>
2 382
3 * textmodes/texinfmt.el (batch-texinfo-format): Doc fix. (Bug#10207) 383 * textmodes/texinfmt.el (batch-texinfo-format): Doc fix. (Bug#10207)
@@ -112,11 +492,11 @@
112 (verilog-inject-sense, verilog-read-inst-pins) 492 (verilog-inject-sense, verilog-read-inst-pins)
113 (verilog-read-sub-decls, verilog-read-sub-decls-line): 493 (verilog-read-sub-decls, verilog-read-sub-decls-line):
114 Fix mismatching parenthesis inside commented out code when deleting 494 Fix mismatching parenthesis inside commented out code when deleting
115 AUTOINST, bug383. Reported by Jonathan Greenlaw. 495 AUTOINST, bug383. Reported by Jonathan Greenlaw.
116 (verilog-auto-ascii-enum): Fix AUTOASCIIENUM one-hot with 496 (verilog-auto-ascii-enum): Fix AUTOASCIIENUM one-hot with
117 non-numeric vector width. Reported by Alex Reed. 497 non-numeric vector width. Reported by Alex Reed.
118 (verilog-auto-ascii-enum): Add "onehot" option to work around not 498 (verilog-auto-ascii-enum): Add "onehot" option to work around not
119 detecting signals with parameter widths. Reported by Alex Reed. 499 detecting signals with parameter widths. Reported by Alex Reed.
120 (verilog-auto-delete-trailing-whitespace): 500 (verilog-auto-delete-trailing-whitespace):
121 With `verilog-auto-delete-trailing-whitespace' remove trailing 501 With `verilog-auto-delete-trailing-whitespace' remove trailing
122 whitespace in auto expansion, bug371. Reported by Brad Dobbie. 502 whitespace in auto expansion, bug371. Reported by Brad Dobbie.
@@ -384,8 +764,8 @@
384 764
3852011-11-21 Juri Linkov <juri@jurta.org> 7652011-11-21 Juri Linkov <juri@jurta.org>
386 766
387 * calc/calc.el (calc-read-key-sequence): Let-bind `input-method-function' 767 * calc/calc.el (calc-read-key-sequence):
388 to nil. (Bug#10018) 768 Let-bind `input-method-function' to nil. (Bug#10018)
389 769
3902011-11-21 Lars Magne Ingebrigtsen <larsi@gnus.org> 7702011-11-21 Lars Magne Ingebrigtsen <larsi@gnus.org>
391 771
@@ -1915,11 +2295,10 @@
19152011-09-24 Ulf Jasper <ulf.jasper@web.de> 22952011-09-24 Ulf Jasper <ulf.jasper@web.de>
1916 2296
1917 * net/newst-reader.el (newsticker-html-renderer) 2297 * net/newst-reader.el (newsticker-html-renderer)
1918 (newsticker-show-news): Automatically 2298 (newsticker-show-news): Automatically load html rendering package
1919 load html rendering package if newsticker-html-renderer is set. 2299 if newsticker-html-renderer is set. Fixes "Warning: defvar ignored
1920 Fixes "Warning: defvar ignored because w3m-fill-column is 2300 because w3m-fill-column is let-bound" and the error "Symbol's value
1921 let-bound" and the error "Symbol's value as variable is void: 2301 as variable is void: w3m-fill-column".
1922 w3m-fill-column".
1923 2302
19242011-09-24 Michael Albinus <michael.albinus@gmx.de> 23032011-09-24 Michael Albinus <michael.albinus@gmx.de>
1925 2304
@@ -2033,8 +2412,8 @@
20332011-09-21 Martin Rudalics <rudalics@gmx.at> 24122011-09-21 Martin Rudalics <rudalics@gmx.at>
2034 2413
2035 * window.el (set-window-buffer-start-and-point): 2414 * window.el (set-window-buffer-start-and-point):
2036 Call set-window-start with NOFORCE argument t. Suggested by Thierry 2415 Call set-window-start with NOFORCE argument t.
2037 Volpiatto <thierry.volpiatto@gmail.com>. 2416 Suggested by Thierry Volpiatto <thierry.volpiatto@gmail.com>.
2038 (quit-window): Reword doc-string. Handle new format of 2417 (quit-window): Reword doc-string. Handle new format of
2039 quit-restore parameter. Don't delete window if it has a 2418 quit-restore parameter. Don't delete window if it has a
2040 previous buffer we can show instead of the present one. 2419 previous buffer we can show instead of the present one.
@@ -2152,13 +2531,13 @@
21522011-09-18 Juri Linkov <juri@jurta.org> 25312011-09-18 Juri Linkov <juri@jurta.org>
2153 2532
2154 * info.el (Info-mode-syntax-table): New variable. 2533 * info.el (Info-mode-syntax-table): New variable.
2155 (Info-mode): Set `:syntax-table' to `Info-mode-syntax-table'. (Bug#3312) 2534 (Info-mode): Set `:syntax-table' to `Info-mode-syntax-table' (bug#3312).
2156 2535
21572011-09-18 Juri Linkov <juri@jurta.org> 25362011-09-18 Juri Linkov <juri@jurta.org>
2158 2537
2159 * info.el (Info-file-supports-index-cookies): Increment 2538 * info.el (Info-file-supports-index-cookies):
2160 line-beginning-position's arg from 3 to 4 because makeinfo outputs 2539 Increment line-beginning-position's arg from 3 to 4 because makeinfo
2161 one more line for long file names (bug#4142). 2540 outputs one more line for long file names (bug#4142).
2162 2541
21632011-09-18 Chong Yidong <cyd@stupidchicken.com> 25422011-09-18 Chong Yidong <cyd@stupidchicken.com>
2164 2543
@@ -4450,8 +4829,8 @@
4450 pending encryption. 4829 pending encryption.
4451 4830
4452 (allout-inhibit-auto-save-info-for-decryption): 4831 (allout-inhibit-auto-save-info-for-decryption):
4453 Adjust buffer-saved-size and some allout state to inhibit auto-saves if 4832 Adjust buffer-saved-size and some allout state to inhibit auto-saves
4454 there are plain-text topics pending encryption. 4833 if there are plain-text topics pending encryption.
4455 4834
4456 (allout-maybe-resume-auto-save-info-after-encryption): Adjust 4835 (allout-maybe-resume-auto-save-info-after-encryption): Adjust
4457 buffer-saved-size and some allout state to not inhibit auto-saves 4836 buffer-saved-size and some allout state to not inhibit auto-saves
@@ -5064,7 +5443,7 @@
5064 (ses-calculate-cell, ses-update-cells): Use Dijkstra algorithm for 5443 (ses-calculate-cell, ses-update-cells): Use Dijkstra algorithm for
5065 cycle detection. 5444 cycle detection.
5066 (ses-self-reference-early-detection): New defcustom. 5445 (ses-self-reference-early-detection): New defcustom.
5067 (ses-formula-references): Robustify against self-refering cells. 5446 (ses-formula-references): Robustify against self-referring cells.
5068 (ses-mode): Use ses-set-localvars. 5447 (ses-mode): Use ses-set-localvars.
5069 (ses-command-hook): Add call to ses-initialize-Dijkstra-attempt 5448 (ses-command-hook): Add call to ses-initialize-Dijkstra-attempt
5070 before lauching the update processing. 5449 before lauching the update processing.
@@ -5353,7 +5732,7 @@
5353 5732
5354 * net/network-stream.el (network-stream-open-starttls): Support 5733 * net/network-stream.el (network-stream-open-starttls): Support
5355 upgrading to STARTTLS always, even if we don't have built-in support. 5734 upgrading to STARTTLS always, even if we don't have built-in support.
5356 (open-network-stream): Add the :always-query-capabilies keyword. 5735 (open-network-stream): Add the :always-query-capabilities keyword.
5357 5736
5358 * mail/smtpmail.el: Rewritten to do opportunistic STARTTLS 5737 * mail/smtpmail.el: Rewritten to do opportunistic STARTTLS
5359 upgrades with `open-network-stream', and rely solely on 5738 upgrades with `open-network-stream', and rely solely on
@@ -5881,11 +6260,11 @@
5881 (split-window-keep-point): Mention split-window-above-each-other 6260 (split-window-keep-point): Mention split-window-above-each-other
5882 instead of split-window-vertically. 6261 instead of split-window-vertically.
5883 (split-window-above-each-other, split-window-vertically): 6262 (split-window-above-each-other, split-window-vertically):
5884 Rename split-window-vertically to split-window-above-each-other and 6263 Rename split-window-vertically to split-window-above-each-other
5885 provide defalias for old definition. 6264 and provide defalias for old definition.
5886 (split-window-side-by-side, split-window-horizontally): Rename 6265 (split-window-side-by-side, split-window-horizontally):
5887 split-window-horizontally to split-window-side-by-side and provide 6266 Rename split-window-horizontally to split-window-side-by-side
5888 defalias for the old definition. 6267 and provide defalias for the old definition.
5889 (ctl-x-map): Move bindings for delete-window, 6268 (ctl-x-map): Move bindings for delete-window,
5890 delete-other-windows and enlarge-window here from window.c. 6269 delete-other-windows and enlarge-window here from window.c.
5891 Replace bindings for split-window-vertically and 6270 Replace bindings for split-window-vertically and
@@ -9308,10 +9687,10 @@
9308 preserves the existing header prefix, rebulleting it if necessary, 9687 preserves the existing header prefix, rebulleting it if necessary,
9309 rather than replacing it. This is necessary for proper operation 9688 rather than replacing it. This is necessary for proper operation
9310 of cooperative addons like allout-widgets. 9689 of cooperative addons like allout-widgets.
9311 (allout-make-topic-prefix, allout-rebullet-heading): Change 9690 (allout-make-topic-prefix, allout-rebullet-heading):
9312 SOLICIT arg to INSTEAD, and interpret additionally a string value 9691 Change SOLICIT arg to INSTEAD, and interpret additionally a string
9313 as alternate bullet to be used, instead of prompting the user for 9692 value as alternate bullet to be used, instead of prompting the user
9314 a bullet character. 9693 for a bullet character.
9315 9694
93162011-03-09 Michael Albinus <michael.albinus@gmx.de> 96952011-03-09 Michael Albinus <michael.albinus@gmx.de>
9317 9696
diff --git a/lisp/ChangeLog.10 b/lisp/ChangeLog.10
index a1cfaee6eaf..d6ac498c877 100644
--- a/lisp/ChangeLog.10
+++ b/lisp/ChangeLog.10
@@ -8278,7 +8278,7 @@
82782002-11-17 Markus Rost <rost@math.ohio-state.edu> 82782002-11-17 Markus Rost <rost@math.ohio-state.edu>
8279 8279
8280 * speedbar.el (defgroup speedbar): Use group 'etags instead of 8280 * speedbar.el (defgroup speedbar): Use group 'etags instead of
8281 nonexisting group 'tags. 8281 nonexistent group 'tags.
8282 8282
8283 * emacs-lisp/re-builder.el: Add provide call. 8283 * emacs-lisp/re-builder.el: Add provide call.
8284 8284
diff --git a/lisp/ChangeLog.11 b/lisp/ChangeLog.11
index 38a5530fbfc..dd1d113d665 100644
--- a/lisp/ChangeLog.11
+++ b/lisp/ChangeLog.11
@@ -1744,7 +1744,7 @@
1744 substitute-env-vars -- not quite shell compatible but better than 1744 substitute-env-vars -- not quite shell compatible but better than
1745 nothing. 1745 nothing.
1746 (compilation-error-regexp-alist-alist): Simplify ftnchek to only 1746 (compilation-error-regexp-alist-alist): Simplify ftnchek to only
1747 handle the newer versions messages, which are more parseable. 1747 handle the newer versions messages, which are more parsable.
1748 1748
17492004-11-22 Stefan Monnier <monnier@iro.umontreal.ca> 17492004-11-22 Stefan Monnier <monnier@iro.umontreal.ca>
1750 1750
diff --git a/lisp/ChangeLog.12 b/lisp/ChangeLog.12
index 8721130ec50..55335533b7a 100644
--- a/lisp/ChangeLog.12
+++ b/lisp/ChangeLog.12
@@ -6278,7 +6278,7 @@
6278 Register changes using allout-exposure-change-hook. 6278 Register changes using allout-exposure-change-hook.
6279 Disregard aberrant topics. 6279 Disregard aberrant topics.
6280 (allout-shift-in): With universal-argument, make topic a peer of 6280 (allout-shift-in): With universal-argument, make topic a peer of
6281 it's former offspring. Simplify the code by separating out 6281 its former offspring. Simplify the code by separating out
6282 allout-shift-out functionality. 6282 allout-shift-out functionality.
6283 (allout-shift-out): With universal-argument, make offspring peers 6283 (allout-shift-out): With universal-argument, make offspring peers
6284 of their former container, and its siblings. Implement the 6284 of their former container, and its siblings. Implement the
@@ -7177,7 +7177,7 @@
71772006-08-20 Chong Yidong <cyd@stupidchicken.com> 71772006-08-20 Chong Yidong <cyd@stupidchicken.com>
7178 7178
7179 * frame.el (blink-cursor-start): Set timer first. 7179 * frame.el (blink-cursor-start): Set timer first.
7180 (blink-cursor-end): Ignore timer cancelling errors. 7180 (blink-cursor-end): Ignore timer canceling errors.
7181 Suggested by Ken Manheimer. 7181 Suggested by Ken Manheimer.
7182 7182
71832006-08-20 Juanma Barranquero <lekktu@gmail.com> 71832006-08-20 Juanma Barranquero <lekktu@gmail.com>
@@ -15842,7 +15842,7 @@
15842 interactive spec from "p" to "P". 15842 interactive spec from "p" to "P".
15843 15843
15844 * progmodes/cc-styles.el: Amend the doc-string of c-set-style, in 15844 * progmodes/cc-styles.el: Amend the doc-string of c-set-style, in
15845 reponse to a report from Joseph Kiniry <kiniry@acm.org> that it 15845 response to a report from Joseph Kiniry <kiniry@acm.org> that it
15846 was difficult to understand. 15846 was difficult to understand.
15847 15847
158482005-12-08 Martin Stjernholm <bug-cc-mode@gnu.org> 158482005-12-08 Martin Stjernholm <bug-cc-mode@gnu.org>
@@ -18459,7 +18459,7 @@
18459 reveal-open-spots, so as to be more reliable. There were several 18459 reveal-open-spots, so as to be more reliable. There were several
18460 tricky corner cases where an open spot might be lost, or where 18460 tricky corner cases where an open spot might be lost, or where
18461 a closed spot might end up on the list of open spots. 18461 a closed spot might end up on the list of open spots.
18462 Only reveal text that's ellipsised. 18462 Only reveal text that's ellipsized.
18463 18463
184642005-11-07 Carsten Dominik <dominik@science.uva.nl> 184642005-11-07 Carsten Dominik <dominik@science.uva.nl>
18465 18465
@@ -27413,7 +27413,7 @@
27413 which has been added in Emacs 21.1. 27413 which has been added in Emacs 21.1.
27414 (c-mode, c++-mode, objc-mode, java-mode, idl-mode, pike-mode) 27414 (c-mode, c++-mode, objc-mode, java-mode, idl-mode, pike-mode)
27415 (awk-mode): Use it. 27415 (awk-mode): Use it.
27416 (make-local-hook): Suppress warning about obsoleteness. 27416 (make-local-hook): Suppress warning about obsolescence.
27417 27417
27418 * progmodes/cc-engine.el, cc-align.el, cc-cmds.el 27418 * progmodes/cc-engine.el, cc-align.el, cc-cmds.el
27419 (c-append-backslashes-forward, c-delete-backslashes-forward) 27419 (c-append-backslashes-forward, c-delete-backslashes-forward)
diff --git a/lisp/ChangeLog.13 b/lisp/ChangeLog.13
index 12eadc6aadf..558718a5a5f 100644
--- a/lisp/ChangeLog.13
+++ b/lisp/ChangeLog.13
@@ -7261,7 +7261,7 @@
7261 * progmodes/gdb-ui.el (gdb-parent-bptno-enabled): New variable. 7261 * progmodes/gdb-ui.el (gdb-parent-bptno-enabled): New variable.
7262 (gdb-breakpoint-regexp, gdb-mouse-toggle-breakpoint-margin) 7262 (gdb-breakpoint-regexp, gdb-mouse-toggle-breakpoint-margin)
7263 (gdb-mouse-toggle-breakpoint-fringe, gdb-delete-breakpoint) 7263 (gdb-mouse-toggle-breakpoint-fringe, gdb-delete-breakpoint)
7264 (gdb-goto-breakpoint): Generalise for breakpoints with multiple 7264 (gdb-goto-breakpoint): Generalize for breakpoints with multiple
7265 locations. 7265 locations.
7266 (gdb-info-breakpoints-custom, gdb-assembler-custom) 7266 (gdb-info-breakpoints-custom, gdb-assembler-custom)
7267 (gdb-toggle-breakpoint): Update for new gdb-breakpoint-regexp. 7267 (gdb-toggle-breakpoint): Update for new gdb-breakpoint-regexp.
@@ -8010,7 +8010,7 @@
80102007-10-31 Juanma Barranquero <lekktu@gmail.com> 80102007-10-31 Juanma Barranquero <lekktu@gmail.com>
8011 8011
8012 * help-at-pt.el (help-at-pt-unload-hook): Remove. 8012 * help-at-pt.el (help-at-pt-unload-hook): Remove.
8013 Timers are automatically cancelled by `unload-feature'. 8013 Timers are automatically canceled by `unload-feature'.
8014 8014
8015 * delsel.el (delsel-unload-hook): Remove function and variable. 8015 * delsel.el (delsel-unload-hook): Remove function and variable.
8016 (delsel-unload-function): New-style unload function, adapted 8016 (delsel-unload-function): New-style unload function, adapted
@@ -10869,7 +10869,7 @@
10869 10869
108702007-09-23 Glenn Morris <rgm@gnu.org> 108702007-09-23 Glenn Morris <rgm@gnu.org>
10871 10871
10872 * ses.el (ses-calculate-cell): Don't evaluate unsafe formulae. 10872 * ses.el (ses-calculate-cell): Don't evaluate unsafe formulas.
10873 10873
108742007-09-23 Dan Nicolaescu <dann@ics.uci.edu> 108742007-09-23 Dan Nicolaescu <dann@ics.uci.edu>
10875 10875
diff --git a/lisp/ChangeLog.14 b/lisp/ChangeLog.14
index 0348a0141a2..5620b90a3f4 100644
--- a/lisp/ChangeLog.14
+++ b/lisp/ChangeLog.14
@@ -866,7 +866,7 @@
866 866
867 * calc/calc-embed.el (calc-embedded-restore-original-modes): 867 * calc/calc-embed.el (calc-embedded-restore-original-modes):
868 Add argument for Calculator buffer. 868 Add argument for Calculator buffer.
869 (calc-do-embedded): Use specific Calculator buffer when cancelling 869 (calc-do-embedded): Use specific Calculator buffer when canceling
870 embedded mode. 870 embedded mode.
871 871
872 * calc/calc.el (calc-buffer-list): New variable. 872 * calc/calc.el (calc-buffer-list): New variable.
@@ -3473,7 +3473,7 @@
34732009-01-10 Dan Nicolaescu <dann@ics.uci.edu> 34732009-01-10 Dan Nicolaescu <dann@ics.uci.edu>
3474 3474
3475 * diff-mode.el (diff-show-trailing-whitespaces): Remove function. 3475 * diff-mode.el (diff-show-trailing-whitespaces): Remove function.
3476 Move setting up whitepace-mode ... 3476 Move setting up whitespace-mode ...
3477 (diff-mode): ... here. 3477 (diff-mode): ... here.
3478 (diff-mode-menu): Add a menu entry for showing trailing whitespace. 3478 (diff-mode-menu): Add a menu entry for showing trailing whitespace.
3479 3479
@@ -19176,7 +19176,7 @@
19176 toggle-read-only. 19176 toggle-read-only.
19177 19177
19178 * textmodes/bibtex.el (bibtex-format-entry): Handle error message 19178 * textmodes/bibtex.el (bibtex-format-entry): Handle error message
19179 refering to a missing required field with the OPT prefix. 19179 referring to a missing required field with the OPT prefix.
19180 Make unwindform more robust. 19180 Make unwindform more robust.
19181 19181
19182 * textmodes/bibtex.el: Remove support for hideshow minor mode as 19182 * textmodes/bibtex.el: Remove support for hideshow minor mode as
diff --git a/lisp/ChangeLog.15 b/lisp/ChangeLog.15
index e0c244d5725..6e13c1156ce 100644
--- a/lisp/ChangeLog.15
+++ b/lisp/ChangeLog.15
@@ -7086,7 +7086,7 @@
7086 (sql-mode-oracle-font-lock-keywords): Improve SQL*Plus REMARK 7086 (sql-mode-oracle-font-lock-keywords): Improve SQL*Plus REMARK
7087 syntax pattern. 7087 syntax pattern.
7088 (sql-mode-postgres-font-lock-keywords): Support Postgres V9. 7088 (sql-mode-postgres-font-lock-keywords): Support Postgres V9.
7089 (sql-mode-sqlite-font-lock-keywords): Hilight sqlite commands. 7089 (sql-mode-sqlite-font-lock-keywords): Highlight sqlite commands.
7090 7090
70912010-09-10 Lars Magne Ingebrigtsen <larsi@gnus.org> 70912010-09-10 Lars Magne Ingebrigtsen <larsi@gnus.org>
7092 7092
@@ -8618,7 +8618,7 @@
8618 (menu-bar-showhide-tool-bar-menu-customize-enable-right) 8618 (menu-bar-showhide-tool-bar-menu-customize-enable-right)
8619 (menu-bar-showhide-tool-bar-menu-customize-enable-bottom) 8619 (menu-bar-showhide-tool-bar-menu-customize-enable-bottom)
8620 (menu-bar-showhide-tool-bar-menu-customize-enable-top): New functions 8620 (menu-bar-showhide-tool-bar-menu-customize-enable-top): New functions
8621 (menu-bar-showhide-tool-bar-menu): If tool bar is moveable, 8621 (menu-bar-showhide-tool-bar-menu): If tool bar is movable,
8622 make a menu for Options => toolbar that can move it. 8622 make a menu for Options => toolbar that can move it.
8623 8623
86242010-07-29 Chong Yidong <cyd@stupidchicken.com> 86242010-07-29 Chong Yidong <cyd@stupidchicken.com>
@@ -11908,7 +11908,7 @@
11908 Add new VC methods: vc-log-incoming and vc-log-outgoing. 11908 Add new VC methods: vc-log-incoming and vc-log-outgoing.
11909 * vc.el (vc-print-log-setup-buttons): New function split out from 11909 * vc.el (vc-print-log-setup-buttons): New function split out from
11910 vc-print-log-internal. 11910 vc-print-log-internal.
11911 (vc-log-internal-common): New function, a parametrized version of 11911 (vc-log-internal-common): New function, a parameterized version of
11912 vc-print-log-internal. 11912 vc-print-log-internal.
11913 (vc-print-log-internal): Just call vc-log-internal-common with the 11913 (vc-print-log-internal): Just call vc-log-internal-common with the
11914 right arguments. 11914 right arguments.
diff --git a/lisp/ChangeLog.2 b/lisp/ChangeLog.2
index 65005a4ba47..957c9c7deff 100644
--- a/lisp/ChangeLog.2
+++ b/lisp/ChangeLog.2
@@ -60,7 +60,7 @@
60 60
611988-08-03 Robert J. Chassell (bob@frosted-flakes.ai.mit.edu) 611988-08-03 Robert J. Chassell (bob@frosted-flakes.ai.mit.edu)
62 62
63 * texinfo.el: Changed fill-colum from 75 to 72. The larger 63 * texinfo.el: Changed fill-column from 75 to 72. The larger
64 fill-column causes numerous overfull hboxes in TeX when you are 64 fill-column causes numerous overfull hboxes in TeX when you are
65 writing Emacs Lisp code that will be formatted as a Texinfo example. 65 writing Emacs Lisp code that will be formatted as a Texinfo example.
66 66
diff --git a/lisp/ChangeLog.3 b/lisp/ChangeLog.3
index cb39ca5997f..e0f9bc9ade2 100644
--- a/lisp/ChangeLog.3
+++ b/lisp/ChangeLog.3
@@ -6305,7 +6305,7 @@
6305 to "Non-echoed text: ". This conforms with the convention 6305 to "Non-echoed text: ". This conforms with the convention
6306 used by existing prompts, and gives more room to type stuff. 6306 used by existing prompts, and gives more room to type stuff.
6307 6307
6308 * comint.el (comint-last-input-start): New varible. In 6308 * comint.el (comint-last-input-start): New variable. In
6309 particular, this helps support subprocesses that insist on echoing 6309 particular, this helps support subprocesses that insist on echoing
6310 their input. Added comments to porting guide indicating that 6310 their input. Added comments to porting guide indicating that
6311 this should probably not be used for implementing history stuff. 6311 this should probably not be used for implementing history stuff.
@@ -8647,7 +8647,7 @@
8647 * comint.el, inf-lisp.el, shell.el: Updated to meet Olin's 8647 * comint.el, inf-lisp.el, shell.el: Updated to meet Olin's
8648 version 2.0 comint offerings. 8648 version 2.0 comint offerings.
8649 * ring.el: The underlying history mechanism for comint. 8649 * ring.el: The underlying history mechanism for comint.
8650 Generalised handling of a ring data type based on vectors. 8650 Generalized handling of a ring data type based on vectors.
8651 * history.el: For now, a symlink to ring.el. 8651 * history.el: For now, a symlink to ring.el.
8652 * loaddefs.el: Updated shell-prompt-pattern doc string. 8652 * loaddefs.el: Updated shell-prompt-pattern doc string.
8653 8653
diff --git a/lisp/ChangeLog.7 b/lisp/ChangeLog.7
index 934258ade67..b05707abe5c 100644
--- a/lisp/ChangeLog.7
+++ b/lisp/ChangeLog.7
@@ -884,7 +884,7 @@
8841998-07-21 Kenichi Handa <handa@etl.go.jp> 8841998-07-21 Kenichi Handa <handa@etl.go.jp>
885 885
886 * international/kkc.el (kkc-region): Handled the case that 886 * international/kkc.el (kkc-region): Handled the case that
887 conversion is cancelled. 887 conversion is canceled.
888 (kkc-terminate): Update kkc-overlay-head correctly. 888 (kkc-terminate): Update kkc-overlay-head correctly.
889 (kkc-cancel): Don't call kkc-terminate, but set kkc-converting to nil. 889 (kkc-cancel): Don't call kkc-terminate, but set kkc-converting to nil.
890 890
@@ -12129,7 +12129,7 @@
12129 12129
12130 * cc-mode.el (c-buffer-is-cc-mode): 12130 * cc-mode.el (c-buffer-is-cc-mode):
12131 Definition moved here from cc-vars.el. Also, 12131 Definition moved here from cc-vars.el. Also,
12132 put permanent-local property on variable so it's value won't get 12132 put permanent-local property on variable so its value won't get
12133 killed by kill-all-local-variables. 12133 killed by kill-all-local-variables.
12134 12134
12135 * cc-mode.el (c++-mode, java-mode, objc-mode, idl-mode): 12135 * cc-mode.el (c++-mode, java-mode, objc-mode, idl-mode):
@@ -13088,7 +13088,7 @@
13088 13088
130891997-07-25 Simon Marshall <simon@frobnitz.gnu.ai.mit.edu> 130891997-07-25 Simon Marshall <simon@frobnitz.gnu.ai.mit.edu>
13090 13090
13091 * complete.el: Customise; as subgroup of minibuffer. 13091 * complete.el: Customize; as subgroup of minibuffer.
13092 (partial-completion-mode): New option to toggle mode. 13092 (partial-completion-mode): New option to toggle mode.
13093 (partial-completion-mode): New command to toggle mode. 13093 (partial-completion-mode): New command to toggle mode.
13094 Add and remove hooks here, i.e., not at the top-level. 13094 Add and remove hooks here, i.e., not at the top-level.
@@ -13617,7 +13617,7 @@
13617 13617
136181997-07-15 Simon Marshall <simon@albert.gnu.ai.mit.edu> 136181997-07-15 Simon Marshall <simon@albert.gnu.ai.mit.edu>
13619 13619
13620 * mouse-sel.el: Customise; create mouse-sel as subgroup of mouse. 13620 * mouse-sel.el: Customize; create mouse-sel as subgroup of mouse.
13621 (mouse-sel-mode): New option to toggle mode. 13621 (mouse-sel-mode): New option to toggle mode.
13622 (mouse-sel-mode): New command to toggle mode. 13622 (mouse-sel-mode): New command to toggle mode.
13623 (mouse-sel-set-selection-function): If mouse-sel-default-bindings is 13623 (mouse-sel-set-selection-function): If mouse-sel-default-bindings is
@@ -13625,7 +13625,7 @@
13625 (mouse-sel-bindings): New function to install/restore mouse bindings. 13625 (mouse-sel-bindings): New function to install/restore mouse bindings.
13626 This is called by mouse-sel-mode, i.e., not at the top-level. 13626 This is called by mouse-sel-mode, i.e., not at the top-level.
13627 13627
13628 * delsel.el: Customise; as part of editing-basics group. 13628 * delsel.el: Customize; as part of editing-basics group.
13629 (delete-selection-mode): Convert to autoloaded option. Default to nil. 13629 (delete-selection-mode): Convert to autoloaded option. Default to nil.
13630 (delete-selection-mode): Define before option. 13630 (delete-selection-mode): Define before option.
13631 Modify pre-command-hook here, i.e., not at the top-level. 13631 Modify pre-command-hook here, i.e., not at the top-level.
@@ -14943,7 +14943,7 @@
14943 paren-matching) and put all blink-matching-paren variables in the 14943 paren-matching) and put all blink-matching-paren variables in the
14944 former (as opposed to the latter) group. 14944 former (as opposed to the latter) group.
14945 14945
14946 * paren.el: Customise; paren-showing as a subgroup of paren-matching. 14946 * paren.el: Customize; paren-showing as a subgroup of paren-matching.
14947 (show-paren-style): New variable. 14947 (show-paren-style): New variable.
14948 (show-paren-match-face) 14948 (show-paren-match-face)
14949 (show-paren-mismatch-face): New faces. 14949 (show-paren-mismatch-face): New faces.
@@ -18871,7 +18871,7 @@
18871 18871
188721997-04-16 Simon Marshall <simon@wombat.gnu.ai.mit.edu> 188721997-04-16 Simon Marshall <simon@wombat.gnu.ai.mit.edu>
18873 18873
18874 * font-lock.el: Customise. 18874 * font-lock.el: Customize.
18875 (font-lock-defaults-alist): Leave ~ syntax alone in C++. 18875 (font-lock-defaults-alist): Leave ~ syntax alone in C++.
18876 (font-lock-match-c++-style-declaration-item-and-skip-to-next): Match ~ 18876 (font-lock-match-c++-style-declaration-item-and-skip-to-next): Match ~
18877 characters here. 18877 characters here.
@@ -18883,10 +18883,10 @@
18883 (font-lock-compile-keywords): Don't set font-lock-keywords. 18883 (font-lock-compile-keywords): Don't set font-lock-keywords.
18884 (font-lock-fontify-keywords-region): Set it here. 18884 (font-lock-fontify-keywords-region): Set it here.
18885 18885
18886 * fast-lock.el: Customise. 18886 * fast-lock.el: Customize.
18887 (fast-lock-cache-data): Simplify calls of font-lock-compile-keywords. 18887 (fast-lock-cache-data): Simplify calls of font-lock-compile-keywords.
18888 18888
18889 * lazy-lock.el: Customise. 18889 * lazy-lock.el: Customize.
18890 (lazy-lock-fontify-conservatively): Fontify around WINDOW's point. 18890 (lazy-lock-fontify-conservatively): Fontify around WINDOW's point.
18891 18891
18892 * shell.el (shell-font-lock-keywords): Use EVAL form for prompt. 18892 * shell.el (shell-font-lock-keywords): Use EVAL form for prompt.
@@ -19534,7 +19534,7 @@
19534 the innermost test. This catches GNU-style comments. 19534 the innermost test. This catches GNU-style comments.
19535 19535
19536 * cc-mode.el (c-add-syntax): 19536 * cc-mode.el (c-add-syntax):
19537 Move macro definition to before it's first use. 19537 Move macro definition to before its first use.
19538 19538
19539 * cc-mode.el (c-submit-bug-report): 19539 * cc-mode.el (c-submit-bug-report):
19540 Capture buffer local variable values which are 19540 Capture buffer local variable values which are
diff --git a/lisp/ChangeLog.9 b/lisp/ChangeLog.9
index 1c38b4d9ac6..252b3854f7a 100644
--- a/lisp/ChangeLog.9
+++ b/lisp/ChangeLog.9
@@ -6620,7 +6620,7 @@
6620 (ansi-color-process-output): New function. It is automatically 6620 (ansi-color-process-output): New function. It is automatically
6621 added to comint-output-filter-functions if this is XEmacs. 6621 added to comint-output-filter-functions if this is XEmacs.
6622 (ansi-color-unfontify-region): New optional parameter for XEmacs 6622 (ansi-color-unfontify-region): New optional parameter for XEmacs
6623 compatibility. Check wether font-lock-syntactic-keywords is 6623 compatibility. Check whether font-lock-syntactic-keywords is
6624 boundp before removing the syntax table text property, as XEmacs 6624 boundp before removing the syntax table text property, as XEmacs
6625 doesn't have it. 6625 doesn't have it.
6626 (ansi-color-filter-region): Doc change. 6626 (ansi-color-filter-region): Doc change.
diff --git a/lisp/align.el b/lisp/align.el
index 0d9f351b9da..214c3add93f 100644
--- a/lisp/align.el
+++ b/lisp/align.el
@@ -109,7 +109,7 @@
109;; simple algorithm that understand only basic regular expressions. 109;; simple algorithm that understand only basic regular expressions.
110;; Parts of the code were broken up and included in vhdl-mode.el 110;; Parts of the code were broken up and included in vhdl-mode.el
111;; around this time. After several comments from users, and a need to 111;; around this time. After several comments from users, and a need to
112;; find a more robust, performant algorithm, 2.0 was born in late 112;; find a more robust, higher performing algorithm, 2.0 was born in late
113;; 1998. Many different approaches were taken (mostly due to the 113;; 1998. Many different approaches were taken (mostly due to the
114;; complexity of TeX tables), but finally a scheme was discovered 114;; complexity of TeX tables), but finally a scheme was discovered
115;; which worked fairly well for most common usage cases. Development 115;; which worked fairly well for most common usage cases. Development
@@ -1247,7 +1247,9 @@ have been aligned. No changes will be made to the buffer."
1247 (setq areas (cdr areas)))))) 1247 (setq areas (cdr areas))))))
1248 1248
1249(defmacro align--set-marker (marker-var pos &optional type) 1249(defmacro align--set-marker (marker-var pos &optional type)
1250 `(if ,marker-var 1250 "If MARKER-VAR is a marker, move it to position POS.
1251Otherwise, create a new marker at position POS, with type TYPE."
1252 `(if (markerp ,marker-var)
1251 (move-marker ,marker-var ,pos) 1253 (move-marker ,marker-var ,pos)
1252 (setq ,marker-var (copy-marker ,pos ,type)))) 1254 (setq ,marker-var (copy-marker ,pos ,type))))
1253 1255
diff --git a/lisp/allout-widgets.el b/lisp/allout-widgets.el
index dfd9adad2a7..715879534b0 100644
--- a/lisp/allout-widgets.el
+++ b/lisp/allout-widgets.el
@@ -108,7 +108,7 @@ inhibition of allout-widgets-mode."
108;;;_ > allout-widgets-setup (varname value) 108;;;_ > allout-widgets-setup (varname value)
109;;;###autoload 109;;;###autoload
110(defun allout-widgets-setup (varname value) 110(defun allout-widgets-setup (varname value)
111 "Commission or decommision allout-widgets-mode along with allout-mode. 111 "Commission or decommission allout-widgets-mode along with allout-mode.
112 112
113Meant to be used by customization of `allout-widgets-auto-activation'." 113Meant to be used by customization of `allout-widgets-auto-activation'."
114 (set-default varname value) 114 (set-default varname value)
diff --git a/lisp/allout.el b/lisp/allout.el
index 68330aa538b..480c22d31e0 100644
--- a/lisp/allout.el
+++ b/lisp/allout.el
@@ -1872,7 +1872,7 @@ at the beginning of the current entry.
1872 1872
1873 Extending Allout 1873 Extending Allout
1874 1874
1875Allout exposure and authoring activites all have associated 1875Allout exposure and authoring activities all have associated
1876hooks, by which independent code can cooperate with allout 1876hooks, by which independent code can cooperate with allout
1877without changes to the allout core. Here are key ones: 1877without changes to the allout core. Here are key ones:
1878 1878
@@ -3334,7 +3334,7 @@ coordinating with allout activity.")
3334 (run-hooks 'allout-post-undo-hook) 3334 (run-hooks 'allout-post-undo-hook)
3335 (cond ((and (= buffer-saved-size -1) 3335 (cond ((and (= buffer-saved-size -1)
3336 allout-auto-save-temporarily-disabled) 3336 allout-auto-save-temporarily-disabled)
3337 ;; user possibly undid a decryption, deinhibit auto-save: 3337 ;; user possibly undid a decryption, disinhibit auto-save:
3338 (allout-maybe-resume-auto-save-info-after-encryption)) 3338 (allout-maybe-resume-auto-save-info-after-encryption))
3339 ((save-excursion 3339 ((save-excursion
3340 (save-restriction 3340 (save-restriction
@@ -5871,7 +5871,7 @@ encryption.
5871Further, encrypting with a KEYMODE-CUE universal argument greater 5871Further, encrypting with a KEYMODE-CUE universal argument greater
5872than 4 - eg, preceded by a doubled Ctrl-U - causes association of 5872than 4 - eg, preceded by a doubled Ctrl-U - causes association of
5873the specified recipients with the file, replacing those currently 5873the specified recipients with the file, replacing those currently
5874associated with it. This can be used to deassociate any 5874associated with it. This can be used to dissociate any
5875recipients with the file, by selecting no recipients in the 5875recipients with the file, by selecting no recipients in the
5876dialog. 5876dialog.
5877 5877
@@ -5912,7 +5912,7 @@ encryption.
5912Further, encrypting with a KEYMODE-CUE universal argument greater 5912Further, encrypting with a KEYMODE-CUE universal argument greater
5913than 4 - eg, preceded by a doubled Ctrl-U - causes association of 5913than 4 - eg, preceded by a doubled Ctrl-U - causes association of
5914the specified recipients with the file, replacing those currently 5914the specified recipients with the file, replacing those currently
5915associated with it. This can be used to deassociate any 5915associated with it. This can be used to dissociate any
5916recipients with the file, by selecting no recipients in the 5916recipients with the file, by selecting no recipients in the
5917dialog. 5917dialog.
5918 5918
@@ -6045,7 +6045,7 @@ encryption.
6045Further, encrypting with a KEYMODE-CUE universal argument greater 6045Further, encrypting with a KEYMODE-CUE universal argument greater
6046than 4 - eg, preceded by a doubled Ctrl-U - causes association of 6046than 4 - eg, preceded by a doubled Ctrl-U - causes association of
6047the specified recipients with the file, replacing those currently 6047the specified recipients with the file, replacing those currently
6048associated with it. This can be used to deassociate any 6048associated with it. This can be used to dissociate any
6049recipients with the file, by selecting no recipients in the 6049recipients with the file, by selecting no recipients in the
6050dialog. 6050dialog.
6051 6051
@@ -6661,7 +6661,7 @@ To ignore intangibility, bind `inhibit-point-motion-hooks' to t."
6661 (if (/= arg 1) 6661 (if (/= arg 1)
6662 (condition-case nil (line-move (1- arg)) (error nil))) 6662 (condition-case nil (line-move (1- arg)) (error nil)))
6663 6663
6664 ;; Move to beginning-of-line, ignoring fields and invisibles. 6664 ;; Move to beginning-of-line, ignoring fields and invisible text.
6665 (skip-chars-backward "^\n") 6665 (skip-chars-backward "^\n")
6666 (while (and (not (bobp)) 6666 (while (and (not (bobp))
6667 (let ((prop 6667 (let ((prop
diff --git a/lisp/ansi-color.el b/lisp/ansi-color.el
index 4d6f02a40b7..abb6a961018 100644
--- a/lisp/ansi-color.el
+++ b/lisp/ansi-color.el
@@ -413,7 +413,7 @@ start of the region and set the face with which to start. Set
413 (setq ansi-color-context-region nil)))))) 413 (setq ansi-color-context-region nil))))))
414 414
415;; This function helps you look for overlapping overlays. This is 415;; This function helps you look for overlapping overlays. This is
416;; usefull in comint-buffers. Overlapping overlays should not happen! 416;; useful in comint-buffers. Overlapping overlays should not happen!
417;; A possible cause for bugs are the markers. If you create an overlay 417;; A possible cause for bugs are the markers. If you create an overlay
418;; up to the end of the region, then that end might coincide with the 418;; up to the end of the region, then that end might coincide with the
419;; process-mark. As text is added BEFORE the process-mark, the overlay 419;; process-mark. As text is added BEFORE the process-mark, the overlay
@@ -585,7 +585,7 @@ ANSI-CODE is used as an index into the vector."
585 "Create a new face by applying all the parameters in ESCAPE-SEQ. 585 "Create a new face by applying all the parameters in ESCAPE-SEQ.
586 586
587Should any of the parameters result in the default face (usually this is 587Should any of the parameters result in the default face (usually this is
588the parameter 0), then the effect of all previous parameters is cancelled. 588the parameter 0), then the effect of all previous parameters is canceled.
589 589
590ESCAPE-SEQ is a SGR control sequences such as \\033[34m. The parameter 590ESCAPE-SEQ is a SGR control sequences such as \\033[34m. The parameter
59134 is used by `ansi-color-get-face-1' to return a face definition." 59134 is used by `ansi-color-get-face-1' to return a face definition."
diff --git a/lisp/arc-mode.el b/lisp/arc-mode.el
index 48b4c5be164..816291166fa 100644
--- a/lisp/arc-mode.el
+++ b/lisp/arc-mode.el
@@ -860,13 +860,13 @@ using `make-temp-file', and the generated name is returned."
860 dir))) 860 dir)))
861 (if (or alien (file-exists-p fullname)) 861 (if (or alien (file-exists-p fullname))
862 (progn 862 (progn
863 ;; Maked sure all the leading directories in 863 ;; Make sure all the leading directories in
864 ;; archive-local-name exist under archive-tmpdir, so that 864 ;; archive-local-name exist under archive-tmpdir, so that
865 ;; the directory structure recorded in the archive is 865 ;; the directory structure recorded in the archive is
866 ;; reconstructed in the temporary directory. 866 ;; reconstructed in the temporary directory.
867 (make-directory (file-name-directory tmpfile) t) 867 (make-directory (file-name-directory tmpfile) t)
868 (make-temp-file tmpfile)) 868 (make-temp-file tmpfile))
869 ;; Maked sure all the leading directories in `fullname' exist 869 ;; Make sure all the leading directories in `fullname' exist
870 ;; under archive-tmpdir. This is necessary for nested archives 870 ;; under archive-tmpdir. This is necessary for nested archives
871 ;; (`archive-extract' sets `archive-remote' to t in case 871 ;; (`archive-extract' sets `archive-remote' to t in case
872 ;; an archive occurs inside another archive). 872 ;; an archive occurs inside another archive).
diff --git a/lisp/battery.el b/lisp/battery.el
index 3b245ed644d..bb899f2beae 100644
--- a/lisp/battery.el
+++ b/lisp/battery.el
@@ -421,10 +421,15 @@ format introduced in Linux version 2.4.25.
421 421
422The following %-sequences are provided: 422The following %-sequences are provided:
423%c Current capacity (mAh or mWh) 423%c Current capacity (mAh or mWh)
424%r Current rate
424%B Battery status (verbose) 425%B Battery status (verbose)
426%d Temperature (in degrees Celsius)
425%p Battery load percentage 427%p Battery load percentage
426%L AC line status (verbose)" 428%L AC line status (verbose)
427 (let (charging-state 429%m Remaining time (to charge or discharge) in minutes
430%h Remaining time (to charge or discharge) in hours
431%t Remaining time (to charge or discharge) in the form `h:min'"
432 (let (charging-state rate temperature hours
428 (charge-full 0.0) 433 (charge-full 0.0)
429 (charge-now 0.0) 434 (charge-now 0.0)
430 (energy-full 0.0) 435 (energy-full 0.0)
@@ -444,6 +449,12 @@ The following %-sequences are provided:
444 (and (re-search-forward "POWER_SUPPLY_STATUS=\\(.*\\)$" nil t) 449 (and (re-search-forward "POWER_SUPPLY_STATUS=\\(.*\\)$" nil t)
445 (member charging-state '("Unknown" "Full" nil)) 450 (member charging-state '("Unknown" "Full" nil))
446 (setq charging-state (match-string 1))) 451 (setq charging-state (match-string 1)))
452 (when (re-search-forward
453 "POWER_SUPPLY_\\(CURRENT\\|POWER\\)_NOW=\\([0-9]*\\)$"
454 nil t)
455 (setq rate (float (string-to-number (match-string 2)))))
456 (when (re-search-forward "POWER_SUPPLY_TEMP=\\([0-9]*\\)$" nil t)
457 (setq temperature (match-string 1)))
447 (let (full-string now-string) 458 (let (full-string now-string)
448 ;; Sysfs may list either charge (mAh) or energy (mWh). 459 ;; Sysfs may list either charge (mAh) or energy (mWh).
449 ;; Keep track of both, and choose which to report later. 460 ;; Keep track of both, and choose which to report later.
@@ -466,12 +477,30 @@ The following %-sequences are provided:
466 (setq energy-full (+ energy-full 477 (setq energy-full (+ energy-full
467 (string-to-number full-string)) 478 (string-to-number full-string))
468 energy-now (+ energy-now 479 energy-now (+ energy-now
469 (string-to-number now-string))))))))) 480 (string-to-number now-string))))))
481 (goto-char (point-min))
482 (when (and energy-now rate (not (zerop rate))
483 (re-search-forward
484 "POWER_SUPPLY_VOLTAGE_NOW=\\([0-9]*\\)$" nil t))
485 (let ((remaining (if (string= charging-state "Discharging")
486 energy-now
487 (- energy-full energy-now))))
488 (setq hours (/ (/ (* remaining (string-to-number
489 (match-string 1)))
490 rate)
491 10000000.0)))))))
470 (list (cons ?c (cond ((or (> charge-full 0) (> charge-now 0)) 492 (list (cons ?c (cond ((or (> charge-full 0) (> charge-now 0))
471 (number-to-string charge-now)) 493 (number-to-string charge-now))
472 ((or (> energy-full 0) (> energy-now 0)) 494 ((or (> energy-full 0) (> energy-now 0))
473 (number-to-string energy-now)) 495 (number-to-string energy-now))
474 (t "N/A"))) 496 (t "N/A")))
497 (cons ?r (if rate (format "%.1f" (/ rate 1000000.0)) "N/A"))
498 (cons ?m (if hours (format "%d" (* hours 60)) "N/A"))
499 (cons ?h (if hours (format "%d" hours) "N/A"))
500 (cons ?t (if hours
501 (format "%d:%02d" hours (* (- hours (floor hours)) 60))
502 "N/A"))
503 (cons ?d (or temperature "N/A"))
475 (cons ?B (or charging-state "N/A")) 504 (cons ?B (or charging-state "N/A"))
476 (cons ?p (cond ((> charge-full 0) 505 (cons ?p (cond ((> charge-full 0)
477 (format "%.1f" 506 (format "%.1f"
diff --git a/lisp/calc/calc-alg.el b/lisp/calc/calc-alg.el
index 274f399fe6a..5ad1e58b45c 100644
--- a/lisp/calc/calc-alg.el
+++ b/lisp/calc/calc-alg.el
@@ -1841,7 +1841,7 @@
1841 expr)))) 1841 expr))))
1842 1842
1843;;; Simplify a polynomial in list form by stripping off high-end zeros. 1843;;; Simplify a polynomial in list form by stripping off high-end zeros.
1844;;; This always leaves the constant part, i.e., nil->nil and nonnil->nonnil. 1844;;; This always leaves the constant part, i.e., nil->nil and non-nil->non-nil.
1845(defun math-poly-simplify (p) 1845(defun math-poly-simplify (p)
1846 (and p 1846 (and p
1847 (if (Math-zerop (nth (1- (length p)) p)) 1847 (if (Math-zerop (nth (1- (length p)) p))
diff --git a/lisp/calc/calc-menu.el b/lisp/calc/calc-menu.el
index d8099b0aadc..d8c01656784 100644
--- a/lisp/calc/calc-menu.el
+++ b/lisp/calc/calc-menu.el
@@ -24,19 +24,19 @@
24(defvar calc-arithmetic-menu 24(defvar calc-arithmetic-menu
25 (list "Arithmetic" 25 (list "Arithmetic"
26 (list "Basic" 26 (list "Basic"
27 ["-(1:)" calc-change-sign 27 ["-(1:)" calc-change-sign
28 :keys "n" :active (>= (calc-stack-size) 1)] 28 :keys "n" :active (>= (calc-stack-size) 1)]
29 ["(2:) + (1:)" calc-plus 29 ["(2:) + (1:)" calc-plus
30 :keys "+" :active (>= (calc-stack-size) 2)] 30 :keys "+" :active (>= (calc-stack-size) 2)]
31 ["(2:) - (1:)" calc-minus 31 ["(2:) - (1:)" calc-minus
32 :keys "-" :active (>= (calc-stack-size) 2)] 32 :keys "-" :active (>= (calc-stack-size) 2)]
33 ["(2:) * (1:)" calc-times 33 ["(2:) * (1:)" calc-times
34 :keys "*" :active (>= (calc-stack-size) 2)] 34 :keys "*" :active (>= (calc-stack-size) 2)]
35 ["(2:) / (1:)" calc-divide 35 ["(2:) / (1:)" calc-divide
36 :keys "/" :active (>= (calc-stack-size) 2)] 36 :keys "/" :active (>= (calc-stack-size) 2)]
37 ["(2:) ^ (1:)" calc-power 37 ["(2:) ^ (1:)" calc-power
38 :keys "^" :active (>= (calc-stack-size) 2)] 38 :keys "^" :active (>= (calc-stack-size) 2)]
39 ["(2:) ^ (1/(1:))" 39 ["(2:) ^ (1/(1:))"
40 (progn 40 (progn
41 (require 'calc-ext) 41 (require 'calc-ext)
42 (let ((calc-inverse-flag t)) 42 (let ((calc-inverse-flag t))
@@ -44,8 +44,8 @@
44 :keys "I ^" 44 :keys "I ^"
45 :active (>= (calc-stack-size) 2) 45 :active (>= (calc-stack-size) 2)
46 :help "The (1:)th root of (2:)"] 46 :help "The (1:)th root of (2:)"]
47 ["abs(1:)" 47 ["abs(1:)"
48 (progn 48 (progn
49 (require 'calc-arith) 49 (require 'calc-arith)
50 (call-interactively 'calc-abs)) 50 (call-interactively 'calc-abs))
51 :keys "A" 51 :keys "A"
@@ -57,7 +57,7 @@
57 (call-interactively 'calc-inv)) 57 (call-interactively 'calc-inv))
58 :keys "&" 58 :keys "&"
59 :active (>= (calc-stack-size) 1)] 59 :active (>= (calc-stack-size) 1)]
60 ["sqrt(1:)" 60 ["sqrt(1:)"
61 (progn 61 (progn
62 (require 'calc-math) 62 (require 'calc-math)
63 (call-interactively 'calc-sqrt)) 63 (call-interactively 'calc-sqrt))
@@ -70,7 +70,7 @@
70 :keys "\\" 70 :keys "\\"
71 :active (>= (calc-stack-size) 2) 71 :active (>= (calc-stack-size) 2)
72 :help "The integer quotient of (2:) over (1:)"] 72 :help "The integer quotient of (2:) over (1:)"]
73 ["(2:) mod (1:)" 73 ["(2:) mod (1:)"
74 (progn 74 (progn
75 (require 'calc-misc) 75 (require 'calc-misc)
76 (call-interactively 'calc-mod)) 76 (call-interactively 'calc-mod))
@@ -78,28 +78,28 @@
78 :active (>= (calc-stack-size) 2) 78 :active (>= (calc-stack-size) 2)
79 :help "The remainder when (2:) is divided by (1:)"]) 79 :help "The remainder when (2:) is divided by (1:)"])
80 (list "Rounding" 80 (list "Rounding"
81 ["floor(1:)" 81 ["floor(1:)"
82 (progn 82 (progn
83 (require 'calc-arith) 83 (require 'calc-arith)
84 (call-interactively 'calc-floor)) 84 (call-interactively 'calc-floor))
85 :keys "F" 85 :keys "F"
86 :active (>= (calc-stack-size) 1) 86 :active (>= (calc-stack-size) 1)
87 :help "The greatest integer less than or equal to (1:)"] 87 :help "The greatest integer less than or equal to (1:)"]
88 ["ceiling(1:)" 88 ["ceiling(1:)"
89 (progn 89 (progn
90 (require 'calc-arith) 90 (require 'calc-arith)
91 (call-interactively 'calc-ceiling)) 91 (call-interactively 'calc-ceiling))
92 :keys "I F" 92 :keys "I F"
93 :active (>= (calc-stack-size) 1) 93 :active (>= (calc-stack-size) 1)
94 :help "The smallest integer greater than or equal to (1:)"] 94 :help "The smallest integer greater than or equal to (1:)"]
95 ["round(1:)" 95 ["round(1:)"
96 (progn 96 (progn
97 (require 'calc-arith) 97 (require 'calc-arith)
98 (call-interactively 'calc-round)) 98 (call-interactively 'calc-round))
99 :keys "R" 99 :keys "R"
100 :active (>= (calc-stack-size) 1) 100 :active (>= (calc-stack-size) 1)
101 :help "The nearest integer to (1:)"] 101 :help "The nearest integer to (1:)"]
102 ["truncate(1:)" 102 ["truncate(1:)"
103 (progn 103 (progn
104 (require 'calc-arith) 104 (require 'calc-arith)
105 (call-interactively 'calc-trunc)) 105 (call-interactively 'calc-trunc))
@@ -140,32 +140,32 @@
140 :active (>= (calc-stack-size) 1) 140 :active (>= (calc-stack-size) 1)
141 :help "The argument (polar angle) of (1:)"]) 141 :help "The argument (polar angle) of (1:)"])
142 (list "Conversion" 142 (list "Conversion"
143 ["Convert (1:) to a float" 143 ["Convert (1:) to a float"
144 (progn 144 (progn
145 (require 'calc-ext) 145 (require 'calc-ext)
146 (call-interactively 'calc-float)) 146 (call-interactively 'calc-float))
147 :keys "c f" 147 :keys "c f"
148 :active (>= (calc-stack-size) 1)] 148 :active (>= (calc-stack-size) 1)]
149 ["Convert (1:) to a fraction" 149 ["Convert (1:) to a fraction"
150 (progn 150 (progn
151 (require 'calc-ext) 151 (require 'calc-ext)
152 (call-interactively 'calc-fraction)) 152 (call-interactively 'calc-fraction))
153 :keys "c F" 153 :keys "c F"
154 :active (>= (calc-stack-size) 1)]) 154 :active (>= (calc-stack-size) 1)])
155 (list "Binary" 155 (list "Binary"
156 ["Set word size" 156 ["Set word size"
157 (progn 157 (progn
158 (require 'calc-bin) 158 (require 'calc-bin)
159 (call-interactively 'calc-word-size)) 159 (call-interactively 'calc-word-size))
160 :keys "b w"] 160 :keys "b w"]
161 ["Clip (1:) to word size" 161 ["Clip (1:) to word size"
162 (progn 162 (progn
163 (require 'calc-bin) 163 (require 'calc-bin)
164 (call-interactively 'calc-clip)) 164 (call-interactively 'calc-clip))
165 :keys "b c" 165 :keys "b c"
166 :active (>= (calc-stack-size) 1) 166 :active (>= (calc-stack-size) 1)
167 :help "Reduce (1:) modulo 2^wordsize"] 167 :help "Reduce (1:) modulo 2^wordsize"]
168 ["(2:) and (1:)" 168 ["(2:) and (1:)"
169 (progn 169 (progn
170 (require 'calc-bin) 170 (require 'calc-bin)
171 (call-interactively 'calc-and)) 171 (call-interactively 'calc-and))
@@ -180,13 +180,13 @@
180 :active (>= (calc-stack-size) 2) 180 :active (>= (calc-stack-size) 2)
181 :help "Bitwise inclusive OR [modulo 2^wordsize]"] 181 :help "Bitwise inclusive OR [modulo 2^wordsize]"]
182 ["(2:) xor (1:)" 182 ["(2:) xor (1:)"
183 (progn 183 (progn
184 (require 'calc-bin) 184 (require 'calc-bin)
185 (call-interactively 'calc-xor)) 185 (call-interactively 'calc-xor))
186 :keys "b x" 186 :keys "b x"
187 :active (>= (calc-stack-size) 2) 187 :active (>= (calc-stack-size) 2)
188 :help "Bitwise exclusive OR [modulo 2^wordsize]"] 188 :help "Bitwise exclusive OR [modulo 2^wordsize]"]
189 ["diff(2:,1:)" 189 ["diff(2:,1:)"
190 (progn 190 (progn
191 (require 'calc-bin) 191 (require 'calc-bin)
192 (call-interactively 'calc-diff)) 192 (call-interactively 'calc-diff))
@@ -263,82 +263,82 @@
263 :keys "I P" 263 :keys "I P"
264 :help "Euler's constant"]) 264 :help "Euler's constant"])
265 (list "Logs and Exps" 265 (list "Logs and Exps"
266 ["ln(1:)" 266 ["ln(1:)"
267 (progn 267 (progn
268 (require 'calc-math) 268 (require 'calc-math)
269 (call-interactively 'calc-ln)) 269 (call-interactively 'calc-ln))
270 :keys "L" 270 :keys "L"
271 :active (>= (calc-stack-size) 1) 271 :active (>= (calc-stack-size) 1)
272 :help "The natural logarithm"] 272 :help "The natural logarithm"]
273 ["e^(1:)" 273 ["e^(1:)"
274 (progn 274 (progn
275 (require 'calc-math) 275 (require 'calc-math)
276 (call-interactively 'calc-exp)) 276 (call-interactively 'calc-exp))
277 :keys "E" 277 :keys "E"
278 :active (>= (calc-stack-size) 1)] 278 :active (>= (calc-stack-size) 1)]
279 ["log(1:) [base 10]" 279 ["log(1:) [base 10]"
280 (progn 280 (progn
281 (require 'calc-math) 281 (require 'calc-math)
282 (call-interactively 'calc-log10)) 282 (call-interactively 'calc-log10))
283 :keys "H L" 283 :keys "H L"
284 :active (>= (calc-stack-size) 1) 284 :active (>= (calc-stack-size) 1)
285 :help "The common logarithm"] 285 :help "The common logarithm"]
286 ["10^(1:)" 286 ["10^(1:)"
287 (progn 287 (progn
288 (require 'calc-math) 288 (require 'calc-math)
289 (let ((calc-inverse-flag t)) 289 (let ((calc-inverse-flag t))
290 (call-interactively 'calc-log10))) 290 (call-interactively 'calc-log10)))
291 :keys "I H L" 291 :keys "I H L"
292 :active (>= (calc-stack-size) 1)] 292 :active (>= (calc-stack-size) 1)]
293 ["log(2:) [base(1:)]" 293 ["log(2:) [base(1:)]"
294 (progn 294 (progn
295 (require 'calc-math) 295 (require 'calc-math)
296 (call-interactively 'calc-log)) 296 (call-interactively 'calc-log))
297 :keys "B" 297 :keys "B"
298 :active (>= (calc-stack-size) 2) 298 :active (>= (calc-stack-size) 2)
299 :help "The logarithm with an arbitrary base"] 299 :help "The logarithm with an arbitrary base"]
300 ["(2:) ^ (1:)" 300 ["(2:) ^ (1:)"
301 calc-power 301 calc-power
302 :keys "^" 302 :keys "^"
303 :active (>= (calc-stack-size) 2)]) 303 :active (>= (calc-stack-size) 2)])
304 (list "Trigonometric Functions" 304 (list "Trigonometric Functions"
305 ["sin(1:)" 305 ["sin(1:)"
306 (progn 306 (progn
307 (require 'calc-math) 307 (require 'calc-math)
308 (call-interactively 'calc-sin)) 308 (call-interactively 'calc-sin))
309 :keys "S" 309 :keys "S"
310 :active (>= (calc-stack-size) 1)] 310 :active (>= (calc-stack-size) 1)]
311 ["cos(1:)" 311 ["cos(1:)"
312 (progn 312 (progn
313 (require 'calc-math) 313 (require 'calc-math)
314 (call-interactively 'calc-cos)) 314 (call-interactively 'calc-cos))
315 :keys "C" 315 :keys "C"
316 :active (>= (calc-stack-size) 1)] 316 :active (>= (calc-stack-size) 1)]
317 ["tan(1:)" 317 ["tan(1:)"
318 (progn 318 (progn
319 (require 'calc-math) 319 (require 'calc-math)
320 (call-interactively 'calc-tan)) 320 (call-interactively 'calc-tan))
321 :keys "T" 321 :keys "T"
322 :active (>= (calc-stack-size) 1)] 322 :active (>= (calc-stack-size) 1)]
323 ["arcsin(1:)" 323 ["arcsin(1:)"
324 (progn 324 (progn
325 (require 'calc-math) 325 (require 'calc-math)
326 (call-interactively 'calc-arcsin)) 326 (call-interactively 'calc-arcsin))
327 :keys "I S" 327 :keys "I S"
328 :active (>= (calc-stack-size) 1)] 328 :active (>= (calc-stack-size) 1)]
329 ["arccos(1:)" 329 ["arccos(1:)"
330 (progn 330 (progn
331 (require 'calc-math) 331 (require 'calc-math)
332 (call-interactively 'calc-arccos)) 332 (call-interactively 'calc-arccos))
333 :keys "I C" 333 :keys "I C"
334 :active (>= (calc-stack-size) 1)] 334 :active (>= (calc-stack-size) 1)]
335 ["arctan(1:)" 335 ["arctan(1:)"
336 (progn 336 (progn
337 (require 'calc-math) 337 (require 'calc-math)
338 (call-interactively 'calc-arctan)) 338 (call-interactively 'calc-arctan))
339 :keys "I T" 339 :keys "I T"
340 :active (>= (calc-stack-size) 1)] 340 :active (>= (calc-stack-size) 1)]
341 ["arctan2(2:,1:)" 341 ["arctan2(2:,1:)"
342 (progn 342 (progn
343 (require 'calc-math) 343 (require 'calc-math)
344 (call-interactively 'calc-arctan2)) 344 (call-interactively 'calc-arctan2))
@@ -367,65 +367,65 @@
367 :style radio 367 :style radio
368 :selected (eq calc-angle-mode 'hms)]) 368 :selected (eq calc-angle-mode 'hms)])
369 (list "Hyperbolic Functions" 369 (list "Hyperbolic Functions"
370 ["sinh(1:)" 370 ["sinh(1:)"
371 (progn 371 (progn
372 (require 'calc-math) 372 (require 'calc-math)
373 (call-interactively 'calc-sinh)) 373 (call-interactively 'calc-sinh))
374 :keys "H S" 374 :keys "H S"
375 :active (>= (calc-stack-size) 1)] 375 :active (>= (calc-stack-size) 1)]
376 ["cosh(1:)" 376 ["cosh(1:)"
377 (progn 377 (progn
378 (require 'calc-math) 378 (require 'calc-math)
379 (call-interactively 'calc-cosh)) 379 (call-interactively 'calc-cosh))
380 :keys "H C" 380 :keys "H C"
381 :active (>= (calc-stack-size) 1)] 381 :active (>= (calc-stack-size) 1)]
382 ["tanh(1:)" 382 ["tanh(1:)"
383 (progn 383 (progn
384 (require 'calc-math) 384 (require 'calc-math)
385 (call-interactively 'calc-tanh)) 385 (call-interactively 'calc-tanh))
386 :keys "H T" 386 :keys "H T"
387 :active (>= (calc-stack-size) 1)] 387 :active (>= (calc-stack-size) 1)]
388 ["arcsinh(1:)" 388 ["arcsinh(1:)"
389 (progn 389 (progn
390 (require 'calc-math) 390 (require 'calc-math)
391 (call-interactively 'calc-arcsinh)) 391 (call-interactively 'calc-arcsinh))
392 :keys "I H S" 392 :keys "I H S"
393 :active (>= (calc-stack-size) 1)] 393 :active (>= (calc-stack-size) 1)]
394 ["arccosh(1:)" 394 ["arccosh(1:)"
395 (progn 395 (progn
396 (require 'calc-math) 396 (require 'calc-math)
397 (call-interactively 'calc-arccosh)) 397 (call-interactively 'calc-arccosh))
398 :keys "I H C" 398 :keys "I H C"
399 :active (>= (calc-stack-size) 1)] 399 :active (>= (calc-stack-size) 1)]
400 ["arctanh(1:)" 400 ["arctanh(1:)"
401 (progn 401 (progn
402 (require 'calc-math) 402 (require 'calc-math)
403 (call-interactively 'calc-arctanh)) 403 (call-interactively 'calc-arctanh))
404 :keys "I H T" 404 :keys "I H T"
405 :active (>= (calc-stack-size) 1)]) 405 :active (>= (calc-stack-size) 1)])
406 (list "Advanced Math Functions" 406 (list "Advanced Math Functions"
407 ["Gamma(1:)" 407 ["Gamma(1:)"
408 (progn 408 (progn
409 (require 'calc-comb) 409 (require 'calc-comb)
410 (call-interactively 'calc-gamma)) 410 (call-interactively 'calc-gamma))
411 :keys "f g" 411 :keys "f g"
412 :active (>= (calc-stack-size) 1) 412 :active (>= (calc-stack-size) 1)
413 :help "The Euler Gamma function"] 413 :help "The Euler Gamma function"]
414 ["GammaP(2:,1:)" 414 ["GammaP(2:,1:)"
415 (progn 415 (progn
416 (require 'calc-funcs) 416 (require 'calc-funcs)
417 (call-interactively 'calc-inc-gamma)) 417 (call-interactively 'calc-inc-gamma))
418 :keys "f G" 418 :keys "f G"
419 :active (>= (calc-stack-size) 2) 419 :active (>= (calc-stack-size) 2)
420 :help "The lower incomplete Gamma function"] 420 :help "The lower incomplete Gamma function"]
421 ["Beta(2:,1:)" 421 ["Beta(2:,1:)"
422 (progn 422 (progn
423 (require 'calc-funcs) 423 (require 'calc-funcs)
424 (call-interactively 'calc-beta)) 424 (call-interactively 'calc-beta))
425 :keys "f b" 425 :keys "f b"
426 :active (>= (calc-stack-size) 2) 426 :active (>= (calc-stack-size) 2)
427 :help "The Euler Beta function"] 427 :help "The Euler Beta function"]
428 ["BetaI(3:,2:,1:)" 428 ["BetaI(3:,2:,1:)"
429 (progn 429 (progn
430 (require 'calc-funcs) 430 (require 'calc-funcs)
431 (call-interactively 'calc-inc-beta)) 431 (call-interactively 'calc-inc-beta))
@@ -439,14 +439,14 @@
439 :keys "f e" 439 :keys "f e"
440 :active (>= (calc-stack-size) 1) 440 :active (>= (calc-stack-size) 1)
441 :help "The error function"] 441 :help "The error function"]
442 ["BesselJ(2:,1:)" 442 ["BesselJ(2:,1:)"
443 (progn 443 (progn
444 (require 'calc-funcs) 444 (require 'calc-funcs)
445 (call-interactively 'calc-bessel-J)) 445 (call-interactively 'calc-bessel-J))
446 :keys "f j" 446 :keys "f j"
447 :active (>= (calc-stack-size) 2) 447 :active (>= (calc-stack-size) 2)
448 :help "The Bessel function of the first kind (of order (2:))"] 448 :help "The Bessel function of the first kind (of order (2:))"]
449 ["BesselY(2:,1:)" 449 ["BesselY(2:,1:)"
450 (progn 450 (progn
451 (require 'calc-funcs) 451 (require 'calc-funcs)
452 (call-interactively 'calc-bessel-Y)) 452 (call-interactively 'calc-bessel-Y))
@@ -454,44 +454,44 @@
454 :active (>= (calc-stack-size) 2) 454 :active (>= (calc-stack-size) 2)
455 :help "The Bessel function of the second kind (of order (2:))"]) 455 :help "The Bessel function of the second kind (of order (2:))"])
456 (list "Combinatorial Functions" 456 (list "Combinatorial Functions"
457 ["gcd(2:,1:)" 457 ["gcd(2:,1:)"
458 (progn 458 (progn
459 (require 'calc-comb) 459 (require 'calc-comb)
460 (call-interactively 'calc-gcd)) 460 (call-interactively 'calc-gcd))
461 :keys "k g" 461 :keys "k g"
462 :active (>= (calc-stack-size) 2)] 462 :active (>= (calc-stack-size) 2)]
463 ["lcm(2:,1:)" 463 ["lcm(2:,1:)"
464 (progn 464 (progn
465 (require 'calc-comb) 465 (require 'calc-comb)
466 (call-interactively 'calc-lcm)) 466 (call-interactively 'calc-lcm))
467 :keys "k l" 467 :keys "k l"
468 :active (>= (calc-stack-size) 2)] 468 :active (>= (calc-stack-size) 2)]
469 ["factorial(1:)" 469 ["factorial(1:)"
470 (progn 470 (progn
471 (require 'calc-comb) 471 (require 'calc-comb)
472 (call-interactively 'calc-factorial)) 472 (call-interactively 'calc-factorial))
473 :keys "!" 473 :keys "!"
474 :active (>= (calc-stack-size) 1)] 474 :active (>= (calc-stack-size) 1)]
475 ["(2:) choose (1:)" 475 ["(2:) choose (1:)"
476 (progn 476 (progn
477 (require 'calc-comb) 477 (require 'calc-comb)
478 (call-interactively 'calc-choose)) 478 (call-interactively 'calc-choose))
479 :keys "k c" 479 :keys "k c"
480 :active (>= (calc-stack-size) 2)] 480 :active (>= (calc-stack-size) 2)]
481 ["permutations(2:,1:)" 481 ["permutations(2:,1:)"
482 (progn 482 (progn
483 (require 'calc-comb) 483 (require 'calc-comb)
484 (call-interactively 'calc-perm)) 484 (call-interactively 'calc-perm))
485 :keys "H k c" 485 :keys "H k c"
486 :active (>= (calc-stack-size) 2)] 486 :active (>= (calc-stack-size) 2)]
487 ["Primality test for (1:)" 487 ["Primality test for (1:)"
488 (progn 488 (progn
489 (require 'calc-comb) 489 (require 'calc-comb)
490 (call-interactively 'calc-prime-test)) 490 (call-interactively 'calc-prime-test))
491 :keys "k p" 491 :keys "k p"
492 :active (>= (calc-stack-size) 1) 492 :active (>= (calc-stack-size) 1)
493 :help "For large (1:), a probabilistic test"] 493 :help "For large (1:), a probabilistic test"]
494 ["Factor (1:) into primes" 494 ["Factor (1:) into primes"
495 (progn 495 (progn
496 (require 'calc-comb) 496 (require 'calc-comb)
497 (call-interactively 'calc-prime-factors)) 497 (call-interactively 'calc-prime-factors))
@@ -527,17 +527,17 @@
527 ["Help on Scientific Functions" 527 ["Help on Scientific Functions"
528 (calc-info-goto-node "Scientific Functions")]) 528 (calc-info-goto-node "Scientific Functions")])
529 "Menu for Calc's scientific functions.") 529 "Menu for Calc's scientific functions.")
530 530
531(defvar calc-algebra-menu 531(defvar calc-algebra-menu
532 (list "Algebra" 532 (list "Algebra"
533 (list "Simplification" 533 (list "Simplification"
534 ["Simplify (1:)" 534 ["Simplify (1:)"
535 (progn 535 (progn
536 (require 'calc-alg) 536 (require 'calc-alg)
537 (call-interactively 'calc-simplify)) 537 (call-interactively 'calc-simplify))
538 :keys "a s" 538 :keys "a s"
539 :active (>= (calc-stack-size) 1)] 539 :active (>= (calc-stack-size) 1)]
540 ["Simplify (1:) with extended rules" 540 ["Simplify (1:) with extended rules"
541 (progn 541 (progn
542 (require 'calc-alg) 542 (require 'calc-alg)
543 (call-interactively 'calc-simplify-extended)) 543 (call-interactively 'calc-simplify-extended))
@@ -545,72 +545,72 @@
545 :active (>= (calc-stack-size) 1) 545 :active (>= (calc-stack-size) 1)
546 :help "Apply possibly unsafe simplifications"]) 546 :help "Apply possibly unsafe simplifications"])
547 (list "Manipulation" 547 (list "Manipulation"
548 ["Expand formula (1:)" 548 ["Expand formula (1:)"
549 (progn 549 (progn
550 (require 'calc-alg) 550 (require 'calc-alg)
551 (call-interactively 'calc-expand-formula)) 551 (call-interactively 'calc-expand-formula))
552 :keys "a \"" 552 :keys "a \""
553 :active (>= (calc-stack-size) 1) 553 :active (>= (calc-stack-size) 1)
554 :help "Expand (1:) into its defining formula, if possible"] 554 :help "Expand (1:) into its defining formula, if possible"]
555 ["Evaluate variables in (1:)" 555 ["Evaluate variables in (1:)"
556 (progn 556 (progn
557 (require 'calc-ext) 557 (require 'calc-ext)
558 (call-interactively 'calc-evaluate)) 558 (call-interactively 'calc-evaluate))
559 :keys "=" 559 :keys "="
560 :active (>= (calc-stack-size) 1)] 560 :active (>= (calc-stack-size) 1)]
561 ["Make substitution in (1:)" 561 ["Make substitution in (1:)"
562 (progn 562 (progn
563 (require 'calc-alg) 563 (require 'calc-alg)
564 (call-interactively 'calc-substitute)) 564 (call-interactively 'calc-substitute))
565 :keys "a b" 565 :keys "a b"
566 :active (>= (calc-stack-size) 1) 566 :active (>= (calc-stack-size) 1)
567 :help 567 :help
568 "Substitute all occurrences of a sub-expression with a new sub-expression"]) 568 "Substitute all occurrences of a sub-expression with a new sub-expression"])
569 (list "Polynomials" 569 (list "Polynomials"
570 ["Factor (1:)" 570 ["Factor (1:)"
571 (progn 571 (progn
572 (require 'calc-alg) 572 (require 'calc-alg)
573 (call-interactively 'calc-factor)) 573 (call-interactively 'calc-factor))
574 :keys "a f" 574 :keys "a f"
575 :active (>= (calc-stack-size) 1)] 575 :active (>= (calc-stack-size) 1)]
576 ["Collect terms in (1:)" 576 ["Collect terms in (1:)"
577 (progn 577 (progn
578 (require 'calc-alg) 578 (require 'calc-alg)
579 (call-interactively 'calc-collect)) 579 (call-interactively 'calc-collect))
580 :keys "a c" 580 :keys "a c"
581 :active (>= (calc-stack-size) 1) 581 :active (>= (calc-stack-size) 1)
582 :help "Arrange as a polynomial in a given variable"] 582 :help "Arrange as a polynomial in a given variable"]
583 ["Expand (1:)" 583 ["Expand (1:)"
584 (progn 584 (progn
585 (require 'calc-alg) 585 (require 'calc-alg)
586 (call-interactively 'calc-expand)) 586 (call-interactively 'calc-expand))
587 :keys "a x" 587 :keys "a x"
588 :active (>= (calc-stack-size) 1) 588 :active (>= (calc-stack-size) 1)
589 :help "Apply distributive law everywhere"] 589 :help "Apply distributive law everywhere"]
590 ["Find roots of (1:)" 590 ["Find roots of (1:)"
591 (progn 591 (progn
592 (require 'calcalg2) 592 (require 'calcalg2)
593 (call-interactively 'calc-poly-roots)) 593 (call-interactively 'calc-poly-roots))
594 :keys "a P" 594 :keys "a P"
595 :active (>= (calc-stack-size) 1)]) 595 :active (>= (calc-stack-size) 1)])
596 (list "Calculus" 596 (list "Calculus"
597 ["Differentiate (1:)" 597 ["Differentiate (1:)"
598 (progn 598 (progn
599 (require 'calcalg2) 599 (require 'calcalg2)
600 (call-interactively 'calc-derivative)) 600 (call-interactively 'calc-derivative))
601 :keys "a d" 601 :keys "a d"
602 :active (>= (calc-stack-size) 1)] 602 :active (>= (calc-stack-size) 1)]
603 ["Integrate (1:) [indefinite]" 603 ["Integrate (1:) [indefinite]"
604 (progn 604 (progn
605 (require 'calcalg2) 605 (require 'calcalg2)
606 (call-interactively 'calc-integral)) 606 (call-interactively 'calc-integral))
607 :keys "a i" 607 :keys "a i"
608 :active (>= (calc-stack-size) 1)] 608 :active (>= (calc-stack-size) 1)]
609 ["Integrate (1:) [definite]" 609 ["Integrate (1:) [definite]"
610 (progn 610 (progn
611 (require 'calcalg2) 611 (require 'calcalg2)
612 (let ((var (read-string "Integration variable: "))) 612 (let ((var (read-string "Integration variable: ")))
613 (calc-tabular-command 'calcFunc-integ "Integration" 613 (calc-tabular-command 'calcFunc-integ "Integration"
614 "intg" nil var nil nil))) 614 "intg" nil var nil nil)))
615 :keys "C-u a i" 615 :keys "C-u a i"
616 :active (>= (calc-stack-size) 1)] 616 :active (>= (calc-stack-size) 1)]
@@ -621,20 +621,20 @@
621 :keys "a I" 621 :keys "a I"
622 :active (>= (calc-stack-size) 1) 622 :active (>= (calc-stack-size) 1)
623 :help "Integrate using the open Romberg method"] 623 :help "Integrate using the open Romberg method"]
624 ["Taylor expand (1:)" 624 ["Taylor expand (1:)"
625 (progn 625 (progn
626 (require 'calcalg2) 626 (require 'calcalg2)
627 (call-interactively 'calc-taylor)) 627 (call-interactively 'calc-taylor))
628 :keys "a t" 628 :keys "a t"
629 :active (>= (calc-stack-size) 1)] 629 :active (>= (calc-stack-size) 1)]
630 ["Minimize (2:) [initial guess = (1:)]" 630 ["Minimize (2:) [initial guess = (1:)]"
631 (progn 631 (progn
632 (require 'calcalg3) 632 (require 'calcalg3)
633 (call-interactively 'calc-find-minimum)) 633 (call-interactively 'calc-find-minimum))
634 :keys "a N" 634 :keys "a N"
635 :active (>= (calc-stack-size) 2) 635 :active (>= (calc-stack-size) 2)
636 :help "Find a local minimum"] 636 :help "Find a local minimum"]
637 ["Maximize (2:) [initial guess = (1:)]" 637 ["Maximize (2:) [initial guess = (1:)]"
638 (progn 638 (progn
639 (require 'calcalg3) 639 (require 'calcalg3)
640 (call-interactively 'calc-find-maximum)) 640 (call-interactively 'calc-find-maximum))
@@ -642,26 +642,26 @@
642 :active (>= (calc-stack-size) 2) 642 :active (>= (calc-stack-size) 2)
643 :help "Find a local maximum"]) 643 :help "Find a local maximum"])
644 (list "Solving" 644 (list "Solving"
645 ["Solve equation (1:)" 645 ["Solve equation (1:)"
646 (progn 646 (progn
647 (require 'calcalg2) 647 (require 'calcalg2)
648 (call-interactively 'calc-solve-for)) 648 (call-interactively 'calc-solve-for))
649 :keys "a S" 649 :keys "a S"
650 :active (>= (calc-stack-size) 1)] 650 :active (>= (calc-stack-size) 1)]
651 ["Solve equation (2:) numerically [initial guess = (1:)]" 651 ["Solve equation (2:) numerically [initial guess = (1:)]"
652 (progn 652 (progn
653 (require 'calcalg3) 653 (require 'calcalg3)
654 (call-interactively 'calc-find-root)) 654 (call-interactively 'calc-find-root))
655 :keys "a R" 655 :keys "a R"
656 :active (>= (calc-stack-size) 2)] 656 :active (>= (calc-stack-size) 2)]
657 ["Find roots of polynomial (1:)" 657 ["Find roots of polynomial (1:)"
658 (progn 658 (progn
659 (require 'calcalg2) 659 (require 'calcalg2)
660 (call-interactively 'calc-poly-roots)) 660 (call-interactively 'calc-poly-roots))
661 :keys "a P" 661 :keys "a P"
662 :active (>= (calc-stack-size) 1)]) 662 :active (>= (calc-stack-size) 1)])
663 (list "Curve Fitting" 663 (list "Curve Fitting"
664 ["Fit (1:)=[x values, y values] to a curve" 664 ["Fit (1:)=[x values, y values] to a curve"
665 (progn 665 (progn
666 (require 'calcalg3) 666 (require 'calcalg3)
667 (call-interactively 'calc-curve-fit)) 667 (call-interactively 'calc-curve-fit))
@@ -675,13 +675,13 @@
675 675
676(defvar calc-graphics-menu 676(defvar calc-graphics-menu
677 (list "Graphics" 677 (list "Graphics"
678 ["Graph 2D [(1:)= y values, (2:)= x values]" 678 ["Graph 2D [(1:)= y values, (2:)= x values]"
679 (progn 679 (progn
680 (require 'calc-graph) 680 (require 'calc-graph)
681 (call-interactively 'calc-graph-fast)) 681 (call-interactively 'calc-graph-fast))
682 :keys "g f" 682 :keys "g f"
683 :active (>= (calc-stack-size) 2)] 683 :active (>= (calc-stack-size) 2)]
684 ["Graph 3D [(1:)= z values, (2:)= y values, (3:)= x values]" 684 ["Graph 3D [(1:)= z values, (2:)= y values, (3:)= x values]"
685 (progn 685 (progn
686 (require 'calc-graph) 686 (require 'calc-graph)
687 (call-interactively 'calc-graph-fast-3d)) 687 (call-interactively 'calc-graph-fast-3d))
@@ -696,11 +696,11 @@
696(defvar calc-vectors-menu 696(defvar calc-vectors-menu
697 (list "Matrices/Vectors" 697 (list "Matrices/Vectors"
698 (list "Matrices" 698 (list "Matrices"
699 ["(2:) + (1:)" calc-plus 699 ["(2:) + (1:)" calc-plus
700 :keys "+" :active (>= (calc-stack-size) 2)] 700 :keys "+" :active (>= (calc-stack-size) 2)]
701 ["(2:) - (1:)" calc-minus 701 ["(2:) - (1:)" calc-minus
702 :keys "-" :active (>= (calc-stack-size) 2)] 702 :keys "-" :active (>= (calc-stack-size) 2)]
703 ["(2:) * (1:)" calc-times 703 ["(2:) * (1:)" calc-times
704 :keys "*" :active (>= (calc-stack-size) 2)] 704 :keys "*" :active (>= (calc-stack-size) 2)]
705 ["(1:)^(-1)" 705 ["(1:)^(-1)"
706 (progn 706 (progn
@@ -709,17 +709,17 @@
709 :keys "&" 709 :keys "&"
710 :active (>= (calc-stack-size) 1)] 710 :active (>= (calc-stack-size) 1)]
711 ["Create an identity matrix" 711 ["Create an identity matrix"
712 (progn 712 (progn
713 (require 'calc-vec) 713 (require 'calc-vec)
714 (call-interactively 'calc-ident)) 714 (call-interactively 'calc-ident))
715 :keys "v i"] 715 :keys "v i"]
716 ["transpose(1:)" 716 ["transpose(1:)"
717 (progn 717 (progn
718 (require 'calc-vec) 718 (require 'calc-vec)
719 (call-interactively 'calc-transpose)) 719 (call-interactively 'calc-transpose))
720 :keys "v t" 720 :keys "v t"
721 :active (>= (calc-stack-size) 1)] 721 :active (>= (calc-stack-size) 1)]
722 ["det(1:)" 722 ["det(1:)"
723 (progn 723 (progn
724 (require 'calc-mtx) 724 (require 'calc-mtx)
725 (call-interactively 'calc-mdet)) 725 (call-interactively 'calc-mdet))
@@ -731,19 +731,19 @@
731 (call-interactively 'calc-mtrace)) 731 (call-interactively 'calc-mtrace))
732 :keys "V T" 732 :keys "V T"
733 :active (>= (calc-stack-size) 1)] 733 :active (>= (calc-stack-size) 1)]
734 ["LUD decompose (1:)" 734 ["LUD decompose (1:)"
735 (progn 735 (progn
736 (require 'calc-mtx) 736 (require 'calc-mtx)
737 (call-interactively 'calc-mlud)) 737 (call-interactively 'calc-mlud))
738 :keys "V L" 738 :keys "V L"
739 :active (>= (calc-stack-size) 1)] 739 :active (>= (calc-stack-size) 1)]
740 ["Extract a row from (1:)" 740 ["Extract a row from (1:)"
741 (progn 741 (progn
742 (require 'calc-vec) 742 (require 'calc-vec)
743 (call-interactively 'calc-mrow)) 743 (call-interactively 'calc-mrow))
744 :keys "v r" 744 :keys "v r"
745 :active (>= (calc-stack-size) 1)] 745 :active (>= (calc-stack-size) 1)]
746 ["Extract a column from (1:)" 746 ["Extract a column from (1:)"
747 (progn 747 (progn
748 (require 'calc-vec) 748 (require 'calc-vec)
749 (call-interactively 'calc-mcol)) 749 (call-interactively 'calc-mcol))
@@ -756,13 +756,13 @@
756 (call-interactively 'calc-head)) 756 (call-interactively 'calc-head))
757 :keys "v h" 757 :keys "v h"
758 :active (>= (calc-stack-size) 1)] 758 :active (>= (calc-stack-size) 1)]
759 ["Extract an element from (1:)" 759 ["Extract an element from (1:)"
760 (progn 760 (progn
761 (require 'calc-vec) 761 (require 'calc-vec)
762 (call-interactively 'calc-mrow)) 762 (call-interactively 'calc-mrow))
763 :keys "v r" 763 :keys "v r"
764 :active (>= (calc-stack-size) 1)] 764 :active (>= (calc-stack-size) 1)]
765 ["Reverse (1:)" 765 ["Reverse (1:)"
766 (progn 766 (progn
767 (require 'calc-vec) 767 (require 'calc-vec)
768 (call-interactively 'calc-reverse-vector)) 768 (call-interactively 'calc-reverse-vector))
@@ -775,19 +775,19 @@
775 :keys "v u" 775 :keys "v u"
776 :active (>= (calc-stack-size) 1) 776 :active (>= (calc-stack-size) 1)
777 :help "Separate the elements of (1:)"] 777 :help "Separate the elements of (1:)"]
778 ["(2:) cross (1:)" 778 ["(2:) cross (1:)"
779 (progn 779 (progn
780 (require 'calc-vec) 780 (require 'calc-vec)
781 (call-interactively 'calc-cross)) 781 (call-interactively 'calc-cross))
782 :keys "V C" 782 :keys "V C"
783 :active (>= (calc-stack-size) 2) 783 :active (>= (calc-stack-size) 2)
784 :help "The cross product in R^3"] 784 :help "The cross product in R^3"]
785 ["(2:) dot (1:)" 785 ["(2:) dot (1:)"
786 calc-mult 786 calc-mult
787 :keys "*" 787 :keys "*"
788 :active (>= (calc-stack-size) 2) 788 :active (>= (calc-stack-size) 2)
789 :help "The dot product"] 789 :help "The dot product"]
790 ["Map a function across (1:)" 790 ["Map a function across (1:)"
791 (progn 791 (progn
792 (require 'calc-map) 792 (require 'calc-map)
793 (call-interactively 'calc-map)) 793 (call-interactively 'calc-map))
@@ -795,25 +795,25 @@
795 :active (>= (calc-stack-size) 1) 795 :active (>= (calc-stack-size) 1)
796 :help "Apply a function to each element"]) 796 :help "Apply a function to each element"])
797 (list "Vectors As Sets" 797 (list "Vectors As Sets"
798 ["Remove duplicates from (1:)" 798 ["Remove duplicates from (1:)"
799 (progn 799 (progn
800 (require 'calc-vec) 800 (require 'calc-vec)
801 (call-interactively 'calc-remove-duplicates)) 801 (call-interactively 'calc-remove-duplicates))
802 :keys "V +" 802 :keys "V +"
803 :active (>= (calc-stack-size) 1)] 803 :active (>= (calc-stack-size) 1)]
804 ["(2:) union (1:)" 804 ["(2:) union (1:)"
805 (progn 805 (progn
806 (require 'calc-vec) 806 (require 'calc-vec)
807 (call-interactively 'calc-set-union)) 807 (call-interactively 'calc-set-union))
808 :keys "V V" 808 :keys "V V"
809 :active (>= (calc-stack-size) 2)] 809 :active (>= (calc-stack-size) 2)]
810 ["(2:) intersect (1:)" 810 ["(2:) intersect (1:)"
811 (progn 811 (progn
812 (require 'calc-vec) 812 (require 'calc-vec)
813 (call-interactively 'calc-set-intersect)) 813 (call-interactively 'calc-set-intersect))
814 :keys "V ^" 814 :keys "V ^"
815 :active (>= (calc-stack-size) 2)] 815 :active (>= (calc-stack-size) 2)]
816 ["(2:) \\ (1:)" 816 ["(2:) \\ (1:)"
817 (progn 817 (progn
818 (require 'calc-vec) 818 (require 'calc-vec)
819 (call-interactively 'calc-set-difference)) 819 (call-interactively 'calc-set-difference))
@@ -821,35 +821,35 @@
821 :help "Set difference" 821 :help "Set difference"
822 :active (>= (calc-stack-size) 2)]) 822 :active (>= (calc-stack-size) 2)])
823 (list "Statistics On Vectors" 823 (list "Statistics On Vectors"
824 ["length(1:)" 824 ["length(1:)"
825 (progn 825 (progn
826 (require 'calc-stat) 826 (require 'calc-stat)
827 (call-interactively 'calc-vector-count)) 827 (call-interactively 'calc-vector-count))
828 :keys "u #" 828 :keys "u #"
829 :active (>= (calc-stack-size) 1) 829 :active (>= (calc-stack-size) 1)
830 :help "The number of data values"] 830 :help "The number of data values"]
831 ["sum(1:)" 831 ["sum(1:)"
832 (progn 832 (progn
833 (require 'calc-stat) 833 (require 'calc-stat)
834 (call-interactively 'calc-vector-sum)) 834 (call-interactively 'calc-vector-sum))
835 :keys "u +" 835 :keys "u +"
836 :active (>= (calc-stack-size) 1) 836 :active (>= (calc-stack-size) 1)
837 :help "The sum of the data values"] 837 :help "The sum of the data values"]
838 ["max(1:)" 838 ["max(1:)"
839 (progn 839 (progn
840 (require 'calc-stat) 840 (require 'calc-stat)
841 (call-interactively 'calc-vector-max)) 841 (call-interactively 'calc-vector-max))
842 :keys "u x" 842 :keys "u x"
843 :active (>= (calc-stack-size) 1) 843 :active (>= (calc-stack-size) 1)
844 :help "The maximum of the data values"] 844 :help "The maximum of the data values"]
845 ["min(1:)" 845 ["min(1:)"
846 (progn 846 (progn
847 (require 'calc-stat) 847 (require 'calc-stat)
848 (call-interactively 'calc-vector-min)) 848 (call-interactively 'calc-vector-min))
849 :keys "u N" 849 :keys "u N"
850 :active (>= (calc-stack-size) 1) 850 :active (>= (calc-stack-size) 1)
851 :help "The minumum of the data values"] 851 :help "The minimum of the data values"]
852 ["mean(1:)" 852 ["mean(1:)"
853 (progn 853 (progn
854 (require 'calc-stat) 854 (require 'calc-stat)
855 (call-interactively 'calc-vector-mean)) 855 (call-interactively 'calc-vector-mean))
@@ -863,28 +863,28 @@
863 :keys "I u M" 863 :keys "I u M"
864 :active (>= (calc-stack-size) 1) 864 :active (>= (calc-stack-size) 1)
865 :help "The average (arithmetic mean) of the data values as an error form"] 865 :help "The average (arithmetic mean) of the data values as an error form"]
866 ["sdev(1:)" 866 ["sdev(1:)"
867 (progn 867 (progn
868 (require 'calc-stat) 868 (require 'calc-stat)
869 (call-interactively 'calc-vector-sdev)) 869 (call-interactively 'calc-vector-sdev))
870 :keys "u S" 870 :keys "u S"
871 :active (>= (calc-stack-size) 1) 871 :active (>= (calc-stack-size) 1)
872 :help "The sample sdev, sqrt[sum((values - mean)^2)/(N-1)]"] 872 :help "The sample sdev, sqrt[sum((values - mean)^2)/(N-1)]"]
873 ["variance(1:)" 873 ["variance(1:)"
874 (progn 874 (progn
875 (require 'calc-stat) 875 (require 'calc-stat)
876 (call-interactively 'calc-vector-variance)) 876 (call-interactively 'calc-vector-variance))
877 :keys "H u S" 877 :keys "H u S"
878 :active (>= (calc-stack-size) 1) 878 :active (>= (calc-stack-size) 1)
879 :help "The sample variance, sum((values - mean)^2)/(N-1)"] 879 :help "The sample variance, sum((values - mean)^2)/(N-1)"]
880 ["population sdev(1:)" 880 ["population sdev(1:)"
881 (progn 881 (progn
882 (require 'calc-stat) 882 (require 'calc-stat)
883 (call-interactively 'calc-vector-pop-sdev)) 883 (call-interactively 'calc-vector-pop-sdev))
884 :keys "I u S" 884 :keys "I u S"
885 :active (>= (calc-stack-size) 1) 885 :active (>= (calc-stack-size) 1)
886 :help "The population sdev, sqrt[sum((values - mean)^2)/N]"] 886 :help "The population sdev, sqrt[sum((values - mean)^2)/N]"]
887 ["population variance(1:)" 887 ["population variance(1:)"
888 (progn 888 (progn
889 (require 'calc-stat) 889 (require 'calc-stat)
890 (call-interactively 'calc-vector-pop-variance)) 890 (call-interactively 'calc-vector-pop-variance))
@@ -937,25 +937,25 @@
937 937
938(defvar calc-units-menu 938(defvar calc-units-menu
939 (list "Units" 939 (list "Units"
940 ["Convert units in (1:)" 940 ["Convert units in (1:)"
941 (progn 941 (progn
942 (require 'calc-units) 942 (require 'calc-units)
943 (call-interactively 'calc-convert-units )) 943 (call-interactively 'calc-convert-units ))
944 :keys "u c" 944 :keys "u c"
945 :active (>= (calc-stack-size) 1)] 945 :active (>= (calc-stack-size) 1)]
946 ["Convert temperature in (1:)" 946 ["Convert temperature in (1:)"
947 (progn 947 (progn
948 (require 'calc-units) 948 (require 'calc-units)
949 (call-interactively 'calc-convert-temperature)) 949 (call-interactively 'calc-convert-temperature))
950 :keys "u t" 950 :keys "u t"
951 :active (>= (calc-stack-size) 1)] 951 :active (>= (calc-stack-size) 1)]
952 ["Simplify units in (1:)" 952 ["Simplify units in (1:)"
953 (progn 953 (progn
954 (require 'calc-units) 954 (require 'calc-units)
955 (call-interactively 'calc-simplify-units)) 955 (call-interactively 'calc-simplify-units))
956 :keys "u s" 956 :keys "u s"
957 :active (>= (calc-stack-size) 1)] 957 :active (>= (calc-stack-size) 1)]
958 ["View units table" 958 ["View units table"
959 (progn 959 (progn
960 (require 'calc-units) 960 (require 'calc-units)
961 (call-interactively 'calc-view-units-table)) 961 (call-interactively 'calc-view-units-table))
@@ -1072,40 +1072,40 @@
1072 1072
1073(defvar calc-variables-menu 1073(defvar calc-variables-menu
1074 (list "Variables" 1074 (list "Variables"
1075 ["Store (1:) into a variable" 1075 ["Store (1:) into a variable"
1076 (progn 1076 (progn
1077 (require 'calc-store) 1077 (require 'calc-store)
1078 (call-interactively 'calc-store)) 1078 (call-interactively 'calc-store))
1079 :keys "s s" 1079 :keys "s s"
1080 :active (>= (calc-stack-size) 1)] 1080 :active (>= (calc-stack-size) 1)]
1081 ["Recall a variable value" 1081 ["Recall a variable value"
1082 (progn 1082 (progn
1083 (require 'calc-store) 1083 (require 'calc-store)
1084 (call-interactively 'calc-recall )) 1084 (call-interactively 'calc-recall ))
1085 :keys "s r"] 1085 :keys "s r"]
1086 ["Edit the value of a variable" 1086 ["Edit the value of a variable"
1087 (progn 1087 (progn
1088 (require 'calc-store) 1088 (require 'calc-store)
1089 (call-interactively 'calc-edit-variable)) 1089 (call-interactively 'calc-edit-variable))
1090 :keys "s e"] 1090 :keys "s e"]
1091 ["Exchange (1:) with a variable value" 1091 ["Exchange (1:) with a variable value"
1092 (progn 1092 (progn
1093 (require 'calc-store) 1093 (require 'calc-store)
1094 (call-interactively 'calc-store-exchange)) 1094 (call-interactively 'calc-store-exchange))
1095 :keys "s x" 1095 :keys "s x"
1096 :active (>= (calc-stack-size) 1)] 1096 :active (>= (calc-stack-size) 1)]
1097 ["Clear variable value" 1097 ["Clear variable value"
1098 (progn 1098 (progn
1099 (require 'calc-store) 1099 (require 'calc-store)
1100 (call-interactively 'calc-unstore)) 1100 (call-interactively 'calc-unstore))
1101 :keys "s u"] 1101 :keys "s u"]
1102 ["Evaluate variables in (1:)" 1102 ["Evaluate variables in (1:)"
1103 (progn 1103 (progn
1104 (require 'calc-ext) 1104 (require 'calc-ext)
1105 (call-interactively 'calc-evaluate)) 1105 (call-interactively 'calc-evaluate))
1106 :keys "=" 1106 :keys "="
1107 :active (>= (calc-stack-size) 1)] 1107 :active (>= (calc-stack-size) 1)]
1108 ["Evaluate (1:), assigning a value to a variable" 1108 ["Evaluate (1:), assigning a value to a variable"
1109 (progn 1109 (progn
1110 (require 'calc-store) 1110 (require 'calc-store)
1111 (call-interactively 'calc-let)) 1111 (call-interactively 'calc-let))
@@ -1119,19 +1119,19 @@
1119 1119
1120(defvar calc-stack-menu 1120(defvar calc-stack-menu
1121 (list "Stack" 1121 (list "Stack"
1122 ["Remove (1:)" 1122 ["Remove (1:)"
1123 calc-pop 1123 calc-pop
1124 :keys "DEL" 1124 :keys "DEL"
1125 :active (>= (calc-stack-size) 1)] 1125 :active (>= (calc-stack-size) 1)]
1126 ["Switch (1:) and (2:)" 1126 ["Switch (1:) and (2:)"
1127 calc-roll-down 1127 calc-roll-down
1128 :keys "TAB" 1128 :keys "TAB"
1129 :active (>= (calc-stack-size) 2)] 1129 :active (>= (calc-stack-size) 2)]
1130 ["Duplicate (1:)" 1130 ["Duplicate (1:)"
1131 calc-enter 1131 calc-enter
1132 :keys "RET" 1132 :keys "RET"
1133 :active (>= (calc-stack-size) 1)] 1133 :active (>= (calc-stack-size) 1)]
1134 ["Edit (1:)" 1134 ["Edit (1:)"
1135 (progn 1135 (progn
1136 (require 'calc-yank) 1136 (require 'calc-yank)
1137 (call-interactively calc-edit)) 1137 (call-interactively calc-edit))
@@ -1144,12 +1144,12 @@
1144 1144
1145(defvar calc-errors-menu 1145(defvar calc-errors-menu
1146 (list "Undo" 1146 (list "Undo"
1147 ["Undo" 1147 ["Undo"
1148 (progn 1148 (progn
1149 (require 'calc-undo) 1149 (require 'calc-undo)
1150 (call-interactively 'calc-undo)) 1150 (call-interactively 'calc-undo))
1151 :keys "U"] 1151 :keys "U"]
1152 ["Redo" 1152 ["Redo"
1153 (progn 1153 (progn
1154 (require 'calc-undo) 1154 (require 'calc-undo)
1155 (call-interactively 'calc-redo)) 1155 (call-interactively 'calc-redo))
@@ -1162,7 +1162,7 @@
1162 1162
1163(defvar calc-modes-menu 1163(defvar calc-modes-menu
1164 (list "Modes" 1164 (list "Modes"
1165 ["Precision" 1165 ["Precision"
1166 (progn 1166 (progn
1167 (require 'calc-ext) 1167 (require 'calc-ext)
1168 (call-interactively 'calc-precision)) 1168 (call-interactively 'calc-precision))
@@ -1277,7 +1277,7 @@
1277 ["Binary" 1277 ["Binary"
1278 (progn 1278 (progn
1279 (require 'calc-bin) 1279 (require 'calc-bin)
1280 (call-interactively 1280 (call-interactively
1281 (lambda () (interactive) (calc-binary-radix t)))) 1281 (lambda () (interactive) (calc-binary-radix t))))
1282 :keys "C-u d 2" 1282 :keys "C-u d 2"
1283 :style radio 1283 :style radio
@@ -1330,7 +1330,7 @@
1330 :keys "d e" 1330 :keys "d e"
1331 :style radio 1331 :style radio
1332 :selected (eq (car-safe calc-float-format) 'eng)]) 1332 :selected (eq (car-safe calc-float-format) 'eng)])
1333 (list "Complex Format" 1333 (list "Complex Format"
1334 ["Default" 1334 ["Default"
1335 (progn 1335 (progn
1336 (require 'calc-cplx) 1336 (require 'calc-cplx)
@@ -1522,17 +1522,17 @@
1522 1522
1523(defvar calc-help-menu 1523(defvar calc-help-menu
1524 (list "Help" 1524 (list "Help"
1525 ["Manual" 1525 ["Manual"
1526 calc-info 1526 calc-info
1527 :keys "h i"] 1527 :keys "h i"]
1528 ["Tutorial" 1528 ["Tutorial"
1529 calc-tutorial 1529 calc-tutorial
1530 :keys "h t"] 1530 :keys "h t"]
1531 ["Summary" 1531 ["Summary"
1532 calc-info-summary 1532 calc-info-summary
1533 :keys "h s"] 1533 :keys "h s"]
1534 "----" 1534 "----"
1535 ["Help on Help" 1535 ["Help on Help"
1536 (progn 1536 (progn
1537 (calc-info-goto-node "Introduction") 1537 (calc-info-goto-node "Introduction")
1538 (Info-goto-node "Help Commands"))]) 1538 (Info-goto-node "Help Commands"))])
@@ -1557,7 +1557,7 @@
1557 calc-errors-menu 1557 calc-errors-menu
1558 calc-modes-menu 1558 calc-modes-menu
1559 calc-help-menu 1559 calc-help-menu
1560 ["Reset" 1560 ["Reset"
1561 (progn 1561 (progn
1562 (require 'calc-ext) 1562 (require 'calc-ext)
1563 (call-interactively 'calc-reset)) 1563 (call-interactively 'calc-reset))
@@ -1565,4 +1565,3 @@
1565 ["Quit" calc-quit])) 1565 ["Quit" calc-quit]))
1566 1566
1567(provide 'calc-menu) 1567(provide 'calc-menu)
1568
diff --git a/lisp/calc/calc-misc.el b/lisp/calc/calc-misc.el
index 6d034927ae0..d8bdc614e67 100644
--- a/lisp/calc/calc-misc.el
+++ b/lisp/calc/calc-misc.el
@@ -219,10 +219,10 @@ Calc user interface as before (either C-x * C or C-x * K; initially C-x * C).
219 (let ((msgs 219 (let ((msgs
220 '("Press `h' for complete help; press `?' repeatedly for a summary" 220 '("Press `h' for complete help; press `?' repeatedly for a summary"
221 "Letter keys: Negate; Precision; Yank; Why; Xtended cmd; Quit" 221 "Letter keys: Negate; Precision; Yank; Why; Xtended cmd; Quit"
222 "Letter keys: SHIFT + Undo, reDo; Keep-args; Inverse, Hyperbolic, Option" 222 "Letter keys: SHIFT + Undo, reDo; Inverse, Hyperbolic, Option"
223 "Letter keys: SHIFT + sQrt; Sin, Cos, Tan; Exp, Ln, logB" 223 "Letter keys: SHIFT + sQrt; Sin, Cos, Tan; Exp, Ln, logB"
224 "Letter keys: SHIFT + Floor, Round; Abs, conJ, arG; Pi" 224 "Letter keys: SHIFT + Floor, Round; Abs, conJ, arG; Pi"
225 "Letter keys: SHIFT + Num-eval; More-recn; eXec-kbd-macro" 225 "Letter keys: SHIFT + Num-eval; More-recn; eXec-kbd-macro; Keep-args"
226 "Other keys: +, -, *, /, ^, \\ (int div), : (frac div)" 226 "Other keys: +, -, *, /, ^, \\ (int div), : (frac div)"
227 "Other keys: & (1/x), | (concat), % (modulo), ! (factorial)" 227 "Other keys: & (1/x), | (concat), % (modulo), ! (factorial)"
228 "Other keys: ' (alg-entry), = (eval), ` (edit); M-RET (last-args)" 228 "Other keys: ' (alg-entry), = (eval), ` (edit); M-RET (last-args)"
diff --git a/lisp/calc/calc-poly.el b/lisp/calc/calc-poly.el
index 97d955eb07d..e21a095c821 100644
--- a/lisp/calc/calc-poly.el
+++ b/lisp/calc/calc-poly.el
@@ -147,7 +147,7 @@
147 147
148;;; Return only quotient to top of stack (nil if zero) 148;;; Return only quotient to top of stack (nil if zero)
149 149
150;; calc-poly-div-remainder is a local variable for 150;; calc-poly-div-remainder is a local variable for
151;; calc-poly-div (in calc-alg.el), but is used by 151;; calc-poly-div (in calc-alg.el), but is used by
152;; calcFunc-pdiv, which is called by calc-poly-div. 152;; calcFunc-pdiv, which is called by calc-poly-div.
153(defvar calc-poly-div-remainder) 153(defvar calc-poly-div-remainder)
@@ -512,7 +512,7 @@
512;;; Given an expression find all variables that are polynomial bases. 512;;; Given an expression find all variables that are polynomial bases.
513;;; Return list in the form '( (var1 degree1) (var2 degree2) ... ). 513;;; Return list in the form '( (var1 degree1) (var2 degree2) ... ).
514 514
515;; The variable math-poly-base-total-base is local to 515;; The variable math-poly-base-total-base is local to
516;; math-total-polynomial-base, but is used by math-polynomial-p1, 516;; math-total-polynomial-base, but is used by math-polynomial-p1,
517;; which is called by math-total-polynomial-base. 517;; which is called by math-total-polynomial-base.
518(defvar math-poly-base-total-base) 518(defvar math-poly-base-total-base)
@@ -539,19 +539,19 @@
539 nil) 539 nil)
540 540
541;; The variable math-factored-vars is local to calcFunc-factors and 541;; The variable math-factored-vars is local to calcFunc-factors and
542;; calcFunc-factor, but is used by math-factor-expr and 542;; calcFunc-factor, but is used by math-factor-expr and
543;; math-factor-expr-part, which are called (directly and indirectly) by 543;; math-factor-expr-part, which are called (directly and indirectly) by
544;; calcFunc-factor and calcFunc-factors. 544;; calcFunc-factor and calcFunc-factors.
545(defvar math-factored-vars) 545(defvar math-factored-vars)
546 546
547;; The variable math-fact-expr is local to calcFunc-factors, 547;; The variable math-fact-expr is local to calcFunc-factors,
548;; calcFunc-factor and math-factor-expr, but is used by math-factor-expr-try 548;; calcFunc-factor and math-factor-expr, but is used by math-factor-expr-try
549;; and math-factor-expr-part, which are called (directly and indirectly) by 549;; and math-factor-expr-part, which are called (directly and indirectly) by
550;; calcFunc-factor, calcFunc-factors and math-factor-expr. 550;; calcFunc-factor, calcFunc-factors and math-factor-expr.
551(defvar math-fact-expr) 551(defvar math-fact-expr)
552 552
553;; The variable math-to-list is local to calcFunc-factors and 553;; The variable math-to-list is local to calcFunc-factors and
554;; calcFunc-factor, but is used by math-accum-factors, which is 554;; calcFunc-factor, but is used by math-accum-factors, which is
555;; called (indirectly) by calcFunc-factors and calcFunc-factor. 555;; called (indirectly) by calcFunc-factors and calcFunc-factor.
556(defvar math-to-list) 556(defvar math-to-list)
557 557
@@ -729,7 +729,7 @@
729 '(1))) 729 '(1)))
730 730
731 ;; We now have a square-free polynomial with integer coefs. 731 ;; We now have a square-free polynomial with integer coefs.
732 ;; For now, we use a kludgey method that finds linear and 732 ;; For now, we use a kludgy method that finds linear and
733 ;; quadratic terms using floating-point root-finding. 733 ;; quadratic terms using floating-point root-finding.
734 (if (setq t1 (let ((calc-symbolic-mode nil)) 734 (if (setq t1 (let ((calc-symbolic-mode nil))
735 (math-poly-all-roots nil p t))) 735 (math-poly-all-roots nil p t)))
@@ -749,7 +749,7 @@
749 (math-add 749 (math-add
750 (math-add 750 (math-add
751 (math-mul den (math-pow math-fet-x 2)) 751 (math-mul den (math-pow math-fet-x 2))
752 (math-mul (math-mul coef1 den) 752 (math-mul (math-mul coef1 den)
753 math-fet-x)) 753 math-fet-x))
754 (math-mul coef0 den))) 754 (math-mul coef0 den)))
755 (let ((den (math-lcm-denoms coef0))) 755 (let ((den (math-lcm-denoms coef0)))
@@ -1077,7 +1077,7 @@ If no partial fraction representation can be found, return nil."
1077 ((and (eq (car-safe expr) '^) 1077 ((and (eq (car-safe expr) '^)
1078 (memq (car-safe (nth 1 expr)) '(+ -)) 1078 (memq (car-safe (nth 1 expr)) '(+ -))
1079 (integerp (nth 2 expr)) 1079 (integerp (nth 2 expr))
1080 (if (and 1080 (if (and
1081 (or (math-known-matrixp (nth 1 (nth 1 expr))) 1081 (or (math-known-matrixp (nth 1 (nth 1 expr)))
1082 (math-known-matrixp (nth 2 (nth 1 expr))) 1082 (math-known-matrixp (nth 2 (nth 1 expr)))
1083 (and 1083 (and
@@ -1090,11 +1090,11 @@ If no partial fraction representation can be found, return nil."
1090 (math-add-or-sub (list '* (nth 1 (nth 1 expr)) (nth 1 expr)) 1090 (math-add-or-sub (list '* (nth 1 (nth 1 expr)) (nth 1 expr))
1091 (list '* (nth 2 (nth 1 expr)) (nth 1 expr)) 1091 (list '* (nth 2 (nth 1 expr)) (nth 1 expr))
1092 nil (eq (car (nth 1 expr)) '-)) 1092 nil (eq (car (nth 1 expr)) '-))
1093 (math-add-or-sub (list '* (nth 1 (nth 1 expr)) 1093 (math-add-or-sub (list '* (nth 1 (nth 1 expr))
1094 (list '^ (nth 1 expr) 1094 (list '^ (nth 1 expr)
1095 (1- (nth 2 expr)))) 1095 (1- (nth 2 expr))))
1096 (list '* (nth 2 (nth 1 expr)) 1096 (list '* (nth 2 (nth 1 expr))
1097 (list '^ (nth 1 expr) 1097 (list '^ (nth 1 expr)
1098 (1- (nth 2 expr)))) 1098 (1- (nth 2 expr))))
1099 nil (eq (car (nth 1 expr)) '-))) 1099 nil (eq (car (nth 1 expr)) '-)))
1100 (if (> (nth 2 expr) 0) 1100 (if (> (nth 2 expr) 0)
diff --git a/lisp/calc/calc-yank.el b/lisp/calc/calc-yank.el
index 2360cf00ddc..135ea0bae40 100644
--- a/lisp/calc/calc-yank.el
+++ b/lisp/calc/calc-yank.el
@@ -131,7 +131,7 @@
131 val)) 131 val))
132 val)))))))) 132 val))))))))
133 133
134;;; The Calc set- and get-register commands are modified versions of functions 134;;; The Calc set- and get-register commands are modified versions of functions
135;;; in register.el 135;;; in register.el
136 136
137(defvar calc-register-alist nil 137(defvar calc-register-alist nil
@@ -206,7 +206,7 @@ With prefix arg, delete as well."
206 206
207(defun calc-add-to-register (register start end prepend delete-flag) 207(defun calc-add-to-register (register start end prepend delete-flag)
208 "Add the lines in the region to register REGISTER. 208 "Add the lines in the region to register REGISTER.
209If PREPEND is non-nil, add them to the beginning of the register, 209If PREPEND is non-nil, add them to the beginning of the register,
210otherwise the end. If DELETE-FLAG is non-nil, also delete the region." 210otherwise the end. If DELETE-FLAG is non-nil, also delete the region."
211 (let* ((top-num (calc-locate-cursor-element start)) 211 (let* ((top-num (calc-locate-cursor-element start))
212 (top-pos (save-excursion 212 (top-pos (save-excursion
@@ -242,7 +242,7 @@ With prefix arg, also delete the region."
242 (if (eq major-mode 'calc-mode) 242 (if (eq major-mode 'calc-mode)
243 (calc-add-to-register register start end nil delete-flag) 243 (calc-add-to-register register start end nil delete-flag)
244 (append-to-register register start end delete-flag))) 244 (append-to-register register start end delete-flag)))
245 245
246(defun calc-prepend-to-register (register start end &optional delete-flag) 246(defun calc-prepend-to-register (register start end &optional delete-flag)
247 "Copy the lines in the region to the beginning of register REGISTER. 247 "Copy the lines in the region to the beginning of register REGISTER.
248With prefix arg, also delete the region." 248With prefix arg, also delete the region."
@@ -250,7 +250,7 @@ With prefix arg, also delete the region."
250 (if (eq major-mode 'calc-mode) 250 (if (eq major-mode 'calc-mode)
251 (calc-add-to-register register start end t delete-flag) 251 (calc-add-to-register register start end t delete-flag)
252 (prepend-to-register register start end delete-flag))) 252 (prepend-to-register register start end delete-flag)))
253 253
254 254
255 255
256(defun calc-clean-newlines (s) 256(defun calc-clean-newlines (s)
@@ -585,12 +585,12 @@ To cancel the edit, simply kill the *Calc Edit* buffer."
585 (setq calc-allow-ret allow-ret) 585 (setq calc-allow-ret allow-ret)
586 (let ((inhibit-read-only t)) 586 (let ((inhibit-read-only t))
587 (erase-buffer)) 587 (erase-buffer))
588 (add-hook 'kill-buffer-hook (lambda () 588 (add-hook 'kill-buffer-hook (lambda ()
589 (let ((calc-edit-handler nil)) 589 (let ((calc-edit-handler nil))
590 (calc-edit-finish t)) 590 (calc-edit-finish t))
591 (message "(Cancelled)")) t t) 591 (message "(Cancelled)")) t t)
592 (insert (propertize 592 (insert (propertize
593 (concat 593 (concat
594 (or title title "Calc Edit Mode. ") 594 (or title title "Calc Edit Mode. ")
595 "Press `C-c C-c'" 595 "Press `C-c C-c'"
596 (if allow-ret "" " or RET") 596 (if allow-ret "" " or RET")
diff --git a/lisp/calculator.el b/lisp/calculator.el
index 4a79316d736..faf62424729 100644
--- a/lisp/calculator.el
+++ b/lisp/calculator.el
@@ -81,7 +81,7 @@ This determines the default behavior of unary operators."
81 81
82(defcustom calculator-prompt "Calc=%s> " 82(defcustom calculator-prompt "Calc=%s> "
83 "The prompt used by the Emacs calculator. 83 "The prompt used by the Emacs calculator.
84It should contain a \"%s\" somewhere that will indicate the i/o radixes; 84It should contain a \"%s\" somewhere that will indicate the i/o radices;
85this will be a two-character string as described in the documentation 85this will be a two-character string as described in the documentation
86for `calculator-mode'." 86for `calculator-mode'."
87 :type 'string 87 :type 'string
diff --git a/lisp/calendar/appt.el b/lisp/calendar/appt.el
index c44eb6e1b5d..230366da2b0 100644
--- a/lisp/calendar/appt.el
+++ b/lisp/calendar/appt.el
@@ -508,7 +508,7 @@ The time should be in either 24 hour format or am/pm format.
508Optional argument WARNTIME is an integer (or string) giving the number 508Optional argument WARNTIME is an integer (or string) giving the number
509of minutes before the appointment at which to start warning. 509of minutes before the appointment at which to start warning.
510The default is `appt-message-warning-time'." 510The default is `appt-message-warning-time'."
511 (interactive "sTime (hh:mm[am/pm]): \nsMessage: 511 (interactive "sTime (hh:mm[am/pm]): \nsMessage: \n\
512sMinutes before the appointment to start warning: ") 512sMinutes before the appointment to start warning: ")
513 (unless (string-match appt-time-regexp time) 513 (unless (string-match appt-time-regexp time)
514 (error "Unacceptable time-string")) 514 (error "Unacceptable time-string"))
@@ -521,7 +521,7 @@ sMinutes before the appointment to start warning: ")
521 (or appt-timer (appt-activate)) 521 (or appt-timer (appt-activate))
522 (let ((time-msg (list (list (appt-convert-time time)) 522 (let ((time-msg (list (list (appt-convert-time time))
523 (concat time " " msg) t))) 523 (concat time " " msg) t)))
524 ;; It is presently non-sensical to have multiple warnings about 524 ;; It is presently nonsensical to have multiple warnings about
525 ;; the same appointment with just different delays, but it might 525 ;; the same appointment with just different delays, but it might
526 ;; not always be so. TODO 526 ;; not always be so. TODO
527 (if warntime (setq time-msg (append time-msg (list warntime)))) 527 (if warntime (setq time-msg (append time-msg (list warntime))))
diff --git a/lisp/calendar/holidays.el b/lisp/calendar/holidays.el
index 3ba1078f62d..42c95f39faa 100644
--- a/lisp/calendar/holidays.el
+++ b/lisp/calendar/holidays.el
@@ -723,7 +723,7 @@ STRING)). Returns nil if it is not visible in the current calendar window."
723 (let ((m displayed-month) 723 (let ((m displayed-month)
724 (y displayed-year)) 724 (y displayed-year))
725 (calendar-increment-month m y (- 11 month)) 725 (calendar-increment-month m y (- 11 month))
726 (if (> m 9) ; is november visible? 726 (if (> m 9) ; Is November visible?
727 (list (list (list month day y) string))))) 727 (list (list (list month day y) string)))))
728 728
729(defun holiday-float (month dayname n string &optional day) 729(defun holiday-float (month dayname n string &optional day)
diff --git a/lisp/calendar/solar.el b/lisp/calendar/solar.el
index 84a1544d709..b841ed4ab73 100644
--- a/lisp/calendar/solar.el
+++ b/lisp/calendar/solar.el
@@ -962,7 +962,7 @@ Accurate to within a minute between 1951 and 2050."
962(defun solar-mean-equinoxes/solstices (k year) 962(defun solar-mean-equinoxes/solstices (k year)
963 "Julian day of mean equinox/solstice K for YEAR. 963 "Julian day of mean equinox/solstice K for YEAR.
964K=0, spring equinox; K=1, summer solstice; K=2, fall equinox; K=3, winter 964K=0, spring equinox; K=1, summer solstice; K=2, fall equinox; K=3, winter
965solstice. These formulae are only to be used between 1000 BC and 3000 AD." 965solstice. These formulas are only to be used between 1000 BC and 3000 AD."
966 (let ((y (/ year 1000.0)) 966 (let ((y (/ year 1000.0))
967 (z (/ (- year 2000) 1000.0))) 967 (z (/ (- year 2000) 1000.0)))
968 (if (< year 1000) ; actually between -1000 and 1000 968 (if (< year 1000) ; actually between -1000 and 1000
diff --git a/lisp/cedet/ChangeLog b/lisp/cedet/ChangeLog
index f3ff89ddd7f..0e46ba73e6e 100644
--- a/lisp/cedet/ChangeLog
+++ b/lisp/cedet/ChangeLog
@@ -1,3 +1,12 @@
12011-12-19 Sam Steingold <sds@gnu.org>
2
3 * semantic/edit.el (semantic-edits-incremental-parser): Add the
4 autoload cookie, necessary for JDEE.
5
62011-12-06 Juanma Barranquero <lekktu@gmail.com>
7
8 * semantic/bovine/c.el (semantic-tag-abstract-p): Fix typo.
9
12011-11-26 Chong Yidong <cyd@gnu.org> 102011-11-26 Chong Yidong <cyd@gnu.org>
2 11
3 * semantic/wisent/python-wy.el: 12 * semantic/wisent/python-wy.el:
diff --git a/lisp/cedet/data-debug.el b/lisp/cedet/data-debug.el
index 329d1c608c2..d553c433fc4 100644
--- a/lisp/cedet/data-debug.el
+++ b/lisp/cedet/data-debug.el
@@ -1060,11 +1060,11 @@ If the result is a list or vector, then use the data debugger to display it."
1060 (setq values (cons (eval expr) values)) 1060 (setq values (cons (eval expr) values))
1061 (let ((old-value (make-symbol "t")) new-value) 1061 (let ((old-value (make-symbol "t")) new-value)
1062 ;; Bind debug-on-error to something unique so that we can 1062 ;; Bind debug-on-error to something unique so that we can
1063 ;; detect when evaled code changes it. 1063 ;; detect when evalled code changes it.
1064 (let ((debug-on-error old-value)) 1064 (let ((debug-on-error old-value))
1065 (setq values (cons (eval expr) values)) 1065 (setq values (cons (eval expr) values))
1066 (setq new-value debug-on-error)) 1066 (setq new-value debug-on-error))
1067 ;; If evaled code has changed the value of debug-on-error, 1067 ;; If evalled code has changed the value of debug-on-error,
1068 ;; propagate that change to the global binding. 1068 ;; propagate that change to the global binding.
1069 (unless (eq old-value new-value) 1069 (unless (eq old-value new-value)
1070 (setq debug-on-error new-value)))) 1070 (setq debug-on-error new-value))))
diff --git a/lisp/cedet/ede/pmake.el b/lisp/cedet/ede/pmake.el
index d78e95af27f..4065b848f54 100644
--- a/lisp/cedet/ede/pmake.el
+++ b/lisp/cedet/ede/pmake.el
@@ -335,7 +335,7 @@ NOTE: Not yet in use! This is part of an SRecode conversion of
335; 335;
336; (oref this variables)) 336; (oref this variables))
337; 337;
338; ;; Add in all variables from the configuration not allready covered. 338; ;; Add in all variables from the configuration not already covered.
339; (mapc (lambda (c) 339; (mapc (lambda (c)
340; 340;
341; (if (member (car c) conf-done) 341; (if (member (car c) conf-done)
@@ -372,7 +372,7 @@ NOTE: Not yet in use! This is part of an SRecode conversion of
372 (setq conf-done (cons (car c) conf-done)))) 372 (setq conf-done (cons (car c) conf-done))))
373 (insert (cdr c) "\n")) 373 (insert (cdr c) "\n"))
374 (oref this variables)) 374 (oref this variables))
375 ;; Add in all variables from the configuration not allready covered. 375 ;; Add in all variables from the configuration not already covered.
376 (mapc (lambda (c) 376 (mapc (lambda (c)
377 (if (member (car c) conf-done) 377 (if (member (car c) conf-done)
378 nil 378 nil
@@ -430,7 +430,7 @@ sources variable."
430 this (oref proj configuration-default))) 430 this (oref proj configuration-default)))
431 (conf-done nil) 431 (conf-done nil)
432 ) 432 )
433 ;; Add in all variables from the configuration not allready covered. 433 ;; Add in all variables from the configuration not already covered.
434 (mapc (lambda (c) 434 (mapc (lambda (c)
435 (if (member (car c) conf-done) 435 (if (member (car c) conf-done)
436 nil 436 nil
diff --git a/lisp/cedet/ede/proj-archive.el b/lisp/cedet/ede/proj-archive.el
index 23d3aa05000..23ef4850b6a 100644
--- a/lisp/cedet/ede/proj-archive.el
+++ b/lisp/cedet/ede/proj-archive.el
@@ -46,7 +46,7 @@
46(defmethod ede-proj-makefile-insert-source-variables :BEFORE 46(defmethod ede-proj-makefile-insert-source-variables :BEFORE
47 ((this ede-proj-target-makefile-archive) &optional moresource) 47 ((this ede-proj-target-makefile-archive) &optional moresource)
48 "Insert bin_PROGRAMS variables needed by target THIS. 48 "Insert bin_PROGRAMS variables needed by target THIS.
49We aren't acutally inserting SOURCE details, but this is used by the 49We aren't actually inserting SOURCE details, but this is used by the
50Makefile.am generator, so use it to add this important bin program." 50Makefile.am generator, so use it to add this important bin program."
51 (ede-pmake-insert-variable-shared 51 (ede-pmake-insert-variable-shared
52 (concat "lib" (ede-name this) "_a_LIBRARIES") 52 (concat "lib" (ede-name this) "_a_LIBRARIES")
diff --git a/lisp/cedet/ede/proj-shared.el b/lisp/cedet/ede/proj-shared.el
index 4e233f56a12..7268fb95646 100644
--- a/lisp/cedet/ede/proj-shared.el
+++ b/lisp/cedet/ede/proj-shared.el
@@ -181,7 +181,7 @@ Results in --add-missing being passed to automake."
181(defmethod ede-proj-makefile-insert-automake-pre-variables 181(defmethod ede-proj-makefile-insert-automake-pre-variables
182 ((this ede-proj-target-makefile-shared-object)) 182 ((this ede-proj-target-makefile-shared-object))
183 "Insert bin_PROGRAMS variables needed by target THIS. 183 "Insert bin_PROGRAMS variables needed by target THIS.
184We aren't acutally inserting SOURCE details, but this is used by the 184We aren't actually inserting SOURCE details, but this is used by the
185Makefile.am generator, so use it to add this important bin program." 185Makefile.am generator, so use it to add this important bin program."
186 (ede-pmake-insert-variable-shared "lib_LTLIBRARIES" 186 (ede-pmake-insert-variable-shared "lib_LTLIBRARIES"
187 (insert (concat "lib" (ede-name this) ".la")))) 187 (insert (concat "lib" (ede-name this) ".la"))))
diff --git a/lisp/cedet/inversion.el b/lisp/cedet/inversion.el
index 53639b19a96..35841d2a6b2 100644
--- a/lisp/cedet/inversion.el
+++ b/lisp/cedet/inversion.el
@@ -199,12 +199,12 @@ not an indication of new features or bug fixes."
199 (= v1-1 v2-1) 199 (= v1-1 v2-1)
200 (= v1-2 v2-2) 200 (= v1-2 v2-2)
201 (= v1-3 v2-3) 201 (= v1-3 v2-3)
202 v1-4 v2-4 ; all or nothin if elt - is = 202 v1-4 v2-4 ; all or nothing if elt - is =
203 (< v1-4 v2-4)) 203 (< v1-4 v2-4))
204 (and (= v1-0 v2-0) 204 (and (= v1-0 v2-0)
205 (= v1-1 v2-1) 205 (= v1-1 v2-1)
206 (= v1-2 v2-2) 206 (= v1-2 v2-2)
207 v1-3 v2-3 ; all or nothin if elt - is = 207 v1-3 v2-3 ; all or nothing if elt - is =
208 (< v1-3 v2-3)) 208 (< v1-3 v2-3))
209 (and (= v1-1 v2-1) 209 (and (= v1-1 v2-1)
210 (< v1-2 v2-2)) 210 (< v1-2 v2-2))
diff --git a/lisp/cedet/semantic.el b/lisp/cedet/semantic.el
index 3355ed83a91..337413caf75 100644
--- a/lisp/cedet/semantic.el
+++ b/lisp/cedet/semantic.el
@@ -680,7 +680,7 @@ Does nothing if the current buffer doesn't need reparsing."
680 (save-excursion (semantic-fetch-tags)) 680 (save-excursion (semantic-fetch-tags))
681 nil) 681 nil)
682 ;; If we are here, it is because the lexical step failed, 682 ;; If we are here, it is because the lexical step failed,
683 ;; proably due to unterminated lists or something like that. 683 ;; probably due to unterminated lists or something like that.
684 684
685 ;; We do nothing, and just wait for the next idle timer 685 ;; We do nothing, and just wait for the next idle timer
686 ;; to go off. In the meantime, remember this, and make sure 686 ;; to go off. In the meantime, remember this, and make sure
diff --git a/lisp/cedet/semantic/analyze/debug.el b/lisp/cedet/semantic/analyze/debug.el
index b02358b7243..ce8e79b19dc 100644
--- a/lisp/cedet/semantic/analyze/debug.el
+++ b/lisp/cedet/semantic/analyze/debug.el
@@ -70,7 +70,7 @@
70 (let ((pentry (nth idx pf)) 70 (let ((pentry (nth idx pf))
71 (ptentry (nth idx pft))) 71 (ptentry (nth idx pft)))
72 (if (or (stringp pentry) (not ptentry)) 72 (if (or (stringp pentry) (not ptentry))
73 ;; Found someting ok. stop 73 ;; Found something ok. Stop.
74 (setq stop t) 74 (setq stop t)
75 (setq idx (1+ idx))))) 75 (setq idx (1+ idx)))))
76 ;; We found the first non-tag entry. What is the situation? 76 ;; We found the first non-tag entry. What is the situation?
diff --git a/lisp/cedet/semantic/bovine/c.el b/lisp/cedet/semantic/bovine/c.el
index fe659d118e1..4da23498cfc 100644
--- a/lisp/cedet/semantic/bovine/c.el
+++ b/lisp/cedet/semantic/bovine/c.el
@@ -816,7 +816,7 @@ now.
816 ;; 816 ;;
817 ;; will create 2 toplevel tags, one is type A, and the other variable B 817 ;; will create 2 toplevel tags, one is type A, and the other variable B
818 ;; where the :type of B is just a type tag A that is a prototype, and 818 ;; where the :type of B is just a type tag A that is a prototype, and
819 ;; the actual struct info of A is it's own toplevel tag. 819 ;; the actual struct info of A is its own toplevel tag.
820 (when (or (semantic-tag-of-class-p tag 'function) 820 (when (or (semantic-tag-of-class-p tag 'function)
821 (semantic-tag-of-class-p tag 'variable)) 821 (semantic-tag-of-class-p tag 'variable))
822 (let* ((basetype (semantic-tag-type tag)) 822 (let* ((basetype (semantic-tag-type tag))
@@ -1311,7 +1311,7 @@ Optional PARENT and COLOR as specified with
1311 "Return non-nil if TAG is considered abstract. 1311 "Return non-nil if TAG is considered abstract.
1312PARENT is tag's parent. 1312PARENT is tag's parent.
1313In C, a method is abstract if it is `virtual', which is already 1313In C, a method is abstract if it is `virtual', which is already
1314handled. A class is abstract iff it's destructor is virtual." 1314handled. A class is abstract iff its destructor is virtual."
1315 (cond 1315 (cond
1316 ((eq (semantic-tag-class tag) 'type) 1316 ((eq (semantic-tag-class tag) 'type)
1317 (require 'semantic/find) 1317 (require 'semantic/find)
diff --git a/lisp/cedet/semantic/bovine/el.el b/lisp/cedet/semantic/bovine/el.el
index 98f744dca6e..1a2061d01e7 100644
--- a/lisp/cedet/semantic/bovine/el.el
+++ b/lisp/cedet/semantic/bovine/el.el
@@ -497,15 +497,15 @@ used to perform the override."
497Unfortunately, this requires that the tag in question has been loaded 497Unfortunately, this requires that the tag in question has been loaded
498into Emacs Lisp's memory." 498into Emacs Lisp's memory."
499 (let ((obsoletethis (intern-soft (semantic-tag-name tag))) 499 (let ((obsoletethis (intern-soft (semantic-tag-name tag)))
500 (obsoletor nil)) 500 (obsoleter nil))
501 ;; This asks if our tag is available in the Emacs name space for querying. 501 ;; This asks if our tag is available in the Emacs name space for querying.
502 (when obsoletethis 502 (when obsoletethis
503 (mapatoms (lambda (a) 503 (mapatoms (lambda (a)
504 (let ((oi (get a 'byte-obsolete-info))) 504 (let ((oi (get a 'byte-obsolete-info)))
505 (if (and oi (eq (car oi) obsoletethis)) 505 (if (and oi (eq (car oi) obsoletethis))
506 (setq obsoletor a))))) 506 (setq obsoleter a)))))
507 (if obsoletor 507 (if obsoleter
508 (format "\n@obsolete{%s,%s}" obsoletor (semantic-tag-name tag)) 508 (format "\n@obsolete{%s,%s}" obsoleter (semantic-tag-name tag))
509 "")))) 509 ""))))
510 510
511(define-mode-local-override semantic-documentation-for-tag 511(define-mode-local-override semantic-documentation-for-tag
diff --git a/lisp/cedet/semantic/db-file.el b/lisp/cedet/semantic/db-file.el
index 943ccf23031..9df240a3681 100644
--- a/lisp/cedet/semantic/db-file.el
+++ b/lisp/cedet/semantic/db-file.el
@@ -193,16 +193,16 @@ If DIRECTORY doesn't exist, create a new one."
193 (eieio-instance-tracker-find filename 'file 'semanticdb-database-list)) 193 (eieio-instance-tracker-find filename 'file 'semanticdb-database-list))
194 194
195(defmethod semanticdb-file-directory-exists-p ((DB semanticdb-project-database-file) 195(defmethod semanticdb-file-directory-exists-p ((DB semanticdb-project-database-file)
196 &optional supress-questions) 196 &optional suppress-questions)
197 "Does the directory the database DB needs to write to exist? 197 "Does the directory the database DB needs to write to exist?
198If SUPRESS-QUESTIONS, then do not ask to create the directory." 198If SUPPRESS-QUESTIONS, then do not ask to create the directory."
199 (let ((dest (file-name-directory (oref DB file))) 199 (let ((dest (file-name-directory (oref DB file)))
200 ) 200 )
201 (cond ((null dest) 201 (cond ((null dest)
202 ;; @TODO - If it was never set up... what should we do ? 202 ;; @TODO - If it was never set up... what should we do ?
203 nil) 203 nil)
204 ((file-exists-p dest) t) 204 ((file-exists-p dest) t)
205 ((or supress-questions 205 ((or suppress-questions
206 (and (boundp 'semanticdb--inhibit-make-directory) 206 (and (boundp 'semanticdb--inhibit-make-directory)
207 semanticdb--inhibit-make-directory)) 207 semanticdb--inhibit-make-directory))
208 nil) 208 nil)
@@ -216,13 +216,13 @@ If SUPRESS-QUESTIONS, then do not ask to create the directory."
216 216
217(defmethod semanticdb-save-db ((DB semanticdb-project-database-file) 217(defmethod semanticdb-save-db ((DB semanticdb-project-database-file)
218 &optional 218 &optional
219 supress-questions) 219 suppress-questions)
220 "Write out the database DB to its file. 220 "Write out the database DB to its file.
221If DB is not specified, then use the current database." 221If DB is not specified, then use the current database."
222 (let ((objname (oref DB file))) 222 (let ((objname (oref DB file)))
223 (when (and (semanticdb-dirty-p DB) 223 (when (and (semanticdb-dirty-p DB)
224 (semanticdb-live-p DB) 224 (semanticdb-live-p DB)
225 (semanticdb-file-directory-exists-p DB supress-questions) 225 (semanticdb-file-directory-exists-p DB suppress-questions)
226 (semanticdb-write-directory-p DB) 226 (semanticdb-write-directory-p DB)
227 ) 227 )
228 ;;(message "Saving tag summary for %s..." objname) 228 ;;(message "Saving tag summary for %s..." objname)
@@ -243,7 +243,7 @@ If DB is not specified, then use the current database."
243 (t 243 (t
244 ;; @todo - It should ask if we are not called from a hook. 244 ;; @todo - It should ask if we are not called from a hook.
245 ;; How? 245 ;; How?
246 (if (or supress-questions 246 (if (or suppress-questions
247 (y-or-n-p (format "Skip Error: %s ?" (car (cdr foo))))) 247 (y-or-n-p (format "Skip Error: %s ?" (car (cdr foo)))))
248 (message "Save Error: %S: %s" (car (cdr foo)) 248 (message "Save Error: %S: %s" (car (cdr foo))
249 objname) 249 objname)
diff --git a/lisp/cedet/semantic/db-find.el b/lisp/cedet/semantic/db-find.el
index 4d5d8f35f51..a651e08d53c 100644
--- a/lisp/cedet/semantic/db-find.el
+++ b/lisp/cedet/semantic/db-find.el
@@ -210,7 +210,7 @@ This class will cache data derived during various searches.")
210 "Synchronize the search index IDX with some NEW-TAGS." 210 "Synchronize the search index IDX with some NEW-TAGS."
211 ;; Reset our parts. 211 ;; Reset our parts.
212 (semantic-reset idx) 212 (semantic-reset idx)
213 ;; Notify dependants by clearning their indicies. 213 ;; Notify dependants by clearing their indices.
214 (semanticdb-notify-references 214 (semanticdb-notify-references
215 (oref idx table) 215 (oref idx table)
216 (lambda (tab me) 216 (lambda (tab me)
@@ -224,7 +224,7 @@ This class will cache data derived during various searches.")
224 (if (semantic-find-tags-by-class 'include new-tags) 224 (if (semantic-find-tags-by-class 'include new-tags)
225 (progn 225 (progn
226 (semantic-reset idx) 226 (semantic-reset idx)
227 ;; Notify dependants by clearning their indicies. 227 ;; Notify dependants by clearing their indices.
228 (semanticdb-notify-references 228 (semanticdb-notify-references
229 (oref idx table) 229 (oref idx table)
230 (lambda (tab me) 230 (lambda (tab me)
@@ -234,7 +234,7 @@ This class will cache data derived during various searches.")
234 (when (oref idx type-cache) 234 (when (oref idx type-cache)
235 (when (semanticdb-partial-synchronize (oref idx type-cache) new-tags) 235 (when (semanticdb-partial-synchronize (oref idx type-cache) new-tags)
236 ;; If the synchronize returns true, we need to notify. 236 ;; If the synchronize returns true, we need to notify.
237 ;; Notify dependants by clearning their indicies. 237 ;; Notify dependants by clearing their indices.
238 (semanticdb-notify-references 238 (semanticdb-notify-references
239 (oref idx table) 239 (oref idx table)
240 (lambda (tab me) 240 (lambda (tab me)
@@ -405,10 +405,10 @@ Default action as described in `semanticdb-find-translate-path'."
405 ;; do a caching lookup. 405 ;; do a caching lookup.
406 (let ((index (semanticdb-get-table-index table))) 406 (let ((index (semanticdb-get-table-index table)))
407 (if (semanticdb-find-need-cache-update-p table) 407 (if (semanticdb-find-need-cache-update-p table)
408 ;; Lets go look up our indicies 408 ;; Let's go look up our indices.
409 (let ((ans (semanticdb-find-translate-path-includes--internal path))) 409 (let ((ans (semanticdb-find-translate-path-includes--internal path)))
410 (oset index include-path ans) 410 (oset index include-path ans)
411 ;; Once we have our new indicies set up, notify those 411 ;; Once we have our new indices set up, notify those
412 ;; who depend on us if we found something for them to 412 ;; who depend on us if we found something for them to
413 ;; depend on. 413 ;; depend on.
414 (when ans (semanticdb-refresh-references table)) 414 (when ans (semanticdb-refresh-references table))
@@ -575,7 +575,7 @@ a new path from the provided PATH."
575 (setq ans (semanticdb-file-table 575 (setq ans (semanticdb-file-table
576 (car systemdb) 576 (car systemdb)
577 ;; I would expect most omniscient to return the same 577 ;; I would expect most omniscient to return the same
578 ;; thing reguardless of filename, but we may have 578 ;; thing regardless of filename, but we may have
579 ;; one that can return a table of all things the 579 ;; one that can return a table of all things the
580 ;; current file needs. 580 ;; current file needs.
581 (buffer-file-name (current-buffer)))) 581 (buffer-file-name (current-buffer))))
diff --git a/lisp/cedet/semantic/db.el b/lisp/cedet/semantic/db.el
index 3d2128db29a..c159a26dc1e 100644
--- a/lisp/cedet/semantic/db.el
+++ b/lisp/cedet/semantic/db.el
@@ -227,7 +227,7 @@ it is in Emacs.")
227 "Non nil if this table needs to be `Saved'.") 227 "Non nil if this table needs to be `Saved'.")
228 (db-refs :initform nil 228 (db-refs :initform nil
229 :documentation 229 :documentation
230 "List of `semanticdb-table' objects refering to this one. 230 "List of `semanticdb-table' objects referring to this one.
231These aren't saved, but are instead recalculated after load. 231These aren't saved, but are instead recalculated after load.
232See the file semantic/db-ref.el for how this slot is used.") 232See the file semantic/db-ref.el for how this slot is used.")
233 (pointmax :initarg :pointmax 233 (pointmax :initarg :pointmax
@@ -657,7 +657,7 @@ The file associated with OBJ does not need to be in a buffer."
657;;; SAVE/LOAD 657;;; SAVE/LOAD
658;; 658;;
659(defmethod semanticdb-save-db ((DB semanticdb-project-database) 659(defmethod semanticdb-save-db ((DB semanticdb-project-database)
660 &optional supress-questions) 660 &optional suppress-questions)
661 "Cause a database to save itself. 661 "Cause a database to save itself.
662The database base class does not save itself persistently. 662The database base class does not save itself persistently.
663Subclasses could save themselves to a file, or to a database, or other 663Subclasses could save themselves to a file, or to a database, or other
diff --git a/lisp/cedet/semantic/debug.el b/lisp/cedet/semantic/debug.el
index 45b807df12b..6db47f8b0be 100644
--- a/lisp/cedet/semantic/debug.el
+++ b/lisp/cedet/semantic/debug.el
@@ -175,7 +175,7 @@ TOKEN is a lexical token."
175 "For IFACE, highlight NONTERM in the parser buffer. 175 "For IFACE, highlight NONTERM in the parser buffer.
176NONTERM is the name of the rule currently being processed that shows up 176NONTERM is the name of the rule currently being processed that shows up
177as a nonterminal (or tag) in the source buffer. 177as a nonterminal (or tag) in the source buffer.
178If RULE and MATCH indicies are specified, highlight those also." 178If RULE and MATCH indices are specified, highlight those also."
179 (set-buffer (oref iface :parser-buffer)) 179 (set-buffer (oref iface :parser-buffer))
180 180
181 (let* ((rules (semantic-find-tags-by-class 'nonterminal (current-buffer))) 181 (let* ((rules (semantic-find-tags-by-class 'nonterminal (current-buffer)))
diff --git a/lisp/cedet/semantic/edit.el b/lisp/cedet/semantic/edit.el
index a2c8c5efd40..d33454eb56b 100644
--- a/lisp/cedet/semantic/edit.el
+++ b/lisp/cedet/semantic/edit.el
@@ -470,6 +470,7 @@ a 'semantic-parse-changes-failed exception with value t."
470 (buffer-name (current-buffer)))) 470 (buffer-name (current-buffer))))
471 (run-hooks 'semantic-edits-incremental-reparse-failed-hook)) 471 (run-hooks 'semantic-edits-incremental-reparse-failed-hook))
472 472
473;;;###autoload
473(defun semantic-edits-incremental-parser () 474(defun semantic-edits-incremental-parser ()
474 "Incrementally reparse the current buffer. 475 "Incrementally reparse the current buffer.
475Incremental parser allows semantic to only reparse those sections of 476Incremental parser allows semantic to only reparse those sections of
@@ -859,7 +860,7 @@ pre-positioned to a convenient location."
859 (setq cacheend chil) 860 (setq cacheend chil)
860 (while (and cacheend (not (eq last (car cacheend)))) 861 (while (and cacheend (not (eq last (car cacheend))))
861 (setq cacheend (cdr cacheend))) 862 (setq cacheend (cdr cacheend)))
862 ;; The splicable part is after cacheend.. so move cacheend 863 ;; The spliceable part is after cacheend.. so move cacheend
863 ;; one more tag. 864 ;; one more tag.
864 (setq cacheend (cdr cacheend)) 865 (setq cacheend (cdr cacheend))
865 ;; Splice the found end tag into the cons cell 866 ;; Splice the found end tag into the cons cell
diff --git a/lisp/cedet/semantic/find.el b/lisp/cedet/semantic/find.el
index b4d94321bc1..a6d86691206 100644
--- a/lisp/cedet/semantic/find.el
+++ b/lisp/cedet/semantic/find.el
@@ -427,7 +427,7 @@ TABLE is a tag table. See `semantic-something-to-tag-table'."
427 427
428;;; Old Style Brute Force Search Routines 428;;; Old Style Brute Force Search Routines
429;; 429;;
430;; These functions will search through tags lists explicity for 430;; These functions will search through tags lists explicitly for
431;; desired information. 431;; desired information.
432 432
433;; The -by-name nonterminal search can use the built in fcn 433;; The -by-name nonterminal search can use the built in fcn
diff --git a/lisp/cedet/semantic/grammar.el b/lisp/cedet/semantic/grammar.el
index 98b1ab55c32..1a79adc650d 100644
--- a/lisp/cedet/semantic/grammar.el
+++ b/lisp/cedet/semantic/grammar.el
@@ -1290,7 +1290,7 @@ the change bounds to encompass the whole nonterminal tag."
1290 semantic-grammar-mode-keywords-3) 1290 semantic-grammar-mode-keywords-3)
1291 nil ;; perform string/comment fontification 1291 nil ;; perform string/comment fontification
1292 nil ;; keywords are case sensitive. 1292 nil ;; keywords are case sensitive.
1293 ;; This puts _ & - as a word constituant, 1293 ;; This puts _ & - as a word constituent,
1294 ;; simplifying our keywords significantly 1294 ;; simplifying our keywords significantly
1295 ((?_ . "w") (?- . "w")))) 1295 ((?_ . "w") (?- . "w"))))
1296 ;; Setup Semantic to parse grammar 1296 ;; Setup Semantic to parse grammar
diff --git a/lisp/cedet/semantic/idle.el b/lisp/cedet/semantic/idle.el
index 6761a7f532b..c60ca4b4b6a 100644
--- a/lisp/cedet/semantic/idle.el
+++ b/lisp/cedet/semantic/idle.el
@@ -246,8 +246,8 @@ And also manages services that depend on tag values."
246 246
247 ;; NOTE ON COMMENTED SAFE HERE 247 ;; NOTE ON COMMENTED SAFE HERE
248 ;; We used to not execute the services if the buffer was 248 ;; We used to not execute the services if the buffer was
249 ;; unparseable. We now assume that they are lexically 249 ;; unparsable. We now assume that they are lexically
250 ;; safe to do, because we have marked the buffer unparseable 250 ;; safe to do, because we have marked the buffer unparsable
251 ;; if there was a problem. 251 ;; if there was a problem.
252 ;;(when safe 252 ;;(when safe
253 (dolist (service semantic-idle-scheduler-queue) 253 (dolist (service semantic-idle-scheduler-queue)
@@ -476,7 +476,7 @@ Does nothing if the current buffer doesn't need reparsing."
476 ;; do them here, then all the bovination hooks are not run, and 476 ;; do them here, then all the bovination hooks are not run, and
477 ;; we save lots of time. 477 ;; we save lots of time.
478 (cond 478 (cond
479 ;; If the buffer was previously marked unparseable, 479 ;; If the buffer was previously marked unparsable,
480 ;; then don't waste our time. 480 ;; then don't waste our time.
481 ((semantic-parse-tree-unparseable-p) 481 ((semantic-parse-tree-unparseable-p)
482 nil) 482 nil)
@@ -515,7 +515,7 @@ Does nothing if the current buffer doesn't need reparsing."
515 (save-excursion (semantic-fetch-tags)) 515 (save-excursion (semantic-fetch-tags))
516 nil) 516 nil)
517 ;; If we are here, it is because the lexical step failed, 517 ;; If we are here, it is because the lexical step failed,
518 ;; proably due to unterminated lists or something like that. 518 ;; probably due to unterminated lists or something like that.
519 519
520 ;; We do nothing, and just wait for the next idle timer 520 ;; We do nothing, and just wait for the next idle timer
521 ;; to go off. In the meantime, remember this, and make sure 521 ;; to go off. In the meantime, remember this, and make sure
diff --git a/lisp/cedet/semantic/lex.el b/lisp/cedet/semantic/lex.el
index ba43ba657a1..f8e72c1027c 100644
--- a/lisp/cedet/semantic/lex.el
+++ b/lisp/cedet/semantic/lex.el
@@ -1248,7 +1248,7 @@ they are comment end characters) AND when you want whitespace tokens."
1248 (if (eq (semantic-lex-token-class (car semantic-lex-token-stream)) 1248 (if (eq (semantic-lex-token-class (car semantic-lex-token-stream))
1249 'whitespace) 1249 'whitespace)
1250 ;; Merge whitespace tokens together if they are adjacent. Two 1250 ;; Merge whitespace tokens together if they are adjacent. Two
1251 ;; whitespace tokens may be sperated by a comment which is not in 1251 ;; whitespace tokens may be separated by a comment which is not in
1252 ;; the token stream. 1252 ;; the token stream.
1253 (setcdr (semantic-lex-token-bounds (car semantic-lex-token-stream)) 1253 (setcdr (semantic-lex-token-bounds (car semantic-lex-token-stream))
1254 (match-end 0)) 1254 (match-end 0))
@@ -1271,7 +1271,7 @@ they are comment end characters)."
1271 (if (eq (semantic-lex-token-class (car semantic-lex-token-stream)) 1271 (if (eq (semantic-lex-token-class (car semantic-lex-token-stream))
1272 'whitespace) 1272 'whitespace)
1273 ;; Merge whitespace tokens together if they are adjacent. Two 1273 ;; Merge whitespace tokens together if they are adjacent. Two
1274 ;; whitespace tokens may be sperated by a comment which is not in 1274 ;; whitespace tokens may be separated by a comment which is not in
1275 ;; the token stream. 1275 ;; the token stream.
1276 (progn 1276 (progn
1277 (setq semantic-lex-end-point (match-end 0)) 1277 (setq semantic-lex-end-point (match-end 0))
@@ -1704,7 +1704,7 @@ If there is no error, then the last value of FORMS is returned."
1704 nil)))) 1704 nil))))
1705 ;; Great Sadness. Assume that FORMS execute within the 1705 ;; Great Sadness. Assume that FORMS execute within the
1706 ;; confines of the current buffer only! Mark this thing 1706 ;; confines of the current buffer only! Mark this thing
1707 ;; unparseable iff the special symbol was thrown. This 1707 ;; unparsable iff the special symbol was thrown. This
1708 ;; will prevent future calls from parsing, but will allow 1708 ;; will prevent future calls from parsing, but will allow
1709 ;; then to still return the cache. 1709 ;; then to still return the cache.
1710 (when ,ret 1710 (when ,ret
diff --git a/lisp/cedet/semantic/scope.el b/lisp/cedet/semantic/scope.el
index ea4903c70ea..937936032d2 100644
--- a/lisp/cedet/semantic/scope.el
+++ b/lisp/cedet/semantic/scope.el
@@ -725,7 +725,7 @@ The class returned from the scope calculation is variable
725 (oset scopecache localargs localargs) 725 (oset scopecache localargs localargs)
726 (oset scopecache localvar localvar) 726 (oset scopecache localvar localvar)
727 ))) 727 )))
728 ;; Make sure we become dependant on the typecache. 728 ;; Make sure we become dependent on the typecache.
729 (semanticdb-typecache-add-dependant scopecache) 729 (semanticdb-typecache-add-dependant scopecache)
730 ;; Handy debug output. 730 ;; Handy debug output.
731 (when (called-interactively-p 'any) 731 (when (called-interactively-p 'any)
diff --git a/lisp/cedet/semantic/tag-ls.el b/lisp/cedet/semantic/tag-ls.el
index 4d001322108..2f585cbdf45 100644
--- a/lisp/cedet/semantic/tag-ls.el
+++ b/lisp/cedet/semantic/tag-ls.el
@@ -195,7 +195,7 @@ See `semantic-tag-static-p'."
195;;;###autoload 195;;;###autoload
196(define-overloadable-function semantic-tag-prototype-p (tag) 196(define-overloadable-function semantic-tag-prototype-p (tag)
197 "Return non nil if TAG is a prototype. 197 "Return non nil if TAG is a prototype.
198For some laguages, such as C, a prototype is a declaration of 198For some languages, such as C, a prototype is a declaration of
199something without an implementation." 199something without an implementation."
200 ) 200 )
201 201
diff --git a/lisp/cedet/semantic/util-modes.el b/lisp/cedet/semantic/util-modes.el
index a08f4a31b30..13836f64b85 100644
--- a/lisp/cedet/semantic/util-modes.el
+++ b/lisp/cedet/semantic/util-modes.el
@@ -109,7 +109,7 @@ Only minor modes that are locally enabled are shown in the mode line."
109 (tail (or (memq elem minor-mode-alist) 109 (tail (or (memq elem minor-mode-alist)
110 (setq minor-mode-alist 110 (setq minor-mode-alist
111 (cons elem minor-mode-alist))))) 111 (cons elem minor-mode-alist)))))
112 (setcdr tail (nconc locals (cdr tail))))))))) 112 (setcdr tail (nconc locals (cdr tail)))))))))
113 113
114(defun semantic-desktop-ignore-this-minor-mode (buffer) 114(defun semantic-desktop-ignore-this-minor-mode (buffer)
115 "Installed as a minor-mode initializer for Desktop mode. 115 "Installed as a minor-mode initializer for Desktop mode.
@@ -438,7 +438,7 @@ The state is indicated in the modeline with the following characters:
438 `-' -> The cache is up to date. 438 `-' -> The cache is up to date.
439 `!' -> The cache requires a full update. 439 `!' -> The cache requires a full update.
440 `~' -> The cache needs to be incrementally parsed. 440 `~' -> The cache needs to be incrementally parsed.
441 `%' -> The cache is not currently parseable. 441 `%' -> The cache is not currently parsable.
442 `@' -> Auto-parse in progress (not set here.) 442 `@' -> Auto-parse in progress (not set here.)
443With prefix argument ARG, turn on if positive, otherwise off. The 443With prefix argument ARG, turn on if positive, otherwise off. The
444minor mode can be turned on only if semantic feature is available and 444minor mode can be turned on only if semantic feature is available and
@@ -524,7 +524,7 @@ This marker is one of the following:
524 `-' -> The cache is up to date. 524 `-' -> The cache is up to date.
525 `!' -> The cache requires a full update. 525 `!' -> The cache requires a full update.
526 `~' -> The cache needs to be incrementally parsed. 526 `~' -> The cache needs to be incrementally parsed.
527 `%' -> The cache is not currently parseable. 527 `%' -> The cache is not currently parsable.
528 `@' -> Auto-parse in progress (not set here.) 528 `@' -> Auto-parse in progress (not set here.)
529Arguments IGNORE are ignored, and accepted so this can be used as a hook 529Arguments IGNORE are ignored, and accepted so this can be used as a hook
530in many situations." 530in many situations."
diff --git a/lisp/cedet/semantic/wisent/comp.el b/lisp/cedet/semantic/wisent/comp.el
index f92ae88c14e..0aff8325252 100644
--- a/lisp/cedet/semantic/wisent/comp.el
+++ b/lisp/cedet/semantic/wisent/comp.el
@@ -51,7 +51,7 @@
51;; name space. Elisp dynamic binding allows that ;-) 51;; name space. Elisp dynamic binding allows that ;-)
52 52
53;; Here are simple macros to easily define and use set of variables 53;; Here are simple macros to easily define and use set of variables
54;; binded locally, without all these "reference to free variable" 54;; bound locally, without all these "reference to free variable"
55;; compiler warnings! 55;; compiler warnings!
56 56
57(defmacro wisent-context-name (name) 57(defmacro wisent-context-name (name)
@@ -2640,7 +2640,7 @@ there are any reduce/reduce conflicts.")
2640 2640
2641(defun wisent-print-results () 2641(defun wisent-print-results ()
2642 "Print information on generated parser. 2642 "Print information on generated parser.
2643Report detailed informations if `wisent-verbose-flag' or 2643Report detailed information if `wisent-verbose-flag' or
2644`wisent-debug-flag' are non-nil." 2644`wisent-debug-flag' are non-nil."
2645 (when (or wisent-verbose-flag wisent-debug-flag) 2645 (when (or wisent-verbose-flag wisent-debug-flag)
2646 (wisent-print-useless)) 2646 (wisent-print-useless))
diff --git a/lisp/cedet/srecode/args.el b/lisp/cedet/srecode/args.el
index d8e02f978b2..73445fbf13d 100644
--- a/lisp/cedet/srecode/args.el
+++ b/lisp/cedet/srecode/args.el
@@ -32,7 +32,7 @@
32;;; :blank 32;;; :blank
33;; 33;;
34;; Using :blank means that the template should force blank lines 34;; Using :blank means that the template should force blank lines
35;; before and after the template, reguardless of where the insertion 35;; before and after the template, regardless of where the insertion
36;; is occurring. 36;; is occurring.
37(defun srecode-semantic-handle-:blank (dict) 37(defun srecode-semantic-handle-:blank (dict)
38 "Add macros into the dictionary DICT specifying blank line spacing. 38 "Add macros into the dictionary DICT specifying blank line spacing.
@@ -185,4 +185,3 @@ do not contain any text from preceding or following text."
185(provide 'srecode/args) 185(provide 'srecode/args)
186 186
187;;; srecode/args.el ends here 187;;; srecode/args.el ends here
188
diff --git a/lisp/cedet/srecode/fields.el b/lisp/cedet/srecode/fields.el
index f13fb17ca8f..f4d34a0f2ab 100644
--- a/lisp/cedet/srecode/fields.el
+++ b/lisp/cedet/srecode/fields.el
@@ -324,7 +324,7 @@ Try to use this to provide useful completion when available.")
324 ) 324 )
325 325
326(defvar srecode-field-replication-max-size 100 326(defvar srecode-field-replication-max-size 100
327 "Maximum size of a field before cancelling replication.") 327 "Maximum size of a field before canceling replication.")
328 328
329(defun srecode-field-mod-hook (ol after start end &optional pre-len) 329(defun srecode-field-mod-hook (ol after start end &optional pre-len)
330 "Modification hook for the field overlay. 330 "Modification hook for the field overlay.
diff --git a/lisp/cedet/srecode/insert.el b/lisp/cedet/srecode/insert.el
index 60f277b2c9f..bbf8b881c4d 100644
--- a/lisp/cedet/srecode/insert.el
+++ b/lisp/cedet/srecode/insert.el
@@ -312,7 +312,7 @@ occur in your template.")
312 (setq doit nil))) 312 (setq doit nil)))
313 (goto-char pm) 313 (goto-char pm)
314 ) 314 )
315 ;; Do indentation reguardless of the newline. 315 ;; Do indentation regardless of the newline.
316 (when (and (eq i t) inbuff) 316 (when (and (eq i t) inbuff)
317 (indent-according-to-mode) 317 (indent-according-to-mode)
318 (goto-char pm)) 318 (goto-char pm))
diff --git a/lisp/cedet/srecode/srt-mode.el b/lisp/cedet/srecode/srt-mode.el
index 0a99b7869e8..ed2b0e2cfdb 100644
--- a/lisp/cedet/srecode/srt-mode.el
+++ b/lisp/cedet/srecode/srt-mode.el
@@ -194,7 +194,7 @@ we can tell font lock about them.")
194 '(srecode-font-lock-keywords 194 '(srecode-font-lock-keywords
195 nil ;; perform string/comment fontification 195 nil ;; perform string/comment fontification
196 nil ;; keywords are case sensitive. 196 nil ;; keywords are case sensitive.
197 ;; This puts _ & - as a word constituant, 197 ;; This puts _ & - as a word constituent,
198 ;; simplifying our keywords significantly 198 ;; simplifying our keywords significantly
199 ((?_ . "w") (?- . "w"))))) 199 ((?_ . "w") (?- . "w")))))
200 200
diff --git a/lisp/comint.el b/lisp/comint.el
index c0b02e5a230..77734b69af6 100644
--- a/lisp/comint.el
+++ b/lisp/comint.el
@@ -45,7 +45,7 @@
45;; It is pretty easy to make new derived modes for other processes. 45;; It is pretty easy to make new derived modes for other processes.
46 46
47;; For documentation on the functionality provided by Comint mode, and 47;; For documentation on the functionality provided by Comint mode, and
48;; the hooks available for customising it, see the comments below. 48;; the hooks available for customizing it, see the comments below.
49;; For further information on the standard derived modes (shell, 49;; For further information on the standard derived modes (shell,
50;; inferior-lisp, inferior-scheme, ...), see the relevant source files. 50;; inferior-lisp, inferior-scheme, ...), see the relevant source files.
51 51
diff --git a/lisp/delim-col.el b/lisp/delim-col.el
index ed6ab96107a..a0a8af80389 100644
--- a/lisp/delim-col.el
+++ b/lisp/delim-col.el
@@ -97,7 +97,7 @@
97;; operates over the text rectangle selected which rectangle diagonal is 97;; operates over the text rectangle selected which rectangle diagonal is
98;; given by the region start and end. 98;; given by the region start and end.
99;; 99;;
100;; See `delimit-columns-format' variable documentation for column formating. 100;; See `delimit-columns-format' variable documentation for column formatting.
101;; 101;;
102;; `delimit-columns-region' is useful when you have columns of text that 102;; `delimit-columns-region' is useful when you have columns of text that
103;; are not well aligned, like: 103;; are not well aligned, like:
@@ -171,7 +171,7 @@ For examples below, consider:
171 171
172Valid values are: 172Valid values are:
173 173
174 nil no formating. That is, `delimit-columns-after' is followed by 174 nil no formatting. That is, `delimit-columns-after' is followed by
175 `delimit-columns-separator'. 175 `delimit-columns-separator'.
176 For example, the result is: \"<ccc>:<dddd>:\" 176 For example, the result is: \"<ccc>:<dddd>:\"
177 177
@@ -190,9 +190,9 @@ Valid values are:
190 For example, the result is: \"<ccc >:<dddd >:\" 190 For example, the result is: \"<ccc >:<dddd >:\"
191 191
192Any other value is treated as t." 192Any other value is treated as t."
193 :type '(choice :menu-tag "Column Formating" 193 :type '(choice :menu-tag "Column Formatting"
194 :tag "Column Formating" 194 :tag "Column Formatting"
195 (const :tag "No Formating" nil) 195 (const :tag "No Formatting" nil)
196 (const :tag "Column Alignment" t) 196 (const :tag "Column Alignment" t)
197 (const :tag "Separator Alignment" separator) 197 (const :tag "Separator Alignment" separator)
198 (const :tag "Column Padding" padding)) 198 (const :tag "Column Padding" padding))
@@ -206,7 +206,7 @@ This has effect only when there are lines with different number of columns."
206 :group 'columns) 206 :group 'columns)
207 207
208(defcustom delimit-columns-start 0 208(defcustom delimit-columns-start 0
209 "Specify column number to start prettifing. 209 "Specify column number to start prettifying.
210 210
211See also `delimit-columns-end' for documentation. 211See also `delimit-columns-end' for documentation.
212 212
@@ -221,7 +221,7 @@ column (column 0) is located at left corner."
221 :group 'columns) 221 :group 'columns)
222 222
223(defcustom delimit-columns-end 1000000 223(defcustom delimit-columns-end 1000000
224 "Specify column number to end prettifing. 224 "Specify column number to end prettifying.
225 225
226See also `delimit-columns-start' for documentation. 226See also `delimit-columns-start' for documentation.
227 227
@@ -404,7 +404,7 @@ START and END delimits the corners of text rectangle."
404 (re-search-forward delimit-columns-separator 404 (re-search-forward delimit-columns-separator
405 delimit-columns-limit 'move)) 405 delimit-columns-limit 'move))
406 (setq ncol (1+ ncol))) 406 (setq ncol (1+ ncol)))
407 ;; insert first formating 407 ;; insert first formatting
408 (insert delimit-columns-str-before delimit-columns-before) 408 (insert delimit-columns-str-before delimit-columns-before)
409 ;; Adjust all columns but last one 409 ;; Adjust all columns but last one
410 (while (progn 410 (while (progn
@@ -436,7 +436,7 @@ START and END delimits the corners of text rectangle."
436 (setq spaces (and delimit-columns-format 436 (setq spaces (and delimit-columns-format
437 (make-string (aref delimit-columns-max ncol) 437 (make-string (aref delimit-columns-max ncol)
438 ?\s))))) 438 ?\s)))))
439 ;; insert last formating 439 ;; insert last formatting
440 (cond ((null delimit-columns-format) 440 (cond ((null delimit-columns-format)
441 (insert delimit-columns-after delimit-columns-str-after)) 441 (insert delimit-columns-after delimit-columns-str-after))
442 ((eq delimit-columns-format 'padding) 442 ((eq delimit-columns-format 'padding)
diff --git a/lisp/delsel.el b/lisp/delsel.el
index 6d2c47f3957..fcd45f1a148 100644
--- a/lisp/delsel.el
+++ b/lisp/delsel.el
@@ -144,7 +144,7 @@ any selection."
144(put 'newline 'delete-selection t) 144(put 'newline 'delete-selection t)
145(put 'open-line 'delete-selection 'kill) 145(put 'open-line 'delete-selection 'kill)
146 146
147;; This is very useful for cancelling a selection in the minibuffer without 147;; This is very useful for canceling a selection in the minibuffer without
148;; aborting the minibuffer. 148;; aborting the minibuffer.
149(defun minibuffer-keyboard-quit () 149(defun minibuffer-keyboard-quit ()
150 "Abort recursive edit. 150 "Abort recursive edit.
diff --git a/lisp/descr-text.el b/lisp/descr-text.el
index 8b7fa89a19b..47f96e8d68f 100644
--- a/lisp/descr-text.el
+++ b/lisp/descr-text.el
@@ -358,7 +358,7 @@ This function is semi-obsolete. Use `get-char-code-property'."
358 (compose-string (string ch) 0 1 (format "\t%c\t" ch)) 358 (compose-string (string ch) 0 1 (format "\t%c\t" ch))
359 (string ch))) 359 (string ch)))
360 360
361;; Return a nicely formated list of categories; extended category 361;; Return a nicely formatted list of categories; extended category
362;; description is added to the category name as a tooltip 362;; description is added to the category name as a tooltip
363(defsubst describe-char-categories (category-set) 363(defsubst describe-char-categories (category-set)
364 (let ((mnemonics (category-set-mnemonics category-set))) 364 (let ((mnemonics (category-set-mnemonics category-set)))
@@ -422,6 +422,20 @@ as well as widgets, buttons, overlays, and text properties."
422 (setq charset (char-charset char) 422 (setq charset (char-charset char)
423 code (encode-char char charset))) 423 code (encode-char char charset)))
424 (setq code char)) 424 (setq code char))
425 (cond
426 ;; Append a PDF character to directional embeddings and
427 ;; overrides, to prevent potential messup of the following
428 ;; text.
429 ((memq char '(?\x202a ?\x202b ?\x202d ?\x202e))
430 (setq char-description
431 (concat char-description
432 (propertize (string ?\x202c) 'invisible t))))
433 ;; Append a LRM character to any strong character to avoid
434 ;; messing up the numerical codepoint.
435 ((memq (get-char-code-property char 'bidi-class) '(R AL))
436 (setq char-description
437 (concat char-description
438 (propertize (string ?\x200e) 'invisible t)))))
425 (when composition 439 (when composition
426 ;; When the composition is trivial (i.e. composed only with the 440 ;; When the composition is trivial (i.e. composed only with the
427 ;; current character itself without any alternate characters), 441 ;; current character itself without any alternate characters),
diff --git a/lisp/desktop.el b/lisp/desktop.el
index 8a61bec0eea..34a51eb51dc 100644
--- a/lisp/desktop.el
+++ b/lisp/desktop.el
@@ -702,9 +702,9 @@ is nil, ask the user where to save the desktop."
702;; ---------------------------------------------------------------------------- 702;; ----------------------------------------------------------------------------
703(defun desktop-internal-v2s (value) 703(defun desktop-internal-v2s (value)
704 "Convert VALUE to a pair (QUOTE . TXT); (eval (read TXT)) gives VALUE. 704 "Convert VALUE to a pair (QUOTE . TXT); (eval (read TXT)) gives VALUE.
705TXT is a string that when read and evaluated yields value. 705TXT is a string that when read and evaluated yields VALUE.
706QUOTE may be `may' (value may be quoted), 706QUOTE may be `may' (value may be quoted),
707`must' (values must be quoted), or nil (value may not be quoted)." 707`must' (value must be quoted), or nil (value must not be quoted)."
708 (cond 708 (cond
709 ((or (numberp value) (null value) (eq t value) (keywordp value)) 709 ((or (numberp value) (null value) (eq t value) (keywordp value))
710 (cons 'may (prin1-to-string value))) 710 (cons 'may (prin1-to-string value)))
diff --git a/lisp/dframe.el b/lisp/dframe.el
index b4f44e1a308..728f08d135d 100644
--- a/lisp/dframe.el
+++ b/lisp/dframe.el
@@ -221,7 +221,7 @@ Local to those buffers, as a function called that created it.")
221 (define-key map [mouse-2] 'dframe-click) 221 (define-key map [mouse-2] 'dframe-click)
222 ;; This is the power click for new frames, or refreshing a cache 222 ;; This is the power click for new frames, or refreshing a cache
223 (define-key map [S-mouse-2] 'dframe-power-click) 223 (define-key map [S-mouse-2] 'dframe-power-click)
224 ;; This adds a small unecessary visual effect 224 ;; This adds a small unnecessary visual effect
225 ;;(define-key map [down-mouse-2] 'dframe-quick-mouse) 225 ;;(define-key map [down-mouse-2] 'dframe-quick-mouse)
226 226
227 (define-key map [down-mouse-3] 'dframe-popup-kludge) 227 (define-key map [down-mouse-3] 'dframe-popup-kludge)
diff --git a/lisp/dired-x.el b/lisp/dired-x.el
index 4daf313445c..0863cc1abac 100644
--- a/lisp/dired-x.el
+++ b/lisp/dired-x.el
@@ -1392,7 +1392,7 @@ Considers buffers closer to the car of `buffer-list' to be more recent."
1392;; Apparently people do use it. - lrd 12/22/97. 1392;; Apparently people do use it. - lrd 12/22/97.
1393 1393
1394(with-no-warnings 1394(with-no-warnings
1395 ;; Warnings are suppresed to avoid "global/dynamic var `X' lacks a prefix". 1395 ;; Warnings are suppressed to avoid "global/dynamic var `X' lacks a prefix".
1396 ;; This is unbearably ugly, but not more than having global variables 1396 ;; This is unbearably ugly, but not more than having global variables
1397 ;; named size, time, name or s, however practical it can be while writing 1397 ;; named size, time, name or s, however practical it can be while writing
1398 ;; `dired-mark-sexp' predicates. 1398 ;; `dired-mark-sexp' predicates.
diff --git a/lisp/dired.el b/lisp/dired.el
index 1d503a14810..3a82ebcf504 100644
--- a/lisp/dired.el
+++ b/lisp/dired.el
@@ -2678,7 +2678,7 @@ Anything else means ask for each directory."
2678(defvar dired-re-no-dot "^\\([^.]\\|\\.\\([^.]\\|\\..\\)\\).*") 2678(defvar dired-re-no-dot "^\\([^.]\\|\\.\\([^.]\\|\\..\\)\\).*")
2679 2679
2680;; Delete file, possibly delete a directory and all its files. 2680;; Delete file, possibly delete a directory and all its files.
2681;; This function is usefull outside of dired. One could change it's name 2681;; This function is useful outside of dired. One could change its name
2682;; to e.g. recursive-delete-file and put it somewhere else. 2682;; to e.g. recursive-delete-file and put it somewhere else.
2683(defun dired-delete-file (file &optional recursive trash) "\ 2683(defun dired-delete-file (file &optional recursive trash) "\
2684Delete FILE or directory (possibly recursively if optional RECURSIVE is true.) 2684Delete FILE or directory (possibly recursively if optional RECURSIVE is true.)
@@ -4128,7 +4128,7 @@ instead.
4128;;;*** 4128;;;***
4129 4129
4130;;;### (autoloads (dired-do-relsymlink dired-jump-other-window dired-jump) 4130;;;### (autoloads (dired-do-relsymlink dired-jump-other-window dired-jump)
4131;;;;;; "dired-x" "dired-x.el" "ea7c74fbb7dddf43bb85875018cb59ad") 4131;;;;;; "dired-x" "dired-x.el" "a542cdbf155ff79f36331bae217f3b28")
4132;;; Generated autoloads from dired-x.el 4132;;; Generated autoloads from dired-x.el
4133 4133
4134(autoload 'dired-jump "dired-x" "\ 4134(autoload 'dired-jump "dired-x" "\
diff --git a/lisp/electric.el b/lisp/electric.el
index 1a8bf9f89ed..cec1b5d2000 100644
--- a/lisp/electric.el
+++ b/lisp/electric.el
@@ -85,7 +85,7 @@
85 (eq last-input-event ?\C-g)) 85 (eq last-input-event ?\C-g))
86 (progn (setq unread-command-events nil 86 (progn (setq unread-command-events nil
87 prefix-arg nil) 87 prefix-arg nil)
88 ;; If it wasn't cancelling a prefix character, then quit. 88 ;; If it wasn't canceling a prefix character, then quit.
89 (if (or (= (length (this-command-keys)) 1) 89 (if (or (= (length (this-command-keys)) 1)
90 (not inhibit-quit)) ; safety 90 (not inhibit-quit)) ; safety
91 (progn (ding) 91 (progn (ding)
diff --git a/lisp/emacs-lisp/assoc.el b/lisp/emacs-lisp/assoc.el
index 31be851f2dd..e650995d3fe 100644
--- a/lisp/emacs-lisp/assoc.el
+++ b/lisp/emacs-lisp/assoc.el
@@ -61,10 +61,9 @@ pair is not at the head of alist. ALIST is not altered."
61 61
62 62
63(defun aput (alist-symbol key &optional value) 63(defun aput (alist-symbol key &optional value)
64 "Inserts a key-value pair into an alist. 64 "Insert a key-value pair into an alist.
65The alist is referenced by ALIST-SYMBOL. The key-value pair is made 65The alist is referenced by ALIST-SYMBOL. The key-value pair is made
66from KEY and optionally, VALUE. Returns the altered alist or nil if 66from KEY and optionally, VALUE. Returns the altered alist.
67ALIST is nil.
68 67
69If the key-value pair referenced by KEY can be found in the alist, and 68If the key-value pair referenced by KEY can be found in the alist, and
70VALUE is supplied non-nil, then the value of KEY will be set to VALUE. 69VALUE is supplied non-nil, then the value of KEY will be set to VALUE.
@@ -78,7 +77,7 @@ of the alist (with value nil if VALUE is nil or not supplied)."
78 (setq alist (symbol-value alist-symbol)) 77 (setq alist (symbol-value alist-symbol))
79 (cond ((null alist) (set alist-symbol elem)) 78 (cond ((null alist) (set alist-symbol elem))
80 ((anot-head-p alist key) (set alist-symbol (nconc elem alist))) 79 ((anot-head-p alist key) (set alist-symbol (nconc elem alist)))
81 (value (setcar alist (car elem))) 80 (value (setcar alist (car elem)) alist)
82 (t alist)))) 81 (t alist))))
83 82
84 83
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el
index 9aa230cfe9b..29c5f3f092b 100644
--- a/lisp/emacs-lisp/bytecomp.el
+++ b/lisp/emacs-lisp/bytecomp.el
@@ -2637,7 +2637,7 @@ If FORM is a lambda or a macro, byte-compile it as a function."
2637 (setq form (cdr form))) 2637 (setq form (cdr form)))
2638 (setq form (car form))) 2638 (setq form (car form)))
2639 (if (and (eq (car-safe form) 'list) 2639 (if (and (eq (car-safe form) 'list)
2640 ;; The spec is evaled in callint.c in dynamic-scoping 2640 ;; The spec is evalled in callint.c in dynamic-scoping
2641 ;; mode, so just leaving the form unchanged would mean 2641 ;; mode, so just leaving the form unchanged would mean
2642 ;; it won't be eval'd in the right mode. 2642 ;; it won't be eval'd in the right mode.
2643 (not lexical-binding)) 2643 (not lexical-binding))
diff --git a/lisp/emacs-lisp/edebug.el b/lisp/emacs-lisp/edebug.el
index 86c7e59fd07..d7cfcfb870a 100644
--- a/lisp/emacs-lisp/edebug.el
+++ b/lisp/emacs-lisp/edebug.el
@@ -3448,7 +3448,7 @@ instrumented. Then it does `edebug-on-entry' and switches to `go' mode."
3448(defun edebug-on-entry (function &optional flag) 3448(defun edebug-on-entry (function &optional flag)
3449 "Cause Edebug to stop when FUNCTION is called. 3449 "Cause Edebug to stop when FUNCTION is called.
3450With prefix argument, make this temporary so it is automatically 3450With prefix argument, make this temporary so it is automatically
3451cancelled the first time the function is entered." 3451canceled the first time the function is entered."
3452 (interactive "aEdebug on entry to: \nP") 3452 (interactive "aEdebug on entry to: \nP")
3453 ;; Could store this in the edebug data instead. 3453 ;; Could store this in the edebug data instead.
3454 (put function 'edebug-on-entry (if flag 'temp t))) 3454 (put function 'edebug-on-entry (if flag 'temp t)))
diff --git a/lisp/emacs-lisp/eieio.el b/lisp/emacs-lisp/eieio.el
index db3236afc1a..170d3fb0bf8 100644
--- a/lisp/emacs-lisp/eieio.el
+++ b/lisp/emacs-lisp/eieio.el
@@ -57,7 +57,7 @@
57 57
58(eval-and-compile 58(eval-and-compile
59;; About the above. EIEIO must process its own code when it compiles 59;; About the above. EIEIO must process its own code when it compiles
60;; itself, thus, by eval-and-compiling outselves, we solve the problem. 60;; itself, thus, by eval-and-compiling ourselves, we solve the problem.
61 61
62;; Compatibility 62;; Compatibility
63(if (fboundp 'compiled-function-arglist) 63(if (fboundp 'compiled-function-arglist)
diff --git a/lisp/emacs-lisp/lisp-mode.el b/lisp/emacs-lisp/lisp-mode.el
index f9e7fe44824..44e87e171d1 100644
--- a/lisp/emacs-lisp/lisp-mode.el
+++ b/lisp/emacs-lisp/lisp-mode.el
@@ -131,6 +131,7 @@
131(put 'autoload 'doc-string-elt 3) 131(put 'autoload 'doc-string-elt 3)
132(put 'defun 'doc-string-elt 3) 132(put 'defun 'doc-string-elt 3)
133(put 'defun* 'doc-string-elt 3) 133(put 'defun* 'doc-string-elt 3)
134(put 'defmethod 'doc-string-elt 3)
134(put 'defvar 'doc-string-elt 3) 135(put 'defvar 'doc-string-elt 3)
135(put 'defcustom 'doc-string-elt 3) 136(put 'defcustom 'doc-string-elt 3)
136(put 'deftheme 'doc-string-elt 2) 137(put 'deftheme 'doc-string-elt 2)
diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el
index 8417aa8d380..a1513039a98 100644
--- a/lisp/emacs-lisp/package.el
+++ b/lisp/emacs-lisp/package.el
@@ -113,6 +113,8 @@
113 113
114;;; ToDo: 114;;; ToDo:
115 115
116;; - a trust mechanism, since compiling a package can run arbitrary code.
117;; For example, download package signatures and check that they match.
116;; - putting info dirs at the start of the info path means 118;; - putting info dirs at the start of the info path means
117;; users see a weird ordering of categories. OTOH we want to 119;; users see a weird ordering of categories. OTOH we want to
118;; override later entries. maybe emacs needs to enforce 120;; override later entries. maybe emacs needs to enforce
@@ -224,7 +226,10 @@ Each element has the form (ID . LOCATION).
224 LOCATION specifies the base location for the archive. 226 LOCATION specifies the base location for the archive.
225 If it starts with \"http:\", it is treated as a HTTP URL; 227 If it starts with \"http:\", it is treated as a HTTP URL;
226 otherwise it should be an absolute directory name. 228 otherwise it should be an absolute directory name.
227 (Other types of URL are currently not supported.)" 229 (Other types of URL are currently not supported.)
230
231Only add locations that you trust, since fetching and installing
232a package can run arbitrary code."
228 :type '(alist :key-type (string :tag "Archive name") 233 :type '(alist :key-type (string :tag "Archive name")
229 :value-type (string :tag "URL or directory name")) 234 :value-type (string :tag "URL or directory name"))
230 :risky t 235 :risky t
diff --git a/lisp/emacs-lisp/pcase.el b/lisp/emacs-lisp/pcase.el
index e6c4ccbbc50..6931ce75cb5 100644
--- a/lisp/emacs-lisp/pcase.el
+++ b/lisp/emacs-lisp/pcase.el
@@ -363,12 +363,12 @@ MATCH is the pattern that needs to be matched, of the form:
363 (dolist (branch rest) 363 (dolist (branch rest)
364 (let* ((match (car branch)) 364 (let* ((match (car branch))
365 (code&vars (cdr branch)) 365 (code&vars (cdr branch))
366 (splitted 366 (split
367 (pcase--split-match sym splitter match))) 367 (pcase--split-match sym splitter match)))
368 (unless (eq (car splitted) :pcase--fail) 368 (unless (eq (car split) :pcase--fail)
369 (push (cons (car splitted) code&vars) then-rest)) 369 (push (cons (car split) code&vars) then-rest))
370 (unless (eq (cdr splitted) :pcase--fail) 370 (unless (eq (cdr split) :pcase--fail)
371 (push (cons (cdr splitted) code&vars) else-rest)))) 371 (push (cons (cdr split) code&vars) else-rest))))
372 (cons (nreverse then-rest) (nreverse else-rest)))) 372 (cons (nreverse then-rest) (nreverse else-rest))))
373 373
374(defun pcase--split-consp (syma symd pat) 374(defun pcase--split-consp (syma symd pat)
diff --git a/lisp/emacs-lisp/syntax.el b/lisp/emacs-lisp/syntax.el
index c65cbc39eab..85fa4772eb6 100644
--- a/lisp/emacs-lisp/syntax.el
+++ b/lisp/emacs-lisp/syntax.el
@@ -56,7 +56,7 @@
56 ;; syntax-ppss-flush-cache since that would not only flush the cache but also 56 ;; syntax-ppss-flush-cache since that would not only flush the cache but also
57 ;; reset syntax-propertize--done which should not be done in this case). 57 ;; reset syntax-propertize--done which should not be done in this case).
58 "Mode-specific function to apply the syntax-table properties. 58 "Mode-specific function to apply the syntax-table properties.
59Called with 2 arguments: START and END. 59Called with two arguments: START and END.
60This function can call `syntax-ppss' on any position before END, but it 60This function can call `syntax-ppss' on any position before END, but it
61should not call `syntax-ppss-flush-cache', which means that it should not 61should not call `syntax-ppss-flush-cache', which means that it should not
62call `syntax-ppss' on some position and later modify the buffer on some 62call `syntax-ppss' on some position and later modify the buffer on some
@@ -248,7 +248,7 @@ Note: back-references in REGEXPs do not work."
248 (if syntax 248 (if syntax
249 (put-text-property 249 (put-text-property
250 mb me 'syntax-table syntax)))))))) 250 mb me 'syntax-table syntax))))))))
251 251
252 (if (or (not (cddr rule)) (zerop gn)) 252 (if (or (not (cddr rule)) (zerop gn))
253 (setq code (nconc (nreverse thiscode) code)) 253 (setq code (nconc (nreverse thiscode) code))
254 (push `(if (match-beginning ,gn) 254 (push `(if (match-beginning ,gn)
diff --git a/lisp/emulation/cua-base.el b/lisp/emulation/cua-base.el
index 9a50352d507..b17fa6b1471 100644
--- a/lisp/emulation/cua-base.el
+++ b/lisp/emulation/cua-base.el
@@ -368,7 +368,7 @@ interpreted as a register number."
368 368
369(defcustom cua-check-pending-input t 369(defcustom cua-check-pending-input t
370 "If non-nil, don't override prefix key if input pending. 370 "If non-nil, don't override prefix key if input pending.
371It is rumoured that `input-pending-p' is unreliable under some window 371It is rumored that `input-pending-p' is unreliable under some window
372managers, so try setting this to nil, if prefix override doesn't work." 372managers, so try setting this to nil, if prefix override doesn't work."
373 :type 'boolean 373 :type 'boolean
374 :group 'cua) 374 :group 'cua)
@@ -1242,7 +1242,7 @@ If ARG is the atom `-', scroll upward by nearly full screen."
1242 1242
1243 ;; Handle shifted cursor keys and other movement commands. 1243 ;; Handle shifted cursor keys and other movement commands.
1244 ;; If region is not active, region is activated if key is shifted. 1244 ;; If region is not active, region is activated if key is shifted.
1245 ;; If region is active, region is cancelled if key is unshifted 1245 ;; If region is active, region is canceled if key is unshifted
1246 ;; (and region not started with C-SPC). 1246 ;; (and region not started with C-SPC).
1247 ;; If rectangle is active, expand rectangle in specified direction and 1247 ;; If rectangle is active, expand rectangle in specified direction and
1248 ;; ignore the movement. 1248 ;; ignore the movement.
diff --git a/lisp/emulation/cua-gmrk.el b/lisp/emulation/cua-gmrk.el
index 690555e81dc..b6a3a977909 100644
--- a/lisp/emulation/cua-gmrk.el
+++ b/lisp/emulation/cua-gmrk.el
@@ -94,7 +94,7 @@ insert the deleted or copied text before the global marker, even when the
94global marker is in another buffer. 94global marker is in another buffer.
95If the global marker isn't set, set the global marker at point in the current 95If the global marker isn't set, set the global marker at point in the current
96buffer. Otherwise jump to the global marker position and cancel it. 96buffer. Otherwise jump to the global marker position and cancel it.
97With prefix argument, don't jump to global mark when cancelling it." 97With prefix argument, don't jump to global mark when canceling it."
98 (interactive "P") 98 (interactive "P")
99 (unless cua--global-mark-initialized 99 (unless cua--global-mark-initialized
100 (cua--init-global-mark)) 100 (cua--init-global-mark))
diff --git a/lisp/emulation/cua-rect.el b/lisp/emulation/cua-rect.el
index 76cab39f5b2..00aec2d0bf9 100644
--- a/lisp/emulation/cua-rect.el
+++ b/lisp/emulation/cua-rect.el
@@ -1258,7 +1258,7 @@ The numbers are formatted according to the FORMAT string."
1258 (untabify (point-min) (point-max))) 1258 (untabify (point-min) (point-max)))
1259 1259
1260(defun cua-text-fill-rectangle (width text) 1260(defun cua-text-fill-rectangle (width text)
1261 "Replace rectagle with filled TEXT read from minibuffer. 1261 "Replace rectangle with filled TEXT read from minibuffer.
1262A numeric prefix argument is used a new width for the filled rectangle." 1262A numeric prefix argument is used a new width for the filled rectangle."
1263 (interactive (list 1263 (interactive (list
1264 (prefix-numeric-value current-prefix-arg) 1264 (prefix-numeric-value current-prefix-arg)
@@ -1269,7 +1269,7 @@ A numeric prefix argument is used a new width for the filled rectangle."
1269 (lambda () (insert text)))) 1269 (lambda () (insert text))))
1270 1270
1271(defun cua-refill-rectangle (width) 1271(defun cua-refill-rectangle (width)
1272 "Fill contents of current rectagle. 1272 "Fill contents of current rectangle.
1273A numeric prefix argument is used as new width for the filled rectangle." 1273A numeric prefix argument is used as new width for the filled rectangle."
1274 (interactive "P") 1274 (interactive "P")
1275 (cua--rectangle-aux-replace 1275 (cua--rectangle-aux-replace
diff --git a/lisp/emulation/vip.el b/lisp/emulation/vip.el
index a0c6062fb29..1298e5424ac 100644
--- a/lisp/emulation/vip.el
+++ b/lisp/emulation/vip.el
@@ -420,7 +420,7 @@ Type `n' to quit this window for now.\n")
420 (goto-char (point-min)) 420 (goto-char (point-min))
421 (if (y-or-n-p "Inhibit VIP startup message? ") 421 (if (y-or-n-p "Inhibit VIP startup message? ")
422 (progn 422 (progn
423 (with-current-buffer 423 (with-current-buffer
424 (find-file-noselect 424 (find-file-noselect
425 (substitute-in-file-name vip-startup-file)) 425 (substitute-in-file-name vip-startup-file))
426 (goto-char (point-max)) 426 (goto-char (point-max))
@@ -877,7 +877,7 @@ is the name of the register for COM."
877 (if (> beg end) (exchange-point-and-mark))) 877 (if (> beg end) (exchange-point-and-mark)))
878 878
879(defun vip-global-execute () 879(defun vip-global-execute ()
880 "Call last keyboad macro for each line in the region." 880 "Call last keyboard macro for each line in the region."
881 (if (> (point) (mark)) (exchange-point-and-mark)) 881 (if (> (point) (mark)) (exchange-point-and-mark))
882 (beginning-of-line) 882 (beginning-of-line)
883 (call-last-kbd-macro) 883 (call-last-kbd-macro)
diff --git a/lisp/emulation/viper-cmd.el b/lisp/emulation/viper-cmd.el
index ce3cc3c9a22..b6d487704f4 100644
--- a/lisp/emulation/viper-cmd.el
+++ b/lisp/emulation/viper-cmd.el
@@ -716,7 +716,7 @@
716 (error 716 (error
717 (viper-message-conditions conds)))) 717 (viper-message-conditions conds))))
718 718
719;; escape to emacs mode termporarily 719;; escape to emacs mode temporarily
720(defun viper-escape-to-emacs (arg &optional events) 720(defun viper-escape-to-emacs (arg &optional events)
721 "Escape to Emacs state from Vi state for one Emacs command. 721 "Escape to Emacs state from Vi state for one Emacs command.
722ARG is used as the prefix value for the executed command. If 722ARG is used as the prefix value for the executed command. If
@@ -726,7 +726,7 @@ EVENTS is a list of events, which become the beginning of the command."
726 (message "Switched to EMACS state for the next command...")) 726 (message "Switched to EMACS state for the next command..."))
727 (viper-escape-to-state arg events 'emacs-state)) 727 (viper-escape-to-state arg events 'emacs-state))
728 728
729;; escape to Vi mode termporarily 729;; escape to Vi mode temporarily
730(defun viper-escape-to-vi (arg) 730(defun viper-escape-to-vi (arg)
731 "Escape from Emacs state to Vi state for one Vi 1-character command. 731 "Escape from Emacs state to Vi state for one Vi 1-character command.
732If the Vi command that the user types has a prefix argument, e.g., `d2w', then 732If the Vi command that the user types has a prefix argument, e.g., `d2w', then
@@ -1979,7 +1979,7 @@ Undo previous insertion and inserts new."
1979;; Quote region by each line with a user supplied string. 1979;; Quote region by each line with a user supplied string.
1980(defun viper-quote-region () 1980(defun viper-quote-region ()
1981 (let ((quote-str viper-quote-string) 1981 (let ((quote-str viper-quote-string)
1982 (donot-change-dafault t)) 1982 (donot-change-default t))
1983 (setq quote-str 1983 (setq quote-str
1984 (viper-read-string-with-history 1984 (viper-read-string-with-history
1985 "Quote string: " 1985 "Quote string: "
@@ -1991,9 +1991,9 @@ Undo previous insertion and inserts new."
1991 ((string-match "lisp.*-mode" (symbol-name major-mode)) ";;") 1991 ((string-match "lisp.*-mode" (symbol-name major-mode)) ";;")
1992 ((memq major-mode '(c-mode cc-mode c++-mode)) "//") 1992 ((memq major-mode '(c-mode cc-mode c++-mode)) "//")
1993 ((memq major-mode '(sh-mode shell-mode)) "#") 1993 ((memq major-mode '(sh-mode shell-mode)) "#")
1994 (t (setq donot-change-dafault nil) 1994 (t (setq donot-change-default nil)
1995 quote-str)))) 1995 quote-str))))
1996 (or donot-change-dafault 1996 (or donot-change-default
1997 (setq viper-quote-string quote-str)) 1997 (setq viper-quote-string quote-str))
1998 (viper-enlarge-region (point) (mark t)) 1998 (viper-enlarge-region (point) (mark t))
1999 (if (> (point) (mark t)) (exchange-point-and-mark)) 1999 (if (> (point) (mark t)) (exchange-point-and-mark))
@@ -2407,7 +2407,7 @@ problems."
2407 t 'local) 2407 t 'local)
2408 (add-hook 2408 (add-hook
2409 'viper-pre-command-hooks 'viper-replace-state-pre-command-sentinel t 'local) 2409 'viper-pre-command-hooks 'viper-replace-state-pre-command-sentinel t 'local)
2410 ;; guard against a smartie who switched from R-replace to normal replace 2410 ;; guard against a smarty who switched from R-replace to normal replace
2411 (remove-hook 2411 (remove-hook
2412 'viper-post-command-hooks 'viper-R-state-post-command-sentinel 'local) 2412 'viper-post-command-hooks 'viper-R-state-post-command-sentinel 'local)
2413 (if overwrite-mode (overwrite-mode -1)) 2413 (if overwrite-mode (overwrite-mode -1))
@@ -2531,7 +2531,7 @@ problems."
2531 'viper-post-command-hooks 'viper-R-state-post-command-sentinel t 'local) 2531 'viper-post-command-hooks 'viper-R-state-post-command-sentinel t 'local)
2532 (add-hook 2532 (add-hook
2533 'viper-pre-command-hooks 'viper-replace-state-pre-command-sentinel t 'local) 2533 'viper-pre-command-hooks 'viper-replace-state-pre-command-sentinel t 'local)
2534 ;; guard against a smartie who switched from R-replace to normal replace 2534 ;; guard against a smarty who switched from R-replace to normal replace
2535 (remove-hook 2535 (remove-hook
2536 'viper-post-command-hooks 'viper-replace-state-post-command-sentinel 'local) 2536 'viper-post-command-hooks 'viper-replace-state-post-command-sentinel 'local)
2537 ) 2537 )
@@ -3767,7 +3767,7 @@ If MAJOR-MODE is set, set the macros only in that major mode."
3767 "//" 'vi-state 3767 "//" 'vi-state
3768 [1 (meta x) v i p e r - t o g g l e - s e a r c h - s t y l e return] 3768 [1 (meta x) v i p e r - t o g g l e - s e a r c h - s t y l e return]
3769 scope) 3769 scope)
3770 ;; toggle regexp/vanila search 3770 ;; toggle regexp/vanilla search
3771 (viper-record-kbd-macro 3771 (viper-record-kbd-macro
3772 "///" 'vi-state 3772 "///" 'vi-state
3773 [2 (meta x) v i p e r - t o g g l e - s e a r c h - s t y l e return] 3773 [2 (meta x) v i p e r - t o g g l e - s e a r c h - s t y l e return]
@@ -3824,7 +3824,7 @@ the macros are set in the current major mode.
3824 "//" 'emacs-state 3824 "//" 'emacs-state
3825 [1 (meta x) v i p e r - t o g g l e - s e a r c h - s t y l e return] 3825 [1 (meta x) v i p e r - t o g g l e - s e a r c h - s t y l e return]
3826 (or arg-majormode major-mode)) 3826 (or arg-majormode major-mode))
3827 ;; toggle regexp/vanila search 3827 ;; toggle regexp/vanilla search
3828 (viper-record-kbd-macro 3828 (viper-record-kbd-macro
3829 "///" 'emacs-state 3829 "///" 'emacs-state
3830 [2 (meta x) v i p e r - t o g g l e - s e a r c h - s t y l e return] 3830 [2 (meta x) v i p e r - t o g g l e - s e a r c h - s t y l e return]
@@ -4017,7 +4017,7 @@ Null string will repeat previous search."
4017 (setq viper-prefix-commands 4017 (setq viper-prefix-commands
4018 (cons viper-buffer-search-char viper-prefix-commands))) 4018 (cons viper-buffer-search-char viper-prefix-commands)))
4019 4019
4020;; This is a Viper wraper for isearch-forward. 4020;; This is a Viper wrapper for isearch-forward.
4021(defun viper-isearch-forward (arg) 4021(defun viper-isearch-forward (arg)
4022 "Do incremental search forward." 4022 "Do incremental search forward."
4023 (interactive "P") 4023 (interactive "P")
@@ -4025,7 +4025,7 @@ Null string will repeat previous search."
4025 (if (listp arg) (setq arg (car arg))) 4025 (if (listp arg) (setq arg (car arg)))
4026 (viper-exec-form-in-emacs (list 'isearch-forward arg))) 4026 (viper-exec-form-in-emacs (list 'isearch-forward arg)))
4027 4027
4028;; This is a Viper wraper for isearch-backward." 4028;; This is a Viper wrapper for isearch-backward."
4029(defun viper-isearch-backward (arg) 4029(defun viper-isearch-backward (arg)
4030 "Do incremental search backward." 4030 "Do incremental search backward."
4031 (interactive "P") 4031 (interactive "P")
diff --git a/lisp/emulation/viper-init.el b/lisp/emulation/viper-init.el
index 2d221d5fa05..2fc8dc599cb 100644
--- a/lisp/emulation/viper-init.el
+++ b/lisp/emulation/viper-init.el
@@ -818,7 +818,7 @@ Related buffers can be cycled through via :R and :P commands."
818;;; Face-saving tricks 818;;; Face-saving tricks
819 819
820(defgroup viper-highlighting nil 820(defgroup viper-highlighting nil
821 "Hilighting of replace region, search pattern, minibuffer, etc." 821 "Highlighting of replace region, search pattern, minibuffer, etc."
822 :prefix "viper-" 822 :prefix "viper-"
823 :group 'viper) 823 :group 'viper)
824 824
diff --git a/lisp/emulation/viper-macs.el b/lisp/emulation/viper-macs.el
index e978823a49c..2704bdc5b40 100644
--- a/lisp/emulation/viper-macs.el
+++ b/lisp/emulation/viper-macs.el
@@ -921,7 +921,7 @@ name from there."
921 921
922 922
923(defun viper-global-execute () 923(defun viper-global-execute ()
924 "Call last keyboad macro for each line in the region." 924 "Call last keyboard macro for each line in the region."
925 (if (> (point) (mark t)) (exchange-point-and-mark)) 925 (if (> (point) (mark t)) (exchange-point-and-mark))
926 (beginning-of-line) 926 (beginning-of-line)
927 (call-last-kbd-macro) 927 (call-last-kbd-macro)
diff --git a/lisp/emulation/viper.el b/lisp/emulation/viper.el
index b2035e8ede6..3704725b8dd 100644
--- a/lisp/emulation/viper.el
+++ b/lisp/emulation/viper.el
@@ -491,7 +491,7 @@ unless it is coming up in a wrong Viper state."
491 ) 491 )
492 "List specifying how to modify the various major modes to enable some Viperisms. 492 "List specifying how to modify the various major modes to enable some Viperisms.
493The list has the structure: ((mode viper-state keymap) (mode viper-state 493The list has the structure: ((mode viper-state keymap) (mode viper-state
494keymap) ...). If `mode' is on the list, the `kemap' will be made active (on 494keymap) ...). If `mode' is on the list, the `keymap' will be made active (on
495the minor-mode-map-alist) in the specified viper state. 495the minor-mode-map-alist) in the specified viper state.
496If you change this list, have to restart Emacs for the change to take effect. 496If you change this list, have to restart Emacs for the change to take effect.
497However, if you did the change through the customization widget, then Emacs 497However, if you did the change through the customization widget, then Emacs
diff --git a/lisp/epa-dired.el b/lisp/epa-dired.el
index 0834a8df23a..d51045a5e37 100644
--- a/lisp/epa-dired.el
+++ b/lisp/epa-dired.el
@@ -67,7 +67,7 @@ If no one is selected, default secret key is used. "
67 (while file-list 67 (while file-list
68 (epa-encrypt-file 68 (epa-encrypt-file
69 (expand-file-name (car file-list)) 69 (expand-file-name (car file-list))
70 (epa-select-keys (epg-make-context) "Select recipents for encryption. 70 (epa-select-keys (epg-make-context) "Select recipients for encryption.
71If no one is selected, symmetric encryption will be performed. ")) 71If no one is selected, symmetric encryption will be performed. "))
72 (setq file-list (cdr file-list))) 72 (setq file-list (cdr file-list)))
73 (revert-buffer))) 73 (revert-buffer)))
diff --git a/lisp/epa-file.el b/lisp/epa-file.el
index bef67ba4f69..4d05563719d 100644
--- a/lisp/epa-file.el
+++ b/lisp/epa-file.el
@@ -235,7 +235,7 @@ encryption is used."
235 (current-buffer))))) 235 (current-buffer)))))
236 (epa-select-keys 236 (epa-select-keys
237 context 237 context
238 "Select recipents for encryption. 238 "Select recipients for encryption.
239If no one is selected, symmetric encryption will be performed. " 239If no one is selected, symmetric encryption will be performed. "
240 recipients) 240 recipients)
241 (if epa-file-encrypt-to 241 (if epa-file-encrypt-to
@@ -273,7 +273,7 @@ If no one is selected, symmetric encryption will be performed. "
273 (epg-sub-key-id (car (epg-key-sub-key-list key)))) 273 (epg-sub-key-id (car (epg-key-sub-key-list key))))
274 (epa-select-keys 274 (epa-select-keys
275 (epg-make-context) 275 (epg-make-context)
276 "Select recipents for encryption. 276 "Select recipients for encryption.
277If no one is selected, symmetric encryption will be performed. ")))) 277If no one is selected, symmetric encryption will be performed. "))))
278 278
279;;;###autoload 279;;;###autoload
diff --git a/lisp/erc/ChangeLog.02 b/lisp/erc/ChangeLog.02
index 3364af531f5..d20b6ca35a7 100644
--- a/lisp/erc/ChangeLog.02
+++ b/lisp/erc/ChangeLog.02
@@ -75,7 +75,7 @@
75 everything but the last character. 75 everything but the last character.
76 76
77 * erc.el(erc-send-current-line): 77 * erc.el(erc-send-current-line):
78 Check wether point is in the input line. If 78 Check whether point is in the input line. If
79 not, just beep and do nothing. 79 not, just beep and do nothing.
80 80
812002-12-28 Alex Schroeder <alex@gnu.org> 812002-12-28 Alex Schroeder <alex@gnu.org>
@@ -98,7 +98,7 @@
982002-12-28 Jorgen Schaefer <forcer@users.sourceforge.net> 982002-12-28 Jorgen Schaefer <forcer@users.sourceforge.net>
99 99
100 * erc.el(erc-log-irc-protocol): 100 * erc.el(erc-log-irc-protocol):
101 Removed check wether get-buffer-create 101 Removed check whether get-buffer-create
102 returned nil. "The value is never nil", says the docstring. 102 returned nil. "The value is never nil", says the docstring.
103 103
104 * erc.el: Day Of The Small Changes 104 * erc.el: Day Of The Small Changes
@@ -245,7 +245,7 @@
245 (erc-process-alive): Check erc-process for boundp and processp. 245 (erc-process-alive): Check erc-process for boundp and processp.
246 246
247 * erc.el(erc-kill-buffer-function): 247 * erc.el(erc-kill-buffer-function):
248 Do not check wether the process is 248 Do not check whether the process is
249 alive before running the hook, because there might be functions on 249 alive before running the hook, because there might be functions on
250 the hook that need to run even when the process is dead. And 250 the hook that need to run even when the process is dead. And
251 function that wants to check this, should use (erc-process-alive). 251 function that wants to check this, should use (erc-process-alive).
@@ -1037,7 +1037,7 @@
1037 * (erc-away-p): new function 1037 * (erc-away-p): new function
1038 1038
1039 erc-fill.el: 1039 erc-fill.el:
1040 * (erc-fill-variable): Check wether erc-timestamp-format is bound before 1040 * (erc-fill-variable): Check whether erc-timestamp-format is bound before
1041 using it (erc-fill.el does not require erc-stamp). 1041 using it (erc-fill.el does not require erc-stamp).
1042 1042
10432002-11-10 Alex Schroeder <alex@gnu.org> 10432002-11-10 Alex Schroeder <alex@gnu.org>
diff --git a/lisp/erc/ChangeLog.03 b/lisp/erc/ChangeLog.03
index fc7fd09e76c..3e687202d38 100644
--- a/lisp/erc/ChangeLog.03
+++ b/lisp/erc/ChangeLog.03
@@ -416,7 +416,7 @@
416 * erc-button.el: New variable erc-button-wrap-long-urls. 416 * erc-button.el: New variable erc-button-wrap-long-urls.
417 Modified erc-button-add-buttons: 417 Modified erc-button-add-buttons:
418 New optional argument REGEXP. 418 New optional argument REGEXP.
419 If we're buttonising a URL and erc-button-wrap-long-urls is 419 If we're buttonizing a URL and erc-button-wrap-long-urls is
420 non-nil, try and wrap them 420 non-nil, try and wrap them
421 421
422 Modified erc-button-add-buttons-1: 422 Modified erc-button-add-buttons-1:
@@ -693,10 +693,10 @@
6932003-04-29 Jorgen Schaefer <forcer@users.sourceforge.net> 6932003-04-29 Jorgen Schaefer <forcer@users.sourceforge.net>
694 694
695 * erc.el(erc): 695 * erc.el(erc):
696 Check wether erc-save-buffer-in-logs is bound, too 696 Check whether erc-save-buffer-in-logs is bound, too
697 697
698 * erc.el(erc): 698 * erc.el(erc):
699 Check wether erc-logging-enabled is bound before using it - not 699 Check whether erc-logging-enabled is bound before using it - not
700 everyone is using erc-log.el! 700 everyone is using erc-log.el!
701 701
7022003-04-28 Andreas Fuchs <asf@void.at> 7022003-04-28 Andreas Fuchs <asf@void.at>
@@ -822,7 +822,7 @@
822 (define-erc-module): the enable and disable routines now update erc-modules 822 (define-erc-module): the enable and disable routines now update erc-modules
823 accordingly 823 accordingly
824 erc-modules: new variable controlling the modules which erc has loaded/will 824 erc-modules: new variable controlling the modules which erc has loaded/will
825 load. when customising, it will automatically enable modules. it won't 825 load. when customizing, it will automatically enable modules. it won't
826 automatically disable modules which are removed, yet. 826 automatically disable modules which are removed, yet.
827 (erc-update-modules): enable all modules in `erc-modules' 827 (erc-update-modules): enable all modules in `erc-modules'
828 828
@@ -1058,7 +1058,7 @@
1058 * erc.el(erc-process-input-line): 1058 * erc.el(erc-process-input-line):
1059 when displaying the help for a function, if no 1059 when displaying the help for a function, if no
1060 documentation exists, don't fall over 1060 documentation exists, don't fall over
1061 (erc-cmd-SAY): new function for quoting lines begining with / 1061 (erc-cmd-SAY): new function for quoting lines beginning with /
1062 (erc-server-NICK): 1062 (erc-server-NICK):
1063 - fix a bug where the "is now known as" message doesn't appear on newly 1063 - fix a bug where the "is now known as" message doesn't appear on newly
1064 created /query buffers 1064 created /query buffers
@@ -1166,7 +1166,7 @@
1166 1166
1167 (erc-person): Call erc-downcase before getting 1167 (erc-person): Call erc-downcase before getting
1168 something from the hash. 1168 something from the hash.
1169 (erc-nick-in-channel): Checking wether erc-process must be used is 1169 (erc-nick-in-channel): Checking whether erc-process must be used is
1170 unnecessary -- this will be done in erc-person. 1170 unnecessary -- this will be done in erc-person.
1171 (erc-nick-channels): New. 1171 (erc-nick-channels): New.
1172 (erc-add-nick-to-channel, erc-update-member): Call erc-downcase 1172 (erc-add-nick-to-channel, erc-update-member): Call erc-downcase
@@ -1491,7 +1491,7 @@
1491 * erc.el: 1491 * erc.el:
1492 * removed duplicate do-no-parse-args properties for the defaliased defuns 1492 * removed duplicate do-no-parse-args properties for the defaliased defuns
1493 (erc-process-input-line): show function signature when incorrect args 1493 (erc-process-input-line): show function signature when incorrect args
1494 (erc-extract-command-from-line): canonicalise defaliases before extracting 1494 (erc-extract-command-from-line): canonicalize defaliases before extracting
1495 plist 1495 plist
1496 (erc-cmd-CLEAR): fixed 1496 (erc-cmd-CLEAR): fixed
1497 (erc-cmd-UNIGNORE): fixed again 1497 (erc-cmd-UNIGNORE): fixed again
@@ -1678,7 +1678,7 @@
16782003-01-11 Jorgen Schaefer <forcer@users.sourceforge.net> 16782003-01-11 Jorgen Schaefer <forcer@users.sourceforge.net>
1679 1679
1680 * erc-stamp.el(erc-insert-timestamp-right): 1680 * erc-stamp.el(erc-insert-timestamp-right):
1681 Check wether erc-fill-column is 1681 Check whether erc-fill-column is
1682 available before using it. Else default to fill-column or if 1682 available before using it. Else default to fill-column or if
1683 everything else fails, the window width of the current window. For the 1683 everything else fails, the window width of the current window. For the
1684 fill-columns, use them directly as the starting position for the 1684 fill-columns, use them directly as the starting position for the
diff --git a/lisp/erc/erc-backend.el b/lisp/erc/erc-backend.el
index 5baa676ab39..112091af219 100644
--- a/lisp/erc/erc-backend.el
+++ b/lisp/erc/erc-backend.el
@@ -991,7 +991,7 @@ Hands off to helper functions via `erc-call-hooks'."
991 (if (member (erc-response.command parsed-response) 991 (if (member (erc-response.command parsed-response)
992 erc-server-prevent-duplicates) 992 erc-server-prevent-duplicates)
993 (let ((m (erc-response.unparsed parsed-response))) 993 (let ((m (erc-response.unparsed parsed-response)))
994 ;; duplicate supression 994 ;; duplicate suppression
995 (if (< (or (gethash m erc-server-duplicates) 0) 995 (if (< (or (gethash m erc-server-duplicates) 0)
996 (- (erc-current-time) erc-server-duplicate-timeout)) 996 (- (erc-current-time) erc-server-duplicate-timeout))
997 (erc-call-hooks process parsed-response)) 997 (erc-call-hooks process parsed-response))
diff --git a/lisp/eshell/em-dirs.el b/lisp/eshell/em-dirs.el
index 1aa2c34c395..cab84951143 100644
--- a/lisp/eshell/em-dirs.el
+++ b/lisp/eshell/em-dirs.el
@@ -160,7 +160,7 @@ it's far more automatic. `pushd' allows the user to decide which
160directories gets pushed, and its size is unlimited. 160directories gets pushed, and its size is unlimited.
161 161
162`eshell-last-dir-ring' is meant for users who don't use `pushd' 162`eshell-last-dir-ring' is meant for users who don't use `pushd'
163explicity very much, but every once in a while would like to return to 163explicitly very much, but every once in a while would like to return to
164a previously visited directory without having to type in the whole 164a previously visited directory without having to type in the whole
165thing again." 165thing again."
166 :type 'integer 166 :type 'integer
diff --git a/lisp/eshell/em-rebind.el b/lisp/eshell/em-rebind.el
index 2c346dfcd3d..b6f12e1ff2e 100644
--- a/lisp/eshell/em-rebind.el
+++ b/lisp/eshell/em-rebind.el
@@ -144,7 +144,7 @@ This is default behavior of shells like bash."
144;;; Functions: 144;;; Functions:
145 145
146(defun eshell-rebind-initialize () 146(defun eshell-rebind-initialize ()
147 "Initialize the inputing code." 147 "Initialize the inputting code."
148 (unless eshell-non-interactive-p 148 (unless eshell-non-interactive-p
149 (add-hook 'eshell-mode-hook 'eshell-setup-input-keymap nil t) 149 (add-hook 'eshell-mode-hook 'eshell-setup-input-keymap nil t)
150 (make-local-variable 'eshell-previous-point) 150 (make-local-variable 'eshell-previous-point)
diff --git a/lisp/faces.el b/lisp/faces.el
index f10c9f87f25..21193589deb 100644
--- a/lisp/faces.el
+++ b/lisp/faces.el
@@ -1704,13 +1704,14 @@ If omitted or nil, that stands for the selected frame's display."
1704 (> (tty-color-gray-shades display) 2))))) 1704 (> (tty-color-gray-shades display) 2)))))
1705 1705
1706(defun read-color (&optional prompt convert-to-RGB allow-empty-name msg) 1706(defun read-color (&optional prompt convert-to-RGB allow-empty-name msg)
1707 "Read a color name or RGB triplet of the form \"#RRRRGGGGBBBB\". 1707 "Read a color name or RGB triplet.
1708Completion is available for color names, but not for RGB triplets. 1708Completion is available for color names, but not for RGB triplets.
1709 1709
1710RGB triplets have the form #XXXXXXXXXXXX, where each X is a hex 1710RGB triplets have the form \"#RRGGBB\". Each of the R, G, and B
1711digit. The number of Xs must be a multiple of 3, with the same 1711components can have one to four digits, but all three components
1712number of Xs for each of red, green, and blue. The order is red, 1712must have the same number of digits. Each digit is a hex value
1713green, blue. 1713between 0 and F; either upper case or lower case for A through F
1714are acceptable.
1714 1715
1715In addition to standard color names and RGB hex values, the 1716In addition to standard color names and RGB hex values, the
1716following are available as color candidates. In each case, the 1717following are available as color candidates. In each case, the
diff --git a/lisp/files.el b/lisp/files.el
index f903d2919a6..0f7386511f6 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -917,24 +917,41 @@ See `load-file' for a different interface to `load'."
917 917
918(defun file-remote-p (file &optional identification connected) 918(defun file-remote-p (file &optional identification connected)
919 "Test whether FILE specifies a location on a remote system. 919 "Test whether FILE specifies a location on a remote system.
920Returns nil or a string identifying the remote connection (ideally 920A file is considered remote if accessing it is likely to
921a prefix of FILE). For example, the remote identification for filename 921be slower or less reliable than accessing local files.
922\"/user@host:/foo\" could be \"/user@host:\". 922
923A file is considered \"remote\" if accessing it is likely to be slower or 923`file-remote-p' never opens a new remote connection. It can
924less reliable than accessing local files. 924only reuse a connection that is already open.
925Furthermore, relative file names do not work across remote connections. 925
926 926Return nil or a string identifying the remote connection
927IDENTIFICATION specifies which part of the identification shall 927\(ideally a prefix of FILE). Return nil if FILE is a relative
928be returned as string. IDENTIFICATION can be the symbol 928file name.
929`method', `user', `host' or `localname'; any other value is 929
930handled like nil and means to return the complete identification 930When IDENTIFICATION is nil, the returned string is a complete
931string. 931remote identifier: with components method, user, and host. The
932 932components are those present in FILE, with defaults filled in for
933If CONNECTED is non-nil, the function returns an identification only 933any that are missing.
934if FILE is located on a remote system, and a connection is established 934
935to that remote system. 935IDENTIFICATION can specify which part of the identification to
936 936return. IDENTIFICATION can be the symbol `method', `user',
937`file-remote-p' will never open a connection on its own." 937`host', or `localname'. Any other value is handled like nil and
938means to return the complete identification. The string returned
939for IDENTIFICATION `localname' can differ depending on whether
940there is an existing connection.
941
942If CONNECTED is non-nil, return an identification only if FILE is
943located on a remote system and a connection is established to
944that remote system.
945
946Tip: You can use this expansion of remote identifier components
947 to derive a new remote file name from an existing one. For
948 example, if FILE is \"/sudo::/path/to/file\" then
949
950 \(concat \(file-remote-p FILE) \"/bin/sh\")
951
952 returns a remote file name for file \"/bin/sh\" that has the
953 same remote identifier as FILE but expanded; a name such as
954 \"/sudo:root@myhost:/bin/sh\"."
938 (let ((handler (find-file-name-handler file 'file-remote-p))) 955 (let ((handler (find-file-name-handler file 'file-remote-p)))
939 (if handler 956 (if handler
940 (funcall handler 'file-remote-p file identification connected) 957 (funcall handler 'file-remote-p file identification connected)
@@ -4866,7 +4883,7 @@ given. With a prefix argument, TRASH is nil."
4866 directory 'full directory-files-no-dot-files-regexp)) 4883 directory 'full directory-files-no-dot-files-regexp))
4867 (error "Directory is not empty, not moving to trash") 4884 (error "Directory is not empty, not moving to trash")
4868 (move-file-to-trash directory))) 4885 (move-file-to-trash directory)))
4869 ;; Otherwise, call outselves recursively if needed. 4886 ;; Otherwise, call ourselves recursively if needed.
4870 (t 4887 (t
4871 (if (and recursive (not (file-symlink-p directory))) 4888 (if (and recursive (not (file-symlink-p directory)))
4872 (mapc (lambda (file) 4889 (mapc (lambda (file)
@@ -6110,7 +6127,7 @@ message to that effect instead of signaling an error."
6110 6127
6111(defvar kill-emacs-query-functions nil 6128(defvar kill-emacs-query-functions nil
6112 "Functions to call with no arguments to query about killing Emacs. 6129 "Functions to call with no arguments to query about killing Emacs.
6113If any of these functions returns nil, killing Emacs is cancelled. 6130If any of these functions returns nil, killing Emacs is canceled.
6114`save-buffers-kill-emacs' calls these functions, but `kill-emacs', 6131`save-buffers-kill-emacs' calls these functions, but `kill-emacs',
6115the low level primitive, does not. See also `kill-emacs-hook'.") 6132the low level primitive, does not. See also `kill-emacs-hook'.")
6116 6133
diff --git a/lisp/filesets.el b/lisp/filesets.el
index 680a107adfe..0f6c6e8dd78 100644
--- a/lisp/filesets.el
+++ b/lisp/filesets.el
@@ -453,7 +453,7 @@ will not be rewrapped if their length exceeds this value."
453 :group 'filesets) 453 :group 'filesets)
454 454
455(defcustom filesets-max-entry-length 50 455(defcustom filesets-max-entry-length 50
456 "Truncate names of splitted submenus to this length." 456 "Truncate names of split submenus to this length."
457 :set (function filesets-set-default) 457 :set (function filesets-set-default)
458 :type 'integer 458 :type 'integer
459 :group 'filesets) 459 :group 'filesets)
diff --git a/lisp/follow.el b/lisp/follow.el
index 2273e8920fd..ee8be14c6dc 100644
--- a/lisp/follow.el
+++ b/lisp/follow.el
@@ -1129,7 +1129,7 @@ Otherwise, return nil."
1129;;{{{ Redisplay 1129;;{{{ Redisplay
1130 1130
1131;; Redraw all the windows on the screen, starting with the top window. 1131;; Redraw all the windows on the screen, starting with the top window.
1132;; The window used as as marker is WIN, or the selcted window if WIN 1132;; The window used as as marker is WIN, or the selected window if WIN
1133;; is nil. Start every window directly after the end of the previous 1133;; is nil. Start every window directly after the end of the previous
1134;; window, to make sure long lines are displayed correctly. 1134;; window, to make sure long lines are displayed correctly.
1135 1135
@@ -1993,7 +1993,7 @@ report this using the `report-emacs-bug' function."
1993;; going to be recentered at the next redisplay, unless we do a 1993;; going to be recentered at the next redisplay, unless we do a
1994;; read-and-write cycle to update the `force' flag inside the windows. 1994;; read-and-write cycle to update the `force' flag inside the windows.
1995;; 1995;;
1996;; In 19.30, a new varible `window-scroll-functions' is called every 1996;; In 19.30, a new variable `window-scroll-functions' is called every
1997;; time a window is recentered. It is not perfect for our situation, 1997;; time a window is recentered. It is not perfect for our situation,
1998;; since when it is called for a tail window, it is to late. However, 1998;; since when it is called for a tail window, it is to late. However,
1999;; if it is called for another window, we can try to update our 1999;; if it is called for another window, we can try to update our
diff --git a/lisp/font-lock.el b/lisp/font-lock.el
index c319974fb41..2db0d809275 100644
--- a/lisp/font-lock.el
+++ b/lisp/font-lock.el
@@ -294,7 +294,7 @@ If a number, only buffers greater than this size have fontification messages."
294;; and they give users another mechanism for changing face appearance. 294;; and they give users another mechanism for changing face appearance.
295;; We now allow a FACENAME in `font-lock-keywords' to be any expression that 295;; We now allow a FACENAME in `font-lock-keywords' to be any expression that
296;; returns a face. So the easiest thing is to continue using these variables, 296;; returns a face. So the easiest thing is to continue using these variables,
297;; rather than sometimes evaling FACENAME and sometimes not. sm. 297;; rather than sometimes evalling FACENAME and sometimes not. sm.
298 298
299;; Note that in new code, in the vast majority of cases there is no 299;; Note that in new code, in the vast majority of cases there is no
300;; need to create variables that specify face names. Simply using 300;; need to create variables that specify face names. Simply using
diff --git a/lisp/forms.el b/lisp/forms.el
index 215f3ce88f7..0d92dc3ffd9 100644
--- a/lisp/forms.el
+++ b/lisp/forms.el
@@ -709,7 +709,7 @@ Commands: Equivalent keys in read-only mode:
709 (forms-first-record)) 709 (forms-first-record))
710 ) 710 )
711 711
712 ;; user customising 712 ;; user customizing
713 ;;(message "forms: proceeding setup (user hooks)...") 713 ;;(message "forms: proceeding setup (user hooks)...")
714 (run-mode-hooks 'forms-mode-hook 'forms-mode-hooks) 714 (run-mode-hooks 'forms-mode-hook 'forms-mode-hooks)
715 ;;(message "forms: setting up... done.") 715 ;;(message "forms: setting up... done.")
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog
index fbfcda57b53..1fff67074e7 100644
--- a/lisp/gnus/ChangeLog
+++ b/lisp/gnus/ChangeLog
@@ -1,3 +1,32 @@
12011-12-28 Katsumi Yamaoka <yamaoka@jpl.org>
2
3 * mm-view.el (mm-display-inline-fontify): Add comment.
4
52011-12-15 Juri Linkov <juri@jurta.org>
6
7 * mm-decode.el (mm-inline-media-tests): Add missing
8 `mm-handle-media-subtype'.
9
102011-12-09 Tassilo Horn <tassilo@member.fsf.org>
11
12 * message.el (message-valid-fqdn-regexp): Update with newly approved
13 top-level domain names ".tel" and ".asia".
14
152011-12-08 Katsumi Yamaoka <yamaoka@jpl.org>
16
17 * gnus-sum.el (gnus-summary-show-article): Don't load shr
18 unconditionally.
19
202011-12-07 Katsumi Yamaoka <yamaoka@jpl.org>
21
22 * message.el (message-pop-to-buffer): Use pop-to-buffer instead of
23 pop-to-buffer-same-window for old Emacsen.
24
252011-12-04 Chong Yidong <cyd@gnu.org>
26
27 * message.el (message-pop-to-buffer): Partially revert 2011-11-30
28 change (Bug#10200).
29
12011-12-02 Katsumi Yamaoka <yamaoka@jpl.org> 302011-12-02 Katsumi Yamaoka <yamaoka@jpl.org>
2 31
3 * compface.el (uncompface): 32 * compface.el (uncompface):
@@ -145,7 +174,7 @@
145 174
1462011-10-17 Dave Abrahams <dave@boostpro.com> (tiny change) 1752011-10-17 Dave Abrahams <dave@boostpro.com> (tiny change)
147 176
148 * gnus-registry.el (gnus-registry-enabled): Add new variable. (Bug#9691) 177 * gnus-registry.el (gnus-registry-enabled): Add new variable (bug#9691).
149 (gnus-registry-install-shortcuts): Set `gnus-registry-install' to 'ask 178 (gnus-registry-install-shortcuts): Set `gnus-registry-install' to 'ask
150 only while we need to find out if it should be t or nil. 179 only while we need to find out if it should be t or nil.
151 (gnus-registry-initialize): Don't set `gnus-registry-install' to t. 180 (gnus-registry-initialize): Don't set `gnus-registry-install' to t.
@@ -304,7 +333,7 @@
3042011-09-20 Julien Danjou <julien@danjou.info> 3332011-09-20 Julien Danjou <julien@danjou.info>
305 334
306 * auth-source.el (auth-source-netrc-create): Use default value for 335 * auth-source.el (auth-source-netrc-create): Use default value for
307 password if specified. Evaluate default. 336 password if specified. Evaluate default.
308 (auth-source-plstore-create): Ditto. 337 (auth-source-plstore-create): Ditto.
309 (auth-source-plstore-create, auth-source-netrc-create): Fix default 338 (auth-source-plstore-create, auth-source-netrc-create): Fix default
310 value evaluation. 339 value evaluation.
@@ -360,7 +389,7 @@
360 (message-mail-other-window, message-mail-other-frame) 389 (message-mail-other-window, message-mail-other-frame)
361 (message-news-other-window, message-news-other-frame): 390 (message-news-other-window, message-news-other-frame):
362 Use switch-to-buffer-other-frame and switch-to-buffer-other-window 391 Use switch-to-buffer-other-frame and switch-to-buffer-other-window
363 instead of setting buffer display varibles. 392 instead of setting buffer display variables.
364 393
3652011-09-11 Lars Magne Ingebrigtsen <larsi@gnus.org> 3942011-09-11 Lars Magne Ingebrigtsen <larsi@gnus.org>
366 395
@@ -621,8 +650,8 @@
621 650
6222011-08-05 Andrew Cohen <cohen@andy.bu.edu> 6512011-08-05 Andrew Cohen <cohen@andy.bu.edu>
623 652
624 * gnus-sum.el (gnus-summary-refer-article): Warp to article. This 653 * gnus-sum.el (gnus-summary-refer-article): Warp to article.
625 allows article-referral to work from an nnir group. 654 This allows article-referral to work from an nnir group.
626 655
6272011-08-04 Andrew Cohen <cohen@andy.bu.edu> 6562011-08-04 Andrew Cohen <cohen@andy.bu.edu>
628 657
@@ -638,7 +667,7 @@
6382011-08-03 Andrew Cohen <cohen@andy.bu.edu> 6672011-08-03 Andrew Cohen <cohen@andy.bu.edu>
639 668
640 * nnir.el (nnir-read-server-parm): Add an argument to restrict to 669 * nnir.el (nnir-read-server-parm): Add an argument to restrict to
641 server-variables only. This should fix a bug introduced with commit 670 server-variables only. This should fix a bug introduced with commit
642 e1889675b7f4adf057833c5513c9374134c4e053. 671 e1889675b7f4adf057833c5513c9374134c4e053.
643 (nnir-run-query): 'nnir-search-engine should not be set from the global 672 (nnir-run-query): 'nnir-search-engine should not be set from the global
644 environment. 673 environment.
@@ -1838,7 +1867,7 @@
18382011-03-21 Julien Danjou <julien@danjou.info> 18672011-03-21 Julien Danjou <julien@danjou.info>
1839 1868
1840 * mm-view.el (mm-display-inline-fontify): Make mode optional, and call 1869 * mm-view.el (mm-display-inline-fontify): Make mode optional, and call
1841 normal-mode if not set. Set temp buffer unmodified to avoid kill-buffer 1870 normal-mode if not set. Set temp buffer unmodified to avoid kill-buffer
1842 query. 1871 query.
1843 (mm-inline-text): Render normal text with fontification whenever 1872 (mm-inline-text): Render normal text with fontification whenever
1844 possible. 1873 possible.
@@ -2682,9 +2711,9 @@
2682 * gnus.el (gnus-summary-line-format): Mention &user-date format in 2711 * gnus.el (gnus-summary-line-format): Mention &user-date format in
2683 docstring. 2712 docstring.
2684 2713
2685 * gnus.el (gnus-user-date-format-alist): Change default value. Use 2714 * gnus.el (gnus-user-date-format-alist): Change default value.
2686 defcustom, with type and group. Move from gnus-util.el. Rename to 2715 Use defcustom, with type and group. Move from gnus-util.el.
2687 gnus-summary-user-date-format-alist. 2716 Rename to gnus-summary-user-date-format-alist.
2688 2717
26892011-02-03 Glenn Morris <rgm@gnu.org> 27182011-02-03 Glenn Morris <rgm@gnu.org>
2690 2719
@@ -3211,12 +3240,12 @@
32112010-12-17 Julien Danjou <julien@danjou.info> 32402010-12-17 Julien Danjou <julien@danjou.info>
3212 3241
3213 * gnus-util.el (gnus-rescale-image): Allow to resize images even if 3242 * gnus-util.el (gnus-rescale-image): Allow to resize images even if
3214 they are from file. Can also scale up. 3243 they are from file. Can also scale up.
3215 3244
32162010-12-17 Andrew Cohen <cohen@andy.bu.edu> 32452010-12-17 Andrew Cohen <cohen@andy.bu.edu>
3217 3246
3218 * gnus-sum.el (gnus-summary-refer-thread): Simplify code. Restore 3247 * gnus-sum.el (gnus-summary-refer-thread): Simplify code.
3219 gnus-use-agent. 3248 Restore gnus-use-agent.
3220 (gnus-get-newsgroup-headers): Avoid unwanted spaces at eol. 3249 (gnus-get-newsgroup-headers): Avoid unwanted spaces at eol.
3221 3250
3222 * nnir.el (nnir-get-active): Ignore nnir-ignored-newsgroups if null. 3251 * nnir.el (nnir-get-active): Ignore nnir-ignored-newsgroups if null.
@@ -3574,8 +3603,8 @@
3574 * nnir.el: Update to handle the registry better. 3603 * nnir.el: Update to handle the registry better.
3575 (autoload): Silence byte-compiler. 3604 (autoload): Silence byte-compiler.
3576 (nnir-open-server): Add a hook for nnir groups. 3605 (nnir-open-server): Add a hook for nnir groups.
3577 (nnir-request-move-article): Don't mangle the header. Better to use 3606 (nnir-request-move-article): Don't mangle the header. Better to use
3578 formating variables (which will be added in the future). 3607 formatting variables (which will be added in the future).
3579 (nnir-registry-action): Update the registry using the original article 3608 (nnir-registry-action): Update the registry using the original article
3580 group name. 3609 group name.
3581 (nnir-mode): Install nnir-specific hooks for updating the registry. 3610 (nnir-mode): Install nnir-specific hooks for updating the registry.
@@ -4010,7 +4039,7 @@
40102010-11-21 Andrew Cohen <cohen@andy.bu.edu> 40392010-11-21 Andrew Cohen <cohen@andy.bu.edu>
4011 4040
4012 * nnir.el: Fix typo in comments. 4041 * nnir.el: Fix typo in comments.
4013 (nnir-run-imap): Simplify code. No need to reverse artlist. 4042 (nnir-run-imap): Simplify code. No need to reverse artlist.
4014 (nnir-run-gmane): Use nnir-tmp-buffer for web results. 4043 (nnir-run-gmane): Use nnir-tmp-buffer for web results.
4015 4044
40162010-11-21 Lars Magne Ingebrigtsen <larsi@gnus.org> 40452010-11-21 Lars Magne Ingebrigtsen <larsi@gnus.org>
@@ -4042,8 +4071,8 @@
4042 4071
40432010-11-19 Katsumi Yamaoka <yamaoka@jpl.org> 40722010-11-19 Katsumi Yamaoka <yamaoka@jpl.org>
4044 4073
4045 * gnus-art.el (gnus-mime-display-single) 4074 * gnus-art.el (gnus-mime-display-single):
4046 * gnus-html.el (gnus-html-wash-images, gnus-html-prefetch-images) 4075 * gnus-html.el (gnus-html-wash-images, gnus-html-prefetch-images):
4047 * mm-decode.el (mm-shr): Assume that gnus-inhibit-images may be a group 4076 * mm-decode.el (mm-shr): Assume that gnus-inhibit-images may be a group
4048 parameter. 4077 parameter.
4049 4078
@@ -4398,7 +4427,7 @@
4398 * gnus-util.el (gnus-string-match-p): New function, that is an alias to 4427 * gnus-util.el (gnus-string-match-p): New function, that is an alias to
4399 string-match-p in Emacs >=23. 4428 string-match-p in Emacs >=23.
4400 4429
4401 * gnus-msg.el (gnus-configure-posting-styles) 4430 * gnus-msg.el (gnus-configure-posting-styles):
4402 * nnir.el (nnir-run-gmane): Use gnus-string-match-p. 4431 * nnir.el (nnir-run-gmane): Use gnus-string-match-p.
4403 4432
44042010-11-01 Glenn Morris <rgm@gnu.org> 44332010-11-01 Glenn Morris <rgm@gnu.org>
@@ -5346,8 +5375,8 @@
5346 * gnus-util.el (gnus-remove-if): Allow hash table. 5375 * gnus-util.el (gnus-remove-if): Allow hash table.
5347 (gnus-remove-if-not): New function. 5376 (gnus-remove-if-not): New function.
5348 5377
5349 * gnus-art.el (gnus-mime-view-part-as-type) 5378 * gnus-art.el (gnus-mime-view-part-as-type):
5350 * gnus-score.el (gnus-summary-score-effect) 5379 * gnus-score.el (gnus-summary-score-effect):
5351 * gnus-sum.el (gnus-read-move-group-name): 5380 * gnus-sum.el (gnus-read-move-group-name):
5352 Replace remove-if-not with gnus-remove-if-not. 5381 Replace remove-if-not with gnus-remove-if-not.
5353 5382
@@ -5836,8 +5865,8 @@
58362010-09-29 Katsumi Yamaoka <yamaoka@jpl.org> 58652010-09-29 Katsumi Yamaoka <yamaoka@jpl.org>
5837 5866
5838 * mm-util.el (mm-codepage-iso-8859-list, mm-charset-eval-alist) 5867 * mm-util.el (mm-codepage-iso-8859-list, mm-charset-eval-alist)
5839 (mm-mime-charset) 5868 (mm-mime-charset):
5840 * rfc2047.el (rfc2047-syntax-table) 5869 * rfc2047.el (rfc2047-syntax-table):
5841 * utf7.el (utf7-utf-16-coding-system): Comment fix. 5870 * utf7.el (utf7-utf-16-coding-system): Comment fix.
5842 5871
5843 * nnrss.el (nnrss-read-server-data, nnrss-read-group-data): Use `load' 5872 * nnrss.el (nnrss-read-server-data, nnrss-read-group-data): Use `load'
@@ -5852,8 +5881,8 @@
5852 5881
58532010-09-28 Katsumi Yamaoka <yamaoka@jpl.org> 58822010-09-28 Katsumi Yamaoka <yamaoka@jpl.org>
5854 5883
5855 * mail-source.el (mail-source-report-new-mail) 5884 * mail-source.el (mail-source-report-new-mail):
5856 * message.el (message-default-mail-headers) 5885 * message.el (message-default-mail-headers):
5857 * mm-decode.el (mm-valid-image-format-p): Comment fix. 5886 * mm-decode.el (mm-valid-image-format-p): Comment fix.
5858 5887
5859 * mml2015.el (mml2015-use): Don't bind recursive-load-depth-limit. 5888 * mml2015.el (mml2015-use): Don't bind recursive-load-depth-limit.
@@ -6349,8 +6378,8 @@
6349 (gnus-article-next-page-1): No need to adjust the number of lines. 6378 (gnus-article-next-page-1): No need to adjust the number of lines.
6350 (gnus-article-describe-bindings): Always use help-buffer. 6379 (gnus-article-describe-bindings): Always use help-buffer.
6351 6380
6352 * gnus-audio.el (gnus-audio-inline-sound) 6381 * gnus-audio.el (gnus-audio-inline-sound):
6353 * gnus-cus.el (gnus-custom-mode) 6382 * gnus-cus.el (gnus-custom-mode):
6354 * gnus-group.el (gnus-group-update-tool-bar): Comment fix. 6383 * gnus-group.el (gnus-group-update-tool-bar): Comment fix.
6355 6384
6356 * gnus-sum.el (gnus-remove-overlays): Doc fix. 6385 * gnus-sum.el (gnus-remove-overlays): Doc fix.
@@ -6546,9 +6575,9 @@
6546 6575
65472010-09-22 Katsumi Yamaoka <yamaoka@jpl.org> 65762010-09-22 Katsumi Yamaoka <yamaoka@jpl.org>
6548 6577
6549 * mailcap.el (mailcap-parse-mailcap, mailcap-parse-mimetypes) 6578 * mailcap.el (mailcap-parse-mailcap, mailcap-parse-mimetypes):
6550 * mm-util.el (mm-decompress-buffer) 6579 * mm-util.el (mm-decompress-buffer):
6551 * nnir.el (nnir-run-find-grep) 6580 * nnir.el (nnir-run-find-grep):
6552 * pop3.el (pop3-list): Use 3rd arg of split-string. 6581 * pop3.el (pop3-list): Use 3rd arg of split-string.
6553 6582
65542010-09-21 Lars Magne Ingebrigtsen <larsi@gnus.org> 65832010-09-21 Lars Magne Ingebrigtsen <larsi@gnus.org>
@@ -7123,7 +7152,7 @@
7123 7152
7124 * gnus-start.el (gnus-activate-group): Take an optional parameter to 7153 * gnus-start.el (gnus-activate-group): Take an optional parameter to
7125 say that you don't want to call gnus-request-group with don-check, but 7154 say that you don't want to call gnus-request-group with don-check, but
7126 do check the reponse. This is for virtual groups only. 7155 do check the response. This is for virtual groups only.
7127 (gnus-get-unread-articles): Count the archive groups as secondary, so 7156 (gnus-get-unread-articles): Count the archive groups as secondary, so
7128 that they're activated the same way as before. 7157 that they're activated the same way as before.
7129 7158
@@ -7414,7 +7443,7 @@
74142010-09-01 Katsumi Yamaoka <yamaoka@jpl.org> 74432010-09-01 Katsumi Yamaoka <yamaoka@jpl.org>
7415 7444
7416 * gnus-html.el (gnus-html-cache-directory, gnus-html-cache-size) 7445 * gnus-html.el (gnus-html-cache-directory, gnus-html-cache-size)
7417 (gnus-html-frame-width, gnus-blocked-images) 7446 (gnus-html-frame-width, gnus-blocked-images):
7418 * message.el (message-prune-recipient-rules): Add custom version. 7447 * message.el (message-prune-recipient-rules): Add custom version.
7419 * gnus-sum.el (gnus-auto-expirable-marks): Bump custom version. 7448 * gnus-sum.el (gnus-auto-expirable-marks): Bump custom version.
7420 7449
@@ -7464,11 +7493,11 @@
7464 * gnus-ems.el: Provide compatibility functions for 7493 * gnus-ems.el: Provide compatibility functions for
7465 gnus-set-process-plist. 7494 gnus-set-process-plist.
7466 7495
7467 * gnus-sum.el (gnus-summary-stop-at-end-of-message) 7496 * gnus-sum.el (gnus-summary-stop-at-end-of-message):
7468 * gnus.el (gnus-valid-select-methods) 7497 * gnus.el (gnus-valid-select-methods):
7469 * message.el (message-send-mail-partially-limit) 7498 * message.el (message-send-mail-partially-limit):
7470 * mm-decode.el (mm-text-html-renderer) 7499 * mm-decode.el (mm-text-html-renderer):
7471 * mml.el (mml-insert-mime-headers-always) 7500 * mml.el (mml-insert-mime-headers-always):
7472 * smiley.el (smiley-regexp-alist): Bump custom version. 7501 * smiley.el (smiley-regexp-alist): Bump custom version.
7473 7502
74742010-08-31 Lars Magne Ingebrigtsen <larsi@gnus.org> 75032010-08-31 Lars Magne Ingebrigtsen <larsi@gnus.org>
@@ -7800,7 +7829,7 @@
7800 7829
78012010-05-13 Katsumi Yamaoka <yamaoka@jpl.org> 78302010-05-13 Katsumi Yamaoka <yamaoka@jpl.org>
7802 7831
7803 * mml1991.el (mml1991-mailcrypt-encrypt, mml1991-gpg-encrypt) 7832 * mml1991.el (mml1991-mailcrypt-encrypt, mml1991-gpg-encrypt):
7804 * mml2015.el (mml2015-gpg-encrypt): Disable multibyte in buffers 7833 * mml2015.el (mml2015-gpg-encrypt): Disable multibyte in buffers
7805 generated within the mm-with-unibyte-current-buffer macro. 7834 generated within the mm-with-unibyte-current-buffer macro.
7806 7835
@@ -7875,11 +7904,11 @@
7875 7904
78762010-05-07 Katsumi Yamaoka <yamaoka@jpl.org> 79052010-05-07 Katsumi Yamaoka <yamaoka@jpl.org>
7877 7906
7878 * nnweb.el (nnweb-gmane-search) 7907 * nnweb.el (nnweb-gmane-search):
7879 * yenc.el (yenc-decode-region): Don't run set-buffer-multibyte for 7908 * yenc.el (yenc-decode-region): Don't run set-buffer-multibyte for
7880 XEmacs. 7909 XEmacs.
7881 7910
7882 * gnus-art.el (gnus-article-browse-html-parts) 7911 * gnus-art.el (gnus-article-browse-html-parts):
7883 * gnus-group.el (gnus-read-ephemeral-gmane-group) 7912 * gnus-group.el (gnus-read-ephemeral-gmane-group)
7884 (gnus-read-ephemeral-bug-grou): Use mm-make-temp-file instead of 7913 (gnus-read-ephemeral-bug-grou): Use mm-make-temp-file instead of
7885 make-temp-file. 7914 make-temp-file.
@@ -10587,10 +10616,10 @@
10587 10616
105882007-12-05 Katsumi Yamaoka <yamaoka@jpl.org> 106172007-12-05 Katsumi Yamaoka <yamaoka@jpl.org>
10589 10618
10590 * gnus-art.el (gnus-use-idna) 10619 * gnus-art.el (gnus-use-idna):
10591 * gnus-start.el (gnus-site-init-file) 10620 * gnus-start.el (gnus-site-init-file):
10592 * message.el (message-use-idna) 10621 * message.el (message-use-idna):
10593 * mm-uu.el (mm-uu-hide-markers) 10622 * mm-uu.el (mm-uu-hide-markers):
10594 * smiley.el (smiley-style): Revert changes that suppress warnings. 10623 * smiley.el (smiley-style): Revert changes that suppress warnings.
10595 10624
105962007-12-05 Katsumi Yamaoka <yamaoka@jpl.org> 106252007-12-05 Katsumi Yamaoka <yamaoka@jpl.org>
@@ -11892,13 +11921,13 @@
118922007-05-25 Katsumi Yamaoka <yamaoka@jpl.org> 119212007-05-25 Katsumi Yamaoka <yamaoka@jpl.org>
11893 11922
11894 * gnus-art.el (gnus-header-from, gnus-header-subject, gnus-header-name) 11923 * gnus-art.el (gnus-header-from, gnus-header-subject, gnus-header-name)
11895 (gnus-header-content) 11924 (gnus-header-content):
11896 * gnus-cite.el (gnus-cite-10) 11925 * gnus-cite.el (gnus-cite-10):
11897 * gnus-srvr.el (gnus-server-closed) 11926 * gnus-srvr.el (gnus-server-closed):
11898 * gnus.el (gnus-group-mail-1, gnus-group-mail-1-empty) 11927 * gnus.el (gnus-group-mail-1, gnus-group-mail-1-empty)
11899 (gnus-group-mail-2, gnus-group-mail-2-empty, gnus-group-mail-3) 11928 (gnus-group-mail-2, gnus-group-mail-2-empty, gnus-group-mail-3)
11900 (gnus-group-mail-3-empty, gnus-group-mail-low) 11929 (gnus-group-mail-3-empty, gnus-group-mail-low)
11901 (gnus-group-mail-low-empty, gnus-splash) 11930 (gnus-group-mail-low-empty, gnus-splash):
11902 * message.el (message-header-to, message-header-cc) 11931 * message.el (message-header-to, message-header-cc)
11903 (message-header-subject, message-header-other, message-header-name) 11932 (message-header-subject, message-header-other, message-header-name)
11904 (message-header-xheader, message-separator, message-cited-text) 11933 (message-header-xheader, message-separator, message-cited-text)
@@ -21315,7 +21344,7 @@
21315 (gnus-agent-cat-groups): Use eval-and-compile, not 21344 (gnus-agent-cat-groups): Use eval-and-compile, not
21316 eval-when-compile, to define gnus-agent-set-cat-groups as the setf 21345 eval-when-compile, to define gnus-agent-set-cat-groups as the setf
21317 method of gnus-agent-cat-groups even when the buffer has been 21346 method of gnus-agent-cat-groups even when the buffer has been
21318 evaled. 21347 evalled.
21319 (gnus-agent-save-active, gnus-agent-save-active-1): Merge to 21348 (gnus-agent-save-active, gnus-agent-save-active-1): Merge to
21320 delete gnus-agent-save-active-1. 21349 delete gnus-agent-save-active-1.
21321 (gnus-agent-save-groups): Delete. Identical to 21350 (gnus-agent-save-groups): Delete. Identical to
@@ -21831,7 +21860,7 @@
21831 21860
218322004-01-06 Steve Youngs <sryoungs@bigpond.net.au> 218612004-01-06 Steve Youngs <sryoungs@bigpond.net.au>
21833 21862
21834 * gnus-ems.el (gnus-mode-line-modified): Don't conditionalise on 21863 * gnus-ems.el (gnus-mode-line-modified): Don't conditionalize on
21835 XEmacs version. 21864 XEmacs version.
21836 21865
21837 * dns.el (dns-make-network-process): Use `open-network-stream' 21866 * dns.el (dns-make-network-process): Use `open-network-stream'
diff --git a/lisp/gnus/ChangeLog.2 b/lisp/gnus/ChangeLog.2
index 6b11a956a99..64b15ce31b3 100644
--- a/lisp/gnus/ChangeLog.2
+++ b/lisp/gnus/ChangeLog.2
@@ -5094,7 +5094,7 @@
50942003-02-02 Katsumi Yamaoka <yamaoka@jpl.org> 50942003-02-02 Katsumi Yamaoka <yamaoka@jpl.org>
5095 5095
5096 * nnheader.el (nnheader-directory-separator-character): Change the 5096 * nnheader.el (nnheader-directory-separator-character): Change the
5097 way to compute the dafault value. 5097 way to compute the default value.
5098 5098
50992003-02-02 Jesper Harder <harder@ifa.au.dk> 50992003-02-02 Jesper Harder <harder@ifa.au.dk>
5100 5100
@@ -8442,7 +8442,7 @@
8442 8442
84432002-07-21 Nevin Kapur <nevin@jhu.edu> 84432002-07-21 Nevin Kapur <nevin@jhu.edu>
8444 8444
8445 * nnmail.el (nnmail-fancy-expiry-target): Treat nonexisting 8445 * nnmail.el (nnmail-fancy-expiry-target): Treat nonexistent
8446 headers as empty headers. 8446 headers as empty headers.
8447 8447
84482002-07-21 Jochen Hein <jochen@jochen.org> 84482002-07-21 Jochen Hein <jochen@jochen.org>
diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el
index 555c715bc2f..ea0710bf026 100644
--- a/lisp/gnus/gnus-art.el
+++ b/lisp/gnus/gnus-art.el
@@ -669,7 +669,7 @@ non-nil.
669If the match is a string, it is used as a regexp match on the 669If the match is a string, it is used as a regexp match on the
670article. If the match is a symbol, that symbol will be funcalled 670article. If the match is a symbol, that symbol will be funcalled
671from the buffer of the article to be saved with the newsgroup as the 671from the buffer of the article to be saved with the newsgroup as the
672parameter. If it is a list, it will be evaled in the same buffer. 672parameter. If it is a list, it will be evalled in the same buffer.
673 673
674If this form or function returns a string, this string will be used as a 674If this form or function returns a string, this string will be used as a
675possible file name; and if it returns a non-nil list, that list will be 675possible file name; and if it returns a non-nil list, that list will be
diff --git a/lisp/gnus/gnus-fun.el b/lisp/gnus/gnus-fun.el
index 08ec3c4ffb0..44cb1583ec9 100644
--- a/lisp/gnus/gnus-fun.el
+++ b/lisp/gnus/gnus-fun.el
@@ -274,10 +274,10 @@ colors of the displayed X-Faces."
274 result)) 274 result))
275 275
276(defun gnus-fun-ppm-change-string () 276(defun gnus-fun-ppm-change-string ()
277 (let* ((possibilites '("%02x0000" "00%02x00" "0000%02x" 277 (let* ((possibilities '("%02x0000" "00%02x00" "0000%02x"
278 "%02x%02x00" "00%02x%02x" "%02x00%02x")) 278 "%02x%02x00" "00%02x%02x" "%02x00%02x"))
279 (format (concat "'#%02x%02x%02x' '#" 279 (format (concat "'#%02x%02x%02x' '#"
280 (nth (random 6) possibilites) 280 (nth (random 6) possibilities)
281 "'")) 281 "'"))
282 (values nil)) 282 (values nil))
283 (dotimes (i 255) 283 (dotimes (i 255)
diff --git a/lisp/gnus/gnus-group.el b/lisp/gnus/gnus-group.el
index 694b4d7e8b4..9730b69164e 100644
--- a/lisp/gnus/gnus-group.el
+++ b/lisp/gnus/gnus-group.el
@@ -992,7 +992,7 @@ Setter function for custom variables."
992 'gnus-group-tool-bar-retro) 992 'gnus-group-tool-bar-retro)
993 "Specifies the Gnus group tool bar. 993 "Specifies the Gnus group tool bar.
994 994
995It can be either a list or a symbol refering to a list. See 995It can be either a list or a symbol referring to a list. See
996`gmm-tool-bar-from-list' for the format of the list. The 996`gmm-tool-bar-from-list' for the format of the list. The
997default key map is `gnus-group-mode-map'. 997default key map is `gnus-group-mode-map'.
998 998
diff --git a/lisp/gnus/gnus-msg.el b/lisp/gnus/gnus-msg.el
index e06d475ed6c..6ff1023383b 100644
--- a/lisp/gnus/gnus-msg.el
+++ b/lisp/gnus/gnus-msg.el
@@ -1588,7 +1588,7 @@ this is a reply."
1588 ;; BUG: We really need to get the charset for 1588 ;; BUG: We really need to get the charset for
1589 ;; each name in the Newsgroups and Followup-To 1589 ;; each name in the Newsgroups and Followup-To
1590 ;; lines to allow crossposting between group 1590 ;; lines to allow crossposting between group
1591 ;; namess with incompatible character sets. 1591 ;; names with incompatible character sets.
1592 ;; -- Per Abrahamsen <abraham@dina.kvl.dk> 2001-10-08. 1592 ;; -- Per Abrahamsen <abraham@dina.kvl.dk> 2001-10-08.
1593 (group-field-charset 1593 (group-field-charset
1594 (gnus-group-name-charset 1594 (gnus-group-name-charset
@@ -1784,7 +1784,7 @@ this is a reply."
1784 (and header 1784 (and header
1785 (string-match (nth 2 match) header))))))) 1785 (string-match (nth 2 match) header)))))))
1786 (t 1786 (t
1787 ;; This is a form to be evaled. 1787 ;; This is a form to be evalled.
1788 (eval match))))) 1788 (eval match)))))
1789 ;; We have a match, so we set the variables. 1789 ;; We have a match, so we set the variables.
1790 (dolist (attribute style) 1790 (dolist (attribute style)
diff --git a/lisp/gnus/gnus-spec.el b/lisp/gnus/gnus-spec.el
index 2345c4fc141..4c5715c67f9 100644
--- a/lisp/gnus/gnus-spec.el
+++ b/lisp/gnus/gnus-spec.el
@@ -52,7 +52,7 @@ text properties. This is only needed on XEmacs, as Emacs does this anyway."
52(defvar gnus-group-indentation "") 52(defvar gnus-group-indentation "")
53 53
54;; Format specs. The chunks below are the machine-generated forms 54;; Format specs. The chunks below are the machine-generated forms
55;; that are to be evaled as the result of the default format strings. 55;; that are to be evalled as the result of the default format strings.
56;; We write them in here to get them byte-compiled. That way the 56;; We write them in here to get them byte-compiled. That way the
57;; default actions will be quite fast, while still retaining the full 57;; default actions will be quite fast, while still retaining the full
58;; flexibility of the user-defined format specs. 58;; flexibility of the user-defined format specs.
@@ -690,7 +690,7 @@ are supported for %s."
690 (not (and (featurep 'xemacs) 690 (not (and (featurep 'xemacs)
691 gnus-use-correct-string-widths))) 691 gnus-use-correct-string-widths)))
692 (insert (number-to-string pad-width))) 692 (insert (number-to-string pad-width)))
693 ;; Create the form to be evaled. 693 ;; Create the form to be evalled.
694 (if (or max-width cut-width ignore-value 694 (if (or max-width cut-width ignore-value
695 (and (featurep 'xemacs) 695 (and (featurep 'xemacs)
696 gnus-use-correct-string-widths)) 696 gnus-use-correct-string-widths))
diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el
index b3f85cf9366..d8db300efbd 100644
--- a/lisp/gnus/gnus-sum.el
+++ b/lisp/gnus/gnus-sum.el
@@ -2835,7 +2835,7 @@ Setter function for custom variables."
2835 'gnus-summary-tool-bar-retro) 2835 'gnus-summary-tool-bar-retro)
2836 "Specifies the Gnus summary tool bar. 2836 "Specifies the Gnus summary tool bar.
2837 2837
2838It can be either a list or a symbol refering to a list. See 2838It can be either a list or a symbol referring to a list. See
2839`gmm-tool-bar-from-list' for the format of the list. The 2839`gmm-tool-bar-from-list' for the format of the list. The
2840default key map is `gnus-summary-mode-map'. 2840default key map is `gnus-summary-mode-map'.
2841 2841
@@ -2969,7 +2969,7 @@ When FORCE, rebuild the tool bar."
2969 'gnus-summary-mode-map))) 2969 'gnus-summary-mode-map)))
2970 (when map 2970 (when map
2971 ;; Need to set `gnus-summary-tool-bar-map' because `gnus-article-mode' 2971 ;; Need to set `gnus-summary-tool-bar-map' because `gnus-article-mode'
2972 ;; uses it's value. 2972 ;; uses its value.
2973 (setq gnus-summary-tool-bar-map map)))) 2973 (setq gnus-summary-tool-bar-map map))))
2974 (set (make-local-variable 'tool-bar-map) gnus-summary-tool-bar-map)) 2974 (set (make-local-variable 'tool-bar-map) gnus-summary-tool-bar-map))
2975 2975
@@ -7087,7 +7087,7 @@ With ARG, turn line truncation on if ARG is positive."
7087(defun gnus-summary-find-for-reselect () 7087(defun gnus-summary-find-for-reselect ()
7088 "Return the number of an article to stay on across a reselect. 7088 "Return the number of an article to stay on across a reselect.
7089The current article is considered, then following articles, then previous 7089The current article is considered, then following articles, then previous
7090articles. An article is sought which is not cancelled and isn't a temporary 7090articles. An article is sought which is not canceled and isn't a temporary
7091insertion from another group. If there's no such then return a dummy 0." 7091insertion from another group. If there's no such then return a dummy 0."
7092 (let (found) 7092 (let (found)
7093 (dolist (rev '(nil t)) 7093 (dolist (rev '(nil t))
@@ -9611,9 +9611,12 @@ C-u g', show the raw article."
9611 (when (gnus-summary-goto-subject (cdr gnus-article-current) nil t) 9611 (when (gnus-summary-goto-subject (cdr gnus-article-current) nil t)
9612 (gnus-summary-update-secondary-mark (cdr gnus-article-current)))))) 9612 (gnus-summary-update-secondary-mark (cdr gnus-article-current))))))
9613 ((not arg) 9613 ((not arg)
9614 (require 'shr) 9614 ;; Select the article the normal way.
9615 (let ((shr-ignore-cache t)) 9615 (if (eq mm-text-html-renderer 'shr)
9616 ;; Select the article the normal way. 9616 (progn
9617 (require 'shr)
9618 (let ((shr-ignore-cache t))
9619 (gnus-summary-select-article nil 'force)))
9617 (gnus-summary-select-article nil 'force))) 9620 (gnus-summary-select-article nil 'force)))
9618 ((equal arg '(16)) 9621 ((equal arg '(16))
9619 ;; C-u C-u g 9622 ;; C-u C-u g
diff --git a/lisp/gnus/gnus-win.el b/lisp/gnus/gnus-win.el
index ecd5b3b525b..f0009830b44 100644
--- a/lisp/gnus/gnus-win.el
+++ b/lisp/gnus/gnus-win.el
@@ -242,7 +242,7 @@ See the Gnus manual for an explanation of the syntax used.")
242 (let* ((current-window (or (get-buffer-window (current-buffer)) (selected-window))) 242 (let* ((current-window (or (get-buffer-window (current-buffer)) (selected-window)))
243 (window (or window current-window))) 243 (window (or window current-window)))
244 (select-window window) 244 (select-window window)
245 ;; The SPLIT might be something that is to be evaled to 245 ;; The SPLIT might be something that is to be evalled to
246 ;; return a new SPLIT. 246 ;; return a new SPLIT.
247 (while (and (not (assq (car split) gnus-window-to-buffer)) 247 (while (and (not (assq (car split) gnus-window-to-buffer))
248 (symbolp (car split)) (fboundp (car split))) 248 (symbolp (car split)) (fboundp (car split)))
@@ -447,7 +447,7 @@ should have point."
447 (when (consp (car split)) 447 (when (consp (car split))
448 (push 1.0 split) 448 (push 1.0 split)
449 (push 'vertical split)) 449 (push 'vertical split))
450 ;; The SPLIT might be something that is to be evaled to 450 ;; The SPLIT might be something that is to be evalled to
451 ;; return a new SPLIT. 451 ;; return a new SPLIT.
452 (while (and (not (assq (car split) gnus-window-to-buffer)) 452 (while (and (not (assq (car split) gnus-window-to-buffer))
453 (symbolp (car split)) (fboundp (car split))) 453 (symbolp (car split)) (fboundp (car split)))
diff --git a/lisp/gnus/gnus.el b/lisp/gnus/gnus.el
index 5f385ec1054..b1f0f60668e 100644
--- a/lisp/gnus/gnus.el
+++ b/lisp/gnus/gnus.el
@@ -700,7 +700,7 @@ be set in `.emacs' instead."
700(defface gnus-summary-cancelled 700(defface gnus-summary-cancelled
701 '((((class color)) 701 '((((class color))
702 (:foreground "yellow" :background "black"))) 702 (:foreground "yellow" :background "black")))
703 "Face used for cancelled articles." 703 "Face used for canceled articles."
704 :group 'gnus-summary) 704 :group 'gnus-summary)
705;; backward-compatibility alias 705;; backward-compatibility alias
706(put 'gnus-summary-cancelled-face 'face-alias 'gnus-summary-cancelled) 706(put 'gnus-summary-cancelled-face 'face-alias 'gnus-summary-cancelled)
diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el
index ee9d4992158..5198618c2c3 100644
--- a/lisp/gnus/message.el
+++ b/lisp/gnus/message.el
@@ -906,7 +906,7 @@ The function `message-setup' runs this hook."
906 :type 'hook) 906 :type 'hook)
907 907
908(defcustom message-cancel-hook nil 908(defcustom message-cancel-hook nil
909 "Hook run when cancelling articles." 909 "Hook run when canceling articles."
910 :group 'message-various 910 :group 'message-various
911 :link '(custom-manual "(message)Various Message Variables") 911 :link '(custom-manual "(message)Various Message Variables")
912 :type 'hook) 912 :type 'hook)
@@ -1893,14 +1893,14 @@ You must have the \"hashcash\" binary installed, see `hashcash-path'."
1893 (concat "[a-z0-9][-.a-z0-9]+\\." ;; [hostname.subdomain.]domain. 1893 (concat "[a-z0-9][-.a-z0-9]+\\." ;; [hostname.subdomain.]domain.
1894 ;; valid TLDs: 1894 ;; valid TLDs:
1895 "\\([a-z][a-z]\\|" ;; two letter country TDLs 1895 "\\([a-z][a-z]\\|" ;; two letter country TDLs
1896 "aero\\|arpa\\|bitnet\\|biz\\|bofh\\|" 1896 "aero\\|arpa\\|asia\\|bitnet\\|biz\\|bofh\\|"
1897 "cat\\|com\\|coop\\|edu\\|gov\\|" 1897 "cat\\|com\\|coop\\|edu\\|gov\\|"
1898 "info\\|int\\|jobs\\|" 1898 "info\\|int\\|jobs\\|"
1899 "mil\\|mobi\\|museum\\|name\\|net\\|" 1899 "mil\\|mobi\\|museum\\|name\\|net\\|"
1900 "org\\|pro\\|travel\\|uucp\\)") 1900 "org\\|pro\\|tel\\|travel\\|uucp\\)")
1901 ;; http://en.wikipedia.org/wiki/List_of_Internet_top-level_domains 1901 ;; http://en.wikipedia.org/wiki/List_of_Internet_top-level_domains
1902 ;; http://en.wikipedia.org/wiki/GTLD 1902 ;; http://en.wikipedia.org/wiki/GTLD
1903 ;; `in the process of being approved': .asia .post .tel .sex 1903 ;; `approved, but not yet in operation': .xxx
1904 ;; "dead" nato bitnet uucp 1904 ;; "dead" nato bitnet uucp
1905 "Regular expression that matches a valid FQDN." 1905 "Regular expression that matches a valid FQDN."
1906 ;; see also: gnus-button-valid-fqdn-regexp 1906 ;; see also: gnus-button-valid-fqdn-regexp
@@ -4409,7 +4409,7 @@ This function could be useful in `message-setup-hook'."
4409 ;; A simple function. 4409 ;; A simple function.
4410 ((functionp action) 4410 ((functionp action)
4411 (funcall action)) 4411 (funcall action))
4412 ;; Something to be evaled. 4412 ;; Something to be evalled.
4413 (t 4413 (t
4414 (eval action)))))) 4414 (eval action))))))
4415 4415
@@ -4840,7 +4840,7 @@ Otherwise, generate and save a value for `canlock-password' first."
4840 (message-fetch-field "Followup-To"))) 4840 (message-fetch-field "Followup-To")))
4841 ;; BUG: We really need to get the charset for each name in the 4841 ;; BUG: We really need to get the charset for each name in the
4842 ;; Newsgroups and Followup-To lines to allow crossposting 4842 ;; Newsgroups and Followup-To lines to allow crossposting
4843 ;; between group namess with incompatible character sets. 4843 ;; between group names with incompatible character sets.
4844 ;; -- Per Abrahamsen <abraham@dina.kvl.dk> 2001-10-08. 4844 ;; -- Per Abrahamsen <abraham@dina.kvl.dk> 2001-10-08.
4845 (group-field-charset 4845 (group-field-charset
4846 (gnus-group-name-charset method newsgroups-field)) 4846 (gnus-group-name-charset method newsgroups-field))
@@ -6327,7 +6327,6 @@ between beginning of field and beginning of line."
6327 6327
6328(defun message-pop-to-buffer (name &optional switch-function) 6328(defun message-pop-to-buffer (name &optional switch-function)
6329 "Pop to buffer NAME, and warn if it already exists and is modified." 6329 "Pop to buffer NAME, and warn if it already exists and is modified."
6330 (unless switch-function (setq switch-function #'pop-to-buffer))
6331 (let ((buffer (get-buffer name))) 6330 (let ((buffer (get-buffer name)))
6332 (if (and buffer 6331 (if (and buffer
6333 (buffer-name buffer)) 6332 (buffer-name buffer))
@@ -6337,7 +6336,7 @@ between beginning of field and beginning of line."
6337 (progn 6336 (progn
6338 (gnus-select-frame-set-input-focus (window-frame window)) 6337 (gnus-select-frame-set-input-focus (window-frame window))
6339 (select-window window)) 6338 (select-window window))
6340 (funcall switch-function buffer) 6339 (funcall (or switch-function #'pop-to-buffer) buffer)
6341 (set-buffer buffer)) 6340 (set-buffer buffer))
6342 (when (and (buffer-modified-p) 6341 (when (and (buffer-modified-p)
6343 (not (prog1 6342 (not (prog1
@@ -6345,7 +6344,11 @@ between beginning of field and beginning of line."
6345 "Message already being composed; erase? ") 6344 "Message already being composed; erase? ")
6346 (message nil)))) 6345 (message nil))))
6347 (error "Message being composed"))) 6346 (error "Message being composed")))
6348 (funcall switch-function name) 6347 (funcall (or switch-function
6348 (if (fboundp #'pop-to-buffer-same-window)
6349 #'pop-to-buffer-same-window
6350 #'pop-to-buffer))
6351 name)
6349 (set-buffer name)) 6352 (set-buffer name))
6350 (erase-buffer) 6353 (erase-buffer)
6351 (message-mode))) 6354 (message-mode)))
@@ -7735,7 +7738,7 @@ Setter function for custom variables."
7735 'message-tool-bar-retro) 7738 'message-tool-bar-retro)
7736 "Specifies the message mode tool bar. 7739 "Specifies the message mode tool bar.
7737 7740
7738It can be either a list or a symbol refering to a list. See 7741It can be either a list or a symbol referring to a list. See
7739`gmm-tool-bar-from-list' for the format of the list. The 7742`gmm-tool-bar-from-list' for the format of the list. The
7740default key map is `message-mode-map'. 7743default key map is `message-mode-map'.
7741 7744
diff --git a/lisp/gnus/mm-decode.el b/lisp/gnus/mm-decode.el
index 44e2af5b904..7ea0902bdb5 100644
--- a/lisp/gnus/mm-decode.el
+++ b/lisp/gnus/mm-decode.el
@@ -275,7 +275,7 @@ before the external MIME handler is invoked."
275 (ignore-errors 275 (ignore-errors
276 (if (fboundp 'create-image) 276 (if (fboundp 'create-image)
277 (create-image (buffer-string) 'imagemagick 'data-p) 277 (create-image (buffer-string) 'imagemagick 'data-p)
278 (mm-create-image-xemacs type))))) 278 (mm-create-image-xemacs (mm-handle-media-subtype handle))))))
279 (when image 279 (when image
280 (setcar (cdr handle) (list "image/imagemagick")) 280 (setcar (cdr handle) (list "image/imagemagick"))
281 (mm-image-fit-p handle))))))) 281 (mm-image-fit-p handle)))))))
diff --git a/lisp/gnus/mm-view.el b/lisp/gnus/mm-view.el
index 854ca3497da..f14b47e86e4 100644
--- a/lisp/gnus/mm-view.el
+++ b/lisp/gnus/mm-view.el
@@ -602,6 +602,7 @@ If MODE is not set, try to find mode automatically."
602 ;; I find font-lock a bit too verbose. 602 ;; I find font-lock a bit too verbose.
603 (let ((font-lock-verbose nil)) 603 (let ((font-lock-verbose nil))
604 ;; Disable support modes, e.g., jit-lock, lazy-lock, etc. 604 ;; Disable support modes, e.g., jit-lock, lazy-lock, etc.
605 ;; Note: XEmacs people use `font-lock-mode-hook' to run those modes.
605 (set (make-local-variable 'font-lock-mode-hook) nil) 606 (set (make-local-variable 'font-lock-mode-hook) nil)
606 (set (make-local-variable 'font-lock-support-mode) nil) 607 (set (make-local-variable 'font-lock-support-mode) nil)
607 (setq buffer-file-name (mm-handle-filename handle)) 608 (setq buffer-file-name (mm-handle-filename handle))
diff --git a/lisp/gnus/nndiary.el b/lisp/gnus/nndiary.el
index 043356ca841..29f0695c74e 100644
--- a/lisp/gnus/nndiary.el
+++ b/lisp/gnus/nndiary.el
@@ -353,7 +353,7 @@ all. This may very well take some time.")
353 ;; List of NNDiary headers that specify the time spec. Each header name is 353 ;; List of NNDiary headers that specify the time spec. Each header name is
354 ;; followed by either two integers (specifying a range of possible values 354 ;; followed by either two integers (specifying a range of possible values
355 ;; for this header) or one list (specifying all the possible values for this 355 ;; for this header) or one list (specifying all the possible values for this
356 ;; header). In the latter case, the list does NOT include the unspecifyed 356 ;; header). In the latter case, the list does NOT include the unspecified
357 ;; spec (*). 357 ;; spec (*).
358 ;; For time zone values, we have symbolic time zone names associated with 358 ;; For time zone values, we have symbolic time zone names associated with
359 ;; the (relative) number of seconds ahead GMT. 359 ;; the (relative) number of seconds ahead GMT.
@@ -1161,11 +1161,11 @@ all. This may very well take some time.")
1161 1161
1162(defun nndiary-parse-schedule-value (str min-or-values max) 1162(defun nndiary-parse-schedule-value (str min-or-values max)
1163 ;; Parse the schedule string STR, or signal an error. 1163 ;; Parse the schedule string STR, or signal an error.
1164 ;; Signals are caught by `nndary-schedule'. 1164 ;; Signals are caught by `nndiary-schedule'.
1165 (if (string-match "[ \t]*\\*[ \t]*" str) 1165 (if (string-match "[ \t]*\\*[ \t]*" str)
1166 ;; unspecifyed 1166 ;; unspecified
1167 nil 1167 nil
1168 ;; specifyed 1168 ;; specified
1169 (if (listp min-or-values) 1169 (if (listp min-or-values)
1170 ;; min-or-values is values 1170 ;; min-or-values is values
1171 ;; #### NOTE: this is actually only a hack for time zones. 1171 ;; #### NOTE: this is actually only a hack for time zones.
@@ -1204,7 +1204,7 @@ all. This may very well take some time.")
1204 ;; - Returns nil if `*' 1204 ;; - Returns nil if `*'
1205 ;; - Otherwise returns a list of integers and/or ranges (BEG . END) 1205 ;; - Otherwise returns a list of integers and/or ranges (BEG . END)
1206 ;; The exception is the Timze-Zone value which is always of the form (STR). 1206 ;; The exception is the Timze-Zone value which is always of the form (STR).
1207 ;; Signals are caught by `nndary-schedule'. 1207 ;; Signals are caught by `nndiary-schedule'.
1208 (let ((header (format "^X-Diary-%s: \\(.*\\)$" head))) 1208 (let ((header (format "^X-Diary-%s: \\(.*\\)$" head)))
1209 (goto-char (point-min)) 1209 (goto-char (point-min))
1210 (if (not (re-search-forward header nil t)) 1210 (if (not (re-search-forward header nil t))
diff --git a/lisp/gnus/nnir.el b/lisp/gnus/nnir.el
index 78d2478b4fb..3d0fc78dca7 100644
--- a/lisp/gnus/nnir.el
+++ b/lisp/gnus/nnir.el
@@ -1273,8 +1273,8 @@ Tested with swish-e-2.0.1 on Windows NT 4.0."
1273 (message "Doing hyrex-search query \"%s\"...done" qstring) 1273 (message "Doing hyrex-search query \"%s\"...done" qstring)
1274 (sit-for 0) 1274 (sit-for 0)
1275 ;; nnir-search returns: 1275 ;; nnir-search returns:
1276 ;; for nnml/nnfolder: "filename mailid weigth" 1276 ;; for nnml/nnfolder: "filename mailid weight"
1277 ;; for nnimap: "group mailid weigth" 1277 ;; for nnimap: "group mailid weight"
1278 (goto-char (point-min)) 1278 (goto-char (point-min))
1279 (delete-non-matching-lines "^\\S + [0-9]+ [0-9]+$") 1279 (delete-non-matching-lines "^\\S + [0-9]+ [0-9]+$")
1280 ;; HyREX doesn't search directly in groups -- so filter out here. 1280 ;; HyREX doesn't search directly in groups -- so filter out here.
diff --git a/lisp/gnus/nntp.el b/lisp/gnus/nntp.el
index 9816c208fab..f4b8ce66d16 100644
--- a/lisp/gnus/nntp.el
+++ b/lisp/gnus/nntp.el
@@ -665,7 +665,7 @@ command whose response triggered the error."
665 (process-buffer -process)))) 665 (process-buffer -process))))
666 ;; When I an able to identify the 666 ;; When I an able to identify the
667 ;; connection to the server AND I've 667 ;; connection to the server AND I've
668 ;; received NO reponse for 668 ;; received NO response for
669 ;; nntp-connection-timeout seconds. 669 ;; nntp-connection-timeout seconds.
670 (when (and -buffer (eq 0 (buffer-size -buffer))) 670 (when (and -buffer (eq 0 (buffer-size -buffer)))
671 ;; Close the connection. Take no 671 ;; Close the connection. Take no
diff --git a/lisp/gnus/plstore.el b/lisp/gnus/plstore.el
index 340c7255958..50208cc5b0b 100644
--- a/lisp/gnus/plstore.el
+++ b/lisp/gnus/plstore.el
@@ -420,7 +420,7 @@ SECRET-KEYS is a plist containing secret data."
420 (current-buffer))))) 420 (current-buffer)))))
421 (epa-select-keys 421 (epa-select-keys
422 context 422 context
423 "Select recipents for encryption. 423 "Select recipients for encryption.
424If no one is selected, symmetric encryption will be performed. " 424If no one is selected, symmetric encryption will be performed. "
425 recipients) 425 recipients)
426 (if plstore-encrypt-to 426 (if plstore-encrypt-to
diff --git a/lisp/gnus/rfc2231.el b/lisp/gnus/rfc2231.el
index 306b67cd7c1..9c30379ef6e 100644
--- a/lisp/gnus/rfc2231.el
+++ b/lisp/gnus/rfc2231.el
@@ -58,7 +58,7 @@ must never cause a Lisp error."
58 ;; The most likely cause of an error is unbalanced parentheses 58 ;; The most likely cause of an error is unbalanced parentheses
59 ;; or double-quotes. If all parentheses and double-quotes are 59 ;; or double-quotes. If all parentheses and double-quotes are
60 ;; quoted meaninglessly with backslashes, removing them might 60 ;; quoted meaninglessly with backslashes, removing them might
61 ;; make it parseable. Let's try... 61 ;; make it parsable. Let's try...
62 (error 62 (error
63 (let (mod) 63 (let (mod)
64 (when (and (string-match "\\\\\"" string) 64 (when (and (string-match "\\\\\"" string)
diff --git a/lisp/gs.el b/lisp/gs.el
index 2eba7af71ae..b86632f7637 100644
--- a/lisp/gs.el
+++ b/lisp/gs.el
@@ -96,7 +96,7 @@ FILE is the value to substitute for the place-holder `<file>'."
96(declare-function x-display-pixel-width "xfns.c" (&optional terminal)) 96(declare-function x-display-pixel-width "xfns.c" (&optional terminal))
97 97
98(defun gs-width-in-pt (frame pixel-width) 98(defun gs-width-in-pt (frame pixel-width)
99 "Return, on FRAME, pixel width PIXEL-WIDTH tranlated to pt." 99 "Return, on FRAME, pixel width PIXEL-WIDTH translated to pt."
100 (let ((mm (* (float pixel-width) 100 (let ((mm (* (float pixel-width)
101 (/ (float (x-display-mm-width frame)) 101 (/ (float (x-display-mm-width frame))
102 (float (x-display-pixel-width frame)))))) 102 (float (x-display-pixel-width frame))))))
@@ -106,7 +106,7 @@ FILE is the value to substitute for the place-holder `<file>'."
106(declare-function x-display-pixel-height "xfns.c" (&optional terminal)) 106(declare-function x-display-pixel-height "xfns.c" (&optional terminal))
107 107
108(defun gs-height-in-pt (frame pixel-height) 108(defun gs-height-in-pt (frame pixel-height)
109 "Return, on FRAME, pixel height PIXEL-HEIGHT tranlated to pt." 109 "Return, on FRAME, pixel height PIXEL-HEIGHT translated to pt."
110 (let ((mm (* (float pixel-height) 110 (let ((mm (* (float pixel-height)
111 (/ (float (x-display-mm-height frame)) 111 (/ (float (x-display-mm-height frame))
112 (float (x-display-pixel-height frame)))))) 112 (float (x-display-pixel-height frame))))))
diff --git a/lisp/hilit-chg.el b/lisp/hilit-chg.el
index 0dee4157d78..50e631a95c5 100644
--- a/lisp/hilit-chg.el
+++ b/lisp/hilit-chg.el
@@ -367,7 +367,7 @@ buffer with the contents of a file
367 367
368;;;###autoload 368;;;###autoload
369(define-minor-mode highlight-changes-visible-mode 369(define-minor-mode highlight-changes-visible-mode
370 "Toggle visiblility of highlighting due to Highlight Changes mode. 370 "Toggle visibility of highlighting due to Highlight Changes mode.
371With a prefix argument ARG, enable Highlight Changes Visible mode 371With a prefix argument ARG, enable Highlight Changes Visible mode
372if ARG is positive, and disable it otherwise. If called from 372if ARG is positive, and disable it otherwise. If called from
373Lisp, enable the mode if ARG is omitted or nil. 373Lisp, enable the mode if ARG is omitted or nil.
diff --git a/lisp/htmlfontify.el b/lisp/htmlfontify.el
index 126b616a644..b0fd37abd36 100644
--- a/lisp/htmlfontify.el
+++ b/lisp/htmlfontify.el
@@ -580,7 +580,7 @@ If a window system is unavailable, calls `hfy-fallback-colour-values'."
580 (color-values colour) 580 (color-values colour)
581 ;;(message "[%S]" window-system) 581 ;;(message "[%S]" window-system)
582 (x-color-values colour)) 582 (x-color-values colour))
583 ;; blarg - tty colours are no good - go fetch some X colours: 583 ;; blarg - tty colors are no good - go fetch some X colors:
584 (hfy-fallback-colour-values colour)))) 584 (hfy-fallback-colour-values colour))))
585 585
586(defvar hfy-cperl-mode-kludged-p nil) 586(defvar hfy-cperl-mode-kludged-p nil)
diff --git a/lisp/ibuf-ext.el b/lisp/ibuf-ext.el
index 6c8db872c0b..a0fae8d8671 100644
--- a/lisp/ibuf-ext.el
+++ b/lisp/ibuf-ext.el
@@ -26,7 +26,7 @@
26;;; Commentary: 26;;; Commentary:
27 27
28;; These functions should be automatically loaded when called, but you 28;; These functions should be automatically loaded when called, but you
29;; can explicity (require 'ibuf-ext) in your ~/.emacs to have them 29;; can explicitly (require 'ibuf-ext) in your ~/.emacs to have them
30;; preloaded. 30;; preloaded.
31 31
32;;; Code: 32;;; Code:
diff --git a/lisp/ibuffer.el b/lisp/ibuffer.el
index 3f3b0b7a843..cb511c4695e 100644
--- a/lisp/ibuffer.el
+++ b/lisp/ibuffer.el
@@ -426,7 +426,7 @@ directory, like `default-directory'."
426 '(menu-item "Save current filter groups permanently..." 426 '(menu-item "Save current filter groups permanently..."
427 ibuffer-save-filter-groups 427 ibuffer-save-filter-groups
428 :enable (and (featurep 'ibuf-ext) ibuffer-filter-groups) 428 :enable (and (featurep 'ibuf-ext) ibuffer-filter-groups)
429 :help "Use a mnemnonic name to store current filter groups")) 429 :help "Use a mnemonic name to store current filter groups"))
430 (define-key-after groups-map [switch-to-saved-filter-groups] 430 (define-key-after groups-map [switch-to-saved-filter-groups]
431 '(menu-item "Restore permanently saved filters..." 431 '(menu-item "Restore permanently saved filters..."
432 ibuffer-switch-to-saved-filter-groups 432 ibuffer-switch-to-saved-filter-groups
@@ -676,7 +676,7 @@ directory, like `default-directory'."
676 (define-key-after map [menu-bar view filter save-filters] 676 (define-key-after map [menu-bar view filter save-filters]
677 '(menu-item "Save current filters permanently..." ibuffer-save-filters 677 '(menu-item "Save current filters permanently..." ibuffer-save-filters
678 :enable (and (featurep 'ibuf-ext) ibuffer-filtering-qualifiers) 678 :enable (and (featurep 'ibuf-ext) ibuffer-filtering-qualifiers)
679 :help "Use a mnemnonic name to store current filter stack")) 679 :help "Use a mnemonic name to store current filter stack"))
680 (define-key-after map [menu-bar view filter switch-to-saved-filters] 680 (define-key-after map [menu-bar view filter switch-to-saved-filters]
681 '(menu-item "Restore permanently saved filters..." 681 '(menu-item "Restore permanently saved filters..."
682 ibuffer-switch-to-saved-filters 682 ibuffer-switch-to-saved-filters
@@ -2648,7 +2648,7 @@ will be inserted before the group at point."
2648;;;;;; ibuffer-backward-filter-group ibuffer-forward-filter-group 2648;;;;;; ibuffer-backward-filter-group ibuffer-forward-filter-group
2649;;;;;; ibuffer-toggle-filter-group ibuffer-mouse-toggle-filter-group 2649;;;;;; ibuffer-toggle-filter-group ibuffer-mouse-toggle-filter-group
2650;;;;;; ibuffer-interactive-filter-by-mode ibuffer-mouse-filter-by-mode 2650;;;;;; ibuffer-interactive-filter-by-mode ibuffer-mouse-filter-by-mode
2651;;;;;; ibuffer-auto-mode) "ibuf-ext" "ibuf-ext.el" "25e69a1e030791b3a3e7d91d4377173a") 2651;;;;;; ibuffer-auto-mode) "ibuf-ext" "ibuf-ext.el" "897e64e4465af94b89e21fa84ae61290")
2652;;; Generated autoloads from ibuf-ext.el 2652;;; Generated autoloads from ibuf-ext.el
2653 2653
2654(autoload 'ibuffer-auto-mode "ibuf-ext" "\ 2654(autoload 'ibuffer-auto-mode "ibuf-ext" "\
diff --git a/lisp/ido.el b/lisp/ido.el
index f2dcba614a9..345438d3cc6 100644
--- a/lisp/ido.el
+++ b/lisp/ido.el
@@ -308,7 +308,7 @@
308;; ifindf package back into iswitchb. 308;; ifindf package back into iswitchb.
309;; 309;;
310;; This is basically what ido (interactively do) is all about; but I 310;; This is basically what ido (interactively do) is all about; but I
311;; found it ackward to merge my changes into the "iswitchb-" namespace, 311;; found it awkward to merge my changes into the "iswitchb-" namespace,
312;; so I invented a common "ido-" namespace for the merged packages. 312;; so I invented a common "ido-" namespace for the merged packages.
313;; 313;;
314;; This version is based on ido.el version 1.57 released on 314;; This version is based on ido.el version 1.57 released on
diff --git a/lisp/international/ccl.el b/lisp/international/ccl.el
index 9614479072a..d16a272c9dc 100644
--- a/lisp/international/ccl.el
+++ b/lisp/international/ccl.el
@@ -1433,7 +1433,7 @@ REG := r0 | r1 | r2 | r3 | r4 | r5 | r6 | r7
1433ARG := REG | integer 1433ARG := REG | integer
1434 1434
1435OPERATOR := 1435OPERATOR :=
1436 ;; Normal arithmethic operators (same meaning as C code). 1436 ;; Normal arithmetic operators (same meaning as C code).
1437 + | - | * | / | % 1437 + | - | * | / | %
1438 1438
1439 ;; Bitwise operators (same meaning as C code) 1439 ;; Bitwise operators (same meaning as C code)
@@ -1469,7 +1469,7 @@ OPERATOR :=
1469 | de-sjis 1469 | de-sjis
1470 1470
1471 ;; If ARG_0 and ARG_1 are the first and second code point of 1471 ;; If ARG_0 and ARG_1 are the first and second code point of
1472 ;; JISX0208 character CHAR, and SJIS is the correponding 1472 ;; JISX0208 character CHAR, and SJIS is the corresponding
1473 ;; Shift-JIS code, 1473 ;; Shift-JIS code,
1474 ;; (REG = ARG_0 en-sjis ARG_1) means: 1474 ;; (REG = ARG_0 en-sjis ARG_1) means:
1475 ;; ((REG = HIGH) 1475 ;; ((REG = HIGH)
diff --git a/lisp/international/mule-cmds.el b/lisp/international/mule-cmds.el
index 0a5d6ed954c..0d3f079866e 100644
--- a/lisp/international/mule-cmds.el
+++ b/lisp/international/mule-cmds.el
@@ -1031,7 +1031,7 @@ It is highly recommended to fix it before writing to a file."
1031and try again)? " coding-system auto-cs)) 1031and try again)? " coding-system auto-cs))
1032 (error "Save aborted")))) 1032 (error "Save aborted"))))
1033 (when (and tick (/= tick (buffer-chars-modified-tick))) 1033 (when (and tick (/= tick (buffer-chars-modified-tick)))
1034 (error "Cancelled because the buffer was modified")) 1034 (error "Canceled because the buffer was modified"))
1035 coding-system))) 1035 coding-system)))
1036 1036
1037(setq select-safe-coding-system-function 'select-safe-coding-system) 1037(setq select-safe-coding-system-function 'select-safe-coding-system)
diff --git a/lisp/international/mule-util.el b/lisp/international/mule-util.el
index ef09cdda2de..f0a5ebbee40 100644
--- a/lisp/international/mule-util.el
+++ b/lisp/international/mule-util.el
@@ -314,7 +314,7 @@ Optional 5th argument NIL-FOR-TOO-LONG non-nil means return nil
314(defmacro with-coding-priority (coding-systems &rest body) 314(defmacro with-coding-priority (coding-systems &rest body)
315 "Execute BODY like `progn' with CODING-SYSTEMS at the front of priority list. 315 "Execute BODY like `progn' with CODING-SYSTEMS at the front of priority list.
316CODING-SYSTEMS is a list of coding systems. See `set-coding-system-priority'. 316CODING-SYSTEMS is a list of coding systems. See `set-coding-system-priority'.
317This affects the implicit sorting of lists of coding sysems returned by 317This affects the implicit sorting of lists of coding systems returned by
318operations such as `find-coding-systems-region'." 318operations such as `find-coding-systems-region'."
319 (let ((current (make-symbol "current"))) 319 (let ((current (make-symbol "current")))
320 `(let ((,current (coding-system-priority-list))) 320 `(let ((,current (coding-system-priority-list)))
diff --git a/lisp/international/mule.el b/lisp/international/mule.el
index d078d98a480..1beffa5218b 100644
--- a/lisp/international/mule.el
+++ b/lisp/international/mule.el
@@ -1785,7 +1785,7 @@ contents of the current buffer following point against
1785succeed, it checks to see if any function in `auto-coding-functions' 1785succeed, it checks to see if any function in `auto-coding-functions'
1786gives a match. 1786gives a match.
1787 1787
1788If a coding system is specifed, the return value is a cons 1788If a coding system is specified, the return value is a cons
1789\(CODING . SOURCE), where CODING is the specified coding system and 1789\(CODING . SOURCE), where CODING is the specified coding system and
1790SOURCE is a symbol `auto-coding-alist', `auto-coding-regexp-alist', 1790SOURCE is a symbol `auto-coding-alist', `auto-coding-regexp-alist',
1791`:coding', or `auto-coding-functions' indicating by what CODING is 1791`:coding', or `auto-coding-functions' indicating by what CODING is
diff --git a/lisp/international/quail.el b/lisp/international/quail.el
index a29b729dcf0..3e0f543492a 100644
--- a/lisp/international/quail.el
+++ b/lisp/international/quail.el
@@ -2703,7 +2703,7 @@ KEY BINDINGS FOR CONVERSION
2703 2703
2704;; Generate a half-cooked decode map (char-table) for the current 2704;; Generate a half-cooked decode map (char-table) for the current
2705;; Quail map. An element for a character C is a key string or a list 2705;; Quail map. An element for a character C is a key string or a list
2706;; of a key strings to type to input C. The lenth of key string is at 2706;; of a key strings to type to input C. The length of key string is at
2707;; most 2. If it is 2, more keys may be required to input C. 2707;; most 2. If it is 2, more keys may be required to input C.
2708 2708
2709(defun quail-gen-decode-map () 2709(defun quail-gen-decode-map ()
@@ -2832,7 +2832,7 @@ STATE-n are symbols to denote state. STATE-0 is the initial state.
2832TRANSITION-n-m are transition rules from STATE-n, and have the form 2832TRANSITION-n-m are transition rules from STATE-n, and have the form
2833\(RULES . STATE-x) or RULES, where STATE-x is one of STATE-n above, 2833\(RULES . STATE-x) or RULES, where STATE-x is one of STATE-n above,
2834RULES is a symbol whose value is an alist of keys \(string) vs the 2834RULES is a symbol whose value is an alist of keys \(string) vs the
2835correponding characters or strings. The format of the symbol value of 2835corresponding characters or strings. The format of the symbol value of
2836RULES is the same as arguments to `quail-define-rules'. 2836RULES is the same as arguments to `quail-define-rules'.
2837 2837
2838If TRANSITION-n-m has the form (RULES . STATE-x), it means that 2838If TRANSITION-n-m has the form (RULES . STATE-x), it means that
@@ -2846,7 +2846,7 @@ The generated map can be set for the current Quail package by the
2846function `quail-install-map' (which see)." 2846function `quail-install-map' (which see)."
2847 (let ((state-alist (mapcar (lambda (x) (list (car x))) table)) 2847 (let ((state-alist (mapcar (lambda (x) (list (car x))) table))
2848 tail elt) 2848 tail elt)
2849 ;; STATE-ALIST is an alist of states vs the correponding sub Quail 2849 ;; STATE-ALIST is an alist of states vs the corresponding sub Quail
2850 ;; map. It is now initialized to ((STATE-0) (STATE-1) ...). 2850 ;; map. It is now initialized to ((STATE-0) (STATE-1) ...).
2851 ;; Set key sequence mapping rules in cdr part of each element. 2851 ;; Set key sequence mapping rules in cdr part of each element.
2852 (while table 2852 (while table
diff --git a/lisp/international/robin.el b/lisp/international/robin.el
index 443a292f4c1..c50277686ff 100644
--- a/lisp/international/robin.el
+++ b/lisp/international/robin.el
@@ -50,9 +50,9 @@
50;; identified by a string called package name. Use robin-define-package 50;; identified by a string called package name. Use robin-define-package
51;; to define a robin package. 51;; to define a robin package.
52 52
53;; (robin-define-package NAME DOCTSTRING 53;; (robin-define-package NAME DOCSTRING
54;; (INPUT1 OUPUT1) 54;; (INPUT1 OUTPUT1)
55;; (INPUT2 OUPUT2) 55;; (INPUT2 OUTPUT2)
56;; ...) 56;; ...)
57 57
58;; NAME is a string identifying the robin package. It often starts with a 58;; NAME is a string identifying the robin package. It often starts with a
diff --git a/lisp/international/titdic-cnv.el b/lisp/international/titdic-cnv.el
index 6614ac8b416..304dc01abe4 100644
--- a/lisp/international/titdic-cnv.el
+++ b/lisp/international/titdic-cnv.el
@@ -103,7 +103,7 @@ For example:
103 103
104\\<quail-translation-docstring> 104\\<quail-translation-docstring>
105 105
106For double-width GB2312 characters correponding to ASCII, use the 106For double-width GB2312 characters corresponding to ASCII, use the
107input method `chinese-qj'.") 107input method `chinese-qj'.")
108 108
109 ("chinese-ecdict" "$(05CKH(B" 109 ("chinese-ecdict" "$(05CKH(B"
@@ -122,7 +122,7 @@ compose one Chinese character.
122 122
123In this input method, you enter a Chinese character by first typing 123In this input method, you enter a Chinese character by first typing
124keys corresponding to Zhuyin symbols (see the above table) followed by 124keys corresponding to Zhuyin symbols (see the above table) followed by
125SPC, 1, 2, 3, or 4 specifing a tone (SPC:$(0?v(N(B, 1:$(0M=Vy(B, 2:$(0Dm(N(B, 3: $(0&9Vy(B, 125SPC, 1, 2, 3, or 4 specifying a tone (SPC:$(0?v(N(B, 1:$(0M=Vy(B, 2:$(0Dm(N(B, 3: $(0&9Vy(B,
1264:$(0(+Vy(B). 1264:$(0(+Vy(B).
127 127
128\\<quail-translation-docstring>") 128\\<quail-translation-docstring>")
@@ -191,7 +191,7 @@ For instance, to input $ADc(B, you type \"n i 3 3\", the first \"n i\" is
191a Pinyin, the next \"3\" specifies tone, and the last \"3\" selects 191a Pinyin, the next \"3\" specifies tone, and the last \"3\" selects
192the third character from the candidate list. 192the third character from the candidate list.
193 193
194For double-width GB2312 characters correponding to ASCII, use the 194For double-width GB2312 characters corresponding to ASCII, use the
195input method `chinese-qj'.") 195input method `chinese-qj'.")
196 196
197 ("chinese-zozy" "$(0I\0D(B" 197 ("chinese-zozy" "$(0I\0D(B"
@@ -203,7 +203,7 @@ compose a Chinese character.
203 203
204In this input method, you enter a Chinese character by first typing 204In this input method, you enter a Chinese character by first typing
205keys corresponding to Zhuyin symbols (see the above table) followed by 205keys corresponding to Zhuyin symbols (see the above table) followed by
206SPC, 6, 3, 4, or 7 specifing a tone (SPC:$(0?v(N(B, 6:$(0Dm(N(B, 3:$(0&9Vy(B, 4:$(0(+Vy(B, 206SPC, 6, 3, 4, or 7 specifying a tone (SPC:$(0?v(N(B, 6:$(0Dm(N(B, 3:$(0&9Vy(B, 4:$(0(+Vy(B,
2077:$(0M=Vy(B). 2077:$(0M=Vy(B).
208 208
209\\<quail-translation-docstring>"))) 209\\<quail-translation-docstring>")))
diff --git a/lisp/international/ucs-normalize.el b/lisp/international/ucs-normalize.el
index df05b355b46..8d13eb2039d 100644
--- a/lisp/international/ucs-normalize.el
+++ b/lisp/international/ucs-normalize.el
@@ -227,7 +227,7 @@ Note that Hangul are excluded.")
227 (eval-when-compile decomposition-pair-to-composition))) 227 (eval-when-compile decomposition-pair-to-composition)))
228 228
229(defun ucs-normalize-primary-composite (decomposition-pair composition-predicate) 229(defun ucs-normalize-primary-composite (decomposition-pair composition-predicate)
230 "Convert DECOMPOSITION-PAIR to primay composite using COMPOSITION-PREDICATE." 230 "Convert DECOMPOSITION-PAIR to primary composite using COMPOSITION-PREDICATE."
231 (let ((char (or (gethash decomposition-pair 231 (let ((char (or (gethash decomposition-pair
232 ucs-normalize-decomposition-pair-to-primary-composite) 232 ucs-normalize-decomposition-pair-to-primary-composite)
233 (and (<= #x1100 (car decomposition-pair)) 233 (and (<= #x1100 (car decomposition-pair))
diff --git a/lisp/kmacro.el b/lisp/kmacro.el
index eea3009faf4..6915640944a 100644
--- a/lisp/kmacro.el
+++ b/lisp/kmacro.el
@@ -747,7 +747,7 @@ If kbd macro currently being defined end it before activating it."
747;; Create a separate keymap installed as a minor-mode keymap (e.g. in 747;; Create a separate keymap installed as a minor-mode keymap (e.g. in
748;; the emulation-mode-map-alists) in which macro bindings are made 748;; the emulation-mode-map-alists) in which macro bindings are made
749;; independent of any other bindings. When first binding is made, 749;; independent of any other bindings. When first binding is made,
750;; the kemap is created, installed, and enabled. Key seq. C-x C-k + 750;; the keymap is created, installed, and enabled. Key seq. C-x C-k +
751;; can then be used to toggle the use of this keymap on and off. 751;; can then be used to toggle the use of this keymap on and off.
752;; This means that it would be safe(r) to bind ordinary keys like 752;; This means that it would be safe(r) to bind ordinary keys like
753;; letters and digits, provided that we inhibit the keymap while 753;; letters and digits, provided that we inhibit the keymap while
diff --git a/lisp/language/chinese.el b/lisp/language/chinese.el
index c44dc44581d..0e87d4d8e8c 100644
--- a/lisp/language/chinese.el
+++ b/lisp/language/chinese.el
@@ -125,7 +125,7 @@
125(define-coding-system 'chinese-big5 125(define-coding-system 'chinese-big5
126 "BIG5 8-bit encoding for Chinese (MIME:Big5)" 126 "BIG5 8-bit encoding for Chinese (MIME:Big5)"
127 :coding-type 'big5 127 :coding-type 'big5
128 :mnemonic ?B 128 :mnemonic ?B
129 :charset-list '(ascii big5) 129 :charset-list '(ascii big5)
130 :mime-charset 'big5) 130 :mime-charset 'big5)
131 131
@@ -152,7 +152,7 @@
152(define-coding-system 'chinese-big5-hkscs 152(define-coding-system 'chinese-big5-hkscs
153 "BIG5-HKSCS 8-bit encoding for Chinese, Hong Kong supplement (MIME:Big5-HKSCS)" 153 "BIG5-HKSCS 8-bit encoding for Chinese, Hong Kong supplement (MIME:Big5-HKSCS)"
154 :coding-type 'charset 154 :coding-type 'charset
155 :mnemonic ?B 155 :mnemonic ?B
156 :charset-list '(ascii big5-hkscs) 156 :charset-list '(ascii big5-hkscs)
157 :mime-charset 'big5-hkscs) 157 :mime-charset 'big5-hkscs)
158(define-coding-system-alias 'big5-hkscs 'chinese-big5-hkscs) 158(define-coding-system-alias 'big5-hkscs 'chinese-big5-hkscs)
@@ -191,7 +191,7 @@
191 chinese-cns11643-5 chinese-cns11643-6 191 chinese-cns11643-5 chinese-cns11643-6
192 chinese-cns11643-7) 192 chinese-cns11643-7)
193 (iso639-language . zh) 193 (iso639-language . zh)
194 (setup-function . (lambda () 194 (setup-function . (lambda ()
195 (use-cjk-char-width-table 'zh_TW))) 195 (use-cjk-char-width-table 'zh_TW)))
196 (exit-function . use-default-char-width-table) 196 (exit-function . use-default-char-width-table)
197 (coding-system iso-2022-cn euc-tw) 197 (coding-system iso-2022-cn euc-tw)
@@ -211,7 +211,7 @@ accepts Big5 for input also (which is then converted to CNS)."))
211 chinese-cns11643-5 chinese-cns11643-6 211 chinese-cns11643-5 chinese-cns11643-6
212 chinese-cns11643-7 chinese-big5-1 chinese-big5-2) 212 chinese-cns11643-7 chinese-big5-1 chinese-big5-2)
213 (iso639-language . zh) 213 (iso639-language . zh)
214 (setup-function . (lambda () 214 (setup-function . (lambda ()
215 (use-cjk-char-width-table 'zh_TW))) 215 (use-cjk-char-width-table 'zh_TW)))
216 (exit-function . use-default-char-width-table) 216 (exit-function . use-default-char-width-table)
217 (coding-system euc-tw iso-2022-cn) 217 (coding-system euc-tw iso-2022-cn)
@@ -220,7 +220,7 @@ accepts Big5 for input also (which is then converted to CNS)."))
220 (features china-util) 220 (features china-util)
221 (input-method . "chinese-cns-quick") 221 (input-method . "chinese-cns-quick")
222 (documentation . "\ 222 (documentation . "\
223Support for Chinese, prefering the EUC-TW character set. Note that 223Support for Chinese, preferring the EUC-TW character set. Note that
224the EUC-TW coding system accepts Big5 for input also (which is then 224the EUC-TW coding system accepts Big5 for input also (which is then
225converted to CNS).")) 225converted to CNS)."))
226 '("Chinese")) 226 '("Chinese"))
@@ -241,13 +241,13 @@ converted to CNS)."))
241(set-language-info-alist 241(set-language-info-alist
242 "Chinese-GBK" '((charset chinese-gbk) 242 "Chinese-GBK" '((charset chinese-gbk)
243 (iso639-language . zh) 243 (iso639-language . zh)
244 (setup-function . (lambda () 244 (setup-function . (lambda ()
245 (use-cjk-char-width-table 'zh_CN))) 245 (use-cjk-char-width-table 'zh_CN)))
246 (exit-function . use-default-char-width-table) 246 (exit-function . use-default-char-width-table)
247 (coding-system chinese-gbk) 247 (coding-system chinese-gbk)
248 (coding-priority gbk iso-2022-cn chinese-big5 248 (coding-priority gbk iso-2022-cn chinese-big5
249 chinese-iso-8bit) ; fixme? 249 chinese-iso-8bit) ; fixme?
250 (ctext-non-standard-encodings "gbk-0") 250 (ctext-non-standard-encodings "gbk-0")
251 (input-method . "chinese-py-punct") ; fixme? 251 (input-method . "chinese-py-punct") ; fixme?
252 (sample-text . "Chinese ($BCfJ8(B,$BIaDL$A;0(B,$A::So(B) $(D95$B9%(B") 252 (sample-text . "Chinese ($BCfJ8(B,$BIaDL$A;0(B,$A::So(B) $(D95$B9%(B")
253 (features china-util) 253 (features china-util)
diff --git a/lisp/language/cyrillic.el b/lisp/language/cyrillic.el
index 8fb7fae720d..c0f857cadee 100644
--- a/lisp/language/cyrillic.el
+++ b/lisp/language/cyrillic.el
@@ -126,7 +126,7 @@ Support for Russian using koi8-r and the russian-computer input method.")
126(define-coding-system 'koi8-u 126(define-coding-system 'koi8-u
127 "KOI8-U 8-bit encoding for Cyrillic (MIME: KOI8-U)" 127 "KOI8-U 8-bit encoding for Cyrillic (MIME: KOI8-U)"
128 :coding-type 'charset 128 :coding-type 'charset
129 :mnemonic ?U 129 :mnemonic ?U
130 :charset-list '(koi8-u) 130 :charset-list '(koi8-u)
131 :mime-charset 'koi8-u) 131 :mime-charset 'koi8-u)
132 132
@@ -246,7 +246,7 @@ Support for Russian using koi8-r and the russian-computer input method.")
246 (ctext-non-standard-encodings "microsoft-cp1251") 246 (ctext-non-standard-encodings "microsoft-cp1251")
247 (input-method . "bulgarian-bds") 247 (input-method . "bulgarian-bds")
248 (documentation 248 (documentation
249 . "Support for Bulgrian with windows-1251 character set.")) 249 . "Support for Bulgarian with windows-1251 character set."))
250 '("Cyrillic")) 250 '("Cyrillic"))
251 251
252(set-language-info-alist 252(set-language-info-alist
diff --git a/lisp/language/ethio-util.el b/lisp/language/ethio-util.el
index 1d93d981f8e..3c39b1eff9c 100644
--- a/lisp/language/ethio-util.el
+++ b/lisp/language/ethio-util.el
@@ -1,4 +1,4 @@
1;;; ethio-util.el --- utilities for Ethiopic -*- coding: utf-8; -*- 1;;; ethio-util.el --- utilities for Ethiopic -*- coding: utf-8-emacs; -*-
2 2
3;; Copyright (C) 1997-1998, 2002-2011 Free Software Foundation, Inc. 3;; Copyright (C) 1997-1998, 2002-2011 Free Software Foundation, Inc.
4;; Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 4;; Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
@@ -48,7 +48,7 @@
48 ([f4] . ethio-sera-to-fidel-buffer) 48 ([f4] . ethio-sera-to-fidel-buffer)
49 ([S-f4] . ethio-sera-to-fidel-region) 49 ([S-f4] . ethio-sera-to-fidel-region)
50 ([C-f4] . ethio-sera-to-fidel-marker) 50 ([C-f4] . ethio-sera-to-fidel-marker)
51 ([S-f5] . ethio-toggle-punctuation) 51 ;; ([S-f5] . ethio-toggle-punctuation)
52 ([S-f6] . ethio-modify-vowel) 52 ([S-f6] . ethio-modify-vowel)
53 ([S-f7] . ethio-replace-space) 53 ([S-f7] . ethio-replace-space)
54 ;; ([S-f8] . ethio-input-special-character) ; deprecated 54 ;; ([S-f8] . ethio-input-special-character) ; deprecated
@@ -890,7 +890,7 @@ Otherwise, [0-9A-F]."
890 890
891;;;###autoload 891;;;###autoload
892(defun ethio-find-file nil 892(defun ethio-find-file nil
893 "Transliterate file content into Ethiopic dependig on filename suffix." 893 "Transliterate file content into Ethiopic depending on filename suffix."
894 (cond 894 (cond
895 895
896 ((string-match "\\.sera$" (buffer-file-name)) 896 ((string-match "\\.sera$" (buffer-file-name))
diff --git a/lisp/language/lao-util.el b/lisp/language/lao-util.el
index 008eb92dbbc..2a339504409 100644
--- a/lisp/language/lao-util.el
+++ b/lisp/language/lao-util.el
@@ -386,7 +386,7 @@ character MAA-SAKOD-n.")
386 "Transcribe a Romanized Lao syllable in the region FROM and TO to Lao string. 386 "Transcribe a Romanized Lao syllable in the region FROM and TO to Lao string.
387Only the first syllable is transcribed. 387Only the first syllable is transcribed.
388The value has the form: (START END LAO-STRING), where 388The value has the form: (START END LAO-STRING), where
389START and END are the beggining and end positions of the Roman Lao syllable, 389START and END are the beginning and end positions of the Roman Lao syllable,
390LAO-STRING is the Lao character transcription of it. 390LAO-STRING is the Lao character transcription of it.
391 391
392Optional 3rd arg STR, if non-nil, is a string to search for Roman Lao 392Optional 3rd arg STR, if non-nil, is a string to search for Roman Lao
diff --git a/lisp/language/viet-util.el b/lisp/language/viet-util.el
index ea601c041e4..b71c65438be 100644
--- a/lisp/language/viet-util.el
+++ b/lisp/language/viet-util.el
@@ -34,7 +34,7 @@
34;; for representing these characters: VISCII, TCVN-5712, VPS, VIQR, 34;; for representing these characters: VISCII, TCVN-5712, VPS, VIQR,
35;; and Unicode. VISCII, TCVN-5712 and VPS are simple 1-byte code 35;; and Unicode. VISCII, TCVN-5712 and VPS are simple 1-byte code
36;; which assigns 134 unique characters in control-code area 36;; which assigns 134 unique characters in control-code area
37;; (0x00..0x1F) and right half area (0x80..0xFF). VIQR is a menmonic 37;; (0x00..0x1F) and right half area (0x80..0xFF). VIQR is a mnemonic
38;; encoding specification representing diacritical marks by following 38;; encoding specification representing diacritical marks by following
39;; ASCII characters. 39;; ASCII characters.
40 40
@@ -47,7 +47,7 @@
47 "Return VISCII character code of CHAR if appropriate." 47 "Return VISCII character code of CHAR if appropriate."
48 (encode-char char 'viscii)) 48 (encode-char char 'viscii))
49 49
50;; VIQR is a menmonic encoding specification for Vietnamese. 50;; VIQR is a mnemonic encoding specification for Vietnamese.
51;; It represents diacritical marks by ASCII characters as follows: 51;; It represents diacritical marks by ASCII characters as follows:
52;; ------------+----------+-------- 52;; ------------+----------+--------
53;; mark | mnemonic | example 53;; mark | mnemonic | example
diff --git a/lisp/ldefs-boot.el b/lisp/ldefs-boot.el
index 858cfa85a6f..db511e1ce40 100644
--- a/lisp/ldefs-boot.el
+++ b/lisp/ldefs-boot.el
@@ -3608,7 +3608,7 @@ REG := r0 | r1 | r2 | r3 | r4 | r5 | r6 | r7
3608ARG := REG | integer 3608ARG := REG | integer
3609 3609
3610OPERATOR := 3610OPERATOR :=
3611 ;; Normal arithmethic operators (same meaning as C code). 3611 ;; Normal arithmetic operators (same meaning as C code).
3612 + | - | * | / | % 3612 + | - | * | / | %
3613 3613
3614 ;; Bitwise operators (same meaning as C code) 3614 ;; Bitwise operators (same meaning as C code)
diff --git a/lisp/loadhist.el b/lisp/loadhist.el
index 51df6ecff0a..8edda03044a 100644
--- a/lisp/loadhist.el
+++ b/lisp/loadhist.el
@@ -156,7 +156,7 @@ documentation of `unload-feature' for details.")
156 (dolist (buffer (buffer-list)) 156 (dolist (buffer (buffer-list))
157 (set-buffer buffer) 157 (set-buffer buffer)
158 (let ((proposed major-mode)) 158 (let ((proposed major-mode))
159 ;; Look for an antecessor mode not defined in the feature we're processing 159 ;; Look for a predecessor mode not defined in the feature we're processing
160 (while (and proposed (rassq proposed unload-function-defs-list)) 160 (while (and proposed (rassq proposed unload-function-defs-list))
161 (setq proposed (get proposed 'derived-mode-parent))) 161 (setq proposed (get proposed 'derived-mode-parent)))
162 (unless (eq proposed major-mode) 162 (unless (eq proposed major-mode)
diff --git a/lisp/mail/emacsbug.el b/lisp/mail/emacsbug.el
index 576f443c8e2..5b7601c6335 100644
--- a/lisp/mail/emacsbug.el
+++ b/lisp/mail/emacsbug.el
@@ -437,7 +437,7 @@ and send the mail again%s."
437 (car bug)) 437 (car bug))
438 items)) 438 items))
439 (nreverse items)))) 439 (nreverse items))))
440 (widget-insert "No bugs maching your keywords found.\n")) 440 (widget-insert "No bugs matching your keywords found.\n"))
441 (widget-insert "\n") 441 (widget-insert "\n")
442 (widget-create 'push-button 442 (widget-create 'push-button
443 :notify (lambda (&rest ignore) 443 :notify (lambda (&rest ignore)
diff --git a/lisp/mail/rmail.el b/lisp/mail/rmail.el
index 230424c1920..1ea01bdadb8 100644
--- a/lisp/mail/rmail.el
+++ b/lisp/mail/rmail.el
@@ -4527,7 +4527,7 @@ With prefix argument N moves forward N messages with these labels.
4527 4527
4528;;;*** 4528;;;***
4529 4529
4530;;;### (autoloads (rmail-mime) "rmailmm" "rmailmm.el" "2cb1f29b88b0c724fdba389fd7b98b00") 4530;;;### (autoloads (rmail-mime) "rmailmm" "rmailmm.el" "91f72e39e6ea7c2be098fe3f05174b9e")
4531;;; Generated autoloads from rmailmm.el 4531;;; Generated autoloads from rmailmm.el
4532 4532
4533(autoload 'rmail-mime "rmailmm" "\ 4533(autoload 'rmail-mime "rmailmm" "\
@@ -4629,7 +4629,7 @@ If prefix argument REVERSE is non-nil, sorts in reverse order.
4629 4629
4630;;;### (autoloads (rmail-summary-by-senders rmail-summary-by-topic 4630;;;### (autoloads (rmail-summary-by-senders rmail-summary-by-topic
4631;;;;;; rmail-summary-by-regexp rmail-summary-by-recipients rmail-summary-by-labels 4631;;;;;; rmail-summary-by-regexp rmail-summary-by-recipients rmail-summary-by-labels
4632;;;;;; rmail-summary) "rmailsum" "rmailsum.el" "1375d6512b953c0d7c3bde52192f4055") 4632;;;;;; rmail-summary) "rmailsum" "rmailsum.el" "d5971848a5fb43dc0092008376298a80")
4633;;; Generated autoloads from rmailsum.el 4633;;; Generated autoloads from rmailsum.el
4634 4634
4635(autoload 'rmail-summary "rmailsum" "\ 4635(autoload 'rmail-summary "rmailsum" "\
diff --git a/lisp/mail/rmailmm.el b/lisp/mail/rmailmm.el
index d01cfc7f2c8..03023b07527 100644
--- a/lisp/mail/rmailmm.el
+++ b/lisp/mail/rmailmm.el
@@ -320,7 +320,7 @@ The value is a vector [INDEX HEADER TAGLINE BODY END], where
320 (setq index 2)) 320 (setq index 2))
321 ;; If the tagline is displayed, get past it to the body. 321 ;; If the tagline is displayed, get past it to the body.
322 (if (rmail-mime-display-tagline current) 322 (if (rmail-mime-display-tagline current)
323 ;; The next foward-line call must be in sync with how 323 ;; The next forward-line call must be in sync with how
324 ;; `rmail-mime-insert-tagline' formats the tagline. The 324 ;; `rmail-mime-insert-tagline' formats the tagline. The
325 ;; body begins after the empty line that ends the tagline. 325 ;; body begins after the empty line that ends the tagline.
326 (forward-line 3)) 326 (forward-line 3))
diff --git a/lisp/mail/rmailsum.el b/lisp/mail/rmailsum.el
index e6a0a34f33b..5c147be3104 100644
--- a/lisp/mail/rmailsum.el
+++ b/lisp/mail/rmailsum.el
@@ -762,6 +762,12 @@ the message being processed."
762 (point))))))))) 762 (point)))))))))
763 (if (null from) 763 (if (null from)
764 " " 764 " "
765 ;; We are going to return only 25 characters of the
766 ;; address, so make sure it is RFC2047 decoded before
767 ;; taking its substring. This is important when the address is not on the same line as the name, e.g.:
768 ;; To: =?UTF-8?Q?=C5=A0t=C4=9Bp=C3=A1n_?= =?UTF-8?Q?N=C4=9Bmec?=
769 ;; <stepnem@gmail.com>
770 (setq from (rfc2047-decode-string from))
765 (setq len (length from)) 771 (setq len (length from))
766 (setq mch (string-match "[@%]" from)) 772 (setq mch (string-match "[@%]" from))
767 (format "%25s" 773 (format "%25s"
diff --git a/lisp/makefile.w32-in b/lisp/makefile.w32-in
index c844a8f6630..c8e535d4ac0 100644
--- a/lisp/makefile.w32-in
+++ b/lisp/makefile.w32-in
@@ -232,12 +232,15 @@ $(lisp)/subdirs.el:
232update-subdirs: update-subdirs-$(SHELLTYPE) 232update-subdirs: update-subdirs-$(SHELLTYPE)
233 233
234update-subdirs-CMD: doit 234update-subdirs-CMD: doit
235 echo ;; -*- no-byte-compile: t -*-> $(lisp)/subdirs.el 235 echo ;; In load-path, after this directory should come> $(lisp)/subdirs.el
236 echo ;; In load-path, after this directory should come>> $(lisp)/subdirs.el
237 echo ;; certain of its subdirectories. Here we specify them.>> $(lisp)/subdirs.el 236 echo ;; certain of its subdirectories. Here we specify them.>> $(lisp)/subdirs.el
238 echo (normal-top-level-add-to-load-path $(SQUOTE)(>> $(lisp)/subdirs.el 237 echo (normal-top-level-add-to-load-path $(SQUOTE)(>> $(lisp)/subdirs.el
239 @for %%d in ($(WINS_SUBDIR) cedet) do echo "%%d">> $(lisp)/subdirs.el 238 @for %%d in ($(WINS_SUBDIR) cedet) do echo "%%d">> $(lisp)/subdirs.el
240 echo ))>> $(lisp)/subdirs.el 239 echo ))>> $(lisp)/subdirs.el
240 echo ;; Local Variables:>> $(lisp)/subdirs.el
241 echo ;; version-control: never>> $(lisp)/subdirs.el
242 echo ;; no-byte-compile: t>> $(lisp)/subdirs.el
243 echo ;; End:>> $(lisp)/subdirs.el
241 244
242update-subdirs-SH: doit 245update-subdirs-SH: doit
243 $(srcdir)/update-subdirs $(lisp); \ 246 $(srcdir)/update-subdirs $(lisp); \
diff --git a/lisp/man.el b/lisp/man.el
index c9ba64bf5e0..3cdbdddb044 100644
--- a/lisp/man.el
+++ b/lisp/man.el
@@ -687,7 +687,7 @@ POS defaults to `point'."
687 ;; Otherwise record the current column and look backwards. 687 ;; Otherwise record the current column and look backwards.
688 (setq column (current-column)) 688 (setq column (current-column))
689 (skip-chars-backward ",; \t") 689 (skip-chars-backward ",; \t")
690 ;; Record the distance travelled. 690 ;; Record the distance traveled.
691 (setq distance (- column (current-column))) 691 (setq distance (- column (current-column)))
692 (when (looking-back 692 (when (looking-back
693 (concat "([ \t]*\\(?:" Man-section-regexp "\\)[ \t]*)")) 693 (concat "([ \t]*\\(?:" Man-section-regexp "\\)[ \t]*)"))
@@ -933,7 +933,8 @@ Return the buffer in which the manpage will appear."
933 ;; minal (using an ioctl(2) if available, the value of 933 ;; minal (using an ioctl(2) if available, the value of
934 ;; $COLUMNS, or falling back to 80 characters if nei- 934 ;; $COLUMNS, or falling back to 80 characters if nei-
935 ;; ther is available). 935 ;; ther is available).
936 (unless (or (getenv "MANWIDTH") (getenv "COLUMNS")) 936 (when (or window-system
937 (not (or (getenv "MANWIDTH") (getenv "COLUMNS"))))
937 ;; This isn't strictly correct, since we don't know how 938 ;; This isn't strictly correct, since we don't know how
938 ;; the page will actually be displayed, but it seems 939 ;; the page will actually be displayed, but it seems
939 ;; reasonable. 940 ;; reasonable.
diff --git a/lisp/mh-e/ChangeLog b/lisp/mh-e/ChangeLog
index 02e531120be..ce8a7e56d60 100644
--- a/lisp/mh-e/ChangeLog
+++ b/lisp/mh-e/ChangeLog
@@ -122,7 +122,7 @@
122 * mh-mime.el: Shush XEmacs compiler in mh-do-in-xemacs block. 122 * mh-mime.el: Shush XEmacs compiler in mh-do-in-xemacs block.
123 123
124 * mh-folder.el: Use boundp instead of fboundp when testing 124 * mh-folder.el: Use boundp instead of fboundp when testing
125 existence of desktop-buffer-mode-handlers. 125 existence of desktop-buffer-mode-handlers (closes SF #1510145).
126 126
1272011-05-10 Jim Meyering <meyering@redhat.com> 1272011-05-10 Jim Meyering <meyering@redhat.com>
128 128
@@ -232,7 +232,8 @@
232 (mh-handle-process-error, mh-variant-info): 232 (mh-handle-process-error, mh-variant-info):
233 * mh-comp.el (mh-forward): 233 * mh-comp.el (mh-forward):
234 * mh-alias.el (mh-alias-local-users, mh-alias-which-file-has-alias): 234 * mh-alias.el (mh-alias-local-users, mh-alias-which-file-has-alias):
235 (mh-alias-add-alias-to-file): Use with-current-buffer. 235 (mh-alias-add-alias-to-file): Use with-current-buffer (closes SF
236 #1903293).
236 237
2372009-11-04 Stefan Monnier <monnier@iro.umontreal.ca> 2382009-11-04 Stefan Monnier <monnier@iro.umontreal.ca>
238 239
diff --git a/lisp/mh-e/ChangeLog.1 b/lisp/mh-e/ChangeLog.1
index 871b84dd039..506390896a1 100644
--- a/lisp/mh-e/ChangeLog.1
+++ b/lisp/mh-e/ChangeLog.1
@@ -428,7 +428,7 @@
4282004-11-08 Satyaki Das <satyaki@theforce.stanford.edu> 4282004-11-08 Satyaki Das <satyaki@theforce.stanford.edu>
429 429
430 * mh-acros.el (mh-funcall-if-exists): In XEmacs, presence of a 430 * mh-acros.el (mh-funcall-if-exists): In XEmacs, presence of a
431 function at compile time doesn't guarantee it's existence at run 431 function at compile time doesn't guarantee its existence at run
432 time. So make the macro handle that situation better. 432 time. So make the macro handle that situation better.
433 433
4342004-11-05 Satyaki Das <satyaki@theforce.stanford.edu> 4342004-11-05 Satyaki Das <satyaki@theforce.stanford.edu>
@@ -1648,7 +1648,7 @@
1648 * mh-e.el (mh-version): Do something sensible when 1648 * mh-e.el (mh-version): Do something sensible when
1649 mh-variant-in-use is undefined. 1649 mh-variant-in-use is undefined.
1650 * mh-junk.el (mh-spamassassin-blacklist) 1650 * mh-junk.el (mh-spamassassin-blacklist)
1651 (mh-spamassassin-whitelist): Change options to be compatoble with 1651 (mh-spamassassin-whitelist): Change options to be compatible with
1652 old version of spamassassin (V2.20). 1652 old version of spamassassin (V2.20).
1653 1653
16542003-09-07 Mark D. Baushke <mdb@gnu.org> 16542003-09-07 Mark D. Baushke <mdb@gnu.org>
@@ -10195,7 +10195,7 @@
101952002-04-02 Peter S Galbraith <psg@debian.org> 101952002-04-02 Peter S Galbraith <psg@debian.org>
10196 10196
10197 * mh-e.el: 'defvar mh-folder-unseen-seq-name' called a function to 10197 * mh-e.el: 'defvar mh-folder-unseen-seq-name' called a function to
10198 set it's value, and this happens also on byte-compilation (where 10198 set its value, and this happens also on byte-compilation (where
10199 it can fail if the user's MH environment is not setup correctly). 10199 it can fail if the user's MH environment is not setup correctly).
10200 I now set the value of mh-folder-unseen-seq-name at runtime when I 10200 I now set the value of mh-folder-unseen-seq-name at runtime when I
10201 first need it. This should fix Debian bugs 10201 first need it. This should fix Debian bugs
diff --git a/lisp/net/ange-ftp.el b/lisp/net/ange-ftp.el
index 7ae6912cf8f..b7fdd9a9bd8 100644
--- a/lisp/net/ange-ftp.el
+++ b/lisp/net/ange-ftp.el
@@ -1664,7 +1664,7 @@ good, skip, fatal, or unknown."
1664 (if (not (and seen-prompt ange-ftp-pending-error-line)) 1664 (if (not (and seen-prompt ange-ftp-pending-error-line))
1665 (ange-ftp-process-handle-line line proc) 1665 (ange-ftp-process-handle-line line proc)
1666 ;; If we've seen a potential error message and it 1666 ;; If we've seen a potential error message and it
1667 ;; hasn't been cancelled by a good message before 1667 ;; hasn't been canceled by a good message before
1668 ;; seeing a prompt, then the error was real. 1668 ;; seeing a prompt, then the error was real.
1669 (delete-process proc) 1669 (delete-process proc)
1670 (setq ange-ftp-process-busy nil 1670 (setq ange-ftp-process-busy nil
@@ -2854,7 +2854,7 @@ NO-ERROR, if a listing for DIRECTORY cannot be obtained."
2854;; that a wasted listing is not done: 2854;; that a wasted listing is not done:
2855;; 1. When looking for a .dired file in dired-x.el. 2855;; 1. When looking for a .dired file in dired-x.el.
2856;; 2. The syntax of FILE and DIR make it impossible that FILE could be a valid 2856;; 2. The syntax of FILE and DIR make it impossible that FILE could be a valid
2857;; subdirectory. This is of course an OS dependent judgement. 2857;; subdirectory. This is of course an OS dependent judgment.
2858 2858
2859(defvar dired-local-variables-file) 2859(defvar dired-local-variables-file)
2860(defmacro ange-ftp-allow-child-lookup (dir file) 2860(defmacro ange-ftp-allow-child-lookup (dir file)
@@ -3637,6 +3637,10 @@ so return the size on the remote host exactly. See RFC 3659."
3637 (setq filename (expand-file-name filename) 3637 (setq filename (expand-file-name filename)
3638 newname (expand-file-name newname)) 3638 newname (expand-file-name newname))
3639 3639
3640 (or (file-exists-p filename)
3641 (signal 'file-error
3642 (list "Copy file" "no such file or directory" filename)))
3643
3640 ;; canonicalize newname if a directory. 3644 ;; canonicalize newname if a directory.
3641 (if (file-directory-p newname) 3645 (if (file-directory-p newname)
3642 (setq newname (expand-file-name (file-name-nondirectory filename) newname))) 3646 (setq newname (expand-file-name (file-name-nondirectory filename) newname)))
diff --git a/lisp/net/dbus.el b/lisp/net/dbus.el
index 8a8d9e6332f..9254fef8a7f 100644
--- a/lisp/net/dbus.el
+++ b/lisp/net/dbus.el
@@ -101,7 +101,7 @@ Otherwise, return result of last form in BODY, or all other errors."
101(defvar dbus-event-error-hooks nil 101(defvar dbus-event-error-hooks nil
102 "Functions to be called when a D-Bus error happens in the event handler. 102 "Functions to be called when a D-Bus error happens in the event handler.
103Every function must accept two arguments, the event and the error variable 103Every function must accept two arguments, the event and the error variable
104catched in `condition-case' by `dbus-error'.") 104caught in `condition-case' by `dbus-error'.")
105 105
106 106
107;;; Hash table of registered functions. 107;;; Hash table of registered functions.
diff --git a/lisp/net/netrc.el b/lisp/net/netrc.el
index b04863b5fc0..80836b03978 100644
--- a/lisp/net/netrc.el
+++ b/lisp/net/netrc.el
@@ -237,7 +237,7 @@ MODE can be \"login\" or \"password\", suitable for passing to
237;;;###autoload 237;;;###autoload
238(defun netrc-credentials (machine &rest ports) 238(defun netrc-credentials (machine &rest ports)
239 "Return a user name/password pair. 239 "Return a user name/password pair.
240Port specifications will be prioritised in the order they are 240Port specifications will be prioritized in the order they are
241listed in the PORTS list." 241listed in the PORTS list."
242 (let ((list (netrc-parse)) 242 (let ((list (netrc-parse))
243 found) 243 found)
diff --git a/lisp/net/network-stream.el b/lisp/net/network-stream.el
index e27b4541ab5..9c07953c9c9 100644
--- a/lisp/net/network-stream.el
+++ b/lisp/net/network-stream.el
@@ -115,7 +115,7 @@ values:
115 capability command, and should return the command to switch on 115 capability command, and should return the command to switch on
116 STARTTLS if the server supports STARTTLS, and nil otherwise. 116 STARTTLS if the server supports STARTTLS, and nil otherwise.
117 117
118:always-query-capabilies says whether to query the server for 118:always-query-capabilities says whether to query the server for
119 capabilities, even if we're doing a `plain' network connection. 119 capabilities, even if we're doing a `plain' network connection.
120 120
121:client-certificate should either be a list where the first 121:client-certificate should either be a list where the first
diff --git a/lisp/net/ntlm.el b/lisp/net/ntlm.el
index 9af148e8faa..8bcb1ef2966 100644
--- a/lisp/net/ntlm.el
+++ b/lisp/net/ntlm.el
@@ -440,7 +440,7 @@ length of STR is LEN."
440 440
441(defun ntlm-smb-dohash (in key forw) 441(defun ntlm-smb-dohash (in key forw)
442 "Return the hash value for a string IN and a string KEY. 442 "Return the hash value for a string IN and a string KEY.
443Length of IN and KEY are 64. FORW non nill means forward, nil means 443Length of IN and KEY are 64. FORW non-nil means forward, nil means
444backward." 444backward."
445 (let (pk1 ;string of length 56 445 (let (pk1 ;string of length 56
446 c ;string of length 28 446 c ;string of length 28
diff --git a/lisp/net/tramp-gvfs.el b/lisp/net/tramp-gvfs.el
index df841bade79..27dff3aa8d9 100644
--- a/lisp/net/tramp-gvfs.el
+++ b/lisp/net/tramp-gvfs.el
@@ -188,7 +188,7 @@
188;; STRING stable_name 188;; STRING stable_name
189;; STRING x_content_types Since GVFS 1.0 only !!! 189;; STRING x_content_types Since GVFS 1.0 only !!!
190;; STRING icon 190;; STRING icon
191;; STRING prefered_filename_encoding 191;; STRING preferred_filename_encoding
192;; BOOLEAN user_visible 192;; BOOLEAN user_visible
193;; ARRAY BYTE fuse_mountpoint 193;; ARRAY BYTE fuse_mountpoint
194;; STRUCT mount_spec 194;; STRUCT mount_spec
diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el
index ee4c8966626..446a27c65d3 100644
--- a/lisp/net/tramp-sh.el
+++ b/lisp/net/tramp-sh.el
@@ -44,7 +44,7 @@
44 44
45(defcustom tramp-inline-compress-start-size 4096 45(defcustom tramp-inline-compress-start-size 4096
46 "*The minimum size of compressing where inline transfer. 46 "*The minimum size of compressing where inline transfer.
47When inline transfer, compress transfered data of file 47When inline transfer, compress transferred data of file
48whose size is this value or above (up to `tramp-copy-size-limit'). 48whose size is this value or above (up to `tramp-copy-size-limit').
49If it is nil, no compression at all will be applied." 49If it is nil, no compression at all will be applied."
50 :group 'tramp 50 :group 'tramp
@@ -3526,7 +3526,7 @@ variable PATH."
3526Here, we are looking for a command which has zero exit status if the 3526Here, we are looking for a command which has zero exit status if the
3527file exists and nonzero exit status otherwise." 3527file exists and nonzero exit status otherwise."
3528 (let ((existing "/") 3528 (let ((existing "/")
3529 (nonexisting 3529 (nonexistent
3530 (tramp-shell-quote-argument "/ this file does not exist ")) 3530 (tramp-shell-quote-argument "/ this file does not exist "))
3531 result) 3531 result)
3532 ;; The algorithm is as follows: we try a list of several commands. 3532 ;; The algorithm is as follows: we try a list of several commands.
@@ -3551,22 +3551,22 @@ file exists and nonzero exit status otherwise."
3551 (tramp-send-command-and-check 3551 (tramp-send-command-and-check
3552 vec (format "%s %s" result existing)) 3552 vec (format "%s %s" result existing))
3553 (not (tramp-send-command-and-check 3553 (not (tramp-send-command-and-check
3554 vec (format "%s %s" result nonexisting)))) 3554 vec (format "%s %s" result nonexistent))))
3555 (and (setq result "/bin/test -e") 3555 (and (setq result "/bin/test -e")
3556 (tramp-send-command-and-check 3556 (tramp-send-command-and-check
3557 vec (format "%s %s" result existing)) 3557 vec (format "%s %s" result existing))
3558 (not (tramp-send-command-and-check 3558 (not (tramp-send-command-and-check
3559 vec (format "%s %s" result nonexisting)))) 3559 vec (format "%s %s" result nonexistent))))
3560 (and (setq result "/usr/bin/test -e") 3560 (and (setq result "/usr/bin/test -e")
3561 (tramp-send-command-and-check 3561 (tramp-send-command-and-check
3562 vec (format "%s %s" result existing)) 3562 vec (format "%s %s" result existing))
3563 (not (tramp-send-command-and-check 3563 (not (tramp-send-command-and-check
3564 vec (format "%s %s" result nonexisting)))) 3564 vec (format "%s %s" result nonexistent))))
3565 (and (setq result (format "%s -d" (tramp-get-ls-command vec))) 3565 (and (setq result (format "%s -d" (tramp-get-ls-command vec)))
3566 (tramp-send-command-and-check 3566 (tramp-send-command-and-check
3567 vec (format "%s %s" result existing)) 3567 vec (format "%s %s" result existing))
3568 (not (tramp-send-command-and-check 3568 (not (tramp-send-command-and-check
3569 vec (format "%s %s" result nonexisting))))) 3569 vec (format "%s %s" result nonexistent)))))
3570 (tramp-error 3570 (tramp-error
3571 vec 'file-error "Couldn't find command to check if file exists")) 3571 vec 'file-error "Couldn't find command to check if file exists"))
3572 result)) 3572 result))
@@ -3726,7 +3726,7 @@ process to set up. VEC specifies the connection."
3726 ;; Check whether the output of "uname -sr" has been changed. If 3726 ;; Check whether the output of "uname -sr" has been changed. If
3727 ;; yes, this is a strong indication that we must expire all 3727 ;; yes, this is a strong indication that we must expire all
3728 ;; connection properties. We start again with 3728 ;; connection properties. We start again with
3729 ;; `tramp-maybe-open-connection', it will be catched there. 3729 ;; `tramp-maybe-open-connection', it will be caught there.
3730 (tramp-message vec 5 "Checking system information") 3730 (tramp-message vec 5 "Checking system information")
3731 (let ((old-uname (tramp-get-connection-property vec "uname" nil)) 3731 (let ((old-uname (tramp-get-connection-property vec "uname" nil))
3732 (new-uname 3732 (new-uname
@@ -4215,7 +4215,7 @@ connection if a previous connection has died for some reason."
4215 (tramp-send-command vec "echo are you awake" t t) 4215 (tramp-send-command vec "echo are you awake" t t)
4216 (unless (and (memq (process-status p) '(run open)) 4216 (unless (and (memq (process-status p) '(run open))
4217 (tramp-wait-for-output p 10)) 4217 (tramp-wait-for-output p 10))
4218 ;; The error will be catched locally. 4218 ;; The error will be caught locally.
4219 (tramp-error vec 'file-error "Awake did fail"))) 4219 (tramp-error vec 'file-error "Awake did fail")))
4220 (file-error 4220 (file-error
4221 (tramp-flush-connection-property vec) 4221 (tramp-flush-connection-property vec)
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el
index c89b61c2eb1..473ba00fbc2 100644
--- a/lisp/net/tramp.el
+++ b/lisp/net/tramp.el
@@ -298,8 +298,8 @@ shouldn't return t when it isn't."
298 (search-forward-regexp "Missing ControlMaster argument" nil t)))) 298 (search-forward-regexp "Missing ControlMaster argument" nil t))))
299 299
300(defcustom tramp-default-method 300(defcustom tramp-default-method
301 ;; An external copy method seems to be preferred, because it is much 301 ;; An external copy method seems to be preferred, because it performs
302 ;; more performant for large files, and it hasn't too serious delays 302 ;; much better for large files, and it hasn't too serious delays
303 ;; for small files. But it must be ensured that there aren't 303 ;; for small files. But it must be ensured that there aren't
304 ;; permanent password queries. Either a password agent like 304 ;; permanent password queries. Either a password agent like
305 ;; "ssh-agent" or "Pageant" shall run, or the optional 305 ;; "ssh-agent" or "Pageant" shall run, or the optional
@@ -3506,7 +3506,7 @@ If the `tramp-methods' entry does not exist, return nil."
3506 (cond 3506 (cond
3507 ((char-equal other-write ?w) (tramp-compat-octal-to-decimal "00002")) 3507 ((char-equal other-write ?w) (tramp-compat-octal-to-decimal "00002"))
3508 ((char-equal other-write ?-) 0) 3508 ((char-equal other-write ?-) 0)
3509 (t (error "Nineth char `%c' must be one of `w-'" other-write))) 3509 (t (error "Ninth char `%c' must be one of `w-'" other-write)))
3510 (cond 3510 (cond
3511 ((char-equal other-execute-or-sticky ?x) 3511 ((char-equal other-execute-or-sticky ?x)
3512 (tramp-compat-octal-to-decimal "00001")) 3512 (tramp-compat-octal-to-decimal "00001"))
diff --git a/lisp/net/xesam.el b/lisp/net/xesam.el
index ab817a43885..17b22aa03ba 100644
--- a/lisp/net/xesam.el
+++ b/lisp/net/xesam.el
@@ -172,7 +172,7 @@
172 172
173(defface xesam-highlight '((t :inherit match)) 173(defface xesam-highlight '((t :inherit match))
174 "Face to highlight query entries. 174 "Face to highlight query entries.
175It will be overlayed by `widget-documentation-face', so it shall 175It will be overlaid by `widget-documentation-face', so it shall
176be different at least in one face property not set in that face." 176be different at least in one face property not set in that face."
177 :group 'xesam) 177 :group 'xesam)
178 178
@@ -279,8 +279,8 @@ fields are supported.")
279 279
280(defun xesam-dbus-call-method (&rest args) 280(defun xesam-dbus-call-method (&rest args)
281 "Apply a D-Bus method call. 281 "Apply a D-Bus method call.
282`dbus-call-method' is to be preferred, because it is more 282`dbus-call-method' is preferred, because it performs better.
283performant. If the target D-Bus service is owned by Emacs, this 283If the target D-Bus service is owned by Emacs, this
284is not applicable, and `dbus-call-method-non-blocking' must be 284is not applicable, and `dbus-call-method-non-blocking' must be
285used instead. ARGS are identical to the argument list of both 285used instead. ARGS are identical to the argument list of both
286functions." 286functions."
diff --git a/lisp/net/zeroconf.el b/lisp/net/zeroconf.el
index cc538c224dc..a889a6a4177 100644
--- a/lisp/net/zeroconf.el
+++ b/lisp/net/zeroconf.el
@@ -82,7 +82,7 @@
82 82
83;; The function `zeroconf-publish-service' publishes a new service to 83;; The function `zeroconf-publish-service' publishes a new service to
84;; the Avahi daemon. Although the domain, where to the service is 84;; the Avahi daemon. Although the domain, where to the service is
85;; published, can be specified by this function, it is usally the 85;; published, can be specified by this function, it is usually the
86;; default domain "local" (also written as nil or ""). 86;; default domain "local" (also written as nil or "").
87 87
88;; (zeroconf-publish-service 88;; (zeroconf-publish-service
diff --git a/lisp/nxml/rng-valid.el b/lisp/nxml/rng-valid.el
index 9a29e3d4cca..1f69f5d7bf3 100644
--- a/lisp/nxml/rng-valid.el
+++ b/lisp/nxml/rng-valid.el
@@ -377,8 +377,8 @@ The schema is set like `rng-auto-set-schema'."
377(defun rng-kill-timers () 377(defun rng-kill-timers ()
378 ;; rng-validate-timer and rng-validate-quick-timer have the 378 ;; rng-validate-timer and rng-validate-quick-timer have the
379 ;; permanent-local property, so that the timers can be 379 ;; permanent-local property, so that the timers can be
380 ;; cancelled even after changing mode. 380 ;; canceled even after changing mode.
381 ;; This function takes care of cancelling the timers and 381 ;; This function takes care of canceling the timers and
382 ;; then killing the local variables. 382 ;; then killing the local variables.
383 (when (local-variable-p 'rng-validate-timer) 383 (when (local-variable-p 'rng-validate-timer)
384 (when rng-validate-timer 384 (when rng-validate-timer
diff --git a/lisp/obsolete/old-whitespace.el b/lisp/obsolete/old-whitespace.el
index c33794f668d..0c0580b55dc 100644
--- a/lisp/obsolete/old-whitespace.el
+++ b/lisp/obsolete/old-whitespace.el
@@ -515,12 +515,12 @@ See `whitespace-buffer' docstring for a summary of the problems."
515 (whitespace-check-whitespace-mode current-prefix-arg) 515 (whitespace-check-whitespace-mode current-prefix-arg)
516 (if (and buffer-file-name whitespace-mode) 516 (if (and buffer-file-name whitespace-mode)
517 (let ((whitespace-any nil) 517 (let ((whitespace-any nil)
518 (whitespace-tabwith 8) 518 (whitespace-tabwidth 8)
519 (whitespace-tabwith-saved tab-width)) 519 (whitespace-tabwidth-saved tab-width))
520 520
521 ;; since all printable TABS should be 8, irrespective of how 521 ;; since all printable TABS should be 8, irrespective of how
522 ;; they are displayed. 522 ;; they are displayed.
523 (setq tab-width whitespace-tabwith) 523 (setq tab-width whitespace-tabwidth)
524 524
525 (if (and whitespace-check-buffer-leading 525 (if (and whitespace-check-buffer-leading
526 (whitespace-buffer-leading)) 526 (whitespace-buffer-leading))
@@ -562,7 +562,7 @@ See `whitespace-buffer' docstring for a summary of the problems."
562 (message "The region is now clean") 562 (message "The region is now clean")
563 (message "%s is now clean" buffer-file-name))) 563 (message "%s is now clean" buffer-file-name)))
564 (whitespace-update-modeline))) 564 (whitespace-update-modeline)))
565 (setq tab-width whitespace-tabwith-saved)))) 565 (setq tab-width whitespace-tabwidth-saved))))
566 566
567;;;###autoload 567;;;###autoload
568(defun whitespace-cleanup-region (s e) 568(defun whitespace-cleanup-region (s e)
diff --git a/lisp/obsolete/pgg.el b/lisp/obsolete/pgg.el
index 42030f7d502..876f3744bc2 100644
--- a/lisp/obsolete/pgg.el
+++ b/lisp/obsolete/pgg.el
@@ -174,7 +174,7 @@ is true, or else the output buffer is displayed."
174(defvar pgg-pending-timers (make-vector 7 0) 174(defvar pgg-pending-timers (make-vector 7 0)
175 "Hash table for managing scheduled pgg cache management timers. 175 "Hash table for managing scheduled pgg cache management timers.
176 176
177We associate key and timer, so the timer can be cancelled if a new 177We associate key and timer, so the timer can be canceled if a new
178timeout for the key is set while an old one is still pending.") 178timeout for the key is set while an old one is still pending.")
179 179
180(defun pgg-read-passphrase (prompt &optional key notruncate) 180(defun pgg-read-passphrase (prompt &optional key notruncate)
diff --git a/lisp/org/ChangeLog b/lisp/org/ChangeLog
index 1c8a3e72956..6f835c7bfa4 100644
--- a/lisp/org/ChangeLog
+++ b/lisp/org/ChangeLog
@@ -1,3 +1,8 @@
12011-12-06 Juanma Barranquero <lekktu@gmail.com>
2
3 * ob.el (org-babel-expand-body:generic, org-babel-number-p):
4 * ob-ref.el (org-babel-ref-parse): Fix typos.
5
12011-11-24 Juanma Barranquero <lekktu@gmail.com> 62011-11-24 Juanma Barranquero <lekktu@gmail.com>
2 7
3 * ob.el (org-babel-execute-src-block): Fix typo. 8 * ob.el (org-babel-execute-src-block): Fix typo.
@@ -278,7 +283,7 @@
278 283
279 * org-archive.el (org-archive-subtree): While it might be possible 284 * org-archive.el (org-archive-subtree): While it might be possible
280 to archive an headline of a temporary buffer (i.e. not visiting a 285 to archive an headline of a temporary buffer (i.e. not visiting a
281 file), it wouldn't be really sensical. 286 file), it wouldn't be really sensible.
282 287
2832011-07-28 Nicolas Goaziou <n.goaziou@gmail.com> 2882011-07-28 Nicolas Goaziou <n.goaziou@gmail.com>
284 289
@@ -4008,7 +4013,7 @@
4008 * org-list.el (org-list-blocks): New variable. 4013 * org-list.el (org-list-blocks): New variable.
4009 (org-list-context): New function. 4014 (org-list-context): New function.
4010 (org-list-full-item-re): New variable. 4015 (org-list-full-item-re): New variable.
4011 (org-list-struct-assoc-at-point): Use new varible. 4016 (org-list-struct-assoc-at-point): Use new variable.
4012 (org-list-struct): Rewrite of function. Now, list data is 4017 (org-list-struct): Rewrite of function. Now, list data is
4013 collected by looking at the list line after line. It reads the 4018 collected by looking at the list line after line. It reads the
4014 whole list each time because reading only a subtree was not enough 4019 whole list each time because reading only a subtree was not enough
@@ -7119,7 +7124,7 @@
71192010-11-11 Dan Davison <davison@stats.ox.ac.uk> 71242010-11-11 Dan Davison <davison@stats.ox.ac.uk>
7120 7125
7121 * ob.el (org-babel-get-src-block-info): Form info list correctly 7126 * ob.el (org-babel-get-src-block-info): Form info list correctly
7122 when parenthesised arguments are missing. 7127 when parenthesized arguments are missing.
7123 7128
71242010-11-11 Dan Davison <davison@stats.ox.ac.uk> 71292010-11-11 Dan Davison <davison@stats.ox.ac.uk>
7125 7130
@@ -8139,7 +8144,7 @@
81392010-11-11 Nicolas Goaziou <n.goaziou@gmail.com> 81442010-11-11 Nicolas Goaziou <n.goaziou@gmail.com>
8140 8145
8141 * org-list.el (org-insert-item-internal): New function to handle 8146 * org-list.el (org-insert-item-internal): New function to handle
8142 positionning and contents of an item being inserted at a specific 8147 positioning and contents of an item being inserted at a specific
8143 pos. It is not possible anymore to split a term in a description 8148 pos. It is not possible anymore to split a term in a description
8144 list or a checkbox when inserting a new item. 8149 list or a checkbox when inserting a new item.
8145 8150
@@ -9758,7 +9763,7 @@
9758 9763
97592010-07-19 Bastien Guerry <bzg@altern.org> 97642010-07-19 Bastien Guerry <bzg@altern.org>
9760 9765
9761 * org-timer.el (org-timer-set-timer): Fix bug about cancelling 9766 * org-timer.el (org-timer-set-timer): Fix bug about canceling
9762 timers. 9767 timers.
9763 9768
97642010-07-19 David Maus <dmaus@ictsoc.de> 97692010-07-19 David Maus <dmaus@ictsoc.de>
@@ -12582,7 +12587,7 @@
12582 buffer and at the position of the given clock. However, changes 12587 buffer and at the position of the given clock. However, changes
12583 to the current clock are local and have no effect on the user's 12588 to the current clock are local and have no effect on the user's
12584 active clock. This allows, for example, far any clock to be 12589 active clock. This allows, for example, far any clock to be
12585 cancelled without cancelling the active clock. 12590 canceled without canceling the active clock.
12586 (org-clock-clock-in): New inline function that switches the active 12591 (org-clock-clock-in): New inline function that switches the active
12587 clock to the given clock. If either the argument RESUME, or the 12592 clock to the given clock. If either the argument RESUME, or the
12588 global `org-clock-in-resume', are non-nil, it will resume a clock 12593 global `org-clock-in-resume', are non-nil, it will resume a clock
diff --git a/lisp/org/ob-ref.el b/lisp/org/ob-ref.el
index d0a2c14bee9..1e14021a364 100644
--- a/lisp/org/ob-ref.el
+++ b/lisp/org/ob-ref.el
@@ -69,7 +69,7 @@
69 "Parse a variable ASSIGNMENT in a header argument. 69 "Parse a variable ASSIGNMENT in a header argument.
70If the right hand side of the assignment has a literal value 70If the right hand side of the assignment has a literal value
71return that value, otherwise interpret as a reference to an 71return that value, otherwise interpret as a reference to an
72external resource and find it's value using 72external resource and find its value using
73`org-babel-ref-resolve'. Return a list with two elements. The 73`org-babel-ref-resolve'. Return a list with two elements. The
74first element of the list will be the name of the variable, and 74first element of the list will be the name of the variable, and
75the second will be an emacs-lisp representation of the value of 75the second will be an emacs-lisp representation of the value of
diff --git a/lisp/org/ob.el b/lisp/org/ob.el
index f34d1fbda9e..8bba4672169 100644
--- a/lisp/org/ob.el
+++ b/lisp/org/ob.el
@@ -464,7 +464,7 @@ block."
464 464
465(defun org-babel-expand-body:generic (body params &optional var-lines) 465(defun org-babel-expand-body:generic (body params &optional var-lines)
466 "Expand BODY with PARAMS. 466 "Expand BODY with PARAMS.
467Expand a block of code with org-babel according to it's header 467Expand a block of code with org-babel according to its header
468arguments. This generic implementation of body expansion is 468arguments. This generic implementation of body expansion is
469called for languages which have not defined their own specific 469called for languages which have not defined their own specific
470org-babel-expand-body:lang function." 470org-babel-expand-body:lang function."
@@ -2045,7 +2045,7 @@ appropriate."
2045 cell)) 2045 cell))
2046 2046
2047(defun org-babel-number-p (string) 2047(defun org-babel-number-p (string)
2048 "If STRING represents a number return it's value." 2048 "If STRING represents a number return its value."
2049 (if (and (string-match "^-?[0-9]*\\.?[0-9]*$" string) 2049 (if (and (string-match "^-?[0-9]*\\.?[0-9]*$" string)
2050 (= (length (substring string (match-beginning 0) 2050 (= (length (substring string (match-beginning 0)
2051 (match-end 0))) 2051 (match-end 0)))
diff --git a/lisp/org/org-agenda.el b/lisp/org/org-agenda.el
index 2f4617f5146..a54f3c4c3d3 100644
--- a/lisp/org/org-agenda.el
+++ b/lisp/org/org-agenda.el
@@ -8331,7 +8331,7 @@ tag and (if present) the flagging note."
8331 (org-agenda-remove-flag hdmarker) 8331 (org-agenda-remove-flag hdmarker)
8332 (let ((win (get-buffer-window "*Flagging Note*"))) 8332 (let ((win (get-buffer-window "*Flagging Note*")))
8333 (and win (delete-window win))) 8333 (and win (delete-window win)))
8334 (message "Entry unflaged")) 8334 (message "Entry unflagged"))
8335 (setq note (org-entry-get hdmarker "THEFLAGGINGNOTE")) 8335 (setq note (org-entry-get hdmarker "THEFLAGGINGNOTE"))
8336 (unless note 8336 (unless note
8337 (error "No flagging note")) 8337 (error "No flagging note"))
@@ -8354,7 +8354,7 @@ tag and (if present) the flagging note."
8354 (org-entry-delete nil "THEFLAGGINGNOTE") 8354 (org-entry-delete nil "THEFLAGGINGNOTE")
8355 (setq newhead (org-get-heading))) 8355 (setq newhead (org-get-heading)))
8356 (org-agenda-change-all-lines newhead marker) 8356 (org-agenda-change-all-lines newhead marker)
8357 (message "Entry unflaged"))) 8357 (message "Entry unflagged")))
8358 8358
8359(defun org-agenda-get-any-marker (&optional pos) 8359(defun org-agenda-get-any-marker (&optional pos)
8360 (or (get-text-property (or pos (point-at-bol)) 'org-hd-marker) 8360 (or (get-text-property (or pos (point-at-bol)) 'org-hd-marker)
diff --git a/lisp/org/org-clock.el b/lisp/org/org-clock.el
index 6d82d4529b6..09b646d40ba 100644
--- a/lisp/org/org-clock.el
+++ b/lisp/org/org-clock.el
@@ -328,7 +328,7 @@ to add an effort property.")
328 "Hook run when stopping the current clock.") 328 "Hook run when stopping the current clock.")
329 329
330(defvar org-clock-cancel-hook nil 330(defvar org-clock-cancel-hook nil
331 "Hook run when cancelling the current clock.") 331 "Hook run when canceling the current clock.")
332(defvar org-clock-goto-hook nil 332(defvar org-clock-goto-hook nil
333 "Hook run when selecting the currently clocked-in entry.") 333 "Hook run when selecting the currently clocked-in entry.")
334(defvar org-clock-has-been-used nil 334(defvar org-clock-has-been-used nil
@@ -346,7 +346,7 @@ to add an effort property.")
346(defvar org-clock-start-time "") 346(defvar org-clock-start-time "")
347 347
348(defvar org-clock-leftover-time nil 348(defvar org-clock-leftover-time nil
349 "If non-nil, user cancelled a clock; this is when leftover time started.") 349 "If non-nil, user canceled a clock; this is when leftover time started.")
350 350
351(defvar org-clock-effort "" 351(defvar org-clock-effort ""
352 "Effort estimate of the currently clocking task.") 352 "Effort estimate of the currently clocking task.")
diff --git a/lisp/org/org-list.el b/lisp/org/org-list.el
index a86c145a9ee..72fc71854e2 100644
--- a/lisp/org/org-list.el
+++ b/lisp/org/org-list.el
@@ -68,7 +68,7 @@
68 68
69;; Computing a list structure can be a costly operation on huge lists 69;; Computing a list structure can be a costly operation on huge lists
70;; (a few thousand lines long). Thus, code should follow the rule : 70;; (a few thousand lines long). Thus, code should follow the rule :
71;; "collect once, use many". As a corollary, it is usally a bad idea 71;; "collect once, use many". As a corollary, it is usually a bad idea
72;; to use directly an interactive function inside the code, as those, 72;; to use directly an interactive function inside the code, as those,
73;; being independent entities, read the whole list structure another 73;; being independent entities, read the whole list structure another
74;; time. 74;; time.
diff --git a/lisp/org/org-protocol.el b/lisp/org/org-protocol.el
index 655123cafa9..bbb93b07fc9 100644
--- a/lisp/org/org-protocol.el
+++ b/lisp/org/org-protocol.el
@@ -145,8 +145,8 @@
145(defgroup org-protocol nil 145(defgroup org-protocol nil
146 "Intercept calls from emacsclient to trigger custom actions. 146 "Intercept calls from emacsclient to trigger custom actions.
147 147
148This is done by advising `server-visit-files' to scann the list of filenames 148This is done by advising `server-visit-files' to scan the list of filenames
149for `org-protocol-the-protocol' and sub-procols defined in 149for `org-protocol-the-protocol' and sub-protocols defined in
150`org-protocol-protocol-alist' and `org-protocol-protocol-alist-default'." 150`org-protocol-protocol-alist' and `org-protocol-protocol-alist-default'."
151 :version "22.1" 151 :version "22.1"
152 :group 'convenience 152 :group 'convenience
@@ -546,8 +546,8 @@ as filename."
546 (when (string-match proto fname) 546 (when (string-match proto fname)
547 (let* ((func (plist-get (cdr prolist) :function)) 547 (let* ((func (plist-get (cdr prolist) :function))
548 (greedy (plist-get (cdr prolist) :greedy)) 548 (greedy (plist-get (cdr prolist) :greedy))
549 (splitted (split-string fname proto)) 549 (split (split-string fname proto))
550 (result (if greedy restoffiles (cadr splitted)))) 550 (result (if greedy restoffiles (cadr split))))
551 (when (plist-get (cdr prolist) :kill-client) 551 (when (plist-get (cdr prolist) :kill-client)
552 (message "Greedy org-protocol handler. Killing client.") 552 (message "Greedy org-protocol handler. Killing client.")
553 (server-edit)) 553 (server-edit))
diff --git a/lisp/org/org-publish.el b/lisp/org/org-publish.el
index 0c924cd9f07..7a0d7b56e22 100644
--- a/lisp/org/org-publish.el
+++ b/lisp/org/org-publish.el
@@ -278,12 +278,12 @@ in the sitemap."
278 :type 'string) 278 :type 'string)
279 279
280(defcustom org-publish-sitemap-file-entry-format "%t" 280(defcustom org-publish-sitemap-file-entry-format "%t"
281 "How a sitemap file entry is formated. 281 "How a sitemap file entry is formatted.
282You could use brackets to delimit on what part the link will be. 282You could use brackets to delimit on what part the link will be.
283 283
284%t is the title. 284%t is the title.
285%a is the author. 285%a is the author.
286%d is the date formated using `org-publish-sitemap-date-format'." 286%d is the date formatted using `org-publish-sitemap-date-format'."
287 :group 'org-publish 287 :group 'org-publish
288 :type 'string) 288 :type 'string)
289 289
@@ -715,7 +715,7 @@ If :auto-sitemap is set, publish the sitemap too.
715If :makeindex is set, also produce a file theindex.org." 715If :makeindex is set, also produce a file theindex.org."
716 (mapc 716 (mapc
717 (lambda (project) 717 (lambda (project)
718 ;; Each project uses it's own cache file: 718 ;; Each project uses its own cache file:
719 (org-publish-initialize-cache (car project)) 719 (org-publish-initialize-cache (car project))
720 (let* 720 (let*
721 ((project-plist (cdr project)) 721 ((project-plist (cdr project))
diff --git a/lisp/org/org-taskjuggler.el b/lisp/org/org-taskjuggler.el
index 1fb3114bf3f..45b16aecf12 100644
--- a/lisp/org/org-taskjuggler.el
+++ b/lisp/org/org-taskjuggler.el
@@ -571,7 +571,7 @@ with separator \"\n\"."
571 (and filtered-items (mapconcat 'identity filtered-items "\n")))) 571 (and filtered-items (mapconcat 'identity filtered-items "\n"))))
572 572
573(defun org-taskjuggler-get-attributes (item attributes) 573(defun org-taskjuggler-get-attributes (item attributes)
574 "Return all attribute as a single formated string. ITEM is an 574 "Return all attributes as a single formatted string. ITEM is an
575alist representing either a resource or a task. ATTRIBUTES is a 575alist representing either a resource or a task. ATTRIBUTES is a
576list of symbols. Only entries from ITEM are considered that are 576list of symbols. Only entries from ITEM are considered that are
577listed in ATTRIBUTES." 577listed in ATTRIBUTES."
diff --git a/lisp/org/org.el b/lisp/org/org.el
index afd4ea6b4c3..8aca74e69cc 100644
--- a/lisp/org/org.el
+++ b/lisp/org/org.el
@@ -2580,7 +2580,7 @@ To turn this on on a per-file basis, insert anywhere in the file:
2580(defcustom org-time-stamp-custom-formats 2580(defcustom org-time-stamp-custom-formats
2581 '("<%m/%d/%y %a>" . "<%m/%d/%y %a %H:%M>") ; american 2581 '("<%m/%d/%y %a>" . "<%m/%d/%y %a %H:%M>") ; american
2582 "Custom formats for time stamps. See `format-time-string' for the syntax. 2582 "Custom formats for time stamps. See `format-time-string' for the syntax.
2583These are overlayed over the default ISO format if the variable 2583These are overlaid over the default ISO format if the variable
2584`org-display-custom-times' is set. Time like %H:%M should be at the 2584`org-display-custom-times' is set. Time like %H:%M should be at the
2585end of the second format. The custom formats are also honored by export 2585end of the second format. The custom formats are also honored by export
2586commands, if custom time display is turned on at the time of export." 2586commands, if custom time display is turned on at the time of export."
@@ -15109,7 +15109,7 @@ The command returns the inserted time stamp."
15109 (org-restart-font-lock) 15109 (org-restart-font-lock)
15110 (setq org-table-may-need-update t) 15110 (setq org-table-may-need-update t)
15111 (if org-display-custom-times 15111 (if org-display-custom-times
15112 (message "Time stamps are overlayed with custom format") 15112 (message "Time stamps are overlaid with custom format")
15113 (message "Time stamp overlays removed"))) 15113 (message "Time stamp overlays removed")))
15114 15114
15115(defun org-display-custom-time (beg end) 15115(defun org-display-custom-time (beg end)
@@ -18961,7 +18961,7 @@ contexts are:
18961:target on a <<target>> 18961:target on a <<target>>
18962:radio-target on a <<<radio-target>>> 18962:radio-target on a <<<radio-target>>>
18963:latex-fragment on a LaTeX fragment 18963:latex-fragment on a LaTeX fragment
18964:latex-preview on a LaTeX fragment with overlayed preview image 18964:latex-preview on a LaTeX fragment with overlaid preview image
18965 18965
18966This function expects the position to be visible because it uses font-lock 18966This function expects the position to be visible because it uses font-lock
18967faces as a help to recognize the following contexts: :table-special, :link, 18967faces as a help to recognize the following contexts: :table-special, :link,
diff --git a/lisp/pcmpl-gnu.el b/lisp/pcmpl-gnu.el
index 608a9dc2e88..3b2a944f5bb 100644
--- a/lisp/pcmpl-gnu.el
+++ b/lisp/pcmpl-gnu.el
@@ -35,7 +35,7 @@
35;; User Variables: 35;; User Variables:
36 36
37(defcustom pcmpl-gnu-makefile-regexps 37(defcustom pcmpl-gnu-makefile-regexps
38 '("\\`GNUmakefile" "\\`Makefile" "\\.mak\\'") 38 '("\\`GNUmakefile" "\\`[Mm]akefile" "\\.ma?k\\'")
39 "A list of regexps that will match Makefile names." 39 "A list of regexps that will match Makefile names."
40 :type '(repeat regexp) 40 :type '(repeat regexp)
41 :group 'pcmpl-gnu) 41 :group 'pcmpl-gnu)
@@ -99,7 +99,10 @@
99 "Completion for GNU `make'." 99 "Completion for GNU `make'."
100 (let ((pcomplete-help "(make)Top")) 100 (let ((pcomplete-help "(make)Top"))
101 (pcomplete-opt "bmC/def(pcmpl-gnu-makefile-names)hiI/j?kl?no.pqrsStvwW.") 101 (pcomplete-opt "bmC/def(pcmpl-gnu-makefile-names)hiI/j?kl?no.pqrsStvwW.")
102 (while (pcomplete-here (pcmpl-gnu-make-rule-names) nil 'identity)))) 102 (while (pcomplete-here (completion-table-in-turn
103 (pcmpl-gnu-make-rule-names)
104 (pcomplete-entries))
105 nil 'identity))))
103 106
104(defun pcmpl-gnu-makefile-names () 107(defun pcmpl-gnu-makefile-names ()
105 "Return a list of possible makefile names." 108 "Return a list of possible makefile names."
@@ -109,14 +112,16 @@
109 "Return a list of possible make rule names in MAKEFILE." 112 "Return a list of possible make rule names in MAKEFILE."
110 (let* ((minus-f (member "-f" pcomplete-args)) 113 (let* ((minus-f (member "-f" pcomplete-args))
111 (makefile (or (cadr minus-f) 114 (makefile (or (cadr minus-f)
112 (if (file-exists-p "GNUmakefile") 115 (cond
113 "GNUmakefile" 116 ((file-exists-p "GNUmakefile") "GNUmakefile")
114 "Makefile"))) 117 ((file-exists-p "makefile") "makefile")
118 (t "Makefile"))))
115 rules) 119 rules)
116 (if (not (file-readable-p makefile)) 120 (if (not (file-readable-p makefile))
117 (unless minus-f (list "-f")) 121 (unless minus-f (list "-f"))
118 (with-temp-buffer 122 (with-temp-buffer
119 (insert-file-contents-literally makefile) 123 (ignore-errors ;Could be a directory or something.
124 (insert-file-contents makefile))
120 (while (re-search-forward 125 (while (re-search-forward
121 (concat "^\\s-*\\([^\n#%.$][^:=\n]*\\)\\s-*:[^=]") nil t) 126 (concat "^\\s-*\\([^\n#%.$][^:=\n]*\\)\\s-*:[^=]") nil t)
122 (setq rules (append (split-string (match-string 1)) rules)))) 127 (setq rules (append (split-string (match-string 1)) rules))))
diff --git a/lisp/play/gametree.el b/lisp/play/gametree.el
index 4d514d2d0aa..e7ed146b4a1 100644
--- a/lisp/play/gametree.el
+++ b/lisp/play/gametree.el
@@ -549,7 +549,7 @@ Argument is a character, naming the register."
549(defun gametree-save-and-hack-layout () 549(defun gametree-save-and-hack-layout ()
550 "Save the current tree layout and hack the file local variable spec. 550 "Save the current tree layout and hack the file local variable spec.
551This function saves the current layout in `gametree-local-layout' and, 551This function saves the current layout in `gametree-local-layout' and,
552if a local file varible specification for this variable exists in the 552if a local file variable specification for this variable exists in the
553buffer, it is replaced by the new value. See the documentation for 553buffer, it is replaced by the new value. See the documentation for
554`gametree-local-layout' for more information." 554`gametree-local-layout' for more information."
555 (interactive) 555 (interactive)
diff --git a/lisp/printing.el b/lisp/printing.el
index 2dea24149a7..a604b9f1027 100644
--- a/lisp/printing.el
+++ b/lisp/printing.el
@@ -2536,7 +2536,7 @@ LPR-PRINT It's a symbol function for text printing. It's invoked with
2536 nil, it's used (point-max). 2536 nil, it's used (point-max).
2537 2537
2538PS-PRINT It's a symbol function for PostScript printing. It's invoked 2538PS-PRINT It's a symbol function for PostScript printing. It's invoked
2539 with 3 arguments: n-up printing, file name and the list: 2539 with three arguments: n-up printing, file name and the list:
2540 (HEADER-LINES LEFT-HEADER RIGHT-HEADER DEFAULT...). 2540 (HEADER-LINES LEFT-HEADER RIGHT-HEADER DEFAULT...).
2541 2541
2542 Usually PS-PRINT function prepares the environment or buffer 2542 Usually PS-PRINT function prepares the environment or buffer
@@ -4710,12 +4710,12 @@ Interactively, you have the following situations:
4710 4710
4711 M-x pr-ps-fast-fire RET 4711 M-x pr-ps-fast-fire RET
4712 The command prompts the user for a N-UP value and printing will 4712 The command prompts the user for a N-UP value and printing will
4713 immediatelly be done using the current active printer. 4713 immediately be done using the current active printer.
4714 4714
4715 C-u M-x pr-ps-fast-fire RET 4715 C-u M-x pr-ps-fast-fire RET
4716 C-u 0 M-x pr-ps-fast-fire RET 4716 C-u 0 M-x pr-ps-fast-fire RET
4717 The command prompts the user for a N-UP value and also for a current 4717 The command prompts the user for a N-UP value and also for a current
4718 PostScript printer, then printing will immediatelly be done using the new 4718 PostScript printer, then printing will immediately be done using the new
4719 current active printer. 4719 current active printer.
4720 4720
4721 C-u 1 M-x pr-ps-fast-fire RET 4721 C-u 1 M-x pr-ps-fast-fire RET
@@ -4736,7 +4736,7 @@ zero and the argument SELECT is treated as follows:
4736 If it's nil, send the image to the printer. 4736 If it's nil, send the image to the printer.
4737 4737
4738 If it's a list or an integer lesser or equal to zero, the command prompts 4738 If it's a list or an integer lesser or equal to zero, the command prompts
4739 the user for a current PostScript printer, then printing will immediatelly 4739 the user for a current PostScript printer, then printing will immediately
4740 be done using the new current active printer. 4740 be done using the new current active printer.
4741 4741
4742 If it's an integer equal to 1, the command prompts the user for a file name 4742 If it's an integer equal to 1, the command prompts the user for a file name
@@ -4749,7 +4749,7 @@ zero and the argument SELECT is treated as follows:
4749 instead of sending it to the printer. 4749 instead of sending it to the printer.
4750 4750
4751 If it's a symbol which it's defined in `pr-ps-printer-alist', it's the new 4751 If it's a symbol which it's defined in `pr-ps-printer-alist', it's the new
4752 active printer and printing will immediatelly be done using the new active 4752 active printer and printing will immediately be done using the new active
4753 printer. 4753 printer.
4754 4754
4755 Otherwise, send the image to the printer. 4755 Otherwise, send the image to the printer.
@@ -4800,7 +4800,7 @@ Noninteractively, the argument SELECT-PRINTER is treated as follows:
4800 If it's nil, the printing is sent to the current active text printer. 4800 If it's nil, the printing is sent to the current active text printer.
4801 4801
4802 If it's a symbol which it's defined in `pr-txt-printer-alist', it's the new 4802 If it's a symbol which it's defined in `pr-txt-printer-alist', it's the new
4803 active printer and printing will immediatelly be done using the new active 4803 active printer and printing will immediately be done using the new active
4804 printer. 4804 printer.
4805 4805
4806 If it's non-nil, the command prompts the user for a new active text printer. 4806 If it's non-nil, the command prompts the user for a new active text printer.
diff --git a/lisp/proced.el b/lisp/proced.el
index e4987bd926c..baee7c0f6ee 100644
--- a/lisp/proced.el
+++ b/lisp/proced.el
@@ -1332,7 +1332,7 @@ Prefix ARG controls sort order, see `proced-sort-interactive'."
1332 (proced-sort-interactive key arg) 1332 (proced-sort-interactive key arg)
1333 (message "No sorter defined here.")))))) 1333 (message "No sorter defined here."))))))
1334 1334
1335;;; Formating 1335;;; Formatting
1336 1336
1337(defun proced-format-time (time) 1337(defun proced-format-time (time)
1338 "Format time interval TIME." 1338 "Format time interval TIME."
diff --git a/lisp/progmodes/ada-mode.el b/lisp/progmodes/ada-mode.el
index 64734420a8c..17ff4bd32a6 100644
--- a/lisp/progmodes/ada-mode.el
+++ b/lisp/progmodes/ada-mode.el
@@ -499,7 +499,7 @@ Used to define `ada-*-keywords.'"))
499 499
500(defvar ada-case-exception-substring '() 500(defvar ada-case-exception-substring '()
501 "Alist of substrings (entities) that have special casing. 501 "Alist of substrings (entities) that have special casing.
502The substrings are detected for word constituant when the word 502The substrings are detected for word constituent when the word
503is not itself in `ada-case-exception', and only for substrings that 503is not itself in `ada-case-exception', and only for substrings that
504either are at the beginning or end of the word, or start after '_'.") 504either are at the beginning or end of the word, or start after '_'.")
505 505
@@ -1773,7 +1773,7 @@ ATTENTION: This function might take very long for big buffers!"
1773;; `ada-insert-paramlist'. 1773;; `ada-insert-paramlist'.
1774;; Both steps are called from `ada-format-paramlist'. 1774;; Both steps are called from `ada-format-paramlist'.
1775;; Note: Comments inside the parameter list are lost. 1775;; Note: Comments inside the parameter list are lost.
1776;; The syntax has to be correct, or the reformating will fail. 1776;; The syntax has to be correct, or the reformatting will fail.
1777;;-------------------------------------------------------------- 1777;;--------------------------------------------------------------
1778 1778
1779(defun ada-format-paramlist () 1779(defun ada-format-paramlist ()
@@ -2139,7 +2139,7 @@ command like:
2139 2139
2140 (while command-line-args-left 2140 (while command-line-args-left
2141 (let ((source (car command-line-args-left))) 2141 (let ((source (car command-line-args-left)))
2142 (message "Formating %s" source) 2142 (message "Formatting %s" source)
2143 (find-file source) 2143 (find-file source)
2144 (ada-indent-region (point-min) (point-max)) 2144 (ada-indent-region (point-min) (point-max))
2145 (ada-adjust-case-buffer) 2145 (ada-adjust-case-buffer)
diff --git a/lisp/progmodes/ada-stmt.el b/lisp/progmodes/ada-stmt.el
index e48055c9f50..b33da441eeb 100644
--- a/lisp/progmodes/ada-stmt.el
+++ b/lisp/progmodes/ada-stmt.el
@@ -56,7 +56,7 @@
56;; BUGS: 56;; BUGS:
57;;;> I have the following suggestions for the function template: 1) I 57;;;> I have the following suggestions for the function template: 1) I
58;;;> don't want it automatically assigning it a name for the return variable. I 58;;;> don't want it automatically assigning it a name for the return variable. I
59;;;> never want it to be called "Result" because that is nondescriptive. If you 59;;;> never want it to be called "Result" because that is nondescript. If you
60;;;> must define a variable, give me the ability to specify its name. 60;;;> must define a variable, give me the ability to specify its name.
61;;;> 61;;;>
62;;;> 2) You do not provide a type for variable 'Result'. Its type is the same 62;;;> 2) You do not provide a type for variable 'Result'. Its type is the same
diff --git a/lisp/progmodes/ada-xref.el b/lisp/progmodes/ada-xref.el
index 2f6a7be393a..f30457992a3 100644
--- a/lisp/progmodes/ada-xref.el
+++ b/lisp/progmodes/ada-xref.el
@@ -30,7 +30,7 @@
30;;; for lookup and completion in Ada mode. 30;;; for lookup and completion in Ada mode.
31;;; 31;;;
32;;; If a file *.`adp' exists in the ada-file directory, then it is 32;;; If a file *.`adp' exists in the ada-file directory, then it is
33;;; read for configuration informations. It is read only the first 33;;; read for configuration information. It is read only the first
34;;; time a cross-reference is asked for, and is not read later. 34;;; time a cross-reference is asked for, and is not read later.
35 35
36;;; You need Emacs >= 20.2 to run this package 36;;; You need Emacs >= 20.2 to run this package
diff --git a/lisp/progmodes/cc-awk.el b/lisp/progmodes/cc-awk.el
index 8213a83461b..ef67a18d807 100644
--- a/lisp/progmodes/cc-awk.el
+++ b/lisp/progmodes/cc-awk.el
@@ -545,7 +545,7 @@
545(defun c-awk-vsemi-status-unknown-p () 545(defun c-awk-vsemi-status-unknown-p ()
546 ;; Are we unsure whether there is a virtual semicolon on the current line? 546 ;; Are we unsure whether there is a virtual semicolon on the current line?
547 ;; DO NOT under any circumstances attempt to calculate this; that would 547 ;; DO NOT under any circumstances attempt to calculate this; that would
548 ;; defeat the (admittedly kludgey) purpose of this function, which is to 548 ;; defeat the (admittedly kludgy) purpose of this function, which is to
549 ;; prevent an infinite recursion in c-beginning-of-statement-1 when point 549 ;; prevent an infinite recursion in c-beginning-of-statement-1 when point
550 ;; starts at a `while' token. 550 ;; starts at a `while' token.
551 (not (c-get-char-property (c-point 'eol) 'c-awk-NL-prop))) 551 (not (c-get-char-property (c-point 'eol) 'c-awk-NL-prop)))
@@ -894,9 +894,9 @@ std\\(err\\|in\\|out\\)\\|user\\)\\)\\>\
894 ;; Keywords. 894 ;; Keywords.
895 (concat "\\<" 895 (concat "\\<"
896 (regexp-opt 896 (regexp-opt
897 '("BEGIN" "END" "break" "continue" "delete" "do" "else" 897 '("BEGIN" "END" "break" "case" "continue" "default" "delete"
898 "exit" "for" "getline" "if" "in" "next" "nextfile" 898 "do" "else" "exit" "for" "getline" "if" "in" "next"
899 "return" "while") 899 "nextfile" "return" "switch" "while")
900 t) "\\>") 900 t) "\\>")
901 901
902 ;; Builtins. 902 ;; Builtins.
diff --git a/lisp/progmodes/cc-cmds.el b/lisp/progmodes/cc-cmds.el
index 8e4ac92d96f..686695bc838 100644
--- a/lisp/progmodes/cc-cmds.el
+++ b/lisp/progmodes/cc-cmds.el
@@ -1360,7 +1360,7 @@ No indentation or other \"electric\" behavior is performed."
1360 ;; Determine where we are with respect to functions (or other brace 1360 ;; Determine where we are with respect to functions (or other brace
1361 ;; constructs, included in the term "function" in the rest of this comment). 1361 ;; constructs, included in the term "function" in the rest of this comment).
1362 ;; Point is assumed to be outside any macro or literal. 1362 ;; Point is assumed to be outside any macro or literal.
1363 ;; This is used by c-\(begining\|end\)-of-defun. 1363 ;; This is used by c-\(beginning\|end\)-of-defun.
1364 ;; 1364 ;;
1365 ;; Return one of these symbols: 1365 ;; Return one of these symbols:
1366 ;; at-header : we're at the start of a function's header. 1366 ;; at-header : we're at the start of a function's header.
@@ -2051,7 +2051,7 @@ function does not require the declaration to contain a brace block."
2051 (c-narrow-to-comment-innards range) ; This may move point back. 2051 (c-narrow-to-comment-innards range) ; This may move point back.
2052 (let* ((here (point)) 2052 (let* ((here (point))
2053 last 2053 last
2054 (here-filler ; matches WS and comment-prefices at point. 2054 (here-filler ; matches WS and comment-prefixes at point.
2055 (concat "\\=\\(^[ \t]*\\(" c-current-comment-prefix "\\)" 2055 (concat "\\=\\(^[ \t]*\\(" c-current-comment-prefix "\\)"
2056 "\\|[ \t\n\r\f]\\)*")) 2056 "\\|[ \t\n\r\f]\\)*"))
2057 (prefix-at-bol-here ; matches WS and prefix at BOL, just before point 2057 (prefix-at-bol-here ; matches WS and prefix at BOL, just before point
@@ -2071,7 +2071,7 @@ function does not require the declaration to contain a brace block."
2071 2071
2072 ;; Now seek successively earlier sentence ends between PAR-BEG and 2072 ;; Now seek successively earlier sentence ends between PAR-BEG and
2073 ;; HERE, until the "start of sentence" following it is earlier than 2073 ;; HERE, until the "start of sentence" following it is earlier than
2074 ;; HERE, or we hit PAR-BEG. Beware of comment prefices! 2074 ;; HERE, or we hit PAR-BEG. Beware of comment prefixes!
2075 (while (and (re-search-backward (c-sentence-end) par-beg 'limit) 2075 (while (and (re-search-backward (c-sentence-end) par-beg 'limit)
2076 (setq last (point)) 2076 (setq last (point))
2077 (goto-char (match-end 0)) ; tentative beginning of sentence 2077 (goto-char (match-end 0)) ; tentative beginning of sentence
diff --git a/lisp/progmodes/cc-defs.el b/lisp/progmodes/cc-defs.el
index c91fe13543a..2991b511830 100644
--- a/lisp/progmodes/cc-defs.el
+++ b/lisp/progmodes/cc-defs.el
@@ -473,7 +473,7 @@ various buffer change hooks."
473 473
474 (let ((saved-undo-list (elt saved-state 0))) 474 (let ((saved-undo-list (elt saved-state 0)))
475 (if (eq buffer-undo-list saved-undo-list) 475 (if (eq buffer-undo-list saved-undo-list)
476 ;; No change was done afterall. 476 ;; No change was done after all.
477 (setq buffer-undo-list (cdr saved-undo-list)) 477 (setq buffer-undo-list (cdr saved-undo-list))
478 478
479 (if keep 479 (if keep
diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el
index 9544c4f8728..0865ddfed69 100644
--- a/lisp/progmodes/cc-engine.el
+++ b/lisp/progmodes/cc-engine.el
@@ -195,9 +195,6 @@
195 (not prevstate) 195 (not prevstate)
196 (> arg 0))) 196 (> arg 0)))
197 197
198;; Dynamically bound cache for `c-in-literal'.
199(defvar c-in-literal-cache t)
200
201 198
202;; Basic handling of preprocessor directives. 199;; Basic handling of preprocessor directives.
203 200
@@ -2093,28 +2090,35 @@ comment at the start of cc-engine.el for more info."
2093;; `c-state-literal-at'. 2090;; `c-state-literal-at'.
2094 2091
2095(defsubst c-state-pp-to-literal (from to) 2092(defsubst c-state-pp-to-literal (from to)
2096 ;; Do a parse-partial-sexp from FROM to TO, returning the bounds of any 2093 ;; Do a parse-partial-sexp from FROM to TO, returning either
2097 ;; literal at TO as a cons, otherwise NIL. 2094 ;; (STATE TYPE (BEG . END)) if TO is in a literal; or
2098 ;; FROM must not be in a literal, and the buffer should already be wide 2095 ;; (STATE) otherwise,
2099 ;; enough. 2096 ;; where STATE is the parsing state at TO, TYPE is the type of the literal
2097 ;; (one of 'c, 'c++, 'string) and (BEG . END) is the boundaries of the literal.
2098 ;;
2099 ;; Only elements 3 (in a string), 4 (in a comment), 5 (following a quote),
2100 ;; 7 (comment type) and 8 (start of comment/string) (and possibly 9) of
2101 ;; STATE are valid.
2100 (save-excursion 2102 (save-excursion
2101 (let ((s (parse-partial-sexp from to))) 2103 (let ((s (parse-partial-sexp from to))
2104 ty)
2102 (when (or (nth 3 s) (nth 4 s)) ; in a string or comment 2105 (when (or (nth 3 s) (nth 4 s)) ; in a string or comment
2106 (setq ty (cond
2107 ((nth 3 s) 'string)
2108 ((eq (nth 7 s) t) 'c++)
2109 (t 'c)))
2103 (parse-partial-sexp (point) (point-max) 2110 (parse-partial-sexp (point) (point-max)
2104 nil ; TARGETDEPTH 2111 nil ; TARGETDEPTH
2105 nil ; STOPBEFORE 2112 nil ; STOPBEFORE
2106 s ; OLDSTATE 2113 s ; OLDSTATE
2107 'syntax-table) ; stop at end of literal 2114 'syntax-table)) ; stop at end of literal
2108 (cons (nth 8 s) (point)))))) 2115 (if ty
2116 `(,s ,ty (,(nth 8 s) . ,(point)))
2117 `(,s)))))
2109 2118
2110(defun c-state-literal-at (here) 2119(defun c-state-safe-place (here)
2111 ;; If position HERE is inside a literal, return (START . END), the 2120 ;; Return a buffer position before HERE which is "safe", i.e. outside any
2112 ;; boundaries of the literal (which may be outside the accessible bit of the 2121 ;; string, comment, or macro.
2113 ;; buffer). Otherwise, return nil.
2114 ;;
2115 ;; This function is almost the same as `c-literal-limits'. It differs in
2116 ;; that it is a lower level function, and that it rigourously follows the
2117 ;; syntax from BOB, whereas `c-literal-limits' uses a "local" safe position.
2118 ;; 2122 ;;
2119 ;; NOTE: This function manipulates `c-state-nonlit-pos-cache'. This cache 2123 ;; NOTE: This function manipulates `c-state-nonlit-pos-cache'. This cache
2120 ;; MAY NOT contain any positions within macros, since macros are frequently 2124 ;; MAY NOT contain any positions within macros, since macros are frequently
@@ -2137,7 +2141,7 @@ comment at the start of cc-engine.el for more info."
2137 2141
2138 (while (<= (setq npos (+ pos c-state-nonlit-pos-interval)) 2142 (while (<= (setq npos (+ pos c-state-nonlit-pos-interval))
2139 here) 2143 here)
2140 (setq lit (c-state-pp-to-literal pos npos)) 2144 (setq lit (car (cddr (c-state-pp-to-literal pos npos))))
2141 (setq pos (or (cdr lit) npos)) ; end of literal containing npos. 2145 (setq pos (or (cdr lit) npos)) ; end of literal containing npos.
2142 (goto-char pos) 2146 (goto-char pos)
2143 (when (and (c-beginning-of-macro) (/= (point) pos)) 2147 (when (and (c-beginning-of-macro) (/= (point) pos))
@@ -2148,9 +2152,22 @@ comment at the start of cc-engine.el for more info."
2148 2152
2149 (if (> pos c-state-nonlit-pos-cache-limit) 2153 (if (> pos c-state-nonlit-pos-cache-limit)
2150 (setq c-state-nonlit-pos-cache-limit pos)) 2154 (setq c-state-nonlit-pos-cache-limit pos))
2151 (if (< pos here) 2155 pos))))
2152 (setq lit (c-state-pp-to-literal pos here))) 2156
2153 lit)))) 2157(defun c-state-literal-at (here)
2158 ;; If position HERE is inside a literal, return (START . END), the
2159 ;; boundaries of the literal (which may be outside the accessible bit of the
2160 ;; buffer). Otherwise, return nil.
2161 ;;
2162 ;; This function is almost the same as `c-literal-limits'. Previously, it
2163 ;; differed in that it was a lower level function, and that it rigourously
2164 ;; followed the syntax from BOB. `c-literal-limits' is now (2011-12)
2165 ;; virtually identical to this function.
2166 (save-restriction
2167 (widen)
2168 (save-excursion
2169 (let ((pos (c-state-safe-place here)))
2170 (car (cddr (c-state-pp-to-literal pos here)))))))
2154 2171
2155(defsubst c-state-lit-beg (pos) 2172(defsubst c-state-lit-beg (pos)
2156 ;; Return the start of the literal containing POS, or POS itself. 2173 ;; Return the start of the literal containing POS, or POS itself.
@@ -4181,7 +4198,7 @@ comment at the start of cc-engine.el for more info."
4181 4198
4182;; Tools for handling comments and string literals. 4199;; Tools for handling comments and string literals.
4183 4200
4184(defun c-slow-in-literal (&optional lim detect-cpp) 4201(defun c-in-literal (&optional lim detect-cpp)
4185 "Return the type of literal point is in, if any. 4202 "Return the type of literal point is in, if any.
4186The return value is `c' if in a C-style comment, `c++' if in a C++ 4203The return value is `c' if in a C-style comment, `c++' if in a C++
4187style comment, `string' if in a string literal, `pound' if DETECT-CPP 4204style comment, `string' if in a string literal, `pound' if DETECT-CPP
@@ -4194,67 +4211,12 @@ The last point calculated is cached if the cache is enabled, i.e. if
4194 4211
4195Note that this function might do hidden buffer changes. See the 4212Note that this function might do hidden buffer changes. See the
4196comment at the start of cc-engine.el for more info." 4213comment at the start of cc-engine.el for more info."
4197 4214 (let* ((safe-place (c-state-safe-place (point)))
4198 (if (and (vectorp c-in-literal-cache) 4215 (lit (c-state-pp-to-literal safe-place (point))))
4199 (= (point) (aref c-in-literal-cache 0))) 4216 (or (cadr lit)
4200 (aref c-in-literal-cache 1) 4217 (and detect-cpp
4201 (let ((rtn (save-excursion 4218 (save-excursion (c-beginning-of-macro))
4202 (let* ((pos (point)) 4219 'pound))))
4203 (lim (or lim (progn
4204 (c-beginning-of-syntax)
4205 (point))))
4206 (state (parse-partial-sexp lim pos)))
4207 (cond
4208 ((elt state 3) 'string)
4209 ((elt state 4) (if (elt state 7) 'c++ 'c))
4210 ((and detect-cpp (c-beginning-of-macro lim)) 'pound)
4211 (t nil))))))
4212 ;; cache this result if the cache is enabled
4213 (if (not c-in-literal-cache)
4214 (setq c-in-literal-cache (vector (point) rtn)))
4215 rtn)))
4216
4217;; XEmacs has a built-in function that should make this much quicker.
4218;; I don't think we even need the cache, which makes our lives more
4219;; complicated anyway. In this case, lim is only used to detect
4220;; cpp directives.
4221;;
4222;; Note that there is a bug in XEmacs's buffer-syntactic-context when used in
4223;; conjunction with syntax-table-properties. The bug is present in, e.g.,
4224;; XEmacs 21.4.4. It manifested itself thus:
4225;;
4226;; Starting with an empty AWK Mode buffer, type
4227;; /regexp/ {<C-j>
4228;; Point gets wrongly left at column 0, rather than being indented to tab-width.
4229;;
4230;; AWK Mode is designed such that when the first / is typed, it gets the
4231;; syntax-table property "string fence". When the second / is typed, BOTH /s
4232;; are given the s-t property "string". However, buffer-syntactic-context
4233;; fails to take account of the change of the s-t property on the opening / to
4234;; "string", and reports that the { is within a string started by the second /.
4235;;
4236;; The workaround for this is for the AWK Mode initialization to switch the
4237;; defalias for c-in-literal to c-slow-in-literal. This will slow down other
4238;; cc-modes in XEmacs whenever an awk-buffer has been initialized.
4239;;
4240;; (Alan Mackenzie, 2003/4/30).
4241
4242(defun c-fast-in-literal (&optional lim detect-cpp)
4243 ;; This function might do hidden buffer changes.
4244 (let ((context (buffer-syntactic-context)))
4245 (cond
4246 ((eq context 'string) 'string)
4247 ((eq context 'comment) 'c++)
4248 ((eq context 'block-comment) 'c)
4249 ((and detect-cpp (save-excursion (c-beginning-of-macro lim))) 'pound))))
4250
4251(defalias 'c-in-literal
4252 (if (fboundp 'buffer-syntactic-context)
4253 'c-fast-in-literal ; XEmacs
4254 'c-slow-in-literal)) ; GNU Emacs
4255
4256;; The defalias above isn't enough to shut up the byte compiler.
4257(cc-bytecomp-defun c-in-literal)
4258 4220
4259(defun c-literal-limits (&optional lim near not-in-delimiter) 4221(defun c-literal-limits (&optional lim near not-in-delimiter)
4260 "Return a cons of the beginning and end positions of the comment or 4222 "Return a cons of the beginning and end positions of the comment or
@@ -4273,64 +4235,56 @@ comment at the start of cc-engine.el for more info."
4273 4235
4274 (save-excursion 4236 (save-excursion
4275 (let* ((pos (point)) 4237 (let* ((pos (point))
4276 (lim (or lim (progn 4238 (lim (or lim (c-state-safe-place pos)))
4277 (c-beginning-of-syntax) 4239 (pp-to-lit (c-state-pp-to-literal lim pos))
4278 (point)))) 4240 (state (car pp-to-lit))
4279 (state (parse-partial-sexp lim pos))) 4241 (lit-type (cadr pp-to-lit))
4280 4242 (lit-limits (car (cddr pp-to-lit))))
4281 (cond ((elt state 3) ; String.
4282 (goto-char (elt state 8))
4283 (cons (point) (or (c-safe (c-forward-sexp 1) (point))
4284 (point-max))))
4285
4286 ((elt state 4) ; Comment.
4287 (goto-char (elt state 8))
4288 (cons (point) (progn (c-forward-single-comment) (point))))
4289
4290 ((and (not not-in-delimiter)
4291 (not (elt state 5))
4292 (eq (char-before) ?/)
4293 (looking-at "[/*]"))
4294 ;; We're standing in a comment starter.
4295 (backward-char 1)
4296 (cons (point) (progn (c-forward-single-comment) (point))))
4297
4298 (near
4299 (goto-char pos)
4300
4301 ;; Search forward for a literal.
4302 (skip-chars-forward " \t")
4303 4243
4304 (cond 4244 (cond
4305 ((looking-at c-string-limit-regexp) ; String. 4245 (lit-limits)
4306 (cons (point) (or (c-safe (c-forward-sexp 1) (point)) 4246 ((and (not not-in-delimiter)
4307 (point-max)))) 4247 (not (elt state 5))
4248 (eq (char-before) ?/)
4249 (looking-at "[/*]")) ; FIXME!!! use c-line/block-comment-starter. 2008-09-28.
4250 ;; We're standing in a comment starter.
4251 (backward-char 1)
4252 (cons (point) (progn (c-forward-single-comment) (point))))
4253
4254 (near
4255 (goto-char pos)
4256 ;; Search forward for a literal.
4257 (skip-chars-forward " \t")
4258 (cond
4259 ((looking-at c-string-limit-regexp) ; String.
4260 (cons (point) (or (c-safe (c-forward-sexp 1) (point))
4261 (point-max))))
4308 4262
4309 ((looking-at c-comment-start-regexp) ; Line or block comment. 4263 ((looking-at c-comment-start-regexp) ; Line or block comment.
4310 (cons (point) (progn (c-forward-single-comment) (point)))) 4264 (cons (point) (progn (c-forward-single-comment) (point))))
4311 4265
4312 (t 4266 (t
4313 ;; Search backward. 4267 ;; Search backward.
4314 (skip-chars-backward " \t") 4268 (skip-chars-backward " \t")
4315 4269
4316 (let ((end (point)) beg) 4270 (let ((end (point)) beg)
4317 (cond 4271 (cond
4318 ((save-excursion 4272 ((save-excursion
4319 (< (skip-syntax-backward c-string-syntax) 0)) ; String. 4273 (< (skip-syntax-backward c-string-syntax) 0)) ; String.
4320 (setq beg (c-safe (c-backward-sexp 1) (point)))) 4274 (setq beg (c-safe (c-backward-sexp 1) (point))))
4321 4275
4322 ((and (c-safe (forward-char -2) t) 4276 ((and (c-safe (forward-char -2) t)
4323 (looking-at "*/")) 4277 (looking-at "*/"))
4324 ;; Block comment. Due to the nature of line 4278 ;; Block comment. Due to the nature of line
4325 ;; comments, they will always be covered by the 4279 ;; comments, they will always be covered by the
4326 ;; normal case above. 4280 ;; normal case above.
4327 (goto-char end) 4281 (goto-char end)
4328 (c-backward-single-comment) 4282 (c-backward-single-comment)
4329 ;; If LIM is bogus, beg will be bogus. 4283 ;; If LIM is bogus, beg will be bogus.
4330 (setq beg (point)))) 4284 (setq beg (point))))
4331 4285
4332 (if beg (cons beg end)))))) 4286 (if beg (cons beg end))))))
4333 )))) 4287 ))))
4334 4288
4335;; In case external callers use this; it did have a docstring. 4289;; In case external callers use this; it did have a docstring.
4336(defalias 'c-literal-limits-fast 'c-literal-limits) 4290(defalias 'c-literal-limits-fast 'c-literal-limits)
@@ -6832,7 +6786,7 @@ comment at the start of cc-engine.el for more info."
6832 got-suffix-after-parens 6786 got-suffix-after-parens
6833 (eq (char-after got-suffix-after-parens) ?\()) 6787 (eq (char-after got-suffix-after-parens) ?\())
6834 ;; Got a type, no declarator but a paren suffix. I.e. it's a 6788 ;; Got a type, no declarator but a paren suffix. I.e. it's a
6835 ;; normal function call afterall (or perhaps a C++ style object 6789 ;; normal function call after all (or perhaps a C++ style object
6836 ;; instantiation expression). 6790 ;; instantiation expression).
6837 (throw 'at-decl-or-cast nil)))) 6791 (throw 'at-decl-or-cast nil))))
6838 6792
@@ -9151,7 +9105,7 @@ comment at the start of cc-engine.el for more info."
9151 'label)) 9105 'label))
9152 (if (eq step 'up) 9106 (if (eq step 'up)
9153 (setq placeholder (point)) 9107 (setq placeholder (point))
9154 ;; There was no containing statement afterall. 9108 ;; There was no containing statement after all.
9155 (goto-char placeholder))))) 9109 (goto-char placeholder)))))
9156 placeholder)) 9110 placeholder))
9157 (if (looking-at c-block-stmt-2-key) 9111 (if (looking-at c-block-stmt-2-key)
diff --git a/lisp/progmodes/cc-fonts.el b/lisp/progmodes/cc-fonts.el
index a31de35f3ba..97cfe808322 100644
--- a/lisp/progmodes/cc-fonts.el
+++ b/lisp/progmodes/cc-fonts.el
@@ -194,9 +194,13 @@
194 (unless (face-property-instance oldface 'reverse) 194 (unless (face-property-instance oldface 'reverse)
195 (invert-face newface))))) 195 (invert-face newface)))))
196 196
197(defvar c-annotation-face (make-face 'c-annotation-face) 197(defvar c-annotation-face 'c-annotation-face)
198 "Face used to highlight annotations in java-mode and other modes that may wish to use it.") 198
199(set-face-foreground 'c-annotation-face "blue") 199(defface c-annotation-face
200 '((default :inherit font-lock-constant-face))
201 "Face for highlighting annotations in Java mode and similar modes."
202 :version "24.1"
203 :group 'c)
200 204
201(eval-and-compile 205(eval-and-compile
202 ;; We need the following definitions during compilation since they're 206 ;; We need the following definitions during compilation since they're
@@ -1207,7 +1211,7 @@ casts and declarations are fontified. Used on level 2 and higher."
1207 ;; o - '<> if the arglist is of angle bracket type; 1211 ;; o - '<> if the arglist is of angle bracket type;
1208 ;; o - 'arglist if it's some other arglist; 1212 ;; o - 'arglist if it's some other arglist;
1209 ;; o - nil, if not in an arglist at all. This includes the 1213 ;; o - nil, if not in an arglist at all. This includes the
1210 ;; parenthesised condition which follows "if", "while", etc. 1214 ;; parenthesized condition which follows "if", "while", etc.
1211 context 1215 context
1212 ;; The position of the next token after the closing paren of 1216 ;; The position of the next token after the closing paren of
1213 ;; the last detected cast. 1217 ;; the last detected cast.
@@ -1534,24 +1538,8 @@ casts and declarations are fontified. Used on level 2 and higher."
1534 ;; prevent a repeat invocation. See elisp/lispref page "Search-based 1538 ;; prevent a repeat invocation. See elisp/lispref page "Search-based
1535 ;; Fontification". 1539 ;; Fontification".
1536 (let* ((paren-state (c-parse-state)) 1540 (let* ((paren-state (c-parse-state))
1537 (start (point)) 1541 decl-context in-typedef ps-elt)
1538 decl-context bo-decl in-typedef type-type ps-elt) 1542 ;; Are we in any nested struct/union/class/etc. braces?
1539
1540 ;; First, are we actually in a "local" declaration?
1541 (setq decl-context (c-beginning-of-decl-1)
1542 bo-decl (point)
1543 in-typedef (looking-at c-typedef-key))
1544 (if in-typedef (c-forward-token-2))
1545 (when (and (eq (car decl-context) 'same)
1546 (< bo-decl start))
1547 ;; Are we genuinely at a type?
1548 (setq type-type (c-forward-type t))
1549 (if (and type-type
1550 (or (not (eq type-type 'maybe))
1551 (looking-at c-symbol-key)))
1552 (c-font-lock-declarators limit t in-typedef)))
1553
1554 ;; Secondly, are we in any nested struct/union/class/etc. braces?
1555 (while paren-state 1543 (while paren-state
1556 (setq ps-elt (car paren-state) 1544 (setq ps-elt (car paren-state)
1557 paren-state (cdr paren-state)) 1545 paren-state (cdr paren-state))
diff --git a/lisp/progmodes/cc-langs.el b/lisp/progmodes/cc-langs.el
index 37818638d41..2aca885ca35 100644
--- a/lisp/progmodes/cc-langs.el
+++ b/lisp/progmodes/cc-langs.el
@@ -485,28 +485,56 @@ The functions are called even when font locking isn't enabled.
485When the mode is initialized, the functions are called with 485When the mode is initialized, the functions are called with
486parameters \(point-min) and \(point-max).") 486parameters \(point-min) and \(point-max).")
487 487
488(c-lang-defconst c-before-font-lock-function 488(c-lang-defconst c-before-font-lock-functions
489 "If non-nil, a function called just before font locking. 489 ;; For documentation see the following c-lang-defvar of the same name.
490Typically it will extend the region about to be fontified \(see 490 ;; The value here may be a list of functions or a single function.
491 t 'c-change-set-fl-decl-start
492 (c c++ objc) '(c-neutralize-syntax-in-and-mark-CPP
493 c-change-set-fl-decl-start)
494 awk 'c-awk-extend-and-syntax-tablify-region)
495(c-lang-defvar c-before-font-lock-functions
496 (let ((fs (c-lang-const c-before-font-lock-functions)))
497 (if (listp fs)
498 fs
499 (list fs)))
500 "If non-nil, a list of functions called just before font locking.
501Typically they will extend the region about to be fontified \(see
491below) and will set `syntax-table' text properties on the region. 502below) and will set `syntax-table' text properties on the region.
492 503
493It takes 3 parameters, the BEG, END, and OLD-LEN supplied to 504These functions will be run in the order given. Each of them
494every after-change function; point is undefined on both entry and 505takes 3 parameters, the BEG, END, and OLD-LEN supplied to every
495exit; on entry, the buffer will have been widened and match-data 506after-change function; point is undefined on both entry and exit;
496will have been saved; the return value is ignored. 507on entry, the buffer will have been widened and match-data will
508have been saved; the return value is ignored.
497 509
498The function may extend the region to be fontified by setting the 510The functions may extend the region to be fontified by setting the
499buffer local variables c-new-BEG and c-new-END. 511buffer local variables c-new-BEG and c-new-END.
500 512
501The function is called even when font locking is disabled. 513The functions are called even when font locking is disabled.
502 514
503When the mode is initialized, this function is called with 515When the mode is initialized, these functions are called with
504parameters \(point-min), \(point-max) and <buffer size>." 516parameters \(point-min), \(point-max) and <buffer size>.")
505 t nil 517
506 (c c++ objc) 'c-neutralize-syntax-in-and-mark-CPP 518(c-lang-defconst c-before-context-fontification-functions
507 awk 'c-awk-extend-and-syntax-tablify-region) 519 awk nil
508(c-lang-defvar c-before-font-lock-function 520 t 'c-context-set-fl-decl-start)
509 (c-lang-const c-before-font-lock-function)) 521 ;; For documentation see the following c-lang-defvar of the same name.
522 ;; The value here may be a list of functions or a single function.
523(c-lang-defvar c-before-context-fontification-functions
524 (let ((fs (c-lang-const c-before-context-fontification-functions)))
525 (if (listp fs)
526 fs
527 (list fs)))
528 "If non-nil, a list of functions called just before context (or
529other non-change) fontification is done. Typically they will
530extend the region.
531
532These functions will be run in the order given. Each of them
533takes 2 parameters, the BEG and END of the region to be
534fontified. Point is undefined on both entry and exit. On entry,
535the buffer will have been widened and match-data will have been
536saved; the return value is a cons of the adjusted
537region, (NEW-BEG . NEW-END).")
510 538
511 539
512;;; Syntactic analysis ("virtual semicolons") for line-oriented languages (AWK). 540;;; Syntactic analysis ("virtual semicolons") for line-oriented languages (AWK).
@@ -522,7 +550,7 @@ don't have EOL terminated statements. "
522 550
523(c-lang-defconst c-vsemi-status-unknown-p-fn 551(c-lang-defconst c-vsemi-status-unknown-p-fn
524 "Contains a function \"are we unsure whether there is a virtual semicolon on this line?\". 552 "Contains a function \"are we unsure whether there is a virtual semicolon on this line?\".
525The (admittedly kludgey) purpose of such a function is to prevent an infinite 553The (admittedly kludgy) purpose of such a function is to prevent an infinite
526recursion in c-beginning-of-statement-1 when point starts at a `while' token. 554recursion in c-beginning-of-statement-1 when point starts at a `while' token.
527The function MUST NOT UNDER ANY CIRCUMSTANCES call c-beginning-of-statement-1, 555The function MUST NOT UNDER ANY CIRCUMSTANCES call c-beginning-of-statement-1,
528even indirectly. This variable contains nil for languages which don't have 556even indirectly. This variable contains nil for languages which don't have
@@ -2242,8 +2270,7 @@ This construct is \"<keyword> <expression> :\"."
2242 2270
2243(c-lang-defconst c-label-kwds 2271(c-lang-defconst c-label-kwds
2244 "Keywords introducing colon terminated labels in blocks." 2272 "Keywords introducing colon terminated labels in blocks."
2245 t '("case" "default") 2273 t '("case" "default"))
2246 awk nil)
2247 2274
2248(c-lang-defconst c-label-kwds-regexp 2275(c-lang-defconst c-label-kwds-regexp
2249 ;; Adorned regexp matching any keyword that introduces a label. 2276 ;; Adorned regexp matching any keyword that introduces a label.
@@ -2998,18 +3025,19 @@ neither in a statement nor in a declaration context. The regexp is
2998tested at the beginning of every sexp in a suspected label, 3025tested at the beginning of every sexp in a suspected label,
2999i.e. before \":\". Only used if `c-recognize-colon-labels' is set." 3026i.e. before \":\". Only used if `c-recognize-colon-labels' is set."
3000 t (concat 3027 t (concat
3001 ;; Don't allow string literals.
3002 "\"\\|"
3003 ;; All keywords except `c-label-kwds' and `c-protection-kwds'. 3028 ;; All keywords except `c-label-kwds' and `c-protection-kwds'.
3004 (c-make-keywords-re t 3029 (c-make-keywords-re t
3005 (set-difference (c-lang-const c-keywords) 3030 (set-difference (c-lang-const c-keywords)
3006 (append (c-lang-const c-label-kwds) 3031 (append (c-lang-const c-label-kwds)
3007 (c-lang-const c-protection-kwds)) 3032 (c-lang-const c-protection-kwds))
3008 :test 'string-equal))) 3033 :test 'string-equal)))
3034 ;; Don't allow string literals, except in AWK. Character constants are OK.
3035 (c objc java pike idl) (concat "\"\\|"
3036 (c-lang-const c-nonlabel-token-key))
3009 ;; Also check for open parens in C++, to catch member init lists in 3037 ;; Also check for open parens in C++, to catch member init lists in
3010 ;; constructors. We normally allow it so that macros with arguments 3038 ;; constructors. We normally allow it so that macros with arguments
3011 ;; work in labels. 3039 ;; work in labels.
3012 c++ (concat "\\s\(\\|" (c-lang-const c-nonlabel-token-key))) 3040 c++ (concat "\\s\(\\|\"\\|" (c-lang-const c-nonlabel-token-key)))
3013(c-lang-defvar c-nonlabel-token-key (c-lang-const c-nonlabel-token-key)) 3041(c-lang-defvar c-nonlabel-token-key (c-lang-const c-nonlabel-token-key))
3014 3042
3015(c-lang-defconst c-nonlabel-token-2-key 3043(c-lang-defconst c-nonlabel-token-2-key
diff --git a/lisp/progmodes/cc-mode.el b/lisp/progmodes/cc-mode.el
index cc5a5236255..1bc0741b0aa 100644
--- a/lisp/progmodes/cc-mode.el
+++ b/lisp/progmodes/cc-mode.el
@@ -599,8 +599,8 @@ that requires a literal mode spec at compile time."
599 599
600;; Buffer local variables defining the region to be fontified by a font lock 600;; Buffer local variables defining the region to be fontified by a font lock
601;; after-change function. They are set in c-after-change to 601;; after-change function. They are set in c-after-change to
602;; after-change-function's BEG and END, and may be modified by a 602;; after-change-functions' BEG and END, and may be modified by functions in
603;; `c-before-font-lock-function'. 603;; `c-before-font-lock-functions'.
604(defvar c-new-BEG 0) 604(defvar c-new-BEG 0)
605(make-variable-buffer-local 'c-new-BEG) 605(make-variable-buffer-local 'c-new-BEG)
606(defvar c-new-END 0) 606(defvar c-new-END 0)
@@ -633,13 +633,13 @@ compatible with old code; callers should always specify it."
633 (setq c-new-BEG (point-min)) 633 (setq c-new-BEG (point-min))
634 (setq c-new-END (point-max)) 634 (setq c-new-END (point-max))
635 (save-excursion 635 (save-excursion
636 (if c-get-state-before-change-functions 636 (mapc (lambda (fn)
637 (mapc (lambda (fn) 637 (funcall fn (point-min) (point-max)))
638 (funcall fn (point-min) (point-max))) 638 c-get-state-before-change-functions)
639 c-get-state-before-change-functions)) 639 (mapc (lambda (fn)
640 (if c-before-font-lock-function 640 (funcall fn (point-min) (point-max)
641 (funcall c-before-font-lock-function (point-min) (point-max) 641 (- (point-max) (point-min))))
642 (- (point-max) (point-min)))))) 642 c-before-font-lock-functions)))
643 643
644 (set (make-local-variable 'outline-regexp) "[^#\n\^M]") 644 (set (make-local-variable 'outline-regexp) "[^#\n\^M]")
645 (set (make-local-variable 'outline-level) 'c-outline-level) 645 (set (make-local-variable 'outline-level) 'c-outline-level)
@@ -830,6 +830,35 @@ Note that the style variables are always made local to the buffer."
830 ; with a c-cpp-delimiter category property 830 ; with a c-cpp-delimiter category property
831 (setq c-old-EOM (point))) 831 (setq c-old-EOM (point)))
832 832
833(defun c-extend-font-lock-region-for-macros (begg endd &optional old-len)
834 ;; Extend the region (BEGG ENDD) to cover all (possibly changed)
835 ;; preprocessor macros; return the cons (new-BEG . new-END). OLD-LEN should
836 ;; be either the old length parameter when called from an
837 ;; after-change-function, or nil otherwise. This defun uses the variables
838 ;; c-old-BOM, c-new-BOM.
839 ;;
840 ;; Point is undefined on both entry and exit to this function. The buffer
841 ;; will have been widened on entry.
842 (let (limits new-beg new-end)
843 (goto-char c-old-BOM) ; already set to old start of macro or begg.
844 (setq new-beg
845 (min begg
846 (if (setq limits (c-state-literal-at (point)))
847 (cdr limits) ; go forward out of any string or comment.
848 (point))))
849
850 (goto-char endd)
851 (if (setq limits (c-state-literal-at (point)))
852 (goto-char (car limits))) ; go backward out of any string or comment.
853 (if (c-beginning-of-macro)
854 (c-end-of-macro))
855 (setq new-end (max endd
856 (if old-len
857 (+ (- c-old-EOM old-len) (- endd begg))
858 c-old-EOM)
859 (point)))
860 (cons new-beg new-end)))
861
833(defun c-neutralize-CPP-line (beg end) 862(defun c-neutralize-CPP-line (beg end)
834 ;; BEG and END bound a region, typically a preprocessor line. Put a 863 ;; BEG and END bound a region, typically a preprocessor line. Put a
835 ;; "punctuation" syntax-table property on syntactically obtrusive 864 ;; "punctuation" syntax-table property on syntactically obtrusive
@@ -881,31 +910,19 @@ Note that the style variables are always made local to the buffer."
881 ;; Point is undefined both before and after this function call, the buffer 910 ;; Point is undefined both before and after this function call, the buffer
882 ;; has been widened, and match-data saved. The return value is ignored. 911 ;; has been widened, and match-data saved. The return value is ignored.
883 ;; 912 ;;
884 ;; This function is the C/C++/ObjC value of `c-before-font-lock-function'. 913 ;; This function is in the C/C++/ObjC value of `c-before-font-lock-functions'.
885 ;; 914 ;;
886 ;; Note: SPEED _MATTERS_ IN THIS FUNCTION!!! 915 ;; Note: SPEED _MATTERS_ IN THIS FUNCTION!!!
887 ;; 916 ;;
888 ;; This function might make hidden buffer changes. 917 ;; This function might make hidden buffer changes.
889 (c-save-buffer-state (limits) 918 (c-save-buffer-state (new-bounds)
890 ;; First determine the region, (c-new-BEG c-new-END), which will get font 919 ;; First determine the region, (c-new-BEG c-new-END), which will get font
891 ;; locked. It might need "neutralizing". This region may not start 920 ;; locked. It might need "neutralizing". This region may not start
892 ;; inside a string, comment, or macro. 921 ;; inside a string, comment, or macro.
893 (goto-char c-old-BOM) ; already set to old start of macro or begg. 922 (setq new-bounds (c-extend-font-lock-region-for-macros
894 (setq c-new-BEG 923 c-new-BEG c-new-END old-len))
895 (min c-new-BEG 924 (setq c-new-BEG (car new-bounds)
896 (if (setq limits (c-state-literal-at (point))) 925 c-new-END (cdr new-bounds))
897 (cdr limits) ; go forward out of any string or comment.
898 (point))))
899
900 (goto-char endd)
901 (if (setq limits (c-state-literal-at (point)))
902 (goto-char (car limits))) ; go backward out of any string or comment.
903 (if (c-beginning-of-macro)
904 (c-end-of-macro))
905 (setq c-new-END (max c-new-END
906 (+ (- c-old-EOM old-len) (- endd begg))
907 (point)))
908
909 ;; Clear all old relevant properties. 926 ;; Clear all old relevant properties.
910 (c-clear-char-property-with-value c-new-BEG c-new-END 'syntax-table '(1)) 927 (c-clear-char-property-with-value c-new-BEG c-new-END 'syntax-table '(1))
911 (c-clear-char-property-with-value c-new-BEG c-new-END 'category 'c-cpp-delimiter) 928 (c-clear-char-property-with-value c-new-BEG c-new-END 'category 'c-cpp-delimiter)
@@ -943,7 +960,7 @@ Note that the style variables are always made local to the buffer."
943 ;; Note that this function must be FAST rather than accurate. Note 960 ;; Note that this function must be FAST rather than accurate. Note
944 ;; also that it only has any effect when font locking is enabled. 961 ;; also that it only has any effect when font locking is enabled.
945 ;; We exploit this by checking for font-lock-*-face instead of doing 962 ;; We exploit this by checking for font-lock-*-face instead of doing
946 ;; rigourous syntactic analysis. 963 ;; rigorous syntactic analysis.
947 964
948 ;; If either change boundary is wholly inside an identifier, delete 965 ;; If either change boundary is wholly inside an identifier, delete
949 ;; it/them from the cache. Don't worry about being inside a string 966 ;; it/them from the cache. Don't worry about being inside a string
@@ -1015,6 +1032,11 @@ Note that the style variables are always made local to the buffer."
1015 c-get-state-before-change-functions)) 1032 c-get-state-before-change-functions))
1016 )))) 1033 ))))
1017 1034
1035(defvar c-in-after-change-fontification nil)
1036(make-variable-buffer-local 'c-in-after-change-fontification)
1037;; A flag to prevent region expanding stuff being done twice for after-change
1038;; fontification.
1039
1018(defun c-after-change (beg end old-len) 1040(defun c-after-change (beg end old-len)
1019 ;; Function put on `after-change-functions' to adjust various caches 1041 ;; Function put on `after-change-functions' to adjust various caches
1020 ;; etc. Prefer speed to finesse here, since there will be an order 1042 ;; etc. Prefer speed to finesse here, since there will be an order
@@ -1026,7 +1048,7 @@ Note that the style variables are always made local to the buffer."
1026 ;; these caches from inside them, and we must thus be sure that this 1048 ;; these caches from inside them, and we must thus be sure that this
1027 ;; has already been executed. 1049 ;; has already been executed.
1028 ;; 1050 ;;
1029 ;; This calls the language variable c-before-font-lock-function, if non nil. 1051 ;; This calls the language variable c-before-font-lock-functions, if non nil.
1030 ;; This typically sets `syntax-table' properties. 1052 ;; This typically sets `syntax-table' properties.
1031 1053
1032 (c-save-buffer-state () 1054 (c-save-buffer-state ()
@@ -1066,19 +1088,113 @@ Note that the style variables are always made local to the buffer."
1066 ;; larger than (beg end). 1088 ;; larger than (beg end).
1067 (setq c-new-BEG beg 1089 (setq c-new-BEG beg
1068 c-new-END end) 1090 c-new-END end)
1069 (if c-before-font-lock-function 1091 (setq c-in-after-change-fontification t)
1070 (save-excursion 1092 (save-excursion
1071 (funcall c-before-font-lock-function beg end old-len))))))) 1093 (mapc (lambda (fn)
1072 1094 (funcall fn beg end old-len))
1095 c-before-font-lock-functions))))))
1096
1097(defun c-set-fl-decl-start (pos)
1098 ;; If the beginning of the line containing POS is in the middle of a "local"
1099 ;; declaration (i.e. one which does not start outside of braces enclosing
1100 ;; POS, such as a struct), return the beginning of that declaration.
1101 ;; Otherwise return POS. Note that declarations, in this sense, can be
1102 ;; nested.
1103 ;;
1104 ;; This function is called indirectly from font locking stuff - either from
1105 ;; c-after-change (to prepare for after-change font-lockng) or from font
1106 ;; lock context (etc.) fontification.
1107 (let ((lit-limits (c-literal-limits))
1108 (new-pos pos)
1109 bod-lim bo-decl)
1110 (goto-char (c-point 'bol new-pos))
1111 (when lit-limits ; Comment or string.
1112 (goto-char (car lit-limits)))
1113 (setq bod-lim (max (- (point) 500) (point-min)))
1114
1115 (while
1116 ;; Go to a less nested declaration each time round this loop.
1117 (and
1118 (eq (car (c-beginning-of-decl-1 bod-lim)) 'same)
1119 (progn (setq bo-decl (point))
1120 ;; Are we looking at a keyword such as "template" or
1121 ;; "typedef" which can decorate a type, or the type itself?
1122 (when (or (looking-at c-prefix-spec-kwds-re)
1123 (c-forward-type t))
1124 ;; We've found another candidate position.
1125 (setq new-pos (min new-pos bo-decl))
1126 (goto-char bo-decl))
1127 t)
1128 ;; Try and go out a level to search again.
1129 (progn
1130 (c-backward-syntactic-ws bod-lim)
1131 (or (memq (char-before) '(?\( ?\[))
1132 (and (eq (char-before) ?\<)
1133 (eq (c-get-char-property
1134 (1- (point)) 'syntax-table)
1135 c-<-as-paren-syntax))))
1136 (not (bobp)))
1137 (backward-char))
1138 new-pos)) ; back over (, [, <.
1139
1140(defun c-change-set-fl-decl-start (beg end old-len)
1141 ;; Set c-new-BEG to the beginning of a "local" declaration if it('s BOL) is
1142 ;; inside one. This is called from an after-change-function, but the
1143 ;; parameters BEG END and OLD-LEN are ignored. See `c-set-fl-decl-start'
1144 ;; for the detailed functionality.
1145 (if font-lock-mode
1146 (setq c-new-BEG (c-set-fl-decl-start c-new-BEG))))
1147
1148(defun c-context-set-fl-decl-start (beg end)
1149 ;; Return a cons (NEW-BEG . END), where NEW-BEG is the beginning of a
1150 ;; "local" declaration (BOL at) NEW is inside or BEG. See
1151 ;; `c-set-fl-decl-start' for the detailed functionality.
1152 (cons (c-set-fl-decl-start beg) end))
1153
1154(defvar c-standard-font-lock-fontify-region-function nil
1155 "Standard value of `font-lock-fontify-region-function'")
1156
1157(defun c-font-lock-fontify-region (beg end &optional verbose)
1158 ;; Effectively advice around `font-lock-fontify-region' which extends the
1159 ;; region (BEG END), for example, to avoid context fontification chopping
1160 ;; off the start of the context. Do not do anything if it's already been
1161 ;; done (i.e. from and after-change fontification. An example (C++) where
1162 ;; this used to happen is this:
1163 ;;
1164 ;; template <typename T>
1165 ;;
1166 ;;
1167 ;; void myfunc(T* p) {}
1168 ;;
1169 ;; Type a space in the first blank line, and the fontification of the next
1170 ;; line was fouled up by context fontification.
1171 (let ((new-beg beg) (new-end end) new-region)
1172 (if c-in-after-change-fontification
1173 (setq c-in-after-change-fontification nil)
1174 (save-restriction
1175 (widen)
1176 (save-excursion
1177 (mapc (lambda (fn)
1178 (setq new-region (funcall fn new-beg new-end))
1179 (setq new-beg (car new-region) new-end (cdr new-region)))
1180 c-before-context-fontification-functions))))
1181 (funcall c-standard-font-lock-fontify-region-function
1182 new-beg new-end verbose)))
1183
1073(defun c-after-font-lock-init () 1184(defun c-after-font-lock-init ()
1074 ;; Put on `font-lock-mode-hook'. 1185 ;; Put on `font-lock-mode-hook'. This function ensures our after-change
1186 ;; function will get excuted before the font-lock one. Amongst other
1187 ;; things.
1075 (remove-hook 'after-change-functions 'c-after-change t) 1188 (remove-hook 'after-change-functions 'c-after-change t)
1076 (add-hook 'after-change-functions 'c-after-change nil t)) 1189 (add-hook 'after-change-functions 'c-after-change nil t)
1190 (setq c-standard-font-lock-fontify-region-function
1191 (default-value 'font-lock-fontify-region-function)))
1077 1192
1078(defun c-font-lock-init () 1193(defun c-font-lock-init ()
1079 "Set up the font-lock variables for using the font-lock support in CC Mode. 1194 "Set up the font-lock variables for using the font-lock support in CC Mode.
1080This does not load the font-lock package. Use after 1195This does not load the font-lock package. Use after
1081`c-basic-common-init' and after cc-fonts has been loaded." 1196`c-basic-common-init' and after cc-fonts has been loaded.
1197This function is called from `c-common-init', once per mode initialization."
1082 1198
1083 (set (make-local-variable 'font-lock-defaults) 1199 (set (make-local-variable 'font-lock-defaults)
1084 `(,(if (c-major-mode-is 'awk-mode) 1200 `(,(if (c-major-mode-is 'awk-mode)
@@ -1092,6 +1208,10 @@ This does not load the font-lock package. Use after
1092 c-beginning-of-syntax 1208 c-beginning-of-syntax
1093 (font-lock-mark-block-function 1209 (font-lock-mark-block-function
1094 . c-mark-function))) 1210 . c-mark-function)))
1211
1212 (make-local-variable 'font-lock-fontify-region-function)
1213 (setq font-lock-fontify-region-function 'c-font-lock-fontify-region)
1214
1095 (if (featurep 'xemacs) 1215 (if (featurep 'xemacs)
1096 (make-local-hook 'font-lock-mode-hook)) 1216 (make-local-hook 'font-lock-mode-hook))
1097 (add-hook 'font-lock-mode-hook 'c-after-font-lock-init nil t)) 1217 (add-hook 'font-lock-mode-hook 'c-after-font-lock-init nil t))
@@ -1562,10 +1682,6 @@ Key bindings:
1562 (c-common-init 'awk-mode) 1682 (c-common-init 'awk-mode)
1563 (c-awk-unstick-NL-prop) 1683 (c-awk-unstick-NL-prop)
1564 1684
1565 ;; Prevent XEmacs's buffer-syntactic-context being used. See the comment
1566 ;; in cc-engine.el, just before (defun c-fast-in-literal ...
1567 (defalias 'c-in-literal 'c-slow-in-literal)
1568
1569 (c-run-mode-hooks 'c-mode-common-hook 'awk-mode-hook) 1685 (c-run-mode-hooks 'c-mode-common-hook 'awk-mode-hook)
1570 (c-update-modeline)) 1686 (c-update-modeline))
1571 1687
diff --git a/lisp/progmodes/cc-vars.el b/lisp/progmodes/cc-vars.el
index 549f94387d2..a4338a3193b 100644
--- a/lisp/progmodes/cc-vars.el
+++ b/lisp/progmodes/cc-vars.el
@@ -586,7 +586,7 @@ in a mode hook, you have to call `c-setup-doc-comment-style'
586afterwards to redo that work." 586afterwards to redo that work."
587 ;; Symbols other than those documented above may be used on this 587 ;; Symbols other than those documented above may be used on this
588 ;; variable. If a variable exists that has that name with 588 ;; variable. If a variable exists that has that name with
589 ;; "-font-lock-keywords" appended, it's value is prepended to the 589 ;; "-font-lock-keywords" appended, its value is prepended to the
590 ;; font lock keywords list. If it's a function then it's called and 590 ;; font lock keywords list. If it's a function then it's called and
591 ;; the result is prepended. 591 ;; the result is prepended.
592 :type '(radio 592 :type '(radio
diff --git a/lisp/progmodes/cfengine.el b/lisp/progmodes/cfengine.el
index 823304bd250..ffe8edfaeb6 100644
--- a/lisp/progmodes/cfengine.el
+++ b/lisp/progmodes/cfengine.el
@@ -5,6 +5,7 @@
5;; Author: Dave Love <fx@gnu.org> 5;; Author: Dave Love <fx@gnu.org>
6;; Maintainer: Ted Zlatanov <tzz@lifelogs.com> 6;; Maintainer: Ted Zlatanov <tzz@lifelogs.com>
7;; Keywords: languages 7;; Keywords: languages
8;; Version: 1.1
8 9
9;; This file is part of GNU Emacs. 10;; This file is part of GNU Emacs.
10 11
@@ -29,18 +30,18 @@
29;; The CFEngine 3.x support doesn't have Imenu support but patches are 30;; The CFEngine 3.x support doesn't have Imenu support but patches are
30;; welcome. 31;; welcome.
31 32
32;; You can set it up so either cfengine-mode (2.x and earlier) or 33;; You can set it up so either `cfengine2-mode' (2.x and earlier) or
33;; cfengine3-mode (3.x) will be picked, depending on the buffer 34;; `cfengine3-mode' (3.x) will be picked, depending on the buffer
34;; contents: 35;; contents:
35 36
36;; (add-to-list 'auto-mode-alist '("\\.cf\\'" . cfengine-auto-mode)) 37;; (add-to-list 'auto-mode-alist '("\\.cf\\'" . cfengine-mode))
37 38
38;; OR you can choose to always use a specific version, if you prefer 39;; OR you can choose to always use a specific version, if you prefer
39;; it 40;; it:
40 41
41;; (add-to-list 'auto-mode-alist '("\\.cf\\'" . cfengine3-mode)) 42;; (add-to-list 'auto-mode-alist '("\\.cf\\'" . cfengine3-mode))
42;; (add-to-list 'auto-mode-alist '("^cf\\." . cfengine-mode)) 43;; (add-to-list 'auto-mode-alist '("^cf\\." . cfengine2-mode))
43;; (add-to-list 'auto-mode-alist '("^cfagent.conf\\'" . cfengine-mode)) 44;; (add-to-list 'auto-mode-alist '("^cfagent.conf\\'" . cfengine2-mode))
44 45
45;; This is not the same as the mode written by Rolf Ebert 46;; This is not the same as the mode written by Rolf Ebert
46;; <ebert@waporo.muc.de>, distributed with cfengine-2.0.5. It does 47;; <ebert@waporo.muc.de>, distributed with cfengine-2.0.5. It does
@@ -49,31 +50,36 @@
49;;; Code: 50;;; Code:
50 51
51(defgroup cfengine () 52(defgroup cfengine ()
52 "Editing Cfengine files." 53 "Editing CFEngine files."
53 :group 'languages) 54 :group 'languages)
54 55
55(defcustom cfengine-indent 2 56(defcustom cfengine-indent 2
56 "*Size of a Cfengine indentation step in columns." 57 "*Size of a CFEngine indentation step in columns."
57 :group 'cfengine 58 :group 'cfengine
58 :type 'integer) 59 :type 'integer)
59 60
61(defvar cfengine-mode-debug nil
62 "Whether `cfengine-mode' should print debugging info.")
63
60(defcustom cfengine-mode-abbrevs nil 64(defcustom cfengine-mode-abbrevs nil
61 "Abbrevs for Cfengine mode." 65 "Abbrevs for CFEngine2 mode."
62 :group 'cfengine 66 :group 'cfengine
63 :type '(repeat (list (string :tag "Name") 67 :type '(repeat (list (string :tag "Name")
64 (string :tag "Expansion") 68 (string :tag "Expansion")
65 (choice :tag "Hook" (const nil) function)))) 69 (choice :tag "Hook" (const nil) function))))
66 70
71(make-obsolete-variable 'cfengine-mode-abbrevs 'edit-abbrevs "24.1")
72
67;; Taken from the doc for pre-release 2.1. 73;; Taken from the doc for pre-release 2.1.
68(eval-and-compile 74(eval-and-compile
69 (defconst cfengine-actions 75 (defconst cfengine2-actions
70 '("acl" "alerts" "binservers" "broadcast" "control" "classes" "copy" 76 '("acl" "alerts" "binservers" "broadcast" "control" "classes" "copy"
71 "defaultroute" "disks" "directories" "disable" "editfiles" "files" 77 "defaultroute" "disks" "directories" "disable" "editfiles" "files"
72 "filters" "groups" "homeservers" "ignore" "import" "interfaces" 78 "filters" "groups" "homeservers" "ignore" "import" "interfaces"
73 "links" "mailserver" "methods" "miscmounts" "mountables" 79 "links" "mailserver" "methods" "miscmounts" "mountables"
74 "processes" "packages" "rename" "required" "resolve" 80 "processes" "packages" "rename" "required" "resolve"
75 "shellcommands" "tidy" "unmount" 81 "shellcommands" "tidy" "unmount"
76 ;; cfservd 82 ;; Keywords for cfservd.
77 "admit" "grant" "deny") 83 "admit" "grant" "deny")
78 "List of the action keywords supported by Cfengine. 84 "List of the action keywords supported by Cfengine.
79This includes those for cfservd as well as cfagent.") 85This includes those for cfservd as well as cfagent.")
@@ -98,11 +104,11 @@ This includes those for cfservd as well as cfagent.")
98 '(string int real slist ilist rlist irange rrange counter)) 104 '(string int real slist ilist rlist irange rrange counter))
99 "List of the CFEngine 3.x variable types.")) 105 "List of the CFEngine 3.x variable types."))
100 106
101(defvar cfengine-font-lock-keywords 107(defvar cfengine2-font-lock-keywords
102 `(;; Actions. 108 `(;; Actions.
103 ;; List the allowed actions explicitly, so that errors are more obvious. 109 ;; List the allowed actions explicitly, so that errors are more obvious.
104 (,(concat "^[ \t]*" (eval-when-compile 110 (,(concat "^[ \t]*" (eval-when-compile
105 (regexp-opt cfengine-actions t)) 111 (regexp-opt cfengine2-actions t))
106 ":") 112 ":")
107 1 font-lock-keyword-face) 113 1 font-lock-keyword-face)
108 ;; Classes. 114 ;; Classes.
@@ -117,46 +123,54 @@ This includes those for cfservd as well as cfagent.")
117 123
118(defvar cfengine3-font-lock-keywords 124(defvar cfengine3-font-lock-keywords
119 `( 125 `(
126 ;; Defuns. This happens early so they don't get caught by looser
127 ;; patterns.
128 (,(concat "\\<" cfengine3-defuns-regex "\\>"
129 "[ \t]+\\<\\([[:alnum:]_]+\\)\\>"
130 "[ \t]+\\<\\([[:alnum:]_]+\\)"
131 ;; Optional parentheses with variable names inside.
132 "\\(?:(\\([^)]*\\))\\)?")
133 (1 font-lock-builtin-face)
134 (2 font-lock-constant-face)
135 (3 font-lock-function-name-face)
136 (4 font-lock-variable-name-face nil t))
137
138 ;; Class selectors.
120 (,(concat "^[ \t]*" cfengine3-class-selector-regex) 139 (,(concat "^[ \t]*" cfengine3-class-selector-regex)
121 1 font-lock-keyword-face) 140 1 font-lock-keyword-face)
141
142 ;; Categories.
122 (,(concat "^[ \t]*" cfengine3-category-regex) 143 (,(concat "^[ \t]*" cfengine3-category-regex)
123 1 font-lock-builtin-face) 144 1 font-lock-builtin-face)
145
124 ;; Variables, including scope, e.g. module.var 146 ;; Variables, including scope, e.g. module.var
125 ("[@$](\\([[:alnum:]_.]+\\))" 1 font-lock-variable-name-face) 147 ("[@$](\\([[:alnum:]_.]+\\))" 1 font-lock-variable-name-face)
126 ("[@$]{\\([[:alnum:]_.]+\\)}" 1 font-lock-variable-name-face) 148 ("[@$]{\\([[:alnum:]_.]+\\)}" 1 font-lock-variable-name-face)
149
127 ;; Variable definitions. 150 ;; Variable definitions.
128 ("\\<\\([[:alnum:]_]+\\)[ \t]*=[ \t]*(" 1 font-lock-variable-name-face) 151 ("\\<\\([[:alnum:]_]+\\)[ \t]*=[ \t]*(" 1 font-lock-variable-name-face)
129 152
130 ;; CFEngine 3.x faces 153 ;; Variable types.
131 ;; defuns
132 (,(concat "\\<" cfengine3-defuns-regex "\\>"
133 "[ \t]+\\<\\([[:alnum:]_]+\\)\\>"
134 "[ \t]+\\<\\([[:alnum:]_]+\\)\\((\\([^)]*\\))\\)?")
135 (1 font-lock-builtin-face)
136 (2 font-lock-constant-name-face)
137 (3 font-lock-function-name-face)
138 (5 font-lock-variable-name-face))
139 ;; variable types
140 (,(concat "\\<" (eval-when-compile (regexp-opt cfengine3-vartypes t)) "\\>") 154 (,(concat "\\<" (eval-when-compile (regexp-opt cfengine3-vartypes t)) "\\>")
141 1 font-lock-type-face))) 155 1 font-lock-type-face)))
142 156
143(defvar cfengine-imenu-expression 157(defvar cfengine2-imenu-expression
144 `((nil ,(concat "^[ \t]*" (eval-when-compile 158 `((nil ,(concat "^[ \t]*" (eval-when-compile
145 (regexp-opt cfengine-actions t)) 159 (regexp-opt cfengine2-actions t))
146 ":[^:]") 160 ":[^:]")
147 1) 161 1)
148 ("Variables/classes" "\\<\\([[:alnum:]_]+\\)[ \t]*=[ \t]*(" 1) 162 ("Variables/classes" "\\<\\([[:alnum:]_]+\\)[ \t]*=[ \t]*(" 1)
149 ("Variables/classes" "\\<define=\\([[:alnum:]_]+\\)" 1) 163 ("Variables/classes" "\\<define=\\([[:alnum:]_]+\\)" 1)
150 ("Variables/classes" "\\<DefineClass\\>[ \t]+\\([[:alnum:]_]+\\)" 1)) 164 ("Variables/classes" "\\<DefineClass\\>[ \t]+\\([[:alnum:]_]+\\)" 1))
151 "`imenu-generic-expression' for Cfengine mode.") 165 "`imenu-generic-expression' for CFEngine mode.")
152 166
153(defun cfengine-outline-level () 167(defun cfengine2-outline-level ()
154 "`outline-level' function for Cfengine mode." 168 "`outline-level' function for CFEngine mode."
155 (if (looking-at "[^:]+\\(?:[:]+\\)$") 169 (if (looking-at "[^:]+\\(?:[:]+\\)$")
156 (length (match-string 1)))) 170 (length (match-string 1))))
157 171
158(defun cfengine-beginning-of-defun () 172(defun cfengine2-beginning-of-defun ()
159 "`beginning-of-defun' function for Cfengine mode. 173 "`beginning-of-defun' function for CFEngine mode.
160Treats actions as defuns." 174Treats actions as defuns."
161 (unless (<= (current-column) (current-indentation)) 175 (unless (<= (current-column) (current-indentation))
162 (end-of-line)) 176 (end-of-line))
@@ -165,8 +179,8 @@ Treats actions as defuns."
165 (goto-char (point-min))) 179 (goto-char (point-min)))
166 t) 180 t)
167 181
168(defun cfengine-end-of-defun () 182(defun cfengine2-end-of-defun ()
169 "`end-of-defun' function for Cfengine mode. 183 "`end-of-defun' function for CFEngine mode.
170Treats actions as defuns." 184Treats actions as defuns."
171 (end-of-line) 185 (end-of-line)
172 (if (re-search-forward "^[[:alpha:]]+: *$" nil t) 186 (if (re-search-forward "^[[:alpha:]]+: *$" nil t)
@@ -176,7 +190,7 @@ Treats actions as defuns."
176 190
177;; Fixme: Should get an extra indent step in editfiles BeginGroup...s. 191;; Fixme: Should get an extra indent step in editfiles BeginGroup...s.
178 192
179(defun cfengine-indent-line () 193(defun cfengine2-indent-line ()
180 "Indent a line in Cfengine mode. 194 "Indent a line in Cfengine mode.
181Intended as the value of `indent-line-function'." 195Intended as the value of `indent-line-function'."
182 (let ((pos (- (point-max) (point)))) 196 (let ((pos (- (point-max) (point))))
@@ -283,15 +297,17 @@ Intended as the value of `indent-line-function'."
283 (narrow-to-defun) 297 (narrow-to-defun)
284 (back-to-indentation) 298 (back-to-indentation)
285 (setq parse (parse-partial-sexp (point-min) (point))) 299 (setq parse (parse-partial-sexp (point-min) (point)))
286 (message "%S" parse) 300 (when cfengine-mode-debug
301 (message "%S" parse))
302
287 (cond 303 (cond
288 ;; body/bundle blocks start at 0 304 ;; Body/bundle blocks start at 0.
289 ((looking-at (concat cfengine3-defuns-regex "\\>")) 305 ((looking-at (concat cfengine3-defuns-regex "\\>"))
290 (indent-line-to 0)) 306 (indent-line-to 0))
291 ;; categories are indented one step 307 ;; Categories are indented one step.
292 ((looking-at (concat cfengine3-category-regex "[ \t]*$")) 308 ((looking-at (concat cfengine3-category-regex "[ \t]*$"))
293 (indent-line-to cfengine-indent)) 309 (indent-line-to cfengine-indent))
294 ;; class selectors are indented two steps 310 ;; Class selectors are indented two steps.
295 ((looking-at (concat cfengine3-class-selector-regex "[ \t]*$")) 311 ((looking-at (concat cfengine3-class-selector-regex "[ \t]*$"))
296 (indent-line-to (* 2 cfengine-indent))) 312 (indent-line-to (* 2 cfengine-indent)))
297 ;; Outdent leading close brackets one step. 313 ;; Outdent leading close brackets one step.
@@ -303,11 +319,17 @@ Intended as the value of `indent-line-function'."
303 (backward-sexp) 319 (backward-sexp)
304 (current-column))) 320 (current-column)))
305 (error nil))) 321 (error nil)))
306 ;; inside a string and it starts before this line 322 ;; Inside a string and it starts before this line.
307 ((and (nth 3 parse) 323 ((and (nth 3 parse)
308 (< (nth 8 parse) (save-excursion (beginning-of-line) (point)))) 324 (< (nth 8 parse) (save-excursion (beginning-of-line) (point))))
309 (indent-line-to 0)) 325 (indent-line-to 0))
310 ;; inside a defun, but not a nested list (depth is 1) 326
327 ;; Inside a defun, but not a nested list (depth is 1). This is
328 ;; a promise, usually.
329
330 ;; Indent to cfengine-indent times the nested depth
331 ;; plus 2. That way, promises indent deeper than class
332 ;; selectors, which in turn are one deeper than categories.
311 ((= 1 (nth 0 parse)) 333 ((= 1 (nth 0 parse))
312 (indent-line-to (* (+ 2 (nth 0 parse)) cfengine-indent))) 334 (indent-line-to (* (+ 2 (nth 0 parse)) cfengine-indent)))
313 ;; Inside brackets/parens: indent to start column of non-comment 335 ;; Inside brackets/parens: indent to start column of non-comment
@@ -411,18 +433,18 @@ Intended as the value of `indent-line-function'."
411 (set (make-local-variable 'parse-sexp-ignore-comments) t)) 433 (set (make-local-variable 'parse-sexp-ignore-comments) t))
412 434
413(defun cfengine-common-syntax (table) 435(defun cfengine-common-syntax (table)
414 ;; the syntax defaults seem OK to give reasonable word movement 436 ;; The syntax defaults seem OK to give reasonable word movement.
415 (modify-syntax-entry ?# "<" table) 437 (modify-syntax-entry ?# "<" table)
416 (modify-syntax-entry ?\n ">#" table) 438 (modify-syntax-entry ?\n ">#" table)
417 (modify-syntax-entry ?\" "\"" table) 439 (modify-syntax-entry ?\" "\"" table)
418 ;; variable substitution: 440 ;; Variable substitution.
419 (modify-syntax-entry ?$ "." table) 441 (modify-syntax-entry ?$ "." table)
420 ;; Doze path separators: 442 ;; Doze path separators.
421 (modify-syntax-entry ?\\ "." table)) 443 (modify-syntax-entry ?\\ "." table))
422 444
423;;;###autoload 445;;;###autoload
424(define-derived-mode cfengine3-mode prog-mode "CFEngine3" 446(define-derived-mode cfengine3-mode prog-mode "CFE3"
425 "Major mode for editing cfengine input. 447 "Major mode for editing CFEngine3 input.
426There are no special keybindings by default. 448There are no special keybindings by default.
427 449
428Action blocks are treated as defuns, i.e. \\[beginning-of-defun] moves 450Action blocks are treated as defuns, i.e. \\[beginning-of-defun] moves
@@ -434,46 +456,46 @@ to the action header."
434 (setq font-lock-defaults 456 (setq font-lock-defaults
435 '(cfengine3-font-lock-keywords nil nil nil beginning-of-defun)) 457 '(cfengine3-font-lock-keywords nil nil nil beginning-of-defun))
436 458
437 ;; use defuns as the essential syntax block 459 ;; Use defuns as the essential syntax block.
438 (set (make-local-variable 'beginning-of-defun-function) 460 (set (make-local-variable 'beginning-of-defun-function)
439 #'cfengine3-beginning-of-defun) 461 #'cfengine3-beginning-of-defun)
440 (set (make-local-variable 'end-of-defun-function) 462 (set (make-local-variable 'end-of-defun-function)
441 #'cfengine3-end-of-defun)) 463 #'cfengine3-end-of-defun))
442 464
443;;;###autoload 465;;;###autoload
444(define-derived-mode cfengine-mode prog-mode "Cfengine" 466(define-derived-mode cfengine2-mode prog-mode "CFE2"
445 "Major mode for editing cfengine input. 467 "Major mode for editing CFEngine2 input.
446There are no special keybindings by default. 468There are no special keybindings by default.
447 469
448Action blocks are treated as defuns, i.e. \\[beginning-of-defun] moves 470Action blocks are treated as defuns, i.e. \\[beginning-of-defun] moves
449to the action header." 471to the action header."
450 (cfengine-common-settings) 472 (cfengine-common-settings)
451 (cfengine-common-syntax cfengine-mode-syntax-table) 473 (cfengine-common-syntax cfengine2-mode-syntax-table)
452 474
453 ;; Shell commands can be quoted by single, double or back quotes. 475 ;; Shell commands can be quoted by single, double or back quotes.
454 ;; It's debatable whether we should define string syntax, but it 476 ;; It's debatable whether we should define string syntax, but it
455 ;; should avoid potential confusion in some cases. 477 ;; should avoid potential confusion in some cases.
456 (modify-syntax-entry ?\' "\"" cfengine-mode-syntax-table) 478 (modify-syntax-entry ?\' "\"" cfengine2-mode-syntax-table)
457 (modify-syntax-entry ?\` "\"" cfengine-mode-syntax-table) 479 (modify-syntax-entry ?\` "\"" cfengine2-mode-syntax-table)
458 480
459 (set (make-local-variable 'indent-line-function) #'cfengine-indent-line) 481 (set (make-local-variable 'indent-line-function) #'cfengine2-indent-line)
460 (set (make-local-variable 'outline-regexp) "[ \t]*\\(\\sw\\|\\s_\\)+:+") 482 (set (make-local-variable 'outline-regexp) "[ \t]*\\(\\sw\\|\\s_\\)+:+")
461 (set (make-local-variable 'outline-level) #'cfengine-outline-level) 483 (set (make-local-variable 'outline-level) #'cfengine2-outline-level)
462 (set (make-local-variable 'fill-paragraph-function) 484 (set (make-local-variable 'fill-paragraph-function)
463 #'cfengine-fill-paragraph) 485 #'cfengine-fill-paragraph)
464 (define-abbrev-table 'cfengine-mode-abbrev-table cfengine-mode-abbrevs) 486 (define-abbrev-table 'cfengine2-mode-abbrev-table cfengine-mode-abbrevs)
465 (setq font-lock-defaults 487 (setq font-lock-defaults
466 '(cfengine-font-lock-keywords nil nil nil beginning-of-line)) 488 '(cfengine2-font-lock-keywords nil nil nil beginning-of-line))
467 ;; Fixme: set the args of functions in evaluated classes to string 489 ;; Fixme: set the args of functions in evaluated classes to string
468 ;; syntax, and then obey syntax properties. 490 ;; syntax, and then obey syntax properties.
469 (setq imenu-generic-expression cfengine-imenu-expression) 491 (setq imenu-generic-expression cfengine2-imenu-expression)
470 (set (make-local-variable 'beginning-of-defun-function) 492 (set (make-local-variable 'beginning-of-defun-function)
471 #'cfengine-beginning-of-defun) 493 #'cfengine2-beginning-of-defun)
472 (set (make-local-variable 'end-of-defun-function) #'cfengine-end-of-defun)) 494 (set (make-local-variable 'end-of-defun-function) #'cfengine2-end-of-defun))
473 495
474;;;###autoload 496;;;###autoload
475(defun cfengine-auto-mode () 497(defun cfengine-auto-mode ()
476 "Choose between `cfengine-mode' and `cfengine3-mode' depending 498 "Choose between `cfengine2-mode' and `cfengine3-mode' depending
477on the buffer contents" 499on the buffer contents"
478 (let ((v3 nil)) 500 (let ((v3 nil))
479 (save-restriction 501 (save-restriction
@@ -481,7 +503,9 @@ on the buffer contents"
481 (while (not (or (eobp) v3)) 503 (while (not (or (eobp) v3))
482 (setq v3 (looking-at (concat cfengine3-defuns-regex "\\>"))) 504 (setq v3 (looking-at (concat cfengine3-defuns-regex "\\>")))
483 (forward-line))) 505 (forward-line)))
484 (if v3 (cfengine3-mode) (cfengine-mode)))) 506 (if v3 (cfengine3-mode) (cfengine2-mode))))
507
508(defalias 'cfengine-mode 'cfengine-auto-mode)
485 509
486(provide 'cfengine3) 510(provide 'cfengine3)
487(provide 'cfengine) 511(provide 'cfengine)
diff --git a/lisp/progmodes/cperl-mode.el b/lisp/progmodes/cperl-mode.el
index 13fa310106c..86284eaa30a 100644
--- a/lisp/progmodes/cperl-mode.el
+++ b/lisp/progmodes/cperl-mode.el
@@ -958,7 +958,7 @@ B) Speed of editing operations.
958 `cperl-array-face' Array names 958 `cperl-array-face' Array names
959 `cperl-hash-face' Hash names 959 `cperl-hash-face' Hash names
960 `font-lock-comment-face' Comments, PODs and whatever is considered 960 `font-lock-comment-face' Comments, PODs and whatever is considered
961 syntaxically to be not code 961 syntactically to be not code
962 `font-lock-constant-face' HERE-doc delimiters, labels, delimiters of 962 `font-lock-constant-face' HERE-doc delimiters, labels, delimiters of
963 2-arg operators s/y/tr/ or of RExen, 963 2-arg operators s/y/tr/ or of RExen,
964 `font-lock-warning-face' Special-cased m// and s//foo/, 964 `font-lock-warning-face' Special-cased m// and s//foo/,
@@ -970,7 +970,7 @@ B) Speed of editing operations.
970 `cperl-nonoverridable-face' Non-overridable keywords, modifiers of RExen 970 `cperl-nonoverridable-face' Non-overridable keywords, modifiers of RExen
971 `font-lock-string-face' Strings, qw() constructs, RExen, POD sections, 971 `font-lock-string-face' Strings, qw() constructs, RExen, POD sections,
972 literal parts and the terminator of formats 972 literal parts and the terminator of formats
973 and whatever is syntaxically considered 973 and whatever is syntactically considered
974 as string literals 974 as string literals
975 `font-lock-type-face' Overridable keywords 975 `font-lock-type-face' Overridable keywords
976 `font-lock-variable-name-face' Variable declarations, indirect array and 976 `font-lock-variable-name-face' Variable declarations, indirect array and
@@ -1537,8 +1537,8 @@ default.) You can always quote (with \\[quoted-insert]) the left
1537since most the time you mean \"less\". CPerl mode tries to guess 1537since most the time you mean \"less\". CPerl mode tries to guess
1538whether you want to type pair <>, and inserts is if it 1538whether you want to type pair <>, and inserts is if it
1539appropriate. You can set `cperl-electric-parens-string' to the string that 1539appropriate. You can set `cperl-electric-parens-string' to the string that
1540contains the parenths from the above list you want to be electrical. 1540contains the parens from the above list you want to be electrical.
1541Electricity of parenths is controlled by `cperl-electric-parens'. 1541Electricity of parens is controlled by `cperl-electric-parens'.
1542You may also set `cperl-electric-parens-mark' to have electric parens 1542You may also set `cperl-electric-parens-mark' to have electric parens
1543look for active mark and \"embrace\" a region if possible.' 1543look for active mark and \"embrace\" a region if possible.'
1544 1544
@@ -3517,7 +3517,7 @@ Works before syntax recognition is done."
3517(defvar font-lock-warning-face) 3517(defvar font-lock-warning-face)
3518 3518
3519(defun cperl-find-sub-attrs (&optional st-l b-fname e-fname pos) 3519(defun cperl-find-sub-attrs (&optional st-l b-fname e-fname pos)
3520 "Syntaxically mark (and fontify) attributes of a subroutine. 3520 "Syntactically mark (and fontify) attributes of a subroutine.
3521Should be called with the point before leading colon of an attribute." 3521Should be called with the point before leading colon of an attribute."
3522 ;; Works *before* syntax recognition is done 3522 ;; Works *before* syntax recognition is done
3523 (or st-l (setq st-l (list nil))) ; Avoid overwriting '() 3523 (or st-l (setq st-l (list nil))) ; Avoid overwriting '()
@@ -4994,7 +4994,7 @@ conditional/loop constructs."
4994 (setq top (point)) 4994 (setq top (point))
4995 ;; Plan A: if line has an unfinished paren-group, go to end-of-group 4995 ;; Plan A: if line has an unfinished paren-group, go to end-of-group
4996 (while (= -1 (nth 0 (parse-partial-sexp (point) tmp-end -1))) 4996 (while (= -1 (nth 0 (parse-partial-sexp (point) tmp-end -1)))
4997 (setq top (point))) ; Get the outermost parenths in line 4997 (setq top (point))) ; Get the outermost parens in line
4998 (goto-char top) 4998 (goto-char top)
4999 (while (< (point) tmp-end) 4999 (while (< (point) tmp-end)
5000 (parse-partial-sexp (point) tmp-end nil t) ; To start-sexp or eol 5000 (parse-partial-sexp (point) tmp-end nil t) ; To start-sexp or eol
@@ -5906,7 +5906,7 @@ indentation and initial hashes. Behaves usually outside of comment."
5906 3 font-lock-variable-name-face))) 5906 3 font-lock-variable-name-face)))
5907 '("\\<for\\(each\\)?\\([ \t]+\\(my\\|local\\|our\\)\\)?[ \t]*\\(\\$[a-zA-Z_][a-zA-Z_0-9]*\\)[ \t]*(" 5907 '("\\<for\\(each\\)?\\([ \t]+\\(my\\|local\\|our\\)\\)?[ \t]*\\(\\$[a-zA-Z_][a-zA-Z_0-9]*\\)[ \t]*("
5908 4 font-lock-variable-name-face) 5908 4 font-lock-variable-name-face)
5909 ;; Avoid $!, and s!!, qq!! etc. when not fontifying syntaxically 5909 ;; Avoid $!, and s!!, qq!! etc. when not fontifying syntactically
5910 '("\\(?:^\\|[^smywqrx$]\\)\\(!\\)" 1 font-lock-negation-char-face) 5910 '("\\(?:^\\|[^smywqrx$]\\)\\(!\\)" 1 font-lock-negation-char-face)
5911 '("\\[\\(\\^\\)" 1 font-lock-negation-char-face prepend))) 5911 '("\\[\\(\\^\\)" 1 font-lock-negation-char-face prepend)))
5912 (setq 5912 (setq
diff --git a/lisp/progmodes/dcl-mode.el b/lisp/progmodes/dcl-mode.el
index d855861d552..eeb145e2b1a 100644
--- a/lisp/progmodes/dcl-mode.el
+++ b/lisp/progmodes/dcl-mode.el
@@ -708,7 +708,7 @@ Returns point of the found command line or nil if not able to move."
708 (setq done t) ; not a label-only line, exit the loop 708 (setq done t) ; not a label-only line, exit the loop
709 (setq retval (point)))) 709 (setq retval (point))))
710 ;; We couldn't go further back, and we haven't found a command yet. 710 ;; We couldn't go further back, and we haven't found a command yet.
711 ;; Return to the start positionn 711 ;; Return to the start position.
712 (goto-char start) 712 (goto-char start)
713 (setq done t) 713 (setq done t)
714 (setq retval nil))) 714 (setq retval nil)))
@@ -756,7 +756,7 @@ Returns point of the found command line or nil if not able to move."
756 (setq done t) ; not a label-only line, exit the loop 756 (setq done t) ; not a label-only line, exit the loop
757 (setq retval (point))))) 757 (setq retval (point)))))
758 ;; We couldn't go further back, and we haven't found a command yet. 758 ;; We couldn't go further back, and we haven't found a command yet.
759 ;; Return to the start positionn 759 ;; Return to the start position.
760 (goto-char start) 760 (goto-char start)
761 (setq done t) 761 (setq done t)
762 (setq retval nil))) 762 (setq retval nil)))
diff --git a/lisp/progmodes/ebnf2ps.el b/lisp/progmodes/ebnf2ps.el
index d9adff6c8b8..240deb39ce3 100644
--- a/lisp/progmodes/ebnf2ps.el
+++ b/lisp/progmodes/ebnf2ps.el
@@ -3260,7 +3260,7 @@ See documentation for `ebnf-terminal-shape', `ebnf-non-terminal-shape' and
3260 3260
3261% --- Corners 3261% --- Corners
3262 3262
3263%>corner Right Descendent: height arrow corner_RD 3263%>corner Right Descendant: height arrow corner_RD
3264% _ | arrow 3264% _ | arrow
3265% / height > 0 | 0 - none 3265% / height > 0 | 0 - none
3266% | | 1 - right 3266% | | 1 - right
@@ -3299,7 +3299,7 @@ See documentation for `ebnf-terminal-shape', `ebnf-non-terminal-shape' and
3299 Gstroke 3299 Gstroke
3300}def 3300}def
3301 3301
3302%>corner Right Ascendent: height arrow corner_RA 3302%>corner Right Ascendant: height arrow corner_RA
3303% | arrow 3303% | arrow
3304% | height > 0 | 0 - none 3304% | height > 0 | 0 - none
3305% / | 1 - right 3305% / | 1 - right
@@ -3338,7 +3338,7 @@ See documentation for `ebnf-terminal-shape', `ebnf-non-terminal-shape' and
3338 Gstroke 3338 Gstroke
3339}def 3339}def
3340 3340
3341%>corner Left Descendent: height arrow corner_LD 3341%>corner Left Descendant: height arrow corner_LD
3342% _ | arrow 3342% _ | arrow
3343% \\ height > 0 | 0 - none 3343% \\ height > 0 | 0 - none
3344% | | 1 - right 3344% | | 1 - right
@@ -3377,7 +3377,7 @@ See documentation for `ebnf-terminal-shape', `ebnf-non-terminal-shape' and
3377 Gstroke 3377 Gstroke
3378}def 3378}def
3379 3379
3380%>corner Left Ascendent: height arrow corner_LA 3380%>corner Left Ascendant: height arrow corner_LA
3381% | arrow 3381% | arrow
3382% | height > 0 | 0 - none 3382% | height > 0 | 0 - none
3383% \\ | 1 - right 3383% \\ | 1 - right
diff --git a/lisp/progmodes/gdb-mi.el b/lisp/progmodes/gdb-mi.el
index ab40dff24f1..1c38c59bba6 100644
--- a/lisp/progmodes/gdb-mi.el
+++ b/lisp/progmodes/gdb-mi.el
@@ -811,6 +811,9 @@ detailed description of this mode.
811 (define-key gud-minor-mode-map [left-margin C-mouse-3] 811 (define-key gud-minor-mode-map [left-margin C-mouse-3]
812 'gdb-mouse-jump) 812 'gdb-mouse-jump)
813 813
814 (set (make-local-variable 'gud-gdb-completion-function)
815 'gud-gdbmi-completions)
816
814 (add-hook 'completion-at-point-functions #'gud-gdb-completion-at-point 817 (add-hook 'completion-at-point-functions #'gud-gdb-completion-at-point
815 nil 'local) 818 nil 'local)
816 (local-set-key "\C-i" 'completion-at-point) 819 (local-set-key "\C-i" 'completion-at-point)
@@ -859,31 +862,28 @@ detailed description of this mode.
859 (set-process-filter (get-process "gdb-inferior") 'gdb-inferior-filter) 862 (set-process-filter (get-process "gdb-inferior") 'gdb-inferior-filter)
860 (gdb-input 863 (gdb-input
861 ;; Needs GDB 6.4 onwards 864 ;; Needs GDB 6.4 onwards
862 (list (concat "-inferior-tty-set " 865 (concat "-inferior-tty-set "
863 (or 866 (or
864 ;; The process can run on a remote host. 867 ;; The process can run on a remote host.
865 (process-get (get-process "gdb-inferior") 'remote-tty) 868 (process-get (get-process "gdb-inferior") 'remote-tty)
866 (process-tty-name (get-process "gdb-inferior")))) 869 (process-tty-name (get-process "gdb-inferior"))))
867 'ignore)) 870 'ignore)
868 (if (eq window-system 'w32) 871 (if (eq window-system 'w32)
869 (gdb-input (list "-gdb-set new-console off" 'ignore))) 872 (gdb-input "-gdb-set new-console off" 'ignore))
870 (gdb-input (list "-gdb-set height 0" 'ignore)) 873 (gdb-input "-gdb-set height 0" 'ignore)
871 874
872 (when gdb-non-stop 875 (when gdb-non-stop
873 (gdb-input (list "-gdb-set non-stop 1" 'gdb-non-stop-handler))) 876 (gdb-input "-gdb-set non-stop 1" 'gdb-non-stop-handler))
874 877
875 (gdb-input (list "-enable-pretty-printing" 'ignore)) 878 (gdb-input "-enable-pretty-printing" 'ignore)
876 879
877 ;; find source file and compilation directory here 880 ;; find source file and compilation directory here
878 (if gdb-create-source-file-list 881 (if gdb-create-source-file-list
879 (gdb-input 882 ;; Needs GDB 6.2 onwards.
880 ; Needs GDB 6.2 onwards. 883 (gdb-input "-file-list-exec-source-files" 'gdb-get-source-file-list))
881 (list "-file-list-exec-source-files" 'gdb-get-source-file-list))) 884 ;; Needs GDB 6.0 onwards.
882 (gdb-input 885 (gdb-input "-file-list-exec-source-file" 'gdb-get-source-file)
883 ; Needs GDB 6.0 onwards. 886 (gdb-input "-gdb-show prompt" 'gdb-get-prompt))
884 (list "-file-list-exec-source-file" 'gdb-get-source-file))
885 (gdb-input
886 (list "-gdb-show prompt" 'gdb-get-prompt)))
887 887
888(defun gdb-non-stop-handler () 888(defun gdb-non-stop-handler ()
889 (goto-char (point-min)) 889 (goto-char (point-min))
@@ -894,8 +894,8 @@ detailed description of this mode.
894 (setq gdb-non-stop nil) 894 (setq gdb-non-stop nil)
895 (setq gdb-supports-non-stop nil)) 895 (setq gdb-supports-non-stop nil))
896 (setq gdb-supports-non-stop t) 896 (setq gdb-supports-non-stop t)
897 (gdb-input (list "-gdb-set target-async 1" 'ignore)) 897 (gdb-input "-gdb-set target-async 1" 'ignore)
898 (gdb-input (list "-list-target-features" 'gdb-check-target-async)))) 898 (gdb-input "-list-target-features" 'gdb-check-target-async)))
899 899
900(defun gdb-check-target-async () 900(defun gdb-check-target-async ()
901 (goto-char (point-min)) 901 (goto-char (point-min))
@@ -903,7 +903,7 @@ detailed description of this mode.
903 (message 903 (message
904 "Target doesn't support non-stop mode. Turning it off.") 904 "Target doesn't support non-stop mode. Turning it off.")
905 (setq gdb-non-stop nil) 905 (setq gdb-non-stop nil)
906 (gdb-input (list "-gdb-set non-stop 0" 'ignore)))) 906 (gdb-input "-gdb-set non-stop 0" 'ignore)))
907 907
908(defvar gdb-define-alist nil "Alist of #define directives for GUD tooltips.") 908(defvar gdb-define-alist nil "Alist of #define directives for GUD tooltips.")
909 909
@@ -948,9 +948,8 @@ detailed description of this mode.
948 (goto-char (point-min)) 948 (goto-char (point-min))
949 (if (search-forward "expands to: " nil t) 949 (if (search-forward "expands to: " nil t)
950 (unless (looking-at "\\S-+.*(.*).*") 950 (unless (looking-at "\\S-+.*(.*).*")
951 (gdb-input 951 (gdb-input (concat "-data-evaluate-expression " expr)
952 (list (concat "-data-evaluate-expression " expr) 952 `(lambda () (gdb-tooltip-print ,expr)))))))
953 `(lambda () (gdb-tooltip-print ,expr))))))))
954 953
955(defun gdb-init-buffer () 954(defun gdb-init-buffer ()
956 (set (make-local-variable 'gud-minor-mode) 'gdbmi) 955 (set (make-local-variable 'gud-minor-mode) 'gdbmi)
@@ -1080,9 +1079,8 @@ With arg, enter name of variable to be watched in the minibuffer."
1080 (concat (if (derived-mode-p 'gdb-registers-mode) "$") 1079 (concat (if (derived-mode-p 'gdb-registers-mode) "$")
1081 (tooltip-identifier-from-point (point))))))) 1080 (tooltip-identifier-from-point (point)))))))
1082 (set-text-properties 0 (length expr) nil expr) 1081 (set-text-properties 0 (length expr) nil expr)
1083 (gdb-input 1082 (gdb-input (concat "-var-create - * " expr "")
1084 (list (concat "-var-create - * " expr "") 1083 `(lambda () (gdb-var-create-handler ,expr))))))
1085 `(lambda () (gdb-var-create-handler ,expr)))))))
1086 (message "gud-watch is a no-op in this mode.")))) 1084 (message "gud-watch is a no-op in this mode."))))
1087 1085
1088(defun gdb-var-create-handler (expr) 1086(defun gdb-var-create-handler (expr)
@@ -1111,7 +1109,7 @@ With arg, enter name of variable to be watched in the minibuffer."
1111 (when (and (boundp 'speedbar-frame) (frame-live-p speedbar-frame) 1109 (when (and (boundp 'speedbar-frame) (frame-live-p speedbar-frame)
1112 (not (gdb-pending-p 'gdb-speedbar-timer))) 1110 (not (gdb-pending-p 'gdb-speedbar-timer)))
1113 ;; Dummy command to update speedbar even when idle. 1111 ;; Dummy command to update speedbar even when idle.
1114 (gdb-input (list "-environment-pwd" 'gdb-speedbar-timer-fn)) 1112 (gdb-input "-environment-pwd" 'gdb-speedbar-timer-fn)
1115 ;; Keep gdb-pending-triggers non-nil till end. 1113 ;; Keep gdb-pending-triggers non-nil till end.
1116 (gdb-add-pending 'gdb-speedbar-timer))) 1114 (gdb-add-pending 'gdb-speedbar-timer)))
1117 1115
@@ -1132,12 +1130,9 @@ With arg, enter name of variable to be watched in the minibuffer."
1132 1130
1133 ; Uses "-var-list-children --all-values". Needs GDB 6.1 onwards. 1131 ; Uses "-var-list-children --all-values". Needs GDB 6.1 onwards.
1134(defun gdb-var-list-children (varnum) 1132(defun gdb-var-list-children (varnum)
1135 (gdb-input 1133 (gdb-input (concat "-var-update " varnum) 'ignore)
1136 (list (concat "-var-update " varnum) 'ignore)) 1134 (gdb-input (concat "-var-list-children --all-values " varnum)
1137 (gdb-input 1135 `(lambda () (gdb-var-list-children-handler ,varnum))))
1138 (list (concat "-var-list-children --all-values "
1139 varnum)
1140 `(lambda () (gdb-var-list-children-handler ,varnum)))))
1141 1136
1142(defun gdb-var-list-children-handler (varnum) 1137(defun gdb-var-list-children-handler (varnum)
1143 (let* ((var-list nil) 1138 (let* ((var-list nil)
@@ -1169,13 +1164,11 @@ With arg, enter name of variable to be watched in the minibuffer."
1169 "Set the output format for a variable displayed in the speedbar." 1164 "Set the output format for a variable displayed in the speedbar."
1170 (let* ((var (nth (- (count-lines (point-min) (point)) 2) gdb-var-list)) 1165 (let* ((var (nth (- (count-lines (point-min) (point)) 2) gdb-var-list))
1171 (varnum (car var))) 1166 (varnum (car var)))
1172 (gdb-input 1167 (gdb-input (concat "-var-set-format " varnum " " format) 'ignore)
1173 (list (concat "-var-set-format " varnum " " format) 'ignore))
1174 (gdb-var-update))) 1168 (gdb-var-update)))
1175 1169
1176(defun gdb-var-delete-1 (var varnum) 1170(defun gdb-var-delete-1 (var varnum)
1177 (gdb-input 1171 (gdb-input (concat "-var-delete " varnum) 'ignore)
1178 (list (concat "-var-delete " varnum) 'ignore))
1179 (setq gdb-var-list (delq var gdb-var-list)) 1172 (setq gdb-var-list (delq var gdb-var-list))
1180 (dolist (varchild gdb-var-list) 1173 (dolist (varchild gdb-var-list)
1181 (if (string-match (concat (car var) "\\.") (car varchild)) 1174 (if (string-match (concat (car var) "\\.") (car varchild))
@@ -1194,17 +1187,15 @@ With arg, enter name of variable to be watched in the minibuffer."
1194 1187
1195(defun gdb-var-delete-children (varnum) 1188(defun gdb-var-delete-children (varnum)
1196 "Delete children of variable object at point from the speedbar." 1189 "Delete children of variable object at point from the speedbar."
1197 (gdb-input 1190 (gdb-input (concat "-var-delete -c " varnum) 'ignore))
1198 (list (concat "-var-delete -c " varnum) 'ignore)))
1199 1191
1200(defun gdb-edit-value (_text _token _indent) 1192(defun gdb-edit-value (_text _token _indent)
1201 "Assign a value to a variable displayed in the speedbar." 1193 "Assign a value to a variable displayed in the speedbar."
1202 (let* ((var (nth (- (count-lines (point-min) (point)) 2) gdb-var-list)) 1194 (let* ((var (nth (- (count-lines (point-min) (point)) 2) gdb-var-list))
1203 (varnum (car var)) (value)) 1195 (varnum (car var)) (value))
1204 (setq value (read-string "New value: ")) 1196 (setq value (read-string "New value: "))
1205 (gdb-input 1197 (gdb-input (concat "-var-assign " varnum " " value)
1206 (list (concat "-var-assign " varnum " " value) 1198 `(lambda () (gdb-edit-value-handler ,value)))))
1207 `(lambda () (gdb-edit-value-handler ,value))))))
1208 1199
1209(defconst gdb-error-regexp "\\^error,msg=\\(\".+\"\\)") 1200(defconst gdb-error-regexp "\\^error,msg=\\(\".+\"\\)")
1210 1201
@@ -1216,8 +1207,7 @@ With arg, enter name of variable to be watched in the minibuffer."
1216 ; Uses "-var-update --all-values". Needs GDB 6.4 onwards. 1207 ; Uses "-var-update --all-values". Needs GDB 6.4 onwards.
1217(defun gdb-var-update () 1208(defun gdb-var-update ()
1218 (if (not (gdb-pending-p 'gdb-var-update)) 1209 (if (not (gdb-pending-p 'gdb-var-update))
1219 (gdb-input 1210 (gdb-input "-var-update --all-values *" 'gdb-var-update-handler))
1220 (list "-var-update --all-values *" 'gdb-var-update-handler)))
1221 (gdb-add-pending 'gdb-var-update)) 1211 (gdb-add-pending 'gdb-var-update))
1222 1212
1223(defun gdb-var-update-handler () 1213(defun gdb-var-update-handler ()
@@ -1697,13 +1687,17 @@ static char *magick[] = {
1697 gdb-continuation string "\"\n")) 1687 gdb-continuation string "\"\n"))
1698 (setq gdb-continuation nil)))) 1688 (setq gdb-continuation nil))))
1699 1689
1700(defun gdb-input (item) 1690(defun gdb-input (command handler-function)
1701 (if gdb-enable-debug (push (cons 'send-item item) gdb-debug-log)) 1691 "Send COMMAND to GDB via the MI interface.
1692Run the function HANDLER-FUNCTION, with no arguments, once the command is
1693complete."
1694 (if gdb-enable-debug (push (list 'send-item command handler-function)
1695 gdb-debug-log))
1702 (setq gdb-token-number (1+ gdb-token-number)) 1696 (setq gdb-token-number (1+ gdb-token-number))
1703 (setcar item (concat (number-to-string gdb-token-number) (car item))) 1697 (setq command (concat (number-to-string gdb-token-number) command))
1704 (push (cons gdb-token-number (car (cdr item))) gdb-handler-alist) 1698 (push (cons gdb-token-number handler-function) gdb-handler-alist)
1705 (process-send-string (get-buffer-process gud-comint-buffer) 1699 (process-send-string (get-buffer-process gud-comint-buffer)
1706 (concat (car item) "\n"))) 1700 (concat command "\n")))
1707 1701
1708;; NOFRAME is used for gud execution control commands 1702;; NOFRAME is used for gud execution control commands
1709(defun gdb-current-context-command (command) 1703(defun gdb-current-context-command (command)
@@ -1890,15 +1884,16 @@ is running."
1890 (let ((record-type (cadr output-record)) 1884 (let ((record-type (cadr output-record))
1891 (arg1 (nth 2 output-record)) 1885 (arg1 (nth 2 output-record))
1892 (arg2 (nth 3 output-record))) 1886 (arg2 (nth 3 output-record)))
1893 (if (eq record-type 'gdb-error) 1887 (cond ((eq record-type 'gdb-error)
1894 (gdb-done-or-error arg2 arg1 'error) 1888 (gdb-done-or-error arg2 arg1 'error))
1895 (if (eq record-type 'gdb-done) 1889 ((eq record-type 'gdb-done)
1896 (gdb-done-or-error arg2 arg1 'done) 1890 (gdb-done-or-error arg2 arg1 'done))
1897 ;; Suppress "No registers." since GDB 6.8 and earlier duplicates MI 1891 ;; Suppress "No registers." GDB 6.8 and earlier
1898 ;; error message on internal stream. Don't print to GUD buffer. 1892 ;; duplicates MI error message on internal stream.
1899 (unless (and (eq record-type 'gdb-internals) 1893 ;; Don't print to GUD buffer.
1900 (string-equal (read arg1) "No registers.\n")) 1894 ((not (and (eq record-type 'gdb-internals)
1901 (funcall record-type arg1)))))) 1895 (string-equal (read arg1) "No registers.\n")))
1896 (funcall record-type arg1)))))
1902 1897
1903 (setq gdb-output-sink 'user) 1898 (setq gdb-output-sink 'user)
1904 ;; Remove padding. 1899 ;; Remove padding.
@@ -1991,11 +1986,10 @@ current thread and update GDB buffers."
1991 ;; -data-list-register-names needs to be issued for any stopped 1986 ;; -data-list-register-names needs to be issued for any stopped
1992 ;; thread 1987 ;; thread
1993 (when (not gdb-register-names) 1988 (when (not gdb-register-names)
1994 (gdb-input 1989 (gdb-input (concat "-data-list-register-names"
1995 (list (concat "-data-list-register-names" 1990 (if gdb-supports-non-stop
1996 (if gdb-supports-non-stop 1991 (concat " --thread " thread-id)))
1997 (concat " --thread " thread-id))) 1992 'gdb-register-names-handler))
1998 'gdb-register-names-handler)))
1999 1993
2000;;; Don't set gud-last-frame here as it's currently done in gdb-frame-handler 1994;;; Don't set gud-last-frame here as it's currently done in gdb-frame-handler
2001;;; because synchronous GDB doesn't give these fields with CLI. 1995;;; because synchronous GDB doesn't give these fields with CLI.
@@ -2062,9 +2056,7 @@ current thread and update GDB buffers."
2062;; (frontend MI commands should not print to this stream) 2056;; (frontend MI commands should not print to this stream)
2063(defun gdb-console (output-field) 2057(defun gdb-console (output-field)
2064 (setq gdb-filter-output 2058 (setq gdb-filter-output
2065 (gdb-concat-output 2059 (gdb-concat-output gdb-filter-output (read output-field))))
2066 gdb-filter-output
2067 (read output-field))))
2068 2060
2069(defun gdb-done-or-error (output-field token-number type) 2061(defun gdb-done-or-error (output-field token-number type)
2070 (if (string-equal token-number "") 2062 (if (string-equal token-number "")
@@ -2102,12 +2094,11 @@ current thread and update GDB buffers."
2102 (assq-delete-all token-number gdb-handler-alist))))) 2094 (assq-delete-all token-number gdb-handler-alist)))))
2103 2095
2104(defun gdb-concat-output (so-far new) 2096(defun gdb-concat-output (so-far new)
2105 (let ((sink gdb-output-sink)) 2097 (cond
2106 (cond 2098 ((eq gdb-output-sink 'user) (concat so-far new))
2107 ((eq sink 'user) (concat so-far new)) 2099 ((eq gdb-output-sink 'emacs)
2108 ((eq sink 'emacs) 2100 (gdb-append-to-partial-output new)
2109 (gdb-append-to-partial-output new) 2101 so-far)))
2110 so-far))))
2111 2102
2112(defun gdb-append-to-partial-output (string) 2103(defun gdb-append-to-partial-output (string)
2113 (with-current-buffer (gdb-get-buffer-create 'gdb-partial-output-buffer) 2104 (with-current-buffer (gdb-get-buffer-create 'gdb-partial-output-buffer)
@@ -2317,9 +2308,8 @@ trigger argument when describing buffer types with
2317 (memq signal ,signal-list)) 2308 (memq signal ,signal-list))
2318 (when (not (gdb-pending-p 2309 (when (not (gdb-pending-p
2319 (cons (current-buffer) ',trigger-name))) 2310 (cons (current-buffer) ',trigger-name)))
2320 (gdb-input 2311 (gdb-input ,gdb-command
2321 (list ,gdb-command 2312 (gdb-bind-function-to-buffer ',handler-name (current-buffer)))
2322 (gdb-bind-function-to-buffer ',handler-name (current-buffer))))
2323 (gdb-add-pending (cons (current-buffer) ',trigger-name)))))) 2313 (gdb-add-pending (cons (current-buffer) ',trigger-name))))))
2324 2314
2325;; Used by disassembly buffer only, the rest use 2315;; Used by disassembly buffer only, the rest use
@@ -2446,13 +2436,10 @@ HANDLER-NAME handler uses customization of CUSTOM-DEFUN. See
2446 ;; Only want one breakpoint icon at each location. 2436 ;; Only want one breakpoint icon at each location.
2447 (gdb-put-breakpoint-icon (string-equal flag "y") bptno 2437 (gdb-put-breakpoint-icon (string-equal flag "y") bptno
2448 (string-to-number line))) 2438 (string-to-number line)))
2449 (gdb-input 2439 (gdb-input (concat "list " file ":1") 'ignore)
2450 (list (concat "list " file ":1") 2440 (gdb-input "-file-list-exec-source-file"
2451 'ignore)) 2441 `(lambda () (gdb-get-location
2452 (gdb-input 2442 ,bptno ,line ,flag)))))))))
2453 (list "-file-list-exec-source-file"
2454 `(lambda () (gdb-get-location
2455 ,bptno ,line ,flag))))))))))
2456 2443
2457(defvar gdb-source-file-regexp "fullname=\"\\(.*?\\)\"") 2444(defvar gdb-source-file-regexp "fullname=\"\\(.*?\\)\"")
2458 2445
@@ -2782,7 +2769,7 @@ on the current line."
2782(def-gdb-thread-buffer-command gdb-select-thread 2769(def-gdb-thread-buffer-command gdb-select-thread
2783 (let ((new-id (bindat-get-field thread 'id))) 2770 (let ((new-id (bindat-get-field thread 'id)))
2784 (gdb-setq-thread-number new-id) 2771 (gdb-setq-thread-number new-id)
2785 (gdb-input (list (concat "-thread-select " new-id) 'ignore)) 2772 (gdb-input (concat "-thread-select " new-id) 'ignore)
2786 (gdb-update)) 2773 (gdb-update))
2787 "Select the thread at current line of threads buffer.") 2774 "Select the thread at current line of threads buffer.")
2788 2775
@@ -3538,8 +3525,8 @@ member."
3538 (if (gdb-buffer-shows-main-thread-p) 3525 (if (gdb-buffer-shows-main-thread-p)
3539 (let ((new-level (bindat-get-field frame 'level))) 3526 (let ((new-level (bindat-get-field frame 'level)))
3540 (setq gdb-frame-number new-level) 3527 (setq gdb-frame-number new-level)
3541 (gdb-input (list (concat "-stack-select-frame " new-level) 3528 (gdb-input (concat "-stack-select-frame " new-level)
3542 'ignore)) 3529 'ignore)
3543 (gdb-update)) 3530 (gdb-update))
3544 (error "Could not select frame for non-current thread")) 3531 (error "Could not select frame for non-current thread"))
3545 (error "Not recognized as frame line")))) 3532 (error "Not recognized as frame line"))))
@@ -3767,14 +3754,11 @@ member."
3767 3754
3768;; Needs GDB 6.4 onwards (used to fail with no stack). 3755;; Needs GDB 6.4 onwards (used to fail with no stack).
3769(defun gdb-get-changed-registers () 3756(defun gdb-get-changed-registers ()
3770 (if (and (gdb-get-buffer 'gdb-registers-buffer) 3757 (when (and (gdb-get-buffer 'gdb-registers-buffer)
3771 (not (gdb-pending-p 'gdb-get-changed-registers))) 3758 (not (gdb-pending-p 'gdb-get-changed-registers)))
3772 (progn 3759 (gdb-input "-data-list-changed-registers"
3773 (gdb-input 3760 'gdb-changed-registers-handler)
3774 (list 3761 (gdb-add-pending 'gdb-get-changed-registers)))
3775 "-data-list-changed-registers"
3776 'gdb-changed-registers-handler))
3777 (gdb-add-pending 'gdb-get-changed-registers))))
3778 3762
3779(defun gdb-changed-registers-handler () 3763(defun gdb-changed-registers-handler ()
3780 (gdb-delete-pending 'gdb-get-changed-registers) 3764 (gdb-delete-pending 'gdb-get-changed-registers)
@@ -3803,18 +3787,15 @@ is set in them."
3803 (dolist (buffer (buffer-list)) 3787 (dolist (buffer (buffer-list))
3804 (with-current-buffer buffer 3788 (with-current-buffer buffer
3805 (when (member buffer-file-name gdb-source-file-list) 3789 (when (member buffer-file-name gdb-source-file-list)
3806 (gdb-init-buffer)))) 3790 (gdb-init-buffer)))))
3807 (gdb-force-mode-line-update
3808 (propertize "ready" 'face font-lock-variable-name-face)))
3809 3791
3810(defun gdb-get-main-selected-frame () 3792(defun gdb-get-main-selected-frame ()
3811 "Trigger for `gdb-frame-handler' which uses main current 3793 "Trigger for `gdb-frame-handler' which uses main current
3812thread. Called from `gdb-update'." 3794thread. Called from `gdb-update'."
3813 (if (not (gdb-pending-p 'gdb-get-main-selected-frame)) 3795 (if (not (gdb-pending-p 'gdb-get-main-selected-frame))
3814 (progn 3796 (progn
3815 (gdb-input 3797 (gdb-input (gdb-current-context-command "-stack-info-frame")
3816 (list (gdb-current-context-command "-stack-info-frame") 3798 'gdb-frame-handler)
3817 'gdb-frame-handler))
3818 (gdb-add-pending 'gdb-get-main-selected-frame)))) 3799 (gdb-add-pending 'gdb-get-main-selected-frame))))
3819 3800
3820(defun gdb-frame-handler () 3801(defun gdb-frame-handler ()
@@ -3862,7 +3843,7 @@ overlay arrow in source buffer."
3862If BUF is already displayed in some window, show it, deiconifying 3843If BUF is already displayed in some window, show it, deiconifying
3863the frame if necessary. Otherwise, find least recently used 3844the frame if necessary. Otherwise, find least recently used
3864window and show BUF there, if the window is not used for GDB 3845window and show BUF there, if the window is not used for GDB
3865already, in which case that window is splitted first." 3846already, in which case that window is split first."
3866 (let ((answer (get-buffer-window buf (or frame 0)))) 3847 (let ((answer (get-buffer-window buf (or frame 0))))
3867 (if answer 3848 (if answer
3868 (display-buffer buf nil (or frame 0)) ;Deiconify frame if necessary. 3849 (display-buffer buf nil (or frame 0)) ;Deiconify frame if necessary.
@@ -4145,7 +4126,9 @@ buffers, if required."
4145 (gdb-get-buffer-create 'gdb-breakpoints-buffer) 4126 (gdb-get-buffer-create 'gdb-breakpoints-buffer)
4146 (if (and gdb-show-main gdb-main-file) 4127 (if (and gdb-show-main gdb-main-file)
4147 (let ((pop-up-windows t)) 4128 (let ((pop-up-windows t))
4148 (display-buffer (gud-find-file gdb-main-file)))))) 4129 (display-buffer (gud-find-file gdb-main-file)))))
4130 (gdb-force-mode-line-update
4131 (propertize "ready" 'face font-lock-variable-name-face)))
4149 4132
4150;;from put-image 4133;;from put-image
4151(defun gdb-put-string (putstring pos &optional dprop &rest sprops) 4134(defun gdb-put-string (putstring pos &optional dprop &rest sprops)
@@ -4256,6 +4239,42 @@ BUFFER nil or omitted means use the current buffer."
4256 (set-window-margins 4239 (set-window-margins
4257 window left-margin-width right-margin-width))))) 4240 window left-margin-width right-margin-width)))))
4258 4241
4242
4243;;; Functions for inline completion.
4244
4245(defvar gud-gdb-fetch-lines-in-progress)
4246(defvar gud-gdb-fetch-lines-string)
4247(defvar gud-gdb-fetch-lines-break)
4248(defvar gud-gdb-fetched-lines)
4249
4250(defun gud-gdbmi-completions (context command)
4251 "Completion table for GDB/MI commands.
4252COMMAND is the prefix for which we seek completion.
4253CONTEXT is the text before COMMAND on the line."
4254 (let ((gud-gdb-fetch-lines-in-progress t)
4255 (gud-gdb-fetch-lines-string nil)
4256 (gud-gdb-fetch-lines-break (length context))
4257 (gud-gdb-fetched-lines nil)
4258 ;; This filter dumps output lines to `gud-gdb-fetched-lines'.
4259 (gud-marker-filter #'gud-gdbmi-fetch-lines-filter)
4260 complete-list)
4261 (with-current-buffer (gdb-get-buffer 'gdb-partial-output-buffer)
4262 (gdb-input (concat "complete " context command)
4263 (lambda () (setq gud-gdb-fetch-lines-in-progress nil)))
4264 (while gud-gdb-fetch-lines-in-progress
4265 (accept-process-output (get-buffer-process gud-comint-buffer))))
4266 (gud-gdb-completions-1 gud-gdb-fetched-lines)))
4267
4268(defun gud-gdbmi-fetch-lines-filter (string)
4269 "Custom filter function for `gud-gdbmi-completions'."
4270 (setq string (concat gud-gdb-fetch-lines-string
4271 (gud-gdbmi-marker-filter string)))
4272 (while (string-match "\n" string)
4273 (push (substring string gud-gdb-fetch-lines-break (match-beginning 0))
4274 gud-gdb-fetched-lines)
4275 (setq string (substring string (match-end 0))))
4276 "")
4277
4259(provide 'gdb-mi) 4278(provide 'gdb-mi)
4260 4279
4261;;; gdb-mi.el ends here 4280;;; gdb-mi.el ends here
diff --git a/lisp/progmodes/grep.el b/lisp/progmodes/grep.el
index 75d71d2d8a9..38b17a9b1ee 100644
--- a/lisp/progmodes/grep.el
+++ b/lisp/progmodes/grep.el
@@ -108,7 +108,7 @@ To change the default value, use Customize or call the function
108 108
109Setting it causes the grep commands to put point at the end of their 109Setting it causes the grep commands to put point at the end of their
110output window so that the end of the output is always visible rather 110output window so that the end of the output is always visible rather
111than the begining." 111than the beginning."
112 :type 'boolean 112 :type 'boolean
113 :version "22.1" 113 :version "22.1"
114 :group 'grep) 114 :group 'grep)
@@ -959,7 +959,10 @@ can use \\[next-error] (M-x next-error), or \\<grep-mode-map>\\[compile-goto-err
959in the grep output buffer, 959in the grep output buffer,
960to go to the lines where grep found matches. 960to go to the lines where grep found matches.
961 961
962This command shares argument histories with \\[lgrep] and \\[grep-find]." 962This command shares argument histories with \\[lgrep] and \\[grep-find].
963
964When called programmatically and FILES is nil, REGEXP is expected
965to specify a command to run."
963 (interactive 966 (interactive
964 (progn 967 (progn
965 (grep-compute-defaults) 968 (grep-compute-defaults)
diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el
index 406db76487d..7215ac4ea73 100644
--- a/lisp/progmodes/gud.el
+++ b/lisp/progmodes/gud.el
@@ -756,6 +756,8 @@ directory and source-file directory for your debugger."
756 756
757 (add-hook 'completion-at-point-functions #'gud-gdb-completion-at-point 757 (add-hook 'completion-at-point-functions #'gud-gdb-completion-at-point
758 nil 'local) 758 nil 'local)
759 (set (make-local-variable 'gud-gdb-completion-function) 'gud-gdb-completions)
760
759 (local-set-key "\C-i" 'completion-at-point) 761 (local-set-key "\C-i" 'completion-at-point)
760 (setq comint-prompt-regexp "^(.*gdb[+]?) *") 762 (setq comint-prompt-regexp "^(.*gdb[+]?) *")
761 (setq paragraph-start comint-prompt-regexp) 763 (setq paragraph-start comint-prompt-regexp)
@@ -768,6 +770,12 @@ directory and source-file directory for your debugger."
768;; context-sensitive command completion. We preserve that feature 770;; context-sensitive command completion. We preserve that feature
769;; in the GUD buffer by using a GDB command designed just for Emacs. 771;; in the GUD buffer by using a GDB command designed just for Emacs.
770 772
773(defvar gud-gdb-completion-function nil
774 "Completion function for GDB commands.
775It receives two arguments: COMMAND, the prefix for which we seek
776completion; and CONTEXT, the text before COMMAND on the line.
777It should return a list of completion strings.")
778
771;; The completion process filter indicates when it is finished. 779;; The completion process filter indicates when it is finished.
772(defvar gud-gdb-fetch-lines-in-progress) 780(defvar gud-gdb-fetch-lines-in-progress)
773 781
@@ -806,28 +814,32 @@ CONTEXT is the text before COMMAND on the line."
806 (and complete-list 814 (and complete-list
807 (string-match "^Undefined command: \"complete\"" (car complete-list)) 815 (string-match "^Undefined command: \"complete\"" (car complete-list))
808 (error "This version of GDB doesn't support the `complete' command")) 816 (error "This version of GDB doesn't support the `complete' command"))
809 ;; Sort the list like readline. 817 (gud-gdb-completions-1 complete-list)))
810 (setq complete-list (sort complete-list (function string-lessp))) 818
811 ;; Remove duplicates. 819;; This function is also used by `gud-gdbmi-completions'.
812 (let ((first complete-list) 820(defun gud-gdb-completions-1 (complete-list)
813 (second (cdr complete-list))) 821 ;; Sort the list like readline.
814 (while second 822 (setq complete-list (sort complete-list (function string-lessp)))
815 (if (string-equal (car first) (car second)) 823 ;; Remove duplicates.
816 (setcdr first (setq second (cdr second))) 824 (let ((first complete-list)
817 (setq first second 825 (second (cdr complete-list)))
818 second (cdr second))))) 826 (while second
819 ;; Add a trailing single quote if there is a unique completion 827 (if (string-equal (car first) (car second))
820 ;; and it contains an odd number of unquoted single quotes. 828 (setcdr first (setq second (cdr second)))
821 (and (= (length complete-list) 1) 829 (setq first second
822 (let ((str (car complete-list)) 830 second (cdr second)))))
823 (pos 0) 831 ;; Add a trailing single quote if there is a unique completion
824 (count 0)) 832 ;; and it contains an odd number of unquoted single quotes.
825 (while (string-match "\\([^'\\]\\|\\\\'\\)*'" str pos) 833 (and (= (length complete-list) 1)
826 (setq count (1+ count) 834 (let ((str (car complete-list))
827 pos (match-end 0))) 835 (pos 0)
828 (and (= (mod count 2) 1) 836 (count 0))
829 (setq complete-list (list (concat str "'")))))) 837 (while (string-match "\\([^'\\]\\|\\\\'\\)*'" str pos)
830 complete-list)) 838 (setq count (1+ count)
839 pos (match-end 0)))
840 (and (= (mod count 2) 1)
841 (setq complete-list (list (concat str "'"))))))
842 complete-list)
831 843
832(defun gud-gdb-completion-at-point () 844(defun gud-gdb-completion-at-point ()
833 "Return the data to complete the GDB command before point." 845 "Return the data to complete the GDB command before point."
@@ -838,7 +850,7 @@ CONTEXT is the text before COMMAND on the line."
838 (point)))) 850 (point))))
839 (list start end 851 (list start end
840 (completion-table-dynamic 852 (completion-table-dynamic
841 (apply-partially #'gud-gdb-completions 853 (apply-partially gud-gdb-completion-function
842 (buffer-substring (comint-line-beginning-position) 854 (buffer-substring (comint-line-beginning-position)
843 start)))))) 855 start))))))
844 856
@@ -851,11 +863,11 @@ CONTEXT is the text before COMMAND on the line."
851 863
852;; The completion process filter is installed temporarily to slurp the 864;; The completion process filter is installed temporarily to slurp the
853;; output of GDB up to the next prompt and build the completion list. 865;; output of GDB up to the next prompt and build the completion list.
854(defun gud-gdb-fetch-lines-filter (string filter) 866(defun gud-gdb-fetch-lines-filter (string)
855 "Filter used to read the list of lines output by a command. 867 "Filter used to read the list of lines output by a command.
856STRING is the output to filter. 868STRING is the output to filter.
857It is passed through FILTER before we look at it." 869It is passed through `gud-gdb-marker-filter' before we look at it."
858 (setq string (funcall filter string)) 870 (setq string (gud-gdb-marker-filter string))
859 (setq string (concat gud-gdb-fetch-lines-string string)) 871 (setq string (concat gud-gdb-fetch-lines-string string))
860 (while (string-match "\n" string) 872 (while (string-match "\n" string)
861 (push (substring string gud-gdb-fetch-lines-break (match-beginning 0)) 873 (push (substring string gud-gdb-fetch-lines-break (match-beginning 0))
@@ -880,17 +892,6 @@ It is passed through FILTER before we look at it."
880(defvar gud-gdb-fetched-stack-frame nil 892(defvar gud-gdb-fetched-stack-frame nil
881 "Stack frames we are fetching from GDB.") 893 "Stack frames we are fetching from GDB.")
882 894
883;(defun gud-gdb-get-scope-data (text token indent)
884; ;; checkdoc-params: (indent)
885; "Fetch data associated with a stack frame, and expand/contract it.
886;Data to do this is retrieved from TEXT and TOKEN."
887; (let ((args nil) (scope nil))
888; (gud-gdb-run-command-fetch-lines "info args")
889;
890; (gud-gdb-run-command-fetch-lines "info local")
891;
892; ))
893
894(defun gud-gdb-get-stackframe (buffer) 895(defun gud-gdb-get-stackframe (buffer)
895 "Extract the current stack frame out of the GUD GDB BUFFER." 896 "Extract the current stack frame out of the GUD GDB BUFFER."
896 (let ((newlst nil) 897 (let ((newlst nil)
@@ -934,21 +935,16 @@ It is passed through FILTER before we look at it."
934BUFFER is the current buffer which may be the GUD buffer in which to run. 935BUFFER is the current buffer which may be the GUD buffer in which to run.
935SKIP is the number of chars to skip on each line, it defaults to 0." 936SKIP is the number of chars to skip on each line, it defaults to 0."
936 (with-current-buffer gud-comint-buffer 937 (with-current-buffer gud-comint-buffer
937 (if (and (eq gud-comint-buffer buffer) 938 (unless (and (eq gud-comint-buffer buffer)
938 (save-excursion 939 (save-excursion
939 (goto-char (point-max)) 940 (goto-char (point-max))
940 (forward-line 0) 941 (forward-line 0)
941 (not (looking-at comint-prompt-regexp)))) 942 (not (looking-at comint-prompt-regexp))))
942 nil
943 ;; Much of this copied from GDB complete, but I'm grabbing the stack
944 ;; frame instead.
945 (let ((gud-gdb-fetch-lines-in-progress t) 943 (let ((gud-gdb-fetch-lines-in-progress t)
946 (gud-gdb-fetched-lines nil) 944 (gud-gdb-fetched-lines nil)
947 (gud-gdb-fetch-lines-string nil) 945 (gud-gdb-fetch-lines-string nil)
948 (gud-gdb-fetch-lines-break (or skip 0)) 946 (gud-gdb-fetch-lines-break (or skip 0))
949 (gud-marker-filter 947 (gud-marker-filter #'gud-gdb-fetch-lines-filter))
950 `(lambda (string)
951 (gud-gdb-fetch-lines-filter string ',gud-marker-filter))))
952 ;; Issue the command to GDB. 948 ;; Issue the command to GDB.
953 (gud-basic-call command) 949 (gud-basic-call command)
954 ;; Slurp the output. 950 ;; Slurp the output.
@@ -1919,7 +1915,7 @@ extension EXTN. Normally EXTN is given as the regular expression
1919;; in petticoat junction. 1915;; in petticoat junction.
1920(defun gud-jdb-skip-block () 1916(defun gud-jdb-skip-block ()
1921 1917
1922 ;; Find the begining of the block. 1918 ;; Find the beginning of the block.
1923 (while 1919 (while
1924 (not (eq (following-char) ?{)) 1920 (not (eq (following-char) ?{))
1925 1921
@@ -1936,7 +1932,7 @@ extension EXTN. Normally EXTN is given as the regular expression
1936 (gud-jdb-skip-character-literal)) 1932 (gud-jdb-skip-character-literal))
1937 (t (forward-char)))) 1933 (t (forward-char))))
1938 1934
1939 ;; Now at the begining of the block. 1935 ;; Now at the beginning of the block.
1940 (forward-char) 1936 (forward-char)
1941 1937
1942 ;; Skip over the body of the block as well as the final brace. 1938 ;; Skip over the body of the block as well as the final brace.
@@ -3422,7 +3418,7 @@ With arg, dereference expr if ARG is positive, otherwise do not dereference."
3422 ((xdb pdb) (concat "p " expr)) 3418 ((xdb pdb) (concat "p " expr))
3423 (sdb (concat expr "/")))) 3419 (sdb (concat expr "/"))))
3424 3420
3425(declare-function gdb-input "gdb-mi" (item)) 3421(declare-function gdb-input "gdb-mi" (command handler))
3426(declare-function tooltip-expr-to-print "tooltip" (event)) 3422(declare-function tooltip-expr-to-print "tooltip" (event))
3427(declare-function tooltip-event-buffer "tooltip" (event)) 3423(declare-function tooltip-event-buffer "tooltip" (event))
3428 3424
@@ -3468,12 +3464,12 @@ so they have been disabled."))
3468 (if (eq gud-minor-mode 'gdbmi) 3464 (if (eq gud-minor-mode 'gdbmi)
3469 (if gdb-macro-info 3465 (if gdb-macro-info
3470 (gdb-input 3466 (gdb-input
3471 (list (concat 3467 (concat
3472 "server macro expand " expr "\n") 3468 "server macro expand " expr "\n")
3473 `(lambda () (gdb-tooltip-print-1 ,expr)))) 3469 `(lambda () (gdb-tooltip-print-1 ,expr)))
3474 (gdb-input 3470 (gdb-input
3475 (list (concat cmd "\n") 3471 (concat cmd "\n")
3476 `(lambda () (gdb-tooltip-print ,expr))))) 3472 `(lambda () (gdb-tooltip-print ,expr))))
3477 (setq gud-tooltip-original-filter (process-filter process)) 3473 (setq gud-tooltip-original-filter (process-filter process))
3478 (set-process-filter process 'gud-tooltip-process-output) 3474 (set-process-filter process 'gud-tooltip-process-output)
3479 (gud-basic-call cmd)) 3475 (gud-basic-call cmd))
diff --git a/lisp/progmodes/hideif.el b/lisp/progmodes/hideif.el
index 374a45acec6..82961376669 100644
--- a/lisp/progmodes/hideif.el
+++ b/lisp/progmodes/hideif.el
@@ -822,7 +822,7 @@ Point is left unchanged."
822 822
823(defun hif-possibly-hide () 823(defun hif-possibly-hide ()
824 "Called at #ifX expression, this hides those parts that should be hidden. 824 "Called at #ifX expression, this hides those parts that should be hidden.
825It uses the judgement of `hide-ifdef-evaluator'." 825It uses the judgment of `hide-ifdef-evaluator'."
826 ;; (message "hif-possibly-hide") (sit-for 1) 826 ;; (message "hif-possibly-hide") (sit-for 1)
827 (let ((test (hif-canonicalize)) 827 (let ((test (hif-canonicalize))
828 (range (hif-find-range))) 828 (range (hif-find-range)))
diff --git a/lisp/progmodes/idlwave.el b/lisp/progmodes/idlwave.el
index d8715599d74..6ce415b563d 100644
--- a/lisp/progmodes/idlwave.el
+++ b/lisp/progmodes/idlwave.el
@@ -2464,7 +2464,7 @@ If prefix ARG < 0 then move forward to enclosing block end."
2464(defun idlwave-down-block (&optional arg) 2464(defun idlwave-down-block (&optional arg)
2465 "Go down a block. 2465 "Go down a block.
2466With ARG: ARG >= 0 go forwards, ARG < 0 go backwards. 2466With ARG: ARG >= 0 go forwards, ARG < 0 go backwards.
2467Returns non-nil if successfull." 2467Returns non-nil if successful."
2468 (interactive "p") 2468 (interactive "p")
2469 (let (status) 2469 (let (status)
2470 (if (< arg 0) 2470 (if (< arg 0)
@@ -7866,7 +7866,7 @@ itself."
7866 "Display online help about the completion at point." 7866 "Display online help about the completion at point."
7867 (interactive "eP") 7867 (interactive "eP")
7868 ;; Restore last-command for next command, to make 7868 ;; Restore last-command for next command, to make
7869 ;; scrolling/cancelling of completions work. 7869 ;; scrolling/canceling of completions work.
7870 (setq this-command last-command) 7870 (setq this-command last-command)
7871 (idlwave-do-mouse-completion-help ev)) 7871 (idlwave-do-mouse-completion-help ev))
7872 7872
diff --git a/lisp/progmodes/inf-lisp.el b/lisp/progmodes/inf-lisp.el
index 1328e303d45..dd24aeea9a3 100644
--- a/lisp/progmodes/inf-lisp.el
+++ b/lisp/progmodes/inf-lisp.el
@@ -36,7 +36,7 @@
36;; This makes these modes easier to use. 36;; This makes these modes easier to use.
37 37
38;; For documentation on the functionality provided by comint mode, and 38;; For documentation on the functionality provided by comint mode, and
39;; the hooks available for customising it, see the file comint.el. 39;; the hooks available for customizing it, see the file comint.el.
40;; For further information on inferior-lisp mode, see the comments below. 40;; For further information on inferior-lisp mode, see the comments below.
41 41
42;; Needs fixin: 42;; Needs fixin:
diff --git a/lisp/progmodes/js.el b/lisp/progmodes/js.el
index 94a9c250fee..f0c86265232 100644
--- a/lisp/progmodes/js.el
+++ b/lisp/progmodes/js.el
@@ -3000,7 +3000,7 @@ browser, respectively."
3000 '(js> ((fifth hitab) "selectedTab") (fourth hitab)) 3000 '(js> ((fifth hitab) "selectedTab") (fourth hitab))
3001 cmds))) 3001 cmds)))
3002 3002
3003 ;; Hilighting whole window 3003 ;; Highlighting whole window
3004 ((third hitab) 3004 ((third hitab)
3005 (push '(js! ((third hitab) "document" 3005 (push '(js! ((third hitab) "document"
3006 "documentElement" "setAttribute") 3006 "documentElement" "setAttribute")
diff --git a/lisp/progmodes/make-mode.el b/lisp/progmodes/make-mode.el
index c1a87a9d033..024744957c6 100644
--- a/lisp/progmodes/make-mode.el
+++ b/lisp/progmodes/make-mode.el
@@ -315,25 +315,32 @@ not be enclosed in { } or ( )."
315 "List of keywords understood by automake.") 315 "List of keywords understood by automake.")
316 316
317(defconst makefile-gmake-statements 317(defconst makefile-gmake-statements
318 `("-sinclude" "sinclude" "vpath" ; makefile-makepp-statements takes rest 318 `("-sinclude" "sinclude" ; makefile-makepp-statements takes rest
319 "ifdef" "ifndef" "ifeq" "ifneq" "-include" "define" "endef" "export" 319 "ifdef" "ifndef" "ifeq" "ifneq" "-include" "define" "endef" "export"
320 "override define" "override" "unexport" 320 "override define" "override" "unexport" "vpath"
321 ,@(cdr makefile-automake-statements)) 321 ,@(cdr makefile-automake-statements))
322 "List of keywords understood by gmake.") 322 "List of keywords understood by gmake.")
323 323
324;; These are even more silly, because you can have more spaces in between.
325(defconst makefile-makepp-statements 324(defconst makefile-makepp-statements
326 `("and ifdef" "and ifndef" "and ifeq" "and ifneq" "and ifperl" 325 `(t ; - alternately means _
327 "and ifmakeperl" "and ifsys" "and ifnsys" "build_cache" "build_check" 326 ;; todo: take if* out of these lists, and let the negation regexp do it all
327 "ifperl" "ifmakeperl" "ifsys" "ifnsys" "iftrue" "ifntrue"
328 "and ifdef" "and ifndef" "and ifeq" "and ifneq" "and ifperl"
329 "and ifmakeperl" "and ifsys" "and ifnsys" "and iftrue" "and ifntrue"
328 "else ifdef" "else ifndef" "else ifeq" "else ifneq" "else ifperl" 330 "else ifdef" "else ifndef" "else ifeq" "else ifneq" "else ifperl"
329 "else ifmakeperl" "else ifsys" "else ifnsys" "enddef" "global" 331 "else ifmakeperl" "else ifsys" "else ifnsys" "else iftrue" "else ifntrue"
330 "load_makefile" "ifperl" "ifmakeperl" "ifsys" "ifnsys" "_include" 332 "or ifdef" "or ifndef" "or ifeq" "or ifneq" "or ifperl"
331 "makeperl" "makesub" "no_implicit_load" "perl" "perl-begin" "perl_begin" 333 "or ifmakeperl" "or ifsys" "or ifnsys" "or iftrue" "or ifntrue"
332 "perl-end" "perl_end" "prebuild" "or ifdef" "or ifndef" "or ifeq" 334
333 "or ifneq" "or ifperl" "or ifmakeperl" "or ifsys" "or ifnsys" 335 "autoload" "build-cache" "build-check" "enddef" "export define"
334 "override export" "override global" "register_command_parser" 336 "global" "global build-cache" "global build-check" "global define"
335 "register_scanner" "repository" "runtime" "signature" "sub" 337 "global signature" "global override signature" "load-makefile"
336 ,@(nthcdr 3 makefile-gmake-statements)) 338 "make" "makeperl" "makesub" "no-implicit-load" "perl" "perl-begin"
339 "perl-end" "prebuild" "override export" "override global" "register-parser"
340 "register-command-parser" "register-input-suffix"
341 "register-scanner" "repository" "runtime" "signature" "sub"
342
343 ,@(nthcdr 2 makefile-gmake-statements))
337 "List of keywords understood by gmake.") 344 "List of keywords understood by gmake.")
338 345
339(defconst makefile-bsdmake-statements 346(defconst makefile-bsdmake-statements
@@ -372,7 +379,12 @@ not be enclosed in { } or ( )."
372 379
373 ;; Fontify conditionals and includes. 380 ;; Fontify conditionals and includes.
374 (,(concat "^\\(?: [ \t]*\\)?" 381 (,(concat "^\\(?: [ \t]*\\)?"
375 (regexp-opt keywords t) 382 (replace-regexp-in-string
383 " " "[ \t]+"
384 (if (eq (car keywords) t)
385 (replace-regexp-in-string "-" "[_-]"
386 (regexp-opt (cdr keywords) t))
387 (regexp-opt keywords t)))
376 "\\>[ \t]*\\([^: \t\n#]*\\)") 388 "\\>[ \t]*\\([^: \t\n#]*\\)")
377 (1 font-lock-keyword-face) (2 font-lock-variable-name-face)) 389 (1 font-lock-keyword-face) (2 font-lock-variable-name-face))
378 390
@@ -436,7 +448,7 @@ not be enclosed in { } or ( )."
436 makefile-var-use-regex 448 makefile-var-use-regex
437 makefile-makepp-statements 449 makefile-makepp-statements
438 nil 450 nil
439 "^\\(?: [ \t]*\\)?\\(?:and[ \t]+\\|else[ \t]+\\|or[ \t]+\\)?if\\(n\\)\\(?:def\\|eq\\|sys\\)\\>" 451 "^\\(?: [ \t]*\\)?\\(?:and[ \t]+\\|else[ \t]+\\|or[ \t]+\\)?if\\(n\\)\\(?:def\\|eq\\|sys\\|true\\)\\>"
440 452
441 '("[^$]\\(\\$[({]\\(?:output\\|stem\\|target\\)s?\\_>.*?[})]\\)" 453 '("[^$]\\(\\$[({]\\(?:output\\|stem\\|target\\)s?\\_>.*?[})]\\)"
442 1 'makefile-targets append) 454 1 'makefile-targets append)
@@ -447,17 +459,17 @@ not be enclosed in { } or ( )."
447 (2 font-lock-keyword-face t) 459 (2 font-lock-keyword-face t)
448 (3 font-lock-variable-name-face t)) 460 (3 font-lock-variable-name-face t))
449 461
450 ;; $(function ...) $((function ...)) ${function ...} ${{function ...}} 462 ;; $(function ...) $((function ...)) ${...} ${{...}} $[...] $[[...]]
451 '("[^$]\\$\\(?:((?\\|{{?\\)\\([-a-zA-Z0-9_.]+\\s \\)" 463 '("[^$]\\$\\(?:((?\\|{{?\\|\\[\\[?\\)\\([-a-zA-Z0-9_.]+\\s \\)"
452 1 font-lock-function-name-face prepend) 464 1 font-lock-function-name-face prepend)
453 465
454 ;; $(shell ...) $((shell ...)) ${shell ...} ${{shell ...}} 466 ;; $(shell ...) $((shell ...)) ${...} ${{...}} $[...] $[[...]]
455 '("[^$]\\$\\(((?\\|{{?\\)shell\\(?:[-_]\\(?:global[-_]\\)?once\\)?[ \t]+" 467 '("[^$]\\$\\(((?\\|{{?\\|\\[\\[?\\)shell\\(?:[-_]\\(?:global[-_]\\)?once\\)?[ \t]+"
456 makefile-match-function-end nil nil 468 makefile-match-function-end nil nil
457 (1 'makefile-shell prepend t)) 469 (1 'makefile-shell prepend t))
458 470
459 ;; $(perl ...) $((perl ...)) ${perl ...} ${{perl ...}} 471 ;; $(perl ...) $((perl ...)) ${...} ${{...}} $[...] $[[...]]
460 '("[^$]\\$\\(((?\\|{{?\\)makeperl[ \t]+" 472 '("[^$]\\$\\(((?\\|{{?\\|\\[\\[?\\)makeperl[ \t]+"
461 makefile-match-function-end nil nil 473 makefile-match-function-end nil nil
462 (1 'makefile-makepp-perl prepend t)) 474 (1 'makefile-makepp-perl prepend t))
463 '("[^$]\\$\\(((?\\|{{?\\)perl[ \t]+" 475 '("[^$]\\$\\(((?\\|{{?\\)perl[ \t]+"
@@ -1688,8 +1700,10 @@ The anchor must have matched the opening parens in the first group."
1688 ;; FIXME forward-sexp or somesuch would be better? 1700 ;; FIXME forward-sexp or somesuch would be better?
1689 (if (setq s (cond ((string= s "(") ")") 1701 (if (setq s (cond ((string= s "(") ")")
1690 ((string= s "{") "}") 1702 ((string= s "{") "}")
1703 ((string= s "[") "]")
1691 ((string= s "((") "))") 1704 ((string= s "((") "))")
1692 ((string= s "{{") "}}"))) 1705 ((string= s "{{") "}}")
1706 ((string= s "[[") "]]")))
1693 (re-search-forward (concat "\\(.*\\)[ \t]*" s) (line-end-position) t)))) 1707 (re-search-forward (concat "\\(.*\\)[ \t]*" s) (line-end-position) t))))
1694 1708
1695(defun makefile-match-dependency (bound) 1709(defun makefile-match-dependency (bound)
diff --git a/lisp/progmodes/pascal.el b/lisp/progmodes/pascal.el
index b1502adbeb1..2db4309d9e0 100644
--- a/lisp/progmodes/pascal.el
+++ b/lisp/progmodes/pascal.el
@@ -786,6 +786,7 @@ on the line which ends a function or procedure named NAME."
786 (if (looking-at "[ \t]+$") 786 (if (looking-at "[ \t]+$")
787 (skip-chars-forward " \t")))) 787 (skip-chars-forward " \t"))))
788 788
789(defvar ind) ;Used via `eval' in pascal-indent-alist.
789(defun pascal-indent-line () 790(defun pascal-indent-line ()
790 "Indent current line as a Pascal statement." 791 "Indent current line as a Pascal statement."
791 (let* ((indent-str (pascal-calculate-indent)) 792 (let* ((indent-str (pascal-calculate-indent))
diff --git a/lisp/progmodes/prolog.el b/lisp/progmodes/prolog.el
index 5b229cc0c24..0efc2ca231b 100644
--- a/lisp/progmodes/prolog.el
+++ b/lisp/progmodes/prolog.el
@@ -147,9 +147,9 @@
147;; o Introduced three new customizable variables: electric colon 147;; o Introduced three new customizable variables: electric colon
148;; (`prolog-electric-colon-flag', default nil), electric dash 148;; (`prolog-electric-colon-flag', default nil), electric dash
149;; (`prolog-electric-dash-flag', default nil), and a possibility 149;; (`prolog-electric-dash-flag', default nil), and a possibility
150;; to prevent the predicate template insertion from adding commata 150;; to prevent the predicate template insertion from adding commas
151;; (`prolog-electric-dot-full-predicate-template', defaults to t 151;; (`prolog-electric-dot-full-predicate-template', defaults to t
152;; since it seems quicker to me to just type those commata). A 152;; since it seems quicker to me to just type those commas). A
153;; trivial adaptation of a patch by Markus Triska. 153;; trivial adaptation of a patch by Markus Triska.
154;; o Improved the behavior of electric if-then-else to only skip 154;; o Improved the behavior of electric if-then-else to only skip
155;; forward if the parenthesis/semicolon is preceded by 155;; forward if the parenthesis/semicolon is preceded by
@@ -512,7 +512,7 @@ It does not apply in strings and comments."
512(defcustom prolog-electric-dot-full-predicate-template nil 512(defcustom prolog-electric-dot-full-predicate-template nil
513 "*If nil, electric dot inserts only the current predicate's name and `(' 513 "*If nil, electric dot inserts only the current predicate's name and `('
514for recursive calls or new clause heads. Non-nil means to also 514for recursive calls or new clause heads. Non-nil means to also
515insert enough commata to cover the predicate's arity and `)', 515insert enough commas to cover the predicate's arity and `)',
516and dot and newline for recursive calls." 516and dot and newline for recursive calls."
517 :group 'prolog-keyboard 517 :group 'prolog-keyboard
518 :type 'boolean) 518 :type 'boolean)
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el
index fbf7c3c42f7..6081d8e838b 100644
--- a/lisp/progmodes/python.el
+++ b/lisp/progmodes/python.el
@@ -2343,7 +2343,7 @@ Interactively, prompt for the name with completion."
2343;;;; Bicycle Repair Man support 2343;;;; Bicycle Repair Man support
2344 2344
2345(autoload 'pymacs-load "pymacs" nil t) 2345(autoload 'pymacs-load "pymacs" nil t)
2346(autoload 'brm-init "bikemacs") 2346(autoload 'brm-init "bikeemacs")
2347(defvar brm-menu) 2347(defvar brm-menu)
2348 2348
2349;; I'm not sure how useful BRM really is, and it's certainly dangerous 2349;; I'm not sure how useful BRM really is, and it's certainly dangerous
diff --git a/lisp/progmodes/sql.el b/lisp/progmodes/sql.el
index 03e095b6bfc..60ba768a80e 100644
--- a/lisp/progmodes/sql.el
+++ b/lisp/progmodes/sql.el
@@ -4224,7 +4224,7 @@ The default comes from `process-coding-system-alist' and
4224 "^\\(.+\\) (hex ..)$" 4224 "^\\(.+\\) (hex ..)$"
4225 "SET \\1") 4225 "SET \\1")
4226 4226
4227 ;; FEDDBACK ON for 99 or more rows 4227 ;; FEEDBACK ON for 99 or more rows
4228 ;; feedback OFF 4228 ;; feedback OFF
4229 (sql-redirect-value 4229 (sql-redirect-value
4230 sqlbuf 4230 sqlbuf
diff --git a/lisp/progmodes/vera-mode.el b/lisp/progmodes/vera-mode.el
index b02324871ff..434984c8bf1 100644
--- a/lisp/progmodes/vera-mode.el
+++ b/lisp/progmodes/vera-mode.el
@@ -427,7 +427,7 @@ Key bindings:
427 "icompare" "insert" "inst_get_at_least" "inst_get_auto_bin_max" 427 "icompare" "insert" "inst_get_at_least" "inst_get_auto_bin_max"
428 "inst_get_collect" "inst_get_cov_weight" "inst_get_coverage_goal" 428 "inst_get_collect" "inst_get_cov_weight" "inst_get_coverage_goal"
429 "inst_getcross_bin_max" "inst_query" "inst_set_at_least" 429 "inst_getcross_bin_max" "inst_query" "inst_set_at_least"
430 "inst_set_auto_bin_max" "inst_set_bin_activiation" "inst_set_collect" 430 "inst_set_auto_bin_max" "inst_set_bin_activation" "inst_set_collect"
431 "inst_set_cov_weight" "inst_set_coverage_goal" "inst_set_cross_bin_max" 431 "inst_set_cov_weight" "inst_set_coverage_goal" "inst_set_cross_bin_max"
432 "itoa" 432 "itoa"
433 "last" "last_index" "len" "load" 433 "last" "last_index" "len" "load"
@@ -438,7 +438,7 @@ Key bindings:
438 "push_front" "putc" 438 "push_front" "putc"
439 "query" "query_str" 439 "query" "query_str"
440 "rand_mode" "randomize" "reserve" "reverse" "rsort" 440 "rand_mode" "randomize" "reserve" "reverse" "rsort"
441 "search" "set_at_least" "set_auto_bin_max" "set_bin_activiation" 441 "search" "set_at_least" "set_auto_bin_max" "set_bin_activation"
442 "set_cov_weight" "set_coverage_goal" "set_cross_bin_max" "set_name" "size" 442 "set_cov_weight" "set_coverage_goal" "set_cross_bin_max" "set_name" "size"
443 "sort" "substr" "sum" 443 "sort" "substr" "sum"
444 "thismatch" "tolower" "toupper" 444 "thismatch" "tolower" "toupper"
diff --git a/lisp/progmodes/verilog-mode.el b/lisp/progmodes/verilog-mode.el
index 3ae66a477e8..52e7b6e2429 100644
--- a/lisp/progmodes/verilog-mode.el
+++ b/lisp/progmodes/verilog-mode.el
@@ -981,7 +981,7 @@ of each Verilog file that requires it, rather than being set globally."
981 "*If true, AUTORESET will reset those signals which were 981 "*If true, AUTORESET will reset those signals which were
982assigned with blocking assignments (=) even in a block with 982assigned with blocking assignments (=) even in a block with
983non-blocking assignments (<=). 983non-blocking assignments (<=).
984 984
985If nil, all blocking assigned signals are ignored when any 985If nil, all blocking assigned signals are ignored when any
986non-blocking assignment is in the AUTORESET block. This allows 986non-blocking assignment is in the AUTORESET block. This allows
987blocking assignments to be used for temporary values and not have 987blocking assignments to be used for temporary values and not have
@@ -2011,7 +2011,7 @@ find the errors."
2011 "`uvm_component_utils" 2011 "`uvm_component_utils"
2012 "`uvm_create" 2012 "`uvm_create"
2013 "`uvm_create_on" 2013 "`uvm_create_on"
2014 "`uvm_create_seq" ;; Undocumented in 1.1 2014 "`uvm_create_seq" ;; Undocumented in 1.1
2015 "`uvm_declare_p_sequencer" 2015 "`uvm_declare_p_sequencer"
2016 "`uvm_declare_sequence_lib" ;; Deprecated in 1.1 2016 "`uvm_declare_sequence_lib" ;; Deprecated in 1.1
2017 "`uvm_do" 2017 "`uvm_do"
@@ -7505,7 +7505,7 @@ Signals must be in standard (base vector) form."
7505 (nreverse out-list))) 7505 (nreverse out-list)))
7506 7506
7507(defun verilog-signals-combine-bus (in-list) 7507(defun verilog-signals-combine-bus (in-list)
7508 "Return a list of signals in IN-LIST, with busses combined. 7508 "Return a list of signals in IN-LIST, with buses combined.
7509Duplicate signals are also removed. For example A[2] and A[1] become A[2:1]." 7509Duplicate signals are also removed. For example A[2] and A[1] become A[2:1]."
7510 (let (combo buswarn 7510 (let (combo buswarn
7511 out-list 7511 out-list
@@ -9907,7 +9907,7 @@ If optional WHITESPACE true, ignore whitespace."
9907 (p2 (with-current-buffer b2 (goto-char (point-min)))) 9907 (p2 (with-current-buffer b2 (goto-char (point-min))))
9908 (maxp1 (with-current-buffer b1 (point-max))) 9908 (maxp1 (with-current-buffer b1 (point-max)))
9909 (maxp2 (with-current-buffer b2 (point-max))) 9909 (maxp2 (with-current-buffer b2 (point-max)))
9910 (op1 -1) (op2 -1) 9910 (op1 -1) (op2 -1)
9911 progress size) 9911 progress size)
9912 (while (not (and (eq p1 op1) (eq p2 op2))) 9912 (while (not (and (eq p1 op1) (eq p2 op2)))
9913 ;; If both windows have whitespace optionally skip over it. 9913 ;; If both windows have whitespace optionally skip over it.
@@ -10100,7 +10100,7 @@ instantiating the resulting module. Long lines are split based
10100on the `fill-column', see \\[set-fill-column]. 10100on the `fill-column', see \\[set-fill-column].
10101 10101
10102Limitations: 10102Limitations:
10103 Concatenation and outputting partial busses is not supported. 10103 Concatenation and outputting partial buses is not supported.
10104 10104
10105 Typedefs must match `verilog-typedef-regexp', which is disabled by default. 10105 Typedefs must match `verilog-typedef-regexp', which is disabled by default.
10106 10106
@@ -10932,7 +10932,7 @@ Typing \\[verilog-auto] will make this into:
10932(defun verilog-auto-logic () 10932(defun verilog-auto-logic ()
10933 "Expand AUTOLOGIC statements, as part of \\[verilog-auto]. 10933 "Expand AUTOLOGIC statements, as part of \\[verilog-auto].
10934Make wire statements using the SystemVerilog logic keyword. 10934Make wire statements using the SystemVerilog logic keyword.
10935This is currently equivelent to: 10935This is currently equivalent to:
10936 10936
10937 /*AUTOWIRE*/ 10937 /*AUTOWIRE*/
10938 10938
@@ -10958,7 +10958,7 @@ the datatype of the declarations.
10958 10958
10959Limitations: 10959Limitations:
10960 This ONLY detects outputs of AUTOINSTants (see `verilog-read-sub-decls'), 10960 This ONLY detects outputs of AUTOINSTants (see `verilog-read-sub-decls'),
10961 and all busses must have widths, such as those from AUTOINST, or using [] 10961 and all buses must have widths, such as those from AUTOINST, or using []
10962 in AUTO_TEMPLATEs. 10962 in AUTO_TEMPLATEs.
10963 10963
10964 This does NOT work on memories or SystemVerilog .name connections, 10964 This does NOT work on memories or SystemVerilog .name connections,
@@ -11315,7 +11315,7 @@ Limitations:
11315 If placed inside the parenthesis of a module declaration, it creates 11315 If placed inside the parenthesis of a module declaration, it creates
11316 Verilog 2001 style, else uses Verilog 1995 style. 11316 Verilog 2001 style, else uses Verilog 1995 style.
11317 11317
11318 Concatenation and outputting partial busses is not supported. 11318 Concatenation and outputting partial buses is not supported.
11319 11319
11320 Module names must be resolvable to filenames. See `verilog-auto-inst'. 11320 Module names must be resolvable to filenames. See `verilog-auto-inst'.
11321 11321
@@ -11439,7 +11439,7 @@ Limitations:
11439 If placed inside the parenthesis of a module declaration, it creates 11439 If placed inside the parenthesis of a module declaration, it creates
11440 Verilog 2001 style, else uses Verilog 1995 style. 11440 Verilog 2001 style, else uses Verilog 1995 style.
11441 11441
11442 Concatenation and outputting partial busses is not supported. 11442 Concatenation and outputting partial buses is not supported.
11443 11443
11444 Module names must be resolvable to filenames. See `verilog-auto-inst'. 11444 Module names must be resolvable to filenames. See `verilog-auto-inst'.
11445 11445
@@ -11490,7 +11490,7 @@ Limitations:
11490 If placed inside the parenthesis of a module declaration, it creates 11490 If placed inside the parenthesis of a module declaration, it creates
11491 Verilog 2001 style, else uses Verilog 1995 style. 11491 Verilog 2001 style, else uses Verilog 1995 style.
11492 11492
11493 Concatenation and outputting partial busses is not supported. 11493 Concatenation and outputting partial buses is not supported.
11494 11494
11495 Module names must be resolvable to filenames. See `verilog-auto-inst'. 11495 Module names must be resolvable to filenames. See `verilog-auto-inst'.
11496 11496
diff --git a/lisp/progmodes/vhdl-mode.el b/lisp/progmodes/vhdl-mode.el
index 3a94601768d..deac85581d2 100644
--- a/lisp/progmodes/vhdl-mode.el
+++ b/lisp/progmodes/vhdl-mode.el
@@ -1714,7 +1714,7 @@ an absolute path (i.e. all caches can be stored in one global directory)."
1714 1714
1715 1715
1716(defgroup vhdl-menu nil 1716(defgroup vhdl-menu nil
1717 "Customizations for menues." 1717 "Customizations for menus."
1718 :group 'vhdl) 1718 :group 'vhdl)
1719 1719
1720(defcustom vhdl-index-menu nil 1720(defcustom vhdl-index-menu nil
@@ -1844,7 +1844,7 @@ NOTE: Activate the new setting in a VHDL buffer by using the menu entry
1844;; Internal variables 1844;; Internal variables
1845 1845
1846(defvar vhdl-menu-max-size 20 1846(defvar vhdl-menu-max-size 20
1847 "*Specifies the maximum size of a menu before splitting it into submenues.") 1847 "*Specifies the maximum size of a menu before splitting it into submenus.")
1848 1848
1849(defvar vhdl-progress-interval 1 1849(defvar vhdl-progress-interval 1
1850 "*Interval used to update progress status during long operations. 1850 "*Interval used to update progress status during long operations.
@@ -2468,7 +2468,7 @@ conversion."
2468 (goto-char marker)) 2468 (goto-char marker))
2469 2469
2470(defun vhdl-menu-split (list title) 2470(defun vhdl-menu-split (list title)
2471 "Split menu LIST into several submenues, if number of 2471 "Split menu LIST into several submenus, if number of
2472elements > `vhdl-menu-max-size'." 2472elements > `vhdl-menu-max-size'."
2473 (if (> (length list) vhdl-menu-max-size) 2473 (if (> (length list) vhdl-menu-max-size)
2474 (let ((remain list) 2474 (let ((remain list)
@@ -4266,7 +4266,7 @@ Usage:
4266 4266
4267 CODE BEAUTIFICATION: 4267 CODE BEAUTIFICATION:
4268 `C-c M-b' and `C-c C-b' beautify the code of a region or of the entire 4268 `C-c M-b' and `C-c C-b' beautify the code of a region or of the entire
4269 buffer respectively. This inludes indentation, alignment, and case 4269 buffer respectively. This includes indentation, alignment, and case
4270 fixing. Code beautification can also be run non-interactively using the 4270 fixing. Code beautification can also be run non-interactively using the
4271 command: 4271 command:
4272 4272
@@ -10812,7 +10812,7 @@ but not if inside a comment or quote."
10812 10812
10813(defvar vhdl-port-list nil 10813(defvar vhdl-port-list nil
10814 "Variable to hold last port map parsed.") 10814 "Variable to hold last port map parsed.")
10815;; structure: (parenthesised expression means list of such entries) 10815;; structure: (parenthesized expression means list of such entries)
10816;; (ent-name 10816;; (ent-name
10817;; ((generic-names) generic-type generic-init generic-comment group-comment) 10817;; ((generic-names) generic-type generic-init generic-comment group-comment)
10818;; ((port-names) port-object port-direct port-type port-comment group-comment) 10818;; ((port-names) port-object port-direct port-type port-comment group-comment)
@@ -11660,7 +11660,7 @@ reflected in a subsequent paste operation."
11660 11660
11661(defvar vhdl-subprog-list nil 11661(defvar vhdl-subprog-list nil
11662 "Variable to hold last subprogram interface parsed.") 11662 "Variable to hold last subprogram interface parsed.")
11663;; structure: (parenthesised expression means list of such entries) 11663;; structure: (parenthesized expression means list of such entries)
11664;; (subprog-name kind 11664;; (subprog-name kind
11665;; ((names) object direct type init comment group-comment) 11665;; ((names) object direct type init comment group-comment)
11666;; return-type return-comment group-comment) 11666;; return-type return-comment group-comment)
@@ -12971,7 +12971,7 @@ This does background highlighting of translate-off regions.")
12971(defvar vhdl-entity-alist nil 12971(defvar vhdl-entity-alist nil
12972 "Cache with entities and corresponding architectures for each 12972 "Cache with entities and corresponding architectures for each
12973project/directory.") 12973project/directory.")
12974;; structure: (parenthesised expression means list of such entries) 12974;; structure: (parenthesized expression means list of such entries)
12975;; (cache-key 12975;; (cache-key
12976;; (ent-key ent-name ent-file ent-line 12976;; (ent-key ent-name ent-file ent-line
12977;; (arch-key arch-name arch-file arch-line 12977;; (arch-key arch-name arch-file arch-line
@@ -12982,7 +12982,7 @@ project/directory.")
12982 12982
12983(defvar vhdl-config-alist nil 12983(defvar vhdl-config-alist nil
12984 "Cache with configurations for each project/directory.") 12984 "Cache with configurations for each project/directory.")
12985;; structure: (parenthesised expression means list of such entries) 12985;; structure: (parenthesized expression means list of such entries)
12986;; (cache-key 12986;; (cache-key
12987;; (conf-key conf-name conf-file conf-line ent-key arch-key 12987;; (conf-key conf-name conf-file conf-line ent-key arch-key
12988;; (inst-key inst-comp-name inst-ent-key inst-arch-key 12988;; (inst-key inst-comp-name inst-ent-key inst-arch-key
@@ -12991,7 +12991,7 @@ project/directory.")
12991 12991
12992(defvar vhdl-package-alist nil 12992(defvar vhdl-package-alist nil
12993 "Cache with packages for each project/directory.") 12993 "Cache with packages for each project/directory.")
12994;; structure: (parenthesised expression means list of such entries) 12994;; structure: (parenthesized expression means list of such entries)
12995;; (cache-key 12995;; (cache-key
12996;; (pack-key pack-name pack-file pack-line 12996;; (pack-key pack-name pack-file pack-line
12997;; (comp-key comp-name comp-file comp-line) 12997;; (comp-key comp-name comp-file comp-line)
@@ -13003,19 +13003,19 @@ project/directory.")
13003 13003
13004(defvar vhdl-ent-inst-alist nil 13004(defvar vhdl-ent-inst-alist nil
13005 "Cache with instantiated entities for each project/directory.") 13005 "Cache with instantiated entities for each project/directory.")
13006;; structure: (parenthesised expression means list of such entries) 13006;; structure: (parenthesized expression means list of such entries)
13007;; (cache-key (inst-ent-key)) 13007;; (cache-key (inst-ent-key))
13008 13008
13009(defvar vhdl-file-alist nil 13009(defvar vhdl-file-alist nil
13010 "Cache with design units in each file for each project/directory.") 13010 "Cache with design units in each file for each project/directory.")
13011;; structure: (parenthesised expression means list of such entries) 13011;; structure: (parenthesized expression means list of such entries)
13012;; (cache-key 13012;; (cache-key
13013;; (file-name (ent-list) (arch-list) (arch-ent-list) (conf-list) 13013;; (file-name (ent-list) (arch-list) (arch-ent-list) (conf-list)
13014;; (pack-list) (pack-body-list) (inst-list) (inst-ent-list)) 13014;; (pack-list) (pack-body-list) (inst-list) (inst-ent-list))
13015 13015
13016(defvar vhdl-directory-alist nil 13016(defvar vhdl-directory-alist nil
13017 "Cache with source directories for each project.") 13017 "Cache with source directories for each project.")
13018;; structure: (parenthesised expression means list of such entries) 13018;; structure: (parenthesized expression means list of such entries)
13019;; (cache-key (directory)) 13019;; (cache-key (directory))
13020 13020
13021(defvar vhdl-speedbar-shown-unit-alist nil 13021(defvar vhdl-speedbar-shown-unit-alist nil
@@ -13655,7 +13655,7 @@ of PROJECT."
13655 (vhdl-speedbar-update-current-unit) 13655 (vhdl-speedbar-update-current-unit)
13656 (when updated (message "Updating hierarchy...done"))))) 13656 (when updated (message "Updating hierarchy...done")))))
13657 13657
13658;; structure (parenthesised expression means list of such entries) 13658;; structure (parenthesized expression means list of such entries)
13659;; (inst-key inst-file-marker comp-ent-key comp-ent-file-marker 13659;; (inst-key inst-file-marker comp-ent-key comp-ent-file-marker
13660;; comp-arch-key comp-arch-file-marker comp-conf-key comp-conf-file-marker 13660;; comp-arch-key comp-arch-file-marker comp-conf-key comp-conf-file-marker
13661;; comp-lib-name level) 13661;; comp-lib-name level)
diff --git a/lisp/ps-mule.el b/lisp/ps-mule.el
index c8bdc271f5f..db5b57f8585 100644
--- a/lisp/ps-mule.el
+++ b/lisp/ps-mule.el
@@ -932,7 +932,7 @@ the sequence."
932 (list ps-mule-bitmap-prologue))) 932 (list ps-mule-bitmap-prologue)))
933 933
934(defun ps-mule-generate-bitmap-font (font-spec size relative-compose 934(defun ps-mule-generate-bitmap-font (font-spec size relative-compose
935 baselie-offset bbx) 935 baseline-offset bbx)
936 (let* ((id (ps-mule-font-spec-id font-spec)) 936 (let* ((id (ps-mule-font-spec-id font-spec))
937 (bytes (ps-mule-font-spec-bytes font-spec)) 937 (bytes (ps-mule-font-spec-bytes font-spec))
938 output-list) 938 output-list)
@@ -941,7 +941,7 @@ the sequence."
941 (list (format "/E%02X [ 0 1 255 {pop /.notdef} for ] def\n" id) 941 (list (format "/E%02X [ 0 1 255 {pop /.notdef} for ] def\n" id)
942 (format "%%%% %s\n" (ps-mule-font-spec-name font-spec)) 942 (format "%%%% %s\n" (ps-mule-font-spec-name font-spec))
943 (format "/F%02X %f %S %d E%02X NBF\n" id size 943 (format "/F%02X %f %S %d E%02X NBF\n" id size
944 relative-compose baselie-offset id))) 944 relative-compose baseline-offset id)))
945 (setq output-list 945 (setq output-list
946 (list (list (format "/E%02X [ 0 1 255 { pop 0 } for ] def\n" id)) 946 (list (list (format "/E%02X [ 0 1 255 { pop 0 } for ] def\n" id))
947 (list (format "/V%02X [" id)) 947 (list (format "/V%02X [" id))
@@ -950,7 +950,7 @@ the sequence."
950 (format "/F%02X E%02X V%02X NPF\n" id id id)))) 950 (format "/F%02X E%02X V%02X NPF\n" id id id))))
951 (aset ps-mule-bitmap-font-record id 951 (aset ps-mule-bitmap-font-record id
952 (vector (= bytes 1) output-list 952 (vector (= bytes 1) output-list
953 size relative-compose baselie-offset bbx)) 953 size relative-compose baseline-offset bbx))
954 (if ps-mule-bitmap-dict-list 954 (if ps-mule-bitmap-dict-list
955 output-list 955 output-list
956 (setq ps-mule-bitmap-dict-list (list "/BitmapDict <<\n" ">> def\n")) 956 (setq ps-mule-bitmap-dict-list (list "/BitmapDict <<\n" ">> def\n"))
diff --git a/lisp/ps-print.el b/lisp/ps-print.el
index cb19197d16d..da804d99ae0 100644
--- a/lisp/ps-print.el
+++ b/lisp/ps-print.el
@@ -6658,7 +6658,7 @@ If FACE is not a valid face name, use default face."
6658;; But autoload them here to make the separation invisible. 6658;; But autoload them here to make the separation invisible.
6659 6659
6660;;;### (autoloads (ps-mule-end-job ps-mule-begin-job ps-mule-initialize 6660;;;### (autoloads (ps-mule-end-job ps-mule-begin-job ps-mule-initialize
6661;;;;;; ps-multibyte-buffer) "ps-mule" "ps-mule.el" "98fcbceecff2ac603ba35672b99b5278") 6661;;;;;; ps-multibyte-buffer) "ps-mule" "ps-mule.el" "01641c7c3af4e45e1c3afeb75a73120c")
6662;;; Generated autoloads from ps-mule.el 6662;;; Generated autoloads from ps-mule.el
6663 6663
6664(defvar ps-multibyte-buffer nil "\ 6664(defvar ps-multibyte-buffer nil "\
diff --git a/lisp/reveal.el b/lisp/reveal.el
index ea46cfd1dd3..8b4ac22a717 100644
--- a/lisp/reveal.el
+++ b/lisp/reveal.el
@@ -106,7 +106,7 @@ Each element has the form (WINDOW . OVERLAY).")
106 (let ((inv (overlay-get ol 'invisible)) open) 106 (let ((inv (overlay-get ol 'invisible)) open)
107 (when (and inv 107 (when (and inv
108 ;; There's an `invisible' property. Make sure it's 108 ;; There's an `invisible' property. Make sure it's
109 ;; actually invisible, and ellipsised. 109 ;; actually invisible, and ellipsized.
110 (and (consp buffer-invisibility-spec) 110 (and (consp buffer-invisibility-spec)
111 (cdr (assq inv buffer-invisibility-spec))) 111 (cdr (assq inv buffer-invisibility-spec)))
112 (or (setq open 112 (or (setq open
@@ -189,12 +189,12 @@ Each element has the form (WINDOW . OVERLAY).")
189 189
190;;;###autoload 190;;;###autoload
191(define-minor-mode reveal-mode 191(define-minor-mode reveal-mode
192 "Toggle decloaking of invisible text near point (Reveal mode). 192 "Toggle uncloaking of invisible text near point (Reveal mode).
193With a prefix argument ARG, enable Reveal mode if ARG is 193With a prefix argument ARG, enable Reveal mode if ARG is
194positive, and disable it otherwise. If called from Lisp, enable 194positive, and disable it otherwise. If called from Lisp, enable
195Reveal mode if ARG is omitted or nil. 195Reveal mode if ARG is omitted or nil.
196 196
197Reveral mode is a buffer-local minor mode. When enabled, it 197Reveal mode is a buffer-local minor mode. When enabled, it
198reveals invisible text around point." 198reveals invisible text around point."
199 :group 'reveal 199 :group 'reveal
200 :lighter (global-reveal-mode nil " Reveal") 200 :lighter (global-reveal-mode nil " Reveal")
diff --git a/lisp/server.el b/lisp/server.el
index e02f63a8268..edd8f2afa93 100644
--- a/lisp/server.el
+++ b/lisp/server.el
@@ -307,11 +307,13 @@ Updates `server-clients'."
307 307
308 (setq server-clients (delq proc server-clients)) 308 (setq server-clients (delq proc server-clients))
309 309
310 ;; Delete the client's tty. 310 ;; Delete the client's tty, except on Windows (both GUI and console),
311 (let ((terminal (process-get proc 'terminal))) 311 ;; where there's only one terminal and does not make sense to delete it.
312 ;; Only delete the terminal if it is non-nil. 312 (unless (eq system-type 'windows-nt)
313 (when (and terminal (eq (terminal-live-p terminal) t)) 313 (let ((terminal (process-get proc 'terminal)))
314 (delete-terminal terminal))) 314 ;; Only delete the terminal if it is non-nil.
315 (when (and terminal (eq (terminal-live-p terminal) t))
316 (delete-terminal terminal))))
315 317
316 ;; Delete the client's process. 318 ;; Delete the client's process.
317 (if (eq (process-status proc) 'open) 319 (if (eq (process-status proc) 'open)
@@ -1035,7 +1037,11 @@ The following commands are accepted by the client:
1035 (setq tty-name (pop args-left) 1037 (setq tty-name (pop args-left)
1036 tty-type (pop args-left) 1038 tty-type (pop args-left)
1037 dontkill (or dontkill 1039 dontkill (or dontkill
1038 (not use-current-frame)))) 1040 (not use-current-frame)))
1041 ;; On Windows, emacsclient always asks for a tty frame.
1042 ;; If running a GUI server, force the frame type to GUI.
1043 (when (eq window-system 'w32)
1044 (push "-window-system" args-left)))
1039 1045
1040 ;; -position LINE[:COLUMN]: Set point to the given 1046 ;; -position LINE[:COLUMN]: Set point to the given
1041 ;; position in the next file. 1047 ;; position in the next file.
diff --git a/lisp/ses.el b/lisp/ses.el
index 6c9d0a7a50d..d5947472c1a 100644
--- a/lisp/ses.el
+++ b/lisp/ses.el
@@ -327,7 +327,7 @@ need to be recalculated.")
327 327
328(defvar ses-call-printer-return nil 328(defvar ses-call-printer-return nil
329 "Set to t if last cell printer invoked by `ses-call-printer' requested 329 "Set to t if last cell printer invoked by `ses-call-printer' requested
330left-justification of the result. Set to error-signal if ses-call-printer 330left-justification of the result. Set to error-signal if `ses-call-printer'
331encountered an error during printing. Otherwise nil.") 331encountered an error during printing. Otherwise nil.")
332 332
333(defvar ses-start-time nil 333(defvar ses-start-time nil
@@ -394,7 +394,7 @@ functions refer to its value."
394 val))))) 394 val)))))
395 395
396(defmacro ses-cell-property-get (property-name row &optional col) 396(defmacro ses-cell-property-get (property-name row &optional col)
397 "Get property named PROPERTY-NAME From a CELL or a pair (ROW,COL). 397 "Get property named PROPERTY-NAME from a CELL or a pair (ROW,COL).
398 398
399When COL is omitted, CELL=ROW is a cell object. When COL is 399When COL is omitted, CELL=ROW is a cell object. When COL is
400present ROW and COL are the integer coordinates of the cell of 400present ROW and COL are the integer coordinates of the cell of
@@ -490,8 +490,8 @@ PROPERTY-NAME."
490 `(aref ses--col-printers ,col)) 490 `(aref ses--col-printers ,col))
491 491
492(defmacro ses-sym-rowcol (sym) 492(defmacro ses-sym-rowcol (sym)
493 "From a cell-symbol SYM, gets the cons (row . col). A1 => (0 . 0). Result 493 "From a cell-symbol SYM, gets the cons (row . col). A1 => (0 . 0).
494is nil if SYM is not a symbol that names a cell." 494Result is nil if SYM is not a symbol that names a cell."
495 `(and (symbolp ,sym) (get ,sym 'ses-cell))) 495 `(and (symbolp ,sym) (get ,sym 'ses-cell)))
496 496
497(defmacro ses-cell (sym value formula printer references) 497(defmacro ses-cell (sym value formula printer references)
@@ -625,7 +625,7 @@ is a vector--if a symbol, the new vector is assigned as the symbol's value."
625 (delete-region pos (point)))) 625 (delete-region pos (point))))
626 626
627(defun ses-printer-validate (printer) 627(defun ses-printer-validate (printer)
628 "Signals an error if PRINTER is not a valid SES cell printer." 628 "Signal an error if PRINTER is not a valid SES cell printer."
629 (or (not printer) 629 (or (not printer)
630 (stringp printer) 630 (stringp printer)
631 (functionp printer) 631 (functionp printer)
@@ -642,7 +642,7 @@ checking that it is a valid printer function."
642 (add-to-list 'ses-read-printer-history (prin1-to-string printer)))) 642 (add-to-list 'ses-read-printer-history (prin1-to-string printer))))
643 643
644(defun ses-formula-record (formula) 644(defun ses-formula-record (formula)
645 "If FORMULA is of the form 'symbol, adds it to the list of symbolic formulas 645 "If FORMULA is of the form 'symbol, add it to the list of symbolic formulas
646for this spreadsheet." 646for this spreadsheet."
647 (when (and (eq (car-safe formula) 'quote) 647 (when (and (eq (car-safe formula) 'quote)
648 (symbolp (cadr formula))) 648 (symbolp (cadr formula)))
@@ -691,7 +691,7 @@ for this spreadsheet."
691 buffer-undo-list)) 691 buffer-undo-list))
692 692
693(defun ses-reset-header-string () 693(defun ses-reset-header-string ()
694 "Flags the header string for update. Upon undo, the header string will be 694 "Flag the header string for update. Upon undo, the header string will be
695updated again." 695updated again."
696 (push '(apply ses-reset-header-string) buffer-undo-list) 696 (push '(apply ses-reset-header-string) buffer-undo-list)
697 (setq ses--header-hscroll -1)) 697 (setq ses--header-hscroll -1))
@@ -727,7 +727,7 @@ cell (ROW,COL). This is undoable. The cell's data will be updated through
727 nil) ; Make coverage-tester happy. 727 nil) ; Make coverage-tester happy.
728 728
729(defun ses-cell-set-formula (row col formula) 729(defun ses-cell-set-formula (row col formula)
730 "Store a new formula for (ROW . COL) and enqueues the cell for 730 "Store a new formula for (ROW . COL) and enqueue the cell for
731recalculation via `post-command-hook'. Updates the reference lists for the 731recalculation via `post-command-hook'. Updates the reference lists for the
732cells that this cell refers to. Does not update cell value or reprint the 732cells that this cell refers to. Does not update cell value or reprint the
733cell. To avoid inconsistencies, this function is not interruptible, which 733cell. To avoid inconsistencies, this function is not interruptible, which
@@ -812,9 +812,9 @@ means Emacs will crash if FORMULA contains a circular list."
812 errors))))) 812 errors)))))
813 (if errors 813 (if errors
814 (warn "---------------------------------------------------------------- 814 (warn "----------------------------------------------------------------
815Some reference where corrupted. 815Some references were corrupted.
816 816
817The following is a list of where each element ELT is such 817The following is a list where each element ELT is such
818that (car ELT) is the reference of cell CELL with corruption, 818that (car ELT) is the reference of cell CELL with corruption,
819and (cdr ELT) is a property list where 819and (cdr ELT) is a property list where
820 820
@@ -922,8 +922,7 @@ the old and FORCE is nil."
922 (ses-cell-set-formula row col nil)) 922 (ses-cell-set-formula row col nil))
923 923
924(defcustom ses-self-reference-early-detection nil 924(defcustom ses-self-reference-early-detection nil
925 "True if cycle detection is early for cells that refer to 925 "True if cycle detection is early for cells that refer to themselves."
926themselves."
927 :type 'boolean 926 :type 'boolean
928 :group 'ses) 927 :group 'ses)
929 928
@@ -989,7 +988,7 @@ if the cell's value is unchanged and FORCE is nil."
989;;---------------------------------------------------------------------------- 988;;----------------------------------------------------------------------------
990 989
991(defun ses-in-print-area () 990(defun ses-in-print-area ()
992 "Returns t if point is in print area of spreadsheet." 991 "Return t if point is in print area of spreadsheet."
993 (<= (point) ses--data-marker)) 992 (<= (point) ses--data-marker))
994 993
995;; We turn off point-motion-hooks and explicitly position the cursor, in case 994;; We turn off point-motion-hooks and explicitly position the cursor, in case
@@ -1011,7 +1010,7 @@ if the cell's value is unchanged and FORCE is nil."
1011 (forward-char)))) 1010 (forward-char))))
1012 1011
1013(defun ses-set-curcell () 1012(defun ses-set-curcell ()
1014 "Sets `ses--curcell' to the current cell symbol, or a cons (BEG,END) for a 1013 "Set `ses--curcell' to the current cell symbol, or a cons (BEG,END) for a
1015region, or nil if cursor is not at a cell." 1014region, or nil if cursor is not at a cell."
1016 (if (or (not mark-active) 1015 (if (or (not mark-active)
1017 deactivate-mark 1016 deactivate-mark
@@ -1030,10 +1029,10 @@ region, or nil if cursor is not at a cell."
1030 nil) 1029 nil)
1031 1030
1032(defun ses-check-curcell (&rest args) 1031(defun ses-check-curcell (&rest args)
1033 "Signal an error if ses--curcell is inappropriate. The end marker is 1032 "Signal an error if `ses--curcell' is inappropriate.
1034appropriate if some argument is 'end. A range is appropriate if some 1033The end marker is appropriate if some argument is 'end.
1035argument is 'range. A single cell is appropriate unless some argument is 1034A range is appropriate if some argument is 'range.
1036'needrange." 1035A single cell is appropriate unless some argument is 'needrange."
1037 (if (eq ses--curcell t) 1036 (if (eq ses--curcell t)
1038 ;; curcell recalculation was postponed, but user typed ahead. 1037 ;; curcell recalculation was postponed, but user typed ahead.
1039 (ses-set-curcell)) 1038 (ses-set-curcell))
@@ -1168,7 +1167,7 @@ preceding cell has spilled over."
1168 sig))) 1167 sig)))
1169 1168
1170(defun ses-call-printer (printer &optional value) 1169(defun ses-call-printer (printer &optional value)
1171 "Invokes PRINTER (a string or parenthesized string or function-symbol or 1170 "Invoke PRINTER (a string or parenthesized string or function-symbol or
1172lambda of one argument) on VALUE. Result is the printed cell as a string. 1171lambda of one argument) on VALUE. Result is the printed cell as a string.
1173The variable `ses-call-printer-return' is set to t if the printer used 1172The variable `ses-call-printer-return' is set to t if the printer used
1174parenthesis to request left-justification, or the error-signal if the 1173parenthesis to request left-justification, or the error-signal if the
@@ -1200,7 +1199,7 @@ printer signaled one (and \"%s\" is used as the default printer), else nil."
1200(defun ses-adjust-print-width (col change) 1199(defun ses-adjust-print-width (col change)
1201 "Insert CHANGE spaces in front of column COL, or at end of line if 1200 "Insert CHANGE spaces in front of column COL, or at end of line if
1202COL=NUMCOLS. Deletes characters if CHANGE < 0. Caller should bind 1201COL=NUMCOLS. Deletes characters if CHANGE < 0. Caller should bind
1203inhibit-quit to t." 1202`inhibit-quit' to t."
1204 (let ((inhibit-read-only t) 1203 (let ((inhibit-read-only t)
1205 (blank (if (> change 0) (make-string change ?\s))) 1204 (blank (if (> change 0) (make-string change ?\s)))
1206 (at-end (= col ses--numcols))) 1205 (at-end (= col ses--numcols)))
@@ -1219,9 +1218,9 @@ inhibit-quit to t."
1219 (delete-char (- change)))))) 1218 (delete-char (- change))))))
1220 1219
1221(defun ses-print-cell-new-width (row col) 1220(defun ses-print-cell-new-width (row col)
1222 "Same as ses-print-cell, except if the cell's value is *skip*, the preceding 1221 "Same as `ses-print-cell', except if the cell's value is *skip*,
1223nonskipped cell is reprinted. This function is used when the width of 1222the preceding nonskipped cell is reprinted. This function is used
1224cell (ROW,COL) has changed." 1223when the width of cell (ROW,COL) has changed."
1225 (if (not (eq (ses-cell-value row col) '*skip*)) 1224 (if (not (eq (ses-cell-value row col) '*skip*))
1226 (ses-print-cell row col) 1225 (ses-print-cell row col)
1227 ;;Cell was skipped over - reprint previous 1226 ;;Cell was skipped over - reprint previous
@@ -1344,7 +1343,7 @@ Newlines in the data are escaped."
1344;;---------------------------------------------------------------------------- 1343;;----------------------------------------------------------------------------
1345 1344
1346(defun ses-formula-references (formula &optional result-so-far) 1345(defun ses-formula-references (formula &optional result-so-far)
1347 "Produce a list of symbols for cells that this formula's value 1346 "Produce a list of symbols for cells that this FORMULA's value
1348refers to. For recursive calls, RESULT-SO-FAR is the list being 1347refers to. For recursive calls, RESULT-SO-FAR is the list being
1349constructed, or t to get a wrong-type-argument error when the 1348constructed, or t to get a wrong-type-argument error when the
1350first reference is found." 1349first reference is found."
@@ -1389,8 +1388,8 @@ by (ROWINCR,COLINCR)."
1389 1388
1390(defun ses-relocate-formula (formula startrow startcol rowincr colincr) 1389(defun ses-relocate-formula (formula startrow startcol rowincr colincr)
1391 "Produce a copy of FORMULA where all symbols that refer to cells in row 1390 "Produce a copy of FORMULA where all symbols that refer to cells in row
1392STARTROW or above and col STARTCOL or above are altered by adding ROWINCR 1391STARTROW or above, and col STARTCOL or above, are altered by adding ROWINCR
1393and COLINCR. STARTROW and STARTCOL are 0-based. Example: 1392and COLINCR. STARTROW and STARTCOL are 0-based. Example:
1394 (ses-relocate-formula '(+ A1 B2 D3) 1 2 1 -1) 1393 (ses-relocate-formula '(+ A1 B2 D3) 1 2 1 -1)
1395 => (+ A1 B2 C4) 1394 => (+ A1 B2 C4)
1396If ROWINCR or COLINCR is negative, references to cells being deleted are 1395If ROWINCR or COLINCR is negative, references to cells being deleted are
@@ -1618,7 +1617,8 @@ to each symbol."
1618 (makunbound sym))) 1617 (makunbound sym)))
1619 1618
1620(defun ses-aset-with-undo (array idx newval) 1619(defun ses-aset-with-undo (array idx newval)
1621 "Like aset, but undoable. Result is t if element has changed" 1620 "Like `aset', but undoable.
1621Result is t if element has changed."
1622 (unless (equal (aref array idx) newval) 1622 (unless (equal (aref array idx) newval)
1623 (push `(apply ses-aset-with-undo ,array ,idx 1623 (push `(apply ses-aset-with-undo ,array ,idx
1624 ,(aref array idx)) buffer-undo-list) 1624 ,(aref array idx)) buffer-undo-list)
@@ -1631,8 +1631,8 @@ to each symbol."
1631;;---------------------------------------------------------------------------- 1631;;----------------------------------------------------------------------------
1632 1632
1633(defun ses-load () 1633(defun ses-load ()
1634 "Parse the current buffer and sets up buffer-local variables. Does not 1634 "Parse the current buffer and set up buffer-local variables.
1635execute cell formulas or print functions." 1635Does not execute cell formulas or print functions."
1636 (widen) 1636 (widen)
1637 ;; Read our global parameters, which should be a 3-element list. 1637 ;; Read our global parameters, which should be a 3-element list.
1638 (goto-char (point-max)) 1638 (goto-char (point-max))
@@ -2082,8 +2082,7 @@ to are recalculated first."
2082 (ses-jump-safe startcell))) 2082 (ses-jump-safe startcell)))
2083 2083
2084(defun ses-truncate-cell () 2084(defun ses-truncate-cell ()
2085 "Reprint current cell, but without spillover into any following blank 2085 "Reprint current cell, but without spillover into any following blank cells."
2086cells."
2087 (interactive "*") 2086 (interactive "*")
2088 (ses-check-curcell) 2087 (ses-check-curcell)
2089 (let* ((rowcol (ses-sym-rowcol ses--curcell)) 2088 (let* ((rowcol (ses-sym-rowcol ses--curcell))
@@ -2273,7 +2272,7 @@ cells."
2273 2272
2274(defun ses-read-printer (prompt default) 2273(defun ses-read-printer (prompt default)
2275 "Common code for `ses-read-cell-printer', `ses-read-column-printer', and `ses-read-default-printer'. 2274 "Common code for `ses-read-cell-printer', `ses-read-column-printer', and `ses-read-default-printer'.
2276PROMPT should end with \": \". Result is t if operation was cancelled." 2275PROMPT should end with \": \". Result is t if operation was canceled."
2277 (barf-if-buffer-read-only) 2276 (barf-if-buffer-read-only)
2278 (if (eq default t) 2277 (if (eq default t)
2279 (setq default "") 2278 (setq default "")
@@ -2331,8 +2330,8 @@ right-justified) or a list of one string (will be left-justified)."
2331 (ses-print-cell row col)))) 2330 (ses-print-cell row col))))
2332 2331
2333(defun ses-read-column-printer (col newval) 2332(defun ses-read-column-printer (col newval)
2334 "Set the printer function for the current column. See 2333 "Set the printer function for the current column.
2335`ses-read-cell-printer' for input forms." 2334See `ses-read-cell-printer' for input forms."
2336 (interactive 2335 (interactive
2337 (let ((col (cdr (ses-sym-rowcol ses--curcell)))) 2336 (let ((col (cdr (ses-sym-rowcol ses--curcell))))
2338 (ses-check-curcell) 2337 (ses-check-curcell)
@@ -2348,8 +2347,8 @@ right-justified) or a list of one string (will be left-justified)."
2348 (ses-print-cell row col))))) 2347 (ses-print-cell row col)))))
2349 2348
2350(defun ses-read-default-printer (newval) 2349(defun ses-read-default-printer (newval)
2351 "Set the default printer function for cells that have no other. See 2350 "Set the default printer function for cells that have no other.
2352`ses-read-cell-printer' for input forms." 2351See `ses-read-cell-printer' for input forms."
2353 (interactive 2352 (interactive
2354 (list (ses-read-printer "Default printer: " ses--default-printer))) 2353 (list (ses-read-printer "Default printer: " ses--default-printer)))
2355 (unless (eq newval t) 2354 (unless (eq newval t)
@@ -2363,8 +2362,8 @@ right-justified) or a list of one string (will be left-justified)."
2363;;---------------------------------------------------------------------------- 2362;;----------------------------------------------------------------------------
2364 2363
2365(defun ses-insert-row (count) 2364(defun ses-insert-row (count)
2366 "Insert a new row before the current one. With prefix, insert COUNT rows 2365 "Insert a new row before the current one.
2367before current one." 2366With prefix, insert COUNT rows before current one."
2368 (interactive "*p") 2367 (interactive "*p")
2369 (ses-check-curcell 'end) 2368 (ses-check-curcell 'end)
2370 (or (> count 0) (signal 'args-out-of-range nil)) 2369 (or (> count 0) (signal 'args-out-of-range nil))
@@ -2416,8 +2415,8 @@ before current one."
2416 (ses-goto-print (1- ses--numrows) 0))) 2415 (ses-goto-print (1- ses--numrows) 0)))
2417 2416
2418(defun ses-delete-row (count) 2417(defun ses-delete-row (count)
2419 "Delete the current row. With prefix, Deletes COUNT rows starting from the 2418 "Delete the current row.
2420current one." 2419With prefix, deletes COUNT rows starting from the current one."
2421 (interactive "*p") 2420 (interactive "*p")
2422 (ses-check-curcell) 2421 (ses-check-curcell)
2423 (or (> count 0) (signal 'args-out-of-range nil)) 2422 (or (> count 0) (signal 'args-out-of-range nil))
@@ -2509,8 +2508,8 @@ If COL is specified, the new column(s) get the specified WIDTH and PRINTER
2509 (ses-jump-safe ses--curcell)) 2508 (ses-jump-safe ses--curcell))
2510 2509
2511(defun ses-delete-column (count) 2510(defun ses-delete-column (count)
2512 "Delete the current column. With prefix, Deletes COUNT columns starting 2511 "Delete the current column.
2513from the current one." 2512With prefix, deletes COUNT columns starting from the current one."
2514 (interactive "*p") 2513 (interactive "*p")
2515 (ses-check-curcell) 2514 (ses-check-curcell)
2516 (or (> count 0) (signal 'args-out-of-range nil)) 2515 (or (> count 0) (signal 'args-out-of-range nil))
@@ -2584,7 +2583,7 @@ inserts a new row if at bottom of print area. Repeat COUNT times."
2584 (forward-char))) 2583 (forward-char)))
2585 2584
2586(defun ses-append-row-jump-first-column () 2585(defun ses-append-row-jump-first-column ()
2587 "Insert a new row after current one and jumps to its first column." 2586 "Insert a new row after current one and jump to its first column."
2588 (interactive "*") 2587 (interactive "*")
2589 (ses-check-curcell) 2588 (ses-check-curcell)
2590 (ses-begin-change) 2589 (ses-begin-change)
@@ -2687,8 +2686,8 @@ the corresponding data cell."
2687 line) 2686 line)
2688 2687
2689(defun ses-kill-override (beg end) 2688(defun ses-kill-override (beg end)
2690 "Generic override for any commands that kill text. We clear the killed 2689 "Generic override for any commands that kill text.
2691cells instead of deleting them." 2690We clear the killed cells instead of deleting them."
2692 (interactive "r") 2691 (interactive "r")
2693 (ses-check-curcell 'needrange) 2692 (ses-check-curcell 'needrange)
2694 ;; For some reason, the text-read-only error is not caught by `delete-region', 2693 ;; For some reason, the text-read-only error is not caught by `delete-region',
@@ -2749,9 +2748,9 @@ as symbols."
2749 2748
2750(defun ses-yank-pop (arg) 2749(defun ses-yank-pop (arg)
2751 "Replace just-yanked stretch of killed text with a different stretch. 2750 "Replace just-yanked stretch of killed text with a different stretch.
2752This command is allowed only immediately after a `yank' or a `yank-pop', when 2751This command is allowed only immediately after a `yank' or a `yank-pop',
2753the region contains a stretch of reinserted previously-killed text. We 2752when the region contains a stretch of reinserted previously-killed text.
2754replace it with a different stretch of killed text. 2753We replace it with a different stretch of killed text.
2755 Unlike standard `yank-pop', this function uses `undo' to delete the 2754 Unlike standard `yank-pop', this function uses `undo' to delete the
2756previous insertion." 2755previous insertion."
2757 (interactive "*p") 2756 (interactive "*p")
@@ -2765,7 +2764,7 @@ previous insertion."
2765 (setq this-command 'yank)) 2764 (setq this-command 'yank))
2766 2765
2767(defun ses-yank-cells (text arg) 2766(defun ses-yank-cells (text arg)
2768 "If the TEXT has a proper set of 'ses attributes, inserts the text as 2767 "If the TEXT has a proper set of 'ses attributes, insert the text as
2769cells, else return nil. The cells are reprinted--the supplied text is 2768cells, else return nil. The cells are reprinted--the supplied text is
2770ignored because the column widths, default printer, etc. at yank time might 2769ignored because the column widths, default printer, etc. at yank time might
2771be different from those at kill-time. ARG is a list to indicate that 2770be different from those at kill-time. ARG is a list to indicate that
@@ -2848,8 +2847,8 @@ cons of ROW and COL). Treat plain symbols as strings unless ARG is a list."
2848 (ses-cell-set-formula row col val)))) 2847 (ses-cell-set-formula row col val))))
2849 2848
2850(defun ses-yank-tsf (text arg) 2849(defun ses-yank-tsf (text arg)
2851 "If TEXT contains tabs and/or newlines, treats the tabs as 2850 "If TEXT contains tabs and/or newlines, treat the tabs as
2852column-separators and the newlines as row-separators and inserts the text as 2851column-separators and the newlines as row-separators and insert the text as
2853cell formulas--else return nil. Treat plain symbols as strings unless ARG 2852cell formulas--else return nil. Treat plain symbols as strings unless ARG
2854is a list. Ignore a final newline." 2853is a list. Ignore a final newline."
2855 (if (or (not (string-match "[\t\n]" text)) 2854 (if (or (not (string-match "[\t\n]" text))
@@ -2887,8 +2886,8 @@ is a list. Ignore a final newline."
2887 t))) 2886 t)))
2888 2887
2889(defun ses-yank-resize (needrows needcols) 2888(defun ses-yank-resize (needrows needcols)
2890 "If this yank will require inserting rows and/or columns, asks for 2889 "If this yank will require inserting rows and/or columns, ask for
2891confirmation and then inserts them. Result is (row,col) for top left of yank 2890confirmation and then insert them. Result is (row,col) for top left of yank
2892spot, or error signal if user requests cancel." 2891spot, or error signal if user requests cancel."
2893 (ses-begin-change) 2892 (ses-begin-change)
2894 (let ((rowcol (if ses--curcell 2893 (let ((rowcol (if ses--curcell
@@ -2931,9 +2930,9 @@ newlines between rows. Result is placed in kill ring."
2931 (ses-export-tab t)) 2930 (ses-export-tab t))
2932 2931
2933(defun ses-export-tab (want-formulas) 2932(defun ses-export-tab (want-formulas)
2934 "Export the current range with tabs between columns and newlines between 2933 "Export the current range with tabs between columns and newlines between rows.
2935rows. Result is placed in kill ring. The export is values unless 2934Result is placed in kill ring. The export is values unless WANT-FORMULAS
2936WANT-FORMULAS is non-nil. Newlines and tabs in the export text are escaped." 2935is non-nil. Newlines and tabs in the export text are escaped."
2937 (ses-check-curcell 'needrange) 2936 (ses-check-curcell 'needrange)
2938 (let ((print-escape-newlines t) 2937 (let ((print-escape-newlines t)
2939 result item) 2938 result item)
@@ -2992,7 +2991,7 @@ The top row is row 1. Selecting row 0 displays the default header row."
2992 (ses-reset-header-string)) 2991 (ses-reset-header-string))
2993 2992
2994(defun ses-mark-row () 2993(defun ses-mark-row ()
2995 "Marks the entirety of current row as a range." 2994 "Mark the entirety of current row as a range."
2996 (interactive) 2995 (interactive)
2997 (ses-check-curcell 'range) 2996 (ses-check-curcell 'range)
2998 (let ((row (car (ses-sym-rowcol (or (car-safe ses--curcell) ses--curcell))))) 2997 (let ((row (car (ses-sym-rowcol (or (car-safe ses--curcell) ses--curcell)))))
@@ -3002,7 +3001,7 @@ The top row is row 1. Selecting row 0 displays the default header row."
3002 (ses-goto-print row 0))) 3001 (ses-goto-print row 0)))
3003 3002
3004(defun ses-mark-column () 3003(defun ses-mark-column ()
3005 "Marks the entirety of current column as a range." 3004 "Mark the entirety of current column as a range."
3006 (interactive) 3005 (interactive)
3007 (ses-check-curcell 'range) 3006 (ses-check-curcell 'range)
3008 (let ((col (cdr (ses-sym-rowcol (or (car-safe ses--curcell) ses--curcell)))) 3007 (let ((col (cdr (ses-sym-rowcol (or (car-safe ses--curcell) ses--curcell))))
@@ -3046,13 +3045,14 @@ The top row is row 1. Selecting row 0 displays the default header row."
3046 (ses-goto-print row col))))) 3045 (ses-goto-print row col)))))
3047 3046
3048(defun ses-renarrow-buffer () 3047(defun ses-renarrow-buffer ()
3049 "Narrow the buffer so only the print area is visible. Use after \\[widen]." 3048 "Narrow the buffer so only the print area is visible.
3049Use after \\[widen]."
3050 (interactive) 3050 (interactive)
3051 (setq ses--deferred-narrow t)) 3051 (setq ses--deferred-narrow t))
3052 3052
3053(defun ses-sort-column (sorter &optional reverse) 3053(defun ses-sort-column (sorter &optional reverse)
3054 "Sorts the range by a specified column. With prefix, sorts in 3054 "Sort the range by a specified column.
3055REVERSE order." 3055With prefix, sorts in REVERSE order."
3056 (interactive "*sSort column: \nP") 3056 (interactive "*sSort column: \nP")
3057 (ses-check-curcell 'needrange) 3057 (ses-check-curcell 'needrange)
3058 (let ((min (ses-sym-rowcol (car ses--curcell))) 3058 (let ((min (ses-sym-rowcol (car ses--curcell)))
@@ -3103,7 +3103,7 @@ REVERSE order."
3103 (ses-sort-column (ses-column-letter col) reverse)))) 3103 (ses-sort-column (ses-column-letter col) reverse))))
3104 3104
3105(defun ses-insert-range () 3105(defun ses-insert-range ()
3106 "Inserts into minibuffer the list of cells currently highlighted in the 3106 "Insert into minibuffer the list of cells currently highlighted in the
3107spreadsheet." 3107spreadsheet."
3108 (interactive "*") 3108 (interactive "*")
3109 (let (x) 3109 (let (x)
@@ -3115,7 +3115,7 @@ spreadsheet."
3115 (insert (substring (prin1-to-string (nreverse x)) 1 -1)))) 3115 (insert (substring (prin1-to-string (nreverse x)) 1 -1))))
3116 3116
3117(defun ses-insert-ses-range () 3117(defun ses-insert-ses-range ()
3118 "Inserts \"(ses-range x y)\" in the minibuffer to represent the currently 3118 "Insert \"(ses-range x y)\" in the minibuffer to represent the currently
3119highlighted range in the spreadsheet." 3119highlighted range in the spreadsheet."
3120 (interactive "*") 3120 (interactive "*")
3121 (let (x) 3121 (let (x)
@@ -3145,7 +3145,7 @@ highlighted range in the spreadsheet."
3145;;---------------------------------------------------------------------------- 3145;;----------------------------------------------------------------------------
3146 3146
3147(defun ses-safe-printer (printer) 3147(defun ses-safe-printer (printer)
3148 "Returns PRINTER if safe, or the substitute printer `ses-unsafe' otherwise." 3148 "Return PRINTER if safe, or the substitute printer `ses-unsafe' otherwise."
3149 (if (or (stringp printer) 3149 (if (or (stringp printer)
3150 (stringp (car-safe printer)) 3150 (stringp (car-safe printer))
3151 (not printer) 3151 (not printer)
@@ -3154,16 +3154,16 @@ highlighted range in the spreadsheet."
3154 'ses-unsafe)) 3154 'ses-unsafe))
3155 3155
3156(defun ses-safe-formula (formula) 3156(defun ses-safe-formula (formula)
3157 "Returns FORMULA if safe, or the substitute formula *unsafe* otherwise." 3157 "Return FORMULA if safe, or the substitute formula *unsafe* otherwise."
3158 (if (ses-warn-unsafe formula 'unsafep) 3158 (if (ses-warn-unsafe formula 'unsafep)
3159 formula 3159 formula
3160 `(ses-unsafe ',formula))) 3160 `(ses-unsafe ',formula)))
3161 3161
3162(defun ses-warn-unsafe (formula checker) 3162(defun ses-warn-unsafe (formula checker)
3163 "Applies CHECKER to FORMULA. If result is non-nil, asks user for 3163 "Apply CHECKER to FORMULA.
3164confirmation about FORMULA, which might be unsafe. Returns t if formula 3164If result is non-nil, asks user for confirmation about FORMULA,
3165is safe or user allows execution anyway. Always returns t if 3165which might be unsafe. Returns t if formula is safe or user allows
3166`safe-functions' is t." 3166execution anyway. Always returns t if `safe-functions' is t."
3167 (if (eq safe-functions t) 3167 (if (eq safe-functions t)
3168 t 3168 t
3169 (setq checker (funcall checker formula)) 3169 (setq checker (funcall checker formula))
@@ -3178,13 +3178,13 @@ is safe or user allows execution anyway. Always returns t if
3178;;---------------------------------------------------------------------------- 3178;;----------------------------------------------------------------------------
3179 3179
3180(defun ses--clean-! (&rest x) 3180(defun ses--clean-! (&rest x)
3181 "Clean by delq list X from any occurrence of `nil' or `*skip*'." 3181 "Clean by `delq' list X from any occurrence of `nil' or `*skip*'."
3182 (delq nil (delq '*skip* x))) 3182 (delq nil (delq '*skip* x)))
3183 3183
3184(defun ses--clean-_ (x y) 3184(defun ses--clean-_ (x y)
3185 "Clean list X by replacing by Y any occurrence of `nil' or `*skip*'. 3185 "Clean list X by replacing by Y any occurrence of `nil' or `*skip*'.
3186 3186
3187This will change X by making setcar on its cons cells." 3187This will change X by making `setcar' on its cons cells."
3188 (let ((ret x) ret-elt) 3188 (let ((ret x) ret-elt)
3189 (while ret 3189 (while ret
3190 (setq ret-elt (car ret)) 3190 (setq ret-elt (car ret))
@@ -3194,7 +3194,7 @@ This will change X by making setcar on its cons cells."
3194 x) 3194 x)
3195 3195
3196(defmacro ses-range (from to &rest rest) 3196(defmacro ses-range (from to &rest rest)
3197 "Expands to a list of cell-symbols for the range going from 3197 "Expand to a list of cell-symbols for the range going from
3198FROM up to TO. The range automatically expands to include any 3198FROM up to TO. The range automatically expands to include any
3199new row or column inserted into its middle. The SES library code 3199new row or column inserted into its middle. The SES library code
3200specifically looks for the symbol `ses-range', so don't create an 3200specifically looks for the symbol `ses-range', so don't create an
@@ -3207,8 +3207,8 @@ In the sequel we assume that cells A1, B1, A2 B2 have respective values
32071 2 3 and 4. 32071 2 3 and 4.
3208 3208
3209Readout direction is specified by a `>v', '`>^', `<v', `<^', 3209Readout direction is specified by a `>v', '`>^', `<v', `<^',
3210`v>', `v<', `^>', `^<' flag. For historical reasons, in absence 3210`v>', `v<', `^>', `^<' flag. For historical reasons, in absence
3211of such a flag, a default direction of `^<' is assumed. This 3211of such a flag, a default direction of `^<' is assumed. This
3212way `(ses-range A1 B2 ^>)' will evaluate to `(1 3 2 4)', 3212way `(ses-range A1 B2 ^>)' will evaluate to `(1 3 2 4)',
3213while `(ses-range A1 B2 >^)' will evaluate to (3 4 1 2). 3213while `(ses-range A1 B2 >^)' will evaluate to (3 4 1 2).
3214 3214
@@ -3221,18 +3221,18 @@ If the range is one column, then `v' can be used as a shorthand to
3221A `!' flag will remove all cells whose value is nil or `*skip*'. 3221A `!' flag will remove all cells whose value is nil or `*skip*'.
3222 3222
3223A `_' flag will replace nil or `*skip*' by the value following 3223A `_' flag will replace nil or `*skip*' by the value following
3224the `_' flag. If the `_' flag is the last argument, then they are 3224the `_' flag. If the `_' flag is the last argument, then they are
3225replaced by integer 0. 3225replaced by integer 0.
3226 3226
3227A `*', `*1' or `*2' flag will vectorize the range in the sense of 3227A `*', `*1' or `*2' flag will vectorize the range in the sense of
3228Calc. See info node `(Calc) Top'. Flag `*' will output either a 3228Calc. See info node `(Calc) Top'. Flag `*' will output either a
3229vector or a matrix depending on the number of rows, `*1' will 3229vector or a matrix depending on the number of rows, `*1' will
3230flatten the result to a one row vector, and `*2' will make a 3230flatten the result to a one row vector, and `*2' will make a
3231matrix whatever the number of rows. 3231matrix whatever the number of rows.
3232 3232
3233Warning: interaction with Calc is experimental and may produce 3233Warning: interaction with Calc is experimental and may produce
3234confusing results if you are not aware of Calc data format. Use 3234confusing results if you are not aware of Calc data format.
3235`math-format-value' as a printer for Calc objects." 3235Use `math-format-value' as a printer for Calc objects."
3236 (let (result-row 3236 (let (result-row
3237 result 3237 result
3238 (prev-row -1) 3238 (prev-row -1)
@@ -3319,10 +3319,10 @@ are ignored. Result is always floating-point, even if all args are integers."
3319 (/ (float (apply '+ list)) (length list))) 3319 (/ (float (apply '+ list)) (length list)))
3320 3320
3321(defmacro ses-select (fromrange test torange) 3321(defmacro ses-select (fromrange test torange)
3322 "Select cells in FROMRANGE that are `equal' to TEST. For each match, return 3322 "Select cells in FROMRANGE that are `equal' to TEST.
3323the corresponding cell from TORANGE. The ranges are macroexpanded but not 3323For each match, return the corresponding cell from TORANGE.
3324evaluated so they should be either (ses-range BEG END) or (list ...). The 3324The ranges are macroexpanded but not evaluated so they should be
3325TEST is evaluated." 3325either (ses-range BEG END) or (list ...). The TEST is evaluated."
3326 (setq fromrange (cdr (macroexpand fromrange)) 3326 (setq fromrange (cdr (macroexpand fromrange))
3327 torange (cdr (macroexpand torange)) 3327 torange (cdr (macroexpand torange))
3328 test (eval test)) 3328 test (eval test))
@@ -3352,9 +3352,10 @@ TEST is evaluated."
3352(defvar col) 3352(defvar col)
3353 3353
3354(defun ses-center (value &optional span fill) 3354(defun ses-center (value &optional span fill)
3355 "Print VALUE, centered within column. FILL is the fill character for 3355 "Print VALUE, centered within column.
3356centering (default = space). SPAN indicates how many additional rightward 3356FILL is the fill character for centering (default = space).
3357columns to include in width (default = 0)." 3357SPAN indicates how many additional rightward columns to include
3358in width (default = 0)."
3358 (let ((printer (or (ses-col-printer col) ses--default-printer)) 3359 (let ((printer (or (ses-col-printer col) ses--default-printer))
3359 (width (ses-col-width col)) 3360 (width (ses-col-width col))
3360 half) 3361 half)
@@ -3373,8 +3374,8 @@ columns to include in width (default = 0)."
3373 3374
3374(defun ses-center-span (value &optional fill) 3375(defun ses-center-span (value &optional fill)
3375 "Print VALUE, centered within the span that starts in the current column 3376 "Print VALUE, centered within the span that starts in the current column
3376and continues until the next nonblank column. FILL specifies the fill 3377and continues until the next nonblank column.
3377character (default = space)." 3378FILL specifies the fill character (default = space)."
3378 (let ((end (1+ col))) 3379 (let ((end (1+ col)))
3379 (while (and (< end ses--numcols) 3380 (while (and (< end ses--numcols)
3380 (memq (ses-cell-value row end) '(nil *skip*))) 3381 (memq (ses-cell-value row end) '(nil *skip*)))
@@ -3382,8 +3383,8 @@ character (default = space)."
3382 (ses-center value (- end col 1) fill))) 3383 (ses-center value (- end col 1) fill)))
3383 3384
3384(defun ses-dashfill (value &optional span) 3385(defun ses-dashfill (value &optional span)
3385 "Print VALUE centered using dashes. SPAN indicates how many rightward 3386 "Print VALUE centered using dashes.
3386columns to include in width (default = 0)." 3387SPAN indicates how many rightward columns to include in width (default = 0)."
3387 (ses-center value span ?-)) 3388 (ses-center value span ?-))
3388 3389
3389(defun ses-dashfill-span (value) 3390(defun ses-dashfill-span (value)
@@ -3397,7 +3398,7 @@ current column and continues until the next nonblank column."
3397 (ses-center-span value ?~)) 3398 (ses-center-span value ?~))
3398 3399
3399(defun ses-unsafe (value) 3400(defun ses-unsafe (value)
3400 "Substitute for an unsafe formula or printer" 3401 "Substitute for an unsafe formula or printer."
3401 (error "Unsafe formula or printer")) 3402 (error "Unsafe formula or printer"))
3402 3403
3403;;All standard printers are safe, including ses-unsafe! 3404;;All standard printers are safe, including ses-unsafe!
diff --git a/lisp/shell.el b/lisp/shell.el
index 47119e6769c..fdfc8b3cf19 100644
--- a/lisp/shell.el
+++ b/lisp/shell.el
@@ -35,7 +35,7 @@
35;; This makes these modes easier to use. 35;; This makes these modes easier to use.
36 36
37;; For documentation on the functionality provided by comint mode, and 37;; For documentation on the functionality provided by comint mode, and
38;; the hooks available for customising it, see the file comint.el. 38;; the hooks available for customizing it, see the file comint.el.
39;; For further information on shell mode, see the comments below. 39;; For further information on shell mode, see the comments below.
40 40
41;; Needs fixin: 41;; Needs fixin:
diff --git a/lisp/simple.el b/lisp/simple.el
index 1dc866cf64d..b7165c9f6a9 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -1052,16 +1052,23 @@ In addition, with prefix argument, show details about that character
1052in *Help* buffer. See also the command `describe-char'." 1052in *Help* buffer. See also the command `describe-char'."
1053 (interactive "P") 1053 (interactive "P")
1054 (let* ((char (following-char)) 1054 (let* ((char (following-char))
1055 ;; If the character is one of LRE, LRO, RLE, RLO, it will 1055 (bidi-fixer
1056 ;; start a directional embedding, which could completely 1056 (cond ((memq char '(?\x202a ?\x202b ?\x202d ?\x202e))
1057 ;; disrupt the rest of the line (e.g., RLO will display the 1057 ;; If the character is one of LRE, LRO, RLE, RLO, it
1058 ;; rest of the line right-to-left). So we put an invisible 1058 ;; will start a directional embedding, which could
1059 ;; PDF character after these characters, to end the 1059 ;; completely disrupt the rest of the line (e.g., RLO
1060 ;; embedding, which eliminates any effects on the rest of the 1060 ;; will display the rest of the line right-to-left).
1061 ;; line. 1061 ;; So we put an invisible PDF character after these
1062 (pdf (if (memq char '(?\x202a ?\x202b ?\x202d ?\x202e)) 1062 ;; characters, to end the embedding, which eliminates
1063 (propertize (string ?\x202c) 'invisible t) 1063 ;; any effects on the rest of the line.
1064 "")) 1064 (propertize (string ?\x202c) 'invisible t))
1065 ;; Strong right-to-left characters cause reordering of
1066 ;; the following numerical characters which show the
1067 ;; codepoint, so append LRM to countermand that.
1068 ((memq (get-char-code-property char 'bidi-class) '(R AL))
1069 (propertize (string ?\x200e) 'invisible t))
1070 (t
1071 "")))
1065 (beg (point-min)) 1072 (beg (point-min))
1066 (end (point-max)) 1073 (end (point-max))
1067 (pos (point)) 1074 (pos (point))
@@ -1125,14 +1132,15 @@ in *Help* buffer. See also the command `describe-char'."
1125 (if (< char 256) 1132 (if (< char 256)
1126 (single-key-description char) 1133 (single-key-description char)
1127 (buffer-substring-no-properties (point) (1+ (point)))) 1134 (buffer-substring-no-properties (point) (1+ (point))))
1128 pdf encoding-msg pos total percent beg end col hscroll) 1135 bidi-fixer
1136 encoding-msg pos total percent beg end col hscroll)
1129 (message "Char: %s%s %s point=%d of %d (%d%%) column=%d%s" 1137 (message "Char: %s%s %s point=%d of %d (%d%%) column=%d%s"
1130 (if enable-multibyte-characters 1138 (if enable-multibyte-characters
1131 (if (< char 128) 1139 (if (< char 128)
1132 (single-key-description char) 1140 (single-key-description char)
1133 (buffer-substring-no-properties (point) (1+ (point)))) 1141 (buffer-substring-no-properties (point) (1+ (point))))
1134 (single-key-description char)) 1142 (single-key-description char))
1135 pdf encoding-msg pos total percent col hscroll)))))) 1143 bidi-fixer encoding-msg pos total percent col hscroll))))))
1136 1144
1137;; Initialize read-expression-map. It is defined at C level. 1145;; Initialize read-expression-map. It is defined at C level.
1138(let ((m (make-sparse-keymap))) 1146(let ((m (make-sparse-keymap)))
@@ -1217,11 +1225,11 @@ this command arranges for all errors to enter the debugger."
1217 (push (eval eval-expression-arg lexical-binding) values) 1225 (push (eval eval-expression-arg lexical-binding) values)
1218 (let ((old-value (make-symbol "t")) new-value) 1226 (let ((old-value (make-symbol "t")) new-value)
1219 ;; Bind debug-on-error to something unique so that we can 1227 ;; Bind debug-on-error to something unique so that we can
1220 ;; detect when evaled code changes it. 1228 ;; detect when evalled code changes it.
1221 (let ((debug-on-error old-value)) 1229 (let ((debug-on-error old-value))
1222 (push (eval eval-expression-arg lexical-binding) values) 1230 (push (eval eval-expression-arg lexical-binding) values)
1223 (setq new-value debug-on-error)) 1231 (setq new-value debug-on-error))
1224 ;; If evaled code has changed the value of debug-on-error, 1232 ;; If evalled code has changed the value of debug-on-error,
1225 ;; propagate that change to the global binding. 1233 ;; propagate that change to the global binding.
1226 (unless (eq old-value new-value) 1234 (unless (eq old-value new-value)
1227 (setq debug-on-error new-value)))) 1235 (setq debug-on-error new-value))))
@@ -1582,7 +1590,7 @@ by the new completion."
1582 n) 1590 n)
1583 ;; next-matching-history-element always puts us at (point-min). 1591 ;; next-matching-history-element always puts us at (point-min).
1584 ;; Move to the position we were at before changing the buffer contents. 1592 ;; Move to the position we were at before changing the buffer contents.
1585 ;; This is still sensical, because the text before point has not changed. 1593 ;; This is still sensible, because the text before point has not changed.
1586 (goto-char point-at-start))) 1594 (goto-char point-at-start)))
1587 1595
1588(defun previous-complete-history-element (n) 1596(defun previous-complete-history-element (n)
@@ -2907,11 +2915,11 @@ These commands include \\[set-mark-command] and \\[start-kbd-macro]."
2907 2915
2908(defvar filter-buffer-substring-functions nil 2916(defvar filter-buffer-substring-functions nil
2909 "Wrapper hook around `filter-buffer-substring'. 2917 "Wrapper hook around `filter-buffer-substring'.
2910The functions on this special hook are called with 4 arguments: 2918The functions on this special hook are called with four arguments:
2911 NEXT-FUN BEG END DELETE 2919 NEXT-FUN BEG END DELETE
2912NEXT-FUN is a function of 3 arguments (BEG END DELETE) 2920NEXT-FUN is a function of three arguments (BEG END DELETE)
2913that performs the default operation. The other 3 arguments are like 2921that performs the default operation. The other three arguments
2914the ones passed to `filter-buffer-substring'.") 2922are like the ones passed to `filter-buffer-substring'.")
2915 2923
2916(defvar buffer-substring-filters nil 2924(defvar buffer-substring-filters nil
2917 "List of filter functions for `filter-buffer-substring'. 2925 "List of filter functions for `filter-buffer-substring'.
@@ -4721,7 +4729,7 @@ To ignore intangibility, bind `inhibit-point-motion-hooks' to t."
4721 (let ((line-move-visual nil)) 4729 (let ((line-move-visual nil))
4722 (line-move (1- arg) t))) 4730 (line-move (1- arg) t)))
4723 4731
4724 ;; Move to beginning-of-line, ignoring fields and invisibles. 4732 ;; Move to beginning-of-line, ignoring fields and invisible text.
4725 (skip-chars-backward "^\n") 4733 (skip-chars-backward "^\n")
4726 (while (and (not (bobp)) (invisible-p (1- (point)))) 4734 (while (and (not (bobp)) (invisible-p (1- (point))))
4727 (goto-char (previous-char-property-change (point))) 4735 (goto-char (previous-char-property-change (point)))
@@ -5704,7 +5712,7 @@ At top-level, as an editor command, this simply beeps."
5704(defvar buffer-quit-function nil 5712(defvar buffer-quit-function nil
5705 "Function to call to \"quit\" the current buffer, or nil if none. 5713 "Function to call to \"quit\" the current buffer, or nil if none.
5706\\[keyboard-escape-quit] calls this function when its more local actions 5714\\[keyboard-escape-quit] calls this function when its more local actions
5707\(such as cancelling a prefix argument, minibuffer or region) do not apply.") 5715\(such as canceling a prefix argument, minibuffer or region) do not apply.")
5708 5716
5709(defun keyboard-escape-quit () 5717(defun keyboard-escape-quit ()
5710 "Exit the current \"mode\" (in a generalized sense of the word). 5718 "Exit the current \"mode\" (in a generalized sense of the word).
@@ -6015,7 +6023,7 @@ of the text to replace. If END is nil, point is used instead.")
6015 6023
6016(defvar completion-list-insert-choice-function #'completion--replace 6024(defvar completion-list-insert-choice-function #'completion--replace
6017 "Function to use to insert the text chosen in *Completions*. 6025 "Function to use to insert the text chosen in *Completions*.
6018Called with 3 arguments (BEG END TEXT), it should replace the text 6026Called with three arguments (BEG END TEXT), it should replace the text
6019between BEG and END with TEXT. Expected to be set buffer-locally 6027between BEG and END with TEXT. Expected to be set buffer-locally
6020in the *Completions* buffer.") 6028in the *Completions* buffer.")
6021 6029
@@ -6209,7 +6217,7 @@ BASE-POSITION, says where to insert the completion."
6209 choice buffer base-position nil) 6217 choice buffer base-position nil)
6210 ;; This remove-text-properties should be unnecessary since `choice' 6218 ;; This remove-text-properties should be unnecessary since `choice'
6211 ;; comes from buffer-substring-no-properties. 6219 ;; comes from buffer-substring-no-properties.
6212 ;;(remove-text-properties 0 (lenth choice) '(mouse-face nil) choice) 6220 ;;(remove-text-properties 0 (length choice) '(mouse-face nil) choice)
6213 ;; Insert the completion into the buffer where it was requested. 6221 ;; Insert the completion into the buffer where it was requested.
6214 (funcall (or insert-function completion-list-insert-choice-function) 6222 (funcall (or insert-function completion-list-insert-choice-function)
6215 (or (car base-position) (point)) 6223 (or (car base-position) (point))
diff --git a/lisp/speedbar.el b/lisp/speedbar.el
index b8a734784be..efe7832aca6 100644
--- a/lisp/speedbar.el
+++ b/lisp/speedbar.el
@@ -696,7 +696,7 @@ function `speedbar-extension-list-to-regex'.")
696 (append '(".[ch]\\(\\+\\+\\|pp\\|c\\|h\\|xx\\)?" ".tex\\(i\\(nfo\\)?\\)?" 696 (append '(".[ch]\\(\\+\\+\\|pp\\|c\\|h\\|xx\\)?" ".tex\\(i\\(nfo\\)?\\)?"
697 ".el" ".emacs" ".l" ".lsp" ".p" ".java" ".js" ".f\\(90\\|77\\|or\\)?") 697 ".el" ".emacs" ".l" ".lsp" ".p" ".java" ".js" ".f\\(90\\|77\\|or\\)?")
698 (if speedbar-use-imenu-flag 698 (if speedbar-use-imenu-flag
699 '(".ada" ".p[lm]" ".tcl" ".m" ".scm" ".pm" ".py" ".g" 699 '(".ad[abs]" ".p[lm]" ".tcl" ".m" ".scm" ".pm" ".py" ".g"
700 ;; html is not supported by default, but an imenu tags package 700 ;; html is not supported by default, but an imenu tags package
701 ;; is available. Also, html files are nice to be able to see. 701 ;; is available. Also, html files are nice to be able to see.
702 ".s?html" 702 ".s?html"
@@ -1862,7 +1862,7 @@ of the special mode functions."
1862 (if (not v) 1862 (if (not v)
1863 (setq speedbar-special-mode-expansion-list t) 1863 (setq speedbar-special-mode-expansion-list t)
1864 ;; If it is autoloaded, we need to load it now so that 1864 ;; If it is autoloaded, we need to load it now so that
1865 ;; we have access to the varialbe -speedbar-menu-items. 1865 ;; we have access to the variable -speedbar-menu-items.
1866 ;; Is this XEmacs safe? 1866 ;; Is this XEmacs safe?
1867 (let ((sf (symbol-function v))) 1867 (let ((sf (symbol-function v)))
1868 (if (and (listp sf) (eq (car sf) 'autoload)) 1868 (if (and (listp sf) (eq (car sf) 'autoload))
diff --git a/lisp/term.el b/lisp/term.el
index 484bc36363e..47cda9beeed 100644
--- a/lisp/term.el
+++ b/lisp/term.el
@@ -37,8 +37,8 @@
37;; -------------------------------------- 37;; --------------------------------------
38;; 38;;
39;; While the message passing and the colorization surely introduce some 39;; While the message passing and the colorization surely introduce some
40;; overhead this has became so small that IMHO is surely outweighted by 40;; overhead this has became so small that IMHO it is surely outweighed by
41;; the benefits you get but, as usual, YMMV 41;; the benefits you get but, as usual, YMMV.
42;; 42;;
43;; Important caveat, when deciding the cursor/'gray keys' keycodes I had to 43;; Important caveat, when deciding the cursor/'gray keys' keycodes I had to
44;; make a choice: on my Linux box this choice allows me to run all the 44;; make a choice: on my Linux box this choice allows me to run all the
diff --git a/lisp/term/ns-win.el b/lisp/term/ns-win.el
index b639af7cda0..df0ddd7de8b 100644
--- a/lisp/term/ns-win.el
+++ b/lisp/term/ns-win.el
@@ -702,19 +702,24 @@ See the documentation of `create-fontset-from-fontset-spec' for the format.")
702 702
703;;;; Pasteboard support. 703;;;; Pasteboard support.
704 704
705(declare-function ns-get-cut-buffer-internal "nsselect.m" (buffer)) 705(declare-function ns-get-selection-internal "nsselect.m" (buffer))
706(declare-function ns-store-selection-internal "nsselect.m" (buffer string))
707
708(define-obsolete-function-alias 'ns-get-cut-buffer-internal
709 'ns-get-selection-internal "24.1")
710(define-obsolete-function-alias 'ns-store-cut-buffer-internal
711 'ns-store-selection-internal "24.1")
712
706 713
707(defun ns-get-pasteboard () 714(defun ns-get-pasteboard ()
708 "Returns the value of the pasteboard." 715 "Returns the value of the pasteboard."
709 (ns-get-cut-buffer-internal 'CLIPBOARD)) 716 (ns-get-selection-internal 'CLIPBOARD))
710
711(declare-function ns-store-cut-buffer-internal "nsselect.m" (buffer string))
712 717
713(defun ns-set-pasteboard (string) 718(defun ns-set-pasteboard (string)
714 "Store STRING into the pasteboard of the Nextstep display server." 719 "Store STRING into the pasteboard of the Nextstep display server."
715 ;; Check the data type of STRING. 720 ;; Check the data type of STRING.
716 (if (not (stringp string)) (error "Nonstring given to pasteboard")) 721 (if (not (stringp string)) (error "Nonstring given to pasteboard"))
717 (ns-store-cut-buffer-internal 'CLIPBOARD string)) 722 (ns-store-selection-internal 'CLIPBOARD string))
718 723
719;; We keep track of the last text selected here, so we can check the 724;; We keep track of the last text selected here, so we can check the
720;; current selection against it, and avoid passing back our own text 725;; current selection against it, and avoid passing back our own text
@@ -742,11 +747,11 @@ See the documentation of `create-fontset-from-fontset-spec' for the format.")
742(defun ns-copy-including-secondary () 747(defun ns-copy-including-secondary ()
743 (interactive) 748 (interactive)
744 (call-interactively 'kill-ring-save) 749 (call-interactively 'kill-ring-save)
745 (ns-store-cut-buffer-internal 'SECONDARY 750 (ns-store-selection-internal 'SECONDARY
746 (buffer-substring (point) (mark t)))) 751 (buffer-substring (point) (mark t))))
747(defun ns-paste-secondary () 752(defun ns-paste-secondary ()
748 (interactive) 753 (interactive)
749 (insert (ns-get-cut-buffer-internal 'SECONDARY))) 754 (insert (ns-get-selection-internal 'SECONDARY)))
750 755
751 756
752;;;; Scrollbar handling. 757;;;; Scrollbar handling.
diff --git a/lisp/term/rxvt.el b/lisp/term/rxvt.el
index c784892ce6b..c64dc0e7a19 100644
--- a/lisp/term/rxvt.el
+++ b/lisp/term/rxvt.el
@@ -228,7 +228,7 @@ for the currently selected frame."
228 ;; 216 non-gray colors first 228 ;; 216 non-gray colors first
229 (let ((r 0) (g 0) (b 0)) 229 (let ((r 0) (g 0) (b 0))
230 (while (> ncolors 24) 230 (while (> ncolors 24)
231 ;; This and other formulae taken from 256colres.pl and 231 ;; This and other formulas taken from 256colres.pl and
232 ;; 88colres.pl in the xterm distribution. 232 ;; 88colres.pl in the xterm distribution.
233 (tty-color-define (format "color-%d" (- 256 ncolors)) 233 (tty-color-define (format "color-%d" (- 256 ncolors))
234 (- 256 ncolors) 234 (- 256 ncolors)
diff --git a/lisp/term/x-win.el b/lisp/term/x-win.el
index 05e18ed24a0..ac0f833da63 100644
--- a/lisp/term/x-win.el
+++ b/lisp/term/x-win.el
@@ -126,7 +126,7 @@ a file in the home directory."
126 126
127(defun emacs-session-save () 127(defun emacs-session-save ()
128 "This function is called when the window system is shutting down. 128 "This function is called when the window system is shutting down.
129If this function returns non-nil, the window system shutdown is cancelled. 129If this function returns non-nil, the window system shutdown is canceled.
130 130
131When a session manager tells Emacs that the window system is shutting 131When a session manager tells Emacs that the window system is shutting
132down, this function is called. It calls the functions in the hook 132down, this function is called. It calls the functions in the hook
diff --git a/lisp/term/xterm.el b/lisp/term/xterm.el
index c2856660ea8..f9d11cb2685 100644
--- a/lisp/term/xterm.el
+++ b/lisp/term/xterm.el
@@ -637,7 +637,7 @@ versions of xterm."
637 ;; 216 non-gray colors first 637 ;; 216 non-gray colors first
638 (let ((r 0) (g 0) (b 0)) 638 (let ((r 0) (g 0) (b 0))
639 (while (> ncolors 24) 639 (while (> ncolors 24)
640 ;; This and other formulae taken from 256colres.pl and 640 ;; This and other formulas taken from 256colres.pl and
641 ;; 88colres.pl in the xterm distribution. 641 ;; 88colres.pl in the xterm distribution.
642 (tty-color-define (format "color-%d" (- 256 ncolors)) 642 (tty-color-define (format "color-%d" (- 256 ncolors))
643 (- 256 ncolors) 643 (- 256 ncolors)
diff --git a/lisp/textmodes/artist.el b/lisp/textmodes/artist.el
index 0efabc2135a..2e90a4bf241 100644
--- a/lisp/textmodes/artist.el
+++ b/lisp/textmodes/artist.el
@@ -3960,11 +3960,11 @@ The 2-point shape SHAPE is drawn from X1, Y1 to X2, Y2."
3960;; Implementation note: This really should honor the interval-fn entry 3960;; Implementation note: This really should honor the interval-fn entry
3961;; in the master table, `artist-mt', which would mean leaving a timer 3961;; in the master table, `artist-mt', which would mean leaving a timer
3962;; that calls `draw-fn' every now and then. That timer would then have 3962;; that calls `draw-fn' every now and then. That timer would then have
3963;; to be cancelled and reinstalled whenever the user moves the cursor. 3963;; to be canceled and reinstalled whenever the user moves the cursor.
3964;; This could be done, but what if the user suddenly switches to another 3964;; This could be done, but what if the user suddenly switches to another
3965;; drawing mode, or even kills the buffer! In the mouse case, it is much 3965;; drawing mode, or even kills the buffer! In the mouse case, it is much
3966;; simpler: when at the end of `artist-mouse-draw-continously', the 3966;; simpler: when at the end of `artist-mouse-draw-continously', the
3967;; user has released the button, so the timer will always be cancelled 3967;; user has released the button, so the timer will always be canceled
3968;; at that point. 3968;; at that point.
3969(defun artist-key-draw-continously (x y) 3969(defun artist-key-draw-continously (x y)
3970 "Draw current continuous shape at X,Y." 3970 "Draw current continuous shape at X,Y."
@@ -4455,7 +4455,7 @@ If N is negative, move backward."
4455 "Set current fill character to be C." 4455 "Set current fill character to be C."
4456 (interactive "cType fill char (type RET to turn off): ") 4456 (interactive "cType fill char (type RET to turn off): ")
4457 (cond ((eq c ?\r) (setq artist-fill-char-set nil) 4457 (cond ((eq c ?\r) (setq artist-fill-char-set nil)
4458 (message "Fill cancelled")) 4458 (message "Fill canceled"))
4459 (t (setq artist-fill-char-set t) 4459 (t (setq artist-fill-char-set t)
4460 (setq artist-fill-char c) 4460 (setq artist-fill-char c)
4461 (message "Fill set to \"%c\"" c)))) 4461 (message "Fill set to \"%c\"" c))))
@@ -5589,7 +5589,7 @@ The event, EV, is the mouse event."
5589;; of drawing mode. 5589;; of drawing mode.
5590;; 5590;;
5591;; You should provide these functions. You might think that 5591;; You should provide these functions. You might think that
5592;; only you is using your type of mode, so noone will be able 5592;; only you is using your type of mode, so no one will be able
5593;; to switch to another operation of the same type of mode, 5593;; to switch to another operation of the same type of mode,
5594;; but someone else might base a new drawing mode upon your 5594;; but someone else might base a new drawing mode upon your
5595;; work. 5595;; work.
diff --git a/lisp/textmodes/fill.el b/lisp/textmodes/fill.el
index b8614b16f82..610b0c71357 100644
--- a/lisp/textmodes/fill.el
+++ b/lisp/textmodes/fill.el
@@ -82,7 +82,7 @@ reinserts the fill prefix in each resulting line."
82 (setq fill-prefix nil))) 82 (setq fill-prefix nil)))
83 (if fill-prefix 83 (if fill-prefix
84 (message "fill-prefix: \"%s\"" fill-prefix) 84 (message "fill-prefix: \"%s\"" fill-prefix)
85 (message "fill-prefix cancelled"))) 85 (message "fill-prefix canceled")))
86 86
87(defcustom adaptive-fill-mode t 87(defcustom adaptive-fill-mode t
88 "Non-nil means determine a paragraph's fill prefix from its text." 88 "Non-nil means determine a paragraph's fill prefix from its text."
@@ -383,7 +383,7 @@ and `fill-nobreak-invisible'."
383 "Char-table of characters that don't use space between words.") 383 "Char-table of characters that don't use space between words.")
384 384
385(progn 385(progn
386 ;; Register `kinsoku' for scripts HAN, KANA, BOPOMPFO, and CJK-MISS. 386 ;; Register `kinsoku' for scripts HAN, KANA, BOPOMOFO, and CJK-MISC.
387 ;; Also tell that they don't use space between words. 387 ;; Also tell that they don't use space between words.
388 (map-char-table 388 (map-char-table
389 #'(lambda (key val) 389 #'(lambda (key val)
diff --git a/lisp/textmodes/ispell.el b/lisp/textmodes/ispell.el
index d0967d63740..ba7b84fe1dd 100644
--- a/lisp/textmodes/ispell.el
+++ b/lisp/textmodes/ispell.el
@@ -2499,7 +2499,7 @@ scrolling the current window. Leave the new window selected."
2499 ;; hidden by new window, scroll it to just below new win 2499 ;; hidden by new window, scroll it to just below new win
2500 ;; otherwise set top line of other win so it doesn't scroll. 2500 ;; otherwise set top line of other win so it doesn't scroll.
2501 (if (< oldot top) (setq top oldot)) 2501 (if (< oldot top) (setq top oldot))
2502 ;; if frame is unsplitable, temporarily disable that... 2502 ;; if frame is unsplittable, temporarily disable that...
2503 (if (cdr (assq 'unsplittable (frame-parameters (selected-frame)))) 2503 (if (cdr (assq 'unsplittable (frame-parameters (selected-frame))))
2504 (let ((frame (selected-frame))) 2504 (let ((frame (selected-frame)))
2505 (modify-frame-parameters frame '((unsplittable . nil))) 2505 (modify-frame-parameters frame '((unsplittable . nil)))
@@ -3979,7 +3979,7 @@ Both should not be used to define a buffer-local dictionary."
3979; LocalWords: AMStex hspace includeonly nocite epsfig displaymath eqnarray reg 3979; LocalWords: AMStex hspace includeonly nocite epsfig displaymath eqnarray reg
3980; LocalWords: minipage modeline pers dict unhighlight buf grep sync prev inc 3980; LocalWords: minipage modeline pers dict unhighlight buf grep sync prev inc
3981; LocalWords: fn oldot NB AIX msg init read's bufs pt cmd Quinlan eg 3981; LocalWords: fn oldot NB AIX msg init read's bufs pt cmd Quinlan eg
3982; LocalWords: uuencoded unidiff sc nn VM SGML eval IspellPersDict unsplitable 3982; LocalWords: uuencoded unidiff sc nn VM SGML eval IspellPersDict
3983; LocalWords: lns XEmacs HTML casechars Multibyte 3983; LocalWords: lns XEmacs HTML casechars Multibyte
3984 3984
3985;;; ispell.el ends here 3985;;; ispell.el ends here
diff --git a/lisp/textmodes/picture.el b/lisp/textmodes/picture.el
index 678d48758da..3356ce195f2 100644
--- a/lisp/textmodes/picture.el
+++ b/lisp/textmodes/picture.el
@@ -742,7 +742,7 @@ by supplying an argument.
742Entry to this mode calls the value of `picture-mode-hook' if non-nil. 742Entry to this mode calls the value of `picture-mode-hook' if non-nil.
743 743
744Note that Picture mode commands will work outside of Picture mode, but 744Note that Picture mode commands will work outside of Picture mode, but
745they are not defaultly assigned to keys." 745they are not by default assigned to keys."
746 (interactive) 746 (interactive)
747 (if (eq major-mode 'picture-mode) 747 (if (eq major-mode 'picture-mode)
748 (error "You are already editing a picture") 748 (error "You are already editing a picture")
diff --git a/lisp/textmodes/reftex-dcr.el b/lisp/textmodes/reftex-dcr.el
index ff6ffffc382..2aecc34e2b0 100644
--- a/lisp/textmodes/reftex-dcr.el
+++ b/lisp/textmodes/reftex-dcr.el
@@ -212,7 +212,7 @@ to the functions `reftex-view-cr-cite' and `reftex-view-cr-ref'."
212 (add-hook 'pre-command-hook 'reftex-highlight-shall-die) 212 (add-hook 'pre-command-hook 'reftex-highlight-shall-die)
213 213
214 (when (eq how 'tmp-window) 214 (when (eq how 'tmp-window)
215 ;; Resize window and arrange restauration 215 ;; Resize window and arrange restoration
216 (shrink-window (1- (- (window-height) 9))) 216 (shrink-window (1- (- (window-height) 9)))
217 (recenter '(4)) 217 (recenter '(4))
218 (add-hook 'pre-command-hook 'reftex-restore-window-conf)) 218 (add-hook 'pre-command-hook 'reftex-restore-window-conf))
diff --git a/lisp/textmodes/remember.el b/lisp/textmodes/remember.el
index 07a4fae9c30..c184a90dfc2 100644
--- a/lisp/textmodes/remember.el
+++ b/lisp/textmodes/remember.el
@@ -474,7 +474,7 @@ If this is nil, then `diary-file' will be used instead."
474 (replace-match 474 (replace-match
475 (let ((style (if (boundp 'calendar-date-style) 475 (let ((style (if (boundp 'calendar-date-style)
476 calendar-date-style 476 calendar-date-style
477 ;; Don't complain about obsoleteness. 477 ;; Don't complain about obsolescence.
478 (if (with-no-warnings european-calendar-style) 478 (if (with-no-warnings european-calendar-style)
479 'european 479 'european
480 'american)))) 480 'american))))
diff --git a/lisp/textmodes/rst.el b/lisp/textmodes/rst.el
index 64dffe78d50..f2dba1575c2 100644
--- a/lisp/textmodes/rst.el
+++ b/lisp/textmodes/rst.el
@@ -243,7 +243,7 @@
243 (define-key map [(control ?=)] 'rst-adjust) ;; (Does not work on the Mac OSX.) 243 (define-key map [(control ?=)] 'rst-adjust) ;; (Does not work on the Mac OSX.)
244 ;; Display the hierarchy of decorations implied by the current document contents. 244 ;; Display the hierarchy of decorations implied by the current document contents.
245 (define-key map [(control c) (control h)] 'rst-display-decorations-hierarchy) 245 (define-key map [(control c) (control h)] 'rst-display-decorations-hierarchy)
246 ;; Homogeneize the decorations in the document. 246 ;; Homogenize the decorations in the document.
247 (define-key map [(control c) (control s)] 'rst-straighten-decorations) 247 (define-key map [(control c) (control s)] 'rst-straighten-decorations)
248;; (define-key map [(control c) (control s)] 'rst-straighten-deco-spacing) 248;; (define-key map [(control c) (control s)] 'rst-straighten-deco-spacing)
249 249
diff --git a/lisp/textmodes/table.el b/lisp/textmodes/table.el
index 65f6d98ef79..6f9e592d8ed 100644
--- a/lisp/textmodes/table.el
+++ b/lisp/textmodes/table.el
@@ -345,7 +345,7 @@
345;; Above code is well known ~/.emacs idiom for customizing a mode 345;; Above code is well known ~/.emacs idiom for customizing a mode
346;; specific keymap however it does not work for this package. This is 346;; specific keymap however it does not work for this package. This is
347;; because there is no table mode in effect. This package does not 347;; because there is no table mode in effect. This package does not
348;; use a local map therefor you must modify `table-cell-map' 348;; use a local map therefore you must modify `table-cell-map'
349;; explicitly. The correct way of achieving above task is: 349;; explicitly. The correct way of achieving above task is:
350;; 350;;
351;; (add-hook 'table-cell-map-hook 351;; (add-hook 'table-cell-map-hook
@@ -2155,7 +2155,7 @@ specified."
2155(defun table-shorten-cell (n) 2155(defun table-shorten-cell (n)
2156 "Shorten the current cell by N lines by shrinking the cell vertically. 2156 "Shorten the current cell by N lines by shrinking the cell vertically.
2157Shortening is done by removing blank lines from the bottom of the cell 2157Shortening is done by removing blank lines from the bottom of the cell
2158and possibly from the top of the cell as well. Therefor, the cell 2158and possibly from the top of the cell as well. Therefore, the cell
2159must have some bottom/top blank lines to be shorten effectively. This 2159must have some bottom/top blank lines to be shorten effectively. This
2160is applicable to all the cells aligned horizontally with the current 2160is applicable to all the cells aligned horizontally with the current
2161one because they are also shortened in order to keep the rectangular 2161one because they are also shortened in order to keep the rectangular
@@ -4293,7 +4293,7 @@ cache buffer into the designated cell in the table buffer."
4293 (car (table--get-coordinate (cdr (table--horizontal-cell-list nil t)))) 4293 (car (table--get-coordinate (cdr (table--horizontal-cell-list nil t))))
4294 (1+ (cdr (table--get-coordinate (cdr (table--vertical-cell-list nil t)))))))) 4294 (1+ (cdr (table--get-coordinate (cdr (table--vertical-cell-list nil t))))))))
4295 4295
4296(defun table-call-interactively (function &optional recoard-flag keys) 4296(defun table-call-interactively (function &optional record-flag keys)
4297 "Call FUNCTION, or a table version of it if applicable. 4297 "Call FUNCTION, or a table version of it if applicable.
4298See `call-interactively' for full description of the arguments." 4298See `call-interactively' for full description of the arguments."
4299 (let ((table-func (intern-soft (format "*table--cell-%s" function)))) 4299 (let ((table-func (intern-soft (format "*table--cell-%s" function))))
@@ -4301,7 +4301,7 @@ See `call-interactively' for full description of the arguments."
4301 (if (and table-func 4301 (if (and table-func
4302 (table--point-in-cell-p)) 4302 (table--point-in-cell-p))
4303 table-func 4303 table-func
4304 function) recoard-flag keys))) 4304 function) record-flag keys)))
4305 4305
4306(defun table-funcall (function &rest arguments) 4306(defun table-funcall (function &rest arguments)
4307 "Call FUNCTION, or a table version of it if applicable. 4307 "Call FUNCTION, or a table version of it if applicable.
diff --git a/lisp/textmodes/texinfmt.el b/lisp/textmodes/texinfmt.el
index a337d6f9f40..b186b02851d 100644
--- a/lisp/textmodes/texinfmt.el
+++ b/lisp/textmodes/texinfmt.el
@@ -2088,11 +2088,11 @@ This command is executed when texinfmt sees @item inside @multitable."
2088 (table-entry-height 0) 2088 (table-entry-height 0)
2089 ;; unformatted row looks like: A1 @tab A2 @tab A3 2089 ;; unformatted row looks like: A1 @tab A2 @tab A3
2090 ;; extract-row command deletes the source line in the table. 2090 ;; extract-row command deletes the source line in the table.
2091 (unformated-row (texinfo-multitable-extract-row))) 2091 (unformatted-row (texinfo-multitable-extract-row)))
2092 ;; Use a temporary buffer 2092 ;; Use a temporary buffer
2093 (set-buffer (get-buffer-create texinfo-multitable-buffer-name)) 2093 (set-buffer (get-buffer-create texinfo-multitable-buffer-name))
2094 (delete-region (point-min) (point-max)) 2094 (delete-region (point-min) (point-max))
2095 (insert unformated-row) 2095 (insert unformatted-row)
2096 (goto-char (point-min)) 2096 (goto-char (point-min))
2097;; 1. Check for correct number of @tab in line. 2097;; 1. Check for correct number of @tab in line.
2098 (let ((tab-number 1)) ; one @tab between two columns 2098 (let ((tab-number 1)) ; one @tab between two columns
diff --git a/lisp/textmodes/texnfo-upd.el b/lisp/textmodes/texnfo-upd.el
index 047bba72ccd..69d68a76d4b 100644
--- a/lisp/textmodes/texnfo-upd.el
+++ b/lisp/textmodes/texnfo-upd.el
@@ -23,7 +23,9 @@
23 23
24;;; Commentary: 24;;; Commentary:
25 25
26;; Known bug: update commands fail to ignore @ignore. 26;; Known bug: update commands fail to ignore @ignore, and fail to DTRT
27;; with the @if... directives (so expect trouble when the manual uses
28;; different @node lines or @menu items in @iftex and in @ifnottex).
27 29
28;; Summary: how to use the updating commands 30;; Summary: how to use the updating commands
29 31
@@ -37,6 +39,16 @@
37;; With a prefix argument, the `texinfo-update-node' and 39;; With a prefix argument, the `texinfo-update-node' and
38;; `texinfo-make-menu' functions do their jobs in the region. 40;; `texinfo-make-menu' functions do their jobs in the region.
39;; 41;;
42;; Important note: We do NOT recommend use of these commands to update
43;; the `Next', `Previous' and `Up' pointers on @node lines. Most
44;; manuals, including those whose Texinfo files adhere to the strucure
45;; described below, don't need these pointers, because makeinfo will
46;; generate them automatically (see the node "makeinfo Pointer
47;; Creation" in the Texinfo manual). By contrast, due to known bugs
48;; described above, texinfo-update-node etc. could produce incorrect
49;; pointers, and thus make a perfectly valid Texinfo file into an
50;; invalid one. You _have_ been warned!
51;;
40;; In brief, the functions for creating or updating nodes and menus, are: 52;; In brief, the functions for creating or updating nodes and menus, are:
41;; 53;;
42;; texinfo-update-node (&optional beginning end) 54;; texinfo-update-node (&optional beginning end)
@@ -89,6 +101,16 @@
89;; It does not matter whether the `@node' line has pre-existing 101;; It does not matter whether the `@node' line has pre-existing
90;; `Next', `Previous', or `Up' pointers in it. They are removed. 102;; `Next', `Previous', or `Up' pointers in it. They are removed.
91 103
104;; Warning: Since the pre-existing pointers are replaced with the ones
105;; computed by `texinfo-update-node', and since this function has
106;; known bugs with the more advanced Texinfo features (see above), it
107;; could produce an invalid Texinfo file. You are well advised not to
108;; use this function, except if you know what you are doing and
109;; exercise extreme caution. Keep in mind that most manuals do not
110;; need the `Next', `Previous', and `Up' pointers to be present on the
111;; @node lines; makeinfo will automatically generate them when it
112;; produces the Info or HTML versions of the manual.
113
92;; The `texinfo-every-node-update' function runs `texinfo-update-node' 114;; The `texinfo-every-node-update' function runs `texinfo-update-node'
93;; on the whole buffer. 115;; on the whole buffer.
94 116
@@ -119,12 +141,15 @@
119;; on the whole buffer. 141;; on the whole buffer.
120 142
121;; The `texinfo-master-menu' function creates an extended menu located 143;; The `texinfo-master-menu' function creates an extended menu located
122;; after the top node. (The file must have a top node.) The function 144;; after the top node. (The file must have a top node.) This
123;; first updates all the regular menus in the buffer (incorporating the 145;; function works only on Texinfo files all of whose menus are
124;; descriptions from pre-existing menus), and then constructs a master 146;; present in a single file; use `texinfo-multiple-files-update' for
125;; menu that includes every entry from every other menu. (However, the 147;; multi-file manuals. The function constructs a master menu that
126;; function cannot update an already existing master menu; if one 148;; includes every entry from every other menu. Use this command to
127;; exists, it must be removed before calling the function.) 149;; create or update the @detailmenu menu after you've created or
150;; updated all the menus in the file, including the menu in the Top
151;; node, using the `texinfo-make-menu' or the `texinfo-all-menus-update'
152;; command.
128 153
129;; The `texinfo-indent-menu-description' function indents every 154;; The `texinfo-indent-menu-description' function indents every
130;; description in the menu following point, to the specified column. 155;; description in the menu following point, to the specified column.
@@ -142,7 +167,7 @@
142;; as node names in pre-existing `@node' lines that lack names. 167;; as node names in pre-existing `@node' lines that lack names.
143;; 168;;
144;; Since node names should be more concise than section or chapter 169;; Since node names should be more concise than section or chapter
145;; titles, node names so inserted will need to be edited manually. 170;; titles, you will usually want to manually edit node names so inserted.
146 171
147 172
148;;; Code: 173;;; Code:
@@ -330,8 +355,13 @@ at the level specified by LEVEL. Point is left at the end of menu."
330 "Update every regular menu in a Texinfo file. 355 "Update every regular menu in a Texinfo file.
331Update pre-existing master menu, if there is one. 356Update pre-existing master menu, if there is one.
332 357
358Only single-file manuals are supported by this function. For
359multi-file manuals, use `texinfo-multiple-files-update'.
360
333If called with a non-nil argument, this function first updates all the 361If called with a non-nil argument, this function first updates all the
334nodes in the buffer before updating the menus. 362nodes in the buffer before updating the menus. Do NOT invoke this
363command with an argument if your Texinfo file uses @node lines without
364the `Next', `Previous', and `Up' pointers!
335 365
336Indents the first line of descriptions, and leaves trailing whitespace 366Indents the first line of descriptions, and leaves trailing whitespace
337in a menu that lacks descriptions, so descriptions will format well. 367in a menu that lacks descriptions, so descriptions will format well.
@@ -843,20 +873,35 @@ second and subsequent lines of a multi-line description."
843 873
844(defun texinfo-master-menu (update-all-nodes-menus-p) 874(defun texinfo-master-menu (update-all-nodes-menus-p)
845 "Make a master menu for a whole Texinfo file. 875 "Make a master menu for a whole Texinfo file.
846Non-nil argument (prefix, if interactive) means first update all 876Remove pre-existing master menu, if there is one.
847existing nodes and menus. Remove pre-existing master menu, if there is one. 877
848 878This function supports only single-file manuals. For multi-file
849This function creates a master menu that follows the top node. The 879manuals, use `texinfo-multiple-files-update'.
850master menu includes every entry from all the other menus. It 880
851replaces any existing ordinary menu that follows the top node. 881This function creates or updates the @detailmenu section of a
852 882master menu that follows the Top node. It replaces any existing
853If called with a non-nil argument, this function first updates all the 883detailed menu that follows the top node. The detailed menu
854menus in the buffer (incorporating descriptions from pre-existing 884includes every entry from all the other menus. By default, the
855menus) before it constructs the master menu. 885existing menus, including the menu in the Top node, are not
856 886updated according to the buffer contents, so all the menus should
857The function removes the detailed part of an already existing master 887be updated first using `texinfo-make-menu' or
858menu. This action depends on the pre-existing master menu using the 888`texinfo-all-menus-update', which see. Alternatively, invoke
859standard `texinfo-master-menu-header'. 889this function with a prefix argument, see below.
890
891Non-nil, non-numeric argument (C-u prefix, if interactive) means
892first update all existing menus in the buffer (incorporating
893descriptions from pre-existing menus) before it constructs the
894master menu. If the argument is numeric (e.g., \"C-u 2\"),
895update all existing nodes as well, by calling
896\`texinfo-update-node' on the entire file. Warning: do NOT
897invoke with a numeric argument if your Texinfo file uses @node
898lines without the `Next', `Previous', `Up' pointers, as the
899result could be an invalid Texinfo file!
900
901The function removes and recreates the detailed part of an already
902existing master menu. This action assumes that the pre-existing
903master menu uses the standard `texinfo-master-menu-header' for the
904detailed menu.
860 905
861The master menu has the following format, which is adapted from the 906The master menu has the following format, which is adapted from the
862recommendation in the Texinfo Manual: 907recommendation in the Texinfo Manual:
@@ -909,10 +954,11 @@ section titles are often too short to explain a node well."
909 954
910 (if update-all-nodes-menus-p 955 (if update-all-nodes-menus-p
911 (progn 956 (progn
912 (message "Making a master menu in %s ...first updating all nodes... " 957 (when (numberp update-all-nodes-menus-p)
913 (buffer-name)) 958 (message
914 (texinfo-update-node (point-min) (point-max)) 959 "Making a master menu in %s ...first updating all nodes... "
915 960 (buffer-name))
961 (texinfo-update-node (point-min) (point-max)))
916 (message "Updating all menus in %s ... " (buffer-name)) 962 (message "Updating all menus in %s ... " (buffer-name))
917 (texinfo-make-menu (point-min) (point-max)))) 963 (texinfo-make-menu (point-min) (point-max))))
918 964
@@ -978,7 +1024,7 @@ However, there does not need to be a title field."
978 (let ((first-chapter 1024 (let ((first-chapter
979 (save-excursion (re-search-forward "^@node\\|^@include") (point)))) 1025 (save-excursion (re-search-forward "^@node\\|^@include") (point))))
980 (unless (re-search-forward "^@menu" first-chapter t) 1026 (unless (re-search-forward "^@menu" first-chapter t)
981 (error "Buffer lacks ordinary `Top' menu in which to insert master"))) 1027 (error "Buffer lacks a menu in its first node; create it, then run me again")))
982 (beginning-of-line) 1028 (beginning-of-line)
983 (delete-region ; buffer must have ordinary top menu 1029 (delete-region ; buffer must have ordinary top menu
984 (point) 1030 (point)
@@ -1119,7 +1165,7 @@ error if the node is not the top node and a section is not found."
1119 "texinfo-specific-section-type: Chapter or section not found")))))) 1165 "texinfo-specific-section-type: Chapter or section not found"))))))
1120 1166
1121(defun texinfo-hierarchic-level () 1167(defun texinfo-hierarchic-level ()
1122 "Return the general hierarchal level of the next node in a texinfo file. 1168 "Return the general hierarchical level of the next node in a texinfo file.
1123Thus, a subheading or appendixsubsec is of type subsection." 1169Thus, a subheading or appendixsubsec is of type subsection."
1124 (let ((case-fold-search t)) 1170 (let ((case-fold-search t))
1125 (cadr (assoc 1171 (cadr (assoc
@@ -1207,6 +1253,11 @@ end of that region; it limits the search."
1207 "Without any prefix argument, update the node in which point is located. 1253 "Without any prefix argument, update the node in which point is located.
1208Interactively, a prefix argument means to operate on the region. 1254Interactively, a prefix argument means to operate on the region.
1209 1255
1256Warning: do NOT use this function if your Texinfo file uses @node
1257lines without the `Next', `Previous', `Up' pointers, because the
1258result could be an invalid Texinfo file due to known deficiencies
1259in this command: it does not support @ignore and @if* directives.
1260
1210The functions for creating or updating nodes and menus, and their 1261The functions for creating or updating nodes and menus, and their
1211keybindings, are: 1262keybindings, are:
1212 1263
@@ -1246,7 +1297,12 @@ which menu descriptions are indented. Its default value is 32."
1246 (message "Done...nodes updated in region. You may save the buffer.")))))) 1297 (message "Done...nodes updated in region. You may save the buffer."))))))
1247 1298
1248(defun texinfo-every-node-update () 1299(defun texinfo-every-node-update ()
1249 "Update every node in a Texinfo file." 1300 "Update every node in a Texinfo file.
1301
1302Warning: do NOT use this function if your Texinfo file uses @node
1303lines without the `Next', `Previous', `Up' pointers, because the
1304result could be an invalid Texinfo file due to known deficiencies
1305in this command: it does not support @ignore and @if* directives."
1250 (interactive) 1306 (interactive)
1251 (save-excursion 1307 (save-excursion
1252 (texinfo-update-node (point-min) (point-max)) 1308 (texinfo-update-node (point-min) (point-max))
@@ -1934,7 +1990,11 @@ With optional UPDATE-EVERYTHING argument (numeric prefix arg, if
1934interactive), update all the menus and all the `Next', `Previous', and 1990interactive), update all the menus and all the `Next', `Previous', and
1935`Up' pointers of all the files included in OUTER-FILE before inserting 1991`Up' pointers of all the files included in OUTER-FILE before inserting
1936a master menu in OUTER-FILE. Also, update the `Top' level node 1992a master menu in OUTER-FILE. Also, update the `Top' level node
1937pointers of OUTER-FILE. 1993pointers of OUTER-FILE. Do NOT invoke this command with a numeric prefix
1994arg, if your files use @node lines without the `Next', `Previous', `Up'
1995pointers, because this could produce invalid Texinfo files due to known
1996deficiencies in `texinfo-update-node': it does not support the @ignore
1997and @if... directives.
1938 1998
1939Notes: 1999Notes:
1940 2000
diff --git a/lisp/time.el b/lisp/time.el
index ac4a011bdf8..4955b177545 100644
--- a/lisp/time.el
+++ b/lisp/time.el
@@ -369,7 +369,7 @@ would give mode line times like `94/12/30 21:07:48 (UTC)'."
369 nil))) 369 nil)))
370 370
371(with-no-warnings 371(with-no-warnings
372 ;; Warnings are suppresed to avoid "global/dynamic var `X' lacks a prefix". 372 ;; Warnings are suppressed to avoid "global/dynamic var `X' lacks a prefix".
373 (defvar now) 373 (defvar now)
374 (defvar time) 374 (defvar time)
375 (defvar load) 375 (defvar load)
diff --git a/lisp/url/ChangeLog b/lisp/url/ChangeLog
index 48d2caf35f4..db28770ad0e 100644
--- a/lisp/url/ChangeLog
+++ b/lisp/url/ChangeLog
@@ -1673,7 +1673,7 @@
1673 (url-dav-process-DAV:activelock) 1673 (url-dav-process-DAV:activelock)
1674 (url-dav-process-DAV:lockdiscovery): Can now correctly parse 1674 (url-dav-process-DAV:lockdiscovery): Can now correctly parse
1675 DAV:lockdiscovery nodes, so that we can find out who has a 1675 DAV:lockdiscovery nodes, so that we can find out who has a
1676 resource locked and properly parse the reponse to a LOCK request. 1676 resource locked and properly parse the response to a LOCK request.
1677 (url-dav-process-DAV:status): Now parses out the numeric status 1677 (url-dav-process-DAV:status): Now parses out the numeric status
1678 from the HTTP response line. 1678 from the HTTP response line.
1679 (url-dav-process-response): New function to handle all the 1679 (url-dav-process-response): New function to handle all the
@@ -2448,7 +2448,7 @@
2448 * lisp/url-nfs.el (url-nfs-create-wrapper): New function to create 2448 * lisp/url-nfs.el (url-nfs-create-wrapper): New function to create
2449 wrappers onto the appropriate file-based URLs for file-name-handlers. 2449 wrappers onto the appropriate file-based URLs for file-name-handlers.
2450 2450
2451 * lisp/url-ftp.el: Moved the FTP stuff into it's own file - it 2451 * lisp/url-ftp.el: Moved the FTP stuff into its own file - it
2452 might get messy with file-name-handlers and things. 2452 might get messy with file-name-handlers and things.
2453 2453
2454 * lisp/url-http.el (url-http-clean-headers): Fix problem when 2454 * lisp/url-http.el (url-http-clean-headers): Fix problem when
diff --git a/lisp/url/url-cookie.el b/lisp/url/url-cookie.el
index f8417791ce5..746a4dc77b5 100644
--- a/lisp/url/url-cookie.el
+++ b/lisp/url/url-cookie.el
@@ -316,7 +316,7 @@ telling Microsoft that."
316 (set (if (> trusted untrusted) 'untrusted 'trusted) nil)) 316 (set (if (> trusted untrusted) 'untrusted 'trusted) nil))
317 (cond 317 (cond
318 (untrusted 318 (untrusted
319 ;; The site was explicity marked as untrusted by the user. 319 ;; The site was explicitly marked as untrusted by the user.
320 nil) 320 nil)
321 ((or (eq url-privacy-level 'paranoid) 321 ((or (eq url-privacy-level 'paranoid)
322 (and (listp url-privacy-level) (memq 'cookies url-privacy-level))) 322 (and (listp url-privacy-level) (memq 'cookies url-privacy-level)))
diff --git a/lisp/url/url-gw.el b/lisp/url/url-gw.el
index 7d80f2f6725..a3a384b7a90 100644
--- a/lisp/url/url-gw.el
+++ b/lisp/url/url-gw.el
@@ -72,12 +72,12 @@ This list will be executed as a command after logging in via telnet."
72 :group 'url-gateway) 72 :group 'url-gateway)
73 73
74(defcustom url-gateway-telnet-login-prompt "^\r*.?login:" 74(defcustom url-gateway-telnet-login-prompt "^\r*.?login:"
75 "Prompt that tells us we should send our username when loggin in w/telnet." 75 "Prompt that tells us we should send our username when logging in w/telnet."
76 :type 'regexp 76 :type 'regexp
77 :group 'url-gateway) 77 :group 'url-gateway)
78 78
79(defcustom url-gateway-telnet-password-prompt "^\r*.?password:" 79(defcustom url-gateway-telnet-password-prompt "^\r*.?password:"
80 "Prompt that tells us we should send our password when loggin in w/telnet." 80 "Prompt that tells us we should send our password when logging in w/telnet."
81 :type 'regexp 81 :type 'regexp
82 :group 'url-gateway) 82 :group 'url-gateway)
83 83
diff --git a/lisp/url/url-http.el b/lisp/url/url-http.el
index a9ff042d681..9b9bdb6416e 100644
--- a/lisp/url/url-http.el
+++ b/lisp/url/url-http.el
@@ -237,12 +237,12 @@ request.")
237 (if proxy-auth 237 (if proxy-auth
238 (setq proxy-auth (concat "Proxy-Authorization: " proxy-auth "\r\n"))) 238 (setq proxy-auth (concat "Proxy-Authorization: " proxy-auth "\r\n")))
239 239
240 ;; Protection against stupid values in the referer 240 ;; Protection against stupid values in the referrer
241 (if (and ref-url (stringp ref-url) (or (string= ref-url "file:nil") 241 (if (and ref-url (stringp ref-url) (or (string= ref-url "file:nil")
242 (string= ref-url ""))) 242 (string= ref-url "")))
243 (setq ref-url nil)) 243 (setq ref-url nil))
244 244
245 ;; We do not want to expose the referer if the user is paranoid. 245 ;; We do not want to expose the referrer if the user is paranoid.
246 (if (or (memq url-privacy-level '(low high paranoid)) 246 (if (or (memq url-privacy-level '(low high paranoid))
247 (and (listp url-privacy-level) 247 (and (listp url-privacy-level)
248 (memq 'lastloc url-privacy-level))) 248 (memq 'lastloc url-privacy-level)))
diff --git a/lisp/url/url-vars.el b/lisp/url/url-vars.el
index cfb98c6937e..19e0b621d87 100644
--- a/lisp/url/url-vars.el
+++ b/lisp/url/url-vars.el
@@ -62,7 +62,6 @@
62(mapc 'make-variable-buffer-local 62(mapc 'make-variable-buffer-local
63 '( 63 '(
64 url-current-object 64 url-current-object
65 url-current-referer
66 url-current-mime-headers 65 url-current-mime-headers
67 )) 66 ))
68 67
diff --git a/lisp/vc/ediff-init.el b/lisp/vc/ediff-init.el
index 787a8b7c0f1..d3db66a9e2a 100644
--- a/lisp/vc/ediff-init.el
+++ b/lisp/vc/ediff-init.el
@@ -370,7 +370,7 @@ It needs to be killed when we quit the session.")
370 this-command))) 370 this-command)))
371 371
372(defgroup ediff-highlighting nil 372(defgroup ediff-highlighting nil
373 "Hilighting of difference regions in Ediff." 373 "Highlighting of difference regions in Ediff."
374 :prefix "ediff-" 374 :prefix "ediff-"
375 :group 'ediff) 375 :group 'ediff)
376 376
diff --git a/lisp/vc/ediff-ptch.el b/lisp/vc/ediff-ptch.el
index ef273c610fe..6563dca5ec6 100644
--- a/lisp/vc/ediff-ptch.el
+++ b/lisp/vc/ediff-ptch.el
@@ -373,7 +373,7 @@ other files, enter /dev/null
373 (concat actual-dir (cdr proposed-file-names))))) 373 (concat actual-dir (cdr proposed-file-names)))))
374 )) 374 ))
375 ediff-patch-map) 375 ediff-patch-map)
376 ;; Check for the existing files in each pair and discard the nonexisting 376 ;; Check for the existing files in each pair and discard the nonexistent
377 ;; ones. If both exist, ask the user. 377 ;; ones. If both exist, ask the user.
378 (mapcar (lambda (session-info) 378 (mapcar (lambda (session-info)
379 (let* ((file1 (car (ediff-get-session-objA-name session-info))) 379 (let* ((file1 (car (ediff-get-session-objA-name session-info)))
diff --git a/lisp/vc/emerge.el b/lisp/vc/emerge.el
index 3ba5bcdb90a..bc4b0725c4e 100644
--- a/lisp/vc/emerge.el
+++ b/lisp/vc/emerge.el
@@ -1754,7 +1754,7 @@ to the left margin, if they are in windows."
1754;; If there are min-lines lines above and below the region, then don't do 1754;; If there are min-lines lines above and below the region, then don't do
1755;; anything. 1755;; anything.
1756;; If not, recenter the region to make it so. 1756;; If not, recenter the region to make it so.
1757;; If that isn't possible, remove context lines balancedly from top and bottom 1757;; If that isn't possible, remove context lines evenly from top and bottom
1758;; so the entire region shows. 1758;; so the entire region shows.
1759;; If that isn't possible, show the top of the region. 1759;; If that isn't possible, show the top of the region.
1760;; BEG must be at the beginning of a line. 1760;; BEG must be at the beginning of a line.
diff --git a/lisp/vc/pcvs.el b/lisp/vc/pcvs.el
index 256719d4c84..9a8be04fc38 100644
--- a/lisp/vc/pcvs.el
+++ b/lisp/vc/pcvs.el
@@ -322,7 +322,7 @@ The argument is added (or not) to the list of FLAGS and is constructed
322by appending the branch to ARG which defaults to \"-r\". 322by appending the branch to ARG which defaults to \"-r\".
323Since the `cvs-secondary-branch-prefix' is only active if the primary 323Since the `cvs-secondary-branch-prefix' is only active if the primary
324prefix is active, it is important to read the secondary prefix before 324prefix is active, it is important to read the secondary prefix before
325the primay since reading the primary can deactivate it." 325the primary since reading the primary can deactivate it."
326 (let ((branch (and (cvs-prefix-get 'cvs-branch-prefix 'read-only) 326 (let ((branch (and (cvs-prefix-get 'cvs-branch-prefix 'read-only)
327 (cvs-prefix-get 'cvs-secondary-branch-prefix)))) 327 (cvs-prefix-get 'cvs-secondary-branch-prefix))))
328 (if branch (cons (concat (or arg "-r") branch) flags) flags))) 328 (if branch (cons (concat (or arg "-r") branch) flags) flags)))
diff --git a/lisp/vc/vc-bzr.el b/lisp/vc/vc-bzr.el
index c5c0ce73b3a..508420f026a 100644
--- a/lisp/vc/vc-bzr.el
+++ b/lisp/vc/vc-bzr.el
@@ -764,7 +764,10 @@ REV non-nil gets an error."
764 764
765(defun vc-bzr-rename-file (old new) 765(defun vc-bzr-rename-file (old new)
766 "Rename file from OLD to NEW using `bzr mv'." 766 "Rename file from OLD to NEW using `bzr mv'."
767 (vc-bzr-command "mv" nil 0 new old)) 767 (setq old (expand-file-name old))
768 (setq new (expand-file-name new))
769 (vc-bzr-command "mv" nil 0 new old)
770 (message "Renamed %s => %s" old new))
768 771
769(defvar vc-bzr-annotation-table nil 772(defvar vc-bzr-annotation-table nil
770 "Internal use.") 773 "Internal use.")
diff --git a/lisp/vc/vc-dir.el b/lisp/vc/vc-dir.el
index d4b631a1d1b..f14b8830d43 100644
--- a/lisp/vc/vc-dir.el
+++ b/lisp/vc/vc-dir.el
@@ -534,57 +534,71 @@ If a prefix argument is given, move by that many lines."
534 (save-excursion 534 (save-excursion
535 (goto-char (region-beginning)) 535 (goto-char (region-beginning))
536 (while (<= (line-number-at-pos) lastl) 536 (while (<= (line-number-at-pos) lastl)
537 (funcall mark-unmark-function)))) 537 (condition-case nil
538 (funcall mark-unmark-function)
539 ;; `vc-dir-mark-file' signals an error if we try marking
540 ;; a directory containing marked files in its tree, or a
541 ;; file in a marked directory tree. Just continue.
542 (error (vc-dir-next-line 1))))))
538 (funcall mark-unmark-function))) 543 (funcall mark-unmark-function)))
539 544
540(defun vc-dir-parent-marked-p (arg) 545(defun vc-dir-parent-marked-p (arg)
541 ;; Return nil if none of the parent directories of arg is marked. 546 ;; Non-nil iff a parent directory of arg is marked.
547 ;; Return value, if non-nil is the `ewoc-data' for the marked parent.
542 (let* ((argdir (vc-dir-node-directory arg)) 548 (let* ((argdir (vc-dir-node-directory arg))
543 (arglen (length argdir)) 549 (arglen (length argdir))
544 (crt arg) 550 (crt arg)
545 data dir) 551 (found nil))
546 ;; Go through the predecessors, checking if any directory that is 552 ;; Go through the predecessors, checking if any directory that is
547 ;; a parent is marked. 553 ;; a parent is marked.
548 (while (setq crt (ewoc-prev vc-ewoc crt)) 554 (while (and (null found)
549 (setq data (ewoc-data crt)) 555 (setq crt (ewoc-prev vc-ewoc crt)))
550 (setq dir (vc-dir-node-directory crt)) 556 (let ((data (ewoc-data crt))
551 (when (and (vc-dir-fileinfo->directory data) 557 (dir (vc-dir-node-directory crt)))
552 (vc-string-prefix-p dir argdir)) 558 (and (vc-dir-fileinfo->directory data)
553 (when (vc-dir-fileinfo->marked data) 559 (vc-string-prefix-p dir argdir)
554 (error "Cannot mark `%s', parent directory `%s' marked" 560 (vc-dir-fileinfo->marked data)
555 (vc-dir-fileinfo->name (ewoc-data arg)) 561 (setq found data))))
556 (vc-dir-fileinfo->name data))))) 562 found))
557 nil))
558 563
559(defun vc-dir-children-marked-p (arg) 564(defun vc-dir-children-marked-p (arg)
560 ;; Return nil if none of the children of arg is marked. 565 ;; Non-nil iff a child of ARG is marked.
566 ;; Return value, if non-nil, is the `ewoc-data' for the marked child.
561 (let* ((argdir-re (concat "\\`" (regexp-quote (vc-dir-node-directory arg)))) 567 (let* ((argdir-re (concat "\\`" (regexp-quote (vc-dir-node-directory arg))))
562 (is-child t) 568 (is-child t)
563 (crt arg) 569 (crt arg)
564 data dir) 570 (found nil))
565 (while (and is-child (setq crt (ewoc-next vc-ewoc crt))) 571 (while (and is-child
566 (setq data (ewoc-data crt)) 572 (null found)
567 (setq dir (vc-dir-node-directory crt)) 573 (setq crt (ewoc-next vc-ewoc crt)))
568 (if (string-match argdir-re dir) 574 (let ((data (ewoc-data crt))
569 (when (vc-dir-fileinfo->marked data) 575 (dir (vc-dir-node-directory crt)))
570 (error "Cannot mark `%s', child `%s' marked" 576 (if (string-match argdir-re dir)
571 (vc-dir-fileinfo->name (ewoc-data arg)) 577 (if (vc-dir-fileinfo->marked data)
572 (vc-dir-fileinfo->name data))) 578 (setq found data))
573 ;; We are done, we got to an entry that is not a child of `arg'. 579 ;; We are done, we got to an entry that is not a child of `arg'.
574 (setq is-child nil))) 580 (setq is-child nil))))
575 nil)) 581 found))
576 582
577(defun vc-dir-mark-file (&optional arg) 583(defun vc-dir-mark-file (&optional arg)
578 ;; Mark ARG or the current file and move to the next line. 584 ;; Mark ARG or the current file and move to the next line.
579 (let* ((crt (or arg (ewoc-locate vc-ewoc))) 585 (let* ((crt (or arg (ewoc-locate vc-ewoc)))
580 (file (ewoc-data crt)) 586 (file (ewoc-data crt))
581 (isdir (vc-dir-fileinfo->directory file))) 587 (isdir (vc-dir-fileinfo->directory file))
582 (when (or (and isdir (not (vc-dir-children-marked-p crt))) 588 ;; Forbid marking a directory containing marked files in its
583 (and (not isdir) (not (vc-dir-parent-marked-p crt)))) 589 ;; tree, or a file in a marked directory tree.
584 (setf (vc-dir-fileinfo->marked file) t) 590 (conflict (if isdir
585 (ewoc-invalidate vc-ewoc crt) 591 (vc-dir-children-marked-p crt)
586 (unless (or arg (mouse-event-p last-command-event)) 592 (vc-dir-parent-marked-p crt))))
587 (vc-dir-next-line 1))))) 593 (when conflict
594 (error (if isdir
595 "File `%s' in this directory is already marked"
596 "Parent directory `%s' is already marked")
597 (vc-dir-fileinfo->name conflict)))
598 (setf (vc-dir-fileinfo->marked file) t)
599 (ewoc-invalidate vc-ewoc crt)
600 (unless (or arg (mouse-event-p last-command-event))
601 (vc-dir-next-line 1))))
588 602
589(defun vc-dir-mark () 603(defun vc-dir-mark ()
590 "Mark the current file or all files in the region. 604 "Mark the current file or all files in the region.
@@ -621,19 +635,19 @@ share the same state."
621 (setf (vc-dir-fileinfo->marked filearg) t) 635 (setf (vc-dir-fileinfo->marked filearg) t)
622 t)) 636 t))
623 vc-ewoc)) 637 vc-ewoc))
624 (let ((data (ewoc-data (ewoc-locate vc-ewoc)))) 638 (let* ((crt (ewoc-locate vc-ewoc))
639 (data (ewoc-data crt)))
625 (if (vc-dir-fileinfo->directory data) 640 (if (vc-dir-fileinfo->directory data)
626 ;; It's a directory, mark child files. 641 ;; It's a directory, mark child files.
627 (let ((crt (ewoc-locate vc-ewoc))) 642 (let (crt-data)
628 (unless (vc-dir-children-marked-p crt) 643 (while (and (setq crt (ewoc-next vc-ewoc crt))
629 (while (setq crt (ewoc-next vc-ewoc crt)) 644 (setq crt-data (ewoc-data crt))
630 (let ((crt-data (ewoc-data crt))) 645 (not (vc-dir-fileinfo->directory crt-data)))
631 (unless (vc-dir-fileinfo->directory crt-data) 646 (setf (vc-dir-fileinfo->marked crt-data) t)
632 (setf (vc-dir-fileinfo->marked crt-data) t) 647 (ewoc-invalidate vc-ewoc crt)))
633 (ewoc-invalidate vc-ewoc crt))))))
634 ;; It's a file 648 ;; It's a file
635 (let ((state (vc-dir-fileinfo->state data)) 649 (let ((state (vc-dir-fileinfo->state data)))
636 (crt (ewoc-nth vc-ewoc 0))) 650 (setq crt (ewoc-nth vc-ewoc 0))
637 (while crt 651 (while crt
638 (let ((crt-data (ewoc-data crt))) 652 (let ((crt-data (ewoc-data crt)))
639 (when (and (not (vc-dir-fileinfo->marked crt-data)) 653 (when (and (not (vc-dir-fileinfo->marked crt-data))
diff --git a/lisp/vc/vc-hg.el b/lisp/vc/vc-hg.el
index 0516abbf024..7b90536a31b 100644
--- a/lisp/vc/vc-hg.el
+++ b/lisp/vc/vc-hg.el
@@ -216,7 +216,7 @@ highlighting the Log View buffer."
216 ((eq state ?R) 'removed) 216 ((eq state ?R) 'removed)
217 ((eq state ?!) 'missing) 217 ((eq state ?!) 'missing)
218 ((eq state ??) 'unregistered) 218 ((eq state ??) 'unregistered)
219 ((eq state ?C) 'up-to-date) ;; Older mercurials use this 219 ((eq state ?C) 'up-to-date) ;; Older mercurial versions use this.
220 (t 'up-to-date))))))) 220 (t 'up-to-date)))))))
221 221
222(defun vc-hg-working-revision (file) 222(defun vc-hg-working-revision (file)
diff --git a/lisp/vc/vc-hooks.el b/lisp/vc/vc-hooks.el
index 148f6cde930..c9e30772318 100644
--- a/lisp/vc/vc-hooks.el
+++ b/lisp/vc/vc-hooks.el
@@ -114,9 +114,9 @@ Otherwise, not displayed."
114 :group 'vc) 114 :group 'vc)
115 115
116(defcustom vc-keep-workfiles t 116(defcustom vc-keep-workfiles t
117 "If non-nil, don't delete working files after registering changes. 117 "Whether to keep work files on disk after commits, on a locking VCS.
118If the back-end is CVS, workfiles are always kept, regardless of the 118This variable has no effect on modern merging-based version
119value of this flag." 119control systems."
120 :type 'boolean 120 :type 'boolean
121 :group 'vc) 121 :group 'vc)
122 122
diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el
index eea1a992094..87e8901e33a 100644
--- a/lisp/vc/vc.el
+++ b/lisp/vc/vc.el
@@ -951,13 +951,13 @@ Within directories, only files already under version control are noticed."
951(defun vc-deduce-fileset (&optional observer allow-unregistered 951(defun vc-deduce-fileset (&optional observer allow-unregistered
952 state-model-only-files) 952 state-model-only-files)
953 "Deduce a set of files and a backend to which to apply an operation. 953 "Deduce a set of files and a backend to which to apply an operation.
954
955Return (BACKEND FILESET FILESET-ONLY-FILES STATE CHECKOUT-MODEL). 954Return (BACKEND FILESET FILESET-ONLY-FILES STATE CHECKOUT-MODEL).
956If we're in VC-dir mode, the fileset is the list of marked files. 955
957Otherwise, if we're looking at a buffer visiting a version-controlled file, 956If we're in VC-dir mode, FILESET is the list of marked files.
958the fileset is a singleton containing this file. 957Otherwise, if in a buffer visiting a version-controlled file,
959If none of these conditions is met, but ALLOW_UNREGISTERED is on and the 958FILESET is a single-file fileset containing that file.
960visited file is not registered, return a singleton fileset containing it. 959Otherwise, if ALLOW-UNREGISTERED is non-nil and the visited file
960is unregistered, FILESET is a single-file fileset containing it.
961Otherwise, throw an error. 961Otherwise, throw an error.
962 962
963STATE-MODEL-ONLY-FILES if non-nil, means that the caller needs 963STATE-MODEL-ONLY-FILES if non-nil, means that the caller needs
@@ -1048,34 +1048,27 @@ current buffer."
1048;;;###autoload 1048;;;###autoload
1049(defun vc-next-action (verbose) 1049(defun vc-next-action (verbose)
1050 "Do the next logical version control operation on the current fileset. 1050 "Do the next logical version control operation on the current fileset.
1051This requires that all files in the fileset be in the same state. 1051This requires that all files in the current VC fileset be in the
1052 1052same state. If not, signal an error.
1053For locking systems: 1053
1054 If every file is not already registered, this registers each for version 1054For merging-based version control systems:
1055control. 1055 If every file in the VC fileset is not registered for version
1056 If every file is registered and not locked by anyone, this checks out 1056 control, register the fileset (but don't commit).
1057a writable and locked file of each ready for editing. 1057 If every work file in the VC fileset is added or changed, pop
1058 If every file is checked out and locked by the calling user, this 1058 up a *vc-log* buffer to commit the fileset.
1059first checks to see if each file has changed since checkout. If not, 1059 For a centralized version control system, if any work file in
1060it performs a revert on that file. 1060 the VC fileset is out of date, offer to update the fileset.
1061 If every file has been changed, this pops up a buffer for entry 1061
1062of a log message; when the message has been entered, it checks in the 1062For old-style locking-based version control systems, like RCS:
1063resulting changes along with the log message as change commentary. If 1063 If every file is not registered, register the file(s).
1064the variable `vc-keep-workfiles' is non-nil (which is its default), a 1064 If every file is registered and unlocked, check out (lock)
1065read-only copy of each changed file is left in place afterwards. 1065 the file(s) for editing.
1066 If the affected file is registered and locked by someone else, you are 1066 If every file is locked by you and has changes, pop up a
1067given the option to steal the lock(s). 1067 *vc-log* buffer to check in the changes. If the variable
1068 1068 `vc-keep-workfiles' is non-nil (the default), leave a
1069For merging systems: 1069 read-only copy of each changed file after checking in.
1070 If every file is not already registered, this registers each one for version 1070 If every file is locked by you and unchanged, unlock them.
1071control. This does an add, but not a commit. 1071 If every file is locked by someone else, offer to steal the lock."
1072 If every file is added but not committed, each one is committed.
1073 If every working file is changed, but the corresponding repository file is
1074unchanged, this pops up a buffer for entry of a log message; when the
1075message has been entered, it checks in the resulting changes along
1076with the logmessage as change commentary. A writable file is retained.
1077 If the repository file is changed, you are asked if you want to
1078merge in the changes into your working copy."
1079 (interactive "P") 1072 (interactive "P")
1080 (let* ((vc-fileset (vc-deduce-fileset nil t 'state-model-only-files)) 1073 (let* ((vc-fileset (vc-deduce-fileset nil t 'state-model-only-files))
1081 (backend (car vc-fileset)) 1074 (backend (car vc-fileset))
diff --git a/lisp/vcursor.el b/lisp/vcursor.el
index d4fc35920a9..b8673f2049f 100644
--- a/lisp/vcursor.el
+++ b/lisp/vcursor.el
@@ -223,7 +223,7 @@
223;; automatically for a PC if Oemacs is detected. This set uses separate 223;; automatically for a PC if Oemacs is detected. This set uses separate
224;; control, shift and meta keys with function keys 1 to 10. In 224;; control, shift and meta keys with function keys 1 to 10. In
225;; particular, movement keys are concentrated on f5 to f8 with (in 225;; particular, movement keys are concentrated on f5 to f8 with (in
226;; increasing order of distance travelled) C-, M- and S- as prefixes. 226;; increasing order of distance traveled) C-, M- and S- as prefixes.
227;; See the actual bindings below (search for C-f1). This is because the 227;; See the actual bindings below (search for C-f1). This is because the
228;; C-S- prefix is represented by weird key sequences and the set is 228;; C-S- prefix is represented by weird key sequences and the set is
229;; incomplete; if you don't mind that, some hints are given in comments 229;; incomplete; if you don't mind that, some hints are given in comments
diff --git a/lisp/view.el b/lisp/view.el
index a5349445964..0d8ad3336f9 100644
--- a/lisp/view.el
+++ b/lisp/view.el
@@ -481,7 +481,7 @@ Entry to view-mode runs the normal hook `view-mode-hook'."
481 ;; sets view-read-only to t as a buffer-local variable 481 ;; sets view-read-only to t as a buffer-local variable
482 ;; after exiting View mode. That arranges that the next toggle-read-only 482 ;; after exiting View mode. That arranges that the next toggle-read-only
483 ;; will reenable View mode. 483 ;; will reenable View mode.
484 ;; Cancelling View mode in any other way should cancel that, too, 484 ;; Canceling View mode in any other way should cancel that, too,
485 ;; so that View mode stays off if toggle-read-only is called. 485 ;; so that View mode stays off if toggle-read-only is called.
486 (if (local-variable-p 'view-read-only) 486 (if (local-variable-p 'view-read-only)
487 (kill-local-variable 'view-read-only)) 487 (kill-local-variable 'view-read-only))
@@ -496,7 +496,7 @@ Entry to view-mode runs the normal hook `view-mode-hook'."
496 "Update `view-return-to-alist' of buffer BUFFER. 496 "Update `view-return-to-alist' of buffer BUFFER.
497Remove from `view-return-to-alist' all entries referencing dead 497Remove from `view-return-to-alist' all entries referencing dead
498windows. Optional argument ITEM non-nil means add ITEM to 498windows. Optional argument ITEM non-nil means add ITEM to
499`view-return-to-alist' after purging. For a decsription of items 499`view-return-to-alist' after purging. For a description of items
500that can be added see the RETURN-TO-ALIST argument of the 500that can be added see the RETURN-TO-ALIST argument of the
501function `view-mode-exit'. If `view-return-to-alist' contains an 501function `view-mode-exit'. If `view-return-to-alist' contains an
502entry for the selected window, purge that entry from 502entry for the selected window, purge that entry from
diff --git a/lisp/wid-edit.el b/lisp/wid-edit.el
index 8c4df9fc9cf..07eccaff4fb 100644
--- a/lisp/wid-edit.el
+++ b/lisp/wid-edit.el
@@ -295,10 +295,10 @@ minibuffer."
295 (error "Canceled")) 295 (error "Canceled"))
296 value)))) 296 value))))
297 297
298(defun widget-remove-if (predictate list) 298(defun widget-remove-if (predicate list)
299 (let (result (tail list)) 299 (let (result (tail list))
300 (while tail 300 (while tail
301 (or (funcall predictate (car tail)) 301 (or (funcall predicate (car tail))
302 (setq result (cons (car tail) result))) 302 (setq result (cons (car tail) result)))
303 (setq tail (cdr tail))) 303 (setq tail (cdr tail)))
304 (nreverse result))) 304 (nreverse result)))
@@ -577,7 +577,7 @@ This is only meaningful for radio buttons or checkboxes in a list."
577 "Map FUNCTION over the buttons in BUFFER. 577 "Map FUNCTION over the buttons in BUFFER.
578FUNCTION is called with the arguments WIDGET and MAPARG. 578FUNCTION is called with the arguments WIDGET and MAPARG.
579 579
580If FUNCTION returns non-nil, the walk is cancelled. 580If FUNCTION returns non-nil, the walk is canceled.
581 581
582The arguments MAPARG, and BUFFER default to nil and (current-buffer), 582The arguments MAPARG, and BUFFER default to nil and (current-buffer),
583respectively." 583respectively."
diff --git a/lisp/window.el b/lisp/window.el
index 69276a839bd..0014d85a816 100644
--- a/lisp/window.el
+++ b/lisp/window.el
@@ -296,7 +296,7 @@ is unpredictable."
296 "Return first window on FRAME with PARAMETER non-nil. 296 "Return first window on FRAME with PARAMETER non-nil.
297FRAME defaults to the selected frame. Optional argument VALUE 297FRAME defaults to the selected frame. Optional argument VALUE
298non-nil means only return a window whose window-parameter value 298non-nil means only return a window whose window-parameter value
299for PARAMETER equals VALUE \(comparison is done with `equal'). 299for PARAMETER equals VALUE (comparison is done with `equal').
300Optional argument ANY non-nil means consider internal windows 300Optional argument ANY non-nil means consider internal windows
301too." 301too."
302 (let (this-value windows) 302 (let (this-value windows)
@@ -312,7 +312,7 @@ too."
312(defun window-atom-root (&optional window) 312(defun window-atom-root (&optional window)
313 "Return root of atomic window WINDOW is a part of. 313 "Return root of atomic window WINDOW is a part of.
314WINDOW can be any window and defaults to the selected one. 314WINDOW can be any window and defaults to the selected one.
315Return nil if WINDOW is not part of a atomic window." 315Return nil if WINDOW is not part of an atomic window."
316 (setq window (window-normalize-window window)) 316 (setq window (window-normalize-window window))
317 (let (root) 317 (let (root)
318 (while (and window (window-parameter window 'window-atom)) 318 (while (and window (window-parameter window 'window-atom))
@@ -380,7 +380,7 @@ Otherwise, top and bottom side windows are full width."
380(defcustom window-sides-slots '(nil nil nil nil) 380(defcustom window-sides-slots '(nil nil nil nil)
381 "Maximum number of side window slots. 381 "Maximum number of side window slots.
382The value is a list of four elements specifying the number of 382The value is a list of four elements specifying the number of
383side window slots on \(in this order) the left, top, right and 383side window slots on (in this order) the left, top, right and
384bottom side of each frame. If an element is a number, this means 384bottom side of each frame. If an element is a number, this means
385to display at most that many side windows on the corresponding 385to display at most that many side windows on the corresponding
386side. If an element is nil, this means there's no bound on the 386side. If an element is nil, this means there's no bound on the
@@ -504,7 +504,7 @@ If the value is `width', then only the window's width is fixed.
504Any other non-nil value fixes both the width and the height. 504Any other non-nil value fixes both the width and the height.
505 505
506Emacs won't change the size of any window displaying that buffer, 506Emacs won't change the size of any window displaying that buffer,
507unless it has no other choice \(like when deleting a neighboring 507unless it has no other choice (like when deleting a neighboring
508window).") 508window).")
509(make-variable-buffer-local 'window-size-fixed) 509(make-variable-buffer-local 'window-size-fixed)
510 510
@@ -749,7 +749,7 @@ Optional argument NOUP non-nil means don't go up in the window
749tree but try to enlarge windows within WINDOW's combination only. 749tree but try to enlarge windows within WINDOW's combination only.
750 750
751Optional argument NODOWN non-nil means don't check whether WINDOW 751Optional argument NODOWN non-nil means don't check whether WINDOW
752itself \(and its child windows) can be shrunk; check only whether 752itself (and its child windows) can be shrunk; check only whether
753at least one other window can be enlarged appropriately." 753at least one other window can be enlarged appropriately."
754 (setq window (window-normalize-window window)) 754 (setq window (window-normalize-window window))
755 (let ((size (window-total-size window horizontal)) 755 (let ((size (window-total-size window horizontal))
@@ -831,7 +831,7 @@ tree but try to obtain the entire space from windows within
831WINDOW's combination. 831WINDOW's combination.
832 832
833Optional argument NODOWN non-nil means do not check whether 833Optional argument NODOWN non-nil means do not check whether
834WINDOW itself \(and its child windows) can be enlarged; check 834WINDOW itself (and its child windows) can be enlarged; check
835only whether other windows can be shrunk appropriately." 835only whether other windows can be shrunk appropriately."
836 (setq window (window-normalize-window window)) 836 (setq window (window-normalize-window window))
837 (if (and (not (window--size-ignore window ignore)) 837 (if (and (not (window--size-ignore window ignore))
@@ -1211,7 +1211,7 @@ More precisely, cycle through all windows calling the function
1211PREDICATE on each one of them with the window as its sole 1211PREDICATE on each one of them with the window as its sole
1212argument. Return the first window for which PREDICATE returns 1212argument. Return the first window for which PREDICATE returns
1213non-nil. Windows are scanned starting with the window following 1213non-nil. Windows are scanned starting with the window following
1214the selcted window. If no window satisfies PREDICATE, return 1214the selected window. If no window satisfies PREDICATE, return
1215DEFAULT. 1215DEFAULT.
1216 1216
1217MINIBUF t means include the minibuffer window even if the 1217MINIBUF t means include the minibuffer window even if the
@@ -1418,7 +1418,7 @@ windows."
1418;; window and is currently used, for example, by ispell.el. 1418;; window and is currently used, for example, by ispell.el.
1419(defun window--resize-mini-window (window delta) 1419(defun window--resize-mini-window (window delta)
1420 "Resize minibuffer window WINDOW by DELTA lines. 1420 "Resize minibuffer window WINDOW by DELTA lines.
1421If WINDOW cannot be resized by DELTA lines make it as large \(or 1421If WINDOW cannot be resized by DELTA lines make it as large (or
1422as small) as possible but don't signal an error." 1422as small) as possible but don't signal an error."
1423 (when (window-minibuffer-p window) 1423 (when (window-minibuffer-p window)
1424 (let* ((frame (window-frame window)) 1424 (let* ((frame (window-frame window))
@@ -1513,12 +1513,12 @@ instead."
1513 "Recursively set new normal height of child windows of window PARENT. 1513 "Recursively set new normal height of child windows of window PARENT.
1514HORIZONTAL non-nil means set the new normal width of these 1514HORIZONTAL non-nil means set the new normal width of these
1515windows. WINDOW specifies a child window of PARENT that has been 1515windows. WINDOW specifies a child window of PARENT that has been
1516resized by THIS-DELTA lines \(columns). 1516resized by THIS-DELTA lines (columns).
1517 1517
1518Optional argument TRAIL either 'before or 'after means set values 1518Optional argument TRAIL either 'before or 'after means set values
1519for windows before or after WINDOW only. Optional argument 1519for windows before or after WINDOW only. Optional argument
1520OTHER-DELTA a number specifies that this many lines \(columns) 1520OTHER-DELTA a number specifies that this many lines (columns)
1521have been obtained from \(or returned to) an ancestor window of 1521have been obtained from (or returned to) an ancestor window of
1522PARENT in order to resize WINDOW." 1522PARENT in order to resize WINDOW."
1523 (let* ((delta-normal 1523 (let* ((delta-normal
1524 (if (and (= (- this-delta) (window-total-size window horizontal)) 1524 (if (and (= (- this-delta) (window-total-size window horizontal))
@@ -2190,7 +2190,7 @@ for a horizontal split, and t for a vertical split. EDGES gives
2190the combined size and position of the child windows in the split, 2190the combined size and position of the child windows in the split,
2191and the rest of the elements are the child windows in the split. 2191and the rest of the elements are the child windows in the split.
2192Each of the child windows may again be a window or a list 2192Each of the child windows may again be a window or a list
2193representing a window split, and so on. EDGES is a list \(LEFT 2193representing a window split, and so on. EDGES is a list (LEFT
2194TOP RIGHT BOTTOM) as returned by `window-edges'." 2194TOP RIGHT BOTTOM) as returned by `window-edges'."
2195 (setq frame (window-normalize-frame frame)) 2195 (setq frame (window-normalize-frame frame))
2196 (window--subtree (frame-root-window frame) t)) 2196 (window--subtree (frame-root-window frame) t))
@@ -2204,9 +2204,9 @@ skip -COUNT windows backwards. COUNT zero means do not skip any
2204window, so select the selected window. In an interactive call, 2204window, so select the selected window. In an interactive call,
2205COUNT is the numeric prefix argument. Return nil. 2205COUNT is the numeric prefix argument. Return nil.
2206 2206
2207If the `other-window' parameter of WINDOW is a function and 2207If the `other-window' parameter of the selected window is a
2208`ignore-window-parameters' is nil, call that function with the 2208function and `ignore-window-parameters' is nil, call that
2209arguments COUNT and ALL-FRAMES. 2209function with the arguments COUNT and ALL-FRAMES.
2210 2210
2211This function does not select a window whose `no-other-window' 2211This function does not select a window whose `no-other-window'
2212window parameter is non-nil. 2212window parameter is non-nil.
@@ -2430,7 +2430,7 @@ the value returned by that function.
2430Otherwise, if WINDOW is part of an atomic window, call this 2430Otherwise, if WINDOW is part of an atomic window, call this
2431function with the root of the atomic window as its argument. If 2431function with the root of the atomic window as its argument. If
2432WINDOW is a non-side window, make WINDOW the only non-side window 2432WINDOW is a non-side window, make WINDOW the only non-side window
2433on the frame. Side windows are not deleted. If WINDOW is a side 2433on the frame. Side windows are not deleted. If WINDOW is a side
2434window signal an error." 2434window signal an error."
2435 (interactive) 2435 (interactive)
2436 (setq window (window-normalize-window window)) 2436 (setq window (window-normalize-window window))
@@ -2455,7 +2455,7 @@ window signal an error."
2455 (throw 'done (delete-other-windows atom-root))) 2455 (throw 'done (delete-other-windows atom-root)))
2456 ((eq window-side 'none) 2456 ((eq window-side 'none)
2457 ;; Set side-main to the major non-side window. 2457 ;; Set side-main to the major non-side window.
2458 (setq side-main (window-with-parameter 'window-side 'none nil t))) 2458 (setq side-main (window-with-parameter 'window-side 'none frame t)))
2459 ((memq window-side window-sides) 2459 ((memq window-side window-sides)
2460 (error "Cannot make side window the only window"))) 2460 (error "Cannot make side window the only window")))
2461 ;; If WINDOW is the main non-side window, do nothing. 2461 ;; If WINDOW is the main non-side window, do nothing.
@@ -2938,9 +2938,9 @@ With prefix argument KILL non-nil, kill the buffer instead of
2938burying it. 2938burying it.
2939 2939
2940According to information stored in WINDOW's `quit-restore' window 2940According to information stored in WINDOW's `quit-restore' window
2941parameter either \(1) delete WINDOW and its frame, \(2) delete 2941parameter either (1) delete WINDOW and its frame, (2) delete
2942WINDOW, \(3) restore the buffer previously displayed in WINDOW, 2942WINDOW, (3) restore the buffer previously displayed in WINDOW,
2943or \(4) make WINDOW display some other buffer than the present 2943or (4) make WINDOW display some other buffer than the present
2944one. If non-nil, reset `quit-restore' parameter to nil." 2944one. If non-nil, reset `quit-restore' parameter to nil."
2945 (interactive "P") 2945 (interactive "P")
2946 (setq window (window-normalize-window window t)) 2946 (setq window (window-normalize-window window t))
@@ -3047,14 +3047,14 @@ WINDOW's size. Interactively, SIZE is the prefix argument.
3047Optional third argument SIDE nil (or `below') specifies that the 3047Optional third argument SIDE nil (or `below') specifies that the
3048new window shall be located below WINDOW. SIDE `above' means the 3048new window shall be located below WINDOW. SIDE `above' means the
3049new window shall be located above WINDOW. In both cases SIZE 3049new window shall be located above WINDOW. In both cases SIZE
3050specifies the new number of lines for WINDOW \(or the new window 3050specifies the new number of lines for WINDOW (or the new window
3051if SIZE is negative) including space reserved for the mode and/or 3051if SIZE is negative) including space reserved for the mode and/or
3052header line. 3052header line.
3053 3053
3054SIDE t (or `right') specifies that the new window shall be 3054SIDE t (or `right') specifies that the new window shall be
3055located on the right side of WINDOW. SIDE `left' means the new 3055located on the right side of WINDOW. SIDE `left' means the new
3056window shall be located on the left of WINDOW. In both cases 3056window shall be located on the left of WINDOW. In both cases
3057SIZE specifies the new number of columns for WINDOW \(or the new 3057SIZE specifies the new number of columns for WINDOW (or the new
3058window provided SIZE is negative) including space reserved for 3058window provided SIZE is negative) including space reserved for
3059fringes and the scrollbar or a divider column. Any other non-nil 3059fringes and the scrollbar or a divider column. Any other non-nil
3060value for SIDE is currently handled like t (or `right'). 3060value for SIDE is currently handled like t (or `right').
@@ -3604,7 +3604,7 @@ specific buffers."
3604 (with-current-buffer (window-buffer window) 3604 (with-current-buffer (window-buffer window)
3605 (let ((point (window-point-1 window)) 3605 (let ((point (window-point-1 window))
3606 (start (window-start window)) 3606 (start (window-start window))
3607 (mark (mark))) 3607 (mark (mark t)))
3608 `((buffer 3608 `((buffer
3609 ,(buffer-name buffer) 3609 ,(buffer-name buffer)
3610 (selected . ,selected) 3610 (selected . ,selected)
@@ -3713,7 +3713,7 @@ value can be also stored on disk and read back in a new session."
3713 (if (window-sizable-p window (- size) horizontal 'safe) 3713 (if (window-sizable-p window (- size) horizontal 'safe)
3714 (let* ((window-combination-limit 3714 (let* ((window-combination-limit
3715 (assq 'combination-limit item))) 3715 (assq 'combination-limit item)))
3716 ;; We must inherit the combiantion limit, otherwise 3716 ;; We must inherit the combination limit, otherwise
3717 ;; we might mess up handling of atomic and side 3717 ;; we might mess up handling of atomic and side
3718 ;; window. 3718 ;; window.
3719 (setq new (split-window window size horizontal))) 3719 (setq new (split-window window size horizontal)))
@@ -3870,10 +3870,10 @@ windows can get as small as `window-safe-min-height' and
3870(defun display-buffer-record-window (type window buffer) 3870(defun display-buffer-record-window (type window buffer)
3871 "Record information for window used by `display-buffer'. 3871 "Record information for window used by `display-buffer'.
3872TYPE specifies the type of the calling operation and must be one 3872TYPE specifies the type of the calling operation and must be one
3873of the symbols 'reuse \(when WINDOW existed already and was 3873of the symbols 'reuse (when WINDOW existed already and was
3874reused for displaying BUFFER), 'window \(when WINDOW was created 3874reused for displaying BUFFER), 'window (when WINDOW was created
3875on an already existing frame), or 'frame \(when WINDOW was 3875on an already existing frame), or 'frame (when WINDOW was
3876created on a new frame). WINDOW is the window used for or created 3876created on a new frame). WINDOW is the window used for or created
3877by the `display-buffer' routines. BUFFER is the buffer that 3877by the `display-buffer' routines. BUFFER is the buffer that
3878shall be displayed. 3878shall be displayed.
3879 3879
@@ -3968,7 +3968,7 @@ the buffer as first, and nil as second argument.
3968 3968
3969Alternatively, an element of this list can be specified as 3969Alternatively, an element of this list can be specified as
3970\(BUFFER-NAME FRAME-PARAMETERS), where BUFFER-NAME is a buffer 3970\(BUFFER-NAME FRAME-PARAMETERS), where BUFFER-NAME is a buffer
3971name and FRAME-PARAMETERS an alist of \(PARAMETER . VALUE) pairs. 3971name and FRAME-PARAMETERS an alist of (PARAMETER . VALUE) pairs.
3972`special-display-popup-frame' will interpret such pairs as frame 3972`special-display-popup-frame' will interpret such pairs as frame
3973parameters when it creates a special frame, overriding the 3973parameters when it creates a special frame, overriding the
3974corresponding values from `special-display-frame-alist'. 3974corresponding values from `special-display-frame-alist'.
@@ -4044,7 +4044,7 @@ name matches REGEXP, overriding the corresponding values from
4044 4044
4045As a special case, if FRAME-PARAMETERS contains (same-window . t) 4045As a special case, if FRAME-PARAMETERS contains (same-window . t)
4046`special-display-popup-frame' displays buffers matching REGEXP in 4046`special-display-popup-frame' displays buffers matching REGEXP in
4047the selected window. \(same-frame . t) in FRAME-PARAMETERS means 4047the selected window. (same-frame . t) in FRAME-PARAMETERS means
4048to display such buffers in a window on the selected frame. 4048to display such buffers in a window on the selected frame.
4049 4049
4050If `special-display-function' specifies some other function than 4050If `special-display-function' specifies some other function than
@@ -4139,8 +4139,8 @@ Optional argument ARGS is a list specifying additional
4139information. 4139information.
4140 4140
4141If ARGS is an alist, use it as a list of frame parameters. If 4141If ARGS is an alist, use it as a list of frame parameters. If
4142these parameters contain \(same-window . t), display BUFFER in 4142these parameters contain (same-window . t), display BUFFER in
4143the selected window. If they contain \(same-frame . t), display 4143the selected window. If they contain (same-frame . t), display
4144BUFFER in a window of the selected frame. 4144BUFFER in a window of the selected frame.
4145 4145
4146If ARGS is a list whose car is a symbol, use (car ARGS) as a 4146If ARGS is a list whose car is a symbol, use (car ARGS) as a
@@ -4234,7 +4234,7 @@ See also `same-window-buffer-names'."
4234 "Return non-nil if a buffer named BUFFER-NAME would be shown in the \"same\" window. 4234 "Return non-nil if a buffer named BUFFER-NAME would be shown in the \"same\" window.
4235This function returns non-nil if `display-buffer' or 4235This function returns non-nil if `display-buffer' or
4236`pop-to-buffer' would show a buffer named BUFFER-NAME in the 4236`pop-to-buffer' would show a buffer named BUFFER-NAME in the
4237selected rather than \(as usual\) some other window. See 4237selected rather than (as usual) some other window. See
4238`same-window-buffer-names' and `same-window-regexps'." 4238`same-window-buffer-names' and `same-window-regexps'."
4239 (cond 4239 (cond
4240 ((not (stringp buffer-name))) 4240 ((not (stringp buffer-name)))
@@ -4396,11 +4396,11 @@ the largest or least recently used window. To change the default
4396customize the option `split-window-preferred-function'. 4396customize the option `split-window-preferred-function'.
4397 4397
4398You can enforce this function to not split WINDOW horizontally, 4398You can enforce this function to not split WINDOW horizontally,
4399by setting \(or binding) the variable `split-width-threshold' to 4399by setting (or binding) the variable `split-width-threshold' to
4400nil. If, in addition, you set `split-height-threshold' to zero, 4400nil. If, in addition, you set `split-height-threshold' to zero,
4401chances increase that this function does split WINDOW vertically. 4401chances increase that this function does split WINDOW vertically.
4402 4402
4403In order to not split WINDOW vertically, set \(or bind) the 4403In order to not split WINDOW vertically, set (or bind) the
4404variable `split-height-threshold' to nil. Additionally, you can 4404variable `split-height-threshold' to nil. Additionally, you can
4405set `split-width-threshold' to zero to make a horizontal split 4405set `split-width-threshold' to zero to make a horizontal split
4406more likely to occur. 4406more likely to occur.
@@ -4526,19 +4526,6 @@ Return WINDOW."
4526The actual non-nil value of this variable will be copied to the 4526The actual non-nil value of this variable will be copied to the
4527`window-dedicated-p' flag.") 4527`window-dedicated-p' flag.")
4528 4528
4529(defun window-normalize-buffer-to-display (buffer-or-name)
4530 "Normalize BUFFER-OR-NAME argument for buffer display functions.
4531If BUFFER-OR-NAME is nil, return the current buffer. Else, if a
4532buffer specified by BUFFER-OR-NAME exists, return that buffer.
4533If no such buffer exists, create a buffer with the name
4534BUFFER-OR-NAME and return that buffer."
4535 (if buffer-or-name
4536 (or (get-buffer buffer-or-name)
4537 (let ((buffer (get-buffer-create buffer-or-name)))
4538 (set-buffer-major-mode buffer)
4539 buffer))
4540 (current-buffer)))
4541
4542(defconst display-buffer--action-function-custom-type 4529(defconst display-buffer--action-function-custom-type
4543 '(choice :tag "Function" 4530 '(choice :tag "Function"
4544 (const :tag "--" ignore) ; default for insertion 4531 (const :tag "--" ignore) ; default for insertion
@@ -4565,7 +4552,7 @@ BUFFER-OR-NAME and return that buffer."
4565(defvar display-buffer-overriding-action '(nil . nil) 4552(defvar display-buffer-overriding-action '(nil . nil)
4566 "Overriding action to perform to display a buffer. 4553 "Overriding action to perform to display a buffer.
4567It should be a cons cell (FUNCTION . ALIST), where FUNCTION is a 4554It should be a cons cell (FUNCTION . ALIST), where FUNCTION is a
4568function or a list of functions. Each function should accept 2 4555function or a list of functions. Each function should accept two
4569arguments: a buffer to display and an alist similar to ALIST. 4556arguments: a buffer to display and an alist similar to ALIST.
4570See `display-buffer' for details.") 4557See `display-buffer' for details.")
4571(put 'display-buffer-overriding-action 'risky-local-variable t) 4558(put 'display-buffer-overriding-action 'risky-local-variable t)
@@ -4579,7 +4566,7 @@ This is a list of elements (CONDITION . ACTION), where:
4579 4566
4580 ACTION is a cons cell (FUNCTION . ALIST), where FUNCTION is a 4567 ACTION is a cons cell (FUNCTION . ALIST), where FUNCTION is a
4581 function or a list of functions. Each such function should 4568 function or a list of functions. Each such function should
4582 accept 2 arguments: a buffer to display and an alist of the 4569 accept two arguments: a buffer to display and an alist of the
4583 same form as ALIST. See `display-buffer' for details." 4570 same form as ALIST. See `display-buffer' for details."
4584 :type `(alist :key-type 4571 :type `(alist :key-type
4585 (choice :tag "Condition" 4572 (choice :tag "Condition"
@@ -4593,7 +4580,7 @@ This is a list of elements (CONDITION . ACTION), where:
4593(defcustom display-buffer-base-action '(nil . nil) 4580(defcustom display-buffer-base-action '(nil . nil)
4594 "User-specified default action for `display-buffer'. 4581 "User-specified default action for `display-buffer'.
4595It should be a cons cell (FUNCTION . ALIST), where FUNCTION is a 4582It should be a cons cell (FUNCTION . ALIST), where FUNCTION is a
4596function or a list of functions. Each function should accept 2 4583function or a list of functions. Each function should accept two
4597arguments: a buffer to display and an alist similar to ALIST. 4584arguments: a buffer to display and an alist similar to ALIST.
4598See `display-buffer' for details." 4585See `display-buffer' for details."
4599 :type display-buffer--action-custom-type 4586 :type display-buffer--action-custom-type
@@ -4640,7 +4627,7 @@ specified, e.g. by the user options `display-buffer-alist' or
4640 "A `display-buffer' action for displaying in another frame.") 4627 "A `display-buffer' action for displaying in another frame.")
4641(put 'display-buffer--other-frame-action 'risky-local-variable t) 4628(put 'display-buffer--other-frame-action 'risky-local-variable t)
4642 4629
4643(defun display-buffer (&optional buffer-or-name action frame) 4630(defun display-buffer (buffer-or-name &optional action frame)
4644 "Display BUFFER-OR-NAME in some window, without selecting it. 4631 "Display BUFFER-OR-NAME in some window, without selecting it.
4645BUFFER-OR-NAME must be a buffer or the name of an existing 4632BUFFER-OR-NAME must be a buffer or the name of an existing
4646buffer. Return the window chosen for displaying BUFFER-OR-NAME, 4633buffer. Return the window chosen for displaying BUFFER-OR-NAME,
@@ -4648,8 +4635,8 @@ or nil if no such window is found.
4648 4635
4649Optional argument ACTION should have the form (FUNCTION . ALIST). 4636Optional argument ACTION should have the form (FUNCTION . ALIST).
4650FUNCTION is either a function or a list of functions. Each such 4637FUNCTION is either a function or a list of functions. Each such
4651function is called with 2 arguments: the buffer to display and an 4638function is called with two arguments: the buffer to display and
4652alist. It should either display the buffer and return the 4639an alist. It should either display the buffer and return the
4653window, or return nil if unable to display the buffer. 4640window, or return nil if unable to display the buffer.
4654 4641
4655The `display-buffer' function builds a function list and an alist 4642The `display-buffer' function builds a function list and an alist
@@ -4688,7 +4675,9 @@ search for a window that is already displaying the buffer. See
4688`display-buffer-reuse-window'." 4675`display-buffer-reuse-window'."
4689 (interactive (list (read-buffer "Display buffer: " (other-buffer)) 4676 (interactive (list (read-buffer "Display buffer: " (other-buffer))
4690 (if current-prefix-arg t))) 4677 (if current-prefix-arg t)))
4691 (let ((buffer (window-normalize-buffer-to-display buffer-or-name)) 4678 (let ((buffer (if (bufferp buffer-or-name)
4679 buffer-or-name
4680 (get-buffer buffer-or-name)))
4692 ;; Handle the old form of the first argument. 4681 ;; Handle the old form of the first argument.
4693 (inhibit-same-window (and action (not (listp action))))) 4682 (inhibit-same-window (and action (not (listp action)))))
4694 (unless (listp action) (setq action nil)) 4683 (unless (listp action) (setq action nil))
@@ -4996,7 +4985,7 @@ minibuffer. The variable `confirm-nonexistent-file-or-buffer'
4996determines whether to request confirmation before creating a new 4985determines whether to request confirmation before creating a new
4997buffer. 4986buffer.
4998 4987
4999BUFFER-OR-NAME may be a buffer, a string \(a buffer name), or 4988BUFFER-OR-NAME may be a buffer, a string (a buffer name), or
5000nil. If BUFFER-OR-NAME is a string that does not identify an 4989nil. If BUFFER-OR-NAME is a string that does not identify an
5001existing buffer, create a buffer with that name. If 4990existing buffer, create a buffer with that name. If
5002BUFFER-OR-NAME is nil, switch to the buffer returned by 4991BUFFER-OR-NAME is nil, switch to the buffer returned by
@@ -5036,7 +5025,7 @@ Return the buffer switched to."
5036 5025
5037(defun switch-to-buffer-other-window (buffer-or-name &optional norecord) 5026(defun switch-to-buffer-other-window (buffer-or-name &optional norecord)
5038 "Select the buffer specified by BUFFER-OR-NAME in another window. 5027 "Select the buffer specified by BUFFER-OR-NAME in another window.
5039BUFFER-OR-NAME may be a buffer, a string \(a buffer name), or 5028BUFFER-OR-NAME may be a buffer, a string (a buffer name), or
5040nil. Return the buffer switched to. 5029nil. Return the buffer switched to.
5041 5030
5042If called interactively, prompt for the buffer name using the 5031If called interactively, prompt for the buffer name using the
@@ -5060,7 +5049,7 @@ documentation for additional customization information."
5060 5049
5061(defun switch-to-buffer-other-frame (buffer-or-name &optional norecord) 5050(defun switch-to-buffer-other-frame (buffer-or-name &optional norecord)
5062 "Switch to buffer BUFFER-OR-NAME in another frame. 5051 "Switch to buffer BUFFER-OR-NAME in another frame.
5063BUFFER-OR-NAME may be a buffer, a string \(a buffer name), or 5052BUFFER-OR-NAME may be a buffer, a string (a buffer name), or
5064nil. Return the buffer switched to. 5053nil. Return the buffer switched to.
5065 5054
5066If called interactively, prompt for the buffer name using the 5055If called interactively, prompt for the buffer name using the
@@ -5169,7 +5158,7 @@ WINDOW can be any live window and defaults to the selected one.
5169Optional argument MAX-HEIGHT specifies the maximum height of 5158Optional argument MAX-HEIGHT specifies the maximum height of
5170WINDOW and defaults to the height of WINDOW's frame. Optional 5159WINDOW and defaults to the height of WINDOW's frame. Optional
5171argument MIN-HEIGHT specifies the minimum height of WINDOW and 5160argument MIN-HEIGHT specifies the minimum height of WINDOW and
5172defaults to `window-min-height'. Both, MAX-HEIGHT and MIN-HEIGHT 5161defaults to `window-min-height'. Both MAX-HEIGHT and MIN-HEIGHT
5173are specified in lines and include the mode line and header line, 5162are specified in lines and include the mode line and header line,
5174if any. 5163if any.
5175 5164
@@ -5234,7 +5223,7 @@ WINDOW was scrolled."
5234 ;; This `condition-case' shouldn't be necessary, but who knows? 5223 ;; This `condition-case' shouldn't be necessary, but who knows?
5235 (condition-case nil 5224 (condition-case nil
5236 (if (zerop delta) 5225 (if (zerop delta)
5237 ;; Return zero if DELTA became zero in the proces. 5226 ;; Return zero if DELTA became zero in the process.
5238 0 5227 0
5239 ;; Don't try to redisplay with the cursor at the end on its 5228 ;; Don't try to redisplay with the cursor at the end on its
5240 ;; own line--that would force a scroll and spoil things. 5229 ;; own line--that would force a scroll and spoil things.
@@ -5332,7 +5321,7 @@ A list of elements with possible values `top', `middle', `bottom',
5332integer or float numbers that define the cycling order for 5321integer or float numbers that define the cycling order for
5333the command `recenter-top-bottom'. 5322the command `recenter-top-bottom'.
5334 5323
5335Top and bottom destinations are `scroll-margin' lines the from true 5324Top and bottom destinations are `scroll-margin' lines from the true
5336window top and bottom. Middle redraws the frame and centers point 5325window top and bottom. Middle redraws the frame and centers point
5337vertically within the window. Integer number moves current line to 5326vertically within the window. Integer number moves current line to
5338the specified absolute window-line. Float number between 0.0 and 1.0 5327the specified absolute window-line. Float number between 0.0 and 1.0
@@ -5571,9 +5560,9 @@ With arg N, put point N/10 of the way from the true end."
5571 5560
5572(defvar mouse-autoselect-window-state nil 5561(defvar mouse-autoselect-window-state nil
5573 "When non-nil, special state of delayed window autoselection. 5562 "When non-nil, special state of delayed window autoselection.
5574Possible values are `suspend' \(suspend autoselection after a menu or 5563Possible values are `suspend' (suspend autoselection after a menu or
5575scrollbar interaction\) and `select' \(the next invocation of 5564scrollbar interaction) and `select' (the next invocation of
5576'handle-select-window' shall select the window immediately\).") 5565`handle-select-window' shall select the window immediately).")
5577 5566
5578(defun mouse-autoselect-window-cancel (&optional force) 5567(defun mouse-autoselect-window-cancel (&optional force)
5579 "Cancel delayed window autoselection. 5568 "Cancel delayed window autoselection.
@@ -5610,8 +5599,8 @@ means suspend autoselection."
5610(defun mouse-autoselect-window-select () 5599(defun mouse-autoselect-window-select ()
5611 "Select window with delayed window autoselection. 5600 "Select window with delayed window autoselection.
5612If the mouse position has stabilized in a non-selected window, select 5601If the mouse position has stabilized in a non-selected window, select
5613that window. The minibuffer window is selected only if the minibuffer is 5602that window. The minibuffer window is selected only if the minibuffer
5614active. This function is run by `mouse-autoselect-window-timer'." 5603is active. This function is run by `mouse-autoselect-window-timer'."
5615 (ignore-errors 5604 (ignore-errors
5616 (let* ((mouse-position (mouse-position)) 5605 (let* ((mouse-position (mouse-position))
5617 (window 5606 (window
diff --git a/nt/addpm.c b/nt/addpm.c
index d7919d36f80..c45b4aef68d 100644
--- a/nt/addpm.c
+++ b/nt/addpm.c
@@ -250,7 +250,7 @@ main (int argc, char *argv[])
250 MB_OKCANCEL | MB_ICONQUESTION); 250 MB_OKCANCEL | MB_ICONQUESTION);
251 if (result != IDOK) 251 if (result != IDOK)
252 { 252 {
253 fprintf (stderr, "Install cancelled\n"); 253 fprintf (stderr, "Install canceled\n");
254 exit (1); 254 exit (1);
255 } 255 }
256 } 256 }
@@ -365,4 +365,3 @@ main (int argc, char *argv[])
365 365
366 return 0; 366 return 0;
367} 367}
368
diff --git a/oldXMenu/X10.h b/oldXMenu/X10.h
index c30632b9d68..5e4ca068ba5 100644
--- a/oldXMenu/X10.h
+++ b/oldXMenu/X10.h
@@ -51,7 +51,7 @@ XDrawFilled so it shouldn't be defined.
51 */ 51 */
52typedef struct _XAssoc { 52typedef struct _XAssoc {
53 struct _XAssoc *next; /* Next object in this bucket. */ 53 struct _XAssoc *next; /* Next object in this bucket. */
54 struct _XAssoc *prev; /* Previous obejct in this bucket. */ 54 struct _XAssoc *prev; /* Previous object in this bucket. */
55 Display *display; /* Display which owns the id. */ 55 Display *display; /* Display which owns the id. */
56 XID x_id; /* X Window System id. */ 56 XID x_id; /* X Window System id. */
57 void *data; /* Pointer to untyped memory. */ 57 void *data; /* Pointer to untyped memory. */
diff --git a/oldXMenu/XMenu.h b/oldXMenu/XMenu.h
index aa27211c05c..8e4292f5088 100644
--- a/oldXMenu/XMenu.h
+++ b/oldXMenu/XMenu.h
@@ -152,8 +152,8 @@ typedef struct _xmselect {
152 * 152 *
153 */ 153 */
154typedef enum _xmstyle { 154typedef enum _xmstyle {
155 LEFT, /* Left oriented obejct. */ 155 LEFT, /* Left oriented object. */
156 RIGHT, /* Right oriented obejct. */ 156 RIGHT, /* Right oriented object. */
157 CENTER /* Center oriented object. */ 157 CENTER /* Center oriented object. */
158} XMStyle; 158} XMStyle;
159 159
diff --git a/src/ChangeLog b/src/ChangeLog
index 6a13bd87264..f10e2955164 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,264 @@
12011-12-28 Kenichi Handa <handa@m17n.org>
2
3 * coding.c (Fdefine_coding_system_internal): Make an utf-8 base
4 coding-system ASCII compatible only when it does not produce BOM
5 on encoding (Bug#10383).
6
72011-12-26 Jan Djärv <jan.h.d@swipnet.se>
8
9 * xmenu.c (x_menu_wait_for_event): Use xg_select for Gtk3 so menus
10 can scroll.
11 (create_and_show_popup_menu): Always use menu_position_func for
12 Gtk3 (Bug#10361).
13
142011-12-24 Andreas Schwab <schwab@linux-m68k.org>
15
16 * callint.c (Fcall_interactively): Don't truncate prompt string.
17
182011-12-23 Eli Zaretskii <eliz@gnu.org>
19
20 * xdisp.c (handle_invisible_prop): Handle correctly an invisible
21 property that ends at ZV, so that the bidi iteration could be
22 resumed from there (after widening). (Bug#10360)
23
242011-12-22 Jan Djärv <jan.h.d@swipnet.se>
25
26 * nsfont.m (ns_spec_to_descriptor): Do not autorelease fdesc.
27
282011-12-21 Jan Djärv <jan.h.d@swipnet.se>
29
30 * nsterm.m (x_free_frame_resources): Release
31 f->output_data.ns->miniimage
32 (ns_index_color): Fix indentation. Do not retain
33 color_table->colors[i].
34
35 * nsmenu.m (ns_update_menubar): Call free_menubar_widget_value_tree
36 before returning.
37
38 * nsfns.m (x_set_background_color): Assign return value from
39 ns_index_color to face-background instead of NSColor*.
40 (ns_implicitly_set_icon_type): Fix indentation.
41 Change assignment in for loop to comparison.
42
43 * emacs.c (ns_pool): New variable.
44 (main): Assign ns_pool.
45 (Fkill_emacs): Call ns_release_autorelease_pool.
46
47 * nsfont.m (ns_spec_to_descriptor): Fix indentation,
48 autorelease fdesc, release fdAttrs and tdict.
49 (ns_get_covering_families): Release charset.
50 (ns_findfonts): Release NSFontDescriptor created with new.
51 (ns_uni_to_glyphs): Fix indentation.
52 (setString): Release attrStr before assigning new value.
53
542011-12-18 Jan Djärv <jan.h.d@swipnet.se>
55
56 * nsmenu.m (NSMenuDidBeginTrackingNotification): Declare if OSX < 10.5
57 and NS_IMPL_COCOA.
58 (trackingNotification): Surround with ifdef NS_IMPL_COCOA.
59 (syms_of_nsmenu): Set trackingMenu to 1 if not NS_IMPL_COCOA.
60
612011-12-18 David Reitter <reitter@cmu.edu>
62
63 * nsterm.m (ns_term_init): Subscribe for notifications
64 NSMenuDidBeginTrackingNotification and NSMenuDidEndTrackingNotification
65 to method trackingNotification in EmacsMenu.
66
67 * nsmenu.m (trackingMenu): New variable.
68 (trackingNotification): New method (from Aquamacs).
69 (menuNeedsUpdate): Expand comment and return if trackingMenu is 0,
70 from Aquamacs (Bug#7030).
71
722011-12-18 Jan Djärv <jan.h.d@swipnet.se>
73
74 * nsselect.m (CUT_BUFFER_SUPPORT): Remove define.
75 (symbol_to_nsstring): Fix indentation.
76 (ns_symbol_to_pb): New function.
77 (Fns_get_selection_internal): Renamed from Fns_get_cut_buffer_internal.
78 (Fns_rotate_cut_buffers_internal): Removed.
79 (Fns_store_selection_internal): Renamed from
80 Fns_store_cut_buffer_internal.
81 (ns_get_foreign_selection, Fx_own_selection_internal)
82 (Fx_disown_selection_internal, Fx_selection_exists_p)
83 (Fns_get_selection_internal, Fns_store_selection_internal): Use
84 ns_symbol_to_pb and check if return value is nil.
85 (syms_of_nsselect): Remove ifdef CUT_BUFFER_SUPPORT. Remove
86 defsubr Sns_rotate_cut_buffers_internal. Sns_get_cut_buffer_internal
87 renamed to Sns_get_selection_internal, Sns_store_cut_buffer_internal
88 renamed to Sns_store_selection_internal.
89 (ns_handle_selection_request): Move code to Fx_own_selection_internal
90 and remove this function.
91 (ns_handle_selection_clear): Remove, never used.
92 (Fx_own_selection_internal): Move code from ns_handle_selection_request
93 here.
94
952011-12-17 Ken Brown <kbrown@cornell.edu>
96
97 * fileio.c (check_writable) [CYGWIN]: Return non-zero if UID or
98 GID is unknown (Bug#10257).
99
1002011-12-17 Paul Eggert <eggert@cs.ucla.edu>
101
102 * s/gnu-linux.h: Fix mark_memory typo (Bug#10286).
103 (GC_MARK_SECONDARY_STACK): Omit removed 3rd arg to mark_memory,
104 which caused a build failure on GNU/Linux IA-64. This problem was
105 introduced by my 2011-10-07 patch.
106
1072011-12-15 Juri Linkov <juri@jurta.org>
108
109 * image.c (imagemagick_error): New function. (Bug#10112)
110 (imagemagick_load_image): Comment out `MagickSetResolution' call.
111 Use `imagemagick_error' where ImageMagick functions return
112 `MagickFalse'.
113 (Fimagemagick_types): Add `Fnreverse' to return the list in the
114 proper order.
115
1162011-12-15 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
117
118 * xftfont.c (xftfont_draw): Use the font metrics of s->font to
119 fill background (Bug#8992).
120
1212011-12-13 Martin Rudalics <rudalics@gmx.at>
122
123 * window.c (Vwindow_combination_resize)
124 (Vwindow_combination_limit): Use t instead of non-nil in
125 doc-strings.
126 (Vrecenter_redisplay): Add first sentence of doc-string on
127 separate line.
128 (Frecenter): Fix doc-string typo.
129
1302011-12-11 Kenichi Handa <handa@m17n.org>
131
132 * coding.c (Funencodable_char_position): Pay attention to the
133 buffer text relocation (Bug#9389).
134
1352011-12-10 Jan Djärv <jan.h.d@swipnet.se>
136
137 * xterm.c (x_term_init): Move call to gdk_window_add_filter before
138 gtk_init (Bug#10100).
139
1402011-12-10 Eli Zaretskii <eliz@gnu.org>
141
142 * xdisp.c (RECORD_MAX_MIN_POS): Use IT->cmp_it.charpos only if
143 IT->string is nil. (Bug#10263)
144
1452011-12-10 Jan Djärv <jan.h.d@swipnet.se>
146
147 * nsterm.h (x_free_frame_resources): Declare.
148
149 * nsfns.m (ns_get_defaults_value): New function (Bug#10103).
150 (Fns_get_resource, x_get_string_resource): Call ns_get_defaults_value.
151
152 * nsterm.h (ns_get_defaults_value): Declare.
153
154 * nsterm.m (ns_default): Call ns_get_defaults_value.
155
1562011-12-09 Eli Zaretskii <eliz@gnu.org>
157
158 * xdisp.c (try_scrolling): Don't set scroll_down_p if dy is zero.
159 (Bug#10170)
160
1612011-12-09 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
162
163 * unexelf.c (unexec) [NS_IMPL_GNUSTEP]: Take account of the case
164 that where the value of an _OBJC_* symbol points to is in the .bss
165 section (Bug#10240).
166
1672011-12-08 Kazuhiro Ito <kzhr@d1.dion.ne.jp> (tiny change)
168
169 * coding.c (encode_coding_ccl): Check (charbuf < charbuf_end)
170 after the loop to call ccl_driver at least once (Bug#8619).
171
1722011-12-08 Kenichi Handa <handa@m17n.org>
173
174 * ftfont.c (get_adstyle_property): Fix previous change
175 (Bug#10233).
176
1772011-12-07 Juanma Barranquero <lekktu@gmail.com>
178
179 * w32.c (init_environment): If no_site_lisp, remove site-lisp
180 dirs from the default value of EMACSLOADPATH (bug#10208).
181
1822011-12-07 Glenn Morris <rgm@gnu.org>
183
184 * lread.c (init_lread): If no_site_lisp, exclude site-lisp/ in
185 installation and source directories as well. (Bug#10208)
186
1872011-12-06 Chong Yidong <cyd@gnu.org>
188
189 * minibuf.c (Fread_from_minibuffer): Doc fix (Bug#10228).
190
1912011-12-06 Glenn Morris <rgm@gnu.org>
192
193 * process.c (start_process_unwind): Treat any pid <= 0, except -2,
194 as an error, not just -1. (Bug#10217)
195
1962011-12-05 Chong Yidong <cyd@gnu.org>
197
198 * keyboard.c (process_special_events): New function.
199 (swallow_events, Finput_pending_p): Use it (Bug#10195).
200
2012011-12-05 Paul Eggert <eggert@cs.ucla.edu>
202
203 * coding.c (encode_designation_at_bol): Don't use uninitialized
204 local variable (Bug#9318).
205
2062011-12-05 Kenichi Handa <handa@m17n.org>
207
208 * ftfont.c (get_adstyle_property): If the font is not BDF nor PCF,
209 return Qnil (Bug#8046, Bug#10193).
210
2112011-12-05 Kenichi Handa <handa@m17n.org>
212
213 * coding.c (encode_designation_at_bol): New args charbuf_end and
214 dst. Return the number of produced bytes. Callers changed.
215 (coding_set_source): Return how many bytes coding->source was
216 relocated.
217 (coding_set_destination): Return how many bytes
218 coding->destination was relocated.
219 (CODING_DECODE_CHAR, CODING_ENCODE_CHAR, CODING_CHAR_CHARSET)
220 (CODING_CHAR_CHARSET_P): Adjusted for the avove changes.
221
2222011-12-05 Kazuhiro Ito <kzhr@d1.dion.ne.jp> (tiny change)
223
224 * coding.c (CODING_CHAR_CHARSET_P): New macro.
225 (encode_coding_emacs_mule, encode_coding_iso_2022): Use the above
226 macro (Bug#9318).
227
2282011-12-05 Andreas Schwab <schwab@linux-m68k.org>
229
230 The following changes are to fix Bug#9318.
231
232 * coding.c (CODING_ENCODE_CHAR, CODING_CHAR_CHARSET): New macros.
233 (encode_coding_emacs_mule, ENCODE_ISO_CHARACTER)
234 (encode_coding_iso_2022, encode_coding_sjis)
235 (encode_coding_big5, encode_coding_charset): Use the above macros.
236
2372011-12-05 Juanma Barranquero <lekktu@gmail.com>
238
239 * lisp.h (process_quit_flag): Fix external declaration.
240
2412011-12-04 Stefan Monnier <monnier@iro.umontreal.ca>
242
243 Don't macro-inline non-performance-critical code.
244 * eval.c (process_quit_flag): New function.
245 * lisp.h (QUIT): Use it.
246
2472011-12-04 Jan Djärv <jan.h.d@swipnet.se>
248
249 * nsfns.m (get_geometry_from_preferences): New function.
250 (Fx_create_frame): Call get_geometry_from_preferences (Bug#10103).
251
2522011-12-04 Andreas Schwab <schwab@linux-m68k.org>
253
254 * emacs.c (Qkill_emacs): Define.
255 (syms_of_emacs): Initialize it.
256 * keyboard.c (interrupt_signal): Don't call Fkill_emacs here, set
257 Qquit_flag to `kill-emacs' instead.
258 (quit_throw_to_read_char): Add parameter `from_signal'.
259 All callers changed. Call Fkill_emacs if requested and safe.
260 * lisp.h (QUIT): Call Fkill_emacs if requested.
261
12011-12-03 Jan Djärv <jan.h.d@swipnet.se> 2622011-12-03 Jan Djärv <jan.h.d@swipnet.se>
2 263
3 * widget.c (update_wm_hints): Return if wmshell is null. 264 * widget.c (update_wm_hints): Return if wmshell is null.
@@ -58,7 +319,7 @@
58 319
59 * xterm.c (handle_one_xevent): Only set async_visible and friends 320 * xterm.c (handle_one_xevent): Only set async_visible and friends
60 if net_wm_state_hidden_seen is non-zero (Bug#10002) 321 if net_wm_state_hidden_seen is non-zero (Bug#10002)
61 (get_current_wm_state): Set net_wm_state_hidden_seen to 1 if 322 (get_current_wm_state): Set net_wm_state_hidden_seen to 1 if
62 _NET_WM_STATE_HIDDEN is in NET_WM_STATE. 323 _NET_WM_STATE_HIDDEN is in NET_WM_STATE.
63 324
642011-11-28 Paul Eggert <eggert@cs.ucla.edu> 3252011-11-28 Paul Eggert <eggert@cs.ucla.edu>
@@ -95,8 +356,8 @@
95 356
962011-11-27 Jan Djärv <jan.h.d@swipnet.se> 3572011-11-27 Jan Djärv <jan.h.d@swipnet.se>
97 358
98 * gtkutil.c (xg_create_frame_widgets): Call 359 * gtkutil.c (xg_create_frame_widgets):
99 gtk_window_set_has_resize_grip (FALSE) if that function is 360 Call gtk_window_set_has_resize_grip (FALSE) if that function is
100 present with Gtk+ 2.0. 361 present with Gtk+ 2.0.
101 362
1022011-11-26 Paul Eggert <eggert@cs.ucla.edu> 3632011-11-26 Paul Eggert <eggert@cs.ucla.edu>
@@ -303,8 +564,8 @@
303 * xdisp.c (display_line): Move the call to 564 * xdisp.c (display_line): Move the call to
304 highlight_trailing_whitespace before the call to 565 highlight_trailing_whitespace before the call to
305 compute_line_metrics, since the latter needs to see the final 566 compute_line_metrics, since the latter needs to see the final
306 faces of all the glyphs to compute ROW's hash value. Fixes 567 faces of all the glyphs to compute ROW's hash value.
307 assertion violations in row_equal_p. (Bug#10035) 568 Fixes assertion violations in row_equal_p. (Bug#10035)
308 569
3092011-11-14 Juanma Barranquero <lekktu@gmail.com> 5702011-11-14 Juanma Barranquero <lekktu@gmail.com>
310 571
@@ -388,8 +649,8 @@
3882011-11-08 Chong Yidong <cyd@gnu.org> 6492011-11-08 Chong Yidong <cyd@gnu.org>
389 650
390 * window.c (Fwindow_left_column, Fwindow_top_line): Doc fix. 651 * window.c (Fwindow_left_column, Fwindow_top_line): Doc fix.
391 (Fwindow_body_height, Fwindow_body_width): Move from Lisp. Signal 652 (Fwindow_body_height, Fwindow_body_width): Move from Lisp.
392 an error if not a live window. 653 Signal an error if not a live window.
393 (Fwindow_total_width, Fwindow_total_height): Move from Lisp. 654 (Fwindow_total_width, Fwindow_total_height): Move from Lisp.
394 (Fwindow_total_size, Fwindow_body_size): Move to Lisp. 655 (Fwindow_total_size, Fwindow_body_size): Move to Lisp.
395 656
@@ -521,8 +782,8 @@
521 (x_destroy_window): Move code to x_free_frame_resources. 782 (x_destroy_window): Move code to x_free_frame_resources.
522 783
523 * xfns.c (unwind_create_frame): Fix comment. 784 * xfns.c (unwind_create_frame): Fix comment.
524 (Fx_create_frame, x_create_tip_frame): Move 785 (Fx_create_frame, x_create_tip_frame):
525 terminal->reference_count++ just before making the frame 786 Move terminal->reference_count++ just before making the frame
526 official. Move initialization of image_cache_refcount and 787 official. Move initialization of image_cache_refcount and
527 dpyinfo_refcount before calling init_frame_faces (Bug#9943). 788 dpyinfo_refcount before calling init_frame_faces (Bug#9943).
528 789
@@ -592,8 +853,8 @@
592 * xdisp.c (mouse_face_from_buffer_pos): Fix a typo in a comment. 853 * xdisp.c (mouse_face_from_buffer_pos): Fix a typo in a comment.
593 Don't stop backward scan on the continuation glyph, even though 854 Don't stop backward scan on the continuation glyph, even though
594 its CHARPOS is positive. 855 its CHARPOS is positive.
595 (mouse_face_from_buffer_pos, note_mouse_highlight): Rename 856 (mouse_face_from_buffer_pos, note_mouse_highlight):
596 cover_string to disp_string. 857 Rename cover_string to disp_string.
597 858
5982011-11-01 Martin Rudalics <rudalics@gmx.at> 8592011-11-01 Martin Rudalics <rudalics@gmx.at>
599 860
diff --git a/src/ChangeLog.10 b/src/ChangeLog.10
index 7d2f48a03ea..53f7a016654 100644
--- a/src/ChangeLog.10
+++ b/src/ChangeLog.10
@@ -516,7 +516,7 @@
516 * w32fns.c (current_popup_menu): Use from w32menu.c. 516 * w32fns.c (current_popup_menu): Use from w32menu.c.
517 (w32_wnd_proc) <WM_EXITMENULOOP, WM_TIMER>: Use menubar_active 517 (w32_wnd_proc) <WM_EXITMENULOOP, WM_TIMER>: Use menubar_active
518 and current_popup_menu to determine whether a menubar menu has 518 and current_popup_menu to determine whether a menubar menu has
519 been cancelled. 519 been canceled.
520 520
521 * w32term.h (w32_output): Remove menu_command_in_progress. 521 * w32term.h (w32_output): Remove menu_command_in_progress.
522 522
@@ -15816,14 +15816,14 @@
15816 Add prototypes. 15816 Add prototypes.
15817 15817
15818 * macterm.c (mac_draw_bitmap): Add overlay_p arg. 15818 * macterm.c (mac_draw_bitmap): Add overlay_p arg.
15819 (x_draw_fringe_bitmap): Handle overlayed fringe bitmaps; 15819 (x_draw_fringe_bitmap): Handle overlaid fringe bitmaps;
15820 thanks to YAMAMOTO Mitsuharu for advice on how to do this. 15820 thanks to YAMAMOTO Mitsuharu for advice on how to do this.
15821 Use cursor color for displaying cursor in fringe. 15821 Use cursor color for displaying cursor in fringe.
15822 (x_redisplay_interface): Add null handlers for 15822 (x_redisplay_interface): Add null handlers for
15823 define_fringe_bitmap and destroy_fringe_bitmap functions. 15823 define_fringe_bitmap and destroy_fringe_bitmap functions.
15824 15824
15825 * w32term.c (w32_draw_fringe_bitmap): Copy unadapted code from 15825 * w32term.c (w32_draw_fringe_bitmap): Copy unadapted code from
15826 xterm.c to handle overlayed fringe bitmaps and to use cursor color 15826 xterm.c to handle overlaid fringe bitmaps and to use cursor color
15827 for displaying cursor in fringe. 15827 for displaying cursor in fringe.
15828 (w32_define_fringe_bitmap, w32_destroy_fringe_bitmap): New W32 15828 (w32_define_fringe_bitmap, w32_destroy_fringe_bitmap): New W32
15829 specific functions to define and destroy fringe bitmaps in fringe_bmp. 15829 specific functions to define and destroy fringe bitmaps in fringe_bmp.
@@ -15849,7 +15849,7 @@
15849 (display_line): Handle cursor in fringe at eob. 15849 (display_line): Handle cursor in fringe at eob.
15850 (display_line): Set row user fringe bitmaps from iterator. 15850 (display_line): Set row user fringe bitmaps from iterator.
15851 15851
15852 * xterm.c (x_draw_fringe_bitmap): Handle overlayed fringe bitmaps. 15852 * xterm.c (x_draw_fringe_bitmap): Handle overlaid fringe bitmaps.
15853 Use cursor color for displaying cursor in fringe. 15853 Use cursor color for displaying cursor in fringe.
15854 (x_redisplay_interface): Add null handlers for 15854 (x_redisplay_interface): Add null handlers for
15855 define_fringe_bitmap and destroy_fringe_bitmap functions. 15855 define_fringe_bitmap and destroy_fringe_bitmap functions.
diff --git a/src/ChangeLog.11 b/src/ChangeLog.11
index 7c46dea675c..78639ef0c2b 100644
--- a/src/ChangeLog.11
+++ b/src/ChangeLog.11
@@ -12897,7 +12897,7 @@
12897 * font.c (font_update_drivers): Sanity fallback to avoid disabling 12897 * font.c (font_update_drivers): Sanity fallback to avoid disabling
12898 all drivers. 12898 all drivers.
12899 12899
12900 * nsterm.m (-windowDidResize:): Avoid inf-loop under GNUStep. 12900 * nsterm.m (-windowDidResize:): Avoid inf-loop under GNUstep.
12901 12901
129022009-05-06 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> 129022009-05-06 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
12903 12903
@@ -23182,7 +23182,7 @@
23182 * font.c (font_prop_validate_symbol, font_prop_validate_style) 23182 * font.c (font_prop_validate_symbol, font_prop_validate_style)
23183 (font_prop_validate_non_neg, font_prop_validate_spacing): 23183 (font_prop_validate_non_neg, font_prop_validate_spacing):
23184 Delete argument prop_index. 23184 Delete argument prop_index.
23185 (font_property_table): Change arguments to validater. Change Callers. 23185 (font_property_table): Change arguments to validator. Change Callers.
23186 (font_lispy_object): Delete. 23186 (font_lispy_object): Delete.
23187 (font_at): Use font_find_object instead fo font_lispy_object. 23187 (font_at): Use font_find_object instead fo font_lispy_object.
23188 23188
@@ -30657,7 +30657,7 @@
30657 (display_buffer): Do not set split_height_threshold to twice the 30657 (display_buffer): Do not set split_height_threshold to twice the
30658 value of window_min_height to avoid changing the value of a 30658 value of window_min_height to avoid changing the value of a
30659 customizable variable. Rather explicitly check whether the 30659 customizable variable. Rather explicitly check whether the
30660 height of the window that shall be splitted is at least as large 30660 height of the window that shall be split is at least as large
30661 as split_height_threshold. 30661 as split_height_threshold.
30662 (Fwindow_full_width_p): New defun. 30662 (Fwindow_full_width_p): New defun.
30663 (syms_of_window): Defsubr it. 30663 (syms_of_window): Defsubr it.
diff --git a/src/ChangeLog.2 b/src/ChangeLog.2
index 62e3de22b09..d3be0064610 100644
--- a/src/ChangeLog.2
+++ b/src/ChangeLog.2
@@ -1811,7 +1811,7 @@
18111987-03-13 Richard M. Stallman (rms@prep) 18111987-03-13 Richard M. Stallman (rms@prep)
1812 1812
1813 * sysdep.c: Don't redefine TCSETAW if already defined. 1813 * sysdep.c: Don't redefine TCSETAW if already defined.
1814 (Cancelled by change on March 17). 1814 (Canceled by change on March 17).
1815 1815
1816 * sunfns.c: New file containing interface to Sun windows. 1816 * sunfns.c: New file containing interface to Sun windows.
1817 This is enabled by the switch HAVE_SUN_WINDOWS. 1817 This is enabled by the switch HAVE_SUN_WINDOWS.
@@ -2254,7 +2254,7 @@
2254 Initialize save_color. 2254 Initialize save_color.
2255 2255
2256 * fileio.c, search.c, sysdep.c, filelock.c, editfns.c, process.c: 2256 * fileio.c, search.c, sysdep.c, filelock.c, editfns.c, process.c:
2257 Delete/replace unused/conditionalised variables 2257 Delete/replace unused/conditionalized variables
2258 2258
22591987-01-15 Richard M. Stallman (rms@prep) 22591987-01-15 Richard M. Stallman (rms@prep)
2260 2260
@@ -2632,7 +2632,7 @@
2632 * fns.c: Fding requires an arg; pass Qnil. 2632 * fns.c: Fding requires an arg; pass Qnil.
2633 2633
2634 * m-alliant.h: define TEXT_START as 0x1000. 2634 * m-alliant.h: define TEXT_START as 0x1000.
2635 Don't define LIBS_STANDARD; the default (sharable) library 2635 Don't define LIBS_STANDARD; the default (shareable) library
2636 is said to work now. 2636 is said to work now.
2637 2637
2638 * alloc.c (mark_object): Now pass address of slot being marked. 2638 * alloc.c (mark_object): Now pass address of slot being marked.
@@ -4220,7 +4220,7 @@
4220 Increase PURESIZE again (sigh) 4220 Increase PURESIZE again (sigh)
4221 4221
4222 * unexec.c (write_segment): 4222 * unexec.c (write_segment):
4223 Kludgey coercions ("(int)") to get this line to compile: 4223 Kludgy coercions ("(int)") to get this line to compile:
4224 nwrite = (((int) ptr + 128) & ~127) - (int) ptr; 4224 nwrite = (((int) ptr + 128) & ~127) - (int) ptr;
4225 Also changed incorrect ~128 to ~127. 4225 Also changed incorrect ~128 to ~127.
4226 4226
diff --git a/src/ChangeLog.7 b/src/ChangeLog.7
index fc97acdeb1e..bb18f684242 100644
--- a/src/ChangeLog.7
+++ b/src/ChangeLog.7
@@ -3968,7 +3968,7 @@
3968 3968
39691998-01-12 Kenichi Handa <handa@etl.go.jp> 39691998-01-12 Kenichi Handa <handa@etl.go.jp>
3970 3970
3971 * minibuf.c (Fminibuffer_complete_word): Fix a bug of refering 3971 * minibuf.c (Fminibuffer_complete_word): Fix a bug of referring
3972 `i'. We must refer `i_byte' instead. 3972 `i'. We must refer `i_byte' instead.
3973 3973
3974 * insdel.c (insert_from_string_1): Decrement GAP_SIZE by 3974 * insdel.c (insert_from_string_1): Decrement GAP_SIZE by
diff --git a/src/ChangeLog.8 b/src/ChangeLog.8
index 2f3ee45a1ac..6973717a7d7 100644
--- a/src/ChangeLog.8
+++ b/src/ChangeLog.8
@@ -4027,7 +4027,7 @@
4027 * dispextern.h (struct glyph_row): Flag internal_border_p removed. 4027 * dispextern.h (struct glyph_row): Flag internal_border_p removed.
4028 4028
4029 * xfns.c (x_create_tip_frame): Don't set bitmapIcon resource 4029 * xfns.c (x_create_tip_frame): Don't set bitmapIcon resource
4030 because this will try to access a nonexisting widget. 4030 because this will try to access a nonexistent widget.
4031 4031
40321999-07-26 Markus Rost <rost@gnu.org> 40321999-07-26 Markus Rost <rost@gnu.org>
4033 4033
@@ -11485,7 +11485,7 @@
11485 Substitute homedir by `~' also in default_filename. 11485 Substitute homedir by `~' also in default_filename.
11486 11486
11487 * xdisp.c (try_window_id): Fix computation of tab_offset when 11487 * xdisp.c (try_window_id): Fix computation of tab_offset when
11488 backing up over a character that is splitted across lines. 11488 backing up over a character that is split across lines.
11489 11489
114901999-05-08 Kenichi HANDA <handa@etl.go.jp> 114901999-05-08 Kenichi HANDA <handa@etl.go.jp>
11491 11491
@@ -12583,7 +12583,7 @@
12583 quit_char is typed, in order to break out of potential deadlocks. 12583 quit_char is typed, in order to break out of potential deadlocks.
12584 (cancel_all_deferred_msgs): New function. 12584 (cancel_all_deferred_msgs): New function.
12585 (complete_deferred_msg): Don't abort if msg not found; may have 12585 (complete_deferred_msg): Don't abort if msg not found; may have
12586 been cancelled. 12586 been canceled.
12587 (Fw32_reconstruct_hot_key): Use pre-interned symbols. 12587 (Fw32_reconstruct_hot_key): Use pre-interned symbols.
12588 (Fw32_send_sys_command): Wait for system command to 12588 (Fw32_send_sys_command): Wait for system command to
12589 complete before returning. 12589 complete before returning.
@@ -13701,7 +13701,7 @@
13701 * ccl.c (CCL_WRITE_CHAR): Don't use bcopy. 13701 * ccl.c (CCL_WRITE_CHAR): Don't use bcopy.
13702 (ccl_driver): If BUFFER-MAGNIFICATION of the CCL program is 0, 13702 (ccl_driver): If BUFFER-MAGNIFICATION of the CCL program is 0,
13703 cause error if the program is going to output some bytes. When 13703 cause error if the program is going to output some bytes. When
13704 outputing a string to notify an error, check the case that 13704 outputting a string to notify an error, check the case that
13705 DST_BYTES is zero. 13705 DST_BYTES is zero.
13706 13706
13707 * coding.h (CODING_FINISH_INTERRUPT): New macro. 13707 * coding.h (CODING_FINISH_INTERRUPT): New macro.
diff --git a/src/alloc.c b/src/alloc.c
index 96d63f53cf9..6f70976c345 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -6399,7 +6399,7 @@ If this portion is smaller than `gc-cons-threshold', this is ignored. */);
6399 Vgc_cons_percentage = make_float (0.1); 6399 Vgc_cons_percentage = make_float (0.1);
6400 6400
6401 DEFVAR_INT ("pure-bytes-used", pure_bytes_used, 6401 DEFVAR_INT ("pure-bytes-used", pure_bytes_used,
6402 doc: /* Number of bytes of sharable Lisp data allocated so far. */); 6402 doc: /* Number of bytes of shareable Lisp data allocated so far. */);
6403 6403
6404 DEFVAR_INT ("cons-cells-consed", cons_cells_consed, 6404 DEFVAR_INT ("cons-cells-consed", cons_cells_consed,
6405 doc: /* Number of cons cells that have been consed so far. */); 6405 doc: /* Number of cons cells that have been consed so far. */);
diff --git a/src/callint.c b/src/callint.c
index 80e24f6c8ee..25a4713e270 100644
--- a/src/callint.c
+++ b/src/callint.c
@@ -274,8 +274,6 @@ invoke it. If KEYS is omitted or nil, the return value of
274 274
275 ptrdiff_t i, nargs; 275 ptrdiff_t i, nargs;
276 int foo; 276 int foo;
277 char prompt1[100];
278 char *tem1;
279 int arg_from_tty = 0; 277 int arg_from_tty = 0;
280 struct gcpro gcpro1, gcpro2, gcpro3, gcpro4, gcpro5; 278 struct gcpro gcpro1, gcpro2, gcpro3, gcpro4, gcpro5;
281 int key_count; 279 int key_count;
@@ -491,13 +489,8 @@ invoke it. If KEYS is omitted or nil, the return value of
491 tem = string; 489 tem = string;
492 for (i = 1; *tem; i++) 490 for (i = 1; *tem; i++)
493 { 491 {
494 strncpy (prompt1, tem + 1, sizeof prompt1 - 1); 492 visargs[0] = make_string (tem + 1, strcspn (tem + 1, "\n"));
495 prompt1[sizeof prompt1 - 1] = 0; 493 if (strchr (SSDATA (visargs[0]), '%'))
496 tem1 = strchr (prompt1, '\n');
497 if (tem1) *tem1 = 0;
498
499 visargs[0] = build_string (prompt1);
500 if (strchr (prompt1, '%'))
501 callint_message = Fformat (i, visargs); 494 callint_message = Fformat (i, visargs);
502 else 495 else
503 callint_message = visargs[0]; 496 callint_message = visargs[0];
diff --git a/src/ccl.c b/src/ccl.c
index b7228a4d1cd..65a6dcfcb85 100644
--- a/src/ccl.c
+++ b/src/ccl.c
@@ -210,8 +210,8 @@ static Lisp_Object Vccl_program_table;
210#define CCL_WriteArrayReadJump 0x0B /* Write an array element, read, and jump: 210#define CCL_WriteArrayReadJump 0x0B /* Write an array element, read, and jump:
211 1:A--D--D--R--E--S--S-rrrXXXXX 211 1:A--D--D--R--E--S--S-rrrXXXXX
212 2:LENGTH 212 2:LENGTH
213 3:ELEMENET[0] 213 3:ELEMENT[0]
214 4:ELEMENET[1] 214 4:ELEMENT[1]
215 ... 215 ...
216 N:A--D--D--R--E--S--S-rrrYYYYY 216 N:A--D--D--R--E--S--S-rrrYYYYY
217 ------------------------------ 217 ------------------------------
@@ -552,7 +552,7 @@ static Lisp_Object Vccl_program_table;
552 But, when VALm is mapped to VALn and VALn is not a number, the 552 But, when VALm is mapped to VALn and VALn is not a number, the
553 mapping proceed as below: 553 mapping proceed as below:
554 554
555 If VALn is nil, the lastest map is ignored and the mapping of VALm 555 If VALn is nil, the last map is ignored and the mapping of VALm
556 proceed to the next map. 556 proceed to the next map.
557 557
558 In VALn is t, VALm is reverted to reg[rrr] and the mapping of VALm 558 In VALn is t, VALm is reverted to reg[rrr] and the mapping of VALm
diff --git a/src/charset.c b/src/charset.c
index 3c15f1bee54..49fc7288069 100644
--- a/src/charset.c
+++ b/src/charset.c
@@ -1660,7 +1660,7 @@ maybe_unify_char (int c, Lisp_Object val)
1660} 1660}
1661 1661
1662 1662
1663/* Return a character correponding to the code-point CODE of 1663/* Return a character corresponding to the code-point CODE of
1664 CHARSET. */ 1664 CHARSET. */
1665 1665
1666int 1666int
diff --git a/src/charset.h b/src/charset.h
index fc35d6bb991..5ca83130b77 100644
--- a/src/charset.h
+++ b/src/charset.h
@@ -238,7 +238,7 @@ struct charset
238 int unified_p; 238 int unified_p;
239}; 239};
240 240
241/* Hash table of charset symbols vs. the correponding attribute 241/* Hash table of charset symbols vs. the corresponding attribute
242 vectors. */ 242 vectors. */
243extern Lisp_Object Vcharset_hash_table; 243extern Lisp_Object Vcharset_hash_table;
244 244
@@ -389,7 +389,7 @@ extern Lisp_Object Vchar_charset_set;
389#endif 389#endif
390 390
391 391
392/* Return a character correponding to the code-point CODE of CHARSET. 392/* Return a character corresponding to the code-point CODE of CHARSET.
393 Try some optimization before calling decode_char. */ 393 Try some optimization before calling decode_char. */
394 394
395#define DECODE_CHAR(charset, code) \ 395#define DECODE_CHAR(charset, code) \
diff --git a/src/cm.h b/src/cm.h
index dbf0820b94c..a8c7e0d7c4b 100644
--- a/src/cm.h
+++ b/src/cm.h
@@ -16,7 +16,7 @@ GNU General Public License for more details.
16You should have received a copy of the GNU General Public License 16You should have received a copy of the GNU General Public License
17along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ 17along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
18 18
19/* Holds the minimum and maximum costs for the parametrized capabilities. */ 19/* Holds the minimum and maximum costs for the parameterized capabilities. */
20struct parmcap 20struct parmcap
21 { 21 {
22 int mincost, maxcost; 22 int mincost, maxcost;
@@ -79,7 +79,7 @@ struct cm
79 struct parmcap cc_multiright; /* multiple right (RI) */ 79 struct parmcap cc_multiright; /* multiple right (RI) */
80#endif 80#endif
81 81
82 /* Costs for the non-parametrized capabilities */ 82 /* Costs for the non-parameterized capabilities */
83 int cc_up; /* cost for up */ 83 int cc_up; /* cost for up */
84 int cc_down; /* etc. */ 84 int cc_down; /* etc. */
85 int cc_left; 85 int cc_left;
diff --git a/src/coding.c b/src/coding.c
index 79908e9b29b..2db5385c932 100644
--- a/src/coding.c
+++ b/src/coding.c
@@ -847,16 +847,16 @@ static int encode_coding_ccl (struct coding_system *);
847static void decode_coding_raw_text (struct coding_system *); 847static void decode_coding_raw_text (struct coding_system *);
848static int encode_coding_raw_text (struct coding_system *); 848static int encode_coding_raw_text (struct coding_system *);
849 849
850static void coding_set_source (struct coding_system *); 850static EMACS_INT coding_set_source (struct coding_system *);
851static void coding_set_destination (struct coding_system *); 851static EMACS_INT coding_set_destination (struct coding_system *);
852static void coding_alloc_by_realloc (struct coding_system *, EMACS_INT); 852static void coding_alloc_by_realloc (struct coding_system *, EMACS_INT);
853static void coding_alloc_by_making_gap (struct coding_system *, 853static void coding_alloc_by_making_gap (struct coding_system *,
854 EMACS_INT, EMACS_INT); 854 EMACS_INT, EMACS_INT);
855static unsigned char *alloc_destination (struct coding_system *, 855static unsigned char *alloc_destination (struct coding_system *,
856 EMACS_INT, unsigned char *); 856 EMACS_INT, unsigned char *);
857static void setup_iso_safe_charsets (Lisp_Object); 857static void setup_iso_safe_charsets (Lisp_Object);
858static unsigned char *encode_designation_at_bol (struct coding_system *, 858static int encode_designation_at_bol (struct coding_system *,
859 int *, unsigned char *); 859 int *, int *, unsigned char *);
860static int detect_eol (const unsigned char *, 860static int detect_eol (const unsigned char *,
861 EMACS_INT, enum coding_category); 861 EMACS_INT, enum coding_category);
862static Lisp_Object adjust_coding_eol_type (struct coding_system *, int); 862static Lisp_Object adjust_coding_eol_type (struct coding_system *, int);
@@ -915,27 +915,68 @@ record_conversion_result (struct coding_system *coding,
915 } 915 }
916} 916}
917 917
918/* This wrapper macro is used to preserve validity of pointers into 918/* These wrapper macros are used to preserve validity of pointers into
919 buffer text across calls to decode_char, which could cause 919 buffer text across calls to decode_char, encode_char, etc, which
920 relocation of buffers if it loads a charset map, because loading a 920 could cause relocation of buffers if it loads a charset map,
921 charset map allocates large structures. */ 921 because loading a charset map allocates large structures. */
922
922#define CODING_DECODE_CHAR(coding, src, src_base, src_end, charset, code, c) \ 923#define CODING_DECODE_CHAR(coding, src, src_base, src_end, charset, code, c) \
923 do { \ 924 do { \
925 EMACS_INT offset; \
926 \
924 charset_map_loaded = 0; \ 927 charset_map_loaded = 0; \
925 c = DECODE_CHAR (charset, code); \ 928 c = DECODE_CHAR (charset, code); \
926 if (charset_map_loaded) \ 929 if (charset_map_loaded \
930 && (offset = coding_set_source (coding))) \
927 { \ 931 { \
928 const unsigned char *orig = coding->source; \
929 EMACS_INT offset; \
930 \
931 coding_set_source (coding); \
932 offset = coding->source - orig; \
933 src += offset; \ 932 src += offset; \
934 src_base += offset; \ 933 src_base += offset; \
935 src_end += offset; \ 934 src_end += offset; \
936 } \ 935 } \
937 } while (0) 936 } while (0)
938 937
938#define CODING_ENCODE_CHAR(coding, dst, dst_end, charset, c, code) \
939 do { \
940 EMACS_INT offset; \
941 \
942 charset_map_loaded = 0; \
943 code = ENCODE_CHAR (charset, c); \
944 if (charset_map_loaded \
945 && (offset = coding_set_destination (coding))) \
946 { \
947 dst += offset; \
948 dst_end += offset; \
949 } \
950 } while (0)
951
952#define CODING_CHAR_CHARSET(coding, dst, dst_end, c, charset_list, code_return, charset) \
953 do { \
954 EMACS_INT offset; \
955 \
956 charset_map_loaded = 0; \
957 charset = char_charset (c, charset_list, code_return); \
958 if (charset_map_loaded \
959 && (offset = coding_set_destination (coding))) \
960 { \
961 dst += offset; \
962 dst_end += offset; \
963 } \
964 } while (0)
965
966#define CODING_CHAR_CHARSET_P(coding, dst, dst_end, c, charset, result) \
967 do { \
968 EMACS_INT offset; \
969 \
970 charset_map_loaded = 0; \
971 result = CHAR_CHARSET_P (c, charset); \
972 if (charset_map_loaded \
973 && (offset = coding_set_destination (coding))) \
974 { \
975 dst += offset; \
976 dst_end += offset; \
977 } \
978 } while (0)
979
939 980
940/* If there are at least BYTES length of room at dst, allocate memory 981/* If there are at least BYTES length of room at dst, allocate memory
941 for coding->destination and update dst and dst_end. We don't have 982 for coding->destination and update dst and dst_end. We don't have
@@ -1015,9 +1056,14 @@ record_conversion_result (struct coding_system *coding,
1015 | ((p)[-1] & 0x3F)))) 1056 | ((p)[-1] & 0x3F))))
1016 1057
1017 1058
1018static void 1059/* Update coding->source from coding->src_object, and return how many
1060 bytes coding->source was changed. */
1061
1062static EMACS_INT
1019coding_set_source (struct coding_system *coding) 1063coding_set_source (struct coding_system *coding)
1020{ 1064{
1065 const unsigned char *orig = coding->source;
1066
1021 if (BUFFERP (coding->src_object)) 1067 if (BUFFERP (coding->src_object))
1022 { 1068 {
1023 struct buffer *buf = XBUFFER (coding->src_object); 1069 struct buffer *buf = XBUFFER (coding->src_object);
@@ -1036,11 +1082,18 @@ coding_set_source (struct coding_system *coding)
1036 /* Otherwise, the source is C string and is never relocated 1082 /* Otherwise, the source is C string and is never relocated
1037 automatically. Thus we don't have to update anything. */ 1083 automatically. Thus we don't have to update anything. */
1038 } 1084 }
1085 return coding->source - orig;
1039} 1086}
1040 1087
1041static void 1088
1089/* Update coding->destination from coding->dst_object, and return how
1090 many bytes coding->destination was changed. */
1091
1092static EMACS_INT
1042coding_set_destination (struct coding_system *coding) 1093coding_set_destination (struct coding_system *coding)
1043{ 1094{
1095 const unsigned char *orig = coding->destination;
1096
1044 if (BUFFERP (coding->dst_object)) 1097 if (BUFFERP (coding->dst_object))
1045 { 1098 {
1046 if (BUFFERP (coding->src_object) && coding->src_pos < 0) 1099 if (BUFFERP (coding->src_object) && coding->src_pos < 0)
@@ -1065,6 +1118,7 @@ coding_set_destination (struct coding_system *coding)
1065 /* Otherwise, the destination is C string and is never relocated 1118 /* Otherwise, the destination is C string and is never relocated
1066 automatically. Thus we don't have to update anything. */ 1119 automatically. Thus we don't have to update anything. */
1067 } 1120 }
1121 return coding->destination - orig;
1068} 1122}
1069 1123
1070 1124
@@ -2650,14 +2704,19 @@ encode_coding_emacs_mule (struct coding_system *coding)
2650 2704
2651 if (preferred_charset_id >= 0) 2705 if (preferred_charset_id >= 0)
2652 { 2706 {
2707 int result;
2708
2653 charset = CHARSET_FROM_ID (preferred_charset_id); 2709 charset = CHARSET_FROM_ID (preferred_charset_id);
2654 if (CHAR_CHARSET_P (c, charset)) 2710 CODING_CHAR_CHARSET_P (coding, dst, dst_end, c, charset, result);
2711 if (result)
2655 code = ENCODE_CHAR (charset, c); 2712 code = ENCODE_CHAR (charset, c);
2656 else 2713 else
2657 charset = char_charset (c, charset_list, &code); 2714 CODING_CHAR_CHARSET (coding, dst, dst_end, c, charset_list,
2715 &code, charset);
2658 } 2716 }
2659 else 2717 else
2660 charset = char_charset (c, charset_list, &code); 2718 CODING_CHAR_CHARSET (coding, dst, dst_end, c, charset_list,
2719 &code, charset);
2661 if (! charset) 2720 if (! charset)
2662 { 2721 {
2663 c = coding->default_char; 2722 c = coding->default_char;
@@ -2666,7 +2725,8 @@ encode_coding_emacs_mule (struct coding_system *coding)
2666 EMIT_ONE_ASCII_BYTE (c); 2725 EMIT_ONE_ASCII_BYTE (c);
2667 continue; 2726 continue;
2668 } 2727 }
2669 charset = char_charset (c, charset_list, &code); 2728 CODING_CHAR_CHARSET (coding, dst, dst_end, c, charset_list,
2729 &code, charset);
2670 } 2730 }
2671 dimension = CHARSET_DIMENSION (charset); 2731 dimension = CHARSET_DIMENSION (charset);
2672 emacs_mule_id = CHARSET_EMACS_MULE_ID (charset); 2732 emacs_mule_id = CHARSET_EMACS_MULE_ID (charset);
@@ -4185,7 +4245,8 @@ decode_coding_iso_2022 (struct coding_system *coding)
4185 4245
4186#define ENCODE_ISO_CHARACTER(charset, c) \ 4246#define ENCODE_ISO_CHARACTER(charset, c) \
4187 do { \ 4247 do { \
4188 int code = ENCODE_CHAR ((charset), (c)); \ 4248 int code; \
4249 CODING_ENCODE_CHAR (coding, dst, dst_end, (charset), (c), code); \
4189 \ 4250 \
4190 if (CHARSET_DIMENSION (charset) == 1) \ 4251 if (CHARSET_DIMENSION (charset) == 1) \
4191 ENCODE_ISO_CHARACTER_DIMENSION1 ((charset), code); \ 4252 ENCODE_ISO_CHARACTER_DIMENSION1 ((charset), code); \
@@ -4283,15 +4344,19 @@ encode_invocation_designation (struct charset *charset,
4283 4344
4284 4345
4285/* Produce designation sequences of charsets in the line started from 4346/* Produce designation sequences of charsets in the line started from
4286 SRC to a place pointed by DST, and return updated DST. 4347 CHARBUF to a place pointed by DST, and return the number of
4348 produced bytes. DST should not directly point a buffer text area
4349 which may be relocated by char_charset call.
4287 4350
4288 If the current block ends before any end-of-line, we may fail to 4351 If the current block ends before any end-of-line, we may fail to
4289 find all the necessary designations. */ 4352 find all the necessary designations. */
4290 4353
4291static unsigned char * 4354static int
4292encode_designation_at_bol (struct coding_system *coding, int *charbuf, 4355encode_designation_at_bol (struct coding_system *coding,
4356 int *charbuf, int *charbuf_end,
4293 unsigned char *dst) 4357 unsigned char *dst)
4294{ 4358{
4359 unsigned char *orig = dst;
4295 struct charset *charset; 4360 struct charset *charset;
4296 /* Table of charsets to be designated to each graphic register. */ 4361 /* Table of charsets to be designated to each graphic register. */
4297 int r[4]; 4362 int r[4];
@@ -4309,7 +4374,7 @@ encode_designation_at_bol (struct coding_system *coding, int *charbuf,
4309 for (reg = 0; reg < 4; reg++) 4374 for (reg = 0; reg < 4; reg++)
4310 r[reg] = -1; 4375 r[reg] = -1;
4311 4376
4312 while (found < 4) 4377 while (charbuf < charbuf_end && found < 4)
4313 { 4378 {
4314 int id; 4379 int id;
4315 4380
@@ -4334,7 +4399,7 @@ encode_designation_at_bol (struct coding_system *coding, int *charbuf,
4334 ENCODE_DESIGNATION (CHARSET_FROM_ID (r[reg]), reg, coding); 4399 ENCODE_DESIGNATION (CHARSET_FROM_ID (r[reg]), reg, coding);
4335 } 4400 }
4336 4401
4337 return dst; 4402 return dst - orig;
4338} 4403}
4339 4404
4340/* See the above "GENERAL NOTES on `encode_coding_XXX ()' functions". */ 4405/* See the above "GENERAL NOTES on `encode_coding_XXX ()' functions". */
@@ -4378,13 +4443,26 @@ encode_coding_iso_2022 (struct coding_system *coding)
4378 4443
4379 if (bol_designation) 4444 if (bol_designation)
4380 { 4445 {
4381 unsigned char *dst_prev = dst;
4382
4383 /* We have to produce designation sequences if any now. */ 4446 /* We have to produce designation sequences if any now. */
4384 dst = encode_designation_at_bol (coding, charbuf, dst); 4447 unsigned char desig_buf[16];
4385 bol_designation = 0; 4448 int nbytes;
4449 EMACS_INT offset;
4450
4451 charset_map_loaded = 0;
4452 nbytes = encode_designation_at_bol (coding, charbuf, charbuf_end,
4453 desig_buf);
4454 if (charset_map_loaded
4455 && (offset = coding_set_destination (coding)))
4456 {
4457 dst += offset;
4458 dst_end += offset;
4459 }
4460 memcpy (dst, desig_buf, nbytes);
4461 dst += nbytes;
4386 /* We are sure that designation sequences are all ASCII bytes. */ 4462 /* We are sure that designation sequences are all ASCII bytes. */
4387 produced_chars += dst - dst_prev; 4463 produced_chars += nbytes;
4464 bol_designation = 0;
4465 ASSURE_DESTINATION (safe_room);
4388 } 4466 }
4389 4467
4390 c = *charbuf++; 4468 c = *charbuf++;
@@ -4455,12 +4533,17 @@ encode_coding_iso_2022 (struct coding_system *coding)
4455 4533
4456 if (preferred_charset_id >= 0) 4534 if (preferred_charset_id >= 0)
4457 { 4535 {
4536 int result;
4537
4458 charset = CHARSET_FROM_ID (preferred_charset_id); 4538 charset = CHARSET_FROM_ID (preferred_charset_id);
4459 if (! CHAR_CHARSET_P (c, charset)) 4539 CODING_CHAR_CHARSET_P (coding, dst, dst_end, c, charset, result);
4460 charset = char_charset (c, charset_list, NULL); 4540 if (! result)
4541 CODING_CHAR_CHARSET (coding, dst, dst_end, c, charset_list,
4542 NULL, charset);
4461 } 4543 }
4462 else 4544 else
4463 charset = char_charset (c, charset_list, NULL); 4545 CODING_CHAR_CHARSET (coding, dst, dst_end, c, charset_list,
4546 NULL, charset);
4464 if (!charset) 4547 if (!charset)
4465 { 4548 {
4466 if (coding->mode & CODING_MODE_SAFE_ENCODING) 4549 if (coding->mode & CODING_MODE_SAFE_ENCODING)
@@ -4471,7 +4554,8 @@ encode_coding_iso_2022 (struct coding_system *coding)
4471 else 4554 else
4472 { 4555 {
4473 c = coding->default_char; 4556 c = coding->default_char;
4474 charset = char_charset (c, charset_list, NULL); 4557 CODING_CHAR_CHARSET (coding, dst, dst_end, c,
4558 charset_list, NULL, charset);
4475 } 4559 }
4476 } 4560 }
4477 ENCODE_ISO_CHARACTER (charset, c); 4561 ENCODE_ISO_CHARACTER (charset, c);
@@ -4897,7 +4981,9 @@ encode_coding_sjis (struct coding_system *coding)
4897 else 4981 else
4898 { 4982 {
4899 unsigned code; 4983 unsigned code;
4900 struct charset *charset = char_charset (c, charset_list, &code); 4984 struct charset *charset;
4985 CODING_CHAR_CHARSET (coding, dst, dst_end, c, charset_list,
4986 &code, charset);
4901 4987
4902 if (!charset) 4988 if (!charset)
4903 { 4989 {
@@ -4909,7 +4995,8 @@ encode_coding_sjis (struct coding_system *coding)
4909 else 4995 else
4910 { 4996 {
4911 c = coding->default_char; 4997 c = coding->default_char;
4912 charset = char_charset (c, charset_list, &code); 4998 CODING_CHAR_CHARSET (coding, dst, dst_end, c,
4999 charset_list, &code, charset);
4913 } 5000 }
4914 } 5001 }
4915 if (code == CHARSET_INVALID_CODE (charset)) 5002 if (code == CHARSET_INVALID_CODE (charset))
@@ -4984,7 +5071,9 @@ encode_coding_big5 (struct coding_system *coding)
4984 else 5071 else
4985 { 5072 {
4986 unsigned code; 5073 unsigned code;
4987 struct charset *charset = char_charset (c, charset_list, &code); 5074 struct charset *charset;
5075 CODING_CHAR_CHARSET (coding, dst, dst_end, c, charset_list,
5076 &code, charset);
4988 5077
4989 if (! charset) 5078 if (! charset)
4990 { 5079 {
@@ -4996,7 +5085,8 @@ encode_coding_big5 (struct coding_system *coding)
4996 else 5085 else
4997 { 5086 {
4998 c = coding->default_char; 5087 c = coding->default_char;
4999 charset = char_charset (c, charset_list, &code); 5088 CODING_CHAR_CHARSET (coding, dst, dst_end, c,
5089 charset_list, &code, charset);
5000 } 5090 }
5001 } 5091 }
5002 if (code == CHARSET_INVALID_CODE (charset)) 5092 if (code == CHARSET_INVALID_CODE (charset))
@@ -5154,7 +5244,7 @@ encode_coding_ccl (struct coding_system *coding)
5154 && coding->mode & CODING_MODE_LAST_BLOCK) 5244 && coding->mode & CODING_MODE_LAST_BLOCK)
5155 ccl->last_block = 1; 5245 ccl->last_block = 1;
5156 5246
5157 while (charbuf < charbuf_end) 5247 do
5158 { 5248 {
5159 ccl_driver (ccl, charbuf, destination_charbuf, 5249 ccl_driver (ccl, charbuf, destination_charbuf,
5160 charbuf_end - charbuf, 1024, charset_list); 5250 charbuf_end - charbuf, 1024, charset_list);
@@ -5176,6 +5266,7 @@ encode_coding_ccl (struct coding_system *coding)
5176 || ccl->status == CCL_STAT_INVALID_CMD) 5266 || ccl->status == CCL_STAT_INVALID_CMD)
5177 break; 5267 break;
5178 } 5268 }
5269 while (charbuf < charbuf_end);
5179 5270
5180 switch (ccl->status) 5271 switch (ccl->status)
5181 { 5272 {
@@ -5572,7 +5663,9 @@ encode_coding_charset (struct coding_system *coding)
5572 } 5663 }
5573 else 5664 else
5574 { 5665 {
5575 charset = char_charset (c, charset_list, &code); 5666 CODING_CHAR_CHARSET (coding, dst, dst_end, c, charset_list,
5667 &code, charset);
5668
5576 if (charset) 5669 if (charset)
5577 { 5670 {
5578 if (CHARSET_DIMENSION (charset) == 1) 5671 if (CHARSET_DIMENSION (charset) == 1)
@@ -8663,6 +8756,7 @@ to the string. */)
8663 } 8756 }
8664 8757
8665 positions = Qnil; 8758 positions = Qnil;
8759 charset_map_loaded = 0;
8666 while (1) 8760 while (1)
8667 { 8761 {
8668 int c; 8762 int c;
@@ -8690,6 +8784,16 @@ to the string. */)
8690 } 8784 }
8691 8785
8692 from++; 8786 from++;
8787 if (charset_map_loaded && NILP (string))
8788 {
8789 p = CHAR_POS_ADDR (from);
8790 pend = CHAR_POS_ADDR (to);
8791 if (from < GPT && to >= GPT)
8792 stop = GPT_ADDR;
8793 else
8794 stop = pend;
8795 charset_map_loaded = 0;
8796 }
8693 } 8797 }
8694 8798
8695 return (NILP (count) ? Fcar (positions) : Fnreverse (positions)); 8799 return (NILP (count) ? Fcar (positions) : Fnreverse (positions));
@@ -9208,7 +9312,7 @@ frame's terminal device. */)
9208 = TERMINAL_TERMINAL_CODING (get_terminal (terminal, 1)); 9312 = TERMINAL_TERMINAL_CODING (get_terminal (terminal, 1));
9209 Lisp_Object coding_system = CODING_ID_NAME (terminal_coding->id); 9313 Lisp_Object coding_system = CODING_ID_NAME (terminal_coding->id);
9210 9314
9211 /* For backward compatibility, return nil if it is `undecided'. */ 9315 /* For backward compatibility, return nil if it is `undecided'. */
9212 return (! EQ (coding_system, Qundecided) ? coding_system : Qnil); 9316 return (! EQ (coding_system, Qundecided) ? coding_system : Qnil);
9213} 9317}
9214 9318
@@ -9895,8 +9999,6 @@ usage: (define-coding-system-internal ...) */)
9895 { 9999 {
9896 Lisp_Object bom; 10000 Lisp_Object bom;
9897 10001
9898 CODING_ATTR_ASCII_COMPAT (attrs) = Qt;
9899
9900 if (nargs < coding_arg_utf8_max) 10002 if (nargs < coding_arg_utf8_max)
9901 goto short_args; 10003 goto short_args;
9902 10004
@@ -9910,6 +10012,8 @@ usage: (define-coding-system-internal ...) */)
9910 CHECK_CODING_SYSTEM (val); 10012 CHECK_CODING_SYSTEM (val);
9911 } 10013 }
9912 ASET (attrs, coding_attr_utf_bom, bom); 10014 ASET (attrs, coding_attr_utf_bom, bom);
10015 if (NILP (bom))
10016 CODING_ATTR_ASCII_COMPAT (attrs) = Qt;
9913 10017
9914 category = (CONSP (bom) ? coding_category_utf_8_auto 10018 category = (CONSP (bom) ? coding_category_utf_8_auto
9915 : NILP (bom) ? coding_category_utf_8_nosig 10019 : NILP (bom) ? coding_category_utf_8_nosig
diff --git a/src/coding.h b/src/coding.h
index 2621928adc3..b694e6c6b6e 100644
--- a/src/coding.h
+++ b/src/coding.h
@@ -457,7 +457,7 @@ struct coding_system
457 /* Number of error source data found in a decoding routine. */ 457 /* Number of error source data found in a decoding routine. */
458 int errors; 458 int errors;
459 459
460 /* Store the positions of error source data. */ 460 /* Store the positions of error source data. */
461 EMACS_INT *error_positions; 461 EMACS_INT *error_positions;
462 462
463 /* Finish status of code conversion. */ 463 /* Finish status of code conversion. */
diff --git a/src/data.c b/src/data.c
index e8d2b43198f..0ebb17a2e01 100644
--- a/src/data.c
+++ b/src/data.c
@@ -839,7 +839,7 @@ do_symval_forwarding (register union Lisp_Fwd *valcontents)
839 839
840 case Lisp_Fwd_Kboard_Obj: 840 case Lisp_Fwd_Kboard_Obj:
841 /* We used to simply use current_kboard here, but from Lisp 841 /* We used to simply use current_kboard here, but from Lisp
842 code, it's value is often unexpected. It seems nicer to 842 code, its value is often unexpected. It seems nicer to
843 allow constructions like this to work as intuitively expected: 843 allow constructions like this to work as intuitively expected:
844 844
845 (with-selected-frame frame 845 (with-selected-frame frame
diff --git a/src/dbusbind.c b/src/dbusbind.c
index 7984be3564b..c5448ee5e7a 100644
--- a/src/dbusbind.c
+++ b/src/dbusbind.c
@@ -968,7 +968,7 @@ DEFUN ("dbus-init-bus", Fdbus_init_bus, Sdbus_init_bus, 1, 1, 0,
968 connection = xd_initialize (bus, TRUE); 968 connection = xd_initialize (bus, TRUE);
969 969
970 /* Add the watch functions. We pass also the bus as data, in order 970 /* Add the watch functions. We pass also the bus as data, in order
971 to distinguish between the busses in xd_remove_watch. */ 971 to distinguish between the buses in xd_remove_watch. */
972 if (!dbus_connection_set_watch_functions (connection, 972 if (!dbus_connection_set_watch_functions (connection,
973 xd_add_watch, 973 xd_add_watch,
974 xd_remove_watch, 974 xd_remove_watch,
diff --git a/src/editfns.c b/src/editfns.c
index 83cd4bd5535..7077f40e51c 100644
--- a/src/editfns.c
+++ b/src/editfns.c
@@ -3870,7 +3870,7 @@ usage: (format STRING &rest OBJECTS) */)
3870 enum 3870 enum
3871 { 3871 {
3872 /* Maximum precision for a %f conversion such that the 3872 /* Maximum precision for a %f conversion such that the
3873 trailing output digit might be nonzero. Any precisions 3873 trailing output digit might be nonzero. Any precision
3874 larger than this will not yield useful information. */ 3874 larger than this will not yield useful information. */
3875 USEFUL_PRECISION_MAX = 3875 USEFUL_PRECISION_MAX =
3876 ((1 - DBL_MIN_EXP) 3876 ((1 - DBL_MIN_EXP)
diff --git a/src/emacs.c b/src/emacs.c
index 8a24b04fc2b..6f6338cefec 100644
--- a/src/emacs.c
+++ b/src/emacs.c
@@ -157,6 +157,8 @@ Lisp_Object Qfile_name_handler_alist;
157 157
158Lisp_Object Qrisky_local_variable; 158Lisp_Object Qrisky_local_variable;
159 159
160Lisp_Object Qkill_emacs;
161
160/* If non-zero, Emacs should not attempt to use a window-specific code, 162/* If non-zero, Emacs should not attempt to use a window-specific code,
161 but instead should use the virtual terminal under which it was started. */ 163 but instead should use the virtual terminal under which it was started. */
162int inhibit_window_system; 164int inhibit_window_system;
@@ -322,6 +324,12 @@ static void (*fatal_error_signal_hook) (void);
322pthread_t main_thread; 324pthread_t main_thread;
323#endif 325#endif
324 326
327#ifdef HAVE_NS
328/* NS autrelease pool, for memory management. */
329static void *ns_pool;
330#endif
331
332
325 333
326/* Handle bus errors, invalid instruction, etc. */ 334/* Handle bus errors, invalid instruction, etc. */
327#ifndef FLOAT_CATCH_SIGILL 335#ifndef FLOAT_CATCH_SIGILL
@@ -952,7 +960,7 @@ main (int argc, char **argv)
952 } 960 }
953 961
954 /* Command line option --no-windows is deprecated and thus not mentioned 962 /* Command line option --no-windows is deprecated and thus not mentioned
955 in the manual and usage informations. */ 963 in the manual and usage information. */
956 if (argmatch (argv, argc, "-nw", "--no-window-system", 6, NULL, &skip_args) 964 if (argmatch (argv, argc, "-nw", "--no-window-system", 6, NULL, &skip_args)
957 || argmatch (argv, argc, "-nw", "--no-windows", 6, NULL, &skip_args)) 965 || argmatch (argv, argc, "-nw", "--no-windows", 6, NULL, &skip_args))
958 inhibit_window_system = 1; 966 inhibit_window_system = 1;
@@ -1319,7 +1327,7 @@ Using an Emacs configured with --with-x-toolkit=lucid does not have this problem
1319 = argmatch (argv, argc, "-nsl", "--no-site-lisp", 11, NULL, &skip_args); 1327 = argmatch (argv, argc, "-nsl", "--no-site-lisp", 11, NULL, &skip_args);
1320 1328
1321#ifdef HAVE_NS 1329#ifdef HAVE_NS
1322 ns_alloc_autorelease_pool (); 1330 ns_pool = ns_alloc_autorelease_pool ();
1323 if (!noninteractive) 1331 if (!noninteractive)
1324 { 1332 {
1325#ifdef NS_IMPL_COCOA 1333#ifdef NS_IMPL_COCOA
@@ -2019,6 +2027,10 @@ all of which are called before Emacs is actually killed. */)
2019 2027
2020 shut_down_emacs (0, 0, STRINGP (arg) ? arg : Qnil); 2028 shut_down_emacs (0, 0, STRINGP (arg) ? arg : Qnil);
2021 2029
2030#ifdef HAVE_NS
2031 ns_release_autorelease_pool (ns_pool);
2032#endif
2033
2022 /* If we have an auto-save list file, 2034 /* If we have an auto-save list file,
2023 kill it because we are exiting Emacs deliberately (not crashing). 2035 kill it because we are exiting Emacs deliberately (not crashing).
2024 Do it after shut_down_emacs, which does an auto-save. */ 2036 Do it after shut_down_emacs, which does an auto-save. */
@@ -2400,6 +2412,7 @@ syms_of_emacs (void)
2400{ 2412{
2401 DEFSYM (Qfile_name_handler_alist, "file-name-handler-alist"); 2413 DEFSYM (Qfile_name_handler_alist, "file-name-handler-alist");
2402 DEFSYM (Qrisky_local_variable, "risky-local-variable"); 2414 DEFSYM (Qrisky_local_variable, "risky-local-variable");
2415 DEFSYM (Qkill_emacs, "kill-emacs");
2403 2416
2404#ifndef CANNOT_DUMP 2417#ifndef CANNOT_DUMP
2405 defsubr (&Sdump_emacs); 2418 defsubr (&Sdump_emacs);
diff --git a/src/emacsgtkfixed.c b/src/emacsgtkfixed.c
index 8cde68d8303..b8d3fea66e8 100644
--- a/src/emacsgtkfixed.c
+++ b/src/emacsgtkfixed.c
@@ -1,4 +1,4 @@
1/* A Gtk Widget that inherits GtkFixed, but can be shrinked. 1/* A Gtk Widget that inherits GtkFixed, but can be shrunk.
2This file is only use when compiling with Gtk+ 3. 2This file is only use when compiling with Gtk+ 3.
3 3
4Copyright (C) 2011 Free Software Foundation, Inc. 4Copyright (C) 2011 Free Software Foundation, Inc.
diff --git a/src/emacsgtkfixed.h b/src/emacsgtkfixed.h
index dbac136bd7f..c70e9a3efe3 100644
--- a/src/emacsgtkfixed.h
+++ b/src/emacsgtkfixed.h
@@ -1,4 +1,4 @@
1/* A Gtk Widget that inherits GtkFixed, but can be shrinked. 1/* A Gtk Widget that inherits GtkFixed, but can be shrunk.
2This file is only use when compiling with Gtk+ 3. 2This file is only use when compiling with Gtk+ 3.
3 3
4Copyright (C) 2011 Free Software Foundation, Inc. 4Copyright (C) 2011 Free Software Foundation, Inc.
diff --git a/src/eval.c b/src/eval.c
index 32b9d366fc3..079c7ecb6c2 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -1629,6 +1629,18 @@ static Lisp_Object find_handler_clause (Lisp_Object, Lisp_Object);
1629static int maybe_call_debugger (Lisp_Object conditions, Lisp_Object sig, 1629static int maybe_call_debugger (Lisp_Object conditions, Lisp_Object sig,
1630 Lisp_Object data); 1630 Lisp_Object data);
1631 1631
1632void
1633process_quit_flag (void)
1634{
1635 Lisp_Object flag = Vquit_flag;
1636 Vquit_flag = Qnil;
1637 if (EQ (flag, Qkill_emacs))
1638 Fkill_emacs (Qnil);
1639 if (EQ (Vthrow_on_input, flag))
1640 Fthrow (Vthrow_on_input, Qt);
1641 Fsignal (Qquit, Qnil);
1642}
1643
1632DEFUN ("signal", Fsignal, Ssignal, 2, 2, 0, 1644DEFUN ("signal", Fsignal, Ssignal, 2, 2, 0,
1633 doc: /* Signal an error. Args are ERROR-SYMBOL and associated DATA. 1645 doc: /* Signal an error. Args are ERROR-SYMBOL and associated DATA.
1634This function does not return. 1646This function does not return.
@@ -3733,7 +3745,7 @@ When lexical binding is not being used, this variable is nil.
3733A value of `(t)' indicates an empty environment, otherwise it is an 3745A value of `(t)' indicates an empty environment, otherwise it is an
3734alist of active lexical bindings. */); 3746alist of active lexical bindings. */);
3735 Vinternal_interpreter_environment = Qnil; 3747 Vinternal_interpreter_environment = Qnil;
3736 /* Don't export this variable to Elisp, so noone can mess with it 3748 /* Don't export this variable to Elisp, so no one can mess with it
3737 (Just imagine if someone makes it buffer-local). */ 3749 (Just imagine if someone makes it buffer-local). */
3738 Funintern (Qinternal_interpreter_environment, Qnil); 3750 Funintern (Qinternal_interpreter_environment, Qnil);
3739 3751
diff --git a/src/fileio.c b/src/fileio.c
index c0f6c1d2e8e..3306085491e 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -2416,15 +2416,27 @@ check_writable (const char *filename)
2416 return (st.st_mode & S_IWRITE || S_ISDIR (st.st_mode)); 2416 return (st.st_mode & S_IWRITE || S_ISDIR (st.st_mode));
2417#else /* not MSDOS */ 2417#else /* not MSDOS */
2418#ifdef HAVE_EUIDACCESS 2418#ifdef HAVE_EUIDACCESS
2419 return (euidaccess (filename, 2) >= 0); 2419 int res = (euidaccess (filename, 2) >= 0);
2420#else 2420#ifdef CYGWIN
2421 /* euidaccess may have returned failure because Cygwin couldn't
2422 determine the file's UID or GID; if so, we return success. */
2423 if (!res)
2424 {
2425 struct stat st;
2426 if (stat (filename, &st) < 0)
2427 return 0;
2428 res = (st.st_uid == -1 || st.st_gid == -1);
2429 }
2430#endif /* CYGWIN */
2431 return res;
2432#else /* not HAVE_EUIDACCESS */
2421 /* Access isn't quite right because it uses the real uid 2433 /* Access isn't quite right because it uses the real uid
2422 and we really want to test with the effective uid. 2434 and we really want to test with the effective uid.
2423 But Unix doesn't give us a right way to do it. 2435 But Unix doesn't give us a right way to do it.
2424 Opening with O_WRONLY could work for an ordinary file, 2436 Opening with O_WRONLY could work for an ordinary file,
2425 but would lose for directories. */ 2437 but would lose for directories. */
2426 return (access (filename, 2) >= 0); 2438 return (access (filename, 2) >= 0);
2427#endif 2439#endif /* not HAVE_EUIDACCESS */
2428#endif /* not MSDOS */ 2440#endif /* not MSDOS */
2429} 2441}
2430 2442
@@ -4186,7 +4198,7 @@ variable `last-coding-system-used' to the coding system actually used. */)
4186 /* If REPLACE is non-nil and we succeeded in not replacing the 4198 /* If REPLACE is non-nil and we succeeded in not replacing the
4187 beginning or end of the buffer text with the file's contents, 4199 beginning or end of the buffer text with the file's contents,
4188 call format-decode with `point' positioned at the beginning 4200 call format-decode with `point' positioned at the beginning
4189 of the buffer and `inserted' equalling the number of 4201 of the buffer and `inserted' equaling the number of
4190 characters in the buffer. Otherwise, format-decode might 4202 characters in the buffer. Otherwise, format-decode might
4191 fail to correctly analyze the beginning or end of the buffer. 4203 fail to correctly analyze the beginning or end of the buffer.
4192 Hence we temporarily save `point' and `inserted' here and 4204 Hence we temporarily save `point' and `inserted' here and
diff --git a/src/font.c b/src/font.c
index 35f5703e32e..6ab65281a48 100644
--- a/src/font.c
+++ b/src/font.c
@@ -614,7 +614,7 @@ static const struct
614 /* Function to validate PROP's value VAL, or NULL if any value is 614 /* Function to validate PROP's value VAL, or NULL if any value is
615 ok. The value is VAL or its regularized value if VAL is valid, 615 ok. The value is VAL or its regularized value if VAL is valid,
616 and Qerror if not. */ 616 and Qerror if not. */
617 Lisp_Object (*validater) (Lisp_Object prop, Lisp_Object val); 617 Lisp_Object (*validator) (Lisp_Object prop, Lisp_Object val);
618} font_property_table[] = 618} font_property_table[] =
619 { { &QCtype, font_prop_validate_symbol }, 619 { { &QCtype, font_prop_validate_symbol },
620 { &QCfoundry, font_prop_validate_symbol }, 620 { &QCfoundry, font_prop_validate_symbol },
@@ -672,7 +672,7 @@ font_prop_validate (int idx, Lisp_Object prop, Lisp_Object val)
672 if (idx < 0) 672 if (idx < 0)
673 return val; 673 return val;
674 } 674 }
675 validated = (font_property_table[idx].validater) (prop, val); 675 validated = (font_property_table[idx].validator) (prop, val);
676 if (EQ (validated, Qerror)) 676 if (EQ (validated, Qerror))
677 signal_error ("invalid font property", Fcons (prop, val)); 677 signal_error ("invalid font property", Fcons (prop, val));
678 return validated; 678 return validated;
@@ -825,7 +825,7 @@ font_expand_wildcards (Lisp_Object *field, int n)
825 range_mask = (range_mask << 1) | 1; 825 range_mask = (range_mask << 1) | 1;
826 826
827 /* The triplet RANGE_FROM, RANGE_TO, and RANGE_MASK is a 827 /* The triplet RANGE_FROM, RANGE_TO, and RANGE_MASK is a
828 position-based retriction for FIELD[I]. */ 828 position-based restriction for FIELD[I]. */
829 for (i = 0, range_from = 0, range_to = 14 - n; i < n; 829 for (i = 0, range_from = 0, range_to = 14 - n; i < n;
830 i++, range_from++, range_to++, range_mask <<= 1) 830 i++, range_from++, range_to++, range_mask <<= 1)
831 { 831 {
@@ -842,7 +842,7 @@ font_expand_wildcards (Lisp_Object *field, int n)
842 else 842 else
843 { 843 {
844 /* The triplet FROM, TO, and MASK is a value-based 844 /* The triplet FROM, TO, and MASK is a value-based
845 retriction for FIELD[I]. */ 845 restriction for FIELD[I]. */
846 int from, to; 846 int from, to;
847 unsigned mask; 847 unsigned mask;
848 848
diff --git a/src/font.h b/src/font.h
index 42fc050b670..b6c1acf4a30 100644
--- a/src/font.h
+++ b/src/font.h
@@ -621,7 +621,7 @@ struct font_driver
621 /* Optional. 621 /* Optional.
622 Get coordinates of the INDEXth anchor point of the glyph whose 622 Get coordinates of the INDEXth anchor point of the glyph whose
623 code is CODE. Store the coordinates in *X and *Y. Return 0 if 623 code is CODE. Store the coordinates in *X and *Y. Return 0 if
624 the operations was successfull. Otherwise return -1. */ 624 the operations was successful. Otherwise return -1. */
625 int (*anchor_point) (struct font *font, unsigned code, int index, 625 int (*anchor_point) (struct font *font, unsigned code, int index,
626 int *x, int *y); 626 int *x, int *y);
627 627
@@ -705,7 +705,7 @@ struct font_driver
705 705
706 706
707/* Chain of font drivers. There's one global font driver list 707/* Chain of font drivers. There's one global font driver list
708 (font_driver_list in font.c). In addition, each frame has it's own 708 (font_driver_list in font.c). In addition, each frame has its own
709 font driver list at FRAME_PTR->font_driver_list. */ 709 font driver list at FRAME_PTR->font_driver_list. */
710 710
711struct font_driver_list 711struct font_driver_list
@@ -721,7 +721,7 @@ struct font_driver_list
721 721
722 722
723/* Chain of arbitrary data specific to each font driver. Each frame 723/* Chain of arbitrary data specific to each font driver. Each frame
724 has it's own font data list at FRAME_PTR->font_data_list. */ 724 has its own font data list at FRAME_PTR->font_data_list. */
725 725
726struct font_data_list 726struct font_data_list
727{ 727{
diff --git a/src/fontset.c b/src/fontset.c
index 7592521cc7d..281ac92f82d 100644
--- a/src/fontset.c
+++ b/src/fontset.c
@@ -166,7 +166,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
166 These structures are hidden from the other codes than this file. 166 These structures are hidden from the other codes than this file.
167 The other codes handle fontsets only by their ID numbers. They 167 The other codes handle fontsets only by their ID numbers. They
168 usually use the variable name `fontset' for IDs. But, in this 168 usually use the variable name `fontset' for IDs. But, in this
169 file, we always use varialbe name `id' for IDs, and name `fontset' 169 file, we always use variable name `id' for IDs, and name `fontset'
170 for an actual fontset object, i.e., char-table. 170 for an actual fontset object, i.e., char-table.
171 171
172*/ 172*/
@@ -643,7 +643,7 @@ fontset_find_font (Lisp_Object fontset, int c, struct face *face, int id, int fa
643 if (font_has_char (f, font_object, c)) 643 if (font_has_char (f, font_object, c))
644 goto found; 644 goto found;
645 645
646 /* Find a font already opened, maching with the current spec, 646 /* Find a font already opened, matching with the current spec,
647 and supporting C. */ 647 and supporting C. */
648 font_def = RFONT_DEF_FONT_DEF (rfont_def); 648 font_def = RFONT_DEF_FONT_DEF (rfont_def);
649 for (; found_index + 1 < ASIZE (vec); found_index++) 649 for (; found_index + 1 < ASIZE (vec); found_index++)
diff --git a/src/frame.c b/src/frame.c
index 039ed6543cb..bd97c5f18c7 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -1929,7 +1929,7 @@ request a switch to FOCUS-FRAME, and `last-event-frame' will be
1929FOCUS-FRAME after reading an event typed at FRAME. 1929FOCUS-FRAME after reading an event typed at FRAME.
1930 1930
1931If FOCUS-FRAME is omitted or nil, any existing redirection is 1931If FOCUS-FRAME is omitted or nil, any existing redirection is
1932cancelled, and the frame again receives its own keystrokes. 1932canceled, and the frame again receives its own keystrokes.
1933 1933
1934Focus redirection is useful for temporarily redirecting keystrokes to 1934Focus redirection is useful for temporarily redirecting keystrokes to
1935a surrogate minibuffer frame when a frame doesn't have its own 1935a surrogate minibuffer frame when a frame doesn't have its own
diff --git a/src/ftfont.c b/src/ftfont.c
index c48346b0147..dbb2ce2745e 100644
--- a/src/ftfont.c
+++ b/src/ftfont.c
@@ -164,6 +164,13 @@ get_adstyle_property (FcPattern *p)
164 char *str, *end; 164 char *str, *end;
165 Lisp_Object adstyle; 165 Lisp_Object adstyle;
166 166
167#ifdef FC_FONTFORMAT
168 if ((FcPatternGetString (p, FC_FONTFORMAT, 0, &fcstr) == FcResultMatch)
169 && xstrcasecmp ((char *) fcstr, "bdf") != 0
170 && xstrcasecmp ((char *) fcstr, "pcf") != 0)
171 /* Not a BDF nor PCF font. */
172 return Qnil;
173#endif
167 if (FcPatternGetString (p, FC_STYLE, 0, &fcstr) != FcResultMatch) 174 if (FcPatternGetString (p, FC_STYLE, 0, &fcstr) != FcResultMatch)
168 return Qnil; 175 return Qnil;
169 str = (char *) fcstr; 176 str = (char *) fcstr;
@@ -953,7 +960,7 @@ ftfont_list (Lisp_Object frame, Lisp_Object spec)
953 /* Need fix because this finds any fonts. */ 960 /* Need fix because this finds any fonts. */
954 if (fontset->nfont == 0 && ! NILP (family)) 961 if (fontset->nfont == 0 && ! NILP (family))
955 { 962 {
956 /* Try maching with configuration. For instance, the 963 /* Try matching with configuration. For instance, the
957 configuration may specify "Nimbus Mono L" as an alias of 964 configuration may specify "Nimbus Mono L" as an alias of
958 "Courier". */ 965 "Courier". */
959 FcPattern *pat = FcPatternBuild (0, FC_FAMILY, FcTypeString, 966 FcPattern *pat = FcPatternBuild (0, FC_FAMILY, FcTypeString,
diff --git a/src/ftxfont.c b/src/ftxfont.c
index 608cfd8d44d..e04e802a3db 100644
--- a/src/ftxfont.c
+++ b/src/ftxfont.c
@@ -48,8 +48,8 @@ static GC *ftxfont_get_gcs (FRAME_PTR, unsigned long, unsigned long);
48static int ftxfont_draw_bitmap (FRAME_PTR, GC, GC *, struct font *, 48static int ftxfont_draw_bitmap (FRAME_PTR, GC, GC *, struct font *,
49 unsigned, int, int, XPoint *, int, int *, 49 unsigned, int, int, XPoint *, int, int *,
50 int); 50 int);
51static void ftxfont_draw_backgrond (FRAME_PTR, struct font *, GC, 51static void ftxfont_draw_background (FRAME_PTR, struct font *, GC,
52 int, int, int); 52 int, int, int);
53 53
54struct ftxfont_frame_data 54struct ftxfont_frame_data
55{ 55{
@@ -219,7 +219,8 @@ ftxfont_draw_bitmap (FRAME_PTR f, GC gc_fore, GC *gcs, struct font *font, unsign
219} 219}
220 220
221static void 221static void
222ftxfont_draw_backgrond (FRAME_PTR f, struct font *font, GC gc, int x, int y, int width) 222ftxfont_draw_background (FRAME_PTR f, struct font *font, GC gc, int x, int y,
223 int width)
223{ 224{
224 XGCValues xgcv; 225 XGCValues xgcv;
225 226
@@ -296,7 +297,7 @@ ftxfont_draw (struct glyph_string *s, int from, int to, int x, int y, int with_b
296 297
297 BLOCK_INPUT; 298 BLOCK_INPUT;
298 if (with_background) 299 if (with_background)
299 ftxfont_draw_backgrond (f, font, s->gc, x, y, s->width); 300 ftxfont_draw_background (f, font, s->gc, x, y, s->width);
300 code = alloca (sizeof (unsigned) * len); 301 code = alloca (sizeof (unsigned) * len);
301 for (i = 0; i < len; i++) 302 for (i = 0; i < len; i++)
302 code[i] = ((XCHAR2B_BYTE1 (s->char2b + from + i) << 8) 303 code[i] = ((XCHAR2B_BYTE1 (s->char2b + from + i) << 8)
diff --git a/src/image.c b/src/image.c
index 81907d8e580..3d189a5504b 100644
--- a/src/image.c
+++ b/src/image.c
@@ -7564,6 +7564,22 @@ extern WandExport void PixelGetMagickColor (const PixelWand *,
7564 MagickPixelPacket *); 7564 MagickPixelPacket *);
7565#endif 7565#endif
7566 7566
7567/* Log ImageMagick error message.
7568 Useful when a ImageMagick function returns the status `MagickFalse'. */
7569
7570static void
7571imagemagick_error (MagickWand *wand)
7572{
7573 char *description;
7574 ExceptionType severity;
7575
7576 description = MagickGetException (wand, &severity);
7577 image_error ("ImageMagick error: %s",
7578 make_string (description, strlen (description)),
7579 Qnil);
7580 description = (char *) MagickRelinquishMemory (description);
7581}
7582
7567/* Helper function for imagemagick_load, which does the actual loading 7583/* Helper function for imagemagick_load, which does the actual loading
7568 given contents and size, apart from frame and image structures, 7584 given contents and size, apart from frame and image structures,
7569 passed from imagemagick_load. Uses librimagemagick to do most of 7585 passed from imagemagick_load. Uses librimagemagick to do most of
@@ -7618,6 +7634,7 @@ imagemagick_load_image (struct frame *f, struct image *img,
7618 image = image_spec_value (img->spec, QCindex, NULL); 7634 image = image_spec_value (img->spec, QCindex, NULL);
7619 ino = INTEGERP (image) ? XFASTINT (image) : 0; 7635 ino = INTEGERP (image) ? XFASTINT (image) : 0;
7620 ping_wand = NewMagickWand (); 7636 ping_wand = NewMagickWand ();
7637 /* MagickSetResolution (ping_wand, 2, 2); (Bug#10112) */
7621 7638
7622 if (filename != NULL) 7639 if (filename != NULL)
7623 { 7640 {
@@ -7628,7 +7645,12 @@ imagemagick_load_image (struct frame *f, struct image *img,
7628 status = MagickPingImageBlob (ping_wand, contents, size); 7645 status = MagickPingImageBlob (ping_wand, contents, size);
7629 } 7646 }
7630 7647
7631 MagickSetResolution (ping_wand, 2, 2); 7648 if (status == MagickFalse)
7649 {
7650 imagemagick_error (ping_wand);
7651 DestroyMagickWand (ping_wand);
7652 return 0;
7653 }
7632 7654
7633 if (! (0 <= ino && ino < MagickGetNumberImages (ping_wand))) 7655 if (! (0 <= ino && ino < MagickGetNumberImages (ping_wand)))
7634 { 7656 {
@@ -7669,7 +7691,10 @@ imagemagick_load_image (struct frame *f, struct image *img,
7669 { 7691 {
7670 image_wand = NewMagickWand (); 7692 image_wand = NewMagickWand ();
7671 if (MagickReadImageBlob (image_wand, contents, size) == MagickFalse) 7693 if (MagickReadImageBlob (image_wand, contents, size) == MagickFalse)
7672 goto imagemagick_error; 7694 {
7695 imagemagick_error (image_wand);
7696 goto imagemagick_error;
7697 }
7673 } 7698 }
7674 7699
7675 /* If width and/or height is set in the display spec assume we want 7700 /* If width and/or height is set in the display spec assume we want
@@ -7697,6 +7722,7 @@ imagemagick_load_image (struct frame *f, struct image *img,
7697 if (status == MagickFalse) 7722 if (status == MagickFalse)
7698 { 7723 {
7699 image_error ("Imagemagick scale failed", Qnil, Qnil); 7724 image_error ("Imagemagick scale failed", Qnil, Qnil);
7725 imagemagick_error (image_wand);
7700 goto imagemagick_error; 7726 goto imagemagick_error;
7701 } 7727 }
7702 } 7728 }
@@ -7751,6 +7777,7 @@ imagemagick_load_image (struct frame *f, struct image *img,
7751 if (status == MagickFalse) 7777 if (status == MagickFalse)
7752 { 7778 {
7753 image_error ("Imagemagick image rotate failed", Qnil, Qnil); 7779 image_error ("Imagemagick image rotate failed", Qnil, Qnil);
7780 imagemagick_error (image_wand);
7754 goto imagemagick_error; 7781 goto imagemagick_error;
7755 } 7782 }
7756 } 7783 }
@@ -7975,7 +8002,7 @@ recognize as images, such as C. See `imagemagick-types-inhibit'. */)
7975 Qimagemagicktype = intern (imtypes[i]); 8002 Qimagemagicktype = intern (imtypes[i]);
7976 typelist = Fcons (Qimagemagicktype, typelist); 8003 typelist = Fcons (Qimagemagicktype, typelist);
7977 } 8004 }
7978 return typelist; 8005 return Fnreverse (typelist);
7979} 8006}
7980 8007
7981#endif /* defined (HAVE_IMAGEMAGICK) */ 8008#endif /* defined (HAVE_IMAGEMAGICK) */
diff --git a/src/keyboard.c b/src/keyboard.c
index 656634b8d31..7873dca3a0e 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -467,7 +467,8 @@ static void input_available_signal (int signo);
467static Lisp_Object (Fcommand_execute) (Lisp_Object, Lisp_Object, Lisp_Object, 467static Lisp_Object (Fcommand_execute) (Lisp_Object, Lisp_Object, Lisp_Object,
468 Lisp_Object); 468 Lisp_Object);
469static void handle_interrupt (void); 469static void handle_interrupt (void);
470static void quit_throw_to_read_char (void) NO_RETURN; 470static void quit_throw_to_read_char (int) NO_RETURN;
471static void process_special_events (void);
471static void timer_start_idle (void); 472static void timer_start_idle (void);
472static void timer_stop_idle (void); 473static void timer_stop_idle (void);
473static void timer_resume_idle (void); 474static void timer_resume_idle (void);
@@ -656,7 +657,7 @@ echo_now (void)
656 echo_kboard = current_kboard; 657 echo_kboard = current_kboard;
657 658
658 if (waiting_for_input && !NILP (Vquit_flag)) 659 if (waiting_for_input && !NILP (Vquit_flag))
659 quit_throw_to_read_char (); 660 quit_throw_to_read_char (0);
660} 661}
661 662
662/* Turn off echoing, for the start of a new command. */ 663/* Turn off echoing, for the start of a new command. */
@@ -3820,7 +3821,7 @@ kbd_buffer_get_event (KBOARD **kbp,
3820 /* If the quit flag is set, then read_char will return 3821 /* If the quit flag is set, then read_char will return
3821 quit_char, so that counts as "available input." */ 3822 quit_char, so that counts as "available input." */
3822 if (!NILP (Vquit_flag)) 3823 if (!NILP (Vquit_flag))
3823 quit_throw_to_read_char (); 3824 quit_throw_to_read_char (0);
3824 3825
3825 /* One way or another, wait until input is available; then, if 3826 /* One way or another, wait until input is available; then, if
3826 interrupt handlers have not read it, read it now. */ 3827 interrupt handlers have not read it, read it now. */
@@ -4155,14 +4156,12 @@ kbd_buffer_get_event (KBOARD **kbp,
4155 return (obj); 4156 return (obj);
4156} 4157}
4157 4158
4158/* Process any events that are not user-visible, 4159/* Process any non-user-visible events (currently X selection events),
4159 then return, without reading any user-visible events. */ 4160 without reading any user-visible events. */
4160 4161
4161void 4162static void
4162swallow_events (int do_display) 4163process_special_events (void)
4163{ 4164{
4164 int old_timers_run;
4165
4166 while (kbd_fetch_ptr != kbd_store_ptr) 4165 while (kbd_fetch_ptr != kbd_store_ptr)
4167 { 4166 {
4168 struct input_event *event; 4167 struct input_event *event;
@@ -4197,6 +4196,17 @@ swallow_events (int do_display)
4197 else 4196 else
4198 break; 4197 break;
4199 } 4198 }
4199}
4200
4201/* Process any events that are not user-visible, run timer events that
4202 are ripe, and return, without reading any user-visible events. */
4203
4204void
4205swallow_events (int do_display)
4206{
4207 int old_timers_run;
4208
4209 process_special_events ();
4200 4210
4201 old_timers_run = timers_run; 4211 old_timers_run = timers_run;
4202 get_input_pending (&input_pending, READABLE_EVENTS_DO_TIMERS_NOW); 4212 get_input_pending (&input_pending, READABLE_EVENTS_DO_TIMERS_NOW);
@@ -10538,6 +10548,9 @@ if there is a doubt, the value is t. */)
10538 || !NILP (Vunread_input_method_events)) 10548 || !NILP (Vunread_input_method_events))
10539 return (Qt); 10549 return (Qt);
10540 10550
10551 /* Process non-user-visible events (Bug#10195). */
10552 process_special_events ();
10553
10541 get_input_pending (&input_pending, 10554 get_input_pending (&input_pending,
10542 READABLE_EVENTS_DO_TIMERS_NOW 10555 READABLE_EVENTS_DO_TIMERS_NOW
10543 | READABLE_EVENTS_FILTER_EVENTS); 10556 | READABLE_EVENTS_FILTER_EVENTS);
@@ -10840,7 +10853,7 @@ set_waiting_for_input (struct timeval *time_to_clear)
10840 /* If handle_interrupt was called before and buffered a C-g, 10853 /* If handle_interrupt was called before and buffered a C-g,
10841 make it run again now, to avoid timing error. */ 10854 make it run again now, to avoid timing error. */
10842 if (!NILP (Vquit_flag)) 10855 if (!NILP (Vquit_flag))
10843 quit_throw_to_read_char (); 10856 quit_throw_to_read_char (0);
10844} 10857}
10845 10858
10846void 10859void
@@ -10855,7 +10868,7 @@ clear_waiting_for_input (void)
10855 10868
10856 If we have a frame on the controlling tty, we assume that the 10869 If we have a frame on the controlling tty, we assume that the
10857 SIGINT was generated by C-g, so we call handle_interrupt. 10870 SIGINT was generated by C-g, so we call handle_interrupt.
10858 Otherwise, the handler kills Emacs. */ 10871 Otherwise, tell QUIT to kill Emacs. */
10859 10872
10860static void 10873static void
10861interrupt_signal (int signalnum) /* If we don't have an argument, some */ 10874interrupt_signal (int signalnum) /* If we don't have an argument, some */
@@ -10872,12 +10885,10 @@ interrupt_signal (int signalnum) /* If we don't have an argument, some */
10872 if (!terminal) 10885 if (!terminal)
10873 { 10886 {
10874 /* If there are no frames there, let's pretend that we are a 10887 /* If there are no frames there, let's pretend that we are a
10875 well-behaving UN*X program and quit. We cannot do that while 10888 well-behaving UN*X program and quit. We must not call Lisp
10876 GC is in progress, though. */ 10889 in a signal handler, so tell QUIT to exit when it is
10877 if (!gc_in_progress && !waiting_for_input) 10890 safe. */
10878 Fkill_emacs (Qnil); 10891 Vquit_flag = Qkill_emacs;
10879 else
10880 Vquit_flag = Qt;
10881 } 10892 }
10882 else 10893 else
10883 { 10894 {
@@ -11026,15 +11037,20 @@ handle_interrupt (void)
11026 separate event loop thread like W32. */ 11037 separate event loop thread like W32. */
11027#ifndef HAVE_NS 11038#ifndef HAVE_NS
11028 if (waiting_for_input && !echoing) 11039 if (waiting_for_input && !echoing)
11029 quit_throw_to_read_char (); 11040 quit_throw_to_read_char (1);
11030#endif 11041#endif
11031} 11042}
11032 11043
11033/* Handle a C-g by making read_char return C-g. */ 11044/* Handle a C-g by making read_char return C-g. */
11034 11045
11035static void 11046static void
11036quit_throw_to_read_char (void) 11047quit_throw_to_read_char (int from_signal)
11037{ 11048{
11049 /* When not called from a signal handler it is safe to call
11050 Lisp. */
11051 if (!from_signal && EQ (Vquit_flag, Qkill_emacs))
11052 Fkill_emacs (Qnil);
11053
11038 sigfree (); 11054 sigfree ();
11039 /* Prevent another signal from doing this before we finish. */ 11055 /* Prevent another signal from doing this before we finish. */
11040 clear_waiting_for_input (); 11056 clear_waiting_for_input ();
@@ -12265,7 +12281,7 @@ text in the region before modifying the buffer. The next
12265 DEFVAR_LISP ("debug-on-event", 12281 DEFVAR_LISP ("debug-on-event",
12266 Vdebug_on_event, 12282 Vdebug_on_event,
12267 doc: /* Enter debugger on this event. When Emacs 12283 doc: /* Enter debugger on this event. When Emacs
12268receives the special event specifed by this variable, it will try to 12284receives the special event specified by this variable, it will try to
12269break into the debugger as soon as possible instead of processing the 12285break into the debugger as soon as possible instead of processing the
12270event normally through `special-event-map'. 12286event normally through `special-event-map'.
12271 12287
diff --git a/src/lastfile.c b/src/lastfile.c
index d348e4ebb07..ab07e748930 100644
--- a/src/lastfile.c
+++ b/src/lastfile.c
@@ -23,7 +23,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
23 23
24 The files of Emacs are written so as to have no initialized 24 The files of Emacs are written so as to have no initialized
25 data that can ever need to be altered except at the first startup. 25 data that can ever need to be altered except at the first startup.
26 This is so that those words can be dumped as sharable text. 26 This is so that those words can be dumped as shareable text.
27 27
28 It is not possible to exercise such control over library files. 28 It is not possible to exercise such control over library files.
29 So it is necessary to refrain from making their data areas shared. 29 So it is necessary to refrain from making their data areas shared.
@@ -47,4 +47,3 @@ char my_endbss[1];
47 of the bss area used by Emacs. */ 47 of the bss area used by Emacs. */
48static char _my_endbss[1]; 48static char _my_endbss[1];
49char * my_endbss_static = _my_endbss; 49char * my_endbss_static = _my_endbss;
50
diff --git a/src/lisp.h b/src/lisp.h
index 6b19396111c..036f1b13330 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -2132,7 +2132,10 @@ extern char *stack_bottom;
2132 Exception: if you set immediate_quit to nonzero, 2132 Exception: if you set immediate_quit to nonzero,
2133 then the handler that responds to the C-g does the quit itself. 2133 then the handler that responds to the C-g does the quit itself.
2134 This is a good thing to do around a loop that has no side effects 2134 This is a good thing to do around a loop that has no side effects
2135 and (in particular) cannot call arbitrary Lisp code. */ 2135 and (in particular) cannot call arbitrary Lisp code.
2136
2137 If quit-flag is set to `kill-emacs' the SIGINT handler has received
2138 a request to exit Emacs when it is safe to do. */
2136 2139
2137#ifdef SYNC_INPUT 2140#ifdef SYNC_INPUT
2138extern void process_pending_signals (void); 2141extern void process_pending_signals (void);
@@ -2144,16 +2147,11 @@ extern int pending_signals;
2144#define ELSE_PENDING_SIGNALS 2147#define ELSE_PENDING_SIGNALS
2145#endif /* not SYNC_INPUT */ 2148#endif /* not SYNC_INPUT */
2146 2149
2150extern void process_quit_flag (void);
2147#define QUIT \ 2151#define QUIT \
2148 do { \ 2152 do { \
2149 if (!NILP (Vquit_flag) && NILP (Vinhibit_quit)) \ 2153 if (!NILP (Vquit_flag) && NILP (Vinhibit_quit)) \
2150 { \ 2154 process_quit_flag (); \
2151 Lisp_Object flag = Vquit_flag; \
2152 Vquit_flag = Qnil; \
2153 if (EQ (Vthrow_on_input, flag)) \
2154 Fthrow (Vthrow_on_input, Qt); \
2155 Fsignal (Qquit, Qnil); \
2156 } \
2157 ELSE_PENDING_SIGNALS \ 2155 ELSE_PENDING_SIGNALS \
2158 } while (0) 2156 } while (0)
2159 2157
@@ -3295,6 +3293,7 @@ extern Lisp_Object Qfile_name_handler_alist;
3295#ifdef FLOAT_CATCH_SIGILL 3293#ifdef FLOAT_CATCH_SIGILL
3296extern void fatal_error_signal (int); 3294extern void fatal_error_signal (int);
3297#endif 3295#endif
3296extern Lisp_Object Qkill_emacs;
3298EXFUN (Fkill_emacs, 1) NO_RETURN; 3297EXFUN (Fkill_emacs, 1) NO_RETURN;
3299#if HAVE_SETLOCALE 3298#if HAVE_SETLOCALE
3300void fixup_locale (void); 3299void fixup_locale (void);
diff --git a/src/lread.c b/src/lread.c
index cdbd09d2f89..7c0b0475786 100644
--- a/src/lread.c
+++ b/src/lread.c
@@ -2822,7 +2822,7 @@ read1 (register Lisp_Object readcharfun, int *pch, int first_in_list)
2822 So we now use the same heuristic as for backquote: old-style 2822 So we now use the same heuristic as for backquote: old-style
2823 unquotes are only recognized when first on a list, and when 2823 unquotes are only recognized when first on a list, and when
2824 followed by a space. 2824 followed by a space.
2825 Because it's more difficult to peak 2 chars ahead, a new-style 2825 Because it's more difficult to peek 2 chars ahead, a new-style
2826 ,@ can still not be used outside of a `, unless it's in the middle 2826 ,@ can still not be used outside of a `, unless it's in the middle
2827 of a list. */ 2827 of a list. */
2828 if (new_backquote_flag 2828 if (new_backquote_flag
@@ -4180,13 +4180,16 @@ init_lread (void)
4180 } 4180 }
4181 4181
4182 /* Add site-lisp under the installation dir, if it exists. */ 4182 /* Add site-lisp under the installation dir, if it exists. */
4183 tem = Fexpand_file_name (build_string ("site-lisp"), 4183 if (!no_site_lisp)
4184 Vinstallation_directory);
4185 tem1 = Ffile_exists_p (tem);
4186 if (!NILP (tem1))
4187 { 4184 {
4188 if (NILP (Fmember (tem, Vload_path))) 4185 tem = Fexpand_file_name (build_string ("site-lisp"),
4189 Vload_path = Fcons (tem, Vload_path); 4186 Vinstallation_directory);
4187 tem1 = Ffile_exists_p (tem);
4188 if (!NILP (tem1))
4189 {
4190 if (NILP (Fmember (tem, Vload_path)))
4191 Vload_path = Fcons (tem, Vload_path);
4192 }
4190 } 4193 }
4191 4194
4192 /* If Emacs was not built in the source directory, 4195 /* If Emacs was not built in the source directory,
@@ -4222,11 +4225,14 @@ init_lread (void)
4222 if (NILP (Fmember (tem, Vload_path))) 4225 if (NILP (Fmember (tem, Vload_path)))
4223 Vload_path = Fcons (tem, Vload_path); 4226 Vload_path = Fcons (tem, Vload_path);
4224 4227
4225 tem = Fexpand_file_name (build_string ("site-lisp"), 4228 if (!no_site_lisp)
4226 Vsource_directory); 4229 {
4230 tem = Fexpand_file_name (build_string ("site-lisp"),
4231 Vsource_directory);
4227 4232
4228 if (NILP (Fmember (tem, Vload_path))) 4233 if (NILP (Fmember (tem, Vload_path)))
4229 Vload_path = Fcons (tem, Vload_path); 4234 Vload_path = Fcons (tem, Vload_path);
4235 }
4230 } 4236 }
4231 } 4237 }
4232 if (!NILP (sitelisp) && !no_site_lisp) 4238 if (!NILP (sitelisp) && !no_site_lisp)
diff --git a/src/minibuf.c b/src/minibuf.c
index 7ece5764203..ad5625e9ee9 100644
--- a/src/minibuf.c
+++ b/src/minibuf.c
@@ -905,26 +905,36 @@ DEFUN ("read-from-minibuffer", Fread_from_minibuffer,
905The optional second arg INITIAL-CONTENTS is an obsolete alternative to 905The optional second arg INITIAL-CONTENTS is an obsolete alternative to
906 DEFAULT-VALUE. It normally should be nil in new code, except when 906 DEFAULT-VALUE. It normally should be nil in new code, except when
907 HIST is a cons. It is discussed in more detail below. 907 HIST is a cons. It is discussed in more detail below.
908
908Third arg KEYMAP is a keymap to use whilst reading; 909Third arg KEYMAP is a keymap to use whilst reading;
909 if omitted or nil, the default is `minibuffer-local-map'. 910 if omitted or nil, the default is `minibuffer-local-map'.
910If fourth arg READ is non-nil, then interpret the result as a Lisp object 911
912If fourth arg READ is non-nil, interpret the result as a Lisp object
911 and return that object: 913 and return that object:
912 in other words, do `(car (read-from-string INPUT-STRING))' 914 in other words, do `(car (read-from-string INPUT-STRING))'
915
913Fifth arg HIST, if non-nil, specifies a history list and optionally 916Fifth arg HIST, if non-nil, specifies a history list and optionally
914 the initial position in the list. It can be a symbol, which is the 917 the initial position in the list. It can be a symbol, which is the
915 history list variable to use, or it can be a cons cell 918 history list variable to use, or a cons cell (HISTVAR . HISTPOS).
916 (HISTVAR . HISTPOS). In that case, HISTVAR is the history list variable 919 In that case, HISTVAR is the history list variable to use, and
917 to use, and HISTPOS is the initial position for use by the minibuffer 920 HISTPOS is the initial position for use by the minibuffer history
918 history commands. For consistency, you should also specify that 921 commands. For consistency, you should also specify that element of
919 element of the history as the value of INITIAL-CONTENTS. Positions 922 the history as the value of INITIAL-CONTENTS. Positions are counted
920 are counted starting from 1 at the beginning of the list. 923 starting from 1 at the beginning of the list.
921Sixth arg DEFAULT-VALUE is a default value or list of default values. 924
922 If non-nil, it is available via history commands. If READ is 925Sixth arg DEFAULT-VALUE, if non-nil, should be a string, which is used
923 non-nil, it is also the default to `read' if the user enters empty 926 as the default to `read' if READ is non-nil and the user enters
924 input. If READ is non-nil, `read-from-minibuffer' does NOT return 927 empty input. But if READ is nil, this function does _not_ return
925 DEFAULT-VALUE for empty input! It returns the empty string. 928 DEFAULT-VALUE for empty input! Instead, it returns the empty string.
929
930 Whatever the value of READ, DEFAULT-VALUE is made available via the
931 minibuffer history commands. DEFAULT-VALUE can also be a list of
932 strings, in which case all the strings are available in the history,
933 and the first string is the default to `read' if READ is non-nil.
934
926Seventh arg INHERIT-INPUT-METHOD, if non-nil, means the minibuffer inherits 935Seventh arg INHERIT-INPUT-METHOD, if non-nil, means the minibuffer inherits
927 the current input method and the setting of `enable-multibyte-characters'. 936 the current input method and the setting of `enable-multibyte-characters'.
937
928If the variable `minibuffer-allow-text-properties' is non-nil, 938If the variable `minibuffer-allow-text-properties' is non-nil,
929 then the string which is returned includes whatever text properties 939 then the string which is returned includes whatever text properties
930 were present in the minibuffer. Otherwise the value has no text properties. 940 were present in the minibuffer. Otherwise the value has no text properties.
diff --git a/src/nsfns.m b/src/nsfns.m
index 280fee0b27b..e41b77e242a 100644
--- a/src/nsfns.m
+++ b/src/nsfns.m
@@ -394,9 +394,8 @@ x_set_background_color (struct frame *f, Lisp_Object arg, Lisp_Object oldval)
394 if (face) 394 if (face)
395 { 395 {
396 col = ns_lookup_indexed_color (NS_FACE_BACKGROUND (face), f); 396 col = ns_lookup_indexed_color (NS_FACE_BACKGROUND (face), f);
397 face->background 397 face->background = ns_index_color
398 = (EMACS_UINT) [[col colorWithAlphaComponent: alpha] retain]; 398 ([col colorWithAlphaComponent: alpha], f);
399 [col release];
400 399
401 update_face_from_frame_parameter (f, Qbackground_color, arg); 400 update_face_from_frame_parameter (f, Qbackground_color, arg);
402 } 401 }
@@ -770,7 +769,7 @@ ns_implicitly_set_icon_type (struct frame *f)
770{ 769{
771 Lisp_Object tem; 770 Lisp_Object tem;
772 EmacsView *view = FRAME_NS_VIEW (f); 771 EmacsView *view = FRAME_NS_VIEW (f);
773 id image =nil; 772 id image = nil;
774 Lisp_Object chain, elt; 773 Lisp_Object chain, elt;
775 NSAutoreleasePool *pool; 774 NSAutoreleasePool *pool;
776 BOOL setMini = YES; 775 BOOL setMini = YES;
@@ -797,7 +796,7 @@ ns_implicitly_set_icon_type (struct frame *f)
797 } 796 }
798 797
799 for (chain = Vns_icon_type_alist; 798 for (chain = Vns_icon_type_alist;
800 (image = nil) && CONSP (chain); 799 image == nil && CONSP (chain);
801 chain = XCDR (chain)) 800 chain = XCDR (chain))
802 { 801 {
803 elt = XCAR (chain); 802 elt = XCAR (chain);
@@ -1076,7 +1075,41 @@ unwind_create_frame (Lisp_Object frame)
1076 return Qnil; 1075 return Qnil;
1077} 1076}
1078 1077
1078/*
1079 * Read geometry related parameters from preferences if not in PARMS.
1080 * Returns the union of parms and any preferences read.
1081 */
1079 1082
1083static Lisp_Object
1084get_geometry_from_preferences (struct ns_display_info *dpyinfo,
1085 Lisp_Object parms)
1086{
1087 struct {
1088 const char *val;
1089 const char *cls;
1090 Lisp_Object tem;
1091 } r[] = {
1092 { "width", "Width", Qwidth },
1093 { "height", "Height", Qheight },
1094 { "left", "Left", Qleft },
1095 { "top", "Top", Qtop },
1096 };
1097
1098 int i;
1099 for (i = 0; i < sizeof (r)/sizeof (r[0]); ++i)
1100 {
1101 if (NILP (Fassq (r[i].tem, parms)))
1102 {
1103 Lisp_Object value
1104 = x_get_arg (dpyinfo, parms, r[i].tem, r[i].val, r[i].cls,
1105 RES_TYPE_NUMBER);
1106 if (! EQ (value, Qunbound))
1107 parms = Fcons (Fcons (r[i].tem, value), parms);
1108 }
1109 }
1110
1111 return parms;
1112}
1080 1113
1081/* ========================================================================== 1114/* ==========================================================================
1082 1115
@@ -1285,6 +1318,7 @@ This function is an internal primitive--use `make-frame' instead. */)
1285 x_default_parameter (f, parms, Qtitle, Qnil, "title", "Title", 1318 x_default_parameter (f, parms, Qtitle, Qnil, "title", "Title",
1286 RES_TYPE_STRING); 1319 RES_TYPE_STRING);
1287 1320
1321 parms = get_geometry_from_preferences (dpyinfo, parms);
1288 window_prompting = x_figure_window_size (f, parms, 1); 1322 window_prompting = x_figure_window_size (f, parms, 1);
1289 1323
1290 tem = x_get_arg (dpyinfo, parms, Qunsplittable, 0, 0, RES_TYPE_BOOLEAN); 1324 tem = x_get_arg (dpyinfo, parms, Qunsplittable, 0, 0, RES_TYPE_BOOLEAN);
@@ -1511,6 +1545,17 @@ Optional arg INIT, if non-nil, provides a default file name to use. */)
1511 return ret ? fname : Qnil; 1545 return ret ? fname : Qnil;
1512} 1546}
1513 1547
1548const char *
1549ns_get_defaults_value (const char *key)
1550{
1551 NSObject *obj = [[NSUserDefaults standardUserDefaults]
1552 objectForKey: [NSString stringWithUTF8String: key]];
1553
1554 if (!obj) return NULL;
1555
1556 return [[NSString stringWithFormat: @"%@", obj] UTF8String];
1557}
1558
1514 1559
1515DEFUN ("ns-get-resource", Fns_get_resource, Sns_get_resource, 2, 2, 0, 1560DEFUN ("ns-get-resource", Fns_get_resource, Sns_get_resource, 2, 2, 0,
1516 doc: /* Return the value of the property NAME of OWNER from the defaults database. 1561 doc: /* Return the value of the property NAME of OWNER from the defaults database.
@@ -1525,9 +1570,7 @@ If OWNER is nil, Emacs is assumed. */)
1525 CHECK_STRING (name); 1570 CHECK_STRING (name);
1526/*fprintf (stderr, "ns-get-resource checking resource '%s'\n", SDATA (name)); */ 1571/*fprintf (stderr, "ns-get-resource checking resource '%s'\n", SDATA (name)); */
1527 1572
1528 value =[[[NSUserDefaults standardUserDefaults] 1573 value = ns_get_defaults_value (SDATA (name));
1529 objectForKey: [NSString stringWithUTF8String: SDATA (name)]]
1530 UTF8String];
1531 1574
1532 if (value) 1575 if (value)
1533 return build_string (value); 1576 return build_string (value);
@@ -2182,8 +2225,7 @@ x_get_string_resource (XrmDatabase rdb, char *name, char *class)
2182 /* --quick was passed, so this is a no-op. */ 2225 /* --quick was passed, so this is a no-op. */
2183 return NULL; 2226 return NULL;
2184 2227
2185 res = [[[NSUserDefaults standardUserDefaults] objectForKey: 2228 res = ns_get_defaults_value (toCheck);
2186 [NSString stringWithUTF8String: toCheck]] UTF8String];
2187 return !res ? NULL : 2229 return !res ? NULL :
2188 (!strncasecmp (res, "YES", 3) ? "true" : 2230 (!strncasecmp (res, "YES", 3) ? "true" :
2189 (!strncasecmp (res, "NO", 2) ? "false" : res)); 2231 (!strncasecmp (res, "NO", 2) ? "false" : res));
diff --git a/src/nsfont.m b/src/nsfont.m
index 7d691ced6e1..eb57f5e5953 100644
--- a/src/nsfont.m
+++ b/src/nsfont.m
@@ -126,8 +126,8 @@ ns_attribute_fvalue (NSFontDescriptor *fdesc, NSString *trait)
126/* Converts FONT_WEIGHT, FONT_SLANT, FONT_WIDTH, plus family and script/lang 126/* Converts FONT_WEIGHT, FONT_SLANT, FONT_WIDTH, plus family and script/lang
127 to NSFont descriptor. Information under extra only needed for matching. */ 127 to NSFont descriptor. Information under extra only needed for matching. */
128#define STYLE_REF 100 128#define STYLE_REF 100
129static NSFontDescriptor 129static NSFontDescriptor *
130*ns_spec_to_descriptor(Lisp_Object font_spec) 130ns_spec_to_descriptor (Lisp_Object font_spec)
131{ 131{
132 NSFontDescriptor *fdesc; 132 NSFontDescriptor *fdesc;
133 NSMutableDictionary *fdAttrs = [NSMutableDictionary new]; 133 NSMutableDictionary *fdAttrs = [NSMutableDictionary new];
@@ -152,8 +152,13 @@ static NSFontDescriptor
152 [fdAttrs setObject: tdict forKey: NSFontTraitsAttribute]; 152 [fdAttrs setObject: tdict forKey: NSFontTraitsAttribute];
153 153
154 fdesc = [NSFontDescriptor fontDescriptorWithFontAttributes: fdAttrs]; 154 fdesc = [NSFontDescriptor fontDescriptorWithFontAttributes: fdAttrs];
155 if (family != nil) 155 if (family != nil)
156 {
156 fdesc = [fdesc fontDescriptorWithFamily: family]; 157 fdesc = [fdesc fontDescriptorWithFamily: family];
158 }
159
160 [fdAttrs release];
161 [tdict release];
157 return fdesc; 162 return fdesc;
158} 163}
159 164
@@ -469,6 +474,7 @@ static NSSet
469 if ([families count] > 0 || pct < 0.05) 474 if ([families count] > 0 || pct < 0.05)
470 break; 475 break;
471 } 476 }
477 [charset release];
472 } 478 }
473#ifdef NS_IMPL_COCOA 479#ifdef NS_IMPL_COCOA
474 if ([families count] == 0) 480 if ([families count] == 0)
@@ -536,12 +542,14 @@ ns_findfonts (Lisp_Object font_spec, BOOL isMatch)
536 family = [fdesc objectForKey: NSFontFamilyAttribute]; 542 family = [fdesc objectForKey: NSFontFamilyAttribute];
537 if (family != nil && !foundItal && XINT (Flength (list)) > 0) 543 if (family != nil && !foundItal && XINT (Flength (list)) > 0)
538 { 544 {
539 NSFontDescriptor *sDesc = [[[NSFontDescriptor new] 545 NSFontDescriptor *s1 = [NSFontDescriptor new];
540 fontDescriptorWithSymbolicTraits: NSFontItalicTrait] 546 NSFontDescriptor *sDesc
541 fontDescriptorWithFamily: family]; 547 = [[s1 fontDescriptorWithSymbolicTraits: NSFontItalicTrait]
548 fontDescriptorWithFamily: family];
542 list = Fcons (ns_descriptor_to_entity (sDesc, 549 list = Fcons (ns_descriptor_to_entity (sDesc,
543 AREF (font_spec, FONT_EXTRA_INDEX), 550 AREF (font_spec, FONT_EXTRA_INDEX),
544 "synthItal"), list); 551 "synthItal"), list);
552 [s1 release];
545 } 553 }
546 554
547 /* Return something if was a match and nothing found. */ 555 /* Return something if was a match and nothing found. */
@@ -630,7 +638,7 @@ nsfont_list (Lisp_Object frame, Lisp_Object font_spec)
630} 638}
631 639
632 640
633/* Return a font entity most closely maching with FONT_SPEC on 641/* Return a font entity most closely matching with FONT_SPEC on
634 FRAME. The closeness is determined by the font backend, thus 642 FRAME. The closeness is determined by the font backend, thus
635 `face-font-selection-order' is ignored here. 643 `face-font-selection-order' is ignored here.
636 Properties to be considered are same as for list(). */ 644 Properties to be considered are same as for list(). */
@@ -1293,7 +1301,7 @@ ns_uni_to_glyphs (struct nsfont_info *font_info, unsigned char block)
1293 abort (); 1301 abort ();
1294 1302
1295 /* create a string containing all Unicode characters in this block */ 1303 /* create a string containing all Unicode characters in this block */
1296 for (idx = block<<8, i =0; i<0x100; idx++, i++) 1304 for (idx = block<<8, i = 0; i < 0x100; idx++, i++)
1297 if (idx < 0xD800 || idx > 0xDFFF) 1305 if (idx < 0xD800 || idx > 0xDFFF)
1298 unichars[i] = idx; 1306 unichars[i] = idx;
1299 else 1307 else
@@ -1309,7 +1317,7 @@ ns_uni_to_glyphs (struct nsfont_info *font_info, unsigned char block)
1309 NSGlyphGenerator *glyphGenerator = [NSGlyphGenerator sharedGlyphGenerator]; 1317 NSGlyphGenerator *glyphGenerator = [NSGlyphGenerator sharedGlyphGenerator];
1310 /*NSCharacterSet *coveredChars = [nsfont coveredCharacterSet]; */ 1318 /*NSCharacterSet *coveredChars = [nsfont coveredCharacterSet]; */
1311 unsigned int numGlyphs = [font_info->nsfont numberOfGlyphs]; 1319 unsigned int numGlyphs = [font_info->nsfont numberOfGlyphs];
1312 NSUInteger gInd =0, cInd =0; 1320 NSUInteger gInd = 0, cInd = 0;
1313 1321
1314 [glyphStorage setString: allChars font: font_info->nsfont]; 1322 [glyphStorage setString: allChars font: font_info->nsfont];
1315 [glyphGenerator generateGlyphsForGlyphStorage: glyphStorage 1323 [glyphGenerator generateGlyphsForGlyphStorage: glyphStorage
@@ -1317,7 +1325,7 @@ ns_uni_to_glyphs (struct nsfont_info *font_info, unsigned char block)
1317 glyphIndex: &gInd characterIndex: &cInd]; 1325 glyphIndex: &gInd characterIndex: &cInd];
1318#endif 1326#endif
1319 glyphs = font_info->glyphs[block]; 1327 glyphs = font_info->glyphs[block];
1320 for (i =0; i<0x100; i++, glyphs++) 1328 for (i = 0; i < 0x100; i++, glyphs++)
1321 { 1329 {
1322#ifdef NS_IMPL_GNUSTEP 1330#ifdef NS_IMPL_GNUSTEP
1323 g = unichars[i]; 1331 g = unichars[i];
@@ -1425,6 +1433,8 @@ ns_glyph_metrics (struct nsfont_info *font_info, unsigned char block)
1425- (void) setString: (NSString *)str font: (NSFont *)font 1433- (void) setString: (NSString *)str font: (NSFont *)font
1426{ 1434{
1427 [dict setObject: font forKey: NSFontAttributeName]; 1435 [dict setObject: font forKey: NSFontAttributeName];
1436 if (attrStr != nil)
1437 [attrStr release];
1428 attrStr = [[NSAttributedString alloc] initWithString: str attributes: dict]; 1438 attrStr = [[NSAttributedString alloc] initWithString: str attributes: dict];
1429 maxChar = [str length]; 1439 maxChar = [str length];
1430 maxGlyph = 0; 1440 maxGlyph = 0;
diff --git a/src/nsmenu.m b/src/nsmenu.m
index 951282910ac..94c6b6a6198 100644
--- a/src/nsmenu.m
+++ b/src/nsmenu.m
@@ -74,6 +74,10 @@ EmacsMenu *mainMenu, *svcsMenu, *dockMenu;
74static int popup_activated_flag; 74static int popup_activated_flag;
75static NSModalSession popupSession; 75static NSModalSession popupSession;
76 76
77/* Nonzero means we are tracking and updating menus. */
78static int trackingMenu;
79
80
77/* NOTE: toolbar implementation is at end, 81/* NOTE: toolbar implementation is at end,
78 following complete menu implementation. */ 82 following complete menu implementation. */
79 83
@@ -400,6 +404,7 @@ ns_update_menubar (struct frame *f, int deep_p, EmacsMenu *submenu)
400 items = FRAME_MENU_BAR_ITEMS (f); 404 items = FRAME_MENU_BAR_ITEMS (f);
401 if (NILP (items)) 405 if (NILP (items))
402 { 406 {
407 free_menubar_widget_value_tree (first_wv);
403 [pool release]; 408 [pool release];
404 UNBLOCK_INPUT; 409 UNBLOCK_INPUT;
405 return; 410 return;
@@ -427,6 +432,7 @@ ns_update_menubar (struct frame *f, int deep_p, EmacsMenu *submenu)
427 432
428 if (i == n) 433 if (i == n)
429 { 434 {
435 free_menubar_widget_value_tree (first_wv);
430 [pool release]; 436 [pool release];
431 UNBLOCK_INPUT; 437 UNBLOCK_INPUT;
432 return; 438 return;
@@ -543,21 +549,44 @@ set_frame_menubar (struct frame *f, int first_time, int deep_p)
543 frame = f; 549 frame = f;
544} 550}
545 551
552#ifdef NS_IMPL_COCOA
553#if MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_5
554extern NSString *NSMenuDidBeginTrackingNotification;
555#endif
556#endif
557
558#ifdef NS_IMPL_COCOA
559-(void)trackingNotification:(NSNotification *)notification
560{
561 /* Update menu in menuNeedsUpdate only while tracking menus. */
562 trackingMenu = ([notification name] == NSMenuDidBeginTrackingNotification
563 ? 1 : 0);
564}
565#endif
546 566
547/* delegate method called when a submenu is being opened: run a 'deep' call 567/* delegate method called when a submenu is being opened: run a 'deep' call
548 to set_frame_menubar */ 568 to set_frame_menubar */
549- (void)menuNeedsUpdate: (NSMenu *)menu 569- (void)menuNeedsUpdate: (NSMenu *)menu
550{ 570{
551 NSEvent *event;
552 if (!FRAME_LIVE_P (frame)) 571 if (!FRAME_LIVE_P (frame))
553 return; 572 return;
554 event = [[FRAME_NS_VIEW (frame) window] currentEvent]; 573
555 /* HACK: Cocoa/Carbon will request update on every keystroke 574 /* Cocoa/Carbon will request update on every keystroke
556 via IsMenuKeyEvent -> CheckMenusForKeyEvent. These are not needed 575 via IsMenuKeyEvent -> CheckMenusForKeyEvent. These are not needed
557 since key equivalents are handled through emacs. 576 since key equivalents are handled through emacs.
558 On Leopard, even keystroke events generate SystemDefined events, but 577 On Leopard, even keystroke events generate SystemDefined event.
559 their subtype is 8. */ 578 Third-party applications that enhance mouse / trackpad
560 if ([event type] != NSSystemDefined || [event subtype] == 8 579 interaction, or also VNC/Remote Desktop will send events
580 of type AppDefined rather than SysDefined.
581 Menus will fail to show up if they haven't been initialized.
582 AppDefined events may lack timing data.
583
584 Thus, we rely on the didBeginTrackingNotification notification
585 as above to indicate the need for updates.
586 From 10.6 on, we could also use -[NSMenu propertiesToUpdate]: In the
587 key press case, NSMenuPropertyItemImage (e.g.) won't be set.
588 */
589 if (trackingMenu == 0
561 /* Also, don't try this if from an event picked up asynchronously, 590 /* Also, don't try this if from an event picked up asynchronously,
562 as lots of lisp evaluation happens in ns_update_menubar. */ 591 as lots of lisp evaluation happens in ns_update_menubar. */
563 || handling_signal != 0) 592 || handling_signal != 0)
@@ -1795,6 +1824,11 @@ DEFUN ("menu-or-popup-active-p", Fmenu_or_popup_active_p, Smenu_or_popup_active_
1795void 1824void
1796syms_of_nsmenu (void) 1825syms_of_nsmenu (void)
1797{ 1826{
1827#ifndef NS_IMPL_COCOA
1828 /* Don't know how to keep track of this in Next/Open/Gnustep. Always
1829 update menus there. */
1830 trackingMenu = 1;
1831#endif
1798 defsubr (&Sx_popup_dialog); 1832 defsubr (&Sx_popup_dialog);
1799 defsubr (&Sns_reset_menu); 1833 defsubr (&Sns_reset_menu);
1800 defsubr (&Smenu_or_popup_active_p); 1834 defsubr (&Smenu_or_popup_active_p);
diff --git a/src/nsselect.m b/src/nsselect.m
index 867cf3252e5..928eb8652dc 100644
--- a/src/nsselect.m
+++ b/src/nsselect.m
@@ -35,8 +35,6 @@ GNUstep port and post-20 update by Adrian Robert (arobert@cogsci.ucsd.edu)
35#include "termhooks.h" 35#include "termhooks.h"
36#include "keyboard.h" 36#include "keyboard.h"
37 37
38#define CUT_BUFFER_SUPPORT
39
40Lisp_Object QCLIPBOARD, QSECONDARY, QTEXT, QFILE_NAME; 38Lisp_Object QCLIPBOARD, QSECONDARY, QTEXT, QFILE_NAME;
41 39
42static Lisp_Object Vselection_alist; 40static Lisp_Object Vselection_alist;
@@ -60,13 +58,18 @@ static NSString *
60symbol_to_nsstring (Lisp_Object sym) 58symbol_to_nsstring (Lisp_Object sym)
61{ 59{
62 CHECK_SYMBOL (sym); 60 CHECK_SYMBOL (sym);
63 if (EQ (sym, QCLIPBOARD)) return NSGeneralPboard; 61 if (EQ (sym, QCLIPBOARD)) return NSGeneralPboard;
64 if (EQ (sym, QPRIMARY)) return NXPrimaryPboard; 62 if (EQ (sym, QPRIMARY)) return NXPrimaryPboard;
65 if (EQ (sym, QSECONDARY)) return NXSecondaryPboard; 63 if (EQ (sym, QSECONDARY)) return NXSecondaryPboard;
66 if (EQ (sym, QTEXT)) return NSStringPboardType; 64 if (EQ (sym, QTEXT)) return NSStringPboardType;
67 return [NSString stringWithUTF8String: SDATA (XSYMBOL (sym)->xname)]; 65 return [NSString stringWithUTF8String: SDATA (XSYMBOL (sym)->xname)];
68} 66}
69 67
68static NSPasteboard *
69ns_symbol_to_pb (Lisp_Object symbol)
70{
71 return [NSPasteboard pasteboardWithName: symbol_to_nsstring (symbol)];
72}
70 73
71static Lisp_Object 74static Lisp_Object
72ns_string_to_symbol (NSString *t) 75ns_string_to_symbol (NSString *t)
@@ -230,70 +233,11 @@ static Lisp_Object
230ns_get_foreign_selection (Lisp_Object symbol, Lisp_Object target) 233ns_get_foreign_selection (Lisp_Object symbol, Lisp_Object target)
231{ 234{
232 id pb; 235 id pb;
233 pb =[NSPasteboard pasteboardWithName: symbol_to_nsstring (symbol)]; 236 pb = ns_symbol_to_pb (symbol);
234 return ns_string_from_pasteboard (pb); 237 return pb != nil ? ns_string_from_pasteboard (pb) : Qnil;
235}
236
237
238static void
239ns_handle_selection_request (struct input_event *event)
240{
241 // FIXME: BIG UGLY HACK!!!
242 id pb = (id)*(EMACS_INT*)&(event->x);
243 NSString *type = (NSString *)*(EMACS_INT*)&(event->y);
244 Lisp_Object selection_name, selection_data, target_symbol, data;
245 Lisp_Object successful_p, rest;
246
247 selection_name = ns_string_to_symbol ([(NSPasteboard *)pb name]);
248 target_symbol = ns_string_to_symbol (type);
249 selection_data = assq_no_quit (selection_name, Vselection_alist);
250 successful_p = Qnil;
251
252 if (!NILP (selection_data))
253 {
254 data = ns_get_local_selection (selection_name, target_symbol);
255 if (!NILP (data))
256 {
257 if (STRINGP (data))
258 ns_string_to_pasteboard_internal (pb, data, type);
259 successful_p = Qt;
260 }
261 }
262
263 if (!EQ (Vns_sent_selection_hooks, Qunbound))
264 {
265 for (rest = Vns_sent_selection_hooks; CONSP (rest); rest = Fcdr (rest))
266 call3 (Fcar (rest), selection_name, target_symbol, successful_p);
267 }
268} 238}
269 239
270 240
271static void
272ns_handle_selection_clear (struct input_event *event)
273{
274 id pb = (id)*(EMACS_INT*)&(event->x);
275 Lisp_Object selection_name, selection_data, rest;
276
277 selection_name = ns_string_to_symbol ([(NSPasteboard *)pb name]);
278 selection_data = assq_no_quit (selection_name, Vselection_alist);
279 if (NILP (selection_data)) return;
280
281 if (EQ (selection_data, Fcar (Vselection_alist)))
282 Vselection_alist = Fcdr (Vselection_alist);
283 else
284 {
285 for (rest = Vselection_alist; !NILP (rest); rest = Fcdr (rest))
286 if (EQ (selection_data, Fcar (Fcdr (rest))))
287 Fsetcdr (rest, Fcdr (Fcdr (rest)));
288 }
289
290 if (!EQ (Vns_lost_selection_hooks, Qunbound))
291 {
292 for (rest = Vns_lost_selection_hooks;CONSP (rest); rest = Fcdr (rest))
293 call1 (Fcar (rest), selection_name);
294 }
295}
296
297 241
298 242
299/* ========================================================================== 243/* ==========================================================================
@@ -401,29 +345,44 @@ anything that the functions on `selection-converter-alist' know about. */)
401{ 345{
402 id pb; 346 id pb;
403 Lisp_Object old_value, new_value; 347 Lisp_Object old_value, new_value;
348 NSString *type;
349 Lisp_Object successful_p = Qnil, rest;
350 Lisp_Object target_symbol, data;
351
404 352
405 check_ns (); 353 check_ns ();
406 CHECK_SYMBOL (selection_name); 354 CHECK_SYMBOL (selection_name);
407 if (NILP (selection_value)) 355 if (NILP (selection_value))
408 error ("selection-value may not be nil."); 356 error ("selection-value may not be nil.");
409 pb =[NSPasteboard pasteboardWithName: symbol_to_nsstring (selection_name)]; 357 pb = ns_symbol_to_pb (selection_name);
358 if (pb == nil) return Qnil;
359
410 ns_declare_pasteboard (pb); 360 ns_declare_pasteboard (pb);
411 old_value = assq_no_quit (selection_name, Vselection_alist); 361 old_value = assq_no_quit (selection_name, Vselection_alist);
412 new_value = Fcons (selection_name, Fcons (selection_value, Qnil)); 362 new_value = Fcons (selection_name, Fcons (selection_value, Qnil));
363
413 if (NILP (old_value)) 364 if (NILP (old_value))
414 Vselection_alist = Fcons (new_value, Vselection_alist); 365 Vselection_alist = Fcons (new_value, Vselection_alist);
415 else 366 else
416 Fsetcdr (old_value, Fcdr (new_value)); 367 Fsetcdr (old_value, Fcdr (new_value));
417 /* XXX An evil hack, but a necessary one I fear XXX */ 368
418 { 369 /* We only support copy of text. */
419 struct input_event ev; 370 type = NSStringPboardType;
420 ev.kind = SELECTION_REQUEST_EVENT; 371 target_symbol = ns_string_to_symbol (type);
421 ev.modifiers = 0; 372 data = ns_get_local_selection (selection_name, target_symbol);
422 ev.code = 0; 373 if (!NILP (data))
423 *(EMACS_INT*)(&(ev.x)) = (EMACS_INT)pb; // FIXME: BIG UGLY HACK!! 374 {
424 *(EMACS_INT*)(&(ev.y)) = (EMACS_INT)NSStringPboardType; 375 if (STRINGP (data))
425 ns_handle_selection_request (&ev); 376 ns_string_to_pasteboard_internal (pb, data, type);
426 } 377 successful_p = Qt;
378 }
379
380 if (!EQ (Vns_sent_selection_hooks, Qunbound))
381 {
382 for (rest = Vns_sent_selection_hooks; CONSP (rest); rest = Fcdr (rest))
383 call3 (Fcar (rest), selection_name, target_symbol, successful_p);
384 }
385
427 return selection_value; 386 return selection_value;
428} 387}
429 388
@@ -438,8 +397,8 @@ DEFUN ("x-disown-selection-internal", Fx_disown_selection_internal,
438 CHECK_SYMBOL (selection_name); 397 CHECK_SYMBOL (selection_name);
439 if (NILP (assq_no_quit (selection_name, Vselection_alist))) return Qnil; 398 if (NILP (assq_no_quit (selection_name, Vselection_alist))) return Qnil;
440 399
441 pb =[NSPasteboard pasteboardWithName: symbol_to_nsstring (selection_name)]; 400 pb = ns_symbol_to_pb (selection_name);
442 ns_undeclare_pasteboard (pb); 401 if (pb != nil) ns_undeclare_pasteboard (pb);
443 return Qt; 402 return Qt;
444} 403}
445 404
@@ -460,8 +419,10 @@ and t is the same as `SECONDARY'.) */)
460 CHECK_SYMBOL (selection); 419 CHECK_SYMBOL (selection);
461 if (EQ (selection, Qnil)) selection = QPRIMARY; 420 if (EQ (selection, Qnil)) selection = QPRIMARY;
462 if (EQ (selection, Qt)) selection = QSECONDARY; 421 if (EQ (selection, Qt)) selection = QSECONDARY;
463 pb =[NSPasteboard pasteboardWithName: symbol_to_nsstring (selection)]; 422 pb = ns_symbol_to_pb (selection);
464 types =[pb types]; 423 if (pb == nil) return Qnil;
424
425 types = [pb types];
465 return ([types count] == 0) ? Qnil : Qt; 426 return ([types count] == 0) ? Qnil : Qt;
466} 427}
467 428
@@ -511,45 +472,31 @@ TYPE is the type of data desired, typically `STRING'. */)
511} 472}
512 473
513 474
514#ifdef CUT_BUFFER_SUPPORT 475DEFUN ("ns-get-selection-internal", Fns_get_selection_internal,
515DEFUN ("ns-get-cut-buffer-internal", Fns_get_cut_buffer_internal, 476 Sns_get_selection_internal, 1, 1, 0,
516 Sns_get_cut_buffer_internal, 1, 1, 0, 477 doc: /* Returns the value of SELECTION as a string.
517 doc: /* Returns the value of the named cut buffer. */) 478SELECTION is a symbol, typically `PRIMARY', `SECONDARY', or `CLIPBOARD'. */)
518 (Lisp_Object buffer) 479 (Lisp_Object selection)
519{ 480{
520 id pb; 481 id pb;
521 check_ns (); 482 check_ns ();
522 pb =[NSPasteboard pasteboardWithName: symbol_to_nsstring (buffer)]; 483 pb = ns_symbol_to_pb (selection);
523 return ns_string_from_pasteboard (pb); 484 return pb != nil ? ns_string_from_pasteboard (pb) : Qnil;
524} 485}
525 486
526 487
527DEFUN ("ns-rotate-cut-buffers-internal", Fns_rotate_cut_buffers_internal, 488DEFUN ("ns-store-selection-internal", Fns_store_selection_internal,
528 Sns_rotate_cut_buffers_internal, 1, 1, 0, 489 Sns_store_selection_internal, 2, 2, 0,
529 doc: /* Rotate the values of the cut buffers by N steps. 490 doc: /* Sets the string value of SELECTION.
530Positive N means move values forward, negative means 491SELECTION is a symbol, typically `PRIMARY', `SECONDARY', or `CLIPBOARD'. */)
531backward. CURRENTLY NOT IMPLEMENTED UNDER NEXTSTEP. */ ) 492 (Lisp_Object selection, Lisp_Object string)
532 (Lisp_Object n)
533{
534 /* XXX This function is unimplemented under NeXTstep XXX */
535 Fsignal (Qquit, Fcons (build_string (
536 "Warning: ns-rotate-cut-buffers-internal not implemented\n"), Qnil));
537 return Qnil;
538}
539
540
541DEFUN ("ns-store-cut-buffer-internal", Fns_store_cut_buffer_internal,
542 Sns_store_cut_buffer_internal, 2, 2, 0,
543 doc: /* Sets the value of the named cut buffer (typically CUT_BUFFER0). */)
544 (Lisp_Object buffer, Lisp_Object string)
545{ 493{
546 id pb; 494 id pb;
547 check_ns (); 495 check_ns ();
548 pb =[NSPasteboard pasteboardWithName: symbol_to_nsstring (buffer)]; 496 pb = ns_symbol_to_pb (selection);
549 ns_string_to_pasteboard (pb, string); 497 if (pb != nil) ns_string_to_pasteboard (pb, string);
550 return Qnil; 498 return Qnil;
551} 499}
552#endif
553 500
554 501
555void 502void
@@ -572,11 +519,8 @@ syms_of_nsselect (void)
572 defsubr (&Sx_own_selection_internal); 519 defsubr (&Sx_own_selection_internal);
573 defsubr (&Sx_selection_exists_p); 520 defsubr (&Sx_selection_exists_p);
574 defsubr (&Sx_selection_owner_p); 521 defsubr (&Sx_selection_owner_p);
575#ifdef CUT_BUFFER_SUPPORT 522 defsubr (&Sns_get_selection_internal);
576 defsubr (&Sns_get_cut_buffer_internal); 523 defsubr (&Sns_store_selection_internal);
577 defsubr (&Sns_rotate_cut_buffers_internal);
578 defsubr (&Sns_store_cut_buffer_internal);
579#endif
580 524
581 Vselection_alist = Qnil; 525 Vselection_alist = Qnil;
582 staticpro (&Vselection_alist); 526 staticpro (&Vselection_alist);
diff --git a/src/nsterm.h b/src/nsterm.h
index 52246caac84..14918cca90d 100644
--- a/src/nsterm.h
+++ b/src/nsterm.h
@@ -760,6 +760,7 @@ extern void ns_release_object (void *obj);
760extern void ns_retain_object (void *obj); 760extern void ns_retain_object (void *obj);
761extern void *ns_alloc_autorelease_pool (); 761extern void *ns_alloc_autorelease_pool ();
762extern void ns_release_autorelease_pool (); 762extern void ns_release_autorelease_pool ();
763extern const char *ns_get_defaults_value ();
763 764
764/* in nsmenu */ 765/* in nsmenu */
765extern void update_frame_tool_bar (FRAME_PTR f); 766extern void update_frame_tool_bar (FRAME_PTR f);
@@ -794,6 +795,7 @@ extern void x_set_tool_bar_lines (struct frame *f,
794 Lisp_Object oldval); 795 Lisp_Object oldval);
795extern void x_activate_menubar (struct frame *); 796extern void x_activate_menubar (struct frame *);
796extern void free_frame_menubar (struct frame *); 797extern void free_frame_menubar (struct frame *);
798extern void x_free_frame_resources (struct frame *);
797 799
798#define NSAPP_DATA2_RUNASSCRIPT 10 800#define NSAPP_DATA2_RUNASSCRIPT 10
799extern void ns_run_ascript (void); 801extern void ns_run_ascript (void);
diff --git a/src/nsterm.m b/src/nsterm.m
index 5e19a397c34..f8e69f98942 100644
--- a/src/nsterm.m
+++ b/src/nsterm.m
@@ -1158,6 +1158,9 @@ x_free_frame_resources (struct frame *f)
1158 1158
1159 xfree (f->output_data.ns); 1159 xfree (f->output_data.ns);
1160 1160
1161 if (f->output_data.ns->miniimage != nil)
1162 [f->output_data.ns->miniimage release];
1163
1161 [[view window] close]; 1164 [[view window] close];
1162 [view release]; 1165 [view release];
1163 1166
@@ -1351,7 +1354,7 @@ ns_index_color (NSColor *color, struct frame *f)
1351{ 1354{
1352 struct ns_color_table *color_table = FRAME_NS_DISPLAY_INFO (f)->color_table; 1355 struct ns_color_table *color_table = FRAME_NS_DISPLAY_INFO (f)->color_table;
1353 ptrdiff_t idx; 1356 ptrdiff_t idx;
1354 NSNumber *index; 1357 ptrdiff_t i;
1355 1358
1356 if (!color_table->colors) 1359 if (!color_table->colors)
1357 { 1360 {
@@ -1364,21 +1367,13 @@ ns_index_color (NSColor *color, struct frame *f)
1364 } 1367 }
1365 1368
1366 /* do we already have this color ? */ 1369 /* do we already have this color ? */
1367 { 1370 for (i = 1; i < color_table->avail; i++)
1368 ptrdiff_t i; 1371 if (color_table->colors[i] && [color_table->colors[i] isEqual: color])
1369 for (i = 1; i < color_table->avail; i++) 1372 return i;
1370 {
1371 if (color_table->colors[i] && [color_table->colors[i] isEqual: color])
1372 {
1373 [color_table->colors[i] retain];
1374 return i;
1375 }
1376 }
1377 }
1378 1373
1379 if ([color_table->empty_indices count] > 0) 1374 if ([color_table->empty_indices count] > 0)
1380 { 1375 {
1381 index = [color_table->empty_indices anyObject]; 1376 NSNumber *index = [color_table->empty_indices anyObject];
1382 [color_table->empty_indices removeObject: index]; 1377 [color_table->empty_indices removeObject: index];
1383 idx = [index unsignedLongValue]; 1378 idx = [index unsignedLongValue];
1384 } 1379 }
@@ -1411,20 +1406,20 @@ ns_free_indexed_color (unsigned long idx, struct frame *f)
1411 color_table = FRAME_NS_DISPLAY_INFO (f)->color_table; 1406 color_table = FRAME_NS_DISPLAY_INFO (f)->color_table;
1412 1407
1413 if (idx <= 0 || idx >= color_table->size) { 1408 if (idx <= 0 || idx >= color_table->size) {
1414 message1("ns_free_indexed_color: Color index out of range.\n"); 1409 message1 ("ns_free_indexed_color: Color index out of range.\n");
1415 return; 1410 return;
1416 } 1411 }
1417 1412
1418 index = [NSNumber numberWithUnsignedInt: idx]; 1413 index = [NSNumber numberWithUnsignedInt: idx];
1419 if ([color_table->empty_indices containsObject: index]) { 1414 if ([color_table->empty_indices containsObject: index]) {
1420 message1("ns_free_indexed_color: attempt to free already freed color.\n"); 1415 message1 ("ns_free_indexed_color: attempt to free already freed color.\n");
1421 return; 1416 return;
1422 } 1417 }
1423 1418
1424 color = color_table->colors[idx]; 1419 color = color_table->colors[idx];
1425 [color release]; 1420 [color release];
1426 color_table->colors[idx] = nil; 1421 color_table->colors[idx] = nil;
1427 [color_table->empty_indices addObject: [NSNumber numberWithUnsignedInt: idx]]; 1422 [color_table->empty_indices addObject: index];
1428/*fprintf(stderr, "color_table: FREED %d\n",idx);*/ 1423/*fprintf(stderr, "color_table: FREED %d\n",idx);*/
1429} 1424}
1430 1425
@@ -2108,7 +2103,7 @@ ns_scroll_run (struct window *w, struct run *run)
2108 } 2103 }
2109 else 2104 else
2110 { 2105 {
2111 /* Scolling down. Make sure we don't copy over the mode line. 2106 /* Scrolling down. Make sure we don't copy over the mode line.
2112 at the bottom. */ 2107 at the bottom. */
2113 if (to_y + run->height > bottom_y) 2108 if (to_y + run->height > bottom_y)
2114 height = bottom_y - to_y; 2109 height = bottom_y - to_y;
@@ -3824,11 +3819,9 @@ ns_default (const char *parameter, Lisp_Object *result,
3824 Check a parameter value in user's preferences 3819 Check a parameter value in user's preferences
3825 -------------------------------------------------------------------------- */ 3820 -------------------------------------------------------------------------- */
3826{ 3821{
3827 const char *value; 3822 const char *value = ns_get_defaults_value (parameter);
3828 3823
3829 if ( (value =[[[NSUserDefaults standardUserDefaults] 3824 if (value)
3830 stringForKey: [NSString stringWithUTF8String: parameter]]
3831 UTF8String]) )
3832 { 3825 {
3833 double f; 3826 double f;
3834 char *pos; 3827 char *pos;
@@ -4205,6 +4198,15 @@ ns_term_init (Lisp_Object display_name)
4205 [NSApp setServicesMenu: svcsMenu]; 4198 [NSApp setServicesMenu: svcsMenu];
4206 /* Needed at least on Cocoa, to get dock menu to show windows */ 4199 /* Needed at least on Cocoa, to get dock menu to show windows */
4207 [NSApp setWindowsMenu: [[NSMenu alloc] init]]; 4200 [NSApp setWindowsMenu: [[NSMenu alloc] init]];
4201
4202 [[NSNotificationCenter defaultCenter]
4203 addObserver: mainMenu
4204 selector: @selector (trackingNotification:)
4205 name: NSMenuDidBeginTrackingNotification object: mainMenu];
4206 [[NSNotificationCenter defaultCenter]
4207 addObserver: mainMenu
4208 selector: @selector (trackingNotification:)
4209 name: NSMenuDidEndTrackingNotification object: mainMenu];
4208 } 4210 }
4209#endif /* MAC OS X menu setup */ 4211#endif /* MAC OS X menu setup */
4210 4212
diff --git a/src/print.c b/src/print.c
index 0fdb750f370..dbe8a8950f7 100644
--- a/src/print.c
+++ b/src/print.c
@@ -622,7 +622,7 @@ A printed representation of an object is text which describes that object. */)
622 printcharfun = Vprin1_to_string_buffer; 622 printcharfun = Vprin1_to_string_buffer;
623 PRINTPREPARE; 623 PRINTPREPARE;
624 print (object, printcharfun, NILP (noescape)); 624 print (object, printcharfun, NILP (noescape));
625 /* Make Vprin1_to_string_buffer be the default buffer after PRINTFINSH */ 625 /* Make Vprin1_to_string_buffer be the default buffer after PRINTFINISH */
626 PRINTFINISH; 626 PRINTFINISH;
627 } 627 }
628 628
diff --git a/src/process.c b/src/process.c
index 05c4be27550..4b0f90b58af 100644
--- a/src/process.c
+++ b/src/process.c
@@ -1521,8 +1521,9 @@ start_process_unwind (Lisp_Object proc)
1521 if (!PROCESSP (proc)) 1521 if (!PROCESSP (proc))
1522 abort (); 1522 abort ();
1523 1523
1524 /* Was PROC started successfully? */ 1524 /* Was PROC started successfully?
1525 if (XPROCESS (proc)->pid == -1) 1525 -2 is used for a pty with no process, eg for gdb. */
1526 if (XPROCESS (proc)->pid <= 0 && XPROCESS (proc)->pid != -2)
1526 remove_process (proc); 1527 remove_process (proc);
1527 1528
1528 return Qnil; 1529 return Qnil;
diff --git a/src/regex.c b/src/regex.c
index b7699378f5a..0ba05a95fdb 100644
--- a/src/regex.c
+++ b/src/regex.c
@@ -53,7 +53,7 @@
53 (HAVE_WCTYPE_H && HAVE_WCHAR_H && HAVE_BTOWC && !emacs) 53 (HAVE_WCTYPE_H && HAVE_WCHAR_H && HAVE_BTOWC && !emacs)
54#endif 54#endif
55 55
56/* For platform which support the ISO C amendement 1 functionality we 56/* For platform which support the ISO C amendment 1 functionality we
57 support user defined character classes. */ 57 support user defined character classes. */
58#if WIDE_CHAR_SUPPORT 58#if WIDE_CHAR_SUPPORT
59/* Solaris 2.5 has a bug: <wchar.h> must be included before <wctype.h>. */ 59/* Solaris 2.5 has a bug: <wchar.h> must be included before <wctype.h>. */
diff --git a/src/regex.h b/src/regex.h
index eba62f2e769..32ccfb7ddef 100644
--- a/src/regex.h
+++ b/src/regex.h
@@ -582,7 +582,7 @@ extern void regfree _RE_ARGS ((regex_t *__preg));
582} 582}
583#endif /* C++ */ 583#endif /* C++ */
584 584
585/* For platform which support the ISO C amendement 1 functionality we 585/* For platform which support the ISO C amendment 1 functionality we
586 support user defined character classes. */ 586 support user defined character classes. */
587#if WIDE_CHAR_SUPPORT 587#if WIDE_CHAR_SUPPORT
588/* Solaris 2.5 has a bug: <wchar.h> must be included before <wctype.h>. */ 588/* Solaris 2.5 has a bug: <wchar.h> must be included before <wctype.h>. */
@@ -592,7 +592,7 @@ extern void regfree _RE_ARGS ((regex_t *__preg));
592 592
593#if WIDE_CHAR_SUPPORT 593#if WIDE_CHAR_SUPPORT
594/* The GNU C library provides support for user-defined character classes 594/* The GNU C library provides support for user-defined character classes
595 and the functions from ISO C amendement 1. */ 595 and the functions from ISO C amendment 1. */
596# ifdef CHARCLASS_NAME_MAX 596# ifdef CHARCLASS_NAME_MAX
597# define CHAR_CLASS_MAX_LENGTH CHARCLASS_NAME_MAX 597# define CHAR_CLASS_MAX_LENGTH CHARCLASS_NAME_MAX
598# else 598# else
diff --git a/src/region-cache.c b/src/region-cache.c
index ed7a07a6709..054374eb688 100644
--- a/src/region-cache.c
+++ b/src/region-cache.c
@@ -699,7 +699,7 @@ know_region_cache (struct buffer *buf, struct region_cache *c,
699 699
700/* Return true if the text immediately after POS in BUF is known, for 700/* Return true if the text immediately after POS in BUF is known, for
701 the purposes of CACHE. If NEXT is non-zero, set *NEXT to the nearest 701 the purposes of CACHE. If NEXT is non-zero, set *NEXT to the nearest
702 position after POS where the knownness changes. */ 702 position after POS where the knowledge changes. */
703int 703int
704region_cache_forward (struct buffer *buf, struct region_cache *c, 704region_cache_forward (struct buffer *buf, struct region_cache *c,
705 ptrdiff_t pos, ptrdiff_t *next) 705 ptrdiff_t pos, ptrdiff_t *next)
@@ -736,7 +736,7 @@ region_cache_forward (struct buffer *buf, struct region_cache *c,
736 736
737/* Return true if the text immediately before POS in BUF is known, for 737/* Return true if the text immediately before POS in BUF is known, for
738 the purposes of CACHE. If NEXT is non-zero, set *NEXT to the nearest 738 the purposes of CACHE. If NEXT is non-zero, set *NEXT to the nearest
739 position before POS where the knownness changes. */ 739 position before POS where the knowledge changes. */
740int region_cache_backward (struct buffer *buf, struct region_cache *c, 740int region_cache_backward (struct buffer *buf, struct region_cache *c,
741 ptrdiff_t pos, ptrdiff_t *next) 741 ptrdiff_t pos, ptrdiff_t *next)
742{ 742{
diff --git a/src/region-cache.h b/src/region-cache.h
index 8e1be716776..6758f8bcd08 100644
--- a/src/region-cache.h
+++ b/src/region-cache.h
@@ -97,7 +97,7 @@ extern void invalidate_region_cache (struct buffer *BUF,
97 97
98/* Return true if the text immediately after POS in BUF is known, for 98/* Return true if the text immediately after POS in BUF is known, for
99 the purposes of CACHE. If NEXT is non-zero, set *NEXT to the nearest 99 the purposes of CACHE. If NEXT is non-zero, set *NEXT to the nearest
100 position after POS where the knownness changes. */ 100 position after POS where the knowledge changes. */
101extern int region_cache_forward (struct buffer *BUF, 101extern int region_cache_forward (struct buffer *BUF,
102 struct region_cache *CACHE, 102 struct region_cache *CACHE,
103 ptrdiff_t POS, 103 ptrdiff_t POS,
@@ -105,7 +105,7 @@ extern int region_cache_forward (struct buffer *BUF,
105 105
106/* Return true if the text immediately before POS in BUF is known, for 106/* Return true if the text immediately before POS in BUF is known, for
107 the purposes of CACHE. If NEXT is non-zero, set *NEXT to the nearest 107 the purposes of CACHE. If NEXT is non-zero, set *NEXT to the nearest
108 position before POS where the knownness changes. */ 108 position before POS where the knowledge changes. */
109extern int region_cache_backward (struct buffer *BUF, 109extern int region_cache_backward (struct buffer *BUF,
110 struct region_cache *CACHE, 110 struct region_cache *CACHE,
111 ptrdiff_t POS, 111 ptrdiff_t POS,
diff --git a/src/s/gnu-linux.h b/src/s/gnu-linux.h
index 3d78bf695bc..d89b14cc080 100644
--- a/src/s/gnu-linux.h
+++ b/src/s/gnu-linux.h
@@ -155,7 +155,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
155 extern void *__libc_ia64_register_backing_store_base; \ 155 extern void *__libc_ia64_register_backing_store_base; \
156 __builtin_ia64_flushrs (); \ 156 __builtin_ia64_flushrs (); \
157 mark_memory (__libc_ia64_register_backing_store_base, \ 157 mark_memory (__libc_ia64_register_backing_store_base, \
158 __builtin_ia64_bsp (), 0); \ 158 __builtin_ia64_bsp ()); \
159 } while (0) 159 } while (0)
160#endif 160#endif
161#endif 161#endif
diff --git a/src/sysdep.c b/src/sysdep.c
index ae200308bf3..b111fa1324c 100644
--- a/src/sysdep.c
+++ b/src/sysdep.c
@@ -433,7 +433,7 @@ child_setup_tty (int out)
433#endif /* AIX */ 433#endif /* AIX */
434 434
435 /* We originally enabled ICANON (and set VEOF to 04), and then had 435 /* We originally enabled ICANON (and set VEOF to 04), and then had
436 proces.c send additional EOF chars to flush the output when faced 436 process.c send additional EOF chars to flush the output when faced
437 with long lines, but this leads to weird effects when the 437 with long lines, but this leads to weird effects when the
438 subprocess has disabled ICANON and ends up seeing those spurious 438 subprocess has disabled ICANON and ends up seeing those spurious
439 extra EOFs. So we don't send EOFs any more in 439 extra EOFs. So we don't send EOFs any more in
diff --git a/src/termhooks.h b/src/termhooks.h
index a025e2798d9..03d336bf0c8 100644
--- a/src/termhooks.h
+++ b/src/termhooks.h
@@ -556,7 +556,7 @@ struct terminal
556 556
557 /* Arrange for all scroll bars on FRAME to be removed at the next call 557 /* Arrange for all scroll bars on FRAME to be removed at the next call
558 to `*judge_scroll_bars_hook'. A scroll bar may be spared if 558 to `*judge_scroll_bars_hook'. A scroll bar may be spared if
559 `*redeem_scroll_bar_hook' is applied to its window before the judgement. 559 `*redeem_scroll_bar_hook' is applied to its window before the judgment.
560 560
561 This should be applied to each frame each time its window tree is 561 This should be applied to each frame each time its window tree is
562 redisplayed, even if it is not displaying scroll bars at the moment; 562 redisplayed, even if it is not displaying scroll bars at the moment;
@@ -568,7 +568,7 @@ struct terminal
568 currently displaying them. */ 568 currently displaying them. */
569 void (*condemn_scroll_bars_hook) (struct frame *frame); 569 void (*condemn_scroll_bars_hook) (struct frame *frame);
570 570
571 /* Unmark WINDOW's scroll bar for deletion in this judgement cycle. 571 /* Unmark WINDOW's scroll bar for deletion in this judgment cycle.
572 Note that it's okay to redeem a scroll bar that is not condemned. */ 572 Note that it's okay to redeem a scroll bar that is not condemned. */
573 void (*redeem_scroll_bar_hook) (struct window *window); 573 void (*redeem_scroll_bar_hook) (struct window *window);
574 574
diff --git a/src/textprop.c b/src/textprop.c
index 29425f7a550..a1c7593f568 100644
--- a/src/textprop.c
+++ b/src/textprop.c
@@ -1625,7 +1625,7 @@ Return t if any property was actually removed, nil otherwise. */)
1625 1625
1626DEFUN ("text-property-any", Ftext_property_any, 1626DEFUN ("text-property-any", Ftext_property_any,
1627 Stext_property_any, 4, 5, 0, 1627 Stext_property_any, 4, 5, 0,
1628 doc: /* Check text from START to END for property PROPERTY equalling VALUE. 1628 doc: /* Check text from START to END for property PROPERTY equaling VALUE.
1629If so, return the position of the first character whose property PROPERTY 1629If so, return the position of the first character whose property PROPERTY
1630is `eq' to VALUE. Otherwise return nil. 1630is `eq' to VALUE. Otherwise return nil.
1631If the optional fifth argument OBJECT is a buffer (or nil, which means 1631If the optional fifth argument OBJECT is a buffer (or nil, which means
@@ -1661,7 +1661,7 @@ markers). If OBJECT is a string, START and END are 0-based indices into it. */
1661 1661
1662DEFUN ("text-property-not-all", Ftext_property_not_all, 1662DEFUN ("text-property-not-all", Ftext_property_not_all,
1663 Stext_property_not_all, 4, 5, 0, 1663 Stext_property_not_all, 4, 5, 0,
1664 doc: /* Check text from START to END for property PROPERTY not equalling VALUE. 1664 doc: /* Check text from START to END for property PROPERTY not equaling VALUE.
1665If so, return the position of the first character whose property PROPERTY 1665If so, return the position of the first character whose property PROPERTY
1666is not `eq' to VALUE. Otherwise, return nil. 1666is not `eq' to VALUE. Otherwise, return nil.
1667If the optional fifth argument OBJECT is a buffer (or nil, which means 1667If the optional fifth argument OBJECT is a buffer (or nil, which means
diff --git a/src/unexelf.c b/src/unexelf.c
index 04c029f7e80..1715c3670ca 100644
--- a/src/unexelf.c
+++ b/src/unexelf.c
@@ -1219,9 +1219,15 @@ temacs:
1219 nn = symp->st_shndx; 1219 nn = symp->st_shndx;
1220 if (nn > old_bss_index) 1220 if (nn > old_bss_index)
1221 nn--; 1221 nn--;
1222 old = ((symp->st_value - NEW_SECTION_H (symp->st_shndx).sh_addr) 1222 if (nn == old_bss_index)
1223 + OLD_SECTION_H (nn).sh_offset + old_base); 1223 memset (new, 0, symp->st_size);
1224 memcpy (new, old, symp->st_size); 1224 else
1225 {
1226 old = ((symp->st_value
1227 - NEW_SECTION_H (symp->st_shndx).sh_addr)
1228 + OLD_SECTION_H (nn).sh_offset + old_base);
1229 memcpy (new, old, symp->st_size);
1230 }
1225 } 1231 }
1226#endif 1232#endif
1227 } 1233 }
diff --git a/src/w16select.c b/src/w16select.c
index cae7a6f82dd..7ba62fde0e5 100644
--- a/src/w16select.c
+++ b/src/w16select.c
@@ -114,7 +114,7 @@ identify_winoldap_version (void)
114 return regs.x.ax; 114 return regs.x.ax;
115} 115}
116 116
117/* Open the clipboard, return non-zero if successfull. */ 117/* Open the clipboard, return non-zero if successful. */
118unsigned 118unsigned
119open_clipboard (void) 119open_clipboard (void)
120{ 120{
@@ -137,7 +137,7 @@ open_clipboard (void)
137 return regs.x.ax; 137 return regs.x.ax;
138} 138}
139 139
140/* Empty clipboard, return non-zero if successfull. */ 140/* Empty clipboard, return non-zero if successful. */
141unsigned 141unsigned
142empty_clipboard (void) 142empty_clipboard (void)
143{ 143{
@@ -207,7 +207,7 @@ free_xfer_buf (void)
207 } 207 }
208} 208}
209 209
210/* Copy data into the clipboard, return zero if successfull. */ 210/* Copy data into the clipboard, return zero if successful. */
211unsigned 211unsigned
212set_clipboard_data (unsigned Format, void *Data, unsigned Size, int Raw) 212set_clipboard_data (unsigned Format, void *Data, unsigned Size, int Raw)
213{ 213{
@@ -405,7 +405,7 @@ get_clipboard_data (unsigned Format, void *Data, unsigned Size, int Raw)
405 return (unsigned) (dp - (unsigned char *)Data - 1); 405 return (unsigned) (dp - (unsigned char *)Data - 1);
406} 406}
407 407
408/* Close clipboard, return non-zero if successfull. */ 408/* Close clipboard, return non-zero if successful. */
409unsigned 409unsigned
410close_clipboard (void) 410close_clipboard (void)
411{ 411{
@@ -730,4 +730,3 @@ After the communication, this variable is set to nil. */);
730} 730}
731 731
732#endif /* MSDOS */ 732#endif /* MSDOS */
733
diff --git a/src/w32.c b/src/w32.c
index 304445e2238..b26327462d8 100644
--- a/src/w32.c
+++ b/src/w32.c
@@ -1654,6 +1654,24 @@ init_environment (char ** argv)
1654 } 1654 }
1655 } 1655 }
1656 1656
1657 /* When Emacs is invoked with --no-site-lisp, we must remove the
1658 site-lisp directories from the default value of EMACSLOADPATH.
1659 This assumes that the site-lisp entries are at the front, and
1660 that additional entries do exist. */
1661 if (no_site_lisp)
1662 {
1663 for (i = 0; i < N_ENV_VARS; i++)
1664 {
1665 if (strcmp (env_vars[i].name, "EMACSLOADPATH") == 0)
1666 {
1667 char *site;
1668 while ((site = strstr (env_vars[i].def_value, "site-lisp")))
1669 env_vars[i].def_value = strchr (site, ';') + 1;
1670 break;
1671 }
1672 }
1673 }
1674
1657#define SET_ENV_BUF_SIZE (4 * MAX_PATH) /* to cover EMACSLOADPATH */ 1675#define SET_ENV_BUF_SIZE (4 * MAX_PATH) /* to cover EMACSLOADPATH */
1658 1676
1659 /* Treat emacs_dir specially: set it unconditionally based on our 1677 /* Treat emacs_dir specially: set it unconditionally based on our
diff --git a/src/w32fns.c b/src/w32fns.c
index 7a17c108d4d..822e3530bb6 100644
--- a/src/w32fns.c
+++ b/src/w32fns.c
@@ -2417,7 +2417,7 @@ complete_deferred_msg (HWND hwnd, UINT msg, LRESULT result)
2417 deferred_msg * msg_buf = find_deferred_msg (hwnd, msg); 2417 deferred_msg * msg_buf = find_deferred_msg (hwnd, msg);
2418 2418
2419 if (msg_buf == NULL) 2419 if (msg_buf == NULL)
2420 /* Message may have been cancelled, so don't abort. */ 2420 /* Message may have been canceled, so don't abort. */
2421 return; 2421 return;
2422 2422
2423 msg_buf->result = result; 2423 msg_buf->result = result;
@@ -2538,7 +2538,7 @@ post_character_message (HWND hwnd, UINT msg,
2538 the lisp thread to respond. 2538 the lisp thread to respond.
2539 2539
2540 Note that we don't want to block the input thread waiting for 2540 Note that we don't want to block the input thread waiting for
2541 a reponse from the lisp thread (although that would at least 2541 a response from the lisp thread (although that would at least
2542 solve the deadlock problem above), because we want to be able 2542 solve the deadlock problem above), because we want to be able
2543 to receive C-g to interrupt the lisp thread. */ 2543 to receive C-g to interrupt the lisp thread. */
2544 cancel_all_deferred_msgs (); 2544 cancel_all_deferred_msgs ();
@@ -3749,7 +3749,7 @@ w32_wnd_proc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
3749 flags |= TPM_RIGHTBUTTON; 3749 flags |= TPM_RIGHTBUTTON;
3750 3750
3751 /* Remember we did a SetCapture on the initial mouse down event, 3751 /* Remember we did a SetCapture on the initial mouse down event,
3752 so for safety, we make sure the capture is cancelled now. */ 3752 so for safety, we make sure the capture is canceled now. */
3753 ReleaseCapture (); 3753 ReleaseCapture ();
3754 button_state = 0; 3754 button_state = 0;
3755 3755
@@ -4951,7 +4951,7 @@ If TYPE is nil or omitted, get the property as a string.
4951Otherwise TYPE is the name of the atom that denotes the type expected. 4951Otherwise TYPE is the name of the atom that denotes the type expected.
4952If SOURCE is non-nil, get the property on that window instead of from 4952If SOURCE is non-nil, get the property on that window instead of from
4953FRAME. The number 0 denotes the root window. 4953FRAME. The number 0 denotes the root window.
4954If DELETE_P is non-nil, delete the property after retreiving it. 4954If DELETE_P is non-nil, delete the property after retrieving it.
4955If VECTOR_RET_P is non-nil, don't return a string but a vector of values. 4955If VECTOR_RET_P is non-nil, don't return a string but a vector of values.
4956 4956
4957Value is nil if FRAME hasn't a property with name PROP or if PROP has 4957Value is nil if FRAME hasn't a property with name PROP or if PROP has
@@ -6032,7 +6032,7 @@ Otherwise, if ONLY-DIR-P is non-nil, the user can only select directories. */)
6032 6032
6033 file = DECODE_FILE (build_string (filename)); 6033 file = DECODE_FILE (build_string (filename));
6034 } 6034 }
6035 /* User cancelled the dialog without making a selection. */ 6035 /* User canceled the dialog without making a selection. */
6036 else if (!CommDlgExtendedError ()) 6036 else if (!CommDlgExtendedError ())
6037 file = Qnil; 6037 file = Qnil;
6038 /* An error occurred, fallback on reading from the mini-buffer. */ 6038 /* An error occurred, fallback on reading from the mini-buffer. */
diff --git a/src/w32font.c b/src/w32font.c
index 5cc37c0e74f..e8a223de0a4 100644
--- a/src/w32font.c
+++ b/src/w32font.c
@@ -786,7 +786,7 @@ w32font_free_outline (struct font *font, void *outline);
786 Optional. 786 Optional.
787 Get coordinates of the INDEXth anchor point of the glyph whose 787 Get coordinates of the INDEXth anchor point of the glyph whose
788 code is CODE. Store the coordinates in *X and *Y. Return 0 if 788 code is CODE. Store the coordinates in *X and *Y. Return 0 if
789 the operations was successfull. Otherwise return -1. 789 the operations was successful. Otherwise return -1.
790static int 790static int
791w32font_anchor_point (struct font *font, unsigned code, 791w32font_anchor_point (struct font *font, unsigned code,
792 int index, int *x, int *y); 792 int index, int *x, int *y);
diff --git a/src/w32select.c b/src/w32select.c
index e3225c3f996..392cb07a96d 100644
--- a/src/w32select.c
+++ b/src/w32select.c
@@ -39,7 +39,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
39 * 39 *
40 * When copying or cutting (sending data to the OS), the data is 40 * When copying or cutting (sending data to the OS), the data is
41 * announced and stored internally, but only actually rendered on 41 * announced and stored internally, but only actually rendered on
42 * request. The requester determines the format provided. The 42 * request. The requestor determines the format provided. The
43 * {next-}selection-coding-system is only used, when its corresponding 43 * {next-}selection-coding-system is only used, when its corresponding
44 * clipboard type matches the type requested. 44 * clipboard type matches the type requested.
45 * 45 *
@@ -335,7 +335,7 @@ render_all (Lisp_Object ignore)
335 335
336 OpenClipboard (NULL); 336 OpenClipboard (NULL);
337 337
338 /* There is no usefull means to report errors here, there are none 338 /* There is no useful means to report errors here, there are none
339 expected anyway, and even if there were errors, they wouldn't do 339 expected anyway, and even if there were errors, they wouldn't do
340 any harm. So we just go ahead and do what has to be done without 340 any harm. So we just go ahead and do what has to be done without
341 bothering with error handling. */ 341 bothering with error handling. */
@@ -750,7 +750,7 @@ DEFUN ("w32-set-clipboard-data", Fw32_set_clipboard_data,
750 else 750 else
751 { 751 {
752 /* Advertise all supported formats so that whatever the 752 /* Advertise all supported formats so that whatever the
753 requester chooses, only one encoding step needs to be 753 requestor chooses, only one encoding step needs to be
754 made. This is intentionally different from what we do in 754 made. This is intentionally different from what we do in
755 the handler for WM_RENDERALLFORMATS. */ 755 the handler for WM_RENDERALLFORMATS. */
756 SetClipboardData (CF_UNICODETEXT, NULL); 756 SetClipboardData (CF_UNICODETEXT, NULL);
@@ -1138,4 +1138,3 @@ globals_of_w32select (void)
1138 1138
1139 clipboard_owner = create_owner (); 1139 clipboard_owner = create_owner ();
1140} 1140}
1141
diff --git a/src/w32term.c b/src/w32term.c
index a2ccdd21f7d..29ac9d119b4 100644
--- a/src/w32term.c
+++ b/src/w32term.c
@@ -2665,7 +2665,7 @@ x_scroll_run (struct window *w, struct run *run)
2665 } 2665 }
2666 else 2666 else
2667 { 2667 {
2668 /* Scolling down. Make sure we don't copy over the mode line. 2668 /* Scrolling down. Make sure we don't copy over the mode line.
2669 at the bottom. */ 2669 at the bottom. */
2670 if (to_y + run->height > bottom_y) 2670 if (to_y + run->height > bottom_y)
2671 height = bottom_y - to_y; 2671 height = bottom_y - to_y;
@@ -3286,7 +3286,7 @@ w32_mouse_position (FRAME_PTR *fp, int insist, Lisp_Object *bar_window,
3286 ***********************************************************************/ 3286 ***********************************************************************/
3287 3287
3288/* Handle mouse button event on the tool-bar of frame F, at 3288/* Handle mouse button event on the tool-bar of frame F, at
3289 frame-relative coordinates X/Y. EVENT_TYPE is either ButtionPress 3289 frame-relative coordinates X/Y. EVENT_TYPE is either ButtonPress
3290 or ButtonRelease. */ 3290 or ButtonRelease. */
3291 3291
3292static void 3292static void
@@ -3556,7 +3556,7 @@ x_scroll_bar_remove (struct scroll_bar *bar)
3556 /* Destroy the window. */ 3556 /* Destroy the window. */
3557 my_destroy_window (f, SCROLL_BAR_W32_WINDOW (bar)); 3557 my_destroy_window (f, SCROLL_BAR_W32_WINDOW (bar));
3558 3558
3559 /* Disassociate this scroll bar from its window. */ 3559 /* Dissociate this scroll bar from its window. */
3560 XWINDOW (bar->window)->vertical_scroll_bar = Qnil; 3560 XWINDOW (bar->window)->vertical_scroll_bar = Qnil;
3561 3561
3562 UNBLOCK_INPUT; 3562 UNBLOCK_INPUT;
diff --git a/src/w32term.h b/src/w32term.h
index 6c73daba601..f587ee11af9 100644
--- a/src/w32term.h
+++ b/src/w32term.h
@@ -229,7 +229,7 @@ enum
229{ 229{
230 /* Values for focus_state, used as bit mask. 230 /* Values for focus_state, used as bit mask.
231 EXPLICIT means we received a FocusIn for the frame and know it has 231 EXPLICIT means we received a FocusIn for the frame and know it has
232 the focus. IMPLICIT means we recevied an EnterNotify and the frame 232 the focus. IMPLICIT means we received an EnterNotify and the frame
233 may have the focus if no window manager is running. 233 may have the focus if no window manager is running.
234 FocusOut and LeaveNotify clears EXPLICIT/IMPLICIT. */ 234 FocusOut and LeaveNotify clears EXPLICIT/IMPLICIT. */
235 FOCUS_NONE = 0, 235 FOCUS_NONE = 0,
diff --git a/src/window.c b/src/window.c
index 86fcca25f2e..4f573a67909 100644
--- a/src/window.c
+++ b/src/window.c
@@ -5000,7 +5000,7 @@ the selected window; if the variable `recenter-redisplay' is non-nil,
5000also erase the entire frame and redraw it (when `auto-resize-tool-bars' 5000also erase the entire frame and redraw it (when `auto-resize-tool-bars'
5001is set to `grow-only', this resets the tool-bar's height to the minimum 5001is set to `grow-only', this resets the tool-bar's height to the minimum
5002height needed); if `recenter-redisplay' has the special value `tty', 5002height needed); if `recenter-redisplay' has the special value `tty',
5003then only tty frame are redrawn. 5003then only tty frames are redrawn.
5004 5004
5005Just C-u as prefix means put point in the center of the window 5005Just C-u as prefix means put point in the center of the window
5006and redisplay normally--don't erase and redraw the frame. */) 5006and redisplay normally--don't erase and redraw the frame. */)
@@ -5772,7 +5772,7 @@ get_leaf_windows (struct window *w, struct window **flat, int i)
5772 5772
5773 5773
5774/* Return a pointer to the glyph W's physical cursor is on. Value is 5774/* Return a pointer to the glyph W's physical cursor is on. Value is
5775 null if W's current matrix is invalid, so that no meaningfull glyph 5775 null if W's current matrix is invalid, so that no meaningful glyph
5776 can be returned. */ 5776 can be returned. */
5777struct glyph * 5777struct glyph *
5778get_phys_cursor_glyph (struct window *w) 5778get_phys_cursor_glyph (struct window *w)
@@ -6505,28 +6505,31 @@ with the relevant frame selected. */);
6505 Vwindow_configuration_change_hook = Qnil; 6505 Vwindow_configuration_change_hook = Qnil;
6506 6506
6507 DEFVAR_LISP ("recenter-redisplay", Vrecenter_redisplay, 6507 DEFVAR_LISP ("recenter-redisplay", Vrecenter_redisplay,
6508 doc: /* If non-nil, then the `recenter' command with a nil argument 6508 doc: /* Non-nil means `recenter' redraws entire frame.
6509will redraw the entire frame; the special value `tty' causes the 6509If this option is non-nil, then the `recenter' command with a nil
6510frame to be redrawn only if it is a tty frame. */); 6510argument will redraw the entire frame; the special value `tty' causes
6511the frame to be redrawn only if it is a tty frame. */);
6511 Vrecenter_redisplay = Qtty; 6512 Vrecenter_redisplay = Qtty;
6512 6513
6513 DEFVAR_LISP ("window-combination-resize", Vwindow_combination_resize, 6514 DEFVAR_LISP ("window-combination-resize", Vwindow_combination_resize,
6514 doc: /* Non-nil means resize window combinations proportionally. 6515 doc: /* If t, resize window combinations proportionally.
6515If this variable is nil, splitting a window gets the entire screen space 6516If this variable is nil, splitting a window gets the entire screen space
6516for displaying the new window from the window to split. Deleting and 6517for displaying the new window from the window to split. Deleting and
6517resizing a window preferably resizes one adjacent window only. 6518resizing a window preferably resizes one adjacent window only.
6518 6519
6519If this variable is non-nil, splitting a window tries to get the space 6520If this variable is t, splitting a window tries to get the space
6520proportionally from all windows in the same combination. This also 6521proportionally from all windows in the same combination. This also
6521allows to split a window that is otherwise too small or of fixed size. 6522allows to split a window that is otherwise too small or of fixed size.
6522Resizing and deleting a window proportionally resize all windows in the 6523Resizing and deleting a window proportionally resize all windows in the
6523same combination. 6524same combination.
6524 6525
6526Other values are reserved for future use.
6527
6525This variable takes no effect if `window-combination-limit' is non-nil. */); 6528This variable takes no effect if `window-combination-limit' is non-nil. */);
6526 Vwindow_combination_resize = Qnil; 6529 Vwindow_combination_resize = Qnil;
6527 6530
6528 DEFVAR_LISP ("window-combination-limit", Vwindow_combination_limit, 6531 DEFVAR_LISP ("window-combination-limit", Vwindow_combination_limit,
6529 doc: /* Non-nil means splitting a window makes a new parent window. 6532 doc: /* If t, splitting a window makes a new parent window.
6530If this variable is nil, splitting a window will create a new parent 6533If this variable is nil, splitting a window will create a new parent
6531window only if the window has no parent window or the window shall 6534window only if the window has no parent window or the window shall
6532become a combination orthogonal to the one it is part of. 6535become a combination orthogonal to the one it is part of.
diff --git a/src/window.h b/src/window.h
index df29ca1368f..b4e268b1a34 100644
--- a/src/window.h
+++ b/src/window.h
@@ -877,7 +877,7 @@ extern int buffer_shared;
877extern void check_frame_size (struct frame *frame, int *rows, int *cols); 877extern void check_frame_size (struct frame *frame, int *rows, int *cols);
878 878
879/* Return a pointer to the glyph W's physical cursor is on. Value is 879/* Return a pointer to the glyph W's physical cursor is on. Value is
880 null if W's current matrix is invalid, so that no meaningfull glyph 880 null if W's current matrix is invalid, so that no meaningful glyph
881 can be returned. */ 881 can be returned. */
882 882
883struct glyph *get_phys_cursor_glyph (struct window *w); 883struct glyph *get_phys_cursor_glyph (struct window *w);
diff --git a/src/xdisp.c b/src/xdisp.c
index 530373a4436..1588d490ec3 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -1920,7 +1920,7 @@ get_glyph_string_clip_rects (struct glyph_string *s, NativeRectangle *rects, int
1920 environments with anti-aliased text: if the same text is 1920 environments with anti-aliased text: if the same text is
1921 drawn onto the same place multiple times, it gets thicker. 1921 drawn onto the same place multiple times, it gets thicker.
1922 If the overlap we are processing is for the erased cursor, we 1922 If the overlap we are processing is for the erased cursor, we
1923 take the intersection with the rectagle of the cursor. */ 1923 take the intersection with the rectangle of the cursor. */
1924 if (s->for_overlaps & OVERLAPS_ERASED_CURSOR) 1924 if (s->for_overlaps & OVERLAPS_ERASED_CURSOR)
1925 { 1925 {
1926 XRectangle rc, r_save = r; 1926 XRectangle rc, r_save = r;
@@ -4095,10 +4095,11 @@ handle_invisible_prop (struct it *it)
4095 while (invis_p); 4095 while (invis_p);
4096 4096
4097 /* The position newpos is now either ZV or on visible text. */ 4097 /* The position newpos is now either ZV or on visible text. */
4098 if (it->bidi_p && newpos < ZV) 4098 if (it->bidi_p)
4099 { 4099 {
4100 EMACS_INT bpos = CHAR_TO_BYTE (newpos); 4100 EMACS_INT bpos = CHAR_TO_BYTE (newpos);
4101 int on_newline = FETCH_BYTE (bpos) == '\n'; 4101 int on_newline =
4102 bpos == ZV_BYTE || FETCH_BYTE (bpos) == '\n';
4102 int after_newline = 4103 int after_newline =
4103 newpos <= BEGV || FETCH_BYTE (bpos - 1) == '\n'; 4104 newpos <= BEGV || FETCH_BYTE (bpos - 1) == '\n';
4104 4105
@@ -4116,16 +4117,16 @@ handle_invisible_prop (struct it *it)
4116 4117
4117 SET_TEXT_POS (tpos, newpos, bpos); 4118 SET_TEXT_POS (tpos, newpos, bpos);
4118 reseat_1 (it, tpos, 0); 4119 reseat_1 (it, tpos, 0);
4119 /* If we reseat on a newline, we need to prep the 4120 /* If we reseat on a newline/ZV, we need to prep the
4120 bidi iterator for advancing to the next character 4121 bidi iterator for advancing to the next character
4121 after the newline, keeping the current paragraph 4122 after the newline/EOB, keeping the current paragraph
4122 direction (so that PRODUCE_GLYPHS does TRT wrt 4123 direction (so that PRODUCE_GLYPHS does TRT wrt
4123 prepending/appending glyphs to a glyph row). */ 4124 prepending/appending glyphs to a glyph row). */
4124 if (on_newline) 4125 if (on_newline)
4125 { 4126 {
4126 it->bidi_it.first_elt = 0; 4127 it->bidi_it.first_elt = 0;
4127 it->bidi_it.paragraph_dir = pdir; 4128 it->bidi_it.paragraph_dir = pdir;
4128 it->bidi_it.ch = '\n'; 4129 it->bidi_it.ch = (bpos == ZV_BYTE) ? -1 : '\n';
4129 it->bidi_it.nchars = 1; 4130 it->bidi_it.nchars = 1;
4130 it->bidi_it.ch_len = 1; 4131 it->bidi_it.ch_len = 1;
4131 } 4132 }
@@ -10288,7 +10289,7 @@ current_message_1 (EMACS_INT a1, Lisp_Object a2, EMACS_INT a3, EMACS_INT a4)
10288} 10289}
10289 10290
10290 10291
10291/* Push the current message on Vmessage_stack for later restauration 10292/* Push the current message on Vmessage_stack for later restoration
10292 by restore_message. Value is non-zero if the current message isn't 10293 by restore_message. Value is non-zero if the current message isn't
10293 empty. This is a relatively infrequent operation, so it's not 10294 empty. This is a relatively infrequent operation, so it's not
10294 worth optimizing. */ 10295 worth optimizing. */
@@ -14421,7 +14422,7 @@ try_scrolling (Lisp_Object window, int just_this_one_p,
14421 { 14422 {
14422 int scroll_margin_y; 14423 int scroll_margin_y;
14423 14424
14424 /* Compute the pixel ypos of the scroll margin, then move it to 14425 /* Compute the pixel ypos of the scroll margin, then move IT to
14425 either that ypos or PT, whichever comes first. */ 14426 either that ypos or PT, whichever comes first. */
14426 start_display (&it, w, startp); 14427 start_display (&it, w, startp);
14427 scroll_margin_y = it.last_visible_y - this_scroll_margin 14428 scroll_margin_y = it.last_visible_y - this_scroll_margin
@@ -14451,7 +14452,8 @@ try_scrolling (Lisp_Object window, int just_this_one_p,
14451 if (dy > scroll_max) 14452 if (dy > scroll_max)
14452 return SCROLLING_FAILED; 14453 return SCROLLING_FAILED;
14453 14454
14454 scroll_down_p = 1; 14455 if (dy > 0)
14456 scroll_down_p = 1;
14455 } 14457 }
14456 } 14458 }
14457 14459
@@ -18991,7 +18993,8 @@ display_line (struct it *it)
18991#define RECORD_MAX_MIN_POS(IT) \ 18993#define RECORD_MAX_MIN_POS(IT) \
18992 do \ 18994 do \
18993 { \ 18995 { \
18994 int composition_p = (IT)->what == IT_COMPOSITION; \ 18996 int composition_p = !STRINGP ((IT)->string) \
18997 && ((IT)->what == IT_COMPOSITION); \
18995 EMACS_INT current_pos = \ 18998 EMACS_INT current_pos = \
18996 composition_p ? (IT)->cmp_it.charpos \ 18999 composition_p ? (IT)->cmp_it.charpos \
18997 : IT_CHARPOS (*(IT)); \ 19000 : IT_CHARPOS (*(IT)); \
diff --git a/src/xfns.c b/src/xfns.c
index 323b272e9f0..e44f28df870 100644
--- a/src/xfns.c
+++ b/src/xfns.c
@@ -1877,7 +1877,7 @@ static XIMStyle supported_xim_styles[] =
1877#if defined HAVE_X_WINDOWS && defined USE_X_TOOLKIT 1877#if defined HAVE_X_WINDOWS && defined USE_X_TOOLKIT
1878/* Create an X fontset on frame F with base font name BASE_FONTNAME. */ 1878/* Create an X fontset on frame F with base font name BASE_FONTNAME. */
1879 1879
1880static const char xic_defaut_fontset[] = "-*-*-*-r-normal--14-*-*-*-*-*-*-*"; 1880static const char xic_default_fontset[] = "-*-*-*-r-normal--14-*-*-*-*-*-*-*";
1881 1881
1882/* Create an Xt fontset spec from the name of a base font. 1882/* Create an Xt fontset spec from the name of a base font.
1883 If `motif' is True use the Motif syntax. */ 1883 If `motif' is True use the Motif syntax. */
@@ -1888,7 +1888,7 @@ xic_create_fontsetname (const char *base_fontname, int motif)
1888 char *fontsetname; 1888 char *fontsetname;
1889 1889
1890 /* Make a fontset name from the base font name. */ 1890 /* Make a fontset name from the base font name. */
1891 if (xic_defaut_fontset == base_fontname) 1891 if (xic_default_fontset == base_fontname)
1892 { /* There is no base font name, use the default. */ 1892 { /* There is no base font name, use the default. */
1893 ptrdiff_t len = strlen (base_fontname) + 2; 1893 ptrdiff_t len = strlen (base_fontname) + 2;
1894 fontsetname = xmalloc (len); 1894 fontsetname = xmalloc (len);
@@ -1912,12 +1912,12 @@ xic_create_fontsetname (const char *base_fontname, int motif)
1912 modify it to generalize it to allcs and allfamilies. 1912 modify it to generalize it to allcs and allfamilies.
1913 Use the specified font plus the default. */ 1913 Use the specified font plus the default. */
1914 ptrdiff_t len = 1914 ptrdiff_t len =
1915 strlen (base_fontname) + strlen (xic_defaut_fontset) + 3; 1915 strlen (base_fontname) + strlen (xic_default_fontset) + 3;
1916 fontsetname = xmalloc (len); 1916 fontsetname = xmalloc (len);
1917 memset (fontsetname, 0, len); 1917 memset (fontsetname, 0, len);
1918 strcpy (fontsetname, base_fontname); 1918 strcpy (fontsetname, base_fontname);
1919 strcat (fontsetname, sep); 1919 strcat (fontsetname, sep);
1920 strcat (fontsetname, xic_defaut_fontset); 1920 strcat (fontsetname, xic_default_fontset);
1921 } 1921 }
1922 else 1922 else
1923 { 1923 {
@@ -4286,7 +4286,7 @@ If TYPE is nil or omitted, get the property as a string.
4286Otherwise TYPE is the name of the atom that denotes the type expected. 4286Otherwise TYPE is the name of the atom that denotes the type expected.
4287If SOURCE is non-nil, get the property on that window instead of from 4287If SOURCE is non-nil, get the property on that window instead of from
4288FRAME. The number 0 denotes the root window. 4288FRAME. The number 0 denotes the root window.
4289If DELETE_P is non-nil, delete the property after retreiving it. 4289If DELETE_P is non-nil, delete the property after retrieving it.
4290If VECTOR_RET_P is non-nil, don't return a string but a vector of values. 4290If VECTOR_RET_P is non-nil, don't return a string but a vector of values.
4291 4291
4292Value is nil if FRAME hasn't a property with name PROP or if PROP has 4292Value is nil if FRAME hasn't a property with name PROP or if PROP has
diff --git a/src/xftfont.c b/src/xftfont.c
index c27a4fcf91a..8cb4c494854 100644
--- a/src/xftfont.c
+++ b/src/xftfont.c
@@ -654,7 +654,7 @@ xftfont_draw (struct glyph_string *s, int from, int to, int x, int y, int with_b
654 654
655 if (with_background) 655 if (with_background)
656 XftDrawRect (xft_draw, &bg, 656 XftDrawRect (xft_draw, &bg,
657 x, y - face->font->ascent, s->width, face->font->height); 657 x, y - s->font->ascent, s->width, s->font->height);
658 code = alloca (sizeof (FT_UInt) * len); 658 code = alloca (sizeof (FT_UInt) * len);
659 for (i = 0; i < len; i++) 659 for (i = 0; i < len; i++)
660 code[i] = ((XCHAR2B_BYTE1 (s->char2b + from + i) << 8) 660 code[i] = ((XCHAR2B_BYTE1 (s->char2b + from + i) << 8)
diff --git a/src/xmenu.c b/src/xmenu.c
index 4b7bbfd73dc..ba99b8ac1e3 100644
--- a/src/xmenu.c
+++ b/src/xmenu.c
@@ -102,6 +102,9 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
102 102
103#ifdef USE_GTK 103#ifdef USE_GTK
104#include "gtkutil.h" 104#include "gtkutil.h"
105#ifdef HAVE_GTK3
106#include "xgselect.h"
107#endif
105#endif 108#endif
106 109
107#include "menu.h" 110#include "menu.h"
@@ -408,7 +411,15 @@ x_menu_wait_for_event (void *data)
408 else 411 else
409 ntp = &next_time; 412 ntp = &next_time;
410 413
414#ifdef HAVE_GTK3
415 /* Gtk3 have arrows on menus when they don't fit. When the pointer is
416 over an arrow, a timeout scrolls it a bit. Use xg_select so that
417 timeout gets triggered. */
418
419 xg_select (n + 1, &read_fds, (SELECT_TYPE *)0, (SELECT_TYPE *)0, ntp);
420#else
411 select (n + 1, &read_fds, (SELECT_TYPE *)0, (SELECT_TYPE *)0, ntp); 421 select (n + 1, &read_fds, (SELECT_TYPE *)0, (SELECT_TYPE *)0, ntp);
422#endif
412 } 423 }
413} 424}
414#endif /* ! MSDOS */ 425#endif /* ! MSDOS */
@@ -1435,6 +1446,13 @@ create_and_show_popup_menu (FRAME_PTR f, widget_value *first_wv, int x, int y,
1435 GtkMenuPositionFunc pos_func = 0; /* Pop up at pointer. */ 1446 GtkMenuPositionFunc pos_func = 0; /* Pop up at pointer. */
1436 struct next_popup_x_y popup_x_y; 1447 struct next_popup_x_y popup_x_y;
1437 int specpdl_count = SPECPDL_INDEX (); 1448 int specpdl_count = SPECPDL_INDEX ();
1449 int use_pos_func = ! for_click;
1450
1451#ifdef HAVE_GTK3
1452 /* Always use position function for Gtk3. Otherwise menus may become
1453 too small to show anything. */
1454 use_pos_func = 1;
1455#endif
1438 1456
1439 if (! FRAME_X_P (f)) 1457 if (! FRAME_X_P (f))
1440 abort (); 1458 abort ();
@@ -1446,7 +1464,7 @@ create_and_show_popup_menu (FRAME_PTR f, widget_value *first_wv, int x, int y,
1446 G_CALLBACK (menu_highlight_callback)); 1464 G_CALLBACK (menu_highlight_callback));
1447 xg_crazy_callback_abort = 0; 1465 xg_crazy_callback_abort = 0;
1448 1466
1449 if (! for_click) 1467 if (use_pos_func)
1450 { 1468 {
1451 /* Not invoked by a click. pop up at x/y. */ 1469 /* Not invoked by a click. pop up at x/y. */
1452 pos_func = menu_position_func; 1470 pos_func = menu_position_func;
@@ -1461,7 +1479,8 @@ create_and_show_popup_menu (FRAME_PTR f, widget_value *first_wv, int x, int y,
1461 1479
1462 i = 0; /* gtk_menu_popup needs this to be 0 for a non-button popup. */ 1480 i = 0; /* gtk_menu_popup needs this to be 0 for a non-button popup. */
1463 } 1481 }
1464 else 1482
1483 if (for_click)
1465 { 1484 {
1466 for (i = 0; i < 5; i++) 1485 for (i = 0; i < 5; i++)
1467 if (FRAME_X_DISPLAY_INFO (f)->grabbed & (1 << i)) 1486 if (FRAME_X_DISPLAY_INFO (f)->grabbed & (1 << i))
diff --git a/src/xselect.c b/src/xselect.c
index 4bfab4143cc..5e5e6a098b6 100644
--- a/src/xselect.c
+++ b/src/xselect.c
@@ -516,7 +516,7 @@ static struct selection_data *converted_selections;
516static Atom conversion_fail_tag; 516static Atom conversion_fail_tag;
517 517
518/* Used as an unwind-protect clause so that, if a selection-converter signals 518/* Used as an unwind-protect clause so that, if a selection-converter signals
519 an error, we tell the requester that we were unable to do what they wanted 519 an error, we tell the requestor that we were unable to do what they wanted
520 before we throw to top-level or go into the debugger or whatever. */ 520 before we throw to top-level or go into the debugger or whatever. */
521 521
522static Lisp_Object 522static Lisp_Object
@@ -693,7 +693,7 @@ x_reply_selection_request (struct input_event *event,
693 bytes_remaining = cs->size; 693 bytes_remaining = cs->size;
694 bytes_remaining *= format_bytes; 694 bytes_remaining *= format_bytes;
695 695
696 /* Wait for the requester to ack by deleting the property. 696 /* Wait for the requestor to ack by deleting the property.
697 This can run Lisp code (process handlers) or signal. */ 697 This can run Lisp code (process handlers) or signal. */
698 if (! had_errors) 698 if (! had_errors)
699 { 699 {
@@ -732,7 +732,7 @@ x_reply_selection_request (struct input_event *event,
732 732
733 if (had_errors) break; 733 if (had_errors) break;
734 734
735 /* Wait for the requester to ack this chunk by deleting 735 /* Wait for the requestor to ack this chunk by deleting
736 the property. This can run Lisp code or signal. */ 736 the property. This can run Lisp code or signal. */
737 TRACE1 ("Waiting for increment ACK (deletion of %s)", 737 TRACE1 ("Waiting for increment ACK (deletion of %s)",
738 XGetAtomName (display, cs->property)); 738 XGetAtomName (display, cs->property));
@@ -740,7 +740,7 @@ x_reply_selection_request (struct input_event *event,
740 } 740 }
741 741
742 /* Now write a zero-length chunk to the property to tell the 742 /* Now write a zero-length chunk to the property to tell the
743 requester that we're done. */ 743 requestor that we're done. */
744 BLOCK_INPUT; 744 BLOCK_INPUT;
745 if (! waiting_for_other_props_on_window (display, window)) 745 if (! waiting_for_other_props_on_window (display, window))
746 XSelectInput (display, window, 0L); 746 XSelectInput (display, window, 0L);
@@ -757,7 +757,7 @@ x_reply_selection_request (struct input_event *event,
757 /* The window we're communicating with may have been deleted 757 /* The window we're communicating with may have been deleted
758 in the meantime (that's a real situation from a bug report). 758 in the meantime (that's a real situation from a bug report).
759 In this case, there may be events in the event queue still 759 In this case, there may be events in the event queue still
760 refering to the deleted window, and we'll get a BadWindow error 760 referring to the deleted window, and we'll get a BadWindow error
761 in XTread_socket when processing the events. I don't have 761 in XTread_socket when processing the events. I don't have
762 an idea how to fix that. gerd, 2001-01-98. */ 762 an idea how to fix that. gerd, 2001-01-98. */
763 /* 2004-09-10: XSync and UNBLOCK so that possible protocol errors are 763 /* 2004-09-10: XSync and UNBLOCK so that possible protocol errors are
diff --git a/src/xterm.c b/src/xterm.c
index 8171fe7738e..3c37b2110d4 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -3326,7 +3326,7 @@ x_scroll_run (struct window *w, struct run *run)
3326 } 3326 }
3327 else 3327 else
3328 { 3328 {
3329 /* Scolling down. Make sure we don't copy over the mode line. 3329 /* Scrolling down. Make sure we don't copy over the mode line.
3330 at the bottom. */ 3330 at the bottom. */
3331 if (to_y + run->height > bottom_y) 3331 if (to_y + run->height > bottom_y)
3332 height = bottom_y - to_y; 3332 height = bottom_y - to_y;
@@ -5160,7 +5160,7 @@ x_scroll_bar_remove (struct scroll_bar *bar)
5160 XDestroyWindow (FRAME_X_DISPLAY (f), bar->x_window); 5160 XDestroyWindow (FRAME_X_DISPLAY (f), bar->x_window);
5161#endif 5161#endif
5162 5162
5163 /* Disassociate this scroll bar from its window. */ 5163 /* Dissociate this scroll bar from its window. */
5164 XWINDOW (bar->window)->vertical_scroll_bar = Qnil; 5164 XWINDOW (bar->window)->vertical_scroll_bar = Qnil;
5165 5165
5166 UNBLOCK_INPUT; 5166 UNBLOCK_INPUT;
@@ -9978,6 +9978,11 @@ x_term_init (Lisp_Object display_name, char *xrm_option, char *resource_name)
9978#ifdef HAVE_CLUTTER 9978#ifdef HAVE_CLUTTER
9979 gtk_clutter_init (&argc, &argv2); 9979 gtk_clutter_init (&argc, &argv2);
9980#else 9980#else
9981
9982 /* NULL window -> events for all windows go to our function.
9983 Call before gtk_init so Gtk+ event filters comes after our. */
9984 gdk_window_add_filter (NULL, event_handler_gdk, NULL);
9985
9981 gtk_init (&argc, &argv2); 9986 gtk_init (&argc, &argv2);
9982#endif 9987#endif
9983 g_log_remove_handler ("GLib", id); 9988 g_log_remove_handler ("GLib", id);
@@ -9988,9 +9993,6 @@ x_term_init (Lisp_Object display_name, char *xrm_option, char *resource_name)
9988 9993
9989 dpy = DEFAULT_GDK_DISPLAY (); 9994 dpy = DEFAULT_GDK_DISPLAY ();
9990 9995
9991 /* NULL window -> events for all windows go to our function */
9992 gdk_window_add_filter (NULL, event_handler_gdk, NULL);
9993
9994#if GTK_MAJOR_VERSION <= 2 && GTK_MINOR_VERSION <= 90 9996#if GTK_MAJOR_VERSION <= 2 && GTK_MINOR_VERSION <= 90
9995 /* Load our own gtkrc if it exists. */ 9997 /* Load our own gtkrc if it exists. */
9996 { 9998 {
diff --git a/src/xterm.h b/src/xterm.h
index 4385b1a467d..9e0e1acca92 100644
--- a/src/xterm.h
+++ b/src/xterm.h
@@ -643,7 +643,7 @@ enum
643{ 643{
644 /* Values for focus_state, used as bit mask. 644 /* Values for focus_state, used as bit mask.
645 EXPLICIT means we received a FocusIn for the frame and know it has 645 EXPLICIT means we received a FocusIn for the frame and know it has
646 the focus. IMPLICIT means we recevied an EnterNotify and the frame 646 the focus. IMPLICIT means we received an EnterNotify and the frame
647 may have the focus if no window manager is running. 647 may have the focus if no window manager is running.
648 FocusOut and LeaveNotify clears EXPLICIT/IMPLICIT. */ 648 FocusOut and LeaveNotify clears EXPLICIT/IMPLICIT. */
649 FOCUS_NONE = 0, 649 FOCUS_NONE = 0,
diff --git a/test/cedet/tests/test.el b/test/cedet/tests/test.el
index 8a95572c497..57056b8065b 100644
--- a/test/cedet/tests/test.el
+++ b/test/cedet/tests/test.el
@@ -144,7 +144,7 @@
144 this 144 this
145 that) 145 that)
146 146
147(define-mode-local-override a-overriden-function 147(define-mode-local-override a-overridden-function
148 emacs-lisp-mode (tag) 148 emacs-lisp-mode (tag)
149 "A function that is overloaded." 149 "A function that is overloaded."
150 nil) 150 nil)
diff --git a/test/cedet/tests/testpolymorph.cpp b/test/cedet/tests/testpolymorph.cpp
index 9db2d51efe7..83175406e90 100644
--- a/test/cedet/tests/testpolymorph.cpp
+++ b/test/cedet/tests/testpolymorph.cpp
@@ -83,7 +83,7 @@ namespace template_partial_spec {
83 }; 83 };
84} 84}
85 85
86// Test 5 - Templates w/ full specicialization which may or may not share 86// Test 5 - Templates w/ full specialization which may or may not share
87// common functions. 87// common functions.
88namespace template_full_spec { 88namespace template_full_spec {
89 template <typename T> class test 89 template <typename T> class test
diff --git a/test/indent/pascal.pas b/test/indent/pascal.pas
new file mode 100644
index 00000000000..07a21f23c3c
--- /dev/null
+++ b/test/indent/pascal.pas
@@ -0,0 +1,1088 @@
1{ GPC demo program for the CRT unit.
2
3Copyright (C) 1999-2006 Free Software Foundation, Inc.
4
5Author: Frank Heckenbach <frank@pascal.gnu.de>
6
7This program is free software; you can redistribute it and/or
8modify it under the terms of the GNU General Public License as
9published by the Free Software Foundation, version 2.
10
11This program is distributed in the hope that it will be useful,
12but WITHOUT ANY WARRANTY; without even the implied warranty of
13MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14General Public License for more details.
15
16You should have received a copy of the GNU General Public License
17along with this program; see the file COPYING. If not, write to
18the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19Boston, MA 02111-1307, USA.
20
21As a special exception, if you incorporate even large parts of the
22code of this demo program into another program with substantially
23different functionality, this does not cause the other program to
24be covered by the GNU General Public License. This exception does
25not however invalidate any other reasons why it might be covered
26by the GNU General Public License. }
27
28{$gnu-pascal,I+}
29
30program CRTDemo;
31
32uses GPC, CRT;
33
34type
35 TFrameChars = array [1 .. 8] of Char;
36 TSimulateBlockCursorKind = (bc_None, bc_Blink, bc_Static);
37
38const
39 SingleFrame: TFrameChars = (chCornerTLS, chLineHS, chCornerTRS, chLineVS, chLineVS, chCornerBLS, chLineHS, chCornerBRS);
40 DoubleFrame: TFrameChars = (chCornerTLD, chLineHD, chCornerTRD, chLineVD, chLineVD, chCornerBLD, chLineHD, chCornerBRD);
41
42var
43 ScrollState: Boolean = True;
44 SimulateBlockCursorKind: TSimulateBlockCursorKind = bc_None;
45 CursorShape: TCursorShape = CursorNormal;
46 MainPanel: TPanel;
47 OrigScreenSize: TPoint;
48
49procedure FrameWin (const Title: String; const Frame: TFrameChars; TitleInverse: Boolean);
50var
51 w, h, y, Color: Integer;
52 Attr: TTextAttr;
53begin
54 HideCursor;
55 SetPCCharSet (True);
56 ClrScr;
57 w := GetXMax;
58 h := GetYMax;
59 WriteCharAt (1, 1, 1, Frame[1], TextAttr);
60 WriteCharAt (2, 1, w - 2, Frame[2], TextAttr);
61 WriteCharAt (w, 1, 1, Frame[3], TextAttr);
62 for y := 2 to h - 1 do
63 begin
64 WriteCharAt (1, y, 1, Frame[4], TextAttr);
65 WriteCharAt (w, y, 1, Frame[5], TextAttr)
66 end;
67 WriteCharAt (1, h, 1, Frame[6], TextAttr);
68 WriteCharAt (2, h, w - 2, Frame[7], TextAttr);
69 WriteCharAt (w, h, 1, Frame[8], TextAttr);
70 SetPCCharSet (False);
71 Attr := TextAttr;
72 if TitleInverse then
73 begin
74 Color := GetTextColor;
75 TextColor (GetTextBackground);
76 TextBackground (Color)
77 end;
78 WriteStrAt ((w - Length (Title)) div 2 + 1, 1, Title, TextAttr);
79 TextAttr := Attr
80end;
81
82function GetKey (TimeOut: Integer) = Key: TKey; forward;
83
84procedure ClosePopUpWindow;
85begin
86 PanelDelete (GetActivePanel);
87 PanelDelete (GetActivePanel)
88end;
89
90function PopUpConfirm (XSize, YSize: Integer; const Msg: String): Boolean;
91var
92 ax, ay: Integer;
93 Key: TKey;
94 SSize: TPoint;
95begin
96 repeat
97 SSize := ScreenSize;
98 ax := (SSize.x - XSize - 4) div 2 + 1;
99 ay := (SSize.y - YSize - 4) div 2 + 1;
100 PanelNew (ax, ay, ax + XSize + 3, ay + YSize + 1, False);
101 TextBackground (Black);
102 TextColor (Yellow);
103 SetControlChars (True);
104 FrameWin ('', DoubleFrame, False);
105 NormalCursor;
106 PanelNew (ax + 2, ay + 1, ax + XSize + 2, ay + YSize, False);
107 ClrScr;
108 Write (Msg);
109 Key := GetKey (-1);
110 if Key = kbScreenSizeChanged then ClosePopUpWindow
111 until Key <> kbScreenSizeChanged;
112 PopUpConfirm := not (Key in [kbEsc, kbAltEsc])
113end;
114
115procedure MainDraw;
116begin
117 WriteLn ('3, F3 : Open a window');
118 WriteLn ('4, F4 : Close window');
119 WriteLn ('5, F5 : Previous window');
120 WriteLn ('6, F6 : Next window');
121 WriteLn ('7, F7 : Move window');
122 WriteLn ('8, F8 : Resize window');
123 Write ('q, Esc: Quit')
124end;
125
126procedure StatusDraw;
127const
128 YesNo: array [Boolean] of String [3] = ('No', 'Yes');
129 SimulateBlockCursorIDs: array [TSimulateBlockCursorKind] of String [8] = ('Off', 'Blinking', 'Static');
130 CursorShapeIDs: array [TCursorShape] of String [7] = ('Ignored', 'Hidden', 'Normal', 'Fat', 'Block');
131var
132 SSize: TPoint;
133begin
134 WriteLn ('You can change some of the following');
135 WriteLn ('settings by pressing the key shown');
136 WriteLn ('in parentheses. Naturally, color and');
137 WriteLn ('changing the cursor shape or screen');
138 WriteLn ('size does not work on all terminals.');
139 WriteLn;
140 WriteLn ('XCurses version: ', YesNo[XCRT]);
141 WriteLn ('CRTSavePreviousScreen: ', YesNo[CRTSavePreviousScreenWorks]);
142 WriteLn ('(M)onochrome: ', YesNo[IsMonochrome]);
143 SSize := ScreenSize;
144 WriteLn ('Screen (C)olumns: ', SSize.x);
145 WriteLn ('Screen (L)ines: ', SSize.y);
146 WriteLn ('(R)estore screen size');
147 WriteLn ('(B)reak checking: ', YesNo[CheckBreak]);
148 WriteLn ('(S)crolling: ', YesNo[ScrollState]);
149 WriteLn ('S(i)mulated block cursor: ', SimulateBlockCursorIDs[SimulateBlockCursorKind]);
150 Write ('C(u)rsor shape: ', CursorShapeIDs[CursorShape]);
151 GotoXY (36, WhereY)
152end;
153
154procedure RedrawAll; forward;
155procedure CheckScreenSize; forward;
156
157procedure StatusKey (Key: TKey);
158var SSize, NewSize: TPoint;
159begin
160 case LoCase (Key2Char (Key)) of
161 'm': begin
162 SetMonochrome (not IsMonochrome);
163 RedrawAll
164 end;
165 'c': begin
166 SSize := ScreenSize;
167 if SSize.x > 40 then
168 NewSize.x := 40
169 else
170 NewSize.x := 80;
171 if SSize.y > 25 then
172 NewSize.y := 50
173 else
174 NewSize.y := 25;
175 SetScreenSize (NewSize.x, NewSize.y);
176 CheckScreenSize
177 end;
178 'l': begin
179 SSize := ScreenSize;
180 if SSize.x > 40 then
181 NewSize.x := 80
182 else
183 NewSize.x := 40;
184 if SSize.y > 25 then
185 NewSize.y := 25
186 else
187 NewSize.y := 50;
188 SetScreenSize (NewSize.x, NewSize.y);
189 CheckScreenSize
190 end;
191 'r': begin
192 SetScreenSize (OrigScreenSize.x, OrigScreenSize.y);
193 CheckScreenSize
194 end;
195 'b': CheckBreak := not CheckBreak;
196 's': ScrollState := not ScrollState;
197 'i': if SimulateBlockCursorKind = High (SimulateBlockCursorKind) then
198 SimulateBlockCursorKind := Low (SimulateBlockCursorKind)
199 else
200 Inc (SimulateBlockCursorKind);
201 'u': case CursorShape of
202 CursorNormal: CursorShape := CursorBlock;
203 CursorFat,
204 CursorBlock : CursorShape := CursorHidden;
205 else CursorShape := CursorNormal
206 end;
207 end;
208 ClrScr;
209 StatusDraw
210end;
211
212procedure TextAttrDemo;
213var f, b, y, x1, y1, x2, y2, Fill, n1, n2, n3: Integer;
214begin
215 GetWindow (x1, y1, x2, y2);
216 Window (x1 - 1, y1, x2, y2);
217 TextColor (White);
218 TextBackground (Blue);
219 ClrScr;
220 SetScroll (False);
221 Fill := GetXMax - 32;
222 for y := 1 to GetYMax do
223 begin
224 GotoXY (1, y);
225 b := (y - 1) mod 16;
226 n1 := 0;
227 for f := 0 to 15 do
228 begin
229 TextAttr := f + 16 * b;
230 n2 := (Fill * (1 + 2 * f) + 16) div 32;
231 n3 := (Fill * (2 + 2 * f) + 16) div 32;
232 Write ('' : n2 - n1, NumericBaseDigitsUpper[b], NumericBaseDigitsUpper[f], '' : n3 - n2);
233 n1 := n3
234 end
235 end
236end;
237
238procedure CharSetDemo (UsePCCharSet: Boolean);
239var h, l, y, x1, y1, x2, y2, Fill, n1, n2: Integer;
240begin
241 GetWindow (x1, y1, x2, y2);
242 Window (x1 - 1, y1, x2, y2);
243 ClrScr;
244 SetScroll (False);
245 SetPCCharSet (UsePCCharSet);
246 SetControlChars (False);
247 Fill := GetXMax - 35;
248 for y := 1 to GetYMax do
249 begin
250 GotoXY (1, y);
251 h := (y - 2) mod 16;
252 n1 := (Fill + 9) div 18;
253 if y = 1 then
254 Write ('' : 3 + n1)
255 else
256 Write (16 * h : 3 + n1);
257 for l := 0 to 15 do
258 begin
259 n2 := (Fill * (2 + l) + 9) div 18;
260 if y = 1 then
261 Write ('' : n2 - n1, l : 2)
262 else
263 Write ('' : n2 - n1 + 1, Chr (16 * h + l));
264 n1 := n2
265 end
266 end
267end;
268
269procedure NormalCharSetDemo;
270begin
271 CharSetDemo (False)
272end;
273
274procedure PCCharSetDemo;
275begin
276 CharSetDemo (True)
277end;
278
279procedure FKeyDemoDraw;
280var x1, y1, x2, y2: Integer;
281begin
282 GetWindow (x1, y1, x2, y2);
283 Window (x1, y1, x2 - 1, y2);
284 ClrScr;
285 SetScroll (False);
286 WriteLn ('You can type the following keys');
287 WriteLn ('(function keys if present on the');
288 WriteLn ('terminal, letters as alternatives):');
289 GotoXY (1, 4);
290 WriteLn ('S, Left : left (wrap-around)');
291 WriteLn ('D, Right : right (wrap-around)');
292 WriteLn ('E, Up : up (wrap-around)');
293 WriteLn ('X, Down : down (wrap-around)');
294 WriteLn ('A, Home : go to first column');
295 WriteLn ('F, End : go to last column');
296 WriteLn ('R, Page Up : go to first line');
297 WriteLn ('C, Page Down: go to last line');
298 WriteLn ('Y, Ctrl-PgUp: first column and line');
299 GotoXY (1, 13);
300 WriteLn ('B, Ctrl-PgDn: last column and line');
301 WriteLn ('Z, Ctrl-Home: clear screen');
302 WriteLn ('N, Ctrl-End : clear to end of line');
303 WriteLn ('V, Insert : insert a line');
304 WriteLn ('T, Delete : delete a line');
305 WriteLn ('# : beep');
306 WriteLn ('* : flash');
307 WriteLn ('Tab, Enter, Backspace, other');
308 WriteLn (' normal characters: write text')
309end;
310
311procedure FKeyDemoKey (Key: TKey);
312const TabSize = 8;
313var
314 ch: Char;
315 NewX: Integer;
316begin
317 case LoCaseKey (Key) of
318 Ord ('s'), kbLeft : if WhereX = 1 then GotoXY (GetXMax, WhereY) else GotoXY (WhereX - 1, WhereY);
319 Ord ('d'), kbRight : if WhereX = GetXMax then GotoXY (1, WhereY) else GotoXY (WhereX + 1, WhereY);
320 Ord ('e'), kbUp : if WhereY = 1 then GotoXY (WhereX, GetYMax) else GotoXY (WhereX, WhereY - 1);
321 Ord ('x'), kbDown : if WhereY = GetYMax then GotoXY (WhereX, 1) else GotoXY (WhereX, WhereY + 1);
322 Ord ('a'), kbHome : Write (chCR);
323 Ord ('f'), kbEnd : GotoXY (GetXMax, WhereY);
324 Ord ('r'), kbPgUp : GotoXY (WhereX, 1);
325 Ord ('c'), kbPgDn : GotoXY (WhereX, GetYMax);
326 Ord ('y'), kbCtrlPgUp: GotoXY (1, 1);
327 Ord ('b'), kbCtrlPgDn: GotoXY (GetXMax, GetYMax);
328 Ord ('z'), kbCtrlHome: ClrScr;
329 Ord ('n'), kbCtrlEnd : ClrEOL;
330 Ord ('v'), kbIns : InsLine;
331 Ord ('t'), kbDel : DelLine;
332 Ord ('#') : Beep;
333 Ord ('*') : Flash;
334 kbTab : begin
335 NewX := ((WhereX - 1) div TabSize + 1) * TabSize + 1;
336 if NewX <= GetXMax then GotoXY (NewX, WhereY) else WriteLn
337 end;
338 kbCR : WriteLn;
339 kbBkSp : Write (chBkSp, ' ', chBkSp);
340 else ch := Key2Char (Key);
341 if ch <> #0 then Write (ch)
342 end
343end;
344
345procedure KeyDemoDraw;
346begin
347 WriteLn ('Press some keys ...')
348end;
349
350procedure KeyDemoKey (Key: TKey);
351var ch: Char;
352begin
353 ch := Key2Char (Key);
354 if ch <> #0 then
355 begin
356 Write ('Normal key');
357 if IsPrintable (ch) then Write (' `', ch, '''');
358 WriteLn (', ASCII #', Ord (ch))
359 end
360 else
361 WriteLn ('Special key ', Ord (Key2Scan (Key)))
362end;
363
364procedure IOSelectPeriodical;
365var
366 CurrentTime: TimeStamp;
367 s: String (8);
368 i: Integer;
369begin
370 GetTimeStamp (CurrentTime);
371 with CurrentTime do
372 WriteStr (s, Hour : 2, ':', Minute : 2, ':', Second : 2);
373 for i := 1 to Length (s) do
374 if s[i] = ' ' then s[i] := '0';
375 GotoXY (1, 12);
376 Write ('The time is: ', s)
377end;
378
379procedure IOSelectDraw;
380begin
381 WriteLn ('IOSelect is a way to handle I/O from');
382 WriteLn ('or to several places simultaneously,');
383 WriteLn ('without having to use threads or');
384 WriteLn ('signal/interrupt handlers or waste');
385 WriteLn ('CPU time with busy waiting.');
386 WriteLn;
387 WriteLn ('This demo shows how IOSelect works');
388 WriteLn ('in connection with CRT. It displays');
389 WriteLn ('a clock, but still reacts to user');
390 WriteLn ('input immediately.');
391 IOSelectPeriodical
392end;
393
394procedure ModifierPeriodical;
395const
396 Pressed: array [Boolean] of String [8] = ('Released', 'Pressed');
397 ModifierNames: array [1 .. 7] of record
398 Modifier: Integer;
399 Name: String (17)
400 end =
401 ((shLeftShift, 'Left Shift'),
402 (shRightShift, 'Right Shift'),
403 (shLeftCtrl, 'Left Control'),
404 (shRightCtrl, 'Right Control'),
405 (shAlt, 'Alt (left)'),
406 (shAltGr, 'AltGr (right Alt)'),
407 (shExtra, 'Extra'));
408var
409 ShiftState, i: Integer;
410begin
411 ShiftState := GetShiftState;
412 for i := 1 to 7 do
413 with ModifierNames[i] do
414 begin
415 GotoXY (1, 4 + i);
416 ClrEOL;
417 Write (Name, ':');
418 GotoXY (20, WhereY);
419 Write (Pressed[(ShiftState and Modifier) <> 0])
420 end
421end;
422
423procedure ModifierDraw;
424begin
425 WriteLn ('Modifier keys (NOTE: only');
426 WriteLn ('available on some systems;');
427 WriteLn ('X11: only after key press):');
428 ModifierPeriodical
429end;
430
431procedure ChecksDraw;
432begin
433 WriteLn ('(O)S shell');
434 WriteLn ('OS shell with (C)learing');
435 WriteLn ('(R)efresh check');
436 Write ('(S)ound check')
437end;
438
439procedure ChecksKey (Key: TKey);
440var
441 i, j: Integer;
442 WasteTime: Real; attribute (volatile);
443
444 procedure DoOSShell;
445 var
446 Result: Integer;
447 Shell: TString;
448 begin
449 Shell := GetShellPath (Null);
450 {$I-}
451 Result := Execute (Shell);
452 {$I+}
453 if (InOutRes <> 0) or (Result <> 0) then
454 begin
455 ClrScr;
456 if InOutRes <> 0 then
457 WriteLn (GetIOErrorMessage, ' while trying to execute `', Shell, '''.')
458 else
459 WriteLn ('`', Shell, ''' returned status ', Result, '.');
460 Write ('Any key to continue.');
461 BlockCursor;
462 Discard (GetKey (-1))
463 end
464 end;
465
466begin
467 case LoCase (Key2Char (Key)) of
468 'o': begin
469 if PopUpConfirm (36, 12, 'You will now get an OS shell. Unless' + NewLine +
470 'CRTDemo is running in its own (GUI)' + NewLine +
471 'window, the shell will run on the' + NewLine +
472 'same screen as CRTDemo which is not' + NewLine +
473 'cleared before the shell is started.' + NewLine +
474 'If possible, the screen contents are' + NewLine +
475 'restored to the state before CRTDemo' + NewLine +
476 'was started. After leaving the shell' + NewLine +
477 'in the usual way (usually by enter-' + NewLine +
478 'ing `exit''), you will get back to' + NewLine +
479 'the demo. <ESC> to abort, any other' + NewLine +
480 'key to start.') then
481 begin
482 RestoreTerminal (True);
483 DoOSShell
484 end;
485 ClosePopUpWindow
486 end;
487 'c': begin
488 if PopUpConfirm (36, 9, 'You will now get an OS shell. Unless' + NewLine +
489 'CRTDemo is running in its own (GUI)' + NewLine +
490 'window, the screen will be cleared,' + NewLine +
491 'and the cursor will be moved to the' + NewLine +
492 'top before the shell is started.' + NewLine +
493 'After leaving the shell in the usual' + NewLine +
494 'way (usually by entering `exit''),' + NewLine +
495 'you will get back to the demo. <ESC>' + NewLine +
496 'to abort, any other key to start.') then
497 begin
498 RestoreTerminalClearCRT;
499 DoOSShell
500 end;
501 ClosePopUpWindow
502 end;
503 'r': begin
504 if PopUpConfirm (36, 11, 'The program will now get busy with' + NewLine +
505 'some dummy computations. However,' + NewLine +
506 'CRT output in the form of dots will' + NewLine +
507 'still appear continuously one by one' + NewLine +
508 '(rather than the whole line at once' + NewLine +
509 'in the end). While running, the test' + NewLine +
510 'cannot be interrupted. <ESC> to' + NewLine +
511 'abort, any other key to start.') then
512 begin
513 SetCRTUpdate (UpdateRegularly);
514 BlockCursor;
515 WriteLn;
516 WriteLn;
517 for i := 1 to GetXMax - 2 do
518 begin
519 Write ('.');
520 for j := 1 to 400000 do WasteTime := Random
521 end;
522 SetCRTUpdate (UpdateInput);
523 WriteLn;
524 Write ('Press any key.');
525 Discard (GetKey (-1))
526 end;
527 ClosePopUpWindow
528 end;
529 's': begin
530 if PopUpConfirm (32, 4, 'You will now hear some sounds if' + NewLine +
531 'supported (otherwise there will' + NewLine +
532 'just be a short pause). <ESC> to' + NewLine +
533 'abort, any other key to start.') then
534 begin
535 BlockCursor;
536 for i := 0 to 7 do
537 begin
538 Sound (Round (440 * 2 ** (Round (i * 12 / 7 + 0.3) / 12)));
539 if GetKey (400000) in [kbEsc, kbAltEsc] then Break
540 end;
541 NoSound
542 end;
543 ClosePopUpWindow
544 end;
545 end
546end;
547
548type
549 PWindowList = ^TWindowList;
550 TWindowList = record
551 Next, Prev: PWindowList;
552 Panel, FramePanel: TPanel;
553 WindowType: Integer;
554 x1, y1, xs, ys: Integer;
555 State: (ws_None, ws_Moving, ws_Resizing);
556 end;
557
558TKeyProc = procedure (Key: TKey);
559TProcedure = procedure;
560
561const
562 MenuNameLength = 16;
563 WindowTypes: array [0 .. 9] of record
564 DrawProc,
565 PeriodicalProc: procedure;
566 KeyProc : TKeyProc;
567 Name : String (MenuNameLength);
568 Color,
569 Background,
570 MinSizeX,
571 MinSizeY,
572 PrefSizeX,
573 PrefSizeY : Integer;
574 RedrawAlways,
575 WantCursor : Boolean
576 end =
577((MainDraw , nil , nil , 'CRT Demo' , LightGreen, Blue , 26, 7, 0, 0, False, False),
578 (StatusDraw , nil , StatusKey , 'Status' , White , Red , 38, 16, 0, 0, True, True),
579 (TextAttrDemo , nil , nil , 'Text Attributes' , White , Blue , 32, 16, 64, 16, False, False),
580 (NormalCharSetDemo, nil , nil , 'Character Set' , Black , Green , 35, 17, 53, 17, False, False),
581 (PCCharSetDemo , nil , nil , 'PC Character Set', Black , Brown , 35, 17, 53, 17, False, False),
582 (KeyDemoDraw , nil , KeyDemoKey , 'Keys' , Blue , LightGray, 29, 5, -1, -1, False, True),
583 (FKeyDemoDraw , nil , FKeyDemoKey, 'Function Keys' , Blue , LightGray, 37, 22, -1, -1, False, True),
584 (ModifierDraw , ModifierPeriodical, nil , 'Modifier Keys' , Black , Cyan , 29, 11, 0, 0, True, False),
585 (IOSelectDraw , IOSelectPeriodical, nil , 'IOSelect Demo' , White , Magenta , 38, 12, 0, 0, False, False),
586 (ChecksDraw , nil , ChecksKey , 'Various Checks' , Black , Red , 26, 4, 0, 0, False, False));
587
588MenuMax = High (WindowTypes);
589MenuXSize = MenuNameLength + 4;
590MenuYSize = MenuMax + 2;
591
592var
593 WindowList: PWindowList = nil;
594
595 procedure RedrawFrame (p: PWindowList);
596 begin
597 with p^, WindowTypes[WindowType] do
598 begin
599 PanelActivate (FramePanel);
600 Window (x1, y1, x1 + xs - 1, y1 + ys - 1);
601 ClrScr;
602 case State of
603 ws_None : if p = WindowList then
604 FrameWin (' ' + Name + ' ', DoubleFrame, True)
605 else
606 FrameWin (' ' + Name + ' ', SingleFrame, False);
607 ws_Moving : FrameWin (' Move Window ', SingleFrame, True);
608 ws_Resizing: FrameWin (' Resize Window ', SingleFrame, True);
609 end
610 end
611 end;
612
613 procedure DrawWindow (p: PWindowList);
614 begin
615 with p^, WindowTypes[WindowType] do
616 begin
617 RedrawFrame (p);
618 PanelActivate (Panel);
619 Window (x1 + 2, y1 + 1, x1 + xs - 2, y1 + ys - 2);
620 ClrScr;
621 DrawProc
622 end
623 end;
624
625 procedure RedrawAll;
626 var
627 LastPanel: TPanel;
628 p: PWindowList;
629 x2, y2: Integer;
630 begin
631 LastPanel := GetActivePanel;
632 PanelActivate (MainPanel);
633 TextBackground (Blue);
634 ClrScr;
635 p := WindowList;
636 if p <> nil then
637 repeat
638 with p^ do
639 begin
640 PanelActivate (FramePanel);
641 GetWindow (x1, y1, x2, y2); { updated automatically by CRT }
642 xs := x2 - x1 + 1;
643 ys := y2 - y1 + 1
644 end;
645 DrawWindow (p);
646 p := p^.Next
647 until p = WindowList;
648 PanelActivate (LastPanel)
649 end;
650
651 procedure CheckScreenSize;
652 var
653 LastPanel: TPanel;
654 MinScreenSizeX, MinScreenSizeY, i: Integer;
655 SSize: TPoint;
656 begin
657 LastPanel := GetActivePanel;
658 PanelActivate (MainPanel);
659 HideCursor;
660 MinScreenSizeX := MenuXSize;
661 MinScreenSizeY := MenuYSize;
662 for i := Low (WindowTypes) to High (WindowTypes) do
663 with WindowTypes[i] do
664 begin
665 MinScreenSizeX := Max (MinScreenSizeX, MinSizeX + 2);
666 MinScreenSizeY := Max (MinScreenSizeY, MinSizeY + 2)
667 end;
668 SSize := ScreenSize;
669 Window (1, 1, SSize.x, SSize.y);
670 if (SSize.x < MinScreenSizeX) or (SSize.y < MinScreenSizeY) then
671 begin
672 NormVideo;
673 ClrScr;
674 RestoreTerminal (True);
675 WriteLn (StdErr, 'Sorry, your screen is too small for this demo (', SSize.x, 'x', SSize.y, ').');
676 WriteLn (StdErr, 'You need at least ', MinScreenSizeX, 'x', MinScreenSizeY, ' characters.');
677 Halt (2)
678 end;
679 PanelActivate (LastPanel);
680 RedrawAll
681 end;
682
683 procedure Die; attribute (noreturn);
684 begin
685 NoSound;
686 RestoreTerminalClearCRT;
687 WriteLn (StdErr, 'You''re trying to kill me. Since I have break checking turned off,');
688 WriteLn (StdErr, 'I''m not dying, but I''ll do you a favour and terminate now.');
689 Halt (3)
690 end;
691
692 function GetKey (TimeOut: Integer) = Key: TKey;
693 var
694 NeedSelect, SelectValue: Integer;
695 SimulateBlockCursorCurrent: TSimulateBlockCursorKind;
696 SelectInput: array [1 .. 1] of PAnyFile = (@Input);
697 NextSelectTime: MicroSecondTimeType = 0; attribute (static);
698 TimeOutTime: MicroSecondTimeType;
699 LastPanel: TPanel;
700 p: PWindowList;
701 begin
702 LastPanel := GetActivePanel;
703 if TimeOut < 0 then
704 TimeOutTime := High (TimeOutTime)
705 else
706 TimeOutTime := GetMicroSecondTime + TimeOut;
707 NeedSelect := 0;
708 if TimeOut >= 0 then
709 Inc (NeedSelect);
710 SimulateBlockCursorCurrent := SimulateBlockCursorKind;
711 if SimulateBlockCursorCurrent <> bc_None then
712 Inc (NeedSelect);
713 p := WindowList;
714 repeat
715 if @WindowTypes[p^.WindowType].PeriodicalProc <> nil then
716 Inc (NeedSelect);
717 p := p^.Next
718 until p = WindowList;
719 p := WindowList;
720 repeat
721 with p^, WindowTypes[WindowType] do
722 if RedrawAlways then
723 begin
724 PanelActivate (Panel);
725 ClrScr;
726 DrawProc
727 end;
728 p := p^.Next
729 until p = WindowList;
730 if NeedSelect <> 0 then
731 repeat
732 CRTUpdate;
733 SelectValue := IOSelectRead (SelectInput, Max (0, Min (NextSelectTime, TimeOutTime) - GetMicroSecondTime));
734 if SelectValue = 0 then
735 begin
736 case SimulateBlockCursorCurrent of
737 bc_None : ;
738 bc_Blink : SimulateBlockCursor;
739 bc_Static: begin
740 SimulateBlockCursor;
741 SimulateBlockCursorCurrent := bc_None;
742 Dec (NeedSelect)
743 end
744 end;
745 NextSelectTime := GetMicroSecondTime + 120000;
746 p := WindowList;
747 repeat
748 with p^, WindowTypes[WindowType] do
749 if @PeriodicalProc <> nil then
750 begin
751 PanelActivate (Panel);
752 PeriodicalProc
753 end;
754 p := p^.Next
755 until p = WindowList
756 end;
757 until (NeedSelect = 0) or (SelectValue <> 0) or ((TimeOut >= 0) and (GetMicroSecondTime >= TimeOutTime));
758 if NeedSelect = 0 then
759 SelectValue := 1;
760 if SelectValue = 0 then
761 Key := 0
762 else
763 Key := ReadKeyWord;
764 if SimulateBlockCursorKind <> bc_None then
765 SimulateBlockCursorOff;
766 if IsDeadlySignal (Key) then Die;
767 if Key = kbScreenSizeChanged then CheckScreenSize;
768 PanelActivate (LastPanel)
769 end;
770
771 function Menu = n: Integer;
772 var
773 i, ax, ay: Integer;
774 Key: TKey;
775 Done: Boolean;
776 SSize: TPoint;
777 begin
778 n := 1;
779 repeat
780 SSize := ScreenSize;
781 ax := (SSize.x - MenuXSize) div 2 + 1;
782 ay := (SSize.y - MenuYSize) div 2 + 1;
783 PanelNew (ax, ay, ax + MenuXSize - 1, ay + MenuYSize - 1, False);
784 SetControlChars (True);
785 TextColor (Blue);
786 TextBackground (LightGray);
787 FrameWin (' Select Window ', DoubleFrame, True);
788 IgnoreCursor;
789 PanelNew (ax + 1, ay + 1, ax + MenuXSize - 2, ay + MenuYSize - 2, False);
790 ClrScr;
791 TextColor (Black);
792 SetScroll (False);
793 Done := False;
794 repeat
795 for i := 1 to MenuMax do
796 begin
797 GotoXY (1, i);
798 if i = n then
799 TextBackground (Green)
800 else
801 TextBackground (LightGray);
802 ClrEOL;
803 Write (' ', WindowTypes[i].Name);
804 ChangeTextAttr (2, i, 1, Red + $10 * GetTextBackground)
805 end;
806 Key := GetKey (-1);
807 case LoCaseKey (Key) of
808 kbUp : if n = 1 then n := MenuMax else Dec (n);
809 kbDown : if n = MenuMax then n := 1 else Inc (n);
810 kbHome,
811 kbPgUp,
812 kbCtrlPgUp,
813 kbCtrlHome : n := 1;
814 kbEnd,
815 kbPgDn,
816 kbCtrlPgDn,
817 kbCtrlEnd : n := MenuMax;
818 kbCR : Done := True;
819 kbEsc, kbAltEsc : begin
820 n := -1;
821 Done := True
822 end;
823 Ord ('a') .. Ord ('z'): begin
824 i := MenuMax;
825 while (i > 0) and (LoCase (Key2Char (Key)) <> LoCase (WindowTypes[i].Name[1])) do Dec (i);
826 if i > 0 then
827 begin
828 n := i;
829 Done := True
830 end
831 end;
832 end
833 until Done or (Key = kbScreenSizeChanged);
834 ClosePopUpWindow
835 until Key <> kbScreenSizeChanged
836 end;
837
838 procedure NewWindow (WindowType, ax, ay: Integer);
839 var
840 p, LastWindow: PWindowList;
841 MaxX1, MaxY1: Integer;
842 SSize: TPoint;
843 begin
844 New (p);
845 if WindowList = nil then
846 begin
847 p^.Prev := p;
848 p^.Next := p
849 end
850 else
851 begin
852 p^.Prev := WindowList;
853 p^.Next := WindowList^.Next;
854 p^.Prev^.Next := p;
855 p^.Next^.Prev := p;
856 end;
857 p^.WindowType := WindowType;
858 with p^, WindowTypes[WindowType] do
859 begin
860 SSize := ScreenSize;
861 if PrefSizeX > 0 then xs := PrefSizeX else xs := MinSizeX;
862 if PrefSizeY > 0 then ys := PrefSizeY else ys := MinSizeY;
863 xs := Min (xs + 2, SSize.x);
864 ys := Min (ys + 2, SSize.y);
865 MaxX1 := SSize.x - xs + 1;
866 MaxY1 := SSize.y - ys + 1;
867 if ax = 0 then x1 := Random (MaxX1) + 1 else x1 := Min (ax, MaxX1);
868 if ay = 0 then y1 := Random (MaxY1) + 1 else y1 := Min (ay, MaxY1);
869 if (ax = 0) and (PrefSizeX < 0) then Inc (xs, Random (SSize.x - x1 - xs + 2));
870 if (ax = 0) and (PrefSizeY < 0) then Inc (ys, Random (SSize.y - y1 - ys + 2));
871 State := ws_None;
872 PanelNew (1, 1, 1, 1, False);
873 FramePanel := GetActivePanel;
874 SetControlChars (True);
875 TextColor (Color);
876 TextBackground (Background);
877 PanelNew (1, 1, 1, 1, False);
878 SetPCCharSet (False);
879 Panel := GetActivePanel;
880 end;
881 LastWindow := WindowList;
882 WindowList := p;
883 if LastWindow <> nil then RedrawFrame (LastWindow);
884 DrawWindow (p)
885 end;
886
887 procedure OpenWindow;
888 var WindowType: Integer;
889 begin
890 WindowType := Menu;
891 if WindowType >= 0 then NewWindow (WindowType, 0, 0)
892 end;
893
894 procedure NextWindow;
895 var LastWindow: PWindowList;
896 begin
897 LastWindow := WindowList;
898 WindowList := WindowList^.Next;
899 PanelTop (WindowList^.FramePanel);
900 PanelTop (WindowList^.Panel);
901 RedrawFrame (LastWindow);
902 RedrawFrame (WindowList)
903 end;
904
905 procedure PreviousWindow;
906 var LastWindow: PWindowList;
907 begin
908 PanelMoveAbove (WindowList^.Panel, MainPanel);
909 PanelMoveAbove (WindowList^.FramePanel, MainPanel);
910 LastWindow := WindowList;
911 WindowList := WindowList^.Prev;
912 RedrawFrame (LastWindow);
913 RedrawFrame (WindowList)
914 end;
915
916 procedure CloseWindow;
917 var p: PWindowList;
918 begin
919 if WindowList^.WindowType <> 0 then
920 begin
921 p := WindowList;
922 NextWindow;
923 PanelDelete (p^.FramePanel);
924 PanelDelete (p^.Panel);
925 p^.Next^.Prev := p^.Prev;
926 p^.Prev^.Next := p^.Next;
927 Dispose (p)
928 end
929 end;
930
931 procedure MoveWindow;
932 var
933 Done, Changed: Boolean;
934 SSize: TPoint;
935 begin
936 with WindowList^ do
937 begin
938 Done := False;
939 Changed := True;
940 State := ws_Moving;
941 repeat
942 if Changed then DrawWindow (WindowList);
943 Changed := True;
944 case LoCaseKey (GetKey (-1)) of
945 Ord ('s'), kbLeft : if x1 > 1 then Dec (x1);
946 Ord ('d'), kbRight : if x1 + xs - 1 < ScreenSize.x then Inc (x1);
947 Ord ('e'), kbUp : if y1 > 1 then Dec (y1);
948 Ord ('x'), kbDown : if y1 + ys - 1 < ScreenSize.y then Inc (y1);
949 Ord ('a'), kbHome : x1 := 1;
950 Ord ('f'), kbEnd : x1 := ScreenSize.x - xs + 1;
951 Ord ('r'), kbPgUp : y1 := 1;
952 Ord ('c'), kbPgDn : y1 := ScreenSize.y - ys + 1;
953 Ord ('y'), kbCtrlPgUp: begin
954 x1 := 1;
955 y1 := 1
956 end;
957 Ord ('b'), kbCtrlPgDn: begin
958 SSize := ScreenSize;
959 x1 := SSize.x - xs + 1;
960 y1 := SSize.y - ys + 1
961 end;
962 kbCR,
963 kbEsc, kbAltEsc : Done := True;
964 else Changed := False
965 end
966 until Done;
967 State := ws_None;
968 DrawWindow (WindowList)
969 end
970 end;
971
972 procedure ResizeWindow;
973 var
974 Done, Changed: Boolean;
975 SSize: TPoint;
976 begin
977 with WindowList^, WindowTypes[WindowType] do
978 begin
979 Done := False;
980 Changed := True;
981 State := ws_Resizing;
982 repeat
983 if Changed then DrawWindow (WindowList);
984 Changed := True;
985 case LoCaseKey (GetKey (-1)) of
986 Ord ('s'), kbLeft : if xs > MinSizeX + 2 then Dec (xs);
987 Ord ('d'), kbRight : if x1 + xs - 1 < ScreenSize.x then Inc (xs);
988 Ord ('e'), kbUp : if ys > MinSizeY + 2 then Dec (ys);
989 Ord ('x'), kbDown : if y1 + ys - 1 < ScreenSize.y then Inc (ys);
990 Ord ('a'), kbHome : xs := MinSizeX + 2;
991 Ord ('f'), kbEnd : xs := ScreenSize.x - x1 + 1;
992 Ord ('r'), kbPgUp : ys := MinSizeY + 2;
993 Ord ('c'), kbPgDn : ys := ScreenSize.y - y1 + 1;
994 Ord ('y'), kbCtrlPgUp: begin
995 xs := MinSizeX + 2;
996 ys := MinSizeY + 2
997 end;
998 Ord ('b'), kbCtrlPgDn: begin
999 SSize := ScreenSize;
1000 xs := SSize.x - x1 + 1;
1001 ys := SSize.y - y1 + 1
1002 end;
1003 kbCR,
1004 kbEsc, kbAltEsc : Done := True;
1005 else Changed := False
1006 end
1007 until Done;
1008 State := ws_None;
1009 DrawWindow (WindowList)
1010 end
1011 end;
1012
1013 procedure ActivateCursor;
1014 begin
1015 with WindowList^, WindowTypes[WindowType] do
1016 begin
1017 PanelActivate (Panel);
1018 if WantCursor then
1019 SetCursorShape (CursorShape)
1020 else
1021 HideCursor
1022 end;
1023 SetScroll (ScrollState)
1024 end;
1025
1026var
1027 Key: TKey;
1028 ScreenShot, Done: Boolean;
1029
1030begin
1031 ScreenShot := ParamStr (1) = '--screenshot';
1032 if ParamCount <> Ord (ScreenShot) then
1033 begin
1034 RestoreTerminal (True);
1035 WriteLn (StdErr, ParamStr (0), ': invalid argument `', ParamStr (Ord (ScreenShot) + 1), '''');
1036 Halt (1)
1037 end;
1038 CRTSavePreviousScreen (True);
1039 SetCRTUpdate (UpdateInput);
1040 MainPanel := GetActivePanel;
1041 CheckScreenSize;
1042 OrigScreenSize := ScreenSize;
1043 if ScreenShot then
1044 begin
1045 CursorShape := CursorBlock;
1046 NewWindow (6, 1, 1);
1047 NewWindow (2, 1, MaxInt);
1048 NewWindow (8, MaxInt, 1);
1049 NewWindow (5, 1, 27);
1050 KeyDemoKey (Ord ('f'));
1051 KeyDemoKey (246);
1052 KeyDemoKey (kbDown);
1053 NewWindow (3, MaxInt, 13);
1054 NewWindow (4, MaxInt, 31);
1055 NewWindow (7, MaxInt, MaxInt);
1056 NewWindow (9, MaxInt, 33);
1057 NewWindow (0, 1, 2);
1058 NewWindow (1, 1, 14);
1059 ActivateCursor;
1060 OpenWindow
1061 end
1062 else
1063 NewWindow (0, 3, 2);
1064 Done := False;
1065 repeat
1066 ActivateCursor;
1067 Key := GetKey (-1);
1068 case LoCaseKey (Key) of
1069 Ord ('3'), kbF3 : OpenWindow;
1070 Ord ('4'), kbF4 : CloseWindow;
1071 Ord ('5'), kbF5 : PreviousWindow;
1072 Ord ('6'), kbF6 : NextWindow;
1073 Ord ('7'), kbF7 : MoveWindow;
1074 Ord ('8'), kbF8 : ResizeWindow;
1075 Ord ('q'), kbEsc,
1076 kbAltEsc: Done := True;
1077 else
1078 if WindowList <> nil then
1079 with WindowList^, WindowTypes[WindowType] do
1080 if @KeyProc <> nil then
1081 begin
1082 TextColor (Color);
1083 TextBackground (Background);
1084 KeyProc (Key)
1085 end
1086 end
1087 until Done
1088end.
diff --git a/test/indent/prolog.prolog b/test/indent/prolog.prolog
index 6cb5535fe8d..8af21877b59 100644
--- a/test/indent/prolog.prolog
+++ b/test/indent/prolog.prolog
@@ -200,7 +200,7 @@ elaborate(fix(F,T,B,E), Env, Ee) :-
200 elaborate(let(F,T,app(fix,lambda(F,T,B)),E), Env, Ee). 200 elaborate(let(F,T,app(fix,lambda(F,T,B)),E), Env, Ee).
201 201
202%% elab_bindings(+TS, +Env, -TS). 202%% elab_bindings(+TS, +Env, -TS).
203%% Applique `elaborate' sur l'environnment de type TS. 203%% Applique `elaborate' sur l'environnement de type TS.
204elab_tenv([], _, []). 204elab_tenv([], _, []).
205elab_tenv([(X,T)|TS], Env, [(X, Tg)|TSe]) :- 205elab_tenv([(X,T)|TS], Env, [(X, Tg)|TSe]) :-
206 elaborate(T, Env, Te), 206 elaborate(T, Env, Te),
diff --git a/update-subdirs b/update-subdirs
index dfd594ae781..fadbab84e20 100755
--- a/update-subdirs
+++ b/update-subdirs
@@ -41,8 +41,7 @@ if [ "x$subdirs" = x ]; then
41 rm -f subdirs.el 41 rm -f subdirs.el
42else 42else
43 rm -f subdirs.el~ 43 rm -f subdirs.el~
44 echo ";; -*- no-byte-compile: t -*- 44 echo ";; In load-path, after this directory should come
45;; In load-path, after this directory should come
46;; certain of its subdirectories. Here we specify them. 45;; certain of its subdirectories. Here we specify them.
47(normal-top-level-add-to-load-path '($subdirs)) 46(normal-top-level-add-to-load-path '($subdirs))
48;; Local" "Variables: 47;; Local" "Variables: