summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 @@
+2011-12-17 Paul Eggert <eggert@cs.ucla.edu>
+
+ Port HAVE_PTHREAD configuration to MirBSD 10 (Bug#10201).
+ * configure.in (HAVE_PTHREAD): Check for pthread_atfork if linking
+ to gmalloc.c. This should prevent a MirBSD 10 build failure reported
+ by Nelson H. F. Beebe in
+ <http://lists.gnu.org/archive/html/emacs-devel/2011-12/msg00065.html>.
+
+2011-12-10 Juanma Barranquero <lekktu@gmail.com>
+
+ * update-subdirs: Don't set no-byte-compile twice (bug#10260).
+
+2011-12-10 Jan Djärv <jan.h.d@swipnet.se>
+
+ * configure.in (HAVE_ALSA, HAVE_GSETTINGS): Save and restore LIBS
+ instead of LDFLAGS (Bug#10230).
+
2011-12-03 Paul Eggert <eggert@cs.ucla.edu>
* INSTALL.BZR: Mention configure -C, --disable-maintainer-mode.
@@ -2245,7 +2262,7 @@
2009-12-10 Jan Djärv <jan.h.d@swipnet.se>
- * configure.in: Check for RSVG if GNUStep is used.
+ * configure.in: Check for RSVG if GNUstep is used.
2009-12-09 Jan Djärv <jan.h.d@swipnet.se>
@@ -2430,7 +2447,7 @@
2009-05-06 Stefan Monnier <monnier@iro.umontreal.ca>
- * configure.in: Don't define CANNOT_DUMP for GNUStep any more.
+ * configure.in: Don't define CANNOT_DUMP for GNUstep any more.
2009-05-05 Per Starbäck <per@starback.se> (tiny change)
@@ -8171,7 +8188,7 @@
1994-01-08 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
* configure.in (creating src/Makefile): Put code inside 2nd arg to
- AC_OUTPUT as it should be; hopefully noone will again see fit to
+ AC_OUTPUT as it should be; hopefully no one will again see fit to
gratuitously break this and not make a change log entry.
Optimized sed processing of Makefile.in and cpp output; now
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
* BUGS
-** Does deleting frames run Lisp code? If so, can we get rid of that?
-It is a dangerous design.
-http://lists.gnu.org/archive/html/emacs-devel/2007-09/msg01330.html
-
-** Why were the calls to x_fully_uncatch_errors commented out in eval.c?
-http://lists.gnu.org/archive/html/emacs-devel/2007-09/msg01987.html
-
** rms: gnus-dired.el is a mistake. Those features should not
be part of Gnus. They should be moved to some other part of Emacs.
rsteib: 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:
`log-edit-comment-search-forward'. Perhaps search commands
on the global key binding `M-s' are useless in these modes.
-** sdl.web@gmail.com, 30 Oct: ps-lpr-switches has no effect
-http://lists.gnu.org/archive/html/emacs-devel/2007-10/msg02091.html
-
-Fixed by this change?
-
-2007-11-09 Vinicius Jose Latorre <viniciusjl@ig.com.br>
-
- * ps-print.el: [...]
- (ps-do-despool): If ps-lpr-switches is not a list, force it to be one.
-
-** In C, use EMACS_INT for variables and structure members
-for buffer/string positions. E.g. struct it, struct text_pos.
-
* DOCUMENTATION
-** Clean up Emacs.app references in code and documentation.
-
-** Document new font backend
-
** Document XEmbed support
** Check the Emacs Tutorial.
@@ -148,19 +124,19 @@ TUTORIAL.zh
** Check the manual.
-abbrevs.texi
+abbrevs.texi cyd
ack.texi
anti.texi
arevert-xtra.texi cyd
basic.texi cyd
buffers.texi cyd
-building.texi
+building.texi cyd
calendar.texi
cal-xtra.texi
cmdargs.texi
commands.texi cyd
custom.texi
-dired.texi
+dired.texi cyd
dired-xtra.texi
display.texi cyd
emacs.texi
@@ -177,7 +153,7 @@ indent.texi cyd
killing.texi cyd
kmacro.texi cyd
macos.texi
-maintaining.texi
+maintaining.texi cyd
major.texi
mark.texi cyd
mini.texi
@@ -188,16 +164,16 @@ msdog-xtra.texi
mule.texi
m-x.texi cyd
picture-xtra.texi
-programs.texi
+programs.texi cyd
regs.texi cyd
rmail.texi
screen.texi cyd
search.texi cyd
sending.texi
-text.texi
+text.texi cyd
trouble.texi
-vc-xtra.texi
-vc1-xtra.texi
+vc-xtra.texi cyd
+vc1-xtra.texi cyd
windows.texi cyd
xresources.texi
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
example, a SYMBOL might need to match \"foo\". Some TYPES will not
have matching criteria.
-LAMBDA is a lambda expression which is evaled with the text of the
+LAMBDA is a lambda expression which is evalled with the text of the
type when it is found. It is passed the list of all buffer text
elements found since the last lambda expression. It should return a
semantic 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 @@
;; Other Goals
%start FormalParameterList
-;; with the terminals stuff, I used the javacript.y names,
+;; with the terminals stuff, I used the javascript.y names,
;; but the semantic/wisent/java-tags.wy types
;; when possible
;; ------------------
diff --git a/autogen.sh b/autogen.sh
index d15817d0596..4778d6ca2ad 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -67,7 +67,7 @@ minor_version ()
## $1 = program
## $2 = minimum version.
-## Return 0 if program is present with version >= minumum version.
+## Return 0 if program is present with version >= minimum version.
## Return 1 if program is missing.
## Return 2 if program is present but too old.
## 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@
build_os = @build_os@
build_vendor = @build_vendor@
builddir = @builddir@
+cache_file = @cache_file@
canonical = @canonical@
configuration = @configuration@
datadir = @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
PKG_CHECK_MODULES(ALSA, $ALSA_MODULES, HAVE_ALSA=yes, HAVE_ALSA=no)
if test $HAVE_ALSA = yes; then
SAVE_CFLAGS="$CFLAGS"
- SAVE_LDFLAGS="$LDFLAGS"
+ SAVE_LIBS="$LIBS"
CFLAGS="$ALSA_CFLAGS $CFLAGS"
- LDFLAGS="$ALSA_LIBS $LDFLAGS"
+ LIBS="$ALSA_LIBS $LIBS"
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <asoundlib.h>]], [[snd_lib_error_set_handler (0);]])],
emacs_alsa_normal=yes,
emacs_alsa_normal=no)
@@ -1194,7 +1194,7 @@ if test "${with_sound}" != "no"; then
fi
CFLAGS="$SAVE_CFLAGS"
- LDFLAGS="$SAVE_LDFLAGS"
+ LIBS="$SAVE_LIBS"
LIBSOUND="$LIBSOUND $ALSA_LIBS"
CFLAGS_SOUND="$CFLAGS_SOUND $ALSA_CFLAGS"
AC_DEFINE(HAVE_ALSA, 1, [Define to 1 if ALSA is available.])
@@ -1685,7 +1685,7 @@ if test "$doug_lea_malloc" = "yes" ; then
## Use mmap directly for allocating larger buffers.
## FIXME this comes from src/s/{gnu,gnu-linux}.h:
## #ifdef DOUG_LEA_MALLOC; #undef REL_ALLOC; #endif
- ## Does the AC_FUNC_MMAP test below make this check unecessary?
+ ## Does the AC_FUNC_MMAP test below make this check unnecessary?
case "$opsys" in
gnu*) REL_ALLOC=no ;;
esac
@@ -1722,7 +1722,15 @@ dnl Check if pthreads is available.
LIB_PTHREAD=
AC_CHECK_HEADERS(pthread.h)
if test "$ac_cv_header_pthread_h"; then
- AC_CHECK_LIB(pthread, pthread_self, HAVE_PTHREAD=yes)
+ dnl gmalloc.c uses pthread_atfork, which is not available on older-style
+ dnl hosts such as MirBSD 10, so test for pthread_atfork instead of merely
+ dnl testing for pthread_self if Emacs uses gmalloc.c.
+ if test "$GMALLOC_OBJ" = gmalloc.o; then
+ emacs_pthread_function=pthread_atfork
+ else
+ emacs_pthread_function=pthread_self
+ fi
+ AC_CHECK_LIB(pthread, $emacs_pthread_function, HAVE_PTHREAD=yes)
fi
if test "$HAVE_PTHREAD" = yes; then
case "${canonical}" in
@@ -2089,12 +2097,12 @@ fi
if test "$HAVE_GSETTINGS" = "yes" || test "$HAVE_GCONF" = "yes"; then
SAVE_CFLAGS="$CFLAGS"
- SAVE_LDFLAGS="$LDFLAGS"
+ SAVE_LIBS="$LIBS"
CFLAGS="$SETTINGS_CFLAGS $CFLAGS"
- LDFLAGS="$SETTINGS_LIBS $LDFLAGS"
+ LIBS="$SETTINGS_LIBS $LIBS"
AC_CHECK_FUNCS([g_type_init])
CFLAGS="$SAVE_CFLAGS"
- LDFLAGS="$SAVE_LDFLAGS"
+ LIBS="$SAVE_LIBS"
fi
AC_SUBST(SETTINGS_CFLAGS)
AC_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 @@
+2011-12-26 Chong Yidong <cyd@gnu.org>
+
+ * dired.texi (Dired Enter, Misc Dired Features): Document
+ dired-use-ls-dired changes. Mention quit-window.
+ (Dired Navigation): Add index entries.
+ (Dired Visiting): Fix View Mode xref.
+ (Marks vs Flags): Prefer C-/ binding for undo.
+ (Subdirectories in Dired): Add xrefs.
+ (Misc Dired Features): Document some Emacs 24 changes. Add index
+ entries.
+
+ * abbrevs.texi (Abbrev Concepts): No need to mention abbrev-mode
+ variable, since it is explained in Minor Modes node.
+ (Defining Abbrevs): Copyedits.
+ (Expanding Abbrevs): State default of abbrev-all-caps. Prefer the
+ C-/ binding for undo.
+ (Dabbrev Customization): Add xrefs for case-fold-search and
+ case-replace.
+
+ * dired-xtra.texi (Subdir Switches): Add xref.
+
+ * maintaining.texi (VC Directory Commands): Mention quit-window.
+
+2011-12-25 Chong Yidong <cyd@gnu.org>
+
+ * maintaining.texi (Tags): Mention Semantic.
+ (Create Tags Table, Etags Regexps): Copyedits.
+ (Find Tag): Mention minibuffer completion.
+ (List Tags): Mention completion-at-point. Completion is actually
+ available in M-x list-tags.
+
+ * vc1-xtra.texi (VC Delete/Rename): Rename from Renaming and VC.
+ Document vc-delete-file.
+
+ * files.texi (Misc File Ops): Mention vc-delete-file.
+
+ * programs.texi (Symbol Completion): Mention completion-at-point
+ explicitly.
+
+2011-12-22 Chong Yidong <cyd@gnu.org>
+
+ * maintaining.texi (Change Log Commands): Don't specially mention
+ vc-update-change-log which is CVS-only.
+
+ * vc1-xtra.texi (Version Headers): Note that these are for
+ Subversion, CVS, etc. only.
+ (General VC Options): De-document vc-keep-workfiles. Fix
+ RCS-isms.
+
+2011-12-22 Eli Zaretskii <eliz@gnu.org>
+
+ * building.texi (Debugger Operation): Fix a typo: "@end iftext"
+ should be @end iftex".
+
+2011-12-21 Chong Yidong <cyd@gnu.org>
+
+ * maintaining.texi (Advanced C-x v v): Use fileset terminology.
+ (VC With A Merging VCS, VC Change Log): Add xref to VC Pull node.
+ (VC Pull): Mention vc-log-incoming.
+ (Log Buffer): Add CVS/RCS only disclaimer.
+
+ * vc1-xtra.texi (Remote Repositories): Update introduction.
+ (Local Version Control): Node deleted (obsolete with DVCSes).
+ (Remote Repositories, Version Backups): Node deleted. Move
+ documentation of vc-cvs-stay-local to CVS Options.
+ (CVS Options): Reduce verbosity of description of obscure CVS
+ locking feature.
+ (Making Revision Tags, Revision Tag Caveats): Merge into Revision
+ Tags node.
+ (Revision Tags): Move under Miscellaneous VC subsection.
+ (Change Logs and VC): Note that this is wrong for DVCSs.
+ De-document log entry manipulating features.
+ (Renaming and VC): Describe how it works on modern VCSes.
+
+ * files.texi (Misc File Ops): Mention vc-rename-file.
+
+ * programs.texi (Custom C Indent): Add index entries.
+
+2011-12-20 Alan Mackenzie <acm@muc.de>
+
+ * programs.texi (Motion in C): Update the description of C-M-a and
+ C-M-e, they now DTRT in enclosing scopes.
+ (Custom C Indent): Add @dfn{guessing} of the indentation style.
+
+2011-12-20 Chong Yidong <cyd@gnu.org>
+
+ * maintaining.texi (VCS Concepts): Add "working tree" terminology.
+ (Old Revisions): Use it.
+ (VCS Repositories): Add "distributed" terminology.
+ (Log Buffer): Remove duplicate description
+ about changesets. Fix "current VC fileset" ambiguity.
+ (Multi-User Branching): Node deleted.
+ (Branches, Switching Branches): Discuss decentralized version
+ control systems.
+ (VC Pull): New node.
+ (Merging): Document merging on decentralized systems.
+ (Creating Branches): Note that this is specific to CVS and related
+ systems.
+
+2011-12-19 Chong Yidong <cyd@gnu.org>
+
+ * maintaining.texi (VCS Merging, VCS Changesets): Index entries.
+ (VC Mode Line): Add index entry for "version control status".
+ (VC Undo): Use vc-revert instead of its vc-revert-buffer alias.
+ Document vc-revert-show-diff. De-document vc-rollback.
+ (VC Directory Mode): Rewrite introduction. Move prefix arg
+ documentation here from VC Directory Buffer node.
+ (VC Directory Buffer): Use a decentralized VCS example.
+ (VC Directory Commands): Use a table. Remove material duplicated
+ in previous nodes on multi-file VC filsets.
+
+2011-12-17 Chong Yidong <cyd@gnu.org>
+
+ * maintaining.texi (VCS Concepts): Make "revision" terminology
+ less CVS-specific.
+ (VC With A Merging VCS, VC With A Locking VCS): Add xref to
+ Registering node.
+ (Secondary VC Commands): Deleted. Promote subnodes.
+ (Log Buffer): Add command name for C-c C-c. Fix the name of the
+ log buffer. Add index entries.
+ (VCS Changesets, Types of Log File, VC With A Merging VCS): Use
+ "commit" terminology.
+ (Old Revisions): Move it to just before VC Change Log. "Tag" here
+ doesn't refer to tags tables. Note other possible forms of the
+ revision ID. C-x v = does not save.
+ (Registering): Note similarity to C-x v v action. Fix description
+ of how backends are chosen. De-document vc-default-init-revision.
+ (VC Change Log): Document C-x v l in VC-Dir buffer. Document RET
+ in root log buffers.
+
+2011-12-16 Chong Yidong <cyd@gnu.org>
+
+ * maintaining.texi (Version Control Systems): Drop Meta-CVS.
+ (Basic VC Editing): Remove redundant descriptions.
+ (VC With A Merging VCS): Make description more general instead of
+ CVS-specific.
+ (VC With A Locking VCS): Use VC fileset terminology.
+
+2011-12-12 Chong Yidong <cyd@gnu.org>
+
+ * building.texi (Executing Lisp): Fix xref for C-M-x.
+ (Lisp Libraries): Add xref to node explaining `load' in Lisp
+ manual. Note that load-path is not customizable.
+ (Lisp Eval): Note that listed commands are available globally.
+ Explain the meaning of "defun" in the C-M-x context.
+ (Lisp Interaction): Copyedits.
+ (External Lisp): Fix name of inferior Lisp buffer. Mention
+ Scheme.
+ (Compilation): Define "inferior process".
+
+2011-12-10 Eli Zaretskii <eliz@gnu.org>
+
+ * msdog.texi (Windows Fonts): Document how to force GDI font
+ backend on MS-Windows.
+
+2011-12-10 Chong Yidong <cyd@gnu.org>
+
+ * building.texi (Compilation): Say what the -k flag to make does.
+ Move subprocess discussion to Compilation Shell.
+ (Compilation Mode): Add xref for grep, occur, and mouse
+ references. Define "locus".
+ (Grep Searching): Use @command.
+ (Debuggers, Commands of GUD, GDB Graphical Interface): Clarify
+ intro.
+ (Starting GUD): Clarify how arguments are specified.
+ (Debugger Operation): Index entry for "GUD interaction buffer",
+ and move basic description here from Commands of GUD node.
+ (GDB User Interface Layout): Copyedits.
+ (Source Buffers): Remove gdb-find-source-frame, which is not in
+ gdb-mi.el.
+ (Other GDB Buffers): Remove gdb-use-separate-io-buffer and
+ toggle-gdb-all-registers, which are not in gdb-mi.el. Don't
+ re-document GUD interaction buffers.
+
+ * programs.texi (Symbol Completion): M-TAB can now use Semantic.
+ (Semantic): Add cindex entries for Semantic.
+
+2011-12-06 Chong Yidong <cyd@gnu.org>
+
+ * programs.texi (Man Page): Clarify how to use Man-switches.
+ Don't bother documenting Man-fontify-manpage-flag.
+ (Lisp Doc): Add xref to Name Help node.
+ (Hideshow): Add cindex. Mention role of ellipses, and default
+ value of hs-isearch-open. Don't bother documenting
+ hs-special-modes-alist.
+ (Symbol Completion): Add kindex for C-M-i. Don't recommend
+ changing the window manager binding of M-TAB.
+
+2011-12-05 Chong Yidong <cyd@gnu.org>
+
+ * programs.texi (Comment Commands): Fix description of for M-; on
+ blank lines. Move documentation of comment-region here.
+ (Multi-Line Comments): Clarify the role of comment-multi-line.
+ Refer to Comment Commands for comment-region doc.
+ (Options for Comments): Refer to Multi-Line Comments for
+ comment-multi-line doc, instead of duplicating it. Fix default
+ values of comment-padding and comment-start-skip.
+
+2011-12-04 Chong Yidong <cyd@gnu.org>
+
+ * programs.texi (Program Modes): Mention modes that are not
+ included with Emacs. Fix references to other manuals for tex.
+ Add index entry for backward-delete-char-untabify. Mention
+ prog-mode-hook.
+ (Which Function): Use "global minor mode" terminology.
+ (Basic Indent, Multi-line Indent): Refer to previous descriptions
+ in Indentation chapter to avoid duplication.
+ (Expressions): Copyedit.
+ (Matching): Document Electric Pair mode.
+
+ * ack.texi (Acknowledgments):
+ * rmail.texi (Movemail, Other Mailbox Formats):
+ * frames.texi (Frames): Don't capitalize "Unix".
+
+2011-12-04 Chong Yidong <cyd@gnu.org>
+
+ * text.texi (Nroff Mode): Mention what nroff is.
+ (Text Based Tables, Table Recognition): Don't say "Table mode"
+ since it's not a major or minor mode.
+ (Text Based Tables): Reduce the size of the example.
+ (Table Definition): Clarify definitions.
+ (Table Creation): Add key table.
+ (Cell Commands): Use kbd for commands.
+ (Table Rows and Columns): Combine nodes Row Commands and Column
+ Commands.
+ (Fixed Width Mode): Node deleted; contents moved to parent.
+ (Table Conversion): Shorten example.
+ (Measuring Tables): Merge into Table Misc.
+
2011-12-03 Chong Yidong <cyd@gnu.org>
* text.texi (TeX Mode): Mention AUCTeX package.
@@ -1597,7 +1826,7 @@
2009-08-31 Nick Roberts <nickrob@snap.net.nz>
* building.texi (Threads Buffer, Multithreaded Debugging):
- Re-organise these two sections.
+ Reorganize these two sections.
2009-08-29 Eli Zaretskii <eliz@gnu.org>
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
outer otter.} into the buffer by typing @kbd{f o o .}.
@findex abbrev-mode
-@vindex abbrev-mode
@cindex Abbrev mode
@cindex mode, Abbrev
- Abbrevs expand only when Abbrev mode (a minor mode) is enabled.
-Disabling Abbrev mode does not cause abbrev definitions to be forgotten,
-but they do not expand until Abbrev mode is enabled again. The command
-@kbd{M-x abbrev-mode} toggles Abbrev mode; with a numeric argument, it
-turns Abbrev mode on if the argument is positive, off otherwise.
-@xref{Minor Modes}. @code{abbrev-mode} is also a variable; Abbrev mode is
-on when the variable is non-@code{nil}. The variable @code{abbrev-mode}
-automatically becomes local to the current buffer when it is set.
+ Abbrevs expand only when Abbrev mode, a buffer-local minor mode, is
+enabled. Disabling Abbrev mode does not cause abbrev definitions to
+be forgotten, but they do not expand until Abbrev mode is enabled
+again. The command @kbd{M-x abbrev-mode} toggles Abbrev mode; with a
+numeric argument, it turns Abbrev mode on if the argument is positive,
+off otherwise. @xref{Minor Modes}.
Abbrevs can have @dfn{mode-specific} definitions, active only in one major
mode. Abbrevs can also have @dfn{global} definitions that are active in
@@ -108,22 +105,18 @@ region as the expansion of the abbrev being defined.
@kindex C-x a l
@findex add-mode-abbrev
The command @kbd{C-x a l} (@code{add-mode-abbrev}) is similar, but
-defines a mode-specific abbrev. Mode-specific abbrevs are active only in a
-particular major mode. @kbd{C-x a l} defines an abbrev for the major mode
-in effect at the time @kbd{C-x a l} is typed. The arguments work the same
-as for @kbd{C-x a g}.
+defines a mode-specific abbrev for the current major mode. The
+arguments work the same as for @kbd{C-x a g}.
@kindex C-x a i g
@findex inverse-add-global-abbrev
@kindex C-x a i l
@findex inverse-add-mode-abbrev
- If the abbrev text itself is already in the buffer, you can use the
-commands @kbd{C-x a i g} (@code{inverse-add-global-abbrev}) and
-@kbd{C-x a i l} (@code{inverse-add-mode-abbrev}) to define it as an
-abbrev by specify the expansion in the minibuffer. These commands are
-called ``inverse'' because they invert the meaning of the two text
-strings they use (one from the buffer and one read with the
-minibuffer).
+ @kbd{C-x a i g} (@code{inverse-add-global-abbrev}) and @kbd{C-x a i
+l} (@code{inverse-add-mode-abbrev}) perform the opposite task: if the
+abbrev text is already in the buffer, you use these commands to define
+an abbrev by specifying the expansion in the minibuffer. These
+commands will expand the abbrev text used for the definition.
@findex define-mode-abbrev
@findex define-global-abbrev
@@ -132,8 +125,8 @@ expansion in the buffer using the command @code{define-global-abbrev}.
It reads two arguments---the abbrev, and its expansion. The command
@code{define-mode-abbrev} does likewise for a mode-specific abbrev.
- To change the definition of an abbrev, just define a new definition.
-When the abbrev has a prior definition, the abbrev definition commands
+ To change the definition of an abbrev, just make a new definition.
+When an abbrev has a prior definition, the abbrev definition commands
ask for confirmation before replacing it.
@findex kill-all-abbrevs
@@ -155,11 +148,11 @@ The most common way to use an abbrev is to insert it and then insert a
punctuation or whitespace character to expand it.
@vindex abbrev-all-caps
- Abbrev expansion preserves case; thus, @samp{foo} expands into @samp{find
-outer otter}; @samp{Foo} into @samp{Find outer otter}, and @samp{FOO} into
-@samp{FIND OUTER OTTER} or @samp{Find Outer Otter} according to the
-variable @code{abbrev-all-caps} (setting it non-@code{nil} specifies
-@samp{FIND OUTER OTTER}).
+ Abbrev expansion preserves case: @samp{foo} expands to @samp{find
+outer otter}, and @samp{Foo} to @samp{Find outer otter}. @samp{FOO}
+expands to @samp{Find Outer Otter} by default, but if you change the
+variable @code{abbrev-all-caps} to a non-@code{nil} value, it expands
+to @samp{FIND OUTER OTTER}.
These commands are used to control abbrev expansion:
@@ -196,14 +189,14 @@ punctuation with @kbd{C-q}. Thus, @kbd{foo C-q ,} leaves @samp{foo,} in
the buffer, not expanding it.
@findex unexpand-abbrev
- If you expand an abbrev by mistake, you can undo the expansion and
-bring back the abbrev itself by typing @kbd{C-_} to undo (@pxref{Undo}).
-This also undoes the insertion of the non-word character that expanded
-the abbrev. If the result you want is the terminating non-word
-character plus the unexpanded abbrev, you must reinsert the terminating
-character, quoting it with @kbd{C-q}. You can also use the command
-@kbd{M-x unexpand-abbrev} to cancel the last expansion without
-deleting the terminating character.
+ If you expand an abbrev by mistake, you can undo the expansion by
+typing @kbd{C-/} (@code{undo}). @xref{Undo}. This undoes the
+insertion of the abbrev expansion and brings back the abbrev text. If
+the result you want is the terminating non-word character plus the
+unexpanded abbrev, you must reinsert the terminating character,
+quoting it with @kbd{C-q}. You can also use the command @kbd{M-x
+unexpand-abbrev} to cancel the last expansion without deleting the
+terminating character.
@findex expand-region-abbrevs
@kbd{M-x expand-region-abbrevs} searches through the region for defined
@@ -409,12 +402,11 @@ you are expanding.
@vindex dabbrev-case-fold-search
This feature is controlled by the variable
-@code{dabbrev-case-fold-search}. If it is @code{t}, case is ignored in
-this search; if it is @code{nil}, the word and the expansion must match
-in case. If the value of @code{dabbrev-case-fold-search} is
-@code{case-fold-search}, which is true by default, then the variable
-@code{case-fold-search} controls whether to ignore case while searching
-for expansions.
+@code{dabbrev-case-fold-search}. If it is @code{t}, case is ignored
+in this search; if it is @code{nil}, the word and the expansion must
+match in case. If the value is @code{case-fold-search} (the default),
+then the variable @code{case-fold-search} controls whether to ignore
+case while searching for expansions (@pxref{Search Case}).
@vindex dabbrev-case-replace
Normally, dynamic abbrev expansion preserves the case pattern
@@ -425,10 +417,10 @@ expansion to that case pattern.
The variable @code{dabbrev-case-replace} controls whether to
preserve the case pattern of the dynamic abbrev. If it is @code{t},
the dynamic abbrev's case pattern is preserved in most cases; if it is
-@code{nil}, the expansion is always copied verbatim. If the value of
-@code{dabbrev-case-replace} is @code{case-replace}, which is true by
-default, then the variable @code{case-replace} controls whether to
-copy the expansion verbatim.
+@code{nil}, the expansion is always copied verbatim. If the value is
+@code{case-replace} (the default), then the variable
+@code{case-replace} controls whether to copy the expansion verbatim
+(@pxref{Replacement and Case}).
However, if the expansion contains a complex mixed case pattern, and
the 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.
Barry Warsaw wrote @file{assoc.el}, a set of utility functions for
working with association lists; @file{cc-mode.el}, a mode for editing
C, C@t{++}, and Java code, based on earlier work by Dave Detlefs,
-Stewart Clamen, and Richard Stallman; @file{elp.el}, a profiler
-for Emacs Lisp programs; @file{man.el}, a mode for reading UNIX manual
+Stewart Clamen, and Richard Stallman; @file{elp.el}, a profiler for
+Emacs Lisp programs; @file{man.el}, a mode for reading Unix manual
pages; @file{regi.el}, providing an AWK-like functionality for use in
lisp programs; @file{reporter.el}, providing customizable bug
reporting 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 @@
@cindex program building
@cindex running Lisp functions
- The previous chapter discusses the Emacs commands that are useful for
-making changes in programs. This chapter deals with commands that assist
-in the larger process of compiling and testing programs.
+ The previous chapter discusses the Emacs commands that are useful
+for making changes in programs. This chapter deals with commands that
+assist in the process of compiling and testing programs.
@menu
* Compilation:: Compiling programs in languages other
@@ -24,7 +24,7 @@ in the larger process of compiling and testing programs.
* Executing Lisp:: Various modes for editing Lisp programs,
with different facilities for running
the Lisp programs.
-* Libraries: Lisp Libraries. Creating Lisp programs to run in Emacs.
+* Libraries: Lisp Libraries. How Lisp programs are loaded into Emacs.
* Eval: Lisp Eval. Executing a single Lisp expression in Emacs.
* Interaction: Lisp Interaction. Executing Lisp in an Emacs buffer.
* External Lisp:: Communicating through Emacs with a separate Lisp.
@@ -37,10 +37,9 @@ in the larger process of compiling and testing programs.
@cindex compilation errors
@cindex error log
- Emacs can run compilers for noninteractive languages such as C and
-Fortran as inferior processes, feeding the error log into an Emacs buffer.
-It can also parse the error messages and show you the source lines where
-compilation errors occurred.
+ Emacs can run compilers for languages such as C and Fortran, feeding
+the compilation log into an Emacs buffer. It can also parse the error
+messages and show you where the errors occurred.
@table @kbd
@item M-x compile
@@ -54,65 +53,60 @@ Kill the running compilation subprocess.
@end table
@findex compile
- To run @code{make} or another compilation command, do @kbd{M-x
-compile}. This command reads a shell command line using the minibuffer,
-and then executes the command in an inferior shell, putting output in
-the buffer named @samp{*compilation*}. The current buffer's default
-directory is used as the working directory for the execution of the
-command; normally, therefore, the compilation happens in this
-directory.
+ To run @code{make} or another compilation command, type @kbd{M-x
+compile}. This reads a shell command line using the minibuffer, and
+then executes the command by running a shell as a subprocess (or
+@dfn{inferior process}) of Emacs. The output is inserted in a buffer
+named @samp{*compilation*}. The current buffer's default directory is
+used as the working directory for the execution of the command;
+normally, therefore, compilation takes place in this directory.
@vindex compile-command
- The default for the compilation command is normally @samp{make -k},
-which is correct most of the time for nontrivial programs.
-@xref{Top,, Make, make, GNU Make Manual}. If you have done @kbd{M-x
-compile} before, the default each time is the command you used the
-previous time. @code{compile} stores this command in the variable
-@code{compile-command}, so setting that variable specifies the default
-for the next use of @kbd{M-x compile}. If a file specifies a file
-local value for @code{compile-command}, that provides the default when
-you type @kbd{M-x compile} in that file's buffer. @xref{File
-Variables}.
-
- Starting a compilation displays the buffer @samp{*compilation*} in
-another window but does not select it. The buffer's mode line tells
-you whether compilation is finished, with the word @samp{run},
-@samp{signal} or @samp{exit} inside the parentheses. You do not have
-to keep this buffer visible; compilation continues in any case. While
-a compilation is going on, the string @samp{Compiling} appears in the
-mode lines of all windows. When this string disappears, the
-compilation is finished.
-
- If you want to watch the compilation transcript as it appears, switch
-to the @samp{*compilation*} buffer and move point to the end of the
-buffer. When point is at the end, new compilation output is inserted
-above point, which remains at the end. If point is not at the end of
-the buffer, it remains fixed while more compilation output is added at
-the end of the buffer.
+ The default compilation command is @samp{make -k}, which is usually
+correct for programs compiled using the @command{make} utility (the
+@samp{-k} flag tells @command{make} to continue compiling as much as
+possible after an error). @xref{Top,, Make, make, GNU Make Manual}.
+If you have done @kbd{M-x compile} before, the command that you
+specified is automatically stored in the variable
+@code{compile-command}; this is used as the default the next time you
+type @kbd{M-x compile}. A file can also specify a file-local value
+for @code{compile-command} (@pxref{File Variables}).
+
+ Starting a compilation displays the @samp{*compilation*} buffer in
+another window but does not select it. While the compilation is
+running, the word @samp{run} is shown in the major mode indicator for
+the @samp{*compilation*} buffer, and the word @samp{Compiling} appears
+in all mode lines. You do not have to keep the @samp{*compilation*}
+buffer visible while compilation is running; it continues in any case.
+When the compilation ends, for whatever reason, the mode line of the
+@samp{*compilation*} buffer changes to say @samp{exit} (followed by
+the exit code: @samp{[0]} for a normal exit), or @samp{signal} (if a
+signal terminated the process).
+
+ If you want to watch the compilation transcript as it appears,
+switch to the @samp{*compilation*} buffer and move point to the end of
+the buffer. When point is at the end, new compilation output is
+inserted above point, which remains at the end. Otherwise, point
+remains fixed while compilation output is added at the end of the
+buffer.
@cindex compilation buffer, keeping point at end
@vindex compilation-scroll-output
If you change the variable @code{compilation-scroll-output} to a
-non-@code{nil} value, the compilation buffer will scroll automatically
-to follow the output as it comes in. If the value is
-@code{first-error}, the scrolling stops at the first error that
-appears, leaving point at that error. For any other non-@code{nil}
-value, the buffer continues scrolling until there is no more output.
+non-@code{nil} value, the @samp{*compilation*} buffer scrolls
+automatically to follow the output. If the value is
+@code{first-error}, scrolling stops when the first error appears,
+leaving point at that error. For any other non-@code{nil} value,
+scrolling continues until there is no more output.
@findex recompile
To rerun the last compilation with the same command, type @kbd{M-x
-recompile}. This automatically reuses the compilation command from
-the last invocation of @kbd{M-x compile}. It also reuses the
+recompile}. This reuses the compilation command from the last
+invocation of @kbd{M-x compile}. It also reuses the
@samp{*compilation*} buffer and starts the compilation in its default
directory, which is the directory in which the previous compilation
was started.
- When the compiler process terminates, for whatever reason, the mode
-line of the @samp{*compilation*} buffer changes to say @samp{exit}
-(followed by the exit code, @samp{[0]} for a normal exit), or
-@samp{signal} (if a signal terminated the process), instead of
-@samp{run}.
-
@findex kill-compilation
Starting a new compilation also kills any compilation already
running in @samp{*compilation*}, as the buffer can only handle one
@@ -126,27 +120,6 @@ the @samp{*compilation*} buffer (perhaps using @code{rename-uniquely};
@pxref{Misc Buffer}), then switch buffers and start the other
compilation. This will create a new @samp{*compilation*} buffer.
- Emacs does not expect a compiler process to launch asynchronous
-subprocesses; if it does, and they keep running after the main
-compiler process has terminated, Emacs may kill them or their output
-may not arrive in Emacs. To avoid this problem, make the main process
-wait for its subprocesses to finish. In a shell script, you can do this
-using @samp{$!} and @samp{wait}, like this:
-
-@example
-(sleep 10; echo 2nd)& pid=$! # @r{Record pid of subprocess}
-echo first message
-wait $pid # @r{Wait for subprocess}
-@end example
-
- If the background process does not output to the compilation buffer,
-so you only need to prevent it from being killed when the main
-compilation process terminates, this is sufficient:
-
-@example
-nohup @var{command}; sleep 1
-@end example
-
@vindex compilation-environment
You can control the environment passed to the compilation command
with the variable @code{compilation-environment}. Its value is a list
@@ -159,153 +132,154 @@ variable settings override the usual ones.
@cindex Compilation mode
@cindex mode, Compilation
- The @samp{*compilation*} buffer uses a special major mode,
-Compilation mode, whose main feature is to provide a convenient way to
-visit the source line corresponding to an error message. These
-commands are also available in other special buffers that list
-locations in files, including those made by @kbd{M-x grep} and
-@kbd{M-x occur}.
+@cindex locus
+ The @samp{*compilation*} buffer uses a major mode called Compilation
+mode. Compilation mode turns each error message in the buffer into a
+hyperlink; you can move point to it and type @key{RET}, or click on it
+with the mouse (@pxref{Mouse References}), to visit the @dfn{locus} of
+the error message in a separate window. The locus is the specific
+position in a file where that error occurred.
+
+@findex compile-goto-error
+@vindex compilation-auto-jump-to-first-error
+ If you change the variable
+@code{compilation-auto-jump-to-first-error} to a non-@code{nil} value,
+Emacs automatically visits the locus of the first error message that
+appears in the @samp{*compilation*} buffer.
+
+ Compilation mode provides the following additional commands. These
+commands can also be used in @samp{*grep*} buffers, where the
+hyperlinks are search matches rather than error messages (@pxref{Grep
+Searching}).
@table @kbd
@item M-g M-n
@itemx M-g n
@itemx C-x `
-Visit the locus of the next error message or match.
+Visit the locus of the next error message or match (@code{next-error}).
@item M-g M-p
@itemx M-g p
-Visit the locus of the previous error message or match.
-@item @key{RET}
-Visit the locus of the error message that point is on.
-This command is used in the compilation buffer.
-@item Mouse-2
-Visit the locus of the error message that you click on.
+Visit the locus of the previous error message or match
+(@code{previous-error}).
@item M-n
-Find and highlight the locus of the next error message, without
-selecting the source buffer.
+Move point to the next error message or match, without visiting its
+locus (@code{compilation-next-error}).
@item M-p
-Find and highlight the locus of the previous error message, without
-selecting the source buffer.
+Move point to the previous error message or match, without visiting
+its locus (@code{compilation-previous-error}).
@item M-@}
-Move point to the next error for a different file than the current
-one.
+Move point to the next error message or match occurring in a different
+file (@code{compilation-next-file}).
@item M-@{
-Move point to the previous error for a different file than the current
-one.
+Move point to the previous error message or match occurring in a
+different file (@code{compilation-previous-file}).
@item C-c C-f
Toggle Next Error Follow minor mode, which makes cursor motion in the
compilation buffer produce automatic source display.
@end table
-@findex compile-goto-error
-@vindex compilation-auto-jump-to-first-error
- You can visit the source for any particular error message by moving
-point in the @samp{*compilation*} buffer to that error message and
-typing @key{RET} (@code{compile-goto-error}). Alternatively, you can
-click @kbd{Mouse-2} on the error message; you need not switch to the
-@samp{*compilation*} buffer first. If you set the variable
-@code{compilation-auto-jump-to-first-error} to a non-@code{nil} value,
-Emacs automatically jumps to the first error, if any, as soon as it
-appears in the @samp{*compilation*} buffer.
-
@kindex M-g M-n
@kindex M-g n
@kindex C-x `
@findex next-error
@vindex next-error-highlight
- To parse the compiler error messages sequentially, type @kbd{C-x `}
-(@code{next-error}). The character following the @kbd{C-x} is the
-backquote or ``grave accent,'' not the single-quote. This command is
-available in all buffers, not just in @samp{*compilation*}; it
-displays the next error message at the top of one window and source
-location of the error in another window. It also temporarily
-highlights the relevant source line, for a period controlled by the
-variable @code{next-error-highlight}.
-
- The first time @w{@kbd{C-x `}} is used after the start of a compilation,
-it moves to the first error's location. Subsequent uses of @kbd{C-x
-`} advance down to subsequent errors. If you visit a specific error
-message with @key{RET} or @kbd{Mouse-2}, subsequent @w{@kbd{C-x `}}
-commands advance from there. When @w{@kbd{C-x `}} gets to the end of the
-buffer and finds no more error messages to visit, it fails and signals
-an Emacs error. @w{@kbd{C-u C-x `}} starts scanning from the beginning of
-the compilation buffer, and goes to the first error's location.
+ To visit errors sequentially, type @w{@kbd{C-x `}}
+(@code{next-error}), or equivalently @kbd{M-g M-n} or @kbd{M-g n}.
+This command can be invoked from any buffer, not just a Compilation
+mode buffer. The first time you invoke it after a compilation, it
+visits the locus of the first error message. Each subsequent
+@w{@kbd{C-x `}} visits the next error, in a similar fashion. If you
+visit a specific error with @key{RET} or a mouse click in the
+@samp{*compilation*} buffer, subsequent @w{@kbd{C-x `}} commands
+advance from there. When @w{@kbd{C-x `}} finds no more error messages
+to visit, it signals an error. @w{@kbd{C-u C-x `}} starts again from
+the beginning of the compilation buffer, and visits the first locus.
+
+ @kbd{M-g M-p} or @kbd{M-g p} (@code{previous-error}) iterates
+through errors in the opposite direction.
+
+ The @code{next-error} and @code{previous-error} commands don't just
+act on the errors or matches listed in @samp{*compilation*} and
+@samp{*grep*} buffers; they also know how to iterate through error or
+match lists produced by other commands, such as @kbd{M-x occur}
+(@pxref{Other Repeating Search}). If you are already in a buffer
+containing error messages or matches, those are the ones that are
+iterated through; otherwise, Emacs looks for a buffer containing error
+messages or matches amongst the windows of the selected frame, then
+for one that @code{next-error} or @code{previous-error} previously
+iterated through, and finally amongst all other buffers. If the
+buffer chosen for iterating through is not currently displayed in a
+window, it will be displayed.
@vindex compilation-skip-threshold
- By default, @w{@kbd{C-x `}} skips less important messages. The variable
-@code{compilation-skip-threshold} controls this. If its value is 2,
-@w{@kbd{C-x `}} skips anything less than error, 1 skips anything less
-than warning, and 0 doesn't skip any messages. The default is 1.
-
- When the window has a left fringe, an arrow in the fringe points to
-the current message in the compilation buffer. The variable
-@code{compilation-context-lines} controls the number of lines of
-leading context to display before the current message. Going to an
-error message location scrolls the @samp{*compilation*} buffer to put
-the message that far down from the top. The value @code{nil} is
-special: if there's a left fringe, the window doesn't scroll at all
-if the message is already visible. If there is no left fringe,
-@code{nil} means display the message at the top of the window.
-
- If you're not in the compilation buffer when you run
-@code{next-error}, Emacs will look for a buffer that contains error
-messages. First, it looks for one displayed in the selected frame,
-then for one that previously had @code{next-error} called on it, and
-then at the current buffer. Finally, Emacs looks at all the remaining
-buffers. @code{next-error} signals an error if it can't find any such
-buffer.
+ By default, the @code{next-error} and @code{previous-error} commands
+skip less important messages. The variable
+@code{compilation-skip-threshold} controls this. The default value,
+1, means to skip anything less important than a warning. A value of 2
+means to skip anything less important than an error, while 0 means not
+to skip any messages.
+
+ When Emacs visits the locus of an error message, it momentarily
+highlights the relevant source line. The duration of this highlight
+is determined by the variable @code{next-error-highlight}.
+
+@vindex compilation-context-lines
+ If the @samp{*compilation*} buffer is shown in a window with a left
+fringe (@pxref{Fringes}), the locus-visiting commands put an arrow in
+the fringe, pointing to the current error message. If the window has
+no left fringe, such as on a text-only terminal, these commands scroll
+the window so that the current message is at the top of the window.
+If you change the variable @code{compilation-context-lines} to an
+integer value @var{n}, these commands scroll the window so that the
+current error message is @var{n} lines from the top, whether or not
+there is a fringe; the default value, @code{nil}, gives the behavior
+described above.
@vindex compilation-error-regexp-alist
@vindex grep-regexp-alist
To parse messages from the compiler, Compilation mode uses the
variable @code{compilation-error-regexp-alist} which lists various
-formats of error messages and tells Emacs how to extract the source file
-and the line number from the text of a message. If your compiler isn't
-supported, you can tailor Compilation mode to it by adding elements to
-that list. A similar variable @code{grep-regexp-alist} tells Emacs how
-to parse output of a @code{grep} command.
+error message formats and tells Emacs how to extract the locus from
+each. A similar variable, @code{grep-regexp-alist}, tells Emacs how
+to parse output from a @code{grep} command (@pxref{Grep Searching}).
@findex compilation-next-error
@findex compilation-previous-error
@findex compilation-next-file
@findex compilation-previous-file
- Compilation mode also redefines the keys @key{SPC} and @key{DEL} to
-scroll by screenfuls, and @kbd{M-n} (@code{compilation-next-error})
-and @kbd{M-p} (@code{compilation-previous-error}) to move to the next
-or previous error message. You can also use @kbd{M-@{}
-(@code{compilation-next-file} and @kbd{M-@}}
-(@code{compilation-previous-file}) to move up or down to an error
-message for a different source file.
+ Compilation mode also defines the keys @key{SPC} and @key{DEL} to
+scroll by screenfuls; @kbd{M-n} (@code{compilation-next-error}) and
+@kbd{M-p} (@code{compilation-previous-error}) to move to the next or
+previous error message; and @kbd{M-@{} (@code{compilation-next-file})
+and @kbd{M-@}} (@code{compilation-previous-file}) to move to the next
+or previous error message for a different source file.
@cindex Next Error Follow mode
@findex next-error-follow-minor-mode
You can type @kbd{C-c C-f} to toggle Next Error Follow mode. In
this minor mode, ordinary cursor motion in the compilation buffer
-automatically updates the source buffer. For instance, moving the
-cursor to the next error message causes the location of that error to
-be displayed immediately.
+automatically updates the source buffer, i.e.@: moving the cursor over
+an error message causes the locus of that error to be displayed.
The features of Compilation mode are also available in a minor mode
called Compilation Minor mode. This lets you parse error messages in
-any buffer, not just a normal compilation output buffer. Type @kbd{M-x
-compilation-minor-mode} to enable the minor mode. This defines the keys
-@key{RET} and @kbd{Mouse-2}, as in the Compilation major mode.
-
- Compilation minor mode works in any buffer, as long as the contents
-are in a format that it understands. In an Rlogin buffer (@pxref{Remote
-Host}), Compilation minor mode automatically accesses remote source
-files by FTP (@pxref{File Names}).
+any buffer, not just a normal compilation output buffer. Type
+@kbd{M-x compilation-minor-mode} to enable the minor mode. For
+instance, in an Rlogin buffer (@pxref{Remote Host}), Compilation minor
+mode automatically accesses remote source files by FTP (@pxref{File
+Names}).
@node Compilation Shell
@section Subshells for Compilation
- Emacs uses a shell to run the compilation command, but specifies the
-option for a noninteractive shell. This means, in particular, that
-the shell should start with no prompt. If you find your usual shell
-prompt making an unsightly appearance in the @samp{*compilation*}
-buffer, it means you have made a mistake in your shell's init file by
-setting the prompt unconditionally. (This init file's name may be
-@file{.bashrc}, @file{.profile}, @file{.cshrc}, @file{.shrc}, or
-various other things, depending on the shell you use.) The shell init
+ The @kbd{M-x compile} command uses a shell to run the compilation
+command, but specifies the option for a noninteractive shell. This
+means, in particular, that the shell should start with no prompt. If
+you find your usual shell prompt making an unsightly appearance in the
+@samp{*compilation*} buffer, it means you have made a mistake in your
+shell's init file by setting the prompt unconditionally. (This init
+file may be named @file{.bashrc}, @file{.profile}, @file{.cshrc},
+@file{.shrc}, etc., depending on what shell you use.) The shell init
file should set the prompt only if there already is a prompt. Here's
how to do it in bash:
@@ -322,67 +296,80 @@ And here's how to do it in csh:
if ($?prompt) set prompt = @dots{}
@end example
- There may well be other things that your shell's init file
-ought to do only for an interactive shell. You can use the same
-method to conditionalize them.
+ Emacs does not expect a compiler process to launch asynchronous
+subprocesses; if it does, and they keep running after the main
+compiler process has terminated, Emacs may kill them or their output
+may not arrive in Emacs. To avoid this problem, make the main
+compilation process wait for its subprocesses to finish. In a shell
+script, you can do this using @samp{$!} and @samp{wait}, like this:
+
+@example
+(sleep 10; echo 2nd)& pid=$! # @r{Record pid of subprocess}
+echo first message
+wait $pid # @r{Wait for subprocess}
+@end example
+
+@noindent
+If the background process does not output to the compilation buffer,
+so you only need to prevent it from being killed when the main
+compilation process terminates, this is sufficient:
+
+@example
+nohup @var{command}; sleep 1
+@end example
- The MS-DOS ``operating system'' does not support asynchronous
-subprocesses; to work around this lack, @kbd{M-x compile} runs the
-compilation command synchronously on MS-DOS. As a consequence, you must
-wait until the command finishes before you can do anything else in
-Emacs.
-@iftex
-@inforef{MS-DOS,,emacs-xtra}.
-@end iftex
@ifnottex
-@xref{MS-DOS}.
+ On the MS-DOS ``operating system'', asynchronous subprocesses are
+not supported, so @kbd{M-x compile} runs the compilation command
+synchronously (i.e.@: you must wait until the command finishes before
+you can do anything else in Emacs). @xref{MS-DOS}.
@end ifnottex
@node Grep Searching
@section Searching with Grep under Emacs
Just as you can run a compiler from Emacs and then visit the lines
-with compilation errors, you can also run @code{grep} and then visit
-the lines on which matches were found. This works by treating the
-matches reported by @code{grep} as if they were ``errors.'' The
-buffer of matches uses Grep mode, which is a variant of Compilation
+with compilation errors, you can also run @command{grep} and then
+visit the lines on which matches were found. This works by treating
+the matches reported by @command{grep} as if they were ``errors.''
+The output buffer uses Grep mode, which is a variant of Compilation
mode (@pxref{Compilation Mode}).
@table @kbd
@item M-x grep
@itemx M-x lgrep
-Run @code{grep} asynchronously under Emacs, with matching lines
-listed in the buffer named @samp{*grep*}.
+Run @command{grep} asynchronously under Emacs, listing matching lines in
+the buffer named @samp{*grep*}.
@item M-x grep-find
@itemx M-x find-grep
@itemx M-x rgrep
-Run @code{grep} via @code{find}, and collect output in the buffer
-named @samp{*grep*}.
+Run @command{grep} via @code{find}, and collect output in the
+@samp{*grep*} buffer.
@item M-x zrgrep
-Run @code{zgrep} and collect output in the buffer named @samp{*grep*}.
+Run @code{zgrep} and collect output in the @samp{*grep*} buffer.
@item M-x kill-grep
-Kill the running @code{grep} subprocess.
+Kill the running @command{grep} subprocess.
@end table
@findex grep
- To run @code{grep}, type @kbd{M-x grep}, then enter a command line
-that specifies how to run @code{grep}. Use the same arguments you
-would give @code{grep} when running it normally: a @code{grep}-style
+ To run @command{grep}, type @kbd{M-x grep}, then enter a command line
+that specifies how to run @command{grep}. Use the same arguments you
+would give @command{grep} when running it normally: a @command{grep}-style
regexp (usually in single-quotes to quote the shell's special
characters) followed by file names, which may use wildcards. If you
specify a prefix argument for @kbd{M-x grep}, it finds the tag
(@pxref{Tags}) in the buffer around point, and puts that into the
-default @code{grep} command.
+default @command{grep} command.
- Your command need not simply run @code{grep}; you can use any shell
+ Your command need not simply run @command{grep}; you can use any shell
command that produces output in the same format. For instance, you
-can chain @code{grep} commands, like this:
+can chain @command{grep} commands, like this:
@example
grep -nH -e foo *.el | grep bar | grep toto
@end example
- The output from @code{grep} goes in the @samp{*grep*} buffer. You
+ The output from @command{grep} goes in the @samp{*grep*} buffer. You
can find the corresponding lines in the original files using @w{@kbd{C-x
`}}, @key{RET}, and so forth, just like compilation errors.
@@ -397,30 +384,31 @@ match will be highlighted, instead of the entire source line.
The command @kbd{M-x grep-find} (also available as @kbd{M-x
find-grep}) is similar to @kbd{M-x grep}, but it supplies a different
initial default for the command---one that runs both @code{find} and
-@code{grep}, so as to search every file in a directory tree. See also
+@command{grep}, so as to search every file in a directory tree. See also
the @code{find-grep-dired} command, in @ref{Dired and Find}.
@findex lgrep
@findex rgrep
@findex zrgrep
The commands @kbd{M-x lgrep} (local grep) and @kbd{M-x rgrep}
-(recursive grep) are more user-friendly versions of @code{grep} and
+(recursive grep) are more user-friendly versions of @command{grep} and
@code{grep-find}, which prompt separately for the regular expression
to match, the files to search, and the base directory for the search.
Case sensitivity of the search is controlled by the current value of
@code{case-fold-search}. The command @kbd{M-x zrgrep} is similar to
-@code{rgrep}, but it calls @code{zgrep} instead of @code{grep} to
-search the contents of gzipped files.
+@kbd{M-x rgrep}, but it calls @command{zgrep} instead of
+@command{grep} to search the contents of gzipped files.
These commands build the shell commands based on the variables
@code{grep-template} (for @code{lgrep}) and @code{grep-find-template}
(for @code{rgrep}). The files to search can use aliases defined in
the variable @code{grep-files-aliases}.
- Subdirectories listed in the variable
-@code{grep-find-ignored-directories} such as those typically used by
-various version control systems, like CVS and arch, are automatically
-skipped by @code{rgrep}.
+@vindex grep-find-ignored-directories
+ Directories listed in the variable
+@code{grep-find-ignored-directories} are automatically skipped by
+@kbd{M-x rgrep}. The default value includes the data directories used
+by various version control systems.
@node Flymake
@section Finding Syntax Errors On The Fly
@@ -444,8 +432,13 @@ flymake-goto-next-error} and @kbd{M-x flymake-goto-prev-error}. To
display any error messages associated with the current line, use
@kbd{M-x flymake-display-err-menu-for-current-line}.
- For more details about using Flymake, see @ref{Top, Flymake,
-Flymake, flymake, The Flymake Manual}.
+ For more details about using Flymake,
+@ifnottex
+see @ref{Top, Flymake, Flymake, flymake, The Flymake Manual}.
+@end ifnottex
+@iftex
+see the Flymake Info manual, which is distributed with Emacs.
+@end iftex
@node Debuggers
@section Running Debuggers Under Emacs
@@ -459,16 +452,18 @@ Flymake, flymake, The Flymake Manual}.
@cindex JDB
@cindex PDB
-@c Do you believe in GUD?
The GUD (Grand Unified Debugger) library provides an Emacs interface
-to a wide variety of symbolic debuggers. Unlike the GDB graphical
-interface, which only runs GDB (@pxref{GDB Graphical Interface}), GUD
-can also run DBX, SDB, XDB, Perl's debugging mode, the Python debugger
-PDB, or the Java Debugger JDB.
+to a wide variety of symbolic debuggers. It can run the GNU Debugger
+(GDB), as well as DBX, SDB, XDB, Perl's debugging mode, the Python
+debugger PDB, and the Java Debugger JDB.
- In addition, Emacs contains a built-in system for debugging Emacs
-Lisp programs. @xref{Debugging,, The Lisp Debugger, elisp, the Emacs
-Lisp Reference Manual}, for information on the Emacs Lisp debugger.
+ Emacs provides a special interface to GDB, which uses extra Emacs
+windows to display the state of the debugged program. @xref{GDB
+Graphical Interface}.
+
+ Emacs also has a built-in debugger for Emacs Lisp programs.
+@xref{Debugging,, The Lisp Debugger, elisp, the Emacs Lisp Reference
+Manual}.
@menu
* Starting GUD:: How to start a debugger subprocess.
@@ -483,146 +478,136 @@ Lisp Reference Manual}, for information on the Emacs Lisp debugger.
@node Starting GUD
@subsection Starting GUD
- There are several commands for starting a debugger under GUD, each
+ There are several commands for starting a debugger subprocess, each
corresponding to a particular debugger program.
@table @kbd
-@item M-x gdb @key{RET} @var{file} @key{RET}
+@item M-x gdb
@findex gdb
-Run GDB as a subprocess of Emacs. This uses an IDE-like graphical
-interface; see @ref{GDB Graphical Interface}. Only GDB works with the
-graphical interface.
+Run GDB as a subprocess, and interact with it via an IDE-like Emacs
+interface. @xref{GDB Graphical Interface}, for more information about
+this command.
-@item M-x gud-gdb @key{RET} @var{file} @key{RET}
+@item M-x gud-gdb
@findex gud-gdb
-Run GDB as a subprocess of Emacs. This command creates a buffer for
-input and output to GDB, and switches to it. If a GDB buffer already
-exists, it just switches to that buffer.
-
-@item M-x dbx @key{RET} @var{file} @key{RET}
-@findex dbx
-Run DBX as a subprocess of Emacs. Since Emacs does not implement a
-graphical interface for DBX, communication with DBX works by typing
-commands in the GUD interaction buffer. The same is true for all
-the other supported debuggers.
+Run GDB, using a GUD interaction buffer for input and output to the
+GDB subprocess (@pxref{Debugger Operation}). If such a buffer already
+exists, switch to it; otherwise, create the buffer and switch to it.
-@item M-x xdb @key{RET} @var{file} @key{RET}
-@findex xdb
-@vindex gud-xdb-directories
-Run XDB as a subprocess of Emacs. Use the variable
-@code{gud-xdb-directories} to specify directories to search for source
-files.
-
-@item M-x sdb @key{RET} @var{file} @key{RET}
-@findex sdb
-Run SDB as a subprocess of Emacs.
+The other commands in this list do the same, for other debugger
+programs.
-Some versions of SDB do not mention source file names in their
-messages. When you use them, you need to have a valid tags table
-(@pxref{Tags}) in order for GUD to find functions in the source code.
-If you have not visited a tags table or the tags table doesn't list
-one of the functions, you get a message saying @samp{The sdb support
-requires a valid tags table to work}. If this happens, generate a
-valid tags table in the working directory and try again.
-
-@item M-x perldb @key{RET} @var{file} @key{RET}
+@item M-x perldb
@findex perldb
-Run the Perl interpreter in debug mode to debug @var{file}, a Perl program.
+Run the Perl interpreter in debug mode.
-@item M-x jdb @key{RET} @var{file} @key{RET}
+@item M-x jdb
@findex jdb
-Run the Java debugger to debug @var{file}.
+Run the Java debugger.
-@item M-x pdb @key{RET} @var{file} @key{RET}
+@item M-x pdb
@findex pdb
-Run the Python debugger to debug @var{file}.
+Run the Python debugger.
+
+@item M-x dbx
+@findex dbx
+Run the DBX debugger.
+
+@item M-x xdb
+@findex xdb
+@vindex gud-xdb-directories
+Run the XDB debugger.
+
+@item M-x sdb
+@findex sdb
+Run the SDB debugger.
@end table
- Each of these commands takes one argument: a command line to invoke
-the debugger. In the simplest case, specify just the name of the
-executable file you want to debug. You may also use options that the
-debugger supports. However, shell wildcards and variables are not
-allowed. GUD assumes that the first argument not starting with a
-@samp{-} is the executable file name.
+ Each of these commands reads a command line to invoke the debugger,
+using the minibuffer. The minibuffer's initial contents contain the
+standard executable name and options for the debugger, and sometimes
+also a guess for the name of the executable file you want to debug.
+Shell wildcards and variables are not allowed in this command line.
+Emacs assumes that the first command argument which does not start
+with a @samp{-} is the executable file name.
@cindex remote host, debugging on
-Tramp provides a facility to debug programs on remote hosts
-(@pxref{Running a debugger on a remote host, Running a debugger on a
-remote host,, tramp, The Tramp Manual}), whereby both the debugger and
-the program being debugged are on the same remote host. This should
-not be confused with debugging programs remotely, where the program
-and the debugger run on different machines, as can be done using the
-GDB remote debugging feature, for example (@pxref{Remote Debugging,,
-Debugging Remote Programs, gdb, The GNU debugger}).
+ Tramp provides a facility for remote debugging, whereby both the
+debugger and the program being debugged are on the same remote host.
+@xref{Running a debugger on a remote host,,, tramp, The Tramp Manual},
+for details. This is separate from GDB's remote debugging feature,
+where the program and the debugger run on different machines
+(@pxref{Remote Debugging,, Debugging Remote Programs, gdb, The GNU
+debugger}).
@node Debugger Operation
@subsection Debugger Operation
+@cindex GUD interaction buffer
+
+ The @dfn{GUD interaction buffer} is an Emacs buffer which is used to
+send text commands to a debugger subprocess, and record its output.
+This is the basic interface for interacting with a debugger, used by
+@kbd{M-x gud-gdb} and other commands listed in
+@iftex
+the preceding section.
+@end iftex
+@ifnottex
+@ref{Starting GUD}.
+@end ifnottex
+The @kbd{M-x gdb} command extends this interface with additional
+specialized buffers for controlling breakpoints, stack frames, and
+other aspects of the debugger state (@pxref{GDB Graphical Interface}).
-@cindex fringes, and current execution line in GUD
- Generally when you run a debugger with GUD, the debugger uses an Emacs
-buffer for its ordinary input and output. This is called the GUD
-buffer. Input and output from the program you are debugging also use
-this buffer. We call this @dfn{text command mode}. The GDB Graphical
-Interface can use further buffers (@pxref{GDB Graphical Interface}).
-
- The debugger displays the source files of the program by visiting
-them in Emacs buffers. An arrow in the left fringe indicates the
-current execution line.@footnote{On a text-only terminal, the arrow
-appears as @samp{=>} and overlays the first two text columns.} Moving
-point in this buffer does not move the arrow. The arrow is not part
-of the file's text; it appears only on the screen.
-
- You can start editing these source files at any time in the buffers
-that display them. If you do modify a source file, keep in mind that
-inserting or deleting lines will throw off the arrow's positioning;
-GUD has no way of figuring out which line corresponded before your
-changes to the line number in a debugger message. Also, you'll
-typically have to recompile and restart the program for your changes
-to be reflected in the debugger's tables.
-
-@cindex tooltips with GUD
-@vindex tooltip-gud-modes
-@vindex gud-tooltip-mode
+ The GUD interaction buffer uses a variant of Shell mode, so the
+Emacs commands defined by Shell mode are available (@pxref{Shell
+Mode}). Completion is available for most debugger commands
+(@pxref{Completion}), and you can use the usual Shell mode history
+commands to repeat them.
+@iftex
+See the next section
+@end iftex
+@ifnottex
+@xref{Commands of GUD},
+@end ifnottex
+for special commands that can be used in the GUD interaction buffer.
+
+ As you debug a program, Emacs displays the relevant source files by
+visiting them in Emacs buffers, with an arrow in the left fringe
+indicating the current execution line. (On a text-only terminal, the
+arrow appears as @samp{=>}, overlaid on the first two text columns.)
+Moving point in such a buffer does not move the arrow. You are free
+to edit these source files, but note that inserting or deleting lines
+will throw off the arrow's positioning, as Emacs has no way to figure
+out which edited source line corresponds to the line reported by the
+debugger subprocess. To update this information, you typically have
+to recompile and restart the program.
+
+@cindex GUD Tooltip mode
+@cindex mode, GUD Tooltip
+@findex gud-tooltip-mode
@vindex gud-tooltip-echo-area
- The Tooltip facility (@pxref{Tooltips}) provides support for GUD@.
-You activate this feature by turning on the minor mode
-@code{gud-tooltip-mode}. Then you can display a variable's value in a
-tooltip simply by pointing at it with the mouse. This operates in the
-GUD buffer and in source buffers with major modes in the list
-@code{gud-tooltip-modes}. If the variable @code{gud-tooltip-echo-area}
-is non-@code{nil} then the variable's value is displayed in the echo
-area. When debugging a C program using the GDB Graphical Interface, you
-can also display macro definitions associated with an identifier when
-the program is not executing.
-
- GUD tooltips are disabled when you use GDB in text command mode
-(@pxref{GDB Graphical Interface}), because displaying an expression's
-value in GDB can sometimes expand a macro and result in a side effect
-that interferes with the program's operation. The GDB graphical
-interface supports GUD tooltips and assures they will not cause side
-effects.
+ GUD Tooltip mode is a global minor mode that adds tooltip support to
+GUD. To toggle this mode, type @kbd{M-x gud-tooltip-mode}. It is
+disabled by default. If enabled, you can move the mouse cursor over a
+variable to show its value in a tooltip (@pxref{Tooltips}); this takes
+effect in the GUD interaction buffer, and in all source buffers with
+major modes listed in the variable @code{gud-tooltip-modes}. If the
+variable @code{gud-tooltip-echo-area} is non-@code{nil}, values are
+shown in the echo area instead of a tooltip.
+
+ When using GUD Tooltip mode with @kbd{M-x gud-gdb}, you should note
+that displaying an expression's value in GDB can sometimes expand a
+macro, potentially causing side effects in the debugged program. If
+you use the @kbd{M-x gdb} interface, this problem does not occur, as
+there is special code to avoid side-effects; furthermore, you can
+display macro definitions associated with an identifier when the
+program is not executing.
@node Commands of GUD
@subsection Commands of GUD
- The GUD interaction buffer uses a variant of Shell mode, so the
-Emacs commands of Shell mode are available (@pxref{Shell Mode}). All
-the usual commands for your debugger are available, and you can use
-the Shell mode history commands to repeat them. If you wish, you can
-control your debugger process entirely through this buffer.
-
- GUD mode also provides commands for setting and clearing
-breakpoints, for selecting stack frames, and for stepping through the
-program. These commands are available both in the GUD buffer and
-globally, but with different key bindings. It also has its own tool
-bar from which you can invoke the more common commands by clicking on
-the appropriate icon. This is particularly useful for repetitive
-commands like @code{gud-next} and @code{gud-step}, and allows you to
-keep the GUD buffer hidden.
-
- The breakpoint commands are normally used in source file buffers,
-because that is the easiest way to specify where to set or clear the
-breakpoint. Here's the global command to set a breakpoint:
+ GUD provides commands for setting and clearing breakpoints,
+selecting stack frames, and stepping through the program.
@table @kbd
@item C-x @key{SPC}
@@ -630,35 +615,42 @@ breakpoint. Here's the global command to set a breakpoint:
Set a breakpoint on the source line that point is on.
@end table
+ @kbd{C-x @key{SPC}} (@code{gud-break}), when called in a source
+buffer, sets a debugger breakpoint on the current source line. This
+command is available only after starting GUD. If you call it in a
+buffer that is not associated with any debugger subprocess, it signals
+a error.
+
@kindex C-x C-a @r{(GUD)}
- Here are the other special commands provided by GUD@. The keys
+ The following commands are available both in the GUD interaction
+buffer and globally, but with different key bindings. The keys
starting with @kbd{C-c} are available only in the GUD interaction
-buffer. The key bindings that start with @kbd{C-x C-a} are available
-in the GUD interaction buffer and also in source files. Some of these
-commands are not available to all the supported debuggers.
+buffer, while those starting with @kbd{C-x C-a} are available
+globally. Some of these commands are also available via the tool bar;
+some are not supported by certain debuggers.
@table @kbd
@item C-c C-l
@kindex C-c C-l @r{(GUD)}
@itemx C-x C-a C-l
@findex gud-refresh
-Display in another window the last line referred to in the GUD
-buffer (that is, the line indicated in the last location message).
-This runs the command @code{gud-refresh}.
+Display, in another window, the last source line referred to in the
+GUD interaction buffer (@code{gud-refresh}).
@item C-c C-s
@kindex C-c C-s @r{(GUD)}
@itemx C-x C-a C-s
@findex gud-step
-Execute a single line of code (@code{gud-step}). If the line contains
-a function call, execution stops after entering the called function.
+Execute the next single line of code (@code{gud-step}). If the line
+contains a function call, execution stops after entering the called
+function.
@item C-c C-n
@kindex C-c C-n @r{(GUD)}
@itemx C-x C-a C-n
@findex gud-next
-Execute a single line of code, stepping across entire function calls
-at full speed (@code{gud-next}).
+Execute the next single line of code, stepping across function calls
+without stopping inside the functions (@code{gud-next}).
@item C-c C-i
@kindex C-c C-i @r{(GUD)}
@@ -769,17 +761,17 @@ Instead, type @kbd{C-q @key{TAB}} to enter a tab.
@vindex perldb-mode-hook
@vindex pdb-mode-hook
@vindex jdb-mode-hook
- On startup, GUD runs one of the following hooks: @code{gdb-mode-hook},
-if you are using GDB; @code{dbx-mode-hook}, if you are using DBX;
-@code{sdb-mode-hook}, if you are using SDB; @code{xdb-mode-hook}, if you
-are using XDB; @code{perldb-mode-hook}, for Perl debugging mode;
-@code{pdb-mode-hook}, for PDB; @code{jdb-mode-hook}, for JDB. You can
-use these hooks to define custom key bindings for the debugger
-interaction buffer. @xref{Hooks}.
-
- Here is a convenient way to define a command that sends a particular
-command string to the debugger, and set up a key binding for it in the
-debugger interaction buffer:
+ On startup, GUD runs one of the following hooks:
+@code{gdb-mode-hook}, if you are using GDB; @code{dbx-mode-hook}, if
+you are using DBX; @code{sdb-mode-hook}, if you are using SDB;
+@code{xdb-mode-hook}, if you are using XDB; @code{perldb-mode-hook},
+for Perl debugging mode; @code{pdb-mode-hook}, for PDB;
+@code{jdb-mode-hook}, for JDB. @xref{Hooks}.
+
+ The @code{gud-def} Lisp macro (@pxref{Defining Macros,,, elisp, the
+Emacs Lisp Reference Manual}) provides a convenient way to define an
+Emacs command that sends a particular command string to the debugger,
+and set up a key binding for in the GUD interaction buffer:
@findex gud-def
@example
@@ -835,21 +827,22 @@ Fully qualified class name derived from the expression surrounding point
@node GDB Graphical Interface
@subsection GDB Graphical Interface
- The command @code{gdb} starts GDB in a graphical interface, using
-Emacs windows for display program state information. With it, you do
-not need to use textual GDB commands; you can control the debugging
-session with the mouse. For example, you can click in the fringe of a
-source buffer to set a breakpoint there, or on a stack frame in the
-stack buffer to select that frame.
-
- This mode requires telling GDB that its ``screen size'' is
-unlimited, so it sets the height and width accordingly. For correct
-operation you must not change these values during the GDB session.
+ The command @kbd{M-x gdb} starts GDB in an IDE-like interface, with
+specialized buffers for controlling breakpoints, stack frames, and
+other aspects of the debugger state. It also provides additional ways
+to control the debugging session with the mouse, such as clicking in
+the fringe of a source buffer to set a breakpoint there.
@vindex gud-gdb-command-name
- To run GDB in text command mode, like the other debuggers in Emacs,
-use @kbd{M-x gud-gdb}. You need to use text command mode to debug
-multiple programs within one Emacs session.
+ To run GDB using just the GUD interaction buffer interface, without
+these additional features, use @kbd{M-x gud-gdb} (@pxref{Starting
+GUD}). You must use this if you want to debug multiple programs
+within one Emacs session, as that is currently unsupported by @kbd{M-x
+gdb}.
+
+ Internally, @kbd{M-x gdb} informs GDB that its ``screen size'' is
+unlimited; for correct operation, you must not change GDB's screen
+height and width values during the debugging session.
@menu
* GDB User Interface Layout:: Control the number of displayed buffers.
@@ -858,8 +851,7 @@ multiple programs within one Emacs session.
* Breakpoints Buffer:: A breakpoint control panel.
* Threads Buffer:: Displays your threads.
* Stack Buffer:: Select a frame from the call stack.
-* Other GDB Buffers:: Input/output, locals, registers,
- assembler, threads and memory buffers.
+* Other GDB Buffers:: Other buffers for controlling the GDB state.
* Watch Expressions:: Monitor variable values in the speedbar.
* Multithreaded Debugging:: Debugging programs with several threads.
@end menu
@@ -869,12 +861,12 @@ multiple programs within one Emacs session.
@cindex GDB User Interface layout
@vindex gdb-many-windows
- If the variable @code{gdb-many-windows} is @code{nil} (the default
-value) then @kbd{M-x gdb} normally displays only the GUD buffer.
+ If the variable @code{gdb-many-windows} is @code{nil} (the default),
+@kbd{M-x gdb} normally displays only the GUD interaction buffer.
However, if the variable @code{gdb-show-main} is also non-@code{nil},
-it starts with two windows: one displaying the GUD buffer, and the
-other showing the source for the @code{main} function of the program
-you are debugging.
+it starts with two windows: one displaying the GUD interaction buffer,
+and the other showing the source for the @code{main} function of the
+program you are debugging.
If @code{gdb-many-windows} is non-@code{nil}, then @kbd{M-x gdb}
displays the following frame layout:
@@ -882,7 +874,7 @@ displays the following frame layout:
@smallexample
@group
+--------------------------------+--------------------------------+
-| GUD buffer (I/O of GDB) | Locals/Registers buffer |
+| GUD interaction buffer | Locals/Registers buffer |
|--------------------------------+--------------------------------+
| Primary Source buffer | I/O buffer for debugged pgm |
|--------------------------------+--------------------------------+
@@ -896,264 +888,233 @@ buffer does not appear and the primary source buffer occupies the full
width of the frame.
@findex gdb-restore-windows
- If you change the window layout, for example, while editing and
-re-compiling your program, then you can restore this standard window
-layout with the command @code{gdb-restore-windows}.
-
@findex gdb-many-windows
- To switch between this standard layout and a simple layout
-containing just the GUD buffer and a source file, type @kbd{M-x
-gdb-many-windows}.
+ If you ever change the window layout, you can restore the ``many
+windows'' layout by typing @kbd{M-x gdb-restore-windows}. To toggle
+between the many windows layout and a simple layout with just the GUD
+interaction buffer and a source file, type @kbd{M-x gdb-many-windows}.
You may also specify additional GDB-related buffers to display,
either in the same frame or a different one. Select the buffers you
-want with the @samp{GUD->GDB-Windows} and @samp{GUD->GDB-Frames}
-sub-menus. If the menu-bar is unavailable, type @code{M-x
-gdb-display-@var{buffertype}-buffer} or @code{M-x
-gdb-frame-@var{buffertype}-buffer} respectively, where
-@var{buffertype} is the relevant buffer type, such as
-@samp{breakpoints}. Most of these buffers are read-only, and typing
-@kbd{q} in them kills them.
-
- When you finish debugging, kill the GUD buffer with @kbd{C-x k},
-which will also kill all the buffers associated with the session.
-However you need not do this if, after editing and re-compiling your
-source code within Emacs, you wish continue debugging. When you
-restart execution, GDB will automatically find your new executable.
-Keeping the GUD buffer has the advantage of keeping the shell history
-as well as GDB's breakpoints. You do need to check that the
-breakpoints in recently edited source files are still in the right
-places.
+want by typing @code{M-x gdb-display-@var{buffertype}-buffer} or
+@code{M-x gdb-frame-@var{buffertype}-buffer}, where @var{buffertype}
+is the relevant buffer type, such as @samp{breakpoints}. You can do
+the same with the menu bar, with the @samp{GDB-Windows} and
+@samp{GDB-Frames} sub-menus of the @samp{GUD} menu.
+
+ When you finish debugging, kill the GUD interaction buffer with
+@kbd{C-x k}, which will also kill all the buffers associated with the
+session. However you need not do this if, after editing and
+re-compiling your source code within Emacs, you wish to continue
+debugging. When you restart execution, GDB automatically finds the
+new executable. Keeping the GUD interaction buffer has the advantage
+of keeping the shell history as well as GDB's breakpoints. You do
+need to check that the breakpoints in recently edited source files are
+still in the right places.
@node Source Buffers
@subsubsection Source Buffers
-@cindex GDB commands in Fringe
-
-@c @findex gdb-mouse-set-clear-breakpoint
-@c @findex gdb-mouse-toggle-breakpoint
-Many GDB commands can be entered using key bindings or the tool bar but
-sometimes it is quicker to use the fringe. These commands either
-manipulate breakpoints or control program execution. When there is no
-fringe, you can use the margin but this is only present when the
-source file already has a breakpoint.
-
-You can click @kbd{Mouse-1} in the fringe or display margin of a
-source buffer to set a breakpoint there and, on a graphical display, a
-red bullet will appear on that line. If a breakpoint already exists
-on that line, the same click will remove it. You can also enable or
-disable a breakpoint by clicking @kbd{C-Mouse-1} on the bullet.
-
-A solid arrow in the left fringe of a source buffer indicates the line
-of the innermost frame where the debugged program has stopped. A
-hollow arrow indicates the current execution line of higher level
-frames.
-
-If you drag the arrow in the fringe with @kbd{Mouse-1}
-(@code{gdb-mouse-until}), execution will continue to the line where
-you release the button, provided it is still in the same frame.
-Alternatively, you can click @kbd{Mouse-3} at some point in the fringe
-of this buffer and execution will advance to there. A similar command
-(@code{gdb-mouse-jump}) allows you to jump to a source line without
-executing the intermediate lines by clicking @kbd{C-Mouse-3}. This
-command allows you to go backwards which can be useful for running
-through code that has already executed, in order to examine its
-execution in more detail.
+@cindex fringes, for debugging
-@table @kbd
-@item Mouse-1
-Set or clear a breakpoint.
+@table @asis
+@item @kbd{Mouse-1} (in fringe)
+Set or clear a breakpoint on that line.
-@item C-Mouse-1
-Enable or disable a breakpoint.
+@item @kbd{C-Mouse-1} (in fringe)
+Enable or disable a breakpoint on that line.
-@item Mouse-3
-Continue execution to here.
+@item @kbd{Mouse-3} (in fringe)
+Continue execution to that line.
-@item C-Mouse-3
-Jump to here.
+@item @kbd{C-Mouse-3} (in fringe)
+Jump to that line.
@end table
-If the variable @code{gdb-find-source-frame} is non-@code{nil} and
-execution stops in a frame for which there is no source code e.g after
-an interrupt, then Emacs finds and displays the first frame further up
-stack for which there is source. If it is @code{nil} then the source
-buffer continues to display the last frame which maybe more useful,
-for example, when re-setting a breakpoint.
+ On a graphical display, you can click @kbd{Mouse-1} in the fringe of
+a source buffer, to set a breakpoint on that line (@pxref{Fringes}).
+A red dot appears in the fringe, where you clicked. If a breakpoint
+already exists there, the click removes it. A @kbd{C-Mouse-1} click
+enables or disables an existing breakpoint; a breakpoint that is
+disabled, but not unset, is indicated by a gray dot.
+
+ On a text-only terminal, or when fringes are disabled, enabled
+breakpoints are indicated with a @samp{B} character in the left margin
+of the window. Disabled breakpoints are indicated with @samp{b}.
+(The margin is only displayed if a breakpoint is present.)
+
+ A solid arrow in the left fringe of a source buffer indicates the
+line of the innermost frame where the debugged program has stopped. A
+hollow arrow indicates the current execution line of a higher-level
+frame. If you drag the arrow in the fringe with @kbd{Mouse-1}, that
+causes execution to advance to the line where you release the button.
+Alternatively, you can click @kbd{Mouse-3} in the fringe to advance to
+that line. You can click @kbd{C-Mouse-3} in the fringe to jump to
+that line without executing the intermediate lines. This command
+allows you to go backwards, which can be useful for running through
+code that has already executed, in order to examine its execution in
+more detail.
@node Breakpoints Buffer
@subsubsection Breakpoints Buffer
- The breakpoints buffer shows the existing breakpoints, watchpoints and
-catchpoints (@pxref{Breakpoints,,, gdb, The GNU debugger}). It has
-these special commands, which mostly apply to the @dfn{current
-breakpoint}, the breakpoint which point is on.
+ The GDB Breakpoints buffer shows the breakpoints, watchpoints and
+catchpoints in the debugger session. @xref{Breakpoints,,, gdb, The
+GNU debugger}. It provides the following commands, which mostly apply
+to the @dfn{current breakpoint} (the breakpoint which point is on):
@table @kbd
@item @key{SPC}
-@kindex SPC @r{(GDB breakpoints buffer)}
+@kindex SPC @r{(GDB Breakpoints buffer)}
@findex gdb-toggle-breakpoint
-Enable/disable current breakpoint (@code{gdb-toggle-breakpoint}).
-On a graphical display, this changes the color of a bullet in the
-margin of a source buffer at the relevant line. This is red when
-the breakpoint is enabled and gray when it is disabled. Text-only
-terminals correspondingly display a @samp{B} or @samp{b}.
+Enable/disable current breakpoint (@code{gdb-toggle-breakpoint}). On
+a graphical display, this changes the color of the dot in the fringe
+of the source buffer at that line. The dot is red when the breakpoint
+is enabled, and gray when it is disabled.
@item D
-@kindex D @r{(GDB breakpoints buffer)}
+@kindex D @r{(GDB Breakpoints buffer)}
@findex gdb-delete-breakpoint
Delete the current breakpoint (@code{gdb-delete-breakpoint}).
@item @key{RET}
-@kindex RET @r{(GDB breakpoints buffer)}
+@kindex RET @r{(GDB Breakpoints buffer)}
@findex gdb-goto-breakpoint
Visit the source line for the current breakpoint
(@code{gdb-goto-breakpoint}).
@item Mouse-2
-@kindex Mouse-2 @r{(GDB breakpoints buffer)}
+@kindex Mouse-2 @r{(GDB Breakpoints buffer)}
Visit the source line for the breakpoint you click on.
@end table
@vindex gdb-show-threads-by-default
-When @code{gdb-many-windows} is non-@code{nil}, the breakpoints buffer
-shares its window with the threads buffer. To switch from one to the
-other click with @kbd{Mouse-1} on the relevant button in the header
-line. If @code{gdb-show-threads-by-default} is non-@code{nil}, the
-threads buffer, rather than the breakpoints buffer, is shown at start
-up.
+ When @code{gdb-many-windows} is non-@code{nil}, the GDB Breakpoints
+buffer shares its window with the GDB Threads buffer. To switch from
+one to the other click with @kbd{Mouse-1} on the relevant button in
+the header line. If @code{gdb-show-threads-by-default} is
+non-@code{nil}, the GDB Threads buffer is the one shown by default.
@node Threads Buffer
@subsubsection Threads Buffer
@findex gdb-select-thread
-The threads buffer displays a summary of all threads currently in your
-program (@pxref{Threads, Threads, Debugging programs with multiple
-threads, gdb, The GNU debugger}). Move point to any thread in the list
-and press @key{RET} to select it (@code{gdb-select-thread}) and
-display the associated source in the primary source buffer.
-Alternatively, click @kbd{Mouse-2} on a thread to select it. Contents
-of all GDB buffers are updated whenever you select a thread.
+ The GDB Threads buffer displays a summary of the threads in the
+debugged program. @xref{Threads, Threads, Debugging programs with
+multiple threads, gdb, The GNU debugger}. To select a thread, move
+point there and type @key{RET} (@code{gdb-select-thread}), or click on
+it with @kbd{Mouse-2}. This also displays the associated source
+buffer, and updates the contents of the other GDB buffers.
You can customize variables under @code{gdb-buffers} group to select
-fields included in threads buffer.
+fields included in GDB Threads buffer.
@table @code
@item gdb-thread-buffer-verbose-names
@vindex gdb-thread-buffer-verbose-names
-Show long thread names like @samp{Thread 0x4e2ab70 (LWP 1983)} in
-threads buffer.
+Show long thread names like @samp{Thread 0x4e2ab70 (LWP 1983)}.
@item gdb-thread-buffer-arguments
@vindex gdb-thread-buffer-arguments
-Show arguments of thread top frames in threads buffer.
+Show arguments of thread top frames.
@item gdb-thread-buffer-locations
@vindex gdb-thread-buffer-locations
-Show file information or library names in threads buffer.
+Show file information or library names.
@item gdb-thread-buffer-addresses
@vindex gdb-thread-buffer-addresses
Show addresses for thread frames in threads buffer.
@end table
- It's possible to observe information for several threads
-simultaneously (in addition to buffers which show information for
-currently selected thread) using the following keys from the threads
-buffer.
+ To view information for several threads simultaneously, use the
+following commands from the GDB Threads buffer.
@table @kbd
@item d
@kindex d @r{(GDB threads buffer)}
@findex gdb-display-disassembly-for-thread
-Display disassembly buffer for the thread at current line.
-(@code{gdb-display-disassembly-for-thread})
+Display disassembly buffer for the thread at current line
+(@code{gdb-display-disassembly-for-thread}).
@item f
@kindex f @r{(GDB threads buffer)}
@findex gdb-display-stack-for-thread
-Display stack buffer for the thread at current line.
+Display the GDB Stack buffer for the thread at current line
(@code{gdb-display-stack-for-thread}).
@item l
@kindex l @r{(GDB threads buffer)}
@findex gdb-display-locals-for-thread
-Display locals buffer for the thread at current line.
+Display the GDB Locals buffer for the thread at current line
(@code{gdb-display-locals-for-thread}).
@item r
@kindex r @r{(GDB threads buffer)}
@findex gdb-display-registers-for-thread
-Display registers buffer for the thread at current line.
+Display the GDB Registers buffer for the thread at current line
(@code{gdb-display-registers-for-thread}).
@end table
-Pressing their upper-case counterparts, @kbd{D}, @kbd{F} ,@kbd{L} and
-@kbd{R} displays the corresponding buffer in a new frame.
+@noindent
+Their upper-case counterparts, @kbd{D}, @kbd{F} ,@kbd{L} and @kbd{R},
+display the corresponding buffer in a new frame.
When you create a buffer showing information about some specific
thread, it becomes bound to that thread and keeps showing actual
-information while you debug your program. Every GDB buffer contains a
-number of thread it shows information for in its mode name. Thread
-number is also included in the buffer name of bound buffers to prevent
-buffer names clashing.
+information while you debug your program. The mode indicator for each
+GDB buffer shows the number of thread it is showing information about.
+The thread number is also included in the buffer name of bound
+buffers.
-Further commands are available in the threads buffer which depend on the
-mode of GDB that is used for controlling execution of your program.
-(@pxref{Multithreaded Debugging, Stopping and Starting Multi-threaded Programs}).
+ Further commands are available in the GDB Threads buffer which
+depend on the mode of GDB that is used for controlling execution of
+your program. @xref{Multithreaded Debugging}.
@node Stack Buffer
@subsubsection Stack Buffer
- The stack buffer displays a @dfn{call stack}, with one line for each
-of the nested subroutine calls (@dfn{stack frames}) now active in the
-program. @xref{Backtrace,, Backtraces, gdb, The GNU debugger}.
+ The GDB Stack buffer displays a @dfn{call stack}, with one line for
+each of the nested subroutine calls (@dfn{stack frames}) in the
+debugger session. @xref{Backtrace,, Backtraces, gdb, The GNU
+debugger}.
@findex gdb-frames-select
-An arrow in the fringe points to the selected frame or, if the fringe is
-not present, the number of the selected frame is displayed in reverse
-contrast. To select a frame in GDB, move point in the stack buffer to
-that stack frame and type @key{RET} (@code{gdb-frames-select}), or click
-@kbd{Mouse-2} on a stack frame. If the locals buffer is visible,
-selecting a stack frame updates it to display the local variables of the
-new frame.
+ On graphical displays, the selected stack frame is indicated by an
+arrow in the fringe. On text-only terminals, or when fringes are
+disabled, the selected stack frame is displayed in reverse contrast.
+To select a stack frame, move point in its line and type @key{RET}
+(@code{gdb-frames-select}), or click @kbd{Mouse-2} on it. Doing so
+also updates the Locals buffer
+@ifnottex
+(@pxref{Other GDB Buffers}).
+@end ifnottex
+@iftex
+(described in the next section).
+@end iftex
@node Other GDB Buffers
-@subsubsection Other Buffers
+@subsubsection Other GDB Buffers
@table @asis
-@item Input/Output Buffer
-@vindex gdb-use-separate-io-buffer
-If the variable @code{gdb-use-separate-io-buffer} is non-@code{nil},
-the program being debugged takes its input and displays its output
-here. Otherwise it uses the GUD buffer for that. To toggle whether
-GUD mode uses this buffer, do @kbd{M-x gdb-use-separate-io-buffer}.
-This takes effect when you next restart the program you are debugging.
-
-The history and replay commands from Shell mode are available here,
-as are the commands to send signals to the debugged program.
-@xref{Shell Mode}.
-
@item Locals Buffer
-The locals buffer displays the values of local variables of the
-current frame for simple data types (@pxref{Frame Info, Frame Info,
+This buffer displays the values of local variables of the current
+frame for simple data types (@pxref{Frame Info, Frame Info,
Information on a frame, gdb, The GNU debugger}). Press @key{RET} or
click @kbd{Mouse-2} on the value if you want to edit it.
Arrays and structures display their type only. With GDB 6.4 or later,
-move point to their name and press @key{RET}, or alternatively click
-@kbd{Mouse-2} there, to examine their values. With earlier versions
-of GDB, use @kbd{Mouse-2} or @key{RET} on the type description
+you can examine the value of the local variable at point by typing
+@key{RET}, or with a @kbd{Mouse-2} click. With earlier versions of
+GDB, use @key{RET} or @kbd{Mouse-2} on the type description
(@samp{[struct/union]} or @samp{[array]}). @xref{Watch Expressions}.
@item Registers Buffer
@findex toggle-gdb-all-registers
-The registers buffer displays the values held by the registers
+This buffer displays the values held by the registers
(@pxref{Registers,,, gdb, The GNU debugger}). Press @key{RET} or
-click @kbd{Mouse-2} on a register if you want to edit its value.
-With GDB 6.4 or later, recently changed register values display with
-@code{font-lock-warning-face}. With earlier versions of GDB, you can
-press @key{SPC} to toggle the display of floating point registers
-(@code{toggle-gdb-all-registers}).
+click @kbd{Mouse-2} on a register if you want to edit its value. With
+GDB 6.4 or later, recently changed register values display with
+@code{font-lock-warning-face}.
@item Assembler Buffer
The assembler buffer displays the current frame as machine code. An
@@ -1172,8 +1133,8 @@ size for these data items.
@end table
When @code{gdb-many-windows} is non-@code{nil}, the locals buffer
-shares its window with the registers buffer, just like breakpoints
-and threads buffers. To switch from one to the other click with
+shares its window with the registers buffer, just like breakpoints and
+threads buffers. To switch from one to the other, click with
@kbd{Mouse-1} on the relevant button in the header line.
@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
specify a prefix argument, you can enter the variable name in the
minibuffer.
- Each watch expression is displayed in the speedbar. Complex data
-types, such as arrays, structures and unions are represented in a tree
-format. Leaves and simple data types show the name of the expression
-and its value and, when the speedbar frame is selected, display the
-type as a tooltip. Higher levels show the name, type and address
-value for pointers and just the name and type otherwise. Root expressions
-also display the frame address as a tooltip to help identify the frame
-in which they were defined.
+ Each watch expression is displayed in the speedbar
+(@pxref{Speedbar}). Complex data types, such as arrays, structures
+and unions are represented in a tree format. Leaves and simple data
+types show the name of the expression and its value and, when the
+speedbar frame is selected, display the type as a tooltip. Higher
+levels show the name, type and address value for pointers and just the
+name and type otherwise. Root expressions also display the frame
+address as a tooltip to help identify the frame in which they were
+defined.
To expand or contract a complex data type, click @kbd{Mouse-2} or
press @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
screen Emacs frame.
@node Multithreaded Debugging
-@subsubsection Stopping and Starting Multi-threaded Programs
+@subsubsection Multithreaded Debugging
@cindex Multithreaded debugging in GDB
-
-@subsubheading All-stop Debugging
-
-In all-stop mode, whenever your program stops, @emph{all} threads of
-execution stop. Likewise, whenever you restart the program, all
-threads start executing. @xref{All-Stop Mode, , All-Stop Mode, gdb,
-The GNU debugger}. You can enable this behavior in Emacs by setting
-@code{gdb-non-stop-setting} to @code{nil} before starting a debugging
-session.
-
-@subsubheading Non-stop Debugging
@cindex Non-stop debugging in GDB
-For some multi-threaded targets, GDB supports a further mode of
-operation in which you can examine stopped program threads in the
-debugger while other threads continue to execute freely.
-@xref{Non-Stop Mode, , Non-Stop Mode, gdb, The GNU debugger}.
-This is referred to as @dfn{non-stop} mode.
-
-Versions of GDB prior to 7.0 do not support non-stop mode and it does
-not work on all targets. In such cases, Emacs uses all-stop mode
-regardless of the value of @code{gdb-non-stop-setting}.
+ In GDB's @dfn{all-stop mode}, whenever your program stops, all
+execution threads stop. Likewise, whenever you restart the program,
+all threads start executing. @xref{All-Stop Mode, , All-Stop Mode,
+gdb, The GNU debugger}. For some multi-threaded targets, GDB supports
+a further mode of operation, called @dfn{non-stop mode}, in which you
+can examine stopped program threads in the debugger while other
+threads continue to execute freely. @xref{Non-Stop Mode, , Non-Stop
+Mode, gdb, The GNU debugger}. Versions of GDB prior to 7.0 do not
+support non-stop mode, and it does not work on all targets.
@vindex gdb-non-stop-setting
-If the variable @code{gdb-non-stop-setting} is non-@code{nil} (the
-default value), Emacs tries to start GDB in non-stop mode. Note that
-GDB debugging session needs to be restarted for change of this setting
-to take effect.
+ The variable @code{gdb-non-stop-setting} determines whether Emacs
+runs GDB in all-stop mode or non-stop mode. The default is @code{t},
+which means it tries to use non-stop mode if that is available. If
+you change the value to @code{nil}, or if non-stop mode is
+unavailable, Emacs runs GDB in all-stop mode. The variable takes
+effect when Emacs begins a debugging session; if you change its value,
+you should restart any active debugging session.
@vindex gdb-switch-when-another-stopped
-When a thread stops in non-stop mode, Emacs automatically switches to
-that thread. It may be undesirable to allow switching of current
-thread when some other stopped thread is already selected. Set
-@code{gdb-switch-when-another-stopped} to @code{nil} to prevent this.
+ When a thread stops in non-stop mode, Emacs usually switches to that
+thread. If you don't want Emacs to do this switch if another stopped
+thread is already selected, change the variable
+@code{gdb-switch-when-another-stopped} to @code{nil}.
@vindex gdb-switch-reasons
-Emacs can decide whether or not to switch to the stopped thread
-depending on the reason which caused the stop. Customize
-@code{gdb-switch-reasons} to select stop reasons which make Emacs
-switch thread.
+ Emacs can decide whether or not to switch to the stopped thread
+depending on the reason which caused the stop. Customize the variable
+@code{gdb-switch-reasons} to select the stop reasons which will cause
+a thread switch.
@vindex gdb-stopped-hooks
-The variable @code{gdb-stopped-hooks} allows you to execute your
+ The variable @code{gdb-stopped-hooks} allows you to execute your
functions whenever some thread stops.
In non-stop mode, you can switch between different modes for GUD
@@ -1297,7 +1251,7 @@ execution control commands.
@table @dfn
@item Non-stop/A
-When @code{gdb-gud-control-all-threads} is @code{t} (the default
+ When @code{gdb-gud-control-all-threads} is @code{t} (the default
value), interruption and continuation commands apply to all threads,
so you can halt or continue all your threads with one command using
@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.
Stepping commands always apply to the current thread.
-@subsubheading Fine Thread Control
-
In non-stop mode, you can interrupt/continue your threads without
selecting them. Hitting @kbd{i} in threads buffer interrupts thread
under point, @kbd{c} continues it, @kbd{s} steps through. More such
commands may be added in the future.
-Combined with creating bound buffers for any thread, this allows you
-to change and track state of many threads in the same time.
-
- Note that when you interrupt a thread, it stops with @samp{signal
-received} reason. If that reason is included in your
+ Note that when you interrupt a thread, it stops with the
+@samp{signal received} reason. If that reason is included in your
@code{gdb-switch-reasons} (it is by default), Emacs will switch to
that thread.
@node Executing Lisp
@section Executing Lisp Expressions
- Emacs has several different major modes for Lisp and Scheme. They are
-the same in terms of editing commands, but differ in the commands for
-executing Lisp expressions. Each mode has its own purpose.
+ Emacs has major modes for several variants of Lisp. They use the
+same editing commands as other programming language modes
+(@pxref{Programs}). In addition, they provide special commands for
+executing Lisp expressions.
@table @asis
-@item Emacs-Lisp mode
-The mode for editing source files of programs to run in Emacs Lisp.
-This mode defines @kbd{C-M-x} to evaluate the current defun.
-@xref{Lisp Libraries}.
+@item Emacs Lisp mode
+The mode for editing Emacs Lisp source files. It defines @kbd{C-M-x}
+to evaluate the current top-level Lisp expression. @xref{Lisp Eval}.
+
@item Lisp Interaction mode
-The mode for an interactive session with Emacs Lisp. It defines
-@kbd{C-j} to evaluate the sexp before point and insert its value in the
+The mode for an interactive Emacs Lisp session. It defines @kbd{C-j}
+to evaluate the expression before point and insert its value in the
buffer. @xref{Lisp Interaction}.
+
@item Lisp mode
The mode for editing source files of programs that run in Lisps other
-than Emacs Lisp. This mode defines @kbd{C-M-x} to send the current defun
-to an inferior Lisp process. @xref{External Lisp}.
+than Emacs Lisp. It defines @kbd{C-M-x} to evaluate the current
+top-level expression in an external Lisp. @xref{External Lisp}.
+
@item Inferior Lisp mode
-The mode for an interactive session with an inferior Lisp process.
-This mode combines the special features of Lisp mode and Shell mode
-(@pxref{Shell Mode}).
+The mode for an interactive session with an external Lisp which is
+being run as a subprocess (or @dfn{inferior process}) of Emacs.
+@ifnottex
+@xref{External Lisp}.
+@end ifnottex
+
@item Scheme mode
-Like Lisp mode but for Scheme programs.
+Like Lisp mode, but for Scheme programs.
+
@item Inferior Scheme mode
-The mode for an interactive session with an inferior Scheme process.
+Like Inferior Lisp mode, but for Scheme.
@end table
- Most editing commands for working with Lisp programs are in fact
-available globally. @xref{Programs}.
-
@node Lisp Libraries
@section Libraries of Lisp Code for Emacs
@cindex libraries
@cindex loading Lisp code
- Lisp code for Emacs editing commands is stored in files whose names
-conventionally end in @file{.el}. This ending tells Emacs to edit them in
-Emacs-Lisp mode (@pxref{Executing Lisp}).
+ Emacs Lisp code is stored in files whose names conventionally end in
+@file{.el}. Such files are automatically visited in Emacs Lisp mode.
@cindex byte code
Emacs Lisp code can be compiled into byte-code, which loads faster,
-takes up less space, and executes faster. @xref{Byte Compilation,,
-Byte Compilation, elisp, the Emacs Lisp Reference Manual}. By
-convention, the compiled code for a library goes in a separate file
-whose name ends in @samp{.elc}. Thus, the compiled code for
-@file{foo.el} goes in @file{foo.elc}.
+takes up less space, and executes faster. By convention, compiled
+Emacs Lisp code goes in a separate file whose name ends in
+@samp{.elc}. For example, the compiled code for @file{foo.el} goes in
+@file{foo.elc}. @xref{Byte Compilation,, Byte Compilation, elisp, the
+Emacs Lisp Reference Manual}.
@findex load-file
- To execute a file of Emacs Lisp code, use @kbd{M-x load-file}. This
-command reads a file name using the minibuffer and then executes the
-contents of that file as Lisp code. It is not necessary to visit the
-file first; in any case, this command reads the file as found on disk,
-not text in an Emacs buffer.
+ To @dfn{load} an Emacs Lisp file, type @kbd{M-x load-file}. This
+command reads a file name using the minibuffer, and executes the
+contents of that file as Emacs Lisp code. It is not necessary to
+visit the file first; this command reads the file directly from disk,
+not from an existing Emacs buffer.
@findex load
@findex load-library
- Once a file of Lisp code is installed in the Emacs Lisp library
-directories, users can load it using @kbd{M-x load-library}. Programs
-can load it by calling @code{load}, a more primitive function that is
-similar but accepts some additional arguments.
-
- @kbd{M-x load-library} differs from @kbd{M-x load-file} in that it
-searches a sequence of directories and tries three file names in each
-directory. Suppose your argument is @var{lib}; the three names are
-@file{@var{lib}.elc}, @file{@var{lib}.el}, and lastly just
-@file{@var{lib}}. If @file{@var{lib}.elc} exists, it is by convention
-the result of compiling @file{@var{lib}.el}; it is better to load the
-compiled file, since it will load and run faster.
-
- If @code{load-library} finds that @file{@var{lib}.el} is newer than
-@file{@var{lib}.elc} file, it issues a warning, because it's likely
-that somebody made changes to the @file{.el} file and forgot to
-recompile it. Nonetheless, it loads @file{@var{lib}.elc}. This is
-because people often leave unfinished edits the source file, and don't
-recompile it until they think it is ready to use.
+@cindex load path for Emacs Lisp
+ If an Emacs Lisp file is installed in the Emacs Lisp @dfn{load path}
+(defined below), you can load it by typing @kbd{M-x load-library},
+instead of using @kbd{M-x load-file}. The @kbd{M-x load-library}
+command prompts for a @dfn{library name} rather than a file name; it
+searches through each directory in the Emacs Lisp load path, trying to
+find a file matching that library name. If the library name is
+@samp{@var{foo}}, it tries looking for files named
+@file{@var{foo}.elc}, @file{@var{foo}.el}, and lastly just
+@file{@var{foo}}; the first one found is loaded. This command prefers
+@file{.elc} files over @file{.el} files because compiled files load
+and run faster. If it finds that @file{@var{lib}.el} is newer than
+@file{@var{lib}.elc}, it issues a warning, in case someone made
+changes to the @file{.el} file and forgot to recompile it, but loads
+the @file{.elc} file anyway. (Due to this behavior, you can save
+unfinished edits to Emacs Lisp source files, and not recompile until
+your changes are ready for use.)
+
+ Emacs Lisp programs usually load Emacs Lisp files using the
+@code{load} function. This is similar to @code{load-library}, but is
+lower-level and accepts additional arguments. @xref{How Programs Do
+Loading,,, elisp, the Emacs Lisp Reference Manual}.
@vindex load-path
- The variable @code{load-path} specifies the sequence of directories
-searched by @kbd{M-x load-library}. Its value should be a list of
-strings that are directory names; in addition, @code{nil} in this list
-stands for the current default directory. (Generally, it is not a
-good idea to put @code{nil} in the list; if you find yourself wishing
+ The Emacs Lisp load path is specified by the variable
+@code{load-path}. Its value should be a list of directory names
+(strings). These directories are searched, in the specified order, by
+the @kbd{M-x load-library} command, the lower-level @code{load}
+function, and other Emacs functions that find Emacs Lisp libraries. A
+list entry in @code{load-path} can also have the special value
+@code{nil}, which stands for the current default directory, but it is
+almost always a bad idea to use this. (If you find yourself wishing
that @code{nil} were in the list, most likely what you really want is
-to do @kbd{M-x load-file} this once.)
+to use @kbd{M-x load-file}.)
The default value of @code{load-path} is a list of directories where
the Lisp code for Emacs itself is stored. If you have libraries of
-your own, put them in a single directory and add that directory to
-@code{load-path}, by adding a line like this to your init file
-(@pxref{Init File}):
+your own in another directory, you can add that directory to the load
+path. Unlike most other variables described in this manual,
+@code{load-path} cannot be changed via the Customize interface
+(@pxref{Easy Customization}), but you can add a directory to it by
+putting a line like this in your init file (@pxref{Init File}):
@example
-(add-to-list 'load-path "/path/to/lisp/libraries")
+(add-to-list 'load-path "/path/to/my/lisp/library")
@end example
@cindex autoload
- Some commands are @dfn{autoloaded}: when you run them, Emacs will
-automatically load the associated library first. For instance, the
-@code{compile} and @code{compilation-mode} commands
-(@pxref{Compilation}) are autoloaded; if you call either command,
-Emacs automatically loads the @code{compile} library. In contrast,
-the command @code{recompile} is not autoloaded, so it is unavailable
-until you load the @code{compile} library.
+ Some commands are @dfn{autoloaded}: when you run them, Emacs
+automatically loads the associated library first. For instance, the
+@kbd{M-x compile} command (@pxref{Compilation}) is autoloaded; if you
+call it, Emacs automatically loads the @code{compile} library first.
+In contrast, the command @kbd{M-x recompile} is not autoloaded, so it
+is unavailable until you load the @code{compile} library.
@vindex load-dangerous-libraries
@cindex Lisp files byte-compiled by XEmacs
@@ -1449,38 +1408,35 @@ Emacs to crash. Set the variable @code{load-dangerous-libraries} to
@node Lisp Eval
@section Evaluating Emacs Lisp Expressions
-@cindex Emacs-Lisp mode
-@cindex mode, Emacs-Lisp
+@cindex Emacs Lisp mode
+@cindex mode, Emacs Lisp
@findex emacs-lisp-mode
- Lisp programs intended to be run in Emacs should be edited in
-Emacs-Lisp mode; this happens automatically for file names ending in
-@file{.el}. By contrast, Lisp mode itself is used for editing Lisp
-programs intended for other Lisp systems. To switch to Emacs-Lisp mode
-explicitly, use the command @kbd{M-x emacs-lisp-mode}.
-
- For testing of Lisp programs to run in Emacs, it is often useful to
-evaluate part of the program as it is found in the Emacs buffer. For
-example, after changing the text of a Lisp function definition,
-evaluating the definition installs the change for future calls to the
-function. Evaluation of Lisp expressions is also useful in any kind of
-editing, for invoking noninteractive functions (functions that are
-not commands).
+ Emacs Lisp mode is the major mode for editing Emacs Lisp. Its mode
+command is @kbd{M-x emacs-lisp-mode}.
-@table @kbd
-@item M-:
-Read a single Lisp expression in the minibuffer, evaluate it, and print
-the value in the echo area (@code{eval-expression}).
-@item C-x C-e
-Evaluate the Lisp expression before point, and print the value in the
-echo area (@code{eval-last-sexp}).
-@item C-M-x
+ Emacs provides several commands for evaluating Emacs Lisp
+expressions. You can use these commands in Emacs Lisp mode, to test
+your Emacs Lisp code as it is being written. For example, after
+re-writing a function, you can evaluate the function definition to
+make it take effect for subsequent function calls. These commands are
+also available globally, and can be used outside Emacs Lisp mode.
+
+@table @asis
+@item @kbd{M-:}
+Read a single Emacs Lisp expression in the minibuffer, evaluate it,
+and print the value in the echo area (@code{eval-expression}).
+@item @kbd{C-x C-e}
+Evaluate the Emacs Lisp expression before point, and print the value
+in the echo area (@code{eval-last-sexp}).
+@item @kbd{C-M-x} @r{(in Emacs Lisp mode)}
+@itemx @kbd{M-x eval-defun}
Evaluate the defun containing or after point, and print the value in
the echo area (@code{eval-defun}).
-@item M-x eval-region
-Evaluate all the Lisp expressions in the region.
-@item M-x eval-buffer
-Evaluate all the Lisp expressions in the buffer.
+@item @kbd{M-x eval-region}
+Evaluate all the Emacs Lisp expressions in the region.
+@item @kbd{M-x eval-buffer}
+Evaluate all the Emacs Lisp expressions in the buffer.
@end table
@ifinfo
@@ -1492,150 +1448,144 @@ Evaluate all the Lisp expressions in the buffer.
@kindex M-:
@end ifnotinfo
@findex eval-expression
- @kbd{M-:} (@code{eval-expression}) is the most basic command for evaluating
-a Lisp expression interactively. It reads the expression using the
-minibuffer, so you can execute any expression on a buffer regardless of
-what the buffer contains. When the expression is evaluated, the current
-buffer is once again the buffer that was current when @kbd{M-:} was
-typed.
-
-@kindex C-M-x @r{(Emacs-Lisp mode)}
-@findex eval-defun
- In Emacs-Lisp mode, the key @kbd{C-M-x} is bound to the command
-@code{eval-defun}, which parses the defun containing or following point
-as a Lisp expression and evaluates it. The value is printed in the echo
-area. This command is convenient for installing in the Lisp environment
-changes that you have just made in the text of a function definition.
-
- @kbd{C-M-x} treats @code{defvar} expressions specially. Normally,
-evaluating a @code{defvar} expression does nothing if the variable it
-defines already has a value. But @kbd{C-M-x} unconditionally resets the
-variable to the initial value specified in the @code{defvar} expression.
-@code{defcustom} expressions are treated similarly.
-This special feature is convenient for debugging Lisp programs.
-Typing @kbd{C-M-x} on a @code{defface} expression reinitializes
-the face according to the @code{defface} specification.
+ @kbd{M-:} (@code{eval-expression}) reads an expression using the
+minibuffer, and evaluates it. (Before evaluating the expression, the
+current buffer switches back to the buffer that was current when you
+typed @kbd{M-:}, not the minibuffer into which you typed the
+expression.)
@kindex C-x C-e
@findex eval-last-sexp
- The command @kbd{C-x C-e} (@code{eval-last-sexp}) evaluates the Lisp
-expression preceding point in the buffer, and displays the value in the
-echo area. It is available in all major modes, not just Emacs-Lisp
-mode. It does not treat @code{defvar} specially.
-
- When the result of an evaluation is an integer, you can type
-@kbd{C-x C-e} a second time to display the value of the integer result
-in additional formats (octal, hexadecimal, and character).
-
- If @kbd{C-x C-e}, or @kbd{M-:} is given a numeric argument, it
-inserts the value into the current buffer at point, rather than
-displaying it in the echo area. The argument's value does not matter.
-@kbd{C-M-x} with a numeric argument instruments the function
-definition for Edebug (@pxref{Instrumenting, Instrumenting for Edebug,, elisp, the Emacs Lisp Reference Manual}).
+ The command @kbd{C-x C-e} (@code{eval-last-sexp}) evaluates the
+Emacs Lisp expression preceding point in the buffer, and displays the
+value in the echo area. When the result of an evaluation is an
+integer, you can type @kbd{C-x C-e} a second time to display the value
+of the integer result in additional formats (octal, hexadecimal, and
+character).
+
+ If @kbd{M-:} or @kbd{C-x C-e} is given a prefix argument, it inserts
+the value into the current buffer at point, rather than displaying it
+in the echo area. The argument's value does not matter.
+
+@kindex C-M-x @r{(Emacs Lisp mode)}
+@findex eval-defun
+ The @code{eval-defun} command is bound to @kbd{C-M-x} in Emacs Lisp
+mode. It evaluates the top-level Lisp expression containing or
+following point, and prints the value in the echo area. In this
+context, a top-level expression is referred to as a ``defun'', but it
+need not be an actual @code{defun} (function definition). In
+particular, this command treats @code{defvar} expressions specially.
+Normally, evaluating a @code{defvar} expression does nothing if the
+variable it defines already has a value. But this command
+unconditionally resets the variable to the initial value specified by
+the @code{defvar}; this is convenient for debugging Emacs Lisp
+programs. @code{defcustom} and @code{defface} expressions are treated
+similarly. Note that the other commands documented in this section do
+not have this special feature.
+
+ With a prefix argument, @kbd{C-M-x} instruments the function
+definition for Edebug, the Emacs Lisp Debugger. @xref{Instrumenting,
+Instrumenting for Edebug,, elisp, the Emacs Lisp Reference Manual}.
@findex eval-region
@findex eval-buffer
- The most general command for evaluating Lisp expressions from a buffer
-is @code{eval-region}. @kbd{M-x eval-region} parses the text of the
-region as one or more Lisp expressions, evaluating them one by one.
-@kbd{M-x eval-buffer} is similar but evaluates the entire
-buffer. This is a reasonable way to install the contents of a file of
-Lisp code that you are ready to test. Later, as you find bugs and
-change individual functions, use @kbd{C-M-x} on each function that you
-change. This keeps the Lisp world in step with the source file.
+ The command @kbd{M-x eval-region} parses the text of the region as
+one or more Lisp expressions, evaluating them one by one. @kbd{M-x
+eval-buffer} is similar but evaluates the entire buffer.
@vindex eval-expression-print-level
@vindex eval-expression-print-length
@vindex eval-expression-debug-on-error
- The two customizable variables @code{eval-expression-print-level} and
-@code{eval-expression-print-length} control the maximum depth and length
-of lists to print in the result of the evaluation commands before
-abbreviating them. @code{eval-expression-debug-on-error} controls
-whether evaluation errors invoke the debugger when these commands are
-used; its default is @code{t}.
+ The customizable variables @code{eval-expression-print-level} and
+@code{eval-expression-print-length} control the maximum depth and
+length of lists to print in the result of the evaluation commands
+before abbreviating them. @code{eval-expression-debug-on-error}
+controls whether evaluation errors invoke the debugger when these
+commands are used; its default is @code{t}.
@node Lisp Interaction
@section Lisp Interaction Buffers
+@findex lisp-interaction-mode
When Emacs starts up, it contains a buffer named @samp{*scratch*},
-which is provided for evaluating Lisp expressions interactively inside
-Emacs. Its major mode is Lisp Interaction mode.
+which is provided for evaluating Emacs Lisp expressions interactively.
+Its major mode is Lisp Interaction mode. You can also enable Lisp
+Interaction mode by typing @kbd{M-x lisp-interaction-mode}.
@findex eval-print-last-sexp
@kindex C-j @r{(Lisp Interaction mode)}
- The simplest way to use the @samp{*scratch*} buffer is to insert
-Lisp expressions and type @kbd{C-j} (@code{eval-print-last-sexp})
-after each expression. This command reads the Lisp expression before
-point, evaluates it, and inserts the value in printed representation
-before point. The result is a complete typescript of the expressions
-you have evaluated and their values.
+ In the @samp{*scratch*} buffer, and other Lisp Interaction mode
+buffers, @kbd{C-j} (@code{eval-print-last-sexp}) evaluates the Lisp
+expression before point, and inserts the value at point. Thus, as you
+type expressions into the buffer followed by @kbd{C-j} after each
+expression, the buffer records a transcript of the evaluated
+expressions and their values. All other commands in Lisp Interaction
+mode are the same as in Emacs Lisp mode.
@vindex initial-scratch-message
At startup, the @samp{*scratch*} buffer contains a short message, in
the form of a Lisp comment, that explains what it is for. This
message is controlled by the variable @code{initial-scratch-message},
-which should be either a string or @code{nil}. If you set it to the
-empty string, or @code{nil}, the initial message is suppressed.
-
-@findex lisp-interaction-mode
- All other commands in Lisp Interaction mode are the same as in Emacs
-Lisp mode. You can enable Lisp Interaction mode by typing @kbd{M-x
-lisp-interaction-mode}.
+which should be either a string, or @code{nil} (which means to
+suppress the message).
@findex ielm
- An alternative way of evaluating Emacs Lisp expressions interactively
-is to use Inferior Emacs-Lisp mode, which provides an interface rather
-like Shell mode (@pxref{Shell Mode}) for evaluating Emacs Lisp
-expressions. Type @kbd{M-x ielm} to create an @samp{*ielm*} buffer
-which uses this mode. For more information see that command's
-documentation.
+ An alternative way of evaluating Emacs Lisp expressions
+interactively is to use Inferior Emacs Lisp mode, which provides an
+interface rather like Shell mode (@pxref{Shell Mode}) for evaluating
+Emacs Lisp expressions. Type @kbd{M-x ielm} to create an
+@samp{*ielm*} buffer which uses this mode. For more information, see
+that command's documentation.
@node External Lisp
@section Running an External Lisp
+@cindex Lisp mode
+@cindex mode, Lisp
+@cindex Common Lisp
- Emacs has facilities for running programs in other Lisp systems. You can
-run a Lisp process as an inferior of Emacs, and pass expressions to it to
-be evaluated. You can also pass changed function definitions directly from
-the Emacs buffers in which you edit the Lisp programs to the inferior Lisp
-process.
+ Lisp mode is the major mode for editing programs written in
+general-purpose Lisp dialects, such as Common Lisp. Its mode command
+is @kbd{M-x lisp-mode}. Emacs uses Lisp mode automatically for files
+whose names end in @file{.l}, @file{.lsp}, or @file{.lisp}.
@findex run-lisp
@vindex inferior-lisp-program
@kindex C-x C-z
- To run an inferior Lisp process, type @kbd{M-x run-lisp}. This runs
-the program named @code{lisp}, the same program you would run by typing
-@code{lisp} as a shell command, with both input and output going through
-an Emacs buffer named @samp{*lisp*}. That is to say, any ``terminal
-output'' from Lisp will go into the buffer, advancing point, and any
-``terminal input'' for Lisp comes from text in the buffer. (You can
-change the name of the Lisp executable file by setting the variable
-@code{inferior-lisp-program}.)
-
- To give input to Lisp, go to the end of the buffer and type the input,
-terminated by @key{RET}. The @samp{*lisp*} buffer is in Inferior Lisp
-mode, which combines the special characteristics of Lisp mode with most
-of the features of Shell mode (@pxref{Shell Mode}). The definition of
-@key{RET} to send a line to a subprocess is one of the features of Shell
-mode.
-
-@findex lisp-mode
- For the source files of programs to run in external Lisps, use Lisp
-mode. You can switch to this mode with @kbd{M-x lisp-mode}, and it is
-used automatically for files whose names end in @file{.l},
-@file{.lsp}, or @file{.lisp}.
+ You can run an external Lisp session as a subprocess or
+@dfn{inferior process} of Emacs, and pass expressions to it to be
+evaluated. To begin an external Lisp session, type @kbd{M-x
+run-lisp}. This runs the program named @command{lisp}, and sets it up
+so that both input and output go through an Emacs buffer named
+@samp{*inferior-lisp*}. To change the name of the Lisp program run by
+@kbd{M-x run-lisp}, change the variable @code{inferior-lisp-program}.
+
+ The major mode for the @samp{*lisp*} buffer is Inferior Lisp mode,
+which combines the characteristics of Lisp mode and Shell mode
+(@pxref{Shell Mode}). To send input to the Lisp session, go to the
+end of the @samp{*lisp*} buffer and type the input, followed by
+@key{RET}. Terminal output from the Lisp session is automatically
+inserted in the buffer.
@kindex C-M-x @r{(Lisp mode)}
@findex lisp-eval-defun
- When you edit a function in a Lisp program you are running, the easiest
-way to send the changed definition to the inferior Lisp process is the key
-@kbd{C-M-x}. In Lisp mode, this runs the function @code{lisp-eval-defun},
-which finds the defun around or following point and sends it as input to
-the Lisp process. (Emacs can send input to any inferior process regardless
-of what buffer is current.)
-
- Contrast the meanings of @kbd{C-M-x} in Lisp mode (for editing
-programs to be run in another Lisp system) and Emacs-Lisp mode (for
-editing Lisp programs to be run in Emacs; see @pxref{Lisp Eval}): in
-both modes it has the effect of installing the function definition
-that point is in, but the way of doing so is different according to
-where the relevant Lisp environment is found.
+ When you edit a Lisp program in Lisp mode, you can type @kbd{C-M-x}
+(@code{lisp-eval-defun}) to send an expression from the Lisp mode
+buffer to a Lisp session that you had started with @kbd{M-x run-lisp}.
+The expression sent is the top-level Lisp expression at or following
+point. The resulting value goes as usual into the
+@samp{*inferior-lisp*} buffer. Note that the effect of @kbd{C-M-x} in
+Lisp mode is thus very similar to its effect in Emacs Lisp mode
+(@pxref{Lisp Eval}), except that the expression is sent to a different
+Lisp environment instead of being evaluated in Emacs.
+
+@findex scheme-mode
+@findex run-scheme
+@cindex Scheme mode
+@cindex mode, Scheme
+@kindex C-M-x @r{(Scheme mode)}
+ The facilities for editing Scheme code, and for sending expressions
+to a Scheme subprocess, are very similar. Scheme source files are
+edited in Scheme mode, which can be explicitly enabled with @kbd{M-x
+scheme-mode}. You can initiate a Scheme session by typing @kbd{M-x
+run-scheme} (the buffer for interacting with Scheme is named
+@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
@vindex calendar-holiday-marker
@vindex diary-entry-marker
-@vindex calenday-today-marker
+@vindex calendar-today-marker
The variable @code{calendar-holiday-marker} specifies how to mark a
date as being a holiday. Its value may be a single-character string to
insert next to the date, or a face name to use for displaying the date.
Likewise, the variable @code{diary-entry-marker} specifies how to mark a
-date that has diary entries, and @code{calenday-today-marker} is used by
+date that has diary entries, and @code{calendar-today-marker} is used by
the function @code{calendar-mark-today} to mark today's date. By
default, the calendar uses faces named @code{holiday}, @code{diary}, and
@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 @@
@node Subdir Switches
@section Subdirectory Switches in Dired
-You can insert subdirectories with specified @code{ls} switches in
-Dired buffers using @kbd{C-u i}. You can change the @code{ls}
+You can insert subdirectories with specified @command{ls} switches in
+Dired buffers using @kbd{C-u i}. You can change the @command{ls}
switches of an already inserted subdirectory using @kbd{C-u l}.
Dired preserves the switches if you revert the buffer. Deleting a
subdirectory forgets about its switches.
-Using @code{dired-undo} (usually bound to @kbd{C-_} and @kbd{C-x u})
-to reinsert or delete subdirectories that were inserted with explicit
-switches can bypass Dired's machinery for remembering (or forgetting)
-switches. Deleting a subdirectory using @code{dired-undo} does not
-forget its switches. When later reinserted using @kbd{i}, it will be
-reinserted using its old switches. Using @code{dired-undo} to
-reinsert a subdirectory that was deleted using the regular
-Dired commands (not @code{dired-undo}) will originally insert it with
-its old switches. Reverting the buffer, however, will relist it using
-the buffer's default switches. If any of this yields problems, you
-can easily correct the situation using @kbd{C-u i} or @kbd{C-u l}.
+Using @code{dired-undo} (@pxref{Marks vs Flags}) to reinsert or delete
+subdirectories that were inserted with explicit switches can bypass
+Dired's machinery for remembering (or forgetting) switches. Deleting
+a subdirectory using @code{dired-undo} does not forget its switches.
+When later reinserted using @kbd{i}, it will be reinserted using its
+old switches. Using @code{dired-undo} to reinsert a subdirectory that
+was deleted using the regular Dired commands (not @code{dired-undo})
+will originally insert it with its old switches. Reverting the
+buffer, however, will relist it using the buffer's default switches.
+If any of this yields problems, you can easily correct the situation
+using @kbd{C-u i} or @kbd{C-u l}.
Dired does not remember the @code{R} switch. Inserting a subdirectory
with 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,
a directory name.
The variable @code{dired-listing-switches} specifies the options to
-give to @code{ls} for listing the directory; this string @emph{must}
-contain @samp{-l}. If you use a prefix argument with the @code{dired}
-command, you can specify the @code{ls} switches with the minibuffer
-before you enter the directory specification. No matter how they are
-specified, the @code{ls} switches can include short options (that is,
-single characters) requiring no arguments, and long options (starting
-with @samp{--}) whose arguments are specified with @samp{=}.
+give to @command{ls} for listing the directory; this string
+@emph{must} contain @samp{-l}. If you use a prefix argument with the
+@code{dired} command, you can specify the @command{ls} switches with the
+minibuffer before you enter the directory specification. No matter
+how they are specified, the @command{ls} switches can include short
+options (that is, single characters) requiring no arguments, and long
+options (starting with @samp{--}) whose arguments are specified with
+@samp{=}.
@vindex dired-use-ls-dired
- Note that Dired automatically adds the option @samp{--dired}, if
-your @code{ls} program supports it, unless you explicitly set
-the variable @code{dired-use-ls-dired} to @code{nil}. Without this
-option, Dired will have trouble parsing some @samp{unusual} file-names.
-See the documentation of @code{dired-use-ls-dired} for more details.
-
- On MS-Windows and MS-DOS systems, Emacs @emph{emulates} @code{ls};
-see @ref{ls in Lisp}, for options and peculiarities of that emulation.
+ If your @command{ls} program supports the @samp{--dired} option,
+Dired automatically passes it that option; this causes @command{ls} to
+emit special escape sequences for certain unusual file names, without
+which Dired will not be able to parse those names. The first time you
+run Dired in an Emacs session, it checks whether @command{ls} supports
+the @samp{--dired} option by calling it once with that option. If the
+exit code is 0, Dired will subsequently use the @samp{--dired} option;
+otherwise it will not. You can inhibit this check by customizing the
+variable @code{dired-use-ls-dired}. The value @code{unspecified} (the
+default) means to perform the check; any other non-@code{nil} value
+means to use the @samp{--dired} option; and @code{nil} means not to
+use the @samp{--dired} option.
+
+ On MS-Windows and MS-DOS systems, Emacs emulates @command{ls}.
+@xref{ls in Lisp}, for options and peculiarities of this emulation.
@findex dired-other-window
@kindex C-x 4 d
@findex dired-other-frame
@kindex C-x 5 d
- To display the Dired buffer in another window rather than in the
-selected window, use @kbd{C-x 4 d} (@code{dired-other-window}) instead
-of @kbd{C-x d}. @kbd{C-x 5 d} (@code{dired-other-frame}) uses a
-separate frame to display the Dired buffer.
+ To display the Dired buffer in another window, use @kbd{C-x 4 d}
+(@code{dired-other-window}) instead of @kbd{C-x d}. @kbd{C-x 5 d}
+(@code{dired-other-frame}) displays the Dired buffer in a separate
+frame.
+
+@kindex q @r{(Dired)}
+@findex quit-window
+ Typing @kbd{q} (@code{quit-window}) buries the Dired buffer, and
+deletes its window if the window was created just for that buffer.
@node Dired Navigation
@section Navigation in the Dired Buffer
@@ -124,7 +137,11 @@ minibuffer, and moves point to the line in the Dired buffer describing
that file.
@cindex searching Dired buffers
+@findex dired-isearch-filenames
@vindex dired-isearch-filenames
+@findex dired-isearch-filenames-regexp
+@kindex M-s f C-s @r{(Dired)}
+@kindex M-s f M-C-s @r{(Dired)}
@kbd{M-s f C-s} (@code{dired-isearch-filenames}) performs a forward
incremental search in the Dired buffer, looking for matches only
amongst 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}).
@item Mouse-1
@itemx Mouse-2
@findex dired-mouse-find-file-other-window
-Visit the file named by the line you click on
+Visit the file whose name you clicked on
(@code{dired-mouse-find-file-other-window}). This uses another window
to display the file, like the @kbd{o} command.
@item v
@kindex v @r{(Dired)}
@findex dired-view-file
-View the file described on the current line, using @kbd{M-x view-file}
-(@code{dired-view-file}). Viewing a file with @code{view-file} is
-like visiting it, but is slanted toward moving around in the file
-conveniently and does not allow changing the file. @xref{Misc File
-Ops, View File, Miscellaneous File Operations}.
+View the file described on the current line, with View mode
+(@code{dired-view-file}). View mode provides convenient commands to
+navigate the buffer but forbids changing it; @xref{View Mode}.
@item ^
@kindex ^ @r{(Dired)}
@@ -520,9 +535,9 @@ the regular expression @var{regexp}
@kbd{% m}, except that it searches the file contents instead of the file
name.
-@item C-x u
+@item C-/
+@itemx C-x u
@itemx C-_
-@itemx C-/
@kindex C-_ @r{(Dired)}
@findex dired-undo
Undo 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
Rename the specified files (@code{dired-do-rename}). If you rename a
single file, the argument @var{new} is the new name of the file. If
you rename several files, the argument @var{new} is the directory into
-which to move the files (this is like the shell command @code{mv}).
+which to move the files (this is like the shell command @command{mv}).
Dired automatically changes the visited file name of buffers associated
with 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.
@cindex hard links (in Dired)
@item H @var{new} @key{RET}
Make hard links to the specified files (@code{dired-do-hardlink}).
-This is like the shell command @code{ln}. The argument @var{new} is
+This is like the shell command @command{ln}. The argument @var{new} is
the directory to make the links in, or (if making just one link) the
name to give the link.
@@ -642,9 +657,10 @@ link.
@kindex M @r{(Dired)}
@cindex changing file permissions (in Dired)
@item M @var{modespec} @key{RET}
-Change the mode (also called ``permission bits'') of the specified files
-(@code{dired-do-chmod}). @var{modespec} can be in octal or symbolic
-notation like arguments handled by the @code{chmod} program.
+Change the mode (also called @dfn{permission bits}) of the specified
+files (@code{dired-do-chmod}). @var{modespec} can be in octal or
+symbolic notation, like arguments handled by the @command{chmod}
+program.
@findex dired-do-chgrp
@kindex G @r{(Dired)}
@@ -663,8 +679,8 @@ this.)
@vindex dired-chown-program
The variable @code{dired-chown-program} specifies the name of the
-program to use to do the work (different systems put @code{chown} in
-different places).
+program to use to do the work (different systems put @command{chown}
+in different places).
@findex dired-do-touch
@kindex T @r{(Dired)}
@@ -952,17 +968,17 @@ The backup file is the first file given to @code{diff}.
@cindex subdirectories in Dired
@cindex expanding subdirectories in Dired
- A Dired buffer displays just one directory in the normal case;
-but you can optionally include its subdirectories as well.
+ A Dired buffer usually displays just one directory, but you can
+optionally include its subdirectories as well.
The simplest way to include multiple directories in one Dired buffer is
-to specify the options @samp{-lR} for running @code{ls}. (If you give a
+to specify the options @samp{-lR} for running @command{ls}. (If you give a
numeric argument when you run Dired, then you can specify these options
in the minibuffer.) That produces a recursive directory listing showing
all subdirectories at all levels.
More often, you will want to show only specific subdirectories. You
-can do this with the @kbd{i} command:
+can do this with @kbd{i} (@code{dired-maybe-insert-subdir}):
@table @kbd
@findex dired-maybe-insert-subdir
@@ -973,25 +989,27 @@ can do this with the @kbd{i} command:
Insert the contents of a subdirectory later in the buffer.
@end table
-Use the @kbd{i} (@code{dired-maybe-insert-subdir}) command on a line
-that describes a file which is a directory. It inserts the contents of
-that directory into the same Dired buffer, and moves there. Inserted
-subdirectory contents follow the top-level directory of the Dired
-buffer, just as they do in @samp{ls -lR} output.
-
-If the subdirectory's contents are already present in the buffer, the
-@kbd{i} command just moves to it.
-
-In either case, @kbd{i} sets the Emacs mark before moving, so @kbd{C-u
-C-@key{SPC}} takes you back to the old position in the buffer (the line
-describing that subdirectory). You can also use @samp{^} to return
-to the parent directory in the same Dired buffer.
-
-Use the @kbd{l} command (@code{dired-do-redisplay}) to update the
-subdirectory's contents. Use @kbd{C-u k} on the subdirectory header
-line to remove the subdirectory listing (@pxref{Dired Updating}). You
-can also hide and show inserted subdirectories (@pxref{Hiding
-Subdirectories}).
+@noindent
+If you use this command on a line that describes a file which is a
+directory, it inserts the contents of that directory into the same
+Dired buffer, and moves there. Inserted subdirectory contents follow
+the top-level directory of the Dired buffer, just as they do in
+@samp{ls -lR} output.
+
+ If the subdirectory's contents are already present in the buffer,
+the @kbd{i} command just moves to it.
+
+ In either case, @kbd{i} sets the Emacs mark before moving, so
+@kbd{C-u C-@key{SPC}} returns to your previous position in the Dired
+buffer (@pxref{Setting Mark}). You can also use @samp{^} to return to
+the parent directory in the same Dired buffer (@pxref{Dired
+Visiting}).
+
+ Use the @kbd{l} command (@code{dired-do-redisplay}) to update the
+subdirectory's contents, and use @kbd{C-u k} on the subdirectory
+header line to remove the subdirectory listing (@pxref{Dired
+Updating}). You can also hide and show inserted subdirectories
+(@pxref{Hiding Subdirectories}).
@ifnottex
@include dired-xtra.texi
@@ -1209,10 +1227,10 @@ tell @command{find} what condition to test. To use this command, you
need to know how to use @command{find}.
@vindex find-ls-option
- The format of listing produced by these commands is controlled by the
-variable @code{find-ls-option}, whose default value specifies using
-options @samp{-ld} for @code{ls}. If your listings are corrupted, you
-may need to change the value of this variable.
+ The format of listing produced by these commands is controlled by
+the variable @code{find-ls-option}, whose default value specifies
+using options @samp{-ld} for @command{ls}. If your listings are
+corrupted, you may need to change the value of this variable.
@findex locate
@findex locate-with-filter
@@ -1338,10 +1356,14 @@ rotation is lossless, and uses an external utility called JpegTRAN.
@kindex + @r{(Dired)}
@findex dired-create-directory
The command @kbd{+} (@code{dired-create-directory}) reads a
-directory name, and creates the directory if it does not already
-exist.
+directory name, and creates that directory. It signals an error if
+the directory already exists.
@cindex searching multiple files via Dired
+@kindex M-s a C-s @r{(Dired)}
+@kindex M-s a M-C-s @r{(Dired)}
+@findex dired-do-isearch
+@findex dired-do-isearch-regexp
The command @kbd{M-s a C-s} (@code{dired-do-isearch}) begins a
``multi-file'' incremental search on the marked files. If a search
fails 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
* Table Recognition:: How to activate and deactivate tables.
* Cell Commands:: Cell-oriented commands in a table.
* Cell Justification:: Justifying cell contents.
-* Row Commands:: Manipulating rows of table cell.
-* Column Commands:: Manipulating columns of table cell.
-* Fixed Width Mode:: Fixing cell width.
+* Table Rows and Columns:: Inserting and deleting rows and columns.
* Table Conversion:: Converting between plain text and tables.
-* Measuring Tables:: Analyzing table dimension.
* Table Misc:: Table miscellany.
Editing Programs
@@ -702,7 +699,7 @@ Compiling and Testing Programs
* Executing Lisp:: Various modes for editing Lisp programs,
with different facilities for running
the Lisp programs.
-* Lisp Libraries:: Creating Lisp programs to run in Emacs.
+* Lisp Libraries:: How Lisp programs are loaded into Emacs.
* Lisp Eval:: Executing a single Lisp expression in Emacs.
* Lisp Interaction:: Executing Lisp in an Emacs buffer.
* External Lisp:: Communicating through Emacs with a separate Lisp.
@@ -725,8 +722,7 @@ GDB Graphical Interface
* Breakpoints Buffer:: A breakpoint control panel.
* Threads Buffer:: Displays your threads.
* Stack Buffer:: Select a frame from the call stack.
-* Other GDB Buffers:: Input/output, locals, registers,
- assembler, threads and memory buffers.
+* Other GDB Buffers:: Other buffers for controlling the GDB state.
* Watch Expressions:: Monitor variable values in the speedbar.
* Multithreaded Debugging:: Debugging programs with several threads.
@@ -745,15 +741,16 @@ Version Control
* VC Mode Line:: How the mode line shows version control status.
* Basic VC Editing:: How to edit a file under version control.
* Log Buffer:: Features available in log entry buffers.
+* Registering:: Putting a file under version control.
* Old Revisions:: Examining and comparing old versions.
-* Secondary VC Commands:: The commands used a little less frequently.
+* VC Change Log:: Viewing the VC Change Log.
+* VC Undo:: Canceling changes before or after committing.
* VC Directory Mode:: Listing files managed by version control.
* Branches:: Multiple lines of development.
-* Remote Repositories:: Efficient access to remote CVS servers.
* Revision Tags:: Symbolic names for revisions.
* Miscellaneous VC:: Various other commands and features of VC.
* Customizing VC:: Variables that change VC's behavior.
-
+
Introduction to Version Control
* Why Version Control?:: Understanding the problems it addresses.
@@ -770,12 +767,6 @@ Basic Editing under Version Control
* VC With A Locking VCS:: RCS in its default mode, SCCS, and optionally CVS.
* Advanced C-x v v:: Advanced features available with a prefix argument.
-The Secondary Commands of VC
-
-* Registering:: Putting a file under version control.
-* VC Change Log:: Viewing the VC Change Log.
-* VC Undo:: Canceling changes before or after check-in.
-
VC Directory Mode
* VC Directory Buffer:: What the buffer looks like and means.
@@ -784,26 +775,15 @@ VC Directory Mode
Multiple Branches of a File
* Switching Branches:: How to get to another existing branch.
-* Creating Branches:: How to start a new branch.
+* VC Pull:: Updating a branch from another branch.
* Merging:: Transferring changes between branches.
-* Multi-User Branching:: Multiple users working at multiple branches
- in parallel.
-
-Remote Repositories
-
-* Version Backups:: Keeping local copies of repository versions.
-* Local Version Control:: Using another version system for local editing.
-
-Revision Tags
-
-* Making Revision Tags:: The tag facilities.
-* Revision Tag Caveats:: Things to be careful of when using tags.
+* Creating Branches:: How to start a new branch.
Miscellaneous Commands and Features of VC
* Change Logs and VC:: Generating a change log file from log entries.
-* Renaming and VC:: A command to rename both the source and master
- file correctly.
+* VC Delete/Rename:: Deleting and renaming version-controlled files.
+* Revision Tags:: Symbolic names for revisions.
* Version Headers:: Inserting version control headers into working files.
Customizing 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
them delete outright, instead of using the Trash, regardless of
@code{delete-by-moving-to-trash}.
+@ifnottex
+ If a file is under version control (@pxref{Version Control}), you
+should delete it using @kbd{M-x vc-delete-file} instead of @kbd{M-x
+delete-file}. @xref{VC Delete/Rename}.
+@end ifnottex
+
@findex copy-file
@cindex copying files
@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}.
If @var{new} is not an existing directory, it copies all the contents
of @var{old} into a new directory named @var{new}.
+@cindex renaming files
@findex rename-file
@kbd{M-x rename-file} reads two file names @var{old} and @var{new}
using 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
applies to all the remaining commands in this section. All of them
ask for confirmation when the new file name already exists, too.
+@ifnottex
+ If a file is under version control (@pxref{Version Control}), you
+should rename it using @kbd{M-x vc-rename-file} instead of @kbd{M-x
+rename-file}. @xref{VC Delete/Rename}.
+@end ifnottex
+
@findex add-name-to-file
@cindex hard links (creation)
@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
``frames'' on text-only terminals; such frames are displayed one at a
time, filling the entire terminal screen (@pxref{Non-Window
Terminals}). It is also possible to use the mouse on some text-only
-terminals (@pxref{Text-Only Mouse}, for doing so on GNU and UNIX
+terminals (@pxref{Text-Only Mouse}, for doing so on GNU and Unix
systems; and
@iftex
@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}
* VC Mode Line:: How the mode line shows version control status.
* Basic VC Editing:: How to edit a file under version control.
* Log Buffer:: Features available in log entry buffers.
+* Registering:: Putting a file under version control.
* Old Revisions:: Examining and comparing old versions.
-* Secondary VC Commands:: The commands used a little less frequently.
+* VC Change Log:: Viewing the VC Change Log.
+* VC Undo:: Canceling changes before or after committing.
* VC Directory Mode:: Listing files managed by version control.
* Branches:: Multiple lines of development.
@ifnottex
-* Remote Repositories:: Efficient access to remote CVS servers.
-* Revision Tags:: Symbolic names for revisions.
* Miscellaneous VC:: Various other commands and features of VC.
* Customizing VC:: Variables that change VC's behavior.
@end ifnottex
@@ -71,7 +71,7 @@ control operations.
Some uncommon or intricate version control operations, such as
altering repository settings, are not supported in VC. You should
-perform such tasks outside Emacs, e.g. via the command line.
+perform such tasks outside Emacs, e.g.@: via the command line.
This section provides a general overview of version control, and
describes the version control systems that VC supports. You can skip
@@ -125,7 +125,7 @@ which it refers to as @dfn{back ends}:
@item
SCCS was the first version control system ever built, and was long ago
superseded by more advanced ones. VC compensates for certain features
-missing in SCCS (e.g., tag names for releases) by implementing them
+missing in SCCS (e.g.@: tag names for releases) by implementing them
itself. Other VC features, such as multiple branches, are simply
unavailable. Since SCCS is non-free, we recommend avoiding it.
@@ -154,7 +154,7 @@ moving/renaming. VC supports all basic editing operations under CVS.
@cindex SVN
@cindex Subversion
@item
-Subversion (SVN) is a free version control system designed to be
+Subversion (svn) is a free version control system designed to be
similar to CVS but without its problems (e.g., it supports atomic
commits of filesets, and versioning of directories, symbolic links,
meta-data, renames, copies, and deletes).
@@ -162,37 +162,33 @@ meta-data, renames, copies, and deletes).
@cindex GNU Arch
@cindex Arch
@item
-GNU Arch is one of the earliest @dfn{distributed} version control
+GNU Arch is one of the earliest @dfn{decentralized} version control
systems (the other being Monotone). @xref{VCS Concepts}, for a
-description of distributed version control systems. It is no longer
+description of decentralized version control systems. It is no longer
under active development, and has been deprecated in favor of Bazaar.
@cindex git
@item
-Git is a distributed version control system originally invented by
+Git is a decentralized version control system originally invented by
Linus Torvalds to support development of Linux (his kernel). VC
-supports many common git operations, but others, such as repository
+supports many common Git operations, but others, such as repository
syncing, must be done from the command line.
@cindex hg
@cindex Mercurial
@item
-Mercurial (hg) is a distributed version control system broadly
-resembling git. VC supports most Mercurial commands, with the
+Mercurial (hg) is a decentralized version control system broadly
+resembling Git. VC supports most Mercurial commands, with the
exception of repository sync operations.
@cindex bzr
@cindex Bazaar
@item
-Bazaar (bzr) is a distributed version control system that supports
-both repository-based and distributed versioning. VC supports most
+Bazaar (bzr) is a decentralized version control system that supports
+both repository-based and decentralized versioning. VC supports most
basic editing operations under Bazaar.
@end itemize
- Previous versions of VC supported a version control system known as
-Meta-CVS. This support was dropped due to limited interest from users
-and developers.
-
@node VCS Concepts
@subsubsection Concepts of Version Control
@@ -210,16 +206,19 @@ as @dfn{log entries} that describe the changes made to each file.
The copy of a version-controlled file that you actually edit is
called the @dfn{work file}. You can change each work file as you
would an ordinary file. After you are done with a set of changes, you
-@dfn{commit} (or @dfn{check in}) the changes; this records the changes
-in the repository, along with a descriptive log entry.
+may @dfn{commit} (or @dfn{check in}) the changes; this records the
+changes in the repository, along with a descriptive log entry.
+
+@cindex working tree
+ A directory tree of work files is called a @dfn{working tree}.
@cindex revision
@cindex revision ID
- A copy of a file stored in a repository is called a @dfn{revision}.
-The history of a file is a sequence of revisions. Each revision is
-named by a @dfn{revision ID}. The format of the revision ID depends
-on the version control system; in the simplest case, it is just an
-integer.
+ Each commit creates a new @dfn{revision} in the repository. The
+version control system keeps track of all past revisions and the
+changes that were made in each revision. Each revision is named by a
+@dfn{revision ID}, whose format depends on the version control system;
+in the simplest case, it is just an integer.
To go beyond these basic concepts, you will need to understand three
aspects in which version control systems differ. As explained in the
@@ -229,17 +228,18 @@ these modes of operation, but it cannot hide the differences.
@node VCS Merging
@subsubsection Merge-based vs lock-based Version Control
-@cindex locking versus merging
A version control system typically has some mechanism to coordinate
between users who want to change the same file. There are two ways to
do this: merging and locking.
- In a version control system that uses merging, each user may check
-out and modify a work file at any time. The system lets you
-@dfn{merge} your work file, which may contain changes that have not
-been committed, with the latest changes that others have committed.
+@cindex merging-based version
+ In a version control system that uses merging, each user may modify
+a work file at any time. The system lets you @dfn{merge} your work
+file, which may contain changes that have not been committed, with the
+latest changes that others have committed.
+@cindex locking-based version
Older version control systems use a @dfn{locking} scheme instead.
Here, work files are normally read-only. To edit a file, you ask the
version control system to make it writable for you by @dfn{locking}
@@ -264,7 +264,7 @@ number and severity of conflicts that actually occur.
SCCS always uses locking. RCS is lock-based by default but can be
told to operate in a merging style. CVS and Subversion are
merge-based by default but can be told to operate in a locking mode.
-Distributed version control systems, such as GNU Arch, git, and
+Decentralized version control systems, such as GNU Arch, Git, and
Mercurial, are exclusively merging-based.
VC mode supports both locking and merging version control. The
@@ -276,15 +276,16 @@ possible.
@node VCS Changesets
@subsubsection Changeset-based vs File-based Version Control
-@cindex changesets
+@cindex file-based version control
On SCCS, RCS, CVS, and other early version control systems, version
control operations are @dfn{file-based}: each file has its own comment
and revision history separate from that of all other files. Newer
systems, beginning with Subversion, are @dfn{changeset-based}: a
-checkin may include changes to several files, and the entire set of
+commit may include changes to several files, and the entire set of
changes is handled as a unit. Any comment associated with the change
does not belong to a single file, but to the changeset itself.
+@cindex changeset-based version control
Changeset-based version control is more flexible and powerful than
file-based version control; usually, when a change to multiple files
has to be reversed, it's good to be able to easily identify and remove
@@ -295,18 +296,20 @@ all of it.
@cindex centralized version control
@cindex decentralized version control
+@cindex distributed version control
Early version control systems were designed around a
@dfn{centralized} model in which each project has only one repository
used by all developers. SCCS, RCS, CVS, and Subversion share this
kind of model. One of its drawbacks is that the repository is a choke
point for reliability and efficiency.
- GNU Arch pioneered the concept of @dfn{decentralized} version
-control, later implemented in git, Mercurial, and Bazaar. A project
-may have several different repositories, and these systems support a
-sort of super-merge between repositories that tries to reconcile their
-change histories. In effect, there is one repository for each
-developer, and repository merges take the place of commit operations.
+ GNU Arch pioneered the concept of @dfn{distributed} or
+@dfn{decentralized} version control, later implemented in Git,
+Mercurial, and Bazaar. A project may have several different
+repositories, and these systems support a sort of super-merge between
+repositories that tries to reconcile their change histories. In
+effect, there is one repository for each developer, and repository
+merges take the place of commit operations.
VC helps you manage the traffic between your personal workfiles and
a repository. Whether the repository is a single master, or one of a
@@ -346,10 +349,9 @@ policy, which you should follow.
When the policy is to use both, you typically want to write an entry
for each change just once, then put it into both logs. You can write
the entry in @file{ChangeLog}, then copy it to the log buffer with
-@kbd{C-c C-a} when checking in the change (@pxref{Log Buffer}). Or
-you can write the entry in the log buffer while checking in the
-change, and later use the @kbd{C-x v a} command to copy it to
-@file{ChangeLog}
+@kbd{C-c C-a} when committing the change (@pxref{Log Buffer}). Or you
+can write the entry in the log buffer while committing the change, and
+later use the @kbd{C-x v a} command to copy it to @file{ChangeLog}
@iftex
(@pxref{Change Logs and VC,,,emacs-xtra, Specialized Emacs Features}).
@end iftex
@@ -359,20 +361,22 @@ change, and later use the @kbd{C-x v a} command to copy it to
@node VC Mode Line
@subsection Version Control and the Mode Line
-@cindex VC, mode line indicator
+@cindex VC mode line indicator
When you visit a file that is under version control, Emacs indicates
this on the mode line. For example, @samp{Bzr-1223} says that Bazaar
is used for that file, and the current revision ID is 1223.
+@cindex version control status
The character between the back-end name and the revision ID
-indicates the status of the work file. In a merge-based version
-control system, a @samp{-} character indicates that the work file is
-unmodified, and @samp{:} indicates that it has been modified.
-@samp{!} indicates that the file contains conflicts as result of a
-recent merge operation (@pxref{Merging}), or that the file was removed
-from the version control. Finally, @samp{?} means that the file is
-under version control, but is missing from the working tree.
+indicates the @dfn{version control status} of the work file. In a
+merge-based version control system, a @samp{-} character indicates
+that the work file is unmodified, and @samp{:} indicates that it has
+been modified. @samp{!} indicates that the file contains conflicts as
+result of a recent merge operation (@pxref{Merging}), or that the file
+was removed from the version control. Finally, @samp{?} means that
+the file is under version control, but is missing from the working
+tree.
In a lock-based system, @samp{-} indicates an unlocked file, and
@samp{:} a locked file; if the file is locked by another user (for
@@ -402,6 +406,7 @@ system, but is usually not excessive.
@subsection Basic Editing under Version Control
@cindex filesets, VC
+@cindex VC filesets
Most VC commands operate on @dfn{VC filesets}. A VC fileset is a
collection of one or more files that a VC operation acts on. When you
type 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
Directory buffer, and some files in it are marked, the VC fileset
consists of the marked files (@pxref{VC Directory Mode}).
- The principal VC command is an all-purpose command, @kbd{C-x v v}
-(@code{vc-next-action}), that performs either registration, locking,
-merging or a check-in (depending on the situation) on the current VC
-fileset. You can use @kbd{C-x v v} in a file-visiting buffer or in a
-VC Directory buffer.
+ On modern changeset-based version control systems (@pxref{VCS
+Changesets}), VC commands handle multi-file VC filesets as a group.
+For example, committing a multi-file VC fileset generates a single
+revision, containing the changes to all those files. On older
+file-based version control systems like CVS, each file in a multi-file
+VC fileset is handled individually; for example, a commit generates
+one revision for each changed file.
@table @kbd
@itemx C-x v v
-Perform the appropriate next version control operation on the VC fileset.
+Perform the next appropriate version control operation on the current
+VC fileset.
@end table
@findex vc-next-action
@kindex C-x v v
- The precise action of @kbd{C-x v v} depends on the state of the VC
-fileset, and whether the version control system uses locking or
-merging. This is described in detail in the subsequent sections.
-
- VC filesets are the way that VC mode bridges the gap between
-file-based and changeset-based version control systems. They are,
-essentially, a way to pass multiple file arguments as a group to
-version control commands. For example, on Subversion, a checkin with
-a multi-file VC fileset becomes a joint commit, as though you had
-typed @command{svn commit} with those file arguments at the shell
-command line. All files in a VC fileset must be under the same
-version control system; if they are not, Emacs signals an error when
-you attempt to execute a command on the fileset.
-
- VC filesets are distinct from the ``named filesets'' used for
-viewing and visiting files in functional groups (@pxref{Filesets}).
-Unlike named filesets, VC filesets are not named and don't persist
-across sessions.
+ The principal VC command is a multi-purpose command, @kbd{C-x v v}
+(@code{vc-next-action}), which performs the ``most appropriate''
+action on the current VC fileset: either registering it with a version
+control system, or committing it, or unlocking it, or merging changes
+into it. The precise actions are described in detail in the following
+subsections. You can use @kbd{C-x v v} either in a file-visiting
+buffer or in a VC Directory buffer.
+
+ Note that VC filesets are distinct from the ``named filesets'' used
+for viewing and visiting files in functional groups
+(@pxref{Filesets}). Unlike named filesets, VC filesets are not named
+and don't persist across sessions.
@menu
* VC With A Merging VCS:: Without locking: default mode for CVS.
@@ -450,46 +452,44 @@ across sessions.
@node VC With A Merging VCS
@subsubsection Basic Version Control with Merging
- When your version control system is merging-based (the default for
-CVS and all newer version control systems), work files are always
-writable; you need not do anything special to begin editing a file.
-The status indicator on the mode line is @samp{-} if the file is
-unmodified; it flips to @samp{:} as soon as you save any changes
-(@pxref{VC Mode Line}).
-
- Here is what @kbd{C-x v v} does when using a merging-based system:
+ On a merging-based version control system (i.e.@: most modern ones;
+@pxref{VCS Merging}), @kbd{C-x v v} does the following:
@itemize @bullet
@item
-If the work file is in a directory that is not controlled by any
-version control system, prompt for a repository type. Then, create a
-version control repository of that type and register the file with it.
+If there is more than one file in the VC fileset and the files have
+inconsistent version control statuses, signal an error. (Note,
+however, that a fileset is allowed to include both ``newly-added''
+files and ``modified'' files; @pxref{Registering}.)
@item
-If the work file is in a directory that is controlled by a version
-control system but not registered with it, register the file.
+If none of the files in the VC fileset are registered with a version
+control system, register the VC fileset, i.e.@: place it under version
+control. @xref{Registering}. If Emacs cannot find a system to
+register under, it prompts for a repository type, creates a new
+repository, and registers the VC fileset with it.
@item
-If the work file is the same as in the repository, do nothing.
+If every work file in the VC fileset is unchanged, do nothing.
@item
-If you have not changed the work file, but some other user has checked
-in changes to the repository, merge those changes into the work file.
+If every work file in the VC fileset has been modified, commit the
+changes. To do this, Emacs pops up a @samp{*vc-log*} buffer; type the
+desired log entry for the new revision, followed by @kbd{C-c C-c} to
+commit. @xref{Log Buffer}.
+
+If committing to a shared repository, the commit may fail if the
+repository that has been changed since your last update. In that
+case, you must perform an update before trying again. On a
+decentralized version control system, use @kbd{C-x v +} (@pxref{VC
+Pull}) or @kbd{C-x v m} (@pxref{Merging}). On a centralized version
+control system, type @kbd{C-x v v} again to merge in the repository
+changes.
@item
-If you have made modifications to the work file, attempt to commit
-the changes. To do this, Emacs first reads the log entry for the new
-revision (@pxref{Log Buffer}). If some other user has committed
-changes to the repository since you last checked it out, the checkin
-fails. In that case, type @kbd{C-x v v} again to merge those changes
-into your own work file; this puts the work file into a ``conflicted''
-state. Type @kbd{C-x v v} to clear the ``conflicted'' state; VC then
-regards the file as up-to-date and modified, and you can try to check
-it in again.
-
-To pick up any recent changes from the repository @emph{without}
-trying to commit your own changes, type @kbd{C-x v m @key{RET}}.
-@xref{Merging}.
+Finally, if you are using a centralized version control system, check
+if each work file in the VC fileset is up-to-date. If any file has
+been changed in the repository, offer to update it.
@end itemize
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
file since you began editing it; when you commit your revision, his
changes are removed (however, they remain in the repository and are
thus not irrevocably lost). Therefore, you must verify that the
-current revision is unchanged before checking in your changes. In
+current revision is unchanged before committing your changes. In
addition, locking is possible with RCS even in this mode: @kbd{C-x v
v} with an unmodified file locks the file, just as it does with RCS in
its normal locking mode (@pxref{VC With A Locking VCS}).
@@ -506,32 +506,44 @@ its normal locking mode (@pxref{VC With A Locking VCS}).
@node VC With A Locking VCS
@subsubsection Basic Version Control with Locking
- Under a locking-based version control system (such as SCCS, and RCS
-in its default mode), @kbd{C-x v v} does the following:
+ On a locking-based version control system (such as SCCS, and RCS in
+its default mode), @kbd{C-x v v} does the following:
@itemize @bullet
@item
-If the file is not locked, lock it and make it writable, so that you
-can change it.
+If there is more than one file in the VC fileset and the files have
+inconsistent version control statuses, signal an error.
+
+@item
+If each file in the VC fileset is not registered with a version
+control system, register the VC fileset. @xref{Registering}. If
+Emacs cannot find a system to register under, it prompts for a
+repository type, creates a new repository, and registers the VC
+fileset with it.
+
+@item
+If each file is registered and unlocked, lock it and make it writable,
+so that you can begin to edit it.
@item
-If the file is locked by you, and contains changes, commit the
-changes. In order to do this, Emacs first reads the log entry for the
-new revision. @xref{Log Buffer}.
+If each file is locked by you and contains changes, commit the
+changes. To do this, Emacs pops up a @samp{*vc-log*} buffer; type the
+desired log entry for the new revision, followed by @kbd{C-c C-c} to
+commit (@pxref{Log Buffer}).
@item
-If the file is locked by you, but you have not changed it since you
-locked it, release the lock and makes the file read-only again.
+If each file is locked by you, but you have not changed it, release
+the lock and make the file read-only again.
@item
-If the file is locked by some other user, ask whether you want to
-``steal the lock'' from that user. If you say yes, the file becomes
-locked by you, but a message is sent to the person who had formerly
-locked the file, to inform him of what has happened.
+If each file is locked by another user, ask whether you want to
+``steal the lock''. If you say yes, the file becomes locked by you,
+and a warning message is sent to the user who had formerly locked the
+file.
@end itemize
These rules also apply when you use CVS in locking mode, except
-that CVS does not support stealing a lock.
+that CVS does not support stealing locks.
@node Advanced C-x v v
@subsubsection Advanced Control in @kbd{C-x v v}
@@ -544,49 +556,55 @@ to do the operation.
@itemize @bullet
@item
-If the file is modified (or locked), you can specify the revision ID
-to use for the new version that you commit. This is one way to create
-a new branch (@pxref{Branches}).
+@cindex specific version control system
+You can specify the name of a version control system. This is useful
+if the fileset can be managed by more than one version control system,
+and Emacs fails to detect the correct one.
@item
-If the file is not modified (and unlocked), you can specify the
-revision to select; this lets you start working from an older
-revision, or on another branch. If you do not enter any revision,
-that takes you to the highest (``head'') revision on the current
-branch; therefore @kbd{C-u C-x v v @key{RET}} is a convenient way to
-get the latest version of a file from the repository.
+Otherwise, if using CVS or RCS, you can specify a revision ID.
-@item
-@cindex specific version control system
-Instead of the revision ID, you can also specify the name of a
-version control system. This is useful when one file is being managed
-with two version control systems at the same time
-@iftex
-(@pxref{Local Version Control,,,emacs-xtra, Specialized Emacs
-Features}).
-@end iftex
-@ifnottex
-(@pxref{Local Version Control}).
-@end ifnottex
+If the fileset is modified (or locked), this makes Emacs commit with
+that revision ID. You can create a new branch by supplying an
+appropriate revision ID (@pxref{Branches}).
+
+If the fileset is unmodified (and unlocked), this checks the specified
+revision into the working tree. You can also specify a revision on
+another branch by giving its revision or branch ID (@pxref{Switching
+Branches}). An empty argument (i.e.@: @kbd{C-u C-x v v @key{RET}})
+checks out the latest (``head'') revision on the current branch.
+This signals an error on a decentralized version control system.
+Those systems do not let you specify your own revision IDs, nor do
+they use the concept of ``checking out'' individual files.
@end itemize
@node Log Buffer
@subsection Features of the Log Entry Buffer
- When you tell VC to commit a change, it pops up a buffer called
-@samp{*VC-Log*}. In this buffer, you should write a @dfn{log entry}
+@cindex C-c C-c @r{(Log Edit mode)}
+@findex log-edit-done
+ When you tell VC to commit a change, it pops up a buffer named
+@samp{*vc-log*}. In this buffer, you should write a @dfn{log entry}
describing the changes you have made (@pxref{Why Version Control?}).
-After you are done, type @kbd{C-c C-c}; this exits the buffer and
-commits the change, together with your log entry.
+After you are done, type @kbd{C-c C-c} (@code{log-edit-done}) to exit
+the buffer and commit the change, together with your log entry.
- While in the @samp{*VC-Log*} buffer, you can write one or more
-@dfn{header lines}, specifying additional information to be supplied
-to the version control system. Each header line must occupy a single
-line at the top of the buffer; the first line that is not a header
-line is treated as the start of the log entry. For example, the
-following header line states that the present change was not written
-by you, but by another developer:
+@cindex Log Edit mode
+@cindex mode, Log Edit
+@vindex vc-log-mode-hook
+ The major mode for the @samp{*vc-log*} buffer is Log Edit mode, a
+variant of Text mode (@pxref{Text Mode}). On entering Log Edit mode,
+Emacs runs the hooks @code{text-mode-hook} and @code{vc-log-mode-hook}
+(@pxref{Hooks}).
+
+ In the @samp{*vc-log*} buffer, you can write one or more @dfn{header
+lines}, specifying additional information to be supplied to the
+version control system. Each header line must occupy a single line at
+the top of the buffer; the first line that is not a header line is
+treated as the start of the log entry. For example, the following
+header line states that the present change was not written by you, but
+by another developer:
@smallexample
Author: J. R. Hacker <jrh@@example.com>
@@ -597,196 +615,215 @@ Apart from the @samp{Author} header, Emacs recognizes the headers
@samp{Date} (a manually-specified commit time) and @samp{Fixes} (a
reference to a bug fixed by the change). Not all version control
systems recognize all headers: Bazaar recognizes all three headers,
-while git, Mercurial, and Monotone recognizes only @samp{Author} and
-@samp{Summary}. If you specify a header for a version control that
-does not support it, the header is treated as part of the log entry.
+while Git, Mercurial, and Monotone recognize only @samp{Author} and
+@samp{Date}. If you specify a header for a system that does not
+support it, the header is treated as part of the log entry.
+@kindex C-c C-f @r{(Log Edit mode)}
@findex log-edit-show-files
+@kindex C-c C-d @r{(Log Edit mode)}
@findex log-edit-show-diff
- Type @kbd{C-c C-f} (@code{log-edit-show-files}) to display a list of
-files in the current VC fileset. If you called @kbd{C-x v v} directly
-from a work file, the fileset consists of that single file; if you
-called @kbd{C-x v v} from a VC directory buffer (@pxref{VC Directory
-Mode}), the fileset may consist of multiple files.
-
+ While in the @samp{*vc-log*} buffer, the ``current VC fileset'' is
+considered to be the fileset that will be committed if you type
+@w{@kbd{C-c C-c}}. To view a list of the files in the VC fileset,
+type @w{@kbd{C-c C-f}} (@code{log-edit-show-files}). To view a diff
+of changes between the VC fileset and the version from which you
+started editing (@pxref{Old Revisions}), type @kbd{C-c C-d}
+(@code{log-edit-show-diff}).
+
+@kindex C-c C-a @r{(Log Edit mode)}
@findex log-edit-insert-changelog
- Type @kbd{C-c C-d} (@code{log-edit-show-diff}) to show a @dfn{diff}
-of the changes you have made (i.e., the differences between the work
-file and the repository revision from which you started editing).
-@xref{Old Revisions}.
-
- If the current VC fileset includes one or more @file{ChangeLog}
-files (@pxref{Change Log}), type @kbd{C-c C-a}
+ If the VC fileset includes one or more @file{ChangeLog} files
+(@pxref{Change Log}), type @kbd{C-c C-a}
(@code{log-edit-insert-changelog}) to pull the relevant entries into
-the @samp{*VC-Log*} buffer. If the topmost item in each
+the @samp{*vc-log*} buffer. If the topmost item in each
@file{ChangeLog} was made under your user name on the current date,
-this command searches that item for entries that match the file(s) to
-be committed; if found, these entries are inserted.
-@iftex
-@xref{Change Logs and VC,,,emacs-xtra, Specialized Emacs Features},
-@end iftex
+this command searches that item for entries matching the file(s) to be
+committed, and inserts them.
@ifnottex
-@xref{Change Logs and VC},
+If you are using CVS or RCS, see @ref{Change Logs and VC}, for the
+opposite way of working---generating ChangeLog entries from the Log
+Edit buffer.
@end ifnottex
-for the opposite way of working---generating ChangeLog entries from
-the revision control log.
- To abort a check-in, just @strong{don't} type @kbd{C-c C-c} in that
+ To abort a commit, just @strong{don't} type @kbd{C-c C-c} in that
buffer. You can switch buffers and do other editing. As long as you
-don't try to commit another file, the entry you were editing remains
-in the @samp{*VC-Log*} buffer, and you can go back to that buffer at
-any time to complete the check-in.
-
- If you change several source files for the same reason, it is often
-convenient to specify the same log entry for many of the files. (This
-is the normal way to do things on a changeset-oriented system, where
-comments are attached to changesets rather than the history of
-individual files.) The most convenient way to do this is to mark all
-the files in VC Directory Mode and commit from there; the log buffer
-will carry the fileset information with it and do a group commit when
-you type @kbd{C-c C-c}.
-
+don't try to make another commit, the entry you were editing remains
+in the @samp{*vc-log*} buffer, and you can go back to that buffer at
+any time to complete the commit.
+
+@kindex M-n @r{(Log Edit mode)}
+@kindex M-p @r{(Log Edit mode)}
+@kindex M-s @r{(Log Edit mode)}
+@kindex M-r @r{(Log Edit mode)}
You can also browse the history of previous log entries to duplicate
-a checkin comment. This can be useful when you want several files to
-have checkin comments that vary only slightly from each other. The
-commands @kbd{M-n}, @kbd{M-p}, @kbd{M-s} and @kbd{M-r} for doing this
-work just like the minibuffer history commands (except that these
-versions are used outside the minibuffer).
+a commit comment. This can be useful when you want to make several
+commits with similar comments. The commands @kbd{M-n}, @kbd{M-p},
+@kbd{M-s} and @kbd{M-r} for doing this work just like the minibuffer
+history commands (@pxref{Minibuffer History}), except that they are
+used outside the minibuffer.
-@vindex vc-log-mode-hook
- Each time you commit a change, the log entry buffer is put into VC
-Log Edit mode, which involves running two hooks: @code{text-mode-hook}
-and @code{vc-log-mode-hook}. @xref{Hooks}.
+@node Registering
+@subsection Registering a File for Version Control
+
+@table @kbd
+@item C-x v i
+Register the visited file for version control.
+@end table
+
+@kindex C-x v i
+@findex vc-register
+ The command @kbd{C-x v i} (@code{vc-register}) @dfn{registers} each
+file in the current VC fileset, placing it under version control.
+This is essentially equivalent to the action of @kbd{C-x v v} on an
+unregistered VC fileset (@pxref{Basic VC Editing}), except that if the
+VC fileset is already registered, @kbd{C-x v i} signals an error
+whereas @kbd{C-x v v} performs some other action.
+
+ To register a file, Emacs must choose a version control system. For
+a multi-file VC fileset, the VC Directory buffer specifies the system
+to use (@pxref{VC Directory Mode}). For a single-file VC fileset, if
+the file's directory already contains files registered in a version
+control system, or if the directory is part of a directory tree
+controlled by a version control system, Emacs chooses that system. In
+the event that more than one version control system is applicable,
+Emacs uses the one that appears first in the variable
+@iftex
+@code{vc-handled-backends}.
+@end iftex
+@ifnottex
+@code{vc-handled-backends} (@pxref{Customizing VC}).
+@end ifnottex
+If Emacs cannot find a version control system to register the file
+under, it prompts for a repository type, creates a new repository, and
+registers the file into that repository.
+
+ On most version control systems, registering a file with @kbd{C-x v
+i} or @kbd{C-x v v} adds it to the ``working tree'' but not to the
+repository. Such files are labeled as @samp{added} in the VC
+Directory buffer, and show a revision ID of @samp{@@@@} in the mode
+line. To make the registration take effect in the repository, you
+must perform a commit (@pxref{Basic VC Editing}). Note that a single
+commit can include both file additions and edits to existing files.
+
+ On a locking-based version control system (@pxref{VCS Merging}),
+registering a file leaves it unlocked and read-only. Type @kbd{C-x v
+v} if you wish to start editing it.
@node Old Revisions
@subsection Examining And Comparing Old Revisions
- One of the convenient features of version control is the ability
-to examine any revision of a file, or compare two revisions.
-
@table @kbd
-@item C-x v ~
-Prompt for a revision of the current file, and visit it in a buffer of
-its own (@code{vc-revision-other-window}).
-
@item C-x v =
-Compare the files in the current fileset with the working revision(s)
-you started from (@code{vc-diff}). With a prefix argument, prompt for
-two revisions of the current fileset and compare them. You can call
-this command from a Dired buffer (@pxref{Dired}).
+Compare the work files in the current VC fileset with the versions you
+started from (@code{vc-diff}). With a prefix argument, prompt for two
+revisions of the current VC fileset and compare them. You can also
+call this command from a Dired buffer (@pxref{Dired}).
+
+@ifnottex
+@item M-x vc-ediff
+Like @kbd{C-x v =}, but using Ediff. @xref{Top, Ediff, ediff, The
+Ediff Manual}.
+@end ifnottex
@item C-x v D
-Compare the entire tree corresponding to the current fileset with the
-tree you started from (@code{vc-root-diff}). With a prefix argument,
-prompt for two revisions and compare their trees.
+Compare the entire working tree to the revision you started from
+(@code{vc-root-diff}). With a prefix argument, prompt for two
+revisions and compare their trees.
+
+@item C-x v ~
+Prompt for a revision of the current file, and visit it in a separate
+buffer (@code{vc-revision-other-window}).
@item C-x v g
-Display an annotated version of the file: for each line, show the
-latest revision in which it was modified (@code{vc-annotate}).
+Display an annotated version of the current file: for each line, show
+the latest revision in which it was modified (@code{vc-annotate}).
@end table
-@findex vc-revision-other-window
-@kindex C-x v ~
- To examine an old revision, visit the work file and type @kbd{C-x v
-~ @var{revision} @key{RET}} (@code{vc-revision-other-window}). Here,
-@var{revision} is either the desired revision ID (@pxref{VCS
-Concepts}), or the name of a tag or branch
-@iftex
-(@pxref{Tags,,,emacs-xtra, Specialized Emacs Features}).
-@end iftex
-@ifnottex
-(@pxref{Tags}).
-@end ifnottex
-This command puts the text of the old revision in a file named
-@file{@var{filename}.~@var{revision}~}, and visits it in its own
-buffer in a separate window.
-
@findex vc-diff
@kindex C-x v =
- @kbd{C-x v =} (@code{vc-diff}) compares each file in the current VC
-fileset (saving them if necessary) with the repository revision(s)
-from which you started editing. Note that the latter may or may not
-be the latest revision of the file(s).
-
- The diff is displayed in another window, in a Diff mode buffer
-(@pxref{Diff Mode}) named @file{*vc-diff*}. In this buffer, the
-@kbd{g} (@code{revert-buffer}) command performs the file comparison
-again, generating a new diff.
+ @kbd{C-x v =} (@code{vc-diff}) displays a @dfn{diff} which compares
+each work file in the current VC fileset to the version(s) from which
+you started editing. The diff is displayed in another window, in a
+Diff mode buffer (@pxref{Diff Mode}) named @file{*vc-diff*}. The
+usual Diff mode commands are available in this buffer. In particular,
+the @kbd{g} (@code{revert-buffer}) command performs the file
+comparison again, generating a new diff.
-@findex vc-diff
@kindex C-u C-x v =
To compare two arbitrary revisions of the current VC fileset, call
@code{vc-diff} with a prefix argument: @kbd{C-u C-x v =}. This
-prompts for two revision IDs, using the minibuffer, and displays the
-diff in a special buffer in another window. Instead of providing a
-revision ID, you can give an empty input, which specifies the current
-contents of the work file; or a tag or branch name
-@iftex
-(@pxref{Tags,,,emacs-xtra, Specialized Emacs Features}).
-@end iftex
+prompts for two revision IDs (@pxref{VCS Concepts}), and displays a
+diff between those versions of the fileset. This will not work
+reliably for multi-file VC filesets, if the version control system is
+file-based rather than changeset-based (e.g.@: CVS), since then
+revision IDs for different files would not be related in any
+meaningful way.
+
+ Instead of the revision ID, some version control systems let you
+specify revisions in other formats. For instance, under Bazaar you
+can enter @samp{date:yesterday} for the argument to @kbd{C-u C-x v =}
+(and related commands) to specify the first revision committed after
+yesterday. See the documentation of the version control system for
+details.
+
+ If you invoke @kbd{C-x v =} or @kbd{C-u C-x v =} from a Dired buffer
+(@pxref{Dired}), the file listed on the current line is treated as the
+current VC fileset.
+
@ifnottex
-(@pxref{Tags}).
+@findex vc-ediff
+ @kbd{M-x vc-ediff} works like @kbd{C-x v =}, except that it uses an
+Ediff session. @xref{Top, Ediff, ediff, The Ediff Manual}.
@end ifnottex
-If your version control system is file-based (e.g. CVS) rather than
-changeset-based (Subversion, GNU Arch, git, Mercurial), supplying a
-revision ID for a multi-file fileset (as opposed to a symbolic tag
-name) is unlikely to return diffs that are connected in any meaningful
-way.
-
- The command @kbd{C-x v D} (@code{vc-root-diff}) is similar to
-@kbd{C-x v =}, but it compares the entire tree associated with the
-current VC fileset with the tree you started with. This means all the
-files controlled by the current version control repository, even those
-that are not part of the current VC fileset.
-
- If you invoke @kbd{C-x v =} or @kbd{C-u C-x v =} from a buffer that
-is neither visiting a version-controlled file nor a VC directory
-buffer, these commands generate a diff of all registered files in the
-current directory and its subdirectories.
-@findex vc-ediff
-The function @code{vc-ediff} works like @code{vc-diff} and provides a way to
-visually compare two revisions of a file in an Ediff session, @pxref{Top,
-Ediff, ediff, The Ediff Manual}. It compares the file associated with the
-current buffer with the last repository revision. To compare two arbitrary
-revisions of the current file, call @code{vc-ediff} with a prefix argument.
+@findex vc-root-diff
+@kindex C-x v D
+ @kbd{C-x v D} (@code{vc-root-diff}) is similar to @kbd{C-x v =}, but
+it displays the changes in the entire current working tree (i.e.@: the
+working tree containing the current VC fileset). If you invoke this
+command from a Dired buffer, it applies to the working tree containing
+the directory.
@vindex vc-diff-switches
-@vindex vc-rcs-diff-switches
- @kbd{C-x v =} works by running a variant of the @code{diff} utility
-designed to work with the version control system in use. The options
-to pass to the @code{diff} command are taken from the first non-@code{nil}
-value of @code{vc-@var{backend}-diff-switches}, @code{vc-diff-switches},
-and @code{diff-switches} (@pxref{Comparing Files}), in that order.
-Since @code{nil} means to check the next variable in the sequence,
-either of the first two may use the value @code{t} to mean no switches at all.
-Most of the @samp{vc@dots{}diff-switches} variables default to
-@code{nil}, but some default to @code{t}. These are for those version
-control systems (e.g. SVN) whose @code{diff} implementations do not
-accept common options (e.g. @samp{-c}) likely to be in
-@code{diff-switches}.
-
- The buffer produced by @kbd{C-x v =} supports the commands of
-Compilation mode (@pxref{Compilation Mode}), such as @kbd{C-x `} and
-@kbd{C-c C-c}, in both the ``old'' and ``new'' text, and they always
-find the corresponding locations in the current work file. (Older
-revisions are not, in general, present as files on your disk.)
+ You can customize the @command{diff} options that @kbd{C-x v =} and
+@kbd{C-x v D} use for generating diffs. The options used are taken
+from the first non-@code{nil} value amongst the variables
+@code{vc-@var{backend}-diff-switches}, @code{vc-diff-switches}, and
+@code{diff-switches} (@pxref{Comparing Files}), in that order. Here,
+@var{backend} stands for the relevant version control system,
+e.g.@: @code{bzr} for Bazaar. Since @code{nil} means to check the
+next variable in the sequence, either of the first two may use the
+value @code{t} to mean no switches at all. Most of the
+@code{vc-@var{backend}-diff-switches} variables default to @code{nil},
+but some default to @code{t}; these are for version control systems
+whose @code{diff} implementations do not accept common diff options,
+such as Subversion.
+
+@findex vc-revision-other-window
+@kindex C-x v ~
+ To directly examine an older version of a file, visit the work file
+and type @kbd{C-x v ~ @var{revision} @key{RET}}
+(@code{vc-revision-other-window}). This retrieves the file version
+corresponding to @var{revision}, saves it to
+@file{@var{filename}.~@var{revision}~}, and visits it in a separate
+window.
@findex vc-annotate
@kindex C-x v g
- For some back ends, you can display the file @dfn{annotated} with
-per-line revision information, by typing @kbd{C-x v g}
+ Many version control systems allow you to view files @dfn{annotated}
+with per-line revision information, by typing @kbd{C-x v g}
(@code{vc-annotate}). This creates a new buffer (the ``annotate
-buffer'') displaying the file's text, with each part colored to show
-how old it is. Text colored red is new, blue means old, and
-intermediate colors indicate intermediate ages. By default, the color
-is scaled over the full range of ages, such that the oldest changes
-are blue, and the newest changes are red.
+buffer'') displaying the file's text, with each line colored to show
+how old it is. Red text is new, blue is old, and intermediate colors
+indicate intermediate ages. By default, the color is scaled over the
+full range of ages, such that the oldest changes are blue, and the
+newest changes are red.
When you give a prefix argument to this command, Emacs reads two
-arguments using the minibuffer: the ID of which revision to display and
-annotate (instead of the current file contents), and the time span in
-days the color range should cover.
+arguments using the minibuffer: the revision to display and annotate
+(instead of the current file contents), and the time span in days the
+color range should cover.
From the annotate buffer, these and other color scaling options are
available from the @samp{VC-Annotate} menu. In this buffer, you can
@@ -795,13 +832,13 @@ view diffs, or view log entries:
@table @kbd
@item p
-Annotate the previous revision, that is to say, the revision before
-the one currently annotated. A numeric prefix argument is a repeat
-count, so @kbd{C-u 10 p} would take you back 10 revisions.
+Annotate the previous revision, i.e.@: the revision before the one
+currently annotated. A numeric prefix argument is a repeat count, so
+@kbd{C-u 10 p} would take you back 10 revisions.
@item n
-Annotate the next revision---the one after the revision currently
-annotated. A numeric prefix argument is a repeat count.
+Annotate the next revision, i.e.@: the revision after the one
+currently annotated. A numeric prefix argument is a repeat count.
@item j
Annotate the revision indicated by the current line.
@@ -840,76 +877,12 @@ Toggle the annotation visibility. This is useful for looking just at
the file contents without distraction from the annotations.
@end table
-@node Secondary VC Commands
-@subsection The Secondary Commands of VC
-
- This section explains the secondary commands of VC.
-
-@menu
-* Registering:: Putting a file under version control.
-* VC Change Log:: Viewing the VC Change Log.
-* VC Undo:: Canceling changes before or after check-in.
-@end menu
-
-@node Registering
-@subsubsection Registering a File for Version Control
-
-@kindex C-x v i
-@findex vc-register
- You can put any file under version control by simply visiting it, and
-then typing @w{@kbd{C-x v i}} (@code{vc-register}).
-
-@table @kbd
-@item C-x v i
-Register the visited file for version control.
-@end table
-
- To register the file, Emacs must choose which version control system
-to use for it. If the file's directory already contains files
-registered in a version control system, Emacs uses that system. If
-there is more than one system in use for a directory, Emacs uses the
-one that appears first in @code{vc-handled-backends}
-@iftex
-(@pxref{Customizing VC,,,emacs-xtra, Specialized Emacs Features}).
-@end iftex
-@ifnottex
-(@pxref{Customizing VC}).
-@end ifnottex
-On the other hand, if there are no files already registered, Emacs uses
-the first system from @code{vc-handled-backends} that could register
-the file (for example, you cannot register a file under CVS if its
-directory is not already part of a CVS tree); with the default value
-of @code{vc-handled-backends}, this means that Emacs uses RCS in this
-situation.
-
- If locking is in use, @kbd{C-x v i} leaves the file unlocked and
-read-only. Type @kbd{C-x v v} if you wish to start editing it. After
-registering a file with CVS, you must subsequently commit the initial
-revision by typing @kbd{C-x v v}. Until you do that, the revision ID
-appears as @samp{@@@@} in the mode line.
-
-@vindex vc-default-init-revision
-@cindex initial revision ID to register
- The default initial revision ID for a newly registered file
-varies by what VCS you are using; normally it will be 1.1 on VCSes
-that use dot-pair revision IDs and 1 on VCSes that use monotonic IDs.
-You can specify a different default by setting the variable
-@code{vc-default-init-revision}, or you can give @kbd{C-x v i} a
-numeric argument; then it reads the initial revision ID for this
-particular file using the minibuffer.
-
-@c See http://debbugs.gnu.org/9745
-@c @vindex vc-initial-comment
-@c If @code{vc-initial-comment} is non-@code{nil}, @kbd{C-x v i} reads an
-@c initial comment to describe the purpose of this source file. Reading
-@c the initial comment works like reading a log entry (@pxref{Log Buffer}).
-
@node VC Change Log
-@subsubsection VC Change Log
+@subsection VC Change Log
@table @kbd
@item C-x v l
-Display revision control state and change history
+Display the change history for the current fileset
(@code{vc-print-log}).
@item C-x v L
@@ -928,85 +901,91 @@ Display the changes that will be sent by the next push operation
@kindex C-x v l
@findex vc-print-log
The command @kbd{C-x v l} (@code{vc-print-log}) displays a buffer
-named @samp{*vc-change-log*} in a new window. This buffer lists the
-changes to the current file, including the associated log entries.
-(These are the log entries associated with the version control system,
-i.e. the ones you enter via the @samp{*VC-Log*} buffer. @xref{Log
-Buffer}.) Point is centered at the revision of the file currently
-being visited. With a prefix argument, the command prompts for the
-revision to center on, and the maximum number of revisions to display.
-You can call this command from a Dired buffer (@pxref{Dired}).
+named @samp{*vc-change-log*}, showing the history of changes made to
+the current file, including who made the changes, the dates, and the
+log entry for each change (these are the same log entries you would
+enter via the @samp{*vc-log*} buffer; @pxref{Log Buffer}). Point is
+centered at the revision of the file currently being visited. With a
+prefix argument, the command prompts for the revision to center on,
+and the maximum number of revisions to display.
+
+ If you call @kbd{C-x v l} from a VC Directory buffer (@pxref{VC
+Directory Mode}) or a Dired buffer (@pxref{Dired}), it applies to the
+file listed on the current line.
@findex vc-print-root-log
- Type @kbd{C-x v L} (@code{vc-print-root-log}) to display a
-@samp{*vc-change-log*} buffer showing the history of the
-version-controlled directory tree as a whole. With a prefix argument,
-the command prompts for the maximum number of revisions to display.
-RCS, SCCS, and CVS do not support this feature.
-
- On a distributed version control system, the @kbd{C-x v I}
+@findex log-view-toggle-entry-display
+ @kbd{C-x v L} (@code{vc-print-root-log}) displays a
+@samp{*vc-change-log*} buffer showing the history of the entire
+version-controlled directory tree (RCS, SCCS, and CVS do not support
+this feature). With a prefix argument, the command prompts for the
+maximum number of revisions to display.
+
+ The @kbd{C-x v L} history is shown in a compact form, usually
+showing only the first line of each log entry. However, you can type
+@key{RET} (@code{log-view-toggle-entry-display}) in the
+@samp{*vc-change-log*} buffer to reveal the entire log entry for the
+revision at point. A second @key{RET} hides it again.
+
+ On a decentralized version control system, the @kbd{C-x v I}
(@code{vc-log-incoming}) command displays a log buffer showing the
changes that will be applied, the next time you run the version
control system's ``pull'' command to get new revisions from another
-repository. This other repository is the default one from which
-changes are pulled, as defined by the version control system; with a
-prefix argument, @code{vc-log-incoming} prompts for a specific
-repository from which changes would be pulled, and lists the changes
-accordingly. Similarly, @kbd{C-x v O} (@code{vc-log-outgoing}) shows
-the changes that will be sent to another repository, the next time you
-run the ``push'' command; with a prefix argument, it prompts for a
-specific repository to which changes would be pushed.
+repository (@pxref{VC Pull}). This other repository is the default
+one from which changes are pulled, as defined by the version control
+system; with a prefix argument, @code{vc-log-incoming} prompts for a
+specific repository. Similarly, @kbd{C-x v O}
+(@code{vc-log-outgoing}) shows the changes that will be sent to
+another repository, the next time you run the ``push'' command; with a
+prefix argument, it prompts for a specific destination repository.
In the @samp{*vc-change-log*} buffer, you can use the following keys
-to move between the logs of revisions and of files, to view past
-revisions, to modify change comments, to view annotations and to view
-diffs:
+to move between the logs of revisions and of files, and to examine and
+compare past revisions (@pxref{Old Revisions}):
@table @kbd
@item p
-Move to the previous revision-item in the buffer. (Revision entries in the log
+Move to the previous revision entry. (Revision entries in the log
buffer are usually in reverse-chronological order, so the previous
revision-item usually corresponds to a newer revision.) A numeric
prefix argument is a repeat count.
@item n
-Move to the next revision-item (which most often corresponds to the
-previous revision of the file). A numeric prefix argument is a repeat
-count.
+Move to the next revision entry. A numeric prefix argument is a
+repeat count.
@item P
-Move to the log of the previous file, when the logs of multiple files
-are in the log buffer (@pxref{VC Directory Mode}). Otherwise, just
-move to the beginning of the log. A numeric prefix argument is a
-repeat count, so @kbd{C-u 10 P} would move backward 10 files.
+Move to the log of the previous file, if showing logs for a multi-file
+VC fileset. Otherwise, just move to the beginning of the log. A
+numeric prefix argument is a repeat count.
@item N
-Move to the log of the next file, when the logs of multiple files are
-in the log buffer (@pxref{VC Directory Mode}). It also takes a
-numeric prefix argument as a repeat count.
+Move to the log of the next file, if showing logs for a multi-file VC
+fileset. A numeric prefix argument is a repeat count.
@item a
-Annotate the revision indicated by the current line.
+Annotate the revision on the current line (@pxref{Old Revisions}).
@item e
Modify the change comment displayed at point. Note that not all VC
systems support modifying change comments.
@item f
-Visit the revision indicated at the current line, like typing @kbd{C-x
-v ~} and specifying this revision's ID (@pxref{Old Revisions}).
+Visit the revision indicated at the current line.
@item d
-Display the diff (@pxref{Comparing Files}) between the revision
-indicated at the current line and the next earlier revision. This is
-useful to see what actually changed in the file when the revision
-indicated on the current line was committed.
+Display a diff between the revision at point and the next earlier
+revision, for the specific file.
@item D
-Display the changeset diff (@pxref{Comparing Files}) between the
-revision indicated at the current line and the next earlier revision.
-This is useful to see all the changes to all files that the revision
-indicated on the current line did when it was committed.
+Display the changeset diff between the revision at point and the next
+earlier revision. This shows the changes to all files made in that
+revision.
+
+@item @key{RET}
+In a compact-style log buffer (e.g.@: the one created by @kbd{C-x v
+L}), toggle between showing and hiding the full log entry for the
+revision at point.
@end table
@vindex vc-log-show-limit
@@ -1020,62 +999,71 @@ entries} or @samp{Show unlimited entries} buttons at the end of the
buffer. However, RCS, SCCS, and CVS do not support this feature.
@node VC Undo
-@subsubsection Undoing Version Control Actions
+@subsection Undoing Version Control Actions
@table @kbd
@item C-x v u
-Revert the buffer and the file to the working revision from which you started
-editing the file.
-
-@item C-x v c
-Remove the last-entered change from the master for the visited file.
-This undoes your last check-in.
+Revert the work file(s) in the current VC fileset to the last revision
+(@code{vc-revert}).
@end table
+@c `C-x v c' (vc-rollback) was removed, since it's RCS/SCCS specific.
+
@kindex C-x v u
-@findex vc-revert-buffer
- If you want to discard your current set of changes and revert to the
-working revision from which you started editing the file, use @kbd{C-x
-v u} (@code{vc-revert-buffer}). If the version control system is
-locking-based, this leaves the file unlocked, and you must lock it
-again before making new changes. @kbd{C-x v u} requires confirmation,
-unless it sees that you haven't made any changes with respect to the
-master copy of the working revision.
-
- @kbd{C-x v u} is also the command to unlock a file if you lock it and
-then decide not to change it.
-
-@kindex C-x v c
-@findex vc-rollback
- To cancel a change that you already committed, use @kbd{C-x v c}
-(@code{vc-rollback}). This command discards all record of the most
-recent checked-in revision, but only if your work file corresponds to
-that revision---you cannot use @kbd{C-x v c} to cancel a revision that
-is not the latest on its branch. Note that many version control
-systems do not support rollback at all; this command is something of a
-historical relic.
+@findex vc-revert
+@vindex vc-revert-show-diff
+ If you want to discard all the changes you have made to the current
+VC fileset, type @kbd{C-x v u} (@code{vc-revert-buffer}). This shows
+you a diff between the work file(s) and the revision from which you
+started editing, and asks for confirmation for discarding the changes.
+If you agree, the fileset is reverted. If you don't want @kbd{C-x v
+u} to show a diff, set the variable @code{vc-revert-show-diff} to
+@code{nil} (you can still view the diff directly with @kbd{C-x v =};
+@pxref{Old Revisions}). Note that @kbd{C-x v u} cannot be reversed
+with the usual undo commands (@pxref{Undo}), so use it with care.
+
+ On locking-based version control systems, @kbd{C-x v u} leaves files
+unlocked; you must lock again to resume editing. You can also use
+@kbd{C-x v u} to unlock a file if you lock it and then decide not to
+change it.
@node VC Directory Mode
@subsection VC Directory Mode
+@cindex VC Directory buffer
+ The @dfn{VC Directory buffer} is a specialized buffer for viewing
+the version control statuses of the files in a directory tree, and
+performing version control operations on those files. In particular,
+it is used to specify multi-file VC filesets for commands like
+@w{@kbd{C-x v v}} to act on (@pxref{VC Directory Commands}).
+
@kindex C-x v d
@findex vc-dir
- When you are working on a large program, it is often useful to find
-out which files have changed within an entire directory tree, or to
-view the status of all files under version control at once, and to
-perform version control operations on collections of files. You can
-use the command @kbd{C-x v d} (@code{vc-dir}) to make a directory
-listing that includes only files relevant for version control. This
-creates a @dfn{VC Directory buffer} and displays it in a separate
-window.
+ To use the VC Directory buffer, type @kbd{C-x v d} (@code{vc-dir}).
+This reads a directory name using the minibuffer, and switches to a VC
+Directory buffer for that directory. By default, the buffer is named
+@samp{*vc-dir*}. Its contents are described
+@iftex
+below.
+@end iftex
+@ifnottex
+in @ref{VC Directory Buffer}.
+@end ifnottex
+
+ The @code{vc-dir} command automatically detects the version control
+system to be used in the specified directory. In the event that more
+than one system is being used in the directory, you should invoke the
+command with a prefix argument, @kbd{C-u C-x v d}; this prompts for
+the version control system which the VC Directory buffer should use.
+@ifnottex
@cindex PCL-CVS
@pindex cvs
@cindex CVS directory mode
- The VC Directory buffer works with all the version control systems
-that VC supports. For CVS, Emacs also offers a more powerful facility
-called PCL-CVS. @xref{Top, , About PCL-CVS, pcl-cvs, PCL-CVS --- The
-Emacs Front-End to CVS}.
+ In addition to the VC Directory buffer, Emacs has a similar facility
+called PCL-CVS which is specialized for CVS. @xref{Top, , About
+PCL-CVS, pcl-cvs, PCL-CVS --- The Emacs Front-End to CVS}.
+@end ifnottex
@menu
* Buffer: VC Directory Buffer. What the buffer looks like and means.
@@ -1086,369 +1074,367 @@ Emacs Front-End to CVS}.
@subsubsection The VC Directory Buffer
The VC Directory buffer contains a list of version-controlled files
-in the current directory and its subdirectories. Files which are
-up-to-date (have no local differences from the repository copy) are
-usually hidden; if all files in a subdirectory are up-to-date, the
-subdirectory is hidden as well. There is an exception to this rule:
-if VC mode detects that a file has changed to an up-to-date state
-since you last looked at it, that file and its state are shown.
-
- If a directory uses more that one version control system, you can
-select which system to use for the @code{vc-dir} command by invoking
-@code{vc-dir} with a prefix argument: @kbd{C-u C-x v d}.
-
- The line for an individual file shows the version control state of
-the file. Under RCS and SCCS, the name of the user locking the file
-is shown; under CVS, an abbreviated version of the @samp{cvs status}
-output is used. Here is an example using CVS:
+and their version control statuses. It lists files in the current
+directory (the one specified when you called @kbd{C-x v d}) and its
+subdirectories, but only those with a ``noteworthy'' status. Files
+that are up-to-date (i.e.@: the same as in the repository) are
+omitted. If all the files in a subdirectory are up-to-date, the
+subdirectory is not listed either. As an exception, if a file has
+become up-to-date as a direct result of a VC command, it is listed.
+
+ Here is an example of a VC Directory buffer listing:
@smallexample
@group
- ./
- modified file1.c
- needs-update file2.c
- needs-merge file3.c
+ ./
+ edited configure.ac
+* added README
+ unregistered temp.txt
+ src/
+* edited src/main.c
@end group
@end smallexample
@noindent
-In this example, @samp{file1.c} is modified with respect to the
-repository, and @samp{file2.c} is not. @samp{file3.c} is modified,
-but other changes have also been committed---you need to merge them
-with the work file before you can check it in.
-
-@vindex vc-stay-local
-@vindex vc-cvs-stay-local
- In the above, if the repository were on a remote machine, VC only
-contacts it when the variable @code{vc-stay-local} (or
-@code{vc-cvs-stay-local}) is @code{nil}
+Two work files have been modified but not committed:
+@file{configure.ac} in the current directory, and @file{foo.c} in the
+@file{src/} subdirectory. The file named @file{README} has been added
+but is not yet committed, while @file{temp.txt} is not under version
+control (@pxref{Registering}).
+
+The @samp{*} characters next to the entries for @file{README} and
+@file{src/main.c} indicate that the user has marked out these files as
+the current VC fileset
@iftex
-(@pxref{CVS Options,,,emacs-xtra, Specialized Emacs Features}).
+(see below).
@end iftex
@ifnottex
-(@pxref{CVS Options}).
+(@pxref{VC Directory Commands}).
+@end ifnottex
+
+ The above example is typical for a decentralized version control
+system like Bazaar, Git, or Mercurial. Other systems can show other
+statuses. For instance, CVS shows the @samp{needs-update} status if
+the repository has changes that have not been applied to the work
+file. RCS and SCCS show the name of the user locking a file as its
+status.
+
+@ifnottex
+@vindex vc-stay-local
+@vindex vc-cvs-stay-local
+ On CVS and Subversion, the @code{vc-dir} command normally contacts
+the repository, which may be on a remote machine, to check for
+updates. If you change the variable @code{vc-stay-local} or
+@code{vc-cvs-stay-local} (for CVS) to @code{nil} (@pxref{CVS
+Options}), then Emacs avoids contacting a remote repository when
+generating the VC Directory buffer (it will still contact it when
+necessary, e.g.@: when doing a commit). This may be desirable if you
+are working offline or the network is slow.
@end ifnottex
-This is because access to the repository may be slow, or you may be
-working offline and not have access to the repository at all. As a
-consequence, VC would not be able to tell you that @samp{file3.c} is
-in the ``merge'' state; you would learn that only when you try to
-check-in your modified copy of the file, or use a command such as
-@kbd{C-x v m}.
-
- In practice, this is not a problem because CVS handles this case
-consistently whenever it arises. In VC, you'll simply get prompted to
-merge the remote changes into your work file first. The benefits of
-less network communication usually outweigh the disadvantage of not
-seeing remote changes immediately.
@vindex vc-directory-exclusion-list
- When a VC directory displays subdirectories it omits some that
-should never contain any files under version control. By default,
-this includes Version Control subdirectories such as @samp{RCS} and
-@samp{CVS}; you can customize this by setting the variable
-@code{vc-directory-exclusion-list}.
+ The VC Directory buffer omits subdirectories listed in the variable
+@code{vc-directory-exclusion-list}. Its default value contains
+directories that are used internally by version control systems.
@node VC Directory Commands
@subsubsection VC Directory Commands
- VC Directory mode has a full set of navigation and marking commands
-for picking out filesets. Some of these are also available in a
-context menu invoked by @kbd{mouse-2}.
+ Emacs provides several commands for navigating the VC Directory
+buffer, and for ``marking'' files as belonging to the current VC
+fileset.
- Up- and down-arrow keys move in the buffer; @kbd{n} and @kbd{p} also
-move vertically as in other list-browsing modes. @key{SPC} and
-@key{TAB} behave like down-arrow, and @key{BackTab} behaves like
-up-arrow.
+@table @kbd
+@item n
+@itemx @key{SPC}
+Move point to the next entry (@code{vc-dir-next-line}).
- Both @kbd{C-m} and @kbd{f} visit the file on the current
-line. @kbd{o} visits that file in another window. @kbd{q} dismisses
-the directory buffer.
+@item p
+Move point to the previous entry (@code{vc-dir-previous-line}).
- @kbd{x} hides up-to-date files.
+@item @key{TAB}
+Move to the next directory entry (@code{vc-dir-next-directory}).
- @kbd{m} marks the file or directory on the current line. If the
-region is active, @kbd{m} marks all the files in the region. There
-are some restrictions when marking: a file cannot be marked if any of
-its parent directories are marked, and a directory cannot be marked if
-any files in it or in its child directories are marked.
+@item S-@key{TAB}
+Move to the previous directory entry
+(@code{vc-dir-previous-directory}).
- @kbd{M} marks all the files with the same VC state as the current
-file if the cursor is on a file. If the cursor is on a directory, it
-marks all child files. With a prefix argument: marks all files and
-directories.
+@item @key{RET}
+@itemx f
+Visit the file or directory listed on the current line
+(@code{vc-dir-find-file}).
- @kbd{u} unmarks the file or directory on the current line. If the
-region is active, it unmarks all the files in the region.
+@item o
+Visit the file or directory on the current line, in a separate window
+(@code{vc-dir-find-file-other-window}).
- @kbd{U} marks all the files with the same VC state as the current file
-if the cursor is on a file. If the cursor is on a directory, it
-unmarks all child files. With a prefix argument: unmarks all marked
+@item m
+Mark the file or directory on the current line (@code{vc-dir-mark}),
+putting it in the current VC fileset. If the region is active, mark
+all files in the region.
+
+A file cannot be marked with this command if it is already in a marked
+directory, or one of its subdirectories. Similarly, a directory
+cannot be marked with this command if any file in its tree is marked.
+
+@item M
+If point is on a file entry, mark all files with the same status; if
+point is on a directory entry, mark all files in that directory tree
+(@code{vc-dir-mark-all-files}). With a prefix argument, mark all
+listed files and directories.
+
+@kindex q @r{(VC Directory)}
+@findex quit-window
+@item q
+Bury the VC Directory buffer, and delete its window if the window was
+created just for that buffer.
+
+@item u
+Unmark the file or directory on the current line. If the region is
+active, unmark all the files in the region (@code{vc-dir-unmark}).
+
+@item U
+If point is on a file entry, unmark all files with the same status; if
+point is on a directory entry, unmark all files in that directory tree
+(@code{vc-dir-unmark-all-files}). With a prefix argument, unmark all
files and directories.
- It is possible to do search, search and replace, incremental search,
-and incremental regexp search on multiple files. These commands will
-work on all the marked files or the current file if nothing is marked.
-If a directory is marked, the files in that directory shown in the VC
-directory buffer will be used.
+@item x
+Hide files with @samp{up-to-date} status
+(@code{vc-dir-hide-up-to-date}).
- @kbd{S} searches the marked files.
+@item q
+Quit the VC Directory buffer, and bury it (@code{quit-window}).
+@end table
- @kbd{Q} does a query replace on the marked files.
+@findex vc-dir-mark
+@findex vc-dir-mark-all-files
+ While in the VC Directory buffer, all the files that you mark with
+@kbd{m} (@code{vc-dir-mark}) or @kbd{M} (@code{vc-dir-mark}) are in
+the current VC fileset. If you mark a directory entry with @kbd{m},
+all the listed files in that directory tree are in the current VC
+fileset. The files and directories that belong to the current VC
+fileset are indicated with a @samp{*} character in the VC Directory
+buffer, next to their VC status. In this way, you can set up a
+multi-file VC fileset to be acted on by VC commands like @w{@kbd{C-x v
+v}} (@pxref{Basic VC Editing}), @w{@kbd{C-x v =}} (@pxref{Old
+Revisions}), and @w{@kbd{C-x v u}} (@pxref{VC Undo}).
+
+ The VC Directory buffer also defines some single-key shortcuts for
+VC commands with the @kbd{C-x v} prefix: @kbd{=}, @kbd{+}, @kbd{l},
+@kbd{i}, and @kbd{v}.
+
+ For example, you can commit a set of edited files by opening a VC
+Directory buffer, where the files are listed with the @samp{edited}
+status; marking the files; and typing @kbd{v} or @kbd{C-x v v}
+(@code{vc-next-action}). If the version control system is
+changeset-based, Emacs will commit the files in a single revision.
+
+ While in the VC Directory buffer, you can also perform search and
+replace on the current VC fileset, with the following commands:
- @kbd{M-s a C-s} does an incremental search on the marked files.
+@table @kbd
+@item S
+Search the fileset (@code{vc-dir-search}).
- @kbd{M-s a C-M-s} does an incremental regular expression search
-on the marked files.
+@item Q
+Do a regular expression query replace on the fileset
+(@code{vc-dir-query-replace-regexp}).
+
+@item M-s a C-s
+Do an incremental search on the fileset (@code{vc-dir-isearch}).
+
+@item M-s a C-M-s
+Do an incremental regular expression search on the fileset
+(@code{vc-dir-isearch-regexp}).
+@end table
+
+@noindent
+Apart from acting on multiple files, these commands behave much like
+their single-buffer counterparts (@pxref{Search}).
@cindex stashes in version control
@cindex shelves in version control
- Commands are also accessible from the VC-dir menu. Note that some
-VC backends use the VC-dir menu to make available extra,
-backend-specific, commands. For example, Git and Bazaar allow you to
-manipulate @dfn{stashes} and @dfn{shelves}. (These provide a
-mechanism to temporarily store uncommitted changes somewhere out of
-the way, and bring them back at a later time.)
-
- Normal VC commands with the @kbd{C-x v} prefix work in VC directory
-buffers. Some single-key shortcuts are available as well; @kbd{=},
-@kbd{+}, @kbd{l}, @kbd{i}, and @kbd{v} behave as through prefixed with
-@kbd{C-x v}.
-
- The command @kbd{C-x v v} (@code{vc-next-action}) operates on all
-the marked files, so that you can commit several files at once. If
-the underlying VC supports atomic commits of multiple-file changesets,
-@kbd{C-x v v} with a selected set of modified but not committed files
-will commit all of them at once as a single changeset.
-
- When @kbd{C-x v v} (@code{vc-next-action}) operates on multiple
-files, all of those files must be either in the same state or in
-compatible states (added, modified and removed states are considered
-compatible). Otherwise it signals an error. This differs from the
-behavior of older versions of VC, which did not have fileset
-operations and simply did @code{vc-next-action} on each file
-individually.
-
- If any files are in a state that calls for commit, @kbd{C-x v v} reads a
-single log entry and uses it for the changeset as a whole. If the
-underling VCS is file- rather than changeset-oriented, the log entry
-will be replicated into the history of each file.
+ The above commands are also available via the menu bar, and via a
+context menu invoked by @kbd{Mouse-2}. Furthermore, some VC backends
+use the menu to provide extra backend-specific commands. For example,
+Git and Bazaar allow you to manipulate @dfn{stashes} and @dfn{shelves}
+(where are a way to temporarily put aside uncommitted changes, and
+bring them back at a later time).
@node Branches
-@subsection Multiple Branches of a File
+@subsection Version Control Branches
@cindex branch (version control)
-@cindex trunk (version control)
-
- One use of version control is to maintain multiple ``current''
-revisions of a file. For example, you might have different revisions of a
-program in which you are gradually adding various unfinished new
-features. Each such independent line of development is called a
-@dfn{branch}. VC allows you to create branches, switch between
-different branches, and merge changes from one branch to another.
-Please note, however, that branches are not supported for SCCS.
-
- A file's main line of development is usually called the @dfn{trunk}.
-You can create multiple branches from the trunk. How the difference
-between trunk and branch is made visible is dependent on whether the
-VCS uses dot-pair or monotonic version IDs.
-
- In VCSes with dot-pair revision IDs, the revisions on the trunk are
-normally IDed 1.1, 1.2, 1.3, etc. At any such revision, you can
-start an independent branch. A branch starting at revision 1.2 would
-have revision ID 1.2.1.1, and consecutive revisions on this branch
-would have IDs 1.2.1.2, 1.2.1.3, 1.2.1.4, and so on. If there is
-a second branch also starting at revision 1.2, it would consist of
-revisions 1.2.2.1, 1.2.2.2, 1.2.2.3, etc.
-
- In VCSes with monotonic revision IDs, trunk revisions are IDed as
-1, 2, 3, etc. A branch from (say) revision 2 might start with 2.1 and
-continue through 2.2, 2.3, etc. But naming conventions for branches
-and subbranches vary widely on these systems, and some (like
-Mercurial) never depart from the monotonic integer sequence at all.
-Consult the documentation of the VCS you are using.
-
-@cindex head revision
- If you omit the final component of a dot-pair revision ID, that is called a
-@dfn{branch ID}. It refers to the highest existing revision on that
-branch---the @dfn{head revision} of that branch. The branches in the
-dot-pair example above have branch IDs 1.2.1 and 1.2.2.
+
+ One use of version control is to support multiple independent lines
+of development, which are called @dfn{branches}. Branches are used
+for maintaining separate ``stable'' and ``development'' versions of a
+program, and for developing unrelated features in isolation from one
+another.
+
+ VC's support for branch operations is currently fairly limited. For
+decentralized version control systems, it provides commands for
+@dfn{updating} one branch with the contents of another, and for
+@dfn{merging} the changes made to two different branches
+(@pxref{Merging}). For centralized version control systems, it
+supports checking out different branches and committing into new or
+different branches.
@menu
* Switching Branches:: How to get to another existing branch.
-* Creating Branches:: How to start a new branch.
+* VC Pull:: Updating the contents of a branch.
* Merging:: Transferring changes between branches.
-* Multi-User Branching:: Multiple users working at multiple branches
- in parallel.
+* Creating Branches:: How to start a new branch.
@end menu
@node Switching Branches
@subsubsection Switching between Branches
- To switch between branches, type @kbd{C-u C-x v v} and specify the
-revision ID you want to select. On a locking-based system, this
-version is then visited @emph{unlocked} (write-protected), so you can
-examine it before locking it. Switching branches in this way is allowed
-only when the file is not locked.
-
- On a VCS with dot-pair IDs, you can omit the minor part, thus giving
-only the branch ID; this takes you to the head version on the
-chosen branch. If you only type @key{RET}, Emacs goes to the highest
-version on the trunk.
+ The various version control systems differ in how branches are
+implemented, and these differences cannot be entirely concealed by VC.
+
+ On some decentralized version control systems, including Bazaar and
+Mercurial in its normal mode of operation, each branch has its own
+working directory tree, so switching between branches just involves
+switching directories. On Git, switching between branches is done
+using the @command{git branch} command, which changes the contents of
+the working tree itself.
+
+ On centralized version control systems, you can switch between
+branches by typing @kbd{C-u C-x v v} in an up-to-date work file
+(@pxref{Advanced C-x v v}), and entering the revision ID for a
+revision on another branch. On CVS, for instance, revisions on the
+@dfn{trunk} (the main line of development) normally have IDs of the
+form 1.1, 1.2, 1.3, @dots{}, while the first branch created from (say)
+revision 1.2 has revision IDs 1.2.1.1, 1.2.1.2, @dots{}, the second
+branch created from revision 1.2 has revision IDs 1.2.2.1, 1.2.2.2,
+@dots{}, and so forth. You can also specify the @dfn{branch ID},
+which is a branch revision ID omitting its final component
+(e.g.@: 1.2.1), to switch to the latest revision on that branch.
+
+ On a locking-based system, switching to a different branch also
+unlocks (write-protects) the working tree.
+
+ Once you have switched to a branch, VC commands will apply to that
+branch until you switch away; for instance, any VC filesets that you
+commit will be committed to that specific branch.
+
+@node VC Pull
+@subsubsection Pulling Changes into a Branch
- After you have switched to any branch (including the main branch), you
-stay on it for subsequent VC commands, until you explicitly select some
-other branch.
+@table @kbd
+@itemx C-x v +
+On a decentralized version control system, update the current branch
+by ``pulling in'' changes from another location.
-@node Creating Branches
-@subsubsection Creating New Branches
+On a centralized version control system, update the current VC
+fileset.
+@end table
- To create a new branch from a head revision (one that is the latest
-in the branch that contains it), first select that revision if
-necessary, lock it with @kbd{C-x v v}, and make whatever changes you
-want. Then, when you commit the changes, use @kbd{C-u C-x v v}. This
-lets you specify the revision ID for the new revision. You should
-specify a suitable branch ID for a branch starting at the current
-revision. For example, if the current revision is 2.5, the branch ID
-should be 2.5.1, 2.5.2, and so on, depending on the number of existing
-branches at that point.
-
- To create a new branch at an older revision (one that is no longer the
-head of a branch), first select that revision (@pxref{Switching
-Branches}). Your procedure will then differ depending on whether you
-are using a locking or merging-based VCS.
+@kindex C-x v +
+@findex vc-pull
+ On a decentralized version control system, the command @kbd{C-x v +}
+(@code{vc-pull}) updates the current branch and working tree. It is
+typically used to update a copy of a remote branch. If you supply a
+prefix argument, the command prompts for the exact version control
+command to use, which lets you specify where to pull changes from.
+Otherwise, it pulls from a default location determined by the version
+control system.
- On a locking VCS, you will need to lock the old revision branch with
-@kbd{C-x v v}. You'll be asked to confirm, when you lock the old
-revision, that you really mean to create a new branch---if you say no,
-you'll be offered a chance to lock the latest revision instead. On
-a merging-based VCS you will skip this step.
+ Amongst decentralized version control systems, @kbd{C-x v +} is
+currently supported only by Bazaar, Git, and Mercurial. On Bazaar, it
+calls @command{bzr pull} for ordinary branches (to pull from a master
+branch into a mirroring branch), and @command{bzr update} for a bound
+branch (to pull from a central repository). On Git, it calls
+@command{git pull} to fetch changes from a remote repository and merge
+it into the current branch. On Mercurial, it calls @command{hg pull
+-u} to fetch changesets from the default remote repository and update
+the working directory.
- Then make your changes and type @kbd{C-x v v} again to commit a new
-revision. This automatically creates a new branch starting from the
-selected revision. You need not specially request a new branch,
-because that's the only way to add a new revision at a point that is
-not the head of a branch.
+ Prior to pulling, you can use @kbd{C-x v I} (@code{vc-log-incoming})
+to view a log buffer of the changes to be applied. @xref{VC Change
+Log}.
- After the branch is created, you ``stay'' on it. That means that
-subsequent check-ins create new revisions on that branch. To leave the
-branch, you must explicitly select a different revision with @kbd{C-u C-x
-v v}. To transfer changes from one branch to another, use the merge
-command, described in the next section.
+ On a centralized version control system like CVS, @kbd{C-x v +}
+updates the current VC fileset from the repository.
@node Merging
@subsubsection Merging Branches
-
@cindex merging changes
- When you have finished the changes on a certain branch, you will
-often want to incorporate them into the file's main line of development
-(the trunk). This is not a trivial operation, because development might
-also have proceeded on the trunk, so that you must @dfn{merge} the
-changes into a file that has already been changed otherwise. VC allows
-you to do this (and other things) with the @code{vc-merge} command.
@table @kbd
-@item C-x v m (vc-merge)
-Merge changes into the work file.
+@itemx C-x v m
+On a decentralized version control system, merge changes from another
+branch into the current one.
+
+On a centralized version control system, merge changes from another
+branch into the current VC fileset.
@end table
-@kindex C-x v m
-@findex vc-merge
- @kbd{C-x v m} (@code{vc-merge}) takes a set of changes and merges it
-into the current version of the work file. It firsts asks you in the
-minibuffer where the changes should come from. If you just type
-@key{RET}, Emacs merges any changes that were made on the same branch
-since you checked the file out (we call this @dfn{merging the news}).
-This is the common way to pick up recent changes from the repository,
-regardless of whether you have already changed the file yourself.
-
- You can also enter a branch ID or a pair of revision IDs in
-the minibuffer. Then @kbd{C-x v m} finds the changes from that
-branch, or the differences between the two revisions you specified, and
-merges them into the current revision of the current file.
-
- As an example, suppose that you have finished a certain feature on
-branch 1.3.1. In the meantime, development on the trunk has proceeded
-to revision 1.5. To merge the changes from the branch to the trunk,
-first go to the head revision of the trunk, by typing @kbd{C-u C-x v v
-@key{RET}}. Revision 1.5 is now current. If locking is used for the file,
-type @kbd{C-x v v} to lock revision 1.5 so that you can change it. Next,
-type @kbd{C-x v m 1.3.1 @key{RET}}. This takes the entire set of changes on
-branch 1.3.1 (relative to revision 1.3, where the branch started, up to
-the last revision on the branch) and merges it into the current revision
-of the work file. You can now commit the changed file, thus creating
-revision 1.6 containing the changes from the branch.
-
- It is possible to do further editing after merging the branch, before
-the next check-in. But it is usually wiser to commit the merged
-revision, then lock it and make the further changes. This will keep
-a better record of the history of changes.
+ While developing a branch, you may sometimes need to @dfn{merge} in
+changes that have already been made in another branch. This is not a
+trivial operation, as overlapping changes may have been made to the
+two branches.
+
+ On a decentralized version control system, merging is done with the
+command @kbd{C-x v m} (@code{vc-merge}). On Bazaar, this prompts for
+the exact arguments to pass to @command{bzr merge}, offering a
+sensible default if possible. On Git, this prompts for the name of a
+branch to merge from, with completion (based on the branch names known
+to the current repository). The output from running the merge command
+is shown in a separate buffer.
+
+ On a centralized version control system like CVS, @kbd{C-x v m}
+prompts for a branch ID, or a pair of revision IDs (@pxref{Switching
+Branches}); then it finds the changes from that branch, or the changes
+between the two revisions you specified, and merges those changes into
+the current VC fileset. If you just type @key{RET}, Emacs simply
+merges any changes that were made on the same branch since you checked
+the file out.
@cindex conflicts
@cindex resolving conflicts
- When you merge changes into a file that has itself been modified, the
-changes might overlap. We call this situation a @dfn{conflict}, and
-reconciling the conflicting changes is called @dfn{resolving a
-conflict}.
-
- Whenever conflicts occur during merging, VC detects them, tells you
-about them in the echo area, and asks whether you want help in merging.
-If you say yes, it starts an Ediff session (@pxref{Top,
-Ediff, Ediff, ediff, The Ediff Manual}).
-
- If you say no, the conflicting changes are both inserted into the
-file, surrounded by @dfn{conflict markers}. The example below shows how
-a conflict region looks; the file is called @samp{name} and the current
-master file revision with user B's changes in it is 1.11.
-
-@c @w here is so CVS won't think this is a conflict.
-@smallexample
-@group
-@w{<}<<<<<< name
- @var{User A's version}
-=======
- @var{User B's version}
-@w{>}>>>>>> 1.11
-@end group
-@end smallexample
+ Immediately after performing a merge, only the working tree is
+modified, and you can review the changes produced by the merge with
+@kbd{C-x v D} and related commands (@pxref{Old Revisions}). If the
+two branches contained overlapping changes, merging produces a
+@dfn{conflict}; a warning appears in the output of the merge command,
+and @dfn{conflict markers} are inserted into each affected work file,
+surrounding the two sets of conflicting changes. You must then
+resolve the conflict by editing the conflicted files. Once you are
+done, the modified files must be committed in the usual way for the
+merge to take effect (@pxref{Basic VC Editing}).
-@findex vc-resolve-conflicts
- Then you can resolve the conflicts by editing the file manually. Or
-you can type @code{M-x vc-resolve-conflicts} after visiting the file.
-This starts an Ediff session, as described above. Don't forget to
-commit the merged version afterwards.
-
-@findex vc-find-conflicted-file
- If there is more than one conflicted file in a merge, type @kbd{M-x
-vc-find-conflicted-file} after resolving the conflicts in each file.
-This command visits the next conflicted file, and moves point to the
-first conflict marker in that file.
-
-@node Multi-User Branching
-@subsubsection Multi-User Branching
-
- It is often useful for multiple developers to work simultaneously on
-different branches of a file. CVS and later systems allow this by
-default; for RCS, it is possible if you create multiple source
-directories. Each source directory should have a link named
-@file{RCS} which points to a common directory of RCS master files.
-Then each source directory can have its own choice of selected
-revisions, but all share the same common RCS records.
-
- This technique works reliably and automatically, provided that the
-source files contain RCS version headers
-@iftex
-(@pxref{Version Headers,,,emacs-xtra, Specialized Emacs Features}).
-@end iftex
-@ifnottex
-(@pxref{Version Headers}).
-@end ifnottex
-The headers enable Emacs to be sure, at all times, which revision
-ID is present in the work file.
+@node Creating Branches
+@subsubsection Creating New Branches
+
+ On centralized version control systems like CVS, Emacs supports
+creating new branches as part of a commit operation. When committing
+a modified VC fileset, type @kbd{C-u C-x v v} (@code{vc-next-action}
+with a prefix argument; @pxref{Advanced C-x v v}). Then Emacs prompts
+for a revision ID for the new revision. You should specify a suitable
+branch ID for a branch starting at the current revision. For example,
+if the current revision is 2.5, the branch ID should be 2.5.1, 2.5.2,
+and so on, depending on the number of existing branches at that point.
+
+ To create a new branch at an older revision (one that is no longer
+the head of a branch), first select that revision (@pxref{Switching
+Branches}). Your procedure will then differ depending on whether you
+are using a locking or merging-based VCS.
+
+ On a locking VCS, you will need to lock the old revision branch with
+@kbd{C-x v v}. You'll be asked to confirm, when you lock the old
+revision, that you really mean to create a new branch---if you say no,
+you'll be offered a chance to lock the latest revision instead. On a
+merging-based VCS you will skip this step.
+
+ Then make your changes and type @kbd{C-x v v} again to commit a new
+revision. This creates a new branch starting from the selected
+revision.
- If the files do not have version headers, you must instead tell Emacs
-explicitly in each session which branch you are working on. To do this,
-first find the file, then type @kbd{C-u C-x v v} and specify the correct
-branch ID. This ensures that Emacs knows which branch it is using
-during this particular editing session.
+ After the branch is created, subsequent commits create new revisions
+on that branch. To leave the branch, you must explicitly select a
+different revision with @kbd{C-u C-x v v}.
@ifnottex
@include vc1-xtra.texi
@@ -1458,13 +1444,11 @@ during this particular editing session.
@section Change Logs
@cindex change log
- A change log file contains a chronological record of when and why you
-have changed a program, consisting of a sequence of entries describing
-individual changes. Normally it is kept in a file called
-@file{ChangeLog} in the same directory as the file you are editing, or
-one of its parent directories. A single @file{ChangeLog} file can
-record changes for all the files in its directory and all its
-subdirectories.
+ Many software projects keep a @dfn{change log}. This is a file,
+normally named @file{ChangeLog}, containing a chronological record of
+when and how the program was changed. Sometimes, there are several
+change log files, each recording the changes in one directory or
+directory tree.
@menu
* Change Log Commands:: Commands for editing change log files.
@@ -1496,7 +1480,7 @@ rather than starting a new item.
You can combine multiple changes of the same nature. If you don't
enter any text after the initial @kbd{C-x 4 a}, any subsequent
-@kbd{C-x 4 a} adds another symbol to the change.
+@kbd{C-x 4 a} adds another symbol to the change log entry.
@vindex add-log-always-start-new-record
If @code{add-log-always-start-new-record} is non-@code{nil},
@@ -1534,15 +1518,7 @@ ordering of entries.
Version control systems are another way to keep track of changes in
your program and keep a change log. In the VC log buffer, typing
@kbd{C-c C-a} (@code{log-edit-insert-changelog}) inserts the relevant
-Change Log entry, if one exists (@pxref{Log Buffer}). You can also
-insert a VC log entry into a Change Log buffer by typing @kbd{C-x v a}
-(@code{vc-update-change-log}) in the Change Log buffer
-@iftex
-(@pxref{Change Logs and VC,,,emacs-xtra, Specialized Emacs Features}).
-@end iftex
-@ifnottex
-(@pxref{Change Logs and VC}).
-@end ifnottex
+Change Log entry, if one exists. @xref{Log Buffer}.
@node Format of ChangeLog
@subsection Format of ChangeLog
@@ -1597,8 +1573,8 @@ Of course, you should substitute the proper years and copyright holder.
@cindex tags and tag tables
A @dfn{tag} is a reference to a subunit in a program or in a
-document. In program source code, tags reference syntactic elements
-of the program: functions, subroutines, data types, macros, etc. In a
+document. In source code, tags reference syntactic elements of the
+program: functions, subroutines, data types, macros, etc. In a
document, tags reference chapters, sections, appendices, etc. Each
tag specifies the name of the file where the corresponding subunit is
defined, 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
C files; and Fortran files produced by preprocessing @file{.fpp}
source files.
- To produce a tags table, you use the @samp{etags} command,
-submitting it a document or the source code of a program.
-@samp{etags} writes the tags to a @dfn{tags table file}, or @dfn{tags
-file} in short. The conventional name for a tags file is @file{TAGS}.
+@cindex etags
+ To produce a tags table, you run the @command{etags} shell command
+on a document or the source code file. The @samp{etags} program
+writes the tags to a @dfn{tags table file}, or @dfn{tags file} in
+short. The conventional name for a tags file is @file{TAGS}.
+@xref{Create Tags Table}.
- Emacs uses the information recorded in tags tables in commands that
-search or replace through multiple source files: these commands use
-the names of the source files recorded in the tags table to know which
-files to search. Other commands, such as @kbd{M-.}, which finds the
-definition of a function, use the recorded information about the
-function names and positions to find the source file and the position
-within that file where the function is defined.
+ Emacs provides many commands for searching and replacing using the
+information recorded in tags tables. For instance, the @kbd{M-.}
+(@code{find-tag}) jumps to the location of a specified function
+definition in its source file. @xref{Find Tag}.
@cindex C++ class browser, tags
@cindex tags, C++
@cindex class browser, C++
@cindex Ebrowse
- See also the Ebrowse facility, which is tailored for C++.
-@xref{Top,, Ebrowse, ebrowse, Ebrowse User's Manual}.
+ The Ebrowse facility is similar to @command{etags} but specifically
+tailored for C++. @xref{Top,, Ebrowse, ebrowse, Ebrowse User's
+Manual}. The Semantic package provides another way to generate and
+use tags, separate from the @command{etags} facility.
+@xref{Semantic}.
@menu
* Tag Syntax:: Tag syntax for various types of code and text files.
-* Create Tags Table:: Creating a tags table with @code{etags}.
+* Create Tags Table:: Creating a tags table with @command{etags}.
* Etags Regexps:: Create arbitrary tags using regular expressions.
* Select Tags Table:: How to visit a tags table.
* Find Tag:: Commands to find the definition of a specific tag.
* Tags Search:: Using a tags table for searching and replacing.
-* List Tags:: Listing and finding tags defined in a file.
+* List Tags:: Using tags for completion, and listing them.
@end menu
@node Tag Syntax
@@ -1661,7 +1639,7 @@ and @samp{--no-members} can make the tags table file much smaller.
You can tag function declarations and external variables in addition
to function definitions by giving the @samp{--declarations} option to
-@code{etags}.
+@command{etags}.
@item
In 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
@samp{@var{class}.@var{variable}} and @samp{@var{class}.@var{function}}.
@item
-In La@TeX{} text, the argument of any of the commands @code{\chapter},
+In La@TeX{} documents, the arguments for @code{\chapter},
@code{\section}, @code{\subsection}, @code{\subsubsection},
@code{\eqno}, @code{\label}, @code{\ref}, @code{\cite},
@code{\bibitem}, @code{\part}, @code{\appendix}, @code{\entry},
@code{\index}, @code{\def}, @code{\newcommand}, @code{\renewcommand},
-@code{\newenvironment} or @code{\renewenvironment} is a tag.@refill
+@code{\newenvironment} and @code{\renewenvironment} are tags.
Other commands can make tags as well, if you specify them in the
-environment variable @env{TEXTAGS} before invoking @code{etags}. The
+environment variable @env{TEXTAGS} before invoking @command{etags}. The
value of this environment variable should be a colon-separated list of
command names. For example,
@@ -1818,9 +1796,9 @@ Regexps}) to handle other formats and languages.
@node Create Tags Table
@subsection Creating Tags Tables
-@cindex @code{etags} program
+@cindex @command{etags} program
- The @code{etags} program is used to create a tags table file. It knows
+ The @command{etags} program is used to create a tags table file. It knows
the syntax of several languages, as described in
@iftex
the previous section.
@@ -1828,58 +1806,51 @@ the previous section.
@ifnottex
@ref{Tag Syntax}.
@end ifnottex
-Here is how to run @code{etags}:
+Here is how to run @command{etags}:
@example
etags @var{inputfiles}@dots{}
@end example
@noindent
-The @code{etags} program reads the specified files, and writes a tags
+The @command{etags} program reads the specified files, and writes a tags
table named @file{TAGS} in the current working directory. You can
optionally specify a different file name for the tags table by using the
@samp{--output=@var{file}} option; specifying @file{-} as a file name
prints the tags table to standard output.
- If the specified files don't exist, @code{etags} looks for
+ If the specified files don't exist, @command{etags} looks for
compressed versions of them and uncompresses them to read them. Under
-MS-DOS, @code{etags} also looks for file names like @file{mycode.cgz}
+MS-DOS, @command{etags} also looks for file names like @file{mycode.cgz}
if it is given @samp{mycode.c} on the command line and @file{mycode.c}
does not exist.
- @code{etags} recognizes the language used in an input file based on
-its file name and contents. You can specify the language with the
-@samp{--language=@var{name}} option, described below.
-
- If the tags table data become outdated due to changes in the files
-described in the table, the way to update the tags table is the same
-way it was made in the first place. If the tags table fails to record
-a tag, or records it for the wrong file, then Emacs cannot possibly
-find its definition until you update the tags table. However, if the
-position recorded in the tags table becomes a little bit wrong (due to
-other editing), the worst consequence is a slight delay in finding the
-tag. Even if the stored position is very far wrong, Emacs will still
-find the tag, after searching most of the file for it. That delay is
-hardly noticeable with today's computers.
+ If the tags table becomes outdated due to changes in the files
+described in it, you can update it by running the @command{etags}
+program again. If the tags table does not record a tag, or records it
+for the wrong file, then Emacs will not be able to find that
+definition until you update the tags table. But if the position
+recorded in the tags table becomes a little bit wrong (due to other
+editing), Emacs will still be able to find the right position, with a
+slight delay.
Thus, there is no need to update the tags table after each edit.
You should update a tags table when you define new tags that you want
to have listed, or when you move tag definitions from one file to
another, or when changes become substantial.
- One tags table can virtually include another. Specify the included
-tags file name with the @samp{--include=@var{file}} option when
-creating the file that is to include it. The latter file then acts as
-if it covered all the source files specified in the included file, as
-well as the files it directly contains.
+ You can make a tags table @dfn{include} another tags table, by
+passing the @samp{--include=@var{file}} option to @command{etags}. It
+then covers all the files covered by the included tags file, as well
+as its own.
If you specify the source files with relative file names when you run
-@code{etags}, the tags file will contain file names relative to the
+@command{etags}, the tags file will contain file names relative to the
directory where the tags file was initially written. This way, you can
move an entire directory tree containing both the tags file and the
source files, and the tags file will still refer correctly to the source
files. If the tags file is @file{-} or is in the @file{/dev} directory,
-however, the file names are
+however, the file names are
made relative to the current working directory. This is useful, for
example, when writing the tags to @file{/dev/stdout}.
@@ -1887,40 +1858,41 @@ example, when writing the tags to @file{/dev/stdout}.
pointing to a tags file in a different directory, because this would
generally render the file names invalid.
- If you specify absolute file names as arguments to @code{etags}, then
+ If you specify absolute file names as arguments to @command{etags}, then
the tags file will contain absolute file names. This way, the tags file
will still refer to the same files even if you move it, as long as the
source files remain in the same place. Absolute file names start with
@samp{/}, or with @samp{@var{device}:/} on MS-DOS and MS-Windows.
- When you want to make a tags table from a great number of files, you
-may have problems listing them on the command line, because some systems
-have a limit on its length. The simplest way to circumvent this limit
-is to tell @code{etags} to read the file names from its standard input,
-by typing a dash in place of the file names, like this:
+ When you want to make a tags table from a great number of files,
+you may have problems listing them on the command line, because some
+systems have a limit on its length. You can circumvent this limit by
+telling @command{etags} to read the file names from its standard
+input, by typing a dash in place of the file names, like this:
@smallexample
find . -name "*.[chCH]" -print | etags -
@end smallexample
- Use the option @samp{--language=@var{name}} to specify the language
-explicitly. You can intermix these options with file names; each one
-applies to the file names that follow it. Specify
-@samp{--language=auto} to tell @code{etags} to resume guessing the
-language from the file names and file contents. Specify
-@samp{--language=none} to turn off language-specific processing
-entirely; then @code{etags} recognizes tags by regexp matching alone
-(@pxref{Etags Regexps}).
+ @command{etags} recognizes the language used in an input file based
+on its file name and contents. You can specify the language
+explicitly with the @samp{--language=@var{name}} option. You can
+intermix these options with file names; each one applies to the file
+names that follow it. Specify @samp{--language=auto} to tell
+@command{etags} to resume guessing the language from the file names
+and file contents. Specify @samp{--language=none} to turn off
+language-specific processing entirely; then @command{etags} recognizes
+tags by regexp matching alone (@pxref{Etags Regexps}).
The option @samp{--parse-stdin=@var{file}} is mostly useful when
-calling @code{etags} from programs. It can be used (only once) in
-place of a file name on the command line. @code{Etags} will read from
+calling @command{etags} from programs. It can be used (only once) in
+place of a file name on the command line. @command{etags} will read from
standard input and mark the produced tags as belonging to the file
@var{file}.
- @samp{etags --help} outputs the list of the languages @code{etags}
+ @samp{etags --help} outputs the list of the languages @command{etags}
knows, and the file name rules for guessing the language. It also prints
-a list of all the available @code{etags} options, together with a short
+a list of all the available @command{etags} options, together with a short
explanation. If followed by one or more @samp{--language=@var{lang}}
options, it outputs detailed information about how tags are generated for
@var{lang}.
@@ -1928,21 +1900,22 @@ options, it outputs detailed information about how tags are generated for
@node Etags Regexps
@subsection Etags Regexps
- The @samp{--regex} option provides a general way of recognizing tags
-based on regexp matching. You can freely intermix this option with
-file names, and each one applies to the source files that follow it.
-If you specify multiple @samp{--regex} options, all of them are used
-in parallel. The syntax is:
+ The @samp{--regex} option to @command{etags} allows tags to be
+recognized by regular expression matching. You can intermix this
+option with file names; each one applies to the source files that
+follow it. If you specify multiple @samp{--regex} options, all of
+them are used in parallel. The syntax is:
@smallexample
--regex=[@var{@{language@}}]/@var{tagregexp}/[@var{nameregexp}/]@var{modifiers}
@end smallexample
- The essential part of the option value is @var{tagregexp}, the
-regexp for matching tags. It is always used anchored, that is, it
-only matches at the beginning of a line. If you want to allow
-indented tags, use a regexp that matches initial whitespace; start it
-with @samp{[ \t]*}.
+@noindent
+The essential part of the option value is @var{tagregexp}, the regexp
+for matching tags. It is always used anchored, that is, it only
+matches at the beginning of a line. If you want to allow indented
+tags, use a regexp that matches initial whitespace; start it with
+@samp{[ \t]*}.
In these regular expressions, @samp{\} quotes the next character, and
all 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
below.
The @var{modifiers} are a sequence of zero or more characters that
-modify the way @code{etags} does the matching. A regexp with no
+modify the way @command{etags} does the matching. A regexp with no
modifiers is applied sequentially to each line of the input file, in a
case-sensitive way. The modifiers and their meanings are:
@@ -1984,22 +1957,22 @@ etags --regex=/@var{reg1}/i voo.doo --regex=/@var{reg2}/m \
@end smallexample
@noindent
-Here @code{etags} chooses the parsing language for @file{voo.doo} and
-@file{bar.ber} according to their contents. @code{etags} also uses
+Here @command{etags} chooses the parsing language for @file{voo.doo} and
+@file{bar.ber} according to their contents. @command{etags} also uses
@var{reg1} to recognize additional tags in @file{voo.doo}, and both
@var{reg1} and @var{reg2} to recognize additional tags in
@file{bar.ber}. @var{reg1} is checked against each line of
@file{voo.doo} and @file{bar.ber}, in a case-insensitive way, while
@var{reg2} is checked against the whole @file{bar.ber} file,
-permitting multi-line matches, in a case-sensitive way. @code{etags}
+permitting multi-line matches, in a case-sensitive way. @command{etags}
uses only the Lisp tags rules, with no user-specified regexp matching,
to recognize tags in @file{los.er}.
You can restrict a @samp{--regex} option to match only files of a
given language by using the optional prefix @var{@{language@}}.
(@samp{etags --help} prints the list of languages recognized by
-@code{etags}.) This is particularly useful when storing many
-predefined regular expressions for @code{etags} in a file. The
+@command{etags}.) This is particularly useful when storing many
+predefined regular expressions for @command{etags} in a file. The
following example tags the @code{DEFVAR} macros in the Emacs source
files, for the C language only:
@@ -2009,7 +1982,7 @@ files, for the C language only:
@noindent
When you have complex regular expressions, you can store the list of
-them in a file. The following option syntax instructs @code{etags} to
+them in a file. The following option syntax instructs @command{etags} to
read two files of regular expressions. The regular expressions
contained in the second file are matched without regard to case.
@@ -2018,9 +1991,9 @@ contained in the second file are matched without regard to case.
@end smallexample
@noindent
-A regex file for @code{etags} contains one regular expression per
+A regex file for @command{etags} contains one regular expression per
line. Empty lines, and lines beginning with space or tab are ignored.
-When the first character in a line is @samp{@@}, @code{etags} assumes
+When the first character in a line is @samp{@@}, @command{etags} assumes
that the rest of the line is the name of another file of regular
expressions; thus, one such file can include another file. All the
other lines are taken to be regular expressions. If the first
@@ -2083,14 +2056,14 @@ etags --language=none \
@node Select Tags Table
@subsection Selecting a Tags Table
-@vindex tags-file-name
@findex visit-tags-table
- Emacs has at any time one @dfn{selected} tags table, and all the
+ Emacs has at any time one @dfn{selected} tags table. All the
commands for working with tags tables use the selected one. To select
a tags table, type @kbd{M-x visit-tags-table}, which reads the tags
table file name as an argument, with @file{TAGS} in the default
directory as the default.
+@vindex tags-file-name
Emacs does not actually read in the tags table contents until you
try to use them; all @code{visit-tags-table} does is store the file
name 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.
@kindex M-.
@findex find-tag
- @kbd{M-.}@: (@code{find-tag}) is the command to find the definition of
-a specified tag. It searches through the tags table for that tag, as a
-string, and then uses the tags table info to determine the file that the
-definition is in and the approximate character position in the file of
-the definition. Then @code{find-tag} visits that file, moves point to
-the approximate character position, and searches ever-increasing
-distances away to find the tag definition.
-
- If an empty argument is given (just type @key{RET}), the balanced
-expression in the buffer before or around point is used as the
-@var{tag} argument. @xref{Expressions}.
+ @kbd{M-.}@: (@code{find-tag}) prompts for a tag name and jumps to
+its source definition. It works by searching through the tags table
+for that tag's file and approximate character position, visiting that
+file, and searching for the tag definition at ever-increasing
+distances away from the recorded approximate position.
+
+ When entering the tag argument to @kbd{M-.}, the usual minibuffer
+completion commands can be used (@pxref{Completion}), with the tag
+names in the selected tags table as completion candidates. If you
+specify an empty argument, the balanced expression in the buffer
+before or around point is the default argument. @xref{Expressions}.
You don't need to give @kbd{M-.} the full name of the tag; a part
-will do. This is because @kbd{M-.} finds tags in the table which
-contain @var{tag} as a substring. However, it prefers an exact match
-to a substring match. To find other tags that match the same
-substring, give @code{find-tag} a numeric argument, as in @kbd{C-u
-M-.}; this does not read a tag name, but continues searching the tags
-table's text for another tag containing the same substring last used.
-If you have a real @key{META} key, @kbd{M-0 M-.}@: is an easier
-alternative to @kbd{C-u M-.}.
+will do. @kbd{M-.} finds tags which contain that argument as a
+substring. However, it prefers an exact match to a substring match.
+To find other tags that match the same substring, give @code{find-tag}
+a numeric argument, as in @kbd{C-u M-.} or @kbd{M-0 M-.}; this does
+not read a tag name, but continues searching the tags table's text for
+another tag containing the same substring last used.
@kindex C-x 4 .
@findex find-tag-other-window
@@ -2182,23 +2153,23 @@ alternative to @kbd{C-u M-.}.
@findex find-tag-other-frame
Like most commands that can switch buffers, @code{find-tag} has a
variant that displays the new buffer in another window, and one that
-makes a new frame for it. The former is @w{@kbd{C-x 4 .}}, which invokes
-the command @code{find-tag-other-window}. The latter is @w{@kbd{C-x 5 .}},
-which invokes @code{find-tag-other-frame}.
+makes a new frame for it. The former is @w{@kbd{C-x 4 .}}
+(@code{find-tag-other-window}), and the latter is @w{@kbd{C-x 5 .}}
+(@code{find-tag-other-frame}).
- To move back to places you've found tags recently, use @kbd{C-u -
-M-.}; more generally, @kbd{M-.} with a negative numeric argument. This
-command can take you to another buffer. @w{@kbd{C-x 4 .}} with a negative
-argument finds the previous tag location in another window.
+ To move back to previous tag definitions, use @kbd{C-u - M-.}; more
+generally, @kbd{M-.} with a negative numeric argument. Similarly,
+@w{@kbd{C-x 4 .}} with a negative argument finds the previous tag
+location in another window.
@kindex M-*
@findex pop-tag-mark
@vindex find-tag-marker-ring-length
- As well as going back to places you've found tags recently, you can go
-back to places @emph{from where} you found them. Use @kbd{M-*}, which
-invokes the command @code{pop-tag-mark}, for this. Typically you would
-find and study the definition of something with @kbd{M-.} and then
-return to where you were with @kbd{M-*}.
+ As well as going back to places you've found tags recently, you can
+go back to places @emph{from where} you found them, using @kbd{M-*}
+(@code{pop-tag-mark}). Thus you can find and examine the definition
+of something with @kbd{M-.} and then return to where you were with
+@kbd{M-*}.
Both @kbd{C-u - M-.} and @kbd{M-*} allow you to retrace your steps to
a 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,
@kindex M-,
@findex tags-loop-continue
- Having found one match, you probably want to find all the rest. To find
-one more match, type @kbd{M-,} (@code{tags-loop-continue}) to resume the
-@code{tags-search}. This searches the rest of the current buffer, followed
-by the remaining files of the tags table.@refill
+ Having found one match, you probably want to find all the rest.
+Type @kbd{M-,} (@code{tags-loop-continue}) to resume the
+@code{tags-search}, finding one more match. This searches the rest of
+the current buffer, followed by the remaining files of the tags table.
@findex tags-query-replace
@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).
Buffers in which no match is found are quickly killed; the others
continue to exist.
- It may have struck you that @code{tags-search} is a lot like
-@code{grep}. You can also run @code{grep} itself as an inferior of
-Emacs and have Emacs show you the matching lines one by one.
+ As an alternative to @code{tags-search}, you can run @command{grep}
+as a subprocess and have Emacs show you the matching lines one by one.
@xref{Grep Searching}.
@node List Tags
@subsection Tags Table Inquiries
@table @kbd
+@item C-M-i
+@itemx M-@key{TAB}
+Perform completion on the text around point, using the selected tags
+table if one is loaded (@code{completion-at-point}).
@item M-x list-tags @key{RET} @var{file} @key{RET}
Display a list of the tags defined in the program file @var{file}.
@item M-x tags-apropos @key{RET} @var{regexp} @key{RET}
Display a list of all tags matching @var{regexp}.
@end table
+@cindex completion (symbol names)
+ In most programming language modes, you can type @kbd{C-M-i} or
+@kbd{M-@key{TAB}} (@code{completion-at-point}) to complete the symbol
+at point. If there is a selected tags table, this command can use it
+to generate completion candidates. @xref{Symbol Completion}.
+
@findex list-tags
- @kbd{M-x list-tags} reads the name of one of the files described by
-the selected tags table, and displays a list of all the tags defined in
-that file. The ``file name'' argument is really just a string to
-compare against the file names recorded in the tags table; it is read as
-a string rather than as a file name. Therefore, completion and
-defaulting are not available, and you must enter the file name the same
-way it appears in the tags table. Do not include a directory as part of
-the file name unless the file name recorded in the tags table includes a
-directory.
+ @kbd{M-x list-tags} reads the name of one of the files covered by
+the selected tags table, and displays a list of tags defined in that
+file. Do not include a directory as part of the file name unless the
+file name recorded in the tags table includes a directory.
@findex tags-apropos
@vindex tags-apropos-verbose
- @kbd{M-x tags-apropos} is like @code{apropos} for tags
-(@pxref{Apropos}). It finds all the tags in the selected tags table
-whose entries match @var{regexp}, and displays them. If the variable
-@code{tags-apropos-verbose} is non-@code{nil}, it displays the names
-of the tags files together with the tag names.
-
@vindex tags-tag-face
@vindex tags-apropos-additional-actions
- You can customize the appearance of the output by setting the
-variable @code{tags-tag-face} to a face. You can display additional
-output with @kbd{M-x tags-apropos} by customizing the variable
-@code{tags-apropos-additional-actions}---see its documentation for
-details.
-
- You can also use the collection of tag names to complete a symbol
-name in the buffer. @xref{Symbol Completion}.
-
- You can use @kbd{M-x next-file} to visit the files in the selected
-tags table. The first time this command is called, it visits the
-first file in the tags table. Each subsequent call visits the next
-file in the table, unless a prefix argument is supplied, in which case
-it returns to the first file.
+ @kbd{M-x tags-apropos} is like @code{apropos} for tags
+(@pxref{Apropos}). It displays a list of tags in the selected tags
+table whose entries match @var{regexp}. If the variable
+@code{tags-apropos-verbose} is non-@code{nil}, it displays the names
+of the tags files together with the tag names. You can customize the
+appearance of the output by setting the variable @code{tags-tag-face}
+to a face. You can display additional output by customizing the
+variable @code{tags-apropos-additional-actions}; see its documentation
+for details.
+
+@findex next-file
+ @kbd{M-x next-file} visits files covered by the selected tags table.
+The first time it is called, it visits the first file covered by the
+table. Each subsequent call visits the next covered file, unless a
+prefix argument is supplied, in which case it returns to the first
+file.
@node EDE
@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:
The old XLFD based format is also supported for backwards compatibility.
- Emacs 23 supports a number of backends. Currently, the @code{gdi}
-and @code{uniscribe} font backends are supported on Windows. The
-@code{gdi} font backend is available on all versions of Windows, and
-supports all fonts that are natively supported by Windows. The
+@cindex font backend selection (MS-Windows)
+ Emacs 23 and later supports a number of font backends. Currently,
+the @code{gdi} and @code{uniscribe} backends are supported on Windows.
+The @code{gdi} font backend is available on all versions of Windows,
+and supports all fonts that are natively supported by Windows. The
@code{uniscribe} font backend is available on Windows 2000 and later,
and supports TrueType and OpenType fonts. Some languages requiring
-complex layout can only be properly supported by the uniscribe
+complex layout can only be properly supported by the Uniscribe
backend. By default, both backends are enabled if supported, with
-@code{uniscribe} taking priority over @code{gdi}.
+@code{uniscribe} taking priority over @code{gdi}. To override that
+and use the GDI backend even if Uniscribe is available, invoke Emacs
+with the @kbd{-xrm Emacs.fontBackend:gdi} command-line argument, or
+add a @code{Emacs.fontBackend} resource with the value @code{gdi} in
+the Registry under either the
+@samp{HKEY_CURRENT_USER\SOFTWARE\GNU\Emacs} or the
+@samp{HKEY_LOCAL_MACHINE\SOFTWARE\GNU\Emacs} key (@pxref{Resources}).
@cindex font properties (MS Windows)
@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 @@
@cindex C editing
@cindex program editing
- Emacs provides many features to facilitate editing programs. Some
-of these features can
+ This chapter describes Emacs features for facilitating editing
+programs. Some of these features can:
@itemize @bullet
@item
@@ -25,8 +25,6 @@ Insert, kill or align comments (@pxref{Comments}).
Highlight program syntax (@pxref{Font Lock}).
@end itemize
- This chapter describes these features and many more.
-
@menu
* Program Modes:: Major modes for editing programs.
* Defuns:: Commands to operate on major top-level parts
@@ -40,8 +38,8 @@ Highlight program syntax (@pxref{Font Lock}).
* Glasses:: Making identifiersLikeThis more readable.
* Semantic:: Suite of editing tools based on source code parsing.
* Misc for Programs:: Other Emacs features useful for editing programs.
-* C Modes:: Special commands of C, C++, Objective-C,
- Java, and Pike modes.
+* C Modes:: Special commands of C, C++, Objective-C, Java,
+ IDL, Pike and AWK modes.
* Asm Mode:: Asm mode and its special features.
@ifnottex
* Fortran:: Fortran mode and its special features.
@@ -52,21 +50,14 @@ Highlight program syntax (@pxref{Font Lock}).
@section Major Modes for Programming Languages
@cindex modes for programming languages
- Emacs has specialized major modes for various programming languages.
-@xref{Major Modes}. A programming language major mode typically
+ Emacs has specialized major modes (@pxref{Major Modes}) for many
+programming languages. A programming language mode typically
specifies the syntax of expressions, the customary rules for
indentation, how to do syntax highlighting for the language, and how
-to find the beginning or end of a function definition. It often
-customizes or provides facilities for compiling and debugging programs
-as well.
-
- Ideally, Emacs should provide a major mode for each programming
-language that you might want to edit; if it doesn't have a mode for
-your favorite language, you can contribute one. But often the mode
-for one language can serve for other syntactically similar languages.
-The major mode for language @var{l} is called @code{@var{l}-mode},
-and you can select it by typing @kbd{M-x @var{l}-mode @key{RET}}.
-@xref{Choosing Modes}.
+to find the beginning or end of a function definition. It often has
+features for compiling and debugging programs as well. The major mode
+for each language is named after the language; for instance, the major
+mode for the C programming language is @code{c-mode}.
@cindex Perl mode
@cindex Icon mode
@@ -89,40 +80,32 @@ and you can select it by typing @kbd{M-x @var{l}-mode @key{RET}}.
@cindex Conf mode
@cindex DNS mode
@cindex Javascript mode
- The existing programming language major modes include Lisp, Scheme
-(a variant of Lisp) and the Scheme-based DSSSL expression language,
-Ada, ASM, AWK, C, C++, Delphi (Object Pascal), Fortran, Icon, IDL
-(CORBA), IDLWAVE, Java, Javascript, Metafont (@TeX{}'s companion for
-font creation), Modula2, Objective-C, Octave, Pascal, Perl, Pike,
-PostScript, Prolog, Python, Ruby, Simula, Tcl, and VHDL. An
-alternative mode for Perl is called CPerl mode. Modes are available
-for the scripting languages of the common GNU and Unix shells, VMS
-DCL, and MS-DOS/MS-Windows @samp{BAT} files. There are also major
-modes for editing makefiles, DNS master files, and various sorts of
-configuration files.
+ Emacs has programming language modes for Lisp, Scheme, the
+Scheme-based DSSSL expression language, Ada, ASM, AWK, C, C++, Delphi,
+Fortran, Icon, IDL (CORBA), IDLWAVE, Java, Javascript, Metafont
+(@TeX{}'s companion for font creation), Modula2, Objective-C, Octave,
+Pascal, Perl, Pike, PostScript, Prolog, Python, Ruby, Simula, Tcl, and
+VHDL. An alternative mode for Perl is called CPerl mode. Modes are
+also available for the scripting languages of the common GNU and Unix
+shells, VMS DCL, and MS-DOS/MS-Windows @samp{BAT} files, and for
+makefiles, DNS master files, and various sorts of configuration files.
+
+ Ideally, Emacs should have a major mode for each programming
+language that you might want to edit. If it doesn't have a mode for
+your favorite language, the mode might be implemented in a package not
+distributed with Emacs (@pxref{Packages}); or you can contribute one.
@kindex DEL @r{(programming modes)}
@findex c-electric-backspace
+@findex backward-delete-char-untabify
In most programming languages, indentation should vary from line to
-line to illustrate the structure of the program. So the major modes
-for programming languages arrange for @key{TAB} to update the
-indentation of the current line (@pxref{Program Indent}). They also
-rebind @key{DEL} to treat a tab as if it were the equivalent number of
-spaces; this lets you delete one column of indentation without
-worrying whether the whitespace consists of spaces or tabs. Use
-@kbd{C-b C-d} to delete a tab character before point, in these modes.
-
- Separate manuals are available for the modes for Ada (@pxref{Top, , Ada
-Mode, ada-mode, Ada Mode}), C/C++/Objective C/Java/Corba IDL/Pike/AWK
-(@pxref{Top, , CC Mode, ccmode, CC Mode}) and the IDLWAVE modes
-(@pxref{Top, , IDLWAVE, idlwave, IDLWAVE User Manual}). For Fortran
-mode, see
-@iftex
-@ref{Fortran,,, emacs-xtra, Specialized Emacs Features}.
-@end iftex
-@ifnottex
-@ref{Fortran}.
-@end ifnottex
+line to illustrate the structure of the program. Therefore, in most
+programming language modes, typing @key{TAB} updates the indentation
+of the current line (@pxref{Program Indent}). Furthermore, @key{DEL}
+is usually bound to @code{backward-delete-char-untabify}, which
+deletes backward treating each tab as if it were the equivalent number
+of spaces, so that you can delete one column of indentation without
+worrying whether the whitespace consists of spaces or tabs.
@cindex mode hook
@vindex c-mode-hook
@@ -130,13 +113,24 @@ mode, see
@vindex emacs-lisp-mode-hook
@vindex lisp-interaction-mode-hook
@vindex scheme-mode-hook
- Turning on a major mode runs a normal hook called the @dfn{mode
-hook}, which is the value of a Lisp variable. Each major mode has a
-mode hook, and the hook's name is always made from the mode command's
-name by adding @samp{-hook}. For example, turning on C mode runs the
-hook @code{c-mode-hook}, while turning on Lisp mode runs the hook
-@code{lisp-mode-hook}. The purpose of the mode hook is to give you a
-place to set up customizations for that major mode. @xref{Hooks}.
+ Entering a programming language mode runs the custom Lisp functions
+specified in the hook variable @code{prog-mode-hook}, followed by
+those specified in the mode's own mode hook (@pxref{Major Modes}).
+For instance, entering C mode runs the hooks @code{prog-mode-hook} and
+@code{c-mode-hook}. @xref{Hooks}, for information about hooks.
+
+@ifinfo
+ Separate manuals are available for the modes for Ada (@pxref{Top,,
+Ada Mode, ada-mode, Ada Mode}), C/C++/Objective C/Java/Corba
+IDL/Pike/AWK (@pxref{Top, , CC Mode, ccmode, CC Mode}), and IDLWAVE
+(@pxref{Top,, IDLWAVE, idlwave, IDLWAVE User Manual}).
+@end ifinfo
+@ifnotinfo
+ The Emacs distribution contains Info manuals for the major modes for
+Ada, C/C++/Objective C/Java/Corba IDL/Pike/AWK, and IDLWAVE. For
+Fortran mode, see the ``Fortran'' section in the Info version of the
+Emacs manual, which is not included in this printed version.
+@end ifnotinfo
@node Defuns
@section Top-Level Definitions, or Defuns
@@ -328,20 +322,19 @@ The Speedbar can also use it (@pxref{Speedbar}).
@subsection Which Function Mode
@cindex current function name in mode line
- Which Function mode is a minor mode that displays the current
-function name in the mode line, updating it as you move around in a
-buffer.
+ Which Function mode is a global minor mode (@pxref{Minor Modes})
+which displays the current function name in the mode line, updating it
+as you move around in a buffer.
@findex which-function-mode
@vindex which-func-modes
To either enable or disable Which Function mode, use the command
-@kbd{M-x which-function-mode}. This command applies to all buffers,
-both existing ones and those yet to be created. However, it takes
-effect only in certain major modes, those listed in the value of
-@code{which-func-modes}. If the value of @code{which-func-modes} is
-@code{t} rather than a list of modes, then Which Function mode applies
-to all major modes that know how to support it---in other words, all
-the major modes that support Imenu.
+@kbd{M-x which-function-mode}. Although Which Function mode is a
+global minor mode, it takes effect only in certain major modes: those
+listed in the variable @code{which-func-modes}. If the value of
+@code{which-func-modes} is @code{t} rather than a list of modes, then
+Which Function mode applies to all major modes that know how to
+support it---in other words, all the major modes that support Imenu.
@node Program Indent
@section Indentation for Programs
@@ -352,6 +345,10 @@ reindent it as you change it. Emacs has commands to indent either a
single line, a specified number of lines, or all of the lines inside a
single parenthetical grouping.
+ @xref{Indentation}, for general information about indentation. This
+section describes indentation features specific to programming
+language modes.
+
@menu
* Basic Indent:: Indenting a single line.
* Multi-line Indent:: Commands to reindent many lines at once.
@@ -361,18 +358,15 @@ single parenthetical grouping.
@end menu
@cindex pretty-printer
- Emacs also provides a Lisp pretty-printer in the library @code{pp}.
-This program reformats a Lisp object with indentation chosen to look nice.
+ Emacs also provides a Lisp pretty-printer in the @code{pp} package,
+which reformats Lisp objects with nice-looking indentation.
@node Basic Indent
@subsection Basic Program Indentation Commands
- The basic indentation commands indent a single line according to the
-usual conventions of the language you are editing.
-
@table @kbd
@item @key{TAB}
-Adjust indentation of current line.
+Adjust indentation of current line (@code{indent-for-tab-command}).
@item C-j
Insert a newline, then adjust indentation of following line
(@code{newline-and-indent}).
@@ -382,65 +376,50 @@ Insert a newline, then adjust indentation of following line
@findex c-indent-command
@findex indent-line-function
@findex indent-for-tab-command
- The basic indentation command is @key{TAB}. In any
-programming-language major mode, @key{TAB} gives the current line the
-correct indentation as determined from the previous lines. It does
-this by inserting or deleting whitespace at the beginning of the
-current line. If point was inside the whitespace at the beginning of
-the line, @key{TAB} puts it at the end of that whitespace; otherwise,
-@key{TAB} keeps point fixed with respect to the characters around it.
-If the region is active (@pxref{Mark}), @key{TAB} indents every line
-within the region instead of just the current line. The function that
-@key{TAB} runs depends on the major mode; for instance, it is
-@code{c-indent-line-or-region} in C mode. Each function is aware of
-the syntax and conventions for its particular language.
-
- Use @kbd{C-q @key{TAB}} to insert a tab character at point.
+ The basic indentation command is @key{TAB}
+(@code{indent-for-tab-command}), which was documented in
+@ref{Indentation}. In programming language modes, @key{TAB} indents
+the current line, based on the indentation and syntactic content of
+the preceding lines; if the region is active, @key{TAB} indents each
+line within the region, not just the current line.
@kindex C-j @r{(indenting source code)}
@findex newline-and-indent
- When entering lines of new code, use @kbd{C-j}
-(@code{newline-and-indent}), which inserts a newline and then adjusts
-indentation after it. (It also deletes any trailing whitespace which
-remains before the new newline.) For instance, @kbd{C-j} at the end
-of a line creates a blank line with appropriate indentation. In
-programming language modes, it is equivalent to @key{RET} @key{TAB}.
-
- When Emacs indents a line that starts within a parenthetical
-grouping, it usually places the start of the line under the preceding
-line within the group, or under the text after the parenthesis. If
-you manually give one of these lines a nonstandard indentation, the
-lines below will tend to follow it. This behavior is convenient in
-cases where you have overridden the standard result of @key{TAB}
-indentation (e.g., for aesthetic purposes).
-
- Many programming-language modes assume that an open-parenthesis,
-open-brace or other opening delimiter at the left margin is the start
-of a function. This assumption speeds up indentation commands. If
-the text you are editing contains opening delimiters in column zero
-that aren't the beginning of a functions---even if these delimiters
-occur inside strings or comments---then you must set
-@code{open-paren-in-column-0-is-defun-start}. @xref{Left Margin
+ The command @kbd{C-j} (@code{newline-and-indent}), which was
+documented in @ref{Indentation Commands}, does the same as @key{RET}
+followed by @key{TAB}: it inserts a new line, then adjusts the line's
+indentation.
+
+ When indenting a line that starts within a parenthetical grouping,
+Emacs usually places the start of the line under the preceding line
+within the group, or under the text after the parenthesis. If you
+manually give one of these lines a nonstandard indentation (e.g.@: for
+aesthetic purposes), the lines below will follow it.
+
+ The indentation commands for most programming language modes assume
+that a open-parenthesis, open-brace or other opening delimiter at the
+left margin is the start of a function. If the code you are editing
+violates this assumption---even if the delimiters occur in strings or
+comments---you must set @code{open-paren-in-column-0-is-defun-start}
+to @code{nil} for indentation to work properly. @xref{Left Margin
Paren}.
- Normally, Emacs indents lines using an ``optimal'' mix of tab and
-space characters. If you want Emacs to use spaces only, set
-@code{indent-tabs-mode} (@pxref{Just Spaces}).
-
@node Multi-line Indent
@subsection Indenting Several Lines
Sometimes, you may want to reindent several lines of code at a time.
One way to do this is to use the mark; when the mark is active and the
-region is non-empty, @key{TAB} indents every line within the region.
-In addition, Emacs provides several other commands for indenting large
-chunks of code:
+region is non-empty, @key{TAB} indents every line in the region.
+Alternatively, the command @kbd{C-M-\} (@code{indent-region}) indents
+every line in the region, whether or not the mark is active
+(@pxref{Indentation Commands}).
+
+ In addition, Emacs provides the following commands for indenting
+large chunks of code:
@table @kbd
@item C-M-q
Reindent all the lines within one parenthetical grouping.
-@item C-M-\
-Reindent all lines in the region (@code{indent-region}).
@item C-u @key{TAB}
Shift an entire parenthetical grouping rigidly sideways so that its
first line is properly indented.
@@ -454,18 +433,13 @@ lines that start inside comments and strings.
To reindent the contents of a single parenthetical grouping,
position point before the beginning of the grouping and type
@kbd{C-M-q}. This changes the relative indentation within the
-grouping, without affecting its overall indentation (i.e., the
+grouping, without affecting its overall indentation (i.e.@: the
indentation of the line where the grouping starts). The function that
@kbd{C-M-q} runs depends on the major mode; it is
@code{indent-pp-sexp} in Lisp mode, @code{c-indent-exp} in C mode,
etc. To correct the overall indentation as well, type @key{TAB}
first.
- @kbd{C-M-\} (@code{indent-region}) applies @key{TAB} to the region.
-This is useful when Transient Mark mode is disabled (@pxref{Disabled
-Transient Mark}), because in that case @key{TAB} does not act on the
-region.
-
@kindex C-u TAB
If you like the relative indentation within a grouping but not the
indentation of its first line, move point to that first line and type
@@ -516,9 +490,9 @@ expression.
@cindex @code{lisp-indent-function} property
You can override the standard pattern in various ways for individual
functions, according to the @code{lisp-indent-function} property of
-the function name. Normally you would use this for macro definitions
-and specify it using the @code{declare} construct (@pxref{Defining
-Macros,,, elisp, the Emacs Lisp Reference Manual}).
+the function name. This is normally done for macro definitions, using
+the @code{declare} construct. @xref{Defining Macros,,, elisp, the
+Emacs Lisp Reference Manual}.
@node C Indent
@subsection Commands for C Indentation
@@ -632,6 +606,14 @@ information on customizing indentation for C and related modes,
including how to override parts of an existing style and how to define
your own styles.
+@findex c-guess
+@findex c-guess-install
+ As an alternative to specifying a style, you can tell Emacs to guess
+a style by typing @kbd{M-x c-guess} in a sample code buffer. You can
+then apply the guessed style to other buffers with @kbd{M-x
+c-guess-install}. @xref{Guessing the Style,,, ccmode, the CC Mode
+Manual}, for details.
+
@node Parentheses
@section Commands for Editing with Parentheses
@@ -664,9 +646,13 @@ parentheses and unbalanced string quotes in the buffer.
@cindex sexp
@cindex expression
@cindex balanced expression
- These commands deal with balanced expressions, also called
-@dfn{sexps}@footnote{The word ``sexp'' is used to refer to an
-expression in Lisp.}.
+ Each programming language mode has its own definition of a
+@dfn{balanced expression}. Balanced expressions typically include
+individual symbols, numbers, and string constants, as well as pieces
+of code enclosed in a matching pair of delimiters. The following
+commands deal with balanced expressions (in Emacs, such expressions
+are referred to internally as @dfn{sexps}@footnote{The word ``sexp''
+is used to refer to an expression in Lisp.}).
@table @kbd
@item C-M-f
@@ -682,90 +668,71 @@ Transpose expressions (@code{transpose-sexps}).
Put mark after following expression (@code{mark-sexp}).
@end table
- Each programming language major mode customizes the definition of
-balanced expressions to suit that language. Balanced expressions
-typically include symbols, numbers, and string constants, as well as
-any pair of matching delimiters and their contents. Some languages
-have obscure forms of expression syntax that nobody has bothered to
-implement in Emacs.
-
-@cindex Control-Meta
- By convention, the keys for these commands are all Control-Meta
-characters. They usually act on expressions just as the corresponding
-Meta characters act on words. For instance, the command @kbd{C-M-b}
-moves backward over a balanced expression, just as @kbd{M-b} moves
-back over a word.
-
@kindex C-M-f
@kindex C-M-b
@findex forward-sexp
@findex backward-sexp
To move forward over a balanced expression, use @kbd{C-M-f}
(@code{forward-sexp}). If the first significant character after point
-is an opening delimiter (@samp{(} in Lisp; @samp{(}, @samp{[} or
-@samp{@{} in C), @kbd{C-M-f} moves past the matching closing
-delimiter. If the character begins a symbol, string, or number,
-@kbd{C-M-f} moves over that.
+is an opening delimiter (e.g.@: @samp{(}, @samp{[} or @samp{@{} in C),
+this command moves past the matching closing delimiter. If the
+character begins a symbol, string, or number, the command moves over
+that.
The command @kbd{C-M-b} (@code{backward-sexp}) moves backward over a
-balanced expression. The detailed rules are like those above for
-@kbd{C-M-f}, but with directions reversed. If there are prefix
-characters (single-quote, backquote and comma, in Lisp) preceding the
-expression, @kbd{C-M-b} moves back over them as well. The balanced
-expression commands move across comments as if they were whitespace,
-in most modes.
-
- @kbd{C-M-f} or @kbd{C-M-b} with an argument repeats that operation the
-specified number of times; with a negative argument, it moves in the
-opposite direction.
+balanced expression---like @kbd{C-M-f}, but in the reverse direction.
+If the expression is preceded by any prefix characters (single-quote,
+backquote and comma, in Lisp), the command moves back over them as
+well.
+
+ @kbd{C-M-f} or @kbd{C-M-b} with an argument repeats that operation
+the specified number of times; with a negative argument means to move
+in the opposite direction. In most modes, these two commands move
+across comments as if they were whitespace. Note that their keys,
+@kbd{C-M-f} and @kbd{C-M-b}, are analogous to @kbd{C-f} and @kbd{C-b},
+which move by characters (@pxref{Moving Point}), and @kbd{M-f} and
+@kbd{M-b}, which move by words (@pxref{Words}).
@cindex killing expressions
@kindex C-M-k
@findex kill-sexp
- Killing a whole balanced expression can be done with @kbd{C-M-k}
-(@code{kill-sexp}). @kbd{C-M-k} kills the characters that @kbd{C-M-f}
-would move over.
+ To kill a whole balanced expression, type @kbd{C-M-k}
+(@code{kill-sexp}). This kills the text that @kbd{C-M-f} would move
+over.
@cindex transposition of expressions
@kindex C-M-t
@findex transpose-sexps
- A somewhat random-sounding command which is nevertheless handy is
-@kbd{C-M-t} (@code{transpose-sexps}), which drags the previous
-balanced expression across the next one. An argument serves as a
-repeat count, moving the previous expression over that many following
-ones. A negative argument drags the previous balanced expression
-backwards across those before it (thus canceling out the effect of
-@kbd{C-M-t} with a positive argument). An argument of zero, rather
-than doing nothing, transposes the balanced expressions ending at or
-after point and the mark.
+ @kbd{C-M-t} (@code{transpose-sexps}) switches the positions of the
+previous balanced expression and the next one. It is analogous to the
+@kbd{C-t} command, which transposes characters (@pxref{Transpose}).
+An argument to @kbd{C-M-t} serves as a repeat count, moving the
+previous expression over that many following ones. A negative
+argument moves the previous balanced expression backwards across those
+before it. An argument of zero, rather than doing nothing, transposes
+the balanced expressions ending at or after point and the mark.
@kindex C-M-@@
@kindex C-M-@key{SPC}
@findex mark-sexp
- To operate on balanced expressions with an operation which acts on
-the region, use the command @kbd{C-M-@key{SPC}} (@code{mark-sexp}).
-This sets the mark at the same place that @kbd{C-M-f} would move to.
-@xref{Marking Objects}, for more information about this command.
-
-@kbd{C-M-@key{SPC}} treats
-numeric arguments in the same way as @kbd{C-M-f}; in particular, a
-negative argument puts the mark at the beginning of the previous
-balanced expression. The alias @kbd{C-M-@@} is equivalent to
-@kbd{C-M-@key{SPC}}. While the mark is active, each successive use of
-@kbd{C-M-@key{SPC}} extends the region by shifting the mark by one
-sexp.
+ To operate on balanced expressions with a command which acts on the
+region, type @kbd{C-M-@key{SPC}} (@code{mark-sexp}). This sets the
+mark where @kbd{C-M-f} would move to. While the mark is active, each
+successive call to this command extends the region by shifting the
+mark by one expression. Positive or negative numeric arguments move
+the mark forward or backward by the specified number of expressions.
+The alias @kbd{C-M-@@} is equivalent to @kbd{C-M-@key{SPC}}.
+@xref{Marking Objects}, for more information about this and related
+commands.
In languages that use infix operators, such as C, it is not possible
-to recognize all balanced expressions as such because there can be
-multiple possibilities at a given position. For example, C mode does
-not treat @samp{foo + bar} as a single expression, even though it
-@emph{is} one C expression; instead, it recognizes @samp{foo} as one
-expression and @samp{bar} as another, with the @samp{+} as punctuation
-between them. Both @samp{foo + bar} and @samp{foo} are legitimate
-choices for ``the expression following point'' when point is at the
-@samp{f}, so the expression commands must perforce choose one or the
-other to operate on. Note that @samp{(foo + bar)} is recognized as a
-single expression in C mode, because of the parentheses.
+to recognize all balanced expressions because there can be multiple
+possibilities at a given position. For example, C mode does not treat
+@samp{foo + bar} as a single expression, even though it @emph{is} one
+C expression; instead, it recognizes @samp{foo} as one expression and
+@samp{bar} as another, with the @samp{+} as punctuation between them.
+However, C mode recognizes @samp{(foo + bar)} as a single expression,
+because of the parentheses.
@node Moving by Parens
@subsection Moving in the Parenthesis Structure
@@ -776,19 +743,18 @@ single expression in C mode, because of the parentheses.
@cindex braces, moving across
@cindex list commands
- The Emacs commands for handling parenthetical groupings see nothing
-except parentheses (or whatever characters must balance in the
-language you are working with). They ignore strings and comments
-(including any parentheses within them) and ignore parentheses quoted
-by an escape character. They are mainly intended for editing
-programs, but can be useful for editing any text that has parentheses.
-They are sometimes called ``list'' commands because in Lisp these
-groupings are lists.
+ The following commands move over groupings delimited by parentheses
+(or whatever else serves as delimiters in the language you are working
+with). They ignore strings and comments, including any parentheses
+within them, and also ignore parentheses that are ``quoted'' with an
+escape character. These commands are mainly intended for editing
+programs, but can be useful for editing any text containing
+parentheses. They are referred to internally as ``list'' commands
+because in Lisp these groupings are lists.
-These commands assume that the starting point is not inside a string
-or a comment. Sometimes you can invoke them usefully from one of
-these places (for example, when you have a parenthesised clause in a
-comment) but this is unreliable.
+ These commands assume that the starting point is not inside a string
+or a comment. If you invoke them from inside a string or comment, the
+results are unreliable.
@table @kbd
@item C-M-n
@@ -826,52 +792,62 @@ delimiter, this is nearly the same as searching for a @samp{(}. An
argument specifies the number of levels to go down.
@node Matching
-@subsection Automatic Display Of Matching Parentheses
+@subsection Matching Parentheses
@cindex matching parentheses
@cindex parentheses, displaying matches
- The Emacs parenthesis-matching feature is designed to show
-automatically how parentheses (and other matching delimiters) match in
-the text. Whenever you type a self-inserting character that is a
-closing delimiter, the cursor moves momentarily to the location of the
+ Emacs has a number of @dfn{parenthesis matching} features, which
+make it easy to see how and whether parentheses (or other delimiters)
+match up.
+
+ Whenever you type a self-inserting character that is a closing
+delimiter, the cursor moves momentarily to the location of the
matching opening delimiter, provided that is on the screen. If it is
not on the screen, Emacs displays some of the text near it in the echo
area. Either way, you can tell which grouping you are closing off.
-
- If the opening delimiter and closing delimiter are mismatched---such
+If the opening delimiter and closing delimiter are mismatched---such
as in @samp{[x)}---a warning message is displayed in the echo area.
@vindex blink-matching-paren
@vindex blink-matching-paren-distance
@vindex blink-matching-delay
- Three variables control parenthesis match display:
+ Three variables control the display of matching parentheses:
- @code{blink-matching-paren} turns the feature on or off: @code{nil}
-disables it, but the default is @code{t} to enable match display.
+@itemize @bullet
+@item
+@code{blink-matching-paren} turns the feature on or off: @code{nil}
+disables it, but the default is @code{t} to enable it.
- @code{blink-matching-delay} says how many seconds to leave the
-cursor on the matching opening delimiter, before bringing it back to
-the real location of point; the default is 1, but on some systems it
-is useful to specify a fraction of a second.
+@item
+@code{blink-matching-delay} says how many seconds to leave the cursor
+on the matching opening delimiter, before bringing it back to the real
+location of point. This may be an integer or floating-point number;
+the default is 1.
- @code{blink-matching-paren-distance} specifies how many characters
+@item
+@code{blink-matching-paren-distance} specifies how many characters
back to search to find the matching opening delimiter. If the match
-is not found in that distance, scanning stops, and nothing is displayed.
-This is to prevent the scan for the matching delimiter from wasting
-lots of time when there is no match. The default is 102400.
+is not found in that distance, Emacs stops scanning and nothing is
+displayed. The default is 102400.
+@end itemize
@cindex Show Paren mode
@cindex highlighting matching parentheses
@findex show-paren-mode
- Show Paren mode provides a more powerful kind of automatic matching.
-Whenever point is before an opening delimiter or after a closing
-delimiter, both that delimiter and its opposite delimiter are
-highlighted. Use the command @kbd{M-x show-paren-mode} to enable or
-disable this mode.
-
- Show Paren mode uses the faces @code{show-paren-match} and
-@code{show-paren-mismatch} to highlight parentheses; you can customize
-them to control how highlighting looks. @xref{Face Customization}.
+ Show Paren mode, a global minor mode, provides a more powerful kind
+of automatic matching. Whenever point is before an opening delimiter
+or after a closing delimiter, both that delimiter and its opposite
+delimiter are highlighted. To toggle Show Paren mode, type @kbd{M-x
+show-paren-mode}.
+
+@cindex Electric Pair mode
+@cindex inserting matching parentheses
+@findex electric-pair-mode
+ Electric Pair mode, a global minor mode, provides a way to easily
+insert matching delimiters. Whenever you insert an opening delimiter,
+the matching closing delimiter is automatically inserted as well,
+leaving point between the two. To toggle Electric Pair mode, type
+@kbd{M-x electric-pair-mode}.
@node Comments
@section Manipulating Comments
@@ -882,6 +858,23 @@ provides special commands for editing and inserting comments. It can
also do spell checking on comments with Flyspell Prog mode
(@pxref{Spelling}).
+ Some major modes have special rules for indenting different kinds of
+comments. For example, in Lisp code, comments starting with two
+semicolons are indented as if they were lines of code, while those
+starting with three semicolons are supposed to be aligned to the left
+margin and are often used for sectioning purposes. Emacs understand
+these conventions; for instance, typing @key{TAB} on a comment line
+will indent the comment to the appropriate position.
+
+@example
+;; This function is just an example.
+;;; Here either two or three semicolons are appropriate.
+(defun foo (x)
+;;; And now, the first part of the function:
+ ;; The following line adds one.
+ (1+ x)) ; This line adds one.
+@end example
+
@menu
* Comment Commands:: Inserting, killing, and aligning comments.
* 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
@cindex indentation for comments
@cindex alignment for comments
- The commands in this table insert, kill and align comments:
+ The following commands operate on comments:
@table @asis
@item @kbd{M-;}
-Insert or realign comment on current line; alternatively, comment or
-uncomment the region (@code{comment-dwim}).
+Insert or realign comment on current line; if the region is active,
+comment or uncomment the region instead (@code{comment-dwim}).
@item @kbd{C-u M-;}
Kill comment on current line (@code{comment-kill}).
@item @kbd{C-x ;}
@@ -909,7 +902,7 @@ Like @key{RET} followed by inserting and aligning a comment
(@code{comment-indent-new-line}). @xref{Multi-Line Comments}.
@item @kbd{M-x comment-region}
@itemx @kbd{C-c C-c} (in C-like modes)
-Add or remove comment delimiters on all the lines in the region.
+Add comment delimiters to all the lines in the region.
@end table
@kindex M-;
@@ -920,65 +913,61 @@ I Mean''; it indicates that this command can be used for many
different jobs relating to comments, depending on the situation where
you use it.
- When a region is active, @kbd{M-;} either adds or removes comment
-delimiters on each line of the region. @xref{Mark}. If every line in
-the region is a comment, it removes comment delimiters from each;
-otherwise, it adds comment delimiters to each. You can also use the
-commands @code{comment-region} and @code{uncomment-region} to
-explicitly comment or uncomment the text in the region
-(@pxref{Multi-Line Comments}). If you supply a prefix argument to
-@kbd{M-;} when a region is active, that specifies how many comment
-delimiters to add or how many to delete.
-
- If the region is not active, @kbd{M-;} inserts a new comment if
-there is no comment already on the line. The new comment is normally
-aligned at a specific column called the @dfn{comment column}; if the
-text of the line extends past the comment column, @kbd{M-;} aligns the
-comment start string to a suitable boundary (usually, at least one
-space is inserted). The comment begins with the string Emacs thinks
-comments should start with (the value of @code{comment-start}; see
-below). Emacs places point after that string, so you can insert the
-text of the comment right away. If the major mode has specified a
-string to terminate comments, @kbd{M-;} inserts that string after
-point, to keep the syntax valid.
+ When a region is active (@pxref{Mark}), @kbd{M-;} either adds
+comment delimiters to the region, or removes them. If every line in
+the region is already a comment, it ``uncomments'' each of those lines
+by removing their comment delimiters. Otherwise, it adds comment
+delimiters to enclose the text in the region.
+
+ If you supply a prefix argument to @kbd{M-;} when a region is
+active, that specifies the number of comment delimiters to add or
+delete. A positive argument @var{n} adds @var{n} delimiters, while a
+negative argument @var{-n} removes @var{n} delimiters.
+
+ If the region is not active, and there is no existing comment on the
+current line, @kbd{M-;} adds a new comment to the current line. If
+the line is blank (i.e.@: empty or containing only whitespace
+characters), the comment is indented to the same position where
+@key{TAB} would indent to (@pxref{Basic Indent}). If the line is
+non-blank, the comment is placed after the last non-whitespace
+character on the line; normally, Emacs tries putting it at the column
+specified by the variable @code{comment-column} (@pxref{Options for
+Comments}), but if the line already extends past that column, it puts
+the comment at some suitable position, usually separated from the
+non-comment text by at least one space. In each case, Emacs places
+point after the comment's starting delimiter, so that you can start
+typing the comment text right away.
You can also use @kbd{M-;} to align an existing comment. If a line
already contains the comment-start string, @kbd{M-;} realigns it to
-the conventional alignment and moves point after it. (Exception:
-comments starting in column 0 are not moved.) Even when an existing
-comment is properly aligned, @kbd{M-;} is still useful for moving
-directly to the start of the text inside the comment.
+the conventional alignment and moves point after the comment's
+starting delimiter. As an exception, comments starting in column 0
+are not moved. Even when an existing comment is properly aligned,
+@kbd{M-;} is still useful for moving directly to the start of the
+comment text.
@findex comment-kill
@kindex C-u M-;
- @kbd{C-u M-;} kills any comment on the current line, along with the
-whitespace before it. To reinsert the comment on another line, move
-to the end of that line, do @kbd{C-y}, and then do @kbd{M-;} to
-realign it.
-
- Note that @kbd{C-u M-;} is not a distinct key; it is @kbd{M-;}
-(@code{comment-dwim}) with a prefix argument. That command is
-programmed so that when it receives a prefix argument it calls
-@code{comment-kill}. However, @code{comment-kill} is a valid command
-in its own right, and you can bind it directly to a key if you wish.
-
- Some major modes have special rules for aligning certain kinds of
-comments in certain contexts. For example, in Lisp code, comments which
-start with two semicolons are indented as if they were lines of code,
-instead of at the comment column. Comments which start with three
-semicolons are supposed to start at the left margin and are often used
-for sectioning purposes. Emacs understands
-these conventions by indenting a double-semicolon comment using @key{TAB},
-and by not changing the indentation of a triple-semicolon comment at all.
+ @kbd{C-u M-;} (@code{comment-dwim} with a prefix argument) kills any
+comment on the current line, along with the whitespace before it.
+Since the comment is saved to the kill ring, you can reinsert it on
+another line by moving to the end of that line, doing @kbd{C-y}, and
+then @kbd{M-;} to realign the command. You can achieve the same
+effect as @kbd{C-u M-;} by typing @kbd{M-x comment-kill}
+(@code{comment-dwim} actually calls @code{comment-kill} as a
+subroutine when it is given a prefix argument).
-@example
-;; This function is just an example.
-;;; Here either two or three semicolons are appropriate.
-(defun foo (x)
-;;; And now, the first part of the function:
- ;; The following line adds one.
- (1+ x)) ; This line adds one.
-@end example
+@kindex C-c C-c (C mode)
+@findex comment-region
+@findex uncomment-region
+ The command @kbd{M-x comment-region} is equivalent to calling
+@kbd{M-;} on an active region, except that it always acts on the
+region, even if the mark is inactive. In C mode and related modes,
+this command is bound to @kbd{C-c C-c}. The command @kbd{M-x
+uncomment-region} uncomments each line in the region; a numeric prefix
+argument specifies the number of comment delimiters to remove
+(negative arguments specify the number of comment to delimiters to
+add).
For C-like modes, you can configure the exact effect of @kbd{M-;} by
setting the variables @code{c-indent-comment-alist} and
@@ -994,32 +983,31 @@ the brace rather than at @code{comment-column}. For full details see
@kindex M-j
@cindex blank lines in programs
@findex comment-indent-new-line
-
- If you are typing a comment and wish to continue it on another line,
-you can use the command @kbd{C-M-j} or @kbd{M-j}
-(@code{comment-indent-new-line}). If @code{comment-multi-line}
-(@pxref{Options for Comments}) is non-@code{nil}, it moves to a new
-line within the comment. Otherwise it closes the comment and starts a
-new comment on a new line. When Auto Fill mode is on, going past the
-fill column while typing a comment causes the comment to be continued
-in just this fashion.
-
-@kindex C-c C-c (C mode)
-@findex comment-region
- To turn existing lines into comment lines, use the @kbd{M-x
-comment-region} command (or type @kbd{C-c C-c} in C-like modes). It
-adds comment delimiters to the lines that start in the region, thus
-commenting them out. With a negative argument, it does the
-opposite---it deletes comment delimiters from the lines in the region.
-
- With a positive argument, @code{comment-region} duplicates the last
-character of the comment start sequence it adds; the argument
-specifies how many copies of the character to insert. Thus, in Lisp
-mode, @kbd{C-u 2 M-x comment-region} adds @samp{;;} to each line.
-Duplicating the comment delimiter is a way of calling attention to the
-comment. It can also affect how the comment is aligned or indented.
-In Lisp, for proper indentation, you should use an argument of two or
-three, if between defuns; if within a defun, it must be three.
+@vindex comment-multi-line
+ If you are typing a comment and wish to continue it to another line,
+type @kbd{M-j} or @kbd{C-M-j} (@code{comment-indent-new-line}). This
+breaks the current line, and inserts the necessary comment delimiters
+and indentation to continue the comment.
+
+ For languages with closing comment delimiters (e.g.@: @samp{*/} in
+C), the exact behavior of @kbd{M-j} depends on the value of the
+variable @code{comment-multi-line}. If the value is @code{nil}, the
+command closes the comment on the old line and starts a new comment on
+the new line. Otherwise, it opens a new line within the current
+comment delimiters.
+
+ When Auto Fill mode is on, going past the fill column while typing a
+comment also continues the comment, in the same way as an explicit
+invocation of @kbd{M-j}.
+
+ To turn existing lines into comment lines, use @kbd{M-;} with the
+region active, or use @kbd{M-x comment-region}
+@ifinfo
+(@pxref{Comment Commands}).
+@end ifinfo
+@ifnotinfo
+as described in the preceding section.
+@end ifnotinfo
You can configure C Mode such that when you type a @samp{/} at the
start 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.
@vindex comment-column
@kindex C-x ;
@findex comment-set-column
- The @dfn{comment column}, the column at which Emacs tries to place
-comments, is stored in the variable @code{comment-column}. You can
-set it to a number explicitly. Alternatively, the command @kbd{C-x ;}
-(@code{comment-set-column}) sets the comment column to the column
-point is at. @kbd{C-u C-x ;} sets the comment column to match the
-last comment before point in the buffer, and then does a @kbd{M-;} to
-align the current line's comment under the previous one.
-
- The variable @code{comment-column} is per-buffer: setting the variable
-in the normal fashion affects only the current buffer, but there is a
-default value which you can change with @code{setq-default}.
-@xref{Locals}. Many major modes initialize this variable for the
-current buffer.
+ As mentioned in @ref{Comment Commands}, when the @kbd{M-j} command
+adds a comment to a line, it tries to place the comment at the column
+specified by the buffer-local variable @code{comment-column}. You can
+set either the local value or the default value of this buffer-local
+variable in the usual way (@pxref{Locals}). Alternatively, you can
+type @kbd{C-x ;} (@code{comment-set-column}) to set the value of
+@code{comment-column} in the current buffer to the column where point
+is currently located. @kbd{C-u C-x ;} sets the comment column to
+match the last comment before point in the buffer, and then does a
+@kbd{M-;} to align the current line's comment under the previous one.
@vindex comment-start-skip
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
than the comment starting delimiter in the strictest sense of the word;
for example, in C mode the value of the variable is
@c This stops M-q from breaking the line inside that @code.
-@code{@w{"/\\*+ *\\|//+ *"}}, which matches extra stars and spaces
-after the @samp{/*} itself, and accepts C++ style comments also.
-(Note that @samp{\\} is needed in Lisp syntax to include a @samp{\} in
-the string, which is needed to deny the first star its special meaning
-in regexp syntax. @xref{Regexp Backslash}.)
+@code{@w{"\\(//+\\|/\\*+\\)\\s *"}}, which matches extra stars and
+spaces after the @samp{/*} itself, and accepts C++ style comments
+also. (Note that @samp{\\} is needed in Lisp syntax to include a
+@samp{\} in the string, which is needed to deny the first star its
+special meaning in regexp syntax. @xref{Regexp Backslash}.)
@vindex comment-start
@vindex comment-end
When a comment command makes a new comment, it inserts the value of
-@code{comment-start} to begin it. The value of @code{comment-end} is
-inserted after point, so that it will follow the text that you will
-insert into the comment. When @code{comment-end} is non-empty, it
-should start with a space. For example, in C mode,
-@code{comment-start} has the value @w{@code{"/* "}} and
-@code{comment-end} has the value @w{@code{" */"}}.
+@code{comment-start} as an opening comment delimiter. It also inserts
+the value of @code{comment-end} after point, as a closing comment
+delimiter. For example, in Lisp mode, @code{comment-start} is
+@samp{";"} and @code{comment-end} is @code{""} (the empty string). In
+C mode, @code{comment-start} is @code{"/* "} and @code{comment-end} is
+@code{" */"}.
@vindex comment-padding
- The variable @code{comment-padding} specifies how many spaces
-@code{comment-region} should insert on each line between the comment
-delimiter and the line's original text. The default is 1, to insert
-one space. @code{nil} means 0. Alternatively, @code{comment-padding}
-can hold the actual string to insert.
+ The variable @code{comment-padding} specifies a string that the
+commenting commands should insert between the comment delimiter(s) and
+the comment text. The default, @samp{" "}, specifies a single space.
+Alternatively, the value can be a number, which specifies that number
+of spaces, or @code{nil}, which means no spaces at all.
-@vindex comment-multi-line
- The variable @code{comment-multi-line} controls how @kbd{C-M-j}
-(@code{indent-new-comment-line}) behaves when used inside a comment.
-Specifically, when @code{comment-multi-line} is @code{nil}, the
-command inserts a comment terminator, begins a new line, and finally
-inserts a comment starter. Otherwise it does not insert the
-terminator and starter, so it effectively continues the current
-comment across multiple lines. In languages that allow multi-line
-comments, the choice of value for this variable is a matter of taste.
-The default for this variable depends on the major mode.
+ The variable @code{comment-multi-line} controls how @kbd{M-j} and
+Auto Fill mode continue comments over multiple lines.
+@xref{Multi-Line Comments}.
@vindex comment-indent-function
The variable @code{comment-indent-function} should contain a function
@@ -1139,7 +1117,7 @@ mode which @kbd{C-h S} does support.
@node Man Page
@subsection Man Page Lookup
-@cindex manual page
+@cindex man page
On Unix, the main form of on-line documentation was the @dfn{manual
page} or @dfn{man page}. In the GNU operating system, we aim to
replace man pages with better-organized manuals that you can browse
@@ -1148,71 +1126,51 @@ still useful to read manual pages.
@findex manual-entry
You can read the man page for an operating system command, library
-function, or system call, with the @kbd{M-x man} command. It
-runs the @code{man} program to format the man page; if the system
-permits, it runs @code{man} asynchronously, so that you can keep on
-editing while the page is being formatted. (On MS-DOS and MS-Windows
-3, you cannot edit while Emacs waits for @code{man} to finish.) The
-result goes in a buffer named @samp{*Man @var{topic}*}. These buffers
-use a special major mode, Man mode, that facilitates scrolling and
-jumping to other manual pages. For details, type @kbd{C-h m} while in
-a man page buffer.
+function, or system call, with the @kbd{M-x man} command. This
+prompts for a topic, with completion (@pxref{Completion}), and runs
+the @command{man} program to format the corresponding man page. If
+the system permits, it runs @command{man} asynchronously, so that you
+can keep on editing while the page is being formatted. The result
+goes in a buffer named @samp{*Man @var{topic}*}. These buffers use a
+special major mode, Man mode, that facilitates scrolling and jumping
+to other manual pages. For details, type @kbd{C-h m} while in a Man
+mode buffer.
@cindex sections of manual pages
Each man page belongs to one of ten or more @dfn{sections}, each
-named by a digit or by a digit and a letter. Sometimes there are
-multiple man pages with the same name in different sections. To read
-a man page from a specific section, type
-@samp{@var{topic}(@var{section})} or @samp{@var{section} @var{topic}}
-when @kbd{M-x manual-entry} prompts for the topic. For example, to
-read the man page for the C library function @code{chmod} (as opposed
-to a command of the same name), type @kbd{M-x manual-entry @key{RET}
-chmod(2) @key{RET}}. (@code{chmod} is a system call, so it is in
-section @samp{2}.)
+named by a digit or by a digit and a letter. Sometimes there are man
+pages with the same name in different sections. To read a man page
+from a specific section, type @samp{@var{topic}(@var{section})} or
+@samp{@var{section} @var{topic}} when @kbd{M-x manual-entry} prompts
+for the topic. For example, the man page for the C library function
+@code{chmod} is in section 2, but there is a shell command of the same
+name, whose man page is in section 1; to view the former, type
+@kbd{M-x manual-entry @key{RET} chmod(2) @key{RET}}.
@vindex Man-switches
- If you do not specify a section, the results depend on how the
-@code{man} program works on your system. Some of them display only
-the first man page they find. Others display all man pages that have
-the specified name, so you can move between them with the @kbd{M-n}
-and @kbd{M-p} keys@footnote{On some systems, the @code{man} program
-accepts a @samp{-a} command-line option which tells it to display all
-the man pages for the specified topic. If you want this behavior, you
-can add this option to the value of the variable @code{Man-switches}.}.
-The mode line shows how many manual pages are present in the Man buffer.
-
-@vindex Man-fontify-manpage-flag
- By default, Emacs highlights the text in man pages. For a long man
-page, highlighting can take substantial time. You can turn off
-highlighting of man pages by setting the variable
-@code{Man-fontify-manpage-flag} to @code{nil}.
-
-@findex Man-fontify-manpage
- If you insert the text of a man page into an Emacs buffer in some
-other fashion, you can use the command @kbd{M-x Man-fontify-manpage} to
-perform the same conversions that @kbd{M-x manual-entry} does.
+@kindex M-n @r{(Man mode)}
+@kindex M-p @r{(Man mode)}
+ If you do not specify a section, @kbd{M-x man} normally displays
+only the first man page found. On some systems, the @code{man}
+program accepts a @samp{-a} command-line option, which tells it to
+display all the man pages for the specified topic. To make use of
+this, change the value of the variable @code{Man-switches} to
+@samp{"-a"}. Then, in the Man mode buffer, you can type @kbd{M-n} and
+@kbd{M-p} to switch between man pages in different sections. The mode
+line shows how many manual pages are available.
@findex woman
@cindex manual pages, on MS-DOS/MS-Windows
An alternative way of reading manual pages is the @kbd{M-x woman}
-command@footnote{The name of the command, @code{woman}, is an acronym
-for ``w/o (without) man,'' since it doesn't use the @code{man}
-program.}. Unlike @kbd{M-x man}, it does not run any external
-programs to format and display the man pages; instead it does the job
-in Emacs Lisp, so it works on systems such as MS-Windows, where the
-@code{man} program (and other programs it uses) are not generally
-available.
-
- @kbd{M-x woman} prompts for a name of a manual page, and provides
-completion based on the list of manual pages that are installed on
-your machine; the list of available manual pages is computed
-automatically the first time you invoke @code{woman}. The word at
-point in the current buffer is used to suggest the default for the
-name of the manual page.
-
- With a numeric argument, @kbd{M-x woman} recomputes the list of the
-manual pages used for completion. This is useful if you add or delete
-manual pages.
+command. Unlike @kbd{M-x man}, it does not run any external programs
+to format and display the man pages; the formatting is done by Emacs,
+so it works on systems such as MS-Windows where the @command{man}
+program may be unavailable. It prompts for a man page, and displays
+it in a buffer named @samp{*WoMan @var{section} @var{topic}}.
+
+ @kbd{M-x woman} computes the completion list for manpages the first
+time you invoke the command. With a numeric argument, it recomputes
+this list; this is useful if you add or delete manual pages.
If you type a name of a manual page and @kbd{M-x woman} finds that
several 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
them.
For more information about setting up and using @kbd{M-x woman}, see
-@ref{Top, WoMan, Browse UN*X Manual Pages WithOut Man, woman, The WoMan
-Manual}.
+@ifinfo
+@ref{Top, WoMan, Browse UN*X Manual Pages WithOut Man, woman, The
+WoMan Manual}.
+@end ifinfo
+@ifnotinfo
+the WoMan Info manual, which is distributed with Emacs.
+@end ifnotinfo
@node Lisp Doc
@subsection Emacs Lisp Documentation Lookup
- As you edit Lisp code to be run in Emacs, you can use the commands
-@kbd{C-h f} (@code{describe-function}) and @kbd{C-h v}
-(@code{describe-variable}) to view documentation of functions and
-variables that you want to use. These commands use the minibuffer to
-read the name of a function or variable to document, and display the
-documentation in a window. Their default arguments are based on the
-code in the neighborhood of point. For @kbd{C-h f}, the default is
-the function called in the innermost list containing point. @kbd{C-h
-v} uses the symbol name around or adjacent to point as its default.
+ When editing Emacs Lisp code, you can use the commands @kbd{C-h f}
+(@code{describe-function}) and @kbd{C-h v} (@code{describe-variable})
+to view the built-in documentation for the Lisp functions and
+variables that you want to use. @xref{Name Help}.
@cindex Eldoc mode
@findex eldoc-mode
- A more automatic but less powerful method is Eldoc mode. This minor
-mode constantly displays in the echo area the argument list for the
-function being called at point. (In other words, it finds the
-function call that point is contained in, and displays the argument
-list of that function.) If point is over a documented variable, it
-shows the first line of the variable's docstring. Eldoc mode applies
-in Emacs Lisp and Lisp Interaction modes, and perhaps a few others
-that provide special support for looking up doc strings. Use the
-command @kbd{M-x eldoc-mode} to enable or disable this feature.
+ Eldoc is a buffer-local minor mode that helps with looking up Lisp
+documention. When it is enabled, the echo area displays some useful
+information whenever there is a Lisp function or variable at point;
+for a function, it shows the argument list, and for a variable it
+shows the first line of the variable's documentation string. To
+toggle Eldoc mode, type @kbd{M-x eldoc-mode}. Eldoc mode can be used
+with the Emacs Lisp and Lisp Interaction major modes.
@node Hideshow
@section Hideshow minor mode
+@cindex Hideshow mode
+@cindex mode, Hideshow
@findex hs-minor-mode
- Hideshow minor mode provides selective display of portions of a
-program, known as @dfn{blocks}. You can use @kbd{M-x hs-minor-mode}
-to enable or disable this mode, or add @code{hs-minor-mode} to the
-mode hook for certain major modes in order to enable it automatically
-for those modes.
+ Hideshow mode is a buffer-local minor mode that allows you to
+selectively display portions of a program, which are referred to as
+@dfn{blocks}. Type @kbd{M-x hs-minor-mode} to toggle this minor mode
+(@pxref{Minor Modes}).
+
+ When you use Hideshow mode to hide a block, the block disappears
+from the screen, to be replaced by an ellipsis (three periods in a
+row). Just what constitutes a block depends on the major mode. In C
+mode and related modes, blocks are delimited by braces, while in Lisp
+mode they are delimited by parentheses. Multi-line comments also
+count as blocks.
- Just what constitutes a block depends on the major mode. In C mode
-or C++ mode, they are delimited by braces, while in Lisp mode and
-similar modes they are delimited by parentheses. Multi-line comments
-also count as blocks.
+ Hideshow mode provides the following commands:
@findex hs-hide-all
@findex hs-hide-block
@@ -1285,11 +1246,11 @@ Show the current block (@code{hs-show-block}).
@item C-c @@ C-c
Either hide or show the current block (@code{hs-toggle-hiding}).
@item S-Mouse-2
-Either hide or show the block you click on (@code{hs-mouse-toggle-hiding}).
+Toggle hiding for the block you click on (@code{hs-mouse-toggle-hiding}).
@item C-c @@ C-M-h
Hide all top-level blocks (@code{hs-hide-all}).
@item C-c @@ C-M-s
-Show everything in the buffer (@code{hs-show-all}).
+Show all blocks in the buffer (@code{hs-show-all}).
@item C-c @@ C-l
Hide all blocks @var{n} levels below this block
(@code{hs-hide-level}).
@@ -1298,80 +1259,55 @@ Hide all blocks @var{n} levels below this block
@vindex hs-hide-comments-when-hiding-all
@vindex hs-isearch-open
@vindex hs-special-modes-alist
- These variables exist for customizing Hideshow mode.
+ These variables can be used to customize Hideshow mode:
@table @code
@item hs-hide-comments-when-hiding-all
-Non-@code{nil} says that @kbd{hs-hide-all} should hide comments too.
+If non-@code{nil}, @kbd{C-c @@ C-M-h} (@code{hs-hide-all}) hides
+comments too.
@item hs-isearch-open
-Specifies what kind of hidden blocks incremental search should make
-visible. The value should be one of these four symbols:
-
-@table @code
-@item code
-Open only code blocks.
-@item comment
-Open only comments.
-@item t
-Open both code blocks and comments.
-@item nil
-Open neither code blocks nor comments.
-@end table
-
-@item hs-special-modes-alist
-A list of elements, each specifying how to initialize Hideshow
-variables for one major mode. See the variable's documentation string
-for more information.
+This variable specifies the conditions under which incremental search
+should unhide a hidden block when matching text occurs within the
+block. Its value should be either @code{code} (unhide only code
+blocks), @code{comment} (unhide only comments), @code{t} (unhide both
+code blocks and comments), or @code{nil} (unhide neither code blocks
+nor comments). The default value is @code{code}.
@end table
@node Symbol Completion
@section Completion for Symbol Names
@cindex completion (symbol names)
- In Emacs, completion is something you normally do in the minibuffer
-(@pxref{Completion}). But one kind of completion is available in all
-buffers: completion for symbol names.
+ Completion is normally done in the minibuffer (@pxref{Completion}),
+but you can also complete symbol names in ordinary Emacs buffers.
@kindex M-TAB
- The character @kbd{M-@key{TAB}} runs a command to complete the
-partial symbol before point against the set of meaningful symbol
-names. This command inserts at point any additional characters that
-it can determine from the partial name.
-
- If your window manager defines @kbd{M-@key{TAB}} to switch windows,
-you can type @kbd{@key{ESC} @key{TAB}} or @kbd{C-M-i} instead.
-However, most window managers let you customize these shortcuts, so
-you can change any that interfere with the way you use Emacs.
-
- If the partial name in the buffer has multiple possible completions
-that differ in the very next character, so that it is impossible to
-complete even one more character, @kbd{M-@key{TAB}} displays a list of
-all possible completions in another window.
+@kindex C-M-i
+ In programming language modes, type @kbd{C-M-i} or @kbd{M-@key{TAB}}
+to complete the partial symbol before point. On graphical displays,
+the @kbd{M-@key{TAB}} key is usually reserved by the window manager
+for switching graphical windows, so you should type @kbd{C-M-i} or
+@kbd{@key{ESC} @key{TAB}} instead.
@cindex tags-based completion
-@cindex Info index completion
-@findex complete-symbol
- In most programming language major modes, @kbd{M-@key{TAB}} runs the
-command @code{complete-symbol}, which provides two kinds of completion.
-Normally it does completion based on a tags table (@pxref{Tags}); with a
-numeric argument (regardless of the value), it does completion based on
-the names listed in the Info file indexes for your language. Thus, to
-complete the name of a symbol defined in your own program, use
-@kbd{M-@key{TAB}} with no argument; to complete the name of a standard
-library function, use @kbd{C-u M-@key{TAB}}. Of course, Info-based
-completion works only if there is an Info file for the standard library
-functions of your language, and only if it is installed at your site.
-
+@findex completion-at-point
@cindex Lisp symbol completion
@cindex completion (Lisp symbols)
-@findex lisp-complete-symbol
- In Emacs-Lisp mode, the name space for completion normally consists of
-nontrivial symbols present in Emacs---those that have function
-definitions, values or properties. However, if there is an
-open-parenthesis immediately before the beginning of the partial symbol,
-only symbols with function definitions are considered as completions.
-The command which implements this is @code{lisp-complete-symbol}.
+ In most programming language modes, @kbd{C-M-i} (or
+@kbd{M-@key{TAB}}) invokes the command @code{completion-at-point},
+which generates its completion list in a flexible way. If Semantic
+mode is enabled, it tries to use the Semantic parser data for
+completion (@pxref{Semantic}). If Semantic mode is not enabled or
+fails at performing completion, it tries to complete using the
+selected tags table (@pxref{Tags}). If in Emacs Lisp mode, it
+performs completion using the function, variable, or property names
+defined in the current Emacs session.
+
+ In all other respects, in-buffer symbol completion behaves like
+minibuffer completion. For instance, if Emacs cannot complete to a
+unique symbol, it displays a list of completion alternatives in
+another window. @xref{Completion}.
In Text mode and related modes, @kbd{M-@key{TAB}} completes words
based on the spell-checker's dictionary. @xref{Spelling}.
@@ -1379,20 +1315,20 @@ based on the spell-checker's dictionary. @xref{Spelling}.
@node Glasses
@section Glasses minor mode
@cindex Glasses mode
-@cindex identifiers, making long ones readable
-@cindex StudlyCaps, making them readable
-@findex glasses-mode
-
- Glasses minor mode makes @samp{unreadableIdentifiersLikeThis}
-readable by altering the way they display. It knows two different
-ways to do this: by displaying underscores between a lower-case letter
-and the following capital letter, and by emboldening the capital
-letters. It does not alter the buffer text, only the way they
-display, so you can use it even on read-only buffers. You can use the
-command @kbd{M-x glasses-mode} to enable or disable the mode in the
-current buffer; you can also add @code{glasses-mode} to the mode hook
-of the programming language major modes in which you normally want
-to use Glasses mode.
+@cindex camel case
+@findex mode, Glasses
+
+ Glasses mode is a buffer-local minor mode that makes it easier to
+read mixed-case (or ``CamelCase'') symbols like
+@samp{unReadableSymbol}, by altering how they are displayed. By
+default, it displays extra underscores between each lower-case letter
+and the following capital letter. This does not alter the buffer
+text, only how it is displayed.
+
+ To toggle Glasses mode, type @kbd{M-x glasses-mode} (@pxref{Minor
+Modes}). When Glasses mode is enabled, the minor mode indicator
+@samp{o^o} appears in the mode line. For more information about
+Glasses mode, type @kbd{C-h P glasses @key{RET}}.
@node Semantic
@section Semantic
@@ -1400,23 +1336,24 @@ to use Glasses mode.
Semantic is a package that provides language-aware editing commands
based on @code{source code parsers}. This section provides a brief
-description of Semantic;
+description of Semantic; for full details,
@ifnottex
-for full details, see @ref{Top, Semantic,, semantic, Semantic}.
+see @ref{Top, Semantic,, semantic, Semantic}.
@end ifnottex
@iftex
-for full details, type @kbd{C-h i} (@code{info}) and then select the
-Semantic manual.
+see the Semantic Info manual, which is distributed with Emacs.
@end iftex
- Most of the ``language aware'' features in Emacs, such as font lock
-(@pxref{Font Lock}), rely on ``rules of thumb''@footnote{Regular
+ Most of the ``language aware'' features in Emacs, such as Font Lock
+mode (@pxref{Font Lock}), rely on ``rules of thumb''@footnote{Regular
expressions and syntax tables.} that usually give good results but are
never completely exact. In contrast, the parsers used by Semantic
have an exact understanding of programming language syntax. This
allows Semantic to provide search, navigation, and completion commands
that are powerful and precise.
+@cindex Semantic mode
+@cindex mode, Semantic
To begin using Semantic, type @kbd{M-x semantic-mode} or click on
the menu item named @samp{Source Code Parsers (Semantic)} in the
@samp{Tools} menu. This enables Semantic mode, a global minor mode.
@@ -1464,30 +1401,30 @@ is idle.
@node Misc for Programs
@section Other Features Useful for Editing Programs
- A number of Emacs commands that aren't designed specifically for
-editing programs are useful for that nonetheless.
+ Some Emacs commands that aren't designed specifically for editing
+programs are useful for that nonetheless.
The Emacs commands that operate on words, sentences and paragraphs
are useful for editing code. Most symbols names contain words
-(@pxref{Words}); sentences can be found in strings and comments
-(@pxref{Sentences}). Paragraphs in the strict sense can be found in
-program code (in long comments), but the paragraph commands are useful
-in other places too, because programming language major modes define
-paragraphs to begin and end at blank lines (@pxref{Paragraphs}).
-Judicious use of blank lines to make the program clearer will also
-provide useful chunks of text for the paragraph commands to work on.
-Auto Fill mode, if enabled in a programming language major mode,
-indents the new lines which it creates.
-
- The selective display feature is useful for looking at the overall
-structure of a function (@pxref{Selective Display}). This feature
-hides the lines that are indented more than a specified amount.
-Programming modes often support Outline minor mode (@pxref{Outline
-Mode}). The Foldout package provides folding-editor features
-(@pxref{Foldout}).
-
+(@pxref{Words}), while sentences can be found in strings and comments
+(@pxref{Sentences}). As for paragraphs, they are defined in most
+programming language modes to begin and end at blank lines
+(@pxref{Paragraphs}). Therefore, judicious use of blank lines to make
+the program clearer will also provide useful chunks of text for the
+paragraph commands to work on. Auto Fill mode, if enabled in a
+programming language major mode, indents the new lines which it
+creates.
+
+ Apart from Hideshow mode (@pxref{Hideshow}), another way to
+selectively display parts of a program is to use the selective display
+feature (@pxref{Selective Display}). Programming modes often also
+support Outline minor mode (@pxref{Outline Mode}), which can be used
+with the Foldout package (@pxref{Foldout}).
+
+@ifinfo
The ``automatic typing'' features may be useful for writing programs.
@xref{Top,,Autotyping, autotype, Autotyping}.
+@end ifinfo
@node C Modes
@section C and Related Modes
@@ -1509,9 +1446,14 @@ Mode}). The Foldout package provides folding-editor features
This section gives a brief description of the special features
available in C, C++, Objective-C, Java, CORBA IDL, Pike and AWK modes.
-(These are called ``C mode and related modes.'') @xref{Top, , CC Mode,
-ccmode, CC Mode}, for a more extensive description of these modes
-and their special features.
+(These are called ``C mode and related modes.'')
+@ifinfo
+@xref{Top,, CC Mode, ccmode, CC Mode}, for more details.
+@end ifinfo
+@ifnotinfo
+For more details, see the CC mode Info manual, which is distributed
+with Emacs.
+@end ifnotinfo
@menu
* Motion in C:: Commands to move by C statements, etc.
@@ -1528,17 +1470,17 @@ and their special features.
related modes.
@table @code
-@item M-x c-beginning-of-defun
-@itemx M-x c-end-of-defun
+@item C-M-a
+@itemx C-M-e
@findex c-beginning-of-defun
@findex c-end-of-defun
Move point to the beginning or end of the current function or
-top-level definition. These are found by searching for the least
+top-level definition. In languages with enclosing scopes (such as
+C++'s classes) the @dfn{current function} is the immediate one,
+possibly inside a scope. Otherwise it is the one defined by the least
enclosing braces. (By contrast, @code{beginning-of-defun} and
-@code{end-of-defun} search for braces in column zero.) If you are
-editing code where the opening brace of a function isn't placed in
-column zero, you may wish to bind @code{C-M-a} and @code{C-M-e} to
-these commands. @xref{Moving by Defuns}.
+@code{end-of-defun} search for braces in column zero.) @xref{Moving
+by Defuns}.
@item C-c C-u
@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,''
command line syntax and the same basic subset of options. However, the
Mailutils version offers additional features.
- The Emacs version of @code{movemail} is able to retrieve mail from the
-usual UNIX mailbox formats and from remote mailboxes using the POP3
-protocol.
+ The Emacs version of @code{movemail} is able to retrieve mail from
+the usual Unix mailbox formats and from remote mailboxes using the
+POP3 protocol.
The Mailutils version is able to handle a wide set of mailbox
-formats, such as plain UNIX mailboxes, @code{maildir} and @code{MH}
-mailboxes, etc. It is able to access remote mailboxes using the POP3 or
-IMAP4 protocol, and can retrieve mail from them using a TLS encrypted
-channel. It also accepts mailbox arguments in @acronym{URL} form.
-The detailed description of mailbox @acronym{URL}s can be found in
-@ref{URL,,,mailutils,Mailbox URL Formats}. In short, a @acronym{URL} is:
+formats, such as plain Unix mailboxes, @code{maildir} and @code{MH}
+mailboxes, etc. It is able to access remote mailboxes using the POP3
+or IMAP4 protocol, and can retrieve mail from them using a TLS
+encrypted channel. It also accepts mailbox arguments in @acronym{URL}
+form. The detailed description of mailbox @acronym{URL}s can be found
+in @ref{URL,,,mailutils,Mailbox URL Formats}. In short, a
+@acronym{URL} is:
@smallexample
@var{proto}://[@var{user}[:@var{password}]@@]@var{host-or-file-name}
@@ -1381,9 +1382,9 @@ local mailbox.
@table @code
@item mbox
-Usual UNIX mailbox format. In this case, neither @var{user} nor
-@var{pass} are used, and @var{host-or-file-name} denotes the file name of
-the mailbox file, e.g., @code{mbox://var/spool/mail/smith}.
+Usual Unix mailbox format. In this case, neither @var{user} nor
+@var{pass} are used, and @var{host-or-file-name} denotes the file name
+of the mailbox file, e.g., @code{mbox://var/spool/mail/smith}.
@item mh
A 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}.
@section Retrieving Mail from Local Mailboxes in Various Formats
If your incoming mail is stored on a local machine in a format other
-than UNIX mailbox, you will need the Mailutils @code{movemail} to
+than Unix mailbox, you will need the Mailutils @code{movemail} to
retrieve it. @xref{Movemail}, for the detailed description of
@code{movemail} versions. For example, to access mail from a inbox in
@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.
the file contains ordinary text, use Text mode, which customizes Emacs
in small ways for the syntactic conventions of text. Outline mode
provides special commands for operating on text with an outline
-structure.
+structure. Org mode extends Outline mode and turn Emacs into a
+full-fledged organizer: you can manage TODO lists, store notes and
+publish them in many formats.
+
@iftex
@xref{Outline Mode}.
@end iftex
@@ -32,9 +35,14 @@ structure.
@findex nxml-mode
Emacs has other major modes for text which contains ``embedded''
commands, such as @TeX{} and La@TeX{} (@pxref{TeX Mode}); HTML and
-SGML (@pxref{HTML Mode}); XML (@pxref{Top,The nXML Mode
-Manual,,nxml-mode, nXML Mode}); and Groff and Nroff (@pxref{Nroff
-Mode}).
+SGML (@pxref{HTML Mode}); XML
+@ifinfo
+(@pxref{Top,The nXML Mode Manual,,nxml-mode, nXML Mode});
+@end ifinfo
+@ifnotinfo
+(see the nXML mode Info manual, which is distributed with Emacs);
+@end ifnotinfo
+and Groff and Nroff (@pxref{Nroff Mode}).
@cindex ASCII art
If you need to edit pictures made out of text characters (commonly
@@ -65,6 +73,7 @@ for editing such pictures.
* Case:: Changing the case of text.
* Text Mode:: The major modes for editing text files.
* Outline Mode:: Editing outlines.
+* Org Mode:: The Emacs organizer.
* TeX Mode:: Editing input to the formatter TeX.
* HTML Mode:: Editing HTML and SGML files.
* Nroff Mode:: Editing input to the formatter nroff.
@@ -1245,6 +1254,143 @@ automatically by putting this in your init file (@pxref{Init File}):
(eval-after-load "outline" '(require 'foldout))
@end example
+@node Org Mode
+@section Org Mode
+@kindex TAB @r{(Org Mode)}
+@kindex S-TAB @r{(Org Mode)}
+@cindex organizer
+@cindex planner
+@findex org-mode
+@cindex fold
+@cindex headline
+@kindex M-<up> @r{(Org Mode)}
+@kindex M-<down> @r{(Org Mode)}
+@kindex M-<left> @r{(Org Mode)}
+@kindex M-<right> @r{(Org Mode)}
+@kindex S-M-<up> @r{(Org Mode)}
+@kindex S-M-<down> @r{(Org Mode)}
+@kindex S-M-<left> @r{(Org Mode)}
+@kindex S-M-<right> @r{(Org Mode)}
+
+Org mode extends Outline mode to turn Emacs into an organizer and an
+authoring system.
+
+When editing a file ending with the @file{.org} extension, Emacs
+automatically uses @code{org-mode} as the major mode. In this mode,
+headlines start with one (or more) leading star(s) and comments start
+with the @code{#} character at the beginning of a line.
+
+@example
+* This is the first headline
+** This is a first sub-headline
+* This is the second headline
+
+Some content here.
+
+# Some comment here.
+@end example
+
+From here, you can use Org mode as a simple outliner: @key{TAB} on a
+headline will cycle through the various folding states of a subtree,
+and @key{S-TAB} anywhere in the buffer will (un)fold the whole
+structure.
+
+You can also manipulate the structure of your document by moving a
+headline up and down with @key{M-<up>} and @key{M-<down>}, or by
+promoting and demoting a headline with @key{M-<left>} and
+@key{M-<left>}. If you want to act on the whole subtree (i.e. the
+headline and its content, including other headlines), simply add the
+@kbd{Shift} key and use @key{S-M-<up>}, @key{S-M-<down>},
+@key{S-M-<left>} and @key{S-M-<right>}.
+
+For further details, see @ref{Document Structure,,,org, The Org Manual}.
+
+@menu
+* Org as an organizer:: Manage TODO lists and agendas
+* Org as an authoring system:: Export to various formats
+@end menu
+
+@node Org as an organizer
+@subsection Org as an organizer
+
+@cindex TODO keywords
+@kindex C-c C-t @r{(Org Mode)}
+@kindex C-c C-s @r{(Org Mode)}
+@kindex C-c C-d @r{(Org Mode)}
+@vindex org-todo-keywords
+@findex org-todo
+@findex org-agenda
+@cindex scheduled
+@cindex deadline
+@cindex agenda
+
+Each headline can be turned into a TODO item calling @code{org-todo}
+with @key{C-c C-t} anywhere on it. This will add the TODO keyword
+@code{TODO}. Hit @key{C-c C-t} to cycle through the list of available
+TODO keywords: you can configure the variable @code{org-todo-keywords}
+to use your own list of keywords.
+
+Now that you have something to do, let's add a date to it: pressing
+@key{C-c C-s} on a headline will add @code{SCHEDULED} below it, and
+you will be prompted for a date through the calendar. @key{C-c C-d}
+has the same effect, except that the item will have a @code{DEADLINE}
+instead.
+
+Now that some TODO items are planned in the current file, add it to
+the list of agenda files with @key{C-c [}. Calling the interactive
+command @code{org-agenda} will prompt you for what you want to see: a
+list of things to do this week, a list of TODO items with specific
+keywords, etc.
+
+For further details, see @ref{TODO items,,,org, The Org Manual} and
+@ref{Dates and times,,,org, The Org Manual}.
+
+@node Org as an authoring system
+@subsection Org as an authoring system
+@cindex export
+@findex org-export
+@cindex publish
+@cindex code block
+@cindex quote
+
+You may want to format your Org notes nicely and to prepare them for
+export and publication. Org supports simple text formatting:
+
+@example
+- This text is /emphasized/
+- This item uses *a bold font*
+- This text is _underlined_
+- This text uses =a teletype font=
+@end example
+
+If a paragraph is a quote or an example, you can use specific
+environments:
+
+@example
+#+begin_quote
+``This is a quote.''
+#+end_quote
+
+#+begin_example
+This is an example.
+#+end_example
+@end example
+
+These environments will be displayed in a specific way with respect
+to the selected export/publish backend.
+
+To export the current buffer, press the @key{C-c C-e} key anywhere in
+an Org buffer. Supported export formats include @code{HTML}, La@TeX{}
+and @file{.odt} (OpenDocument format.) Depending on your system
+installation, you can also directly export to @code{pdf}.
+
+To export several files at once to a specific directory either locally
+or on the Internet, you will need to define a list of projects through
+the variable @code{org-publish-project-alist}.
+
+For further details, see @ref{Exporting,,,org, The Org Manual} and
+@ref{Publishing,,,org, The Org Manual}.
+
@node TeX Mode
@section @TeX{} Mode
@cindex @TeX{} mode
@@ -1298,8 +1444,8 @@ more information, see the documentation string for the command
@code{bibtex-mode}.
@item
-The Ref@TeX{} package provides a minor mode which can be used in
-conjunction with La@TeX{} mode to manage bibliographic references.
+The Ref@TeX{} package provides a minor mode which can be used with
+La@TeX{} mode to manage bibliographic references.
@ifinfo
@xref{Top,The Ref@TeX{} Manual,,reftex}.
@end ifinfo
@@ -1764,8 +1910,15 @@ xml-mode}. Emacs uses nXML mode for files which have the extension
@file{.xml}. For XHTML files, which have the extension @file{.xhtml},
Emacs uses HTML mode by default; you can make it use nXML mode by
customizing the variable @code{auto-mode-alist} (@pxref{Choosing
-Modes}). nXML mode is described in its own manual: @xref{Top, nXML
+Modes}).
+@ifinfo
+nXML mode is described in its own manual: @xref{Top, nXML
Mode,,nxml-mode, nXML Mode}.
+@end ifinfo
+@ifnotinfo
+nXML mode is described in an Info manual, which is distributed with
+Emacs.
+@end ifnotinfo
@vindex sgml-xml-mode
You may choose to use the less powerful SGML mode for editing XML,
@@ -1781,13 +1934,16 @@ always insert explicit closing tags as well.
@cindex nroff
@findex nroff-mode
- Nroff mode is a mode like Text mode but modified to handle nroff commands
-present in the text. Invoke @kbd{M-x nroff-mode} to enter this mode. It
-differs from Text mode in only a few ways. All nroff command lines are
-considered paragraph separators, so that filling will never garble the
-nroff commands. Pages are separated by @samp{.bp} commands. Comments
-start with backslash-doublequote. Also, three special commands are
-provided that are not in Text mode:
+@vindex nroff-mode-hook
+ Nroff mode is a major mode derived from Text mode, which is
+specialized for editing nroff files (e.g.@: Unix man pages). Type
+@kbd{M-x nroff-mode} to enter this mode. Entering Nroff mode runs the
+hook @code{text-mode-hook}, followed by @code{nroff-mode-hook}
+(@pxref{Hooks}).
+
+ In Nroff mode, nroff command lines are treated as paragraph
+separators, pages are separated by @samp{.bp} commands, and comments
+start with backslash-doublequote. It also defines these commands:
@findex forward-text-line
@findex backward-text-line
@@ -1807,23 +1963,16 @@ nroff commands) in the region (@code{count-text-lines}).
@end table
@findex electric-nroff-mode
- The other feature of Nroff mode is that you can turn on Electric Nroff
-mode. This is a minor mode that you can turn on or off with @kbd{M-x
+ Electric Nroff mode is a buffer-local minor mode that can be used
+with Nroff mode. To toggle this minor mode, type @kbd{M-x
electric-nroff-mode} (@pxref{Minor Modes}). When the mode is on, each
-time you use @key{RET} to end a line that contains an nroff command that
-opens a kind of grouping, the matching nroff command to close that
-grouping is automatically inserted on the following line. For example,
-if you are at the beginning of a line and type @kbd{.@: ( b @key{RET}},
-this inserts the matching command @samp{.)b} on a new line following
-point.
+time you type @key{RET} to end a line containing an nroff command that
+opens a kind of grouping, the nroff command to close that grouping is
+automatically inserted on the following line.
- If you use Outline minor mode with Nroff mode (@pxref{Outline Mode}),
-heading lines are lines of the form @samp{.H} followed by a number (the
-header level).
-
-@vindex nroff-mode-hook
- Entering Nroff mode runs the hook @code{text-mode-hook}, followed by
-the hook @code{nroff-mode-hook} (@pxref{Hooks}).
+ If you use Outline minor mode with Nroff mode (@pxref{Outline
+Mode}), heading lines are lines of the form @samp{.H} followed by a
+number (the header level).
@node Enriched Text
@section Enriched Text
@@ -2149,18 +2298,16 @@ hides text), and @code{intangible} (which disallows moving point
within the text). The @samp{Remove Special} menu item removes all of
these special properties from the text in the region.
- The @code{invisible} and @code{intangible} properties are @emph{not}
-saved in the text/enriched format. The @code{read-only} property is
-saved, but it is not a standard part of the text/enriched format, so
-other editors may not respect it.
+ The @code{invisible} and @code{intangible} properties are not saved
+in the @samp{text/enriched} format.
@node Text Based Tables
@section Editing Text-based Tables
@cindex table mode
@cindex text-based tables
- Table mode provides an easy and intuitive way to create and edit
-text-based tables. Here is an example of such a table:
+ The @code{table} package provides commands to easily edit text-based
+tables. Here is an example of what such a table looks like:
@smallexample
@group
@@ -2170,27 +2317,23 @@ text-based tables. Here is an example of such a table:
| forward-char |Move point right N characters | C-f |
| |(left if N is negative). | |
| | | |
-| |On reaching end of buffer, stop | |
-| |and signal error. | |
+-----------------+--------------------------------+-----------------+
| backward-char |Move point left N characters | C-b |
| |(right if N is negative). | |
| | | |
-| |On attempt to pass beginning or | |
-| |end of buffer, stop and signal | |
-| |error. | |
+-----------------+--------------------------------+-----------------+
@end group
@end smallexample
- Table mode allows the contents of the table such as this one to be
-easily manipulated by inserting or deleting characters inside a cell.
-A cell is effectively a localized rectangular edit region and edits to
-a cell do not affect the contents of the surrounding cells. If the
-contents do not fit into a cell, then the cell is automatically
-expanded in the vertical and/or horizontal directions and the rest of
-the table is restructured and reformatted in accordance with the
-growth of the cell.
+ When Emacs recognizes such a stretch of text as a table
+(@pxref{Table Recognition}), editing the contents of each table cell
+will automatically resize the table, whenever the contents become too
+large to fit in the cell. You can use the commands defined in the
+following sections for navigating and editing the table layout.
+
+@findex table-fixed-width-mode
+ To toggle the automatic table resizing feature, type @kbd{M-x
+table-fixed-width-mode}.
@menu
* Table Definition:: What is a text based table.
@@ -2198,102 +2341,87 @@ growth of the cell.
* Table Recognition:: How to activate and deactivate tables.
* Cell Commands:: Cell-oriented commands in a table.
* Cell Justification:: Justifying cell contents.
-* Row Commands:: Manipulating rows of table cell.
-* Column Commands:: Manipulating columns of table cell.
-* Fixed Width Mode:: Fixing cell width.
+* Table Rows and Columns:: Inserting and deleting rows and columns.
* Table Conversion:: Converting between plain text and tables.
-* Measuring Tables:: Analyzing table dimension.
* Table Misc:: Table miscellany.
@end menu
@node Table Definition
@subsection What is a Text-based Table?
+@cindex cells, for text-based tables
- Keep the following examples of valid tables in mind as a reference
-while you read this section:
-
-@example
- +--+----+---+ +-+ +--+-----+
- | | | | | | | | |
- +--+----+---+ +-+ | +--+--+
- | | | | | | | |
- +--+----+---+ +--+--+ |
- | | |
- +-----+--+
-@end example
-
- A table consists of a rectangular frame whose inside is divided into
-cells. Each cell must be at least one character wide and one
-character high, not counting its border lines. A cell can be
-subdivided into multiple rectangular cells, but cells cannot overlap.
+ A @dfn{table} consists of a rectangular text area which is divided
+into @dfn{cells}. Each cell must be at least one character wide and
+one character high, not counting its border lines. A cell can be
+subdivided into more cells, but they cannot overlap.
- The table frame and cell border lines are made of three special
-characters. These variables specify those characters:
+ Cell border lines are drawn with three special characters, specified
+by the following variables:
@table @code
@vindex table-cell-vertical-char
@item table-cell-vertical-char
-Holds the character used for vertical lines. The default value is
-@samp{|}.
+The character used for vertical lines. The default is @samp{|}.
@vindex table-cell-horizontal-chars
@item table-cell-horizontal-chars
-Holds the characters used for horizontal lines. The default value is
-@samp{"-="}.
+The characters used for horizontal lines. The default is @samp{"-="}.
@vindex table-cell-intersection-char
@item table-cell-intersection-char
-Holds the character used at where horizontal line and vertical line
-meet. The default value is @samp{+}.
+The character used for the intersection of horizontal and vertical
+lines. The default is @samp{+}.
@end table
@noindent
-Based on this definition, the following five tables are examples of invalid
-tables:
+The following are examples of @emph{invalid} tables:
@example
- +-----+ +-----+ +--+ +-++--+ ++
- | | | | | | | || | ++
- | +-+ | | | | | | || |
- | | | | +--+ | +--+--+ +-++--+
- | +-+ | | | | | | | +-++--+
- | | | | | | | | | || |
- +-----+ +--+--+ +--+--+ +-++--+
- a b c d e
+ +-----+ +--+ +-++--+
+ | | | | | || |
+ | | | | | || |
+ +--+ | +--+--+ +-++--+
+ | | | | | | +-++--+
+ | | | | | | | || |
+ +--+--+ +--+--+ +-++--+
+ a b c
@end example
+@noindent
From left to right:
@enumerate a
@item
Overlapped cells or non-rectangular cells are not allowed.
@item
-Same as a.
-@item
The border must be rectangular.
@item
Cells must have a minimum width/height of one character.
-@item
-Same as d.
@end enumerate
@node Table Creation
-@subsection How to Create a Table?
+@subsection Creating a Table
@cindex create a text-based table
@cindex table creation
@findex table-insert
- The command to create a table is @code{table-insert}. When called
-interactively, it asks for the number of columns, number of rows, cell
-width and cell height. The number of columns is the number of cells
-horizontally side by side. The number of rows is the number of cells
-vertically within the table's height. The cell width is a number of
-characters that each cell holds, left to right. The cell height is a
-number of lines each cell holds. The cell width and the cell height
-can be either an integer (when the value is constant across the table)
-or a series of integer, separated by spaces or commas, where each
-number corresponds to the next cell within a row from left to right,
-or the next cell within a column from top to bottom.
+ To create a text-based table from scratch, type @kbd{M-x
+table-insert}. This command prompts for the number of table columns,
+the number of table rows, cell width and cell height. The cell width
+and cell height do not include the cell borders; each can be specified
+as a single integer (which means each cell is given the same
+width/height), or as a sequence of integers separated by spaces or
+commas (which specify the width/height of the individual table
+columns/rows, counting from left to right for table columns and from
+top to bottom for table rows). The specified table is then inserted
+at point.
+
+ The table inserted by @kbd{M-x table-insert} contains special text
+properties, which tell Emacs to treat it specially as a text-based
+table. If you save the buffer to a file and visit it again later,
+those properties are lost, and the table appears to Emacs as an
+ordinary piece of text. See the next section, for how to convert it
+back into a table.
@node Table Recognition
@subsection Table Recognition
@@ -2301,103 +2429,97 @@ or the next cell within a column from top to bottom.
@findex table-recognize
@findex table-unrecognize
- Table mode maintains special text properties in the buffer to allow
-editing in a convenient fashion. When a buffer with tables is saved
-to its file, these text properties are lost, so when you visit this
-file again later, Emacs does not see a table, but just formatted text.
-To resurrect the table text properties, issue the @kbd{M-x
-table-recognize} command. It scans the current buffer, recognizes
-valid table cells, and attaches appropriate text properties to allow
-for table editing. The converse command, @code{table-unrecognize}, is
-used to remove the special text properties and convert the buffer back
-to plain text.
-
- Special commands exist to enable or disable tables within a region,
-enable or disable individual tables, and enable/disable individual
-cells. These commands are:
+ Existing text-based tables in a buffer, which lack the special text
+properties applied by @kbd{M-x table-insert}, are not treated
+specially as tables. To apply those text properties, type @kbd{M-x
+table-recognize}. This command scans the current buffer,
+@dfn{recognizes} valid table cells, and applies the relevant text
+properties. Conversely, type @kbd{M-x table-unrecognize} to
+@dfn{unrecognize} all tables in the current buffer, removing the
+special text properties and converting tables back to plain text.
+
+ You can also use the following commands to selectively recognize or
+unrecognize tables:
@table @kbd
@findex table-recognize-region
@item M-x table-recognize-region
-Recognize tables within the current region and activate them.
+Recognize tables within the current region.
+
@findex table-unrecognize-region
@item M-x table-unrecognize-region
-Deactivate tables within the current region.
+Unrecognize tables within the current region.
+
@findex table-recognize-table
@item M-x table-recognize-table
Recognize the table at point and activate it.
+
@findex table-unrecognize-table
@item M-x table-unrecognize-table
Deactivate the table at point.
+
@findex table-recognize-cell
@item M-x table-recognize-cell
Recognize the cell at point and activate it.
+
@findex table-unrecognize-cell
@item M-x table-unrecognize-cell
Deactivate the cell at point.
@end table
- For another way of converting text into tables, see @ref{Table
-Conversion}.
+ @xref{Table Conversion}, for another way to recognize a table.
@node Cell Commands
@subsection Commands for Table Cells
@findex table-forward-cell
@findex table-backward-cell
- The commands @code{table-forward-cell} and
-@code{table-backward-cell} move point from the current cell to an
-adjacent cell forward and backward respectively. The order of the
-cells is cyclic: when point is in the last cell of a table, typing
-@kbd{M-x table-forward-cell} moves to the first cell in the table.
-Likewise @kbd{M-x table-backward-cell} from the first cell in a table
-moves to the last cell.
+ The commands @kbd{M-x table-forward-cell} and @kbd{M-x
+table-backward-cell} move point from the current cell to an adjacent
+cell. The order is cyclic: when point is in the last cell of a table,
+@kbd{M-x table-forward-cell} moves to the first cell. Likewise, when
+point is on the first cell, @kbd{M-x table-backward-cell} moves to the
+last cell.
@findex table-span-cell
- The command @code{table-span-cell} merges the current cell with the
-adjacent cell in a specified direction---right, left, above or below.
-You specify the direction with the minibuffer. It does not allow
-merges which don't result in a legitimate cell layout.
+ @kbd{M-x table-span-cell} prompts for a direction---right, left,
+above, or below---and merges the current cell with the adjacent cell
+in that direction. This command signals an error if the merge would
+result in an illegitimate cell layout.
@findex table-split-cell
-@cindex text-based tables, split a cell
-@cindex split table cell
- The command @code{table-split-cell} splits the current cell
-vertically or horizontally. This command is a wrapper to the
-direction specific commands @code{table-split-cell-vertically} and
-@code{table-split-cell-horizontally}. You specify the direction with
-a minibuffer argument.
-
@findex table-split-cell-vertically
- The command @code{table-split-cell-vertically} splits the current
-cell vertically and creates a pair of cells above and below where
-point is located. The content in the original cell is split as well.
-
@findex table-split-cell-horizontally
- The command @code{table-split-cell-horizontally} splits the current
-cell horizontally and creates a pair of cells right and left of where
-point is located. If the cell being split is not empty, this asks you
-how to handle the cell contents. The three options are: @code{split},
-@code{left}, or @code{right}. @code{split} splits the contents at
-point literally, while the @code{left} and @code{right} options move
-the entire contents into the left or right cell respectively.
-
-@cindex enlarge a table cell
-@cindex shrink a table cell
- The next four commands enlarge or shrink a cell. They use numeric
-arguments (@pxref{Arguments}) to specify how many columns or rows to
-enlarge or shrink a particular table.
+@cindex text-based tables, splitting cells
+@cindex splitting table cells
+ @kbd{M-x table-split-cell} splits the current cell vertically or
+horizontally, prompting for the direction with the minibuffer. The
+commands @kbd{M-x table-split-cell-vertically} and @kbd{M-x
+table-split-cell-horizontally} split in a specific direction. When
+splitting vertically, the old cell contents are automatically split
+between the two new cells. When splitting horizontally, you are
+prompted for how to divide the cell contents, if the cell is
+non-empty; the options are @samp{split} (divide the contents at
+point), @samp{left} (put all the contents in the left cell), and
+@samp{right} (put all the contents in the right cell).
+
+ The following commands enlarge or shrink a cell. By default, they
+resize by one row or column; if a numeric argument is supplied, that
+specifies the number of rows or columns to resize by.
@table @kbd
@findex table-heighten-cell
@item M-x table-heighten-cell
Enlarge the current cell vertically.
+
@findex table-shorten-cell
@item M-x table-shorten-cell
Shrink the current cell vertically.
+
@findex table-widen-cell
@item M-x table-widen-cell
Enlarge the current cell horizontally.
+
@findex table-narrow-cell
@item M-x table-narrow-cell
Shrink the current cell horizontally.
@@ -2405,107 +2527,76 @@ Shrink the current cell horizontally.
@node Cell Justification
@subsection Cell Justification
-@cindex cell text justification
+@cindex justification in text-based tables
- You can specify text justification for each cell. The justification
-is remembered independently for each cell and the subsequent editing
-of cell contents is subject to the specified justification.
+ The command @kbd{M-x table-justify} imposes @dfn{justification} on
+one or more cells in a text-based table. Justification determines how
+the text in the cell is aligned, relative to the edges of the cell.
+Each cell in a table can be separately justified.
@findex table-justify
- The command @code{table-justify} ask you to specify what to justify:
-a cell, a column, or a row. If you select cell justification, this
-command sets the justification only for the current cell. Selecting
-column or row justification sets the justification for all the cells
-within a column or row respectively. The command then ask you which
-kind of justification to apply: @code{left}, @code{center},
-@code{right}, @code{top}, @code{middle}, @code{bottom}, or
-@code{none}. Horizontal justification and vertical justification are
-specified independently. The options @code{left}, @code{center}, and
-@code{right} specify horizontal justification while the options
-@code{top}, @code{middle}, @code{bottom}, and @code{none} specify
-vertical justification. The vertical justification @code{none}
-effectively removes vertical justification. Horizontal justification
-must be one of @code{left}, @code{center}, or @code{right}.
+ @kbd{M-x table-justify} first prompts for what to justify; the
+options are @samp{cell} (just the current cell), @samp{column} (all
+cells in the current table column) and @samp{row} (all cells in the
+current table row). The command then prompts for the justification
+style; the options are @code{left}, @code{center}, @code{right},
+@code{top}, @code{middle}, @code{bottom}, or @code{none} (meaning no
+vertical justification).
+
+ Horizontal and vertical justification styles are specified
+independently, and both types can be in effect simultaneously; for
+instance, you can call @kbd{M-x table-justify} twice, once to specify
+@code{right} justification and once to specify @code{bottom}
+justification, to align the contents of a cell to the bottom right.
@vindex table-detect-cell-alignment
- Justification information is stored in the buffer as a part of text
-property. Therefore, this information is ephemeral and does not
-survive through the loss of the buffer (closing the buffer and
-revisiting the buffer erase any previous text properties). To
-countermand for this, the command @code{table-recognize} and other
-recognition commands (@pxref{Table Recognition}) are equipped with a
-convenience feature (turned on by default). During table recognition,
-the contents of a cell are examined to determine which justification
-was originally applied to the cell and then applies this justification
-to the cell. This is a speculative algorithm and is therefore not
-perfect, however, the justification is deduced correctly most of the
-time. To disable this feature, customize the variable
-@code{table-detect-cell-alignment} and set it to @code{nil}.
-
-@node Row Commands
-@subsection Commands for Table Rows
-@cindex table row commands
-
-@cindex insert row in table
+ The justification style is stored in the buffer as a text property,
+and is lost when you kill the buffer or exit Emacs. However, the
+table recognition commands, such as @kbd{M-x table-recognize}
+(@pxref{Table Recognition}), attempt to determine and re-apply each
+cell's justification style, by examining its contents. To disable
+this feature, change the variable @code{table-detect-cell-alignment}
+to @code{nil}.
+
+@node Table Rows and Columns
+@subsection Table Rows and Columns
+@cindex inserting rows and columns in text-based tables
+
@findex table-insert-row
- The command @code{table-insert-row} inserts a row of cells before
-the current row in a table. The current row where point is located is
-pushed down after the newly inserted row. A numeric prefix argument
-specifies the number of rows to insert. Note that in order to insert
-rows @emph{after} the last row at the bottom of a table, you must
-place point below the table---that is, outside the table---prior to
-invoking this command.
-
-@cindex delete row in table
-@findex table-delete-row
- The command @code{table-delete-row} deletes a row of cells at point.
-A numeric prefix argument specifies the number of rows to delete.
-
-@node Column Commands
-@subsection Commands for Table Columns
-@cindex table column commands
-
-@cindex insert column in table
-@findex table-insert-column
- The command @code{table-insert-column} inserts a column of cells to
-the left of the current row in a table. This pushes the current
-column to the right. To insert a column to the right side of the
-rightmost column, place point to the right of the rightmost column,
-which is outside of the table, prior to invoking this command. A
-numeric prefix argument specifies the number of columns to insert.
-
-@cindex delete column in table
- A command @code{table-delete-column} deletes a column of cells at
-point. A numeric prefix argument specifies the number of columns to
-delete.
-
-@node Fixed Width Mode
-@subsection Fix Width of Cells
-@cindex fix width of table cells
+ @kbd{M-x table-insert-row} inserts a row of cells before the current
+table row. The current row, together with point, is pushed down past
+the new row. To insert rows after the last row at the bottom of a
+table, invoke this command with point below the table, just below the
+bottom edge. A numeric prefix argument specifies the number of rows
+to insert.
-@findex table-fixed-width-mode
- The command @code{table-fixed-width-mode} toggles fixed width mode
-on and off. When fixed width mode is turned on, editing inside a
-cell never changes the cell width; when it is off, the cell width
-expands automatically in order to prevent a word from being folded
-into multiple lines. By default, fixed width mode is disabled.
+@findex table-insert-column
+ Similarly, @kbd{M-x table-insert-column} inserts a column of cells
+to the left of the current table column. To insert a column to the
+right side of the rightmost column, invoke this command with point to
+the right of the rightmost column, outside the table. A numeric
+prefix argument specifies the number of columns to insert.
+
+@cindex deleting rows and column in text-based tables
+ @kbd{M-x table-delete-column} deletes the column of cells at point.
+Similarly, @kbd{M-x table-delete-row} deletes the row of cells at
+point. A numeric prefix argument to either command specifies the
+number of columns or rows to delete.
@node Table Conversion
-@subsection Conversion Between Plain Text and Tables
+@subsection Converting Between Plain Text and Tables
@cindex text to table
@cindex table to text
@findex table-capture
- The command @code{table-capture} captures plain text in a region and
-turns it into a table. Unlike @code{table-recognize} (@pxref{Table
-Recognition}), the original text does not have a table appearance but
-may hold a logical table structure. For example, some elements
-separated by known patterns form a two dimensional structure which can
-be turned into a table.
+ The command @kbd{M-x table-capture} captures plain text in a region
+and turns it into a table. Unlike @kbd{M-x table-recognize}
+(@pxref{Table Recognition}), the original text does not need to have a
+table appearance; it only needs to have a logical table-like
+structure.
- Here's an example of data that @code{table-capture} can operate on.
-The numbers are horizontally separated by a comma and vertically
-separated by a newline character.
+ For example, suppose we have the following numbers, which are
+divided into three lines and separated horizontally by commas:
@example
1, 2, 3, 4
@@ -2526,136 +2617,92 @@ Invoking @kbd{M-x table-capture} on that text produces this table:
+-----+-----+-----+-----+
@end example
-@noindent
-The conversion uses @samp{,} for the column delimiter and newline for
-a row delimiter, cells are left justified, and minimum cell width is
-5.
-
@findex table-release
- The command @code{table-release} does the opposite of
-@code{table-capture}. It releases a table by removing the table frame
-and cell borders. This leaves the table contents as plain text. One
-of the useful applications of @code{table-capture} and
-@code{table-release} is to edit a text in layout. Look at the
-following three paragraphs (the latter two are indented with header
-lines):
+ @kbd{M-x table-release} does the opposite: it converts a table back
+to plain text, removing its cell borders.
+
+ One application of this pair of commands is to edit a text in
+layout. Look at the following three paragraphs (the latter two are
+indented with header lines):
@example
table-capture is a powerful command.
Here are some things it can do:
-Parse Cell Items By using column delimiter regular
- expression and raw delimiter regular
- expression, it parses the specified text
- area and extracts cell items from
- non-table text and then forms a table out
- of them.
-
-Capture Text Area When no delimiters are specified it
- creates a single cell table. The text in
- the specified region is placed in that
- cell.
+Parse Cell Items Using row and column delimiter regexps,
+ it parses the specified text area and
+ extracts cell items into a table.
@end example
@noindent
-Applying @code{table-capture} to a region containing the above three
-paragraphs, with empty strings for column delimiter regexp and row
-delimiter regexp, creates a table with a single cell like the
-following one.
-
-@c The first line's right-hand frame in the following two examples
-@c sticks out to accommodate for the removal of @samp in the
-@c produced output!!
+Applying @code{table-capture} to a region containing the above text,
+with empty strings for the column and row delimiter regexps, creates a
+table with a single cell like the following one.
+
@smallexample
@group
-+-------------------------------------------------------------+
-|table-capture is a powerful command. |
-|Here are some things it can do: |
-| |
-|Parse Cell Items By using column delimiter regular |
-| expression and raw delimiter regular |
-| expression, it parses the specified text |
-| area and extracts cell items from |
-| non-table text and then forms a table out |
-| of them. |
-| |
-|Capture Text Area When no delimiters are specified it |
-| creates a single cell table. The text in |
-| the specified region is placed in that |
-| cell. |
-+-------------------------------------------------------------+
++----------------------------------------------------------+
+|table-capture is a powerful command. |
+|Here are some things it can do: |
+| |
+|Parse Cell Items Using row and column delimiter regexps,|
+| it parses the specified text area and |
+| extracts cell items into a table. |
++----------------------------------------------------------+
@end group
@end smallexample
@noindent
-By splitting the cell appropriately we now have a table consisting of
-paragraphs occupying its own cell. Each cell can now be edited
-independently without affecting the layout of other cells.
+We can then use the cell splitting commands (@pxref{Cell Commands}) to
+subdivide the table so that each paragraph occupies a cell:
@smallexample
-+--------------------------------------------------------------+
-|table-capture is a powerful command. |
-|Here are some things it can do: |
-+------------------+-------------------------------------------+
-|Parse Cell Items |By using column delimiter regular |
-| |expression and raw delimiter regular |
-| |expression, it parses the specified text |
-| |area and extracts cell items from |
-| |non-table text and then forms a table out |
-| |of them. |
-+------------------+-------------------------------------------+
-|Capture Text Area |When no delimiters are specified it |
-| |creates a single cell table. The text in |
-| |the specified region is placed in that |
-| |cell. |
-+------------------+-------------------------------------------+
++----------------------------------------------------------+
+|table-capture is a powerful command. |
+|Here are some things it can do: |
++-----------------+----------------------------------------+
+|Parse Cell Items | Using row and column delimiter regexps,|
+| | it parses the specified text area and |
+| | extracts cell items into a table. |
++-----------------+----------------------------------------+
@end smallexample
@noindent
-By applying @code{table-release}, which does the opposite process, the
-contents become once again plain text. @code{table-release} works as
-a companion command to @code{table-capture}.
+Each cell can now be edited independently without affecting the layout
+of other cells. When finished, we can invoke @kbd{M-x table-release}
+to convert the table back to plain text.
-@node Measuring Tables
-@subsection Analyzing Table Dimensions
-@cindex table dimensions
+@node Table Misc
+@subsection Table Miscellany
+@cindex table dimensions
@findex table-query-dimension
- The command @code{table-query-dimension} analyzes a table structure
-and reports information regarding its dimensions. In case of the
-above example table, the @code{table-query-dimension} command displays
-in echo area:
+ The command @code{table-query-dimension} reports the layout of the
+table and table cell at point. Here is an example of its output:
@smallexample
Cell: (21w, 6h), Table: (67w, 16h), Dim: (2c, 3r), Total Cells: 5
@end smallexample
@noindent
-This indicates that the current cell is 21 character wide and 6 lines
-high, the entire table is 67 characters wide and 16 lines high. The
-table has 2 columns and 3 rows. It has a total of 5 cells, since the
-first row has a spanned cell.
+This indicates that the current cell is 21 characters wide and 6 lines
+high, the table is 67 characters wide and 16 lines high with 2 columns
+and 3 rows, and a total of 5 cells.
-@node Table Misc
-@subsection Table Miscellany
-
-@cindex insert string into table cells
@findex table-insert-sequence
- The command @code{table-insert-sequence} inserts a string into each
-cell. Each string is a part of a sequence i.e.@: a series of
-increasing integer numbers.
+ @kbd{M-x table-insert-sequence} inserts a string into each cell.
+Each string is a part of a sequence i.e.@: a series of increasing
+integer numbers.
-@cindex table in language format
@cindex table for HTML and LaTeX
@findex table-generate-source
- The command @code{table-generate-source} generates a table formatted
-for a specific markup language. It asks for a language (which must be
-one of @code{html}, @code{latex}, or @code{cals}), a destination
-buffer where to put the result, and the table caption (a string), and
-then inserts the generated table in the proper syntax into the
-destination buffer. The default destination buffer is
-@code{table.@var{lang}}, where @var{lang} is the language you
-specified.
+ @kbd{M-x table-generate-source} generates a table formatted for a
+specific markup language. It asks for a language (which must be one
+of @code{html}, @code{latex}, or @code{cals}), a destination buffer in
+which to put the result, and a table caption, and then inserts the
+generated table into the specified buffer. The default destination
+buffer is @code{table.@var{lang}}, where @var{lang} is the language
+you specified.
@node Two-Column
@section Two-Column Editing
@@ -2663,11 +2710,9 @@ specified.
@cindex splitting columns
@cindex columns, splitting
- Two-column mode lets you conveniently edit two side-by-side columns of
-text. It uses two side-by-side windows, each showing its own
-buffer.
-
- There are three ways to enter two-column mode:
+ Two-column mode lets you conveniently edit two side-by-side columns
+of text. It uses two side-by-side windows, each showing its own
+buffer. There are three ways to enter two-column mode:
@table @asis
@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 @@
@c This file is included either in vc-xtra.texi (when producing the
@c printed version) or in the main Emacs manual (for the on-line version).
-@node Remote Repositories
-@subsection Remote Repositories
-@cindex remote repositories
-
- A common way of using CVS and other more advanced VCSes is to set up
-a central repository on some Internet host, then have each
-developer check out a personal working copy of the files on his local
-machine. Committing changes to the repository, and picking up changes
-from other users into one's own working area, then works by direct
-interactions with the repository server.
-
- One difficulty is that access to a repository server is often slow,
-and that developers might need to work off-line as well. While only
-third-generation decentralized VCses such as GNU Arch or Mercurial
-really solve this problem, VC is designed to reduce the amount of
-network interaction necessary.
-
- If you are using a truly decentralized VCS you can skip the rest of
-this section. It describes backup and local-repository techniques
-that are only useful for Subversion and earlier VCSes.
-
-@menu
-* Version Backups:: Keeping local copies of repository versions.
-* Local Version Control:: Using another version system for local editing.
-@end menu
-
-@node Version Backups
-@subsubsection Version Backups
-@cindex version backups
-
-@cindex automatic version backups
- When VC sees that the repository for a file is on a remote
-machine, it automatically makes local backups of unmodified versions
-of the file---@dfn{automatic version backups}. This means that you
-can compare the file to the repository version (@kbd{C-x v =}), or
-revert to that version (@kbd{C-x v u}), without any network
-interactions.
-
- The local copy of the unmodified file is called a @dfn{version
-backup} to indicate that it corresponds exactly to a version that is
-stored in the repository. Note that version backups are not the same
-as ordinary Emacs backup files
-@iftex
-(@pxref{Backup,,,emacs, the Emacs Manual}).
-@end iftex
-@ifnottex
-(@pxref{Backup}).
-@end ifnottex
-But they follow a similar naming convention.
-
- For a file that comes from a remote repository, VC makes a
-version backup whenever you save the first changes to the file, and
-removes it after you have committed your modified version to the
-repository. You can disable the making of automatic version backups by
-setting @code{vc-cvs-stay-local} to @code{nil} (@pxref{CVS Options}).
-
-@cindex manual version backups
- The name of the automatic version backup for version @var{version}
-of file @var{file} is @code{@var{file}.~@var{version}.~}. This is
-almost the same as the name used by @kbd{C-x v ~}
-@iftex
-(@pxref{Old Revisions,,,emacs, the Emacs Manual}),
-@end iftex
-@ifnottex
-(@pxref{Old Revisions}),
-@end ifnottex
-the only difference being the additional dot (@samp{.}) after the
-version number. This similarity is intentional, because both kinds of
-files store the same kind of information. The file made by @kbd{C-x v
-~} acts as a @dfn{manual version backup}.
-
- All the VC commands that operate on old versions of a file can use
-both kinds of version backups. For instance, @kbd{C-x v ~} uses
-either an automatic or a manual version backup, if possible, to get
-the contents of the version you request. Likewise, @kbd{C-x v =} and
-@kbd{C-x v u} use either an automatic or a manual version backup, if
-one of them exists, to get the contents of a version to compare or
-revert to. If you changed a file outside of Emacs, so that no
-automatic version backup was created for the previous text, you can
-create a manual backup of that version using @kbd{C-x v ~}, and thus
-obtain the benefit of the local copy for Emacs commands.
-
- The only difference in Emacs's handling of manual and automatic
-version backups, once they exist, is that Emacs deletes automatic
-version backups when you commit to the repository. By contrast,
-manual version backups remain until you delete them.
-
-@node Local Version Control
-@subsubsection Local Version Control
-@cindex local version control
-@cindex local back end (version control)
-
-When you make many changes to a file that comes from a remote
-repository, it can be convenient to have version control on your local
-machine as well. You can then record intermediate versions, revert to
-a previous state, etc., before you actually commit your changes to the
-remote server.
-
-VC lets you do this by putting a file under a second, local version
-control system, so that the file is effectively registered in two
-systems at the same time. For the description here, we will assume
-that the remote system is CVS, and you use RCS locally, although the
-mechanism works with any combination of version control systems
-(@dfn{back ends}).
-
-To make it work with other back ends, you must make sure that the
-``more local'' back end comes before the ``more remote'' back end in
-the setting of @code{vc-handled-backends} (@pxref{Customizing VC}). By
-default, this variable is set up so that you can use remote CVS and
-local RCS as described here.
-
-To start using local RCS for a file that comes from a remote CVS
-server, you must @emph{register the file in RCS}, by typing @kbd{C-u
-C-x v v rcs @key{RET}}. (In other words, use @code{vc-next-action} with a
-prefix argument, and specify RCS as the back end.)
-
-You can do this at any time; it does not matter whether you have
-already modified the file with respect to the version in the CVS
-repository. If possible, VC tries to make the RCS master start with
-the unmodified repository version, then checks in any local changes
-as a new version. This works if you have not made any changes yet, or
-if the unmodified repository version exists locally as a version
-backup (@pxref{Version Backups}). If the unmodified version is not
-available locally, the RCS master starts with the modified version;
-the only drawback to this is that you cannot compare your changes
-locally to what is stored in the repository.
-
-The version number of the RCS master is derived from the current CVS
-version, starting a branch from it. For example, if the current CVS
-version is 1.23, the local RCS branch will be 1.23.1. Version 1.23 in
-the RCS master will be identical to version 1.23 under CVS; your first
-changes are checked in as 1.23.1.1. (If the unmodified file is not
-available locally, VC will check in the modified file twice, both as
-1.23 and 1.23.1.1, to make the revision numbers consistent.)
-
-If you do not use locking under CVS (the default), locking is also
-disabled for RCS, so that editing under RCS works exactly as under
-CVS.
-
-When you are done with local editing, you can commit the final version
-back to the CVS repository by typing @kbd{C-u C-x v v cvs @key{RET}}.
-This initializes the log entry buffer
-@iftex
-(@pxref{Log Buffer,,,emacs, the Emacs Manual})
-@end iftex
-@ifnottex
-(@pxref{Log Buffer})
-@end ifnottex
-to contain all the log entries you have recorded in the RCS master;
-you can edit them as you wish, and then commit in CVS by typing
-@kbd{C-c C-c}. If the commit is successful, VC removes the RCS
-master, so that the file is once again registered under CVS only.
-(The RCS master is not actually deleted, just renamed by appending
-@samp{~} to the name, so that you can refer to it later if you wish.)
-
-While using local RCS, you can pick up recent changes from the CVS
-repository into your local file, or commit some of your changes back
-to CVS, without terminating local RCS version control. To do this,
-switch to the CVS back end temporarily, with the @kbd{C-x v b} command:
-
-@table @kbd
-@item C-x v b
-Switch to another back end that the current file is registered
-under (@code{vc-switch-backend}).
-
-@item C-u C-x v b @var{backend} @key{RET}
-Switch to @var{backend} for the current file.
-@end table
-
-@kindex C-x v b
-@findex vc-switch-backend
-@kbd{C-x v b} does not change the buffer contents, or any files; it
-only changes VC's perspective on how to handle the file. Any
-subsequent VC commands for that file will operate on the back end that
-is currently selected.
-
-If the current file is registered in more than one back end, typing
-@kbd{C-x v b} ``cycles'' through all of these back ends. With a
-prefix argument, it asks for the back end to use in the minibuffer.
-
-Thus, if you are using local RCS, and you want to pick up some recent
-changes in the file from remote CVS, first visit the file, then type
-@kbd{C-x v b} to switch to CVS, and finally use @kbd{C-x v m
-@key{RET}} to merge the news
-@iftex
-(@pxref{Merging,,,emacs, the Emacs Manual}).
-@end iftex
-@ifnottex
-(@pxref{Merging}).
-@end ifnottex
-You can then switch back to RCS by typing @kbd{C-x v b} again, and
-continue to edit locally.
-
-But if you do this, the revision numbers in the RCS master no longer
-correspond to those of CVS. Technically, this is not a problem, but
-it can become difficult to keep track of what is in the CVS repository
-and what is not. So we suggest that you return from time to time to
-CVS-only operation, by committing your local changes back to the
-repository using @kbd{C-u C-x v v cvs @key{RET}}.
-
-@node Revision Tags
-@subsection Revision Tags
-@cindex tags and version control
-
- In a VCS with per-file revision numbers (such as SCCS, RCS, or CVS)
-@dfn{tag} is a named set of file versions (one for each registered
-file) that you can treat as a unit. In a VCS with per-repository
-version numbers (Subversion and most later ones) a tag is simply
-a symbolic name for a revision.
-
- One important kind of tag is a @dfn{release}, a (theoretically)
-stable version of the system that is ready for distribution to users.
-
-@menu
-* Making Revision Tags:: The tag facilities.
-* Revision Tag Caveats:: Things to be careful of when using tags.
-@end menu
-
-@node Making Revision Tags
-@subsubsection Making and Using Revision Tags
-
- There are two basic commands for tags; one makes a
-tag with a given name, the other retrieves a named tag.
-
-@table @code
-@kindex C-x v s
-@findex vc-create-tag
-@item C-x v s @var{name} @key{RET}
-Define the working revision of every registered file in or under the
-current directory as a tag named @var{name}
-(@code{vc-create-tag}).
-
-@kindex C-x v r
-@findex vc-retrieve-tag
-@item C-x v r @var{name} @key{RET}
-For all registered files at or below the current directory level,
-retrieve the tagged revision @var{name}. This command will
-switch to a branch if @var{name} is a branch name and your VCS
-distinguishes branches from tags.
-(@code{vc-retrieve-tag}).
-
-This command reports an error if any files are locked at or below the
-current directory, without changing anything; this is to avoid
-overwriting work in progress.
-@end table
-
-Tags are inexpensive, so you need not hesitate to create them whenever
-they are useful. Branches vary in cost depending on your VCS; in
-older ones they may be expensive.
-
- You can give a tag or branch name as an argument to @kbd{C-x v =} or
-@kbd{C-x v ~}
-@iftex
-(@pxref{Old Revisions,,,emacs, the Emacs Manual}).
-@end iftex
-@ifnottex
-(@pxref{Old Revisions}).
-@end ifnottex
-Thus, you can use it to compare a tagged version against the current files,
-or two tagged versions against each other.
-
-@node Revision Tag Caveats
-@subsubsection Revision Tag Caveats
-
- For SCCS, VC implements tags itself; these tags are visible only
-through VC. Most later systems (including CVS, Subversion, bzr, git,
-and hg) have a native tag facility, and VC uses it where
-available; those tags will be visible even when you bypass VC.
-
- There is no support for VC tags using GNU Arch yet.
-
- Under older VCSes (SCCS, RCS, CVS, early versions of Subversion),
-renaming and deletion could create some difficulties with tags. This is
-not a VC-specific problem, but a general design issue in version
-control systems that was not solved effectively until the earliest
-third-generation systems.
-
- In a file-oriented VCS, when you rename a registered file you need
-to rename its master along with it; the command @code{vc-rename-file}
-will do this automatically. If you are using SCCS, you must also
-update the records of the tag, to mention the file by its new name
-(@code{vc-rename-file} does this, too). An old tag that refers to a
-master file that no longer exists under the recorded name is invalid;
-VC can no longer retrieve it. It would be beyond the scope of this
-manual to explain enough about RCS and SCCS to explain how to update
-the tags by hand.
-
- Using @code{vc-rename-file} makes the tag remain valid for
-retrieval, but it does not solve all problems. For example, some of the
-files in your program probably refer to others by name. At the very
-least, the makefile probably mentions the file that you renamed. If you
-retrieve an old tag, the renamed file is retrieved under its new
-name, which is not the name that the makefile expects. So the program
-won't really work as retrieved.
-
@node Miscellaneous VC
@subsection Miscellaneous Commands and Features of VC
@@ -307,52 +12,55 @@ won't really work as retrieved.
@menu
* Change Logs and VC:: Generating a change log file from log entries.
-* Renaming and VC:: A command to rename both the source and master
- file correctly.
+* VC Delete/Rename:: Deleting and renaming version-controlled files.
+* Revision Tags:: Symbolic names for revisions.
* Version Headers:: Inserting version control headers into working files.
@end menu
@node Change Logs and VC
@subsubsection Change Logs and VC
- If you use RCS or CVS for a program and also maintain a change log
-file for it
+ If you use RCS or CVS for a program with a @file{ChangeLog} file
@iftex
(@pxref{Change Log,,,emacs, the Emacs Manual}),
@end iftex
@ifnottex
(@pxref{Change Log}),
@end ifnottex
-you can generate change log entries automatically from the version
-control log entries:
+you can generate change log entries from the version control log
+entries of previous commits.
+
+ Note that this only works with RCS or CVS. This procedure would be
+particularly incorrect on a modern changeset-based version control
+system, where changes to the @file{ChangeLog} file would normally be
+committed as part of a changeset. In that case, you should write the
+change log entries first, then pull them into the @samp{*vc-log*}
+buffer when you commit
+@iftex
+(@pxref{Log Buffer,,,emacs, the Emacs Manual}).
+@end iftex
+@ifnottex
+(@pxref{Log Buffer}).
+@end ifnottex
@table @kbd
@item C-x v a
@kindex C-x v a
@findex vc-update-change-log
-Visit the current directory's change log file and, for registered files
-in that directory, create new entries for versions checked in since the
-most recent entry in the change log file.
+Visit the current directory's @file{ChangeLog} file and, for
+registered files in that directory, create new entries for versions
+committed since the most recent change log entry
(@code{vc-update-change-log}).
-This command works with RCS or CVS only, not with any of the other
-back ends.
-
@item C-u C-x v a
As above, but only find entries for the current buffer's file.
-
-@item M-1 C-x v a
-As above, but find entries for all the currently visited files that are
-maintained with version control. This works only with RCS, and it puts
-all entries in the log for the default directory, which may not be
-appropriate.
@end table
For example, suppose the first line of @file{ChangeLog} is dated
1999-04-10, and that the only check-in since then was by Nathaniel
-Bowditch to @file{rcs2log} on 1999-05-22 with log text @samp{Ignore log
-messages that start with `#'.}. Then @kbd{C-x v a} visits
-@file{ChangeLog} and inserts text like this:
+Bowditch to @file{rcs2log} on 1999-05-22 with log entry @samp{Ignore
+log messages that start with `#'.}. Then @kbd{C-x v a} inserts this
+@file{ChangeLog} entry:
@iftex
@medbreak
@@ -369,17 +77,11 @@ messages that start with `#'.}. Then @kbd{C-x v a} visits
@end iftex
@noindent
-You can then edit the new change log entry further as you wish.
-
- Some of the new change log entries may duplicate what's already in
-ChangeLog. You will have to remove these duplicates by hand.
-
- Normally, the log entry for file @file{foo} is displayed as @samp{*
-foo: @var{text of log entry}}. The @samp{:} after @file{foo} is omitted
-if the text of the log entry starts with @w{@samp{(@var{functionname}):
-}}. For example, if the log entry for @file{vc.el} is
-@samp{(vc-do-command): Check call-process status.}, then the text in
-@file{ChangeLog} looks like this:
+If the version control log entry specifies a function name (in
+parenthesis at the beginning of a line), that is reflected in the
+@file{ChangeLog} entry. For example, if a log entry for @file{vc.el}
+is @samp{(vc-do-command): Check call-process status.}, the
+@file{ChangeLog} entry is:
@iftex
@medbreak
@@ -395,221 +97,184 @@ if the text of the log entry starts with @w{@samp{(@var{functionname}):
@medbreak
@end iftex
- When @kbd{C-x v a} adds several change log entries at once, it groups
-related log entries together if they all are checked in by the same
-author at nearly the same time. If the log entries for several such
-files all have the same text, it coalesces them into a single entry.
-For example, suppose the most recent check-ins have the following log
-entries:
+ When @kbd{C-x v a} adds several change log entries at once, it
+groups related log entries together if they all are checked in by the
+same author at nearly the same time. If the log entries for several
+such files all have the same text, it coalesces them into a single
+entry.
-@flushleft
-@bullet{} For @file{vc.texinfo}: @samp{Fix expansion typos.}
-@bullet{} For @file{vc.el}: @samp{Don't call expand-file-name.}
-@bullet{} For @file{vc-hooks.el}: @samp{Don't call expand-file-name.}
-@end flushleft
+@node VC Delete/Rename
+@subsubsection Deleting and Renaming Version-Controlled Files
+@cindex renaming version-controlled files
-@noindent
-They appear like this in @file{ChangeLog}:
-
-@iftex
-@medbreak
-@end iftex
-@smallexample
-@group
-1999-04-01 Nathaniel Bowditch <nat@@apn.org>
+@table @kbd
+@item M-x vc-delete-file
+Prompt for a file name, delete the file from the working tree, and
+schedule the deletion for committing.
- * vc.texinfo: Fix expansion typos.
+@item M-x vc-rename-file
+Prompt for two file names, @var{VAR} and @var{OLD}, rename them in the
+working tree, and schedule the renaming for committing.
+@end table
- * vc.el, vc-hooks.el: Don't call expand-file-name.
-@end group
-@end smallexample
+@findex vc-delete-file
+ If you wish to delete a version-controlled file, use the command
+@kbd{M-x vc-delete-file}. This prompts for the file name, and deletes
+it via the version control system. The file is removed from the
+working tree, and in the VC Directory buffer
@iftex
-@medbreak
+(@pxref{VC Directory Mode}),
@end iftex
+@ifnottex
+(@pxref{VC Directory Mode}),
+@end ifnottex
+it is displayed with the @samp{removed} status. When you commit it,
+the deletion takes effect in the repository.
- Normally, @kbd{C-x v a} separates log entries by a blank line, but you
-can mark several related log entries to be clumped together (without an
-intervening blank line) by starting the text of each related log entry
-with a label of the form @w{@samp{@{@var{clumpname}@} }}. The label
-itself is not copied to @file{ChangeLog}. For example, suppose the log
-entries are:
+@findex vc-rename-file
+ To rename a version-controlled file, type @kbd{M-x vc-rename-file}.
+This prompts for two arguments: the name of the file you wish to
+rename, and the new name; then it performs the renaming via the
+version control system. The renaming takes effect immediately in the
+working tree, and takes effect in the repository when you commit the
+renamed file.
+
+ On modern version control systems that have built-in support for
+renaming, the renamed file retains the full change history of the
+original file. On CVS and older version control systems, the
+@code{vc-rename-file} command actually works by creating a copy of the
+old file under the new name, registering it, and deleting the old
+file. In this case, the change history is not preserved.
-@flushleft
-@bullet{} For @file{vc.texinfo}: @samp{@{expand@} Fix expansion typos.}
-@bullet{} For @file{vc.el}: @samp{@{expand@} Don't call expand-file-name.}
-@bullet{} For @file{vc-hooks.el}: @samp{@{expand@} Don't call expand-file-name.}
-@end flushleft
+@node Revision Tags
+@subsubsection Revision Tags
+@cindex revision tag
+@cindex tags for version control
-@noindent
-Then the text in @file{ChangeLog} looks like this:
+ Most version control systems allow you to apply a @dfn{revision tag}
+to a specific version of a version-controlled tree. On modern
+changeset-based version control systems, a revision tag is simply a
+symbolic name for a particular revision. On older file-based systems
+like CVS, each tag is added to the entire set of version-controlled
+files, allowing them to be handled as a unit. Revision tags are
+commonly used to identify releases that are distributed to users.
-@iftex
-@medbreak
-@end iftex
-@smallexample
-@group
-1999-04-01 Nathaniel Bowditch <nat@@apn.org>
+ There are two basic commands for tags; one makes a tag with a given
+name, the other retrieves a named tag.
- * vc.texinfo: Fix expansion typos.
- * vc.el, vc-hooks.el: Don't call expand-file-name.
-@end group
-@end smallexample
-@iftex
-@medbreak
-@end iftex
+@table @code
+@kindex C-x v s
+@findex vc-create-tag
+@item C-x v s @var{name} @key{RET}
+Define the working revision of every registered file in or under the
+current directory as a tag named @var{name}
+(@code{vc-create-tag}).
- A log entry whose text begins with @samp{#} is not copied to
-@file{ChangeLog}. For example, if you merely fix some misspellings in
-comments, you can log the change with an entry beginning with @samp{#}
-to avoid putting such trivia into @file{ChangeLog}.
+@kindex C-x v r
+@findex vc-retrieve-tag
+@item C-x v r @var{name} @key{RET}
+For all registered files at or below the current directory level,
+retrieve the tagged revision @var{name}. This command will switch to a
+branch if @var{name} is a branch name and your VCS distinguishes
+branches from tags. (@code{vc-retrieve-tag}).
-@node Renaming and VC
-@subsubsection Renaming VC Work Files and Master Files
+This command reports an error if any files are locked at or below the
+current directory, without changing anything; this is to avoid
+overwriting work in progress.
+@end table
-@findex vc-rename-file
- When you rename a registered file, you must also rename its master
-file correspondingly to get proper results. Use @code{vc-rename-file}
-to rename the source file as you specify, and rename its master file
-accordingly. It also updates any tags (@pxref{Revision Tags}) that
-mention the file, so that they use the new name; despite this, the
-tag thus modified may not completely work (@pxref{Revision Tag Caveats}).
+ You can give a tag or branch name as an argument to @kbd{C-x v =} or
+@kbd{C-x v ~}
+@iftex
+(@pxref{Old Revisions,,,emacs, the Emacs Manual}).
+@end iftex
+@ifnottex
+(@pxref{Old Revisions}).
+@end ifnottex
+Thus, you can use it to compare a tagged version against the current files,
+or two tagged versions against each other.
- Some back ends do not provide an explicit rename operation to their
-repositories. After issuing @code{vc-rename-file}, use @kbd{C-x v v}
-on the original and renamed buffers and provide the necessary edit
-log.
+ On SCCS, VC implements tags itself; these tags are visible only
+through VC. Most later systems (including CVS, Subversion, bzr, git,
+and hg) have a native tag facility, and VC uses it where available;
+those tags will be visible even when you bypass VC.
- You cannot use @code{vc-rename-file} on a file that is locked by
-someone else.
+ In a file-oriented VCS, when you rename a registered file you need
+to rename its master along with it; the command @code{vc-rename-file}
+will do this automatically. If you are using SCCS, you must also
+update the records of the tag, to mention the file by its new name
+(@code{vc-rename-file} does this, too). An old tag that refers to a
+master file that no longer exists under the recorded name is invalid;
+VC can no longer retrieve it. It would be beyond the scope of this
+manual to explain enough about RCS and SCCS to explain how to update
+the tags by hand. Using @code{vc-rename-file} makes the tag remain
+valid for retrieval, but it does not solve all problems. For example,
+some of the files in your program probably refer to others by name.
+At the very least, the makefile probably mentions the file that you
+renamed. If you retrieve an old tag, the renamed file is retrieved
+under its new name, which is not the name that the makefile expects.
+So the program won't really work as retrieved.
@node Version Headers
@subsubsection Inserting Version Control Headers
- Sometimes it is convenient to put version identification strings
-directly into working files. Certain special strings called
-@dfn{version headers} are replaced in each successive version by the
-number of that version, the name of the user who created it, and other
-relevant information. All of the back ends that VC supports have such
-a mechanism, except GNU Arch.
-
- VC does not normally use the information contained in these headers.
-The exception is RCS---with RCS, version headers are sometimes more
-reliable than the master file to determine which version of the file
-you are editing. Note that in a multi-branch environment, version
-headers are necessary to make VC behave correctly
-@iftex
-(@pxref{Multi-User Branching,,,emacs, the Emacs Manual}).
-@end iftex
-@ifnottex
-(@pxref{Multi-User Branching}).
-@end ifnottex
-
- Searching for RCS version headers is controlled by the variable
-@code{vc-consult-headers}. If it is non-@code{nil} (the default),
-Emacs searches for headers to determine the version number you are
-editing. Setting it to @code{nil} disables this feature.
+ On Subversion, CVS, RCS, and SCCS, you can put certain special
+strings called @dfn{version headers} into a work file. When the file
+is committed, the version control system automatically puts the
+revision number, the name of the user who made the commit, and other
+relevant information into the version header.
- Note that although CVS uses the same kind of version headers as RCS
-does, VC never searches for these headers if you are using CVS,
-regardless of the above setting.
+@vindex vc-consult-headers
+ VC does not normally use the information in the version headers. As
+an exception, when using RCS, Emacs uses the version header, if there
+is one, to determine the file version, since it is often more reliable
+than the RCS master file. To inhibit using the version header this
+way, change the variable @code{vc-consult-headers} to @code{nil}.
@kindex C-x v h
@findex vc-insert-headers
- You can use the @kbd{C-x v h} command (@code{vc-insert-headers}) to
-insert a suitable header string.
-
-@table @kbd
-@item C-x v h
-Insert headers in a file for use with your version-control system.
-@end table
-
@vindex vc-@var{backend}-header
- The default header string is @samp{@w{$}Id$} for RCS and
-@samp{@w{%}W%} for SCCS. You can specify other headers to insert by
-setting the variables @code{vc-@var{backend}-header} where
-@var{backend} is @code{rcs} or @code{sccs}.
-
- Instead of a single string, you can specify a list of strings; then
-each string in the list is inserted as a separate header on a line of
-its own.
-
- It may be necessary to use apparently-superfluous backslashes when
-writing the strings that you put in this variable. For instance, you
-might write @code{"$Id\$"} rather than @code{"$Id@w{$}"}. The extra
-backslash prevents the string constant from being interpreted as a
-header, if the Emacs Lisp file containing it is maintained with
-version control.
-
-@vindex vc-comment-alist
- Each header is inserted surrounded by tabs, inside comment delimiters,
-on a new line at point. Normally the ordinary comment
-start and comment end strings of the current mode are used, but for
-certain modes, there are special comment delimiters for this purpose;
-the variable @code{vc-comment-alist} specifies them. Each element of
-this list has the form @code{(@var{mode} @var{starter} @var{ender})}.
+ To insert a suitable header string into the current buffer, type
+@kbd{C-x v h} (@code{vc-insert-headers}). This command works only on
+Subversion, CVS, RCS, and SCCS. The variable
+@code{vc-@var{backend}-header} contains the list of keywords to insert
+into the version header; for instance, CVS uses @code{vc-cvs-header},
+whose default value is @code{'("\$Id\$")}. (The extra backslashes
+prevent the string constant from being interpreted as a header, if the
+Emacs Lisp file defining it is maintained with version control.) The
+@kbd{C-x v h} command inserts each keyword in the list on a new line
+at point, surrounded by tabs, and inside comment delimiters if
+necessary.
@vindex vc-static-header-alist
The variable @code{vc-static-header-alist} specifies further strings
to add based on the name of the buffer. Its value should be a list of
elements of the form @code{(@var{regexp} . @var{format})}. Whenever
-@var{regexp} matches the buffer name, @var{format} is inserted as part
-of the header. A header line is inserted for each element that matches
-the buffer name, and for each string specified by
-@code{vc-@var{backend}-header}. The header line is made by processing the
-string from @code{vc-@var{backend}-header} with the format taken from the
-element. The default value for @code{vc-static-header-alist} is as follows:
-
-@example
-@group
-(("\\.c$" .
- "\n#ifndef lint\nstatic char vcid[] = \"\%s\";\n\
-#endif /* lint */\n"))
-@end group
-@end example
-
-@noindent
-It specifies insertion of text of this form:
-
-@example
-@group
-
-#ifndef lint
-static char vcid[] = "@var{string}";
-#endif /* lint */
-@end group
-@end example
-
-@noindent
-Note that the text above starts with a blank line.
-
- If you use more than one version header in a file, put them close
-together in the file. The mechanism in @code{revert-buffer} that
-preserves markers may not handle markers positioned between two version
-headers.
+@var{regexp} matches the buffer name, @var{format} is also inserted as
+part of the version header. A @samp{%s} in @var{format} is replaced
+with the file's version control type.
@node Customizing VC
@subsection Customizing VC
@vindex vc-handled-backends
-The variable @code{vc-handled-backends} determines which version
+ The variable @code{vc-handled-backends} determines which version
control systems VC should handle. The default value is @code{(RCS CVS
SVN SCCS Bzr Git Hg Mtn Arch)}, so it contains all the version systems
that are currently supported. If you want VC to ignore one or more of
-these systems, exclude its name from the list. To disable VC entirely,
-set this variable to @code{nil}.
-
-The order of systems in the list is significant: when you visit a file
-registered in more than one system (@pxref{Local Version Control}), VC
-uses the system that comes first in @code{vc-handled-backends} by
-default. The order is also significant when you register a file for
-the first time, see
+these systems, exclude its name from the list. To disable VC
+entirely, set this variable to @code{nil}.
+
+ The order of systems in the list is significant: when you visit a
+file registered in more than one system, VC uses the system that comes
+first in @code{vc-handled-backends} by default. The order is also
+significant when you register a file for the first time
@iftex
-@ref{Registering,,,emacs, the Emacs Manual},
+(@pxref{Registering,,,emacs, the Emacs Manual}).
@end iftex
@ifnottex
-@ref{Registering},
+(@pxref{Registering}).
@end ifnottex
-for details.
@menu
* 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
for files that use version control, set the variable
@code{vc-make-backup-files} to a non-@code{nil} value.
-@vindex vc-keep-workfiles
- Normally the work file exists all the time, whether it is locked or
-not. If you set @code{vc-keep-workfiles} to @code{nil}, then checking
-in a new version with @kbd{C-x v v} deletes the work file; but any
-attempt to visit the file with Emacs creates it again. (With CVS, work
-files are always kept.)
-
@vindex vc-follow-symlinks
- Editing a version-controlled file through a symbolic link can be
-dangerous. It bypasses the version control system---you can edit the
-file without locking it, and fail to check your changes in. Also,
-your changes might overwrite those of another user. To protect against
-this, VC checks each symbolic link that you visit, to see if it points
-to a file under version control.
-
- The variable @code{vc-follow-symlinks} controls what to do when a
-symbolic link points to a version-controlled file. If it is @code{nil},
-VC only displays a warning message. If it is @code{t}, VC automatically
-follows the link, and visits the real file instead, telling you about
-this in the echo area. If the value is @code{ask} (the default), VC
-asks you each time whether to follow the link.
+@cindex symbolic links (and version control)
+ Editing a version-controlled file through a symbolic link may cause
+unexpected results, if you are unaware that the underlying file is
+version-controlled. The variable @code{vc-follow-symlinks} controls
+what Emacs does if you try to visit a symbolic link pointing to a
+version-controlled file. If the value is @code{ask} (the default),
+Emacs asks for confirmation. If it is @code{nil}, Emacs just displays
+a warning message. If it is @code{t}, Emacs automatically follows the
+link and visits the real file instead.
@vindex vc-suppress-confirm
If @code{vc-suppress-confirm} is non-@code{nil}, then @kbd{C-x v v}
and @kbd{C-x v i} can save the current buffer without asking, and
-@kbd{C-x v u} also operates without asking for confirmation. (This
-variable does not affect @kbd{C-x v c}; that operation is so drastic
-that it should always ask for confirmation.)
+@kbd{C-x v u} also operates without asking for confirmation.
@vindex vc-command-messages
VC mode does much of its work by running the shell commands for the
-appropriate backend. If @code{vc-command-messages} is non-@code{nil}, VC
-displays messages to indicate which shell commands it runs, and
-additional messages when the commands finish.
+appropriate version control system. If @code{vc-command-messages} is
+non-@code{nil}, VC displays messages to indicate which shell commands
+it runs, and additional messages when the commands finish.
@vindex vc-path
You can specify additional directories to search for version control
@@ -715,37 +367,16 @@ the variable @code{vc-mistrust-permissions} affects SCCS use, but
@node CVS Options
@subsubsection Options specific for CVS
-@cindex locking (CVS)
- By default, CVS does not use locking to coordinate the activities of
-several users; anyone can change a work file at any time. However,
-there are ways to restrict this, resulting in behavior that resembles
-locking.
-
-@cindex CVSREAD environment variable (CVS)
- For one thing, you can set the @env{CVSREAD} environment variable
-(the value you use makes no difference). If this variable is defined,
-CVS makes your work files read-only by default. In Emacs, you must
-type @kbd{C-x v v} to make the file writable, so that editing works
-in fact similar as if locking was used. Note however, that no actual
-locking is performed, so several users can make their files writable
-at the same time. When setting @env{CVSREAD} for the first time, make
-sure to check out all your modules anew, so that the file protections
-are set correctly.
-
-@cindex cvs watch feature
-@cindex watching files (CVS)
- Another way to achieve something similar to locking is to use the
-@dfn{watch} feature of CVS. If a file is being watched, CVS makes it
-read-only by default, and you must also use @kbd{C-x v v} in Emacs to
-make it writable. VC calls @code{cvs edit} to make the file writable,
-and CVS takes care to notify other developers of the fact that you
-intend to change the file. See the CVS documentation for details on
-using the watch feature.
+@vindex vc-cvs-global-switches
+ You can specify additional command line options to pass to all CVS
+operations in the variable @code{vc-cvs-global-switches}. These
+switches are inserted immediately after the @code{cvs} command, before
+the name of the operation to invoke.
@vindex vc-stay-local
@vindex vc-cvs-stay-local
@cindex remote repositories (CVS)
- When a file's repository is on a remote machine, VC tries to keep
+ When using a CVS repository on a remote machine, VC can try keeping
network interactions to a minimum. This is controlled by the variable
@code{vc-cvs-stay-local}. There is another variable,
@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
only about @code{vc-cvs-stay-local}, but everything applies to
@code{vc-stay-local} as well.
-If @code{vc-cvs-stay-local} is @code{t} (the default), then VC uses
-only the entry in the local CVS subdirectory to determine the file's
-state (and possibly information returned by previous CVS commands).
-One consequence of this is that when you have modified a file, and
-somebody else has already checked in other changes to the file, you
-are not notified of it until you actually try to commit. (But you can
-try to pick up any recent changes from the repository first, using
-@kbd{C-x v m @key{RET}},
+ If @code{vc-cvs-stay-local} is @code{t} (the default), VC determines
+the version control status of each file using only the entry in the
+local CVS subdirectory and the information returned by previous CVS
+commands. As a consequence, if you have modified a file and somebody
+else has checked in other changes, you will not be notified of the
+conflict until you try to commit.
+
+ If you change @code{vc-cvs-stay-local} to @code{nil}, VC queries the
+remote repository @emph{before} it decides what to do in
+@code{vc-next-action} (@kbd{C-x v v}), just as it does for local
+repositories.
+
+ You can also set @code{vc-cvs-stay-local} to a regular expression
+that is matched against the repository host name; VC then stays local
+only for repositories from hosts that match the pattern.
+
+@cindex automatic version backups
+ When using a remote repository, Emacs normally makes @dfn{automatic
+version backups} of the original versions of each edited file. These
+local backups are made whenever you save the first changes to a file,
+and they are removed after you commit your changes to the repository.
+(Note that these are not the same as ordinary Emacs backup files;
@iftex
-@pxref{Merging,,,emacs, the Emacs Manual}).
+@pxref{Backup,,,emacs, the Emacs Manual}.)
@end iftex
@ifnottex
-@pxref{Merging}).
+@pxref{Backup}.)
@end ifnottex
+Commands like @kbd{C-x v =} and @kbd{C-x v u} make use of automatic
+version backups, if possible, to avoid having to access the network.
- When @code{vc-cvs-stay-local} is @code{t}, VC also makes local
-version backups, so that simple diff and revert operations are
-completely local (@pxref{Version Backups}).
-
- On the other hand, if you set @code{vc-cvs-stay-local} to @code{nil},
-then VC queries the remote repository @emph{before} it decides what to
-do in @code{vc-next-action} (@kbd{C-x v v}), just as it does for local
-repositories. It also does not make any version backups.
+ Setting @code{vc-cvs-stay-local} to @code{nil} disables the making
+of automatic version backups.
- You can also set @code{vc-cvs-stay-local} to a regular expression
-that is matched against the repository host name; VC then stays local
-only for repositories from hosts that match the pattern.
+@cindex manual version backups
+ Automatic version backups have names of the form
+@w{@code{@var{file}.~@var{version}.~}}. This is similar to the name
+that @kbd{C-x v ~} saves old versions to
+@iftex
+(@pxref{Old Revisions,,,emacs, the Emacs Manual}),
+@end iftex
+@ifnottex
+(@pxref{Old Revisions}),
+@end ifnottex
+except for the additional dot (@samp{.}) after the version. The
+relevant VC commands can use both kinds of version backups. The main
+difference is that the ``manual'' version backups made by @kbd{C-x v
+~} are not deleted automatically when you commit.
-@vindex vc-cvs-global-switches
- You can specify additional command line options to pass to all CVS
-operations in the variable @code{vc-cvs-global-switches}. These
-switches are inserted immediately after the @code{cvs} command, before
-the name of the operation to invoke.
+@cindex locking (CVS)
+ CVS does not use locking by default, but there are ways to enable
+locking-like behavior using its @env{CVSREAD} or @dfn{watch} feature;
+see the CVS documentation for details. If that case, you can use
+@kbd{C-x v v} in Emacs to toggle locking, as you would for a
+locking-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 @@
+2011-12-28 Paul Eggert <eggert@cs.ucla.edu>
+
+ * files.texi (File Attributes, Changing Files):
+ Use a more-natural notation for octal numbers.
+
+2011-12-23 Juanma Barranquero <lekktu@gmail.com>
+
+ * variables.texi (Variables with Restricted Values):
+ Change reference to variable (bug#10354).
+
+2011-12-13 Martin Rudalics <rudalics@gmx.at>
+
+ * windows.texi (Splitting Windows): Use t instead of non-nil
+ when describing window-combination-resize.
+
+2011-12-05 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * text.texi (Special Properties): Warn against `intangible' properties
+ (bug#10222).
+
2011-11-26 Eli Zaretskii <eliz@gnu.org>
* display.texi (Truncation):
@@ -23,8 +43,8 @@
2011-11-21 Martin Rudalics <rudalics@gmx.at>
- * windows.texi (Windows and Frames, Splitting Windows): Fix
- typos.
+ * windows.texi (Windows and Frames, Splitting Windows):
+ Fix typos.
2011-11-21 Chong Yidong <cyd@gnu.org>
@@ -36,8 +56,8 @@
(Buffers and Windows): Copyedits.
(Choosing Window): Document special handling of special-display-*.
(Choosing Window Options): Fix display-buffer-reuse-frames doc.
- Don't document even-window-heights, which is going away. Clarify
- which options are obeyed by which action functions.
+ Don't document even-window-heights, which is going away.
+ Clarify which options are obeyed by which action functions.
2011-11-20 Stefan Monnier <monnier@iro.umontreal.ca>
@@ -9749,7 +9769,7 @@
directory have been changed to reflect this.
* All instances of @indentedresultt{} have been changed to
- ` @result{}', using 5 spaces at the begining of the line.
+ ` @result{}', using 5 spaces at the beginning of the line.
1989-04-24 Robert J. Chassell (bob@rice-chex.ai.mit.edu)
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}.
It is not easy to display a value of point in the middle of a
sequence of text that has the @code{display}, @code{composition} or
-@code{intangible} property, or is invisible. Therefore, after a
-command finishes and returns to the command loop, if point is within
-such a sequence, the command loop normally moves point to the edge of
-the sequence.
+is invisible. Therefore, after a command finishes and returns to the
+command loop, if point is within such a sequence, the command loop
+normally moves point to the edge of the sequence.
A command can inhibit this feature by setting the variable
@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
* System Environment:: Distinguish the name and kind of system.
* User Identification:: Finding the name and user id of the user.
* Time of Day:: Getting the current time.
-* Time Conversion:: Converting a time from numeric form to
+* Time Conversion:: Converting a time from numeric form to
calendrical data and vice versa.
* Time Parsing:: Converting a time from numeric form to text
and vice versa.
@@ -1438,7 +1438,7 @@ Tips and Conventions
GNU Emacs Internals
* Building Emacs:: How the dumped Emacs is made.
-* Pure Storage:: A kludge to make preloaded Lisp functions sharable.
+* Pure Storage:: Kludge to make preloaded Lisp functions shareable.
* Garbage Collection:: Reclaiming space for Lisp objects no longer used.
* Memory Usage:: Info about total size of Lisp objects made so far.
* 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.
@end group
@group
-(set-file-modes "~/junk/diffs" 438)
+(set-file-modes "~/junk/diffs" #o666)
@result{} nil
@end group
@group
-(format "%o" 438)
- @result{} "666" ; @r{Convert to octal.}
-@end group
-
-@group
% ls -l diffs
-rw-rw-rw- 1 lewis 0 3063 Oct 30 16:00 diffs
@end group
@@ -1570,10 +1565,10 @@ the bitwise complement of the ``umask'' value.
The argument @var{mode} must be an integer. On most systems, only the
low 9 bits of @var{mode} are meaningful. You can use the Lisp construct
-for octal character codes to enter @var{mode}; for example,
+for octal numbers to enter @var{mode}; for example,
@example
-(set-default-file-modes ?\644)
+(set-default-file-modes #o644)
@end example
Saving 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.
@menu
* Building Emacs:: How the dumped Emacs is made.
-* Pure Storage:: A kludge to make preloaded Lisp functions sharable.
+* Pure Storage:: Kludge to make preloaded Lisp functions shareable.
* Garbage Collection:: Reclaiming space for Lisp objects no longer used.
* Memory Usage:: Info about total size of Lisp objects made so far.
* 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
function definition is copied into pure storage.
This flag is @code{t} while loading all of the basic functions for
-building Emacs initially (allowing those functions to be sharable and
+building Emacs initially (allowing those functions to be shareable and
non-collectible). Dumping Emacs as an executable always writes
@code{nil} in this variable, regardless of the value it actually has
before 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.)
@cindex help for major mode
@cindex documentation for major mode
- The @code{describe-mode} function is provides information about major
+ The @code{describe-mode} function provides information about major
modes. It is normally bound to @kbd{C-h m}. It uses the value of the
variable @code{major-mode} (@pxref{Major Modes}), which is why every
major 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}).
Sometimes, you need to prefer several coding systems for some
operation, rather than fix a single one. Emacs lets you specify a
priority order for using coding systems. This ordering affects the
-sorting of lists of coding sysems returned by functions such as
+sorting of lists of coding systems returned by functions such as
@code{find-coding-systems-region} (@pxref{Lisp and Coding Systems}).
@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
fstab
ftp
fu
-funtions
garbles
gc
gcpro
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.
When the variable @code{inhibit-point-motion-hooks} is non-@code{nil},
the @code{intangible} property is ignored.
+Beware: this property operates at a very low level, and affects a lot of code
+in unexpected ways. So use it with extreme caution. A common misuse is to put
+an intangible property on invisible text, which is actually unnecessary since
+the command loop will move point outside of the invisible text at the end of
+each command anyway. @xref{Adjusting Point}.
+
@item field
@kindex field @r{(text property)}
Consecutive 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}.
Attempting to assign them any other value will result in an error:
@example
-(setq window-min-height 5.0)
-@error{} Wrong type argument: integerp, 5.0
+(setq undo-limit 1000.0)
+@error{} Wrong type argument: integerp, 1000.0
@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 @@
@end ifset
@c per rms and peterb, use 10pt fonts for the main text, mostly to
-@c save on paper cost.
+@c save on paper cost.
@c Do this inside @tex for now, so current makeinfo does not complain.
@tex
@ifset smallbook
@@ -1402,7 +1402,7 @@ Operating System Interface
* System Environment:: Distinguish the name and kind of system.
* User Identification:: Finding the name and user id of the user.
* Time of Day:: Getting the current time.
-* Time Conversion:: Converting a time from numeric form to
+* Time Conversion:: Converting a time from numeric form to
calendrical data and vice versa.
* Time Parsing:: Converting a time from numeric form to text
and vice versa.
@@ -1458,7 +1458,7 @@ Tips and Conventions
GNU Emacs Internals
* Building Emacs:: How the dumped Emacs is made.
-* Pure Storage:: A kludge to make preloaded Lisp functions sharable.
+* Pure Storage:: Kludge to make preloaded Lisp functions shareable.
* Garbage Collection:: Reclaiming space for Lisp objects no longer used.
* Memory Usage:: Info about total size of Lisp objects made so far.
* 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
* System Environment:: Distinguish the name and kind of system.
* User Identification:: Finding the name and user id of the user.
* Time of Day:: Getting the current time.
-* Time Conversion:: Converting a time from numeric form to
+* Time Conversion:: Converting a time from numeric form to
calendrical data and vice versa.
* Time Parsing:: Converting a time from numeric form to text
and vice versa.
@@ -1457,7 +1457,7 @@ Tips and Conventions
GNU Emacs Internals
* Building Emacs:: How the dumped Emacs is made.
-* Pure Storage:: A kludge to make preloaded Lisp functions sharable.
+* Pure Storage:: Kludge to make preloaded Lisp functions shareable.
* Garbage Collection:: Reclaiming space for Lisp objects no longer used.
* Memory Usage:: Info about total size of Lisp objects made so far.
* 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.
@defopt window-combination-resize
If this variable is @code{nil}, @code{split-window} can only split a
-window (denoted by @var{window}) if @var{window}'s screen area is
-large enough to accommodate both itself and the new window. This is
-the default.
-
-If this variable is non-@code{nil}, @code{split-window} tries to
-resize all windows that are part of the same combination as
-@var{window}, in order to accommodate the new window. In particular,
-this may allow @code{split-window} to succeed even if @var{window} is
-a fixed-size window or too small to ordinarily split. Furthermore,
-subsequently resizing or deleting @var{window} may resize all other
-windows in its combination.
-
-This variable has no effect if @code{window-combination-limit} is
-non-@code{nil} (see below).
+window (denoted by @var{window}) if @var{window}'s screen area is large
+enough to accommodate both itself and the new window.
+
+If this variable is @code{t}, @code{split-window} tries to resize all
+windows that are part of the same combination as @var{window}, in order
+to accommodate the new window. In particular, this may allow
+@code{split-window} to succeed even if @var{window} is a fixed-size
+window or too small to ordinarily split. Furthermore, subsequently
+resizing or deleting @var{window} may resize all other windows in its
+combination.
+
+The default is @code{nil}. Other values are reserved for future use.
+The value of this variable is ignored when
+@code{window-combination-limit} is non-@code{nil} (see below).
@end defopt
To illustrate the effect of @code{window-combination-resize},
@@ -857,9 +857,9 @@ If @code{window-combination-resize} is @code{nil}, splitting window
@end smallexample
@noindent
-If @code{window-combination-resize} is non-@code{nil}, splitting
-@code{W3} instead leaves all three live windows with approximately the
-same height:
+If @code{window-combination-resize} is @code{t}, splitting @code{W3}
+instead leaves all three live windows with approximately the same
+height:
@smallexample
@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 @@
+2011-12-28 Paul Eggert <eggert@cs.ucla.edu>
+
+ * gnus.texi (Mail Source Customization, Mail Back End Variables):
+ Use octal notation for file permissions, which are normally
+ thought of in octal.
+ (Mail Back End Variables): Use more-plausible modes in example.
+
+2011-12-20 Alan Mackenzie <acm@muc.de>
+
+ * cc-mode.texi: Update version string 5.31 -> 5.32.
+
+2011-12-06 Juanma Barranquero <lekktu@gmail.com>
+
+ * gnus-faq.texi (FAQ 2-1, FAQ 3-8, FAQ 4-14, FAQ 9-1): Fix typos.
+
2011-11-24 Glenn Morris <rgm@gnu.org>
* 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.
Note that the password needs to be evaluated if it's a function. It's
wrapped in a function to provide some security.
-Later, after a successful login, @code{nnimal.el} calls the
+Later, after a successful login, @code{nnimap.el} calls the
@code{:save-function} like so:
@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,
use @samp{[[-inf .. 0), (0 .. inf]]}. (There is no way in the
current notation to say that @code{x} is nonzero but not necessarily
real.) The @kbd{a e} command does ``unsafe'' simplifications,
-including cancelling @samp{x} from the equation when @samp{x} is
+including canceling @samp{x} from the equation when @samp{x} is
not known to be nonzero.
Another set of type symbols distinguish between scalars and vectors.
@@ -16873,7 +16873,7 @@ The @kbd{t U} (@code{calc-unix-time}) [@code{unixtime}] command
converts a date form into a Unix time value, which is the number of
seconds since midnight on Jan 1, 1970, or vice-versa. The numeric result
will be an integer if the current precision is 12 or less; for higher
-precisions, the result may be a float with (@var{precision}@minus{}12)
+precision, the result may be a float with (@var{precision}@minus{}12)
digits after the decimal. Just as for @kbd{t J}, the numeric time
is interpreted in the GMT time zone and the date form is interpreted
in 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.
The @kbd{M-6 t P} [@code{second}] function extracts the second
from a date form. If the current precision is 12 or less,
the result is an integer in the range 0 to 59. For higher
-precisions, the result may instead be a floating-point number.
+precision, the result may instead be a floating-point number.
@tindex weekday
The @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}
Calc can compute a variety of less common functions that arise in
various branches of mathematics. All of the functions described in
this section allow arbitrary complex arguments and, except as noted,
-will work to arbitrarily large precisions. They can not at present
+will work to arbitrarily large precision. They can not at present
handle error forms or intervals as arguments.
NOTE: These functions are still experimental. In particular, their
@@ -21903,7 +21903,7 @@ of our sample formula by selecting it and pressing @kbd{n}
@end smallexample
Unselecting the sub-formula reveals that the minus sign, which would
-normally have cancelled out with the subtraction automatically, has
+normally have canceled out with the subtraction automatically, has
not been able to do so because the subtraction was not part of the
selected portion. Pressing @kbd{=} (@code{calc-evaluate}) or doing
any other mathematical operation on the whole formula will cause it
@@ -22590,7 +22590,7 @@ described for multiplication.
Quotients of products cancel only in the leading terms of the
numerator and denominator. In other words, @expr{a x b / a y b}
-is cancelled to @expr{x b / y b} but not to @expr{x / y}. Once
+is canceled to @expr{x b / y b} but not to @expr{x / y}. Once
again this is because full cancellation can be slow; use @kbd{a s}
to cancel all terms of the quotient.
@@ -22810,7 +22810,7 @@ the distributive law. For example, @expr{a x^2 b / c x^3 d} will
cancel @expr{x^2} from the top and bottom to get @expr{a b / c x d}.
(The terms in the denominator will then be rearranged to @expr{c d x}
as described above.) If there is any common integer or fractional
-factor in the numerator and denominator, it is cancelled out;
+factor in the numerator and denominator, it is canceled out;
for example, @expr{(4 x + 6) / 8 x} simplifies to @expr{(2 x + 3) / 4 x}.
Non-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}.
If the argument is multiplied by a constant, and this constant
has a common integer divisor with the modulus, then this factor is
-cancelled out. For example, @samp{12 x % 15} is changed to
+canceled out. For example, @samp{12 x % 15} is changed to
@samp{3 (4 x % 5)} by factoring out 3. Also, @samp{(12 x + 1) % 15}
is changed to @samp{3 ((4 x + 1:3) % 5)}. While these forms may
not seem ``simpler,'' they allow Calc to discover useful information
@@ -22938,13 +22938,13 @@ function.
\bigskip
@end tex
-Equations and inequalities are simplified by cancelling factors
+Equations and inequalities are simplified by canceling factors
of products, quotients, or sums on both sides. Inequalities
-change sign if a negative multiplicative factor is cancelled.
+change sign if a negative multiplicative factor is canceled.
Non-constant multiplicative factors as in @expr{a b = a c} are
-cancelled from equations only if they are provably nonzero (generally
+canceled from equations only if they are provably nonzero (generally
because they were declared so; @pxref{Declarations}). Factors
-are cancelled from inequalities only if they are nonzero and their
+are canceled from inequalities only if they are nonzero and their
sign is known.
Simplification also replaces an equation or inequality with
@@ -23035,9 +23035,9 @@ The simplifications of @expr{@tfn{ln}(@tfn{exp}(x))},
unsafe because of problems with principal values (although these
simplifications are safe if @expr{x} is known to be real).
-Common factors are cancelled from products on both sides of an
+Common factors are canceled from products on both sides of an
equation, even if those factors may be zero: @expr{a x / b x}
-to @expr{a / b}. Such factors are never cancelled from
+to @expr{a / b}. Such factors are never canceled from
inequalities: Even @kbd{a e} is not bold enough to reduce
@expr{a x < b x} to @expr{a < b} (or @expr{a > b}, depending
on whether you believe @expr{x} is positive or negative).
@@ -23071,7 +23071,7 @@ If units auto-ranging mode is enabled, products or quotients in
which the first argument is a number which is out of range for the
leading unit are modified accordingly.
-When cancelling and combining units in products and quotients,
+When canceling and combining units in products and quotients,
Calc accounts for unit names that differ only in the prefix letter.
For example, @samp{2 km m} is simplified to @samp{2000 m^2}.
However, 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.''
@titlepage
@sp 10
-@center @titlefont{CC Mode 5.31}
+@center @titlefont{CC Mode 5.32}
@sp 2
@center @subtitlefont{A GNU Emacs mode for editing C and C-like languages}
@sp 2
@@ -378,7 +378,7 @@ was added in version 5.30.
This manual describes @ccmode{}
@comment The following line must appear on its own, so that the
-version 5.31.
+version 5.32.
@comment Release.py script can update the version number automatically
@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
a user function. The last character of the function name and the
opening parenthesis are highlighted. This font-locking rule will
spuriously highlight a valid concatenation expression where an
-identifier precedes a parenthesised expression. Unfortunately.
+identifier precedes a parenthesized expression. Unfortunately.
@item
Whitespace 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}.
@var{bus} can be either the symbol @code{:system} or the symbol
@code{:session}, or it can be a string denoting the address of the
-corresponding bus. For the system and session busses, this function
+corresponding bus. For the system and session buses, this function
is called when loading @file{dbus.el}, there is no need to call it
again.
@@ -1816,7 +1816,7 @@ handled by a hook function.
@defvar dbus-event-error-hooks
This hook variable keeps a list of functions, which are called when a
D-Bus error happens in the event handler. Every function must accept
-two arguments, the event and the error variable catched in
+two arguments, the event and the error variable caught in
@code{condition-case} by @code{dbus-error}.
Such 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.
@table @kbd
@item SPC
This command views the class declaration if the database
-contains informations about it. If you don't parse the entire source
+contains information about it. If you don't parse the entire source
you are working on, some classes will only be known to exist but the
location of their declarations and definitions will not be known.@refill
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
by the @samp{ede-speedbar} interface.
@item ede-want-file-p
Return non-nil if a target will accept a given file.
-It is generally unecessary to override this. See the section on source
+It is generally unnecessary to override this. See the section on source
code.
@item ede-buffer-mine
Return non-nil if a buffer belongs to this target. Used during
-association when a file is loaded. It is generally unecessary to
+association when a file is loaded. It is generally unnecessary to
override this unless you keep auxiliary files.
@end table
@@ -2483,7 +2483,7 @@ Create the make rule needed to create an archive for @var{THIS}.
@deffn Method ede-proj-makefile-insert-source-variables :PRIMARY this
Insert bin_PROGRAMS variables needed by target @var{THIS}.
-We aren't acutally inserting SOURCE details, but this is used by the
+We aren't actually inserting SOURCE details, but this is used by the
Makefile.am generator, so use it to add this important bin program.
@end deffn
@@ -2624,7 +2624,7 @@ Return the name of the main target for @var{THIS} target.
@deffn Method ede-proj-makefile-insert-automake-pre-variables :AFTER this
Insert bin_PROGRAMS variables needed by target @var{THIS}.
-We aren't acutally inserting SOURCE details, but this is used by the
+We aren't actually inserting SOURCE details, but this is used by the
Makefile.am generator, so use it to add this important bin program.
@end deffn
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.
@vindex mm-inline-text-html-with-images
Some @acronym{HTML} mails might have the trick of spammers using
@samp{<img>} tags. It is likely to be intended to verify whether you
-have read the mail. You can prevent your personal informations from
+have read the mail. You can prevent your personal information from
leaking by setting this option to @code{nil} (which is the default).
It is currently ignored by Emacs/w3. For emacs-w3m, you may use the
command @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.
@item Using C-p and C-n with rebind gets into a locked state
-This happened a few times in Emacs 21, but has been unreproducible
+This happened a few times in Emacs 21, but has been irreproducible
since.
@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?
@subsubheading Answer
This message means that the last time you used Gnus, it
-wasn't properly exited and therefor couldn't write its
-informations to disk (e.g. which messages you read), you
-are now asked if you want to restore those informations
+wasn't properly exited and therefore couldn't write its
+information to disk (e.g. which messages you read), you
+are now asked if you want to restore that information
from the auto-save file.
To 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
it should store the mail, in Gnus terminology which back end
to use. Gnus supports many different back ends, the most
commonly used one is nnml. It stores every mail in one file
-and is therefor quite fast. However you might prefer a one
+and is therefore quite fast. However you might prefer a one
file per group approach if your file system has problems with
many small files, the nnfolder back end is then probably the
choice 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
@end example
@noindent
-Now we need to tell Gnus, where to get it's mail from. If
+Now we need to tell Gnus, where to get its mail from. If
it's a POP3 server, then you need something like this:
@example
@@ -1104,11 +1104,11 @@ I don't like the way the Summary buffer looks, how to tweak it?
@subsubheading Answer
You've got to play around with the variable
-gnus-summary-line-format. It's value is a string of
+gnus-summary-line-format. Its value is a string of
symbols which stand for things like author, date, subject
etc. A list of the available specifiers can be found in the
manual node "Summary Buffer Lines" and the often forgotten
-node "Formatting Variables" and it's sub-nodes. There
+node "Formatting Variables" and its sub-nodes. There
you'll find useful things like positioning the cursor and
tabulators which allow you a summary in table form, but
sadly hard tabulators are broken in 5.8.8.
@@ -1838,7 +1838,7 @@ inconvenient since you are not displaying the found mail
in Gnus. Here comes nnir into action. Nnir is a front end
to search engines like swish-e or swish++ and
others. You index your mail with one of those search
-engines and with the help of nnir you can search trough
+engines and with the help of nnir you can search through
the indexed mail and generate a temporary group with all
messages which met your search criteria. If this sound
cool to you get nnir.el from
@@ -2190,7 +2190,7 @@ Starting Gnus is really slow, how to speed it up?
@subsubheading Answer
-The reason for this could be the way Gnus reads it's
+The reason for this could be the way Gnus reads its
active file, see the node "The Active File" in the Gnus
manual for things you might try to speed the process up.
An 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
the @code{sieve} group parameter (@pxref{Group Parameters}) to specify
sieve rules that should apply to each group. Gnus provides two
commands to translate all these group parameters into a proper Sieve
-script that can be transfered to the server somehow.
+script that can be transferred to the server somehow.
@vindex gnus-sieve-file
@vindex gnus-sieve-region-start
@@ -8332,7 +8332,7 @@ Files with name matching this regular expression won't be viewed.
Files with a @acronym{MIME} type matching this variable won't be viewed.
Note that Gnus tries to guess what type the file is based on the name.
@code{gnus-uu} is not a @acronym{MIME} package (yet), so this is slightly
-kludgey.
+kludgy.
@item gnus-uu-tmp-dir
@vindex gnus-uu-tmp-dir
@@ -8976,7 +8976,7 @@ Translate many non-@acronym{ASCII} characters into their
@acronym{ASCII} equivalents (@code{gnus-article-treat-non-ascii}).
This is mostly useful if you're on a terminal that has a limited font
and doesn't show accented characters, ``advanced'' punctuation, and the
-like. For instance, @samp{»} is tranlated into @samp{>>}, and so on.
+like. For instance, @samp{»} is translated into @samp{>>}, and so on.
@item W Y f
@kindex W Y f (Summary)
@@ -11634,7 +11634,7 @@ message/external-body @acronym{MIME} type.
@item r (Article)
@kindex r (Article)
Prompt for a file name, replace the @acronym{MIME} object with an
-external body refering to the file via the message/external-body
+external body referring to the file via the message/external-body
@acronym{MIME} type. (@code{gnus-mime-replace-part}).
@findex gnus-mime-delete-part
@@ -15033,7 +15033,7 @@ number.
@item mail-source-default-file-modes
@vindex mail-source-default-file-modes
-All new mail files will get this file mode. The default is 384.
+All new mail files will get this file mode. The default is @code{#o600}.
@item mail-source-movemail-program
@vindex mail-source-movemail-program
@@ -15123,10 +15123,10 @@ default file modes the new mail files get:
@lisp
(add-hook 'nnmail-pre-get-new-mail-hook
- (lambda () (set-default-file-modes 511)))
+ (lambda () (set-default-file-modes #o700)))
(add-hook 'nnmail-post-get-new-mail-hook
- (lambda () (set-default-file-modes 551)))
+ (lambda () (set-default-file-modes #o775)))
@end lisp
@item nnmail-use-long-file-names
@@ -30012,7 +30012,7 @@ this:
@node Score File Syntax
@subsection Score File Syntax
-Score files are meant to be easily parseable, but yet extremely
+Score files are meant to be easily parsable, but yet extremely
malleable. It was decided that something that had the same read syntax
as an Emacs Lisp list would fit that spec.
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
tutorial. This was the invoked using @kbd{C-c ?}, and displays
information about the IDL routine near the cursor position. Wouldn't it
be nice to have the same kind of information available for your own
-routines and for the huge amount of code in major libraries like JHUPL
+routines and for the huge amount of code in major libraries like JHUAPL
or the IDL-Astro library? In many cases, you may already have this
information. Files named @file{.idlwave_catalog} in library directories
contain 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
corresponding source code or DocLib header will be used as the help
text.
-@cindex Completion, cancelling
-@cindex Cancelling completion
+@cindex Completion, canceling
+@cindex Canceling completion
Completion is not a blocking operation --- you are free to continue
editing, enter commands, or simply ignore the @file{*Completions*}
buffer 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:
Hallvard B Furuseth <h.b.furuseth@@usit.uio.no> writes:
@end example
-@c FIXME: Add `message-insert-formated-citation-line' and
+@c FIXME: Add `message-insert-formatted-citation-line' and
@c `message-citation-line-format'
Point 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}.
@tab Should sorting be case-sensitive? Default @code{nil}.
@item @code{:sitemap-file-entry-format}
-@tab With this option one can tell how a sitemap's entry is formated in the
+@tab With this option one can tell how a sitemap's entry is formatted in the
sitemap. This is a format string with some escape sequences: @code{%t} stands
for the title of the file, @code{%a} stands for the author of the file and
@code{%d} stands for the date of the file. The date is retrieved with the
-@code{org-publish-find-date} function and formated with
+@code{org-publish-find-date} function and formatted with
@code{org-publish-sitemap-date-format}. Default @code{%t}.
@item @code{:sitemap-date-format}
@tab Format string for the @code{format-time-string} function that tells how
-a sitemap entry's date is to be formated. This property bypasses
+a sitemap entry's date is to be formatted. This property bypasses
@code{org-publish-sitemap-date-format} which defaults to @code{%Y-%m-%d}.
@item @code{:sitemap-sans-extension}
@@ -12469,7 +12469,7 @@ block. E.g., @code{:results value html}.
Results assumed to be LaTeX and are enclosed in a @code{begin_latex} block.
E.g., @code{:results value latex}.
@item @code{code}
-Result are assumed to be parseable code and are enclosed in a code block.
+Result are assumed to be parsable code and are enclosed in a code block.
E.g., @code{:results value code}.
@item @code{pp}
The 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.
@item rcirc-authinfo
@vindex rcirc-authinfo
-@cindex authentification
+@cindex authentication
@cindex identification
@cindex nickserv
@cindex login
@@ -547,7 +547,7 @@ And here are the valid method symbols and the arguments they require:
@table @code
@item nickserv
-@cindex nickserv authentification
+@cindex nickserv authentication
Use this symbol if you need to identify yourself as follows when
connecting to a network: @code{/msg nickserv identify secret}. The
necessary 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
details. (Using @code{/msg nickserv help}, for example.)
@item chanserv
-@cindex chanserv authentification
+@cindex chanserv authentication
Use this symbol if you need to identify yourself as follows if you want
to join a particular channel: @code{/msg chanserv identify #underground
secret}. 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.
(Using @code{/msg chanserv help}, for example.)
@item bitlbee
-@cindex bitlbee authentification
+@cindex bitlbee authentication
Use this symbol if you need to identify yourself in the Bitlbee channel
as follows: @code{identify secret}. The necessary arguments are the
nickname 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
other instant messaging services. You can either install Bitlbee
locally or use a public Bitlbee server. There, you need to create an
account with a password. This is the nick and password you need to
-provide for the bitlbee authentification method.
+provide for the bitlbee authentication method.
Later, you will tell Bitlbee about your accounts and passwords on all
the 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.
@item semanticdb-ref.el
Tracks crossreferences. Cross references are needed when buffer is
-reparsed, and must alert other tables that any dependant caches may
+reparsed, and must alert other tables that any dependent caches may
need to be flushed. References are in the form of include files.
@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.
@cindex methods, inline
@cindex methods, external
Loading or saving a remote file requires that the content of the file
-be transfered between the two machines. The content of the file can
-be transfered using one of two methods: the @dfn{inline method} over
+be transferred between the two machines. The content of the file can
+be transferred using one of two methods: the @dfn{inline method} over
the same connection used to log in to the remote machine, or the
@dfn{external method} through another connection using a remote copy
program such as @command{rcp}, @command{scp} or @command{rsync}.
@@ -3704,4 +3704,4 @@ for @value{emacsothername}.
@c host and then send commands to it.
@c * Use `filename' resp. `file name' consistently.
@c * Use `host' resp. `machine' consistently.
-@c * Consistent small or capitalized words especially in menues.
+@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 @@
+2011-12-10 Lars Magne Ingebrigtsen <larsi@gnus.org>
+
+ * NEWS: Mention auth-source twice in connection with smtpmail to
+ clarify that smtpmail uses auth-source.
+
2011-11-20 Bill Wohler <wohler@newt.com>
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."
The `mh-showing-mode' variable is now defined with `define-minor-mode'
(closes SF #482666).
+*** Desktop fails to restore MH-Folder buffers
+
+When restoring MH folders from ".emacs.desktop", Emacs now opens them in
+the expected `mh-folder' mode instead of `dired-mode' (closes SF #1510145)
+
+*** *MH-E Log* buffer can point to removed directory
+This was caused by using `set-buffer' instead of
+`with-current-buffer.' This has been fixed thanks to Stefan Monnier
+(closes SF #1903293).
+
* 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.
** Completion
*** shell-mode uses pcomplete rules, with the standard completion UI.
-
++++
*** Many packages have been changed to use `completion-at-point'
rather than their own completion code.
-
++++
*** `completion-at-point' now handles tags and semantic completion.
---
*** 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
case you won't see any difference. But if you changed it to be a list
of user names and passwords, that setting is now ignored; you will be
prompted for the user name and the password, which will then be saved
-to ~/.authinfo.
+to ~/.authinfo. (To control where and how the credentials are stored,
+see the auth-source manual. You may want to change the auth-source
+preferences if you want to store the credentials encrypted, for
+instance.)
You can also manually copy the credentials to your ~/.authinfo file.
For example, if you had
@@ -545,7 +548,7 @@ the lines in the current rectangle. With a prefix argument, this
prompts for a number to count from and for a format string.
+++
-** The default value of redisplay-dont-change is now t
+** The default value of redisplay-dont-pause is now t
This makes Emacs feel more responsive to editing commands that arrive
at high rate, e.g. if you lean on some key, because stopping redisplay
in 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).
** browse-url has a new variable `browse-url-mailto-function'
specifies how mailto: URLs are handled. The default is `browse-url-mail'.
+---
** BibTeX mode
*** BibTeX mode now supports biblatex.
@@ -622,7 +626,7 @@ view-diary-entries, list-diary-entries, show-all-diary-entries
** comint and modes derived from it use the generic completion code.
** Compilation mode
-
+---
*** Compilation mode can be used without font-lock-mode.
`compilation-parse-errors-function' is now obsolete.
@@ -661,7 +665,7 @@ The new function dbus-register-service registers a service known name
on a D-Bus without simultaneously registering a property or a method.
** Dired-x
-
+---
*** dired-jump and dired-jump-other-window called with a prefix argument
read a file name from the minibuffer instead of using buffer-file-name.
@@ -829,25 +833,29 @@ controlling the degree of parallelism.
** VC and related modes
++++
*** Support for pulling on distributed version control systems.
-The vc-pull command runs a "pull" operation, if it is supported.
-This updates the current branch from upstream. A prefix argument
-means to prompt the user for specifics, e.g. a pull location.
+`C-x v +' (`vc-pull') runs a "pull" operation, if it is supported, to
+update the current branch and working tree. A prefix argument means
+to prompt the user for specifics, e.g. a pull location.
**** `vc-update' is now an alias for `vc-pull'.
**** Currently supported by Bzr, Git, and Mercurial.
++++
*** Support for merging on distributed version control systems.
-The vc-merge command now runs a "merge" operation, if it is supported.
-This merges another branch into the current one. This command prompts
-the user for specifics, e.g. a merge source.
+The vc-merge command now runs a "merge" operation, if it is supported,
+to merge changes from another branch into the current one. It prompts
+for specifics, e.g. a merge source.
**** Currently supported for Bzr, Git, and Mercurial.
++++
*** New option `vc-revert-show-diff' controls whether `vc-revert'
shows a diff while querying the user. It defaults to t.
++++
*** Log entries in some Log View buffers can be toggled to display a
longer description by typing RET (log-view-toggle-entry-display).
In 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.
**** Packages using Log View mode can enable this functionality by
binding `log-view-expanded-log-entry-function' to a suitable function.
++++
*** New command `vc-ediff' allows visual comparison of two revisions
of a file similar to `vc-diff', but using ediff backend.
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.
So that such output processing may be done efficiently, there is a new
variable, comint-last-output-start, that records the position of the start of
-the lastest output inserted into the buffer (effectively the previous value
+the last output inserted into the buffer (effectively the previous value
of process-mark). Output processing functions should process the text
between comint-last-output-start (or perhaps the beginning of the line that
the 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
1. This copies the text from the right-hand buffer as a second column
in the other buffer. To go back to two-column editing, use C-x 6 s.
-Use C-x 6 d to disassociate the two buffers, leaving each as it
+Use C-x 6 d to dissociate the two buffers, leaving each as it
stands. (If the other buffer, the one that was not current when you
type C-x 6 d, is empty, C-x 6 d kills it.)
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
further filter candidate files.
One advantage of using this function is that the list of suffixes in
-`exec-suffixes' is OS-dependant, so this function will find
+`exec-suffixes' is OS-dependent, so this function will find
executables without polluting Lisp code with OS dependencies.
*** 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).
*** The mode-line tooltips have been improved to provide more details.
-*** The VC, line/colum number and minor mode indicators on the mode
+*** The VC, line/column number and minor mode indicators on the mode
line are now interactive: mouse-1 can be used on them to pop up a menu.
** 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
When the variable `file-precious-flag' is set, the success of a remote
file copy is checked via the file's checksum.
-*** Passwords can be read from an authentification file.
+*** Passwords can be read from an authentication file.
Tramp uses the package `auth-source' to read passwords from a file, if
necessary.
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.
*** image-type-header-regexps priorities the jpeg loader over the
ImageMagick one. This is not wrong, but how should a user go about
-prefering the ImageMagick loader? The user might like zooming etc in jpegs.
+preferring the ImageMagick loader? The user might like zooming etc in jpegs.
Try (setq image-type-header-regexps nil) for a quick hack to prefer
ImageMagick 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."
----
template variable-same-line-comment :tag
-"A comment occurring after a veriable declaration.
+"A comment occurring after a variable declaration.
Recycle doxygen comment code from the more general template set."
----
{{>: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
----
template variable-same-line-comment :tag
-"A comment occurring after a veriable declaration."
+"A comment occurring after a variable declaration."
----
{{comment_start}} {{?DOC}} {{comment_end}}
----
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."
----
template variable-same-line-comment :tag
-"A comment occurring after a veriable declaration.
+"A comment occurring after a variable declaration.
Recycle javadoc comment code from the more general template set."
----
{{>: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$
'($MODESYM$-mode-font-lock-keywords
nil ;; perform string/comment fontification
nil ;; keywords are case sensitive.
- ;; This puts _ & - as a word constituant,
+ ;; This puts _ & - as a word constituent,
;; simplifying our keywords significantly
((?_ . "w") (?- . "w"))))
(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$"
bind "p"
template priority :blank
-"Insert a priority statemept."
+"Insert a priority statement."
----
set priority $^$
----
template application :blank
-"Insert a priority statemept."
+"Insert an application statement."
----
set application "$^$"
----
diff --git a/leim/ChangeLog b/leim/ChangeLog
index ed8aec0b16d..57c5a406785 100644
--- a/leim/ChangeLog
+++ b/leim/ChangeLog
@@ -1,3 +1,8 @@
+2011-12-15 Kenichi Handa <handa@m17n.org>
+
+ * quail/ethiopic.el ("ethiopic"): Do not refer to
+ ethio-prefer-ascii-punctuation.
+
2011-11-20 Juanma Barranquero <lekktu@gmail.com>
* quail/hangul.el (hangul-character): Fix typo.
@@ -1801,7 +1806,7 @@
1998-07-21 Kenichi Handa <handa@etl.go.jp>
* quail/japanese.el (quail-japanese-kanji-kkc): Handle the case
- that conversion is cancelled in kkc-region.
+ that conversion is canceled in kkc-region.
(quail-japanese-switch-package): Fix previous change.
1998-07-19 Kenichi Handa <handa@etl.go.jp>
@@ -1890,7 +1895,7 @@
* Makefile.in (${TIT}): To byte-compile quail packages, use just
built quail.
-1997-12-09 Koaunghi Un <koanughi.un@zdv.uni-tuebingen.de>
+1997-12-09 Koaunghi Un <koaunghi.un@zdv.uni-tuebingen.de>
* quail/hanja3.el: New file.
@@ -1998,7 +2003,7 @@
(quail-mode-map): Change binding for ethio-insert-ethio-space.
(quail-mode-hook): Check the current Quail package name.
- * quail/latin-post.el: Add rules for cancelling accents by typing
+ * quail/latin-post.el: Add rules for canceling accents by typing
two accent keys (e.g. a~ => a-tilde, a~~ => a~) to all Quail
packages.
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 @@
-;;; quail/croatian.el -- Quail package for inputing Croatian -*-coding: iso-8859-2;-*-
+;;; quail/croatian.el -- Quail package for inputting Croatian -*-coding: iso-8859-2;-*-
;; Copyright (C) 2003-2011 Free Software Foundation, Inc.
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.
All digits except of `1' are replaced by Czech characters as on the standard
Czech keyboard.
`[' and `]' are replaced with `,Bz(B' and `,By(B', respectively.
-There are two dead keys on `=' and `+'. Characters with diaresis are
+There are two dead keys on `=' and `+'. Characters with diaereses are
accessible through `+='.
All other keys are the same as on standard US keyboard."
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 @@
"ethiopic" "Ethiopic"
'("$(3$Q#U!.(B "
(ethio-prefer-ascii-space "_" "$(3$h(B")
- (ethio-prefer-ascii-punctuation "." "$(3$i(B"))
+ "$(3$i(B")
t " Quail package for Ethiopic (Tigrigna and Amharic)
When 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
theta Q q
iota I i
kappa K k
-lamda L l
+lambda L l
mu M m
nu N n
xi X x
@@ -433,7 +433,7 @@ eta H h
theta J j
iota I i
kappa K k
-lamda L l
+lambda L l
mu M m
nu N n
xi X x
@@ -1147,7 +1147,7 @@ nil t t nil nil nil nil nil nil nil t)
In the right of ,Fk(B key is a combination key, where
,F4(B acute
- ,F((B diaresis
+ ,F((B diaeresis
e.g.
,F4(B + ,Fa(B -> ,F\(B
@@ -1289,7 +1289,7 @@ e.g.
In the right of ,Fk(B key is a combination key, where
,F4(B acute
- ,F((B diaresis
+ ,F((B diaeresis
e.g.
,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 @@
;; Copyright (C) 1997, 1999, 2001-2011 Free Software Foundation, Inc.
-;; Author: Koaunghi Un <koanughi.un@zdv.uni-tuebingen.de>
+;; Author: Koaunghi Un <koaunghi.un@zdv.uni-tuebingen.de>
;; Keywords: mule, quail, multilingual, input method, Korean, Hanja
;; 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 @@
;;; Commentary:
;;
;; This file contains a collection of input methods for
-;; Persian languages (Farsi, Urdu, Pashto/Afghanic, ...)
+;; Persian languages - Farsi, Urdu, Pashto (Afghani), ...
;;
;; At this time, the following input methods are specified:
;;
@@ -194,11 +194,11 @@ Based on ISIRI-9149 Layout of Persian Letters and Symbols on Computer Keyboards.
;;;
;;; This translit keyboard is designed to be intuitive such that
;;; mapping are easy and natural to remember for a persian writer.
-;;; For some persian characters there are multiple ways of inputing
+;;; For some persian characters there are multiple ways of inputting
;;; the same character.
;;;
;;; The letter 'h' is used for a number of two character mappings,
-;;; this means that some character sequence inputs need to be repeated
+;;; this means that some character sequence inputs need to be repeated
;;; followed by a backspace followed by the 'h'.
;;; For example: سحر = 's' 's' '<bs>' 'h' 'h' 'r'
;;; 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 @@
+2011-12-25 Andreas Schwab <schwab@linux-m68k.org>
+
+ * etags.c (C_entries): Properly skip over string and character
+ constants and comments inside brackets. (Bug#10357)
+
+2011-12-04 Juanma Barranquero <lekktu@gmail.com>
+
+ * emacsclient.c (decode_options) [WINDOWSNT]: Don't force tty = 0;
+ instead, treat both -c and -t as always requesting a new "tty" frame,
+ and let server.el decide which kind is actually required.
+ Reported by Uwe Siart <usenet@siart.de> in this thread:
+ http://lists.gnu.org/archive/html/emacs-devel/2011-11/msg00303.html
+
2011-11-30 Chong Yidong <cyd@gnu.org>
* emacsclient.c (main): Condition last change on WINDOWSNT
@@ -3129,7 +3142,7 @@
(main): Call put_entries here even in CTAGS mode.
(main, process_file): Check the return values of fclose and pclose.
(process_file): Do not call put_entries after parsing each file.
- (process_file): Canonicalise file names even for ctags.
+ (process_file): Canonicalize file names even for ctags.
(process_file): Set curfile here...
(find_entries): ... not here any more.
(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)
if (display && strlen (display) == 0)
display = NULL;
+#ifdef WINDOWSNT
+ /* Emacs on Windows does not support GUI and console frames in the same
+ instance. So, it makes sense to treat the -t and -c options as
+ equivalent, and open a new frame regardless of whether the running
+ instance is GUI or console. Ideally, we would only set tty = 1 when
+ the instance is running in a console, but alas we don't know that.
+ The simplest workaround is to always ask for a tty frame, and let
+ server.el check whether it makes sense. */
+ if (tty || !current_frame)
+ {
+ display = (const char *) ttyname;
+ current_frame = 0;
+ tty = 1;
+ }
+#endif
+
/* If no display is available, new frames are tty frames. */
if (!current_frame && !display)
tty = 1;
@@ -654,14 +670,6 @@ decode_options (int argc, char **argv)
an empty string");
exit (EXIT_FAILURE);
}
-
- /* TTY frames not supported on Windows. Continue using GUI rather than
- forcing the user to change their command-line. This is required since
- tty is set above if certain options are given and $DISPLAY is not set,
- which is not obvious to users. */
- if (tty)
- tty = 0;
-
#endif /* WINDOWSNT */
}
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)
}
continue;
}
- else if (bracketlev > 0)
- {
- switch (c)
- {
- case ']':
- if (--bracketlev > 0)
- continue;
- break;
- case '\0':
- CNL_SAVE_DEFINEDEF ();
- break;
- }
- continue;
- }
else switch (c)
{
case '"':
inquote = TRUE;
+ if (bracketlev > 0)
+ continue;
if (inattribute)
break;
switch (fvdef)
@@ -3224,9 +3212,11 @@ C_entries (int c_ext, FILE *inf)
continue;
case '\'':
inchar = TRUE;
+ if (bracketlev > 0)
+ continue;
if (inattribute)
break;
- if (fvdef != finlist && fvdef != fignore && fvdef !=vignore)
+ if (fvdef != finlist && fvdef != fignore && fvdef != vignore)
{
fvextern = FALSE;
fvdef = fvnone;
@@ -3238,6 +3228,8 @@ C_entries (int c_ext, FILE *inf)
incomm = TRUE;
lp++;
c = ' ';
+ if (bracketlev > 0)
+ continue;
}
else if (/* cplpl && */ *lp == '/')
{
@@ -3270,7 +3262,7 @@ C_entries (int c_ext, FILE *inf)
for (cp = newlb.buffer; cp < lp-1; cp++)
if (!iswhite (*cp))
{
- if (*cp == '*' && *(cp+1) == '/')
+ if (*cp == '*' && cp[1] == '/')
{
cp++;
cpptoken = TRUE;
@@ -3284,7 +3276,17 @@ C_entries (int c_ext, FILE *inf)
continue;
case '[':
bracketlev++;
- continue;
+ continue;
+ default:
+ if (bracketlev > 0)
+ {
+ if (c == ']')
+ --bracketlev;
+ else if (c == '\0')
+ CNL_SAVE_DEFINEDEF ();
+ continue;
+ }
+ break;
} /* switch (c) */
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index c77ace6d483..78cc1862c2f 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,383 @@
+2011-12-28 Chong Yidong <cyd@gnu.org>
+
+ * progmodes/gdb-mi.el (gdb-get-source-file-list)
+ (gdb-get-source-file): Move mode line update to
+ gdb-get-source-file (Bug#10087).
+
+2011-12-25 Chong Yidong <cyd@gnu.org>
+
+ * progmodes/gud.el (gud-gdb-fetch-lines-filter): Just use
+ gud-gdb-marker-filter without taking it as an argument.
+ (gud-gdb-run-command-fetch-lines): Caller changed.
+ (gud-gdb-completion-function): New variable.
+ (gud-gdb-completion-at-point): Use it.
+ (gud-gdb-completions-1): Split from gud-gdb-completions.
+
+ * progmodes/gdb-mi.el (gdb-input): Accept command and handler
+ function as separate arguments.
+ (gdb-init-1, gdb-non-stop-handler, gdb-check-target-async)
+ (gdb-tooltip-print-1, gud-watch, gdb-speedbar-update)
+ (gdb-var-list-children, gdb-var-set-format, gdb-var-delete-1)
+ (gdb-var-delete-children, gdb-edit-value, gdb-var-update)
+ (gdb-stopped, def-gdb-auto-update-trigger)
+ (gdb-place-breakpoints, gdb-select-thread, gdb-select-frame)
+ (gdb-get-changed-registers, gdb-get-main-selected-frame): Callers
+ changed.
+ (gud-gdbmi-completions): New function.
+ (gdb): Use it for generating the completion table.
+
+2011-12-24 Alan Mackenzie <acm@muc.de>
+
+ Introduce a mechanism to widen the region used in context font
+ locking. Use this to protect declarations from losing their
+ contexts.
+
+ * progmodes/cc-langs.el (c-before-font-lock-functions): replace
+ c-set-fl-decl-start with c-change-set-fl-decl-start (Renaming).
+ (c-before-context-fontification-functions): new defvar, a list of
+ functions to be run just before context (etc.) font locking.
+
+ * progmodes/cc-mode.el (c-extend-font-lock-region-for-macros):
+ new, functionality extracted from
+ c-neutralize-syntax-in-and-mark-CPP.
+ (c-in-after-change-fontification): new variable.
+ (c-after-change): Set c-in-after-change-fontification.
+ (c-set-fl-decl-start): Rejig its interface, so it can be called
+ from both after-change and context fontifying.
+ (c-change-set-fl-decl-start, c-context-set-fl-decl-start): new
+ functions.
+ (c-standard-font-lock-fontify-region-function): new variable.
+ (c-font-lock-fontify-region): new function.
+
+2011-12-24 Juri Linkov <juri@jurta.org>
+
+ * window.el (window--state-get-1): Set `FORCE' arg of `mark' to t.
+ (Bug#10348)
+
+2011-12-23 Michael Albinus <michael.albinus@gmx.de>
+
+ * net/ange-ftp.el (ange-ftp-copy-file-internal): Check for
+ existence of source file. (Bug#10325)
+
+2011-12-23 Alan Mackenzie <acm@muc.de>
+
+ Fix unstable fontification inside templates.
+
+ * progmodes/cc-langs.el (c-before-font-lock-functions): newly
+ created from the singular version. The (c c++ objc) entry now
+ additionally has c-set-fl-decl-start. The other languages (apart
+ from AWK) have that as a single entry.
+
+ * progmodes/cc-fonts.el (c-font-lock-enclosing-decls): The
+ functionality for "local" declarations has been extracted to
+ c-set-fl-decl-start.
+
+ * progmodes/cc-mode.el: (c-common-init, c-after-change): Changes
+ due to pluralisation of c-before-font-lock-functions.
+ (c-set-fl-decl-start): New function, extracted from
+ c-font-lock-enclosing-decls and enhanced.
+
+2011-12-23 Juanma Barranquero <lekktu@gmail.com>
+
+ * desktop.el (desktop-internal-v2s): Fix typos in docstring (bug#10353).
+
+2011-12-22 Juri Linkov <juri@jurta.org>
+
+ * progmodes/grep.el (rgrep): Fix docstring. (Bug#10185)
+
+2011-12-22 Chong Yidong <cyd@gnu.org>
+
+ * vc/vc-hooks.el (vc-keep-workfiles): Doc fix.
+
+2011-12-21 Drew Adams <drew.adams@oracle.com>
+
+ * files.el (file-remote-p): Fix docstring. (Bug#10319)
+
+2011-12-21 Jérémy Compostella <jeremy.compostella@gmail.com>
+
+ * battery.el (battery-linux-sysfs): Add missing parameters from acpi.
+
+2011-12-21 Teodor Zlatanov <tzz@lifelogs.com>
+
+ * progmodes/cfengine.el: Add Version.
+
+ Add CFEngine 3.x syntax highlighting and support with
+ `cfengine3-mode', and rename the old `cfengine-mode' to
+ `cfengine2-mode'. Make `cfengine-mode' an automatic content-based
+ switcher between `cfengine3-mode' and `cfengine2-mode' by aliasing
+ it to `cfengine-auto-mode'. Rename variables specific to
+ `cfengine2-mode' from cfengine-* to cfengine2-*. Change the
+ modeline indicator to "CFE2" and "CFE3" depending on the mode, to
+ save space. Mark `cfengine-mode-abbrevs' as obsolete.
+
+2011-12-21 Chong Yidong <cyd@gnu.org>
+
+ * vc/vc-bzr.el (vc-bzr-rename-file): Don't pass ~ to Bzr in
+ filename argument.
+
+2011-12-20 Martin Rudalics <rudalics@gmx.at>
+
+ * window.el (window-normalize-buffer-to-display): Remove.
+ (display-buffer): Handle buffer-or-name argument as in Emacs 23.
+
+2011-12-19 Chong Yidong <cyd@gnu.org>
+
+ * vc/vc-dir.el (vc-dir-parent-marked-p, vc-dir-children-marked-p):
+ Don't signal an error in a predicate function; return non-nil.
+ (vc-dir-mark-file): Move the error here.
+ (vc-dir-mark-unmark): If acting on the region, keep going if one
+ of the entries cannot be marked/unmarked.
+ (vc-dir-mark-all-files): If current entry is a directory, mark
+ only child files, as documented.
+
+2011-12-19 Vincent Belaïche <vincentb1@users.sourceforge.net>
+
+ * ses.el: Ooops... undo changes of 2011-12-11T14:49:48Z!vincentb1@users.sourceforge.net, as trunk
+ branch is feature frozen, and 2011-12-11T14:49:48Z!vincentb1@users.sourceforge.net was a feature
+ addition.
+
+2011-12-18 Jan Djärv <jan.h.d@swipnet.se>
+
+ * term/ns-win.el (ns-get-selection-internal)
+ (ns-store-selection-internal): Declare.
+ (ns-store-cut-buffer-internal, ns-get-cut-buffer-internal):
+ Declare as obsolete.
+ (ns-get-pasteboard, ns-paste-secondary):
+ Use ns-get-selection-internal.
+ (ns-set-pasteboard, ns-copy-including-secondary):
+ Use ns-store-selection-internal.
+
+2011-12-17 Chong Yidong <cyd@gnu.org>
+
+ * vc/vc.el (vc-next-action): Doc fix; remove CVS-isms.
+ (vc-deduce-fileset): Doc fix.
+
+2011-12-16 Andreas Schwab <schwab@linux-m68k.org>
+
+ * calc/calc-misc.el (calc-help): Avoid wrapping help message.
+
+2011-12-13 Sam Steingold <sds@gnu.org>
+
+ * man.el (Man-getpage-in-background): When running under a
+ window-system, ignore $MANWIDTH and $COLUMNS.
+
+2011-12-15 Kenichi Handa <handa@m17n.org>
+
+ * language/ethio-util.el: Change coding tag to utf-8-emacs.
+ (setup-ethiopic-environment-internal): Comment out key-binding for
+ ethio-toggle-punctuation.
+
+2011-12-13 Alan Mackenzie <acm@muc.de>
+
+ Add the switch statement to AWK Mode.
+
+ * progmodes/cc-awk (awk-font-lock-keywords): Add "switch", "case",
+ "default" to the keywords regexp.
+
+ * progmodes/cc-langs (c-label-kwds): Let AWK take the same
+ expression as the rest.
+ (c-nonlabel-token-key): Allow string literals for AWK. Refactor
+ for the other modes.
+
+ Large brace-block initialisation makes CC Mode slow: Fix.
+ Tidy up and accelerate c-in-literal, etc. by using the
+ c-parse-state
+ routines. Limit backward searching in c-font-lock-enclosing.decl.
+
+ * progmodes/cc-engine.el (c-state-pp-to-literal): Return the
+ pp-state and literal type in addition to the limits.
+ (c-state-safe-place): New defun, extracted from
+ c-state-literal-at.
+ (c-state-literal-at): Use the above new defun.
+ (c-slow-in-literal, c-fast-in-literal): Removed.
+ (c-in-literal, c-literal-limits): Amended to use
+ c-state-pp-to-literal.
+
+ * progmodes/cc-fonts.el (c-font-lock-enclosing-decls): Check for
+ being in a literal. Add a limit for backward searching.
+
+ * progmodes/cc-mode.el (awk-mode): Don't alias c-in-literal to
+ c-slow-in-literal.
+
+2011-12-13 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * progmodes/pascal.el: Declare `ind' as dyn-bound (bug#10264).
+
+2011-12-13 Martin Rudalics <rudalics@gmx.at>
+
+ * window.el (delete-other-windows): Use correct frame in call to
+ window-with-parameter.
+
+2011-12-12 Daniel Pfeiffer <occitan@t-online.de>
+
+ * progmodes/make-mode.el: Bring it up to date with makepp V2.0.
+ (makefile-make-font-lock-keywords): Extend meaning of `keywords'.
+ (makefile-gmake-statements, makefile-makepp-statements):
+ Use it and add new makepp keywords.
+ (makefile-makepp-font-lock-keywords): Add new patterns.
+ (makefile-match-function-end): Match new [...] and [[...]].
+
+2011-12-11 Juanma Barranquero <lekktu@gmail.com>
+
+ * ses.el (ses-call-printer-return, ses-cell-property-get)
+ (ses-sym-rowcol, ses-printer-validate, ses-formula-record)
+ (ses-create-cell-variable, ses-reset-header-string)
+ (ses-cell-set-formula, ses-repair-cell-reference-all)
+ (ses-self-reference-early-detection, ses-in-print-area, ses-set-curcell)
+ (ses-check-curcell, ses-call-printer, ses-adjust-print-width)
+ (ses-print-cell-new-width, ses-formula-references, ses-relocate-formula)
+ (ses-aset-with-undo, ses-load, ses-truncate-cell)
+ (ses-read-column-printer, ses-read-default-printer, ses-insert-row)
+ (ses-delete-row, ses-delete-column, ses-append-row-jump-first-column)
+ (ses-kill-override, ses-yank-pop, ses-yank-cells, ses-yank-tsf)
+ (ses-yank-resize, ses-export-tab, ses-mark-row, ses-mark-column)
+ (ses-renarrow-buffer, ses-insert-range, ses-insert-ses-range)
+ (ses-safe-printer, ses-safe-formula, ses-warn-unsafe, ses--clean-!)
+ (ses--clean-_, ses-range, ses-select, ses-center, ses-center-span)
+ (ses-dashfill, ses-unsafe): Fix typos and reflow docstrings.
+
+2011-12-11 Vincent Belaïche <vincentb1@users.sourceforge.net>
+
+ * ses.el: The overall change is to add cell renaming, that is
+ setting fancy names for cell symbols other than name matching
+ "\\`[A-Z]+[0-9]+\\'" regexp .
+ (ses-create-cell-variable): New defun.
+ (ses-relocate-formula): Relocate formulas only for cells the
+ symbols of which are not renamed, i.e. symbols whose names do not
+ match regexp "\\`[A-Z]+[0-9]+\\'".
+ (ses-relocate-all): Relocate values only for cells the symbols of
+ which are not renamed.
+ (ses-load): Create cells variables as the (ses-cell ...) are read,
+ in order to check row col consistency with cell symbol name only
+ for cells that are not renamed.
+ (ses-replace-name-in-formula): New defun.
+ (ses-rename-cell): New defun.
+
+2011-12-11 Chong Yidong <cyd@gnu.org>
+
+ * progmodes/gdb-mi.el (gdb): Set comint-prompt-regexp, required
+ for completion via gud-gdb-fetch-lines-filter (Bug#10274).
+
+2011-12-11 Eric Hanchrow <eric.hanchrow@gmail.com>
+
+ * window.el (other-window): Fix docstring.
+
+2011-12-10 Eli Zaretskii <eliz@gnu.org>
+
+ * mail/rmailsum.el (rmail-header-summary): RFC2047 decode the
+ `from' or `to' address before taking its substring. Fixes
+ incorrect display in Rmail summary buffer whereby an RFC2047
+ encoded name is chopped in the middle of the encoded string, and
+ thus displayed encoded.
+
+2011-12-10 Juanma Barranquero <lekktu@gmail.com>
+
+ * makefile.w32-in (update-subdirs-CMD): Use a Local Variables section.
+
+2011-12-10 Eli Zaretskii <eliz@gnu.org>
+
+ * textmodes/texnfo-upd.el: Update commentary. Add a warning not
+ to use texinfo-update-node and commands that call it if the
+ Texinfo file uses @node lines without next/prev/up pointers.
+ Correct outdated description about texinfo-master-menu.
+ (texinfo-all-menus-update, texinfo-master-menu)
+ (texinfo-update-node, texinfo-every-node-update)
+ (texinfo-multiple-files-update): Doc fix. Warn against updating
+ all the @node lines.
+ (texinfo-master-menu): Only call texinfo-update-node if the prefix
+ argument is numeric. Explain better in the doc string what the
+ function really does.
+ (texinfo-insert-master-menu-list): Improve the error message
+ displayed if there's no menu in the Top node.
+ (Bug#2975) See also this thread:
+ http://lists.gnu.org/archive/html/emacs-devel/2011-12/msg00156.html.
+
+2011-12-09 Manuel Gómez <mgrojo@gmail.com> (tiny change)
+
+ * speedbar.el (speedbar-supported-extension-expressions):
+ Add .adb and .ads, commonly used for Ada source code (bug#10256).
+
+2011-12-09 Juanma Barranquero <lekktu@gmail.com>
+
+ * printing.el (pr-mode-alist):
+ * simple.el (filter-buffer-substring-functions)
+ (completion-list-insert-choice-function):
+ * window.el (window-with-parameter, window-atom-root)
+ (window-sides-slots, window-size-fixed, window-min-delta)
+ (window-max-delta, window--resize-mini-window)
+ (window--resize-child-windows-normal, window-tree)
+ (delete-other-windows, quit-window, split-window)
+ (display-buffer-record-window, special-display-buffer-names)
+ (special-display-regexps, special-display-popup-frame)
+ (same-window-p, split-window-sensibly)
+ (display-buffer-overriding-action, display-buffer-alist)
+ (display-buffer-base-action, display-buffer, switch-to-buffer)
+ (switch-to-buffer-other-window, switch-to-buffer-other-frame)
+ (fit-window-to-buffer, recenter-positions)
+ (mouse-autoselect-window-state, mouse-autoselect-window-select):
+ * emacs-lisp/syntax.el (syntax-propertize-function): Fix typos
+ and remove unneeded backslashes in docstrings.
+
+2011-12-08 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * emacs-lisp/lisp-mode.el (defmethod): Add doc-string-elt (bug#10244).
+
+ * pcmpl-gnu.el: Don't fail when there is no Makefile nor -f arg.
+ (pcmpl-gnu-makefile-regexps): Accept "makefile" as well as files that
+ end in ".mk".
+ (pcmpl-gnu-make-rule-names): Check "makefile" and ignore errors
+ when reading the makefile (bug#10116).
+
+2011-12-06 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * pcmpl-gnu.el (pcomplete/make): Also allow filename arguments
+ (bug#10116).
+
+2011-12-06 Glenn Morris <rgm@gnu.org>
+
+ * emacs-lisp/package.el (package-archives): Doc fix re riskiness.
+
+2011-12-06 Chong Yidong <cyd@gnu.org>
+
+ * progmodes/cc-fonts.el (c-annotation-face): Use defface.
+
+2011-12-06 Juanma Barranquero <lekktu@gmail.com>
+
+ * textmodes/table.el (table-shorten-cell): Fix typo.
+
+2011-12-05 Christopher Genovese <genovese.cr@gmail.com> (tiny change)
+
+ * emacs-lisp/assoc.el (aput): Fix return value (bug#10146)
+
+2011-12-05 Eli Zaretskii <eliz@gnu.org>
+
+ * descr-text.el (describe-char): Fix display of strong
+ right-to-left characters and directional embeddings and overrides.
+
+ * simple.el (what-cursor-position): Fix display of codepoints of
+ strong right-to-left characters.
+
+2011-12-05 Chong Yidong <cyd@gnu.org>
+
+ * faces.el (read-color): Doc fix.
+
+2011-12-05 Glenn Morris <rgm@gnu.org>
+
+ * align.el (align--set-marker): Add doc-string.
+ Don't try to move something that is not a marker. (Bug#10216)
+
+2011-12-04 Glenn Morris <rgm@gnu.org>
+
+ * calendar/appt.el (appt-add): Rewrite the interactive-spec to avoid
+ overly zealous deletion of trailing whitespace.
+
+2011-12-04 Juanma Barranquero <lekktu@gmail.com>
+
+ * server.el (server-delete-client): On Windows, do not try to delete
+ the only terminal.
+ (server-process-filter): On Windows, treat requests for a tty frame as
+ if they were for a GUI frame if the running server is in GUI mode.
+
2011-12-03 Glenn Morris <rgm@gnu.org>
* textmodes/texinfmt.el (batch-texinfo-format): Doc fix. (Bug#10207)
@@ -112,11 +492,11 @@
(verilog-inject-sense, verilog-read-inst-pins)
(verilog-read-sub-decls, verilog-read-sub-decls-line):
Fix mismatching parenthesis inside commented out code when deleting
- AUTOINST, bug383. Reported by Jonathan Greenlaw.
+ AUTOINST, bug383. Reported by Jonathan Greenlaw.
(verilog-auto-ascii-enum): Fix AUTOASCIIENUM one-hot with
non-numeric vector width. Reported by Alex Reed.
(verilog-auto-ascii-enum): Add "onehot" option to work around not
- detecting signals with parameter widths. Reported by Alex Reed.
+ detecting signals with parameter widths. Reported by Alex Reed.
(verilog-auto-delete-trailing-whitespace):
With `verilog-auto-delete-trailing-whitespace' remove trailing
whitespace in auto expansion, bug371. Reported by Brad Dobbie.
@@ -384,8 +764,8 @@
2011-11-21 Juri Linkov <juri@jurta.org>
- * calc/calc.el (calc-read-key-sequence): Let-bind `input-method-function'
- to nil. (Bug#10018)
+ * calc/calc.el (calc-read-key-sequence):
+ Let-bind `input-method-function' to nil. (Bug#10018)
2011-11-21 Lars Magne Ingebrigtsen <larsi@gnus.org>
@@ -1915,11 +2295,10 @@
2011-09-24 Ulf Jasper <ulf.jasper@web.de>
* net/newst-reader.el (newsticker-html-renderer)
- (newsticker-show-news): Automatically
- load html rendering package if newsticker-html-renderer is set.
- Fixes "Warning: defvar ignored because w3m-fill-column is
- let-bound" and the error "Symbol's value as variable is void:
- w3m-fill-column".
+ (newsticker-show-news): Automatically load html rendering package
+ if newsticker-html-renderer is set. Fixes "Warning: defvar ignored
+ because w3m-fill-column is let-bound" and the error "Symbol's value
+ as variable is void: w3m-fill-column".
2011-09-24 Michael Albinus <michael.albinus@gmx.de>
@@ -2033,8 +2412,8 @@
2011-09-21 Martin Rudalics <rudalics@gmx.at>
* window.el (set-window-buffer-start-and-point):
- Call set-window-start with NOFORCE argument t. Suggested by Thierry
- Volpiatto <thierry.volpiatto@gmail.com>.
+ Call set-window-start with NOFORCE argument t.
+ Suggested by Thierry Volpiatto <thierry.volpiatto@gmail.com>.
(quit-window): Reword doc-string. Handle new format of
quit-restore parameter. Don't delete window if it has a
previous buffer we can show instead of the present one.
@@ -2152,13 +2531,13 @@
2011-09-18 Juri Linkov <juri@jurta.org>
* info.el (Info-mode-syntax-table): New variable.
- (Info-mode): Set `:syntax-table' to `Info-mode-syntax-table'. (Bug#3312)
+ (Info-mode): Set `:syntax-table' to `Info-mode-syntax-table' (bug#3312).
2011-09-18 Juri Linkov <juri@jurta.org>
- * info.el (Info-file-supports-index-cookies): Increment
- line-beginning-position's arg from 3 to 4 because makeinfo outputs
- one more line for long file names (bug#4142).
+ * info.el (Info-file-supports-index-cookies):
+ Increment line-beginning-position's arg from 3 to 4 because makeinfo
+ outputs one more line for long file names (bug#4142).
2011-09-18 Chong Yidong <cyd@stupidchicken.com>
@@ -4450,8 +4829,8 @@
pending encryption.
(allout-inhibit-auto-save-info-for-decryption):
- Adjust buffer-saved-size and some allout state to inhibit auto-saves if
- there are plain-text topics pending encryption.
+ Adjust buffer-saved-size and some allout state to inhibit auto-saves
+ if there are plain-text topics pending encryption.
(allout-maybe-resume-auto-save-info-after-encryption): Adjust
buffer-saved-size and some allout state to not inhibit auto-saves
@@ -5064,7 +5443,7 @@
(ses-calculate-cell, ses-update-cells): Use Dijkstra algorithm for
cycle detection.
(ses-self-reference-early-detection): New defcustom.
- (ses-formula-references): Robustify against self-refering cells.
+ (ses-formula-references): Robustify against self-referring cells.
(ses-mode): Use ses-set-localvars.
(ses-command-hook): Add call to ses-initialize-Dijkstra-attempt
before lauching the update processing.
@@ -5353,7 +5732,7 @@
* net/network-stream.el (network-stream-open-starttls): Support
upgrading to STARTTLS always, even if we don't have built-in support.
- (open-network-stream): Add the :always-query-capabilies keyword.
+ (open-network-stream): Add the :always-query-capabilities keyword.
* mail/smtpmail.el: Rewritten to do opportunistic STARTTLS
upgrades with `open-network-stream', and rely solely on
@@ -5881,11 +6260,11 @@
(split-window-keep-point): Mention split-window-above-each-other
instead of split-window-vertically.
(split-window-above-each-other, split-window-vertically):
- Rename split-window-vertically to split-window-above-each-other and
- provide defalias for old definition.
- (split-window-side-by-side, split-window-horizontally): Rename
- split-window-horizontally to split-window-side-by-side and provide
- defalias for the old definition.
+ Rename split-window-vertically to split-window-above-each-other
+ and provide defalias for old definition.
+ (split-window-side-by-side, split-window-horizontally):
+ Rename split-window-horizontally to split-window-side-by-side
+ and provide defalias for the old definition.
(ctl-x-map): Move bindings for delete-window,
delete-other-windows and enlarge-window here from window.c.
Replace bindings for split-window-vertically and
@@ -9308,10 +9687,10 @@
preserves the existing header prefix, rebulleting it if necessary,
rather than replacing it. This is necessary for proper operation
of cooperative addons like allout-widgets.
- (allout-make-topic-prefix, allout-rebullet-heading): Change
- SOLICIT arg to INSTEAD, and interpret additionally a string value
- as alternate bullet to be used, instead of prompting the user for
- a bullet character.
+ (allout-make-topic-prefix, allout-rebullet-heading):
+ Change SOLICIT arg to INSTEAD, and interpret additionally a string
+ value as alternate bullet to be used, instead of prompting the user
+ for a bullet character.
2011-03-09 Michael Albinus <michael.albinus@gmx.de>
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 @@
2002-11-17 Markus Rost <rost@math.ohio-state.edu>
* speedbar.el (defgroup speedbar): Use group 'etags instead of
- nonexisting group 'tags.
+ nonexistent group 'tags.
* emacs-lisp/re-builder.el: Add provide call.
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 @@
substitute-env-vars -- not quite shell compatible but better than
nothing.
(compilation-error-regexp-alist-alist): Simplify ftnchek to only
- handle the newer versions messages, which are more parseable.
+ handle the newer versions messages, which are more parsable.
2004-11-22 Stefan Monnier <monnier@iro.umontreal.ca>
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 @@
Register changes using allout-exposure-change-hook.
Disregard aberrant topics.
(allout-shift-in): With universal-argument, make topic a peer of
- it's former offspring. Simplify the code by separating out
+ its former offspring. Simplify the code by separating out
allout-shift-out functionality.
(allout-shift-out): With universal-argument, make offspring peers
of their former container, and its siblings. Implement the
@@ -7177,7 +7177,7 @@
2006-08-20 Chong Yidong <cyd@stupidchicken.com>
* frame.el (blink-cursor-start): Set timer first.
- (blink-cursor-end): Ignore timer cancelling errors.
+ (blink-cursor-end): Ignore timer canceling errors.
Suggested by Ken Manheimer.
2006-08-20 Juanma Barranquero <lekktu@gmail.com>
@@ -15842,7 +15842,7 @@
interactive spec from "p" to "P".
* progmodes/cc-styles.el: Amend the doc-string of c-set-style, in
- reponse to a report from Joseph Kiniry <kiniry@acm.org> that it
+ response to a report from Joseph Kiniry <kiniry@acm.org> that it
was difficult to understand.
2005-12-08 Martin Stjernholm <bug-cc-mode@gnu.org>
@@ -18459,7 +18459,7 @@
reveal-open-spots, so as to be more reliable. There were several
tricky corner cases where an open spot might be lost, or where
a closed spot might end up on the list of open spots.
- Only reveal text that's ellipsised.
+ Only reveal text that's ellipsized.
2005-11-07 Carsten Dominik <dominik@science.uva.nl>
@@ -27413,7 +27413,7 @@
which has been added in Emacs 21.1.
(c-mode, c++-mode, objc-mode, java-mode, idl-mode, pike-mode)
(awk-mode): Use it.
- (make-local-hook): Suppress warning about obsoleteness.
+ (make-local-hook): Suppress warning about obsolescence.
* progmodes/cc-engine.el, cc-align.el, cc-cmds.el
(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 @@
* progmodes/gdb-ui.el (gdb-parent-bptno-enabled): New variable.
(gdb-breakpoint-regexp, gdb-mouse-toggle-breakpoint-margin)
(gdb-mouse-toggle-breakpoint-fringe, gdb-delete-breakpoint)
- (gdb-goto-breakpoint): Generalise for breakpoints with multiple
+ (gdb-goto-breakpoint): Generalize for breakpoints with multiple
locations.
(gdb-info-breakpoints-custom, gdb-assembler-custom)
(gdb-toggle-breakpoint): Update for new gdb-breakpoint-regexp.
@@ -8010,7 +8010,7 @@
2007-10-31 Juanma Barranquero <lekktu@gmail.com>
* help-at-pt.el (help-at-pt-unload-hook): Remove.
- Timers are automatically cancelled by `unload-feature'.
+ Timers are automatically canceled by `unload-feature'.
* delsel.el (delsel-unload-hook): Remove function and variable.
(delsel-unload-function): New-style unload function, adapted
@@ -10869,7 +10869,7 @@
2007-09-23 Glenn Morris <rgm@gnu.org>
- * ses.el (ses-calculate-cell): Don't evaluate unsafe formulae.
+ * ses.el (ses-calculate-cell): Don't evaluate unsafe formulas.
2007-09-23 Dan Nicolaescu <dann@ics.uci.edu>
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 @@
* calc/calc-embed.el (calc-embedded-restore-original-modes):
Add argument for Calculator buffer.
- (calc-do-embedded): Use specific Calculator buffer when cancelling
+ (calc-do-embedded): Use specific Calculator buffer when canceling
embedded mode.
* calc/calc.el (calc-buffer-list): New variable.
@@ -3473,7 +3473,7 @@
2009-01-10 Dan Nicolaescu <dann@ics.uci.edu>
* diff-mode.el (diff-show-trailing-whitespaces): Remove function.
- Move setting up whitepace-mode ...
+ Move setting up whitespace-mode ...
(diff-mode): ... here.
(diff-mode-menu): Add a menu entry for showing trailing whitespace.
@@ -19176,7 +19176,7 @@
toggle-read-only.
* textmodes/bibtex.el (bibtex-format-entry): Handle error message
- refering to a missing required field with the OPT prefix.
+ referring to a missing required field with the OPT prefix.
Make unwindform more robust.
* 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 @@
(sql-mode-oracle-font-lock-keywords): Improve SQL*Plus REMARK
syntax pattern.
(sql-mode-postgres-font-lock-keywords): Support Postgres V9.
- (sql-mode-sqlite-font-lock-keywords): Hilight sqlite commands.
+ (sql-mode-sqlite-font-lock-keywords): Highlight sqlite commands.
2010-09-10 Lars Magne Ingebrigtsen <larsi@gnus.org>
@@ -8618,7 +8618,7 @@
(menu-bar-showhide-tool-bar-menu-customize-enable-right)
(menu-bar-showhide-tool-bar-menu-customize-enable-bottom)
(menu-bar-showhide-tool-bar-menu-customize-enable-top): New functions
- (menu-bar-showhide-tool-bar-menu): If tool bar is moveable,
+ (menu-bar-showhide-tool-bar-menu): If tool bar is movable,
make a menu for Options => toolbar that can move it.
2010-07-29 Chong Yidong <cyd@stupidchicken.com>
@@ -11908,7 +11908,7 @@
Add new VC methods: vc-log-incoming and vc-log-outgoing.
* vc.el (vc-print-log-setup-buttons): New function split out from
vc-print-log-internal.
- (vc-log-internal-common): New function, a parametrized version of
+ (vc-log-internal-common): New function, a parameterized version of
vc-print-log-internal.
(vc-print-log-internal): Just call vc-log-internal-common with the
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 @@
1988-08-03 Robert J. Chassell (bob@frosted-flakes.ai.mit.edu)
- * texinfo.el: Changed fill-colum from 75 to 72. The larger
+ * texinfo.el: Changed fill-column from 75 to 72. The larger
fill-column causes numerous overfull hboxes in TeX when you are
writing Emacs Lisp code that will be formatted as a Texinfo example.
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 @@
to "Non-echoed text: ". This conforms with the convention
used by existing prompts, and gives more room to type stuff.
- * comint.el (comint-last-input-start): New varible. In
+ * comint.el (comint-last-input-start): New variable. In
particular, this helps support subprocesses that insist on echoing
their input. Added comments to porting guide indicating that
this should probably not be used for implementing history stuff.
@@ -8647,7 +8647,7 @@
* comint.el, inf-lisp.el, shell.el: Updated to meet Olin's
version 2.0 comint offerings.
* ring.el: The underlying history mechanism for comint.
- Generalised handling of a ring data type based on vectors.
+ Generalized handling of a ring data type based on vectors.
* history.el: For now, a symlink to ring.el.
* loaddefs.el: Updated shell-prompt-pattern doc string.
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 @@
1998-07-21 Kenichi Handa <handa@etl.go.jp>
* international/kkc.el (kkc-region): Handled the case that
- conversion is cancelled.
+ conversion is canceled.
(kkc-terminate): Update kkc-overlay-head correctly.
(kkc-cancel): Don't call kkc-terminate, but set kkc-converting to nil.
@@ -12129,7 +12129,7 @@
* cc-mode.el (c-buffer-is-cc-mode):
Definition moved here from cc-vars.el. Also,
- put permanent-local property on variable so it's value won't get
+ put permanent-local property on variable so its value won't get
killed by kill-all-local-variables.
* cc-mode.el (c++-mode, java-mode, objc-mode, idl-mode):
@@ -13088,7 +13088,7 @@
1997-07-25 Simon Marshall <simon@frobnitz.gnu.ai.mit.edu>
- * complete.el: Customise; as subgroup of minibuffer.
+ * complete.el: Customize; as subgroup of minibuffer.
(partial-completion-mode): New option to toggle mode.
(partial-completion-mode): New command to toggle mode.
Add and remove hooks here, i.e., not at the top-level.
@@ -13617,7 +13617,7 @@
1997-07-15 Simon Marshall <simon@albert.gnu.ai.mit.edu>
- * mouse-sel.el: Customise; create mouse-sel as subgroup of mouse.
+ * mouse-sel.el: Customize; create mouse-sel as subgroup of mouse.
(mouse-sel-mode): New option to toggle mode.
(mouse-sel-mode): New command to toggle mode.
(mouse-sel-set-selection-function): If mouse-sel-default-bindings is
@@ -13625,7 +13625,7 @@
(mouse-sel-bindings): New function to install/restore mouse bindings.
This is called by mouse-sel-mode, i.e., not at the top-level.
- * delsel.el: Customise; as part of editing-basics group.
+ * delsel.el: Customize; as part of editing-basics group.
(delete-selection-mode): Convert to autoloaded option. Default to nil.
(delete-selection-mode): Define before option.
Modify pre-command-hook here, i.e., not at the top-level.
@@ -14943,7 +14943,7 @@
paren-matching) and put all blink-matching-paren variables in the
former (as opposed to the latter) group.
- * paren.el: Customise; paren-showing as a subgroup of paren-matching.
+ * paren.el: Customize; paren-showing as a subgroup of paren-matching.
(show-paren-style): New variable.
(show-paren-match-face)
(show-paren-mismatch-face): New faces.
@@ -18871,7 +18871,7 @@
1997-04-16 Simon Marshall <simon@wombat.gnu.ai.mit.edu>
- * font-lock.el: Customise.
+ * font-lock.el: Customize.
(font-lock-defaults-alist): Leave ~ syntax alone in C++.
(font-lock-match-c++-style-declaration-item-and-skip-to-next): Match ~
characters here.
@@ -18883,10 +18883,10 @@
(font-lock-compile-keywords): Don't set font-lock-keywords.
(font-lock-fontify-keywords-region): Set it here.
- * fast-lock.el: Customise.
+ * fast-lock.el: Customize.
(fast-lock-cache-data): Simplify calls of font-lock-compile-keywords.
- * lazy-lock.el: Customise.
+ * lazy-lock.el: Customize.
(lazy-lock-fontify-conservatively): Fontify around WINDOW's point.
* shell.el (shell-font-lock-keywords): Use EVAL form for prompt.
@@ -19534,7 +19534,7 @@
the innermost test. This catches GNU-style comments.
* cc-mode.el (c-add-syntax):
- Move macro definition to before it's first use.
+ Move macro definition to before its first use.
* cc-mode.el (c-submit-bug-report):
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 @@
(ansi-color-process-output): New function. It is automatically
added to comint-output-filter-functions if this is XEmacs.
(ansi-color-unfontify-region): New optional parameter for XEmacs
- compatibility. Check wether font-lock-syntactic-keywords is
+ compatibility. Check whether font-lock-syntactic-keywords is
boundp before removing the syntax table text property, as XEmacs
doesn't have it.
(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 @@
;; simple algorithm that understand only basic regular expressions.
;; Parts of the code were broken up and included in vhdl-mode.el
;; around this time. After several comments from users, and a need to
-;; find a more robust, performant algorithm, 2.0 was born in late
+;; find a more robust, higher performing algorithm, 2.0 was born in late
;; 1998. Many different approaches were taken (mostly due to the
;; complexity of TeX tables), but finally a scheme was discovered
;; 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."
(setq areas (cdr areas))))))
(defmacro align--set-marker (marker-var pos &optional type)
- `(if ,marker-var
+ "If MARKER-VAR is a marker, move it to position POS.
+Otherwise, create a new marker at position POS, with type TYPE."
+ `(if (markerp ,marker-var)
(move-marker ,marker-var ,pos)
(setq ,marker-var (copy-marker ,pos ,type))))
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."
;;;_ > allout-widgets-setup (varname value)
;;;###autoload
(defun allout-widgets-setup (varname value)
- "Commission or decommision allout-widgets-mode along with allout-mode.
+ "Commission or decommission allout-widgets-mode along with allout-mode.
Meant to be used by customization of `allout-widgets-auto-activation'."
(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.
Extending Allout
-Allout exposure and authoring activites all have associated
+Allout exposure and authoring activities all have associated
hooks, by which independent code can cooperate with allout
without changes to the allout core. Here are key ones:
@@ -3334,7 +3334,7 @@ coordinating with allout activity.")
(run-hooks 'allout-post-undo-hook)
(cond ((and (= buffer-saved-size -1)
allout-auto-save-temporarily-disabled)
- ;; user possibly undid a decryption, deinhibit auto-save:
+ ;; user possibly undid a decryption, disinhibit auto-save:
(allout-maybe-resume-auto-save-info-after-encryption))
((save-excursion
(save-restriction
@@ -5871,7 +5871,7 @@ encryption.
Further, encrypting with a KEYMODE-CUE universal argument greater
than 4 - eg, preceded by a doubled Ctrl-U - causes association of
the specified recipients with the file, replacing those currently
-associated with it. This can be used to deassociate any
+associated with it. This can be used to dissociate any
recipients with the file, by selecting no recipients in the
dialog.
@@ -5912,7 +5912,7 @@ encryption.
Further, encrypting with a KEYMODE-CUE universal argument greater
than 4 - eg, preceded by a doubled Ctrl-U - causes association of
the specified recipients with the file, replacing those currently
-associated with it. This can be used to deassociate any
+associated with it. This can be used to dissociate any
recipients with the file, by selecting no recipients in the
dialog.
@@ -6045,7 +6045,7 @@ encryption.
Further, encrypting with a KEYMODE-CUE universal argument greater
than 4 - eg, preceded by a doubled Ctrl-U - causes association of
the specified recipients with the file, replacing those currently
-associated with it. This can be used to deassociate any
+associated with it. This can be used to dissociate any
recipients with the file, by selecting no recipients in the
dialog.
@@ -6661,7 +6661,7 @@ To ignore intangibility, bind `inhibit-point-motion-hooks' to t."
(if (/= arg 1)
(condition-case nil (line-move (1- arg)) (error nil)))
- ;; Move to beginning-of-line, ignoring fields and invisibles.
+ ;; Move to beginning-of-line, ignoring fields and invisible text.
(skip-chars-backward "^\n")
(while (and (not (bobp))
(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
(setq ansi-color-context-region nil))))))
;; This function helps you look for overlapping overlays. This is
-;; usefull in comint-buffers. Overlapping overlays should not happen!
+;; useful in comint-buffers. Overlapping overlays should not happen!
;; A possible cause for bugs are the markers. If you create an overlay
;; up to the end of the region, then that end might coincide with the
;; 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."
"Create a new face by applying all the parameters in ESCAPE-SEQ.
Should any of the parameters result in the default face (usually this is
-the parameter 0), then the effect of all previous parameters is cancelled.
+the parameter 0), then the effect of all previous parameters is canceled.
ESCAPE-SEQ is a SGR control sequences such as \\033[34m. The parameter
34 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."
dir)))
(if (or alien (file-exists-p fullname))
(progn
- ;; Maked sure all the leading directories in
+ ;; Make sure all the leading directories in
;; archive-local-name exist under archive-tmpdir, so that
;; the directory structure recorded in the archive is
;; reconstructed in the temporary directory.
(make-directory (file-name-directory tmpfile) t)
(make-temp-file tmpfile))
- ;; Maked sure all the leading directories in `fullname' exist
+ ;; Make sure all the leading directories in `fullname' exist
;; under archive-tmpdir. This is necessary for nested archives
;; (`archive-extract' sets `archive-remote' to t in case
;; 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.
The following %-sequences are provided:
%c Current capacity (mAh or mWh)
+%r Current rate
%B Battery status (verbose)
+%d Temperature (in degrees Celsius)
%p Battery load percentage
-%L AC line status (verbose)"
- (let (charging-state
+%L AC line status (verbose)
+%m Remaining time (to charge or discharge) in minutes
+%h Remaining time (to charge or discharge) in hours
+%t Remaining time (to charge or discharge) in the form `h:min'"
+ (let (charging-state rate temperature hours
(charge-full 0.0)
(charge-now 0.0)
(energy-full 0.0)
@@ -444,6 +449,12 @@ The following %-sequences are provided:
(and (re-search-forward "POWER_SUPPLY_STATUS=\\(.*\\)$" nil t)
(member charging-state '("Unknown" "Full" nil))
(setq charging-state (match-string 1)))
+ (when (re-search-forward
+ "POWER_SUPPLY_\\(CURRENT\\|POWER\\)_NOW=\\([0-9]*\\)$"
+ nil t)
+ (setq rate (float (string-to-number (match-string 2)))))
+ (when (re-search-forward "POWER_SUPPLY_TEMP=\\([0-9]*\\)$" nil t)
+ (setq temperature (match-string 1)))
(let (full-string now-string)
;; Sysfs may list either charge (mAh) or energy (mWh).
;; Keep track of both, and choose which to report later.
@@ -466,12 +477,30 @@ The following %-sequences are provided:
(setq energy-full (+ energy-full
(string-to-number full-string))
energy-now (+ energy-now
- (string-to-number now-string)))))))))
+ (string-to-number now-string))))))
+ (goto-char (point-min))
+ (when (and energy-now rate (not (zerop rate))
+ (re-search-forward
+ "POWER_SUPPLY_VOLTAGE_NOW=\\([0-9]*\\)$" nil t))
+ (let ((remaining (if (string= charging-state "Discharging")
+ energy-now
+ (- energy-full energy-now))))
+ (setq hours (/ (/ (* remaining (string-to-number
+ (match-string 1)))
+ rate)
+ 10000000.0)))))))
(list (cons ?c (cond ((or (> charge-full 0) (> charge-now 0))
(number-to-string charge-now))
((or (> energy-full 0) (> energy-now 0))
(number-to-string energy-now))
(t "N/A")))
+ (cons ?r (if rate (format "%.1f" (/ rate 1000000.0)) "N/A"))
+ (cons ?m (if hours (format "%d" (* hours 60)) "N/A"))
+ (cons ?h (if hours (format "%d" hours) "N/A"))
+ (cons ?t (if hours
+ (format "%d:%02d" hours (* (- hours (floor hours)) 60))
+ "N/A"))
+ (cons ?d (or temperature "N/A"))
(cons ?B (or charging-state "N/A"))
(cons ?p (cond ((> charge-full 0)
(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 @@
expr))))
;;; Simplify a polynomial in list form by stripping off high-end zeros.
-;;; This always leaves the constant part, i.e., nil->nil and nonnil->nonnil.
+;;; This always leaves the constant part, i.e., nil->nil and non-nil->non-nil.
(defun math-poly-simplify (p)
(and p
(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 @@
(defvar calc-arithmetic-menu
(list "Arithmetic"
(list "Basic"
- ["-(1:)" calc-change-sign
+ ["-(1:)" calc-change-sign
:keys "n" :active (>= (calc-stack-size) 1)]
- ["(2:) + (1:)" calc-plus
+ ["(2:) + (1:)" calc-plus
:keys "+" :active (>= (calc-stack-size) 2)]
- ["(2:) - (1:)" calc-minus
+ ["(2:) - (1:)" calc-minus
:keys "-" :active (>= (calc-stack-size) 2)]
- ["(2:) * (1:)" calc-times
+ ["(2:) * (1:)" calc-times
:keys "*" :active (>= (calc-stack-size) 2)]
- ["(2:) / (1:)" calc-divide
+ ["(2:) / (1:)" calc-divide
:keys "/" :active (>= (calc-stack-size) 2)]
- ["(2:) ^ (1:)" calc-power
+ ["(2:) ^ (1:)" calc-power
:keys "^" :active (>= (calc-stack-size) 2)]
- ["(2:) ^ (1/(1:))"
+ ["(2:) ^ (1/(1:))"
(progn
(require 'calc-ext)
(let ((calc-inverse-flag t))
@@ -44,8 +44,8 @@
:keys "I ^"
:active (>= (calc-stack-size) 2)
:help "The (1:)th root of (2:)"]
- ["abs(1:)"
- (progn
+ ["abs(1:)"
+ (progn
(require 'calc-arith)
(call-interactively 'calc-abs))
:keys "A"
@@ -57,7 +57,7 @@
(call-interactively 'calc-inv))
:keys "&"
:active (>= (calc-stack-size) 1)]
- ["sqrt(1:)"
+ ["sqrt(1:)"
(progn
(require 'calc-math)
(call-interactively 'calc-sqrt))
@@ -70,7 +70,7 @@
:keys "\\"
:active (>= (calc-stack-size) 2)
:help "The integer quotient of (2:) over (1:)"]
- ["(2:) mod (1:)"
+ ["(2:) mod (1:)"
(progn
(require 'calc-misc)
(call-interactively 'calc-mod))
@@ -78,28 +78,28 @@
:active (>= (calc-stack-size) 2)
:help "The remainder when (2:) is divided by (1:)"])
(list "Rounding"
- ["floor(1:)"
+ ["floor(1:)"
(progn
(require 'calc-arith)
(call-interactively 'calc-floor))
:keys "F"
:active (>= (calc-stack-size) 1)
:help "The greatest integer less than or equal to (1:)"]
- ["ceiling(1:)"
+ ["ceiling(1:)"
(progn
(require 'calc-arith)
(call-interactively 'calc-ceiling))
:keys "I F"
:active (>= (calc-stack-size) 1)
:help "The smallest integer greater than or equal to (1:)"]
- ["round(1:)"
+ ["round(1:)"
(progn
(require 'calc-arith)
(call-interactively 'calc-round))
:keys "R"
:active (>= (calc-stack-size) 1)
:help "The nearest integer to (1:)"]
- ["truncate(1:)"
+ ["truncate(1:)"
(progn
(require 'calc-arith)
(call-interactively 'calc-trunc))
@@ -140,32 +140,32 @@
:active (>= (calc-stack-size) 1)
:help "The argument (polar angle) of (1:)"])
(list "Conversion"
- ["Convert (1:) to a float"
+ ["Convert (1:) to a float"
(progn
(require 'calc-ext)
(call-interactively 'calc-float))
:keys "c f"
:active (>= (calc-stack-size) 1)]
- ["Convert (1:) to a fraction"
+ ["Convert (1:) to a fraction"
(progn
(require 'calc-ext)
(call-interactively 'calc-fraction))
:keys "c F"
:active (>= (calc-stack-size) 1)])
(list "Binary"
- ["Set word size"
+ ["Set word size"
(progn
(require 'calc-bin)
(call-interactively 'calc-word-size))
:keys "b w"]
- ["Clip (1:) to word size"
+ ["Clip (1:) to word size"
(progn
(require 'calc-bin)
(call-interactively 'calc-clip))
:keys "b c"
:active (>= (calc-stack-size) 1)
:help "Reduce (1:) modulo 2^wordsize"]
- ["(2:) and (1:)"
+ ["(2:) and (1:)"
(progn
(require 'calc-bin)
(call-interactively 'calc-and))
@@ -180,13 +180,13 @@
:active (>= (calc-stack-size) 2)
:help "Bitwise inclusive OR [modulo 2^wordsize]"]
["(2:) xor (1:)"
- (progn
+ (progn
(require 'calc-bin)
(call-interactively 'calc-xor))
:keys "b x"
:active (>= (calc-stack-size) 2)
:help "Bitwise exclusive OR [modulo 2^wordsize]"]
- ["diff(2:,1:)"
+ ["diff(2:,1:)"
(progn
(require 'calc-bin)
(call-interactively 'calc-diff))
@@ -263,82 +263,82 @@
:keys "I P"
:help "Euler's constant"])
(list "Logs and Exps"
- ["ln(1:)"
- (progn
- (require 'calc-math)
- (call-interactively 'calc-ln))
+ ["ln(1:)"
+ (progn
+ (require 'calc-math)
+ (call-interactively 'calc-ln))
:keys "L"
:active (>= (calc-stack-size) 1)
:help "The natural logarithm"]
- ["e^(1:)"
+ ["e^(1:)"
(progn
(require 'calc-math)
(call-interactively 'calc-exp))
:keys "E"
:active (>= (calc-stack-size) 1)]
- ["log(1:) [base 10]"
+ ["log(1:) [base 10]"
(progn
(require 'calc-math)
(call-interactively 'calc-log10))
:keys "H L"
:active (>= (calc-stack-size) 1)
:help "The common logarithm"]
- ["10^(1:)"
+ ["10^(1:)"
(progn
(require 'calc-math)
(let ((calc-inverse-flag t))
(call-interactively 'calc-log10)))
:keys "I H L"
:active (>= (calc-stack-size) 1)]
- ["log(2:) [base(1:)]"
+ ["log(2:) [base(1:)]"
(progn
(require 'calc-math)
(call-interactively 'calc-log))
:keys "B"
:active (>= (calc-stack-size) 2)
:help "The logarithm with an arbitrary base"]
- ["(2:) ^ (1:)"
- calc-power
+ ["(2:) ^ (1:)"
+ calc-power
:keys "^"
:active (>= (calc-stack-size) 2)])
(list "Trigonometric Functions"
- ["sin(1:)"
+ ["sin(1:)"
(progn
(require 'calc-math)
(call-interactively 'calc-sin))
:keys "S"
:active (>= (calc-stack-size) 1)]
- ["cos(1:)"
+ ["cos(1:)"
(progn
(require 'calc-math)
(call-interactively 'calc-cos))
:keys "C"
:active (>= (calc-stack-size) 1)]
- ["tan(1:)"
+ ["tan(1:)"
(progn
(require 'calc-math)
(call-interactively 'calc-tan))
:keys "T"
:active (>= (calc-stack-size) 1)]
- ["arcsin(1:)"
+ ["arcsin(1:)"
(progn
(require 'calc-math)
(call-interactively 'calc-arcsin))
:keys "I S"
:active (>= (calc-stack-size) 1)]
- ["arccos(1:)"
+ ["arccos(1:)"
(progn
(require 'calc-math)
(call-interactively 'calc-arccos))
:keys "I C"
:active (>= (calc-stack-size) 1)]
- ["arctan(1:)"
+ ["arctan(1:)"
(progn
(require 'calc-math)
(call-interactively 'calc-arctan))
:keys "I T"
:active (>= (calc-stack-size) 1)]
- ["arctan2(2:,1:)"
+ ["arctan2(2:,1:)"
(progn
(require 'calc-math)
(call-interactively 'calc-arctan2))
@@ -367,65 +367,65 @@
:style radio
:selected (eq calc-angle-mode 'hms)])
(list "Hyperbolic Functions"
- ["sinh(1:)"
+ ["sinh(1:)"
(progn
(require 'calc-math)
(call-interactively 'calc-sinh))
:keys "H S"
:active (>= (calc-stack-size) 1)]
- ["cosh(1:)"
+ ["cosh(1:)"
(progn
(require 'calc-math)
(call-interactively 'calc-cosh))
:keys "H C"
:active (>= (calc-stack-size) 1)]
- ["tanh(1:)"
+ ["tanh(1:)"
(progn
(require 'calc-math)
(call-interactively 'calc-tanh))
:keys "H T"
:active (>= (calc-stack-size) 1)]
- ["arcsinh(1:)"
+ ["arcsinh(1:)"
(progn
(require 'calc-math)
(call-interactively 'calc-arcsinh))
:keys "I H S"
:active (>= (calc-stack-size) 1)]
- ["arccosh(1:)"
+ ["arccosh(1:)"
(progn
(require 'calc-math)
(call-interactively 'calc-arccosh))
:keys "I H C"
:active (>= (calc-stack-size) 1)]
- ["arctanh(1:)"
+ ["arctanh(1:)"
(progn
(require 'calc-math)
(call-interactively 'calc-arctanh))
:keys "I H T"
:active (>= (calc-stack-size) 1)])
(list "Advanced Math Functions"
- ["Gamma(1:)"
+ ["Gamma(1:)"
(progn
(require 'calc-comb)
(call-interactively 'calc-gamma))
:keys "f g"
:active (>= (calc-stack-size) 1)
:help "The Euler Gamma function"]
- ["GammaP(2:,1:)"
+ ["GammaP(2:,1:)"
(progn
(require 'calc-funcs)
(call-interactively 'calc-inc-gamma))
:keys "f G"
:active (>= (calc-stack-size) 2)
:help "The lower incomplete Gamma function"]
- ["Beta(2:,1:)"
+ ["Beta(2:,1:)"
(progn
(require 'calc-funcs)
(call-interactively 'calc-beta))
:keys "f b"
:active (>= (calc-stack-size) 2)
:help "The Euler Beta function"]
- ["BetaI(3:,2:,1:)"
+ ["BetaI(3:,2:,1:)"
(progn
(require 'calc-funcs)
(call-interactively 'calc-inc-beta))
@@ -439,14 +439,14 @@
:keys "f e"
:active (>= (calc-stack-size) 1)
:help "The error function"]
- ["BesselJ(2:,1:)"
+ ["BesselJ(2:,1:)"
(progn
(require 'calc-funcs)
(call-interactively 'calc-bessel-J))
:keys "f j"
:active (>= (calc-stack-size) 2)
:help "The Bessel function of the first kind (of order (2:))"]
- ["BesselY(2:,1:)"
+ ["BesselY(2:,1:)"
(progn
(require 'calc-funcs)
(call-interactively 'calc-bessel-Y))
@@ -454,44 +454,44 @@
:active (>= (calc-stack-size) 2)
:help "The Bessel function of the second kind (of order (2:))"])
(list "Combinatorial Functions"
- ["gcd(2:,1:)"
+ ["gcd(2:,1:)"
(progn
(require 'calc-comb)
(call-interactively 'calc-gcd))
:keys "k g"
:active (>= (calc-stack-size) 2)]
- ["lcm(2:,1:)"
+ ["lcm(2:,1:)"
(progn
(require 'calc-comb)
(call-interactively 'calc-lcm))
:keys "k l"
:active (>= (calc-stack-size) 2)]
- ["factorial(1:)"
+ ["factorial(1:)"
(progn
(require 'calc-comb)
(call-interactively 'calc-factorial))
:keys "!"
:active (>= (calc-stack-size) 1)]
- ["(2:) choose (1:)"
+ ["(2:) choose (1:)"
(progn
(require 'calc-comb)
(call-interactively 'calc-choose))
:keys "k c"
:active (>= (calc-stack-size) 2)]
- ["permutations(2:,1:)"
+ ["permutations(2:,1:)"
(progn
(require 'calc-comb)
(call-interactively 'calc-perm))
:keys "H k c"
:active (>= (calc-stack-size) 2)]
- ["Primality test for (1:)"
+ ["Primality test for (1:)"
(progn
(require 'calc-comb)
(call-interactively 'calc-prime-test))
:keys "k p"
:active (>= (calc-stack-size) 1)
:help "For large (1:), a probabilistic test"]
- ["Factor (1:) into primes"
+ ["Factor (1:) into primes"
(progn
(require 'calc-comb)
(call-interactively 'calc-prime-factors))
@@ -527,17 +527,17 @@
["Help on Scientific Functions"
(calc-info-goto-node "Scientific Functions")])
"Menu for Calc's scientific functions.")
-
+
(defvar calc-algebra-menu
(list "Algebra"
(list "Simplification"
- ["Simplify (1:)"
+ ["Simplify (1:)"
(progn
(require 'calc-alg)
(call-interactively 'calc-simplify))
:keys "a s"
:active (>= (calc-stack-size) 1)]
- ["Simplify (1:) with extended rules"
+ ["Simplify (1:) with extended rules"
(progn
(require 'calc-alg)
(call-interactively 'calc-simplify-extended))
@@ -545,72 +545,72 @@
:active (>= (calc-stack-size) 1)
:help "Apply possibly unsafe simplifications"])
(list "Manipulation"
- ["Expand formula (1:)"
+ ["Expand formula (1:)"
(progn
(require 'calc-alg)
(call-interactively 'calc-expand-formula))
:keys "a \""
:active (>= (calc-stack-size) 1)
:help "Expand (1:) into its defining formula, if possible"]
- ["Evaluate variables in (1:)"
+ ["Evaluate variables in (1:)"
(progn
(require 'calc-ext)
(call-interactively 'calc-evaluate))
:keys "="
:active (>= (calc-stack-size) 1)]
- ["Make substitution in (1:)"
+ ["Make substitution in (1:)"
(progn
(require 'calc-alg)
(call-interactively 'calc-substitute))
:keys "a b"
:active (>= (calc-stack-size) 1)
- :help
+ :help
"Substitute all occurrences of a sub-expression with a new sub-expression"])
(list "Polynomials"
- ["Factor (1:)"
+ ["Factor (1:)"
(progn
(require 'calc-alg)
(call-interactively 'calc-factor))
:keys "a f"
:active (>= (calc-stack-size) 1)]
- ["Collect terms in (1:)"
+ ["Collect terms in (1:)"
(progn
(require 'calc-alg)
- (call-interactively 'calc-collect))
+ (call-interactively 'calc-collect))
:keys "a c"
:active (>= (calc-stack-size) 1)
:help "Arrange as a polynomial in a given variable"]
- ["Expand (1:)"
+ ["Expand (1:)"
(progn
(require 'calc-alg)
(call-interactively 'calc-expand))
:keys "a x"
:active (>= (calc-stack-size) 1)
:help "Apply distributive law everywhere"]
- ["Find roots of (1:)"
+ ["Find roots of (1:)"
(progn
(require 'calcalg2)
(call-interactively 'calc-poly-roots))
:keys "a P"
:active (>= (calc-stack-size) 1)])
(list "Calculus"
- ["Differentiate (1:)"
+ ["Differentiate (1:)"
(progn
(require 'calcalg2)
(call-interactively 'calc-derivative))
:keys "a d"
:active (>= (calc-stack-size) 1)]
- ["Integrate (1:) [indefinite]"
+ ["Integrate (1:) [indefinite]"
(progn
(require 'calcalg2)
(call-interactively 'calc-integral))
:keys "a i"
:active (>= (calc-stack-size) 1)]
- ["Integrate (1:) [definite]"
+ ["Integrate (1:) [definite]"
(progn
(require 'calcalg2)
(let ((var (read-string "Integration variable: ")))
- (calc-tabular-command 'calcFunc-integ "Integration"
+ (calc-tabular-command 'calcFunc-integ "Integration"
"intg" nil var nil nil)))
:keys "C-u a i"
:active (>= (calc-stack-size) 1)]
@@ -621,20 +621,20 @@
:keys "a I"
:active (>= (calc-stack-size) 1)
:help "Integrate using the open Romberg method"]
- ["Taylor expand (1:)"
+ ["Taylor expand (1:)"
(progn
(require 'calcalg2)
(call-interactively 'calc-taylor))
:keys "a t"
:active (>= (calc-stack-size) 1)]
- ["Minimize (2:) [initial guess = (1:)]"
+ ["Minimize (2:) [initial guess = (1:)]"
(progn
(require 'calcalg3)
(call-interactively 'calc-find-minimum))
:keys "a N"
:active (>= (calc-stack-size) 2)
:help "Find a local minimum"]
- ["Maximize (2:) [initial guess = (1:)]"
+ ["Maximize (2:) [initial guess = (1:)]"
(progn
(require 'calcalg3)
(call-interactively 'calc-find-maximum))
@@ -642,26 +642,26 @@
:active (>= (calc-stack-size) 2)
:help "Find a local maximum"])
(list "Solving"
- ["Solve equation (1:)"
+ ["Solve equation (1:)"
(progn
(require 'calcalg2)
(call-interactively 'calc-solve-for))
:keys "a S"
:active (>= (calc-stack-size) 1)]
- ["Solve equation (2:) numerically [initial guess = (1:)]"
+ ["Solve equation (2:) numerically [initial guess = (1:)]"
(progn
(require 'calcalg3)
(call-interactively 'calc-find-root))
:keys "a R"
:active (>= (calc-stack-size) 2)]
- ["Find roots of polynomial (1:)"
+ ["Find roots of polynomial (1:)"
(progn
(require 'calcalg2)
(call-interactively 'calc-poly-roots))
:keys "a P"
:active (>= (calc-stack-size) 1)])
(list "Curve Fitting"
- ["Fit (1:)=[x values, y values] to a curve"
+ ["Fit (1:)=[x values, y values] to a curve"
(progn
(require 'calcalg3)
(call-interactively 'calc-curve-fit))
@@ -675,13 +675,13 @@
(defvar calc-graphics-menu
(list "Graphics"
- ["Graph 2D [(1:)= y values, (2:)= x values]"
+ ["Graph 2D [(1:)= y values, (2:)= x values]"
(progn
(require 'calc-graph)
(call-interactively 'calc-graph-fast))
:keys "g f"
:active (>= (calc-stack-size) 2)]
- ["Graph 3D [(1:)= z values, (2:)= y values, (3:)= x values]"
+ ["Graph 3D [(1:)= z values, (2:)= y values, (3:)= x values]"
(progn
(require 'calc-graph)
(call-interactively 'calc-graph-fast-3d))
@@ -696,11 +696,11 @@
(defvar calc-vectors-menu
(list "Matrices/Vectors"
(list "Matrices"
- ["(2:) + (1:)" calc-plus
+ ["(2:) + (1:)" calc-plus
:keys "+" :active (>= (calc-stack-size) 2)]
- ["(2:) - (1:)" calc-minus
+ ["(2:) - (1:)" calc-minus
:keys "-" :active (>= (calc-stack-size) 2)]
- ["(2:) * (1:)" calc-times
+ ["(2:) * (1:)" calc-times
:keys "*" :active (>= (calc-stack-size) 2)]
["(1:)^(-1)"
(progn
@@ -709,17 +709,17 @@
:keys "&"
:active (>= (calc-stack-size) 1)]
["Create an identity matrix"
- (progn
+ (progn
(require 'calc-vec)
(call-interactively 'calc-ident))
:keys "v i"]
- ["transpose(1:)"
+ ["transpose(1:)"
(progn
(require 'calc-vec)
(call-interactively 'calc-transpose))
:keys "v t"
:active (>= (calc-stack-size) 1)]
- ["det(1:)"
+ ["det(1:)"
(progn
(require 'calc-mtx)
(call-interactively 'calc-mdet))
@@ -731,19 +731,19 @@
(call-interactively 'calc-mtrace))
:keys "V T"
:active (>= (calc-stack-size) 1)]
- ["LUD decompose (1:)"
+ ["LUD decompose (1:)"
(progn
(require 'calc-mtx)
(call-interactively 'calc-mlud))
:keys "V L"
:active (>= (calc-stack-size) 1)]
- ["Extract a row from (1:)"
+ ["Extract a row from (1:)"
(progn
(require 'calc-vec)
(call-interactively 'calc-mrow))
:keys "v r"
:active (>= (calc-stack-size) 1)]
- ["Extract a column from (1:)"
+ ["Extract a column from (1:)"
(progn
(require 'calc-vec)
(call-interactively 'calc-mcol))
@@ -756,13 +756,13 @@
(call-interactively 'calc-head))
:keys "v h"
:active (>= (calc-stack-size) 1)]
- ["Extract an element from (1:)"
+ ["Extract an element from (1:)"
(progn
(require 'calc-vec)
(call-interactively 'calc-mrow))
:keys "v r"
:active (>= (calc-stack-size) 1)]
- ["Reverse (1:)"
+ ["Reverse (1:)"
(progn
(require 'calc-vec)
(call-interactively 'calc-reverse-vector))
@@ -775,19 +775,19 @@
:keys "v u"
:active (>= (calc-stack-size) 1)
:help "Separate the elements of (1:)"]
- ["(2:) cross (1:)"
+ ["(2:) cross (1:)"
(progn
(require 'calc-vec)
(call-interactively 'calc-cross))
:keys "V C"
:active (>= (calc-stack-size) 2)
:help "The cross product in R^3"]
- ["(2:) dot (1:)"
- calc-mult
+ ["(2:) dot (1:)"
+ calc-mult
:keys "*"
:active (>= (calc-stack-size) 2)
:help "The dot product"]
- ["Map a function across (1:)"
+ ["Map a function across (1:)"
(progn
(require 'calc-map)
(call-interactively 'calc-map))
@@ -795,25 +795,25 @@
:active (>= (calc-stack-size) 1)
:help "Apply a function to each element"])
(list "Vectors As Sets"
- ["Remove duplicates from (1:)"
+ ["Remove duplicates from (1:)"
(progn
(require 'calc-vec)
(call-interactively 'calc-remove-duplicates))
:keys "V +"
:active (>= (calc-stack-size) 1)]
- ["(2:) union (1:)"
+ ["(2:) union (1:)"
(progn
(require 'calc-vec)
(call-interactively 'calc-set-union))
:keys "V V"
:active (>= (calc-stack-size) 2)]
- ["(2:) intersect (1:)"
+ ["(2:) intersect (1:)"
(progn
(require 'calc-vec)
(call-interactively 'calc-set-intersect))
:keys "V ^"
:active (>= (calc-stack-size) 2)]
- ["(2:) \\ (1:)"
+ ["(2:) \\ (1:)"
(progn
(require 'calc-vec)
(call-interactively 'calc-set-difference))
@@ -821,35 +821,35 @@
:help "Set difference"
:active (>= (calc-stack-size) 2)])
(list "Statistics On Vectors"
- ["length(1:)"
+ ["length(1:)"
(progn
(require 'calc-stat)
(call-interactively 'calc-vector-count))
:keys "u #"
:active (>= (calc-stack-size) 1)
:help "The number of data values"]
- ["sum(1:)"
+ ["sum(1:)"
(progn
(require 'calc-stat)
(call-interactively 'calc-vector-sum))
:keys "u +"
:active (>= (calc-stack-size) 1)
:help "The sum of the data values"]
- ["max(1:)"
+ ["max(1:)"
(progn
(require 'calc-stat)
- (call-interactively 'calc-vector-max))
+ (call-interactively 'calc-vector-max))
:keys "u x"
:active (>= (calc-stack-size) 1)
:help "The maximum of the data values"]
- ["min(1:)"
+ ["min(1:)"
(progn
(require 'calc-stat)
- (call-interactively 'calc-vector-min))
+ (call-interactively 'calc-vector-min))
:keys "u N"
:active (>= (calc-stack-size) 1)
- :help "The minumum of the data values"]
- ["mean(1:)"
+ :help "The minimum of the data values"]
+ ["mean(1:)"
(progn
(require 'calc-stat)
(call-interactively 'calc-vector-mean))
@@ -863,28 +863,28 @@
:keys "I u M"
:active (>= (calc-stack-size) 1)
:help "The average (arithmetic mean) of the data values as an error form"]
- ["sdev(1:)"
+ ["sdev(1:)"
(progn
(require 'calc-stat)
(call-interactively 'calc-vector-sdev))
:keys "u S"
:active (>= (calc-stack-size) 1)
:help "The sample sdev, sqrt[sum((values - mean)^2)/(N-1)]"]
- ["variance(1:)"
+ ["variance(1:)"
(progn
(require 'calc-stat)
(call-interactively 'calc-vector-variance))
:keys "H u S"
:active (>= (calc-stack-size) 1)
:help "The sample variance, sum((values - mean)^2)/(N-1)"]
- ["population sdev(1:)"
+ ["population sdev(1:)"
(progn
(require 'calc-stat)
(call-interactively 'calc-vector-pop-sdev))
:keys "I u S"
:active (>= (calc-stack-size) 1)
:help "The population sdev, sqrt[sum((values - mean)^2)/N]"]
- ["population variance(1:)"
+ ["population variance(1:)"
(progn
(require 'calc-stat)
(call-interactively 'calc-vector-pop-variance))
@@ -937,25 +937,25 @@
(defvar calc-units-menu
(list "Units"
- ["Convert units in (1:)"
+ ["Convert units in (1:)"
(progn
(require 'calc-units)
(call-interactively 'calc-convert-units ))
:keys "u c"
:active (>= (calc-stack-size) 1)]
- ["Convert temperature in (1:)"
+ ["Convert temperature in (1:)"
(progn
(require 'calc-units)
(call-interactively 'calc-convert-temperature))
:keys "u t"
:active (>= (calc-stack-size) 1)]
- ["Simplify units in (1:)"
+ ["Simplify units in (1:)"
(progn
(require 'calc-units)
(call-interactively 'calc-simplify-units))
:keys "u s"
:active (>= (calc-stack-size) 1)]
- ["View units table"
+ ["View units table"
(progn
(require 'calc-units)
(call-interactively 'calc-view-units-table))
@@ -1072,40 +1072,40 @@
(defvar calc-variables-menu
(list "Variables"
- ["Store (1:) into a variable"
+ ["Store (1:) into a variable"
(progn
(require 'calc-store)
(call-interactively 'calc-store))
:keys "s s"
:active (>= (calc-stack-size) 1)]
- ["Recall a variable value"
+ ["Recall a variable value"
(progn
(require 'calc-store)
(call-interactively 'calc-recall ))
:keys "s r"]
- ["Edit the value of a variable"
+ ["Edit the value of a variable"
(progn
(require 'calc-store)
(call-interactively 'calc-edit-variable))
:keys "s e"]
- ["Exchange (1:) with a variable value"
+ ["Exchange (1:) with a variable value"
(progn
(require 'calc-store)
(call-interactively 'calc-store-exchange))
:keys "s x"
:active (>= (calc-stack-size) 1)]
- ["Clear variable value"
+ ["Clear variable value"
(progn
(require 'calc-store)
(call-interactively 'calc-unstore))
:keys "s u"]
- ["Evaluate variables in (1:)"
+ ["Evaluate variables in (1:)"
(progn
(require 'calc-ext)
(call-interactively 'calc-evaluate))
:keys "="
:active (>= (calc-stack-size) 1)]
- ["Evaluate (1:), assigning a value to a variable"
+ ["Evaluate (1:), assigning a value to a variable"
(progn
(require 'calc-store)
(call-interactively 'calc-let))
@@ -1119,19 +1119,19 @@
(defvar calc-stack-menu
(list "Stack"
- ["Remove (1:)"
- calc-pop
+ ["Remove (1:)"
+ calc-pop
:keys "DEL"
:active (>= (calc-stack-size) 1)]
- ["Switch (1:) and (2:)"
- calc-roll-down
+ ["Switch (1:) and (2:)"
+ calc-roll-down
:keys "TAB"
:active (>= (calc-stack-size) 2)]
- ["Duplicate (1:)"
- calc-enter
+ ["Duplicate (1:)"
+ calc-enter
:keys "RET"
:active (>= (calc-stack-size) 1)]
- ["Edit (1:)"
+ ["Edit (1:)"
(progn
(require 'calc-yank)
(call-interactively calc-edit))
@@ -1144,12 +1144,12 @@
(defvar calc-errors-menu
(list "Undo"
- ["Undo"
+ ["Undo"
(progn
(require 'calc-undo)
(call-interactively 'calc-undo))
:keys "U"]
- ["Redo"
+ ["Redo"
(progn
(require 'calc-undo)
(call-interactively 'calc-redo))
@@ -1162,7 +1162,7 @@
(defvar calc-modes-menu
(list "Modes"
- ["Precision"
+ ["Precision"
(progn
(require 'calc-ext)
(call-interactively 'calc-precision))
@@ -1277,7 +1277,7 @@
["Binary"
(progn
(require 'calc-bin)
- (call-interactively
+ (call-interactively
(lambda () (interactive) (calc-binary-radix t))))
:keys "C-u d 2"
:style radio
@@ -1330,7 +1330,7 @@
:keys "d e"
:style radio
:selected (eq (car-safe calc-float-format) 'eng)])
- (list "Complex Format"
+ (list "Complex Format"
["Default"
(progn
(require 'calc-cplx)
@@ -1522,17 +1522,17 @@
(defvar calc-help-menu
(list "Help"
- ["Manual"
+ ["Manual"
calc-info
:keys "h i"]
- ["Tutorial"
- calc-tutorial
+ ["Tutorial"
+ calc-tutorial
:keys "h t"]
- ["Summary"
- calc-info-summary
+ ["Summary"
+ calc-info-summary
:keys "h s"]
"----"
- ["Help on Help"
+ ["Help on Help"
(progn
(calc-info-goto-node "Introduction")
(Info-goto-node "Help Commands"))])
@@ -1557,7 +1557,7 @@
calc-errors-menu
calc-modes-menu
calc-help-menu
- ["Reset"
+ ["Reset"
(progn
(require 'calc-ext)
(call-interactively 'calc-reset))
@@ -1565,4 +1565,3 @@
["Quit" calc-quit]))
(provide 'calc-menu)
-
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).
(let ((msgs
'("Press `h' for complete help; press `?' repeatedly for a summary"
"Letter keys: Negate; Precision; Yank; Why; Xtended cmd; Quit"
- "Letter keys: SHIFT + Undo, reDo; Keep-args; Inverse, Hyperbolic, Option"
+ "Letter keys: SHIFT + Undo, reDo; Inverse, Hyperbolic, Option"
"Letter keys: SHIFT + sQrt; Sin, Cos, Tan; Exp, Ln, logB"
"Letter keys: SHIFT + Floor, Round; Abs, conJ, arG; Pi"
- "Letter keys: SHIFT + Num-eval; More-recn; eXec-kbd-macro"
+ "Letter keys: SHIFT + Num-eval; More-recn; eXec-kbd-macro; Keep-args"
"Other keys: +, -, *, /, ^, \\ (int div), : (frac div)"
"Other keys: & (1/x), | (concat), % (modulo), ! (factorial)"
"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 @@
;;; Return only quotient to top of stack (nil if zero)
-;; calc-poly-div-remainder is a local variable for
+;; calc-poly-div-remainder is a local variable for
;; calc-poly-div (in calc-alg.el), but is used by
;; calcFunc-pdiv, which is called by calc-poly-div.
(defvar calc-poly-div-remainder)
@@ -512,7 +512,7 @@
;;; Given an expression find all variables that are polynomial bases.
;;; Return list in the form '( (var1 degree1) (var2 degree2) ... ).
-;; The variable math-poly-base-total-base is local to
+;; The variable math-poly-base-total-base is local to
;; math-total-polynomial-base, but is used by math-polynomial-p1,
;; which is called by math-total-polynomial-base.
(defvar math-poly-base-total-base)
@@ -539,19 +539,19 @@
nil)
;; The variable math-factored-vars is local to calcFunc-factors and
-;; calcFunc-factor, but is used by math-factor-expr and
+;; calcFunc-factor, but is used by math-factor-expr and
;; math-factor-expr-part, which are called (directly and indirectly) by
;; calcFunc-factor and calcFunc-factors.
(defvar math-factored-vars)
;; The variable math-fact-expr is local to calcFunc-factors,
-;; calcFunc-factor and math-factor-expr, but is used by math-factor-expr-try
+;; calcFunc-factor and math-factor-expr, but is used by math-factor-expr-try
;; and math-factor-expr-part, which are called (directly and indirectly) by
;; calcFunc-factor, calcFunc-factors and math-factor-expr.
(defvar math-fact-expr)
-;; The variable math-to-list is local to calcFunc-factors and
-;; calcFunc-factor, but is used by math-accum-factors, which is
+;; The variable math-to-list is local to calcFunc-factors and
+;; calcFunc-factor, but is used by math-accum-factors, which is
;; called (indirectly) by calcFunc-factors and calcFunc-factor.
(defvar math-to-list)
@@ -729,7 +729,7 @@
'(1)))
;; We now have a square-free polynomial with integer coefs.
- ;; For now, we use a kludgey method that finds linear and
+ ;; For now, we use a kludgy method that finds linear and
;; quadratic terms using floating-point root-finding.
(if (setq t1 (let ((calc-symbolic-mode nil))
(math-poly-all-roots nil p t)))
@@ -749,7 +749,7 @@
(math-add
(math-add
(math-mul den (math-pow math-fet-x 2))
- (math-mul (math-mul coef1 den)
+ (math-mul (math-mul coef1 den)
math-fet-x))
(math-mul coef0 den)))
(let ((den (math-lcm-denoms coef0)))
@@ -1077,7 +1077,7 @@ If no partial fraction representation can be found, return nil."
((and (eq (car-safe expr) '^)
(memq (car-safe (nth 1 expr)) '(+ -))
(integerp (nth 2 expr))
- (if (and
+ (if (and
(or (math-known-matrixp (nth 1 (nth 1 expr)))
(math-known-matrixp (nth 2 (nth 1 expr)))
(and
@@ -1090,11 +1090,11 @@ If no partial fraction representation can be found, return nil."
(math-add-or-sub (list '* (nth 1 (nth 1 expr)) (nth 1 expr))
(list '* (nth 2 (nth 1 expr)) (nth 1 expr))
nil (eq (car (nth 1 expr)) '-))
- (math-add-or-sub (list '* (nth 1 (nth 1 expr))
- (list '^ (nth 1 expr)
+ (math-add-or-sub (list '* (nth 1 (nth 1 expr))
+ (list '^ (nth 1 expr)
(1- (nth 2 expr))))
- (list '* (nth 2 (nth 1 expr))
- (list '^ (nth 1 expr)
+ (list '* (nth 2 (nth 1 expr))
+ (list '^ (nth 1 expr)
(1- (nth 2 expr))))
nil (eq (car (nth 1 expr)) '-)))
(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 @@
val))
val))))))))
-;;; The Calc set- and get-register commands are modified versions of functions
+;;; The Calc set- and get-register commands are modified versions of functions
;;; in register.el
(defvar calc-register-alist nil
@@ -206,7 +206,7 @@ With prefix arg, delete as well."
(defun calc-add-to-register (register start end prepend delete-flag)
"Add the lines in the region to register REGISTER.
-If PREPEND is non-nil, add them to the beginning of the register,
+If PREPEND is non-nil, add them to the beginning of the register,
otherwise the end. If DELETE-FLAG is non-nil, also delete the region."
(let* ((top-num (calc-locate-cursor-element start))
(top-pos (save-excursion
@@ -242,7 +242,7 @@ With prefix arg, also delete the region."
(if (eq major-mode 'calc-mode)
(calc-add-to-register register start end nil delete-flag)
(append-to-register register start end delete-flag)))
-
+
(defun calc-prepend-to-register (register start end &optional delete-flag)
"Copy the lines in the region to the beginning of register REGISTER.
With prefix arg, also delete the region."
@@ -250,7 +250,7 @@ With prefix arg, also delete the region."
(if (eq major-mode 'calc-mode)
(calc-add-to-register register start end t delete-flag)
(prepend-to-register register start end delete-flag)))
-
+
(defun calc-clean-newlines (s)
@@ -585,12 +585,12 @@ To cancel the edit, simply kill the *Calc Edit* buffer."
(setq calc-allow-ret allow-ret)
(let ((inhibit-read-only t))
(erase-buffer))
- (add-hook 'kill-buffer-hook (lambda ()
+ (add-hook 'kill-buffer-hook (lambda ()
(let ((calc-edit-handler nil))
(calc-edit-finish t))
(message "(Cancelled)")) t t)
(insert (propertize
- (concat
+ (concat
(or title title "Calc Edit Mode. ")
"Press `C-c C-c'"
(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."
(defcustom calculator-prompt "Calc=%s> "
"The prompt used by the Emacs calculator.
-It should contain a \"%s\" somewhere that will indicate the i/o radixes;
+It should contain a \"%s\" somewhere that will indicate the i/o radices;
this will be a two-character string as described in the documentation
for `calculator-mode'."
: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.
Optional argument WARNTIME is an integer (or string) giving the number
of minutes before the appointment at which to start warning.
The default is `appt-message-warning-time'."
- (interactive "sTime (hh:mm[am/pm]): \nsMessage:
+ (interactive "sTime (hh:mm[am/pm]): \nsMessage: \n\
sMinutes before the appointment to start warning: ")
(unless (string-match appt-time-regexp time)
(error "Unacceptable time-string"))
@@ -521,7 +521,7 @@ sMinutes before the appointment to start warning: ")
(or appt-timer (appt-activate))
(let ((time-msg (list (list (appt-convert-time time))
(concat time " " msg) t)))
- ;; It is presently non-sensical to have multiple warnings about
+ ;; It is presently nonsensical to have multiple warnings about
;; the same appointment with just different delays, but it might
;; not always be so. TODO
(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."
(let ((m displayed-month)
(y displayed-year))
(calendar-increment-month m y (- 11 month))
- (if (> m 9) ; is november visible?
+ (if (> m 9) ; Is November visible?
(list (list (list month day y) string)))))
(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."
(defun solar-mean-equinoxes/solstices (k year)
"Julian day of mean equinox/solstice K for YEAR.
K=0, spring equinox; K=1, summer solstice; K=2, fall equinox; K=3, winter
-solstice. These formulae are only to be used between 1000 BC and 3000 AD."
+solstice. These formulas are only to be used between 1000 BC and 3000 AD."
(let ((y (/ year 1000.0))
(z (/ (- year 2000) 1000.0)))
(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 @@
+2011-12-19 Sam Steingold <sds@gnu.org>
+
+ * semantic/edit.el (semantic-edits-incremental-parser): Add the
+ autoload cookie, necessary for JDEE.
+
+2011-12-06 Juanma Barranquero <lekktu@gmail.com>
+
+ * semantic/bovine/c.el (semantic-tag-abstract-p): Fix typo.
+
2011-11-26 Chong Yidong <cyd@gnu.org>
* 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."
(setq values (cons (eval expr) values))
(let ((old-value (make-symbol "t")) new-value)
;; Bind debug-on-error to something unique so that we can
- ;; detect when evaled code changes it.
+ ;; detect when evalled code changes it.
(let ((debug-on-error old-value))
(setq values (cons (eval expr) values))
(setq new-value debug-on-error))
- ;; If evaled code has changed the value of debug-on-error,
+ ;; If evalled code has changed the value of debug-on-error,
;; propagate that change to the global binding.
(unless (eq old-value new-value)
(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
;
; (oref this variables))
;
-; ;; Add in all variables from the configuration not allready covered.
+; ;; Add in all variables from the configuration not already covered.
; (mapc (lambda (c)
;
; (if (member (car c) conf-done)
@@ -372,7 +372,7 @@ NOTE: Not yet in use! This is part of an SRecode conversion of
(setq conf-done (cons (car c) conf-done))))
(insert (cdr c) "\n"))
(oref this variables))
- ;; Add in all variables from the configuration not allready covered.
+ ;; Add in all variables from the configuration not already covered.
(mapc (lambda (c)
(if (member (car c) conf-done)
nil
@@ -430,7 +430,7 @@ sources variable."
this (oref proj configuration-default)))
(conf-done nil)
)
- ;; Add in all variables from the configuration not allready covered.
+ ;; Add in all variables from the configuration not already covered.
(mapc (lambda (c)
(if (member (car c) conf-done)
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 @@
(defmethod ede-proj-makefile-insert-source-variables :BEFORE
((this ede-proj-target-makefile-archive) &optional moresource)
"Insert bin_PROGRAMS variables needed by target THIS.
-We aren't acutally inserting SOURCE details, but this is used by the
+We aren't actually inserting SOURCE details, but this is used by the
Makefile.am generator, so use it to add this important bin program."
(ede-pmake-insert-variable-shared
(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."
(defmethod ede-proj-makefile-insert-automake-pre-variables
((this ede-proj-target-makefile-shared-object))
"Insert bin_PROGRAMS variables needed by target THIS.
-We aren't acutally inserting SOURCE details, but this is used by the
+We aren't actually inserting SOURCE details, but this is used by the
Makefile.am generator, so use it to add this important bin program."
(ede-pmake-insert-variable-shared "lib_LTLIBRARIES"
(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."
(= v1-1 v2-1)
(= v1-2 v2-2)
(= v1-3 v2-3)
- v1-4 v2-4 ; all or nothin if elt - is =
+ v1-4 v2-4 ; all or nothing if elt - is =
(< v1-4 v2-4))
(and (= v1-0 v2-0)
(= v1-1 v2-1)
(= v1-2 v2-2)
- v1-3 v2-3 ; all or nothin if elt - is =
+ v1-3 v2-3 ; all or nothing if elt - is =
(< v1-3 v2-3))
(and (= v1-1 v2-1)
(< 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."
(save-excursion (semantic-fetch-tags))
nil)
;; If we are here, it is because the lexical step failed,
- ;; proably due to unterminated lists or something like that.
+ ;; probably due to unterminated lists or something like that.
;; We do nothing, and just wait for the next idle timer
;; 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 @@
(let ((pentry (nth idx pf))
(ptentry (nth idx pft)))
(if (or (stringp pentry) (not ptentry))
- ;; Found someting ok. stop
+ ;; Found something ok. Stop.
(setq stop t)
(setq idx (1+ idx)))))
;; 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.
;;
;; will create 2 toplevel tags, one is type A, and the other variable B
;; where the :type of B is just a type tag A that is a prototype, and
- ;; the actual struct info of A is it's own toplevel tag.
+ ;; the actual struct info of A is its own toplevel tag.
(when (or (semantic-tag-of-class-p tag 'function)
(semantic-tag-of-class-p tag 'variable))
(let* ((basetype (semantic-tag-type tag))
@@ -1311,7 +1311,7 @@ Optional PARENT and COLOR as specified with
"Return non-nil if TAG is considered abstract.
PARENT is tag's parent.
In C, a method is abstract if it is `virtual', which is already
-handled. A class is abstract iff it's destructor is virtual."
+handled. A class is abstract iff its destructor is virtual."
(cond
((eq (semantic-tag-class tag) 'type)
(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."
Unfortunately, this requires that the tag in question has been loaded
into Emacs Lisp's memory."
(let ((obsoletethis (intern-soft (semantic-tag-name tag)))
- (obsoletor nil))
+ (obsoleter nil))
;; This asks if our tag is available in the Emacs name space for querying.
(when obsoletethis
(mapatoms (lambda (a)
(let ((oi (get a 'byte-obsolete-info)))
(if (and oi (eq (car oi) obsoletethis))
- (setq obsoletor a)))))
- (if obsoletor
- (format "\n@obsolete{%s,%s}" obsoletor (semantic-tag-name tag))
+ (setq obsoleter a)))))
+ (if obsoleter
+ (format "\n@obsolete{%s,%s}" obsoleter (semantic-tag-name tag))
""))))
(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."
(eieio-instance-tracker-find filename 'file 'semanticdb-database-list))
(defmethod semanticdb-file-directory-exists-p ((DB semanticdb-project-database-file)
- &optional supress-questions)
+ &optional suppress-questions)
"Does the directory the database DB needs to write to exist?
-If SUPRESS-QUESTIONS, then do not ask to create the directory."
+If SUPPRESS-QUESTIONS, then do not ask to create the directory."
(let ((dest (file-name-directory (oref DB file)))
)
(cond ((null dest)
;; @TODO - If it was never set up... what should we do ?
nil)
((file-exists-p dest) t)
- ((or supress-questions
+ ((or suppress-questions
(and (boundp 'semanticdb--inhibit-make-directory)
semanticdb--inhibit-make-directory))
nil)
@@ -216,13 +216,13 @@ If SUPRESS-QUESTIONS, then do not ask to create the directory."
(defmethod semanticdb-save-db ((DB semanticdb-project-database-file)
&optional
- supress-questions)
+ suppress-questions)
"Write out the database DB to its file.
If DB is not specified, then use the current database."
(let ((objname (oref DB file)))
(when (and (semanticdb-dirty-p DB)
(semanticdb-live-p DB)
- (semanticdb-file-directory-exists-p DB supress-questions)
+ (semanticdb-file-directory-exists-p DB suppress-questions)
(semanticdb-write-directory-p DB)
)
;;(message "Saving tag summary for %s..." objname)
@@ -243,7 +243,7 @@ If DB is not specified, then use the current database."
(t
;; @todo - It should ask if we are not called from a hook.
;; How?
- (if (or supress-questions
+ (if (or suppress-questions
(y-or-n-p (format "Skip Error: %s ?" (car (cdr foo)))))
(message "Save Error: %S: %s" (car (cdr foo))
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.")
"Synchronize the search index IDX with some NEW-TAGS."
;; Reset our parts.
(semantic-reset idx)
- ;; Notify dependants by clearning their indicies.
+ ;; Notify dependants by clearing their indices.
(semanticdb-notify-references
(oref idx table)
(lambda (tab me)
@@ -224,7 +224,7 @@ This class will cache data derived during various searches.")
(if (semantic-find-tags-by-class 'include new-tags)
(progn
(semantic-reset idx)
- ;; Notify dependants by clearning their indicies.
+ ;; Notify dependants by clearing their indices.
(semanticdb-notify-references
(oref idx table)
(lambda (tab me)
@@ -234,7 +234,7 @@ This class will cache data derived during various searches.")
(when (oref idx type-cache)
(when (semanticdb-partial-synchronize (oref idx type-cache) new-tags)
;; If the synchronize returns true, we need to notify.
- ;; Notify dependants by clearning their indicies.
+ ;; Notify dependants by clearing their indices.
(semanticdb-notify-references
(oref idx table)
(lambda (tab me)
@@ -405,10 +405,10 @@ Default action as described in `semanticdb-find-translate-path'."
;; do a caching lookup.
(let ((index (semanticdb-get-table-index table)))
(if (semanticdb-find-need-cache-update-p table)
- ;; Lets go look up our indicies
+ ;; Let's go look up our indices.
(let ((ans (semanticdb-find-translate-path-includes--internal path)))
(oset index include-path ans)
- ;; Once we have our new indicies set up, notify those
+ ;; Once we have our new indices set up, notify those
;; who depend on us if we found something for them to
;; depend on.
(when ans (semanticdb-refresh-references table))
@@ -575,7 +575,7 @@ a new path from the provided PATH."
(setq ans (semanticdb-file-table
(car systemdb)
;; I would expect most omniscient to return the same
- ;; thing reguardless of filename, but we may have
+ ;; thing regardless of filename, but we may have
;; one that can return a table of all things the
;; current file needs.
(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.")
"Non nil if this table needs to be `Saved'.")
(db-refs :initform nil
:documentation
- "List of `semanticdb-table' objects refering to this one.
+ "List of `semanticdb-table' objects referring to this one.
These aren't saved, but are instead recalculated after load.
See the file semantic/db-ref.el for how this slot is used.")
(pointmax :initarg :pointmax
@@ -657,7 +657,7 @@ The file associated with OBJ does not need to be in a buffer."
;;; SAVE/LOAD
;;
(defmethod semanticdb-save-db ((DB semanticdb-project-database)
- &optional supress-questions)
+ &optional suppress-questions)
"Cause a database to save itself.
The database base class does not save itself persistently.
Subclasses 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."
"For IFACE, highlight NONTERM in the parser buffer.
NONTERM is the name of the rule currently being processed that shows up
as a nonterminal (or tag) in the source buffer.
-If RULE and MATCH indicies are specified, highlight those also."
+If RULE and MATCH indices are specified, highlight those also."
(set-buffer (oref iface :parser-buffer))
(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."
(buffer-name (current-buffer))))
(run-hooks 'semantic-edits-incremental-reparse-failed-hook))
+;;;###autoload
(defun semantic-edits-incremental-parser ()
"Incrementally reparse the current buffer.
Incremental parser allows semantic to only reparse those sections of
@@ -859,7 +860,7 @@ pre-positioned to a convenient location."
(setq cacheend chil)
(while (and cacheend (not (eq last (car cacheend))))
(setq cacheend (cdr cacheend)))
- ;; The splicable part is after cacheend.. so move cacheend
+ ;; The spliceable part is after cacheend.. so move cacheend
;; one more tag.
(setq cacheend (cdr cacheend))
;; 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'."
;;; Old Style Brute Force Search Routines
;;
-;; These functions will search through tags lists explicity for
+;; These functions will search through tags lists explicitly for
;; desired information.
;; 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."
semantic-grammar-mode-keywords-3)
nil ;; perform string/comment fontification
nil ;; keywords are case sensitive.
- ;; This puts _ & - as a word constituant,
+ ;; This puts _ & - as a word constituent,
;; simplifying our keywords significantly
((?_ . "w") (?- . "w"))))
;; 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."
;; NOTE ON COMMENTED SAFE HERE
;; We used to not execute the services if the buffer was
- ;; unparseable. We now assume that they are lexically
- ;; safe to do, because we have marked the buffer unparseable
+ ;; unparsable. We now assume that they are lexically
+ ;; safe to do, because we have marked the buffer unparsable
;; if there was a problem.
;;(when safe
(dolist (service semantic-idle-scheduler-queue)
@@ -476,7 +476,7 @@ Does nothing if the current buffer doesn't need reparsing."
;; do them here, then all the bovination hooks are not run, and
;; we save lots of time.
(cond
- ;; If the buffer was previously marked unparseable,
+ ;; If the buffer was previously marked unparsable,
;; then don't waste our time.
((semantic-parse-tree-unparseable-p)
nil)
@@ -515,7 +515,7 @@ Does nothing if the current buffer doesn't need reparsing."
(save-excursion (semantic-fetch-tags))
nil)
;; If we are here, it is because the lexical step failed,
- ;; proably due to unterminated lists or something like that.
+ ;; probably due to unterminated lists or something like that.
;; We do nothing, and just wait for the next idle timer
;; 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."
(if (eq (semantic-lex-token-class (car semantic-lex-token-stream))
'whitespace)
;; Merge whitespace tokens together if they are adjacent. Two
- ;; whitespace tokens may be sperated by a comment which is not in
+ ;; whitespace tokens may be separated by a comment which is not in
;; the token stream.
(setcdr (semantic-lex-token-bounds (car semantic-lex-token-stream))
(match-end 0))
@@ -1271,7 +1271,7 @@ they are comment end characters)."
(if (eq (semantic-lex-token-class (car semantic-lex-token-stream))
'whitespace)
;; Merge whitespace tokens together if they are adjacent. Two
- ;; whitespace tokens may be sperated by a comment which is not in
+ ;; whitespace tokens may be separated by a comment which is not in
;; the token stream.
(progn
(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."
nil))))
;; Great Sadness. Assume that FORMS execute within the
;; confines of the current buffer only! Mark this thing
- ;; unparseable iff the special symbol was thrown. This
+ ;; unparsable iff the special symbol was thrown. This
;; will prevent future calls from parsing, but will allow
;; then to still return the cache.
(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
(oset scopecache localargs localargs)
(oset scopecache localvar localvar)
)))
- ;; Make sure we become dependant on the typecache.
+ ;; Make sure we become dependent on the typecache.
(semanticdb-typecache-add-dependant scopecache)
;; Handy debug output.
(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'."
;;;###autoload
(define-overloadable-function semantic-tag-prototype-p (tag)
"Return non nil if TAG is a prototype.
-For some laguages, such as C, a prototype is a declaration of
+For some languages, such as C, a prototype is a declaration of
something without an implementation."
)
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."
(tail (or (memq elem minor-mode-alist)
(setq minor-mode-alist
(cons elem minor-mode-alist)))))
- (setcdr tail (nconc locals (cdr tail)))))))))
+ (setcdr tail (nconc locals (cdr tail)))))))))
(defun semantic-desktop-ignore-this-minor-mode (buffer)
"Installed as a minor-mode initializer for Desktop mode.
@@ -438,7 +438,7 @@ The state is indicated in the modeline with the following characters:
`-' -> The cache is up to date.
`!' -> The cache requires a full update.
`~' -> The cache needs to be incrementally parsed.
- `%' -> The cache is not currently parseable.
+ `%' -> The cache is not currently parsable.
`@' -> Auto-parse in progress (not set here.)
With prefix argument ARG, turn on if positive, otherwise off. The
minor mode can be turned on only if semantic feature is available and
@@ -524,7 +524,7 @@ This marker is one of the following:
`-' -> The cache is up to date.
`!' -> The cache requires a full update.
`~' -> The cache needs to be incrementally parsed.
- `%' -> The cache is not currently parseable.
+ `%' -> The cache is not currently parsable.
`@' -> Auto-parse in progress (not set here.)
Arguments IGNORE are ignored, and accepted so this can be used as a hook
in 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 @@
;; name space. Elisp dynamic binding allows that ;-)
;; Here are simple macros to easily define and use set of variables
-;; binded locally, without all these "reference to free variable"
+;; bound locally, without all these "reference to free variable"
;; compiler warnings!
(defmacro wisent-context-name (name)
@@ -2640,7 +2640,7 @@ there are any reduce/reduce conflicts.")
(defun wisent-print-results ()
"Print information on generated parser.
-Report detailed informations if `wisent-verbose-flag' or
+Report detailed information if `wisent-verbose-flag' or
`wisent-debug-flag' are non-nil."
(when (or wisent-verbose-flag wisent-debug-flag)
(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 @@
;;; :blank
;;
;; Using :blank means that the template should force blank lines
-;; before and after the template, reguardless of where the insertion
+;; before and after the template, regardless of where the insertion
;; is occurring.
(defun srecode-semantic-handle-:blank (dict)
"Add macros into the dictionary DICT specifying blank line spacing.
@@ -185,4 +185,3 @@ do not contain any text from preceding or following text."
(provide 'srecode/args)
;;; srecode/args.el ends here
-
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.")
)
(defvar srecode-field-replication-max-size 100
- "Maximum size of a field before cancelling replication.")
+ "Maximum size of a field before canceling replication.")
(defun srecode-field-mod-hook (ol after start end &optional pre-len)
"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.")
(setq doit nil)))
(goto-char pm)
)
- ;; Do indentation reguardless of the newline.
+ ;; Do indentation regardless of the newline.
(when (and (eq i t) inbuff)
(indent-according-to-mode)
(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.")
'(srecode-font-lock-keywords
nil ;; perform string/comment fontification
nil ;; keywords are case sensitive.
- ;; This puts _ & - as a word constituant,
+ ;; This puts _ & - as a word constituent,
;; simplifying our keywords significantly
((?_ . "w") (?- . "w")))))
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 @@
;; It is pretty easy to make new derived modes for other processes.
;; For documentation on the functionality provided by Comint mode, and
-;; the hooks available for customising it, see the comments below.
+;; the hooks available for customizing it, see the comments below.
;; For further information on the standard derived modes (shell,
;; inferior-lisp, inferior-scheme, ...), see the relevant source files.
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 @@
;; operates over the text rectangle selected which rectangle diagonal is
;; given by the region start and end.
;;
-;; See `delimit-columns-format' variable documentation for column formating.
+;; See `delimit-columns-format' variable documentation for column formatting.
;;
;; `delimit-columns-region' is useful when you have columns of text that
;; are not well aligned, like:
@@ -171,7 +171,7 @@ For examples below, consider:
Valid values are:
- nil no formating. That is, `delimit-columns-after' is followed by
+ nil no formatting. That is, `delimit-columns-after' is followed by
`delimit-columns-separator'.
For example, the result is: \"<ccc>:<dddd>:\"
@@ -190,9 +190,9 @@ Valid values are:
For example, the result is: \"<ccc >:<dddd >:\"
Any other value is treated as t."
- :type '(choice :menu-tag "Column Formating"
- :tag "Column Formating"
- (const :tag "No Formating" nil)
+ :type '(choice :menu-tag "Column Formatting"
+ :tag "Column Formatting"
+ (const :tag "No Formatting" nil)
(const :tag "Column Alignment" t)
(const :tag "Separator Alignment" separator)
(const :tag "Column Padding" padding))
@@ -206,7 +206,7 @@ This has effect only when there are lines with different number of columns."
:group 'columns)
(defcustom delimit-columns-start 0
- "Specify column number to start prettifing.
+ "Specify column number to start prettifying.
See also `delimit-columns-end' for documentation.
@@ -221,7 +221,7 @@ column (column 0) is located at left corner."
:group 'columns)
(defcustom delimit-columns-end 1000000
- "Specify column number to end prettifing.
+ "Specify column number to end prettifying.
See also `delimit-columns-start' for documentation.
@@ -404,7 +404,7 @@ START and END delimits the corners of text rectangle."
(re-search-forward delimit-columns-separator
delimit-columns-limit 'move))
(setq ncol (1+ ncol)))
- ;; insert first formating
+ ;; insert first formatting
(insert delimit-columns-str-before delimit-columns-before)
;; Adjust all columns but last one
(while (progn
@@ -436,7 +436,7 @@ START and END delimits the corners of text rectangle."
(setq spaces (and delimit-columns-format
(make-string (aref delimit-columns-max ncol)
?\s)))))
- ;; insert last formating
+ ;; insert last formatting
(cond ((null delimit-columns-format)
(insert delimit-columns-after delimit-columns-str-after))
((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."
(put 'newline 'delete-selection t)
(put 'open-line 'delete-selection 'kill)
-;; This is very useful for cancelling a selection in the minibuffer without
+;; This is very useful for canceling a selection in the minibuffer without
;; aborting the minibuffer.
(defun minibuffer-keyboard-quit ()
"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'."
(compose-string (string ch) 0 1 (format "\t%c\t" ch))
(string ch)))
-;; Return a nicely formated list of categories; extended category
+;; Return a nicely formatted list of categories; extended category
;; description is added to the category name as a tooltip
(defsubst describe-char-categories (category-set)
(let ((mnemonics (category-set-mnemonics category-set)))
@@ -422,6 +422,20 @@ as well as widgets, buttons, overlays, and text properties."
(setq charset (char-charset char)
code (encode-char char charset)))
(setq code char))
+ (cond
+ ;; Append a PDF character to directional embeddings and
+ ;; overrides, to prevent potential messup of the following
+ ;; text.
+ ((memq char '(?\x202a ?\x202b ?\x202d ?\x202e))
+ (setq char-description
+ (concat char-description
+ (propertize (string ?\x202c) 'invisible t))))
+ ;; Append a LRM character to any strong character to avoid
+ ;; messing up the numerical codepoint.
+ ((memq (get-char-code-property char 'bidi-class) '(R AL))
+ (setq char-description
+ (concat char-description
+ (propertize (string ?\x200e) 'invisible t)))))
(when composition
;; When the composition is trivial (i.e. composed only with the
;; 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."
;; ----------------------------------------------------------------------------
(defun desktop-internal-v2s (value)
"Convert VALUE to a pair (QUOTE . TXT); (eval (read TXT)) gives VALUE.
-TXT is a string that when read and evaluated yields value.
+TXT is a string that when read and evaluated yields VALUE.
QUOTE may be `may' (value may be quoted),
-`must' (values must be quoted), or nil (value may not be quoted)."
+`must' (value must be quoted), or nil (value must not be quoted)."
(cond
((or (numberp value) (null value) (eq t value) (keywordp value))
(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.")
(define-key map [mouse-2] 'dframe-click)
;; This is the power click for new frames, or refreshing a cache
(define-key map [S-mouse-2] 'dframe-power-click)
- ;; This adds a small unecessary visual effect
+ ;; This adds a small unnecessary visual effect
;;(define-key map [down-mouse-2] 'dframe-quick-mouse)
(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."
;; Apparently people do use it. - lrd 12/22/97.
(with-no-warnings
- ;; Warnings are suppresed to avoid "global/dynamic var `X' lacks a prefix".
+ ;; Warnings are suppressed to avoid "global/dynamic var `X' lacks a prefix".
;; This is unbearably ugly, but not more than having global variables
;; named size, time, name or s, however practical it can be while writing
;; `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."
(defvar dired-re-no-dot "^\\([^.]\\|\\.\\([^.]\\|\\..\\)\\).*")
;; Delete file, possibly delete a directory and all its files.
-;; This function is usefull outside of dired. One could change it's name
+;; This function is useful outside of dired. One could change its name
;; to e.g. recursive-delete-file and put it somewhere else.
(defun dired-delete-file (file &optional recursive trash) "\
Delete FILE or directory (possibly recursively if optional RECURSIVE is true.)
@@ -4128,7 +4128,7 @@ instead.
;;;***
;;;### (autoloads (dired-do-relsymlink dired-jump-other-window dired-jump)
-;;;;;; "dired-x" "dired-x.el" "ea7c74fbb7dddf43bb85875018cb59ad")
+;;;;;; "dired-x" "dired-x.el" "a542cdbf155ff79f36331bae217f3b28")
;;; Generated autoloads from dired-x.el
(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 @@
(eq last-input-event ?\C-g))
(progn (setq unread-command-events nil
prefix-arg nil)
- ;; If it wasn't cancelling a prefix character, then quit.
+ ;; If it wasn't canceling a prefix character, then quit.
(if (or (= (length (this-command-keys)) 1)
(not inhibit-quit)) ; safety
(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."
(defun aput (alist-symbol key &optional value)
- "Inserts a key-value pair into an alist.
+ "Insert a key-value pair into an alist.
The alist is referenced by ALIST-SYMBOL. The key-value pair is made
-from KEY and optionally, VALUE. Returns the altered alist or nil if
-ALIST is nil.
+from KEY and optionally, VALUE. Returns the altered alist.
If the key-value pair referenced by KEY can be found in the alist, and
VALUE 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)."
(setq alist (symbol-value alist-symbol))
(cond ((null alist) (set alist-symbol elem))
((anot-head-p alist key) (set alist-symbol (nconc elem alist)))
- (value (setcar alist (car elem)))
+ (value (setcar alist (car elem)) alist)
(t alist))))
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."
(setq form (cdr form)))
(setq form (car form)))
(if (and (eq (car-safe form) 'list)
- ;; The spec is evaled in callint.c in dynamic-scoping
+ ;; The spec is evalled in callint.c in dynamic-scoping
;; mode, so just leaving the form unchanged would mean
;; it won't be eval'd in the right mode.
(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."
(defun edebug-on-entry (function &optional flag)
"Cause Edebug to stop when FUNCTION is called.
With prefix argument, make this temporary so it is automatically
-cancelled the first time the function is entered."
+canceled the first time the function is entered."
(interactive "aEdebug on entry to: \nP")
;; Could store this in the edebug data instead.
(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 @@
(eval-and-compile
;; About the above. EIEIO must process its own code when it compiles
-;; itself, thus, by eval-and-compiling outselves, we solve the problem.
+;; itself, thus, by eval-and-compiling ourselves, we solve the problem.
;; Compatibility
(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 @@
(put 'autoload 'doc-string-elt 3)
(put 'defun 'doc-string-elt 3)
(put 'defun* 'doc-string-elt 3)
+(put 'defmethod 'doc-string-elt 3)
(put 'defvar 'doc-string-elt 3)
(put 'defcustom 'doc-string-elt 3)
(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 @@
;;; ToDo:
+;; - a trust mechanism, since compiling a package can run arbitrary code.
+;; For example, download package signatures and check that they match.
;; - putting info dirs at the start of the info path means
;; users see a weird ordering of categories. OTOH we want to
;; override later entries. maybe emacs needs to enforce
@@ -224,7 +226,10 @@ Each element has the form (ID . LOCATION).
LOCATION specifies the base location for the archive.
If it starts with \"http:\", it is treated as a HTTP URL;
otherwise it should be an absolute directory name.
- (Other types of URL are currently not supported.)"
+ (Other types of URL are currently not supported.)
+
+Only add locations that you trust, since fetching and installing
+a package can run arbitrary code."
:type '(alist :key-type (string :tag "Archive name")
:value-type (string :tag "URL or directory name"))
: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:
(dolist (branch rest)
(let* ((match (car branch))
(code&vars (cdr branch))
- (splitted
+ (split
(pcase--split-match sym splitter match)))
- (unless (eq (car splitted) :pcase--fail)
- (push (cons (car splitted) code&vars) then-rest))
- (unless (eq (cdr splitted) :pcase--fail)
- (push (cons (cdr splitted) code&vars) else-rest))))
+ (unless (eq (car split) :pcase--fail)
+ (push (cons (car split) code&vars) then-rest))
+ (unless (eq (cdr split) :pcase--fail)
+ (push (cons (cdr split) code&vars) else-rest))))
(cons (nreverse then-rest) (nreverse else-rest))))
(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 @@
;; syntax-ppss-flush-cache since that would not only flush the cache but also
;; reset syntax-propertize--done which should not be done in this case).
"Mode-specific function to apply the syntax-table properties.
-Called with 2 arguments: START and END.
+Called with two arguments: START and END.
This function can call `syntax-ppss' on any position before END, but it
should not call `syntax-ppss-flush-cache', which means that it should not
call `syntax-ppss' on some position and later modify the buffer on some
@@ -248,7 +248,7 @@ Note: back-references in REGEXPs do not work."
(if syntax
(put-text-property
mb me 'syntax-table syntax))))))))
-
+
(if (or (not (cddr rule)) (zerop gn))
(setq code (nconc (nreverse thiscode) code))
(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."
(defcustom cua-check-pending-input t
"If non-nil, don't override prefix key if input pending.
-It is rumoured that `input-pending-p' is unreliable under some window
+It is rumored that `input-pending-p' is unreliable under some window
managers, so try setting this to nil, if prefix override doesn't work."
:type 'boolean
:group 'cua)
@@ -1242,7 +1242,7 @@ If ARG is the atom `-', scroll upward by nearly full screen."
;; Handle shifted cursor keys and other movement commands.
;; If region is not active, region is activated if key is shifted.
- ;; If region is active, region is cancelled if key is unshifted
+ ;; If region is active, region is canceled if key is unshifted
;; (and region not started with C-SPC).
;; If rectangle is active, expand rectangle in specified direction and
;; 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
global marker is in another buffer.
If the global marker isn't set, set the global marker at point in the current
buffer. Otherwise jump to the global marker position and cancel it.
-With prefix argument, don't jump to global mark when cancelling it."
+With prefix argument, don't jump to global mark when canceling it."
(interactive "P")
(unless cua--global-mark-initialized
(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."
(untabify (point-min) (point-max)))
(defun cua-text-fill-rectangle (width text)
- "Replace rectagle with filled TEXT read from minibuffer.
+ "Replace rectangle with filled TEXT read from minibuffer.
A numeric prefix argument is used a new width for the filled rectangle."
(interactive (list
(prefix-numeric-value current-prefix-arg)
@@ -1269,7 +1269,7 @@ A numeric prefix argument is used a new width for the filled rectangle."
(lambda () (insert text))))
(defun cua-refill-rectangle (width)
- "Fill contents of current rectagle.
+ "Fill contents of current rectangle.
A numeric prefix argument is used as new width for the filled rectangle."
(interactive "P")
(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")
(goto-char (point-min))
(if (y-or-n-p "Inhibit VIP startup message? ")
(progn
- (with-current-buffer
+ (with-current-buffer
(find-file-noselect
(substitute-in-file-name vip-startup-file))
(goto-char (point-max))
@@ -877,7 +877,7 @@ is the name of the register for COM."
(if (> beg end) (exchange-point-and-mark)))
(defun vip-global-execute ()
- "Call last keyboad macro for each line in the region."
+ "Call last keyboard macro for each line in the region."
(if (> (point) (mark)) (exchange-point-and-mark))
(beginning-of-line)
(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 @@
(error
(viper-message-conditions conds))))
-;; escape to emacs mode termporarily
+;; escape to emacs mode temporarily
(defun viper-escape-to-emacs (arg &optional events)
"Escape to Emacs state from Vi state for one Emacs command.
ARG 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."
(message "Switched to EMACS state for the next command..."))
(viper-escape-to-state arg events 'emacs-state))
-;; escape to Vi mode termporarily
+;; escape to Vi mode temporarily
(defun viper-escape-to-vi (arg)
"Escape from Emacs state to Vi state for one Vi 1-character command.
If 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."
;; Quote region by each line with a user supplied string.
(defun viper-quote-region ()
(let ((quote-str viper-quote-string)
- (donot-change-dafault t))
+ (donot-change-default t))
(setq quote-str
(viper-read-string-with-history
"Quote string: "
@@ -1991,9 +1991,9 @@ Undo previous insertion and inserts new."
((string-match "lisp.*-mode" (symbol-name major-mode)) ";;")
((memq major-mode '(c-mode cc-mode c++-mode)) "//")
((memq major-mode '(sh-mode shell-mode)) "#")
- (t (setq donot-change-dafault nil)
+ (t (setq donot-change-default nil)
quote-str))))
- (or donot-change-dafault
+ (or donot-change-default
(setq viper-quote-string quote-str))
(viper-enlarge-region (point) (mark t))
(if (> (point) (mark t)) (exchange-point-and-mark))
@@ -2407,7 +2407,7 @@ problems."
t 'local)
(add-hook
'viper-pre-command-hooks 'viper-replace-state-pre-command-sentinel t 'local)
- ;; guard against a smartie who switched from R-replace to normal replace
+ ;; guard against a smarty who switched from R-replace to normal replace
(remove-hook
'viper-post-command-hooks 'viper-R-state-post-command-sentinel 'local)
(if overwrite-mode (overwrite-mode -1))
@@ -2531,7 +2531,7 @@ problems."
'viper-post-command-hooks 'viper-R-state-post-command-sentinel t 'local)
(add-hook
'viper-pre-command-hooks 'viper-replace-state-pre-command-sentinel t 'local)
- ;; guard against a smartie who switched from R-replace to normal replace
+ ;; guard against a smarty who switched from R-replace to normal replace
(remove-hook
'viper-post-command-hooks 'viper-replace-state-post-command-sentinel 'local)
)
@@ -3767,7 +3767,7 @@ If MAJOR-MODE is set, set the macros only in that major mode."
"//" 'vi-state
[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]
scope)
- ;; toggle regexp/vanila search
+ ;; toggle regexp/vanilla search
(viper-record-kbd-macro
"///" 'vi-state
[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.
"//" 'emacs-state
[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]
(or arg-majormode major-mode))
- ;; toggle regexp/vanila search
+ ;; toggle regexp/vanilla search
(viper-record-kbd-macro
"///" 'emacs-state
[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."
(setq viper-prefix-commands
(cons viper-buffer-search-char viper-prefix-commands)))
-;; This is a Viper wraper for isearch-forward.
+;; This is a Viper wrapper for isearch-forward.
(defun viper-isearch-forward (arg)
"Do incremental search forward."
(interactive "P")
@@ -4025,7 +4025,7 @@ Null string will repeat previous search."
(if (listp arg) (setq arg (car arg)))
(viper-exec-form-in-emacs (list 'isearch-forward arg)))
-;; This is a Viper wraper for isearch-backward."
+;; This is a Viper wrapper for isearch-backward."
(defun viper-isearch-backward (arg)
"Do incremental search backward."
(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."
;;; Face-saving tricks
(defgroup viper-highlighting nil
- "Hilighting of replace region, search pattern, minibuffer, etc."
+ "Highlighting of replace region, search pattern, minibuffer, etc."
:prefix "viper-"
:group 'viper)
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."
(defun viper-global-execute ()
- "Call last keyboad macro for each line in the region."
+ "Call last keyboard macro for each line in the region."
(if (> (point) (mark t)) (exchange-point-and-mark))
(beginning-of-line)
(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."
)
"List specifying how to modify the various major modes to enable some Viperisms.
The list has the structure: ((mode viper-state keymap) (mode viper-state
-keymap) ...). If `mode' is on the list, the `kemap' will be made active (on
+keymap) ...). If `mode' is on the list, the `keymap' will be made active (on
the minor-mode-map-alist) in the specified viper state.
If you change this list, have to restart Emacs for the change to take effect.
However, 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. "
(while file-list
(epa-encrypt-file
(expand-file-name (car file-list))
- (epa-select-keys (epg-make-context) "Select recipents for encryption.
+ (epa-select-keys (epg-make-context) "Select recipients for encryption.
If no one is selected, symmetric encryption will be performed. "))
(setq file-list (cdr file-list)))
(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."
(current-buffer)))))
(epa-select-keys
context
- "Select recipents for encryption.
+ "Select recipients for encryption.
If no one is selected, symmetric encryption will be performed. "
recipients)
(if epa-file-encrypt-to
@@ -273,7 +273,7 @@ If no one is selected, symmetric encryption will be performed. "
(epg-sub-key-id (car (epg-key-sub-key-list key))))
(epa-select-keys
(epg-make-context)
- "Select recipents for encryption.
+ "Select recipients for encryption.
If no one is selected, symmetric encryption will be performed. "))))
;;;###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 @@
everything but the last character.
* erc.el(erc-send-current-line):
- Check wether point is in the input line. If
+ Check whether point is in the input line. If
not, just beep and do nothing.
2002-12-28 Alex Schroeder <alex@gnu.org>
@@ -98,7 +98,7 @@
2002-12-28 Jorgen Schaefer <forcer@users.sourceforge.net>
* erc.el(erc-log-irc-protocol):
- Removed check wether get-buffer-create
+ Removed check whether get-buffer-create
returned nil. "The value is never nil", says the docstring.
* erc.el: Day Of The Small Changes
@@ -245,7 +245,7 @@
(erc-process-alive): Check erc-process for boundp and processp.
* erc.el(erc-kill-buffer-function):
- Do not check wether the process is
+ Do not check whether the process is
alive before running the hook, because there might be functions on
the hook that need to run even when the process is dead. And
function that wants to check this, should use (erc-process-alive).
@@ -1037,7 +1037,7 @@
* (erc-away-p): new function
erc-fill.el:
- * (erc-fill-variable): Check wether erc-timestamp-format is bound before
+ * (erc-fill-variable): Check whether erc-timestamp-format is bound before
using it (erc-fill.el does not require erc-stamp).
2002-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 @@
* erc-button.el: New variable erc-button-wrap-long-urls.
Modified erc-button-add-buttons:
New optional argument REGEXP.
- If we're buttonising a URL and erc-button-wrap-long-urls is
+ If we're buttonizing a URL and erc-button-wrap-long-urls is
non-nil, try and wrap them
Modified erc-button-add-buttons-1:
@@ -693,10 +693,10 @@
2003-04-29 Jorgen Schaefer <forcer@users.sourceforge.net>
* erc.el(erc):
- Check wether erc-save-buffer-in-logs is bound, too
+ Check whether erc-save-buffer-in-logs is bound, too
* erc.el(erc):
- Check wether erc-logging-enabled is bound before using it - not
+ Check whether erc-logging-enabled is bound before using it - not
everyone is using erc-log.el!
2003-04-28 Andreas Fuchs <asf@void.at>
@@ -822,7 +822,7 @@
(define-erc-module): the enable and disable routines now update erc-modules
accordingly
erc-modules: new variable controlling the modules which erc has loaded/will
- load. when customising, it will automatically enable modules. it won't
+ load. when customizing, it will automatically enable modules. it won't
automatically disable modules which are removed, yet.
(erc-update-modules): enable all modules in `erc-modules'
@@ -1058,7 +1058,7 @@
* erc.el(erc-process-input-line):
when displaying the help for a function, if no
documentation exists, don't fall over
- (erc-cmd-SAY): new function for quoting lines begining with /
+ (erc-cmd-SAY): new function for quoting lines beginning with /
(erc-server-NICK):
- fix a bug where the "is now known as" message doesn't appear on newly
created /query buffers
@@ -1166,7 +1166,7 @@
(erc-person): Call erc-downcase before getting
something from the hash.
- (erc-nick-in-channel): Checking wether erc-process must be used is
+ (erc-nick-in-channel): Checking whether erc-process must be used is
unnecessary -- this will be done in erc-person.
(erc-nick-channels): New.
(erc-add-nick-to-channel, erc-update-member): Call erc-downcase
@@ -1491,7 +1491,7 @@
* erc.el:
* removed duplicate do-no-parse-args properties for the defaliased defuns
(erc-process-input-line): show function signature when incorrect args
- (erc-extract-command-from-line): canonicalise defaliases before extracting
+ (erc-extract-command-from-line): canonicalize defaliases before extracting
plist
(erc-cmd-CLEAR): fixed
(erc-cmd-UNIGNORE): fixed again
@@ -1678,7 +1678,7 @@
2003-01-11 Jorgen Schaefer <forcer@users.sourceforge.net>
* erc-stamp.el(erc-insert-timestamp-right):
- Check wether erc-fill-column is
+ Check whether erc-fill-column is
available before using it. Else default to fill-column or if
everything else fails, the window width of the current window. For the
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'."
(if (member (erc-response.command parsed-response)
erc-server-prevent-duplicates)
(let ((m (erc-response.unparsed parsed-response)))
- ;; duplicate supression
+ ;; duplicate suppression
(if (< (or (gethash m erc-server-duplicates) 0)
(- (erc-current-time) erc-server-duplicate-timeout))
(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
directories gets pushed, and its size is unlimited.
`eshell-last-dir-ring' is meant for users who don't use `pushd'
-explicity very much, but every once in a while would like to return to
+explicitly very much, but every once in a while would like to return to
a previously visited directory without having to type in the whole
thing again."
: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."
;;; Functions:
(defun eshell-rebind-initialize ()
- "Initialize the inputing code."
+ "Initialize the inputting code."
(unless eshell-non-interactive-p
(add-hook 'eshell-mode-hook 'eshell-setup-input-keymap nil t)
(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."
(> (tty-color-gray-shades display) 2)))))
(defun read-color (&optional prompt convert-to-RGB allow-empty-name msg)
- "Read a color name or RGB triplet of the form \"#RRRRGGGGBBBB\".
+ "Read a color name or RGB triplet.
Completion is available for color names, but not for RGB triplets.
-RGB triplets have the form #XXXXXXXXXXXX, where each X is a hex
-digit. The number of Xs must be a multiple of 3, with the same
-number of Xs for each of red, green, and blue. The order is red,
-green, blue.
+RGB triplets have the form \"#RRGGBB\". Each of the R, G, and B
+components can have one to four digits, but all three components
+must have the same number of digits. Each digit is a hex value
+between 0 and F; either upper case or lower case for A through F
+are acceptable.
In addition to standard color names and RGB hex values, the
following 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'."
(defun file-remote-p (file &optional identification connected)
"Test whether FILE specifies a location on a remote system.
-Returns nil or a string identifying the remote connection (ideally
-a prefix of FILE). For example, the remote identification for filename
-\"/user@host:/foo\" could be \"/user@host:\".
-A file is considered \"remote\" if accessing it is likely to be slower or
-less reliable than accessing local files.
-Furthermore, relative file names do not work across remote connections.
-
-IDENTIFICATION specifies which part of the identification shall
-be returned as string. IDENTIFICATION can be the symbol
-`method', `user', `host' or `localname'; any other value is
-handled like nil and means to return the complete identification
-string.
-
-If CONNECTED is non-nil, the function returns an identification only
-if FILE is located on a remote system, and a connection is established
-to that remote system.
-
-`file-remote-p' will never open a connection on its own."
+A file is considered remote if accessing it is likely to
+be slower or less reliable than accessing local files.
+
+`file-remote-p' never opens a new remote connection. It can
+only reuse a connection that is already open.
+
+Return nil or a string identifying the remote connection
+\(ideally a prefix of FILE). Return nil if FILE is a relative
+file name.
+
+When IDENTIFICATION is nil, the returned string is a complete
+remote identifier: with components method, user, and host. The
+components are those present in FILE, with defaults filled in for
+any that are missing.
+
+IDENTIFICATION can specify which part of the identification to
+return. IDENTIFICATION can be the symbol `method', `user',
+`host', or `localname'. Any other value is handled like nil and
+means to return the complete identification. The string returned
+for IDENTIFICATION `localname' can differ depending on whether
+there is an existing connection.
+
+If CONNECTED is non-nil, return an identification only if FILE is
+located on a remote system and a connection is established to
+that remote system.
+
+Tip: You can use this expansion of remote identifier components
+ to derive a new remote file name from an existing one. For
+ example, if FILE is \"/sudo::/path/to/file\" then
+
+ \(concat \(file-remote-p FILE) \"/bin/sh\")
+
+ returns a remote file name for file \"/bin/sh\" that has the
+ same remote identifier as FILE but expanded; a name such as
+ \"/sudo:root@myhost:/bin/sh\"."
(let ((handler (find-file-name-handler file 'file-remote-p)))
(if handler
(funcall handler 'file-remote-p file identification connected)
@@ -4866,7 +4883,7 @@ given. With a prefix argument, TRASH is nil."
directory 'full directory-files-no-dot-files-regexp))
(error "Directory is not empty, not moving to trash")
(move-file-to-trash directory)))
- ;; Otherwise, call outselves recursively if needed.
+ ;; Otherwise, call ourselves recursively if needed.
(t
(if (and recursive (not (file-symlink-p directory)))
(mapc (lambda (file)
@@ -6110,7 +6127,7 @@ message to that effect instead of signaling an error."
(defvar kill-emacs-query-functions nil
"Functions to call with no arguments to query about killing Emacs.
-If any of these functions returns nil, killing Emacs is cancelled.
+If any of these functions returns nil, killing Emacs is canceled.
`save-buffers-kill-emacs' calls these functions, but `kill-emacs',
the low level primitive, does not. See also `kill-emacs-hook'.")
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."
:group 'filesets)
(defcustom filesets-max-entry-length 50
- "Truncate names of splitted submenus to this length."
+ "Truncate names of split submenus to this length."
:set (function filesets-set-default)
:type 'integer
: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."
;;{{{ Redisplay
;; Redraw all the windows on the screen, starting with the top window.
-;; The window used as as marker is WIN, or the selcted window if WIN
+;; The window used as as marker is WIN, or the selected window if WIN
;; is nil. Start every window directly after the end of the previous
;; window, to make sure long lines are displayed correctly.
@@ -1993,7 +1993,7 @@ report this using the `report-emacs-bug' function."
;; going to be recentered at the next redisplay, unless we do a
;; read-and-write cycle to update the `force' flag inside the windows.
;;
-;; In 19.30, a new varible `window-scroll-functions' is called every
+;; In 19.30, a new variable `window-scroll-functions' is called every
;; time a window is recentered. It is not perfect for our situation,
;; since when it is called for a tail window, it is to late. However,
;; 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."
;; and they give users another mechanism for changing face appearance.
;; We now allow a FACENAME in `font-lock-keywords' to be any expression that
;; returns a face. So the easiest thing is to continue using these variables,
-;; rather than sometimes evaling FACENAME and sometimes not. sm.
+;; rather than sometimes evalling FACENAME and sometimes not. sm.
;; Note that in new code, in the vast majority of cases there is no
;; 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:
(forms-first-record))
)
- ;; user customising
+ ;; user customizing
;;(message "forms: proceeding setup (user hooks)...")
(run-mode-hooks 'forms-mode-hook 'forms-mode-hooks)
;;(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 @@
+2011-12-28 Katsumi Yamaoka <yamaoka@jpl.org>
+
+ * mm-view.el (mm-display-inline-fontify): Add comment.
+
+2011-12-15 Juri Linkov <juri@jurta.org>
+
+ * mm-decode.el (mm-inline-media-tests): Add missing
+ `mm-handle-media-subtype'.
+
+2011-12-09 Tassilo Horn <tassilo@member.fsf.org>
+
+ * message.el (message-valid-fqdn-regexp): Update with newly approved
+ top-level domain names ".tel" and ".asia".
+
+2011-12-08 Katsumi Yamaoka <yamaoka@jpl.org>
+
+ * gnus-sum.el (gnus-summary-show-article): Don't load shr
+ unconditionally.
+
+2011-12-07 Katsumi Yamaoka <yamaoka@jpl.org>
+
+ * message.el (message-pop-to-buffer): Use pop-to-buffer instead of
+ pop-to-buffer-same-window for old Emacsen.
+
+2011-12-04 Chong Yidong <cyd@gnu.org>
+
+ * message.el (message-pop-to-buffer): Partially revert 2011-11-30
+ change (Bug#10200).
+
2011-12-02 Katsumi Yamaoka <yamaoka@jpl.org>
* compface.el (uncompface):
@@ -145,7 +174,7 @@
2011-10-17 Dave Abrahams <dave@boostpro.com> (tiny change)
- * gnus-registry.el (gnus-registry-enabled): Add new variable. (Bug#9691)
+ * gnus-registry.el (gnus-registry-enabled): Add new variable (bug#9691).
(gnus-registry-install-shortcuts): Set `gnus-registry-install' to 'ask
only while we need to find out if it should be t or nil.
(gnus-registry-initialize): Don't set `gnus-registry-install' to t.
@@ -304,7 +333,7 @@
2011-09-20 Julien Danjou <julien@danjou.info>
* auth-source.el (auth-source-netrc-create): Use default value for
- password if specified. Evaluate default.
+ password if specified. Evaluate default.
(auth-source-plstore-create): Ditto.
(auth-source-plstore-create, auth-source-netrc-create): Fix default
value evaluation.
@@ -360,7 +389,7 @@
(message-mail-other-window, message-mail-other-frame)
(message-news-other-window, message-news-other-frame):
Use switch-to-buffer-other-frame and switch-to-buffer-other-window
- instead of setting buffer display varibles.
+ instead of setting buffer display variables.
2011-09-11 Lars Magne Ingebrigtsen <larsi@gnus.org>
@@ -621,8 +650,8 @@
2011-08-05 Andrew Cohen <cohen@andy.bu.edu>
- * gnus-sum.el (gnus-summary-refer-article): Warp to article. This
- allows article-referral to work from an nnir group.
+ * gnus-sum.el (gnus-summary-refer-article): Warp to article.
+ This allows article-referral to work from an nnir group.
2011-08-04 Andrew Cohen <cohen@andy.bu.edu>
@@ -638,7 +667,7 @@
2011-08-03 Andrew Cohen <cohen@andy.bu.edu>
* nnir.el (nnir-read-server-parm): Add an argument to restrict to
- server-variables only. This should fix a bug introduced with commit
+ server-variables only. This should fix a bug introduced with commit
e1889675b7f4adf057833c5513c9374134c4e053.
(nnir-run-query): 'nnir-search-engine should not be set from the global
environment.
@@ -1838,7 +1867,7 @@
2011-03-21 Julien Danjou <julien@danjou.info>
* mm-view.el (mm-display-inline-fontify): Make mode optional, and call
- normal-mode if not set. Set temp buffer unmodified to avoid kill-buffer
+ normal-mode if not set. Set temp buffer unmodified to avoid kill-buffer
query.
(mm-inline-text): Render normal text with fontification whenever
possible.
@@ -2682,9 +2711,9 @@
* gnus.el (gnus-summary-line-format): Mention &user-date format in
docstring.
- * gnus.el (gnus-user-date-format-alist): Change default value. Use
- defcustom, with type and group. Move from gnus-util.el. Rename to
- gnus-summary-user-date-format-alist.
+ * gnus.el (gnus-user-date-format-alist): Change default value.
+ Use defcustom, with type and group. Move from gnus-util.el.
+ Rename to gnus-summary-user-date-format-alist.
2011-02-03 Glenn Morris <rgm@gnu.org>
@@ -3211,12 +3240,12 @@
2010-12-17 Julien Danjou <julien@danjou.info>
* gnus-util.el (gnus-rescale-image): Allow to resize images even if
- they are from file. Can also scale up.
+ they are from file. Can also scale up.
2010-12-17 Andrew Cohen <cohen@andy.bu.edu>
- * gnus-sum.el (gnus-summary-refer-thread): Simplify code. Restore
- gnus-use-agent.
+ * gnus-sum.el (gnus-summary-refer-thread): Simplify code.
+ Restore gnus-use-agent.
(gnus-get-newsgroup-headers): Avoid unwanted spaces at eol.
* nnir.el (nnir-get-active): Ignore nnir-ignored-newsgroups if null.
@@ -3574,8 +3603,8 @@
* nnir.el: Update to handle the registry better.
(autoload): Silence byte-compiler.
(nnir-open-server): Add a hook for nnir groups.
- (nnir-request-move-article): Don't mangle the header. Better to use
- formating variables (which will be added in the future).
+ (nnir-request-move-article): Don't mangle the header. Better to use
+ formatting variables (which will be added in the future).
(nnir-registry-action): Update the registry using the original article
group name.
(nnir-mode): Install nnir-specific hooks for updating the registry.
@@ -4010,7 +4039,7 @@
2010-11-21 Andrew Cohen <cohen@andy.bu.edu>
* nnir.el: Fix typo in comments.
- (nnir-run-imap): Simplify code. No need to reverse artlist.
+ (nnir-run-imap): Simplify code. No need to reverse artlist.
(nnir-run-gmane): Use nnir-tmp-buffer for web results.
2010-11-21 Lars Magne Ingebrigtsen <larsi@gnus.org>
@@ -4042,8 +4071,8 @@
2010-11-19 Katsumi Yamaoka <yamaoka@jpl.org>
- * gnus-art.el (gnus-mime-display-single)
- * gnus-html.el (gnus-html-wash-images, gnus-html-prefetch-images)
+ * gnus-art.el (gnus-mime-display-single):
+ * gnus-html.el (gnus-html-wash-images, gnus-html-prefetch-images):
* mm-decode.el (mm-shr): Assume that gnus-inhibit-images may be a group
parameter.
@@ -4398,7 +4427,7 @@
* gnus-util.el (gnus-string-match-p): New function, that is an alias to
string-match-p in Emacs >=23.
- * gnus-msg.el (gnus-configure-posting-styles)
+ * gnus-msg.el (gnus-configure-posting-styles):
* nnir.el (nnir-run-gmane): Use gnus-string-match-p.
2010-11-01 Glenn Morris <rgm@gnu.org>
@@ -5346,8 +5375,8 @@
* gnus-util.el (gnus-remove-if): Allow hash table.
(gnus-remove-if-not): New function.
- * gnus-art.el (gnus-mime-view-part-as-type)
- * gnus-score.el (gnus-summary-score-effect)
+ * gnus-art.el (gnus-mime-view-part-as-type):
+ * gnus-score.el (gnus-summary-score-effect):
* gnus-sum.el (gnus-read-move-group-name):
Replace remove-if-not with gnus-remove-if-not.
@@ -5836,8 +5865,8 @@
2010-09-29 Katsumi Yamaoka <yamaoka@jpl.org>
* mm-util.el (mm-codepage-iso-8859-list, mm-charset-eval-alist)
- (mm-mime-charset)
- * rfc2047.el (rfc2047-syntax-table)
+ (mm-mime-charset):
+ * rfc2047.el (rfc2047-syntax-table):
* utf7.el (utf7-utf-16-coding-system): Comment fix.
* nnrss.el (nnrss-read-server-data, nnrss-read-group-data): Use `load'
@@ -5852,8 +5881,8 @@
2010-09-28 Katsumi Yamaoka <yamaoka@jpl.org>
- * mail-source.el (mail-source-report-new-mail)
- * message.el (message-default-mail-headers)
+ * mail-source.el (mail-source-report-new-mail):
+ * message.el (message-default-mail-headers):
* mm-decode.el (mm-valid-image-format-p): Comment fix.
* mml2015.el (mml2015-use): Don't bind recursive-load-depth-limit.
@@ -6349,8 +6378,8 @@
(gnus-article-next-page-1): No need to adjust the number of lines.
(gnus-article-describe-bindings): Always use help-buffer.
- * gnus-audio.el (gnus-audio-inline-sound)
- * gnus-cus.el (gnus-custom-mode)
+ * gnus-audio.el (gnus-audio-inline-sound):
+ * gnus-cus.el (gnus-custom-mode):
* gnus-group.el (gnus-group-update-tool-bar): Comment fix.
* gnus-sum.el (gnus-remove-overlays): Doc fix.
@@ -6546,9 +6575,9 @@
2010-09-22 Katsumi Yamaoka <yamaoka@jpl.org>
- * mailcap.el (mailcap-parse-mailcap, mailcap-parse-mimetypes)
- * mm-util.el (mm-decompress-buffer)
- * nnir.el (nnir-run-find-grep)
+ * mailcap.el (mailcap-parse-mailcap, mailcap-parse-mimetypes):
+ * mm-util.el (mm-decompress-buffer):
+ * nnir.el (nnir-run-find-grep):
* pop3.el (pop3-list): Use 3rd arg of split-string.
2010-09-21 Lars Magne Ingebrigtsen <larsi@gnus.org>
@@ -7123,7 +7152,7 @@
* gnus-start.el (gnus-activate-group): Take an optional parameter to
say that you don't want to call gnus-request-group with don-check, but
- do check the reponse. This is for virtual groups only.
+ do check the response. This is for virtual groups only.
(gnus-get-unread-articles): Count the archive groups as secondary, so
that they're activated the same way as before.
@@ -7414,7 +7443,7 @@
2010-09-01 Katsumi Yamaoka <yamaoka@jpl.org>
* gnus-html.el (gnus-html-cache-directory, gnus-html-cache-size)
- (gnus-html-frame-width, gnus-blocked-images)
+ (gnus-html-frame-width, gnus-blocked-images):
* message.el (message-prune-recipient-rules): Add custom version.
* gnus-sum.el (gnus-auto-expirable-marks): Bump custom version.
@@ -7464,11 +7493,11 @@
* gnus-ems.el: Provide compatibility functions for
gnus-set-process-plist.
- * gnus-sum.el (gnus-summary-stop-at-end-of-message)
- * gnus.el (gnus-valid-select-methods)
- * message.el (message-send-mail-partially-limit)
- * mm-decode.el (mm-text-html-renderer)
- * mml.el (mml-insert-mime-headers-always)
+ * gnus-sum.el (gnus-summary-stop-at-end-of-message):
+ * gnus.el (gnus-valid-select-methods):
+ * message.el (message-send-mail-partially-limit):
+ * mm-decode.el (mm-text-html-renderer):
+ * mml.el (mml-insert-mime-headers-always):
* smiley.el (smiley-regexp-alist): Bump custom version.
2010-08-31 Lars Magne Ingebrigtsen <larsi@gnus.org>
@@ -7800,7 +7829,7 @@
2010-05-13 Katsumi Yamaoka <yamaoka@jpl.org>
- * mml1991.el (mml1991-mailcrypt-encrypt, mml1991-gpg-encrypt)
+ * mml1991.el (mml1991-mailcrypt-encrypt, mml1991-gpg-encrypt):
* mml2015.el (mml2015-gpg-encrypt): Disable multibyte in buffers
generated within the mm-with-unibyte-current-buffer macro.
@@ -7875,11 +7904,11 @@
2010-05-07 Katsumi Yamaoka <yamaoka@jpl.org>
- * nnweb.el (nnweb-gmane-search)
+ * nnweb.el (nnweb-gmane-search):
* yenc.el (yenc-decode-region): Don't run set-buffer-multibyte for
XEmacs.
- * gnus-art.el (gnus-article-browse-html-parts)
+ * gnus-art.el (gnus-article-browse-html-parts):
* gnus-group.el (gnus-read-ephemeral-gmane-group)
(gnus-read-ephemeral-bug-grou): Use mm-make-temp-file instead of
make-temp-file.
@@ -10587,10 +10616,10 @@
2007-12-05 Katsumi Yamaoka <yamaoka@jpl.org>
- * gnus-art.el (gnus-use-idna)
- * gnus-start.el (gnus-site-init-file)
- * message.el (message-use-idna)
- * mm-uu.el (mm-uu-hide-markers)
+ * gnus-art.el (gnus-use-idna):
+ * gnus-start.el (gnus-site-init-file):
+ * message.el (message-use-idna):
+ * mm-uu.el (mm-uu-hide-markers):
* smiley.el (smiley-style): Revert changes that suppress warnings.
2007-12-05 Katsumi Yamaoka <yamaoka@jpl.org>
@@ -11892,13 +11921,13 @@
2007-05-25 Katsumi Yamaoka <yamaoka@jpl.org>
* gnus-art.el (gnus-header-from, gnus-header-subject, gnus-header-name)
- (gnus-header-content)
- * gnus-cite.el (gnus-cite-10)
- * gnus-srvr.el (gnus-server-closed)
+ (gnus-header-content):
+ * gnus-cite.el (gnus-cite-10):
+ * gnus-srvr.el (gnus-server-closed):
* gnus.el (gnus-group-mail-1, gnus-group-mail-1-empty)
(gnus-group-mail-2, gnus-group-mail-2-empty, gnus-group-mail-3)
(gnus-group-mail-3-empty, gnus-group-mail-low)
- (gnus-group-mail-low-empty, gnus-splash)
+ (gnus-group-mail-low-empty, gnus-splash):
* message.el (message-header-to, message-header-cc)
(message-header-subject, message-header-other, message-header-name)
(message-header-xheader, message-separator, message-cited-text)
@@ -21315,7 +21344,7 @@
(gnus-agent-cat-groups): Use eval-and-compile, not
eval-when-compile, to define gnus-agent-set-cat-groups as the setf
method of gnus-agent-cat-groups even when the buffer has been
- evaled.
+ evalled.
(gnus-agent-save-active, gnus-agent-save-active-1): Merge to
delete gnus-agent-save-active-1.
(gnus-agent-save-groups): Delete. Identical to
@@ -21831,7 +21860,7 @@
2004-01-06 Steve Youngs <sryoungs@bigpond.net.au>
- * gnus-ems.el (gnus-mode-line-modified): Don't conditionalise on
+ * gnus-ems.el (gnus-mode-line-modified): Don't conditionalize on
XEmacs version.
* 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 @@
2003-02-02 Katsumi Yamaoka <yamaoka@jpl.org>
* nnheader.el (nnheader-directory-separator-character): Change the
- way to compute the dafault value.
+ way to compute the default value.
2003-02-02 Jesper Harder <harder@ifa.au.dk>
@@ -8442,7 +8442,7 @@
2002-07-21 Nevin Kapur <nevin@jhu.edu>
- * nnmail.el (nnmail-fancy-expiry-target): Treat nonexisting
+ * nnmail.el (nnmail-fancy-expiry-target): Treat nonexistent
headers as empty headers.
2002-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.
If the match is a string, it is used as a regexp match on the
article. If the match is a symbol, that symbol will be funcalled
from the buffer of the article to be saved with the newsgroup as the
-parameter. If it is a list, it will be evaled in the same buffer.
+parameter. If it is a list, it will be evalled in the same buffer.
If this form or function returns a string, this string will be used as a
possible 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."
result))
(defun gnus-fun-ppm-change-string ()
- (let* ((possibilites '("%02x0000" "00%02x00" "0000%02x"
- "%02x%02x00" "00%02x%02x" "%02x00%02x"))
+ (let* ((possibilities '("%02x0000" "00%02x00" "0000%02x"
+ "%02x%02x00" "00%02x%02x" "%02x00%02x"))
(format (concat "'#%02x%02x%02x' '#"
- (nth (random 6) possibilites)
+ (nth (random 6) possibilities)
"'"))
(values nil))
(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."
'gnus-group-tool-bar-retro)
"Specifies the Gnus group tool bar.
-It can be either a list or a symbol refering to a list. See
+It can be either a list or a symbol referring to a list. See
`gmm-tool-bar-from-list' for the format of the list. The
default key map is `gnus-group-mode-map'.
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."
;; BUG: We really need to get the charset for
;; each name in the Newsgroups and Followup-To
;; lines to allow crossposting between group
- ;; namess with incompatible character sets.
+ ;; names with incompatible character sets.
;; -- Per Abrahamsen <abraham@dina.kvl.dk> 2001-10-08.
(group-field-charset
(gnus-group-name-charset
@@ -1784,7 +1784,7 @@ this is a reply."
(and header
(string-match (nth 2 match) header)))))))
(t
- ;; This is a form to be evaled.
+ ;; This is a form to be evalled.
(eval match)))))
;; We have a match, so we set the variables.
(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."
(defvar gnus-group-indentation "")
;; Format specs. The chunks below are the machine-generated forms
-;; that are to be evaled as the result of the default format strings.
+;; that are to be evalled as the result of the default format strings.
;; We write them in here to get them byte-compiled. That way the
;; default actions will be quite fast, while still retaining the full
;; flexibility of the user-defined format specs.
@@ -690,7 +690,7 @@ are supported for %s."
(not (and (featurep 'xemacs)
gnus-use-correct-string-widths)))
(insert (number-to-string pad-width)))
- ;; Create the form to be evaled.
+ ;; Create the form to be evalled.
(if (or max-width cut-width ignore-value
(and (featurep 'xemacs)
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."
'gnus-summary-tool-bar-retro)
"Specifies the Gnus summary tool bar.
-It can be either a list or a symbol refering to a list. See
+It can be either a list or a symbol referring to a list. See
`gmm-tool-bar-from-list' for the format of the list. The
default key map is `gnus-summary-mode-map'.
@@ -2969,7 +2969,7 @@ When FORCE, rebuild the tool bar."
'gnus-summary-mode-map)))
(when map
;; Need to set `gnus-summary-tool-bar-map' because `gnus-article-mode'
- ;; uses it's value.
+ ;; uses its value.
(setq gnus-summary-tool-bar-map map))))
(set (make-local-variable 'tool-bar-map) gnus-summary-tool-bar-map))
@@ -7087,7 +7087,7 @@ With ARG, turn line truncation on if ARG is positive."
(defun gnus-summary-find-for-reselect ()
"Return the number of an article to stay on across a reselect.
The current article is considered, then following articles, then previous
-articles. An article is sought which is not cancelled and isn't a temporary
+articles. An article is sought which is not canceled and isn't a temporary
insertion from another group. If there's no such then return a dummy 0."
(let (found)
(dolist (rev '(nil t))
@@ -9611,9 +9611,12 @@ C-u g', show the raw article."
(when (gnus-summary-goto-subject (cdr gnus-article-current) nil t)
(gnus-summary-update-secondary-mark (cdr gnus-article-current))))))
((not arg)
- (require 'shr)
- (let ((shr-ignore-cache t))
- ;; Select the article the normal way.
+ ;; Select the article the normal way.
+ (if (eq mm-text-html-renderer 'shr)
+ (progn
+ (require 'shr)
+ (let ((shr-ignore-cache t))
+ (gnus-summary-select-article nil 'force)))
(gnus-summary-select-article nil 'force)))
((equal arg '(16))
;; 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.")
(let* ((current-window (or (get-buffer-window (current-buffer)) (selected-window)))
(window (or window current-window)))
(select-window window)
- ;; The SPLIT might be something that is to be evaled to
+ ;; The SPLIT might be something that is to be evalled to
;; return a new SPLIT.
(while (and (not (assq (car split) gnus-window-to-buffer))
(symbolp (car split)) (fboundp (car split)))
@@ -447,7 +447,7 @@ should have point."
(when (consp (car split))
(push 1.0 split)
(push 'vertical split))
- ;; The SPLIT might be something that is to be evaled to
+ ;; The SPLIT might be something that is to be evalled to
;; return a new SPLIT.
(while (and (not (assq (car split) gnus-window-to-buffer))
(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."
(defface gnus-summary-cancelled
'((((class color))
(:foreground "yellow" :background "black")))
- "Face used for cancelled articles."
+ "Face used for canceled articles."
:group 'gnus-summary)
;; backward-compatibility alias
(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."
:type 'hook)
(defcustom message-cancel-hook nil
- "Hook run when cancelling articles."
+ "Hook run when canceling articles."
:group 'message-various
:link '(custom-manual "(message)Various Message Variables")
:type 'hook)
@@ -1893,14 +1893,14 @@ You must have the \"hashcash\" binary installed, see `hashcash-path'."
(concat "[a-z0-9][-.a-z0-9]+\\." ;; [hostname.subdomain.]domain.
;; valid TLDs:
"\\([a-z][a-z]\\|" ;; two letter country TDLs
- "aero\\|arpa\\|bitnet\\|biz\\|bofh\\|"
+ "aero\\|arpa\\|asia\\|bitnet\\|biz\\|bofh\\|"
"cat\\|com\\|coop\\|edu\\|gov\\|"
"info\\|int\\|jobs\\|"
"mil\\|mobi\\|museum\\|name\\|net\\|"
- "org\\|pro\\|travel\\|uucp\\)")
+ "org\\|pro\\|tel\\|travel\\|uucp\\)")
;; http://en.wikipedia.org/wiki/List_of_Internet_top-level_domains
;; http://en.wikipedia.org/wiki/GTLD
- ;; `in the process of being approved': .asia .post .tel .sex
+ ;; `approved, but not yet in operation': .xxx
;; "dead" nato bitnet uucp
"Regular expression that matches a valid FQDN."
;; see also: gnus-button-valid-fqdn-regexp
@@ -4409,7 +4409,7 @@ This function could be useful in `message-setup-hook'."
;; A simple function.
((functionp action)
(funcall action))
- ;; Something to be evaled.
+ ;; Something to be evalled.
(t
(eval action))))))
@@ -4840,7 +4840,7 @@ Otherwise, generate and save a value for `canlock-password' first."
(message-fetch-field "Followup-To")))
;; BUG: We really need to get the charset for each name in the
;; Newsgroups and Followup-To lines to allow crossposting
- ;; between group namess with incompatible character sets.
+ ;; between group names with incompatible character sets.
;; -- Per Abrahamsen <abraham@dina.kvl.dk> 2001-10-08.
(group-field-charset
(gnus-group-name-charset method newsgroups-field))
@@ -6327,7 +6327,6 @@ between beginning of field and beginning of line."
(defun message-pop-to-buffer (name &optional switch-function)
"Pop to buffer NAME, and warn if it already exists and is modified."
- (unless switch-function (setq switch-function #'pop-to-buffer))
(let ((buffer (get-buffer name)))
(if (and buffer
(buffer-name buffer))
@@ -6337,7 +6336,7 @@ between beginning of field and beginning of line."
(progn
(gnus-select-frame-set-input-focus (window-frame window))
(select-window window))
- (funcall switch-function buffer)
+ (funcall (or switch-function #'pop-to-buffer) buffer)
(set-buffer buffer))
(when (and (buffer-modified-p)
(not (prog1
@@ -6345,7 +6344,11 @@ between beginning of field and beginning of line."
"Message already being composed; erase? ")
(message nil))))
(error "Message being composed")))
- (funcall switch-function name)
+ (funcall (or switch-function
+ (if (fboundp #'pop-to-buffer-same-window)
+ #'pop-to-buffer-same-window
+ #'pop-to-buffer))
+ name)
(set-buffer name))
(erase-buffer)
(message-mode)))
@@ -7735,7 +7738,7 @@ Setter function for custom variables."
'message-tool-bar-retro)
"Specifies the message mode tool bar.
-It can be either a list or a symbol refering to a list. See
+It can be either a list or a symbol referring to a list. See
`gmm-tool-bar-from-list' for the format of the list. The
default key map is `message-mode-map'.
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."
(ignore-errors
(if (fboundp 'create-image)
(create-image (buffer-string) 'imagemagick 'data-p)
- (mm-create-image-xemacs type)))))
+ (mm-create-image-xemacs (mm-handle-media-subtype handle))))))
(when image
(setcar (cdr handle) (list "image/imagemagick"))
(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."
;; I find font-lock a bit too verbose.
(let ((font-lock-verbose nil))
;; Disable support modes, e.g., jit-lock, lazy-lock, etc.
+ ;; Note: XEmacs people use `font-lock-mode-hook' to run those modes.
(set (make-local-variable 'font-lock-mode-hook) nil)
(set (make-local-variable 'font-lock-support-mode) nil)
(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.")
;; List of NNDiary headers that specify the time spec. Each header name is
;; followed by either two integers (specifying a range of possible values
;; for this header) or one list (specifying all the possible values for this
- ;; header). In the latter case, the list does NOT include the unspecifyed
+ ;; header). In the latter case, the list does NOT include the unspecified
;; spec (*).
;; For time zone values, we have symbolic time zone names associated with
;; the (relative) number of seconds ahead GMT.
@@ -1161,11 +1161,11 @@ all. This may very well take some time.")
(defun nndiary-parse-schedule-value (str min-or-values max)
;; Parse the schedule string STR, or signal an error.
- ;; Signals are caught by `nndary-schedule'.
+ ;; Signals are caught by `nndiary-schedule'.
(if (string-match "[ \t]*\\*[ \t]*" str)
- ;; unspecifyed
+ ;; unspecified
nil
- ;; specifyed
+ ;; specified
(if (listp min-or-values)
;; min-or-values is values
;; #### NOTE: this is actually only a hack for time zones.
@@ -1204,7 +1204,7 @@ all. This may very well take some time.")
;; - Returns nil if `*'
;; - Otherwise returns a list of integers and/or ranges (BEG . END)
;; The exception is the Timze-Zone value which is always of the form (STR).
- ;; Signals are caught by `nndary-schedule'.
+ ;; Signals are caught by `nndiary-schedule'.
(let ((header (format "^X-Diary-%s: \\(.*\\)$" head)))
(goto-char (point-min))
(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."
(message "Doing hyrex-search query \"%s\"...done" qstring)
(sit-for 0)
;; nnir-search returns:
- ;; for nnml/nnfolder: "filename mailid weigth"
- ;; for nnimap: "group mailid weigth"
+ ;; for nnml/nnfolder: "filename mailid weight"
+ ;; for nnimap: "group mailid weight"
(goto-char (point-min))
(delete-non-matching-lines "^\\S + [0-9]+ [0-9]+$")
;; 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."
(process-buffer -process))))
;; When I an able to identify the
;; connection to the server AND I've
- ;; received NO reponse for
+ ;; received NO response for
;; nntp-connection-timeout seconds.
(when (and -buffer (eq 0 (buffer-size -buffer)))
;; 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."
(current-buffer)))))
(epa-select-keys
context
- "Select recipents for encryption.
+ "Select recipients for encryption.
If no one is selected, symmetric encryption will be performed. "
recipients)
(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."
;; The most likely cause of an error is unbalanced parentheses
;; or double-quotes. If all parentheses and double-quotes are
;; quoted meaninglessly with backslashes, removing them might
- ;; make it parseable. Let's try...
+ ;; make it parsable. Let's try...
(error
(let (mod)
(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>'."
(declare-function x-display-pixel-width "xfns.c" (&optional terminal))
(defun gs-width-in-pt (frame pixel-width)
- "Return, on FRAME, pixel width PIXEL-WIDTH tranlated to pt."
+ "Return, on FRAME, pixel width PIXEL-WIDTH translated to pt."
(let ((mm (* (float pixel-width)
(/ (float (x-display-mm-width frame))
(float (x-display-pixel-width frame))))))
@@ -106,7 +106,7 @@ FILE is the value to substitute for the place-holder `<file>'."
(declare-function x-display-pixel-height "xfns.c" (&optional terminal))
(defun gs-height-in-pt (frame pixel-height)
- "Return, on FRAME, pixel height PIXEL-HEIGHT tranlated to pt."
+ "Return, on FRAME, pixel height PIXEL-HEIGHT translated to pt."
(let ((mm (* (float pixel-height)
(/ (float (x-display-mm-height frame))
(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
;;;###autoload
(define-minor-mode highlight-changes-visible-mode
- "Toggle visiblility of highlighting due to Highlight Changes mode.
+ "Toggle visibility of highlighting due to Highlight Changes mode.
With a prefix argument ARG, enable Highlight Changes Visible mode
if ARG is positive, and disable it otherwise. If called from
Lisp, 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'."
(color-values colour)
;;(message "[%S]" window-system)
(x-color-values colour))
- ;; blarg - tty colours are no good - go fetch some X colours:
+ ;; blarg - tty colors are no good - go fetch some X colors:
(hfy-fallback-colour-values colour))))
(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 @@
;;; Commentary:
;; These functions should be automatically loaded when called, but you
-;; can explicity (require 'ibuf-ext) in your ~/.emacs to have them
+;; can explicitly (require 'ibuf-ext) in your ~/.emacs to have them
;; preloaded.
;;; 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'."
'(menu-item "Save current filter groups permanently..."
ibuffer-save-filter-groups
:enable (and (featurep 'ibuf-ext) ibuffer-filter-groups)
- :help "Use a mnemnonic name to store current filter groups"))
+ :help "Use a mnemonic name to store current filter groups"))
(define-key-after groups-map [switch-to-saved-filter-groups]
'(menu-item "Restore permanently saved filters..."
ibuffer-switch-to-saved-filter-groups
@@ -676,7 +676,7 @@ directory, like `default-directory'."
(define-key-after map [menu-bar view filter save-filters]
'(menu-item "Save current filters permanently..." ibuffer-save-filters
:enable (and (featurep 'ibuf-ext) ibuffer-filtering-qualifiers)
- :help "Use a mnemnonic name to store current filter stack"))
+ :help "Use a mnemonic name to store current filter stack"))
(define-key-after map [menu-bar view filter switch-to-saved-filters]
'(menu-item "Restore permanently saved filters..."
ibuffer-switch-to-saved-filters
@@ -2648,7 +2648,7 @@ will be inserted before the group at point."
;;;;;; ibuffer-backward-filter-group ibuffer-forward-filter-group
;;;;;; ibuffer-toggle-filter-group ibuffer-mouse-toggle-filter-group
;;;;;; ibuffer-interactive-filter-by-mode ibuffer-mouse-filter-by-mode
-;;;;;; ibuffer-auto-mode) "ibuf-ext" "ibuf-ext.el" "25e69a1e030791b3a3e7d91d4377173a")
+;;;;;; ibuffer-auto-mode) "ibuf-ext" "ibuf-ext.el" "897e64e4465af94b89e21fa84ae61290")
;;; Generated autoloads from ibuf-ext.el
(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 @@
;; ifindf package back into iswitchb.
;;
;; This is basically what ido (interactively do) is all about; but I
-;; found it ackward to merge my changes into the "iswitchb-" namespace,
+;; found it awkward to merge my changes into the "iswitchb-" namespace,
;; so I invented a common "ido-" namespace for the merged packages.
;;
;; 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
ARG := REG | integer
OPERATOR :=
- ;; Normal arithmethic operators (same meaning as C code).
+ ;; Normal arithmetic operators (same meaning as C code).
+ | - | * | / | %
;; Bitwise operators (same meaning as C code)
@@ -1469,7 +1469,7 @@ OPERATOR :=
| de-sjis
;; If ARG_0 and ARG_1 are the first and second code point of
- ;; JISX0208 character CHAR, and SJIS is the correponding
+ ;; JISX0208 character CHAR, and SJIS is the corresponding
;; Shift-JIS code,
;; (REG = ARG_0 en-sjis ARG_1) means:
;; ((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."
and try again)? " coding-system auto-cs))
(error "Save aborted"))))
(when (and tick (/= tick (buffer-chars-modified-tick)))
- (error "Cancelled because the buffer was modified"))
+ (error "Canceled because the buffer was modified"))
coding-system)))
(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
(defmacro with-coding-priority (coding-systems &rest body)
"Execute BODY like `progn' with CODING-SYSTEMS at the front of priority list.
CODING-SYSTEMS is a list of coding systems. See `set-coding-system-priority'.
-This affects the implicit sorting of lists of coding sysems returned by
+This affects the implicit sorting of lists of coding systems returned by
operations such as `find-coding-systems-region'."
(let ((current (make-symbol "current")))
`(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
succeed, it checks to see if any function in `auto-coding-functions'
gives a match.
-If a coding system is specifed, the return value is a cons
+If a coding system is specified, the return value is a cons
\(CODING . SOURCE), where CODING is the specified coding system and
SOURCE is a symbol `auto-coding-alist', `auto-coding-regexp-alist',
`: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
;; Generate a half-cooked decode map (char-table) for the current
;; Quail map. An element for a character C is a key string or a list
-;; of a key strings to type to input C. The lenth of key string is at
+;; of a key strings to type to input C. The length of key string is at
;; most 2. If it is 2, more keys may be required to input C.
(defun quail-gen-decode-map ()
@@ -2832,7 +2832,7 @@ STATE-n are symbols to denote state. STATE-0 is the initial state.
TRANSITION-n-m are transition rules from STATE-n, and have the form
\(RULES . STATE-x) or RULES, where STATE-x is one of STATE-n above,
RULES is a symbol whose value is an alist of keys \(string) vs the
-correponding characters or strings. The format of the symbol value of
+corresponding characters or strings. The format of the symbol value of
RULES is the same as arguments to `quail-define-rules'.
If 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
function `quail-install-map' (which see)."
(let ((state-alist (mapcar (lambda (x) (list (car x))) table))
tail elt)
- ;; STATE-ALIST is an alist of states vs the correponding sub Quail
+ ;; STATE-ALIST is an alist of states vs the corresponding sub Quail
;; map. It is now initialized to ((STATE-0) (STATE-1) ...).
;; Set key sequence mapping rules in cdr part of each element.
(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 @@
;; identified by a string called package name. Use robin-define-package
;; to define a robin package.
-;; (robin-define-package NAME DOCTSTRING
-;; (INPUT1 OUPUT1)
-;; (INPUT2 OUPUT2)
+;; (robin-define-package NAME DOCSTRING
+;; (INPUT1 OUTPUT1)
+;; (INPUT2 OUTPUT2)
;; ...)
;; 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:
\\<quail-translation-docstring>
-For double-width GB2312 characters correponding to ASCII, use the
+For double-width GB2312 characters corresponding to ASCII, use the
input method `chinese-qj'.")
("chinese-ecdict" "$(05CKH(B"
@@ -122,7 +122,7 @@ compose one Chinese character.
In this input method, you enter a Chinese character by first typing
keys corresponding to Zhuyin symbols (see the above table) followed by
-SPC, 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,
+SPC, 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,
4:$(0(+Vy(B).
\\<quail-translation-docstring>")
@@ -191,7 +191,7 @@ For instance, to input $ADc(B, you type \"n i 3 3\", the first \"n i\" is
a Pinyin, the next \"3\" specifies tone, and the last \"3\" selects
the third character from the candidate list.
-For double-width GB2312 characters correponding to ASCII, use the
+For double-width GB2312 characters corresponding to ASCII, use the
input method `chinese-qj'.")
("chinese-zozy" "$(0I\0D(B"
@@ -203,7 +203,7 @@ compose a Chinese character.
In this input method, you enter a Chinese character by first typing
keys corresponding to Zhuyin symbols (see the above table) followed by
-SPC, 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,
+SPC, 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,
7:$(0M=Vy(B).
\\<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.")
(eval-when-compile decomposition-pair-to-composition)))
(defun ucs-normalize-primary-composite (decomposition-pair composition-predicate)
- "Convert DECOMPOSITION-PAIR to primay composite using COMPOSITION-PREDICATE."
+ "Convert DECOMPOSITION-PAIR to primary composite using COMPOSITION-PREDICATE."
(let ((char (or (gethash decomposition-pair
ucs-normalize-decomposition-pair-to-primary-composite)
(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."
;; Create a separate keymap installed as a minor-mode keymap (e.g. in
;; the emulation-mode-map-alists) in which macro bindings are made
;; independent of any other bindings. When first binding is made,
-;; the kemap is created, installed, and enabled. Key seq. C-x C-k +
+;; the keymap is created, installed, and enabled. Key seq. C-x C-k +
;; can then be used to toggle the use of this keymap on and off.
;; This means that it would be safe(r) to bind ordinary keys like
;; 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 @@
(define-coding-system 'chinese-big5
"BIG5 8-bit encoding for Chinese (MIME:Big5)"
:coding-type 'big5
- :mnemonic ?B
+ :mnemonic ?B
:charset-list '(ascii big5)
:mime-charset 'big5)
@@ -152,7 +152,7 @@
(define-coding-system 'chinese-big5-hkscs
"BIG5-HKSCS 8-bit encoding for Chinese, Hong Kong supplement (MIME:Big5-HKSCS)"
:coding-type 'charset
- :mnemonic ?B
+ :mnemonic ?B
:charset-list '(ascii big5-hkscs)
:mime-charset 'big5-hkscs)
(define-coding-system-alias 'big5-hkscs 'chinese-big5-hkscs)
@@ -191,7 +191,7 @@
chinese-cns11643-5 chinese-cns11643-6
chinese-cns11643-7)
(iso639-language . zh)
- (setup-function . (lambda ()
+ (setup-function . (lambda ()
(use-cjk-char-width-table 'zh_TW)))
(exit-function . use-default-char-width-table)
(coding-system iso-2022-cn euc-tw)
@@ -211,7 +211,7 @@ accepts Big5 for input also (which is then converted to CNS)."))
chinese-cns11643-5 chinese-cns11643-6
chinese-cns11643-7 chinese-big5-1 chinese-big5-2)
(iso639-language . zh)
- (setup-function . (lambda ()
+ (setup-function . (lambda ()
(use-cjk-char-width-table 'zh_TW)))
(exit-function . use-default-char-width-table)
(coding-system euc-tw iso-2022-cn)
@@ -220,7 +220,7 @@ accepts Big5 for input also (which is then converted to CNS)."))
(features china-util)
(input-method . "chinese-cns-quick")
(documentation . "\
-Support for Chinese, prefering the EUC-TW character set. Note that
+Support for Chinese, preferring the EUC-TW character set. Note that
the EUC-TW coding system accepts Big5 for input also (which is then
converted to CNS)."))
'("Chinese"))
@@ -241,13 +241,13 @@ converted to CNS)."))
(set-language-info-alist
"Chinese-GBK" '((charset chinese-gbk)
(iso639-language . zh)
- (setup-function . (lambda ()
+ (setup-function . (lambda ()
(use-cjk-char-width-table 'zh_CN)))
(exit-function . use-default-char-width-table)
(coding-system chinese-gbk)
(coding-priority gbk iso-2022-cn chinese-big5
chinese-iso-8bit) ; fixme?
- (ctext-non-standard-encodings "gbk-0")
+ (ctext-non-standard-encodings "gbk-0")
(input-method . "chinese-py-punct") ; fixme?
(sample-text . "Chinese ($BCfJ8(B,$BIaDL$A;0(B,$A::So(B) $(D95$B9%(B")
(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.")
(define-coding-system 'koi8-u
"KOI8-U 8-bit encoding for Cyrillic (MIME: KOI8-U)"
:coding-type 'charset
- :mnemonic ?U
+ :mnemonic ?U
:charset-list '(koi8-u)
:mime-charset 'koi8-u)
@@ -246,7 +246,7 @@ Support for Russian using koi8-r and the russian-computer input method.")
(ctext-non-standard-encodings "microsoft-cp1251")
(input-method . "bulgarian-bds")
(documentation
- . "Support for Bulgrian with windows-1251 character set."))
+ . "Support for Bulgarian with windows-1251 character set."))
'("Cyrillic"))
(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 @@
-;;; ethio-util.el --- utilities for Ethiopic -*- coding: utf-8; -*-
+;;; ethio-util.el --- utilities for Ethiopic -*- coding: utf-8-emacs; -*-
;; Copyright (C) 1997-1998, 2002-2011 Free Software Foundation, Inc.
;; Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
@@ -48,7 +48,7 @@
([f4] . ethio-sera-to-fidel-buffer)
([S-f4] . ethio-sera-to-fidel-region)
([C-f4] . ethio-sera-to-fidel-marker)
- ([S-f5] . ethio-toggle-punctuation)
+ ;; ([S-f5] . ethio-toggle-punctuation)
([S-f6] . ethio-modify-vowel)
([S-f7] . ethio-replace-space)
;; ([S-f8] . ethio-input-special-character) ; deprecated
@@ -890,7 +890,7 @@ Otherwise, [0-9A-F]."
;;;###autoload
(defun ethio-find-file nil
- "Transliterate file content into Ethiopic dependig on filename suffix."
+ "Transliterate file content into Ethiopic depending on filename suffix."
(cond
((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.")
"Transcribe a Romanized Lao syllable in the region FROM and TO to Lao string.
Only the first syllable is transcribed.
The value has the form: (START END LAO-STRING), where
-START and END are the beggining and end positions of the Roman Lao syllable,
+START and END are the beginning and end positions of the Roman Lao syllable,
LAO-STRING is the Lao character transcription of it.
Optional 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 @@
;; for representing these characters: VISCII, TCVN-5712, VPS, VIQR,
;; and Unicode. VISCII, TCVN-5712 and VPS are simple 1-byte code
;; which assigns 134 unique characters in control-code area
-;; (0x00..0x1F) and right half area (0x80..0xFF). VIQR is a menmonic
+;; (0x00..0x1F) and right half area (0x80..0xFF). VIQR is a mnemonic
;; encoding specification representing diacritical marks by following
;; ASCII characters.
@@ -47,7 +47,7 @@
"Return VISCII character code of CHAR if appropriate."
(encode-char char 'viscii))
-;; VIQR is a menmonic encoding specification for Vietnamese.
+;; VIQR is a mnemonic encoding specification for Vietnamese.
;; It represents diacritical marks by ASCII characters as follows:
;; ------------+----------+--------
;; 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
ARG := REG | integer
OPERATOR :=
- ;; Normal arithmethic operators (same meaning as C code).
+ ;; Normal arithmetic operators (same meaning as C code).
+ | - | * | / | %
;; 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.")
(dolist (buffer (buffer-list))
(set-buffer buffer)
(let ((proposed major-mode))
- ;; Look for an antecessor mode not defined in the feature we're processing
+ ;; Look for a predecessor mode not defined in the feature we're processing
(while (and proposed (rassq proposed unload-function-defs-list))
(setq proposed (get proposed 'derived-mode-parent)))
(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."
(car bug))
items))
(nreverse items))))
- (widget-insert "No bugs maching your keywords found.\n"))
+ (widget-insert "No bugs matching your keywords found.\n"))
(widget-insert "\n")
(widget-create 'push-button
: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.
;;;***
-;;;### (autoloads (rmail-mime) "rmailmm" "rmailmm.el" "2cb1f29b88b0c724fdba389fd7b98b00")
+;;;### (autoloads (rmail-mime) "rmailmm" "rmailmm.el" "91f72e39e6ea7c2be098fe3f05174b9e")
;;; Generated autoloads from rmailmm.el
(autoload 'rmail-mime "rmailmm" "\
@@ -4629,7 +4629,7 @@ If prefix argument REVERSE is non-nil, sorts in reverse order.
;;;### (autoloads (rmail-summary-by-senders rmail-summary-by-topic
;;;;;; rmail-summary-by-regexp rmail-summary-by-recipients rmail-summary-by-labels
-;;;;;; rmail-summary) "rmailsum" "rmailsum.el" "1375d6512b953c0d7c3bde52192f4055")
+;;;;;; rmail-summary) "rmailsum" "rmailsum.el" "d5971848a5fb43dc0092008376298a80")
;;; Generated autoloads from rmailsum.el
(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
(setq index 2))
;; If the tagline is displayed, get past it to the body.
(if (rmail-mime-display-tagline current)
- ;; The next foward-line call must be in sync with how
+ ;; The next forward-line call must be in sync with how
;; `rmail-mime-insert-tagline' formats the tagline. The
;; body begins after the empty line that ends the tagline.
(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."
(point)))))))))
(if (null from)
" "
+ ;; We are going to return only 25 characters of the
+ ;; address, so make sure it is RFC2047 decoded before
+ ;; taking its substring. This is important when the address is not on the same line as the name, e.g.:
+ ;; To: =?UTF-8?Q?=C5=A0t=C4=9Bp=C3=A1n_?= =?UTF-8?Q?N=C4=9Bmec?=
+ ;; <stepnem@gmail.com>
+ (setq from (rfc2047-decode-string from))
(setq len (length from))
(setq mch (string-match "[@%]" from))
(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:
update-subdirs: update-subdirs-$(SHELLTYPE)
update-subdirs-CMD: doit
- echo ;; -*- no-byte-compile: t -*-> $(lisp)/subdirs.el
- echo ;; In load-path, after this directory should come>> $(lisp)/subdirs.el
+ echo ;; In load-path, after this directory should come> $(lisp)/subdirs.el
echo ;; certain of its subdirectories. Here we specify them.>> $(lisp)/subdirs.el
echo (normal-top-level-add-to-load-path $(SQUOTE)(>> $(lisp)/subdirs.el
@for %%d in ($(WINS_SUBDIR) cedet) do echo "%%d">> $(lisp)/subdirs.el
echo ))>> $(lisp)/subdirs.el
+ echo ;; Local Variables:>> $(lisp)/subdirs.el
+ echo ;; version-control: never>> $(lisp)/subdirs.el
+ echo ;; no-byte-compile: t>> $(lisp)/subdirs.el
+ echo ;; End:>> $(lisp)/subdirs.el
update-subdirs-SH: doit
$(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'."
;; Otherwise record the current column and look backwards.
(setq column (current-column))
(skip-chars-backward ",; \t")
- ;; Record the distance travelled.
+ ;; Record the distance traveled.
(setq distance (- column (current-column)))
(when (looking-back
(concat "([ \t]*\\(?:" Man-section-regexp "\\)[ \t]*)"))
@@ -933,7 +933,8 @@ Return the buffer in which the manpage will appear."
;; minal (using an ioctl(2) if available, the value of
;; $COLUMNS, or falling back to 80 characters if nei-
;; ther is available).
- (unless (or (getenv "MANWIDTH") (getenv "COLUMNS"))
+ (when (or window-system
+ (not (or (getenv "MANWIDTH") (getenv "COLUMNS"))))
;; This isn't strictly correct, since we don't know how
;; the page will actually be displayed, but it seems
;; 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 @@
* mh-mime.el: Shush XEmacs compiler in mh-do-in-xemacs block.
* mh-folder.el: Use boundp instead of fboundp when testing
- existence of desktop-buffer-mode-handlers.
+ existence of desktop-buffer-mode-handlers (closes SF #1510145).
2011-05-10 Jim Meyering <meyering@redhat.com>
@@ -232,7 +232,8 @@
(mh-handle-process-error, mh-variant-info):
* mh-comp.el (mh-forward):
* mh-alias.el (mh-alias-local-users, mh-alias-which-file-has-alias):
- (mh-alias-add-alias-to-file): Use with-current-buffer.
+ (mh-alias-add-alias-to-file): Use with-current-buffer (closes SF
+ #1903293).
2009-11-04 Stefan Monnier <monnier@iro.umontreal.ca>
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 @@
2004-11-08 Satyaki Das <satyaki@theforce.stanford.edu>
* mh-acros.el (mh-funcall-if-exists): In XEmacs, presence of a
- function at compile time doesn't guarantee it's existence at run
+ function at compile time doesn't guarantee its existence at run
time. So make the macro handle that situation better.
2004-11-05 Satyaki Das <satyaki@theforce.stanford.edu>
@@ -1648,7 +1648,7 @@
* mh-e.el (mh-version): Do something sensible when
mh-variant-in-use is undefined.
* mh-junk.el (mh-spamassassin-blacklist)
- (mh-spamassassin-whitelist): Change options to be compatoble with
+ (mh-spamassassin-whitelist): Change options to be compatible with
old version of spamassassin (V2.20).
2003-09-07 Mark D. Baushke <mdb@gnu.org>
@@ -10195,7 +10195,7 @@
2002-04-02 Peter S Galbraith <psg@debian.org>
* mh-e.el: 'defvar mh-folder-unseen-seq-name' called a function to
- set it's value, and this happens also on byte-compilation (where
+ set its value, and this happens also on byte-compilation (where
it can fail if the user's MH environment is not setup correctly).
I now set the value of mh-folder-unseen-seq-name at runtime when I
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."
(if (not (and seen-prompt ange-ftp-pending-error-line))
(ange-ftp-process-handle-line line proc)
;; If we've seen a potential error message and it
- ;; hasn't been cancelled by a good message before
+ ;; hasn't been canceled by a good message before
;; seeing a prompt, then the error was real.
(delete-process proc)
(setq ange-ftp-process-busy nil
@@ -2854,7 +2854,7 @@ NO-ERROR, if a listing for DIRECTORY cannot be obtained."
;; that a wasted listing is not done:
;; 1. When looking for a .dired file in dired-x.el.
;; 2. The syntax of FILE and DIR make it impossible that FILE could be a valid
-;; subdirectory. This is of course an OS dependent judgement.
+;; subdirectory. This is of course an OS dependent judgment.
(defvar dired-local-variables-file)
(defmacro ange-ftp-allow-child-lookup (dir file)
@@ -3637,6 +3637,10 @@ so return the size on the remote host exactly. See RFC 3659."
(setq filename (expand-file-name filename)
newname (expand-file-name newname))
+ (or (file-exists-p filename)
+ (signal 'file-error
+ (list "Copy file" "no such file or directory" filename)))
+
;; canonicalize newname if a directory.
(if (file-directory-p newname)
(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."
(defvar dbus-event-error-hooks nil
"Functions to be called when a D-Bus error happens in the event handler.
Every function must accept two arguments, the event and the error variable
-catched in `condition-case' by `dbus-error'.")
+caught in `condition-case' by `dbus-error'.")
;;; 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
;;;###autoload
(defun netrc-credentials (machine &rest ports)
"Return a user name/password pair.
-Port specifications will be prioritised in the order they are
+Port specifications will be prioritized in the order they are
listed in the PORTS list."
(let ((list (netrc-parse))
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:
capability command, and should return the command to switch on
STARTTLS if the server supports STARTTLS, and nil otherwise.
-:always-query-capabilies says whether to query the server for
+:always-query-capabilities says whether to query the server for
capabilities, even if we're doing a `plain' network connection.
: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."
(defun ntlm-smb-dohash (in key forw)
"Return the hash value for a string IN and a string KEY.
-Length of IN and KEY are 64. FORW non nill means forward, nil means
+Length of IN and KEY are 64. FORW non-nil means forward, nil means
backward."
(let (pk1 ;string of length 56
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 @@
;; STRING stable_name
;; STRING x_content_types Since GVFS 1.0 only !!!
;; STRING icon
-;; STRING prefered_filename_encoding
+;; STRING preferred_filename_encoding
;; BOOLEAN user_visible
;; ARRAY BYTE fuse_mountpoint
;; 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 @@
(defcustom tramp-inline-compress-start-size 4096
"*The minimum size of compressing where inline transfer.
-When inline transfer, compress transfered data of file
+When inline transfer, compress transferred data of file
whose size is this value or above (up to `tramp-copy-size-limit').
If it is nil, no compression at all will be applied."
:group 'tramp
@@ -3526,7 +3526,7 @@ variable PATH."
Here, we are looking for a command which has zero exit status if the
file exists and nonzero exit status otherwise."
(let ((existing "/")
- (nonexisting
+ (nonexistent
(tramp-shell-quote-argument "/ this file does not exist "))
result)
;; The algorithm is as follows: we try a list of several commands.
@@ -3551,22 +3551,22 @@ file exists and nonzero exit status otherwise."
(tramp-send-command-and-check
vec (format "%s %s" result existing))
(not (tramp-send-command-and-check
- vec (format "%s %s" result nonexisting))))
+ vec (format "%s %s" result nonexistent))))
(and (setq result "/bin/test -e")
(tramp-send-command-and-check
vec (format "%s %s" result existing))
(not (tramp-send-command-and-check
- vec (format "%s %s" result nonexisting))))
+ vec (format "%s %s" result nonexistent))))
(and (setq result "/usr/bin/test -e")
(tramp-send-command-and-check
vec (format "%s %s" result existing))
(not (tramp-send-command-and-check
- vec (format "%s %s" result nonexisting))))
+ vec (format "%s %s" result nonexistent))))
(and (setq result (format "%s -d" (tramp-get-ls-command vec)))
(tramp-send-command-and-check
vec (format "%s %s" result existing))
(not (tramp-send-command-and-check
- vec (format "%s %s" result nonexisting)))))
+ vec (format "%s %s" result nonexistent)))))
(tramp-error
vec 'file-error "Couldn't find command to check if file exists"))
result))
@@ -3726,7 +3726,7 @@ process to set up. VEC specifies the connection."
;; Check whether the output of "uname -sr" has been changed. If
;; yes, this is a strong indication that we must expire all
;; connection properties. We start again with
- ;; `tramp-maybe-open-connection', it will be catched there.
+ ;; `tramp-maybe-open-connection', it will be caught there.
(tramp-message vec 5 "Checking system information")
(let ((old-uname (tramp-get-connection-property vec "uname" nil))
(new-uname
@@ -4215,7 +4215,7 @@ connection if a previous connection has died for some reason."
(tramp-send-command vec "echo are you awake" t t)
(unless (and (memq (process-status p) '(run open))
(tramp-wait-for-output p 10))
- ;; The error will be catched locally.
+ ;; The error will be caught locally.
(tramp-error vec 'file-error "Awake did fail")))
(file-error
(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."
(search-forward-regexp "Missing ControlMaster argument" nil t))))
(defcustom tramp-default-method
- ;; An external copy method seems to be preferred, because it is much
- ;; more performant for large files, and it hasn't too serious delays
+ ;; An external copy method seems to be preferred, because it performs
+ ;; much better for large files, and it hasn't too serious delays
;; for small files. But it must be ensured that there aren't
;; permanent password queries. Either a password agent like
;; "ssh-agent" or "Pageant" shall run, or the optional
@@ -3506,7 +3506,7 @@ If the `tramp-methods' entry does not exist, return nil."
(cond
((char-equal other-write ?w) (tramp-compat-octal-to-decimal "00002"))
((char-equal other-write ?-) 0)
- (t (error "Nineth char `%c' must be one of `w-'" other-write)))
+ (t (error "Ninth char `%c' must be one of `w-'" other-write)))
(cond
((char-equal other-execute-or-sticky ?x)
(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 @@
(defface xesam-highlight '((t :inherit match))
"Face to highlight query entries.
-It will be overlayed by `widget-documentation-face', so it shall
+It will be overlaid by `widget-documentation-face', so it shall
be different at least in one face property not set in that face."
:group 'xesam)
@@ -279,8 +279,8 @@ fields are supported.")
(defun xesam-dbus-call-method (&rest args)
"Apply a D-Bus method call.
-`dbus-call-method' is to be preferred, because it is more
-performant. If the target D-Bus service is owned by Emacs, this
+`dbus-call-method' is preferred, because it performs better.
+If the target D-Bus service is owned by Emacs, this
is not applicable, and `dbus-call-method-non-blocking' must be
used instead. ARGS are identical to the argument list of both
functions."
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 @@
;; The function `zeroconf-publish-service' publishes a new service to
;; the Avahi daemon. Although the domain, where to the service is
-;; published, can be specified by this function, it is usally the
+;; published, can be specified by this function, it is usually the
;; default domain "local" (also written as nil or "").
;; (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'."
(defun rng-kill-timers ()
;; rng-validate-timer and rng-validate-quick-timer have the
;; permanent-local property, so that the timers can be
- ;; cancelled even after changing mode.
- ;; This function takes care of cancelling the timers and
+ ;; canceled even after changing mode.
+ ;; This function takes care of canceling the timers and
;; then killing the local variables.
(when (local-variable-p 'rng-validate-timer)
(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."
(whitespace-check-whitespace-mode current-prefix-arg)
(if (and buffer-file-name whitespace-mode)
(let ((whitespace-any nil)
- (whitespace-tabwith 8)
- (whitespace-tabwith-saved tab-width))
+ (whitespace-tabwidth 8)
+ (whitespace-tabwidth-saved tab-width))
;; since all printable TABS should be 8, irrespective of how
;; they are displayed.
- (setq tab-width whitespace-tabwith)
+ (setq tab-width whitespace-tabwidth)
(if (and whitespace-check-buffer-leading
(whitespace-buffer-leading))
@@ -562,7 +562,7 @@ See `whitespace-buffer' docstring for a summary of the problems."
(message "The region is now clean")
(message "%s is now clean" buffer-file-name)))
(whitespace-update-modeline)))
- (setq tab-width whitespace-tabwith-saved))))
+ (setq tab-width whitespace-tabwidth-saved))))
;;;###autoload
(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."
(defvar pgg-pending-timers (make-vector 7 0)
"Hash table for managing scheduled pgg cache management timers.
-We associate key and timer, so the timer can be cancelled if a new
+We associate key and timer, so the timer can be canceled if a new
timeout for the key is set while an old one is still pending.")
(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 @@
+2011-12-06 Juanma Barranquero <lekktu@gmail.com>
+
+ * ob.el (org-babel-expand-body:generic, org-babel-number-p):
+ * ob-ref.el (org-babel-ref-parse): Fix typos.
+
2011-11-24 Juanma Barranquero <lekktu@gmail.com>
* ob.el (org-babel-execute-src-block): Fix typo.
@@ -278,7 +283,7 @@
* org-archive.el (org-archive-subtree): While it might be possible
to archive an headline of a temporary buffer (i.e. not visiting a
- file), it wouldn't be really sensical.
+ file), it wouldn't be really sensible.
2011-07-28 Nicolas Goaziou <n.goaziou@gmail.com>
@@ -4008,7 +4013,7 @@
* org-list.el (org-list-blocks): New variable.
(org-list-context): New function.
(org-list-full-item-re): New variable.
- (org-list-struct-assoc-at-point): Use new varible.
+ (org-list-struct-assoc-at-point): Use new variable.
(org-list-struct): Rewrite of function. Now, list data is
collected by looking at the list line after line. It reads the
whole list each time because reading only a subtree was not enough
@@ -7119,7 +7124,7 @@
2010-11-11 Dan Davison <davison@stats.ox.ac.uk>
* ob.el (org-babel-get-src-block-info): Form info list correctly
- when parenthesised arguments are missing.
+ when parenthesized arguments are missing.
2010-11-11 Dan Davison <davison@stats.ox.ac.uk>
@@ -8139,7 +8144,7 @@
2010-11-11 Nicolas Goaziou <n.goaziou@gmail.com>
* org-list.el (org-insert-item-internal): New function to handle
- positionning and contents of an item being inserted at a specific
+ positioning and contents of an item being inserted at a specific
pos. It is not possible anymore to split a term in a description
list or a checkbox when inserting a new item.
@@ -9758,7 +9763,7 @@
2010-07-19 Bastien Guerry <bzg@altern.org>
- * org-timer.el (org-timer-set-timer): Fix bug about cancelling
+ * org-timer.el (org-timer-set-timer): Fix bug about canceling
timers.
2010-07-19 David Maus <dmaus@ictsoc.de>
@@ -12582,7 +12587,7 @@
buffer and at the position of the given clock. However, changes
to the current clock are local and have no effect on the user's
active clock. This allows, for example, far any clock to be
- cancelled without cancelling the active clock.
+ canceled without canceling the active clock.
(org-clock-clock-in): New inline function that switches the active
clock to the given clock. If either the argument RESUME, or the
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 @@
"Parse a variable ASSIGNMENT in a header argument.
If the right hand side of the assignment has a literal value
return that value, otherwise interpret as a reference to an
-external resource and find it's value using
+external resource and find its value using
`org-babel-ref-resolve'. Return a list with two elements. The
first element of the list will be the name of the variable, and
the 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."
(defun org-babel-expand-body:generic (body params &optional var-lines)
"Expand BODY with PARAMS.
-Expand a block of code with org-babel according to it's header
+Expand a block of code with org-babel according to its header
arguments. This generic implementation of body expansion is
called for languages which have not defined their own specific
org-babel-expand-body:lang function."
@@ -2045,7 +2045,7 @@ appropriate."
cell))
(defun org-babel-number-p (string)
- "If STRING represents a number return it's value."
+ "If STRING represents a number return its value."
(if (and (string-match "^-?[0-9]*\\.?[0-9]*$" string)
(= (length (substring string (match-beginning 0)
(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."
(org-agenda-remove-flag hdmarker)
(let ((win (get-buffer-window "*Flagging Note*")))
(and win (delete-window win)))
- (message "Entry unflaged"))
+ (message "Entry unflagged"))
(setq note (org-entry-get hdmarker "THEFLAGGINGNOTE"))
(unless note
(error "No flagging note"))
@@ -8354,7 +8354,7 @@ tag and (if present) the flagging note."
(org-entry-delete nil "THEFLAGGINGNOTE")
(setq newhead (org-get-heading)))
(org-agenda-change-all-lines newhead marker)
- (message "Entry unflaged")))
+ (message "Entry unflagged")))
(defun org-agenda-get-any-marker (&optional pos)
(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.")
"Hook run when stopping the current clock.")
(defvar org-clock-cancel-hook nil
- "Hook run when cancelling the current clock.")
+ "Hook run when canceling the current clock.")
(defvar org-clock-goto-hook nil
"Hook run when selecting the currently clocked-in entry.")
(defvar org-clock-has-been-used nil
@@ -346,7 +346,7 @@ to add an effort property.")
(defvar org-clock-start-time "")
(defvar org-clock-leftover-time nil
- "If non-nil, user cancelled a clock; this is when leftover time started.")
+ "If non-nil, user canceled a clock; this is when leftover time started.")
(defvar org-clock-effort ""
"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 @@
;; Computing a list structure can be a costly operation on huge lists
;; (a few thousand lines long). Thus, code should follow the rule :
-;; "collect once, use many". As a corollary, it is usally a bad idea
+;; "collect once, use many". As a corollary, it is usually a bad idea
;; to use directly an interactive function inside the code, as those,
;; being independent entities, read the whole list structure another
;; 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 @@
(defgroup org-protocol nil
"Intercept calls from emacsclient to trigger custom actions.
-This is done by advising `server-visit-files' to scann the list of filenames
-for `org-protocol-the-protocol' and sub-procols defined in
+This is done by advising `server-visit-files' to scan the list of filenames
+for `org-protocol-the-protocol' and sub-protocols defined in
`org-protocol-protocol-alist' and `org-protocol-protocol-alist-default'."
:version "22.1"
:group 'convenience
@@ -546,8 +546,8 @@ as filename."
(when (string-match proto fname)
(let* ((func (plist-get (cdr prolist) :function))
(greedy (plist-get (cdr prolist) :greedy))
- (splitted (split-string fname proto))
- (result (if greedy restoffiles (cadr splitted))))
+ (split (split-string fname proto))
+ (result (if greedy restoffiles (cadr split))))
(when (plist-get (cdr prolist) :kill-client)
(message "Greedy org-protocol handler. Killing client.")
(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."
:type 'string)
(defcustom org-publish-sitemap-file-entry-format "%t"
- "How a sitemap file entry is formated.
+ "How a sitemap file entry is formatted.
You could use brackets to delimit on what part the link will be.
%t is the title.
%a is the author.
-%d is the date formated using `org-publish-sitemap-date-format'."
+%d is the date formatted using `org-publish-sitemap-date-format'."
:group 'org-publish
:type 'string)
@@ -715,7 +715,7 @@ If :auto-sitemap is set, publish the sitemap too.
If :makeindex is set, also produce a file theindex.org."
(mapc
(lambda (project)
- ;; Each project uses it's own cache file:
+ ;; Each project uses its own cache file:
(org-publish-initialize-cache (car project))
(let*
((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\"."
(and filtered-items (mapconcat 'identity filtered-items "\n"))))
(defun org-taskjuggler-get-attributes (item attributes)
- "Return all attribute as a single formated string. ITEM is an
+ "Return all attributes as a single formatted string. ITEM is an
alist representing either a resource or a task. ATTRIBUTES is a
list of symbols. Only entries from ITEM are considered that are
listed 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:
(defcustom org-time-stamp-custom-formats
'("<%m/%d/%y %a>" . "<%m/%d/%y %a %H:%M>") ; american
"Custom formats for time stamps. See `format-time-string' for the syntax.
-These are overlayed over the default ISO format if the variable
+These are overlaid over the default ISO format if the variable
`org-display-custom-times' is set. Time like %H:%M should be at the
end of the second format. The custom formats are also honored by export
commands, if custom time display is turned on at the time of export."
@@ -15109,7 +15109,7 @@ The command returns the inserted time stamp."
(org-restart-font-lock)
(setq org-table-may-need-update t)
(if org-display-custom-times
- (message "Time stamps are overlayed with custom format")
+ (message "Time stamps are overlaid with custom format")
(message "Time stamp overlays removed")))
(defun org-display-custom-time (beg end)
@@ -18961,7 +18961,7 @@ contexts are:
:target on a <<target>>
:radio-target on a <<<radio-target>>>
:latex-fragment on a LaTeX fragment
-:latex-preview on a LaTeX fragment with overlayed preview image
+:latex-preview on a LaTeX fragment with overlaid preview image
This function expects the position to be visible because it uses font-lock
faces 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 @@
;; User Variables:
(defcustom pcmpl-gnu-makefile-regexps
- '("\\`GNUmakefile" "\\`Makefile" "\\.mak\\'")
+ '("\\`GNUmakefile" "\\`[Mm]akefile" "\\.ma?k\\'")
"A list of regexps that will match Makefile names."
:type '(repeat regexp)
:group 'pcmpl-gnu)
@@ -99,7 +99,10 @@
"Completion for GNU `make'."
(let ((pcomplete-help "(make)Top"))
(pcomplete-opt "bmC/def(pcmpl-gnu-makefile-names)hiI/j?kl?no.pqrsStvwW.")
- (while (pcomplete-here (pcmpl-gnu-make-rule-names) nil 'identity))))
+ (while (pcomplete-here (completion-table-in-turn
+ (pcmpl-gnu-make-rule-names)
+ (pcomplete-entries))
+ nil 'identity))))
(defun pcmpl-gnu-makefile-names ()
"Return a list of possible makefile names."
@@ -109,14 +112,16 @@
"Return a list of possible make rule names in MAKEFILE."
(let* ((minus-f (member "-f" pcomplete-args))
(makefile (or (cadr minus-f)
- (if (file-exists-p "GNUmakefile")
- "GNUmakefile"
- "Makefile")))
+ (cond
+ ((file-exists-p "GNUmakefile") "GNUmakefile")
+ ((file-exists-p "makefile") "makefile")
+ (t "Makefile"))))
rules)
(if (not (file-readable-p makefile))
(unless minus-f (list "-f"))
(with-temp-buffer
- (insert-file-contents-literally makefile)
+ (ignore-errors ;Could be a directory or something.
+ (insert-file-contents makefile))
(while (re-search-forward
(concat "^\\s-*\\([^\n#%.$][^:=\n]*\\)\\s-*:[^=]") nil t)
(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."
(defun gametree-save-and-hack-layout ()
"Save the current tree layout and hack the file local variable spec.
This function saves the current layout in `gametree-local-layout' and,
-if a local file varible specification for this variable exists in the
+if a local file variable specification for this variable exists in the
buffer, it is replaced by the new value. See the documentation for
`gametree-local-layout' for more information."
(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
nil, it's used (point-max).
PS-PRINT It's a symbol function for PostScript printing. It's invoked
- with 3 arguments: n-up printing, file name and the list:
+ with three arguments: n-up printing, file name and the list:
(HEADER-LINES LEFT-HEADER RIGHT-HEADER DEFAULT...).
Usually PS-PRINT function prepares the environment or buffer
@@ -4710,12 +4710,12 @@ Interactively, you have the following situations:
M-x pr-ps-fast-fire RET
The command prompts the user for a N-UP value and printing will
- immediatelly be done using the current active printer.
+ immediately be done using the current active printer.
C-u M-x pr-ps-fast-fire RET
C-u 0 M-x pr-ps-fast-fire RET
The command prompts the user for a N-UP value and also for a current
- PostScript printer, then printing will immediatelly be done using the new
+ PostScript printer, then printing will immediately be done using the new
current active printer.
C-u 1 M-x pr-ps-fast-fire RET
@@ -4736,7 +4736,7 @@ zero and the argument SELECT is treated as follows:
If it's nil, send the image to the printer.
If it's a list or an integer lesser or equal to zero, the command prompts
- the user for a current PostScript printer, then printing will immediatelly
+ the user for a current PostScript printer, then printing will immediately
be done using the new current active printer.
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:
instead of sending it to the printer.
If it's a symbol which it's defined in `pr-ps-printer-alist', it's the new
- active printer and printing will immediatelly be done using the new active
+ active printer and printing will immediately be done using the new active
printer.
Otherwise, send the image to the printer.
@@ -4800,7 +4800,7 @@ Noninteractively, the argument SELECT-PRINTER is treated as follows:
If it's nil, the printing is sent to the current active text printer.
If it's a symbol which it's defined in `pr-txt-printer-alist', it's the new
- active printer and printing will immediatelly be done using the new active
+ active printer and printing will immediately be done using the new active
printer.
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'."
(proced-sort-interactive key arg)
(message "No sorter defined here."))))))
-;;; Formating
+;;; Formatting
(defun proced-format-time (time)
"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.'"))
(defvar ada-case-exception-substring '()
"Alist of substrings (entities) that have special casing.
-The substrings are detected for word constituant when the word
+The substrings are detected for word constituent when the word
is not itself in `ada-case-exception', and only for substrings that
either are at the beginning or end of the word, or start after '_'.")
@@ -1773,7 +1773,7 @@ ATTENTION: This function might take very long for big buffers!"
;; `ada-insert-paramlist'.
;; Both steps are called from `ada-format-paramlist'.
;; Note: Comments inside the parameter list are lost.
-;; The syntax has to be correct, or the reformating will fail.
+;; The syntax has to be correct, or the reformatting will fail.
;;--------------------------------------------------------------
(defun ada-format-paramlist ()
@@ -2139,7 +2139,7 @@ command like:
(while command-line-args-left
(let ((source (car command-line-args-left)))
- (message "Formating %s" source)
+ (message "Formatting %s" source)
(find-file source)
(ada-indent-region (point-min) (point-max))
(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 @@
;; BUGS:
;;;> I have the following suggestions for the function template: 1) I
;;;> don't want it automatically assigning it a name for the return variable. I
-;;;> never want it to be called "Result" because that is nondescriptive. If you
+;;;> never want it to be called "Result" because that is nondescript. If you
;;;> must define a variable, give me the ability to specify its name.
;;;>
;;;> 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 @@
;;; for lookup and completion in Ada mode.
;;;
;;; If a file *.`adp' exists in the ada-file directory, then it is
-;;; read for configuration informations. It is read only the first
+;;; read for configuration information. It is read only the first
;;; time a cross-reference is asked for, and is not read later.
;;; 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 @@
(defun c-awk-vsemi-status-unknown-p ()
;; Are we unsure whether there is a virtual semicolon on the current line?
;; DO NOT under any circumstances attempt to calculate this; that would
- ;; defeat the (admittedly kludgey) purpose of this function, which is to
+ ;; defeat the (admittedly kludgy) purpose of this function, which is to
;; prevent an infinite recursion in c-beginning-of-statement-1 when point
;; starts at a `while' token.
(not (c-get-char-property (c-point 'eol) 'c-awk-NL-prop)))
@@ -894,9 +894,9 @@ std\\(err\\|in\\|out\\)\\|user\\)\\)\\>\
;; Keywords.
(concat "\\<"
(regexp-opt
- '("BEGIN" "END" "break" "continue" "delete" "do" "else"
- "exit" "for" "getline" "if" "in" "next" "nextfile"
- "return" "while")
+ '("BEGIN" "END" "break" "case" "continue" "default" "delete"
+ "do" "else" "exit" "for" "getline" "if" "in" "next"
+ "nextfile" "return" "switch" "while")
t) "\\>")
;; 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."
;; Determine where we are with respect to functions (or other brace
;; constructs, included in the term "function" in the rest of this comment).
;; Point is assumed to be outside any macro or literal.
- ;; This is used by c-\(begining\|end\)-of-defun.
+ ;; This is used by c-\(beginning\|end\)-of-defun.
;;
;; Return one of these symbols:
;; 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."
(c-narrow-to-comment-innards range) ; This may move point back.
(let* ((here (point))
last
- (here-filler ; matches WS and comment-prefices at point.
+ (here-filler ; matches WS and comment-prefixes at point.
(concat "\\=\\(^[ \t]*\\(" c-current-comment-prefix "\\)"
"\\|[ \t\n\r\f]\\)*"))
(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."
;; Now seek successively earlier sentence ends between PAR-BEG and
;; HERE, until the "start of sentence" following it is earlier than
- ;; HERE, or we hit PAR-BEG. Beware of comment prefices!
+ ;; HERE, or we hit PAR-BEG. Beware of comment prefixes!
(while (and (re-search-backward (c-sentence-end) par-beg 'limit)
(setq last (point))
(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."
(let ((saved-undo-list (elt saved-state 0)))
(if (eq buffer-undo-list saved-undo-list)
- ;; No change was done afterall.
+ ;; No change was done after all.
(setq buffer-undo-list (cdr saved-undo-list))
(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 @@
(not prevstate)
(> arg 0)))
-;; Dynamically bound cache for `c-in-literal'.
-(defvar c-in-literal-cache t)
-
;; Basic handling of preprocessor directives.
@@ -2093,28 +2090,35 @@ comment at the start of cc-engine.el for more info."
;; `c-state-literal-at'.
(defsubst c-state-pp-to-literal (from to)
- ;; Do a parse-partial-sexp from FROM to TO, returning the bounds of any
- ;; literal at TO as a cons, otherwise NIL.
- ;; FROM must not be in a literal, and the buffer should already be wide
- ;; enough.
+ ;; Do a parse-partial-sexp from FROM to TO, returning either
+ ;; (STATE TYPE (BEG . END)) if TO is in a literal; or
+ ;; (STATE) otherwise,
+ ;; where STATE is the parsing state at TO, TYPE is the type of the literal
+ ;; (one of 'c, 'c++, 'string) and (BEG . END) is the boundaries of the literal.
+ ;;
+ ;; Only elements 3 (in a string), 4 (in a comment), 5 (following a quote),
+ ;; 7 (comment type) and 8 (start of comment/string) (and possibly 9) of
+ ;; STATE are valid.
(save-excursion
- (let ((s (parse-partial-sexp from to)))
+ (let ((s (parse-partial-sexp from to))
+ ty)
(when (or (nth 3 s) (nth 4 s)) ; in a string or comment
+ (setq ty (cond
+ ((nth 3 s) 'string)
+ ((eq (nth 7 s) t) 'c++)
+ (t 'c)))
(parse-partial-sexp (point) (point-max)
nil ; TARGETDEPTH
nil ; STOPBEFORE
s ; OLDSTATE
- 'syntax-table) ; stop at end of literal
- (cons (nth 8 s) (point))))))
+ 'syntax-table)) ; stop at end of literal
+ (if ty
+ `(,s ,ty (,(nth 8 s) . ,(point)))
+ `(,s)))))
-(defun c-state-literal-at (here)
- ;; If position HERE is inside a literal, return (START . END), the
- ;; boundaries of the literal (which may be outside the accessible bit of the
- ;; buffer). Otherwise, return nil.
- ;;
- ;; This function is almost the same as `c-literal-limits'. It differs in
- ;; that it is a lower level function, and that it rigourously follows the
- ;; syntax from BOB, whereas `c-literal-limits' uses a "local" safe position.
+(defun c-state-safe-place (here)
+ ;; Return a buffer position before HERE which is "safe", i.e. outside any
+ ;; string, comment, or macro.
;;
;; NOTE: This function manipulates `c-state-nonlit-pos-cache'. This cache
;; 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."
(while (<= (setq npos (+ pos c-state-nonlit-pos-interval))
here)
- (setq lit (c-state-pp-to-literal pos npos))
+ (setq lit (car (cddr (c-state-pp-to-literal pos npos))))
(setq pos (or (cdr lit) npos)) ; end of literal containing npos.
(goto-char pos)
(when (and (c-beginning-of-macro) (/= (point) pos))
@@ -2148,9 +2152,22 @@ comment at the start of cc-engine.el for more info."
(if (> pos c-state-nonlit-pos-cache-limit)
(setq c-state-nonlit-pos-cache-limit pos))
- (if (< pos here)
- (setq lit (c-state-pp-to-literal pos here)))
- lit))))
+ pos))))
+
+(defun c-state-literal-at (here)
+ ;; If position HERE is inside a literal, return (START . END), the
+ ;; boundaries of the literal (which may be outside the accessible bit of the
+ ;; buffer). Otherwise, return nil.
+ ;;
+ ;; This function is almost the same as `c-literal-limits'. Previously, it
+ ;; differed in that it was a lower level function, and that it rigourously
+ ;; followed the syntax from BOB. `c-literal-limits' is now (2011-12)
+ ;; virtually identical to this function.
+ (save-restriction
+ (widen)
+ (save-excursion
+ (let ((pos (c-state-safe-place here)))
+ (car (cddr (c-state-pp-to-literal pos here)))))))
(defsubst c-state-lit-beg (pos)
;; 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."
;; Tools for handling comments and string literals.
-(defun c-slow-in-literal (&optional lim detect-cpp)
+(defun c-in-literal (&optional lim detect-cpp)
"Return the type of literal point is in, if any.
The return value is `c' if in a C-style comment, `c++' if in a C++
style 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
Note that this function might do hidden buffer changes. See the
comment at the start of cc-engine.el for more info."
-
- (if (and (vectorp c-in-literal-cache)
- (= (point) (aref c-in-literal-cache 0)))
- (aref c-in-literal-cache 1)
- (let ((rtn (save-excursion
- (let* ((pos (point))
- (lim (or lim (progn
- (c-beginning-of-syntax)
- (point))))
- (state (parse-partial-sexp lim pos)))
- (cond
- ((elt state 3) 'string)
- ((elt state 4) (if (elt state 7) 'c++ 'c))
- ((and detect-cpp (c-beginning-of-macro lim)) 'pound)
- (t nil))))))
- ;; cache this result if the cache is enabled
- (if (not c-in-literal-cache)
- (setq c-in-literal-cache (vector (point) rtn)))
- rtn)))
-
-;; XEmacs has a built-in function that should make this much quicker.
-;; I don't think we even need the cache, which makes our lives more
-;; complicated anyway. In this case, lim is only used to detect
-;; cpp directives.
-;;
-;; Note that there is a bug in XEmacs's buffer-syntactic-context when used in
-;; conjunction with syntax-table-properties. The bug is present in, e.g.,
-;; XEmacs 21.4.4. It manifested itself thus:
-;;
-;; Starting with an empty AWK Mode buffer, type
-;; /regexp/ {<C-j>
-;; Point gets wrongly left at column 0, rather than being indented to tab-width.
-;;
-;; AWK Mode is designed such that when the first / is typed, it gets the
-;; syntax-table property "string fence". When the second / is typed, BOTH /s
-;; are given the s-t property "string". However, buffer-syntactic-context
-;; fails to take account of the change of the s-t property on the opening / to
-;; "string", and reports that the { is within a string started by the second /.
-;;
-;; The workaround for this is for the AWK Mode initialization to switch the
-;; defalias for c-in-literal to c-slow-in-literal. This will slow down other
-;; cc-modes in XEmacs whenever an awk-buffer has been initialized.
-;;
-;; (Alan Mackenzie, 2003/4/30).
-
-(defun c-fast-in-literal (&optional lim detect-cpp)
- ;; This function might do hidden buffer changes.
- (let ((context (buffer-syntactic-context)))
- (cond
- ((eq context 'string) 'string)
- ((eq context 'comment) 'c++)
- ((eq context 'block-comment) 'c)
- ((and detect-cpp (save-excursion (c-beginning-of-macro lim))) 'pound))))
-
-(defalias 'c-in-literal
- (if (fboundp 'buffer-syntactic-context)
- 'c-fast-in-literal ; XEmacs
- 'c-slow-in-literal)) ; GNU Emacs
-
-;; The defalias above isn't enough to shut up the byte compiler.
-(cc-bytecomp-defun c-in-literal)
+ (let* ((safe-place (c-state-safe-place (point)))
+ (lit (c-state-pp-to-literal safe-place (point))))
+ (or (cadr lit)
+ (and detect-cpp
+ (save-excursion (c-beginning-of-macro))
+ 'pound))))
(defun c-literal-limits (&optional lim near not-in-delimiter)
"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."
(save-excursion
(let* ((pos (point))
- (lim (or lim (progn
- (c-beginning-of-syntax)
- (point))))
- (state (parse-partial-sexp lim pos)))
-
- (cond ((elt state 3) ; String.
- (goto-char (elt state 8))
- (cons (point) (or (c-safe (c-forward-sexp 1) (point))
- (point-max))))
-
- ((elt state 4) ; Comment.
- (goto-char (elt state 8))
- (cons (point) (progn (c-forward-single-comment) (point))))
-
- ((and (not not-in-delimiter)
- (not (elt state 5))
- (eq (char-before) ?/)
- (looking-at "[/*]"))
- ;; We're standing in a comment starter.
- (backward-char 1)
- (cons (point) (progn (c-forward-single-comment) (point))))
-
- (near
- (goto-char pos)
-
- ;; Search forward for a literal.
- (skip-chars-forward " \t")
+ (lim (or lim (c-state-safe-place pos)))
+ (pp-to-lit (c-state-pp-to-literal lim pos))
+ (state (car pp-to-lit))
+ (lit-type (cadr pp-to-lit))
+ (lit-limits (car (cddr pp-to-lit))))
- (cond
- ((looking-at c-string-limit-regexp) ; String.
- (cons (point) (or (c-safe (c-forward-sexp 1) (point))
- (point-max))))
+ (cond
+ (lit-limits)
+ ((and (not not-in-delimiter)
+ (not (elt state 5))
+ (eq (char-before) ?/)
+ (looking-at "[/*]")) ; FIXME!!! use c-line/block-comment-starter. 2008-09-28.
+ ;; We're standing in a comment starter.
+ (backward-char 1)
+ (cons (point) (progn (c-forward-single-comment) (point))))
+
+ (near
+ (goto-char pos)
+ ;; Search forward for a literal.
+ (skip-chars-forward " \t")
+ (cond
+ ((looking-at c-string-limit-regexp) ; String.
+ (cons (point) (or (c-safe (c-forward-sexp 1) (point))
+ (point-max))))
- ((looking-at c-comment-start-regexp) ; Line or block comment.
- (cons (point) (progn (c-forward-single-comment) (point))))
+ ((looking-at c-comment-start-regexp) ; Line or block comment.
+ (cons (point) (progn (c-forward-single-comment) (point))))
- (t
- ;; Search backward.
- (skip-chars-backward " \t")
+ (t
+ ;; Search backward.
+ (skip-chars-backward " \t")
- (let ((end (point)) beg)
- (cond
- ((save-excursion
- (< (skip-syntax-backward c-string-syntax) 0)) ; String.
- (setq beg (c-safe (c-backward-sexp 1) (point))))
-
- ((and (c-safe (forward-char -2) t)
- (looking-at "*/"))
- ;; Block comment. Due to the nature of line
- ;; comments, they will always be covered by the
- ;; normal case above.
- (goto-char end)
- (c-backward-single-comment)
- ;; If LIM is bogus, beg will be bogus.
- (setq beg (point))))
-
- (if beg (cons beg end))))))
- ))))
+ (let ((end (point)) beg)
+ (cond
+ ((save-excursion
+ (< (skip-syntax-backward c-string-syntax) 0)) ; String.
+ (setq beg (c-safe (c-backward-sexp 1) (point))))
+
+ ((and (c-safe (forward-char -2) t)
+ (looking-at "*/"))
+ ;; Block comment. Due to the nature of line
+ ;; comments, they will always be covered by the
+ ;; normal case above.
+ (goto-char end)
+ (c-backward-single-comment)
+ ;; If LIM is bogus, beg will be bogus.
+ (setq beg (point))))
+
+ (if beg (cons beg end))))))
+ ))))
;; In case external callers use this; it did have a docstring.
(defalias 'c-literal-limits-fast 'c-literal-limits)
@@ -6832,7 +6786,7 @@ comment at the start of cc-engine.el for more info."
got-suffix-after-parens
(eq (char-after got-suffix-after-parens) ?\())
;; Got a type, no declarator but a paren suffix. I.e. it's a
- ;; normal function call afterall (or perhaps a C++ style object
+ ;; normal function call after all (or perhaps a C++ style object
;; instantiation expression).
(throw 'at-decl-or-cast nil))))
@@ -9151,7 +9105,7 @@ comment at the start of cc-engine.el for more info."
'label))
(if (eq step 'up)
(setq placeholder (point))
- ;; There was no containing statement afterall.
+ ;; There was no containing statement after all.
(goto-char placeholder)))))
placeholder))
(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 @@
(unless (face-property-instance oldface 'reverse)
(invert-face newface)))))
-(defvar c-annotation-face (make-face 'c-annotation-face)
- "Face used to highlight annotations in java-mode and other modes that may wish to use it.")
-(set-face-foreground 'c-annotation-face "blue")
+(defvar c-annotation-face 'c-annotation-face)
+
+(defface c-annotation-face
+ '((default :inherit font-lock-constant-face))
+ "Face for highlighting annotations in Java mode and similar modes."
+ :version "24.1"
+ :group 'c)
(eval-and-compile
;; 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."
;; o - '<> if the arglist is of angle bracket type;
;; o - 'arglist if it's some other arglist;
;; o - nil, if not in an arglist at all. This includes the
- ;; parenthesised condition which follows "if", "while", etc.
+ ;; parenthesized condition which follows "if", "while", etc.
context
;; The position of the next token after the closing paren of
;; the last detected cast.
@@ -1534,24 +1538,8 @@ casts and declarations are fontified. Used on level 2 and higher."
;; prevent a repeat invocation. See elisp/lispref page "Search-based
;; Fontification".
(let* ((paren-state (c-parse-state))
- (start (point))
- decl-context bo-decl in-typedef type-type ps-elt)
-
- ;; First, are we actually in a "local" declaration?
- (setq decl-context (c-beginning-of-decl-1)
- bo-decl (point)
- in-typedef (looking-at c-typedef-key))
- (if in-typedef (c-forward-token-2))
- (when (and (eq (car decl-context) 'same)
- (< bo-decl start))
- ;; Are we genuinely at a type?
- (setq type-type (c-forward-type t))
- (if (and type-type
- (or (not (eq type-type 'maybe))
- (looking-at c-symbol-key)))
- (c-font-lock-declarators limit t in-typedef)))
-
- ;; Secondly, are we in any nested struct/union/class/etc. braces?
+ decl-context in-typedef ps-elt)
+ ;; Are we in any nested struct/union/class/etc. braces?
(while paren-state
(setq ps-elt (car paren-state)
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.
When the mode is initialized, the functions are called with
parameters \(point-min) and \(point-max).")
-(c-lang-defconst c-before-font-lock-function
- "If non-nil, a function called just before font locking.
-Typically it will extend the region about to be fontified \(see
+(c-lang-defconst c-before-font-lock-functions
+ ;; For documentation see the following c-lang-defvar of the same name.
+ ;; The value here may be a list of functions or a single function.
+ t 'c-change-set-fl-decl-start
+ (c c++ objc) '(c-neutralize-syntax-in-and-mark-CPP
+ c-change-set-fl-decl-start)
+ awk 'c-awk-extend-and-syntax-tablify-region)
+(c-lang-defvar c-before-font-lock-functions
+ (let ((fs (c-lang-const c-before-font-lock-functions)))
+ (if (listp fs)
+ fs
+ (list fs)))
+ "If non-nil, a list of functions called just before font locking.
+Typically they will extend the region about to be fontified \(see
below) and will set `syntax-table' text properties on the region.
-It takes 3 parameters, the BEG, END, and OLD-LEN supplied to
-every after-change function; point is undefined on both entry and
-exit; on entry, the buffer will have been widened and match-data
-will have been saved; the return value is ignored.
+These functions will be run in the order given. Each of them
+takes 3 parameters, the BEG, END, and OLD-LEN supplied to every
+after-change function; point is undefined on both entry and exit;
+on entry, the buffer will have been widened and match-data will
+have been saved; the return value is ignored.
-The function may extend the region to be fontified by setting the
+The functions may extend the region to be fontified by setting the
buffer local variables c-new-BEG and c-new-END.
-The function is called even when font locking is disabled.
+The functions are called even when font locking is disabled.
-When the mode is initialized, this function is called with
-parameters \(point-min), \(point-max) and <buffer size>."
- t nil
- (c c++ objc) 'c-neutralize-syntax-in-and-mark-CPP
- awk 'c-awk-extend-and-syntax-tablify-region)
-(c-lang-defvar c-before-font-lock-function
- (c-lang-const c-before-font-lock-function))
+When the mode is initialized, these functions are called with
+parameters \(point-min), \(point-max) and <buffer size>.")
+
+(c-lang-defconst c-before-context-fontification-functions
+ awk nil
+ t 'c-context-set-fl-decl-start)
+ ;; For documentation see the following c-lang-defvar of the same name.
+ ;; The value here may be a list of functions or a single function.
+(c-lang-defvar c-before-context-fontification-functions
+ (let ((fs (c-lang-const c-before-context-fontification-functions)))
+ (if (listp fs)
+ fs
+ (list fs)))
+ "If non-nil, a list of functions called just before context (or
+other non-change) fontification is done. Typically they will
+extend the region.
+
+These functions will be run in the order given. Each of them
+takes 2 parameters, the BEG and END of the region to be
+fontified. Point is undefined on both entry and exit. On entry,
+the buffer will have been widened and match-data will have been
+saved; the return value is a cons of the adjusted
+region, (NEW-BEG . NEW-END).")
;;; Syntactic analysis ("virtual semicolons") for line-oriented languages (AWK).
@@ -522,7 +550,7 @@ don't have EOL terminated statements. "
(c-lang-defconst c-vsemi-status-unknown-p-fn
"Contains a function \"are we unsure whether there is a virtual semicolon on this line?\".
-The (admittedly kludgey) purpose of such a function is to prevent an infinite
+The (admittedly kludgy) purpose of such a function is to prevent an infinite
recursion in c-beginning-of-statement-1 when point starts at a `while' token.
The function MUST NOT UNDER ANY CIRCUMSTANCES call c-beginning-of-statement-1,
even indirectly. This variable contains nil for languages which don't have
@@ -2242,8 +2270,7 @@ This construct is \"<keyword> <expression> :\"."
(c-lang-defconst c-label-kwds
"Keywords introducing colon terminated labels in blocks."
- t '("case" "default")
- awk nil)
+ t '("case" "default"))
(c-lang-defconst c-label-kwds-regexp
;; 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
tested at the beginning of every sexp in a suspected label,
i.e. before \":\". Only used if `c-recognize-colon-labels' is set."
t (concat
- ;; Don't allow string literals.
- "\"\\|"
;; All keywords except `c-label-kwds' and `c-protection-kwds'.
(c-make-keywords-re t
(set-difference (c-lang-const c-keywords)
(append (c-lang-const c-label-kwds)
(c-lang-const c-protection-kwds))
:test 'string-equal)))
+ ;; Don't allow string literals, except in AWK. Character constants are OK.
+ (c objc java pike idl) (concat "\"\\|"
+ (c-lang-const c-nonlabel-token-key))
;; Also check for open parens in C++, to catch member init lists in
;; constructors. We normally allow it so that macros with arguments
;; work in labels.
- c++ (concat "\\s\(\\|" (c-lang-const c-nonlabel-token-key)))
+ c++ (concat "\\s\(\\|\"\\|" (c-lang-const c-nonlabel-token-key)))
(c-lang-defvar c-nonlabel-token-key (c-lang-const c-nonlabel-token-key))
(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."
;; Buffer local variables defining the region to be fontified by a font lock
;; after-change function. They are set in c-after-change to
-;; after-change-function's BEG and END, and may be modified by a
-;; `c-before-font-lock-function'.
+;; after-change-functions' BEG and END, and may be modified by functions in
+;; `c-before-font-lock-functions'.
(defvar c-new-BEG 0)
(make-variable-buffer-local 'c-new-BEG)
(defvar c-new-END 0)
@@ -633,13 +633,13 @@ compatible with old code; callers should always specify it."
(setq c-new-BEG (point-min))
(setq c-new-END (point-max))
(save-excursion
- (if c-get-state-before-change-functions
- (mapc (lambda (fn)
- (funcall fn (point-min) (point-max)))
- c-get-state-before-change-functions))
- (if c-before-font-lock-function
- (funcall c-before-font-lock-function (point-min) (point-max)
- (- (point-max) (point-min))))))
+ (mapc (lambda (fn)
+ (funcall fn (point-min) (point-max)))
+ c-get-state-before-change-functions)
+ (mapc (lambda (fn)
+ (funcall fn (point-min) (point-max)
+ (- (point-max) (point-min))))
+ c-before-font-lock-functions)))
(set (make-local-variable 'outline-regexp) "[^#\n\^M]")
(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."
; with a c-cpp-delimiter category property
(setq c-old-EOM (point)))
+(defun c-extend-font-lock-region-for-macros (begg endd &optional old-len)
+ ;; Extend the region (BEGG ENDD) to cover all (possibly changed)
+ ;; preprocessor macros; return the cons (new-BEG . new-END). OLD-LEN should
+ ;; be either the old length parameter when called from an
+ ;; after-change-function, or nil otherwise. This defun uses the variables
+ ;; c-old-BOM, c-new-BOM.
+ ;;
+ ;; Point is undefined on both entry and exit to this function. The buffer
+ ;; will have been widened on entry.
+ (let (limits new-beg new-end)
+ (goto-char c-old-BOM) ; already set to old start of macro or begg.
+ (setq new-beg
+ (min begg
+ (if (setq limits (c-state-literal-at (point)))
+ (cdr limits) ; go forward out of any string or comment.
+ (point))))
+
+ (goto-char endd)
+ (if (setq limits (c-state-literal-at (point)))
+ (goto-char (car limits))) ; go backward out of any string or comment.
+ (if (c-beginning-of-macro)
+ (c-end-of-macro))
+ (setq new-end (max endd
+ (if old-len
+ (+ (- c-old-EOM old-len) (- endd begg))
+ c-old-EOM)
+ (point)))
+ (cons new-beg new-end)))
+
(defun c-neutralize-CPP-line (beg end)
;; BEG and END bound a region, typically a preprocessor line. Put a
;; "punctuation" syntax-table property on syntactically obtrusive
@@ -881,31 +910,19 @@ Note that the style variables are always made local to the buffer."
;; Point is undefined both before and after this function call, the buffer
;; has been widened, and match-data saved. The return value is ignored.
;;
- ;; This function is the C/C++/ObjC value of `c-before-font-lock-function'.
+ ;; This function is in the C/C++/ObjC value of `c-before-font-lock-functions'.
;;
;; Note: SPEED _MATTERS_ IN THIS FUNCTION!!!
;;
;; This function might make hidden buffer changes.
- (c-save-buffer-state (limits)
+ (c-save-buffer-state (new-bounds)
;; First determine the region, (c-new-BEG c-new-END), which will get font
;; locked. It might need "neutralizing". This region may not start
;; inside a string, comment, or macro.
- (goto-char c-old-BOM) ; already set to old start of macro or begg.
- (setq c-new-BEG
- (min c-new-BEG
- (if (setq limits (c-state-literal-at (point)))
- (cdr limits) ; go forward out of any string or comment.
- (point))))
-
- (goto-char endd)
- (if (setq limits (c-state-literal-at (point)))
- (goto-char (car limits))) ; go backward out of any string or comment.
- (if (c-beginning-of-macro)
- (c-end-of-macro))
- (setq c-new-END (max c-new-END
- (+ (- c-old-EOM old-len) (- endd begg))
- (point)))
-
+ (setq new-bounds (c-extend-font-lock-region-for-macros
+ c-new-BEG c-new-END old-len))
+ (setq c-new-BEG (car new-bounds)
+ c-new-END (cdr new-bounds))
;; Clear all old relevant properties.
(c-clear-char-property-with-value c-new-BEG c-new-END 'syntax-table '(1))
(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."
;; Note that this function must be FAST rather than accurate. Note
;; also that it only has any effect when font locking is enabled.
;; We exploit this by checking for font-lock-*-face instead of doing
- ;; rigourous syntactic analysis.
+ ;; rigorous syntactic analysis.
;; If either change boundary is wholly inside an identifier, delete
;; 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."
c-get-state-before-change-functions))
))))
+(defvar c-in-after-change-fontification nil)
+(make-variable-buffer-local 'c-in-after-change-fontification)
+;; A flag to prevent region expanding stuff being done twice for after-change
+;; fontification.
+
(defun c-after-change (beg end old-len)
;; Function put on `after-change-functions' to adjust various caches
;; 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."
;; these caches from inside them, and we must thus be sure that this
;; has already been executed.
;;
- ;; This calls the language variable c-before-font-lock-function, if non nil.
+ ;; This calls the language variable c-before-font-lock-functions, if non nil.
;; This typically sets `syntax-table' properties.
(c-save-buffer-state ()
@@ -1066,19 +1088,113 @@ Note that the style variables are always made local to the buffer."
;; larger than (beg end).
(setq c-new-BEG beg
c-new-END end)
- (if c-before-font-lock-function
- (save-excursion
- (funcall c-before-font-lock-function beg end old-len)))))))
-
+ (setq c-in-after-change-fontification t)
+ (save-excursion
+ (mapc (lambda (fn)
+ (funcall fn beg end old-len))
+ c-before-font-lock-functions))))))
+
+(defun c-set-fl-decl-start (pos)
+ ;; If the beginning of the line containing POS is in the middle of a "local"
+ ;; declaration (i.e. one which does not start outside of braces enclosing
+ ;; POS, such as a struct), return the beginning of that declaration.
+ ;; Otherwise return POS. Note that declarations, in this sense, can be
+ ;; nested.
+ ;;
+ ;; This function is called indirectly from font locking stuff - either from
+ ;; c-after-change (to prepare for after-change font-lockng) or from font
+ ;; lock context (etc.) fontification.
+ (let ((lit-limits (c-literal-limits))
+ (new-pos pos)
+ bod-lim bo-decl)
+ (goto-char (c-point 'bol new-pos))
+ (when lit-limits ; Comment or string.
+ (goto-char (car lit-limits)))
+ (setq bod-lim (max (- (point) 500) (point-min)))
+
+ (while
+ ;; Go to a less nested declaration each time round this loop.
+ (and
+ (eq (car (c-beginning-of-decl-1 bod-lim)) 'same)
+ (progn (setq bo-decl (point))
+ ;; Are we looking at a keyword such as "template" or
+ ;; "typedef" which can decorate a type, or the type itself?
+ (when (or (looking-at c-prefix-spec-kwds-re)
+ (c-forward-type t))
+ ;; We've found another candidate position.
+ (setq new-pos (min new-pos bo-decl))
+ (goto-char bo-decl))
+ t)
+ ;; Try and go out a level to search again.
+ (progn
+ (c-backward-syntactic-ws bod-lim)
+ (or (memq (char-before) '(?\( ?\[))
+ (and (eq (char-before) ?\<)
+ (eq (c-get-char-property
+ (1- (point)) 'syntax-table)
+ c-<-as-paren-syntax))))
+ (not (bobp)))
+ (backward-char))
+ new-pos)) ; back over (, [, <.
+
+(defun c-change-set-fl-decl-start (beg end old-len)
+ ;; Set c-new-BEG to the beginning of a "local" declaration if it('s BOL) is
+ ;; inside one. This is called from an after-change-function, but the
+ ;; parameters BEG END and OLD-LEN are ignored. See `c-set-fl-decl-start'
+ ;; for the detailed functionality.
+ (if font-lock-mode
+ (setq c-new-BEG (c-set-fl-decl-start c-new-BEG))))
+
+(defun c-context-set-fl-decl-start (beg end)
+ ;; Return a cons (NEW-BEG . END), where NEW-BEG is the beginning of a
+ ;; "local" declaration (BOL at) NEW is inside or BEG. See
+ ;; `c-set-fl-decl-start' for the detailed functionality.
+ (cons (c-set-fl-decl-start beg) end))
+
+(defvar c-standard-font-lock-fontify-region-function nil
+ "Standard value of `font-lock-fontify-region-function'")
+
+(defun c-font-lock-fontify-region (beg end &optional verbose)
+ ;; Effectively advice around `font-lock-fontify-region' which extends the
+ ;; region (BEG END), for example, to avoid context fontification chopping
+ ;; off the start of the context. Do not do anything if it's already been
+ ;; done (i.e. from and after-change fontification. An example (C++) where
+ ;; this used to happen is this:
+ ;;
+ ;; template <typename T>
+ ;;
+ ;;
+ ;; void myfunc(T* p) {}
+ ;;
+ ;; Type a space in the first blank line, and the fontification of the next
+ ;; line was fouled up by context fontification.
+ (let ((new-beg beg) (new-end end) new-region)
+ (if c-in-after-change-fontification
+ (setq c-in-after-change-fontification nil)
+ (save-restriction
+ (widen)
+ (save-excursion
+ (mapc (lambda (fn)
+ (setq new-region (funcall fn new-beg new-end))
+ (setq new-beg (car new-region) new-end (cdr new-region)))
+ c-before-context-fontification-functions))))
+ (funcall c-standard-font-lock-fontify-region-function
+ new-beg new-end verbose)))
+
(defun c-after-font-lock-init ()
- ;; Put on `font-lock-mode-hook'.
+ ;; Put on `font-lock-mode-hook'. This function ensures our after-change
+ ;; function will get excuted before the font-lock one. Amongst other
+ ;; things.
(remove-hook 'after-change-functions 'c-after-change t)
- (add-hook 'after-change-functions 'c-after-change nil t))
+ (add-hook 'after-change-functions 'c-after-change nil t)
+ (setq c-standard-font-lock-fontify-region-function
+ (default-value 'font-lock-fontify-region-function)))
(defun c-font-lock-init ()
"Set up the font-lock variables for using the font-lock support in CC Mode.
This does not load the font-lock package. Use after
-`c-basic-common-init' and after cc-fonts has been loaded."
+`c-basic-common-init' and after cc-fonts has been loaded.
+This function is called from `c-common-init', once per mode initialization."
(set (make-local-variable 'font-lock-defaults)
`(,(if (c-major-mode-is 'awk-mode)
@@ -1092,6 +1208,10 @@ This does not load the font-lock package. Use after
c-beginning-of-syntax
(font-lock-mark-block-function
. c-mark-function)))
+
+ (make-local-variable 'font-lock-fontify-region-function)
+ (setq font-lock-fontify-region-function 'c-font-lock-fontify-region)
+
(if (featurep 'xemacs)
(make-local-hook 'font-lock-mode-hook))
(add-hook 'font-lock-mode-hook 'c-after-font-lock-init nil t))
@@ -1562,10 +1682,6 @@ Key bindings:
(c-common-init 'awk-mode)
(c-awk-unstick-NL-prop)
- ;; Prevent XEmacs's buffer-syntactic-context being used. See the comment
- ;; in cc-engine.el, just before (defun c-fast-in-literal ...
- (defalias 'c-in-literal 'c-slow-in-literal)
-
(c-run-mode-hooks 'c-mode-common-hook 'awk-mode-hook)
(c-update-modeline))
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'
afterwards to redo that work."
;; Symbols other than those documented above may be used on this
;; variable. If a variable exists that has that name with
- ;; "-font-lock-keywords" appended, it's value is prepended to the
+ ;; "-font-lock-keywords" appended, its value is prepended to the
;; font lock keywords list. If it's a function then it's called and
;; the result is prepended.
: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 @@
;; Author: Dave Love <fx@gnu.org>
;; Maintainer: Ted Zlatanov <tzz@lifelogs.com>
;; Keywords: languages
+;; Version: 1.1
;; This file is part of GNU Emacs.
@@ -29,18 +30,18 @@
;; The CFEngine 3.x support doesn't have Imenu support but patches are
;; welcome.
-;; You can set it up so either cfengine-mode (2.x and earlier) or
-;; cfengine3-mode (3.x) will be picked, depending on the buffer
+;; You can set it up so either `cfengine2-mode' (2.x and earlier) or
+;; `cfengine3-mode' (3.x) will be picked, depending on the buffer
;; contents:
-;; (add-to-list 'auto-mode-alist '("\\.cf\\'" . cfengine-auto-mode))
+;; (add-to-list 'auto-mode-alist '("\\.cf\\'" . cfengine-mode))
;; OR you can choose to always use a specific version, if you prefer
-;; it
+;; it:
;; (add-to-list 'auto-mode-alist '("\\.cf\\'" . cfengine3-mode))
-;; (add-to-list 'auto-mode-alist '("^cf\\." . cfengine-mode))
-;; (add-to-list 'auto-mode-alist '("^cfagent.conf\\'" . cfengine-mode))
+;; (add-to-list 'auto-mode-alist '("^cf\\." . cfengine2-mode))
+;; (add-to-list 'auto-mode-alist '("^cfagent.conf\\'" . cfengine2-mode))
;; This is not the same as the mode written by Rolf Ebert
;; <ebert@waporo.muc.de>, distributed with cfengine-2.0.5. It does
@@ -49,31 +50,36 @@
;;; Code:
(defgroup cfengine ()
- "Editing Cfengine files."
+ "Editing CFEngine files."
:group 'languages)
(defcustom cfengine-indent 2
- "*Size of a Cfengine indentation step in columns."
+ "*Size of a CFEngine indentation step in columns."
:group 'cfengine
:type 'integer)
+(defvar cfengine-mode-debug nil
+ "Whether `cfengine-mode' should print debugging info.")
+
(defcustom cfengine-mode-abbrevs nil
- "Abbrevs for Cfengine mode."
+ "Abbrevs for CFEngine2 mode."
:group 'cfengine
:type '(repeat (list (string :tag "Name")
(string :tag "Expansion")
(choice :tag "Hook" (const nil) function))))
+(make-obsolete-variable 'cfengine-mode-abbrevs 'edit-abbrevs "24.1")
+
;; Taken from the doc for pre-release 2.1.
(eval-and-compile
- (defconst cfengine-actions
+ (defconst cfengine2-actions
'("acl" "alerts" "binservers" "broadcast" "control" "classes" "copy"
"defaultroute" "disks" "directories" "disable" "editfiles" "files"
"filters" "groups" "homeservers" "ignore" "import" "interfaces"
"links" "mailserver" "methods" "miscmounts" "mountables"
"processes" "packages" "rename" "required" "resolve"
"shellcommands" "tidy" "unmount"
- ;; cfservd
+ ;; Keywords for cfservd.
"admit" "grant" "deny")
"List of the action keywords supported by Cfengine.
This includes those for cfservd as well as cfagent.")
@@ -98,11 +104,11 @@ This includes those for cfservd as well as cfagent.")
'(string int real slist ilist rlist irange rrange counter))
"List of the CFEngine 3.x variable types."))
-(defvar cfengine-font-lock-keywords
+(defvar cfengine2-font-lock-keywords
`(;; Actions.
;; List the allowed actions explicitly, so that errors are more obvious.
(,(concat "^[ \t]*" (eval-when-compile
- (regexp-opt cfengine-actions t))
+ (regexp-opt cfengine2-actions t))
":")
1 font-lock-keyword-face)
;; Classes.
@@ -117,46 +123,54 @@ This includes those for cfservd as well as cfagent.")
(defvar cfengine3-font-lock-keywords
`(
+ ;; Defuns. This happens early so they don't get caught by looser
+ ;; patterns.
+ (,(concat "\\<" cfengine3-defuns-regex "\\>"
+ "[ \t]+\\<\\([[:alnum:]_]+\\)\\>"
+ "[ \t]+\\<\\([[:alnum:]_]+\\)"
+ ;; Optional parentheses with variable names inside.
+ "\\(?:(\\([^)]*\\))\\)?")
+ (1 font-lock-builtin-face)
+ (2 font-lock-constant-face)
+ (3 font-lock-function-name-face)
+ (4 font-lock-variable-name-face nil t))
+
+ ;; Class selectors.
(,(concat "^[ \t]*" cfengine3-class-selector-regex)
1 font-lock-keyword-face)
+
+ ;; Categories.
(,(concat "^[ \t]*" cfengine3-category-regex)
1 font-lock-builtin-face)
+
;; Variables, including scope, e.g. module.var
("[@$](\\([[:alnum:]_.]+\\))" 1 font-lock-variable-name-face)
("[@$]{\\([[:alnum:]_.]+\\)}" 1 font-lock-variable-name-face)
+
;; Variable definitions.
("\\<\\([[:alnum:]_]+\\)[ \t]*=[ \t]*(" 1 font-lock-variable-name-face)
- ;; CFEngine 3.x faces
- ;; defuns
- (,(concat "\\<" cfengine3-defuns-regex "\\>"
- "[ \t]+\\<\\([[:alnum:]_]+\\)\\>"
- "[ \t]+\\<\\([[:alnum:]_]+\\)\\((\\([^)]*\\))\\)?")
- (1 font-lock-builtin-face)
- (2 font-lock-constant-name-face)
- (3 font-lock-function-name-face)
- (5 font-lock-variable-name-face))
- ;; variable types
+ ;; Variable types.
(,(concat "\\<" (eval-when-compile (regexp-opt cfengine3-vartypes t)) "\\>")
1 font-lock-type-face)))
-(defvar cfengine-imenu-expression
+(defvar cfengine2-imenu-expression
`((nil ,(concat "^[ \t]*" (eval-when-compile
- (regexp-opt cfengine-actions t))
+ (regexp-opt cfengine2-actions t))
":[^:]")
1)
("Variables/classes" "\\<\\([[:alnum:]_]+\\)[ \t]*=[ \t]*(" 1)
("Variables/classes" "\\<define=\\([[:alnum:]_]+\\)" 1)
("Variables/classes" "\\<DefineClass\\>[ \t]+\\([[:alnum:]_]+\\)" 1))
- "`imenu-generic-expression' for Cfengine mode.")
+ "`imenu-generic-expression' for CFEngine mode.")
-(defun cfengine-outline-level ()
- "`outline-level' function for Cfengine mode."
+(defun cfengine2-outline-level ()
+ "`outline-level' function for CFEngine mode."
(if (looking-at "[^:]+\\(?:[:]+\\)$")
(length (match-string 1))))
-(defun cfengine-beginning-of-defun ()
- "`beginning-of-defun' function for Cfengine mode.
+(defun cfengine2-beginning-of-defun ()
+ "`beginning-of-defun' function for CFEngine mode.
Treats actions as defuns."
(unless (<= (current-column) (current-indentation))
(end-of-line))
@@ -165,8 +179,8 @@ Treats actions as defuns."
(goto-char (point-min)))
t)
-(defun cfengine-end-of-defun ()
- "`end-of-defun' function for Cfengine mode.
+(defun cfengine2-end-of-defun ()
+ "`end-of-defun' function for CFEngine mode.
Treats actions as defuns."
(end-of-line)
(if (re-search-forward "^[[:alpha:]]+: *$" nil t)
@@ -176,7 +190,7 @@ Treats actions as defuns."
;; Fixme: Should get an extra indent step in editfiles BeginGroup...s.
-(defun cfengine-indent-line ()
+(defun cfengine2-indent-line ()
"Indent a line in Cfengine mode.
Intended as the value of `indent-line-function'."
(let ((pos (- (point-max) (point))))
@@ -283,15 +297,17 @@ Intended as the value of `indent-line-function'."
(narrow-to-defun)
(back-to-indentation)
(setq parse (parse-partial-sexp (point-min) (point)))
- (message "%S" parse)
+ (when cfengine-mode-debug
+ (message "%S" parse))
+
(cond
- ;; body/bundle blocks start at 0
+ ;; Body/bundle blocks start at 0.
((looking-at (concat cfengine3-defuns-regex "\\>"))
(indent-line-to 0))
- ;; categories are indented one step
+ ;; Categories are indented one step.
((looking-at (concat cfengine3-category-regex "[ \t]*$"))
(indent-line-to cfengine-indent))
- ;; class selectors are indented two steps
+ ;; Class selectors are indented two steps.
((looking-at (concat cfengine3-class-selector-regex "[ \t]*$"))
(indent-line-to (* 2 cfengine-indent)))
;; Outdent leading close brackets one step.
@@ -303,11 +319,17 @@ Intended as the value of `indent-line-function'."
(backward-sexp)
(current-column)))
(error nil)))
- ;; inside a string and it starts before this line
+ ;; Inside a string and it starts before this line.
((and (nth 3 parse)
(< (nth 8 parse) (save-excursion (beginning-of-line) (point))))
(indent-line-to 0))
- ;; inside a defun, but not a nested list (depth is 1)
+
+ ;; Inside a defun, but not a nested list (depth is 1). This is
+ ;; a promise, usually.
+
+ ;; Indent to cfengine-indent times the nested depth
+ ;; plus 2. That way, promises indent deeper than class
+ ;; selectors, which in turn are one deeper than categories.
((= 1 (nth 0 parse))
(indent-line-to (* (+ 2 (nth 0 parse)) cfengine-indent)))
;; Inside brackets/parens: indent to start column of non-comment
@@ -411,18 +433,18 @@ Intended as the value of `indent-line-function'."
(set (make-local-variable 'parse-sexp-ignore-comments) t))
(defun cfengine-common-syntax (table)
- ;; the syntax defaults seem OK to give reasonable word movement
+ ;; The syntax defaults seem OK to give reasonable word movement.
(modify-syntax-entry ?# "<" table)
(modify-syntax-entry ?\n ">#" table)
(modify-syntax-entry ?\" "\"" table)
- ;; variable substitution:
+ ;; Variable substitution.
(modify-syntax-entry ?$ "." table)
- ;; Doze path separators:
+ ;; Doze path separators.
(modify-syntax-entry ?\\ "." table))
;;;###autoload
-(define-derived-mode cfengine3-mode prog-mode "CFEngine3"
- "Major mode for editing cfengine input.
+(define-derived-mode cfengine3-mode prog-mode "CFE3"
+ "Major mode for editing CFEngine3 input.
There are no special keybindings by default.
Action blocks are treated as defuns, i.e. \\[beginning-of-defun] moves
@@ -434,46 +456,46 @@ to the action header."
(setq font-lock-defaults
'(cfengine3-font-lock-keywords nil nil nil beginning-of-defun))
- ;; use defuns as the essential syntax block
+ ;; Use defuns as the essential syntax block.
(set (make-local-variable 'beginning-of-defun-function)
#'cfengine3-beginning-of-defun)
(set (make-local-variable 'end-of-defun-function)
#'cfengine3-end-of-defun))
;;;###autoload
-(define-derived-mode cfengine-mode prog-mode "Cfengine"
- "Major mode for editing cfengine input.
+(define-derived-mode cfengine2-mode prog-mode "CFE2"
+ "Major mode for editing CFEngine2 input.
There are no special keybindings by default.
Action blocks are treated as defuns, i.e. \\[beginning-of-defun] moves
to the action header."
(cfengine-common-settings)
- (cfengine-common-syntax cfengine-mode-syntax-table)
+ (cfengine-common-syntax cfengine2-mode-syntax-table)
;; Shell commands can be quoted by single, double or back quotes.
;; It's debatable whether we should define string syntax, but it
;; should avoid potential confusion in some cases.
- (modify-syntax-entry ?\' "\"" cfengine-mode-syntax-table)
- (modify-syntax-entry ?\` "\"" cfengine-mode-syntax-table)
+ (modify-syntax-entry ?\' "\"" cfengine2-mode-syntax-table)
+ (modify-syntax-entry ?\` "\"" cfengine2-mode-syntax-table)
- (set (make-local-variable 'indent-line-function) #'cfengine-indent-line)
+ (set (make-local-variable 'indent-line-function) #'cfengine2-indent-line)
(set (make-local-variable 'outline-regexp) "[ \t]*\\(\\sw\\|\\s_\\)+:+")
- (set (make-local-variable 'outline-level) #'cfengine-outline-level)
+ (set (make-local-variable 'outline-level) #'cfengine2-outline-level)
(set (make-local-variable 'fill-paragraph-function)
#'cfengine-fill-paragraph)
- (define-abbrev-table 'cfengine-mode-abbrev-table cfengine-mode-abbrevs)
+ (define-abbrev-table 'cfengine2-mode-abbrev-table cfengine-mode-abbrevs)
(setq font-lock-defaults
- '(cfengine-font-lock-keywords nil nil nil beginning-of-line))
+ '(cfengine2-font-lock-keywords nil nil nil beginning-of-line))
;; Fixme: set the args of functions in evaluated classes to string
;; syntax, and then obey syntax properties.
- (setq imenu-generic-expression cfengine-imenu-expression)
+ (setq imenu-generic-expression cfengine2-imenu-expression)
(set (make-local-variable 'beginning-of-defun-function)
- #'cfengine-beginning-of-defun)
- (set (make-local-variable 'end-of-defun-function) #'cfengine-end-of-defun))
+ #'cfengine2-beginning-of-defun)
+ (set (make-local-variable 'end-of-defun-function) #'cfengine2-end-of-defun))
;;;###autoload
(defun cfengine-auto-mode ()
- "Choose between `cfengine-mode' and `cfengine3-mode' depending
+ "Choose between `cfengine2-mode' and `cfengine3-mode' depending
on the buffer contents"
(let ((v3 nil))
(save-restriction
@@ -481,7 +503,9 @@ on the buffer contents"
(while (not (or (eobp) v3))
(setq v3 (looking-at (concat cfengine3-defuns-regex "\\>")))
(forward-line)))
- (if v3 (cfengine3-mode) (cfengine-mode))))
+ (if v3 (cfengine3-mode) (cfengine2-mode))))
+
+(defalias 'cfengine-mode 'cfengine-auto-mode)
(provide 'cfengine3)
(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.
`cperl-array-face' Array names
`cperl-hash-face' Hash names
`font-lock-comment-face' Comments, PODs and whatever is considered
- syntaxically to be not code
+ syntactically to be not code
`font-lock-constant-face' HERE-doc delimiters, labels, delimiters of
2-arg operators s/y/tr/ or of RExen,
`font-lock-warning-face' Special-cased m// and s//foo/,
@@ -970,7 +970,7 @@ B) Speed of editing operations.
`cperl-nonoverridable-face' Non-overridable keywords, modifiers of RExen
`font-lock-string-face' Strings, qw() constructs, RExen, POD sections,
literal parts and the terminator of formats
- and whatever is syntaxically considered
+ and whatever is syntactically considered
as string literals
`font-lock-type-face' Overridable keywords
`font-lock-variable-name-face' Variable declarations, indirect array and
@@ -1537,8 +1537,8 @@ default.) You can always quote (with \\[quoted-insert]) the left
since most the time you mean \"less\". CPerl mode tries to guess
whether you want to type pair <>, and inserts is if it
appropriate. You can set `cperl-electric-parens-string' to the string that
-contains the parenths from the above list you want to be electrical.
-Electricity of parenths is controlled by `cperl-electric-parens'.
+contains the parens from the above list you want to be electrical.
+Electricity of parens is controlled by `cperl-electric-parens'.
You may also set `cperl-electric-parens-mark' to have electric parens
look for active mark and \"embrace\" a region if possible.'
@@ -3517,7 +3517,7 @@ Works before syntax recognition is done."
(defvar font-lock-warning-face)
(defun cperl-find-sub-attrs (&optional st-l b-fname e-fname pos)
- "Syntaxically mark (and fontify) attributes of a subroutine.
+ "Syntactically mark (and fontify) attributes of a subroutine.
Should be called with the point before leading colon of an attribute."
;; Works *before* syntax recognition is done
(or st-l (setq st-l (list nil))) ; Avoid overwriting '()
@@ -4994,7 +4994,7 @@ conditional/loop constructs."
(setq top (point))
;; Plan A: if line has an unfinished paren-group, go to end-of-group
(while (= -1 (nth 0 (parse-partial-sexp (point) tmp-end -1)))
- (setq top (point))) ; Get the outermost parenths in line
+ (setq top (point))) ; Get the outermost parens in line
(goto-char top)
(while (< (point) tmp-end)
(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."
3 font-lock-variable-name-face)))
'("\\<for\\(each\\)?\\([ \t]+\\(my\\|local\\|our\\)\\)?[ \t]*\\(\\$[a-zA-Z_][a-zA-Z_0-9]*\\)[ \t]*("
4 font-lock-variable-name-face)
- ;; Avoid $!, and s!!, qq!! etc. when not fontifying syntaxically
+ ;; Avoid $!, and s!!, qq!! etc. when not fontifying syntactically
'("\\(?:^\\|[^smywqrx$]\\)\\(!\\)" 1 font-lock-negation-char-face)
'("\\[\\(\\^\\)" 1 font-lock-negation-char-face prepend)))
(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."
(setq done t) ; not a label-only line, exit the loop
(setq retval (point))))
;; We couldn't go further back, and we haven't found a command yet.
- ;; Return to the start positionn
+ ;; Return to the start position.
(goto-char start)
(setq done t)
(setq retval nil)))
@@ -756,7 +756,7 @@ Returns point of the found command line or nil if not able to move."
(setq done t) ; not a label-only line, exit the loop
(setq retval (point)))))
;; We couldn't go further back, and we haven't found a command yet.
- ;; Return to the start positionn
+ ;; Return to the start position.
(goto-char start)
(setq done t)
(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
% --- Corners
-%>corner Right Descendent: height arrow corner_RD
+%>corner Right Descendant: height arrow corner_RD
% _ | arrow
% / height > 0 | 0 - none
% | | 1 - right
@@ -3299,7 +3299,7 @@ See documentation for `ebnf-terminal-shape', `ebnf-non-terminal-shape' and
Gstroke
}def
-%>corner Right Ascendent: height arrow corner_RA
+%>corner Right Ascendant: height arrow corner_RA
% | arrow
% | height > 0 | 0 - none
% / | 1 - right
@@ -3338,7 +3338,7 @@ See documentation for `ebnf-terminal-shape', `ebnf-non-terminal-shape' and
Gstroke
}def
-%>corner Left Descendent: height arrow corner_LD
+%>corner Left Descendant: height arrow corner_LD
% _ | arrow
% \\ height > 0 | 0 - none
% | | 1 - right
@@ -3377,7 +3377,7 @@ See documentation for `ebnf-terminal-shape', `ebnf-non-terminal-shape' and
Gstroke
}def
-%>corner Left Ascendent: height arrow corner_LA
+%>corner Left Ascendant: height arrow corner_LA
% | arrow
% | height > 0 | 0 - none
% \\ | 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.
(define-key gud-minor-mode-map [left-margin C-mouse-3]
'gdb-mouse-jump)
+ (set (make-local-variable 'gud-gdb-completion-function)
+ 'gud-gdbmi-completions)
+
(add-hook 'completion-at-point-functions #'gud-gdb-completion-at-point
nil 'local)
(local-set-key "\C-i" 'completion-at-point)
@@ -859,31 +862,28 @@ detailed description of this mode.
(set-process-filter (get-process "gdb-inferior") 'gdb-inferior-filter)
(gdb-input
;; Needs GDB 6.4 onwards
- (list (concat "-inferior-tty-set "
- (or
- ;; The process can run on a remote host.
- (process-get (get-process "gdb-inferior") 'remote-tty)
- (process-tty-name (get-process "gdb-inferior"))))
- 'ignore))
+ (concat "-inferior-tty-set "
+ (or
+ ;; The process can run on a remote host.
+ (process-get (get-process "gdb-inferior") 'remote-tty)
+ (process-tty-name (get-process "gdb-inferior"))))
+ 'ignore)
(if (eq window-system 'w32)
- (gdb-input (list "-gdb-set new-console off" 'ignore)))
- (gdb-input (list "-gdb-set height 0" 'ignore))
+ (gdb-input "-gdb-set new-console off" 'ignore))
+ (gdb-input "-gdb-set height 0" 'ignore)
(when gdb-non-stop
- (gdb-input (list "-gdb-set non-stop 1" 'gdb-non-stop-handler)))
+ (gdb-input "-gdb-set non-stop 1" 'gdb-non-stop-handler))
- (gdb-input (list "-enable-pretty-printing" 'ignore))
+ (gdb-input "-enable-pretty-printing" 'ignore)
;; find source file and compilation directory here
(if gdb-create-source-file-list
- (gdb-input
- ; Needs GDB 6.2 onwards.
- (list "-file-list-exec-source-files" 'gdb-get-source-file-list)))
- (gdb-input
- ; Needs GDB 6.0 onwards.
- (list "-file-list-exec-source-file" 'gdb-get-source-file))
- (gdb-input
- (list "-gdb-show prompt" 'gdb-get-prompt)))
+ ;; Needs GDB 6.2 onwards.
+ (gdb-input "-file-list-exec-source-files" 'gdb-get-source-file-list))
+ ;; Needs GDB 6.0 onwards.
+ (gdb-input "-file-list-exec-source-file" 'gdb-get-source-file)
+ (gdb-input "-gdb-show prompt" 'gdb-get-prompt))
(defun gdb-non-stop-handler ()
(goto-char (point-min))
@@ -894,8 +894,8 @@ detailed description of this mode.
(setq gdb-non-stop nil)
(setq gdb-supports-non-stop nil))
(setq gdb-supports-non-stop t)
- (gdb-input (list "-gdb-set target-async 1" 'ignore))
- (gdb-input (list "-list-target-features" 'gdb-check-target-async))))
+ (gdb-input "-gdb-set target-async 1" 'ignore)
+ (gdb-input "-list-target-features" 'gdb-check-target-async)))
(defun gdb-check-target-async ()
(goto-char (point-min))
@@ -903,7 +903,7 @@ detailed description of this mode.
(message
"Target doesn't support non-stop mode. Turning it off.")
(setq gdb-non-stop nil)
- (gdb-input (list "-gdb-set non-stop 0" 'ignore))))
+ (gdb-input "-gdb-set non-stop 0" 'ignore)))
(defvar gdb-define-alist nil "Alist of #define directives for GUD tooltips.")
@@ -948,9 +948,8 @@ detailed description of this mode.
(goto-char (point-min))
(if (search-forward "expands to: " nil t)
(unless (looking-at "\\S-+.*(.*).*")
- (gdb-input
- (list (concat "-data-evaluate-expression " expr)
- `(lambda () (gdb-tooltip-print ,expr))))))))
+ (gdb-input (concat "-data-evaluate-expression " expr)
+ `(lambda () (gdb-tooltip-print ,expr)))))))
(defun gdb-init-buffer ()
(set (make-local-variable 'gud-minor-mode) 'gdbmi)
@@ -1080,9 +1079,8 @@ With arg, enter name of variable to be watched in the minibuffer."
(concat (if (derived-mode-p 'gdb-registers-mode) "$")
(tooltip-identifier-from-point (point)))))))
(set-text-properties 0 (length expr) nil expr)
- (gdb-input
- (list (concat "-var-create - * " expr "")
- `(lambda () (gdb-var-create-handler ,expr)))))))
+ (gdb-input (concat "-var-create - * " expr "")
+ `(lambda () (gdb-var-create-handler ,expr))))))
(message "gud-watch is a no-op in this mode."))))
(defun gdb-var-create-handler (expr)
@@ -1111,7 +1109,7 @@ With arg, enter name of variable to be watched in the minibuffer."
(when (and (boundp 'speedbar-frame) (frame-live-p speedbar-frame)
(not (gdb-pending-p 'gdb-speedbar-timer)))
;; Dummy command to update speedbar even when idle.
- (gdb-input (list "-environment-pwd" 'gdb-speedbar-timer-fn))
+ (gdb-input "-environment-pwd" 'gdb-speedbar-timer-fn)
;; Keep gdb-pending-triggers non-nil till end.
(gdb-add-pending 'gdb-speedbar-timer)))
@@ -1132,12 +1130,9 @@ With arg, enter name of variable to be watched in the minibuffer."
; Uses "-var-list-children --all-values". Needs GDB 6.1 onwards.
(defun gdb-var-list-children (varnum)
- (gdb-input
- (list (concat "-var-update " varnum) 'ignore))
- (gdb-input
- (list (concat "-var-list-children --all-values "
- varnum)
- `(lambda () (gdb-var-list-children-handler ,varnum)))))
+ (gdb-input (concat "-var-update " varnum) 'ignore)
+ (gdb-input (concat "-var-list-children --all-values " varnum)
+ `(lambda () (gdb-var-list-children-handler ,varnum))))
(defun gdb-var-list-children-handler (varnum)
(let* ((var-list nil)
@@ -1169,13 +1164,11 @@ With arg, enter name of variable to be watched in the minibuffer."
"Set the output format for a variable displayed in the speedbar."
(let* ((var (nth (- (count-lines (point-min) (point)) 2) gdb-var-list))
(varnum (car var)))
- (gdb-input
- (list (concat "-var-set-format " varnum " " format) 'ignore))
+ (gdb-input (concat "-var-set-format " varnum " " format) 'ignore)
(gdb-var-update)))
(defun gdb-var-delete-1 (var varnum)
- (gdb-input
- (list (concat "-var-delete " varnum) 'ignore))
+ (gdb-input (concat "-var-delete " varnum) 'ignore)
(setq gdb-var-list (delq var gdb-var-list))
(dolist (varchild gdb-var-list)
(if (string-match (concat (car var) "\\.") (car varchild))
@@ -1194,17 +1187,15 @@ With arg, enter name of variable to be watched in the minibuffer."
(defun gdb-var-delete-children (varnum)
"Delete children of variable object at point from the speedbar."
- (gdb-input
- (list (concat "-var-delete -c " varnum) 'ignore)))
+ (gdb-input (concat "-var-delete -c " varnum) 'ignore))
(defun gdb-edit-value (_text _token _indent)
"Assign a value to a variable displayed in the speedbar."
(let* ((var (nth (- (count-lines (point-min) (point)) 2) gdb-var-list))
(varnum (car var)) (value))
(setq value (read-string "New value: "))
- (gdb-input
- (list (concat "-var-assign " varnum " " value)
- `(lambda () (gdb-edit-value-handler ,value))))))
+ (gdb-input (concat "-var-assign " varnum " " value)
+ `(lambda () (gdb-edit-value-handler ,value)))))
(defconst gdb-error-regexp "\\^error,msg=\\(\".+\"\\)")
@@ -1216,8 +1207,7 @@ With arg, enter name of variable to be watched in the minibuffer."
; Uses "-var-update --all-values". Needs GDB 6.4 onwards.
(defun gdb-var-update ()
(if (not (gdb-pending-p 'gdb-var-update))
- (gdb-input
- (list "-var-update --all-values *" 'gdb-var-update-handler)))
+ (gdb-input "-var-update --all-values *" 'gdb-var-update-handler))
(gdb-add-pending 'gdb-var-update))
(defun gdb-var-update-handler ()
@@ -1697,13 +1687,17 @@ static char *magick[] = {
gdb-continuation string "\"\n"))
(setq gdb-continuation nil))))
-(defun gdb-input (item)
- (if gdb-enable-debug (push (cons 'send-item item) gdb-debug-log))
+(defun gdb-input (command handler-function)
+ "Send COMMAND to GDB via the MI interface.
+Run the function HANDLER-FUNCTION, with no arguments, once the command is
+complete."
+ (if gdb-enable-debug (push (list 'send-item command handler-function)
+ gdb-debug-log))
(setq gdb-token-number (1+ gdb-token-number))
- (setcar item (concat (number-to-string gdb-token-number) (car item)))
- (push (cons gdb-token-number (car (cdr item))) gdb-handler-alist)
+ (setq command (concat (number-to-string gdb-token-number) command))
+ (push (cons gdb-token-number handler-function) gdb-handler-alist)
(process-send-string (get-buffer-process gud-comint-buffer)
- (concat (car item) "\n")))
+ (concat command "\n")))
;; NOFRAME is used for gud execution control commands
(defun gdb-current-context-command (command)
@@ -1890,15 +1884,16 @@ is running."
(let ((record-type (cadr output-record))
(arg1 (nth 2 output-record))
(arg2 (nth 3 output-record)))
- (if (eq record-type 'gdb-error)
- (gdb-done-or-error arg2 arg1 'error)
- (if (eq record-type 'gdb-done)
- (gdb-done-or-error arg2 arg1 'done)
- ;; Suppress "No registers." since GDB 6.8 and earlier duplicates MI
- ;; error message on internal stream. Don't print to GUD buffer.
- (unless (and (eq record-type 'gdb-internals)
- (string-equal (read arg1) "No registers.\n"))
- (funcall record-type arg1))))))
+ (cond ((eq record-type 'gdb-error)
+ (gdb-done-or-error arg2 arg1 'error))
+ ((eq record-type 'gdb-done)
+ (gdb-done-or-error arg2 arg1 'done))
+ ;; Suppress "No registers." GDB 6.8 and earlier
+ ;; duplicates MI error message on internal stream.
+ ;; Don't print to GUD buffer.
+ ((not (and (eq record-type 'gdb-internals)
+ (string-equal (read arg1) "No registers.\n")))
+ (funcall record-type arg1)))))
(setq gdb-output-sink 'user)
;; Remove padding.
@@ -1991,11 +1986,10 @@ current thread and update GDB buffers."
;; -data-list-register-names needs to be issued for any stopped
;; thread
(when (not gdb-register-names)
- (gdb-input
- (list (concat "-data-list-register-names"
- (if gdb-supports-non-stop
- (concat " --thread " thread-id)))
- 'gdb-register-names-handler)))
+ (gdb-input (concat "-data-list-register-names"
+ (if gdb-supports-non-stop
+ (concat " --thread " thread-id)))
+ 'gdb-register-names-handler))
;;; Don't set gud-last-frame here as it's currently done in gdb-frame-handler
;;; because synchronous GDB doesn't give these fields with CLI.
@@ -2062,9 +2056,7 @@ current thread and update GDB buffers."
;; (frontend MI commands should not print to this stream)
(defun gdb-console (output-field)
(setq gdb-filter-output
- (gdb-concat-output
- gdb-filter-output
- (read output-field))))
+ (gdb-concat-output gdb-filter-output (read output-field))))
(defun gdb-done-or-error (output-field token-number type)
(if (string-equal token-number "")
@@ -2102,12 +2094,11 @@ current thread and update GDB buffers."
(assq-delete-all token-number gdb-handler-alist)))))
(defun gdb-concat-output (so-far new)
- (let ((sink gdb-output-sink))
- (cond
- ((eq sink 'user) (concat so-far new))
- ((eq sink 'emacs)
- (gdb-append-to-partial-output new)
- so-far))))
+ (cond
+ ((eq gdb-output-sink 'user) (concat so-far new))
+ ((eq gdb-output-sink 'emacs)
+ (gdb-append-to-partial-output new)
+ so-far)))
(defun gdb-append-to-partial-output (string)
(with-current-buffer (gdb-get-buffer-create 'gdb-partial-output-buffer)
@@ -2317,9 +2308,8 @@ trigger argument when describing buffer types with
(memq signal ,signal-list))
(when (not (gdb-pending-p
(cons (current-buffer) ',trigger-name)))
- (gdb-input
- (list ,gdb-command
- (gdb-bind-function-to-buffer ',handler-name (current-buffer))))
+ (gdb-input ,gdb-command
+ (gdb-bind-function-to-buffer ',handler-name (current-buffer)))
(gdb-add-pending (cons (current-buffer) ',trigger-name))))))
;; Used by disassembly buffer only, the rest use
@@ -2446,13 +2436,10 @@ HANDLER-NAME handler uses customization of CUSTOM-DEFUN. See
;; Only want one breakpoint icon at each location.
(gdb-put-breakpoint-icon (string-equal flag "y") bptno
(string-to-number line)))
- (gdb-input
- (list (concat "list " file ":1")
- 'ignore))
- (gdb-input
- (list "-file-list-exec-source-file"
- `(lambda () (gdb-get-location
- ,bptno ,line ,flag))))))))))
+ (gdb-input (concat "list " file ":1") 'ignore)
+ (gdb-input "-file-list-exec-source-file"
+ `(lambda () (gdb-get-location
+ ,bptno ,line ,flag)))))))))
(defvar gdb-source-file-regexp "fullname=\"\\(.*?\\)\"")
@@ -2782,7 +2769,7 @@ on the current line."
(def-gdb-thread-buffer-command gdb-select-thread
(let ((new-id (bindat-get-field thread 'id)))
(gdb-setq-thread-number new-id)
- (gdb-input (list (concat "-thread-select " new-id) 'ignore))
+ (gdb-input (concat "-thread-select " new-id) 'ignore)
(gdb-update))
"Select the thread at current line of threads buffer.")
@@ -3538,8 +3525,8 @@ member."
(if (gdb-buffer-shows-main-thread-p)
(let ((new-level (bindat-get-field frame 'level)))
(setq gdb-frame-number new-level)
- (gdb-input (list (concat "-stack-select-frame " new-level)
- 'ignore))
+ (gdb-input (concat "-stack-select-frame " new-level)
+ 'ignore)
(gdb-update))
(error "Could not select frame for non-current thread"))
(error "Not recognized as frame line"))))
@@ -3767,14 +3754,11 @@ member."
;; Needs GDB 6.4 onwards (used to fail with no stack).
(defun gdb-get-changed-registers ()
- (if (and (gdb-get-buffer 'gdb-registers-buffer)
- (not (gdb-pending-p 'gdb-get-changed-registers)))
- (progn
- (gdb-input
- (list
- "-data-list-changed-registers"
- 'gdb-changed-registers-handler))
- (gdb-add-pending 'gdb-get-changed-registers))))
+ (when (and (gdb-get-buffer 'gdb-registers-buffer)
+ (not (gdb-pending-p 'gdb-get-changed-registers)))
+ (gdb-input "-data-list-changed-registers"
+ 'gdb-changed-registers-handler)
+ (gdb-add-pending 'gdb-get-changed-registers)))
(defun gdb-changed-registers-handler ()
(gdb-delete-pending 'gdb-get-changed-registers)
@@ -3803,18 +3787,15 @@ is set in them."
(dolist (buffer (buffer-list))
(with-current-buffer buffer
(when (member buffer-file-name gdb-source-file-list)
- (gdb-init-buffer))))
- (gdb-force-mode-line-update
- (propertize "ready" 'face font-lock-variable-name-face)))
+ (gdb-init-buffer)))))
(defun gdb-get-main-selected-frame ()
"Trigger for `gdb-frame-handler' which uses main current
thread. Called from `gdb-update'."
(if (not (gdb-pending-p 'gdb-get-main-selected-frame))
(progn
- (gdb-input
- (list (gdb-current-context-command "-stack-info-frame")
- 'gdb-frame-handler))
+ (gdb-input (gdb-current-context-command "-stack-info-frame")
+ 'gdb-frame-handler)
(gdb-add-pending 'gdb-get-main-selected-frame))))
(defun gdb-frame-handler ()
@@ -3862,7 +3843,7 @@ overlay arrow in source buffer."
If BUF is already displayed in some window, show it, deiconifying
the frame if necessary. Otherwise, find least recently used
window and show BUF there, if the window is not used for GDB
-already, in which case that window is splitted first."
+already, in which case that window is split first."
(let ((answer (get-buffer-window buf (or frame 0))))
(if answer
(display-buffer buf nil (or frame 0)) ;Deiconify frame if necessary.
@@ -4145,7 +4126,9 @@ buffers, if required."
(gdb-get-buffer-create 'gdb-breakpoints-buffer)
(if (and gdb-show-main gdb-main-file)
(let ((pop-up-windows t))
- (display-buffer (gud-find-file gdb-main-file))))))
+ (display-buffer (gud-find-file gdb-main-file)))))
+ (gdb-force-mode-line-update
+ (propertize "ready" 'face font-lock-variable-name-face)))
;;from put-image
(defun gdb-put-string (putstring pos &optional dprop &rest sprops)
@@ -4256,6 +4239,42 @@ BUFFER nil or omitted means use the current buffer."
(set-window-margins
window left-margin-width right-margin-width)))))
+
+;;; Functions for inline completion.
+
+(defvar gud-gdb-fetch-lines-in-progress)
+(defvar gud-gdb-fetch-lines-string)
+(defvar gud-gdb-fetch-lines-break)
+(defvar gud-gdb-fetched-lines)
+
+(defun gud-gdbmi-completions (context command)
+ "Completion table for GDB/MI commands.
+COMMAND is the prefix for which we seek completion.
+CONTEXT is the text before COMMAND on the line."
+ (let ((gud-gdb-fetch-lines-in-progress t)
+ (gud-gdb-fetch-lines-string nil)
+ (gud-gdb-fetch-lines-break (length context))
+ (gud-gdb-fetched-lines nil)
+ ;; This filter dumps output lines to `gud-gdb-fetched-lines'.
+ (gud-marker-filter #'gud-gdbmi-fetch-lines-filter)
+ complete-list)
+ (with-current-buffer (gdb-get-buffer 'gdb-partial-output-buffer)
+ (gdb-input (concat "complete " context command)
+ (lambda () (setq gud-gdb-fetch-lines-in-progress nil)))
+ (while gud-gdb-fetch-lines-in-progress
+ (accept-process-output (get-buffer-process gud-comint-buffer))))
+ (gud-gdb-completions-1 gud-gdb-fetched-lines)))
+
+(defun gud-gdbmi-fetch-lines-filter (string)
+ "Custom filter function for `gud-gdbmi-completions'."
+ (setq string (concat gud-gdb-fetch-lines-string
+ (gud-gdbmi-marker-filter string)))
+ (while (string-match "\n" string)
+ (push (substring string gud-gdb-fetch-lines-break (match-beginning 0))
+ gud-gdb-fetched-lines)
+ (setq string (substring string (match-end 0))))
+ "")
+
(provide 'gdb-mi)
;;; 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
Setting it causes the grep commands to put point at the end of their
output window so that the end of the output is always visible rather
-than the begining."
+than the beginning."
:type 'boolean
:version "22.1"
:group 'grep)
@@ -959,7 +959,10 @@ can use \\[next-error] (M-x next-error), or \\<grep-mode-map>\\[compile-goto-err
in the grep output buffer,
to go to the lines where grep found matches.
-This command shares argument histories with \\[lgrep] and \\[grep-find]."
+This command shares argument histories with \\[lgrep] and \\[grep-find].
+
+When called programmatically and FILES is nil, REGEXP is expected
+to specify a command to run."
(interactive
(progn
(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."
(add-hook 'completion-at-point-functions #'gud-gdb-completion-at-point
nil 'local)
+ (set (make-local-variable 'gud-gdb-completion-function) 'gud-gdb-completions)
+
(local-set-key "\C-i" 'completion-at-point)
(setq comint-prompt-regexp "^(.*gdb[+]?) *")
(setq paragraph-start comint-prompt-regexp)
@@ -768,6 +770,12 @@ directory and source-file directory for your debugger."
;; context-sensitive command completion. We preserve that feature
;; in the GUD buffer by using a GDB command designed just for Emacs.
+(defvar gud-gdb-completion-function nil
+ "Completion function for GDB commands.
+It receives two arguments: COMMAND, the prefix for which we seek
+completion; and CONTEXT, the text before COMMAND on the line.
+It should return a list of completion strings.")
+
;; The completion process filter indicates when it is finished.
(defvar gud-gdb-fetch-lines-in-progress)
@@ -806,28 +814,32 @@ CONTEXT is the text before COMMAND on the line."
(and complete-list
(string-match "^Undefined command: \"complete\"" (car complete-list))
(error "This version of GDB doesn't support the `complete' command"))
- ;; Sort the list like readline.
- (setq complete-list (sort complete-list (function string-lessp)))
- ;; Remove duplicates.
- (let ((first complete-list)
- (second (cdr complete-list)))
- (while second
- (if (string-equal (car first) (car second))
- (setcdr first (setq second (cdr second)))
- (setq first second
- second (cdr second)))))
- ;; Add a trailing single quote if there is a unique completion
- ;; and it contains an odd number of unquoted single quotes.
- (and (= (length complete-list) 1)
- (let ((str (car complete-list))
- (pos 0)
- (count 0))
- (while (string-match "\\([^'\\]\\|\\\\'\\)*'" str pos)
- (setq count (1+ count)
- pos (match-end 0)))
- (and (= (mod count 2) 1)
- (setq complete-list (list (concat str "'"))))))
- complete-list))
+ (gud-gdb-completions-1 complete-list)))
+
+;; This function is also used by `gud-gdbmi-completions'.
+(defun gud-gdb-completions-1 (complete-list)
+ ;; Sort the list like readline.
+ (setq complete-list (sort complete-list (function string-lessp)))
+ ;; Remove duplicates.
+ (let ((first complete-list)
+ (second (cdr complete-list)))
+ (while second
+ (if (string-equal (car first) (car second))
+ (setcdr first (setq second (cdr second)))
+ (setq first second
+ second (cdr second)))))
+ ;; Add a trailing single quote if there is a unique completion
+ ;; and it contains an odd number of unquoted single quotes.
+ (and (= (length complete-list) 1)
+ (let ((str (car complete-list))
+ (pos 0)
+ (count 0))
+ (while (string-match "\\([^'\\]\\|\\\\'\\)*'" str pos)
+ (setq count (1+ count)
+ pos (match-end 0)))
+ (and (= (mod count 2) 1)
+ (setq complete-list (list (concat str "'"))))))
+ complete-list)
(defun gud-gdb-completion-at-point ()
"Return the data to complete the GDB command before point."
@@ -838,7 +850,7 @@ CONTEXT is the text before COMMAND on the line."
(point))))
(list start end
(completion-table-dynamic
- (apply-partially #'gud-gdb-completions
+ (apply-partially gud-gdb-completion-function
(buffer-substring (comint-line-beginning-position)
start))))))
@@ -851,11 +863,11 @@ CONTEXT is the text before COMMAND on the line."
;; The completion process filter is installed temporarily to slurp the
;; output of GDB up to the next prompt and build the completion list.
-(defun gud-gdb-fetch-lines-filter (string filter)
+(defun gud-gdb-fetch-lines-filter (string)
"Filter used to read the list of lines output by a command.
STRING is the output to filter.
-It is passed through FILTER before we look at it."
- (setq string (funcall filter string))
+It is passed through `gud-gdb-marker-filter' before we look at it."
+ (setq string (gud-gdb-marker-filter string))
(setq string (concat gud-gdb-fetch-lines-string string))
(while (string-match "\n" string)
(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."
(defvar gud-gdb-fetched-stack-frame nil
"Stack frames we are fetching from GDB.")
-;(defun gud-gdb-get-scope-data (text token indent)
-; ;; checkdoc-params: (indent)
-; "Fetch data associated with a stack frame, and expand/contract it.
-;Data to do this is retrieved from TEXT and TOKEN."
-; (let ((args nil) (scope nil))
-; (gud-gdb-run-command-fetch-lines "info args")
-;
-; (gud-gdb-run-command-fetch-lines "info local")
-;
-; ))
-
(defun gud-gdb-get-stackframe (buffer)
"Extract the current stack frame out of the GUD GDB BUFFER."
(let ((newlst nil)
@@ -934,21 +935,16 @@ It is passed through FILTER before we look at it."
BUFFER is the current buffer which may be the GUD buffer in which to run.
SKIP is the number of chars to skip on each line, it defaults to 0."
(with-current-buffer gud-comint-buffer
- (if (and (eq gud-comint-buffer buffer)
- (save-excursion
- (goto-char (point-max))
- (forward-line 0)
- (not (looking-at comint-prompt-regexp))))
- nil
- ;; Much of this copied from GDB complete, but I'm grabbing the stack
- ;; frame instead.
+ (unless (and (eq gud-comint-buffer buffer)
+ (save-excursion
+ (goto-char (point-max))
+ (forward-line 0)
+ (not (looking-at comint-prompt-regexp))))
(let ((gud-gdb-fetch-lines-in-progress t)
(gud-gdb-fetched-lines nil)
(gud-gdb-fetch-lines-string nil)
(gud-gdb-fetch-lines-break (or skip 0))
- (gud-marker-filter
- `(lambda (string)
- (gud-gdb-fetch-lines-filter string ',gud-marker-filter))))
+ (gud-marker-filter #'gud-gdb-fetch-lines-filter))
;; Issue the command to GDB.
(gud-basic-call command)
;; Slurp the output.
@@ -1919,7 +1915,7 @@ extension EXTN. Normally EXTN is given as the regular expression
;; in petticoat junction.
(defun gud-jdb-skip-block ()
- ;; Find the begining of the block.
+ ;; Find the beginning of the block.
(while
(not (eq (following-char) ?{))
@@ -1936,7 +1932,7 @@ extension EXTN. Normally EXTN is given as the regular expression
(gud-jdb-skip-character-literal))
(t (forward-char))))
- ;; Now at the begining of the block.
+ ;; Now at the beginning of the block.
(forward-char)
;; 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."
((xdb pdb) (concat "p " expr))
(sdb (concat expr "/"))))
-(declare-function gdb-input "gdb-mi" (item))
+(declare-function gdb-input "gdb-mi" (command handler))
(declare-function tooltip-expr-to-print "tooltip" (event))
(declare-function tooltip-event-buffer "tooltip" (event))
@@ -3468,12 +3464,12 @@ so they have been disabled."))
(if (eq gud-minor-mode 'gdbmi)
(if gdb-macro-info
(gdb-input
- (list (concat
- "server macro expand " expr "\n")
- `(lambda () (gdb-tooltip-print-1 ,expr))))
+ (concat
+ "server macro expand " expr "\n")
+ `(lambda () (gdb-tooltip-print-1 ,expr)))
(gdb-input
- (list (concat cmd "\n")
- `(lambda () (gdb-tooltip-print ,expr)))))
+ (concat cmd "\n")
+ `(lambda () (gdb-tooltip-print ,expr))))
(setq gud-tooltip-original-filter (process-filter process))
(set-process-filter process 'gud-tooltip-process-output)
(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."
(defun hif-possibly-hide ()
"Called at #ifX expression, this hides those parts that should be hidden.
-It uses the judgement of `hide-ifdef-evaluator'."
+It uses the judgment of `hide-ifdef-evaluator'."
;; (message "hif-possibly-hide") (sit-for 1)
(let ((test (hif-canonicalize))
(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."
(defun idlwave-down-block (&optional arg)
"Go down a block.
With ARG: ARG >= 0 go forwards, ARG < 0 go backwards.
-Returns non-nil if successfull."
+Returns non-nil if successful."
(interactive "p")
(let (status)
(if (< arg 0)
@@ -7866,7 +7866,7 @@ itself."
"Display online help about the completion at point."
(interactive "eP")
;; Restore last-command for next command, to make
- ;; scrolling/cancelling of completions work.
+ ;; scrolling/canceling of completions work.
(setq this-command last-command)
(idlwave-do-mouse-completion-help ev))
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 @@
;; This makes these modes easier to use.
;; For documentation on the functionality provided by comint mode, and
-;; the hooks available for customising it, see the file comint.el.
+;; the hooks available for customizing it, see the file comint.el.
;; For further information on inferior-lisp mode, see the comments below.
;; 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."
'(js> ((fifth hitab) "selectedTab") (fourth hitab))
cmds)))
- ;; Hilighting whole window
+ ;; Highlighting whole window
((third hitab)
(push '(js! ((third hitab) "document"
"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 ( )."
"List of keywords understood by automake.")
(defconst makefile-gmake-statements
- `("-sinclude" "sinclude" "vpath" ; makefile-makepp-statements takes rest
+ `("-sinclude" "sinclude" ; makefile-makepp-statements takes rest
"ifdef" "ifndef" "ifeq" "ifneq" "-include" "define" "endef" "export"
- "override define" "override" "unexport"
+ "override define" "override" "unexport" "vpath"
,@(cdr makefile-automake-statements))
"List of keywords understood by gmake.")
-;; These are even more silly, because you can have more spaces in between.
(defconst makefile-makepp-statements
- `("and ifdef" "and ifndef" "and ifeq" "and ifneq" "and ifperl"
- "and ifmakeperl" "and ifsys" "and ifnsys" "build_cache" "build_check"
+ `(t ; - alternately means _
+ ;; todo: take if* out of these lists, and let the negation regexp do it all
+ "ifperl" "ifmakeperl" "ifsys" "ifnsys" "iftrue" "ifntrue"
+ "and ifdef" "and ifndef" "and ifeq" "and ifneq" "and ifperl"
+ "and ifmakeperl" "and ifsys" "and ifnsys" "and iftrue" "and ifntrue"
"else ifdef" "else ifndef" "else ifeq" "else ifneq" "else ifperl"
- "else ifmakeperl" "else ifsys" "else ifnsys" "enddef" "global"
- "load_makefile" "ifperl" "ifmakeperl" "ifsys" "ifnsys" "_include"
- "makeperl" "makesub" "no_implicit_load" "perl" "perl-begin" "perl_begin"
- "perl-end" "perl_end" "prebuild" "or ifdef" "or ifndef" "or ifeq"
- "or ifneq" "or ifperl" "or ifmakeperl" "or ifsys" "or ifnsys"
- "override export" "override global" "register_command_parser"
- "register_scanner" "repository" "runtime" "signature" "sub"
- ,@(nthcdr 3 makefile-gmake-statements))
+ "else ifmakeperl" "else ifsys" "else ifnsys" "else iftrue" "else ifntrue"
+ "or ifdef" "or ifndef" "or ifeq" "or ifneq" "or ifperl"
+ "or ifmakeperl" "or ifsys" "or ifnsys" "or iftrue" "or ifntrue"
+
+ "autoload" "build-cache" "build-check" "enddef" "export define"
+ "global" "global build-cache" "global build-check" "global define"
+ "global signature" "global override signature" "load-makefile"
+ "make" "makeperl" "makesub" "no-implicit-load" "perl" "perl-begin"
+ "perl-end" "prebuild" "override export" "override global" "register-parser"
+ "register-command-parser" "register-input-suffix"
+ "register-scanner" "repository" "runtime" "signature" "sub"
+
+ ,@(nthcdr 2 makefile-gmake-statements))
"List of keywords understood by gmake.")
(defconst makefile-bsdmake-statements
@@ -372,7 +379,12 @@ not be enclosed in { } or ( )."
;; Fontify conditionals and includes.
(,(concat "^\\(?: [ \t]*\\)?"
- (regexp-opt keywords t)
+ (replace-regexp-in-string
+ " " "[ \t]+"
+ (if (eq (car keywords) t)
+ (replace-regexp-in-string "-" "[_-]"
+ (regexp-opt (cdr keywords) t))
+ (regexp-opt keywords t)))
"\\>[ \t]*\\([^: \t\n#]*\\)")
(1 font-lock-keyword-face) (2 font-lock-variable-name-face))
@@ -436,7 +448,7 @@ not be enclosed in { } or ( )."
makefile-var-use-regex
makefile-makepp-statements
nil
- "^\\(?: [ \t]*\\)?\\(?:and[ \t]+\\|else[ \t]+\\|or[ \t]+\\)?if\\(n\\)\\(?:def\\|eq\\|sys\\)\\>"
+ "^\\(?: [ \t]*\\)?\\(?:and[ \t]+\\|else[ \t]+\\|or[ \t]+\\)?if\\(n\\)\\(?:def\\|eq\\|sys\\|true\\)\\>"
'("[^$]\\(\\$[({]\\(?:output\\|stem\\|target\\)s?\\_>.*?[})]\\)"
1 'makefile-targets append)
@@ -447,17 +459,17 @@ not be enclosed in { } or ( )."
(2 font-lock-keyword-face t)
(3 font-lock-variable-name-face t))
- ;; $(function ...) $((function ...)) ${function ...} ${{function ...}}
- '("[^$]\\$\\(?:((?\\|{{?\\)\\([-a-zA-Z0-9_.]+\\s \\)"
+ ;; $(function ...) $((function ...)) ${...} ${{...}} $[...] $[[...]]
+ '("[^$]\\$\\(?:((?\\|{{?\\|\\[\\[?\\)\\([-a-zA-Z0-9_.]+\\s \\)"
1 font-lock-function-name-face prepend)
- ;; $(shell ...) $((shell ...)) ${shell ...} ${{shell ...}}
- '("[^$]\\$\\(((?\\|{{?\\)shell\\(?:[-_]\\(?:global[-_]\\)?once\\)?[ \t]+"
+ ;; $(shell ...) $((shell ...)) ${...} ${{...}} $[...] $[[...]]
+ '("[^$]\\$\\(((?\\|{{?\\|\\[\\[?\\)shell\\(?:[-_]\\(?:global[-_]\\)?once\\)?[ \t]+"
makefile-match-function-end nil nil
(1 'makefile-shell prepend t))
- ;; $(perl ...) $((perl ...)) ${perl ...} ${{perl ...}}
- '("[^$]\\$\\(((?\\|{{?\\)makeperl[ \t]+"
+ ;; $(perl ...) $((perl ...)) ${...} ${{...}} $[...] $[[...]]
+ '("[^$]\\$\\(((?\\|{{?\\|\\[\\[?\\)makeperl[ \t]+"
makefile-match-function-end nil nil
(1 'makefile-makepp-perl prepend t))
'("[^$]\\$\\(((?\\|{{?\\)perl[ \t]+"
@@ -1688,8 +1700,10 @@ The anchor must have matched the opening parens in the first group."
;; FIXME forward-sexp or somesuch would be better?
(if (setq s (cond ((string= s "(") ")")
((string= s "{") "}")
+ ((string= s "[") "]")
((string= s "((") "))")
- ((string= s "{{") "}}")))
+ ((string= s "{{") "}}")
+ ((string= s "[[") "]]")))
(re-search-forward (concat "\\(.*\\)[ \t]*" s) (line-end-position) t))))
(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."
(if (looking-at "[ \t]+$")
(skip-chars-forward " \t"))))
+(defvar ind) ;Used via `eval' in pascal-indent-alist.
(defun pascal-indent-line ()
"Indent current line as a Pascal statement."
(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 @@
;; o Introduced three new customizable variables: electric colon
;; (`prolog-electric-colon-flag', default nil), electric dash
;; (`prolog-electric-dash-flag', default nil), and a possibility
-;; to prevent the predicate template insertion from adding commata
+;; to prevent the predicate template insertion from adding commas
;; (`prolog-electric-dot-full-predicate-template', defaults to t
-;; since it seems quicker to me to just type those commata). A
+;; since it seems quicker to me to just type those commas). A
;; trivial adaptation of a patch by Markus Triska.
;; o Improved the behavior of electric if-then-else to only skip
;; forward if the parenthesis/semicolon is preceded by
@@ -512,7 +512,7 @@ It does not apply in strings and comments."
(defcustom prolog-electric-dot-full-predicate-template nil
"*If nil, electric dot inserts only the current predicate's name and `('
for recursive calls or new clause heads. Non-nil means to also
-insert enough commata to cover the predicate's arity and `)',
+insert enough commas to cover the predicate's arity and `)',
and dot and newline for recursive calls."
:group 'prolog-keyboard
: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."
;;;; Bicycle Repair Man support
(autoload 'pymacs-load "pymacs" nil t)
-(autoload 'brm-init "bikemacs")
+(autoload 'brm-init "bikeemacs")
(defvar brm-menu)
;; 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
"^\\(.+\\) (hex ..)$"
"SET \\1")
- ;; FEDDBACK ON for 99 or more rows
+ ;; FEEDBACK ON for 99 or more rows
;; feedback OFF
(sql-redirect-value
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:
"icompare" "insert" "inst_get_at_least" "inst_get_auto_bin_max"
"inst_get_collect" "inst_get_cov_weight" "inst_get_coverage_goal"
"inst_getcross_bin_max" "inst_query" "inst_set_at_least"
- "inst_set_auto_bin_max" "inst_set_bin_activiation" "inst_set_collect"
+ "inst_set_auto_bin_max" "inst_set_bin_activation" "inst_set_collect"
"inst_set_cov_weight" "inst_set_coverage_goal" "inst_set_cross_bin_max"
"itoa"
"last" "last_index" "len" "load"
@@ -438,7 +438,7 @@ Key bindings:
"push_front" "putc"
"query" "query_str"
"rand_mode" "randomize" "reserve" "reverse" "rsort"
- "search" "set_at_least" "set_auto_bin_max" "set_bin_activiation"
+ "search" "set_at_least" "set_auto_bin_max" "set_bin_activation"
"set_cov_weight" "set_coverage_goal" "set_cross_bin_max" "set_name" "size"
"sort" "substr" "sum"
"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."
"*If true, AUTORESET will reset those signals which were
assigned with blocking assignments (=) even in a block with
non-blocking assignments (<=).
-
+
If nil, all blocking assigned signals are ignored when any
non-blocking assignment is in the AUTORESET block. This allows
blocking assignments to be used for temporary values and not have
@@ -2011,7 +2011,7 @@ find the errors."
"`uvm_component_utils"
"`uvm_create"
"`uvm_create_on"
- "`uvm_create_seq" ;; Undocumented in 1.1
+ "`uvm_create_seq" ;; Undocumented in 1.1
"`uvm_declare_p_sequencer"
"`uvm_declare_sequence_lib" ;; Deprecated in 1.1
"`uvm_do"
@@ -7505,7 +7505,7 @@ Signals must be in standard (base vector) form."
(nreverse out-list)))
(defun verilog-signals-combine-bus (in-list)
- "Return a list of signals in IN-LIST, with busses combined.
+ "Return a list of signals in IN-LIST, with buses combined.
Duplicate signals are also removed. For example A[2] and A[1] become A[2:1]."
(let (combo buswarn
out-list
@@ -9907,7 +9907,7 @@ If optional WHITESPACE true, ignore whitespace."
(p2 (with-current-buffer b2 (goto-char (point-min))))
(maxp1 (with-current-buffer b1 (point-max)))
(maxp2 (with-current-buffer b2 (point-max)))
- (op1 -1) (op2 -1)
+ (op1 -1) (op2 -1)
progress size)
(while (not (and (eq p1 op1) (eq p2 op2)))
;; If both windows have whitespace optionally skip over it.
@@ -10100,7 +10100,7 @@ instantiating the resulting module. Long lines are split based
on the `fill-column', see \\[set-fill-column].
Limitations:
- Concatenation and outputting partial busses is not supported.
+ Concatenation and outputting partial buses is not supported.
Typedefs must match `verilog-typedef-regexp', which is disabled by default.
@@ -10932,7 +10932,7 @@ Typing \\[verilog-auto] will make this into:
(defun verilog-auto-logic ()
"Expand AUTOLOGIC statements, as part of \\[verilog-auto].
Make wire statements using the SystemVerilog logic keyword.
-This is currently equivelent to:
+This is currently equivalent to:
/*AUTOWIRE*/
@@ -10958,7 +10958,7 @@ the datatype of the declarations.
Limitations:
This ONLY detects outputs of AUTOINSTants (see `verilog-read-sub-decls'),
- and all busses must have widths, such as those from AUTOINST, or using []
+ and all buses must have widths, such as those from AUTOINST, or using []
in AUTO_TEMPLATEs.
This does NOT work on memories or SystemVerilog .name connections,
@@ -11315,7 +11315,7 @@ Limitations:
If placed inside the parenthesis of a module declaration, it creates
Verilog 2001 style, else uses Verilog 1995 style.
- Concatenation and outputting partial busses is not supported.
+ Concatenation and outputting partial buses is not supported.
Module names must be resolvable to filenames. See `verilog-auto-inst'.
@@ -11439,7 +11439,7 @@ Limitations:
If placed inside the parenthesis of a module declaration, it creates
Verilog 2001 style, else uses Verilog 1995 style.
- Concatenation and outputting partial busses is not supported.
+ Concatenation and outputting partial buses is not supported.
Module names must be resolvable to filenames. See `verilog-auto-inst'.
@@ -11490,7 +11490,7 @@ Limitations:
If placed inside the parenthesis of a module declaration, it creates
Verilog 2001 style, else uses Verilog 1995 style.
- Concatenation and outputting partial busses is not supported.
+ Concatenation and outputting partial buses is not supported.
Module names must be resolvable to filenames. See `verilog-auto-inst'.
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)."
(defgroup vhdl-menu nil
- "Customizations for menues."
+ "Customizations for menus."
:group 'vhdl)
(defcustom vhdl-index-menu nil
@@ -1844,7 +1844,7 @@ NOTE: Activate the new setting in a VHDL buffer by using the menu entry
;; Internal variables
(defvar vhdl-menu-max-size 20
- "*Specifies the maximum size of a menu before splitting it into submenues.")
+ "*Specifies the maximum size of a menu before splitting it into submenus.")
(defvar vhdl-progress-interval 1
"*Interval used to update progress status during long operations.
@@ -2468,7 +2468,7 @@ conversion."
(goto-char marker))
(defun vhdl-menu-split (list title)
- "Split menu LIST into several submenues, if number of
+ "Split menu LIST into several submenus, if number of
elements > `vhdl-menu-max-size'."
(if (> (length list) vhdl-menu-max-size)
(let ((remain list)
@@ -4266,7 +4266,7 @@ Usage:
CODE BEAUTIFICATION:
`C-c M-b' and `C-c C-b' beautify the code of a region or of the entire
- buffer respectively. This inludes indentation, alignment, and case
+ buffer respectively. This includes indentation, alignment, and case
fixing. Code beautification can also be run non-interactively using the
command:
@@ -10812,7 +10812,7 @@ but not if inside a comment or quote."
(defvar vhdl-port-list nil
"Variable to hold last port map parsed.")
-;; structure: (parenthesised expression means list of such entries)
+;; structure: (parenthesized expression means list of such entries)
;; (ent-name
;; ((generic-names) generic-type generic-init generic-comment group-comment)
;; ((port-names) port-object port-direct port-type port-comment group-comment)
@@ -11660,7 +11660,7 @@ reflected in a subsequent paste operation."
(defvar vhdl-subprog-list nil
"Variable to hold last subprogram interface parsed.")
-;; structure: (parenthesised expression means list of such entries)
+;; structure: (parenthesized expression means list of such entries)
;; (subprog-name kind
;; ((names) object direct type init comment group-comment)
;; return-type return-comment group-comment)
@@ -12971,7 +12971,7 @@ This does background highlighting of translate-off regions.")
(defvar vhdl-entity-alist nil
"Cache with entities and corresponding architectures for each
project/directory.")
-;; structure: (parenthesised expression means list of such entries)
+;; structure: (parenthesized expression means list of such entries)
;; (cache-key
;; (ent-key ent-name ent-file ent-line
;; (arch-key arch-name arch-file arch-line
@@ -12982,7 +12982,7 @@ project/directory.")
(defvar vhdl-config-alist nil
"Cache with configurations for each project/directory.")
-;; structure: (parenthesised expression means list of such entries)
+;; structure: (parenthesized expression means list of such entries)
;; (cache-key
;; (conf-key conf-name conf-file conf-line ent-key arch-key
;; (inst-key inst-comp-name inst-ent-key inst-arch-key
@@ -12991,7 +12991,7 @@ project/directory.")
(defvar vhdl-package-alist nil
"Cache with packages for each project/directory.")
-;; structure: (parenthesised expression means list of such entries)
+;; structure: (parenthesized expression means list of such entries)
;; (cache-key
;; (pack-key pack-name pack-file pack-line
;; (comp-key comp-name comp-file comp-line)
@@ -13003,19 +13003,19 @@ project/directory.")
(defvar vhdl-ent-inst-alist nil
"Cache with instantiated entities for each project/directory.")
-;; structure: (parenthesised expression means list of such entries)
+;; structure: (parenthesized expression means list of such entries)
;; (cache-key (inst-ent-key))
(defvar vhdl-file-alist nil
"Cache with design units in each file for each project/directory.")
-;; structure: (parenthesised expression means list of such entries)
+;; structure: (parenthesized expression means list of such entries)
;; (cache-key
;; (file-name (ent-list) (arch-list) (arch-ent-list) (conf-list)
;; (pack-list) (pack-body-list) (inst-list) (inst-ent-list))
(defvar vhdl-directory-alist nil
"Cache with source directories for each project.")
-;; structure: (parenthesised expression means list of such entries)
+;; structure: (parenthesized expression means list of such entries)
;; (cache-key (directory))
(defvar vhdl-speedbar-shown-unit-alist nil
@@ -13655,7 +13655,7 @@ of PROJECT."
(vhdl-speedbar-update-current-unit)
(when updated (message "Updating hierarchy...done")))))
-;; structure (parenthesised expression means list of such entries)
+;; structure (parenthesized expression means list of such entries)
;; (inst-key inst-file-marker comp-ent-key comp-ent-file-marker
;; comp-arch-key comp-arch-file-marker comp-conf-key comp-conf-file-marker
;; 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."
(list ps-mule-bitmap-prologue)))
(defun ps-mule-generate-bitmap-font (font-spec size relative-compose
- baselie-offset bbx)
+ baseline-offset bbx)
(let* ((id (ps-mule-font-spec-id font-spec))
(bytes (ps-mule-font-spec-bytes font-spec))
output-list)
@@ -941,7 +941,7 @@ the sequence."
(list (format "/E%02X [ 0 1 255 {pop /.notdef} for ] def\n" id)
(format "%%%% %s\n" (ps-mule-font-spec-name font-spec))
(format "/F%02X %f %S %d E%02X NBF\n" id size
- relative-compose baselie-offset id)))
+ relative-compose baseline-offset id)))
(setq output-list
(list (list (format "/E%02X [ 0 1 255 { pop 0 } for ] def\n" id))
(list (format "/V%02X [" id))
@@ -950,7 +950,7 @@ the sequence."
(format "/F%02X E%02X V%02X NPF\n" id id id))))
(aset ps-mule-bitmap-font-record id
(vector (= bytes 1) output-list
- size relative-compose baselie-offset bbx))
+ size relative-compose baseline-offset bbx))
(if ps-mule-bitmap-dict-list
output-list
(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."
;; But autoload them here to make the separation invisible.
;;;### (autoloads (ps-mule-end-job ps-mule-begin-job ps-mule-initialize
-;;;;;; ps-multibyte-buffer) "ps-mule" "ps-mule.el" "98fcbceecff2ac603ba35672b99b5278")
+;;;;;; ps-multibyte-buffer) "ps-mule" "ps-mule.el" "01641c7c3af4e45e1c3afeb75a73120c")
;;; Generated autoloads from ps-mule.el
(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).")
(let ((inv (overlay-get ol 'invisible)) open)
(when (and inv
;; There's an `invisible' property. Make sure it's
- ;; actually invisible, and ellipsised.
+ ;; actually invisible, and ellipsized.
(and (consp buffer-invisibility-spec)
(cdr (assq inv buffer-invisibility-spec)))
(or (setq open
@@ -189,12 +189,12 @@ Each element has the form (WINDOW . OVERLAY).")
;;;###autoload
(define-minor-mode reveal-mode
- "Toggle decloaking of invisible text near point (Reveal mode).
+ "Toggle uncloaking of invisible text near point (Reveal mode).
With a prefix argument ARG, enable Reveal mode if ARG is
positive, and disable it otherwise. If called from Lisp, enable
Reveal mode if ARG is omitted or nil.
-Reveral mode is a buffer-local minor mode. When enabled, it
+Reveal mode is a buffer-local minor mode. When enabled, it
reveals invisible text around point."
:group 'reveal
: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'."
(setq server-clients (delq proc server-clients))
- ;; Delete the client's tty.
- (let ((terminal (process-get proc 'terminal)))
- ;; Only delete the terminal if it is non-nil.
- (when (and terminal (eq (terminal-live-p terminal) t))
- (delete-terminal terminal)))
+ ;; Delete the client's tty, except on Windows (both GUI and console),
+ ;; where there's only one terminal and does not make sense to delete it.
+ (unless (eq system-type 'windows-nt)
+ (let ((terminal (process-get proc 'terminal)))
+ ;; Only delete the terminal if it is non-nil.
+ (when (and terminal (eq (terminal-live-p terminal) t))
+ (delete-terminal terminal))))
;; Delete the client's process.
(if (eq (process-status proc) 'open)
@@ -1035,7 +1037,11 @@ The following commands are accepted by the client:
(setq tty-name (pop args-left)
tty-type (pop args-left)
dontkill (or dontkill
- (not use-current-frame))))
+ (not use-current-frame)))
+ ;; On Windows, emacsclient always asks for a tty frame.
+ ;; If running a GUI server, force the frame type to GUI.
+ (when (eq window-system 'w32)
+ (push "-window-system" args-left)))
;; -position LINE[:COLUMN]: Set point to the given
;; 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.")
(defvar ses-call-printer-return nil
"Set to t if last cell printer invoked by `ses-call-printer' requested
-left-justification of the result. Set to error-signal if ses-call-printer
+left-justification of the result. Set to error-signal if `ses-call-printer'
encountered an error during printing. Otherwise nil.")
(defvar ses-start-time nil
@@ -394,7 +394,7 @@ functions refer to its value."
val)))))
(defmacro ses-cell-property-get (property-name row &optional col)
- "Get property named PROPERTY-NAME From a CELL or a pair (ROW,COL).
+ "Get property named PROPERTY-NAME from a CELL or a pair (ROW,COL).
When COL is omitted, CELL=ROW is a cell object. When COL is
present ROW and COL are the integer coordinates of the cell of
@@ -490,8 +490,8 @@ PROPERTY-NAME."
`(aref ses--col-printers ,col))
(defmacro ses-sym-rowcol (sym)
- "From a cell-symbol SYM, gets the cons (row . col). A1 => (0 . 0). Result
-is nil if SYM is not a symbol that names a cell."
+ "From a cell-symbol SYM, gets the cons (row . col). A1 => (0 . 0).
+Result is nil if SYM is not a symbol that names a cell."
`(and (symbolp ,sym) (get ,sym 'ses-cell)))
(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."
(delete-region pos (point))))
(defun ses-printer-validate (printer)
- "Signals an error if PRINTER is not a valid SES cell printer."
+ "Signal an error if PRINTER is not a valid SES cell printer."
(or (not printer)
(stringp printer)
(functionp printer)
@@ -642,7 +642,7 @@ checking that it is a valid printer function."
(add-to-list 'ses-read-printer-history (prin1-to-string printer))))
(defun ses-formula-record (formula)
- "If FORMULA is of the form 'symbol, adds it to the list of symbolic formulas
+ "If FORMULA is of the form 'symbol, add it to the list of symbolic formulas
for this spreadsheet."
(when (and (eq (car-safe formula) 'quote)
(symbolp (cadr formula)))
@@ -691,7 +691,7 @@ for this spreadsheet."
buffer-undo-list))
(defun ses-reset-header-string ()
- "Flags the header string for update. Upon undo, the header string will be
+ "Flag the header string for update. Upon undo, the header string will be
updated again."
(push '(apply ses-reset-header-string) buffer-undo-list)
(setq ses--header-hscroll -1))
@@ -727,7 +727,7 @@ cell (ROW,COL). This is undoable. The cell's data will be updated through
nil) ; Make coverage-tester happy.
(defun ses-cell-set-formula (row col formula)
- "Store a new formula for (ROW . COL) and enqueues the cell for
+ "Store a new formula for (ROW . COL) and enqueue the cell for
recalculation via `post-command-hook'. Updates the reference lists for the
cells that this cell refers to. Does not update cell value or reprint the
cell. To avoid inconsistencies, this function is not interruptible, which
@@ -812,9 +812,9 @@ means Emacs will crash if FORMULA contains a circular list."
errors)))))
(if errors
(warn "----------------------------------------------------------------
-Some reference where corrupted.
+Some references were corrupted.
-The following is a list of where each element ELT is such
+The following is a list where each element ELT is such
that (car ELT) is the reference of cell CELL with corruption,
and (cdr ELT) is a property list where
@@ -922,8 +922,7 @@ the old and FORCE is nil."
(ses-cell-set-formula row col nil))
(defcustom ses-self-reference-early-detection nil
- "True if cycle detection is early for cells that refer to
-themselves."
+ "True if cycle detection is early for cells that refer to themselves."
:type 'boolean
:group 'ses)
@@ -989,7 +988,7 @@ if the cell's value is unchanged and FORCE is nil."
;;----------------------------------------------------------------------------
(defun ses-in-print-area ()
- "Returns t if point is in print area of spreadsheet."
+ "Return t if point is in print area of spreadsheet."
(<= (point) ses--data-marker))
;; 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."
(forward-char))))
(defun ses-set-curcell ()
- "Sets `ses--curcell' to the current cell symbol, or a cons (BEG,END) for a
+ "Set `ses--curcell' to the current cell symbol, or a cons (BEG,END) for a
region, or nil if cursor is not at a cell."
(if (or (not mark-active)
deactivate-mark
@@ -1030,10 +1029,10 @@ region, or nil if cursor is not at a cell."
nil)
(defun ses-check-curcell (&rest args)
- "Signal an error if ses--curcell is inappropriate. The end marker is
-appropriate if some argument is 'end. A range is appropriate if some
-argument is 'range. A single cell is appropriate unless some argument is
-'needrange."
+ "Signal an error if `ses--curcell' is inappropriate.
+The end marker is appropriate if some argument is 'end.
+A range is appropriate if some argument is 'range.
+A single cell is appropriate unless some argument is 'needrange."
(if (eq ses--curcell t)
;; curcell recalculation was postponed, but user typed ahead.
(ses-set-curcell))
@@ -1168,7 +1167,7 @@ preceding cell has spilled over."
sig)))
(defun ses-call-printer (printer &optional value)
- "Invokes PRINTER (a string or parenthesized string or function-symbol or
+ "Invoke PRINTER (a string or parenthesized string or function-symbol or
lambda of one argument) on VALUE. Result is the printed cell as a string.
The variable `ses-call-printer-return' is set to t if the printer used
parenthesis 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."
(defun ses-adjust-print-width (col change)
"Insert CHANGE spaces in front of column COL, or at end of line if
COL=NUMCOLS. Deletes characters if CHANGE < 0. Caller should bind
-inhibit-quit to t."
+`inhibit-quit' to t."
(let ((inhibit-read-only t)
(blank (if (> change 0) (make-string change ?\s)))
(at-end (= col ses--numcols)))
@@ -1219,9 +1218,9 @@ inhibit-quit to t."
(delete-char (- change))))))
(defun ses-print-cell-new-width (row col)
- "Same as ses-print-cell, except if the cell's value is *skip*, the preceding
-nonskipped cell is reprinted. This function is used when the width of
-cell (ROW,COL) has changed."
+ "Same as `ses-print-cell', except if the cell's value is *skip*,
+the preceding nonskipped cell is reprinted. This function is used
+when the width of cell (ROW,COL) has changed."
(if (not (eq (ses-cell-value row col) '*skip*))
(ses-print-cell row col)
;;Cell was skipped over - reprint previous
@@ -1344,7 +1343,7 @@ Newlines in the data are escaped."
;;----------------------------------------------------------------------------
(defun ses-formula-references (formula &optional result-so-far)
- "Produce a list of symbols for cells that this formula's value
+ "Produce a list of symbols for cells that this FORMULA's value
refers to. For recursive calls, RESULT-SO-FAR is the list being
constructed, or t to get a wrong-type-argument error when the
first reference is found."
@@ -1389,8 +1388,8 @@ by (ROWINCR,COLINCR)."
(defun ses-relocate-formula (formula startrow startcol rowincr colincr)
"Produce a copy of FORMULA where all symbols that refer to cells in row
-STARTROW or above and col STARTCOL or above are altered by adding ROWINCR
-and COLINCR. STARTROW and STARTCOL are 0-based. Example:
+STARTROW or above, and col STARTCOL or above, are altered by adding ROWINCR
+and COLINCR. STARTROW and STARTCOL are 0-based. Example:
(ses-relocate-formula '(+ A1 B2 D3) 1 2 1 -1)
=> (+ A1 B2 C4)
If ROWINCR or COLINCR is negative, references to cells being deleted are
@@ -1618,7 +1617,8 @@ to each symbol."
(makunbound sym)))
(defun ses-aset-with-undo (array idx newval)
- "Like aset, but undoable. Result is t if element has changed"
+ "Like `aset', but undoable.
+Result is t if element has changed."
(unless (equal (aref array idx) newval)
(push `(apply ses-aset-with-undo ,array ,idx
,(aref array idx)) buffer-undo-list)
@@ -1631,8 +1631,8 @@ to each symbol."
;;----------------------------------------------------------------------------
(defun ses-load ()
- "Parse the current buffer and sets up buffer-local variables. Does not
-execute cell formulas or print functions."
+ "Parse the current buffer and set up buffer-local variables.
+Does not execute cell formulas or print functions."
(widen)
;; Read our global parameters, which should be a 3-element list.
(goto-char (point-max))
@@ -2082,8 +2082,7 @@ to are recalculated first."
(ses-jump-safe startcell)))
(defun ses-truncate-cell ()
- "Reprint current cell, but without spillover into any following blank
-cells."
+ "Reprint current cell, but without spillover into any following blank cells."
(interactive "*")
(ses-check-curcell)
(let* ((rowcol (ses-sym-rowcol ses--curcell))
@@ -2273,7 +2272,7 @@ cells."
(defun ses-read-printer (prompt default)
"Common code for `ses-read-cell-printer', `ses-read-column-printer', and `ses-read-default-printer'.
-PROMPT should end with \": \". Result is t if operation was cancelled."
+PROMPT should end with \": \". Result is t if operation was canceled."
(barf-if-buffer-read-only)
(if (eq default t)
(setq default "")
@@ -2331,8 +2330,8 @@ right-justified) or a list of one string (will be left-justified)."
(ses-print-cell row col))))
(defun ses-read-column-printer (col newval)
- "Set the printer function for the current column. See
-`ses-read-cell-printer' for input forms."
+ "Set the printer function for the current column.
+See `ses-read-cell-printer' for input forms."
(interactive
(let ((col (cdr (ses-sym-rowcol ses--curcell))))
(ses-check-curcell)
@@ -2348,8 +2347,8 @@ right-justified) or a list of one string (will be left-justified)."
(ses-print-cell row col)))))
(defun ses-read-default-printer (newval)
- "Set the default printer function for cells that have no other. See
-`ses-read-cell-printer' for input forms."
+ "Set the default printer function for cells that have no other.
+See `ses-read-cell-printer' for input forms."
(interactive
(list (ses-read-printer "Default printer: " ses--default-printer)))
(unless (eq newval t)
@@ -2363,8 +2362,8 @@ right-justified) or a list of one string (will be left-justified)."
;;----------------------------------------------------------------------------
(defun ses-insert-row (count)
- "Insert a new row before the current one. With prefix, insert COUNT rows
-before current one."
+ "Insert a new row before the current one.
+With prefix, insert COUNT rows before current one."
(interactive "*p")
(ses-check-curcell 'end)
(or (> count 0) (signal 'args-out-of-range nil))
@@ -2416,8 +2415,8 @@ before current one."
(ses-goto-print (1- ses--numrows) 0)))
(defun ses-delete-row (count)
- "Delete the current row. With prefix, Deletes COUNT rows starting from the
-current one."
+ "Delete the current row.
+With prefix, deletes COUNT rows starting from the current one."
(interactive "*p")
(ses-check-curcell)
(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
(ses-jump-safe ses--curcell))
(defun ses-delete-column (count)
- "Delete the current column. With prefix, Deletes COUNT columns starting
-from the current one."
+ "Delete the current column.
+With prefix, deletes COUNT columns starting from the current one."
(interactive "*p")
(ses-check-curcell)
(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."
(forward-char)))
(defun ses-append-row-jump-first-column ()
- "Insert a new row after current one and jumps to its first column."
+ "Insert a new row after current one and jump to its first column."
(interactive "*")
(ses-check-curcell)
(ses-begin-change)
@@ -2687,8 +2686,8 @@ the corresponding data cell."
line)
(defun ses-kill-override (beg end)
- "Generic override for any commands that kill text. We clear the killed
-cells instead of deleting them."
+ "Generic override for any commands that kill text.
+We clear the killed cells instead of deleting them."
(interactive "r")
(ses-check-curcell 'needrange)
;; For some reason, the text-read-only error is not caught by `delete-region',
@@ -2749,9 +2748,9 @@ as symbols."
(defun ses-yank-pop (arg)
"Replace just-yanked stretch of killed text with a different stretch.
-This command is allowed only immediately after a `yank' or a `yank-pop', when
-the region contains a stretch of reinserted previously-killed text. We
-replace it with a different stretch of killed text.
+This command is allowed only immediately after a `yank' or a `yank-pop',
+when the region contains a stretch of reinserted previously-killed text.
+We replace it with a different stretch of killed text.
Unlike standard `yank-pop', this function uses `undo' to delete the
previous insertion."
(interactive "*p")
@@ -2765,7 +2764,7 @@ previous insertion."
(setq this-command 'yank))
(defun ses-yank-cells (text arg)
- "If the TEXT has a proper set of 'ses attributes, inserts the text as
+ "If the TEXT has a proper set of 'ses attributes, insert the text as
cells, else return nil. The cells are reprinted--the supplied text is
ignored because the column widths, default printer, etc. at yank time might
be 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."
(ses-cell-set-formula row col val))))
(defun ses-yank-tsf (text arg)
- "If TEXT contains tabs and/or newlines, treats the tabs as
-column-separators and the newlines as row-separators and inserts the text as
+ "If TEXT contains tabs and/or newlines, treat the tabs as
+column-separators and the newlines as row-separators and insert the text as
cell formulas--else return nil. Treat plain symbols as strings unless ARG
is a list. Ignore a final newline."
(if (or (not (string-match "[\t\n]" text))
@@ -2887,8 +2886,8 @@ is a list. Ignore a final newline."
t)))
(defun ses-yank-resize (needrows needcols)
- "If this yank will require inserting rows and/or columns, asks for
-confirmation and then inserts them. Result is (row,col) for top left of yank
+ "If this yank will require inserting rows and/or columns, ask for
+confirmation and then insert them. Result is (row,col) for top left of yank
spot, or error signal if user requests cancel."
(ses-begin-change)
(let ((rowcol (if ses--curcell
@@ -2931,9 +2930,9 @@ newlines between rows. Result is placed in kill ring."
(ses-export-tab t))
(defun ses-export-tab (want-formulas)
- "Export the current range with tabs between columns and newlines between
-rows. Result is placed in kill ring. The export is values unless
-WANT-FORMULAS is non-nil. Newlines and tabs in the export text are escaped."
+ "Export the current range with tabs between columns and newlines between rows.
+Result is placed in kill ring. The export is values unless WANT-FORMULAS
+is non-nil. Newlines and tabs in the export text are escaped."
(ses-check-curcell 'needrange)
(let ((print-escape-newlines t)
result item)
@@ -2992,7 +2991,7 @@ The top row is row 1. Selecting row 0 displays the default header row."
(ses-reset-header-string))
(defun ses-mark-row ()
- "Marks the entirety of current row as a range."
+ "Mark the entirety of current row as a range."
(interactive)
(ses-check-curcell 'range)
(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."
(ses-goto-print row 0)))
(defun ses-mark-column ()
- "Marks the entirety of current column as a range."
+ "Mark the entirety of current column as a range."
(interactive)
(ses-check-curcell 'range)
(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."
(ses-goto-print row col)))))
(defun ses-renarrow-buffer ()
- "Narrow the buffer so only the print area is visible. Use after \\[widen]."
+ "Narrow the buffer so only the print area is visible.
+Use after \\[widen]."
(interactive)
(setq ses--deferred-narrow t))
(defun ses-sort-column (sorter &optional reverse)
- "Sorts the range by a specified column. With prefix, sorts in
-REVERSE order."
+ "Sort the range by a specified column.
+With prefix, sorts in REVERSE order."
(interactive "*sSort column: \nP")
(ses-check-curcell 'needrange)
(let ((min (ses-sym-rowcol (car ses--curcell)))
@@ -3103,7 +3103,7 @@ REVERSE order."
(ses-sort-column (ses-column-letter col) reverse))))
(defun ses-insert-range ()
- "Inserts into minibuffer the list of cells currently highlighted in the
+ "Insert into minibuffer the list of cells currently highlighted in the
spreadsheet."
(interactive "*")
(let (x)
@@ -3115,7 +3115,7 @@ spreadsheet."
(insert (substring (prin1-to-string (nreverse x)) 1 -1))))
(defun ses-insert-ses-range ()
- "Inserts \"(ses-range x y)\" in the minibuffer to represent the currently
+ "Insert \"(ses-range x y)\" in the minibuffer to represent the currently
highlighted range in the spreadsheet."
(interactive "*")
(let (x)
@@ -3145,7 +3145,7 @@ highlighted range in the spreadsheet."
;;----------------------------------------------------------------------------
(defun ses-safe-printer (printer)
- "Returns PRINTER if safe, or the substitute printer `ses-unsafe' otherwise."
+ "Return PRINTER if safe, or the substitute printer `ses-unsafe' otherwise."
(if (or (stringp printer)
(stringp (car-safe printer))
(not printer)
@@ -3154,16 +3154,16 @@ highlighted range in the spreadsheet."
'ses-unsafe))
(defun ses-safe-formula (formula)
- "Returns FORMULA if safe, or the substitute formula *unsafe* otherwise."
+ "Return FORMULA if safe, or the substitute formula *unsafe* otherwise."
(if (ses-warn-unsafe formula 'unsafep)
formula
`(ses-unsafe ',formula)))
(defun ses-warn-unsafe (formula checker)
- "Applies CHECKER to FORMULA. If result is non-nil, asks user for
-confirmation about FORMULA, which might be unsafe. Returns t if formula
-is safe or user allows execution anyway. Always returns t if
-`safe-functions' is t."
+ "Apply CHECKER to FORMULA.
+If result is non-nil, asks user for confirmation about FORMULA,
+which might be unsafe. Returns t if formula is safe or user allows
+execution anyway. Always returns t if `safe-functions' is t."
(if (eq safe-functions t)
t
(setq checker (funcall checker formula))
@@ -3178,13 +3178,13 @@ is safe or user allows execution anyway. Always returns t if
;;----------------------------------------------------------------------------
(defun ses--clean-! (&rest x)
- "Clean by delq list X from any occurrence of `nil' or `*skip*'."
+ "Clean by `delq' list X from any occurrence of `nil' or `*skip*'."
(delq nil (delq '*skip* x)))
(defun ses--clean-_ (x y)
"Clean list X by replacing by Y any occurrence of `nil' or `*skip*'.
-This will change X by making setcar on its cons cells."
+This will change X by making `setcar' on its cons cells."
(let ((ret x) ret-elt)
(while ret
(setq ret-elt (car ret))
@@ -3194,7 +3194,7 @@ This will change X by making setcar on its cons cells."
x)
(defmacro ses-range (from to &rest rest)
- "Expands to a list of cell-symbols for the range going from
+ "Expand to a list of cell-symbols for the range going from
FROM up to TO. The range automatically expands to include any
new row or column inserted into its middle. The SES library code
specifically 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
1 2 3 and 4.
Readout direction is specified by a `>v', '`>^', `<v', `<^',
-`v>', `v<', `^>', `^<' flag. For historical reasons, in absence
-of such a flag, a default direction of `^<' is assumed. This
+`v>', `v<', `^>', `^<' flag. For historical reasons, in absence
+of such a flag, a default direction of `^<' is assumed. This
way `(ses-range A1 B2 ^>)' will evaluate to `(1 3 2 4)',
while `(ses-range A1 B2 >^)' will evaluate to (3 4 1 2).
@@ -3221,18 +3221,18 @@ If the range is one column, then `v' can be used as a shorthand to
A `!' flag will remove all cells whose value is nil or `*skip*'.
A `_' flag will replace nil or `*skip*' by the value following
-the `_' flag. If the `_' flag is the last argument, then they are
+the `_' flag. If the `_' flag is the last argument, then they are
replaced by integer 0.
A `*', `*1' or `*2' flag will vectorize the range in the sense of
-Calc. See info node `(Calc) Top'. Flag `*' will output either a
+Calc. See info node `(Calc) Top'. Flag `*' will output either a
vector or a matrix depending on the number of rows, `*1' will
flatten the result to a one row vector, and `*2' will make a
matrix whatever the number of rows.
Warning: interaction with Calc is experimental and may produce
-confusing results if you are not aware of Calc data format. Use
-`math-format-value' as a printer for Calc objects."
+confusing results if you are not aware of Calc data format.
+Use `math-format-value' as a printer for Calc objects."
(let (result-row
result
(prev-row -1)
@@ -3319,10 +3319,10 @@ are ignored. Result is always floating-point, even if all args are integers."
(/ (float (apply '+ list)) (length list)))
(defmacro ses-select (fromrange test torange)
- "Select cells in FROMRANGE that are `equal' to TEST. For each match, return
-the corresponding cell from TORANGE. The ranges are macroexpanded but not
-evaluated so they should be either (ses-range BEG END) or (list ...). The
-TEST is evaluated."
+ "Select cells in FROMRANGE that are `equal' to TEST.
+For each match, return the corresponding cell from TORANGE.
+The ranges are macroexpanded but not evaluated so they should be
+either (ses-range BEG END) or (list ...). The TEST is evaluated."
(setq fromrange (cdr (macroexpand fromrange))
torange (cdr (macroexpand torange))
test (eval test))
@@ -3352,9 +3352,10 @@ TEST is evaluated."
(defvar col)
(defun ses-center (value &optional span fill)
- "Print VALUE, centered within column. FILL is the fill character for
-centering (default = space). SPAN indicates how many additional rightward
-columns to include in width (default = 0)."
+ "Print VALUE, centered within column.
+FILL is the fill character for centering (default = space).
+SPAN indicates how many additional rightward columns to include
+in width (default = 0)."
(let ((printer (or (ses-col-printer col) ses--default-printer))
(width (ses-col-width col))
half)
@@ -3373,8 +3374,8 @@ columns to include in width (default = 0)."
(defun ses-center-span (value &optional fill)
"Print VALUE, centered within the span that starts in the current column
-and continues until the next nonblank column. FILL specifies the fill
-character (default = space)."
+and continues until the next nonblank column.
+FILL specifies the fill character (default = space)."
(let ((end (1+ col)))
(while (and (< end ses--numcols)
(memq (ses-cell-value row end) '(nil *skip*)))
@@ -3382,8 +3383,8 @@ character (default = space)."
(ses-center value (- end col 1) fill)))
(defun ses-dashfill (value &optional span)
- "Print VALUE centered using dashes. SPAN indicates how many rightward
-columns to include in width (default = 0)."
+ "Print VALUE centered using dashes.
+SPAN indicates how many rightward columns to include in width (default = 0)."
(ses-center value span ?-))
(defun ses-dashfill-span (value)
@@ -3397,7 +3398,7 @@ current column and continues until the next nonblank column."
(ses-center-span value ?~))
(defun ses-unsafe (value)
- "Substitute for an unsafe formula or printer"
+ "Substitute for an unsafe formula or printer."
(error "Unsafe formula or printer"))
;;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 @@
;; This makes these modes easier to use.
;; For documentation on the functionality provided by comint mode, and
-;; the hooks available for customising it, see the file comint.el.
+;; the hooks available for customizing it, see the file comint.el.
;; For further information on shell mode, see the comments below.
;; 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
in *Help* buffer. See also the command `describe-char'."
(interactive "P")
(let* ((char (following-char))
- ;; If the character is one of LRE, LRO, RLE, RLO, it will
- ;; start a directional embedding, which could completely
- ;; disrupt the rest of the line (e.g., RLO will display the
- ;; rest of the line right-to-left). So we put an invisible
- ;; PDF character after these characters, to end the
- ;; embedding, which eliminates any effects on the rest of the
- ;; line.
- (pdf (if (memq char '(?\x202a ?\x202b ?\x202d ?\x202e))
- (propertize (string ?\x202c) 'invisible t)
- ""))
+ (bidi-fixer
+ (cond ((memq char '(?\x202a ?\x202b ?\x202d ?\x202e))
+ ;; If the character is one of LRE, LRO, RLE, RLO, it
+ ;; will start a directional embedding, which could
+ ;; completely disrupt the rest of the line (e.g., RLO
+ ;; will display the rest of the line right-to-left).
+ ;; So we put an invisible PDF character after these
+ ;; characters, to end the embedding, which eliminates
+ ;; any effects on the rest of the line.
+ (propertize (string ?\x202c) 'invisible t))
+ ;; Strong right-to-left characters cause reordering of
+ ;; the following numerical characters which show the
+ ;; codepoint, so append LRM to countermand that.
+ ((memq (get-char-code-property char 'bidi-class) '(R AL))
+ (propertize (string ?\x200e) 'invisible t))
+ (t
+ "")))
(beg (point-min))
(end (point-max))
(pos (point))
@@ -1125,14 +1132,15 @@ in *Help* buffer. See also the command `describe-char'."
(if (< char 256)
(single-key-description char)
(buffer-substring-no-properties (point) (1+ (point))))
- pdf encoding-msg pos total percent beg end col hscroll)
+ bidi-fixer
+ encoding-msg pos total percent beg end col hscroll)
(message "Char: %s%s %s point=%d of %d (%d%%) column=%d%s"
(if enable-multibyte-characters
(if (< char 128)
(single-key-description char)
(buffer-substring-no-properties (point) (1+ (point))))
(single-key-description char))
- pdf encoding-msg pos total percent col hscroll))))))
+ bidi-fixer encoding-msg pos total percent col hscroll))))))
;; Initialize read-expression-map. It is defined at C level.
(let ((m (make-sparse-keymap)))
@@ -1217,11 +1225,11 @@ this command arranges for all errors to enter the debugger."
(push (eval eval-expression-arg lexical-binding) values)
(let ((old-value (make-symbol "t")) new-value)
;; Bind debug-on-error to something unique so that we can
- ;; detect when evaled code changes it.
+ ;; detect when evalled code changes it.
(let ((debug-on-error old-value))
(push (eval eval-expression-arg lexical-binding) values)
(setq new-value debug-on-error))
- ;; If evaled code has changed the value of debug-on-error,
+ ;; If evalled code has changed the value of debug-on-error,
;; propagate that change to the global binding.
(unless (eq old-value new-value)
(setq debug-on-error new-value))))
@@ -1582,7 +1590,7 @@ by the new completion."
n)
;; next-matching-history-element always puts us at (point-min).
;; Move to the position we were at before changing the buffer contents.
- ;; This is still sensical, because the text before point has not changed.
+ ;; This is still sensible, because the text before point has not changed.
(goto-char point-at-start)))
(defun previous-complete-history-element (n)
@@ -2907,11 +2915,11 @@ These commands include \\[set-mark-command] and \\[start-kbd-macro]."
(defvar filter-buffer-substring-functions nil
"Wrapper hook around `filter-buffer-substring'.
-The functions on this special hook are called with 4 arguments:
+The functions on this special hook are called with four arguments:
NEXT-FUN BEG END DELETE
-NEXT-FUN is a function of 3 arguments (BEG END DELETE)
-that performs the default operation. The other 3 arguments are like
-the ones passed to `filter-buffer-substring'.")
+NEXT-FUN is a function of three arguments (BEG END DELETE)
+that performs the default operation. The other three arguments
+are like the ones passed to `filter-buffer-substring'.")
(defvar buffer-substring-filters nil
"List of filter functions for `filter-buffer-substring'.
@@ -4721,7 +4729,7 @@ To ignore intangibility, bind `inhibit-point-motion-hooks' to t."
(let ((line-move-visual nil))
(line-move (1- arg) t)))
- ;; Move to beginning-of-line, ignoring fields and invisibles.
+ ;; Move to beginning-of-line, ignoring fields and invisible text.
(skip-chars-backward "^\n")
(while (and (not (bobp)) (invisible-p (1- (point))))
(goto-char (previous-char-property-change (point)))
@@ -5704,7 +5712,7 @@ At top-level, as an editor command, this simply beeps."
(defvar buffer-quit-function nil
"Function to call to \"quit\" the current buffer, or nil if none.
\\[keyboard-escape-quit] calls this function when its more local actions
-\(such as cancelling a prefix argument, minibuffer or region) do not apply.")
+\(such as canceling a prefix argument, minibuffer or region) do not apply.")
(defun keyboard-escape-quit ()
"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.")
(defvar completion-list-insert-choice-function #'completion--replace
"Function to use to insert the text chosen in *Completions*.
-Called with 3 arguments (BEG END TEXT), it should replace the text
+Called with three arguments (BEG END TEXT), it should replace the text
between BEG and END with TEXT. Expected to be set buffer-locally
in the *Completions* buffer.")
@@ -6209,7 +6217,7 @@ BASE-POSITION, says where to insert the completion."
choice buffer base-position nil)
;; This remove-text-properties should be unnecessary since `choice'
;; comes from buffer-substring-no-properties.
- ;;(remove-text-properties 0 (lenth choice) '(mouse-face nil) choice)
+ ;;(remove-text-properties 0 (length choice) '(mouse-face nil) choice)
;; Insert the completion into the buffer where it was requested.
(funcall (or insert-function completion-list-insert-choice-function)
(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'.")
(append '(".[ch]\\(\\+\\+\\|pp\\|c\\|h\\|xx\\)?" ".tex\\(i\\(nfo\\)?\\)?"
".el" ".emacs" ".l" ".lsp" ".p" ".java" ".js" ".f\\(90\\|77\\|or\\)?")
(if speedbar-use-imenu-flag
- '(".ada" ".p[lm]" ".tcl" ".m" ".scm" ".pm" ".py" ".g"
+ '(".ad[abs]" ".p[lm]" ".tcl" ".m" ".scm" ".pm" ".py" ".g"
;; html is not supported by default, but an imenu tags package
;; is available. Also, html files are nice to be able to see.
".s?html"
@@ -1862,7 +1862,7 @@ of the special mode functions."
(if (not v)
(setq speedbar-special-mode-expansion-list t)
;; If it is autoloaded, we need to load it now so that
- ;; we have access to the varialbe -speedbar-menu-items.
+ ;; we have access to the variable -speedbar-menu-items.
;; Is this XEmacs safe?
(let ((sf (symbol-function v)))
(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 @@
;; --------------------------------------
;;
;; While the message passing and the colorization surely introduce some
-;; overhead this has became so small that IMHO is surely outweighted by
-;; the benefits you get but, as usual, YMMV
+;; overhead this has became so small that IMHO it is surely outweighed by
+;; the benefits you get but, as usual, YMMV.
;;
;; Important caveat, when deciding the cursor/'gray keys' keycodes I had to
;; 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.")
;;;; Pasteboard support.
-(declare-function ns-get-cut-buffer-internal "nsselect.m" (buffer))
+(declare-function ns-get-selection-internal "nsselect.m" (buffer))
+(declare-function ns-store-selection-internal "nsselect.m" (buffer string))
+
+(define-obsolete-function-alias 'ns-get-cut-buffer-internal
+ 'ns-get-selection-internal "24.1")
+(define-obsolete-function-alias 'ns-store-cut-buffer-internal
+ 'ns-store-selection-internal "24.1")
+
(defun ns-get-pasteboard ()
"Returns the value of the pasteboard."
- (ns-get-cut-buffer-internal 'CLIPBOARD))
-
-(declare-function ns-store-cut-buffer-internal "nsselect.m" (buffer string))
+ (ns-get-selection-internal 'CLIPBOARD))
(defun ns-set-pasteboard (string)
"Store STRING into the pasteboard of the Nextstep display server."
;; Check the data type of STRING.
(if (not (stringp string)) (error "Nonstring given to pasteboard"))
- (ns-store-cut-buffer-internal 'CLIPBOARD string))
+ (ns-store-selection-internal 'CLIPBOARD string))
;; We keep track of the last text selected here, so we can check the
;; 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.")
(defun ns-copy-including-secondary ()
(interactive)
(call-interactively 'kill-ring-save)
- (ns-store-cut-buffer-internal 'SECONDARY
- (buffer-substring (point) (mark t))))
+ (ns-store-selection-internal 'SECONDARY
+ (buffer-substring (point) (mark t))))
(defun ns-paste-secondary ()
(interactive)
- (insert (ns-get-cut-buffer-internal 'SECONDARY)))
+ (insert (ns-get-selection-internal 'SECONDARY)))
;;;; 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."
;; 216 non-gray colors first
(let ((r 0) (g 0) (b 0))
(while (> ncolors 24)
- ;; This and other formulae taken from 256colres.pl and
+ ;; This and other formulas taken from 256colres.pl and
;; 88colres.pl in the xterm distribution.
(tty-color-define (format "color-%d" (- 256 ncolors))
(- 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."
(defun emacs-session-save ()
"This function is called when the window system is shutting down.
-If this function returns non-nil, the window system shutdown is cancelled.
+If this function returns non-nil, the window system shutdown is canceled.
When a session manager tells Emacs that the window system is shutting
down, 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."
;; 216 non-gray colors first
(let ((r 0) (g 0) (b 0))
(while (> ncolors 24)
- ;; This and other formulae taken from 256colres.pl and
+ ;; This and other formulas taken from 256colres.pl and
;; 88colres.pl in the xterm distribution.
(tty-color-define (format "color-%d" (- 256 ncolors))
(- 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."
;; Implementation note: This really should honor the interval-fn entry
;; in the master table, `artist-mt', which would mean leaving a timer
;; that calls `draw-fn' every now and then. That timer would then have
-;; to be cancelled and reinstalled whenever the user moves the cursor.
+;; to be canceled and reinstalled whenever the user moves the cursor.
;; This could be done, but what if the user suddenly switches to another
;; drawing mode, or even kills the buffer! In the mouse case, it is much
;; simpler: when at the end of `artist-mouse-draw-continously', the
-;; user has released the button, so the timer will always be cancelled
+;; user has released the button, so the timer will always be canceled
;; at that point.
(defun artist-key-draw-continously (x y)
"Draw current continuous shape at X,Y."
@@ -4455,7 +4455,7 @@ If N is negative, move backward."
"Set current fill character to be C."
(interactive "cType fill char (type RET to turn off): ")
(cond ((eq c ?\r) (setq artist-fill-char-set nil)
- (message "Fill cancelled"))
+ (message "Fill canceled"))
(t (setq artist-fill-char-set t)
(setq artist-fill-char c)
(message "Fill set to \"%c\"" c))))
@@ -5589,7 +5589,7 @@ The event, EV, is the mouse event."
;; of drawing mode.
;;
;; You should provide these functions. You might think that
-;; only you is using your type of mode, so noone will be able
+;; only you is using your type of mode, so no one will be able
;; to switch to another operation of the same type of mode,
;; but someone else might base a new drawing mode upon your
;; 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."
(setq fill-prefix nil)))
(if fill-prefix
(message "fill-prefix: \"%s\"" fill-prefix)
- (message "fill-prefix cancelled")))
+ (message "fill-prefix canceled")))
(defcustom adaptive-fill-mode t
"Non-nil means determine a paragraph's fill prefix from its text."
@@ -383,7 +383,7 @@ and `fill-nobreak-invisible'."
"Char-table of characters that don't use space between words.")
(progn
- ;; Register `kinsoku' for scripts HAN, KANA, BOPOMPFO, and CJK-MISS.
+ ;; Register `kinsoku' for scripts HAN, KANA, BOPOMOFO, and CJK-MISC.
;; Also tell that they don't use space between words.
(map-char-table
#'(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."
;; hidden by new window, scroll it to just below new win
;; otherwise set top line of other win so it doesn't scroll.
(if (< oldot top) (setq top oldot))
- ;; if frame is unsplitable, temporarily disable that...
+ ;; if frame is unsplittable, temporarily disable that...
(if (cdr (assq 'unsplittable (frame-parameters (selected-frame))))
(let ((frame (selected-frame)))
(modify-frame-parameters frame '((unsplittable . nil)))
@@ -3979,7 +3979,7 @@ Both should not be used to define a buffer-local dictionary."
; LocalWords: AMStex hspace includeonly nocite epsfig displaymath eqnarray reg
; LocalWords: minipage modeline pers dict unhighlight buf grep sync prev inc
; LocalWords: fn oldot NB AIX msg init read's bufs pt cmd Quinlan eg
-; LocalWords: uuencoded unidiff sc nn VM SGML eval IspellPersDict unsplitable
+; LocalWords: uuencoded unidiff sc nn VM SGML eval IspellPersDict
; LocalWords: lns XEmacs HTML casechars Multibyte
;;; 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.
Entry to this mode calls the value of `picture-mode-hook' if non-nil.
Note that Picture mode commands will work outside of Picture mode, but
-they are not defaultly assigned to keys."
+they are not by default assigned to keys."
(interactive)
(if (eq major-mode 'picture-mode)
(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'."
(add-hook 'pre-command-hook 'reftex-highlight-shall-die)
(when (eq how 'tmp-window)
- ;; Resize window and arrange restauration
+ ;; Resize window and arrange restoration
(shrink-window (1- (- (window-height) 9)))
(recenter '(4))
(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."
(replace-match
(let ((style (if (boundp 'calendar-date-style)
calendar-date-style
- ;; Don't complain about obsoleteness.
+ ;; Don't complain about obsolescence.
(if (with-no-warnings european-calendar-style)
'european
'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 @@
(define-key map [(control ?=)] 'rst-adjust) ;; (Does not work on the Mac OSX.)
;; Display the hierarchy of decorations implied by the current document contents.
(define-key map [(control c) (control h)] 'rst-display-decorations-hierarchy)
- ;; Homogeneize the decorations in the document.
+ ;; Homogenize the decorations in the document.
(define-key map [(control c) (control s)] 'rst-straighten-decorations)
;; (define-key map [(control c) (control s)] 'rst-straighten-deco-spacing)
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 @@
;; Above code is well known ~/.emacs idiom for customizing a mode
;; specific keymap however it does not work for this package. This is
;; because there is no table mode in effect. This package does not
-;; use a local map therefor you must modify `table-cell-map'
+;; use a local map therefore you must modify `table-cell-map'
;; explicitly. The correct way of achieving above task is:
;;
;; (add-hook 'table-cell-map-hook
@@ -2155,7 +2155,7 @@ specified."
(defun table-shorten-cell (n)
"Shorten the current cell by N lines by shrinking the cell vertically.
Shortening is done by removing blank lines from the bottom of the cell
-and possibly from the top of the cell as well. Therefor, the cell
+and possibly from the top of the cell as well. Therefore, the cell
must have some bottom/top blank lines to be shorten effectively. This
is applicable to all the cells aligned horizontally with the current
one 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."
(car (table--get-coordinate (cdr (table--horizontal-cell-list nil t))))
(1+ (cdr (table--get-coordinate (cdr (table--vertical-cell-list nil t))))))))
-(defun table-call-interactively (function &optional recoard-flag keys)
+(defun table-call-interactively (function &optional record-flag keys)
"Call FUNCTION, or a table version of it if applicable.
See `call-interactively' for full description of the arguments."
(let ((table-func (intern-soft (format "*table--cell-%s" function))))
@@ -4301,7 +4301,7 @@ See `call-interactively' for full description of the arguments."
(if (and table-func
(table--point-in-cell-p))
table-func
- function) recoard-flag keys)))
+ function) record-flag keys)))
(defun table-funcall (function &rest arguments)
"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."
(table-entry-height 0)
;; unformatted row looks like: A1 @tab A2 @tab A3
;; extract-row command deletes the source line in the table.
- (unformated-row (texinfo-multitable-extract-row)))
+ (unformatted-row (texinfo-multitable-extract-row)))
;; Use a temporary buffer
(set-buffer (get-buffer-create texinfo-multitable-buffer-name))
(delete-region (point-min) (point-max))
- (insert unformated-row)
+ (insert unformatted-row)
(goto-char (point-min))
;; 1. Check for correct number of @tab in line.
(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 @@
;;; Commentary:
-;; Known bug: update commands fail to ignore @ignore.
+;; Known bug: update commands fail to ignore @ignore, and fail to DTRT
+;; with the @if... directives (so expect trouble when the manual uses
+;; different @node lines or @menu items in @iftex and in @ifnottex).
;; Summary: how to use the updating commands
@@ -37,6 +39,16 @@
;; With a prefix argument, the `texinfo-update-node' and
;; `texinfo-make-menu' functions do their jobs in the region.
;;
+;; Important note: We do NOT recommend use of these commands to update
+;; the `Next', `Previous' and `Up' pointers on @node lines. Most
+;; manuals, including those whose Texinfo files adhere to the strucure
+;; described below, don't need these pointers, because makeinfo will
+;; generate them automatically (see the node "makeinfo Pointer
+;; Creation" in the Texinfo manual). By contrast, due to known bugs
+;; described above, texinfo-update-node etc. could produce incorrect
+;; pointers, and thus make a perfectly valid Texinfo file into an
+;; invalid one. You _have_ been warned!
+;;
;; In brief, the functions for creating or updating nodes and menus, are:
;;
;; texinfo-update-node (&optional beginning end)
@@ -89,6 +101,16 @@
;; It does not matter whether the `@node' line has pre-existing
;; `Next', `Previous', or `Up' pointers in it. They are removed.
+;; Warning: Since the pre-existing pointers are replaced with the ones
+;; computed by `texinfo-update-node', and since this function has
+;; known bugs with the more advanced Texinfo features (see above), it
+;; could produce an invalid Texinfo file. You are well advised not to
+;; use this function, except if you know what you are doing and
+;; exercise extreme caution. Keep in mind that most manuals do not
+;; need the `Next', `Previous', and `Up' pointers to be present on the
+;; @node lines; makeinfo will automatically generate them when it
+;; produces the Info or HTML versions of the manual.
+
;; The `texinfo-every-node-update' function runs `texinfo-update-node'
;; on the whole buffer.
@@ -119,12 +141,15 @@
;; on the whole buffer.
;; The `texinfo-master-menu' function creates an extended menu located
-;; after the top node. (The file must have a top node.) The function
-;; first updates all the regular menus in the buffer (incorporating the
-;; descriptions from pre-existing menus), and then constructs a master
-;; menu that includes every entry from every other menu. (However, the
-;; function cannot update an already existing master menu; if one
-;; exists, it must be removed before calling the function.)
+;; after the top node. (The file must have a top node.) This
+;; function works only on Texinfo files all of whose menus are
+;; present in a single file; use `texinfo-multiple-files-update' for
+;; multi-file manuals. The function constructs a master menu that
+;; includes every entry from every other menu. Use this command to
+;; create or update the @detailmenu menu after you've created or
+;; updated all the menus in the file, including the menu in the Top
+;; node, using the `texinfo-make-menu' or the `texinfo-all-menus-update'
+;; command.
;; The `texinfo-indent-menu-description' function indents every
;; description in the menu following point, to the specified column.
@@ -142,7 +167,7 @@
;; as node names in pre-existing `@node' lines that lack names.
;;
;; Since node names should be more concise than section or chapter
-;; titles, node names so inserted will need to be edited manually.
+;; titles, you will usually want to manually edit node names so inserted.
;;; Code:
@@ -330,8 +355,13 @@ at the level specified by LEVEL. Point is left at the end of menu."
"Update every regular menu in a Texinfo file.
Update pre-existing master menu, if there is one.
+Only single-file manuals are supported by this function. For
+multi-file manuals, use `texinfo-multiple-files-update'.
+
If called with a non-nil argument, this function first updates all the
-nodes in the buffer before updating the menus.
+nodes in the buffer before updating the menus. Do NOT invoke this
+command with an argument if your Texinfo file uses @node lines without
+the `Next', `Previous', and `Up' pointers!
Indents the first line of descriptions, and leaves trailing whitespace
in a menu that lacks descriptions, so descriptions will format well.
@@ -843,20 +873,35 @@ second and subsequent lines of a multi-line description."
(defun texinfo-master-menu (update-all-nodes-menus-p)
"Make a master menu for a whole Texinfo file.
-Non-nil argument (prefix, if interactive) means first update all
-existing nodes and menus. Remove pre-existing master menu, if there is one.
-
-This function creates a master menu that follows the top node. The
-master menu includes every entry from all the other menus. It
-replaces any existing ordinary menu that follows the top node.
-
-If called with a non-nil argument, this function first updates all the
-menus in the buffer (incorporating descriptions from pre-existing
-menus) before it constructs the master menu.
-
-The function removes the detailed part of an already existing master
-menu. This action depends on the pre-existing master menu using the
-standard `texinfo-master-menu-header'.
+Remove pre-existing master menu, if there is one.
+
+This function supports only single-file manuals. For multi-file
+manuals, use `texinfo-multiple-files-update'.
+
+This function creates or updates the @detailmenu section of a
+master menu that follows the Top node. It replaces any existing
+detailed menu that follows the top node. The detailed menu
+includes every entry from all the other menus. By default, the
+existing menus, including the menu in the Top node, are not
+updated according to the buffer contents, so all the menus should
+be updated first using `texinfo-make-menu' or
+`texinfo-all-menus-update', which see. Alternatively, invoke
+this function with a prefix argument, see below.
+
+Non-nil, non-numeric argument (C-u prefix, if interactive) means
+first update all existing menus in the buffer (incorporating
+descriptions from pre-existing menus) before it constructs the
+master menu. If the argument is numeric (e.g., \"C-u 2\"),
+update all existing nodes as well, by calling
+\`texinfo-update-node' on the entire file. Warning: do NOT
+invoke with a numeric argument if your Texinfo file uses @node
+lines without the `Next', `Previous', `Up' pointers, as the
+result could be an invalid Texinfo file!
+
+The function removes and recreates the detailed part of an already
+existing master menu. This action assumes that the pre-existing
+master menu uses the standard `texinfo-master-menu-header' for the
+detailed menu.
The master menu has the following format, which is adapted from the
recommendation in the Texinfo Manual:
@@ -909,10 +954,11 @@ section titles are often too short to explain a node well."
(if update-all-nodes-menus-p
(progn
- (message "Making a master menu in %s ...first updating all nodes... "
- (buffer-name))
- (texinfo-update-node (point-min) (point-max))
-
+ (when (numberp update-all-nodes-menus-p)
+ (message
+ "Making a master menu in %s ...first updating all nodes... "
+ (buffer-name))
+ (texinfo-update-node (point-min) (point-max)))
(message "Updating all menus in %s ... " (buffer-name))
(texinfo-make-menu (point-min) (point-max))))
@@ -978,7 +1024,7 @@ However, there does not need to be a title field."
(let ((first-chapter
(save-excursion (re-search-forward "^@node\\|^@include") (point))))
(unless (re-search-forward "^@menu" first-chapter t)
- (error "Buffer lacks ordinary `Top' menu in which to insert master")))
+ (error "Buffer lacks a menu in its first node; create it, then run me again")))
(beginning-of-line)
(delete-region ; buffer must have ordinary top menu
(point)
@@ -1119,7 +1165,7 @@ error if the node is not the top node and a section is not found."
"texinfo-specific-section-type: Chapter or section not found"))))))
(defun texinfo-hierarchic-level ()
- "Return the general hierarchal level of the next node in a texinfo file.
+ "Return the general hierarchical level of the next node in a texinfo file.
Thus, a subheading or appendixsubsec is of type subsection."
(let ((case-fold-search t))
(cadr (assoc
@@ -1207,6 +1253,11 @@ end of that region; it limits the search."
"Without any prefix argument, update the node in which point is located.
Interactively, a prefix argument means to operate on the region.
+Warning: do NOT use this function if your Texinfo file uses @node
+lines without the `Next', `Previous', `Up' pointers, because the
+result could be an invalid Texinfo file due to known deficiencies
+in this command: it does not support @ignore and @if* directives.
+
The functions for creating or updating nodes and menus, and their
keybindings, are:
@@ -1246,7 +1297,12 @@ which menu descriptions are indented. Its default value is 32."
(message "Done...nodes updated in region. You may save the buffer."))))))
(defun texinfo-every-node-update ()
- "Update every node in a Texinfo file."
+ "Update every node in a Texinfo file.
+
+Warning: do NOT use this function if your Texinfo file uses @node
+lines without the `Next', `Previous', `Up' pointers, because the
+result could be an invalid Texinfo file due to known deficiencies
+in this command: it does not support @ignore and @if* directives."
(interactive)
(save-excursion
(texinfo-update-node (point-min) (point-max))
@@ -1934,7 +1990,11 @@ With optional UPDATE-EVERYTHING argument (numeric prefix arg, if
interactive), update all the menus and all the `Next', `Previous', and
`Up' pointers of all the files included in OUTER-FILE before inserting
a master menu in OUTER-FILE. Also, update the `Top' level node
-pointers of OUTER-FILE.
+pointers of OUTER-FILE. Do NOT invoke this command with a numeric prefix
+arg, if your files use @node lines without the `Next', `Previous', `Up'
+pointers, because this could produce invalid Texinfo files due to known
+deficiencies in `texinfo-update-node': it does not support the @ignore
+and @if... directives.
Notes:
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)'."
nil)))
(with-no-warnings
- ;; Warnings are suppresed to avoid "global/dynamic var `X' lacks a prefix".
+ ;; Warnings are suppressed to avoid "global/dynamic var `X' lacks a prefix".
(defvar now)
(defvar time)
(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 @@
(url-dav-process-DAV:activelock)
(url-dav-process-DAV:lockdiscovery): Can now correctly parse
DAV:lockdiscovery nodes, so that we can find out who has a
- resource locked and properly parse the reponse to a LOCK request.
+ resource locked and properly parse the response to a LOCK request.
(url-dav-process-DAV:status): Now parses out the numeric status
from the HTTP response line.
(url-dav-process-response): New function to handle all the
@@ -2448,7 +2448,7 @@
* lisp/url-nfs.el (url-nfs-create-wrapper): New function to create
wrappers onto the appropriate file-based URLs for file-name-handlers.
- * lisp/url-ftp.el: Moved the FTP stuff into it's own file - it
+ * lisp/url-ftp.el: Moved the FTP stuff into its own file - it
might get messy with file-name-handlers and things.
* 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."
(set (if (> trusted untrusted) 'untrusted 'trusted) nil))
(cond
(untrusted
- ;; The site was explicity marked as untrusted by the user.
+ ;; The site was explicitly marked as untrusted by the user.
nil)
((or (eq url-privacy-level 'paranoid)
(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."
:group 'url-gateway)
(defcustom url-gateway-telnet-login-prompt "^\r*.?login:"
- "Prompt that tells us we should send our username when loggin in w/telnet."
+ "Prompt that tells us we should send our username when logging in w/telnet."
:type 'regexp
:group 'url-gateway)
(defcustom url-gateway-telnet-password-prompt "^\r*.?password:"
- "Prompt that tells us we should send our password when loggin in w/telnet."
+ "Prompt that tells us we should send our password when logging in w/telnet."
:type 'regexp
:group 'url-gateway)
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.")
(if proxy-auth
(setq proxy-auth (concat "Proxy-Authorization: " proxy-auth "\r\n")))
- ;; Protection against stupid values in the referer
+ ;; Protection against stupid values in the referrer
(if (and ref-url (stringp ref-url) (or (string= ref-url "file:nil")
(string= ref-url "")))
(setq ref-url nil))
- ;; We do not want to expose the referer if the user is paranoid.
+ ;; We do not want to expose the referrer if the user is paranoid.
(if (or (memq url-privacy-level '(low high paranoid))
(and (listp url-privacy-level)
(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 @@
(mapc 'make-variable-buffer-local
'(
url-current-object
- url-current-referer
url-current-mime-headers
))
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.")
this-command)))
(defgroup ediff-highlighting nil
- "Hilighting of difference regions in Ediff."
+ "Highlighting of difference regions in Ediff."
:prefix "ediff-"
:group 'ediff)
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
(concat actual-dir (cdr proposed-file-names)))))
))
ediff-patch-map)
- ;; Check for the existing files in each pair and discard the nonexisting
+ ;; Check for the existing files in each pair and discard the nonexistent
;; ones. If both exist, ask the user.
(mapcar (lambda (session-info)
(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."
;; If there are min-lines lines above and below the region, then don't do
;; anything.
;; If not, recenter the region to make it so.
-;; If that isn't possible, remove context lines balancedly from top and bottom
+;; If that isn't possible, remove context lines evenly from top and bottom
;; so the entire region shows.
;; If that isn't possible, show the top of the region.
;; 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
by appending the branch to ARG which defaults to \"-r\".
Since the `cvs-secondary-branch-prefix' is only active if the primary
prefix is active, it is important to read the secondary prefix before
-the primay since reading the primary can deactivate it."
+the primary since reading the primary can deactivate it."
(let ((branch (and (cvs-prefix-get 'cvs-branch-prefix 'read-only)
(cvs-prefix-get 'cvs-secondary-branch-prefix))))
(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."
(defun vc-bzr-rename-file (old new)
"Rename file from OLD to NEW using `bzr mv'."
- (vc-bzr-command "mv" nil 0 new old))
+ (setq old (expand-file-name old))
+ (setq new (expand-file-name new))
+ (vc-bzr-command "mv" nil 0 new old)
+ (message "Renamed %s => %s" old new))
(defvar vc-bzr-annotation-table nil
"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."
(save-excursion
(goto-char (region-beginning))
(while (<= (line-number-at-pos) lastl)
- (funcall mark-unmark-function))))
+ (condition-case nil
+ (funcall mark-unmark-function)
+ ;; `vc-dir-mark-file' signals an error if we try marking
+ ;; a directory containing marked files in its tree, or a
+ ;; file in a marked directory tree. Just continue.
+ (error (vc-dir-next-line 1))))))
(funcall mark-unmark-function)))
(defun vc-dir-parent-marked-p (arg)
- ;; Return nil if none of the parent directories of arg is marked.
+ ;; Non-nil iff a parent directory of arg is marked.
+ ;; Return value, if non-nil is the `ewoc-data' for the marked parent.
(let* ((argdir (vc-dir-node-directory arg))
(arglen (length argdir))
(crt arg)
- data dir)
+ (found nil))
;; Go through the predecessors, checking if any directory that is
;; a parent is marked.
- (while (setq crt (ewoc-prev vc-ewoc crt))
- (setq data (ewoc-data crt))
- (setq dir (vc-dir-node-directory crt))
- (when (and (vc-dir-fileinfo->directory data)
- (vc-string-prefix-p dir argdir))
- (when (vc-dir-fileinfo->marked data)
- (error "Cannot mark `%s', parent directory `%s' marked"
- (vc-dir-fileinfo->name (ewoc-data arg))
- (vc-dir-fileinfo->name data)))))
- nil))
+ (while (and (null found)
+ (setq crt (ewoc-prev vc-ewoc crt)))
+ (let ((data (ewoc-data crt))
+ (dir (vc-dir-node-directory crt)))
+ (and (vc-dir-fileinfo->directory data)
+ (vc-string-prefix-p dir argdir)
+ (vc-dir-fileinfo->marked data)
+ (setq found data))))
+ found))
(defun vc-dir-children-marked-p (arg)
- ;; Return nil if none of the children of arg is marked.
+ ;; Non-nil iff a child of ARG is marked.
+ ;; Return value, if non-nil, is the `ewoc-data' for the marked child.
(let* ((argdir-re (concat "\\`" (regexp-quote (vc-dir-node-directory arg))))
(is-child t)
(crt arg)
- data dir)
- (while (and is-child (setq crt (ewoc-next vc-ewoc crt)))
- (setq data (ewoc-data crt))
- (setq dir (vc-dir-node-directory crt))
- (if (string-match argdir-re dir)
- (when (vc-dir-fileinfo->marked data)
- (error "Cannot mark `%s', child `%s' marked"
- (vc-dir-fileinfo->name (ewoc-data arg))
- (vc-dir-fileinfo->name data)))
- ;; We are done, we got to an entry that is not a child of `arg'.
- (setq is-child nil)))
- nil))
+ (found nil))
+ (while (and is-child
+ (null found)
+ (setq crt (ewoc-next vc-ewoc crt)))
+ (let ((data (ewoc-data crt))
+ (dir (vc-dir-node-directory crt)))
+ (if (string-match argdir-re dir)
+ (if (vc-dir-fileinfo->marked data)
+ (setq found data))
+ ;; We are done, we got to an entry that is not a child of `arg'.
+ (setq is-child nil))))
+ found))
(defun vc-dir-mark-file (&optional arg)
;; Mark ARG or the current file and move to the next line.
(let* ((crt (or arg (ewoc-locate vc-ewoc)))
(file (ewoc-data crt))
- (isdir (vc-dir-fileinfo->directory file)))
- (when (or (and isdir (not (vc-dir-children-marked-p crt)))
- (and (not isdir) (not (vc-dir-parent-marked-p crt))))
- (setf (vc-dir-fileinfo->marked file) t)
- (ewoc-invalidate vc-ewoc crt)
- (unless (or arg (mouse-event-p last-command-event))
- (vc-dir-next-line 1)))))
+ (isdir (vc-dir-fileinfo->directory file))
+ ;; Forbid marking a directory containing marked files in its
+ ;; tree, or a file in a marked directory tree.
+ (conflict (if isdir
+ (vc-dir-children-marked-p crt)
+ (vc-dir-parent-marked-p crt))))
+ (when conflict
+ (error (if isdir
+ "File `%s' in this directory is already marked"
+ "Parent directory `%s' is already marked")
+ (vc-dir-fileinfo->name conflict)))
+ (setf (vc-dir-fileinfo->marked file) t)
+ (ewoc-invalidate vc-ewoc crt)
+ (unless (or arg (mouse-event-p last-command-event))
+ (vc-dir-next-line 1))))
(defun vc-dir-mark ()
"Mark the current file or all files in the region.
@@ -621,19 +635,19 @@ share the same state."
(setf (vc-dir-fileinfo->marked filearg) t)
t))
vc-ewoc))
- (let ((data (ewoc-data (ewoc-locate vc-ewoc))))
+ (let* ((crt (ewoc-locate vc-ewoc))
+ (data (ewoc-data crt)))
(if (vc-dir-fileinfo->directory data)
;; It's a directory, mark child files.
- (let ((crt (ewoc-locate vc-ewoc)))
- (unless (vc-dir-children-marked-p crt)
- (while (setq crt (ewoc-next vc-ewoc crt))
- (let ((crt-data (ewoc-data crt)))
- (unless (vc-dir-fileinfo->directory crt-data)
- (setf (vc-dir-fileinfo->marked crt-data) t)
- (ewoc-invalidate vc-ewoc crt))))))
+ (let (crt-data)
+ (while (and (setq crt (ewoc-next vc-ewoc crt))
+ (setq crt-data (ewoc-data crt))
+ (not (vc-dir-fileinfo->directory crt-data)))
+ (setf (vc-dir-fileinfo->marked crt-data) t)
+ (ewoc-invalidate vc-ewoc crt)))
;; It's a file
- (let ((state (vc-dir-fileinfo->state data))
- (crt (ewoc-nth vc-ewoc 0)))
+ (let ((state (vc-dir-fileinfo->state data)))
+ (setq crt (ewoc-nth vc-ewoc 0))
(while crt
(let ((crt-data (ewoc-data crt)))
(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."
((eq state ?R) 'removed)
((eq state ?!) 'missing)
((eq state ??) 'unregistered)
- ((eq state ?C) 'up-to-date) ;; Older mercurials use this
+ ((eq state ?C) 'up-to-date) ;; Older mercurial versions use this.
(t 'up-to-date)))))))
(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."
:group 'vc)
(defcustom vc-keep-workfiles t
- "If non-nil, don't delete working files after registering changes.
-If the back-end is CVS, workfiles are always kept, regardless of the
-value of this flag."
+ "Whether to keep work files on disk after commits, on a locking VCS.
+This variable has no effect on modern merging-based version
+control systems."
:type 'boolean
:group 'vc)
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."
(defun vc-deduce-fileset (&optional observer allow-unregistered
state-model-only-files)
"Deduce a set of files and a backend to which to apply an operation.
-
Return (BACKEND FILESET FILESET-ONLY-FILES STATE CHECKOUT-MODEL).
-If we're in VC-dir mode, the fileset is the list of marked files.
-Otherwise, if we're looking at a buffer visiting a version-controlled file,
-the fileset is a singleton containing this file.
-If none of these conditions is met, but ALLOW_UNREGISTERED is on and the
-visited file is not registered, return a singleton fileset containing it.
+
+If we're in VC-dir mode, FILESET is the list of marked files.
+Otherwise, if in a buffer visiting a version-controlled file,
+FILESET is a single-file fileset containing that file.
+Otherwise, if ALLOW-UNREGISTERED is non-nil and the visited file
+is unregistered, FILESET is a single-file fileset containing it.
Otherwise, throw an error.
STATE-MODEL-ONLY-FILES if non-nil, means that the caller needs
@@ -1048,34 +1048,27 @@ current buffer."
;;;###autoload
(defun vc-next-action (verbose)
"Do the next logical version control operation on the current fileset.
-This requires that all files in the fileset be in the same state.
-
-For locking systems:
- If every file is not already registered, this registers each for version
-control.
- If every file is registered and not locked by anyone, this checks out
-a writable and locked file of each ready for editing.
- If every file is checked out and locked by the calling user, this
-first checks to see if each file has changed since checkout. If not,
-it performs a revert on that file.
- If every file has been changed, this pops up a buffer for entry
-of a log message; when the message has been entered, it checks in the
-resulting changes along with the log message as change commentary. If
-the variable `vc-keep-workfiles' is non-nil (which is its default), a
-read-only copy of each changed file is left in place afterwards.
- If the affected file is registered and locked by someone else, you are
-given the option to steal the lock(s).
-
-For merging systems:
- If every file is not already registered, this registers each one for version
-control. This does an add, but not a commit.
- If every file is added but not committed, each one is committed.
- If every working file is changed, but the corresponding repository file is
-unchanged, this pops up a buffer for entry of a log message; when the
-message has been entered, it checks in the resulting changes along
-with the logmessage as change commentary. A writable file is retained.
- If the repository file is changed, you are asked if you want to
-merge in the changes into your working copy."
+This requires that all files in the current VC fileset be in the
+same state. If not, signal an error.
+
+For merging-based version control systems:
+ If every file in the VC fileset is not registered for version
+ control, register the fileset (but don't commit).
+ If every work file in the VC fileset is added or changed, pop
+ up a *vc-log* buffer to commit the fileset.
+ For a centralized version control system, if any work file in
+ the VC fileset is out of date, offer to update the fileset.
+
+For old-style locking-based version control systems, like RCS:
+ If every file is not registered, register the file(s).
+ If every file is registered and unlocked, check out (lock)
+ the file(s) for editing.
+ If every file is locked by you and has changes, pop up a
+ *vc-log* buffer to check in the changes. If the variable
+ `vc-keep-workfiles' is non-nil (the default), leave a
+ read-only copy of each changed file after checking in.
+ If every file is locked by you and unchanged, unlock them.
+ If every file is locked by someone else, offer to steal the lock."
(interactive "P")
(let* ((vc-fileset (vc-deduce-fileset nil t 'state-model-only-files))
(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 @@
;; automatically for a PC if Oemacs is detected. This set uses separate
;; control, shift and meta keys with function keys 1 to 10. In
;; particular, movement keys are concentrated on f5 to f8 with (in
-;; increasing order of distance travelled) C-, M- and S- as prefixes.
+;; increasing order of distance traveled) C-, M- and S- as prefixes.
;; See the actual bindings below (search for C-f1). This is because the
;; C-S- prefix is represented by weird key sequences and the set is
;; 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'."
;; sets view-read-only to t as a buffer-local variable
;; after exiting View mode. That arranges that the next toggle-read-only
;; will reenable View mode.
- ;; Cancelling View mode in any other way should cancel that, too,
+ ;; Canceling View mode in any other way should cancel that, too,
;; so that View mode stays off if toggle-read-only is called.
(if (local-variable-p 'view-read-only)
(kill-local-variable 'view-read-only))
@@ -496,7 +496,7 @@ Entry to view-mode runs the normal hook `view-mode-hook'."
"Update `view-return-to-alist' of buffer BUFFER.
Remove from `view-return-to-alist' all entries referencing dead
windows. Optional argument ITEM non-nil means add ITEM to
-`view-return-to-alist' after purging. For a decsription of items
+`view-return-to-alist' after purging. For a description of items
that can be added see the RETURN-TO-ALIST argument of the
function `view-mode-exit'. If `view-return-to-alist' contains an
entry 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."
(error "Canceled"))
value))))
-(defun widget-remove-if (predictate list)
+(defun widget-remove-if (predicate list)
(let (result (tail list))
(while tail
- (or (funcall predictate (car tail))
+ (or (funcall predicate (car tail))
(setq result (cons (car tail) result)))
(setq tail (cdr tail)))
(nreverse result)))
@@ -577,7 +577,7 @@ This is only meaningful for radio buttons or checkboxes in a list."
"Map FUNCTION over the buttons in BUFFER.
FUNCTION is called with the arguments WIDGET and MAPARG.
-If FUNCTION returns non-nil, the walk is cancelled.
+If FUNCTION returns non-nil, the walk is canceled.
The arguments MAPARG, and BUFFER default to nil and (current-buffer),
respectively."
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."
"Return first window on FRAME with PARAMETER non-nil.
FRAME defaults to the selected frame. Optional argument VALUE
non-nil means only return a window whose window-parameter value
-for PARAMETER equals VALUE \(comparison is done with `equal').
+for PARAMETER equals VALUE (comparison is done with `equal').
Optional argument ANY non-nil means consider internal windows
too."
(let (this-value windows)
@@ -312,7 +312,7 @@ too."
(defun window-atom-root (&optional window)
"Return root of atomic window WINDOW is a part of.
WINDOW can be any window and defaults to the selected one.
-Return nil if WINDOW is not part of a atomic window."
+Return nil if WINDOW is not part of an atomic window."
(setq window (window-normalize-window window))
(let (root)
(while (and window (window-parameter window 'window-atom))
@@ -380,7 +380,7 @@ Otherwise, top and bottom side windows are full width."
(defcustom window-sides-slots '(nil nil nil nil)
"Maximum number of side window slots.
The value is a list of four elements specifying the number of
-side window slots on \(in this order) the left, top, right and
+side window slots on (in this order) the left, top, right and
bottom side of each frame. If an element is a number, this means
to display at most that many side windows on the corresponding
side. 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.
Any other non-nil value fixes both the width and the height.
Emacs won't change the size of any window displaying that buffer,
-unless it has no other choice \(like when deleting a neighboring
+unless it has no other choice (like when deleting a neighboring
window).")
(make-variable-buffer-local 'window-size-fixed)
@@ -749,7 +749,7 @@ Optional argument NOUP non-nil means don't go up in the window
tree but try to enlarge windows within WINDOW's combination only.
Optional argument NODOWN non-nil means don't check whether WINDOW
-itself \(and its child windows) can be shrunk; check only whether
+itself (and its child windows) can be shrunk; check only whether
at least one other window can be enlarged appropriately."
(setq window (window-normalize-window window))
(let ((size (window-total-size window horizontal))
@@ -831,7 +831,7 @@ tree but try to obtain the entire space from windows within
WINDOW's combination.
Optional argument NODOWN non-nil means do not check whether
-WINDOW itself \(and its child windows) can be enlarged; check
+WINDOW itself (and its child windows) can be enlarged; check
only whether other windows can be shrunk appropriately."
(setq window (window-normalize-window window))
(if (and (not (window--size-ignore window ignore))
@@ -1211,7 +1211,7 @@ More precisely, cycle through all windows calling the function
PREDICATE on each one of them with the window as its sole
argument. Return the first window for which PREDICATE returns
non-nil. Windows are scanned starting with the window following
-the selcted window. If no window satisfies PREDICATE, return
+the selected window. If no window satisfies PREDICATE, return
DEFAULT.
MINIBUF t means include the minibuffer window even if the
@@ -1418,7 +1418,7 @@ windows."
;; window and is currently used, for example, by ispell.el.
(defun window--resize-mini-window (window delta)
"Resize minibuffer window WINDOW by DELTA lines.
-If WINDOW cannot be resized by DELTA lines make it as large \(or
+If WINDOW cannot be resized by DELTA lines make it as large (or
as small) as possible but don't signal an error."
(when (window-minibuffer-p window)
(let* ((frame (window-frame window))
@@ -1513,12 +1513,12 @@ instead."
"Recursively set new normal height of child windows of window PARENT.
HORIZONTAL non-nil means set the new normal width of these
windows. WINDOW specifies a child window of PARENT that has been
-resized by THIS-DELTA lines \(columns).
+resized by THIS-DELTA lines (columns).
Optional argument TRAIL either 'before or 'after means set values
for windows before or after WINDOW only. Optional argument
-OTHER-DELTA a number specifies that this many lines \(columns)
-have been obtained from \(or returned to) an ancestor window of
+OTHER-DELTA a number specifies that this many lines (columns)
+have been obtained from (or returned to) an ancestor window of
PARENT in order to resize WINDOW."
(let* ((delta-normal
(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
the combined size and position of the child windows in the split,
and the rest of the elements are the child windows in the split.
Each of the child windows may again be a window or a list
-representing a window split, and so on. EDGES is a list \(LEFT
+representing a window split, and so on. EDGES is a list (LEFT
TOP RIGHT BOTTOM) as returned by `window-edges'."
(setq frame (window-normalize-frame frame))
(window--subtree (frame-root-window frame) t))
@@ -2204,9 +2204,9 @@ skip -COUNT windows backwards. COUNT zero means do not skip any
window, so select the selected window. In an interactive call,
COUNT is the numeric prefix argument. Return nil.
-If the `other-window' parameter of WINDOW is a function and
-`ignore-window-parameters' is nil, call that function with the
-arguments COUNT and ALL-FRAMES.
+If the `other-window' parameter of the selected window is a
+function and `ignore-window-parameters' is nil, call that
+function with the arguments COUNT and ALL-FRAMES.
This function does not select a window whose `no-other-window'
window parameter is non-nil.
@@ -2430,7 +2430,7 @@ the value returned by that function.
Otherwise, if WINDOW is part of an atomic window, call this
function with the root of the atomic window as its argument. If
WINDOW is a non-side window, make WINDOW the only non-side window
-on the frame. Side windows are not deleted. If WINDOW is a side
+on the frame. Side windows are not deleted. If WINDOW is a side
window signal an error."
(interactive)
(setq window (window-normalize-window window))
@@ -2455,7 +2455,7 @@ window signal an error."
(throw 'done (delete-other-windows atom-root)))
((eq window-side 'none)
;; Set side-main to the major non-side window.
- (setq side-main (window-with-parameter 'window-side 'none nil t)))
+ (setq side-main (window-with-parameter 'window-side 'none frame t)))
((memq window-side window-sides)
(error "Cannot make side window the only window")))
;; 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
burying it.
According to information stored in WINDOW's `quit-restore' window
-parameter either \(1) delete WINDOW and its frame, \(2) delete
-WINDOW, \(3) restore the buffer previously displayed in WINDOW,
-or \(4) make WINDOW display some other buffer than the present
+parameter either (1) delete WINDOW and its frame, (2) delete
+WINDOW, (3) restore the buffer previously displayed in WINDOW,
+or (4) make WINDOW display some other buffer than the present
one. If non-nil, reset `quit-restore' parameter to nil."
(interactive "P")
(setq window (window-normalize-window window t))
@@ -3047,14 +3047,14 @@ WINDOW's size. Interactively, SIZE is the prefix argument.
Optional third argument SIDE nil (or `below') specifies that the
new window shall be located below WINDOW. SIDE `above' means the
new window shall be located above WINDOW. In both cases SIZE
-specifies the new number of lines for WINDOW \(or the new window
+specifies the new number of lines for WINDOW (or the new window
if SIZE is negative) including space reserved for the mode and/or
header line.
SIDE t (or `right') specifies that the new window shall be
located on the right side of WINDOW. SIDE `left' means the new
window shall be located on the left of WINDOW. In both cases
-SIZE specifies the new number of columns for WINDOW \(or the new
+SIZE specifies the new number of columns for WINDOW (or the new
window provided SIZE is negative) including space reserved for
fringes and the scrollbar or a divider column. Any other non-nil
value for SIDE is currently handled like t (or `right').
@@ -3604,7 +3604,7 @@ specific buffers."
(with-current-buffer (window-buffer window)
(let ((point (window-point-1 window))
(start (window-start window))
- (mark (mark)))
+ (mark (mark t)))
`((buffer
,(buffer-name buffer)
(selected . ,selected)
@@ -3713,7 +3713,7 @@ value can be also stored on disk and read back in a new session."
(if (window-sizable-p window (- size) horizontal 'safe)
(let* ((window-combination-limit
(assq 'combination-limit item)))
- ;; We must inherit the combiantion limit, otherwise
+ ;; We must inherit the combination limit, otherwise
;; we might mess up handling of atomic and side
;; window.
(setq new (split-window window size horizontal)))
@@ -3870,10 +3870,10 @@ windows can get as small as `window-safe-min-height' and
(defun display-buffer-record-window (type window buffer)
"Record information for window used by `display-buffer'.
TYPE specifies the type of the calling operation and must be one
-of the symbols 'reuse \(when WINDOW existed already and was
-reused for displaying BUFFER), 'window \(when WINDOW was created
-on an already existing frame), or 'frame \(when WINDOW was
-created on a new frame). WINDOW is the window used for or created
+of the symbols 'reuse (when WINDOW existed already and was
+reused for displaying BUFFER), 'window (when WINDOW was created
+on an already existing frame), or 'frame (when WINDOW was
+created on a new frame). WINDOW is the window used for or created
by the `display-buffer' routines. BUFFER is the buffer that
shall be displayed.
@@ -3968,7 +3968,7 @@ the buffer as first, and nil as second argument.
Alternatively, an element of this list can be specified as
\(BUFFER-NAME FRAME-PARAMETERS), where BUFFER-NAME is a buffer
-name and FRAME-PARAMETERS an alist of \(PARAMETER . VALUE) pairs.
+name and FRAME-PARAMETERS an alist of (PARAMETER . VALUE) pairs.
`special-display-popup-frame' will interpret such pairs as frame
parameters when it creates a special frame, overriding the
corresponding values from `special-display-frame-alist'.
@@ -4044,7 +4044,7 @@ name matches REGEXP, overriding the corresponding values from
As a special case, if FRAME-PARAMETERS contains (same-window . t)
`special-display-popup-frame' displays buffers matching REGEXP in
-the selected window. \(same-frame . t) in FRAME-PARAMETERS means
+the selected window. (same-frame . t) in FRAME-PARAMETERS means
to display such buffers in a window on the selected frame.
If `special-display-function' specifies some other function than
@@ -4139,8 +4139,8 @@ Optional argument ARGS is a list specifying additional
information.
If ARGS is an alist, use it as a list of frame parameters. If
-these parameters contain \(same-window . t), display BUFFER in
-the selected window. If they contain \(same-frame . t), display
+these parameters contain (same-window . t), display BUFFER in
+the selected window. If they contain (same-frame . t), display
BUFFER in a window of the selected frame.
If ARGS is a list whose car is a symbol, use (car ARGS) as a
@@ -4234,7 +4234,7 @@ See also `same-window-buffer-names'."
"Return non-nil if a buffer named BUFFER-NAME would be shown in the \"same\" window.
This function returns non-nil if `display-buffer' or
`pop-to-buffer' would show a buffer named BUFFER-NAME in the
-selected rather than \(as usual\) some other window. See
+selected rather than (as usual) some other window. See
`same-window-buffer-names' and `same-window-regexps'."
(cond
((not (stringp buffer-name)))
@@ -4396,11 +4396,11 @@ the largest or least recently used window. To change the default
customize the option `split-window-preferred-function'.
You can enforce this function to not split WINDOW horizontally,
-by setting \(or binding) the variable `split-width-threshold' to
+by setting (or binding) the variable `split-width-threshold' to
nil. If, in addition, you set `split-height-threshold' to zero,
chances increase that this function does split WINDOW vertically.
-In order to not split WINDOW vertically, set \(or bind) the
+In order to not split WINDOW vertically, set (or bind) the
variable `split-height-threshold' to nil. Additionally, you can
set `split-width-threshold' to zero to make a horizontal split
more likely to occur.
@@ -4526,19 +4526,6 @@ Return WINDOW."
The actual non-nil value of this variable will be copied to the
`window-dedicated-p' flag.")
-(defun window-normalize-buffer-to-display (buffer-or-name)
- "Normalize BUFFER-OR-NAME argument for buffer display functions.
-If BUFFER-OR-NAME is nil, return the current buffer. Else, if a
-buffer specified by BUFFER-OR-NAME exists, return that buffer.
-If no such buffer exists, create a buffer with the name
-BUFFER-OR-NAME and return that buffer."
- (if buffer-or-name
- (or (get-buffer buffer-or-name)
- (let ((buffer (get-buffer-create buffer-or-name)))
- (set-buffer-major-mode buffer)
- buffer))
- (current-buffer)))
-
(defconst display-buffer--action-function-custom-type
'(choice :tag "Function"
(const :tag "--" ignore) ; default for insertion
@@ -4565,7 +4552,7 @@ BUFFER-OR-NAME and return that buffer."
(defvar display-buffer-overriding-action '(nil . nil)
"Overriding action to perform to display a buffer.
It should be a cons cell (FUNCTION . ALIST), where FUNCTION is a
-function or a list of functions. Each function should accept 2
+function or a list of functions. Each function should accept two
arguments: a buffer to display and an alist similar to ALIST.
See `display-buffer' for details.")
(put 'display-buffer-overriding-action 'risky-local-variable t)
@@ -4579,7 +4566,7 @@ This is a list of elements (CONDITION . ACTION), where:
ACTION is a cons cell (FUNCTION . ALIST), where FUNCTION is a
function or a list of functions. Each such function should
- accept 2 arguments: a buffer to display and an alist of the
+ accept two arguments: a buffer to display and an alist of the
same form as ALIST. See `display-buffer' for details."
:type `(alist :key-type
(choice :tag "Condition"
@@ -4593,7 +4580,7 @@ This is a list of elements (CONDITION . ACTION), where:
(defcustom display-buffer-base-action '(nil . nil)
"User-specified default action for `display-buffer'.
It should be a cons cell (FUNCTION . ALIST), where FUNCTION is a
-function or a list of functions. Each function should accept 2
+function or a list of functions. Each function should accept two
arguments: a buffer to display and an alist similar to ALIST.
See `display-buffer' for details."
:type display-buffer--action-custom-type
@@ -4640,7 +4627,7 @@ specified, e.g. by the user options `display-buffer-alist' or
"A `display-buffer' action for displaying in another frame.")
(put 'display-buffer--other-frame-action 'risky-local-variable t)
-(defun display-buffer (&optional buffer-or-name action frame)
+(defun display-buffer (buffer-or-name &optional action frame)
"Display BUFFER-OR-NAME in some window, without selecting it.
BUFFER-OR-NAME must be a buffer or the name of an existing
buffer. Return the window chosen for displaying BUFFER-OR-NAME,
@@ -4648,8 +4635,8 @@ or nil if no such window is found.
Optional argument ACTION should have the form (FUNCTION . ALIST).
FUNCTION is either a function or a list of functions. Each such
-function is called with 2 arguments: the buffer to display and an
-alist. It should either display the buffer and return the
+function is called with two arguments: the buffer to display and
+an alist. It should either display the buffer and return the
window, or return nil if unable to display the buffer.
The `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
`display-buffer-reuse-window'."
(interactive (list (read-buffer "Display buffer: " (other-buffer))
(if current-prefix-arg t)))
- (let ((buffer (window-normalize-buffer-to-display buffer-or-name))
+ (let ((buffer (if (bufferp buffer-or-name)
+ buffer-or-name
+ (get-buffer buffer-or-name)))
;; Handle the old form of the first argument.
(inhibit-same-window (and action (not (listp action)))))
(unless (listp action) (setq action nil))
@@ -4996,7 +4985,7 @@ minibuffer. The variable `confirm-nonexistent-file-or-buffer'
determines whether to request confirmation before creating a new
buffer.
-BUFFER-OR-NAME may be a buffer, a string \(a buffer name), or
+BUFFER-OR-NAME may be a buffer, a string (a buffer name), or
nil. If BUFFER-OR-NAME is a string that does not identify an
existing buffer, create a buffer with that name. If
BUFFER-OR-NAME is nil, switch to the buffer returned by
@@ -5036,7 +5025,7 @@ Return the buffer switched to."
(defun switch-to-buffer-other-window (buffer-or-name &optional norecord)
"Select the buffer specified by BUFFER-OR-NAME in another window.
-BUFFER-OR-NAME may be a buffer, a string \(a buffer name), or
+BUFFER-OR-NAME may be a buffer, a string (a buffer name), or
nil. Return the buffer switched to.
If called interactively, prompt for the buffer name using the
@@ -5060,7 +5049,7 @@ documentation for additional customization information."
(defun switch-to-buffer-other-frame (buffer-or-name &optional norecord)
"Switch to buffer BUFFER-OR-NAME in another frame.
-BUFFER-OR-NAME may be a buffer, a string \(a buffer name), or
+BUFFER-OR-NAME may be a buffer, a string (a buffer name), or
nil. Return the buffer switched to.
If 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.
Optional argument MAX-HEIGHT specifies the maximum height of
WINDOW and defaults to the height of WINDOW's frame. Optional
argument MIN-HEIGHT specifies the minimum height of WINDOW and
-defaults to `window-min-height'. Both, MAX-HEIGHT and MIN-HEIGHT
+defaults to `window-min-height'. Both MAX-HEIGHT and MIN-HEIGHT
are specified in lines and include the mode line and header line,
if any.
@@ -5234,7 +5223,7 @@ WINDOW was scrolled."
;; This `condition-case' shouldn't be necessary, but who knows?
(condition-case nil
(if (zerop delta)
- ;; Return zero if DELTA became zero in the proces.
+ ;; Return zero if DELTA became zero in the process.
0
;; Don't try to redisplay with the cursor at the end on its
;; own line--that would force a scroll and spoil things.
@@ -5332,7 +5321,7 @@ A list of elements with possible values `top', `middle', `bottom',
integer or float numbers that define the cycling order for
the command `recenter-top-bottom'.
-Top and bottom destinations are `scroll-margin' lines the from true
+Top and bottom destinations are `scroll-margin' lines from the true
window top and bottom. Middle redraws the frame and centers point
vertically within the window. Integer number moves current line to
the 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."
(defvar mouse-autoselect-window-state nil
"When non-nil, special state of delayed window autoselection.
-Possible values are `suspend' \(suspend autoselection after a menu or
-scrollbar interaction\) and `select' \(the next invocation of
-'handle-select-window' shall select the window immediately\).")
+Possible values are `suspend' (suspend autoselection after a menu or
+scrollbar interaction) and `select' (the next invocation of
+`handle-select-window' shall select the window immediately).")
(defun mouse-autoselect-window-cancel (&optional force)
"Cancel delayed window autoselection.
@@ -5610,8 +5599,8 @@ means suspend autoselection."
(defun mouse-autoselect-window-select ()
"Select window with delayed window autoselection.
If the mouse position has stabilized in a non-selected window, select
-that window. The minibuffer window is selected only if the minibuffer is
-active. This function is run by `mouse-autoselect-window-timer'."
+that window. The minibuffer window is selected only if the minibuffer
+is active. This function is run by `mouse-autoselect-window-timer'."
(ignore-errors
(let* ((mouse-position (mouse-position))
(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[])
MB_OKCANCEL | MB_ICONQUESTION);
if (result != IDOK)
{
- fprintf (stderr, "Install cancelled\n");
+ fprintf (stderr, "Install canceled\n");
exit (1);
}
}
@@ -365,4 +365,3 @@ main (int argc, char *argv[])
return 0;
}
-
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.
*/
typedef struct _XAssoc {
struct _XAssoc *next; /* Next object in this bucket. */
- struct _XAssoc *prev; /* Previous obejct in this bucket. */
+ struct _XAssoc *prev; /* Previous object in this bucket. */
Display *display; /* Display which owns the id. */
XID x_id; /* X Window System id. */
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 {
*
*/
typedef enum _xmstyle {
- LEFT, /* Left oriented obejct. */
- RIGHT, /* Right oriented obejct. */
+ LEFT, /* Left oriented object. */
+ RIGHT, /* Right oriented object. */
CENTER /* Center oriented object. */
} XMStyle;
diff --git a/src/ChangeLog b/src/ChangeLog
index 6a13bd87264..f10e2955164 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,264 @@
+2011-12-28 Kenichi Handa <handa@m17n.org>
+
+ * coding.c (Fdefine_coding_system_internal): Make an utf-8 base
+ coding-system ASCII compatible only when it does not produce BOM
+ on encoding (Bug#10383).
+
+2011-12-26 Jan Djärv <jan.h.d@swipnet.se>
+
+ * xmenu.c (x_menu_wait_for_event): Use xg_select for Gtk3 so menus
+ can scroll.
+ (create_and_show_popup_menu): Always use menu_position_func for
+ Gtk3 (Bug#10361).
+
+2011-12-24 Andreas Schwab <schwab@linux-m68k.org>
+
+ * callint.c (Fcall_interactively): Don't truncate prompt string.
+
+2011-12-23 Eli Zaretskii <eliz@gnu.org>
+
+ * xdisp.c (handle_invisible_prop): Handle correctly an invisible
+ property that ends at ZV, so that the bidi iteration could be
+ resumed from there (after widening). (Bug#10360)
+
+2011-12-22 Jan Djärv <jan.h.d@swipnet.se>
+
+ * nsfont.m (ns_spec_to_descriptor): Do not autorelease fdesc.
+
+2011-12-21 Jan Djärv <jan.h.d@swipnet.se>
+
+ * nsterm.m (x_free_frame_resources): Release
+ f->output_data.ns->miniimage
+ (ns_index_color): Fix indentation. Do not retain
+ color_table->colors[i].
+
+ * nsmenu.m (ns_update_menubar): Call free_menubar_widget_value_tree
+ before returning.
+
+ * nsfns.m (x_set_background_color): Assign return value from
+ ns_index_color to face-background instead of NSColor*.
+ (ns_implicitly_set_icon_type): Fix indentation.
+ Change assignment in for loop to comparison.
+
+ * emacs.c (ns_pool): New variable.
+ (main): Assign ns_pool.
+ (Fkill_emacs): Call ns_release_autorelease_pool.
+
+ * nsfont.m (ns_spec_to_descriptor): Fix indentation,
+ autorelease fdesc, release fdAttrs and tdict.
+ (ns_get_covering_families): Release charset.
+ (ns_findfonts): Release NSFontDescriptor created with new.
+ (ns_uni_to_glyphs): Fix indentation.
+ (setString): Release attrStr before assigning new value.
+
+2011-12-18 Jan Djärv <jan.h.d@swipnet.se>
+
+ * nsmenu.m (NSMenuDidBeginTrackingNotification): Declare if OSX < 10.5
+ and NS_IMPL_COCOA.
+ (trackingNotification): Surround with ifdef NS_IMPL_COCOA.
+ (syms_of_nsmenu): Set trackingMenu to 1 if not NS_IMPL_COCOA.
+
+2011-12-18 David Reitter <reitter@cmu.edu>
+
+ * nsterm.m (ns_term_init): Subscribe for notifications
+ NSMenuDidBeginTrackingNotification and NSMenuDidEndTrackingNotification
+ to method trackingNotification in EmacsMenu.
+
+ * nsmenu.m (trackingMenu): New variable.
+ (trackingNotification): New method (from Aquamacs).
+ (menuNeedsUpdate): Expand comment and return if trackingMenu is 0,
+ from Aquamacs (Bug#7030).
+
+2011-12-18 Jan Djärv <jan.h.d@swipnet.se>
+
+ * nsselect.m (CUT_BUFFER_SUPPORT): Remove define.
+ (symbol_to_nsstring): Fix indentation.
+ (ns_symbol_to_pb): New function.
+ (Fns_get_selection_internal): Renamed from Fns_get_cut_buffer_internal.
+ (Fns_rotate_cut_buffers_internal): Removed.
+ (Fns_store_selection_internal): Renamed from
+ Fns_store_cut_buffer_internal.
+ (ns_get_foreign_selection, Fx_own_selection_internal)
+ (Fx_disown_selection_internal, Fx_selection_exists_p)
+ (Fns_get_selection_internal, Fns_store_selection_internal): Use
+ ns_symbol_to_pb and check if return value is nil.
+ (syms_of_nsselect): Remove ifdef CUT_BUFFER_SUPPORT. Remove
+ defsubr Sns_rotate_cut_buffers_internal. Sns_get_cut_buffer_internal
+ renamed to Sns_get_selection_internal, Sns_store_cut_buffer_internal
+ renamed to Sns_store_selection_internal.
+ (ns_handle_selection_request): Move code to Fx_own_selection_internal
+ and remove this function.
+ (ns_handle_selection_clear): Remove, never used.
+ (Fx_own_selection_internal): Move code from ns_handle_selection_request
+ here.
+
+2011-12-17 Ken Brown <kbrown@cornell.edu>
+
+ * fileio.c (check_writable) [CYGWIN]: Return non-zero if UID or
+ GID is unknown (Bug#10257).
+
+2011-12-17 Paul Eggert <eggert@cs.ucla.edu>
+
+ * s/gnu-linux.h: Fix mark_memory typo (Bug#10286).
+ (GC_MARK_SECONDARY_STACK): Omit removed 3rd arg to mark_memory,
+ which caused a build failure on GNU/Linux IA-64. This problem was
+ introduced by my 2011-10-07 patch.
+
+2011-12-15 Juri Linkov <juri@jurta.org>
+
+ * image.c (imagemagick_error): New function. (Bug#10112)
+ (imagemagick_load_image): Comment out `MagickSetResolution' call.
+ Use `imagemagick_error' where ImageMagick functions return
+ `MagickFalse'.
+ (Fimagemagick_types): Add `Fnreverse' to return the list in the
+ proper order.
+
+2011-12-15 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
+
+ * xftfont.c (xftfont_draw): Use the font metrics of s->font to
+ fill background (Bug#8992).
+
+2011-12-13 Martin Rudalics <rudalics@gmx.at>
+
+ * window.c (Vwindow_combination_resize)
+ (Vwindow_combination_limit): Use t instead of non-nil in
+ doc-strings.
+ (Vrecenter_redisplay): Add first sentence of doc-string on
+ separate line.
+ (Frecenter): Fix doc-string typo.
+
+2011-12-11 Kenichi Handa <handa@m17n.org>
+
+ * coding.c (Funencodable_char_position): Pay attention to the
+ buffer text relocation (Bug#9389).
+
+2011-12-10 Jan Djärv <jan.h.d@swipnet.se>
+
+ * xterm.c (x_term_init): Move call to gdk_window_add_filter before
+ gtk_init (Bug#10100).
+
+2011-12-10 Eli Zaretskii <eliz@gnu.org>
+
+ * xdisp.c (RECORD_MAX_MIN_POS): Use IT->cmp_it.charpos only if
+ IT->string is nil. (Bug#10263)
+
+2011-12-10 Jan Djärv <jan.h.d@swipnet.se>
+
+ * nsterm.h (x_free_frame_resources): Declare.
+
+ * nsfns.m (ns_get_defaults_value): New function (Bug#10103).
+ (Fns_get_resource, x_get_string_resource): Call ns_get_defaults_value.
+
+ * nsterm.h (ns_get_defaults_value): Declare.
+
+ * nsterm.m (ns_default): Call ns_get_defaults_value.
+
+2011-12-09 Eli Zaretskii <eliz@gnu.org>
+
+ * xdisp.c (try_scrolling): Don't set scroll_down_p if dy is zero.
+ (Bug#10170)
+
+2011-12-09 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
+
+ * unexelf.c (unexec) [NS_IMPL_GNUSTEP]: Take account of the case
+ that where the value of an _OBJC_* symbol points to is in the .bss
+ section (Bug#10240).
+
+2011-12-08 Kazuhiro Ito <kzhr@d1.dion.ne.jp> (tiny change)
+
+ * coding.c (encode_coding_ccl): Check (charbuf < charbuf_end)
+ after the loop to call ccl_driver at least once (Bug#8619).
+
+2011-12-08 Kenichi Handa <handa@m17n.org>
+
+ * ftfont.c (get_adstyle_property): Fix previous change
+ (Bug#10233).
+
+2011-12-07 Juanma Barranquero <lekktu@gmail.com>
+
+ * w32.c (init_environment): If no_site_lisp, remove site-lisp
+ dirs from the default value of EMACSLOADPATH (bug#10208).
+
+2011-12-07 Glenn Morris <rgm@gnu.org>
+
+ * lread.c (init_lread): If no_site_lisp, exclude site-lisp/ in
+ installation and source directories as well. (Bug#10208)
+
+2011-12-06 Chong Yidong <cyd@gnu.org>
+
+ * minibuf.c (Fread_from_minibuffer): Doc fix (Bug#10228).
+
+2011-12-06 Glenn Morris <rgm@gnu.org>
+
+ * process.c (start_process_unwind): Treat any pid <= 0, except -2,
+ as an error, not just -1. (Bug#10217)
+
+2011-12-05 Chong Yidong <cyd@gnu.org>
+
+ * keyboard.c (process_special_events): New function.
+ (swallow_events, Finput_pending_p): Use it (Bug#10195).
+
+2011-12-05 Paul Eggert <eggert@cs.ucla.edu>
+
+ * coding.c (encode_designation_at_bol): Don't use uninitialized
+ local variable (Bug#9318).
+
+2011-12-05 Kenichi Handa <handa@m17n.org>
+
+ * ftfont.c (get_adstyle_property): If the font is not BDF nor PCF,
+ return Qnil (Bug#8046, Bug#10193).
+
+2011-12-05 Kenichi Handa <handa@m17n.org>
+
+ * coding.c (encode_designation_at_bol): New args charbuf_end and
+ dst. Return the number of produced bytes. Callers changed.
+ (coding_set_source): Return how many bytes coding->source was
+ relocated.
+ (coding_set_destination): Return how many bytes
+ coding->destination was relocated.
+ (CODING_DECODE_CHAR, CODING_ENCODE_CHAR, CODING_CHAR_CHARSET)
+ (CODING_CHAR_CHARSET_P): Adjusted for the avove changes.
+
+2011-12-05 Kazuhiro Ito <kzhr@d1.dion.ne.jp> (tiny change)
+
+ * coding.c (CODING_CHAR_CHARSET_P): New macro.
+ (encode_coding_emacs_mule, encode_coding_iso_2022): Use the above
+ macro (Bug#9318).
+
+2011-12-05 Andreas Schwab <schwab@linux-m68k.org>
+
+ The following changes are to fix Bug#9318.
+
+ * coding.c (CODING_ENCODE_CHAR, CODING_CHAR_CHARSET): New macros.
+ (encode_coding_emacs_mule, ENCODE_ISO_CHARACTER)
+ (encode_coding_iso_2022, encode_coding_sjis)
+ (encode_coding_big5, encode_coding_charset): Use the above macros.
+
+2011-12-05 Juanma Barranquero <lekktu@gmail.com>
+
+ * lisp.h (process_quit_flag): Fix external declaration.
+
+2011-12-04 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ Don't macro-inline non-performance-critical code.
+ * eval.c (process_quit_flag): New function.
+ * lisp.h (QUIT): Use it.
+
+2011-12-04 Jan Djärv <jan.h.d@swipnet.se>
+
+ * nsfns.m (get_geometry_from_preferences): New function.
+ (Fx_create_frame): Call get_geometry_from_preferences (Bug#10103).
+
+2011-12-04 Andreas Schwab <schwab@linux-m68k.org>
+
+ * emacs.c (Qkill_emacs): Define.
+ (syms_of_emacs): Initialize it.
+ * keyboard.c (interrupt_signal): Don't call Fkill_emacs here, set
+ Qquit_flag to `kill-emacs' instead.
+ (quit_throw_to_read_char): Add parameter `from_signal'.
+ All callers changed. Call Fkill_emacs if requested and safe.
+ * lisp.h (QUIT): Call Fkill_emacs if requested.
+
2011-12-03 Jan Djärv <jan.h.d@swipnet.se>
* widget.c (update_wm_hints): Return if wmshell is null.
@@ -58,7 +319,7 @@
* xterm.c (handle_one_xevent): Only set async_visible and friends
if net_wm_state_hidden_seen is non-zero (Bug#10002)
- (get_current_wm_state): Set net_wm_state_hidden_seen to 1 if
+ (get_current_wm_state): Set net_wm_state_hidden_seen to 1 if
_NET_WM_STATE_HIDDEN is in NET_WM_STATE.
2011-11-28 Paul Eggert <eggert@cs.ucla.edu>
@@ -95,8 +356,8 @@
2011-11-27 Jan Djärv <jan.h.d@swipnet.se>
- * gtkutil.c (xg_create_frame_widgets): Call
- gtk_window_set_has_resize_grip (FALSE) if that function is
+ * gtkutil.c (xg_create_frame_widgets):
+ Call gtk_window_set_has_resize_grip (FALSE) if that function is
present with Gtk+ 2.0.
2011-11-26 Paul Eggert <eggert@cs.ucla.edu>
@@ -303,8 +564,8 @@
* xdisp.c (display_line): Move the call to
highlight_trailing_whitespace before the call to
compute_line_metrics, since the latter needs to see the final
- faces of all the glyphs to compute ROW's hash value. Fixes
- assertion violations in row_equal_p. (Bug#10035)
+ faces of all the glyphs to compute ROW's hash value.
+ Fixes assertion violations in row_equal_p. (Bug#10035)
2011-11-14 Juanma Barranquero <lekktu@gmail.com>
@@ -388,8 +649,8 @@
2011-11-08 Chong Yidong <cyd@gnu.org>
* window.c (Fwindow_left_column, Fwindow_top_line): Doc fix.
- (Fwindow_body_height, Fwindow_body_width): Move from Lisp. Signal
- an error if not a live window.
+ (Fwindow_body_height, Fwindow_body_width): Move from Lisp.
+ Signal an error if not a live window.
(Fwindow_total_width, Fwindow_total_height): Move from Lisp.
(Fwindow_total_size, Fwindow_body_size): Move to Lisp.
@@ -521,8 +782,8 @@
(x_destroy_window): Move code to x_free_frame_resources.
* xfns.c (unwind_create_frame): Fix comment.
- (Fx_create_frame, x_create_tip_frame): Move
- terminal->reference_count++ just before making the frame
+ (Fx_create_frame, x_create_tip_frame):
+ Move terminal->reference_count++ just before making the frame
official. Move initialization of image_cache_refcount and
dpyinfo_refcount before calling init_frame_faces (Bug#9943).
@@ -592,8 +853,8 @@
* xdisp.c (mouse_face_from_buffer_pos): Fix a typo in a comment.
Don't stop backward scan on the continuation glyph, even though
its CHARPOS is positive.
- (mouse_face_from_buffer_pos, note_mouse_highlight): Rename
- cover_string to disp_string.
+ (mouse_face_from_buffer_pos, note_mouse_highlight):
+ Rename cover_string to disp_string.
2011-11-01 Martin Rudalics <rudalics@gmx.at>
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 @@
* w32fns.c (current_popup_menu): Use from w32menu.c.
(w32_wnd_proc) <WM_EXITMENULOOP, WM_TIMER>: Use menubar_active
and current_popup_menu to determine whether a menubar menu has
- been cancelled.
+ been canceled.
* w32term.h (w32_output): Remove menu_command_in_progress.
@@ -15816,14 +15816,14 @@
Add prototypes.
* macterm.c (mac_draw_bitmap): Add overlay_p arg.
- (x_draw_fringe_bitmap): Handle overlayed fringe bitmaps;
+ (x_draw_fringe_bitmap): Handle overlaid fringe bitmaps;
thanks to YAMAMOTO Mitsuharu for advice on how to do this.
Use cursor color for displaying cursor in fringe.
(x_redisplay_interface): Add null handlers for
define_fringe_bitmap and destroy_fringe_bitmap functions.
* w32term.c (w32_draw_fringe_bitmap): Copy unadapted code from
- xterm.c to handle overlayed fringe bitmaps and to use cursor color
+ xterm.c to handle overlaid fringe bitmaps and to use cursor color
for displaying cursor in fringe.
(w32_define_fringe_bitmap, w32_destroy_fringe_bitmap): New W32
specific functions to define and destroy fringe bitmaps in fringe_bmp.
@@ -15849,7 +15849,7 @@
(display_line): Handle cursor in fringe at eob.
(display_line): Set row user fringe bitmaps from iterator.
- * xterm.c (x_draw_fringe_bitmap): Handle overlayed fringe bitmaps.
+ * xterm.c (x_draw_fringe_bitmap): Handle overlaid fringe bitmaps.
Use cursor color for displaying cursor in fringe.
(x_redisplay_interface): Add null handlers for
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 @@
* font.c (font_update_drivers): Sanity fallback to avoid disabling
all drivers.
- * nsterm.m (-windowDidResize:): Avoid inf-loop under GNUStep.
+ * nsterm.m (-windowDidResize:): Avoid inf-loop under GNUstep.
2009-05-06 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
@@ -23182,7 +23182,7 @@
* font.c (font_prop_validate_symbol, font_prop_validate_style)
(font_prop_validate_non_neg, font_prop_validate_spacing):
Delete argument prop_index.
- (font_property_table): Change arguments to validater. Change Callers.
+ (font_property_table): Change arguments to validator. Change Callers.
(font_lispy_object): Delete.
(font_at): Use font_find_object instead fo font_lispy_object.
@@ -30657,7 +30657,7 @@
(display_buffer): Do not set split_height_threshold to twice the
value of window_min_height to avoid changing the value of a
customizable variable. Rather explicitly check whether the
- height of the window that shall be splitted is at least as large
+ height of the window that shall be split is at least as large
as split_height_threshold.
(Fwindow_full_width_p): New defun.
(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 @@
1987-03-13 Richard M. Stallman (rms@prep)
* sysdep.c: Don't redefine TCSETAW if already defined.
- (Cancelled by change on March 17).
+ (Canceled by change on March 17).
* sunfns.c: New file containing interface to Sun windows.
This is enabled by the switch HAVE_SUN_WINDOWS.
@@ -2254,7 +2254,7 @@
Initialize save_color.
* fileio.c, search.c, sysdep.c, filelock.c, editfns.c, process.c:
- Delete/replace unused/conditionalised variables
+ Delete/replace unused/conditionalized variables
1987-01-15 Richard M. Stallman (rms@prep)
@@ -2632,7 +2632,7 @@
* fns.c: Fding requires an arg; pass Qnil.
* m-alliant.h: define TEXT_START as 0x1000.
- Don't define LIBS_STANDARD; the default (sharable) library
+ Don't define LIBS_STANDARD; the default (shareable) library
is said to work now.
* alloc.c (mark_object): Now pass address of slot being marked.
@@ -4220,7 +4220,7 @@
Increase PURESIZE again (sigh)
* unexec.c (write_segment):
- Kludgey coercions ("(int)") to get this line to compile:
+ Kludgy coercions ("(int)") to get this line to compile:
nwrite = (((int) ptr + 128) & ~127) - (int) ptr;
Also changed incorrect ~128 to ~127.
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 @@
1998-01-12 Kenichi Handa <handa@etl.go.jp>
- * minibuf.c (Fminibuffer_complete_word): Fix a bug of refering
+ * minibuf.c (Fminibuffer_complete_word): Fix a bug of referring
`i'. We must refer `i_byte' instead.
* 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 @@
* dispextern.h (struct glyph_row): Flag internal_border_p removed.
* xfns.c (x_create_tip_frame): Don't set bitmapIcon resource
- because this will try to access a nonexisting widget.
+ because this will try to access a nonexistent widget.
1999-07-26 Markus Rost <rost@gnu.org>
@@ -11485,7 +11485,7 @@
Substitute homedir by `~' also in default_filename.
* xdisp.c (try_window_id): Fix computation of tab_offset when
- backing up over a character that is splitted across lines.
+ backing up over a character that is split across lines.
1999-05-08 Kenichi HANDA <handa@etl.go.jp>
@@ -12583,7 +12583,7 @@
quit_char is typed, in order to break out of potential deadlocks.
(cancel_all_deferred_msgs): New function.
(complete_deferred_msg): Don't abort if msg not found; may have
- been cancelled.
+ been canceled.
(Fw32_reconstruct_hot_key): Use pre-interned symbols.
(Fw32_send_sys_command): Wait for system command to
complete before returning.
@@ -13701,7 +13701,7 @@
* ccl.c (CCL_WRITE_CHAR): Don't use bcopy.
(ccl_driver): If BUFFER-MAGNIFICATION of the CCL program is 0,
cause error if the program is going to output some bytes. When
- outputing a string to notify an error, check the case that
+ outputting a string to notify an error, check the case that
DST_BYTES is zero.
* 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. */);
Vgc_cons_percentage = make_float (0.1);
DEFVAR_INT ("pure-bytes-used", pure_bytes_used,
- doc: /* Number of bytes of sharable Lisp data allocated so far. */);
+ doc: /* Number of bytes of shareable Lisp data allocated so far. */);
DEFVAR_INT ("cons-cells-consed", cons_cells_consed,
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
ptrdiff_t i, nargs;
int foo;
- char prompt1[100];
- char *tem1;
int arg_from_tty = 0;
struct gcpro gcpro1, gcpro2, gcpro3, gcpro4, gcpro5;
int key_count;
@@ -491,13 +489,8 @@ invoke it. If KEYS is omitted or nil, the return value of
tem = string;
for (i = 1; *tem; i++)
{
- strncpy (prompt1, tem + 1, sizeof prompt1 - 1);
- prompt1[sizeof prompt1 - 1] = 0;
- tem1 = strchr (prompt1, '\n');
- if (tem1) *tem1 = 0;
-
- visargs[0] = build_string (prompt1);
- if (strchr (prompt1, '%'))
+ visargs[0] = make_string (tem + 1, strcspn (tem + 1, "\n"));
+ if (strchr (SSDATA (visargs[0]), '%'))
callint_message = Fformat (i, visargs);
else
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;
#define CCL_WriteArrayReadJump 0x0B /* Write an array element, read, and jump:
1:A--D--D--R--E--S--S-rrrXXXXX
2:LENGTH
- 3:ELEMENET[0]
- 4:ELEMENET[1]
+ 3:ELEMENT[0]
+ 4:ELEMENT[1]
...
N:A--D--D--R--E--S--S-rrrYYYYY
------------------------------
@@ -552,7 +552,7 @@ static Lisp_Object Vccl_program_table;
But, when VALm is mapped to VALn and VALn is not a number, the
mapping proceed as below:
- If VALn is nil, the lastest map is ignored and the mapping of VALm
+ If VALn is nil, the last map is ignored and the mapping of VALm
proceed to the next map.
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)
}
-/* Return a character correponding to the code-point CODE of
+/* Return a character corresponding to the code-point CODE of
CHARSET. */
int
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
int unified_p;
};
-/* Hash table of charset symbols vs. the correponding attribute
+/* Hash table of charset symbols vs. the corresponding attribute
vectors. */
extern Lisp_Object Vcharset_hash_table;
@@ -389,7 +389,7 @@ extern Lisp_Object Vchar_charset_set;
#endif
-/* Return a character correponding to the code-point CODE of CHARSET.
+/* Return a character corresponding to the code-point CODE of CHARSET.
Try some optimization before calling decode_char. */
#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.
You should have received a copy of the GNU General Public License
along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
-/* Holds the minimum and maximum costs for the parametrized capabilities. */
+/* Holds the minimum and maximum costs for the parameterized capabilities. */
struct parmcap
{
int mincost, maxcost;
@@ -79,7 +79,7 @@ struct cm
struct parmcap cc_multiright; /* multiple right (RI) */
#endif
- /* Costs for the non-parametrized capabilities */
+ /* Costs for the non-parameterized capabilities */
int cc_up; /* cost for up */
int cc_down; /* etc. */
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 *);
static void decode_coding_raw_text (struct coding_system *);
static int encode_coding_raw_text (struct coding_system *);
-static void coding_set_source (struct coding_system *);
-static void coding_set_destination (struct coding_system *);
+static EMACS_INT coding_set_source (struct coding_system *);
+static EMACS_INT coding_set_destination (struct coding_system *);
static void coding_alloc_by_realloc (struct coding_system *, EMACS_INT);
static void coding_alloc_by_making_gap (struct coding_system *,
EMACS_INT, EMACS_INT);
static unsigned char *alloc_destination (struct coding_system *,
EMACS_INT, unsigned char *);
static void setup_iso_safe_charsets (Lisp_Object);
-static unsigned char *encode_designation_at_bol (struct coding_system *,
- int *, unsigned char *);
+static int encode_designation_at_bol (struct coding_system *,
+ int *, int *, unsigned char *);
static int detect_eol (const unsigned char *,
EMACS_INT, enum coding_category);
static Lisp_Object adjust_coding_eol_type (struct coding_system *, int);
@@ -915,27 +915,68 @@ record_conversion_result (struct coding_system *coding,
}
}
-/* This wrapper macro is used to preserve validity of pointers into
- buffer text across calls to decode_char, which could cause
- relocation of buffers if it loads a charset map, because loading a
- charset map allocates large structures. */
+/* These wrapper macros are used to preserve validity of pointers into
+ buffer text across calls to decode_char, encode_char, etc, which
+ could cause relocation of buffers if it loads a charset map,
+ because loading a charset map allocates large structures. */
+
#define CODING_DECODE_CHAR(coding, src, src_base, src_end, charset, code, c) \
do { \
+ EMACS_INT offset; \
+ \
charset_map_loaded = 0; \
c = DECODE_CHAR (charset, code); \
- if (charset_map_loaded) \
+ if (charset_map_loaded \
+ && (offset = coding_set_source (coding))) \
{ \
- const unsigned char *orig = coding->source; \
- EMACS_INT offset; \
- \
- coding_set_source (coding); \
- offset = coding->source - orig; \
src += offset; \
src_base += offset; \
src_end += offset; \
} \
} while (0)
+#define CODING_ENCODE_CHAR(coding, dst, dst_end, charset, c, code) \
+ do { \
+ EMACS_INT offset; \
+ \
+ charset_map_loaded = 0; \
+ code = ENCODE_CHAR (charset, c); \
+ if (charset_map_loaded \
+ && (offset = coding_set_destination (coding))) \
+ { \
+ dst += offset; \
+ dst_end += offset; \
+ } \
+ } while (0)
+
+#define CODING_CHAR_CHARSET(coding, dst, dst_end, c, charset_list, code_return, charset) \
+ do { \
+ EMACS_INT offset; \
+ \
+ charset_map_loaded = 0; \
+ charset = char_charset (c, charset_list, code_return); \
+ if (charset_map_loaded \
+ && (offset = coding_set_destination (coding))) \
+ { \
+ dst += offset; \
+ dst_end += offset; \
+ } \
+ } while (0)
+
+#define CODING_CHAR_CHARSET_P(coding, dst, dst_end, c, charset, result) \
+ do { \
+ EMACS_INT offset; \
+ \
+ charset_map_loaded = 0; \
+ result = CHAR_CHARSET_P (c, charset); \
+ if (charset_map_loaded \
+ && (offset = coding_set_destination (coding))) \
+ { \
+ dst += offset; \
+ dst_end += offset; \
+ } \
+ } while (0)
+
/* If there are at least BYTES length of room at dst, allocate memory
for coding->destination and update dst and dst_end. We don't have
@@ -1015,9 +1056,14 @@ record_conversion_result (struct coding_system *coding,
| ((p)[-1] & 0x3F))))
-static void
+/* Update coding->source from coding->src_object, and return how many
+ bytes coding->source was changed. */
+
+static EMACS_INT
coding_set_source (struct coding_system *coding)
{
+ const unsigned char *orig = coding->source;
+
if (BUFFERP (coding->src_object))
{
struct buffer *buf = XBUFFER (coding->src_object);
@@ -1036,11 +1082,18 @@ coding_set_source (struct coding_system *coding)
/* Otherwise, the source is C string and is never relocated
automatically. Thus we don't have to update anything. */
}
+ return coding->source - orig;
}
-static void
+
+/* Update coding->destination from coding->dst_object, and return how
+ many bytes coding->destination was changed. */
+
+static EMACS_INT
coding_set_destination (struct coding_system *coding)
{
+ const unsigned char *orig = coding->destination;
+
if (BUFFERP (coding->dst_object))
{
if (BUFFERP (coding->src_object) && coding->src_pos < 0)
@@ -1065,6 +1118,7 @@ coding_set_destination (struct coding_system *coding)
/* Otherwise, the destination is C string and is never relocated
automatically. Thus we don't have to update anything. */
}
+ return coding->destination - orig;
}
@@ -2650,14 +2704,19 @@ encode_coding_emacs_mule (struct coding_system *coding)
if (preferred_charset_id >= 0)
{
+ int result;
+
charset = CHARSET_FROM_ID (preferred_charset_id);
- if (CHAR_CHARSET_P (c, charset))
+ CODING_CHAR_CHARSET_P (coding, dst, dst_end, c, charset, result);
+ if (result)
code = ENCODE_CHAR (charset, c);
else
- charset = char_charset (c, charset_list, &code);
+ CODING_CHAR_CHARSET (coding, dst, dst_end, c, charset_list,
+ &code, charset);
}
else
- charset = char_charset (c, charset_list, &code);
+ CODING_CHAR_CHARSET (coding, dst, dst_end, c, charset_list,
+ &code, charset);
if (! charset)
{
c = coding->default_char;
@@ -2666,7 +2725,8 @@ encode_coding_emacs_mule (struct coding_system *coding)
EMIT_ONE_ASCII_BYTE (c);
continue;
}
- charset = char_charset (c, charset_list, &code);
+ CODING_CHAR_CHARSET (coding, dst, dst_end, c, charset_list,
+ &code, charset);
}
dimension = CHARSET_DIMENSION (charset);
emacs_mule_id = CHARSET_EMACS_MULE_ID (charset);
@@ -4185,7 +4245,8 @@ decode_coding_iso_2022 (struct coding_system *coding)
#define ENCODE_ISO_CHARACTER(charset, c) \
do { \
- int code = ENCODE_CHAR ((charset), (c)); \
+ int code; \
+ CODING_ENCODE_CHAR (coding, dst, dst_end, (charset), (c), code); \
\
if (CHARSET_DIMENSION (charset) == 1) \
ENCODE_ISO_CHARACTER_DIMENSION1 ((charset), code); \
@@ -4283,15 +4344,19 @@ encode_invocation_designation (struct charset *charset,
/* Produce designation sequences of charsets in the line started from
- SRC to a place pointed by DST, and return updated DST.
+ CHARBUF to a place pointed by DST, and return the number of
+ produced bytes. DST should not directly point a buffer text area
+ which may be relocated by char_charset call.
If the current block ends before any end-of-line, we may fail to
find all the necessary designations. */
-static unsigned char *
-encode_designation_at_bol (struct coding_system *coding, int *charbuf,
+static int
+encode_designation_at_bol (struct coding_system *coding,
+ int *charbuf, int *charbuf_end,
unsigned char *dst)
{
+ unsigned char *orig = dst;
struct charset *charset;
/* Table of charsets to be designated to each graphic register. */
int r[4];
@@ -4309,7 +4374,7 @@ encode_designation_at_bol (struct coding_system *coding, int *charbuf,
for (reg = 0; reg < 4; reg++)
r[reg] = -1;
- while (found < 4)
+ while (charbuf < charbuf_end && found < 4)
{
int id;
@@ -4334,7 +4399,7 @@ encode_designation_at_bol (struct coding_system *coding, int *charbuf,
ENCODE_DESIGNATION (CHARSET_FROM_ID (r[reg]), reg, coding);
}
- return dst;
+ return dst - orig;
}
/* See the above "GENERAL NOTES on `encode_coding_XXX ()' functions". */
@@ -4378,13 +4443,26 @@ encode_coding_iso_2022 (struct coding_system *coding)
if (bol_designation)
{
- unsigned char *dst_prev = dst;
-
/* We have to produce designation sequences if any now. */
- dst = encode_designation_at_bol (coding, charbuf, dst);
- bol_designation = 0;
+ unsigned char desig_buf[16];
+ int nbytes;
+ EMACS_INT offset;
+
+ charset_map_loaded = 0;
+ nbytes = encode_designation_at_bol (coding, charbuf, charbuf_end,
+ desig_buf);
+ if (charset_map_loaded
+ && (offset = coding_set_destination (coding)))
+ {
+ dst += offset;
+ dst_end += offset;
+ }
+ memcpy (dst, desig_buf, nbytes);
+ dst += nbytes;
/* We are sure that designation sequences are all ASCII bytes. */
- produced_chars += dst - dst_prev;
+ produced_chars += nbytes;
+ bol_designation = 0;
+ ASSURE_DESTINATION (safe_room);
}
c = *charbuf++;
@@ -4455,12 +4533,17 @@ encode_coding_iso_2022 (struct coding_system *coding)
if (preferred_charset_id >= 0)
{
+ int result;
+
charset = CHARSET_FROM_ID (preferred_charset_id);
- if (! CHAR_CHARSET_P (c, charset))
- charset = char_charset (c, charset_list, NULL);
+ CODING_CHAR_CHARSET_P (coding, dst, dst_end, c, charset, result);
+ if (! result)
+ CODING_CHAR_CHARSET (coding, dst, dst_end, c, charset_list,
+ NULL, charset);
}
else
- charset = char_charset (c, charset_list, NULL);
+ CODING_CHAR_CHARSET (coding, dst, dst_end, c, charset_list,
+ NULL, charset);
if (!charset)
{
if (coding->mode & CODING_MODE_SAFE_ENCODING)
@@ -4471,7 +4554,8 @@ encode_coding_iso_2022 (struct coding_system *coding)
else
{
c = coding->default_char;
- charset = char_charset (c, charset_list, NULL);
+ CODING_CHAR_CHARSET (coding, dst, dst_end, c,
+ charset_list, NULL, charset);
}
}
ENCODE_ISO_CHARACTER (charset, c);
@@ -4897,7 +4981,9 @@ encode_coding_sjis (struct coding_system *coding)
else
{
unsigned code;
- struct charset *charset = char_charset (c, charset_list, &code);
+ struct charset *charset;
+ CODING_CHAR_CHARSET (coding, dst, dst_end, c, charset_list,
+ &code, charset);
if (!charset)
{
@@ -4909,7 +4995,8 @@ encode_coding_sjis (struct coding_system *coding)
else
{
c = coding->default_char;
- charset = char_charset (c, charset_list, &code);
+ CODING_CHAR_CHARSET (coding, dst, dst_end, c,
+ charset_list, &code, charset);
}
}
if (code == CHARSET_INVALID_CODE (charset))
@@ -4984,7 +5071,9 @@ encode_coding_big5 (struct coding_system *coding)
else
{
unsigned code;
- struct charset *charset = char_charset (c, charset_list, &code);
+ struct charset *charset;
+ CODING_CHAR_CHARSET (coding, dst, dst_end, c, charset_list,
+ &code, charset);
if (! charset)
{
@@ -4996,7 +5085,8 @@ encode_coding_big5 (struct coding_system *coding)
else
{
c = coding->default_char;
- charset = char_charset (c, charset_list, &code);
+ CODING_CHAR_CHARSET (coding, dst, dst_end, c,
+ charset_list, &code, charset);
}
}
if (code == CHARSET_INVALID_CODE (charset))
@@ -5154,7 +5244,7 @@ encode_coding_ccl (struct coding_system *coding)
&& coding->mode & CODING_MODE_LAST_BLOCK)
ccl->last_block = 1;
- while (charbuf < charbuf_end)
+ do
{
ccl_driver (ccl, charbuf, destination_charbuf,
charbuf_end - charbuf, 1024, charset_list);
@@ -5176,6 +5266,7 @@ encode_coding_ccl (struct coding_system *coding)
|| ccl->status == CCL_STAT_INVALID_CMD)
break;
}
+ while (charbuf < charbuf_end);
switch (ccl->status)
{
@@ -5572,7 +5663,9 @@ encode_coding_charset (struct coding_system *coding)
}
else
{
- charset = char_charset (c, charset_list, &code);
+ CODING_CHAR_CHARSET (coding, dst, dst_end, c, charset_list,
+ &code, charset);
+
if (charset)
{
if (CHARSET_DIMENSION (charset) == 1)
@@ -8663,6 +8756,7 @@ to the string. */)
}
positions = Qnil;
+ charset_map_loaded = 0;
while (1)
{
int c;
@@ -8690,6 +8784,16 @@ to the string. */)
}
from++;
+ if (charset_map_loaded && NILP (string))
+ {
+ p = CHAR_POS_ADDR (from);
+ pend = CHAR_POS_ADDR (to);
+ if (from < GPT && to >= GPT)
+ stop = GPT_ADDR;
+ else
+ stop = pend;
+ charset_map_loaded = 0;
+ }
}
return (NILP (count) ? Fcar (positions) : Fnreverse (positions));
@@ -9208,7 +9312,7 @@ frame's terminal device. */)
= TERMINAL_TERMINAL_CODING (get_terminal (terminal, 1));
Lisp_Object coding_system = CODING_ID_NAME (terminal_coding->id);
- /* For backward compatibility, return nil if it is `undecided'. */
+ /* For backward compatibility, return nil if it is `undecided'. */
return (! EQ (coding_system, Qundecided) ? coding_system : Qnil);
}
@@ -9895,8 +9999,6 @@ usage: (define-coding-system-internal ...) */)
{
Lisp_Object bom;
- CODING_ATTR_ASCII_COMPAT (attrs) = Qt;
-
if (nargs < coding_arg_utf8_max)
goto short_args;
@@ -9910,6 +10012,8 @@ usage: (define-coding-system-internal ...) */)
CHECK_CODING_SYSTEM (val);
}
ASET (attrs, coding_attr_utf_bom, bom);
+ if (NILP (bom))
+ CODING_ATTR_ASCII_COMPAT (attrs) = Qt;
category = (CONSP (bom) ? coding_category_utf_8_auto
: 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
/* Number of error source data found in a decoding routine. */
int errors;
- /* Store the positions of error source data. */
+ /* Store the positions of error source data. */
EMACS_INT *error_positions;
/* 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)
case Lisp_Fwd_Kboard_Obj:
/* We used to simply use current_kboard here, but from Lisp
- code, it's value is often unexpected. It seems nicer to
+ code, its value is often unexpected. It seems nicer to
allow constructions like this to work as intuitively expected:
(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,
connection = xd_initialize (bus, TRUE);
/* Add the watch functions. We pass also the bus as data, in order
- to distinguish between the busses in xd_remove_watch. */
+ to distinguish between the buses in xd_remove_watch. */
if (!dbus_connection_set_watch_functions (connection,
xd_add_watch,
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) */)
enum
{
/* Maximum precision for a %f conversion such that the
- trailing output digit might be nonzero. Any precisions
+ trailing output digit might be nonzero. Any precision
larger than this will not yield useful information. */
USEFUL_PRECISION_MAX =
((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;
Lisp_Object Qrisky_local_variable;
+Lisp_Object Qkill_emacs;
+
/* If non-zero, Emacs should not attempt to use a window-specific code,
but instead should use the virtual terminal under which it was started. */
int inhibit_window_system;
@@ -322,6 +324,12 @@ static void (*fatal_error_signal_hook) (void);
pthread_t main_thread;
#endif
+#ifdef HAVE_NS
+/* NS autrelease pool, for memory management. */
+static void *ns_pool;
+#endif
+
+
/* Handle bus errors, invalid instruction, etc. */
#ifndef FLOAT_CATCH_SIGILL
@@ -952,7 +960,7 @@ main (int argc, char **argv)
}
/* Command line option --no-windows is deprecated and thus not mentioned
- in the manual and usage informations. */
+ in the manual and usage information. */
if (argmatch (argv, argc, "-nw", "--no-window-system", 6, NULL, &skip_args)
|| argmatch (argv, argc, "-nw", "--no-windows", 6, NULL, &skip_args))
inhibit_window_system = 1;
@@ -1319,7 +1327,7 @@ Using an Emacs configured with --with-x-toolkit=lucid does not have this problem
= argmatch (argv, argc, "-nsl", "--no-site-lisp", 11, NULL, &skip_args);
#ifdef HAVE_NS
- ns_alloc_autorelease_pool ();
+ ns_pool = ns_alloc_autorelease_pool ();
if (!noninteractive)
{
#ifdef NS_IMPL_COCOA
@@ -2019,6 +2027,10 @@ all of which are called before Emacs is actually killed. */)
shut_down_emacs (0, 0, STRINGP (arg) ? arg : Qnil);
+#ifdef HAVE_NS
+ ns_release_autorelease_pool (ns_pool);
+#endif
+
/* If we have an auto-save list file,
kill it because we are exiting Emacs deliberately (not crashing).
Do it after shut_down_emacs, which does an auto-save. */
@@ -2400,6 +2412,7 @@ syms_of_emacs (void)
{
DEFSYM (Qfile_name_handler_alist, "file-name-handler-alist");
DEFSYM (Qrisky_local_variable, "risky-local-variable");
+ DEFSYM (Qkill_emacs, "kill-emacs");
#ifndef CANNOT_DUMP
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 @@
-/* A Gtk Widget that inherits GtkFixed, but can be shrinked.
+/* A Gtk Widget that inherits GtkFixed, but can be shrunk.
This file is only use when compiling with Gtk+ 3.
Copyright (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 @@
-/* A Gtk Widget that inherits GtkFixed, but can be shrinked.
+/* A Gtk Widget that inherits GtkFixed, but can be shrunk.
This file is only use when compiling with Gtk+ 3.
Copyright (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);
static int maybe_call_debugger (Lisp_Object conditions, Lisp_Object sig,
Lisp_Object data);
+void
+process_quit_flag (void)
+{
+ Lisp_Object flag = Vquit_flag;
+ Vquit_flag = Qnil;
+ if (EQ (flag, Qkill_emacs))
+ Fkill_emacs (Qnil);
+ if (EQ (Vthrow_on_input, flag))
+ Fthrow (Vthrow_on_input, Qt);
+ Fsignal (Qquit, Qnil);
+}
+
DEFUN ("signal", Fsignal, Ssignal, 2, 2, 0,
doc: /* Signal an error. Args are ERROR-SYMBOL and associated DATA.
This function does not return.
@@ -3733,7 +3745,7 @@ When lexical binding is not being used, this variable is nil.
A value of `(t)' indicates an empty environment, otherwise it is an
alist of active lexical bindings. */);
Vinternal_interpreter_environment = Qnil;
- /* Don't export this variable to Elisp, so noone can mess with it
+ /* Don't export this variable to Elisp, so no one can mess with it
(Just imagine if someone makes it buffer-local). */
Funintern (Qinternal_interpreter_environment, Qnil);
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)
return (st.st_mode & S_IWRITE || S_ISDIR (st.st_mode));
#else /* not MSDOS */
#ifdef HAVE_EUIDACCESS
- return (euidaccess (filename, 2) >= 0);
-#else
+ int res = (euidaccess (filename, 2) >= 0);
+#ifdef CYGWIN
+ /* euidaccess may have returned failure because Cygwin couldn't
+ determine the file's UID or GID; if so, we return success. */
+ if (!res)
+ {
+ struct stat st;
+ if (stat (filename, &st) < 0)
+ return 0;
+ res = (st.st_uid == -1 || st.st_gid == -1);
+ }
+#endif /* CYGWIN */
+ return res;
+#else /* not HAVE_EUIDACCESS */
/* Access isn't quite right because it uses the real uid
and we really want to test with the effective uid.
But Unix doesn't give us a right way to do it.
Opening with O_WRONLY could work for an ordinary file,
but would lose for directories. */
return (access (filename, 2) >= 0);
-#endif
+#endif /* not HAVE_EUIDACCESS */
#endif /* not MSDOS */
}
@@ -4186,7 +4198,7 @@ variable `last-coding-system-used' to the coding system actually used. */)
/* If REPLACE is non-nil and we succeeded in not replacing the
beginning or end of the buffer text with the file's contents,
call format-decode with `point' positioned at the beginning
- of the buffer and `inserted' equalling the number of
+ of the buffer and `inserted' equaling the number of
characters in the buffer. Otherwise, format-decode might
fail to correctly analyze the beginning or end of the buffer.
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
/* Function to validate PROP's value VAL, or NULL if any value is
ok. The value is VAL or its regularized value if VAL is valid,
and Qerror if not. */
- Lisp_Object (*validater) (Lisp_Object prop, Lisp_Object val);
+ Lisp_Object (*validator) (Lisp_Object prop, Lisp_Object val);
} font_property_table[] =
{ { &QCtype, font_prop_validate_symbol },
{ &QCfoundry, font_prop_validate_symbol },
@@ -672,7 +672,7 @@ font_prop_validate (int idx, Lisp_Object prop, Lisp_Object val)
if (idx < 0)
return val;
}
- validated = (font_property_table[idx].validater) (prop, val);
+ validated = (font_property_table[idx].validator) (prop, val);
if (EQ (validated, Qerror))
signal_error ("invalid font property", Fcons (prop, val));
return validated;
@@ -825,7 +825,7 @@ font_expand_wildcards (Lisp_Object *field, int n)
range_mask = (range_mask << 1) | 1;
/* The triplet RANGE_FROM, RANGE_TO, and RANGE_MASK is a
- position-based retriction for FIELD[I]. */
+ position-based restriction for FIELD[I]. */
for (i = 0, range_from = 0, range_to = 14 - n; i < n;
i++, range_from++, range_to++, range_mask <<= 1)
{
@@ -842,7 +842,7 @@ font_expand_wildcards (Lisp_Object *field, int n)
else
{
/* The triplet FROM, TO, and MASK is a value-based
- retriction for FIELD[I]. */
+ restriction for FIELD[I]. */
int from, to;
unsigned mask;
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
/* Optional.
Get coordinates of the INDEXth anchor point of the glyph whose
code is CODE. Store the coordinates in *X and *Y. Return 0 if
- the operations was successfull. Otherwise return -1. */
+ the operations was successful. Otherwise return -1. */
int (*anchor_point) (struct font *font, unsigned code, int index,
int *x, int *y);
@@ -705,7 +705,7 @@ struct font_driver
/* Chain of font drivers. There's one global font driver list
- (font_driver_list in font.c). In addition, each frame has it's own
+ (font_driver_list in font.c). In addition, each frame has its own
font driver list at FRAME_PTR->font_driver_list. */
struct font_driver_list
@@ -721,7 +721,7 @@ struct font_driver_list
/* Chain of arbitrary data specific to each font driver. Each frame
- has it's own font data list at FRAME_PTR->font_data_list. */
+ has its own font data list at FRAME_PTR->font_data_list. */
struct font_data_list
{
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/>. */
These structures are hidden from the other codes than this file.
The other codes handle fontsets only by their ID numbers. They
usually use the variable name `fontset' for IDs. But, in this
- file, we always use varialbe name `id' for IDs, and name `fontset'
+ file, we always use variable name `id' for IDs, and name `fontset'
for an actual fontset object, i.e., char-table.
*/
@@ -643,7 +643,7 @@ fontset_find_font (Lisp_Object fontset, int c, struct face *face, int id, int fa
if (font_has_char (f, font_object, c))
goto found;
- /* Find a font already opened, maching with the current spec,
+ /* Find a font already opened, matching with the current spec,
and supporting C. */
font_def = RFONT_DEF_FONT_DEF (rfont_def);
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
FOCUS-FRAME after reading an event typed at FRAME.
If FOCUS-FRAME is omitted or nil, any existing redirection is
-cancelled, and the frame again receives its own keystrokes.
+canceled, and the frame again receives its own keystrokes.
Focus redirection is useful for temporarily redirecting keystrokes to
a 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)
char *str, *end;
Lisp_Object adstyle;
+#ifdef FC_FONTFORMAT
+ if ((FcPatternGetString (p, FC_FONTFORMAT, 0, &fcstr) == FcResultMatch)
+ && xstrcasecmp ((char *) fcstr, "bdf") != 0
+ && xstrcasecmp ((char *) fcstr, "pcf") != 0)
+ /* Not a BDF nor PCF font. */
+ return Qnil;
+#endif
if (FcPatternGetString (p, FC_STYLE, 0, &fcstr) != FcResultMatch)
return Qnil;
str = (char *) fcstr;
@@ -953,7 +960,7 @@ ftfont_list (Lisp_Object frame, Lisp_Object spec)
/* Need fix because this finds any fonts. */
if (fontset->nfont == 0 && ! NILP (family))
{
- /* Try maching with configuration. For instance, the
+ /* Try matching with configuration. For instance, the
configuration may specify "Nimbus Mono L" as an alias of
"Courier". */
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);
static int ftxfont_draw_bitmap (FRAME_PTR, GC, GC *, struct font *,
unsigned, int, int, XPoint *, int, int *,
int);
-static void ftxfont_draw_backgrond (FRAME_PTR, struct font *, GC,
- int, int, int);
+static void ftxfont_draw_background (FRAME_PTR, struct font *, GC,
+ int, int, int);
struct ftxfont_frame_data
{
@@ -219,7 +219,8 @@ ftxfont_draw_bitmap (FRAME_PTR f, GC gc_fore, GC *gcs, struct font *font, unsign
}
static void
-ftxfont_draw_backgrond (FRAME_PTR f, struct font *font, GC gc, int x, int y, int width)
+ftxfont_draw_background (FRAME_PTR f, struct font *font, GC gc, int x, int y,
+ int width)
{
XGCValues xgcv;
@@ -296,7 +297,7 @@ ftxfont_draw (struct glyph_string *s, int from, int to, int x, int y, int with_b
BLOCK_INPUT;
if (with_background)
- ftxfont_draw_backgrond (f, font, s->gc, x, y, s->width);
+ ftxfont_draw_background (f, font, s->gc, x, y, s->width);
code = alloca (sizeof (unsigned) * len);
for (i = 0; i < len; i++)
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 *,
MagickPixelPacket *);
#endif
+/* Log ImageMagick error message.
+ Useful when a ImageMagick function returns the status `MagickFalse'. */
+
+static void
+imagemagick_error (MagickWand *wand)
+{
+ char *description;
+ ExceptionType severity;
+
+ description = MagickGetException (wand, &severity);
+ image_error ("ImageMagick error: %s",
+ make_string (description, strlen (description)),
+ Qnil);
+ description = (char *) MagickRelinquishMemory (description);
+}
+
/* Helper function for imagemagick_load, which does the actual loading
given contents and size, apart from frame and image structures,
passed from imagemagick_load. Uses librimagemagick to do most of
@@ -7618,6 +7634,7 @@ imagemagick_load_image (struct frame *f, struct image *img,
image = image_spec_value (img->spec, QCindex, NULL);
ino = INTEGERP (image) ? XFASTINT (image) : 0;
ping_wand = NewMagickWand ();
+ /* MagickSetResolution (ping_wand, 2, 2); (Bug#10112) */
if (filename != NULL)
{
@@ -7628,7 +7645,12 @@ imagemagick_load_image (struct frame *f, struct image *img,
status = MagickPingImageBlob (ping_wand, contents, size);
}
- MagickSetResolution (ping_wand, 2, 2);
+ if (status == MagickFalse)
+ {
+ imagemagick_error (ping_wand);
+ DestroyMagickWand (ping_wand);
+ return 0;
+ }
if (! (0 <= ino && ino < MagickGetNumberImages (ping_wand)))
{
@@ -7669,7 +7691,10 @@ imagemagick_load_image (struct frame *f, struct image *img,
{
image_wand = NewMagickWand ();
if (MagickReadImageBlob (image_wand, contents, size) == MagickFalse)
- goto imagemagick_error;
+ {
+ imagemagick_error (image_wand);
+ goto imagemagick_error;
+ }
}
/* 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,
if (status == MagickFalse)
{
image_error ("Imagemagick scale failed", Qnil, Qnil);
+ imagemagick_error (image_wand);
goto imagemagick_error;
}
}
@@ -7751,6 +7777,7 @@ imagemagick_load_image (struct frame *f, struct image *img,
if (status == MagickFalse)
{
image_error ("Imagemagick image rotate failed", Qnil, Qnil);
+ imagemagick_error (image_wand);
goto imagemagick_error;
}
}
@@ -7975,7 +8002,7 @@ recognize as images, such as C. See `imagemagick-types-inhibit'. */)
Qimagemagicktype = intern (imtypes[i]);
typelist = Fcons (Qimagemagicktype, typelist);
}
- return typelist;
+ return Fnreverse (typelist);
}
#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);
static Lisp_Object (Fcommand_execute) (Lisp_Object, Lisp_Object, Lisp_Object,
Lisp_Object);
static void handle_interrupt (void);
-static void quit_throw_to_read_char (void) NO_RETURN;
+static void quit_throw_to_read_char (int) NO_RETURN;
+static void process_special_events (void);
static void timer_start_idle (void);
static void timer_stop_idle (void);
static void timer_resume_idle (void);
@@ -656,7 +657,7 @@ echo_now (void)
echo_kboard = current_kboard;
if (waiting_for_input && !NILP (Vquit_flag))
- quit_throw_to_read_char ();
+ quit_throw_to_read_char (0);
}
/* Turn off echoing, for the start of a new command. */
@@ -3820,7 +3821,7 @@ kbd_buffer_get_event (KBOARD **kbp,
/* If the quit flag is set, then read_char will return
quit_char, so that counts as "available input." */
if (!NILP (Vquit_flag))
- quit_throw_to_read_char ();
+ quit_throw_to_read_char (0);
/* One way or another, wait until input is available; then, if
interrupt handlers have not read it, read it now. */
@@ -4155,14 +4156,12 @@ kbd_buffer_get_event (KBOARD **kbp,
return (obj);
}
-/* Process any events that are not user-visible,
- then return, without reading any user-visible events. */
+/* Process any non-user-visible events (currently X selection events),
+ without reading any user-visible events. */
-void
-swallow_events (int do_display)
+static void
+process_special_events (void)
{
- int old_timers_run;
-
while (kbd_fetch_ptr != kbd_store_ptr)
{
struct input_event *event;
@@ -4197,6 +4196,17 @@ swallow_events (int do_display)
else
break;
}
+}
+
+/* Process any events that are not user-visible, run timer events that
+ are ripe, and return, without reading any user-visible events. */
+
+void
+swallow_events (int do_display)
+{
+ int old_timers_run;
+
+ process_special_events ();
old_timers_run = timers_run;
get_input_pending (&input_pending, READABLE_EVENTS_DO_TIMERS_NOW);
@@ -10538,6 +10548,9 @@ if there is a doubt, the value is t. */)
|| !NILP (Vunread_input_method_events))
return (Qt);
+ /* Process non-user-visible events (Bug#10195). */
+ process_special_events ();
+
get_input_pending (&input_pending,
READABLE_EVENTS_DO_TIMERS_NOW
| READABLE_EVENTS_FILTER_EVENTS);
@@ -10840,7 +10853,7 @@ set_waiting_for_input (struct timeval *time_to_clear)
/* If handle_interrupt was called before and buffered a C-g,
make it run again now, to avoid timing error. */
if (!NILP (Vquit_flag))
- quit_throw_to_read_char ();
+ quit_throw_to_read_char (0);
}
void
@@ -10855,7 +10868,7 @@ clear_waiting_for_input (void)
If we have a frame on the controlling tty, we assume that the
SIGINT was generated by C-g, so we call handle_interrupt.
- Otherwise, the handler kills Emacs. */
+ Otherwise, tell QUIT to kill Emacs. */
static void
interrupt_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 */
if (!terminal)
{
/* If there are no frames there, let's pretend that we are a
- well-behaving UN*X program and quit. We cannot do that while
- GC is in progress, though. */
- if (!gc_in_progress && !waiting_for_input)
- Fkill_emacs (Qnil);
- else
- Vquit_flag = Qt;
+ well-behaving UN*X program and quit. We must not call Lisp
+ in a signal handler, so tell QUIT to exit when it is
+ safe. */
+ Vquit_flag = Qkill_emacs;
}
else
{
@@ -11026,15 +11037,20 @@ handle_interrupt (void)
separate event loop thread like W32. */
#ifndef HAVE_NS
if (waiting_for_input && !echoing)
- quit_throw_to_read_char ();
+ quit_throw_to_read_char (1);
#endif
}
/* Handle a C-g by making read_char return C-g. */
static void
-quit_throw_to_read_char (void)
+quit_throw_to_read_char (int from_signal)
{
+ /* When not called from a signal handler it is safe to call
+ Lisp. */
+ if (!from_signal && EQ (Vquit_flag, Qkill_emacs))
+ Fkill_emacs (Qnil);
+
sigfree ();
/* Prevent another signal from doing this before we finish. */
clear_waiting_for_input ();
@@ -12265,7 +12281,7 @@ text in the region before modifying the buffer. The next
DEFVAR_LISP ("debug-on-event",
Vdebug_on_event,
doc: /* Enter debugger on this event. When Emacs
-receives the special event specifed by this variable, it will try to
+receives the special event specified by this variable, it will try to
break into the debugger as soon as possible instead of processing the
event normally through `special-event-map'.
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/>. */
The files of Emacs are written so as to have no initialized
data that can ever need to be altered except at the first startup.
- This is so that those words can be dumped as sharable text.
+ This is so that those words can be dumped as shareable text.
It is not possible to exercise such control over library files.
So it is necessary to refrain from making their data areas shared.
@@ -47,4 +47,3 @@ char my_endbss[1];
of the bss area used by Emacs. */
static char _my_endbss[1];
char * my_endbss_static = _my_endbss;
-
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;
Exception: if you set immediate_quit to nonzero,
then the handler that responds to the C-g does the quit itself.
This is a good thing to do around a loop that has no side effects
- and (in particular) cannot call arbitrary Lisp code. */
+ and (in particular) cannot call arbitrary Lisp code.
+
+ If quit-flag is set to `kill-emacs' the SIGINT handler has received
+ a request to exit Emacs when it is safe to do. */
#ifdef SYNC_INPUT
extern void process_pending_signals (void);
@@ -2144,16 +2147,11 @@ extern int pending_signals;
#define ELSE_PENDING_SIGNALS
#endif /* not SYNC_INPUT */
+extern void process_quit_flag (void);
#define QUIT \
do { \
if (!NILP (Vquit_flag) && NILP (Vinhibit_quit)) \
- { \
- Lisp_Object flag = Vquit_flag; \
- Vquit_flag = Qnil; \
- if (EQ (Vthrow_on_input, flag)) \
- Fthrow (Vthrow_on_input, Qt); \
- Fsignal (Qquit, Qnil); \
- } \
+ process_quit_flag (); \
ELSE_PENDING_SIGNALS \
} while (0)
@@ -3295,6 +3293,7 @@ extern Lisp_Object Qfile_name_handler_alist;
#ifdef FLOAT_CATCH_SIGILL
extern void fatal_error_signal (int);
#endif
+extern Lisp_Object Qkill_emacs;
EXFUN (Fkill_emacs, 1) NO_RETURN;
#if HAVE_SETLOCALE
void 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)
So we now use the same heuristic as for backquote: old-style
unquotes are only recognized when first on a list, and when
followed by a space.
- Because it's more difficult to peak 2 chars ahead, a new-style
+ Because it's more difficult to peek 2 chars ahead, a new-style
,@ can still not be used outside of a `, unless it's in the middle
of a list. */
if (new_backquote_flag
@@ -4180,13 +4180,16 @@ init_lread (void)
}
/* Add site-lisp under the installation dir, if it exists. */
- tem = Fexpand_file_name (build_string ("site-lisp"),
- Vinstallation_directory);
- tem1 = Ffile_exists_p (tem);
- if (!NILP (tem1))
+ if (!no_site_lisp)
{
- if (NILP (Fmember (tem, Vload_path)))
- Vload_path = Fcons (tem, Vload_path);
+ tem = Fexpand_file_name (build_string ("site-lisp"),
+ Vinstallation_directory);
+ tem1 = Ffile_exists_p (tem);
+ if (!NILP (tem1))
+ {
+ if (NILP (Fmember (tem, Vload_path)))
+ Vload_path = Fcons (tem, Vload_path);
+ }
}
/* If Emacs was not built in the source directory,
@@ -4222,11 +4225,14 @@ init_lread (void)
if (NILP (Fmember (tem, Vload_path)))
Vload_path = Fcons (tem, Vload_path);
- tem = Fexpand_file_name (build_string ("site-lisp"),
- Vsource_directory);
+ if (!no_site_lisp)
+ {
+ tem = Fexpand_file_name (build_string ("site-lisp"),
+ Vsource_directory);
- if (NILP (Fmember (tem, Vload_path)))
- Vload_path = Fcons (tem, Vload_path);
+ if (NILP (Fmember (tem, Vload_path)))
+ Vload_path = Fcons (tem, Vload_path);
+ }
}
}
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,
The optional second arg INITIAL-CONTENTS is an obsolete alternative to
DEFAULT-VALUE. It normally should be nil in new code, except when
HIST is a cons. It is discussed in more detail below.
+
Third arg KEYMAP is a keymap to use whilst reading;
if omitted or nil, the default is `minibuffer-local-map'.
-If fourth arg READ is non-nil, then interpret the result as a Lisp object
+
+If fourth arg READ is non-nil, interpret the result as a Lisp object
and return that object:
in other words, do `(car (read-from-string INPUT-STRING))'
+
Fifth arg HIST, if non-nil, specifies a history list and optionally
the initial position in the list. It can be a symbol, which is the
- history list variable to use, or it can be a cons cell
- (HISTVAR . HISTPOS). In that case, HISTVAR is the history list variable
- to use, and HISTPOS is the initial position for use by the minibuffer
- history commands. For consistency, you should also specify that
- element of the history as the value of INITIAL-CONTENTS. Positions
- are counted starting from 1 at the beginning of the list.
-Sixth arg DEFAULT-VALUE is a default value or list of default values.
- If non-nil, it is available via history commands. If READ is
- non-nil, it is also the default to `read' if the user enters empty
- input. If READ is non-nil, `read-from-minibuffer' does NOT return
- DEFAULT-VALUE for empty input! It returns the empty string.
+ history list variable to use, or a cons cell (HISTVAR . HISTPOS).
+ In that case, HISTVAR is the history list variable to use, and
+ HISTPOS is the initial position for use by the minibuffer history
+ commands. For consistency, you should also specify that element of
+ the history as the value of INITIAL-CONTENTS. Positions are counted
+ starting from 1 at the beginning of the list.
+
+Sixth arg DEFAULT-VALUE, if non-nil, should be a string, which is used
+ as the default to `read' if READ is non-nil and the user enters
+ empty input. But if READ is nil, this function does _not_ return
+ DEFAULT-VALUE for empty input! Instead, it returns the empty string.
+
+ Whatever the value of READ, DEFAULT-VALUE is made available via the
+ minibuffer history commands. DEFAULT-VALUE can also be a list of
+ strings, in which case all the strings are available in the history,
+ and the first string is the default to `read' if READ is non-nil.
+
Seventh arg INHERIT-INPUT-METHOD, if non-nil, means the minibuffer inherits
the current input method and the setting of `enable-multibyte-characters'.
+
If the variable `minibuffer-allow-text-properties' is non-nil,
then the string which is returned includes whatever text properties
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)
if (face)
{
col = ns_lookup_indexed_color (NS_FACE_BACKGROUND (face), f);
- face->background
- = (EMACS_UINT) [[col colorWithAlphaComponent: alpha] retain];
- [col release];
+ face->background = ns_index_color
+ ([col colorWithAlphaComponent: alpha], f);
update_face_from_frame_parameter (f, Qbackground_color, arg);
}
@@ -770,7 +769,7 @@ ns_implicitly_set_icon_type (struct frame *f)
{
Lisp_Object tem;
EmacsView *view = FRAME_NS_VIEW (f);
- id image =nil;
+ id image = nil;
Lisp_Object chain, elt;
NSAutoreleasePool *pool;
BOOL setMini = YES;
@@ -797,7 +796,7 @@ ns_implicitly_set_icon_type (struct frame *f)
}
for (chain = Vns_icon_type_alist;
- (image = nil) && CONSP (chain);
+ image == nil && CONSP (chain);
chain = XCDR (chain))
{
elt = XCAR (chain);
@@ -1076,7 +1075,41 @@ unwind_create_frame (Lisp_Object frame)
return Qnil;
}
+/*
+ * Read geometry related parameters from preferences if not in PARMS.
+ * Returns the union of parms and any preferences read.
+ */
+static Lisp_Object
+get_geometry_from_preferences (struct ns_display_info *dpyinfo,
+ Lisp_Object parms)
+{
+ struct {
+ const char *val;
+ const char *cls;
+ Lisp_Object tem;
+ } r[] = {
+ { "width", "Width", Qwidth },
+ { "height", "Height", Qheight },
+ { "left", "Left", Qleft },
+ { "top", "Top", Qtop },
+ };
+
+ int i;
+ for (i = 0; i < sizeof (r)/sizeof (r[0]); ++i)
+ {
+ if (NILP (Fassq (r[i].tem, parms)))
+ {
+ Lisp_Object value
+ = x_get_arg (dpyinfo, parms, r[i].tem, r[i].val, r[i].cls,
+ RES_TYPE_NUMBER);
+ if (! EQ (value, Qunbound))
+ parms = Fcons (Fcons (r[i].tem, value), parms);
+ }
+ }
+
+ return parms;
+}
/* ==========================================================================
@@ -1285,6 +1318,7 @@ This function is an internal primitive--use `make-frame' instead. */)
x_default_parameter (f, parms, Qtitle, Qnil, "title", "Title",
RES_TYPE_STRING);
+ parms = get_geometry_from_preferences (dpyinfo, parms);
window_prompting = x_figure_window_size (f, parms, 1);
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. */)
return ret ? fname : Qnil;
}
+const char *
+ns_get_defaults_value (const char *key)
+{
+ NSObject *obj = [[NSUserDefaults standardUserDefaults]
+ objectForKey: [NSString stringWithUTF8String: key]];
+
+ if (!obj) return NULL;
+
+ return [[NSString stringWithFormat: @"%@", obj] UTF8String];
+}
+
DEFUN ("ns-get-resource", Fns_get_resource, Sns_get_resource, 2, 2, 0,
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. */)
CHECK_STRING (name);
/*fprintf (stderr, "ns-get-resource checking resource '%s'\n", SDATA (name)); */
- value =[[[NSUserDefaults standardUserDefaults]
- objectForKey: [NSString stringWithUTF8String: SDATA (name)]]
- UTF8String];
+ value = ns_get_defaults_value (SDATA (name));
if (value)
return build_string (value);
@@ -2182,8 +2225,7 @@ x_get_string_resource (XrmDatabase rdb, char *name, char *class)
/* --quick was passed, so this is a no-op. */
return NULL;
- res = [[[NSUserDefaults standardUserDefaults] objectForKey:
- [NSString stringWithUTF8String: toCheck]] UTF8String];
+ res = ns_get_defaults_value (toCheck);
return !res ? NULL :
(!strncasecmp (res, "YES", 3) ? "true" :
(!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)
/* Converts FONT_WEIGHT, FONT_SLANT, FONT_WIDTH, plus family and script/lang
to NSFont descriptor. Information under extra only needed for matching. */
#define STYLE_REF 100
-static NSFontDescriptor
-*ns_spec_to_descriptor(Lisp_Object font_spec)
+static NSFontDescriptor *
+ns_spec_to_descriptor (Lisp_Object font_spec)
{
NSFontDescriptor *fdesc;
NSMutableDictionary *fdAttrs = [NSMutableDictionary new];
@@ -152,8 +152,13 @@ static NSFontDescriptor
[fdAttrs setObject: tdict forKey: NSFontTraitsAttribute];
fdesc = [NSFontDescriptor fontDescriptorWithFontAttributes: fdAttrs];
- if (family != nil)
+ if (family != nil)
+ {
fdesc = [fdesc fontDescriptorWithFamily: family];
+ }
+
+ [fdAttrs release];
+ [tdict release];
return fdesc;
}
@@ -469,6 +474,7 @@ static NSSet
if ([families count] > 0 || pct < 0.05)
break;
}
+ [charset release];
}
#ifdef NS_IMPL_COCOA
if ([families count] == 0)
@@ -536,12 +542,14 @@ ns_findfonts (Lisp_Object font_spec, BOOL isMatch)
family = [fdesc objectForKey: NSFontFamilyAttribute];
if (family != nil && !foundItal && XINT (Flength (list)) > 0)
{
- NSFontDescriptor *sDesc = [[[NSFontDescriptor new]
- fontDescriptorWithSymbolicTraits: NSFontItalicTrait]
- fontDescriptorWithFamily: family];
+ NSFontDescriptor *s1 = [NSFontDescriptor new];
+ NSFontDescriptor *sDesc
+ = [[s1 fontDescriptorWithSymbolicTraits: NSFontItalicTrait]
+ fontDescriptorWithFamily: family];
list = Fcons (ns_descriptor_to_entity (sDesc,
AREF (font_spec, FONT_EXTRA_INDEX),
"synthItal"), list);
+ [s1 release];
}
/* Return something if was a match and nothing found. */
@@ -630,7 +638,7 @@ nsfont_list (Lisp_Object frame, Lisp_Object font_spec)
}
-/* Return a font entity most closely maching with FONT_SPEC on
+/* Return a font entity most closely matching with FONT_SPEC on
FRAME. The closeness is determined by the font backend, thus
`face-font-selection-order' is ignored here.
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)
abort ();
/* create a string containing all Unicode characters in this block */
- for (idx = block<<8, i =0; i<0x100; idx++, i++)
+ for (idx = block<<8, i = 0; i < 0x100; idx++, i++)
if (idx < 0xD800 || idx > 0xDFFF)
unichars[i] = idx;
else
@@ -1309,7 +1317,7 @@ ns_uni_to_glyphs (struct nsfont_info *font_info, unsigned char block)
NSGlyphGenerator *glyphGenerator = [NSGlyphGenerator sharedGlyphGenerator];
/*NSCharacterSet *coveredChars = [nsfont coveredCharacterSet]; */
unsigned int numGlyphs = [font_info->nsfont numberOfGlyphs];
- NSUInteger gInd =0, cInd =0;
+ NSUInteger gInd = 0, cInd = 0;
[glyphStorage setString: allChars font: font_info->nsfont];
[glyphGenerator generateGlyphsForGlyphStorage: glyphStorage
@@ -1317,7 +1325,7 @@ ns_uni_to_glyphs (struct nsfont_info *font_info, unsigned char block)
glyphIndex: &gInd characterIndex: &cInd];
#endif
glyphs = font_info->glyphs[block];
- for (i =0; i<0x100; i++, glyphs++)
+ for (i = 0; i < 0x100; i++, glyphs++)
{
#ifdef NS_IMPL_GNUSTEP
g = unichars[i];
@@ -1425,6 +1433,8 @@ ns_glyph_metrics (struct nsfont_info *font_info, unsigned char block)
- (void) setString: (NSString *)str font: (NSFont *)font
{
[dict setObject: font forKey: NSFontAttributeName];
+ if (attrStr != nil)
+ [attrStr release];
attrStr = [[NSAttributedString alloc] initWithString: str attributes: dict];
maxChar = [str length];
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;
static int popup_activated_flag;
static NSModalSession popupSession;
+/* Nonzero means we are tracking and updating menus. */
+static int trackingMenu;
+
+
/* NOTE: toolbar implementation is at end,
following complete menu implementation. */
@@ -400,6 +404,7 @@ ns_update_menubar (struct frame *f, int deep_p, EmacsMenu *submenu)
items = FRAME_MENU_BAR_ITEMS (f);
if (NILP (items))
{
+ free_menubar_widget_value_tree (first_wv);
[pool release];
UNBLOCK_INPUT;
return;
@@ -427,6 +432,7 @@ ns_update_menubar (struct frame *f, int deep_p, EmacsMenu *submenu)
if (i == n)
{
+ free_menubar_widget_value_tree (first_wv);
[pool release];
UNBLOCK_INPUT;
return;
@@ -543,21 +549,44 @@ set_frame_menubar (struct frame *f, int first_time, int deep_p)
frame = f;
}
+#ifdef NS_IMPL_COCOA
+#if MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_5
+extern NSString *NSMenuDidBeginTrackingNotification;
+#endif
+#endif
+
+#ifdef NS_IMPL_COCOA
+-(void)trackingNotification:(NSNotification *)notification
+{
+ /* Update menu in menuNeedsUpdate only while tracking menus. */
+ trackingMenu = ([notification name] == NSMenuDidBeginTrackingNotification
+ ? 1 : 0);
+}
+#endif
/* delegate method called when a submenu is being opened: run a 'deep' call
to set_frame_menubar */
- (void)menuNeedsUpdate: (NSMenu *)menu
{
- NSEvent *event;
if (!FRAME_LIVE_P (frame))
return;
- event = [[FRAME_NS_VIEW (frame) window] currentEvent];
- /* HACK: Cocoa/Carbon will request update on every keystroke
+
+ /* Cocoa/Carbon will request update on every keystroke
via IsMenuKeyEvent -> CheckMenusForKeyEvent. These are not needed
since key equivalents are handled through emacs.
- On Leopard, even keystroke events generate SystemDefined events, but
- their subtype is 8. */
- if ([event type] != NSSystemDefined || [event subtype] == 8
+ On Leopard, even keystroke events generate SystemDefined event.
+ Third-party applications that enhance mouse / trackpad
+ interaction, or also VNC/Remote Desktop will send events
+ of type AppDefined rather than SysDefined.
+ Menus will fail to show up if they haven't been initialized.
+ AppDefined events may lack timing data.
+
+ Thus, we rely on the didBeginTrackingNotification notification
+ as above to indicate the need for updates.
+ From 10.6 on, we could also use -[NSMenu propertiesToUpdate]: In the
+ key press case, NSMenuPropertyItemImage (e.g.) won't be set.
+ */
+ if (trackingMenu == 0
/* Also, don't try this if from an event picked up asynchronously,
as lots of lisp evaluation happens in ns_update_menubar. */
|| handling_signal != 0)
@@ -1795,6 +1824,11 @@ DEFUN ("menu-or-popup-active-p", Fmenu_or_popup_active_p, Smenu_or_popup_active_
void
syms_of_nsmenu (void)
{
+#ifndef NS_IMPL_COCOA
+ /* Don't know how to keep track of this in Next/Open/Gnustep. Always
+ update menus there. */
+ trackingMenu = 1;
+#endif
defsubr (&Sx_popup_dialog);
defsubr (&Sns_reset_menu);
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)
#include "termhooks.h"
#include "keyboard.h"
-#define CUT_BUFFER_SUPPORT
-
Lisp_Object QCLIPBOARD, QSECONDARY, QTEXT, QFILE_NAME;
static Lisp_Object Vselection_alist;
@@ -60,13 +58,18 @@ static NSString *
symbol_to_nsstring (Lisp_Object sym)
{
CHECK_SYMBOL (sym);
- if (EQ (sym, QCLIPBOARD)) return NSGeneralPboard;
+ if (EQ (sym, QCLIPBOARD)) return NSGeneralPboard;
if (EQ (sym, QPRIMARY)) return NXPrimaryPboard;
if (EQ (sym, QSECONDARY)) return NXSecondaryPboard;
if (EQ (sym, QTEXT)) return NSStringPboardType;
return [NSString stringWithUTF8String: SDATA (XSYMBOL (sym)->xname)];
}
+static NSPasteboard *
+ns_symbol_to_pb (Lisp_Object symbol)
+{
+ return [NSPasteboard pasteboardWithName: symbol_to_nsstring (symbol)];
+}
static Lisp_Object
ns_string_to_symbol (NSString *t)
@@ -230,70 +233,11 @@ static Lisp_Object
ns_get_foreign_selection (Lisp_Object symbol, Lisp_Object target)
{
id pb;
- pb =[NSPasteboard pasteboardWithName: symbol_to_nsstring (symbol)];
- return ns_string_from_pasteboard (pb);
-}
-
-
-static void
-ns_handle_selection_request (struct input_event *event)
-{
- // FIXME: BIG UGLY HACK!!!
- id pb = (id)*(EMACS_INT*)&(event->x);
- NSString *type = (NSString *)*(EMACS_INT*)&(event->y);
- Lisp_Object selection_name, selection_data, target_symbol, data;
- Lisp_Object successful_p, rest;
-
- selection_name = ns_string_to_symbol ([(NSPasteboard *)pb name]);
- target_symbol = ns_string_to_symbol (type);
- selection_data = assq_no_quit (selection_name, Vselection_alist);
- successful_p = Qnil;
-
- if (!NILP (selection_data))
- {
- data = ns_get_local_selection (selection_name, target_symbol);
- if (!NILP (data))
- {
- if (STRINGP (data))
- ns_string_to_pasteboard_internal (pb, data, type);
- successful_p = Qt;
- }
- }
-
- if (!EQ (Vns_sent_selection_hooks, Qunbound))
- {
- for (rest = Vns_sent_selection_hooks; CONSP (rest); rest = Fcdr (rest))
- call3 (Fcar (rest), selection_name, target_symbol, successful_p);
- }
+ pb = ns_symbol_to_pb (symbol);
+ return pb != nil ? ns_string_from_pasteboard (pb) : Qnil;
}
-static void
-ns_handle_selection_clear (struct input_event *event)
-{
- id pb = (id)*(EMACS_INT*)&(event->x);
- Lisp_Object selection_name, selection_data, rest;
-
- selection_name = ns_string_to_symbol ([(NSPasteboard *)pb name]);
- selection_data = assq_no_quit (selection_name, Vselection_alist);
- if (NILP (selection_data)) return;
-
- if (EQ (selection_data, Fcar (Vselection_alist)))
- Vselection_alist = Fcdr (Vselection_alist);
- else
- {
- for (rest = Vselection_alist; !NILP (rest); rest = Fcdr (rest))
- if (EQ (selection_data, Fcar (Fcdr (rest))))
- Fsetcdr (rest, Fcdr (Fcdr (rest)));
- }
-
- if (!EQ (Vns_lost_selection_hooks, Qunbound))
- {
- for (rest = Vns_lost_selection_hooks;CONSP (rest); rest = Fcdr (rest))
- call1 (Fcar (rest), selection_name);
- }
-}
-
/* ==========================================================================
@@ -401,29 +345,44 @@ anything that the functions on `selection-converter-alist' know about. */)
{
id pb;
Lisp_Object old_value, new_value;
+ NSString *type;
+ Lisp_Object successful_p = Qnil, rest;
+ Lisp_Object target_symbol, data;
+
check_ns ();
CHECK_SYMBOL (selection_name);
if (NILP (selection_value))
error ("selection-value may not be nil.");
- pb =[NSPasteboard pasteboardWithName: symbol_to_nsstring (selection_name)];
+ pb = ns_symbol_to_pb (selection_name);
+ if (pb == nil) return Qnil;
+
ns_declare_pasteboard (pb);
old_value = assq_no_quit (selection_name, Vselection_alist);
new_value = Fcons (selection_name, Fcons (selection_value, Qnil));
+
if (NILP (old_value))
Vselection_alist = Fcons (new_value, Vselection_alist);
else
Fsetcdr (old_value, Fcdr (new_value));
- /* XXX An evil hack, but a necessary one I fear XXX */
- {
- struct input_event ev;
- ev.kind = SELECTION_REQUEST_EVENT;
- ev.modifiers = 0;
- ev.code = 0;
- *(EMACS_INT*)(&(ev.x)) = (EMACS_INT)pb; // FIXME: BIG UGLY HACK!!
- *(EMACS_INT*)(&(ev.y)) = (EMACS_INT)NSStringPboardType;
- ns_handle_selection_request (&ev);
- }
+
+ /* We only support copy of text. */
+ type = NSStringPboardType;
+ target_symbol = ns_string_to_symbol (type);
+ data = ns_get_local_selection (selection_name, target_symbol);
+ if (!NILP (data))
+ {
+ if (STRINGP (data))
+ ns_string_to_pasteboard_internal (pb, data, type);
+ successful_p = Qt;
+ }
+
+ if (!EQ (Vns_sent_selection_hooks, Qunbound))
+ {
+ for (rest = Vns_sent_selection_hooks; CONSP (rest); rest = Fcdr (rest))
+ call3 (Fcar (rest), selection_name, target_symbol, successful_p);
+ }
+
return selection_value;
}
@@ -438,8 +397,8 @@ DEFUN ("x-disown-selection-internal", Fx_disown_selection_internal,
CHECK_SYMBOL (selection_name);
if (NILP (assq_no_quit (selection_name, Vselection_alist))) return Qnil;
- pb =[NSPasteboard pasteboardWithName: symbol_to_nsstring (selection_name)];
- ns_undeclare_pasteboard (pb);
+ pb = ns_symbol_to_pb (selection_name);
+ if (pb != nil) ns_undeclare_pasteboard (pb);
return Qt;
}
@@ -460,8 +419,10 @@ and t is the same as `SECONDARY'.) */)
CHECK_SYMBOL (selection);
if (EQ (selection, Qnil)) selection = QPRIMARY;
if (EQ (selection, Qt)) selection = QSECONDARY;
- pb =[NSPasteboard pasteboardWithName: symbol_to_nsstring (selection)];
- types =[pb types];
+ pb = ns_symbol_to_pb (selection);
+ if (pb == nil) return Qnil;
+
+ types = [pb types];
return ([types count] == 0) ? Qnil : Qt;
}
@@ -511,45 +472,31 @@ TYPE is the type of data desired, typically `STRING'. */)
}
-#ifdef CUT_BUFFER_SUPPORT
-DEFUN ("ns-get-cut-buffer-internal", Fns_get_cut_buffer_internal,
- Sns_get_cut_buffer_internal, 1, 1, 0,
- doc: /* Returns the value of the named cut buffer. */)
- (Lisp_Object buffer)
+DEFUN ("ns-get-selection-internal", Fns_get_selection_internal,
+ Sns_get_selection_internal, 1, 1, 0,
+ doc: /* Returns the value of SELECTION as a string.
+SELECTION is a symbol, typically `PRIMARY', `SECONDARY', or `CLIPBOARD'. */)
+ (Lisp_Object selection)
{
id pb;
check_ns ();
- pb =[NSPasteboard pasteboardWithName: symbol_to_nsstring (buffer)];
- return ns_string_from_pasteboard (pb);
+ pb = ns_symbol_to_pb (selection);
+ return pb != nil ? ns_string_from_pasteboard (pb) : Qnil;
}
-DEFUN ("ns-rotate-cut-buffers-internal", Fns_rotate_cut_buffers_internal,
- Sns_rotate_cut_buffers_internal, 1, 1, 0,
- doc: /* Rotate the values of the cut buffers by N steps.
-Positive N means move values forward, negative means
-backward. CURRENTLY NOT IMPLEMENTED UNDER NEXTSTEP. */ )
- (Lisp_Object n)
-{
- /* XXX This function is unimplemented under NeXTstep XXX */
- Fsignal (Qquit, Fcons (build_string (
- "Warning: ns-rotate-cut-buffers-internal not implemented\n"), Qnil));
- return Qnil;
-}
-
-
-DEFUN ("ns-store-cut-buffer-internal", Fns_store_cut_buffer_internal,
- Sns_store_cut_buffer_internal, 2, 2, 0,
- doc: /* Sets the value of the named cut buffer (typically CUT_BUFFER0). */)
- (Lisp_Object buffer, Lisp_Object string)
+DEFUN ("ns-store-selection-internal", Fns_store_selection_internal,
+ Sns_store_selection_internal, 2, 2, 0,
+ doc: /* Sets the string value of SELECTION.
+SELECTION is a symbol, typically `PRIMARY', `SECONDARY', or `CLIPBOARD'. */)
+ (Lisp_Object selection, Lisp_Object string)
{
id pb;
check_ns ();
- pb =[NSPasteboard pasteboardWithName: symbol_to_nsstring (buffer)];
- ns_string_to_pasteboard (pb, string);
+ pb = ns_symbol_to_pb (selection);
+ if (pb != nil) ns_string_to_pasteboard (pb, string);
return Qnil;
}
-#endif
void
@@ -572,11 +519,8 @@ syms_of_nsselect (void)
defsubr (&Sx_own_selection_internal);
defsubr (&Sx_selection_exists_p);
defsubr (&Sx_selection_owner_p);
-#ifdef CUT_BUFFER_SUPPORT
- defsubr (&Sns_get_cut_buffer_internal);
- defsubr (&Sns_rotate_cut_buffers_internal);
- defsubr (&Sns_store_cut_buffer_internal);
-#endif
+ defsubr (&Sns_get_selection_internal);
+ defsubr (&Sns_store_selection_internal);
Vselection_alist = Qnil;
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);
extern void ns_retain_object (void *obj);
extern void *ns_alloc_autorelease_pool ();
extern void ns_release_autorelease_pool ();
+extern const char *ns_get_defaults_value ();
/* in nsmenu */
extern void update_frame_tool_bar (FRAME_PTR f);
@@ -794,6 +795,7 @@ extern void x_set_tool_bar_lines (struct frame *f,
Lisp_Object oldval);
extern void x_activate_menubar (struct frame *);
extern void free_frame_menubar (struct frame *);
+extern void x_free_frame_resources (struct frame *);
#define NSAPP_DATA2_RUNASSCRIPT 10
extern 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)
xfree (f->output_data.ns);
+ if (f->output_data.ns->miniimage != nil)
+ [f->output_data.ns->miniimage release];
+
[[view window] close];
[view release];
@@ -1351,7 +1354,7 @@ ns_index_color (NSColor *color, struct frame *f)
{
struct ns_color_table *color_table = FRAME_NS_DISPLAY_INFO (f)->color_table;
ptrdiff_t idx;
- NSNumber *index;
+ ptrdiff_t i;
if (!color_table->colors)
{
@@ -1364,21 +1367,13 @@ ns_index_color (NSColor *color, struct frame *f)
}
/* do we already have this color ? */
- {
- ptrdiff_t i;
- for (i = 1; i < color_table->avail; i++)
- {
- if (color_table->colors[i] && [color_table->colors[i] isEqual: color])
- {
- [color_table->colors[i] retain];
- return i;
- }
- }
- }
+ for (i = 1; i < color_table->avail; i++)
+ if (color_table->colors[i] && [color_table->colors[i] isEqual: color])
+ return i;
if ([color_table->empty_indices count] > 0)
{
- index = [color_table->empty_indices anyObject];
+ NSNumber *index = [color_table->empty_indices anyObject];
[color_table->empty_indices removeObject: index];
idx = [index unsignedLongValue];
}
@@ -1411,20 +1406,20 @@ ns_free_indexed_color (unsigned long idx, struct frame *f)
color_table = FRAME_NS_DISPLAY_INFO (f)->color_table;
if (idx <= 0 || idx >= color_table->size) {
- message1("ns_free_indexed_color: Color index out of range.\n");
+ message1 ("ns_free_indexed_color: Color index out of range.\n");
return;
}
index = [NSNumber numberWithUnsignedInt: idx];
if ([color_table->empty_indices containsObject: index]) {
- message1("ns_free_indexed_color: attempt to free already freed color.\n");
+ message1 ("ns_free_indexed_color: attempt to free already freed color.\n");
return;
}
color = color_table->colors[idx];
[color release];
color_table->colors[idx] = nil;
- [color_table->empty_indices addObject: [NSNumber numberWithUnsignedInt: idx]];
+ [color_table->empty_indices addObject: index];
/*fprintf(stderr, "color_table: FREED %d\n",idx);*/
}
@@ -2108,7 +2103,7 @@ ns_scroll_run (struct window *w, struct run *run)
}
else
{
- /* Scolling down. Make sure we don't copy over the mode line.
+ /* Scrolling down. Make sure we don't copy over the mode line.
at the bottom. */
if (to_y + run->height > bottom_y)
height = bottom_y - to_y;
@@ -3824,11 +3819,9 @@ ns_default (const char *parameter, Lisp_Object *result,
Check a parameter value in user's preferences
-------------------------------------------------------------------------- */
{
- const char *value;
+ const char *value = ns_get_defaults_value (parameter);
- if ( (value =[[[NSUserDefaults standardUserDefaults]
- stringForKey: [NSString stringWithUTF8String: parameter]]
- UTF8String]) )
+ if (value)
{
double f;
char *pos;
@@ -4205,6 +4198,15 @@ ns_term_init (Lisp_Object display_name)
[NSApp setServicesMenu: svcsMenu];
/* Needed at least on Cocoa, to get dock menu to show windows */
[NSApp setWindowsMenu: [[NSMenu alloc] init]];
+
+ [[NSNotificationCenter defaultCenter]
+ addObserver: mainMenu
+ selector: @selector (trackingNotification:)
+ name: NSMenuDidBeginTrackingNotification object: mainMenu];
+ [[NSNotificationCenter defaultCenter]
+ addObserver: mainMenu
+ selector: @selector (trackingNotification:)
+ name: NSMenuDidEndTrackingNotification object: mainMenu];
}
#endif /* MAC OS X menu setup */
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. */)
printcharfun = Vprin1_to_string_buffer;
PRINTPREPARE;
print (object, printcharfun, NILP (noescape));
- /* Make Vprin1_to_string_buffer be the default buffer after PRINTFINSH */
+ /* Make Vprin1_to_string_buffer be the default buffer after PRINTFINISH */
PRINTFINISH;
}
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)
if (!PROCESSP (proc))
abort ();
- /* Was PROC started successfully? */
- if (XPROCESS (proc)->pid == -1)
+ /* Was PROC started successfully?
+ -2 is used for a pty with no process, eg for gdb. */
+ if (XPROCESS (proc)->pid <= 0 && XPROCESS (proc)->pid != -2)
remove_process (proc);
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 @@
(HAVE_WCTYPE_H && HAVE_WCHAR_H && HAVE_BTOWC && !emacs)
#endif
-/* For platform which support the ISO C amendement 1 functionality we
+/* For platform which support the ISO C amendment 1 functionality we
support user defined character classes. */
#if WIDE_CHAR_SUPPORT
/* 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));
}
#endif /* C++ */
-/* For platform which support the ISO C amendement 1 functionality we
+/* For platform which support the ISO C amendment 1 functionality we
support user defined character classes. */
#if WIDE_CHAR_SUPPORT
/* 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));
#if WIDE_CHAR_SUPPORT
/* The GNU C library provides support for user-defined character classes
- and the functions from ISO C amendement 1. */
+ and the functions from ISO C amendment 1. */
# ifdef CHARCLASS_NAME_MAX
# define CHAR_CLASS_MAX_LENGTH CHARCLASS_NAME_MAX
# 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,
/* Return true if the text immediately after POS in BUF is known, for
the purposes of CACHE. If NEXT is non-zero, set *NEXT to the nearest
- position after POS where the knownness changes. */
+ position after POS where the knowledge changes. */
int
region_cache_forward (struct buffer *buf, struct region_cache *c,
ptrdiff_t pos, ptrdiff_t *next)
@@ -736,7 +736,7 @@ region_cache_forward (struct buffer *buf, struct region_cache *c,
/* Return true if the text immediately before POS in BUF is known, for
the purposes of CACHE. If NEXT is non-zero, set *NEXT to the nearest
- position before POS where the knownness changes. */
+ position before POS where the knowledge changes. */
int region_cache_backward (struct buffer *buf, struct region_cache *c,
ptrdiff_t pos, ptrdiff_t *next)
{
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,
/* Return true if the text immediately after POS in BUF is known, for
the purposes of CACHE. If NEXT is non-zero, set *NEXT to the nearest
- position after POS where the knownness changes. */
+ position after POS where the knowledge changes. */
extern int region_cache_forward (struct buffer *BUF,
struct region_cache *CACHE,
ptrdiff_t POS,
@@ -105,7 +105,7 @@ extern int region_cache_forward (struct buffer *BUF,
/* Return true if the text immediately before POS in BUF is known, for
the purposes of CACHE. If NEXT is non-zero, set *NEXT to the nearest
- position before POS where the knownness changes. */
+ position before POS where the knowledge changes. */
extern int region_cache_backward (struct buffer *BUF,
struct region_cache *CACHE,
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/>. */
extern void *__libc_ia64_register_backing_store_base; \
__builtin_ia64_flushrs (); \
mark_memory (__libc_ia64_register_backing_store_base, \
- __builtin_ia64_bsp (), 0); \
+ __builtin_ia64_bsp ()); \
} while (0)
#endif
#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)
#endif /* AIX */
/* We originally enabled ICANON (and set VEOF to 04), and then had
- proces.c send additional EOF chars to flush the output when faced
+ process.c send additional EOF chars to flush the output when faced
with long lines, but this leads to weird effects when the
subprocess has disabled ICANON and ends up seeing those spurious
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
/* Arrange for all scroll bars on FRAME to be removed at the next call
to `*judge_scroll_bars_hook'. A scroll bar may be spared if
- `*redeem_scroll_bar_hook' is applied to its window before the judgement.
+ `*redeem_scroll_bar_hook' is applied to its window before the judgment.
This should be applied to each frame each time its window tree is
redisplayed, even if it is not displaying scroll bars at the moment;
@@ -568,7 +568,7 @@ struct terminal
currently displaying them. */
void (*condemn_scroll_bars_hook) (struct frame *frame);
- /* Unmark WINDOW's scroll bar for deletion in this judgement cycle.
+ /* Unmark WINDOW's scroll bar for deletion in this judgment cycle.
Note that it's okay to redeem a scroll bar that is not condemned. */
void (*redeem_scroll_bar_hook) (struct window *window);
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. */)
DEFUN ("text-property-any", Ftext_property_any,
Stext_property_any, 4, 5, 0,
- doc: /* Check text from START to END for property PROPERTY equalling VALUE.
+ doc: /* Check text from START to END for property PROPERTY equaling VALUE.
If so, return the position of the first character whose property PROPERTY
is `eq' to VALUE. Otherwise return nil.
If 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. */
DEFUN ("text-property-not-all", Ftext_property_not_all,
Stext_property_not_all, 4, 5, 0,
- doc: /* Check text from START to END for property PROPERTY not equalling VALUE.
+ doc: /* Check text from START to END for property PROPERTY not equaling VALUE.
If so, return the position of the first character whose property PROPERTY
is not `eq' to VALUE. Otherwise, return nil.
If 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:
nn = symp->st_shndx;
if (nn > old_bss_index)
nn--;
- old = ((symp->st_value - NEW_SECTION_H (symp->st_shndx).sh_addr)
- + OLD_SECTION_H (nn).sh_offset + old_base);
- memcpy (new, old, symp->st_size);
+ if (nn == old_bss_index)
+ memset (new, 0, symp->st_size);
+ else
+ {
+ old = ((symp->st_value
+ - NEW_SECTION_H (symp->st_shndx).sh_addr)
+ + OLD_SECTION_H (nn).sh_offset + old_base);
+ memcpy (new, old, symp->st_size);
+ }
}
#endif
}
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)
return regs.x.ax;
}
-/* Open the clipboard, return non-zero if successfull. */
+/* Open the clipboard, return non-zero if successful. */
unsigned
open_clipboard (void)
{
@@ -137,7 +137,7 @@ open_clipboard (void)
return regs.x.ax;
}
-/* Empty clipboard, return non-zero if successfull. */
+/* Empty clipboard, return non-zero if successful. */
unsigned
empty_clipboard (void)
{
@@ -207,7 +207,7 @@ free_xfer_buf (void)
}
}
-/* Copy data into the clipboard, return zero if successfull. */
+/* Copy data into the clipboard, return zero if successful. */
unsigned
set_clipboard_data (unsigned Format, void *Data, unsigned Size, int Raw)
{
@@ -405,7 +405,7 @@ get_clipboard_data (unsigned Format, void *Data, unsigned Size, int Raw)
return (unsigned) (dp - (unsigned char *)Data - 1);
}
-/* Close clipboard, return non-zero if successfull. */
+/* Close clipboard, return non-zero if successful. */
unsigned
close_clipboard (void)
{
@@ -730,4 +730,3 @@ After the communication, this variable is set to nil. */);
}
#endif /* MSDOS */
-
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)
}
}
+ /* When Emacs is invoked with --no-site-lisp, we must remove the
+ site-lisp directories from the default value of EMACSLOADPATH.
+ This assumes that the site-lisp entries are at the front, and
+ that additional entries do exist. */
+ if (no_site_lisp)
+ {
+ for (i = 0; i < N_ENV_VARS; i++)
+ {
+ if (strcmp (env_vars[i].name, "EMACSLOADPATH") == 0)
+ {
+ char *site;
+ while ((site = strstr (env_vars[i].def_value, "site-lisp")))
+ env_vars[i].def_value = strchr (site, ';') + 1;
+ break;
+ }
+ }
+ }
+
#define SET_ENV_BUF_SIZE (4 * MAX_PATH) /* to cover EMACSLOADPATH */
/* 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)
deferred_msg * msg_buf = find_deferred_msg (hwnd, msg);
if (msg_buf == NULL)
- /* Message may have been cancelled, so don't abort. */
+ /* Message may have been canceled, so don't abort. */
return;
msg_buf->result = result;
@@ -2538,7 +2538,7 @@ post_character_message (HWND hwnd, UINT msg,
the lisp thread to respond.
Note that we don't want to block the input thread waiting for
- a reponse from the lisp thread (although that would at least
+ a response from the lisp thread (although that would at least
solve the deadlock problem above), because we want to be able
to receive C-g to interrupt the lisp thread. */
cancel_all_deferred_msgs ();
@@ -3749,7 +3749,7 @@ w32_wnd_proc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
flags |= TPM_RIGHTBUTTON;
/* Remember we did a SetCapture on the initial mouse down event,
- so for safety, we make sure the capture is cancelled now. */
+ so for safety, we make sure the capture is canceled now. */
ReleaseCapture ();
button_state = 0;
@@ -4951,7 +4951,7 @@ If TYPE is nil or omitted, get the property as a string.
Otherwise TYPE is the name of the atom that denotes the type expected.
If SOURCE is non-nil, get the property on that window instead of from
FRAME. The number 0 denotes the root window.
-If DELETE_P is non-nil, delete the property after retreiving it.
+If DELETE_P is non-nil, delete the property after retrieving it.
If VECTOR_RET_P is non-nil, don't return a string but a vector of values.
Value 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. */)
file = DECODE_FILE (build_string (filename));
}
- /* User cancelled the dialog without making a selection. */
+ /* User canceled the dialog without making a selection. */
else if (!CommDlgExtendedError ())
file = Qnil;
/* 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);
Optional.
Get coordinates of the INDEXth anchor point of the glyph whose
code is CODE. Store the coordinates in *X and *Y. Return 0 if
- the operations was successfull. Otherwise return -1.
+ the operations was successful. Otherwise return -1.
static int
w32font_anchor_point (struct font *font, unsigned code,
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/>. */
*
* When copying or cutting (sending data to the OS), the data is
* announced and stored internally, but only actually rendered on
- * request. The requester determines the format provided. The
+ * request. The requestor determines the format provided. The
* {next-}selection-coding-system is only used, when its corresponding
* clipboard type matches the type requested.
*
@@ -335,7 +335,7 @@ render_all (Lisp_Object ignore)
OpenClipboard (NULL);
- /* There is no usefull means to report errors here, there are none
+ /* There is no useful means to report errors here, there are none
expected anyway, and even if there were errors, they wouldn't do
any harm. So we just go ahead and do what has to be done without
bothering with error handling. */
@@ -750,7 +750,7 @@ DEFUN ("w32-set-clipboard-data", Fw32_set_clipboard_data,
else
{
/* Advertise all supported formats so that whatever the
- requester chooses, only one encoding step needs to be
+ requestor chooses, only one encoding step needs to be
made. This is intentionally different from what we do in
the handler for WM_RENDERALLFORMATS. */
SetClipboardData (CF_UNICODETEXT, NULL);
@@ -1138,4 +1138,3 @@ globals_of_w32select (void)
clipboard_owner = create_owner ();
}
-
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)
}
else
{
- /* Scolling down. Make sure we don't copy over the mode line.
+ /* Scrolling down. Make sure we don't copy over the mode line.
at the bottom. */
if (to_y + run->height > bottom_y)
height = bottom_y - to_y;
@@ -3286,7 +3286,7 @@ w32_mouse_position (FRAME_PTR *fp, int insist, Lisp_Object *bar_window,
***********************************************************************/
/* Handle mouse button event on the tool-bar of frame F, at
- frame-relative coordinates X/Y. EVENT_TYPE is either ButtionPress
+ frame-relative coordinates X/Y. EVENT_TYPE is either ButtonPress
or ButtonRelease. */
static void
@@ -3556,7 +3556,7 @@ x_scroll_bar_remove (struct scroll_bar *bar)
/* Destroy the window. */
my_destroy_window (f, SCROLL_BAR_W32_WINDOW (bar));
- /* Disassociate this scroll bar from its window. */
+ /* Dissociate this scroll bar from its window. */
XWINDOW (bar->window)->vertical_scroll_bar = Qnil;
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
{
/* Values for focus_state, used as bit mask.
EXPLICIT means we received a FocusIn for the frame and know it has
- the focus. IMPLICIT means we recevied an EnterNotify and the frame
+ the focus. IMPLICIT means we received an EnterNotify and the frame
may have the focus if no window manager is running.
FocusOut and LeaveNotify clears EXPLICIT/IMPLICIT. */
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,
also erase the entire frame and redraw it (when `auto-resize-tool-bars'
is set to `grow-only', this resets the tool-bar's height to the minimum
height needed); if `recenter-redisplay' has the special value `tty',
-then only tty frame are redrawn.
+then only tty frames are redrawn.
Just C-u as prefix means put point in the center of the window
and redisplay normally--don't erase and redraw the frame. */)
@@ -5772,7 +5772,7 @@ get_leaf_windows (struct window *w, struct window **flat, int i)
/* Return a pointer to the glyph W's physical cursor is on. Value is
- null if W's current matrix is invalid, so that no meaningfull glyph
+ null if W's current matrix is invalid, so that no meaningful glyph
can be returned. */
struct glyph *
get_phys_cursor_glyph (struct window *w)
@@ -6505,28 +6505,31 @@ with the relevant frame selected. */);
Vwindow_configuration_change_hook = Qnil;
DEFVAR_LISP ("recenter-redisplay", Vrecenter_redisplay,
- doc: /* If non-nil, then the `recenter' command with a nil argument
-will redraw the entire frame; the special value `tty' causes the
-frame to be redrawn only if it is a tty frame. */);
+ doc: /* Non-nil means `recenter' redraws entire frame.
+If this option is non-nil, then the `recenter' command with a nil
+argument will redraw the entire frame; the special value `tty' causes
+the frame to be redrawn only if it is a tty frame. */);
Vrecenter_redisplay = Qtty;
DEFVAR_LISP ("window-combination-resize", Vwindow_combination_resize,
- doc: /* Non-nil means resize window combinations proportionally.
+ doc: /* If t, resize window combinations proportionally.
If this variable is nil, splitting a window gets the entire screen space
for displaying the new window from the window to split. Deleting and
resizing a window preferably resizes one adjacent window only.
-If this variable is non-nil, splitting a window tries to get the space
+If this variable is t, splitting a window tries to get the space
proportionally from all windows in the same combination. This also
allows to split a window that is otherwise too small or of fixed size.
Resizing and deleting a window proportionally resize all windows in the
same combination.
+Other values are reserved for future use.
+
This variable takes no effect if `window-combination-limit' is non-nil. */);
Vwindow_combination_resize = Qnil;
DEFVAR_LISP ("window-combination-limit", Vwindow_combination_limit,
- doc: /* Non-nil means splitting a window makes a new parent window.
+ doc: /* If t, splitting a window makes a new parent window.
If this variable is nil, splitting a window will create a new parent
window only if the window has no parent window or the window shall
become 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;
extern void check_frame_size (struct frame *frame, int *rows, int *cols);
/* Return a pointer to the glyph W's physical cursor is on. Value is
- null if W's current matrix is invalid, so that no meaningfull glyph
+ null if W's current matrix is invalid, so that no meaningful glyph
can be returned. */
struct 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
environments with anti-aliased text: if the same text is
drawn onto the same place multiple times, it gets thicker.
If the overlap we are processing is for the erased cursor, we
- take the intersection with the rectagle of the cursor. */
+ take the intersection with the rectangle of the cursor. */
if (s->for_overlaps & OVERLAPS_ERASED_CURSOR)
{
XRectangle rc, r_save = r;
@@ -4095,10 +4095,11 @@ handle_invisible_prop (struct it *it)
while (invis_p);
/* The position newpos is now either ZV or on visible text. */
- if (it->bidi_p && newpos < ZV)
+ if (it->bidi_p)
{
EMACS_INT bpos = CHAR_TO_BYTE (newpos);
- int on_newline = FETCH_BYTE (bpos) == '\n';
+ int on_newline =
+ bpos == ZV_BYTE || FETCH_BYTE (bpos) == '\n';
int after_newline =
newpos <= BEGV || FETCH_BYTE (bpos - 1) == '\n';
@@ -4116,16 +4117,16 @@ handle_invisible_prop (struct it *it)
SET_TEXT_POS (tpos, newpos, bpos);
reseat_1 (it, tpos, 0);
- /* If we reseat on a newline, we need to prep the
+ /* If we reseat on a newline/ZV, we need to prep the
bidi iterator for advancing to the next character
- after the newline, keeping the current paragraph
+ after the newline/EOB, keeping the current paragraph
direction (so that PRODUCE_GLYPHS does TRT wrt
prepending/appending glyphs to a glyph row). */
if (on_newline)
{
it->bidi_it.first_elt = 0;
it->bidi_it.paragraph_dir = pdir;
- it->bidi_it.ch = '\n';
+ it->bidi_it.ch = (bpos == ZV_BYTE) ? -1 : '\n';
it->bidi_it.nchars = 1;
it->bidi_it.ch_len = 1;
}
@@ -10288,7 +10289,7 @@ current_message_1 (EMACS_INT a1, Lisp_Object a2, EMACS_INT a3, EMACS_INT a4)
}
-/* Push the current message on Vmessage_stack for later restauration
+/* Push the current message on Vmessage_stack for later restoration
by restore_message. Value is non-zero if the current message isn't
empty. This is a relatively infrequent operation, so it's not
worth optimizing. */
@@ -14421,7 +14422,7 @@ try_scrolling (Lisp_Object window, int just_this_one_p,
{
int scroll_margin_y;
- /* Compute the pixel ypos of the scroll margin, then move it to
+ /* Compute the pixel ypos of the scroll margin, then move IT to
either that ypos or PT, whichever comes first. */
start_display (&it, w, startp);
scroll_margin_y = it.last_visible_y - this_scroll_margin
@@ -14451,7 +14452,8 @@ try_scrolling (Lisp_Object window, int just_this_one_p,
if (dy > scroll_max)
return SCROLLING_FAILED;
- scroll_down_p = 1;
+ if (dy > 0)
+ scroll_down_p = 1;
}
}
@@ -18991,7 +18993,8 @@ display_line (struct it *it)
#define RECORD_MAX_MIN_POS(IT) \
do \
{ \
- int composition_p = (IT)->what == IT_COMPOSITION; \
+ int composition_p = !STRINGP ((IT)->string) \
+ && ((IT)->what == IT_COMPOSITION); \
EMACS_INT current_pos = \
composition_p ? (IT)->cmp_it.charpos \
: 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[] =
#if defined HAVE_X_WINDOWS && defined USE_X_TOOLKIT
/* Create an X fontset on frame F with base font name BASE_FONTNAME. */
-static const char xic_defaut_fontset[] = "-*-*-*-r-normal--14-*-*-*-*-*-*-*";
+static const char xic_default_fontset[] = "-*-*-*-r-normal--14-*-*-*-*-*-*-*";
/* Create an Xt fontset spec from the name of a base font.
If `motif' is True use the Motif syntax. */
@@ -1888,7 +1888,7 @@ xic_create_fontsetname (const char *base_fontname, int motif)
char *fontsetname;
/* Make a fontset name from the base font name. */
- if (xic_defaut_fontset == base_fontname)
+ if (xic_default_fontset == base_fontname)
{ /* There is no base font name, use the default. */
ptrdiff_t len = strlen (base_fontname) + 2;
fontsetname = xmalloc (len);
@@ -1912,12 +1912,12 @@ xic_create_fontsetname (const char *base_fontname, int motif)
modify it to generalize it to allcs and allfamilies.
Use the specified font plus the default. */
ptrdiff_t len =
- strlen (base_fontname) + strlen (xic_defaut_fontset) + 3;
+ strlen (base_fontname) + strlen (xic_default_fontset) + 3;
fontsetname = xmalloc (len);
memset (fontsetname, 0, len);
strcpy (fontsetname, base_fontname);
strcat (fontsetname, sep);
- strcat (fontsetname, xic_defaut_fontset);
+ strcat (fontsetname, xic_default_fontset);
}
else
{
@@ -4286,7 +4286,7 @@ If TYPE is nil or omitted, get the property as a string.
Otherwise TYPE is the name of the atom that denotes the type expected.
If SOURCE is non-nil, get the property on that window instead of from
FRAME. The number 0 denotes the root window.
-If DELETE_P is non-nil, delete the property after retreiving it.
+If DELETE_P is non-nil, delete the property after retrieving it.
If VECTOR_RET_P is non-nil, don't return a string but a vector of values.
Value 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
if (with_background)
XftDrawRect (xft_draw, &bg,
- x, y - face->font->ascent, s->width, face->font->height);
+ x, y - s->font->ascent, s->width, s->font->height);
code = alloca (sizeof (FT_UInt) * len);
for (i = 0; i < len; i++)
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/>. */
#ifdef USE_GTK
#include "gtkutil.h"
+#ifdef HAVE_GTK3
+#include "xgselect.h"
+#endif
#endif
#include "menu.h"
@@ -408,7 +411,15 @@ x_menu_wait_for_event (void *data)
else
ntp = &next_time;
+#ifdef HAVE_GTK3
+ /* Gtk3 have arrows on menus when they don't fit. When the pointer is
+ over an arrow, a timeout scrolls it a bit. Use xg_select so that
+ timeout gets triggered. */
+
+ xg_select (n + 1, &read_fds, (SELECT_TYPE *)0, (SELECT_TYPE *)0, ntp);
+#else
select (n + 1, &read_fds, (SELECT_TYPE *)0, (SELECT_TYPE *)0, ntp);
+#endif
}
}
#endif /* ! MSDOS */
@@ -1435,6 +1446,13 @@ create_and_show_popup_menu (FRAME_PTR f, widget_value *first_wv, int x, int y,
GtkMenuPositionFunc pos_func = 0; /* Pop up at pointer. */
struct next_popup_x_y popup_x_y;
int specpdl_count = SPECPDL_INDEX ();
+ int use_pos_func = ! for_click;
+
+#ifdef HAVE_GTK3
+ /* Always use position function for Gtk3. Otherwise menus may become
+ too small to show anything. */
+ use_pos_func = 1;
+#endif
if (! FRAME_X_P (f))
abort ();
@@ -1446,7 +1464,7 @@ create_and_show_popup_menu (FRAME_PTR f, widget_value *first_wv, int x, int y,
G_CALLBACK (menu_highlight_callback));
xg_crazy_callback_abort = 0;
- if (! for_click)
+ if (use_pos_func)
{
/* Not invoked by a click. pop up at x/y. */
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,
i = 0; /* gtk_menu_popup needs this to be 0 for a non-button popup. */
}
- else
+
+ if (for_click)
{
for (i = 0; i < 5; i++)
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;
static Atom conversion_fail_tag;
/* Used as an unwind-protect clause so that, if a selection-converter signals
- an error, we tell the requester that we were unable to do what they wanted
+ an error, we tell the requestor that we were unable to do what they wanted
before we throw to top-level or go into the debugger or whatever. */
static Lisp_Object
@@ -693,7 +693,7 @@ x_reply_selection_request (struct input_event *event,
bytes_remaining = cs->size;
bytes_remaining *= format_bytes;
- /* Wait for the requester to ack by deleting the property.
+ /* Wait for the requestor to ack by deleting the property.
This can run Lisp code (process handlers) or signal. */
if (! had_errors)
{
@@ -732,7 +732,7 @@ x_reply_selection_request (struct input_event *event,
if (had_errors) break;
- /* Wait for the requester to ack this chunk by deleting
+ /* Wait for the requestor to ack this chunk by deleting
the property. This can run Lisp code or signal. */
TRACE1 ("Waiting for increment ACK (deletion of %s)",
XGetAtomName (display, cs->property));
@@ -740,7 +740,7 @@ x_reply_selection_request (struct input_event *event,
}
/* Now write a zero-length chunk to the property to tell the
- requester that we're done. */
+ requestor that we're done. */
BLOCK_INPUT;
if (! waiting_for_other_props_on_window (display, window))
XSelectInput (display, window, 0L);
@@ -757,7 +757,7 @@ x_reply_selection_request (struct input_event *event,
/* The window we're communicating with may have been deleted
in the meantime (that's a real situation from a bug report).
In this case, there may be events in the event queue still
- refering to the deleted window, and we'll get a BadWindow error
+ referring to the deleted window, and we'll get a BadWindow error
in XTread_socket when processing the events. I don't have
an idea how to fix that. gerd, 2001-01-98. */
/* 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)
}
else
{
- /* Scolling down. Make sure we don't copy over the mode line.
+ /* Scrolling down. Make sure we don't copy over the mode line.
at the bottom. */
if (to_y + run->height > bottom_y)
height = bottom_y - to_y;
@@ -5160,7 +5160,7 @@ x_scroll_bar_remove (struct scroll_bar *bar)
XDestroyWindow (FRAME_X_DISPLAY (f), bar->x_window);
#endif
- /* Disassociate this scroll bar from its window. */
+ /* Dissociate this scroll bar from its window. */
XWINDOW (bar->window)->vertical_scroll_bar = Qnil;
UNBLOCK_INPUT;
@@ -9978,6 +9978,11 @@ x_term_init (Lisp_Object display_name, char *xrm_option, char *resource_name)
#ifdef HAVE_CLUTTER
gtk_clutter_init (&argc, &argv2);
#else
+
+ /* NULL window -> events for all windows go to our function.
+ Call before gtk_init so Gtk+ event filters comes after our. */
+ gdk_window_add_filter (NULL, event_handler_gdk, NULL);
+
gtk_init (&argc, &argv2);
#endif
g_log_remove_handler ("GLib", id);
@@ -9988,9 +9993,6 @@ x_term_init (Lisp_Object display_name, char *xrm_option, char *resource_name)
dpy = DEFAULT_GDK_DISPLAY ();
- /* NULL window -> events for all windows go to our function */
- gdk_window_add_filter (NULL, event_handler_gdk, NULL);
-
#if GTK_MAJOR_VERSION <= 2 && GTK_MINOR_VERSION <= 90
/* Load our own gtkrc if it exists. */
{
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
{
/* Values for focus_state, used as bit mask.
EXPLICIT means we received a FocusIn for the frame and know it has
- the focus. IMPLICIT means we recevied an EnterNotify and the frame
+ the focus. IMPLICIT means we received an EnterNotify and the frame
may have the focus if no window manager is running.
FocusOut and LeaveNotify clears EXPLICIT/IMPLICIT. */
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 @@
this
that)
-(define-mode-local-override a-overriden-function
+(define-mode-local-override a-overridden-function
emacs-lisp-mode (tag)
"A function that is overloaded."
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 {
};
}
-// Test 5 - Templates w/ full specicialization which may or may not share
+// Test 5 - Templates w/ full specialization which may or may not share
// common functions.
namespace template_full_spec {
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 @@
+{ GPC demo program for the CRT unit.
+
+Copyright (C) 1999-2006 Free Software Foundation, Inc.
+
+Author: Frank Heckenbach <frank@pascal.gnu.de>
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License as
+published by the Free Software Foundation, version 2.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; see the file COPYING. If not, write to
+the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA.
+
+As a special exception, if you incorporate even large parts of the
+code of this demo program into another program with substantially
+different functionality, this does not cause the other program to
+be covered by the GNU General Public License. This exception does
+not however invalidate any other reasons why it might be covered
+by the GNU General Public License. }
+
+{$gnu-pascal,I+}
+
+program CRTDemo;
+
+uses GPC, CRT;
+
+type
+ TFrameChars = array [1 .. 8] of Char;
+ TSimulateBlockCursorKind = (bc_None, bc_Blink, bc_Static);
+
+const
+ SingleFrame: TFrameChars = (chCornerTLS, chLineHS, chCornerTRS, chLineVS, chLineVS, chCornerBLS, chLineHS, chCornerBRS);
+ DoubleFrame: TFrameChars = (chCornerTLD, chLineHD, chCornerTRD, chLineVD, chLineVD, chCornerBLD, chLineHD, chCornerBRD);
+
+var
+ ScrollState: Boolean = True;
+ SimulateBlockCursorKind: TSimulateBlockCursorKind = bc_None;
+ CursorShape: TCursorShape = CursorNormal;
+ MainPanel: TPanel;
+ OrigScreenSize: TPoint;
+
+procedure FrameWin (const Title: String; const Frame: TFrameChars; TitleInverse: Boolean);
+var
+ w, h, y, Color: Integer;
+ Attr: TTextAttr;
+begin
+ HideCursor;
+ SetPCCharSet (True);
+ ClrScr;
+ w := GetXMax;
+ h := GetYMax;
+ WriteCharAt (1, 1, 1, Frame[1], TextAttr);
+ WriteCharAt (2, 1, w - 2, Frame[2], TextAttr);
+ WriteCharAt (w, 1, 1, Frame[3], TextAttr);
+ for y := 2 to h - 1 do
+ begin
+ WriteCharAt (1, y, 1, Frame[4], TextAttr);
+ WriteCharAt (w, y, 1, Frame[5], TextAttr)
+ end;
+ WriteCharAt (1, h, 1, Frame[6], TextAttr);
+ WriteCharAt (2, h, w - 2, Frame[7], TextAttr);
+ WriteCharAt (w, h, 1, Frame[8], TextAttr);
+ SetPCCharSet (False);
+ Attr := TextAttr;
+ if TitleInverse then
+ begin
+ Color := GetTextColor;
+ TextColor (GetTextBackground);
+ TextBackground (Color)
+ end;
+ WriteStrAt ((w - Length (Title)) div 2 + 1, 1, Title, TextAttr);
+ TextAttr := Attr
+end;
+
+function GetKey (TimeOut: Integer) = Key: TKey; forward;
+
+procedure ClosePopUpWindow;
+begin
+ PanelDelete (GetActivePanel);
+ PanelDelete (GetActivePanel)
+end;
+
+function PopUpConfirm (XSize, YSize: Integer; const Msg: String): Boolean;
+var
+ ax, ay: Integer;
+ Key: TKey;
+ SSize: TPoint;
+begin
+ repeat
+ SSize := ScreenSize;
+ ax := (SSize.x - XSize - 4) div 2 + 1;
+ ay := (SSize.y - YSize - 4) div 2 + 1;
+ PanelNew (ax, ay, ax + XSize + 3, ay + YSize + 1, False);
+ TextBackground (Black);
+ TextColor (Yellow);
+ SetControlChars (True);
+ FrameWin ('', DoubleFrame, False);
+ NormalCursor;
+ PanelNew (ax + 2, ay + 1, ax + XSize + 2, ay + YSize, False);
+ ClrScr;
+ Write (Msg);
+ Key := GetKey (-1);
+ if Key = kbScreenSizeChanged then ClosePopUpWindow
+ until Key <> kbScreenSizeChanged;
+ PopUpConfirm := not (Key in [kbEsc, kbAltEsc])
+end;
+
+procedure MainDraw;
+begin
+ WriteLn ('3, F3 : Open a window');
+ WriteLn ('4, F4 : Close window');
+ WriteLn ('5, F5 : Previous window');
+ WriteLn ('6, F6 : Next window');
+ WriteLn ('7, F7 : Move window');
+ WriteLn ('8, F8 : Resize window');
+ Write ('q, Esc: Quit')
+end;
+
+procedure StatusDraw;
+const
+ YesNo: array [Boolean] of String [3] = ('No', 'Yes');
+ SimulateBlockCursorIDs: array [TSimulateBlockCursorKind] of String [8] = ('Off', 'Blinking', 'Static');
+ CursorShapeIDs: array [TCursorShape] of String [7] = ('Ignored', 'Hidden', 'Normal', 'Fat', 'Block');
+var
+ SSize: TPoint;
+begin
+ WriteLn ('You can change some of the following');
+ WriteLn ('settings by pressing the key shown');
+ WriteLn ('in parentheses. Naturally, color and');
+ WriteLn ('changing the cursor shape or screen');
+ WriteLn ('size does not work on all terminals.');
+ WriteLn;
+ WriteLn ('XCurses version: ', YesNo[XCRT]);
+ WriteLn ('CRTSavePreviousScreen: ', YesNo[CRTSavePreviousScreenWorks]);
+ WriteLn ('(M)onochrome: ', YesNo[IsMonochrome]);
+ SSize := ScreenSize;
+ WriteLn ('Screen (C)olumns: ', SSize.x);
+ WriteLn ('Screen (L)ines: ', SSize.y);
+ WriteLn ('(R)estore screen size');
+ WriteLn ('(B)reak checking: ', YesNo[CheckBreak]);
+ WriteLn ('(S)crolling: ', YesNo[ScrollState]);
+ WriteLn ('S(i)mulated block cursor: ', SimulateBlockCursorIDs[SimulateBlockCursorKind]);
+ Write ('C(u)rsor shape: ', CursorShapeIDs[CursorShape]);
+ GotoXY (36, WhereY)
+end;
+
+procedure RedrawAll; forward;
+procedure CheckScreenSize; forward;
+
+procedure StatusKey (Key: TKey);
+var SSize, NewSize: TPoint;
+begin
+ case LoCase (Key2Char (Key)) of
+ 'm': begin
+ SetMonochrome (not IsMonochrome);
+ RedrawAll
+ end;
+ 'c': begin
+ SSize := ScreenSize;
+ if SSize.x > 40 then
+ NewSize.x := 40
+ else
+ NewSize.x := 80;
+ if SSize.y > 25 then
+ NewSize.y := 50
+ else
+ NewSize.y := 25;
+ SetScreenSize (NewSize.x, NewSize.y);
+ CheckScreenSize
+ end;
+ 'l': begin
+ SSize := ScreenSize;
+ if SSize.x > 40 then
+ NewSize.x := 80
+ else
+ NewSize.x := 40;
+ if SSize.y > 25 then
+ NewSize.y := 25
+ else
+ NewSize.y := 50;
+ SetScreenSize (NewSize.x, NewSize.y);
+ CheckScreenSize
+ end;
+ 'r': begin
+ SetScreenSize (OrigScreenSize.x, OrigScreenSize.y);
+ CheckScreenSize
+ end;
+ 'b': CheckBreak := not CheckBreak;
+ 's': ScrollState := not ScrollState;
+ 'i': if SimulateBlockCursorKind = High (SimulateBlockCursorKind) then
+ SimulateBlockCursorKind := Low (SimulateBlockCursorKind)
+ else
+ Inc (SimulateBlockCursorKind);
+ 'u': case CursorShape of
+ CursorNormal: CursorShape := CursorBlock;
+ CursorFat,
+ CursorBlock : CursorShape := CursorHidden;
+ else CursorShape := CursorNormal
+ end;
+ end;
+ ClrScr;
+ StatusDraw
+end;
+
+procedure TextAttrDemo;
+var f, b, y, x1, y1, x2, y2, Fill, n1, n2, n3: Integer;
+begin
+ GetWindow (x1, y1, x2, y2);
+ Window (x1 - 1, y1, x2, y2);
+ TextColor (White);
+ TextBackground (Blue);
+ ClrScr;
+ SetScroll (False);
+ Fill := GetXMax - 32;
+ for y := 1 to GetYMax do
+ begin
+ GotoXY (1, y);
+ b := (y - 1) mod 16;
+ n1 := 0;
+ for f := 0 to 15 do
+ begin
+ TextAttr := f + 16 * b;
+ n2 := (Fill * (1 + 2 * f) + 16) div 32;
+ n3 := (Fill * (2 + 2 * f) + 16) div 32;
+ Write ('' : n2 - n1, NumericBaseDigitsUpper[b], NumericBaseDigitsUpper[f], '' : n3 - n2);
+ n1 := n3
+ end
+ end
+end;
+
+procedure CharSetDemo (UsePCCharSet: Boolean);
+var h, l, y, x1, y1, x2, y2, Fill, n1, n2: Integer;
+begin
+ GetWindow (x1, y1, x2, y2);
+ Window (x1 - 1, y1, x2, y2);
+ ClrScr;
+ SetScroll (False);
+ SetPCCharSet (UsePCCharSet);
+ SetControlChars (False);
+ Fill := GetXMax - 35;
+ for y := 1 to GetYMax do
+ begin
+ GotoXY (1, y);
+ h := (y - 2) mod 16;
+ n1 := (Fill + 9) div 18;
+ if y = 1 then
+ Write ('' : 3 + n1)
+ else
+ Write (16 * h : 3 + n1);
+ for l := 0 to 15 do
+ begin
+ n2 := (Fill * (2 + l) + 9) div 18;
+ if y = 1 then
+ Write ('' : n2 - n1, l : 2)
+ else
+ Write ('' : n2 - n1 + 1, Chr (16 * h + l));
+ n1 := n2
+ end
+ end
+end;
+
+procedure NormalCharSetDemo;
+begin
+ CharSetDemo (False)
+end;
+
+procedure PCCharSetDemo;
+begin
+ CharSetDemo (True)
+end;
+
+procedure FKeyDemoDraw;
+var x1, y1, x2, y2: Integer;
+begin
+ GetWindow (x1, y1, x2, y2);
+ Window (x1, y1, x2 - 1, y2);
+ ClrScr;
+ SetScroll (False);
+ WriteLn ('You can type the following keys');
+ WriteLn ('(function keys if present on the');
+ WriteLn ('terminal, letters as alternatives):');
+ GotoXY (1, 4);
+ WriteLn ('S, Left : left (wrap-around)');
+ WriteLn ('D, Right : right (wrap-around)');
+ WriteLn ('E, Up : up (wrap-around)');
+ WriteLn ('X, Down : down (wrap-around)');
+ WriteLn ('A, Home : go to first column');
+ WriteLn ('F, End : go to last column');
+ WriteLn ('R, Page Up : go to first line');
+ WriteLn ('C, Page Down: go to last line');
+ WriteLn ('Y, Ctrl-PgUp: first column and line');
+ GotoXY (1, 13);
+ WriteLn ('B, Ctrl-PgDn: last column and line');
+ WriteLn ('Z, Ctrl-Home: clear screen');
+ WriteLn ('N, Ctrl-End : clear to end of line');
+ WriteLn ('V, Insert : insert a line');
+ WriteLn ('T, Delete : delete a line');
+ WriteLn ('# : beep');
+ WriteLn ('* : flash');
+ WriteLn ('Tab, Enter, Backspace, other');
+ WriteLn (' normal characters: write text')
+end;
+
+procedure FKeyDemoKey (Key: TKey);
+const TabSize = 8;
+var
+ ch: Char;
+ NewX: Integer;
+begin
+ case LoCaseKey (Key) of
+ Ord ('s'), kbLeft : if WhereX = 1 then GotoXY (GetXMax, WhereY) else GotoXY (WhereX - 1, WhereY);
+ Ord ('d'), kbRight : if WhereX = GetXMax then GotoXY (1, WhereY) else GotoXY (WhereX + 1, WhereY);
+ Ord ('e'), kbUp : if WhereY = 1 then GotoXY (WhereX, GetYMax) else GotoXY (WhereX, WhereY - 1);
+ Ord ('x'), kbDown : if WhereY = GetYMax then GotoXY (WhereX, 1) else GotoXY (WhereX, WhereY + 1);
+ Ord ('a'), kbHome : Write (chCR);
+ Ord ('f'), kbEnd : GotoXY (GetXMax, WhereY);
+ Ord ('r'), kbPgUp : GotoXY (WhereX, 1);
+ Ord ('c'), kbPgDn : GotoXY (WhereX, GetYMax);
+ Ord ('y'), kbCtrlPgUp: GotoXY (1, 1);
+ Ord ('b'), kbCtrlPgDn: GotoXY (GetXMax, GetYMax);
+ Ord ('z'), kbCtrlHome: ClrScr;
+ Ord ('n'), kbCtrlEnd : ClrEOL;
+ Ord ('v'), kbIns : InsLine;
+ Ord ('t'), kbDel : DelLine;
+ Ord ('#') : Beep;
+ Ord ('*') : Flash;
+ kbTab : begin
+ NewX := ((WhereX - 1) div TabSize + 1) * TabSize + 1;
+ if NewX <= GetXMax then GotoXY (NewX, WhereY) else WriteLn
+ end;
+ kbCR : WriteLn;
+ kbBkSp : Write (chBkSp, ' ', chBkSp);
+ else ch := Key2Char (Key);
+ if ch <> #0 then Write (ch)
+ end
+end;
+
+procedure KeyDemoDraw;
+begin
+ WriteLn ('Press some keys ...')
+end;
+
+procedure KeyDemoKey (Key: TKey);
+var ch: Char;
+begin
+ ch := Key2Char (Key);
+ if ch <> #0 then
+ begin
+ Write ('Normal key');
+ if IsPrintable (ch) then Write (' `', ch, '''');
+ WriteLn (', ASCII #', Ord (ch))
+ end
+ else
+ WriteLn ('Special key ', Ord (Key2Scan (Key)))
+end;
+
+procedure IOSelectPeriodical;
+var
+ CurrentTime: TimeStamp;
+ s: String (8);
+ i: Integer;
+begin
+ GetTimeStamp (CurrentTime);
+ with CurrentTime do
+ WriteStr (s, Hour : 2, ':', Minute : 2, ':', Second : 2);
+ for i := 1 to Length (s) do
+ if s[i] = ' ' then s[i] := '0';
+ GotoXY (1, 12);
+ Write ('The time is: ', s)
+end;
+
+procedure IOSelectDraw;
+begin
+ WriteLn ('IOSelect is a way to handle I/O from');
+ WriteLn ('or to several places simultaneously,');
+ WriteLn ('without having to use threads or');
+ WriteLn ('signal/interrupt handlers or waste');
+ WriteLn ('CPU time with busy waiting.');
+ WriteLn;
+ WriteLn ('This demo shows how IOSelect works');
+ WriteLn ('in connection with CRT. It displays');
+ WriteLn ('a clock, but still reacts to user');
+ WriteLn ('input immediately.');
+ IOSelectPeriodical
+end;
+
+procedure ModifierPeriodical;
+const
+ Pressed: array [Boolean] of String [8] = ('Released', 'Pressed');
+ ModifierNames: array [1 .. 7] of record
+ Modifier: Integer;
+ Name: String (17)
+ end =
+ ((shLeftShift, 'Left Shift'),
+ (shRightShift, 'Right Shift'),
+ (shLeftCtrl, 'Left Control'),
+ (shRightCtrl, 'Right Control'),
+ (shAlt, 'Alt (left)'),
+ (shAltGr, 'AltGr (right Alt)'),
+ (shExtra, 'Extra'));
+var
+ ShiftState, i: Integer;
+begin
+ ShiftState := GetShiftState;
+ for i := 1 to 7 do
+ with ModifierNames[i] do
+ begin
+ GotoXY (1, 4 + i);
+ ClrEOL;
+ Write (Name, ':');
+ GotoXY (20, WhereY);
+ Write (Pressed[(ShiftState and Modifier) <> 0])
+ end
+end;
+
+procedure ModifierDraw;
+begin
+ WriteLn ('Modifier keys (NOTE: only');
+ WriteLn ('available on some systems;');
+ WriteLn ('X11: only after key press):');
+ ModifierPeriodical
+end;
+
+procedure ChecksDraw;
+begin
+ WriteLn ('(O)S shell');
+ WriteLn ('OS shell with (C)learing');
+ WriteLn ('(R)efresh check');
+ Write ('(S)ound check')
+end;
+
+procedure ChecksKey (Key: TKey);
+var
+ i, j: Integer;
+ WasteTime: Real; attribute (volatile);
+
+ procedure DoOSShell;
+ var
+ Result: Integer;
+ Shell: TString;
+ begin
+ Shell := GetShellPath (Null);
+ {$I-}
+ Result := Execute (Shell);
+ {$I+}
+ if (InOutRes <> 0) or (Result <> 0) then
+ begin
+ ClrScr;
+ if InOutRes <> 0 then
+ WriteLn (GetIOErrorMessage, ' while trying to execute `', Shell, '''.')
+ else
+ WriteLn ('`', Shell, ''' returned status ', Result, '.');
+ Write ('Any key to continue.');
+ BlockCursor;
+ Discard (GetKey (-1))
+ end
+ end;
+
+begin
+ case LoCase (Key2Char (Key)) of
+ 'o': begin
+ if PopUpConfirm (36, 12, 'You will now get an OS shell. Unless' + NewLine +
+ 'CRTDemo is running in its own (GUI)' + NewLine +
+ 'window, the shell will run on the' + NewLine +
+ 'same screen as CRTDemo which is not' + NewLine +
+ 'cleared before the shell is started.' + NewLine +
+ 'If possible, the screen contents are' + NewLine +
+ 'restored to the state before CRTDemo' + NewLine +
+ 'was started. After leaving the shell' + NewLine +
+ 'in the usual way (usually by enter-' + NewLine +
+ 'ing `exit''), you will get back to' + NewLine +
+ 'the demo. <ESC> to abort, any other' + NewLine +
+ 'key to start.') then
+ begin
+ RestoreTerminal (True);
+ DoOSShell
+ end;
+ ClosePopUpWindow
+ end;
+ 'c': begin
+ if PopUpConfirm (36, 9, 'You will now get an OS shell. Unless' + NewLine +
+ 'CRTDemo is running in its own (GUI)' + NewLine +
+ 'window, the screen will be cleared,' + NewLine +
+ 'and the cursor will be moved to the' + NewLine +
+ 'top before the shell is started.' + NewLine +
+ 'After leaving the shell in the usual' + NewLine +
+ 'way (usually by entering `exit''),' + NewLine +
+ 'you will get back to the demo. <ESC>' + NewLine +
+ 'to abort, any other key to start.') then
+ begin
+ RestoreTerminalClearCRT;
+ DoOSShell
+ end;
+ ClosePopUpWindow
+ end;
+ 'r': begin
+ if PopUpConfirm (36, 11, 'The program will now get busy with' + NewLine +
+ 'some dummy computations. However,' + NewLine +
+ 'CRT output in the form of dots will' + NewLine +
+ 'still appear continuously one by one' + NewLine +
+ '(rather than the whole line at once' + NewLine +
+ 'in the end). While running, the test' + NewLine +
+ 'cannot be interrupted. <ESC> to' + NewLine +
+ 'abort, any other key to start.') then
+ begin
+ SetCRTUpdate (UpdateRegularly);
+ BlockCursor;
+ WriteLn;
+ WriteLn;
+ for i := 1 to GetXMax - 2 do
+ begin
+ Write ('.');
+ for j := 1 to 400000 do WasteTime := Random
+ end;
+ SetCRTUpdate (UpdateInput);
+ WriteLn;
+ Write ('Press any key.');
+ Discard (GetKey (-1))
+ end;
+ ClosePopUpWindow
+ end;
+ 's': begin
+ if PopUpConfirm (32, 4, 'You will now hear some sounds if' + NewLine +
+ 'supported (otherwise there will' + NewLine +
+ 'just be a short pause). <ESC> to' + NewLine +
+ 'abort, any other key to start.') then
+ begin
+ BlockCursor;
+ for i := 0 to 7 do
+ begin
+ Sound (Round (440 * 2 ** (Round (i * 12 / 7 + 0.3) / 12)));
+ if GetKey (400000) in [kbEsc, kbAltEsc] then Break
+ end;
+ NoSound
+ end;
+ ClosePopUpWindow
+ end;
+ end
+end;
+
+type
+ PWindowList = ^TWindowList;
+ TWindowList = record
+ Next, Prev: PWindowList;
+ Panel, FramePanel: TPanel;
+ WindowType: Integer;
+ x1, y1, xs, ys: Integer;
+ State: (ws_None, ws_Moving, ws_Resizing);
+ end;
+
+TKeyProc = procedure (Key: TKey);
+TProcedure = procedure;
+
+const
+ MenuNameLength = 16;
+ WindowTypes: array [0 .. 9] of record
+ DrawProc,
+ PeriodicalProc: procedure;
+ KeyProc : TKeyProc;
+ Name : String (MenuNameLength);
+ Color,
+ Background,
+ MinSizeX,
+ MinSizeY,
+ PrefSizeX,
+ PrefSizeY : Integer;
+ RedrawAlways,
+ WantCursor : Boolean
+ end =
+((MainDraw , nil , nil , 'CRT Demo' , LightGreen, Blue , 26, 7, 0, 0, False, False),
+ (StatusDraw , nil , StatusKey , 'Status' , White , Red , 38, 16, 0, 0, True, True),
+ (TextAttrDemo , nil , nil , 'Text Attributes' , White , Blue , 32, 16, 64, 16, False, False),
+ (NormalCharSetDemo, nil , nil , 'Character Set' , Black , Green , 35, 17, 53, 17, False, False),
+ (PCCharSetDemo , nil , nil , 'PC Character Set', Black , Brown , 35, 17, 53, 17, False, False),
+ (KeyDemoDraw , nil , KeyDemoKey , 'Keys' , Blue , LightGray, 29, 5, -1, -1, False, True),
+ (FKeyDemoDraw , nil , FKeyDemoKey, 'Function Keys' , Blue , LightGray, 37, 22, -1, -1, False, True),
+ (ModifierDraw , ModifierPeriodical, nil , 'Modifier Keys' , Black , Cyan , 29, 11, 0, 0, True, False),
+ (IOSelectDraw , IOSelectPeriodical, nil , 'IOSelect Demo' , White , Magenta , 38, 12, 0, 0, False, False),
+ (ChecksDraw , nil , ChecksKey , 'Various Checks' , Black , Red , 26, 4, 0, 0, False, False));
+
+MenuMax = High (WindowTypes);
+MenuXSize = MenuNameLength + 4;
+MenuYSize = MenuMax + 2;
+
+var
+ WindowList: PWindowList = nil;
+
+ procedure RedrawFrame (p: PWindowList);
+ begin
+ with p^, WindowTypes[WindowType] do
+ begin
+ PanelActivate (FramePanel);
+ Window (x1, y1, x1 + xs - 1, y1 + ys - 1);
+ ClrScr;
+ case State of
+ ws_None : if p = WindowList then
+ FrameWin (' ' + Name + ' ', DoubleFrame, True)
+ else
+ FrameWin (' ' + Name + ' ', SingleFrame, False);
+ ws_Moving : FrameWin (' Move Window ', SingleFrame, True);
+ ws_Resizing: FrameWin (' Resize Window ', SingleFrame, True);
+ end
+ end
+ end;
+
+ procedure DrawWindow (p: PWindowList);
+ begin
+ with p^, WindowTypes[WindowType] do
+ begin
+ RedrawFrame (p);
+ PanelActivate (Panel);
+ Window (x1 + 2, y1 + 1, x1 + xs - 2, y1 + ys - 2);
+ ClrScr;
+ DrawProc
+ end
+ end;
+
+ procedure RedrawAll;
+ var
+ LastPanel: TPanel;
+ p: PWindowList;
+ x2, y2: Integer;
+ begin
+ LastPanel := GetActivePanel;
+ PanelActivate (MainPanel);
+ TextBackground (Blue);
+ ClrScr;
+ p := WindowList;
+ if p <> nil then
+ repeat
+ with p^ do
+ begin
+ PanelActivate (FramePanel);
+ GetWindow (x1, y1, x2, y2); { updated automatically by CRT }
+ xs := x2 - x1 + 1;
+ ys := y2 - y1 + 1
+ end;
+ DrawWindow (p);
+ p := p^.Next
+ until p = WindowList;
+ PanelActivate (LastPanel)
+ end;
+
+ procedure CheckScreenSize;
+ var
+ LastPanel: TPanel;
+ MinScreenSizeX, MinScreenSizeY, i: Integer;
+ SSize: TPoint;
+ begin
+ LastPanel := GetActivePanel;
+ PanelActivate (MainPanel);
+ HideCursor;
+ MinScreenSizeX := MenuXSize;
+ MinScreenSizeY := MenuYSize;
+ for i := Low (WindowTypes) to High (WindowTypes) do
+ with WindowTypes[i] do
+ begin
+ MinScreenSizeX := Max (MinScreenSizeX, MinSizeX + 2);
+ MinScreenSizeY := Max (MinScreenSizeY, MinSizeY + 2)
+ end;
+ SSize := ScreenSize;
+ Window (1, 1, SSize.x, SSize.y);
+ if (SSize.x < MinScreenSizeX) or (SSize.y < MinScreenSizeY) then
+ begin
+ NormVideo;
+ ClrScr;
+ RestoreTerminal (True);
+ WriteLn (StdErr, 'Sorry, your screen is too small for this demo (', SSize.x, 'x', SSize.y, ').');
+ WriteLn (StdErr, 'You need at least ', MinScreenSizeX, 'x', MinScreenSizeY, ' characters.');
+ Halt (2)
+ end;
+ PanelActivate (LastPanel);
+ RedrawAll
+ end;
+
+ procedure Die; attribute (noreturn);
+ begin
+ NoSound;
+ RestoreTerminalClearCRT;
+ WriteLn (StdErr, 'You''re trying to kill me. Since I have break checking turned off,');
+ WriteLn (StdErr, 'I''m not dying, but I''ll do you a favour and terminate now.');
+ Halt (3)
+ end;
+
+ function GetKey (TimeOut: Integer) = Key: TKey;
+ var
+ NeedSelect, SelectValue: Integer;
+ SimulateBlockCursorCurrent: TSimulateBlockCursorKind;
+ SelectInput: array [1 .. 1] of PAnyFile = (@Input);
+ NextSelectTime: MicroSecondTimeType = 0; attribute (static);
+ TimeOutTime: MicroSecondTimeType;
+ LastPanel: TPanel;
+ p: PWindowList;
+ begin
+ LastPanel := GetActivePanel;
+ if TimeOut < 0 then
+ TimeOutTime := High (TimeOutTime)
+ else
+ TimeOutTime := GetMicroSecondTime + TimeOut;
+ NeedSelect := 0;
+ if TimeOut >= 0 then
+ Inc (NeedSelect);
+ SimulateBlockCursorCurrent := SimulateBlockCursorKind;
+ if SimulateBlockCursorCurrent <> bc_None then
+ Inc (NeedSelect);
+ p := WindowList;
+ repeat
+ if @WindowTypes[p^.WindowType].PeriodicalProc <> nil then
+ Inc (NeedSelect);
+ p := p^.Next
+ until p = WindowList;
+ p := WindowList;
+ repeat
+ with p^, WindowTypes[WindowType] do
+ if RedrawAlways then
+ begin
+ PanelActivate (Panel);
+ ClrScr;
+ DrawProc
+ end;
+ p := p^.Next
+ until p = WindowList;
+ if NeedSelect <> 0 then
+ repeat
+ CRTUpdate;
+ SelectValue := IOSelectRead (SelectInput, Max (0, Min (NextSelectTime, TimeOutTime) - GetMicroSecondTime));
+ if SelectValue = 0 then
+ begin
+ case SimulateBlockCursorCurrent of
+ bc_None : ;
+ bc_Blink : SimulateBlockCursor;
+ bc_Static: begin
+ SimulateBlockCursor;
+ SimulateBlockCursorCurrent := bc_None;
+ Dec (NeedSelect)
+ end
+ end;
+ NextSelectTime := GetMicroSecondTime + 120000;
+ p := WindowList;
+ repeat
+ with p^, WindowTypes[WindowType] do
+ if @PeriodicalProc <> nil then
+ begin
+ PanelActivate (Panel);
+ PeriodicalProc
+ end;
+ p := p^.Next
+ until p = WindowList
+ end;
+ until (NeedSelect = 0) or (SelectValue <> 0) or ((TimeOut >= 0) and (GetMicroSecondTime >= TimeOutTime));
+ if NeedSelect = 0 then
+ SelectValue := 1;
+ if SelectValue = 0 then
+ Key := 0
+ else
+ Key := ReadKeyWord;
+ if SimulateBlockCursorKind <> bc_None then
+ SimulateBlockCursorOff;
+ if IsDeadlySignal (Key) then Die;
+ if Key = kbScreenSizeChanged then CheckScreenSize;
+ PanelActivate (LastPanel)
+ end;
+
+ function Menu = n: Integer;
+ var
+ i, ax, ay: Integer;
+ Key: TKey;
+ Done: Boolean;
+ SSize: TPoint;
+ begin
+ n := 1;
+ repeat
+ SSize := ScreenSize;
+ ax := (SSize.x - MenuXSize) div 2 + 1;
+ ay := (SSize.y - MenuYSize) div 2 + 1;
+ PanelNew (ax, ay, ax + MenuXSize - 1, ay + MenuYSize - 1, False);
+ SetControlChars (True);
+ TextColor (Blue);
+ TextBackground (LightGray);
+ FrameWin (' Select Window ', DoubleFrame, True);
+ IgnoreCursor;
+ PanelNew (ax + 1, ay + 1, ax + MenuXSize - 2, ay + MenuYSize - 2, False);
+ ClrScr;
+ TextColor (Black);
+ SetScroll (False);
+ Done := False;
+ repeat
+ for i := 1 to MenuMax do
+ begin
+ GotoXY (1, i);
+ if i = n then
+ TextBackground (Green)
+ else
+ TextBackground (LightGray);
+ ClrEOL;
+ Write (' ', WindowTypes[i].Name);
+ ChangeTextAttr (2, i, 1, Red + $10 * GetTextBackground)
+ end;
+ Key := GetKey (-1);
+ case LoCaseKey (Key) of
+ kbUp : if n = 1 then n := MenuMax else Dec (n);
+ kbDown : if n = MenuMax then n := 1 else Inc (n);
+ kbHome,
+ kbPgUp,
+ kbCtrlPgUp,
+ kbCtrlHome : n := 1;
+ kbEnd,
+ kbPgDn,
+ kbCtrlPgDn,
+ kbCtrlEnd : n := MenuMax;
+ kbCR : Done := True;
+ kbEsc, kbAltEsc : begin
+ n := -1;
+ Done := True
+ end;
+ Ord ('a') .. Ord ('z'): begin
+ i := MenuMax;
+ while (i > 0) and (LoCase (Key2Char (Key)) <> LoCase (WindowTypes[i].Name[1])) do Dec (i);
+ if i > 0 then
+ begin
+ n := i;
+ Done := True
+ end
+ end;
+ end
+ until Done or (Key = kbScreenSizeChanged);
+ ClosePopUpWindow
+ until Key <> kbScreenSizeChanged
+ end;
+
+ procedure NewWindow (WindowType, ax, ay: Integer);
+ var
+ p, LastWindow: PWindowList;
+ MaxX1, MaxY1: Integer;
+ SSize: TPoint;
+ begin
+ New (p);
+ if WindowList = nil then
+ begin
+ p^.Prev := p;
+ p^.Next := p
+ end
+ else
+ begin
+ p^.Prev := WindowList;
+ p^.Next := WindowList^.Next;
+ p^.Prev^.Next := p;
+ p^.Next^.Prev := p;
+ end;
+ p^.WindowType := WindowType;
+ with p^, WindowTypes[WindowType] do
+ begin
+ SSize := ScreenSize;
+ if PrefSizeX > 0 then xs := PrefSizeX else xs := MinSizeX;
+ if PrefSizeY > 0 then ys := PrefSizeY else ys := MinSizeY;
+ xs := Min (xs + 2, SSize.x);
+ ys := Min (ys + 2, SSize.y);
+ MaxX1 := SSize.x - xs + 1;
+ MaxY1 := SSize.y - ys + 1;
+ if ax = 0 then x1 := Random (MaxX1) + 1 else x1 := Min (ax, MaxX1);
+ if ay = 0 then y1 := Random (MaxY1) + 1 else y1 := Min (ay, MaxY1);
+ if (ax = 0) and (PrefSizeX < 0) then Inc (xs, Random (SSize.x - x1 - xs + 2));
+ if (ax = 0) and (PrefSizeY < 0) then Inc (ys, Random (SSize.y - y1 - ys + 2));
+ State := ws_None;
+ PanelNew (1, 1, 1, 1, False);
+ FramePanel := GetActivePanel;
+ SetControlChars (True);
+ TextColor (Color);
+ TextBackground (Background);
+ PanelNew (1, 1, 1, 1, False);
+ SetPCCharSet (False);
+ Panel := GetActivePanel;
+ end;
+ LastWindow := WindowList;
+ WindowList := p;
+ if LastWindow <> nil then RedrawFrame (LastWindow);
+ DrawWindow (p)
+ end;
+
+ procedure OpenWindow;
+ var WindowType: Integer;
+ begin
+ WindowType := Menu;
+ if WindowType >= 0 then NewWindow (WindowType, 0, 0)
+ end;
+
+ procedure NextWindow;
+ var LastWindow: PWindowList;
+ begin
+ LastWindow := WindowList;
+ WindowList := WindowList^.Next;
+ PanelTop (WindowList^.FramePanel);
+ PanelTop (WindowList^.Panel);
+ RedrawFrame (LastWindow);
+ RedrawFrame (WindowList)
+ end;
+
+ procedure PreviousWindow;
+ var LastWindow: PWindowList;
+ begin
+ PanelMoveAbove (WindowList^.Panel, MainPanel);
+ PanelMoveAbove (WindowList^.FramePanel, MainPanel);
+ LastWindow := WindowList;
+ WindowList := WindowList^.Prev;
+ RedrawFrame (LastWindow);
+ RedrawFrame (WindowList)
+ end;
+
+ procedure CloseWindow;
+ var p: PWindowList;
+ begin
+ if WindowList^.WindowType <> 0 then
+ begin
+ p := WindowList;
+ NextWindow;
+ PanelDelete (p^.FramePanel);
+ PanelDelete (p^.Panel);
+ p^.Next^.Prev := p^.Prev;
+ p^.Prev^.Next := p^.Next;
+ Dispose (p)
+ end
+ end;
+
+ procedure MoveWindow;
+ var
+ Done, Changed: Boolean;
+ SSize: TPoint;
+ begin
+ with WindowList^ do
+ begin
+ Done := False;
+ Changed := True;
+ State := ws_Moving;
+ repeat
+ if Changed then DrawWindow (WindowList);
+ Changed := True;
+ case LoCaseKey (GetKey (-1)) of
+ Ord ('s'), kbLeft : if x1 > 1 then Dec (x1);
+ Ord ('d'), kbRight : if x1 + xs - 1 < ScreenSize.x then Inc (x1);
+ Ord ('e'), kbUp : if y1 > 1 then Dec (y1);
+ Ord ('x'), kbDown : if y1 + ys - 1 < ScreenSize.y then Inc (y1);
+ Ord ('a'), kbHome : x1 := 1;
+ Ord ('f'), kbEnd : x1 := ScreenSize.x - xs + 1;
+ Ord ('r'), kbPgUp : y1 := 1;
+ Ord ('c'), kbPgDn : y1 := ScreenSize.y - ys + 1;
+ Ord ('y'), kbCtrlPgUp: begin
+ x1 := 1;
+ y1 := 1
+ end;
+ Ord ('b'), kbCtrlPgDn: begin
+ SSize := ScreenSize;
+ x1 := SSize.x - xs + 1;
+ y1 := SSize.y - ys + 1
+ end;
+ kbCR,
+ kbEsc, kbAltEsc : Done := True;
+ else Changed := False
+ end
+ until Done;
+ State := ws_None;
+ DrawWindow (WindowList)
+ end
+ end;
+
+ procedure ResizeWindow;
+ var
+ Done, Changed: Boolean;
+ SSize: TPoint;
+ begin
+ with WindowList^, WindowTypes[WindowType] do
+ begin
+ Done := False;
+ Changed := True;
+ State := ws_Resizing;
+ repeat
+ if Changed then DrawWindow (WindowList);
+ Changed := True;
+ case LoCaseKey (GetKey (-1)) of
+ Ord ('s'), kbLeft : if xs > MinSizeX + 2 then Dec (xs);
+ Ord ('d'), kbRight : if x1 + xs - 1 < ScreenSize.x then Inc (xs);
+ Ord ('e'), kbUp : if ys > MinSizeY + 2 then Dec (ys);
+ Ord ('x'), kbDown : if y1 + ys - 1 < ScreenSize.y then Inc (ys);
+ Ord ('a'), kbHome : xs := MinSizeX + 2;
+ Ord ('f'), kbEnd : xs := ScreenSize.x - x1 + 1;
+ Ord ('r'), kbPgUp : ys := MinSizeY + 2;
+ Ord ('c'), kbPgDn : ys := ScreenSize.y - y1 + 1;
+ Ord ('y'), kbCtrlPgUp: begin
+ xs := MinSizeX + 2;
+ ys := MinSizeY + 2
+ end;
+ Ord ('b'), kbCtrlPgDn: begin
+ SSize := ScreenSize;
+ xs := SSize.x - x1 + 1;
+ ys := SSize.y - y1 + 1
+ end;
+ kbCR,
+ kbEsc, kbAltEsc : Done := True;
+ else Changed := False
+ end
+ until Done;
+ State := ws_None;
+ DrawWindow (WindowList)
+ end
+ end;
+
+ procedure ActivateCursor;
+ begin
+ with WindowList^, WindowTypes[WindowType] do
+ begin
+ PanelActivate (Panel);
+ if WantCursor then
+ SetCursorShape (CursorShape)
+ else
+ HideCursor
+ end;
+ SetScroll (ScrollState)
+ end;
+
+var
+ Key: TKey;
+ ScreenShot, Done: Boolean;
+
+begin
+ ScreenShot := ParamStr (1) = '--screenshot';
+ if ParamCount <> Ord (ScreenShot) then
+ begin
+ RestoreTerminal (True);
+ WriteLn (StdErr, ParamStr (0), ': invalid argument `', ParamStr (Ord (ScreenShot) + 1), '''');
+ Halt (1)
+ end;
+ CRTSavePreviousScreen (True);
+ SetCRTUpdate (UpdateInput);
+ MainPanel := GetActivePanel;
+ CheckScreenSize;
+ OrigScreenSize := ScreenSize;
+ if ScreenShot then
+ begin
+ CursorShape := CursorBlock;
+ NewWindow (6, 1, 1);
+ NewWindow (2, 1, MaxInt);
+ NewWindow (8, MaxInt, 1);
+ NewWindow (5, 1, 27);
+ KeyDemoKey (Ord ('f'));
+ KeyDemoKey (246);
+ KeyDemoKey (kbDown);
+ NewWindow (3, MaxInt, 13);
+ NewWindow (4, MaxInt, 31);
+ NewWindow (7, MaxInt, MaxInt);
+ NewWindow (9, MaxInt, 33);
+ NewWindow (0, 1, 2);
+ NewWindow (1, 1, 14);
+ ActivateCursor;
+ OpenWindow
+ end
+ else
+ NewWindow (0, 3, 2);
+ Done := False;
+ repeat
+ ActivateCursor;
+ Key := GetKey (-1);
+ case LoCaseKey (Key) of
+ Ord ('3'), kbF3 : OpenWindow;
+ Ord ('4'), kbF4 : CloseWindow;
+ Ord ('5'), kbF5 : PreviousWindow;
+ Ord ('6'), kbF6 : NextWindow;
+ Ord ('7'), kbF7 : MoveWindow;
+ Ord ('8'), kbF8 : ResizeWindow;
+ Ord ('q'), kbEsc,
+ kbAltEsc: Done := True;
+ else
+ if WindowList <> nil then
+ with WindowList^, WindowTypes[WindowType] do
+ if @KeyProc <> nil then
+ begin
+ TextColor (Color);
+ TextBackground (Background);
+ KeyProc (Key)
+ end
+ end
+ until Done
+end.
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) :-
elaborate(let(F,T,app(fix,lambda(F,T,B)),E), Env, Ee).
%% elab_bindings(+TS, +Env, -TS).
-%% Applique `elaborate' sur l'environnment de type TS.
+%% Applique `elaborate' sur l'environnement de type TS.
elab_tenv([], _, []).
elab_tenv([(X,T)|TS], Env, [(X, Tg)|TSe]) :-
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
rm -f subdirs.el
else
rm -f subdirs.el~
- echo ";; -*- no-byte-compile: t -*-
-;; In load-path, after this directory should come
+ echo ";; In load-path, after this directory should come
;; certain of its subdirectories. Here we specify them.
(normal-top-level-add-to-load-path '($subdirs))
;; Local" "Variables: