summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.dir-locals.el3
-rw-r--r--BUGS13
-rw-r--r--ChangeLog293
-rw-r--r--Makefile.in524
-rw-r--r--admin/CPP-DEFINES11
-rw-r--r--admin/ChangeLog32
-rw-r--r--admin/FOR-RELEASE14
-rw-r--r--admin/MAINTAINERS2
-rw-r--r--admin/bzrmerge.el3
-rwxr-xr-xadmin/merge-gnulib86
-rw-r--r--autogen/Makefile.in15
-rw-r--r--autogen/aclocal.m42
-rw-r--r--autogen/config.in105
-rwxr-xr-xautogen/configure866
-rwxr-xr-xbuild-aux/update-subdirs (renamed from update-subdirs)0
-rw-r--r--configure.in481
-rw-r--r--doc/emacs/ChangeLog203
-rw-r--r--doc/emacs/Makefile.in23
-rw-r--r--doc/emacs/abbrevs.texi13
-rw-r--r--doc/emacs/ack.texi6
-rw-r--r--doc/emacs/arevert-xtra.texi1
-rw-r--r--doc/emacs/basic.texi4
-rw-r--r--doc/emacs/buffers.texi27
-rw-r--r--doc/emacs/building.texi12
-rw-r--r--doc/emacs/calendar.texi30
-rw-r--r--doc/emacs/cmdargs.texi4
-rw-r--r--doc/emacs/commands.texi2
-rw-r--r--doc/emacs/custom.texi22
-rw-r--r--doc/emacs/dired.texi12
-rw-r--r--doc/emacs/display.texi17
-rw-r--r--doc/emacs/emacs.texi80
-rw-r--r--doc/emacs/emerge-xtra.texi2
-rw-r--r--doc/emacs/files.texi9
-rw-r--r--doc/emacs/fixit.texi9
-rw-r--r--doc/emacs/fortran-xtra.texi2
-rw-r--r--doc/emacs/frames.texi60
-rw-r--r--doc/emacs/help.texi2
-rw-r--r--doc/emacs/kmacro.texi2
-rw-r--r--doc/emacs/maintaining.texi6
-rw-r--r--doc/emacs/makefile.w32-in11
-rw-r--r--doc/emacs/mini.texi2
-rw-r--r--doc/emacs/misc.texi12
-rw-r--r--doc/emacs/modes.texi10
-rw-r--r--doc/emacs/msdog-xtra.texi2
-rw-r--r--doc/emacs/mule.texi41
-rw-r--r--doc/emacs/picture-xtra.texi2
-rw-r--r--doc/emacs/programs.texi35
-rw-r--r--doc/emacs/rmail.texi6
-rw-r--r--doc/emacs/search.texi10
-rw-r--r--doc/emacs/text.texi34
-rw-r--r--doc/emacs/trouble.texi10
-rw-r--r--doc/emacs/windows.texi4
-rw-r--r--doc/emacs/xresources.texi2
-rw-r--r--doc/lispintro/ChangeLog29
-rw-r--r--doc/lispintro/Makefile.in16
-rw-r--r--doc/lispintro/emacs-lisp-intro.texi84
-rw-r--r--doc/lispintro/makefile.w32-in12
-rw-r--r--doc/lispref/ChangeLog185
-rw-r--r--doc/lispref/Makefile.in22
-rw-r--r--doc/lispref/anti.texi3
-rw-r--r--doc/lispref/book-spine.texi4
-rw-r--r--doc/lispref/buffers.texi4
-rw-r--r--doc/lispref/commands.texi10
-rw-r--r--doc/lispref/compile.texi123
-rw-r--r--doc/lispref/control.texi62
-rw-r--r--doc/lispref/customize.texi64
-rw-r--r--doc/lispref/display.texi30
-rw-r--r--doc/lispref/edebug.texi4
-rw-r--r--doc/lispref/elisp-covers.texi252
-rw-r--r--doc/lispref/elisp.texi126
-rw-r--r--doc/lispref/eval.texi33
-rw-r--r--doc/lispref/files.texi20
-rw-r--r--doc/lispref/frames.texi18
-rw-r--r--doc/lispref/front-cover-1.texi52
-rw-r--r--doc/lispref/functions.texi55
-rw-r--r--doc/lispref/hash.texi8
-rw-r--r--doc/lispref/help.texi2
-rw-r--r--doc/lispref/internals.texi10
-rw-r--r--doc/lispref/intro.texi22
-rw-r--r--doc/lispref/keymaps.texi42
-rw-r--r--doc/lispref/lists.texi15
-rw-r--r--doc/lispref/loading.texi68
-rw-r--r--doc/lispref/macros.texi38
-rw-r--r--doc/lispref/makefile.w32-in12
-rw-r--r--doc/lispref/minibuf.texi26
-rw-r--r--doc/lispref/modes.texi30
-rw-r--r--doc/lispref/numbers.texi4
-rw-r--r--doc/lispref/objects.texi7
-rw-r--r--doc/lispref/os.texi75
-rw-r--r--doc/lispref/package.texi4
-rw-r--r--doc/lispref/processes.texi4
-rw-r--r--doc/lispref/sequences.texi2
-rw-r--r--doc/lispref/streams.texi9
-rw-r--r--doc/lispref/symbols.texi22
-rw-r--r--doc/lispref/syntax.texi4
-rw-r--r--doc/lispref/text.texi38
-rwxr-xr-xdoc/lispref/tindex.pl124
-rw-r--r--doc/lispref/tips.texi14
-rw-r--r--doc/lispref/two-volume.make37
-rw-r--r--doc/lispref/two.el78
-rw-r--r--doc/lispref/variables.texi2
-rw-r--r--doc/lispref/vol1.texi1552
-rw-r--r--doc/lispref/vol2.texi1551
-rw-r--r--doc/lispref/windows.texi256
-rw-r--r--doc/misc/ChangeLog110
-rw-r--r--doc/misc/Makefile.in425
-rw-r--r--doc/misc/auth.texi13
-rw-r--r--doc/misc/calc.texi18
-rw-r--r--doc/misc/cc-mode.texi23
-rw-r--r--doc/misc/dbus.texi313
-rw-r--r--doc/misc/emacs-gnutls.texi4
-rw-r--r--doc/misc/ert.texi4
-rw-r--r--doc/misc/faq.texi218
-rw-r--r--doc/misc/forms.texi5
-rw-r--r--doc/misc/makefile.w32-in241
-rw-r--r--doc/misc/org.texi2
-rw-r--r--doc/misc/viper.texi4
-rw-r--r--etc/ChangeLog16
-rw-r--r--etc/MORE.STUFF4
-rw-r--r--etc/NEWS207
-rw-r--r--etc/ORG-NEWS948
-rw-r--r--etc/TODO10
-rw-r--r--etc/forms/README1
-rw-r--r--etc/forms/forms-d2.dat (renamed from etc/forms-d2.dat)0
-rw-r--r--etc/forms/forms-d2.el (renamed from lisp/forms-d2.el)4
-rw-r--r--etc/forms/forms-pass.el (renamed from lisp/forms-pass.el)2
-rw-r--r--etc/org/OrgOdtStyles.xml20
-rw-r--r--etc/refcards/README15
-rw-r--r--etc/refcards/calccard.pdfbin153616 -> 153779 bytes
-rw-r--r--etc/refcards/cs-dired-ref.pdfbin67057 -> 66941 bytes
-rw-r--r--etc/refcards/cs-refcard.pdfbin87237 -> 87189 bytes
-rw-r--r--etc/refcards/de-refcard.pdfbin125665 -> 125594 bytes
-rw-r--r--etc/refcards/dired-ref.pdfbin85646 -> 85574 bytes
-rw-r--r--etc/refcards/fr-dired-ref.pdfbin87517 -> 87452 bytes
-rw-r--r--etc/refcards/fr-refcard.pdfbin121482 -> 121431 bytes
-rw-r--r--etc/refcards/gnus-booklet.pdfbin152568 -> 152542 bytes
-rw-r--r--etc/refcards/gnus-refcard.pdfbin154872 -> 154831 bytes
-rw-r--r--etc/refcards/pl-refcard.pdfbin65689 -> 92536 bytes
-rw-r--r--etc/refcards/pt-br-refcard.pdfbin116731 -> 116662 bytes
-rw-r--r--etc/refcards/refcard.pdfbin116497 -> 116725 bytes
-rw-r--r--etc/refcards/ru-refcard.pdfbin147939 -> 147864 bytes
-rw-r--r--etc/refcards/sk-dired-ref.pdfbin66284 -> 66171 bytes
-rw-r--r--etc/refcards/sk-refcard.pdfbin88590 -> 88535 bytes
-rw-r--r--info/.gitignore2
-rw-r--r--info/dir16
-rw-r--r--leim/ChangeLog39
-rw-r--r--leim/Makefile.in89
-rw-r--r--lib-src/ChangeLog63
-rw-r--r--lib-src/Makefile.in20
-rw-r--r--lib-src/emacsclient.c43
-rw-r--r--lib-src/etags.c67
-rw-r--r--lib-src/make-docfile.c2
-rw-r--r--lib-src/makefile.w32-in9
-rw-r--r--lib-src/pop.c8
-rw-r--r--lib/makefile.w32-in10
-rw-r--r--lisp/ChangeLog1383
-rw-r--r--lisp/Makefile.in10
-rw-r--r--lisp/abbrev.el2
-rw-r--r--lisp/allout-widgets.el26
-rw-r--r--lisp/allout.el112
-rw-r--r--lisp/ansi-color.el8
-rw-r--r--lisp/apropos.el99
-rw-r--r--lisp/arc-mode.el5
-rw-r--r--lisp/autoinsert.el6
-rw-r--r--lisp/autorevert.el5
-rw-r--r--lisp/bindings.el22
-rw-r--r--lisp/bookmark.el8
-rw-r--r--lisp/buff-menu.el993
-rw-r--r--lisp/calc/calc-forms.el2
-rw-r--r--lisp/calc/calc-lang.el35
-rw-r--r--lisp/calc/calc-units.el27
-rw-r--r--lisp/calc/calc.el9
-rw-r--r--lisp/calendar/cal-html.el43
-rw-r--r--lisp/calendar/cal-tex.el44
-rw-r--r--lisp/calendar/calendar.el4
-rw-r--r--lisp/calendar/holidays.el27
-rw-r--r--lisp/cedet/mode-local.el4
-rw-r--r--lisp/comint.el256
-rw-r--r--lisp/completion.el8
-rw-r--r--lisp/cus-edit.el354
-rw-r--r--lisp/cus-start.el44
-rw-r--r--lisp/custom.el3
-rw-r--r--lisp/dabbrev.el47
-rw-r--r--lisp/desktop.el6
-rw-r--r--lisp/dired-x.el5
-rw-r--r--lisp/dired.el52
-rw-r--r--lisp/dirtrack.el13
-rw-r--r--lisp/doc-view.el13
-rw-r--r--lisp/dos-fns.el6
-rw-r--r--lisp/dos-w32.el17
-rw-r--r--lisp/ebuff-menu.el141
-rw-r--r--lisp/emacs-lisp/byte-run.el2
-rw-r--r--lisp/emacs-lisp/bytecomp.el65
-rw-r--r--lisp/emacs-lisp/cconv.el4
-rw-r--r--lisp/emacs-lisp/chart.el2
-rw-r--r--lisp/emacs-lisp/check-declare.el4
-rw-r--r--lisp/emacs-lisp/checkdoc.el33
-rw-r--r--lisp/emacs-lisp/cl-extra.el6
-rw-r--r--lisp/emacs-lisp/cl-loaddefs.el76
-rw-r--r--lisp/emacs-lisp/cl-macs.el374
-rw-r--r--lisp/emacs-lisp/cl-seq.el40
-rw-r--r--lisp/emacs-lisp/cl-specs.el471
-rw-r--r--lisp/emacs-lisp/cl.el59
-rw-r--r--lisp/emacs-lisp/copyright.el7
-rw-r--r--lisp/emacs-lisp/easy-mmode.el11
-rw-r--r--lisp/emacs-lisp/edebug.el8
-rw-r--r--lisp/emacs-lisp/ewoc.el9
-rw-r--r--lisp/emacs-lisp/generic.el6
-rw-r--r--lisp/emacs-lisp/lisp-mode.el20
-rw-r--r--lisp/emacs-lisp/package.el9
-rw-r--r--lisp/emacs-lisp/pcase.el72
-rw-r--r--lisp/emacs-lisp/smie.el32
-rw-r--r--lisp/emacs-lisp/syntax.el15
-rw-r--r--lisp/emacs-lisp/tabulated-list.el341
-rw-r--r--lisp/emacs-lisp/timer.el6
-rw-r--r--lisp/emacs-lock.el4
-rw-r--r--lisp/emulation/tpu-edt.el2
-rw-r--r--lisp/epg-config.el6
-rw-r--r--lisp/erc/ChangeLog11
-rw-r--r--lisp/erc/erc-backend.el17
-rw-r--r--lisp/erc/erc-dcc.el2
-rw-r--r--lisp/eshell/esh-cmd.el14
-rw-r--r--lisp/eshell/eshell.el3
-rw-r--r--lisp/face-remap.el39
-rw-r--r--lisp/facemenu.el9
-rw-r--r--lisp/faces.el62
-rw-r--r--lisp/ffap.el232
-rw-r--r--lisp/files.el100
-rw-r--r--lisp/find-file.el16
-rw-r--r--lisp/follow.el1606
-rw-r--r--lisp/forms.el8
-rw-r--r--lisp/frame.el7
-rw-r--r--lisp/gnus/ChangeLog62
-rw-r--r--lisp/gnus/auth-source.el98
-rw-r--r--lisp/gnus/gnus-registry.el136
-rw-r--r--lisp/gnus/gnus-win.el27
-rw-r--r--lisp/gnus/gnus.el25
-rw-r--r--lisp/gnus/nnimap.el2
-rw-r--r--lisp/gnus/nnspool.el20
-rw-r--r--lisp/gnus/nnweb.el2
-rw-r--r--lisp/gnus/plstore.el147
-rw-r--r--lisp/hi-lock.el9
-rw-r--r--lisp/ibuf-ext.el106
-rw-r--r--lisp/ibuf-macs.el6
-rw-r--r--lisp/ibuffer.el16
-rw-r--r--lisp/ido.el11
-rw-r--r--lisp/image-mode.el193
-rw-r--r--lisp/image.el4
-rw-r--r--lisp/imenu.el151
-rw-r--r--lisp/info.el82
-rw-r--r--lisp/international/mule.el5
-rw-r--r--lisp/isearch.el88
-rw-r--r--lisp/iswitchb.el11
-rw-r--r--lisp/kmacro.el34
-rw-r--r--lisp/language/burmese.el2
-rw-r--r--lisp/language/cham.el2
-rw-r--r--lisp/language/czech.el4
-rw-r--r--lisp/language/english.el4
-rw-r--r--lisp/language/georgian.el4
-rw-r--r--lisp/language/greek.el2
-rw-r--r--lisp/language/japanese.el4
-rw-r--r--lisp/language/khmer.el2
-rw-r--r--lisp/language/korean.el4
-rw-r--r--lisp/language/lao.el4
-rw-r--r--lisp/language/misc-lang.el2
-rw-r--r--lisp/language/romanian.el4
-rw-r--r--lisp/language/sinhala.el2
-rw-r--r--lisp/language/slovak.el4
-rw-r--r--lisp/language/tai-viet.el4
-rw-r--r--lisp/language/thai.el4
-rw-r--r--lisp/language/utf-8-lang.el4
-rw-r--r--lisp/ldefs-boot.el2448
-rw-r--r--lisp/loadhist.el4
-rw-r--r--lisp/loadup.el2
-rw-r--r--lisp/mail/emacsbug.el9
-rw-r--r--lisp/mail/feedmail.el30
-rw-r--r--lisp/mail/footnote.el10
-rw-r--r--lisp/mail/mailabbrev.el16
-rw-r--r--lisp/mail/rmail.el75
-rw-r--r--lisp/mail/rmailmm.el48
-rw-r--r--lisp/mail/smtpmail.el3
-rw-r--r--lisp/makefile.w32-in6
-rw-r--r--lisp/man.el107
-rw-r--r--lisp/menu-bar.el5
-rw-r--r--lisp/mh-e/ChangeLog240
-rw-r--r--lisp/mh-e/mh-utils.el3
-rw-r--r--lisp/minibuffer.el410
-rw-r--r--lisp/mouse.el25
-rw-r--r--lisp/mpc.el4
-rw-r--r--lisp/net/ange-ftp.el3
-rw-r--r--lisp/net/browse-url.el4
-rw-r--r--lisp/net/dbus.el1071
-rw-r--r--lisp/net/rlogin.el12
-rw-r--r--lisp/net/soap-client.el110
-rw-r--r--lisp/net/soap-inspect.el25
-rw-r--r--lisp/net/tramp.el2
-rw-r--r--lisp/net/xesam.el2
-rw-r--r--lisp/newcomment.el15
-rw-r--r--lisp/notifications.el80
-rw-r--r--lisp/novice.el6
-rw-r--r--lisp/obsolete/assoc.el (renamed from lisp/emacs-lisp/assoc.el)20
-rw-r--r--lisp/obsolete/bruce.el (renamed from lisp/play/bruce.el)1
-rw-r--r--lisp/obsolete/patcomp.el (renamed from lisp/patcomp.el)2
-rw-r--r--lisp/org/ChangeLog177
-rw-r--r--lisp/org/ob-python.el2
-rw-r--r--lisp/org/org-agenda.el2
-rw-r--r--lisp/org/org-clock.el2
-rw-r--r--lisp/org/org-ctags.el2
-rw-r--r--lisp/org/org-faces.el10
-rw-r--r--lisp/org/org-footnote.el13
-rw-r--r--lisp/org/org-list.el77
-rw-r--r--lisp/org/org-mouse.el1
-rw-r--r--lisp/org/org-odt.el1
-rw-r--r--lisp/org/org-table.el4
-rw-r--r--lisp/org/org.el85
-rw-r--r--lisp/paths.el101
-rw-r--r--lisp/pcmpl-unix.el4
-rw-r--r--lisp/pcomplete.el145
-rw-r--r--lisp/play/zone.el5
-rw-r--r--lisp/progmodes/cc-defs.el2
-rw-r--r--lisp/progmodes/cc-engine.el44
-rw-r--r--lisp/progmodes/compile.el30
-rw-r--r--lisp/progmodes/ebnf2ps.el4
-rw-r--r--lisp/progmodes/etags.el60
-rw-r--r--lisp/progmodes/f90.el19
-rw-r--r--lisp/progmodes/flymake.el2
-rw-r--r--lisp/progmodes/gdb-mi.el211
-rw-r--r--lisp/progmodes/gud.el5
-rw-r--r--lisp/progmodes/idlw-shell.el23
-rw-r--r--lisp/progmodes/idlwave.el9
-rw-r--r--lisp/progmodes/js.el21
-rw-r--r--lisp/progmodes/make-mode.el1
-rw-r--r--lisp/progmodes/meta-mode.el2
-rw-r--r--lisp/progmodes/octave-mod.el19
-rw-r--r--lisp/progmodes/pascal.el55
-rw-r--r--lisp/progmodes/prolog.el435
-rw-r--r--lisp/progmodes/python.el39
-rw-r--r--lisp/progmodes/ruby-mode.el89
-rw-r--r--lisp/progmodes/sh-script.el548
-rw-r--r--lisp/progmodes/verilog-mode.el1176
-rw-r--r--lisp/progmodes/which-func.el9
-rw-r--r--lisp/repeat.el142
-rw-r--r--lisp/select.el83
-rw-r--r--lisp/ses.el1
-rw-r--r--lisp/shell.el69
-rw-r--r--lisp/simple.el80
-rw-r--r--lisp/skeleton.el2
-rw-r--r--lisp/speedbar.el28
-rw-r--r--lisp/startup.el56
-rw-r--r--lisp/subr.el120
-rw-r--r--lisp/tar-mode.el2
-rw-r--r--lisp/term.el334
-rw-r--r--lisp/term/AT386.el2
-rw-r--r--lisp/term/apollo.el1
-rw-r--r--lisp/term/bobcat.el1
-rw-r--r--lisp/term/cygwin.el2
-rw-r--r--lisp/term/iris-ansi.el2
-rw-r--r--lisp/term/linux.el3
-rw-r--r--lisp/term/lk201.el1
-rw-r--r--lisp/term/news.el2
-rw-r--r--lisp/term/ns-win.el38
-rw-r--r--lisp/term/screen.el3
-rw-r--r--lisp/term/vt102.el1
-rw-r--r--lisp/term/vt125.el1
-rw-r--r--lisp/term/vt200.el1
-rw-r--r--lisp/term/vt201.el1
-rw-r--r--lisp/term/vt220.el1
-rw-r--r--lisp/term/vt240.el1
-rw-r--r--lisp/term/vt300.el1
-rw-r--r--lisp/term/vt320.el1
-rw-r--r--lisp/term/vt400.el1
-rw-r--r--lisp/term/vt420.el1
-rw-r--r--lisp/term/w32-win.el1
-rw-r--r--lisp/term/wyse50.el4
-rw-r--r--lisp/term/x-win.el1
-rw-r--r--lisp/term/xterm.el2
-rw-r--r--lisp/textmodes/flyspell.el374
-rw-r--r--lisp/textmodes/ispell.el89
-rw-r--r--lisp/textmodes/picture.el2
-rw-r--r--lisp/textmodes/reftex-index.el8
-rw-r--r--lisp/textmodes/reftex-sel.el8
-rw-r--r--lisp/textmodes/reftex-toc.el2
-rw-r--r--lisp/textmodes/rst.el3853
-rw-r--r--lisp/textmodes/tildify.el2
-rw-r--r--lisp/time.el2
-rw-r--r--lisp/tooltip.el4
-rw-r--r--lisp/url/ChangeLog64
-rw-r--r--lisp/url/url-expand.el6
-rw-r--r--lisp/url/url-http.el7
-rw-r--r--lisp/url/url-parse.el228
-rw-r--r--lisp/url/url-util.el200
-rw-r--r--lisp/url/url-vars.el9
-rw-r--r--lisp/url/url.el16
-rw-r--r--lisp/vc/diff-mode.el275
-rw-r--r--lisp/vc/diff.el24
-rw-r--r--lisp/vc/ediff-init.el55
-rw-r--r--lisp/vc/ediff-wind.el37
-rw-r--r--lisp/vc/ediff.el2
-rw-r--r--lisp/vc/log-edit.el51
-rw-r--r--lisp/vc/smerge-mode.el110
-rw-r--r--lisp/vc/vc-arch.el34
-rw-r--r--lisp/vc/vc-bzr.el366
-rw-r--r--lisp/vc/vc-cvs.el16
-rw-r--r--lisp/vc/vc-dir.el31
-rw-r--r--lisp/vc/vc-git.el30
-rw-r--r--lisp/vc/vc-hg.el25
-rw-r--r--lisp/vc/vc-mtn.el81
-rw-r--r--lisp/vc/vc.el196
-rw-r--r--lisp/version.el7
-rw-r--r--lisp/wid-edit.el40
-rw-r--r--lisp/window.el114
-rw-r--r--lisp/xml.el6
-rw-r--r--m4/gnulib-comp.m4 (renamed from m4/gl-comp.m4)0
-rwxr-xr-xmake-dist16
-rw-r--r--msdos/ChangeLog15
-rw-r--r--msdos/mainmake.v23
-rw-r--r--msdos/sed2v2.inp2
-rw-r--r--msdos/sed2x.inp1
-rw-r--r--msdos/sed6.inp2
-rw-r--r--nextstep/INSTALL3
-rw-r--r--nt/ChangeLog19
-rw-r--r--nt/config.nt43
-rw-r--r--src/.gdbinit91
-rw-r--r--src/ChangeLog549
-rw-r--r--src/Makefile.in18
-rw-r--r--src/alloc.c85
-rw-r--r--src/buffer.c52
-rw-r--r--src/character.h2
-rw-r--r--src/data.c164
-rw-r--r--src/dbusbind.c1848
-rw-r--r--src/dispextern.h1
-rw-r--r--src/dispnew.c19
-rw-r--r--src/editfns.c168
-rw-r--r--src/emacsgtkfixed.c30
-rw-r--r--src/emacsgtkfixed.h26
-rw-r--r--src/eval.c2
-rw-r--r--src/fileio.c88
-rw-r--r--src/filelock.c8
-rw-r--r--src/fns.c4
-rw-r--r--src/font.h7
-rw-r--r--src/frame.h3
-rw-r--r--src/gmalloc.c607
-rw-r--r--src/gnutls.c10
-rw-r--r--src/gtkutil.c2
-rw-r--r--src/insdel.c4
-rw-r--r--src/intervals.c1
-rw-r--r--src/keyboard.c177
-rw-r--r--src/keymap.c17
-rw-r--r--src/lisp.h114
-rw-r--r--src/lisp.mk2
-rw-r--r--src/lread.c4
-rw-r--r--src/m/README7
-rw-r--r--src/m/alpha.h53
-rw-r--r--src/m/amdx86-64.h35
-rw-r--r--src/m/ia64.h32
-rw-r--r--src/m/ibmrs6000.h46
-rw-r--r--src/m/ibms390x.h32
-rw-r--r--src/m/intel386.h29
-rw-r--r--src/m/m68k.h32
-rw-r--r--src/m/macppc.h24
-rw-r--r--src/m/sparc.h30
-rw-r--r--src/m/template.h34
-rw-r--r--src/m/vax.h23
-rw-r--r--src/makefile.w32-in8
-rw-r--r--src/mem-limits.h2
-rw-r--r--src/ns.mk12
-rw-r--r--src/nsterm.m11
-rw-r--r--src/print.c40
-rw-r--r--src/puresize.h2
-rw-r--r--src/ralloc.c8
-rw-r--r--src/regex.c83
-rw-r--r--src/regex.h91
-rw-r--r--src/s/aix4-2.h11
-rw-r--r--src/s/gnu-linux.h6
-rw-r--r--src/s/gnu.h2
-rw-r--r--src/s/irix6-5.h4
-rw-r--r--src/s/ms-w32.h4
-rw-r--r--src/search.c191
-rw-r--r--src/sound.c7
-rw-r--r--src/sysdep.c3
-rw-r--r--src/syssignal.h15
-rw-r--r--src/term.c2
-rw-r--r--src/termcap.c8
-rw-r--r--src/textprop.c4
-rw-r--r--src/tparam.c4
-rw-r--r--src/undo.c15
-rw-r--r--src/unexaix.c25
-rw-r--r--src/unexelf.c6
-rw-r--r--src/vm-limit.c2
-rw-r--r--src/w32fns.c14
-rw-r--r--src/w32font.c7
-rw-r--r--src/w32menu.c9
-rw-r--r--src/w32proc.c20
-rw-r--r--src/w32term.c25
-rw-r--r--src/window.c5
-rw-r--r--src/window.h5
-rw-r--r--src/xdisp.c163
-rw-r--r--src/xfns.c7
-rw-r--r--src/xgselect.c17
-rw-r--r--src/xselect.c1
-rw-r--r--src/xterm.c6
-rw-r--r--src/xterm.h1
-rw-r--r--test/ChangeLog19
-rw-r--r--test/automated/Makefile.in2
-rw-r--r--test/automated/compile-tests.el2
-rw-r--r--test/automated/url-util-tests.el51
-rw-r--r--test/indent/ruby.rb19
-rwxr-xr-xtest/indent/shell.rc9
-rwxr-xr-xtest/indent/shell.sh4
-rw-r--r--vpath.sed8
510 files changed, 21081 insertions, 20417 deletions
diff --git a/.dir-locals.el b/.dir-locals.el
index 4da890f92ab..471f74da12a 100644
--- a/.dir-locals.el
+++ b/.dir-locals.el
@@ -5,7 +5,8 @@
;; You must set bugtracker_debbugs_url in your bazaar.conf for this to work.
;; See admin/notes/bugtracker.
(log-edit-mode . ((log-edit-rewrite-fixes
- "[ \n](bug#\\([0-9]+\\))" . "debbugs:\\1")))
+ "[ \n](bug#\\([0-9]+\\))" . "debbugs:\\1")
+ (log-edit-font-lock-gnu-style . t)))
(change-log-mode . ((add-log-time-zone-rule . t)
(fill-column . 74)
(bug-reference-url-format . "http://debbugs.gnu.org/%s")
diff --git a/BUGS b/BUGS
index 552be81a0f9..30bf10ed94f 100644
--- a/BUGS
+++ b/BUGS
@@ -4,10 +4,13 @@ Bugs section of the Emacs manual for advice on
(1) how to tell when to report a bug, and
(2) how to write a useful bug report and what information it needs to have.
-You can read the read the Bugs section of the manual from inside Emacs.
-Start Emacs, do C-h i to enter Info, then m Emacs RET to get to the
-Emacs manual, then m Bugs RET to get to the section on bugs.
-Or you can use the standalone Info program in a like manner.
+You can read the Bugs section of the manual from inside Emacs.
+Start Emacs, and press
+ C-h r (to view the Emacs manual)
+ m Bugs RET (to go to the section on Bugs)
+Or you can use the standalone Info program:
+ info emacs
+ m Bugs RET
(Standalone Info is part of the Texinfo distribution, not part of the
Emacs distribution.)
@@ -16,7 +19,7 @@ Software Foundation's online store at <http://shop.fsf.org/>.
If necessary, you can read the manual without an info program:
- cat info/emacs* | more "+/^File: emacs, Node: Bugs,"
+ cat info/emacs* | more "+/^File: emacs.*, Node: Bugs,"
Please first check the file etc/PROBLEMS (e.g. with C-h C-p in Emacs) to
diff --git a/ChangeLog b/ChangeLog
index ca3bcff5a8c..9da0a32d568 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,296 @@
+2012-05-22 Paul Eggert <eggert@cs.ucla.edu>
+
+ Remove src/m/*.
+ * configure.in: Remove all mention of src/m/*.
+ (machine, machfile, M_FILE, config_machfile, and_machfile): Remove.
+ All uses removed.
+ (BITS_PER_CHAR, BITS_PER_SHORT, BITS_PER_INT, BITS_PER_LONG)
+ (BITS_PER_LONG_LONG): Move to src/lisp.h.
+ * lib/makefile.w32-in: Remove dependencies on
+ $(EMACS_ROOT)/src/m/intel386.h.
+ * make-dist: Don't make links to src/m.
+
+2012-05-22 Paul Eggert <eggert@cs.ucla.edu>
+
+ * Makefile.in (ACLOCAL_INPUTS): Fix up gnulib-comp.m4 name. (Bug#11529)
+ Without this further fix, aclocal was being invoked unnecessarily.
+
+2012-05-22 Glenn Morris <rgm@gnu.org>
+
+ * Makefile.in (blessmail, install-arch-dep, uninstall):
+ Check cd lib-src works.
+ (install-arch-dep, uninstall): Remove unneeded subshells.
+
+2012-05-21 Glenn Morris <rgm@gnu.org>
+
+ * update-subdirs: Move to build-aux/.
+ * make-dist, Makefile.in (install-arch-indep): Update for this change.
+
+ * Makefile.in (leimdir): New, set by configure.
+ (COPYDIR, COPYDESTS): Add leim directories.
+ (install-leim): Remove.
+ (install-arch-indep): Handle leim installation directly.
+
+ * vpath.sed: Remove unused file.
+ * make-dist: No more vpath.sed.
+
+2012-05-21 Paul Eggert <eggert@cs.ucla.edu>
+
+ Use full name for m4/gnulib-comp.m4. (Bug#11529)
+ Previously the file was named m4/gl-comp.m4 due to DOS 8+3 restrictions,
+ even though the file's name in gnulib is m4/gnulib-comp.m4.
+ This had a problem when merging from gnulib, as the code temporarily
+ renamed it to the full name, causing problems when interrupted.
+ Now the file has its full name, with the idea that we will find
+ a solution for MS-DOS that does not affect the rest of Emacs.
+ * m4/gnulib-comp.m4: Rename from m4/gl-comp.m4.
+
+ Assume C89 or later.
+ * configure.in (AC_C_PROTOTYPES, AC_C_VOLATILE, AC_C_CONST)
+ (POINTER_TYPE, PROTOTYPES): Remove.
+
+ Make merging from gnulib a script, not a makefile action.
+ Putting it in a makefile has some problems with reflection, as
+ merging from gnulib updates 'configure', which can update the makefile.
+ Putting it in a standalone script breaks this loop.
+ * Makefile.in (gnulib_srcdir, $(gnulib_srcdir), DOS_gnulib_comp.m4)
+ (GNULIB_MODULES, GNULIB_TOOL_FLAGS, sync-from-gnulib):
+ Remove, moving the actions to the script admin/merge-gnulib.
+
+2012-05-21 Glenn Morris <rgm@gnu.org>
+
+ * configure.in (LEIM_INSTALLDIR):
+ Rename to leimdir, treat like lispdir.
+
+2012-05-21 Glenn Morris <rgm@gnu.org>
+
+ * Makefile.in (install-arch-indep, install-doc, install-info)
+ (uninstall): Scrap superfluous subshells.
+
+2012-05-19 Ulrich Mueller <ulm@gentoo.org>
+
+ * Makefile.in (install-etc): Respect DESTDIR. (Bug#11518)
+
+2012-05-19 Paul Eggert <eggert@cs.ucla.edu>
+
+ * configure.in (AC_CHECK_FUNCS): Remove XSetWMProtocols,
+ getdomainname, mblen (twice), mbrlen (twice), mbsinit, ualarm,
+ getsockopt, setsockopt, mremap, mempcpy.
+
+ * configure.in (machine): Do not set to 'vax', since src/m/vax.h
+ is being removed.
+ (AC_CHECK_FUNCS): Remove ftime.
+
+2012-05-19 Glenn Morris <rgm@gnu.org>
+
+ * Makefile.in (install-arch-indep): Remove unneeded subshell.
+
+ * Makefile.in (install-arch-indep): Remove unneeded chmod.
+ Set permissions of lisp/subdirs.el.
+
+ * Makefile.in (SUBDIR): Add leim. Update users.
+
+ * Makefile.in (lib, lib-src, lisp): Check cd return value.
+
+ * Makefile.in (leim): No need to set PARALLEL.
+
+2012-05-18 Glenn Morris <rgm@gnu.org>
+
+ * Makefile.in (install-arch-indep, install-info, install-man):
+ Simplify some one-sided ifs.
+
+ * Makefile.in: Install only the relevant DOC file.
+ (install-arch-indep): Delete etc/DOC*.
+ (install-doc): No more need to delete etc/DOC.
+
+ * Makefile.in (install-arch-indep): Split into several rules.
+ (install-doc, innstall-info, install-man): New rules.
+
+ * configure.in (mandir): May as well include it in the NS app bundle.
+
+ * configure.in (INSTALL_ARCH_INDEP_EXTRA): New output variable.
+ * Makefile.in (INSTALL_ARCH_INDEP_EXTRA): New, set by configure.
+ (install-arch-indep): Don't install-etc for self-contained ns builds.
+
+ * configure.in (GCC_TEST_OPTIONS, NON_GCC_TEST_OPTIONS) <darwin>:
+ No longer unconditonally add /sw directories. (Bug#2280)
+
+ * Makefile.in (install-arch-dep): Depend on install-arch-indep.
+ (install-arch-indep): Depend on install-leim.
+ (install): Remove explicit install-leim dependence.
+
+ * Makefile.in (install-arch-indep):
+ Move last element of mkdir rule here.
+ (mkdir): Remove rule.
+
+ * Makefile.in (install-arch-indep): Remove unneeded chmods.
+ INSTALL_DATA does this for us.
+
+ * Makefile.in (install-arch-dep): Ensure bindir exists.
+ Drop mkdir dependency.
+ (install-arch-indep): Ensure docdir, infodir, mandir exist.
+ (install-leim): Drop mkdir dependency.
+ (mkdir): Remove most directories, now made in relevant rules.
+
+ * Makefile.in (install-arch-indep): Combine adjacent loops.
+
+2012-05-17 Glenn Morris <rgm@gnu.org>
+
+ * Makefile.in (install-etc, mkdir):
+ Make relevant directories in install-etc rather than mkdir.
+
+ * Makefile.in (write_subdir): Create the directory if needed.
+ (install-arch-dep, mkdir): No need to make site-lisp directories.
+
+ * Makefile.in (write_subdir): New.
+ (install-arch-indep, install-arch-dep): Use $write_subdir.
+
+ * configure.in (docdir, etcdir, infodir, lispdir):
+ For a self-contained ns build, set these to the appropriate values.
+ * Makefile.in (install-arch-dep): No need to move info/ any more.
+
+ * configure.in (ns_self_contained): New output variable.
+ * Makefile.in (ns_self_contained): New, set by configure.
+ (install-arch-dep): For a self-contained ns build,
+ don't bother installing binaries then immediately deleting them.
+
+ * Makefile.in (ns_appbindir, ns_appresdir):
+ Move them before things that may refer to them.
+ (install-arch-dep): No need to relocate self-contained ns libexec.
+
+ * configure.in (archlibdir): Set it for self-contained ns builds.
+ (libexecdir): Don't expand it now (this is mainly cosmetic).
+
+2012-05-16 Paul Eggert <eggert@cs.ucla.edu>
+
+ * configure.in: Simplify by removing CPP etc.
+ (CPP_TEST_OPTIONS, NON_GNU_CPP, cc_specified, SPECIFIED_CFLAGS)
+ (SPECIFED_CPP, CPP, NON_GNU_CC, AC_PROG_CPP): Remove; not needed.
+ In particular we no longer need to fiddle with CPP, since we don't
+ use CPP specially any more.
+ (gl_EARLY): Invoke this after adjusting CC, so that it uses the
+ adjusted compiler.
+ (AC_PROG_INSTALL, AC_PROG_MKDIR_P, AC_PROG_RANLIB): Comment out,
+ since gl_EARLY and/or Autoconf already does these.
+
+2012-05-16 Glenn Morris <rgm@gnu.org>
+
+ * configure.in: Try to fix building with gcc >= 4.6 on Darwin.
+ (CPP): Do not unconditionally set it on Darwin.
+ Instead, try to test if -no-cpp-precomp is accepted.
+ (CPP_TEST_OPTIONS, SPECIFIED_CPP): New. (Bug#9755)
+
+2012-05-15 Glenn Morris <rgm@gnu.org>
+
+ * Makefile.in (install-arch-dep): Replace use of MV_DIRS.
+
+ * Makefile.in (install-arch-dep): Do not hard-code version number.
+
+ * Makefile.in (install-arch-dep): NS install no longer needs to
+ symlink libexec/* into bin/, since 2012-05-14 ns_init_paths change.
+
+2012-05-12 Glenn Morris <rgm@gnu.org>
+
+ * configure.in (ns_appbindir): Remove trailing "/".
+
+ * configure.in (AC_PROG_MKDIR_P): Call it, to set MKDIR_P.
+ (MKDEPDIR): Use $MKDIR_P.
+ * Makefile.in (MKDIR_P): New, set by configure.
+ (mkdir): Use $MKDIR_P.
+
+2012-05-11 Glenn Morris <rgm@gnu.org>
+
+ * Makefile.in (install-arch-indep): There are no more Makefile.c files.
+ Use INSTALL_DATA for the DOC file.
+ Remove dead code for ./lisp that never executes.
+
+2012-05-10 Glenn Morris <rgm@gnu.org>
+
+ * configure.in (LEIM_INSTALLDIR): New output variable.
+
+2012-05-08 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * .dir-locals.el (log-edit-mode): Enable gnu-style checks.
+
+2012-05-08 Glenn Morris <rgm@gnu.org>
+
+ * make-dist: No more doc/lispref/*.el.
+
+2012-05-05 Andreas Schwab <schwab@linux-m68k.org>
+
+ * configure.in: Fix quoting bugs.
+
+2012-05-04 Glenn Morris <rgm@gnu.org>
+
+ * configure.in (INFO_EXT, INFO_OPTS): New output variables.
+
+2012-05-02 Glenn Morris <rgm@gnu.org>
+
+ * configure.in (LD_SWITCH_SYSTEM): Don't try to defeat
+ the choices made by FreeBSD and NetBSD. (Bug#10313)
+
+ * Makefile.in (INFO_FILES): Remove variable.
+ (INFO_NONMISC): New variable.
+ (install-arch-indep, uninstall): Don't use $INFO_FILES.
+
+ * Makefile.in (uninstall): Remove useless-use-of-for; that for
+ some reason caused problems on an old Solaris.
+
+ * Makefile.in (install-arch-indep, uninstall):
+ Ensure that INSTALL-type commands are run from top-level.
+
+ * info/dir: Make some entries consistent with the source texi files.
+
+ * configure.in (LIBS_TERMCAP): Fix netbsd logic, broken 2012-03-04.
+
+2012-05-02 Glenn Morris <rgm@gnu.org>
+
+ * Makefile.in (install-arch-indep):
+ Combine adjacent install-data and install-info loops.
+
+2012-05-01 Glenn Morris <rgm@gnu.org>
+
+ * Makefile.in (MAN_PAGES): Remove.
+ (install-arch-indep, uninstall): Don't use $MAN_PAGES.
+
+ * configure.in: Try libtinfo for tputs.
+ (LIBS_TERMCAP) [gnu*]: Use libtinfo if it was found. (Bug#9741)
+
+ * configure.in: Combine adjacent $opsys case blocks.
+
+ * configure.in (LIBS_TERMCAP): Remove unreachable branch for sol2.
+
+ * configure.in: Invert the TERMINFO logic,
+ since "yes" is far more common than "no".
+
+ * configure.in (HAVE_LIBNCURSES): Remove; it is required to be true.
+
+ * configure.in (LD_SWITCH_X_SITE_RPATH):
+ Rename from LD_SWITCH_X_SITE_AUX_RPATH.
+
+ * configure.in (LD_SWITCH_X_SITE_AUX): Remove; no longer used.
+
+2012-04-26 Glenn Morris <rgm@gnu.org>
+
+ * make-dist: No more doc/lispref/tindex.pl.
+
+2012-04-22 Michael Albinus <michael.albinus@gmx.de>
+
+ * configure.in (dbus_validate_bus_name, dbus_validate_path)
+ (dbus_validate_interface, dbus_validate_member): Check also for
+ these library functions
+
+2012-04-22 Paul Eggert <eggert@cs.ucla.edu>
+
+ * configure.in (doug_lea_malloc): Check for __malloc_initialize_hook.
+ With glibc 2.14 or later, when compiled with GCC 4.7.0's
+ -Werror=deprecated-declarations flag, use of hooks like
+ __malloc_initialize_hook causes compilation to fail because these
+ hooks are deprecated. Modify 'configure' to check for these hooks too.
+ Simplify the 'configure' code to test for all the hooks at once.
+ (emacs_cv_var___after_morecore_hook): Remove, replacing with ...
+ (emacs_cv_var_doug_lea_malloc): ... this new var.
+
2012-04-21 Paul Eggert <eggert@cs.ucla.edu>
Sync from gnulib version 4f11d6bebc3098c64ffde27079ab0d0cecfd0cdc
diff --git a/Makefile.in b/Makefile.in
index 1746412dfa5..699c4794d92 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -90,6 +90,13 @@ configuration=@configuration@
# ==================== Where To Install Things ====================
+# Location to install Emacs.app under GNUstep / Mac OS X.
+# Later values may use these.
+ns_appbindir=@ns_appbindir@
+ns_appresdir=@ns_appresdir@
+# Either yes or no depending on whether this is a relocatable Emacs.app.
+ns_self_contained=@ns_self_contained@
+
# The default location for installation. Everything is placed in
# subdirectories of this directory. The default values for many of
# the variables below are expressed in terms of this one, so you may
@@ -117,30 +124,22 @@ datadir=@datadir@
sharedstatedir=@sharedstatedir@
# Where to install and expect executable files to be run by Emacs
-# rather than directly by users, and other architecture-dependent
-# data. ${archlibdir} is a subdirectory of this.
+# rather than directly by users (and other architecture-dependent
+# data, although Emacs does not have any). The executables
+# are actually installed in ${archlibdir}, which is (normally)
+# a subdirectory of this.
libexecdir=@libexecdir@
# Where to install Emacs's man pages.
-# This used to allow choice of the numeric extension, but this made
-# little sense since the files were always installed in man1/
-# (and they contain cross-references that expect them to be there).
+# Note they contain cross-references that expect them to be in section 1.
mandir=@mandir@
man1dir=$(mandir)/man1
-MAN_PAGES=ctags.1 ebrowse.1 emacs.1 emacsclient.1 etags.1 \
- grep-changelog.1 rcs-checkin.1
-# Where to install and expect the info files describing Emacs. In the
-# past, this defaulted to a subdirectory of ${prefix}/lib/emacs, but
-# since there are now many packages documented with the texinfo
-# system, it is inappropriate to imply that it is part of Emacs.
+# Where to install and expect the info files describing Emacs.
infodir=@infodir@
-INFO_FILES=ada-mode auth autotype calc ccmode cl dbus dired-x ebrowse \
- ede ediff edt eieio efaq eintr elisp emacs emacs-gnutls \
- emacs-mime epa erc ert eshell eudc flymake forms gnus \
- idlwave info mairix-el message mh-e newsticker nxml-mode \
- org pcl-cvs pgg rcirc reftex remember sasl sc semantic ses \
- sieve smtpmail speedbar tramp url vip viper widget woman
+# Info files not in the doc/misc directory (we get those via make echo-info).
+INFO_EXT=@INFO_EXT@
+INFO_NONMISC=emacs$(INFO_EXT) eintr$(INFO_EXT) elisp$(INFO_EXT)
# If no makeinfo was found and configured --without-makeinfo, "no"; else "yes".
HAVE_MAKEINFO=@HAVE_MAKEINFO@
@@ -168,10 +167,6 @@ VPATH=@srcdir@
# Where to find the application default.
x_default_search_path=@x_default_search_path@
-# Location to install Emacs.app under NeXT/Open/GNUstep / Cocoa
-ns_appbindir=@ns_appbindir@
-ns_appresdir=@ns_appresdir@
-
# Where the etc/emacs.desktop file is to be installed.
desktopdir=$(datarootdir)/applications
@@ -186,11 +181,12 @@ iconsrcdir=$(srcdir)/etc/images/icons
# These variables hold the values Emacs will actually use. They are
# based on the values of the standard Make variables above.
-# Where to install the lisp files distributed with
+# Where to install the lisp, leim files distributed with
# Emacs. This includes the Emacs version, so that the
# lisp files for different versions of Emacs will install
# themselves in separate directories.
lispdir=@lispdir@
+leimdir=@leimdir@
# Directories Emacs should search for lisp files specific
# to this site (i.e. customizations), before consulting
@@ -236,12 +232,18 @@ gamedir=@gamedir@
# ==================== Utility Programs for the Build ====================
# Allow the user to specify the install program.
+# Note that if the system does not provide a suitable install,
+# configure will use build-aux/install-sh. Annoyingly, it does
+# not use an absolute path. So we must take care to always run
+# INSTALL-type commands from the directory containing the Makefile.
+# This explains (I think) the cd thisdir seen in several install rules.
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_INFO = @INSTALL_INFO@
# By default, we uphold the dignity of our programs.
INSTALL_STRIP =
+MKDIR_P = @MKDIR_P@
# We use gzip to compress installed .el files.
GZIP_PROG = @GZIP_PROG@
@@ -257,14 +259,8 @@ TRANSFORM = @program_transform_name@
EMACS = `echo emacs${EXEEXT} | sed '$(TRANSFORM)'`
EMACSFULL = `echo emacs-${version}${EXEEXT} | sed '$(TRANSFORM)'`
-# Subdirectories to make recursively. `lisp' is not included
-# because the compiled lisp files are part of the distribution.
-# leim is not included because it needs special handling.
-#
-# Actually, we now include `lisp' as well, since the compiled files
-# are not included any more in case of bootstrap or in case Emacs was
-# checked out from a VCS.
-SUBDIR = lib lib-src src lisp
+# Subdirectories to make recursively.
+SUBDIR = lib lib-src src lisp leim
# The subdir makefiles created by config.status.
SUBDIR_MAKEFILES_IN = @SUBDIR_MAKEFILES_IN@
@@ -272,14 +268,13 @@ SUBDIR_MAKEFILES = `echo $(SUBDIR_MAKEFILES_IN:.in=) | sed 's|$(srcdir)/||g'`
# Subdirectories to install, and where they'll go.
# lib-src's makefile knows how to install it, so we don't do that here.
-# leim's makefile also knows how to install it, so we don't do that here.
-# When installing the info files, we need to do special things to
-# avoid nuking an existing dir file, so we don't do that here;
-# instead, we have written out explicit code in the `install' targets.
-COPYDIR = ${srcdir}/etc ${srcdir}/lisp
-COPYDESTS = $(DESTDIR)${etcdir} $(DESTDIR)${lispdir}
+# Directories that cannot simply be copied, eg info,
+# are treated separately.
+# quail appears twice because in out-of-tree builds, it exists twice.
+COPYDIR = ${srcdir}/etc ${srcdir}/lisp ${srcdir}/leim/ja-dic ${srcdir}/leim/quail leim/quail
+COPYDESTS = $(DESTDIR)${etcdir} $(DESTDIR)${lispdir} $(DESTDIR)${leimdir}/ja-dic $(DESTDIR)${leimdir}/quail $(DESTDIR)${leimdir}/quail
-all: ${SUBDIR} leim
+all: ${SUBDIR}
removenullpaths=sed -e 's/^://g' -e 's/:$$//g' -e 's/::/:/g'
@@ -304,62 +299,19 @@ epaths-force: FRC
-e 's;\(#.*PATH_DOC\).*$$;\1 "${docdir}";') && \
${srcdir}/build-aux/move-if-change epaths.h.$$$$ src/epaths.h
-# For parallel make, src should be built before leim.
-# "export PARALLEL=0" is for SGI's Make, to prevent it from
-# running more than 1 process in the leim directory, especially for
-# the $TIT files there.
-leim: src Makefile FRC
- cd leim && PARALLEL=0 $(MAKE) all $(MFLAGS)
-
lib-src src: lib
src: lib-src FRC
-.RECURSIVE: ${SUBDIR} leim
-
-# We need to build `emacs' in `src' to compile the *.elc files in `lisp'.
-lisp: src
-
-# Maintainers can put a copy of gnulib into $(gnulib_srcdir).
-gnulib_srcdir = ../gnulib
-$(gnulib_srcdir):
- git clone git://git.savannah.gnu.org/gnulib.git $@
-
-# A shorter name that satisfies MS-DOS 8+3 constraints.
-DOS_gnulib_comp.m4 = gl-comp.m4
-
-# Update modules from gnulib, for maintainers, who should have it in
-# $(gnulib_srcdir) (relative to $(srcdir) and should have build tools
-# as per $(gnulib_srcdir)/DEPENDENCIES.
-GNULIB_MODULES = \
- alloca-opt \
- careadlinkat crypto/md5 crypto/sha1 crypto/sha256 crypto/sha512 dtoastr \
- dup2 \
- filemode getloadavg getopt-gnu ignore-value intprops lstat \
- manywarnings mktime pthread_sigmask readlink \
- socklen stdarg stdio strftime strtoimax strtoumax symlink sys_stat \
- warnings
-GNULIB_TOOL_FLAGS = \
- --avoid=msvc-inval --avoid=msvc-nothrow \
- --avoid=raise --avoid=threadlib \
- --conditional-dependencies --import --no-changelog --no-vc-files \
- --makefile-name=gnulib.mk
-sync-from-gnulib: $(gnulib_srcdir)
- -cd $(srcdir)/m4 && cp $(DOS_gnulib_comp.m4) gnulib-comp.m4
- cd $(srcdir) && \
- $(gnulib_srcdir)/gnulib-tool $(GNULIB_TOOL_FLAGS) $(GNULIB_MODULES)
- cd $(srcdir)/m4 && rm gnulib-cache.m4 warn-on-use.m4
- cd $(srcdir)/m4 && mv gnulib-comp.m4 $(DOS_gnulib_comp.m4)
- cp $(gnulib_srcdir)/build-aux/texinfo.tex $(srcdir)/doc/misc
- cp \
- $(gnulib_srcdir)/build-aux/move-if-change \
- $(srcdir)/build-aux
- cd $(srcdir) && autoreconf -i -I m4
-.PHONY: sync-from-gnulib
+.RECURSIVE: ${SUBDIR}
+
+# We need to build `emacs' in `src' to compile the *.elc files in `lisp'
+# and `leim'.
+lisp leim: src
# These targets should be "${SUBDIR} without `src'".
-lib lib-src lisp: Makefile FRC
- cd $@; $(MAKE) all $(MFLAGS) \
+lib lib-src lisp leim: Makefile FRC
+ cd $@ && $(MAKE) all $(MFLAGS) \
CC='${CC}' CFLAGS='${CFLAGS}' CPPFLAGS='${CPPFLAGS}' \
LDFLAGS='${LDFLAGS}' MAKE='${MAKE}'
@@ -388,7 +340,7 @@ src: Makefile FRC
VCSWITNESS="$$vcswitness"
blessmail: Makefile src FRC
- cd lib-src; $(MAKE) maybe-blessmail $(MFLAGS) \
+ cd lib-src && $(MAKE) maybe-blessmail $(MFLAGS) \
MAKE='${MAKE}' archlibdir='$(archlibdir)'
# We used to have one rule per */Makefile.in, but that leads to race
@@ -413,7 +365,7 @@ AUTOCONF_INPUTS = @MAINT@ $(srcdir)/configure.in $(srcdir)/aclocal.m4
$(srcdir)/configure: $(AUTOCONF_INPUTS)
cd ${srcdir} && autoconf
-ACLOCAL_INPUTS = @MAINT@ $(srcdir)/m4/$(DOS_gnulib_comp.m4)
+ACLOCAL_INPUTS = @MAINT@ $(srcdir)/m4/gnulib-comp.m4
$(srcdir)/aclocal.m4: $(ACLOCAL_INPUTS)
cd $(srcdir) && aclocal -I m4
@@ -440,51 +392,55 @@ $(srcdir)/src/stamp-h.in: $(AUTOCONF_INPUTS)
## don't have to duplicate the list of utilities to install in
## this Makefile as well.
-## On AIX, use tar xBf.
-## On Xenix, use tar xpf.
-
-.PHONY: install mkdir
+.PHONY: install
-## We delete each directory in ${COPYDESTS} before we copy into it;
-## that way, we can reinstall over directories that have been put in
-## place with their files read-only (perhaps because they are checked
-## into RCS). In order to make this safe, we make sure that the
-## source exists and is distinct from the destination.
-### We do install-arch-indep first because
-### the executable needs the Lisp files and DOC file to work properly.
-install: all install-arch-indep install-arch-dep install-leim blessmail
+install: all install-arch-indep install-doc install-arch-dep blessmail
@true
-MV_DIRS = for i in $$dir; do rm -fr `basename "$$i"` ; mv "$$i" . ; done
+## Ensure that $subdir contains a subdirs.el file.
+## Here and elsewhere, we set the umask so that any created files are
+## world-readable.
+## TODO it might be good to warn about non-standard permissions of
+## pre-existing directories, but that does not seem easy.
+write_subdir=if [ -f $${subdir}/subdirs.el ]; \
+ then true; \
+ else \
+ umask 022; \
+ ${MKDIR_P} $${subdir}; \
+ (echo "(if (fboundp 'normal-top-level-add-subdirs-to-load-path)"; \
+ echo " (normal-top-level-add-subdirs-to-load-path))") \
+ > $${subdir}/subdirs.el; \
+ fi
### Install the executables that were compiled specifically for this machine.
-### It would be nice to do something for a parallel make
-### to ensure that install-arch-indep finishes before this starts.
-install-arch-dep: mkdir
- (cd lib-src; \
+### We do install-arch-indep first because the executable needs the
+### Lisp files and DOC file to work properly.
+install-arch-dep: install-arch-indep install-doc
+ umask 022; ${MKDIR_P} $(DESTDIR)${bindir}
+ cd lib-src && \
$(MAKE) install $(MFLAGS) prefix=${prefix} \
exec_prefix=${exec_prefix} bindir=${bindir} \
libexecdir=${libexecdir} archlibdir=${archlibdir} \
- INSTALL_STRIP=${INSTALL_STRIP})
- ${INSTALL_PROGRAM} $(INSTALL_STRIP) src/emacs${EXEEXT} $(DESTDIR)${bindir}/$(EMACSFULL)
- -chmod 1755 $(DESTDIR)${bindir}/$(EMACSFULL)
- rm -f $(DESTDIR)${bindir}/$(EMACS)
- -ln $(DESTDIR)${bindir}/$(EMACSFULL) $(DESTDIR)${bindir}/$(EMACS)
- if test "${ns_appresdir}" != ""; then \
- ( cd ${ns_appresdir} ; \
- if test -d share/emacs ; then dir=share/emacs/*/*; $(MV_DIRS); fi;\
- if test -d share/info ; then dir=share/info; $(MV_DIRS) ; fi ; \
- rm -fr share ) ; \
- ( cd ${ns_appbindir} ; \
- if cd libexec ; then dir=emacs/*/*/* ; $(MV_DIRS); \
- rm -fr emacs; if cd ../bin; then rm -f emacs emacs-24*; \
- ln -sf ../libexec/* . ; fi ; fi ) ; \
- else true ; fi
-
-## FIXME is the emacs-24* bit above really necessary and correct?
-## What if I have 24.1 and 24.2 installed at the same time?
-## In any case, it should use something like echo $version | sed 's/\..*//'
-## instead of hard-coding a version.
+ INSTALL_STRIP=${INSTALL_STRIP}
+ if test "${ns_self_contained}" = "no"; then \
+ ${INSTALL_PROGRAM} $(INSTALL_STRIP) src/emacs${EXEEXT} $(DESTDIR)${bindir}/$(EMACSFULL) || exit 1 ; \
+ chmod 1755 $(DESTDIR)${bindir}/$(EMACSFULL) ; \
+ rm -f $(DESTDIR)${bindir}/$(EMACS) ; \
+ ln $(DESTDIR)${bindir}/$(EMACSFULL) $(DESTDIR)${bindir}/$(EMACS) || true ; \
+ else \
+ subdir=${ns_appresdir}/site-lisp; \
+ ${write_subdir} || exit 1; \
+ rm -rf ${ns_appresdir}/share; \
+ fi
+
+## In the share directory, we are deleting:
+## applications (with emacs.desktop, also found in etc/)
+## emacs (basically empty except for unneeded site-lisp directories)
+## icons (duplicates etc/images/icons/hicolor)
+
+## This is install-etc for everything except self-contained-ns builds.
+## For them, it is empty.
+INSTALL_ARCH_INDEP_EXTRA = @INSTALL_ARCH_INDEP_EXTRA@
## http://lists.gnu.org/archive/html/emacs-devel/2007-10/msg01672.html
## Needs to be the user running install, so configure can't set it.
@@ -494,80 +450,109 @@ set_installuser=for installuser in $${LOGNAME} $${USERNAME} $${USER} \
done
### Install the files that are machine-independent.
-### Most of them come straight from the distribution;
-### the exception is the DOC-* files, which are copied
-### from the build directory.
-
-## Note that we copy DOC* and then delete DOC
-## as a workaround for a bug in tar on Ultrix 4.2.
+### Most of them come straight from the distribution; the exception is
+### the DOC file, which is copied from the build directory.
-## We install only the relevant DOC file if possible
-## (ie DOC-${version}.buildnumber), otherwise DOC-${version}*.
+## We delete each directory in ${COPYDESTS} before we copy into it;
+## that way, we can reinstall over directories that have been put in
+## place with their files read-only (perhaps because they are checked
+## into RCS). In order to make this safe, we make sure that the
+## source exists and is distinct from the destination.
-## If people complain about the h flag in tar command, take that out.
-## That flag is also used in leim/Makefile.in
+## We delete etc/DOC* because there may be irrelevant DOC files from
+## other builds in the source directory. This is ok because we just
+## deleted the entire installed etc/ directory and recreated it.
+## install-doc installs the relevant DOC.
## Note that the Makefiles in the etc directory are potentially useful
## in an installed Emacs, so should not be excluded.
-install-arch-indep: mkdir info install-etc
- -set ${COPYDESTS} ; \
- unset CDPATH; \
- for dir in ${COPYDIR} ; do \
- if [ `(cd $$1 && /bin/pwd)` != `(cd $${dir} && /bin/pwd)` ] ; then \
- rm -rf $$1 ; \
- fi ; \
- shift ; \
- done
+## I'm not sure creating locallisppath here serves any useful purpose.
+## If it has the default value, then the later write_subdir commands
+## will ensure all these components exist.
+## This will only do something if locallisppath has a non-standard value.
+## Is it really Emacs's job to create those directories?
+## Should we also be ensuring they contain subdirs.el files?
+## It would be easy to do, just use write_subdir.
+
+## Note that we use tar instead of plain old cp -R/-r because the latter
+## is apparently not portable (even in 2012!).
+## http://lists.gnu.org/archive/html/emacs-devel/2012-05/msg00278.html
+## I have no idea which platforms Emacs supports where cp -R does not
+## work correctly, and therefore no idea when tar can be replaced.
+## See also these comments from 2004 about cp -r working fine:
+## http://lists.gnu.org/archive/html/autoconf-patches/2004-11/msg00005.html
+install-arch-indep: install-info install-man ${INSTALL_ARCH_INDEP_EXTRA}
+ umask 022 ; \
+ $(MKDIR_P) $(DESTDIR)`echo ${locallisppath} | sed 's,:, $(DESTDIR),g'`
-set ${COPYDESTS} ; \
- mkdir ${COPYDESTS} ; \
- chmod ugo+rx ${COPYDESTS} ; \
unset CDPATH; \
$(set_installuser); \
for dir in ${COPYDIR} ; do \
+ [ -d $${dir} ] || exit 1 ; \
dest=$$1 ; shift ; \
- [ -d $${dir} ] \
- && [ `(cd $${dir} && /bin/pwd)` != `(cd $${dest} && /bin/pwd)` ] \
- && (echo "Copying $${dir} to $${dest}..." ; \
- (cd $${dir}; tar -chf - . ) \
- | (cd $${dest}; umask 022; \
- tar -xvf - && cat > /dev/null) || exit 1; \
- find $${dest} -exec chown $${installuser} {} ';' ;\
- for subdir in `find $${dest} -type d -print` ; do \
- chmod a+rx $${subdir} ; \
- rm -f $${subdir}/.gitignore ; \
- rm -f $${subdir}/.arch-inventory ; \
- rm -f $${subdir}/.DS_Store ; \
- rm -f $${subdir}/\#* ; \
- rm -f $${subdir}/.\#* ; \
- rm -f $${subdir}/*~ ; \
- rm -f $${subdir}/*.orig ; \
- [ "$${dir}" != "${srcdir}/etc" ] && \
- rm -f $${subdir}/[mM]akefile*.c $${subdir}/[mM]akefile*[.-]in \
- $${subdir}/[mM]akefile ; \
- rm -f $${subdir}/ChangeLog* ; \
- done) ; \
+ [ -d $${dest} ] && \
+ [ `cd $${dest} && /bin/pwd` = `cd $${dir} && /bin/pwd` ] && \
+ continue ; \
+ if [ "$${dir}" = "leim/quail" ]; then \
+ [ `cd $${dir} && /bin/pwd` = `cd ${srcdir}/leim/quail && /bin/pwd` ] && \
+ continue ; \
+ else \
+ rm -rf $${dest} ; \
+ umask 022; ${MKDIR_P} $${dest} ; \
+ fi ; \
+ echo "Copying $${dir} to $${dest}..." ; \
+ (cd $${dir}; tar -chf - . ) \
+ | (cd $${dest}; umask 022; \
+ tar -xvf - && cat > /dev/null) || exit 1; \
+ [ "$${dir}" != "${srcdir}/etc" ] || rm -f $${dest}/DOC* ; \
+ for subdir in `find $${dest} -type d -print` ; do \
+ rm -f $${subdir}/.gitignore ; \
+ rm -f $${subdir}/.arch-inventory ; \
+ rm -f $${subdir}/.DS_Store ; \
+ rm -f $${subdir}/\#* ; \
+ rm -f $${subdir}/.\#* ; \
+ rm -f $${subdir}/*~ ; \
+ rm -f $${subdir}/*.orig ; \
+ rm -f $${subdir}/ChangeLog* ; \
+ [ "$${dir}" != "${srcdir}/etc" ] && \
+ rm -f $${subdir}/[mM]akefile*[.-]in $${subdir}/[mM]akefile ; \
+ done ; \
+ find $${dest} -exec chown $${installuser} {} ';' ;\
done
+ -rm -f $(DESTDIR)${leimdir}/leim-list.el
+ ${INSTALL_DATA} leim/leim-list.el $(DESTDIR)${leimdir}/leim-list.el
-rm -f $(DESTDIR)${lispdir}/subdirs.el
- $(srcdir)/update-subdirs $(DESTDIR)${lispdir}
- if [ -f $(DESTDIR)${datadir}/emacs/${version}/site-lisp/subdirs.el ]; \
- then true; \
- else \
- (echo "(if (fboundp 'normal-top-level-add-subdirs-to-load-path)"; \
- echo " (normal-top-level-add-subdirs-to-load-path))") \
- > $(DESTDIR)${datadir}/emacs/${version}/site-lisp/subdirs.el; \
- fi
- chmod a+r $(DESTDIR)${datadir}/emacs/${version}/site-lisp/subdirs.el
- -if [ -f $(DESTDIR)${datadir}/emacs/site-lisp/subdirs.el ]; \
- then true; \
- else \
- (echo "(if (fboundp 'normal-top-level-add-subdirs-to-load-path)"; \
- echo " (normal-top-level-add-subdirs-to-load-path))") \
- > $(DESTDIR)${datadir}/emacs/site-lisp/subdirs.el; \
- fi
- -chmod a+r $(DESTDIR)${datadir}/emacs/site-lisp/subdirs.el
+ umask 022; $(srcdir)/build-aux/update-subdirs $(DESTDIR)${lispdir}
+ subdir=$(DESTDIR)${datadir}/emacs/${version}/site-lisp ; \
+ ${write_subdir}
+ subdir=$(DESTDIR)${datadir}/emacs/site-lisp ; \
+ ${write_subdir} || true
+ [ -z "${GZIP_PROG}" ] || \
+ ( echo "Compressing *.el ..." ; \
+ unset CDPATH; \
+ thisdir=`/bin/pwd`; \
+ for dir in $(DESTDIR)${lispdir} $(DESTDIR)${leimdir}; do \
+ cd $${thisdir} ; \
+ cd $${dir} || exit 1 ; \
+ for f in `find . -name "*.elc" -print`; do \
+ ${GZIP_PROG} -9n `echo $$f|sed 's/.elc$$/.el/'` ; \
+ done ; \
+ done )
+ -chmod -R a+r $(DESTDIR)${datadir}/emacs/${version} ${COPYDESTS}
+
+# The last chmod isn't needed at present.
+
+## We install only the relevant DOC file if possible
+## (ie DOC-${version}.buildnumber), otherwise DOC-${version}*.
+## (Note "otherwise" is inaccurate since 2009-08-23.)
+
+## Note that install-arch-indep deletes and recreates the entire
+## installed etc/ directory, so we need it to run before this does.
+install-doc: install-arch-indep
-unset CDPATH; \
- if [ `(cd ./etc; /bin/pwd)` != `(cd $(DESTDIR)${docdir}; /bin/pwd)` ]; \
+ umask 022; ${MKDIR_P} $(DESTDIR)${docdir} ; \
+ if [ `cd ./etc; /bin/pwd` != `cd $(DESTDIR)${docdir}; /bin/pwd` ]; \
then \
fullversion=`./src/emacs --version | sed -n '1 s/GNU Emacs *//p'`; \
if [ -f "./etc/DOC-$${fullversion}" ]; \
@@ -577,142 +562,83 @@ install-arch-indep: mkdir info install-etc
docfile="DOC"; \
fi; \
echo "Copying etc/$${docfile} to $(DESTDIR)${docdir} ..." ; \
- (cd ./etc; tar -chf - $${docfile}) \
- |(cd $(DESTDIR)${docdir}; umask 022; tar -xvf - && cat > /dev/null) || exit 1; \
- (cd $(DESTDIR)$(docdir); \
- $(set_installuser); \
- chown $${installuser} DOC*; chmod a+r DOC*; \
- if test "`echo DOC-*`" != "DOC-*"; then rm -f DOC; fi); \
- else true; fi
- -unset CDPATH; \
- if [ -r ./lisp ] \
- && [ -r ./lisp/simple.el ] \
- && [ x`(cd ./lisp; /bin/pwd)` != x`(cd $(DESTDIR)${lispdir}; /bin/pwd)` ] \
- && [ x`(cd ${srcdir}/lisp; /bin/pwd)` != x`(cd ./lisp; /bin/pwd)` ]; \
- then \
- echo "Copying lisp/*.el and lisp/*.elc to $(DESTDIR)${lispdir} ..." ; \
- (cd lisp; tar -chf - *.el *.elc) \
- |(cd $(DESTDIR)${lispdir}; umask 022; tar -xvf - && cat > /dev/null) || exit 1; \
- (cd $(DESTDIR)${lispdir}; \
- $(set_installuser); \
- find . -exec chown $${installuser} {} ';') ; \
- else true; fi
- -unset CDPATH; \
- if [ -n "${GZIP_PROG}" ]; \
- then \
- echo "Compressing *.el ..." ; \
- (cd $(DESTDIR)${lispdir}; for f in `find . -name "*.elc" -print`; do \
- ${GZIP_PROG} -9n `echo $$f|sed 's/.elc$$/.el/'` ; \
- done) \
+ ${INSTALL_DATA} etc/$${docfile} $(DESTDIR)${docdir}/$${docfile}; \
+ $(set_installuser); \
+ chown $${installuser} $(DESTDIR)${docdir}/$${docfile} || true ; \
else true; fi
+
+install-info: info
+ umask 022; ${MKDIR_P} $(DESTDIR)${infodir}
-unset CDPATH; \
thisdir=`/bin/pwd`; \
- if [ `(cd ${srcdir}/info && /bin/pwd)` != `(cd $(DESTDIR)${infodir} && /bin/pwd)` ]; \
- then \
+ [ `cd ${srcdir}/info && /bin/pwd` = `cd $(DESTDIR)${infodir} && /bin/pwd` ] || \
(cd $(DESTDIR)${infodir}; \
- if [ -f dir ]; then true; \
- else \
+ [ -f dir ] || \
(cd $${thisdir}; \
- ${INSTALL_DATA} ${srcdir}/info/dir $(DESTDIR)${infodir}/dir; \
- chmod a+r $(DESTDIR)${infodir}/dir); \
- fi; \
+ ${INSTALL_DATA} ${srcdir}/info/dir $(DESTDIR)${infodir}/dir) ; \
+ info_misc=`cd $${thisdir}/doc/misc; ${MAKE} echo-info | sed '/ing directory/d'`; \
cd ${srcdir}/info ; \
- for elt in $(INFO_FILES); do \
+ for elt in ${INFO_NONMISC} $${info_misc}; do \
test "$(HAVE_MAKEINFO)" = "no" && test ! -f $$elt && continue; \
for f in `ls $$elt $$elt-[1-9] $$elt-[1-9][0-9] 2>/dev/null`; do \
- ${INSTALL_DATA} $$f $(DESTDIR)${infodir}/$$f; \
- chmod a+r $(DESTDIR)${infodir}/$$f; \
- if [ -n "${GZIP_INFO}" ] && [ -n "${GZIP_PROG}" ]; then \
- rm -f $(DESTDIR)${infodir}/$$f.gz; \
- ${GZIP_PROG} -9n $(DESTDIR)${infodir}/$$f; \
- else true; fi; \
+ (cd $${thisdir}; \
+ ${INSTALL_DATA} ${srcdir}/info/$$f $(DESTDIR)${infodir}/$$f); \
+ ( [ -n "${GZIP_INFO}" ] && [ -n "${GZIP_PROG}" ] ) || continue ; \
+ rm -f $(DESTDIR)${infodir}/$$f.gz; \
+ ${GZIP_PROG} -9n $(DESTDIR)${infodir}/$$f; \
done; \
- done); \
- else true; fi
- -unset CDPATH; \
- thisdir=`/bin/pwd`; \
- if [ `(cd ${srcdir}/info && /bin/pwd)` != `(cd $(DESTDIR)${infodir} && /bin/pwd)` ]; \
- then \
- for elt in $(INFO_FILES); do \
- test "$(HAVE_MAKEINFO)" = "no" && test ! -f $$elt && continue; \
- (cd $${thisdir}; \
- ${INSTALL_INFO} --info-dir=$(DESTDIR)${infodir} $(DESTDIR)${infodir}/$$elt); \
- done; \
- else true; fi
- -chmod -R a+r $(DESTDIR)${datadir}/emacs/${version} ${COPYDESTS}
+ (cd $${thisdir}; \
+ ${INSTALL_INFO} --info-dir=$(DESTDIR)${infodir} $(DESTDIR)${infodir}/$$elt); \
+ done)
+
+install-man:
+ umask 022; ${MKDIR_P} $(DESTDIR)${man1dir}
thisdir=`/bin/pwd`; \
cd ${mansrcdir}; \
- for page in ${MAN_PAGES}; do \
+ for page in *.1; do \
(cd $${thisdir}; \
- ${INSTALL_DATA} ${mansrcdir}/$${page} $(DESTDIR)${man1dir}/$${page}; \
- chmod a+r $(DESTDIR)${man1dir}/$${page}; \
- if [ -n "${GZIP_INFO}" ] && [ -n "${GZIP_PROG}" ]; then \
- rm -f $(DESTDIR)${man1dir}/$${page}.gz; \
- ${GZIP_PROG} -9n $(DESTDIR)${man1dir}/$${page}; \
- else true; fi ); \
+ ${INSTALL_DATA} ${mansrcdir}/$${page} $(DESTDIR)${man1dir}/$${page}); \
+ ( [ -n "${GZIP_INFO}" ] && [ -n "${GZIP_PROG}" ] ) || continue ; \
+ rm -f $(DESTDIR)${man1dir}/$${page}.gz; \
+ ${GZIP_PROG} -9n $(DESTDIR)${man1dir}/$${page}; \
done
## Install those items from etc/ that need to end up elsewhere.
-install-etc: mkdir
+install-etc:
+ umask 022; ${MKDIR_P} $(DESTDIR)${desktopdir}
${INSTALL_DATA} ${srcdir}/etc/emacs.desktop \
$(DESTDIR)${desktopdir}/emacs.desktop
- for icon in $(iconsrcdir)/*/*/apps/*.* \
- $(iconsrcdir)/*/*/mimetypes/*.*; do \
- if [ -r $${icon} ]; then \
- iicon=`echo "$${icon}" | sed 's,$(srcdir)/etc/images/icons,$(DESTDIR)${icondir},'` ; \
- ${INSTALL_DATA} $${icon} $${iicon} ; \
- fi ; \
+ thisdir=`/bin/pwd`; \
+ cd ${iconsrcdir} || exit 1; umask 022 ; \
+ for dir in */*/apps */*/mimetypes; do \
+ [ -d $${dir} ] || continue ; \
+ ( cd $${thisdir}; ${MKDIR_P} $(DESTDIR)${icondir}/$${dir} ) ; \
+ for icon in $${dir}/*.*; do \
+ [ -r $${icon} ] || continue ; \
+ ( cd $${thisdir}; \
+ ${INSTALL_DATA} ${iconsrcdir}/$${icon} $(DESTDIR)${icondir}/$${icon} ) \
+ || exit 1; \
+ done ; \
done
-### Install LEIM files. Although they are machine-independent, we
-### have separate target here instead of including it in
-### `install-arch-indep'. People who extracted LEIM files after they
-### installed Emacs itself can install only LEIM files by this target.
-install-leim: leim/Makefile mkdir
- cd leim && $(MAKE) $(MFLAGS) install
-
### Build Emacs and install it, stripping binaries while installing them.
install-strip:
$(MAKE) $(MFLAGS) INSTALL_STRIP=-s install
-### Build all the directories we're going to install Emacs in. Since
-### we may be creating several layers of directories (for example,
-### /usr/local/lib/emacs/19.0/mips-dec-ultrix4.2), we use install-sh -d
-### instead of mkdir. Not all systems' mkdir programs have the `-p' flag.
-### We set the umask so that any created directories are world-readable.
-### FIXME it would be good to warn about non-standard permissions of
-### pre-existing directories, but that does not seem easy.
-mkdir: FRC
- icondirs= ; \
- for dir in $(iconsrcdir)/*/*/apps $(iconsrcdir)/*/*/mimetypes; do \
- if [ -d $${dir} ]; then \
- icondirs="$${icondirs} $${dir}" ; \
- fi ; \
- done ; \
- icondirs=`echo "$${icondirs}" | sed 's,$(srcdir)/etc/images/icons,$(DESTDIR)${icondir},g'` ; \
- umask 022 ; \
- $(srcdir)/build-aux/install-sh -d $(DESTDIR)${datadir} ${COPYDESTS} \
- $(DESTDIR)${infodir} $(DESTDIR)${man1dir} \
- $(DESTDIR)${bindir} $(DESTDIR)${docdir} $(DESTDIR)${libexecdir} \
- $(DESTDIR)${datadir}/emacs/site-lisp \
- $(DESTDIR)${datadir}/emacs/${version}/site-lisp \
- $(DESTDIR)`echo ${locallisppath} | sed 's,:, $(DESTDIR),g'` \
- $(DESTDIR)${desktopdir} $${icondirs}
-
### Delete all the installed files that the `install' target would
### create (but not the noninstalled files such as `make all' would create).
###
### Don't delete the lisp and etc directories if they're in the source tree.
uninstall:
- (cd lib-src; \
+ cd lib-src && \
$(MAKE) $(MFLAGS) uninstall \
prefix=${prefix} exec_prefix=${exec_prefix} \
- bindir=${bindir} libexecdir=${libexecdir} archlibdir=${archlibdir})
+ bindir=${bindir} libexecdir=${libexecdir} archlibdir=${archlibdir}
-unset CDPATH; \
for dir in $(DESTDIR)${lispdir} $(DESTDIR)${etcdir} ; do \
if [ -d $${dir} ]; then \
- case `(cd $${dir} ; /bin/pwd)` in \
- `(cd ${srcdir} ; /bin/pwd)`* ) ;; \
+ case `cd $${dir} ; /bin/pwd` in \
+ `cd ${srcdir} ; /bin/pwd`* ) ;; \
* ) rm -rf $${dir} ;; \
esac ; \
case $${dir} in \
@@ -723,19 +649,20 @@ uninstall:
fi ; \
done
-rm -rf $(DESTDIR)${libexecdir}/emacs/${version}
- (cd $(DESTDIR)${infodir} && \
- for elt in $(INFO_FILES); do \
- $(INSTALL_INFO) --remove --info-dir=. $$elt; \
+ thisdir=`/bin/pwd`; \
+ (info_misc=`cd doc/misc; ${MAKE} echo-info | sed '/ing directory/d'`; \
+ cd $(DESTDIR)${infodir} && \
+ for elt in ${INFO_NONMISC} $${info_misc}; do \
+ (cd $${thisdir}; \
+ $(INSTALL_INFO) --remove --info-dir=$(DESTDIR)${infodir} $(DESTDIR)${infodir}/$$elt); \
if [ -n "${GZIP_INFO}" ] && [ -n "${GZIP_PROG}" ]; then \
ext=.gz; else ext=; fi; \
- for f in `ls $$elt$$ext $$elt-[1-9]$$ext $$elt-[1-9][0-9]$$ext 2>/dev/null`; do \
- rm -f $$f; \
- done; \
+ rm -f $$elt$$ext $$elt-[1-9]$$ext $$elt-[1-9][0-9]$$ext; \
done;)
(if [ -n "${GZIP_INFO}" ] && [ -n "${GZIP_PROG}" ]; then \
ext=.gz; else ext=; fi; \
- cd $(DESTDIR)${man1dir} && for page in ${MAN_PAGES}; do \
- rm -f $$page$$ext; done )
+ cd ${mansrcdir} && for page in *.1; do \
+ rm -f $(DESTDIR)${man1dir}/$$page$$ext; done )
(cd $(DESTDIR)${bindir} && rm -f $(EMACSFULL) $(EMACS))
(cd $(DESTDIR)${icondir} && rm -f hicolor/*x*/apps/emacs.png hicolor/*x*/apps/emacs22.png hicolor/scalable/apps/emacs.svg hicolor/scalable/mimetypes/emacs-document.svg )
-rm -f $(DESTDIR)${desktopdir}/emacs.desktop
@@ -858,7 +785,7 @@ maintainer-clean: bootstrap-clean FRC
### the coding standards seem to come from. It's like distclean, but
### it deletes backup and autosave files too.
extraclean:
- for i in ${SUBDIR} leim; do (cd $$i; $(MAKE) $(MFLAGS) extraclean); done
+ for i in ${SUBDIR}; do (cd $$i; $(MAKE) $(MFLAGS) extraclean); done
${top_maintainer_clean}
-rm -f config-tmp-*
-rm -f *~ \#*
@@ -915,6 +842,7 @@ check-info-dir: info
case $${file} in \
*-[0-9]*|COPYING|dir) continue ;; \
esac ; \
+ file=`echo $${file} | sed 's/\.info//'` ; \
grep -q -F ": ($${file})." dir || missing="$${missing} $${file}" ; \
done ; \
if test -n "$${missing}"; then \
diff --git a/admin/CPP-DEFINES b/admin/CPP-DEFINES
index c5f8c7ab31f..c03bf6156ab 100644
--- a/admin/CPP-DEFINES
+++ b/admin/CPP-DEFINES
@@ -63,16 +63,11 @@ USER_FULL_NAME If defined, overrides the default pw->pw_gecos for getting at t
** Replace, the definition is trivial: SWITCH_ENUM_CAST
-** Defines from src/m/*.h and src/s/*.h. Some of these might not be used in the code anymore, so they can be removed. The HAVE_* definitions are probably handled by autoconf, so it might be possible to just remove them from src/[sm]/*.h.
+** Defines from src/s/*.h. Some of these might not be used in the code anymore, so they can be removed. The HAVE_* definitions are probably handled by autoconf, so it might be possible to just remove them from src/s/*.h.
AIX
AMPERSAND_FULL_NAME
-BITS_PER_EMACS_INT
-BITS_PER_LONG
-BITS_PER_CHAR
-BITS_PER_SHORT
-BITS_PER_INT
BROKEN_DATAGRAM_SOCKETS
BROKEN_FIONREAD
BROKEN_GET_CURRENT_DIR_NAME
@@ -120,9 +115,7 @@ HAVE_FMOD
HAVE_FPATHCONF
HAVE_FREXP
HAVE_FSYNC
-HAVE_FTIME
HAVE_GETCWD
-HAVE_GETDOMAINNAME
HAVE_GETHOSTNAME
HAVE_GETLOADAVG
HAVE_GETPAGESIZE
@@ -203,7 +196,6 @@ NO_MATHERR
NO_TERMIO
NSIG
NSIG_MINIMUM
-NULL
NULL_DEVICE
ORDINARY_LINK
O_APPEND
@@ -274,7 +266,6 @@ chdir
chmod
chown
close
-const
creat
ctime
dup
diff --git a/admin/ChangeLog b/admin/ChangeLog
index a3a756bde64..c9e9d4a1acc 100644
--- a/admin/ChangeLog
+++ b/admin/ChangeLog
@@ -1,3 +1,33 @@
+2012-05-22 Paul Eggert <eggert@cs.ucla.edu>
+
+ Remove src/m/*.
+ * CPP-DEFINES: Do not mention src/m/*.h.
+ (BITS_PER_EMACS_INT, BITS_PER_LONG, BITS_PER_CHAR)
+ (BITS_PER_SHORT, BITS_PER_INT): Remove.
+ * MAINTAINERS: Remove src/m/.
+
+2012-05-21 Paul Eggert <eggert@cs.ucla.edu>
+
+ Use full name for m4/gnulib-comp.m4. (Bug#11529)
+ * merge-gnulib: Leave m4/gnulib-comp.m4's name alone.
+
+ Assume C89 or later.
+ * CPP-DEFINES: Remove NULL, const.
+
+ Make merging from gnulib a script, not a makefile action.
+ * merge-gnulib: New script, with actions moved here from
+ ../Makefile.in.
+
+2012-05-19 Paul Eggert <eggert@cs.ucla.edu>
+
+ * CPP-DEFINES (HAVE_GETDOMAINNAME): Remove.
+
+ * CPP-DEFINES (HAVE_FTIME): Remove.
+
+2012-05-02 Glenn Morris <rgm@gnu.org>
+
+ * bzrmerge.el (bzrmerge-skip-regexp): Add "Auto-commit".
+
2012-04-10 Glenn Morris <rgm@gnu.org>
* bzrmerge.el (bzrmerge-skip-regexp): Add "from trunk".
@@ -1262,7 +1292,7 @@
;; coding: utf-8
;; End:
- Copyright (C) 2001-2012 Free Software Foundation, Inc.
+ Copyright (C) 2001-2012 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/admin/FOR-RELEASE b/admin/FOR-RELEASE
index ad427397524..1e4f9f3b48d 100644
--- a/admin/FOR-RELEASE
+++ b/admin/FOR-RELEASE
@@ -31,12 +31,22 @@ its own at the start of a line. It looks better if you reword/respace
things to avoid these. (AFAIK, there is no way to find these except
paging through the whole manual.) This should be the very last thing
you do, since any change can alter the layout.
+(Actually, there is probably little point in trying to do this.
+It's only really relevant if printed versions of the manuals are going
+to be published. End-users are not likely to print out all 1000+
+pages of the manuals, and even if they do, the resulting page breaks
+depend on what paper and font size they use. This also means that if
+you _are_ going to do this, it should be done with the paper and font
+size that the GNU Press are going to use when they print the manuals.
+I think this is different to what you get if you just use eg `make
+emacs.pdf' (e.g., enable "smallbook").
** Check the keybindings in the refcards are correct, and add any new ones.
Regenerate the pdf versions in etc/refcards/.
What paper size are the English versions supposed to be on?
On Debian testing, the packages texlive-lang-czechslovak and
texlive-lang-polish will let you generate the cs-* and sk-* pdfs.
+(You may need texlive-lang-cyrillic, texlive-lang-german for others.)
The Makefile rules did not work for me, I had to use something like:
csplain -output-format=pdf cs-refcard
@@ -61,7 +71,7 @@ sk Miroslav Vaško
** Consider bumping customize-changed-options-previous-release.
-** cusver-check from admin.el cam help find new defcustoms missing
+** cusver-check from admin.el can help find new defcustoms missing
:version tags.
* BUGS
@@ -229,7 +239,7 @@ syntax.texi cyd
text.texi cyd
tips.texi rgm
variables.texi cyd
-windows.texi
+windows.texi rgm (skimmed)
Local variables:
diff --git a/admin/MAINTAINERS b/admin/MAINTAINERS
index bfac347eb15..86d319d65d5 100644
--- a/admin/MAINTAINERS
+++ b/admin/MAINTAINERS
@@ -171,7 +171,6 @@ src/insdel.c
src/image.c
src/lastfile.c
src/lread.c
-src/m/
src/macros.c
src/makefile.w32-in
src/marker.c
@@ -220,4 +219,3 @@ src/xmenu.c
src/xrdb.c
src/xselect.c
src/xterm.c
-
diff --git a/admin/bzrmerge.el b/admin/bzrmerge.el
index 0c72c8b5c93..15238f44d9d 100644
--- a/admin/bzrmerge.el
+++ b/admin/bzrmerge.el
@@ -28,7 +28,8 @@
(require 'cl)) ; assert
(defvar bzrmerge-skip-regexp
- "back[- ]?port\\|merge\\|sync\\|re-?generate\\|bump version\\|from trunk"
+ "back[- ]?port\\|merge\\|sync\\|re-?generate\\|bump version\\|from trunk\\|\
+Auto-commit"
"Regexp matching logs of revisions that might be skipped.
`bzrmerge-missing' will ask you if it should skip any matches.")
diff --git a/admin/merge-gnulib b/admin/merge-gnulib
new file mode 100755
index 00000000000..fa082d94664
--- /dev/null
+++ b/admin/merge-gnulib
@@ -0,0 +1,86 @@
+#! /bin/sh
+# Merge gnulib sources into Emacs sources.
+# Typical usage:
+#
+# admin/merge-gnulib
+
+# Copyright 2012 Free Software Foundation, Inc.
+
+# This file is part of GNU Emacs.
+
+# GNU Emacs 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, either version 3 of the License, or
+# (at your option) any later version.
+
+# GNU Emacs 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 GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
+
+# written by Paul Eggert
+
+GNULIB_URL=git://git.savannah.gnu.org/gnulib.git
+
+GNULIB_MODULES='
+ alloca-opt
+ careadlinkat crypto/md5 crypto/sha1 crypto/sha256 crypto/sha512
+ dtoastr dup2
+ filemode getloadavg getopt-gnu ignore-value intprops lstat
+ manywarnings mktime pthread_sigmask readlink
+ socklen stdarg stdio strftime strtoimax strtoumax symlink sys_stat
+ warnings
+'
+
+GNULIB_TOOL_FLAGS='
+ --avoid=msvc-inval --avoid=msvc-nothrow
+ --avoid=raise --avoid=threadlib
+ --conditional-dependencies --import --no-changelog --no-vc-files
+ --makefile-name=gnulib.mk
+'
+
+# The source directory, with a trailing '/'.
+# If empty, the source directory is the working directory.
+src=$2
+case $src in
+ */ | '') ;;
+ *) src=$src/ ;;
+esac
+
+# Gnulib's source directory.
+gnulib_srcdir=${1-$src../gnulib}
+
+case $gnulib_srcdir in
+ -*) src=- ;;
+esac
+case $src in
+ -*)
+ echo >&2 "$0: usage: $0 [GNULIB_SRCDIR [SRCDIR]]
+
+ SRCDIR is the Emacs source directory (default: working directory).
+ GNULIB_SRCDIR is the Gnulib source directory (default: SRCDIR/../gnulib)."
+ exit 1 ;;
+esac
+
+test -x "$src"autogen.sh || {
+ echo >&2 "$0: '${src:-.}' is not an Emacs source directory."
+ exit 1
+}
+
+test -d "$gnulib_srcdir" ||
+git clone -- "$GNULIB_URL" "$gnulib_srcdir" ||
+exit
+
+test -x "$gnulib_srcdir"/gnulib-tool || {
+ echo >&2 "$0: '$gnulib_srcdir' is not a Gnulib source directory."
+ exit 1
+}
+
+"$gnulib_srcdir"/gnulib-tool --dir="$src" $GNULIB_TOOL_FLAGS $GNULIB_MODULES &&
+rm -- "$src"m4/gnulib-cache.m4 "$src"m4/warn-on-use.m4 &&
+cp -- "$gnulib_srcdir"/build-aux/texinfo.tex "$src"doc/misc &&
+cp -- "$gnulib_srcdir"/build-aux/move-if-change "$src"build-aux &&
+autoreconf -i -I m4 -- ${src:+"$src"}
diff --git a/autogen/Makefile.in b/autogen/Makefile.in
index d395a17bef9..4e733f74759 100644
--- a/autogen/Makefile.in
+++ b/autogen/Makefile.in
@@ -36,7 +36,7 @@
# the same distribution terms as the rest of that program.
#
# Generated by gnulib-tool.
-# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --avoid=msvc-inval --avoid=msvc-nothrow --avoid=raise --avoid=threadlib --makefile-name=gnulib.mk --conditional-dependencies --no-libtool --macro-prefix=gl --no-vc-files alloca-opt careadlinkat crypto/md5 crypto/sha1 crypto/sha256 crypto/sha512 dtoastr dup2 filemode getloadavg getopt-gnu ignore-value intprops lstat mktime pthread_sigmask readlink socklen stdarg stdio strftime strtoimax strtoumax symlink sys_stat
+# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --avoid=msvc-inval --avoid=msvc-nothrow --avoid=raise --avoid=threadlib --makefile-name=gnulib.mk --conditional-dependencies --no-libtool --macro-prefix=gl --no-vc-files alloca-opt careadlinkat crypto/md5 crypto/sha1 crypto/sha256 crypto/sha512 dtoastr dup2 filemode getloadavg getopt-gnu ignore-value intprops lstat manywarnings mktime pthread_sigmask readlink socklen stdarg stdio strftime strtoimax strtoumax symlink sys_stat warnings
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
@@ -66,8 +66,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \
$(top_srcdir)/m4/alloca.m4 $(top_srcdir)/m4/c-strtod.m4 \
$(top_srcdir)/m4/dup2.m4 $(top_srcdir)/m4/extensions.m4 \
$(top_srcdir)/m4/filemode.m4 $(top_srcdir)/m4/getloadavg.m4 \
- $(top_srcdir)/m4/getopt.m4 $(top_srcdir)/m4/gl-comp.m4 \
- $(top_srcdir)/m4/gnulib-common.m4 \
+ $(top_srcdir)/m4/getopt.m4 $(top_srcdir)/m4/gnulib-common.m4 \
+ $(top_srcdir)/m4/gnulib-comp.m4 \
$(top_srcdir)/m4/include_next.m4 $(top_srcdir)/m4/inttypes.m4 \
$(top_srcdir)/m4/largefile.m4 $(top_srcdir)/m4/longlong.m4 \
$(top_srcdir)/m4/lstat.m4 $(top_srcdir)/m4/manywarnings.m4 \
@@ -473,7 +473,10 @@ IMAGEMAGICK_CFLAGS = @IMAGEMAGICK_CFLAGS@
IMAGEMAGICK_LIBS = @IMAGEMAGICK_LIBS@
INCLUDE_NEXT = @INCLUDE_NEXT@
INCLUDE_NEXT_AS_FIRST_DIRECTIVE = @INCLUDE_NEXT_AS_FIRST_DIRECTIVE@
+INFO_EXT = @INFO_EXT@
+INFO_OPTS = @INFO_OPTS@
INSTALL = @INSTALL@
+INSTALL_ARCH_INDEP_EXTRA = @INSTALL_ARCH_INDEP_EXTRA@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_INFO = @INSTALL_INFO@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
@@ -488,8 +491,7 @@ LD_FIRSTFLAG = @LD_FIRSTFLAG@
LD_SWITCH_SYSTEM = @LD_SWITCH_SYSTEM@
LD_SWITCH_SYSTEM_TEMACS = @LD_SWITCH_SYSTEM_TEMACS@
LD_SWITCH_X_SITE = @LD_SWITCH_X_SITE@
-LD_SWITCH_X_SITE_AUX = @LD_SWITCH_X_SITE_AUX@
-LD_SWITCH_X_SITE_AUX_RPATH = @LD_SWITCH_X_SITE_AUX_RPATH@
+LD_SWITCH_X_SITE_RPATH = @LD_SWITCH_X_SITE_RPATH@
LIBGIF = @LIBGIF@
LIBGNUTLS_CFLAGS = @LIBGNUTLS_CFLAGS@
LIBGNUTLS_LIBS = @LIBGNUTLS_LIBS@
@@ -533,7 +535,6 @@ MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MKDEPDIR = @MKDEPDIR@
MKDIR_P = @MKDIR_P@
-M_FILE = @M_FILE@
NEXT_AS_FIRST_DIRECTIVE_GETOPT_H = @NEXT_AS_FIRST_DIRECTIVE_GETOPT_H@
NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H = @NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H@
NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H = @NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H@
@@ -752,6 +753,7 @@ htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
+leimdir = @leimdir@
libdir = @libdir@
libexecdir = @libexecdir@
liblockfile = @liblockfile@
@@ -766,6 +768,7 @@ ns_appbindir = @ns_appbindir@
ns_appdir = @ns_appdir@
ns_appresdir = @ns_appresdir@
ns_appsrc = @ns_appsrc@
+ns_self_contained = @ns_self_contained@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
diff --git a/autogen/aclocal.m4 b/autogen/aclocal.m4
index f74fb730dc9..a334fa54709 100644
--- a/autogen/aclocal.m4
+++ b/autogen/aclocal.m4
@@ -992,8 +992,8 @@ m4_include([m4/extensions.m4])
m4_include([m4/filemode.m4])
m4_include([m4/getloadavg.m4])
m4_include([m4/getopt.m4])
-m4_include([m4/gl-comp.m4])
m4_include([m4/gnulib-common.m4])
+m4_include([m4/gnulib-comp.m4])
m4_include([m4/include_next.m4])
m4_include([m4/inttypes.m4])
m4_include([m4/largefile.m4])
diff --git a/autogen/config.in b/autogen/config.in
index 1082e150fc6..61439b72487 100644
--- a/autogen/config.in
+++ b/autogen/config.in
@@ -148,6 +148,18 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
/* Define to 1 if using D-Bus. */
#undef HAVE_DBUS
+/* Define to 1 if you have the `dbus_validate_bus_name' function. */
+#undef HAVE_DBUS_VALIDATE_BUS_NAME
+
+/* Define to 1 if you have the `dbus_validate_interface' function. */
+#undef HAVE_DBUS_VALIDATE_INTERFACE
+
+/* Define to 1 if you have the `dbus_validate_member' function. */
+#undef HAVE_DBUS_VALIDATE_MEMBER
+
+/* Define to 1 if you have the `dbus_validate_path' function. */
+#undef HAVE_DBUS_VALIDATE_PATH
+
/* Define to 1 if you have the `dbus_watch_get_unix_fd' function. */
#undef HAVE_DBUS_WATCH_GET_UNIX_FD
@@ -242,9 +254,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
/* Define to 1 if you have the `fsync' function. */
#undef HAVE_FSYNC
-/* Define to 1 if you have the `ftime' function. */
-#undef HAVE_FTIME
-
/* Define to 1 if you have the `gai_strerror' function. */
#undef HAVE_GAI_STRERROR
@@ -260,9 +269,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
/* Define to 1 if you have the `getdelim' function. */
#undef HAVE_GETDELIM
-/* Define to 1 if you have the `getdomainname' function. */
-#undef HAVE_GETDOMAINNAME
-
/* Define to 1 if you have the `getgrent' function. */
#undef HAVE_GETGRENT
@@ -302,9 +308,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
/* Define to 1 if you have the `getsockname' function. */
#undef HAVE_GETSOCKNAME
-/* Define to 1 if you have the `getsockopt' function. */
-#undef HAVE_GETSOCKOPT
-
/* Define to 1 if you have the `gettimeofday' function. */
#undef HAVE_GETTIMEOFDAY
@@ -462,9 +465,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
/* Define to 1 if you have the `mail' library (-lmail). */
#undef HAVE_LIBMAIL
-/* Define to 1 if you have the `ncurses' library (-lncurses). */
-#undef HAVE_LIBNCURSES
-
/* Define to 1 if using libotf. */
#undef HAVE_LIBOTF
@@ -534,24 +534,12 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
/* Define to 1 if you have the <malloc/malloc.h> header file. */
#undef HAVE_MALLOC_MALLOC_H
-/* Define to 1 if you have the `mblen' function. */
-#undef HAVE_MBLEN
-
-/* Define to 1 if you have the `mbrlen' function. */
-#undef HAVE_MBRLEN
-
-/* Define to 1 if you have the `mbsinit' function. */
-#undef HAVE_MBSINIT
-
/* Define to 1 if <wchar.h> declares mbstate_t. */
#undef HAVE_MBSTATE_T
/* Define to 1 if you have the <memory.h> header file. */
#undef HAVE_MEMORY_H
-/* Define to 1 if you have the `mempcpy' function. */
-#undef HAVE_MEMPCPY
-
/* Define to 1 if you have mouse menus. (This is automatic if you use X, but
the option to specify it remains.) It is also defined with other window
systems that support xmenu.c. */
@@ -569,9 +557,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
/* Define if you have mouse support. */
#undef HAVE_MOUSE
-/* Define to 1 if you have the `mremap' function. */
-#undef HAVE_MREMAP
-
/* Define to 1 if you have the <net/if_dl.h> header file. */
#undef HAVE_NET_IF_DL_H
@@ -666,9 +651,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
/* Define to 1 if you have the `setsid' function. */
#undef HAVE_SETSID
-/* Define to 1 if you have the `setsockopt' function. */
-#undef HAVE_SETSOCKOPT
-
/* Define to 1 if you have the `shutdown' function. */
#undef HAVE_SHUTDOWN
@@ -848,9 +830,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
/* Define to 1 if you have the `tzset' function. */
#undef HAVE_TZSET
-/* Define to 1 if you have the `ualarm' function. */
-#undef HAVE_UALARM
-
/* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
@@ -930,9 +909,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
/* Define to 1 if you have the `XScreenResourceString' function. */
#undef HAVE_XSCREENRESOURCESTRING
-/* Define to 1 if you have the `XSetWMProtocols' function. */
-#undef HAVE_XSETWMPROTOCOLS
-
/* Define if you have usable i18n support. */
#undef HAVE_X_I18N
@@ -1030,13 +1006,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
/* Define to the version of this package. */
#undef PACKAGE_VERSION
-/* Define as `void' if your compiler accepts `void *'; otherwise define as
- `char'. */
-#undef POINTER_TYPE
-
-/* Define to 1 if the C compiler supports function prototypes. */
-#undef PROTOTYPES
-
/* Define to 1 if pthread_sigmask(), when it fails, returns -1 and sets errno.
*/
#undef PTHREAD_SIGMASK_FAILS_WITH_ERRNO
@@ -1246,9 +1215,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
used. */
#undef __GETOPT_PREFIX
-/* Define like PROTOTYPES; this can be used by system headers. */
-#undef __PROTOTYPES
-
/* Ensure that <stdint.h> defines the limit macros, since gnulib's
<inttypes.h> relies on them. */
#if defined __cplusplus && !defined __STDC_LIMIT_MACROS && GL_TRIGGER_STDC_LIMIT_MACROS
@@ -1260,15 +1226,9 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
declarations. Define as empty for no equivalent. */
#undef __restrict_arr
-/* Define to the used machine dependent file. */
-#undef config_machfile
-
/* Define to the used os dependent file. */
#undef config_opsysfile
-/* Define to empty if `const' does not conform to ANSI C. */
-#undef const
-
/* A replacement for va_copy, if needed. */
#define gl_va_copy(a,b) ((a) = (b))
@@ -1362,10 +1322,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
/* Define as `fork' if `vfork' does not work. */
#undef vfork
-/* Define to empty if the keyword `volatile' does not work. Warning: valid
- code using `volatile' can become incorrect without. Disable with care. */
-#undef volatile
-
/* On AIX 3 this must be included before any other include file. */
#include <alloca.h>
@@ -1386,11 +1342,8 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#define subprocesses
-/* Include the os and machine dependent files. */
+/* Include the os dependent file. */
#include config_opsysfile
-#ifdef config_machfile
-# include config_machfile
-#endif
/* GNUstep needs a bit more pure memory. Of the existing knobs,
SYSTEM_PURESIZE_EXTRA seems like the least likely to cause problems.
@@ -1414,38 +1367,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#endif
#endif
-/* These default definitions are good for almost all machines.
- Any exceptions should override them in m/MACHINE.h.
- They must be usable in preprocessor conditionals. */
-
-#ifndef BITS_PER_CHAR
-#define BITS_PER_CHAR 8
-#endif
-
-#ifndef BITS_PER_SHORT
-#define BITS_PER_SHORT 16
-#endif
-
-#ifndef BITS_PER_INT
-#define BITS_PER_INT 32
-#endif
-
-#ifndef BITS_PER_LONG
-#ifdef _LP64
-#define BITS_PER_LONG 64
-#else
-#define BITS_PER_LONG 32
-#endif
-#endif
-
-#if !defined BITS_PER_LONG_LONG && HAVE_LONG_LONG_INT
-#define BITS_PER_LONG_LONG 64
-#endif
-
-/* Define if the compiler supports function prototypes. It may do so but
- not define __STDC__ (e.g. DEC C by default) or may define it as zero. */
-#undef PROTOTYPES
-
#include <string.h>
#include <stdlib.h>
diff --git a/autogen/configure b/autogen/configure
index 0d9d1abdaa4..db3f0fa873e 100755
--- a/autogen/configure
+++ b/autogen/configure
@@ -628,6 +628,7 @@ gl_GNULIB_ENABLED_dosname_FALSE
gl_GNULIB_ENABLED_dosname_TRUE
LTLIBINTL
LIBINTL
+WARN_CFLAGS
HAVE_UNISTD_H
NEXT_AS_FIRST_DIRECTIVE_UNISTD_H
NEXT_UNISTD_H
@@ -1085,7 +1086,6 @@ ns_appresdir
ns_appbindir
ns_appdir
S_FILE
-M_FILE
X_TOOLKIT_TYPE
GNUSTEP_CFLAGS
C_SWITCH_X_SITE
@@ -1098,6 +1098,7 @@ etcdir
x_default_search_path
lisppath
locallisppath
+leimdir
lispdir
srcdir
canonical
@@ -1162,9 +1163,10 @@ HAVE_XSERVER
LIB_STANDARD
NS_OBJC_OBJ
NS_OBJ
+ns_self_contained
+INSTALL_ARCH_INDEP_EXTRA
TEMACS_LDFLAGS2
-LD_SWITCH_X_SITE_AUX_RPATH
-LD_SWITCH_X_SITE_AUX
+LD_SWITCH_X_SITE_RPATH
XMKMF
DEPFLAGS
MKDEPDIR
@@ -1182,11 +1184,12 @@ UNEXEC_OBJ
C_SWITCH_MACHINE
LD_SWITCH_SYSTEM
CANNOT_DUMP
+INFO_OPTS
+INFO_EXT
HAVE_MAKEINFO
GZIP_PROG
INSTALL_INFO
GNULIB_WARN_CFLAGS
-WARN_CFLAGS
WERROR_CFLAGS
RANLIB
ARFLAGS
@@ -3727,6 +3730,7 @@ am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
lispdir='${datadir}/emacs/${version}/lisp'
+leimdir='${datadir}/emacs/${version}/leim'
locallisppath='${datadir}/emacs/${version}/site-lisp:'\
'${datadir}/emacs/site-lisp'
lisppath='${locallisppath}:${lispdir}:${datadir}/emacs/${version}/leim'
@@ -4299,8 +4303,8 @@ case "${srcdir}" in
* ) srcdir="`(cd ${srcdir}; pwd)`" ;;
esac
-#### Given the configuration name, set machfile and opsysfile to the
-#### names of the m/*.h and s/*.h files we should use.
+#### Given the configuration name, set opsysfile to the
+#### name of s/*.h file we should use.
### Canonicalize the configuration name.
@@ -4382,13 +4386,11 @@ configuration=${host_alias-${build_alias-$host}}
### If you add support for a new configuration, add code to this
### switch statement to recognize your configuration name and select
-### the appropriate operating system and machine description files.
+### the appropriate operating system file.
-### You would hope that you could choose an m/*.h file pretty much
-### based on the machine portion of the configuration name, and an s/*.h
+### You would hope that you could choose an s/*.h
### file based on the operating system portion. However, it turns out
-### that each m/*.h file is pretty manufacturer-specific - for
-### example mips.h is MIPS
+### that each s/*.h file is pretty manufacturer-specific.
### So we basically have to have a special case for each
### configuration name.
###
@@ -4398,95 +4400,49 @@ configuration=${host_alias-${build_alias-$host}}
### prepared to handle anything reasonably. If version numbers
### matter, be sure /etc/MACHINES says something about it.
-machine='' opsys='' unported=no
+opsys='' unported=no
case "${canonical}" in
## GNU/Linux and similar ports
*-*-linux* )
opsys=gnu-linux
- case ${canonical} in
- alpha*) machine=alpha ;;
- s390x-*) machine=ibms390x ;;
- powerpc*) machine=macppc ;;
- sparc*) machine=sparc ;;
- ia64*) machine=ia64 ;;
- m68k*) machine=m68k ;;
- x86_64*) machine=amdx86-64 ;;
- esac
;;
## FreeBSD ports
*-*-freebsd* )
opsys=freebsd
- case "${canonical}" in
- alpha*) machine=alpha ;;
- amd64-*|x86_64-*) machine=amdx86-64 ;;
- ia64-*) machine=ia64 ;;
- i[3456]86-*) machine=intel386 ;;
- powerpc-*) machine=macppc ;;
- sparc-*) machine=sparc ;;
- sparc64-*) machine=sparc ;;
- esac
;;
## FreeBSD kernel + glibc based userland
*-*-kfreebsd*gnu* )
opsys=gnu-kfreebsd
- case "${canonical}" in
- alpha*) machine=alpha ;;
- amd64-*|x86_64-*) machine=amdx86-64 ;;
- ia64-*) machine=ia64 ;;
- i[3456]86-*) machine=intel386 ;;
- powerpc-*) machine=macppc ;;
- sparc-*) machine=sparc ;;
- sparc64-*) machine=sparc ;;
- esac
;;
## NetBSD ports
*-*-netbsd* )
opsys=netbsd
- case "${canonical}" in
- alpha*) machine=alpha ;;
- x86_64-*) machine=amdx86-64 ;;
- i[3456]86-*) machine=intel386 ;;
- m68k-*) machine=m68k ;;
- powerpc-*) machine=macppc ;;
- sparc*-) machine=sparc ;;
- vax-*) machine=vax ;;
- esac
;;
## OpenBSD ports
*-*-openbsd* )
opsys=openbsd
- case "${canonical}" in
- alpha*) machine=alpha ;;
- x86_64-*) machine=amdx86-64 ;;
- i386-*) machine=intel386 ;;
- powerpc-*) machine=macppc ;;
- sparc*) machine=sparc ;;
- vax-*) machine=vax ;;
- esac
;;
## Apple Darwin / Mac OS X
*-apple-darwin* )
case "${canonical}" in
- i[3456]86-* ) machine=intel386 ;;
- powerpc-* ) machine=macppc ;;
- x86_64-* ) machine=amdx86-64 ;;
+ i[3456]86-* ) ;;
+ powerpc-* ) ;;
+ x86_64-* ) ;;
* ) unported=yes ;;
esac
opsys=darwin
- # Define CPP as follows to make autoconf work correctly.
- CPP="${CC-cc} -E -no-cpp-precomp"
- # Use fink packages if available.
- if test -d /sw/include && test -d /sw/lib; then
- GCC_TEST_OPTIONS="-I/sw/include -L/sw/lib"
- CPP="${CPP} ${GCC_TEST_OPTIONS}"
- NON_GCC_TEST_OPTIONS=${GCC_TEST_OPTIONS}
- fi
+ ## Use fink packages if available.
+ ## FIXME find a better way to do this: http://debbugs.gnu.org/11507
+## if test -d /sw/include && test -d /sw/lib; then
+## GCC_TEST_OPTIONS="-I/sw/include -L/sw/lib"
+## NON_GCC_TEST_OPTIONS=${GCC_TEST_OPTIONS}
+## fi
;;
## HP 9000 series 700 and 800, running HP/UX
@@ -4500,16 +4456,16 @@ case "${canonical}" in
## IBM machines
rs6000-ibm-aix4.[23]* )
- machine=ibmrs6000 opsys=aix4-2
+ opsys=aix4-2
;;
powerpc-ibm-aix4.[23]* )
- machine=ibmrs6000 opsys=aix4-2
+ opsys=aix4-2
;;
rs6000-ibm-aix[56]* )
- machine=ibmrs6000 opsys=aix4-2
+ opsys=aix4-2
;;
powerpc-ibm-aix[56]* )
- machine=ibmrs6000 opsys=aix4-2
+ opsys=aix4-2
;;
## Silicon Graphics machines
@@ -4519,7 +4475,6 @@ case "${canonical}" in
# Without defining _LANGUAGE_C, things get masked out in the headers
# so that, for instance, grepping for `free' in stdlib.h fails and
# AC_HEADER_STD_C fails. (MIPSPro 7.2.1.2m compilers, Irix 6.5.3m).
- NON_GNU_CPP="/lib/cpp -D_LANGUAGE_C"
NON_GCC_TEST_OPTIONS="-D_LANGUAGE_C"
;;
@@ -4528,26 +4483,23 @@ case "${canonical}" in
| i[3456]86-*-solaris2* | i[3456]86-*-sunos5* \
| x86_64-*-solaris2* | x86_64-*-sunos5*)
case "${canonical}" in
- i[3456]86-*-* ) machine=intel386 ;;
- amd64-*-*|x86_64-*-*) machine=amdx86-64 ;;
- sparc* ) machine=sparc ;;
+ i[3456]86-*-* ) ;;
+ amd64-*-*|x86_64-*-*) ;;
+ sparc* ) ;;
* ) unported=yes ;;
esac
case "${canonical}" in
*-sunos5.6* | *-solaris2.6* )
opsys=sol2-6
- NON_GNU_CPP=/usr/ccs/lib/cpp
RANLIB="ar -ts"
;;
*-sunos5.[7-9]* | *-solaris2.[7-9]* )
opsys=sol2-6
emacs_check_sunpro_c=yes
- NON_GNU_CPP=/usr/ccs/lib/cpp
;;
*-sunos5* | *-solaris* )
opsys=sol2-10
emacs_check_sunpro_c=yes
- NON_GNU_CPP=/usr/ccs/lib/cpp
;;
esac
## Watch out for a compiler that we know will not work.
@@ -4565,15 +4517,12 @@ case "${canonical}" in
## Intel 386 machines where we don't care about the manufacturer.
i[3456]86-*-* )
- machine=intel386
case "${canonical}" in
*-cygwin ) opsys=cygwin ;;
- *-darwin* ) opsys=darwin
- CPP="${CC-cc} -E -no-cpp-precomp"
- ;;
- *-sysv4.2uw* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;;
- *-sysv5uw* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;;
- *-sysv5OpenUNIX* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;;
+ *-darwin* ) opsys=darwin ;;
+ *-sysv4.2uw* ) opsys=unixware ;;
+ *-sysv5uw* ) opsys=unixware ;;
+ *-sysv5OpenUNIX* ) opsys=unixware ;;
## Otherwise, we'll fall through to the generic opsys code at the bottom.
esac
;;
@@ -4605,19 +4554,10 @@ if test $unported = yes; then
Check \`etc/MACHINES' for recognized configuration names." "$LINENO" 5
fi
-if test -n "$machine"; then
- machfile="m/${machine}.h"
-else
- machfile=
-fi
opsysfile="s/${opsys}.h"
#### Choose a compiler.
-test -n "$CC" && cc_specified=yes
-
-# Save the value of CFLAGS that the user specified.
-SPECIFIED_CFLAGS="$CFLAGS"
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
@@ -5726,7 +5666,13 @@ fi
-# Initialize gnulib right after verifying that the C compiler works.
+if test x$GCC = xyes; then
+ test "x$GCC_TEST_OPTIONS" != x && CC="$CC $GCC_TEST_OPTIONS"
+else
+ test "x$NON_GCC_TEST_OPTIONS" != x && CC="$CC $NON_GCC_TEST_OPTIONS"
+fi
+
+# Initialize gnulib right after choosing the compiler.
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
@@ -6962,6 +6908,7 @@ esac
# Code from module largefile:
# Code from module lstat:
+ # Code from module manywarnings:
# Code from module mktime:
# Code from module multiarch:
# Code from module nocrash:
@@ -6998,76 +6945,9 @@ esac
# Code from module u64:
# Code from module unistd:
# Code from module verify:
+ # Code from module warnings:
-# On Suns, sometimes $CPP names a directory.
-if test -n "$CPP" && test -d "$CPP"; then
- CPP=
-fi
-
-## If not using gcc, and on Solaris, and no CPP specified, see if
-## using a Sun compiler, which needs -Xs to prevent whitespace.
-if test x"$GCC" != xyes && test x"$emacs_check_sunpro_c" = xyes && \
- test x"$CPP" = x; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using a Sun C compiler" >&5
-$as_echo_n "checking whether we are using a Sun C compiler... " >&6; }
- if test "${emacs_cv_sunpro_c+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-#ifndef __SUNPRO_C
-fail;
-#endif
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- emacs_cv_sunpro_c=yes
-else
- emacs_cv_sunpro_c=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-fi
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_sunpro_c" >&5
-$as_echo "$emacs_cv_sunpro_c" >&6; }
-
- if test x"$emacs_cv_sunpro_c" = xyes; then
- NON_GNU_CPP="$CC -E -Xs"
- fi
-fi
-
-#### Some systems specify a CPP to use unless we are using GCC.
-#### Now that we know whether we are using GCC, we can decide whether
-#### to use that one.
-if test "x$NON_GNU_CPP" != x && test x$GCC != xyes && test "x$CPP" = x
-then
- CPP="$NON_GNU_CPP"
-fi
-
-#### Some systems specify a CC to use unless we are using GCC.
-#### Now that we know whether we are using GCC, we can decide whether
-#### to use that one.
-if test "x$NON_GNU_CC" != x && test x$GCC != xyes &&
- test x$cc_specified != xyes
-then
- CC="$NON_GNU_CC"
-fi
-
-if test x$GCC = xyes; then
- test "x$GCC_TEST_OPTIONS" != x && CC="$CC $GCC_TEST_OPTIONS"
-else
- test "x$NON_GCC_TEST_OPTIONS" != x && CC="$CC $NON_GCC_TEST_OPTIONS"
-fi
-
# Check whether --enable-gcc-warnings was given.
if test "${enable_gcc_warnings+set}" = set; then :
enableval=$enable_gcc_warnings; case $enableval in
@@ -7142,7 +7022,7 @@ fi
nw="$nw -Waggregate-return" # anachronistic
- nw="$nw -Wlong-long" # C90 is anachronistic (lib/gethrxtime.h)
+ nw="$nw -Wlong-long" # C90 is anachronistic
nw="$nw -Wc++-compat" # We don't care about C++ compilers
nw="$nw -Wundef" # Warns on '#if GNULIB_FOO' etc in gnulib
nw="$nw -Wtraditional" # Warns on #elif which we use often
@@ -7717,8 +7597,6 @@ fi
-
-
$as_echo "#define lint 1" >>confdefs.h
@@ -7753,257 +7631,6 @@ fi
-#### Some other nice autoconf tests.
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
-$as_echo_n "checking how to run the C preprocessor... " >&6; }
-# On Suns, sometimes $CPP names a directory.
-if test -n "$CPP" && test -d "$CPP"; then
- CPP=
-fi
-if test -z "$CPP"; then
- if test "${ac_cv_prog_CPP+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- # Double quotes because CPP needs to be expanded
- for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
- do
- ac_preproc_ok=false
-for ac_c_preproc_warn_flag in '' yes
-do
- # Use a header file that comes with gcc, so configuring glibc
- # with a fresh cross-compiler works.
- # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- # <limits.h> exists even on freestanding compilers.
- # On the NeXT, cc -E runs the code through the compiler's parser,
- # not just through cpp. "Syntax error" is here to catch this case.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
- Syntax error
-_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
-
-else
- # Broken: fails on valid input.
-continue
-fi
-rm -f conftest.err conftest.$ac_ext
-
- # OK, works on sane cases. Now check whether nonexistent headers
- # can be detected and how.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <ac_nonexistent.h>
-_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
- # Broken: success on invalid input.
-continue
-else
- # Passes both tests.
-ac_preproc_ok=:
-break
-fi
-rm -f conftest.err conftest.$ac_ext
-
-done
-# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.err conftest.$ac_ext
-if $ac_preproc_ok; then :
- break
-fi
-
- done
- ac_cv_prog_CPP=$CPP
-
-fi
- CPP=$ac_cv_prog_CPP
-else
- ac_cv_prog_CPP=$CPP
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
-$as_echo "$CPP" >&6; }
-ac_preproc_ok=false
-for ac_c_preproc_warn_flag in '' yes
-do
- # Use a header file that comes with gcc, so configuring glibc
- # with a fresh cross-compiler works.
- # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- # <limits.h> exists even on freestanding compilers.
- # On the NeXT, cc -E runs the code through the compiler's parser,
- # not just through cpp. "Syntax error" is here to catch this case.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
- Syntax error
-_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
-
-else
- # Broken: fails on valid input.
-continue
-fi
-rm -f conftest.err conftest.$ac_ext
-
- # OK, works on sane cases. Now check whether nonexistent headers
- # can be detected and how.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <ac_nonexistent.h>
-_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
- # Broken: success on invalid input.
-continue
-else
- # Passes both tests.
-ac_preproc_ok=:
-break
-fi
-rm -f conftest.err conftest.$ac_ext
-
-done
-# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.err conftest.$ac_ext
-if $ac_preproc_ok; then :
-
-else
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error "C preprocessor \"$CPP\" fails sanity check
-See \`config.log' for more details." "$LINENO" 5; }
-fi
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-
-if test "x$RANLIB" = x; then
- if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
-set dummy ${ac_tool_prefix}ranlib; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_RANLIB+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$RANLIB"; then
- ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-RANLIB=$ac_cv_prog_RANLIB
-if test -n "$RANLIB"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
-$as_echo "$RANLIB" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_prog_RANLIB"; then
- ac_ct_RANLIB=$RANLIB
- # Extract the first word of "ranlib", so it can be a program name with args.
-set dummy ranlib; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$ac_ct_RANLIB"; then
- ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_ac_ct_RANLIB="ranlib"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
-if test -n "$ac_ct_RANLIB"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
-$as_echo "$ac_ct_RANLIB" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
- if test "x$ac_ct_RANLIB" = x; then
- RANLIB=":"
- else
- case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
- RANLIB=$ac_ct_RANLIB
- fi
-else
- RANLIB="$ac_cv_prog_RANLIB"
-fi
-
-fi
-
-## Although we're running on an amd64 kernel, we're actually compiling for
-## the x86 architecture. The user should probably have provided an
-## explicit --build to `configure', but if everything else than the kernel
-## is running in i386 mode, we can help them out.
-if test "$machine" = "amdx86-64"; then
- ac_fn_c_check_decl "$LINENO" "i386" "ac_cv_have_decl_i386" "$ac_includes_default"
-if test "x$ac_cv_have_decl_i386" = x""yes; then :
-
-fi
-
- if test "$ac_cv_have_decl_i386" = "yes"; then
- canonical=`echo "$canonical" | sed -e 's/^amd64/i386/' -e 's/^x86_64/i386/'`
- machine=intel386
- machfile="m/${machine}.h"
- fi
-fi
# Extract the first word of "install-info", so it can be a program name with args.
set dummy install-info; ac_word=$2
@@ -8239,6 +7866,11 @@ with the \`--without-makeinfo' option to build without the manuals. " "$LINENO"
fi
+INFO_EXT=.info
+INFO_OPTS=--no-split
+
+
+
if test x$GCC = xyes; then
test "x$GCC_LINK_TEST_OPTIONS" != x && \
@@ -8281,11 +7913,6 @@ rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
-# The value of CPP is a quoted variable reference, so we need to do this
-# to get its actual value...
-CPP=`eval "echo $CPP"`
-
-
test "x$CANNOT_DUMP" = "x" && CANNOT_DUMP=no
case "$opsys" in
your-opsys-here) CANNOT_DUMP=yes ;;
@@ -8337,7 +7964,9 @@ case "$opsys" in
## Let `ld' find image libs and similar things in /usr/local/lib.
## The system compiler, GCC, has apparently been modified to not
## look there, contrary to what a stock GCC would do.
- LD_SWITCH_SYSTEM=-L/usr/local/lib
+### It's not our place to do this. See bug#10313#17.
+### LD_SWITCH_SYSTEM=-L/usr/local/lib
+ :
;;
gnu-linux)
@@ -8346,7 +7975,9 @@ case "$opsys" in
;;
netbsd)
- LD_SWITCH_SYSTEM="-Wl,-rpath,/usr/pkg/lib -L/usr/pkg/lib -Wl,-rpath,/usr/local/lib -L/usr/local/lib"
+### It's not our place to do this. See bug#10313#17.
+### LD_SWITCH_SYSTEM="-Wl,-rpath,/usr/pkg/lib -L/usr/pkg/lib -Wl,-rpath,/usr/local/lib -L/usr/local/lib"
+ :
;;
openbsd)
@@ -8359,7 +7990,7 @@ esac
ac_link="$ac_link $LD_SWITCH_SYSTEM"
-## This setting of LD_SWITCH_SYSTEM references LD_SWITCH_X_SITE_AUX,
+## This setting of LD_SWITCH_SYSTEM references LD_SWITCH_X_SITE_RPATH,
## which has not been defined yet. When this was handled with cpp,
## it was expanded to null when configure sourced the s/*.h file.
## Thus LD_SWITCH_SYSTEM had different values in configure and the Makefiles.
@@ -8371,13 +8002,13 @@ ac_link="$ac_link $LD_SWITCH_SYSTEM"
## LD_SWITCH_SYSTEM_TEMACS.
case "$opsys" in
netbsd|openbsd)
- ## _AUX_RPATH is like _AUX, but uses -rpath instead of -R.
- LD_SWITCH_SYSTEM="\$(LD_SWITCH_X_SITE_AUX_RPATH) $LD_SWITCH_SYSTEM" ;;
+ LD_SWITCH_SYSTEM="\$(LD_SWITCH_X_SITE_RPATH) $LD_SWITCH_SYSTEM" ;;
esac
C_SWITCH_MACHINE=
-if test "$machine" = "alpha"; then
+case $canonical in
+ alpha*)
ac_fn_c_check_decl "$LINENO" "__ELF__" "ac_cv_have_decl___ELF__" "$ac_includes_default"
if test "x$ac_cv_have_decl___ELF__" = x""yes; then :
@@ -8397,7 +8028,8 @@ fi
else
UNEXEC_OBJ=unexalpha.o
fi
-fi
+ ;;
+esac
@@ -9497,170 +9129,6 @@ _ACEOF
fi
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for function prototypes" >&5
-$as_echo_n "checking for function prototypes... " >&6; }
-if test "$ac_cv_prog_cc_c89" != no; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
-$as_echo "#define PROTOTYPES 1" >>confdefs.h
-
-
-$as_echo "#define __PROTOTYPES 1" >>confdefs.h
-
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
-$as_echo_n "checking for working volatile... " >&6; }
-if test "${ac_cv_c_volatile+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-
-volatile int x;
-int * volatile y = (int *) 0;
-return !x && !y;
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- ac_cv_c_volatile=yes
-else
- ac_cv_c_volatile=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_volatile" >&5
-$as_echo "$ac_cv_c_volatile" >&6; }
-if test $ac_cv_c_volatile = no; then
-
-$as_echo "#define volatile /**/" >>confdefs.h
-
-fi
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
-$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
-if test "${ac_cv_c_const+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-/* FIXME: Include the comments suggested by Paul. */
-#ifndef __cplusplus
- /* Ultrix mips cc rejects this. */
- typedef int charset[2];
- const charset cs;
- /* SunOS 4.1.1 cc rejects this. */
- char const *const *pcpcc;
- char **ppc;
- /* NEC SVR4.0.2 mips cc rejects this. */
- struct point {int x, y;};
- static struct point const zero = {0,0};
- /* AIX XL C 1.02.0.0 rejects this.
- It does not let you subtract one const X* pointer from another in
- an arm of an if-expression whose if-part is not a constant
- expression */
- const char *g = "string";
- pcpcc = &g + (g ? g-g : 0);
- /* HPUX 7.0 cc rejects these. */
- ++pcpcc;
- ppc = (char**) pcpcc;
- pcpcc = (char const *const *) ppc;
- { /* SCO 3.2v4 cc rejects this. */
- char *t;
- char const *s = 0 ? (char *) 0 : (char const *) 0;
-
- *t++ = 0;
- if (s) return 0;
- }
- { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
- int x[] = {25, 17};
- const int *foo = &x[0];
- ++foo;
- }
- { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
- typedef const int *iptr;
- iptr p = 0;
- ++p;
- }
- { /* AIX XL C 1.02.0.0 rejects this saying
- "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
- struct s { int j; const int *ap[3]; };
- struct s *b; b->j = 5;
- }
- { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
- const int foo = 10;
- if (!foo) return 0;
- }
- return !cs[0] && !zero.x;
-#endif
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- ac_cv_c_const=yes
-else
- ac_cv_c_const=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
-$as_echo "$ac_cv_c_const" >&6; }
-if test $ac_cv_c_const = no; then
-
-$as_echo "#define const /**/" >>confdefs.h
-
-fi
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for void * support" >&5
-$as_echo_n "checking for void * support... " >&6; }
-if test "${emacs_cv_void_star+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-void * foo;
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- emacs_cv_void_star=yes
-else
- emacs_cv_void_star=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_void_star" >&5
-$as_echo "$emacs_cv_void_star" >&6; }
-if test $emacs_cv_void_star = yes; then
- $as_echo "#define POINTER_TYPE void" >>confdefs.h
-
-else
- $as_echo "#define POINTER_TYPE char" >>confdefs.h
-
-fi
-
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
if test "${ac_cv_c_bigendian+set}" = set; then :
@@ -9994,10 +9462,8 @@ $as_echo "$ac_enable_autodepend" >&6; }
fi
if test $ac_enable_autodepend = yes; then
DEPFLAGS='-MMD -MF ${DEPDIR}/$*.d -MP'
- ## In parallel builds, another make might create depdir between
- ## the first test and mkdir, so stick another test on the end.
- ## Or use install-sh -d? mkdir -p is not portable.
- MKDEPDIR='test -d ${DEPDIR} || mkdir ${DEPDIR} || test -d ${DEPDIR}'
+ ## MKDIR_P is documented (see AC_PROG_MKDIR_P) to be parallel-safe.
+ MKDEPDIR='${MKDIR_P} ${DEPDIR}'
deps_frag=autodeps.mk
fi
fi
@@ -10253,13 +9719,11 @@ else
window_system=x11
fi
-LD_SWITCH_X_SITE_AUX=
-LD_SWITCH_X_SITE_AUX_RPATH=
+LD_SWITCH_X_SITE_RPATH=
if test "${x_libraries}" != NONE; then
if test -n "${x_libraries}"; then
LD_SWITCH_X_SITE=-L`echo ${x_libraries} | sed -e "s/:/ -L/g"`
- LD_SWITCH_X_SITE_AUX=-R`echo ${x_libraries} | sed -e "s/:/ -R/g"`
- LD_SWITCH_X_SITE_AUX_RPATH=`echo ${LD_SWITCH_X_SITE_AUX} | sed -e 's/-R/-Wl,-rpath,/'`
+ LD_SWITCH_X_SITE_RPATH=-Wl,-rpath,`echo ${x_libraries} | sed -e "s/:/ -Wl,-rpath,/g"`
fi
x_default_search_path=""
x_search_path=${x_libraries}
@@ -10284,7 +9748,6 @@ ${x_library}/X11/%T/%N%S"
fi
-
if test "${x_includes}" != NONE && test -n "${x_includes}"; then
C_SWITCH_X_SITE="$isystem"`echo ${x_includes} | sed -e "s/:/ $isystem/g"`
fi
@@ -10320,13 +9783,13 @@ if test "${with_ns}" != no; then
if test "${opsys}" = darwin; then
NS_IMPL_COCOA=yes
ns_appdir=`pwd`/nextstep/Emacs.app
- ns_appbindir=${ns_appdir}/Contents/MacOS/
+ ns_appbindir=${ns_appdir}/Contents/MacOS
ns_appresdir=${ns_appdir}/Contents/Resources
ns_appsrc=${srcdir}/nextstep/Cocoa/Emacs.base
elif test -f $GNUSTEP_CONFIG_FILE; then
NS_IMPL_GNUSTEP=yes
ns_appdir=`pwd`/nextstep/Emacs.app
- ns_appbindir=${ns_appdir}/
+ ns_appbindir=${ns_appdir}
ns_appresdir=${ns_appdir}/Resources
ns_appsrc=${srcdir}/nextstep/GNUstep/Emacs.base
GNUSTEP_SYSTEM_HEADERS="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_SYSTEM_HEADERS)"
@@ -10416,6 +9879,8 @@ $as_echo "#define NS_HAVE_NSINTEGER 1" >>confdefs.h
fi
+INSTALL_ARCH_INDEP_EXTRA=install-etc
+ns_self_contained=no
ns_frag=/dev/null
NS_OBJ=
NS_OBJC_OBJ=
@@ -10428,9 +9893,18 @@ if test "${HAVE_NS}" = yes; then
with_xft=no
# set up packaging dirs
if test "${EN_NS_SELF_CONTAINED}" = yes; then
+ ns_self_contained=yes
prefix=${ns_appresdir}
exec_prefix=${ns_appbindir}
- libexecdir=${ns_appbindir}/libexec
+ libexecdir="\${ns_appbindir}/libexec"
+ archlibdir="\${ns_appbindir}/libexec"
+ docdir="\${ns_appresdir}/etc"
+ etcdir="\${ns_appresdir}/etc"
+ infodir="\${ns_appresdir}/info"
+ mandir="\${ns_appresdir}/man"
+ lispdir="\${ns_appresdir}/lisp"
+ leimdir="\${ns_appresdir}/leim"
+ INSTALL_ARCH_INDEP_EXTRA=
fi
ns_frag=$srcdir/src/ns.mk
NS_OBJ="fontset.o fringe.o image.o"
@@ -10443,6 +9917,8 @@ CPPFLAGS="$tmp_CPPFLAGS"
+
+
case "${window_system}" in
x11 )
HAVE_X_WINDOWS=yes
@@ -10524,53 +10000,40 @@ case ${HAVE_X11} in
yes ) HAVE_MENUS=yes ;;
esac
-# Do the opsystem or machine files prohibit the use of the GNU malloc?
+# Does the opsystem file prohibit the use of the GNU malloc?
# Assume not, until told otherwise.
GNU_MALLOC=yes
-doug_lea_malloc=yes
-ac_fn_c_check_func "$LINENO" "malloc_get_state" "ac_cv_func_malloc_get_state"
-if test "x$ac_cv_func_malloc_get_state" = x""yes; then :
-
-else
- doug_lea_malloc=no
-fi
-
-ac_fn_c_check_func "$LINENO" "malloc_set_state" "ac_cv_func_malloc_set_state"
-if test "x$ac_cv_func_malloc_set_state" = x""yes; then :
-
-else
- doug_lea_malloc=no
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __after_morecore_hook exists" >&5
-$as_echo_n "checking whether __after_morecore_hook exists... " >&6; }
-if test "${emacs_cv_var___after_morecore_hook+set}" = set; then :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether malloc is Doug Lea style" >&5
+$as_echo_n "checking whether malloc is Doug Lea style... " >&6; }
+if test "${emacs_cv_var_doug_lea_malloc+set}" = set; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-extern void (* __after_morecore_hook)();
+#include <malloc.h>
+ static void hook (void) {}
int
main ()
{
-__after_morecore_hook = 0
+malloc_set_state (malloc_get_state ());
+ __after_morecore_hook = hook;
+ __malloc_initialize_hook = hook;
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
- emacs_cv_var___after_morecore_hook=yes
+ emacs_cv_var_doug_lea_malloc=yes
else
- emacs_cv_var___after_morecore_hook=no
+ emacs_cv_var_doug_lea_malloc=no
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_var___after_morecore_hook" >&5
-$as_echo "$emacs_cv_var___after_morecore_hook" >&6; }
-if test $emacs_cv_var___after_morecore_hook = no; then
- doug_lea_malloc=no
-fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_var_doug_lea_malloc" >&5
+$as_echo "$emacs_cv_var_doug_lea_malloc" >&6; }
+doug_lea_malloc=$emacs_cv_var_doug_lea_malloc
system_malloc=no
@@ -11102,9 +10565,9 @@ if test "${HAVE_X11}" = "yes"; then
CPPFLAGS="$C_SWITCH_X_SITE $CPPFLAGS"
# On Solaris, arrange for LD_RUN_PATH to point to the X libraries for tests.
- # This is handled by LD_SWITCH_X_SITE_AUX during the real build,
- # but it's more convenient here to set LD_RUN_PATH
- # since this also works on hosts that don't understand LD_SWITCH_X_SITE_AUX.
+ # This is handled by LD_SWITCH_X_SITE_RPATH during the real build,
+ # but it's more convenient here to set LD_RUN_PATH since this
+ # also works on hosts that don't understand LD_SWITCH_X_SITE_RPATH.
if test "${x_libraries}" != NONE && test -n "${x_libraries}"; then
LD_RUN_PATH=$x_libraries${LD_RUN_PATH+:}$LD_RUN_PATH
export LD_RUN_PATH
@@ -11209,7 +10672,7 @@ $as_echo "#define HAVE_XKBGETKEYBOARD 1" >>confdefs.h
fi
for ac_func in XrmSetDatabase XScreenResourceString \
-XScreenNumberOfScreen XSetWMProtocols
+XScreenNumberOfScreen
do :
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
@@ -11926,12 +11389,18 @@ $as_echo "no" >&6; }
$as_echo "#define HAVE_DBUS 1" >>confdefs.h
- for ac_func in dbus_watch_get_unix_fd
+ for ac_func in dbus_watch_get_unix_fd \
+ dbus_validate_bus_name \
+ dbus_validate_path \
+ dbus_validate_interface \
+ dbus_validate_member
do :
- ac_fn_c_check_func "$LINENO" "dbus_watch_get_unix_fd" "ac_cv_func_dbus_watch_get_unix_fd"
-if test "x$ac_cv_func_dbus_watch_get_unix_fd" = x""yes; then :
+ as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+eval as_val=\$$as_ac_var
+ if test "x$as_val" = x""yes; then :
cat >>confdefs.h <<_ACEOF
-#define HAVE_DBUS_WATCH_GET_UNIX_FD 1
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF
fi
@@ -14612,15 +14081,15 @@ esac
-for ac_func in gethostname getdomainname \
+for ac_func in gethostname \
rename closedir mkdir rmdir sysinfo getrusage get_current_dir_name \
-random lrand48 logb frexp fmod rint cbrt ftime setsid \
+random lrand48 logb frexp fmod rint cbrt setsid \
strerror fpathconf select euidaccess getpagesize tzset setlocale \
utimes getrlimit setrlimit setpgid getcwd getwd shutdown getaddrinfo \
-__fpending mblen mbrlen mbsinit strsignal setitimer ualarm \
-sendto recvfrom getsockopt setsockopt getsockname getpeername \
-gai_strerror mkstemp getline getdelim mremap fsync sync \
-difftime mempcpy mblen mbrlen posix_memalign \
+__fpending strsignal setitimer \
+sendto recvfrom getsockname getpeername \
+gai_strerror mkstemp getline getdelim fsync sync \
+difftime posix_memalign \
getpwent endpwent getgrent endgrent \
cfmakeraw cfsetspeed copysign __executable_start
do :
@@ -14825,7 +14294,7 @@ $as_echo_n "checking for library containing tputs... " >&6; }
# Maybe curses should be tried earlier?
# See http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9736#35
-for tputs_library in '' ncurses terminfo termcap curses; do
+for tputs_library in '' tinfo ncurses terminfo termcap curses; do
OLIBS=$LIBS
if test -z "$tputs_library"; then
LIBS_TERMCAP=
@@ -14886,42 +14355,28 @@ done
$as_echo "$msg" >&6; }
if test "X$msg" = Xno; then
as_fn_error "The required function \`tputs' was not found in any library.
-These libraries were tried: libncurses, libterminfo, libtermcap, libcurses.
+The following libraries were tried (in order):
+ libtinfo, libncurses, libterminfo, libtermcap, libcurses
Please try installing whichever of these libraries is most appropriate
for your system, together with its header files.
For example, a libncurses-dev(el) or similar package." "$LINENO" 5
fi
-# Must define this when any termcap library is found.
-
-$as_echo "#define HAVE_LIBNCURSES 1" >>confdefs.h
-## FIXME This was the cpp logic, but I am not sure it is right.
-## The above test has not necessarily found libncurses.
-HAVE_LIBNCURSES=yes
-
-## Use terminfo instead of termcap?
-## Note only system files NOT using terminfo are:
-## freebsd < 40000, ms-w32, msdos, netbsd < 599002500, and
-## darwin|gnu without ncurses.
-TERMINFO=no
+## Use termcap instead of terminfo?
+## Only true for: freebsd < 40000, ms-w32, msdos, netbsd < 599002500.
+TERMINFO=yes
+## FIXME? In the cases below where we unconditionally set
+## LIBS_TERMCAP="-lncurses", this overrides LIBS_TERMCAP = -ltinfo,
+## if that was found above to have tputs.
+## Should we use the gnu* logic everywhere?
case "$opsys" in
- ## cygwin: Fewer environment variables to go wrong, more terminal types.
- ## hpux10-20: Use the system provided termcap(3) library.
- ## openbsd: David Mazieres <dm@reeducation-labor.lcs.mit.edu> says this
- ## is necessary. Otherwise Emacs dumps core when run -nw.
- aix4-2|cygwin|hpux*|irix6-5|openbsd|sol2*|unixware) TERMINFO=yes ;;
-
## darwin: Prevents crashes when running Emacs in Terminal.app under 10.2.
## The ncurses library has been moved out of the System framework in
## Mac OS X 10.2. So if configure detects it, set the command-line
## option to use it.
- darwin|gnu*)
- ## (HAVE_LIBNCURSES was not always true, but is since 2010-03-18.)
- if test "x$HAVE_LIBNCURSES" = "xyes"; then
- TERMINFO=yes
- LIBS_TERMCAP="-lncurses"
- fi
- ;;
+ darwin) LIBS_TERMCAP="-lncurses" ;;
+
+ gnu*) test -z "$LIBS_TERMCAP" && LIBS_TERMCAP="-lncurses" ;;
freebsd)
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether FreeBSD is new enough to use terminfo" >&5
@@ -14957,34 +14412,29 @@ fi
$as_echo "$emacs_cv_freebsd_terminfo" >&6; }
if test $emacs_cv_freebsd_terminfo = yes; then
- TERMINFO=yes
LIBS_TERMCAP="-lncurses"
else
+ TERMINFO=no
LIBS_TERMCAP="-ltermcap"
fi
;;
netbsd)
- if test $ac_cv_search_tputs = -lterminfo; then
- TERMINFO=yes
- LIBS_TERMCAP="-lterminfo"
- else
+ if test "x$LIBS_TERMCAP" != "x-lterminfo"; then
+ TERMINFO=no
LIBS_TERMCAP="-ltermcap"
fi
;;
-esac
+ openbsd) LIBS_TERMCAP="-lncurses" ;;
-case "$opsys" in
## hpux: Make sure we get select from libc rather than from libcurses
## because libcurses on HPUX 10.10 has a broken version of select.
## We used to use -lc -lcurses, but this may be cleaner.
+ ## FIXME? But TERMINFO = yes on hpux (it used to be explicitly
+ # set that way, now it uses the default). Isn't this a contradiction?
hpux*) LIBS_TERMCAP="-ltermcap" ;;
- openbsd) LIBS_TERMCAP="-lncurses" ;;
-
- ## Must use system termcap, if we use any termcap. It does special things.
- sol2*) test "$TERMINFO" != yes && LIBS_TERMCAP="-ltermcap" ;;
esac
TERMCAP_OBJ=tparam.o
@@ -16311,6 +15761,7 @@ version=$PACKAGE_VERSION
+
## FIXME? Nothing uses @LD_SWITCH_X_SITE@.
## src/Makefile.in did add LD_SWITCH_X_SITE (as a cpp define) to the
## end of LIBX_BASE, but nothing ever set it.
@@ -16320,11 +15771,6 @@ version=$PACKAGE_VERSION
## Used in lwlib/Makefile.in.
-if test -n "${machfile}"; then
- M_FILE="\$(srcdir)/${machfile}"
-else
- M_FILE=
-fi
S_FILE="\$(srcdir)/${opsysfile}"
@@ -16335,7 +15781,6 @@ S_FILE="\$(srcdir)/${opsysfile}"
-
cat >>confdefs.h <<_ACEOF
#define EMACS_CONFIGURATION "${canonical}"
_ACEOF
@@ -16345,13 +15790,6 @@ cat >>confdefs.h <<_ACEOF
#define EMACS_CONFIG_OPTIONS "${ac_configure_args}"
_ACEOF
-if test -n "$machfile"; then
-
-cat >>confdefs.h <<_ACEOF
-#define config_machfile "${machfile}"
-_ACEOF
-
-fi
cat >>confdefs.h <<_ACEOF
#define config_opsysfile "${opsysfile}"
@@ -22368,6 +21806,7 @@ $as_echo "$gl_cv_next_unistd_h" >&6; }
+
gl_gnulib_enabled_dosname=false
gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36=false
gl_gnulib_enabled_pathmax=false
@@ -22850,8 +22289,7 @@ case "$opsys" in
## #ifndef LD_SWITCH_SYSTEM
## #if !defined (__GNUC__) && ((defined (BSD_SYSTEM) && !defined (COFF)))
## Since all the *bsds define LD_SWITCH_SYSTEM, this simplifies to:
- ## not using gcc, darwin system not on an alpha (ie darwin, since
- ## darwin + alpha does not occur).
+ ## not using gcc, darwin.
## Because this was done in src/Makefile.in, the resulting part of
## LD_SWITCH_SYSTEM was not used in configure (ie, in ac_link).
## It therefore seems cleaner to put this in LD_SWITCH_SYSTEM_TEMACS,
@@ -22860,13 +22298,14 @@ case "$opsys" in
LD_SWITCH_SYSTEM_TEMACS="-X $LD_SWITCH_SYSTEM_TEMACS"
;;
- ## LD_SWITCH_X_SITE_AUX is a -R option saying where to find X at run-time.
- ## When handled by cpp, this was in LD_SWITCH_SYSTEM. However, at
- ## the point where configure sourced the s/*.h file, LD_SWITCH_X_SITE_AUX
+ ## LD_SWITCH_X_SITE_RPATH is a -rpath option saying where to
+ ## find X at run-time.
+ ## When handled by cpp, this was in LD_SWITCH_SYSTEM. However, at the
+ ## point where configure sourced the s/*.h file, LD_SWITCH_X_SITE_RPATH
## had not yet been defined and was expanded to null. Hence LD_SWITCH_SYSTEM
## had different values in configure (in ac_link) and src/Makefile.in.
## It seems clearer therefore to put this piece in LD_SWITCH_SYSTEM_TEMACS.
- gnu*) LD_SWITCH_SYSTEM_TEMACS="\$(LD_SWITCH_X_SITE_AUX_RPATH)" ;;
+ gnu*) LD_SWITCH_SYSTEM_TEMACS="\$(LD_SWITCH_X_SITE_RPATH)" ;;
*) LD_SWITCH_SYSTEM_TEMACS= ;;
esac
@@ -22890,12 +22329,12 @@ case "$opsys" in
## will also work on earlier NetBSD releases.
netbsd|openbsd) LD_FIRSTFLAG="-nostartfiles" ;;
- ## macpcc: NAKAJI Hiroyuki <nakaji@tutrp.tut.ac.jp> says
+ ## powerpc*: NAKAJI Hiroyuki <nakaji@tutrp.tut.ac.jp> says
## MkLinux/LinuxPPC needs this.
- ## ibms390x only supports opsys = gnu-linux so it can be added here.
+ ## s390x-* only supports opsys = gnu-linux so it can be added here.
gnu-*)
- case "$machine" in
- macppc|ibms390x) LD_FIRSTFLAG="-nostdlib" ;;
+ case "$canonical" in
+ powerpc*|s390x-*) LD_FIRSTFLAG="-nostdlib" ;;
esac
;;
esac
@@ -22909,7 +22348,7 @@ $as_echo "#define ORDINARY_LINK 1" >>confdefs.h
## The system files defining neither ORDINARY_LINK nor LD_FIRSTFLAG are:
-## freebsd, gnu-* not on macppc|ibms390x.
+## freebsd, gnu-* not on powerpc*|s390x*.
elif test "x$GCC" = "xyes" && test "x$LD_FIRSTFLAG" = "x"; then
## Versions of GCC >= 2.0 put their library, libgcc.a, in obscure
@@ -22982,17 +22421,12 @@ if test "${HAVE_GTK}" = "yes"; then
USE_X_TOOLKIT=GTK
fi
-and_machfile=
-if test -n "$machfile"; then
- and_machfile=" and \`${machfile}'"
-fi
-
echo "
Configured for \`${canonical}'.
Where should the build process find the source code? ${srcdir}
- What operating system and machine description files should Emacs use?
- \`${opsysfile}'${and_machfile}
+ What operating system file should Emacs use?
+ \`${opsysfile}'
What compiler should emacs be built with? ${CC} ${CFLAGS}
Should Emacs use the GNU version of malloc? ${GNU_MALLOC}${GNU_MALLOC_reason}
Should Emacs use a relocating allocator for buffers? ${REL_ALLOC}
@@ -23907,7 +23341,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
# INIT-COMMANDS
#
AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
-GCC="$GCC" NON_GNU_CPP="$NON_GNU_CPP" CPP="$CPP" CPPFLAGS="$CPPFLAGS"
+GCC="$GCC" CPPFLAGS="$CPPFLAGS"
_ACEOF
diff --git a/update-subdirs b/build-aux/update-subdirs
index e20e0da6e13..e20e0da6e13 100755
--- a/update-subdirs
+++ b/build-aux/update-subdirs
diff --git a/configure.in b/configure.in
index c9592921e75..3a7e42965e8 100644
--- a/configure.in
+++ b/configure.in
@@ -37,6 +37,7 @@ dnl hence the single quotes. This is per the GNU coding standards, see
dnl (autoconf) Installation Directory Variables
dnl See also epaths.h below.
lispdir='${datadir}/emacs/${version}/lisp'
+leimdir='${datadir}/emacs/${version}/leim'
locallisppath='${datadir}/emacs/${version}/site-lisp:'\
'${datadir}/emacs/site-lisp'
lisppath='${locallisppath}:${lispdir}:${datadir}/emacs/${version}/leim'
@@ -374,8 +375,8 @@ case "${srcdir}" in
* ) srcdir="`(cd ${srcdir}; pwd)`" ;;
esac
-#### Given the configuration name, set machfile and opsysfile to the
-#### names of the m/*.h and s/*.h files we should use.
+#### Given the configuration name, set opsysfile to the
+#### name of s/*.h file we should use.
### Canonicalize the configuration name.
@@ -395,13 +396,11 @@ dnl quotation begins
### If you add support for a new configuration, add code to this
### switch statement to recognize your configuration name and select
-### the appropriate operating system and machine description files.
+### the appropriate operating system file.
-### You would hope that you could choose an m/*.h file pretty much
-### based on the machine portion of the configuration name, and an s/*.h
+### You would hope that you could choose an s/*.h
### file based on the operating system portion. However, it turns out
-### that each m/*.h file is pretty manufacturer-specific - for
-### example mips.h is MIPS
+### that each s/*.h file is pretty manufacturer-specific.
### So we basically have to have a special case for each
### configuration name.
###
@@ -411,95 +410,49 @@ dnl quotation begins
### prepared to handle anything reasonably. If version numbers
### matter, be sure /etc/MACHINES says something about it.
-machine='' opsys='' unported=no
+opsys='' unported=no
case "${canonical}" in
## GNU/Linux and similar ports
*-*-linux* )
opsys=gnu-linux
- case ${canonical} in
- alpha*) machine=alpha ;;
- s390x-*) machine=ibms390x ;;
- powerpc*) machine=macppc ;;
- sparc*) machine=sparc ;;
- ia64*) machine=ia64 ;;
- m68k*) machine=m68k ;;
- x86_64*) machine=amdx86-64 ;;
- esac
;;
## FreeBSD ports
*-*-freebsd* )
opsys=freebsd
- case "${canonical}" in
- alpha*) machine=alpha ;;
- amd64-*|x86_64-*) machine=amdx86-64 ;;
- ia64-*) machine=ia64 ;;
- i[3456]86-*) machine=intel386 ;;
- powerpc-*) machine=macppc ;;
- sparc-*) machine=sparc ;;
- sparc64-*) machine=sparc ;;
- esac
;;
## FreeBSD kernel + glibc based userland
*-*-kfreebsd*gnu* )
opsys=gnu-kfreebsd
- case "${canonical}" in
- alpha*) machine=alpha ;;
- amd64-*|x86_64-*) machine=amdx86-64 ;;
- ia64-*) machine=ia64 ;;
- i[3456]86-*) machine=intel386 ;;
- powerpc-*) machine=macppc ;;
- sparc-*) machine=sparc ;;
- sparc64-*) machine=sparc ;;
- esac
;;
## NetBSD ports
*-*-netbsd* )
opsys=netbsd
- case "${canonical}" in
- alpha*) machine=alpha ;;
- x86_64-*) machine=amdx86-64 ;;
- i[3456]86-*) machine=intel386 ;;
- m68k-*) machine=m68k ;;
- powerpc-*) machine=macppc ;;
- sparc*-) machine=sparc ;;
- vax-*) machine=vax ;;
- esac
;;
## OpenBSD ports
*-*-openbsd* )
opsys=openbsd
- case "${canonical}" in
- alpha*) machine=alpha ;;
- x86_64-*) machine=amdx86-64 ;;
- i386-*) machine=intel386 ;;
- powerpc-*) machine=macppc ;;
- sparc*) machine=sparc ;;
- vax-*) machine=vax ;;
- esac
;;
## Apple Darwin / Mac OS X
*-apple-darwin* )
case "${canonical}" in
- i[3456]86-* ) machine=intel386 ;;
- powerpc-* ) machine=macppc ;;
- x86_64-* ) machine=amdx86-64 ;;
+ i[3456]86-* ) ;;
+ powerpc-* ) ;;
+ x86_64-* ) ;;
* ) unported=yes ;;
esac
opsys=darwin
- # Define CPP as follows to make autoconf work correctly.
- CPP="${CC-cc} -E -no-cpp-precomp"
- # Use fink packages if available.
- if test -d /sw/include && test -d /sw/lib; then
- GCC_TEST_OPTIONS="-I/sw/include -L/sw/lib"
- CPP="${CPP} ${GCC_TEST_OPTIONS}"
- NON_GCC_TEST_OPTIONS=${GCC_TEST_OPTIONS}
- fi
+ ## Use fink packages if available.
+ ## FIXME find a better way to do this: http://debbugs.gnu.org/11507
+## if test -d /sw/include && test -d /sw/lib; then
+## GCC_TEST_OPTIONS="-I/sw/include -L/sw/lib"
+## NON_GCC_TEST_OPTIONS=${GCC_TEST_OPTIONS}
+## fi
;;
## HP 9000 series 700 and 800, running HP/UX
@@ -513,16 +466,16 @@ case "${canonical}" in
## IBM machines
rs6000-ibm-aix4.[23]* )
- machine=ibmrs6000 opsys=aix4-2
+ opsys=aix4-2
;;
powerpc-ibm-aix4.[23]* )
- machine=ibmrs6000 opsys=aix4-2
+ opsys=aix4-2
;;
rs6000-ibm-aix[56]* )
- machine=ibmrs6000 opsys=aix4-2
+ opsys=aix4-2
;;
powerpc-ibm-aix[56]* )
- machine=ibmrs6000 opsys=aix4-2
+ opsys=aix4-2
;;
## Silicon Graphics machines
@@ -532,7 +485,6 @@ case "${canonical}" in
# Without defining _LANGUAGE_C, things get masked out in the headers
# so that, for instance, grepping for `free' in stdlib.h fails and
# AC_HEADER_STD_C fails. (MIPSPro 7.2.1.2m compilers, Irix 6.5.3m).
- NON_GNU_CPP="/lib/cpp -D_LANGUAGE_C"
NON_GCC_TEST_OPTIONS="-D_LANGUAGE_C"
;;
@@ -541,26 +493,23 @@ case "${canonical}" in
| i[3456]86-*-solaris2* | i[3456]86-*-sunos5* \
| x86_64-*-solaris2* | x86_64-*-sunos5*)
case "${canonical}" in
- i[3456]86-*-* ) machine=intel386 ;;
- amd64-*-*|x86_64-*-*) machine=amdx86-64 ;;
- sparc* ) machine=sparc ;;
+ i[3456]86-*-* ) ;;
+ amd64-*-*|x86_64-*-*) ;;
+ sparc* ) ;;
* ) unported=yes ;;
esac
case "${canonical}" in
*-sunos5.6* | *-solaris2.6* )
opsys=sol2-6
- NON_GNU_CPP=/usr/ccs/lib/cpp
RANLIB="ar -ts"
;;
*-sunos5.[7-9]* | *-solaris2.[7-9]* )
opsys=sol2-6
emacs_check_sunpro_c=yes
- NON_GNU_CPP=/usr/ccs/lib/cpp
;;
*-sunos5* | *-solaris* )
opsys=sol2-10
emacs_check_sunpro_c=yes
- NON_GNU_CPP=/usr/ccs/lib/cpp
;;
esac
## Watch out for a compiler that we know will not work.
@@ -578,15 +527,12 @@ case "${canonical}" in
## Intel 386 machines where we don't care about the manufacturer.
i[3456]86-*-* )
- machine=intel386
case "${canonical}" in
*-cygwin ) opsys=cygwin ;;
- *-darwin* ) opsys=darwin
- CPP="${CC-cc} -E -no-cpp-precomp"
- ;;
- *-sysv4.2uw* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;;
- *-sysv5uw* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;;
- *-sysv5OpenUNIX* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;;
+ *-darwin* ) opsys=darwin ;;
+ *-sysv4.2uw* ) opsys=unixware ;;
+ *-sysv5uw* ) opsys=unixware ;;
+ *-sysv5OpenUNIX* ) opsys=unixware ;;
## Otherwise, we'll fall through to the generic opsys code at the bottom.
esac
;;
@@ -619,73 +565,24 @@ if test $unported = yes; then
Check `etc/MACHINES' for recognized configuration names.])
fi
-if test -n "$machine"; then
- machfile="m/${machine}.h"
-else
- machfile=
-fi
opsysfile="s/${opsys}.h"
#### Choose a compiler.
-test -n "$CC" && cc_specified=yes
-
-# Save the value of CFLAGS that the user specified.
-SPECIFIED_CFLAGS="$CFLAGS"
dnl Sets GCC=yes if using gcc.
AC_PROG_CC
AM_PROG_CC_C_O
-# Initialize gnulib right after verifying that the C compiler works.
-gl_EARLY
-
-# On Suns, sometimes $CPP names a directory.
-if test -n "$CPP" && test -d "$CPP"; then
- CPP=
-fi
-
-## If not using gcc, and on Solaris, and no CPP specified, see if
-## using a Sun compiler, which needs -Xs to prevent whitespace.
-if test x"$GCC" != xyes && test x"$emacs_check_sunpro_c" = xyes && \
- test x"$CPP" = x; then
- AC_MSG_CHECKING([whether we are using a Sun C compiler])
- AC_CACHE_VAL(emacs_cv_sunpro_c,
- [AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],
-[[#ifndef __SUNPRO_C
-fail;
-#endif
-]])], emacs_cv_sunpro_c=yes, emacs_cv_sunpro_c=no)])
- AC_MSG_RESULT($emacs_cv_sunpro_c)
-
- if test x"$emacs_cv_sunpro_c" = xyes; then
- NON_GNU_CPP="$CC -E -Xs"
- fi
-fi
-
-#### Some systems specify a CPP to use unless we are using GCC.
-#### Now that we know whether we are using GCC, we can decide whether
-#### to use that one.
-if test "x$NON_GNU_CPP" != x && test x$GCC != xyes && test "x$CPP" = x
-then
- CPP="$NON_GNU_CPP"
-fi
-
-#### Some systems specify a CC to use unless we are using GCC.
-#### Now that we know whether we are using GCC, we can decide whether
-#### to use that one.
-if test "x$NON_GNU_CC" != x && test x$GCC != xyes &&
- test x$cc_specified != xyes
-then
- CC="$NON_GNU_CC"
-fi
-
if test x$GCC = xyes; then
test "x$GCC_TEST_OPTIONS" != x && CC="$CC $GCC_TEST_OPTIONS"
else
test "x$NON_GCC_TEST_OPTIONS" != x && CC="$CC $NON_GCC_TEST_OPTIONS"
fi
+# Initialize gnulib right after choosing the compiler.
+gl_EARLY
+
AC_ARG_ENABLE([gcc-warnings],
[AS_HELP_STRING([--enable-gcc-warnings],
[turn on lots of GCC warnings (for developers)])],
@@ -737,7 +634,7 @@ else
AC_SUBST([WERROR_CFLAGS])
nw="$nw -Waggregate-return" # anachronistic
- nw="$nw -Wlong-long" # C90 is anachronistic (lib/gethrxtime.h)
+ nw="$nw -Wlong-long" # C90 is anachronistic
nw="$nw -Wc++-compat" # We don't care about C++ compilers
nw="$nw -Wundef" # Warns on '#if GNULIB_FOO' etc in gnulib
nw="$nw -Wtraditional" # Warns on #elif which we use often
@@ -803,27 +700,13 @@ fi
-#### Some other nice autoconf tests.
-
-dnl checks for programs
-AC_PROG_CPP
-AC_PROG_INSTALL
-if test "x$RANLIB" = x; then
- AC_PROG_RANLIB
-fi
-
-## Although we're running on an amd64 kernel, we're actually compiling for
-## the x86 architecture. The user should probably have provided an
-## explicit --build to `configure', but if everything else than the kernel
-## is running in i386 mode, we can help them out.
-if test "$machine" = "amdx86-64"; then
- AC_CHECK_DECL([i386])
- if test "$ac_cv_have_decl_i386" = "yes"; then
- canonical=`echo "$canonical" | sed -e 's/^amd64/i386/' -e 's/^x86_64/i386/'`
- machine=intel386
- machfile="m/${machine}.h"
- fi
-fi
+dnl Some other nice autoconf tests.
+dnl These are commented out, since gl_EARLY and/or Autoconf already does them.
+dnl AC_PROG_INSTALL
+dnl AC_PROG_MKDIR_P
+dnl if test "x$RANLIB" = x; then
+dnl AC_PROG_RANLIB
+dnl fi
AC_PATH_PROG(INSTALL_INFO, install-info)
AC_PATH_PROG(INSTALL_INFO, install-info,, /usr/sbin)
@@ -865,6 +748,12 @@ with the `--without-makeinfo' option to build without the manuals.] )
fi
AC_SUBST(HAVE_MAKEINFO)
+dnl Just so that there is only a single place we need to edit.
+INFO_EXT=.info
+INFO_OPTS=--no-split
+AC_SUBST(INFO_EXT)
+AC_SUBST(INFO_OPTS)
+
dnl Add our options to ac_link now, after it is set up.
if test x$GCC = xyes; then
@@ -895,11 +784,6 @@ AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])],
[AC_MSG_RESULT(no)])
-# The value of CPP is a quoted variable reference, so we need to do this
-# to get its actual value...
-CPP=`eval "echo $CPP"`
-
-
dnl The function dump-emacs will not be defined and temacs will do
dnl (load "loadup") automatically unless told otherwise.
test "x$CANNOT_DUMP" = "x" && CANNOT_DUMP=no
@@ -951,7 +835,9 @@ case "$opsys" in
## Let `ld' find image libs and similar things in /usr/local/lib.
## The system compiler, GCC, has apparently been modified to not
## look there, contrary to what a stock GCC would do.
- LD_SWITCH_SYSTEM=-L/usr/local/lib
+### It's not our place to do this. See bug#10313#17.
+### LD_SWITCH_SYSTEM=-L/usr/local/lib
+ :
;;
gnu-linux)
@@ -960,7 +846,9 @@ case "$opsys" in
;;
netbsd)
- LD_SWITCH_SYSTEM="-Wl,-rpath,/usr/pkg/lib -L/usr/pkg/lib -Wl,-rpath,/usr/local/lib -L/usr/local/lib"
+### It's not our place to do this. See bug#10313#17.
+### LD_SWITCH_SYSTEM="-Wl,-rpath,/usr/pkg/lib -L/usr/pkg/lib -Wl,-rpath,/usr/local/lib -L/usr/local/lib"
+ :
;;
openbsd)
@@ -973,7 +861,7 @@ AC_SUBST(LD_SWITCH_SYSTEM)
ac_link="$ac_link $LD_SWITCH_SYSTEM"
-## This setting of LD_SWITCH_SYSTEM references LD_SWITCH_X_SITE_AUX,
+## This setting of LD_SWITCH_SYSTEM references LD_SWITCH_X_SITE_RPATH,
## which has not been defined yet. When this was handled with cpp,
## it was expanded to null when configure sourced the s/*.h file.
## Thus LD_SWITCH_SYSTEM had different values in configure and the Makefiles.
@@ -985,13 +873,13 @@ ac_link="$ac_link $LD_SWITCH_SYSTEM"
## LD_SWITCH_SYSTEM_TEMACS.
case "$opsys" in
netbsd|openbsd)
- ## _AUX_RPATH is like _AUX, but uses -rpath instead of -R.
- LD_SWITCH_SYSTEM="\$(LD_SWITCH_X_SITE_AUX_RPATH) $LD_SWITCH_SYSTEM" ;;
+ LD_SWITCH_SYSTEM="\$(LD_SWITCH_X_SITE_RPATH) $LD_SWITCH_SYSTEM" ;;
esac
C_SWITCH_MACHINE=
-if test "$machine" = "alpha"; then
+case $canonical in
+ alpha*)
AC_CHECK_DECL([__ELF__])
if test "$ac_cv_have_decl___ELF__" = "yes"; then
## With ELF, make sure that all common symbols get allocated to in the
@@ -1007,7 +895,8 @@ if test "$machine" = "alpha"; then
else
UNEXEC_OBJ=unexalpha.o
fi
-fi
+ ;;
+esac
AC_SUBST(C_SWITCH_MACHINE)
AC_SUBST(UNEXEC_OBJ)
@@ -1405,27 +1294,6 @@ AC_CHECK_MEMBERS([struct ifreq.ifr_flags, struct ifreq.ifr_hwaddr,
#include <net/if.h>
#endif])
-dnl checks for compiler characteristics
-
-dnl Testing __STDC__ to determine prototype support isn't good enough.
-dnl DEC C, for instance, doesn't define it with default options, and
-dnl is used on 64-bit systems (OSF Alphas). Similarly for volatile
-dnl and void *.
-AC_C_PROTOTYPES
-AC_C_VOLATILE
-AC_C_CONST
-AC_CACHE_CHECK([for void * support], emacs_cv_void_star,
- [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [[void * foo;]])],
- emacs_cv_void_star=yes, emacs_cv_void_star=no)])
-if test $emacs_cv_void_star = yes; then
- AC_DEFINE(POINTER_TYPE, void)
-else
- AC_DEFINE(POINTER_TYPE, char)
-fi
-AH_TEMPLATE(POINTER_TYPE,
- [Define as `void' if your compiler accepts `void *'; otherwise
- define as `char'.])dnl
-
dnl Check for endianness.
AC_C_BIGENDIAN
@@ -1471,10 +1339,8 @@ if test "$GCC" = yes && test "$ac_enable_autodepend" = yes; then
fi
if test $ac_enable_autodepend = yes; then
DEPFLAGS='-MMD -MF ${DEPDIR}/$*.d -MP'
- ## In parallel builds, another make might create depdir between
- ## the first test and mkdir, so stick another test on the end.
- ## Or use install-sh -d? mkdir -p is not portable.
- MKDEPDIR='test -d ${DEPDIR} || mkdir ${DEPDIR} || test -d ${DEPDIR}'
+ ## MKDIR_P is documented (see AC_PROG_MKDIR_P) to be parallel-safe.
+ MKDEPDIR='${MKDIR_P} ${DEPDIR}'
deps_frag=autodeps.mk
fi
fi
@@ -1500,13 +1366,11 @@ else
window_system=x11
fi
-LD_SWITCH_X_SITE_AUX=
-LD_SWITCH_X_SITE_AUX_RPATH=
+LD_SWITCH_X_SITE_RPATH=
if test "${x_libraries}" != NONE; then
if test -n "${x_libraries}"; then
LD_SWITCH_X_SITE=-L`echo ${x_libraries} | sed -e "s/:/ -L/g"`
- LD_SWITCH_X_SITE_AUX=-R`echo ${x_libraries} | sed -e "s/:/ -R/g"`
- LD_SWITCH_X_SITE_AUX_RPATH=`echo ${LD_SWITCH_X_SITE_AUX} | sed -e 's/-R/-Wl,-rpath,/'`
+ LD_SWITCH_X_SITE_RPATH=-Wl,-rpath,`echo ${x_libraries} | sed -e "s/:/ -Wl,-rpath,/g"`
fi
x_default_search_path=""
x_search_path=${x_libraries}
@@ -1529,8 +1393,7 @@ ${x_library}/X11/%T/%N%S"
fi
done
fi
-AC_SUBST(LD_SWITCH_X_SITE_AUX)
-AC_SUBST(LD_SWITCH_X_SITE_AUX_RPATH)
+AC_SUBST(LD_SWITCH_X_SITE_RPATH)
if test "${x_includes}" != NONE && test -n "${x_includes}"; then
C_SWITCH_X_SITE="$isystem"`echo ${x_includes} | sed -e "s/:/ $isystem/g"`
@@ -1563,20 +1426,17 @@ CPPFLAGS="$CPPFLAGS -x objective-c"
CFLAGS="$CFLAGS -x objective-c"
TEMACS_LDFLAGS2="\${LDFLAGS}"
GNU_OBJC_CFLAGS=
-dnl I don't think it's especially important, but src/Makefile.in
-dnl (now the only user of ns_appdir) used to go to the trouble of adding a
-dnl trailing "/" to it, so now we do it here.
if test "${with_ns}" != no; then
if test "${opsys}" = darwin; then
NS_IMPL_COCOA=yes
ns_appdir=`pwd`/nextstep/Emacs.app
- ns_appbindir=${ns_appdir}/Contents/MacOS/
+ ns_appbindir=${ns_appdir}/Contents/MacOS
ns_appresdir=${ns_appdir}/Contents/Resources
ns_appsrc=${srcdir}/nextstep/Cocoa/Emacs.base
elif test -f $GNUSTEP_CONFIG_FILE; then
NS_IMPL_GNUSTEP=yes
ns_appdir=`pwd`/nextstep/Emacs.app
- ns_appbindir=${ns_appdir}/
+ ns_appbindir=${ns_appdir}
ns_appresdir=${ns_appdir}/Resources
ns_appsrc=${srcdir}/nextstep/GNUstep/Emacs.base
dnl FIXME sourcing this several times in subshells seems inefficient.
@@ -1630,6 +1490,8 @@ fail;
fi
AC_SUBST(TEMACS_LDFLAGS2)
+INSTALL_ARCH_INDEP_EXTRA=install-etc
+ns_self_contained=no
ns_frag=/dev/null
NS_OBJ=
NS_OBJC_OBJ=
@@ -1642,9 +1504,21 @@ if test "${HAVE_NS}" = yes; then
with_xft=no
# set up packaging dirs
if test "${EN_NS_SELF_CONTAINED}" = yes; then
+ ns_self_contained=yes
prefix=${ns_appresdir}
exec_prefix=${ns_appbindir}
- libexecdir=${ns_appbindir}/libexec
+ dnl This one isn't really used, only archlibdir is.
+ libexecdir="\${ns_appbindir}/libexec"
+ archlibdir="\${ns_appbindir}/libexec"
+ docdir="\${ns_appresdir}/etc"
+ etcdir="\${ns_appresdir}/etc"
+ dnl FIXME maybe set datarootdir instead.
+ dnl That would also get applications, icons, man.
+ infodir="\${ns_appresdir}/info"
+ mandir="\${ns_appresdir}/man"
+ lispdir="\${ns_appresdir}/lisp"
+ leimdir="\${ns_appresdir}/leim"
+ INSTALL_ARCH_INDEP_EXTRA=
fi
ns_frag=$srcdir/src/ns.mk
NS_OBJ="fontset.o fringe.o image.o"
@@ -1652,6 +1526,8 @@ if test "${HAVE_NS}" = yes; then
fi
CFLAGS="$tmp_CFLAGS"
CPPFLAGS="$tmp_CPPFLAGS"
+AC_SUBST(INSTALL_ARCH_INDEP_EXTRA)
+AC_SUBST(ns_self_contained)
AC_SUBST(NS_OBJ)
AC_SUBST(NS_OBJC_OBJ)
AC_SUBST(LIB_STANDARD)
@@ -1705,20 +1581,23 @@ case ${HAVE_X11} in
yes ) HAVE_MENUS=yes ;;
esac
-# Do the opsystem or machine files prohibit the use of the GNU malloc?
+# Does the opsystem file prohibit the use of the GNU malloc?
# Assume not, until told otherwise.
GNU_MALLOC=yes
-doug_lea_malloc=yes
-AC_CHECK_FUNC(malloc_get_state, ,doug_lea_malloc=no)
-AC_CHECK_FUNC(malloc_set_state, ,doug_lea_malloc=no)
-AC_CACHE_CHECK(whether __after_morecore_hook exists,
- emacs_cv_var___after_morecore_hook,
-[AC_LINK_IFELSE([AC_LANG_PROGRAM([[extern void (* __after_morecore_hook)();]],[[__after_morecore_hook = 0]])],
- emacs_cv_var___after_morecore_hook=yes,
- emacs_cv_var___after_morecore_hook=no)])
-if test $emacs_cv_var___after_morecore_hook = no; then
- doug_lea_malloc=no
-fi
+
+AC_CACHE_CHECK(
+ [whether malloc is Doug Lea style],
+ [emacs_cv_var_doug_lea_malloc],
+ [AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <malloc.h>
+ static void hook (void) {}]],
+ [[malloc_set_state (malloc_get_state ());
+ __after_morecore_hook = hook;
+ __malloc_initialize_hook = hook;]])],
+ [emacs_cv_var_doug_lea_malloc=yes],
+ [emacs_cv_var_doug_lea_malloc=no])])
+doug_lea_malloc=$emacs_cv_var_doug_lea_malloc
dnl See comments in aix4-2.h about maybe using system malloc there.
@@ -1855,9 +1734,9 @@ if test "${HAVE_X11}" = "yes"; then
CPPFLAGS="$C_SWITCH_X_SITE $CPPFLAGS"
# On Solaris, arrange for LD_RUN_PATH to point to the X libraries for tests.
- # This is handled by LD_SWITCH_X_SITE_AUX during the real build,
- # but it's more convenient here to set LD_RUN_PATH
- # since this also works on hosts that don't understand LD_SWITCH_X_SITE_AUX.
+ # This is handled by LD_SWITCH_X_SITE_RPATH during the real build,
+ # but it's more convenient here to set LD_RUN_PATH since this
+ # also works on hosts that don't understand LD_SWITCH_X_SITE_RPATH.
if test "${x_libraries}" != NONE && test -n "${x_libraries}"; then
LD_RUN_PATH=$x_libraries${LD_RUN_PATH+:}$LD_RUN_PATH
export LD_RUN_PATH
@@ -1911,7 +1790,7 @@ if test "${HAVE_X11}" = "yes"; then
fi
AC_CHECK_FUNCS(XrmSetDatabase XScreenResourceString \
-XScreenNumberOfScreen XSetWMProtocols)
+XScreenNumberOfScreen)
fi
if test "${window_system}" = "x11"; then
@@ -2076,8 +1955,7 @@ if test "${HAVE_GTK}" = "yes"; then
fi
dnl D-Bus has been tested under GNU/Linux only. Must be adapted for
-dnl other platforms. Support for higher D-Bus versions than 1.0 is
-dnl also not configured.
+dnl other platforms.
HAVE_DBUS=no
DBUS_OBJ=
if test "${with_dbus}" = "yes"; then
@@ -2085,7 +1963,13 @@ if test "${with_dbus}" = "yes"; then
if test "$HAVE_DBUS" = yes; then
LIBS="$LIBS $DBUS_LIBS"
AC_DEFINE(HAVE_DBUS, 1, [Define to 1 if using D-Bus.])
- AC_CHECK_FUNCS([dbus_watch_get_unix_fd])
+ dnl dbus_watch_get_unix_fd has been introduced in D-Bus 1.1.1.
+ dnl dbus_validate_* have been introduced in D-Bus 1.5.12.
+ AC_CHECK_FUNCS(dbus_watch_get_unix_fd \
+ dbus_validate_bus_name \
+ dbus_validate_path \
+ dbus_validate_interface \
+ dbus_validate_member)
DBUS_OBJ=dbusbind.o
fi
fi
@@ -2806,15 +2690,15 @@ esac
AC_SUBST(BLESSMAIL_TARGET)
-AC_CHECK_FUNCS(gethostname getdomainname \
+AC_CHECK_FUNCS(gethostname \
rename closedir mkdir rmdir sysinfo getrusage get_current_dir_name \
-random lrand48 logb frexp fmod rint cbrt ftime setsid \
+random lrand48 logb frexp fmod rint cbrt setsid \
strerror fpathconf select euidaccess getpagesize tzset setlocale \
utimes getrlimit setrlimit setpgid getcwd getwd shutdown getaddrinfo \
-__fpending mblen mbrlen mbsinit strsignal setitimer ualarm \
-sendto recvfrom getsockopt setsockopt getsockname getpeername \
-gai_strerror mkstemp getline getdelim mremap fsync sync \
-difftime mempcpy mblen mbrlen posix_memalign \
+__fpending strsignal setitimer \
+sendto recvfrom getsockname getpeername \
+gai_strerror mkstemp getline getdelim fsync sync \
+difftime posix_memalign \
getpwent endpwent getgrent endgrent \
cfmakeraw cfsetspeed copysign __executable_start)
@@ -2864,7 +2748,7 @@ AC_DEFUN([tputs_link_source], [
])
# Maybe curses should be tried earlier?
# See http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9736#35
-for tputs_library in '' ncurses terminfo termcap curses; do
+for tputs_library in '' tinfo ncurses terminfo termcap curses; do
OLIBS=$LIBS
if test -z "$tputs_library"; then
LIBS_TERMCAP=
@@ -2884,41 +2768,28 @@ done
AC_MSG_RESULT([$msg])
if test "X$msg" = Xno; then
AC_MSG_ERROR([The required function `tputs' was not found in any library.
-These libraries were tried: libncurses, libterminfo, libtermcap, libcurses.
+The following libraries were tried (in order):
+ libtinfo, libncurses, libterminfo, libtermcap, libcurses
Please try installing whichever of these libraries is most appropriate
for your system, together with its header files.
For example, a libncurses-dev(el) or similar package.])
fi
-# Must define this when any termcap library is found.
-AC_DEFINE(HAVE_LIBNCURSES, 1,
- [Define to 1 if you have the `ncurses' library (-lncurses).])
-## FIXME This was the cpp logic, but I am not sure it is right.
-## The above test has not necessarily found libncurses.
-HAVE_LIBNCURSES=yes
-
-## Use terminfo instead of termcap?
-## Note only system files NOT using terminfo are:
-## freebsd < 40000, ms-w32, msdos, netbsd < 599002500, and
-## darwin|gnu without ncurses.
-TERMINFO=no
-case "$opsys" in
- ## cygwin: Fewer environment variables to go wrong, more terminal types.
- ## hpux10-20: Use the system provided termcap(3) library.
- ## openbsd: David Mazieres <dm@reeducation-labor.lcs.mit.edu> says this
- ## is necessary. Otherwise Emacs dumps core when run -nw.
- aix4-2|cygwin|hpux*|irix6-5|openbsd|sol2*|unixware) TERMINFO=yes ;;
+## Use termcap instead of terminfo?
+## Only true for: freebsd < 40000, ms-w32, msdos, netbsd < 599002500.
+TERMINFO=yes
+## FIXME? In the cases below where we unconditionally set
+## LIBS_TERMCAP="-lncurses", this overrides LIBS_TERMCAP = -ltinfo,
+## if that was found above to have tputs.
+## Should we use the gnu* logic everywhere?
+case "$opsys" in
## darwin: Prevents crashes when running Emacs in Terminal.app under 10.2.
## The ncurses library has been moved out of the System framework in
## Mac OS X 10.2. So if configure detects it, set the command-line
## option to use it.
- darwin|gnu*)
- ## (HAVE_LIBNCURSES was not always true, but is since 2010-03-18.)
- if test "x$HAVE_LIBNCURSES" = "xyes"; then
- TERMINFO=yes
- LIBS_TERMCAP="-lncurses"
- fi
- ;;
+ darwin) LIBS_TERMCAP="-lncurses" ;;
+
+ gnu*) test -z "$LIBS_TERMCAP" && LIBS_TERMCAP="-lncurses" ;;
freebsd)
AC_MSG_CHECKING([whether FreeBSD is new enough to use terminfo])
@@ -2932,34 +2803,29 @@ fail;
AC_MSG_RESULT($emacs_cv_freebsd_terminfo)
if test $emacs_cv_freebsd_terminfo = yes; then
- TERMINFO=yes
LIBS_TERMCAP="-lncurses"
else
+ TERMINFO=no
LIBS_TERMCAP="-ltermcap"
fi
;;
netbsd)
- if test $ac_cv_search_tputs = -lterminfo; then
- TERMINFO=yes
- LIBS_TERMCAP="-lterminfo"
- else
+ if test "x$LIBS_TERMCAP" != "x-lterminfo"; then
+ TERMINFO=no
LIBS_TERMCAP="-ltermcap"
fi
;;
-esac
+ openbsd) LIBS_TERMCAP="-lncurses" ;;
-case "$opsys" in
## hpux: Make sure we get select from libc rather than from libcurses
## because libcurses on HPUX 10.10 has a broken version of select.
## We used to use -lc -lcurses, but this may be cleaner.
+ ## FIXME? But TERMINFO = yes on hpux (it used to be explicitly
+ # set that way, now it uses the default). Isn't this a contradiction?
hpux*) LIBS_TERMCAP="-ltermcap" ;;
- openbsd) LIBS_TERMCAP="-lncurses" ;;
-
- ## Must use system termcap, if we use any termcap. It does special things.
- sol2*) test "$TERMINFO" != yes && LIBS_TERMCAP="-ltermcap" ;;
esac
TERMCAP_OBJ=tparam.o
@@ -3273,6 +3139,7 @@ AC_SUBST(libexecdir)
AC_SUBST(mandir)
AC_SUBST(infodir)
AC_SUBST(lispdir)
+AC_SUBST(leimdir)
AC_SUBST(locallisppath)
AC_SUBST(lisppath)
AC_SUBST(x_default_search_path)
@@ -3291,13 +3158,7 @@ AC_SUBST(GNUSTEP_CFLAGS)
AC_SUBST(CFLAGS)
## Used in lwlib/Makefile.in.
AC_SUBST(X_TOOLKIT_TYPE)
-if test -n "${machfile}"; then
- M_FILE="\$(srcdir)/${machfile}"
-else
- M_FILE=
-fi
S_FILE="\$(srcdir)/${opsysfile}"
-AC_SUBST(M_FILE)
AC_SUBST(S_FILE)
AC_SUBST(ns_appdir)
AC_SUBST(ns_appbindir)
@@ -3310,10 +3171,6 @@ AC_DEFINE_UNQUOTED(EMACS_CONFIGURATION, "${canonical}",
[Define to the canonical Emacs configuration name.])
AC_DEFINE_UNQUOTED(EMACS_CONFIG_OPTIONS, "${ac_configure_args}",
[Define to the options passed to configure.])
-if test -n "$machfile"; then
- AC_DEFINE_UNQUOTED(config_machfile, "${machfile}",
- [Define to the used machine dependent file.])
-fi
AC_DEFINE_UNQUOTED(config_opsysfile, "${opsysfile}",
[Define to the used os dependent file.])
@@ -3492,8 +3349,7 @@ case "$opsys" in
## #ifndef LD_SWITCH_SYSTEM
## #if !defined (__GNUC__) && ((defined (BSD_SYSTEM) && !defined (COFF)))
## Since all the *bsds define LD_SWITCH_SYSTEM, this simplifies to:
- ## not using gcc, darwin system not on an alpha (ie darwin, since
- ## darwin + alpha does not occur).
+ ## not using gcc, darwin.
## Because this was done in src/Makefile.in, the resulting part of
## LD_SWITCH_SYSTEM was not used in configure (ie, in ac_link).
## It therefore seems cleaner to put this in LD_SWITCH_SYSTEM_TEMACS,
@@ -3502,13 +3358,14 @@ case "$opsys" in
LD_SWITCH_SYSTEM_TEMACS="-X $LD_SWITCH_SYSTEM_TEMACS"
;;
- ## LD_SWITCH_X_SITE_AUX is a -R option saying where to find X at run-time.
- ## When handled by cpp, this was in LD_SWITCH_SYSTEM. However, at
- ## the point where configure sourced the s/*.h file, LD_SWITCH_X_SITE_AUX
+ ## LD_SWITCH_X_SITE_RPATH is a -rpath option saying where to
+ ## find X at run-time.
+ ## When handled by cpp, this was in LD_SWITCH_SYSTEM. However, at the
+ ## point where configure sourced the s/*.h file, LD_SWITCH_X_SITE_RPATH
## had not yet been defined and was expanded to null. Hence LD_SWITCH_SYSTEM
## had different values in configure (in ac_link) and src/Makefile.in.
## It seems clearer therefore to put this piece in LD_SWITCH_SYSTEM_TEMACS.
- gnu*) LD_SWITCH_SYSTEM_TEMACS="\$(LD_SWITCH_X_SITE_AUX_RPATH)" ;;
+ gnu*) LD_SWITCH_SYSTEM_TEMACS="\$(LD_SWITCH_X_SITE_RPATH)" ;;
*) LD_SWITCH_SYSTEM_TEMACS= ;;
esac
@@ -3532,12 +3389,12 @@ case "$opsys" in
## will also work on earlier NetBSD releases.
netbsd|openbsd) LD_FIRSTFLAG="-nostartfiles" ;;
- ## macpcc: NAKAJI Hiroyuki <nakaji@tutrp.tut.ac.jp> says
+ ## powerpc*: NAKAJI Hiroyuki <nakaji@tutrp.tut.ac.jp> says
## MkLinux/LinuxPPC needs this.
- ## ibms390x only supports opsys = gnu-linux so it can be added here.
+ ## s390x-* only supports opsys = gnu-linux so it can be added here.
gnu-*)
- case "$machine" in
- macppc|ibms390x) LD_FIRSTFLAG="-nostdlib" ;;
+ case "$canonical" in
+ powerpc*|s390x-*) LD_FIRSTFLAG="-nostdlib" ;;
esac
;;
esac
@@ -3549,7 +3406,7 @@ if test "x$ORDINARY_LINK" = "xyes"; then
AC_DEFINE(ORDINARY_LINK, 1, [Define if the C compiler is the linker.])
## The system files defining neither ORDINARY_LINK nor LD_FIRSTFLAG are:
-## freebsd, gnu-* not on macppc|ibms390x.
+## freebsd, gnu-* not on powerpc*|s390x*.
elif test "x$GCC" = "xyes" && test "x$LD_FIRSTFLAG" = "x"; then
## Versions of GCC >= 2.0 put their library, libgcc.a, in obscure
@@ -3657,11 +3514,8 @@ AH_BOTTOM([
#define subprocesses
-/* Include the os and machine dependent files. */
+/* Include the os dependent file. */
#include config_opsysfile
-#ifdef config_machfile
-# include config_machfile
-#endif
/* GNUstep needs a bit more pure memory. Of the existing knobs,
SYSTEM_PURESIZE_EXTRA seems like the least likely to cause problems.
@@ -3685,38 +3539,6 @@ AH_BOTTOM([
#endif
#endif
-/* These default definitions are good for almost all machines.
- Any exceptions should override them in m/MACHINE.h.
- They must be usable in preprocessor conditionals. */
-
-#ifndef BITS_PER_CHAR
-#define BITS_PER_CHAR 8
-#endif
-
-#ifndef BITS_PER_SHORT
-#define BITS_PER_SHORT 16
-#endif
-
-#ifndef BITS_PER_INT
-#define BITS_PER_INT 32
-#endif
-
-#ifndef BITS_PER_LONG
-#ifdef _LP64
-#define BITS_PER_LONG 64
-#else
-#define BITS_PER_LONG 32
-#endif
-#endif
-
-#if !defined BITS_PER_LONG_LONG && HAVE_LONG_LONG_INT
-#define BITS_PER_LONG_LONG 64
-#endif
-
-/* Define if the compiler supports function prototypes. It may do so but
- not define __STDC__ (e.g. DEC C by default) or may define it as zero. */
-#undef PROTOTYPES
-
#include <string.h>
#include <stdlib.h>
@@ -3784,17 +3606,12 @@ if test "${HAVE_GTK}" = "yes"; then
USE_X_TOOLKIT=GTK
fi
-and_machfile=
-if test -n "$machfile"; then
- and_machfile=" and \`${machfile}'"
-fi
-
echo "
Configured for \`${canonical}'.
Where should the build process find the source code? ${srcdir}
- What operating system and machine description files should Emacs use?
- \`${opsysfile}'${and_machfile}
+ What operating system file should Emacs use?
+ \`${opsysfile}'
What compiler should emacs be built with? ${CC} ${CFLAGS}
Should Emacs use the GNU version of malloc? ${GNU_MALLOC}${GNU_MALLOC_reason}
Should Emacs use a relocating allocator for buffers? ${REL_ALLOC}
@@ -3938,7 +3755,7 @@ dnl the use of force in the `epaths-force' rule in Makefile.in.
AC_CONFIG_COMMANDS([epaths], [
echo creating src/epaths.h
${MAKE-make} epaths-force
-], [GCC="$GCC" NON_GNU_CPP="$NON_GNU_CPP" CPP="$CPP" CPPFLAGS="$CPPFLAGS"])
+], [GCC="$GCC" CPPFLAGS="$CPPFLAGS"])
AC_CONFIG_COMMANDS([gdbinit], [
if test ! -f src/.gdbinit && test -f $srcdir/src/.gdbinit; then
diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog
index 63ccb880d40..97707118b65 100644
--- a/doc/emacs/ChangeLog
+++ b/doc/emacs/ChangeLog
@@ -1,3 +1,112 @@
+2012-05-22 Glenn Morris <rgm@gnu.org>
+
+ * emacs.texi (Acknowledgments): Add another contributor.
+
+2012-05-12 Glenn Morris <rgm@gnu.org>
+
+ * Makefile.in (MKDIR_P): New, set by configure.
+ (mkinfodir): Use $MKDIR_P.
+
+2012-05-10 Glenn Morris <rgm@gnu.org>
+
+ * mule.texi (Disabling Multibyte): Replace the obsolete "unibyte: t"
+ with "coding: raw-text".
+
+ * files.texi (Interlocking): Mention create-lockfiles option.
+
+2012-05-09 Chong Yidong <cyd@gnu.org>
+
+ * frames.texi (Mouse References, Mouse Commands): Fix index
+ entries (Bug#11362).
+
+2012-05-05 Glenn Morris <rgm@gnu.org>
+
+ * custom.texi (Customization Groups, Custom Themes, Examining):
+ Improve page breaks.
+
+ * rmail.texi (Rmail Display): Use example rather than smallexample.
+
+ * calendar.texi: Convert inforefs to refs.
+
+ * dired.texi (Dired Enter): Improve page break.
+
+ * abbrevs.texi (Abbrev Concepts): Copyedits.
+
+ * maintaining.texi (Registering, Tag Syntax):
+ Tweak line and page breaks.
+
+ * programs.texi (Programs, Electric C): Copyedits.
+ (Program Modes): Add xref to Fortran.
+ (Left Margin Paren): Remove what was (oddly enough) the only use
+ of defvar in the entire Emacs manual.
+ (Hungry Delete): Remove footnote about ancient Emacs version.
+ (Other C Commands): Use example rather than smallexample.
+
+ * text.texi (Pages, Filling, Foldout, Org Mode, HTML Mode)
+ (Nroff Mode, Enriched Indentation, Table Rows and Columns):
+ Tweak line and page breaks.
+
+ * modes.texi (Major Modes, Minor Modes): Reword to improve page-breaks.
+ (Major Modes): Use example rather than smallexample.
+
+ * mule.texi (Output Coding): Reword to improve page-breaks.
+
+ * frames.texi (Fonts): Tweak line and page breaks.
+ Use example rather than smallexample. Change cross-reference.
+ (Text-Only Mouse): Fix xref.
+
+ * buffers.texi (Buffers, Kill Buffer, Several Buffers)
+ (Indirect Buffers): Tweak line- and page-breaks.
+
+ * fixit.texi (Fixit, Undo): Reword to improve page-breaks.
+
+2012-05-04 Glenn Morris <rgm@gnu.org>
+
+ * Makefile.in (INFO_EXT, INFO_OPTS): New, set by configure.
+ (info, infoclean): Use $INFO_EXT.
+ ($(infodir)/emacs$(INFO_EXT)): Use $INFO_EXT and $INFO_OPT.
+ * makefile.w32-in (INFO_EXT, INFO_OPTS): New.
+ (INFO_TARGETS): Use $INFO_EXT.
+ ($(infodir)/emacs$(INFO_EXT)): Use $INFO_EXT and $INFO_OPT, and -o.
+
+2012-05-02 Glenn Morris <rgm@gnu.org>
+
+ * emacs.texi (@copying): Only print EDITION in the TeX version.
+
+ * search.texi (Regexp Search): Just say "Emacs".
+
+ * display.texi (Auto Scrolling):
+ Reword to avoid repetition and improve page break.
+
+ * xresources.texi (Resources):
+ * mule.texi (Language Environments):
+ * misc.texi (Amusements):
+ * maintaining.texi (VC Change Log):
+ * frames.texi (Fonts):
+ * custom.texi (Specifying File Variables, Minibuffer Maps):
+ * cmdargs.texi (Initial Options):
+ * building.texi (Flymake):
+ Reword to remove/reduce some overly long/short lines.
+
+2012-04-27 Glenn Morris <rgm@gnu.org>
+
+ * emacs.texi: Some fixes for detailed menu.
+
+ * emacs.texi: Add "et al." to authors.
+
+ * ack.texi, basic.texi, buffers.texi, building.texi:
+ * calendar.texi, cmdargs.texi, commands.texi, custom.texi:
+ * dired.texi, display.texi, emerge-xtra.texi, files.texi:
+ * fortran-xtra.texi, help.texi, kmacro.texi, mini.texi, misc.texi:
+ * msdog-xtra.texi, picture-xtra.texi, programs.texi, rmail.texi:
+ * search.texi, trouble.texi, windows.texi:
+ Use Texinfo recommended convention for quotes+punctuation.
+
+2012-04-27 Eli Zaretskii <eliz@gnu.org>
+
+ * mule.texi (Bidirectional Editing): Improve indexing.
+ Minor wording tweaks.
+
2012-04-15 Chong Yidong <cyd@gnu.org>
* misc.texi (emacsclient Options): More clarifications.
@@ -58,7 +167,7 @@
(Input Methods): Copyedits. Use "^" for the postfix example,
because it is less confusing inside Info's `quotes'.
- * custom.texi (Specifying File Variables): Fix "unibyte" description.
+ * custom.texi (Specifying File Variables): Fix "unibyte" description.
Update for "Disabling Multibyte" node name change.
* emacs.texi: Update for "Disabling Multibyte" node name change.
@@ -391,7 +500,7 @@
2012-01-09 Chong Yidong <cyd@gnu.org>
- * custom.texi (Custom Themes): Switched custom-safe-themes to use
+ * custom.texi (Custom Themes): Switch custom-safe-themes to use
SHA-256.
2012-01-07 Chong Yidong <cyd@gnu.org>
@@ -408,8 +517,8 @@
(Screen Garbled): Don't refer to terminal "manufacturers".
(Total Frustration): Node deleted. Eliza is documented in
Amusements now.
- (Known Problems): More info about using the bug tracker. Mention
- debbugs package.
+ (Known Problems): More info about using the bug tracker.
+ Mention debbugs package.
(Bug Criteria): Copyedits.
(Understanding Bug Reporting): Mention emacs -Q.
@@ -472,8 +581,8 @@
Document browse-url-mailto-function.
(Goto Address mode): Add index entries. Add xref to Browse-URL.
(FFAP): FFAP is not a minor mode.
- (Amusements): M-x lm was renamed to M-x landmark. Document
- nato-region.
+ (Amusements): M-x lm was renamed to M-x landmark.
+ Document nato-region.
2012-01-01 Chong Yidong <cyd@gnu.org>
@@ -511,8 +620,8 @@
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.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.
@@ -555,8 +664,8 @@
* 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.
+ (General VC Options): De-document vc-keep-workfiles.
+ Fix RCS-isms.
2011-12-22 Eli Zaretskii <eliz@gnu.org>
@@ -572,8 +681,8 @@
* 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.
+ (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
@@ -626,11 +735,11 @@
less CVS-specific.
(VC With A Merging VCS, VC With A Locking VCS): Add xref to
Registering node.
- (Secondary VC Commands): Deleted. Promote subnodes.
+ (Secondary VC Commands): Delete. 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.
+ (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.
@@ -655,8 +764,8 @@
(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.
+ (External Lisp): Fix name of inferior Lisp buffer.
+ Mention Scheme.
(Compilation): Define "inferior process".
2011-12-10 Eli Zaretskii <eliz@gnu.org>
@@ -671,8 +780,8 @@
(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.
+ (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.
@@ -680,8 +789,8 @@
(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.
+ 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.
@@ -711,8 +820,8 @@
* 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.
+ 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.
@@ -744,12 +853,12 @@
(TeX Editing): Add xref to documentation for Occur.
(LaTeX Editing): Add xref to Completion node.
(TeX Print): Fix description of tex-directory.
- (Enriched Text): Renamed from Formatted Text. Make this node and
+ (Enriched Text): Rename from Formatted Text. Make this node and
its subnodes less verbose, since text/enriched files are
practically unused.
- (Enriched Mode): Renamed from Requesting Formatted Text.
+ (Enriched Mode): Rename from Requesting Formatted Text.
(Format Colors): Node deleted.
- (Enriched Faces): Renamed from Format Faces. Describe commands
+ (Enriched Faces): Rename from Format Faces. Describe commands
for applying colors too.
(Forcing Enriched Mode): Node deleted; merged into Enriched Mode.
@@ -984,12 +1093,12 @@
2011-10-18 Chong Yidong <cyd@gnu.org>
* display.texi (Faces): Simplify discussion. Move documentation
- of list-faces-display here, from Standard Faces node. Note
- special role of `default' background.
- (Standard Faces): Note special role of `default' background. Note
- that region face may be taken fom GTK. Add xref to Text Display.
- (Text Scale): Rename from "Temporary Face Changes". Callers
- changed. Don't bother documenting variable-pitch-mode.
+ of list-faces-display here, from Standard Faces node.
+ Note special role of `default' background.
+ (Standard Faces): Note special role of `default' background.
+ Note that region face may be taken fom GTK. Add xref to Text Display.
+ (Text Scale): Rename from "Temporary Face Changes".
+ Callers changed. Don't bother documenting variable-pitch-mode.
(Font Lock): Copyedits. Remove font-lock-maximum-size.
(Useless Whitespace): Simplify description of
delete-trailing-whitespace. Note active region case.
@@ -1011,8 +1120,8 @@
2011-10-13 Chong Yidong <cyd@stupidchicken.com>
- * killing.texi (Deletion): Add xref to Using Region. Document
- delete-forward-char.
+ * killing.texi (Deletion): Add xref to Using Region.
+ Document delete-forward-char.
(Yanking): Move yank-excluded-properties to Lisp manual. Move C-y
description here. Recommend C-u C-SPC for jumping to mark.
(Kill Ring): Move kill ring variable documentation here.
@@ -1032,10 +1141,10 @@
selection changes. Mention that commands like C-y set the mark.
(Marking Objects): Add xref to Words node. Note that mark-word
and mark-sexp also have the "extend region" behavior.
- (Using Region): Mention M-$ in the table. Document
- mark-even-if-inactive here instead of in Mark Ring.
- (Mark Ring): Move mark-even-if-inactive to Using Region. Take
- note of the "Mark Set" behavior.
+ (Using Region): Mention M-$ in the table.
+ Document mark-even-if-inactive here instead of in Mark Ring.
+ (Mark Ring): Move mark-even-if-inactive to Using Region.
+ Take note of the "Mark Set" behavior.
(Disabled Transient Mark): Rename from "Persistent Mark"
(Bug#9688). Callers changed.
@@ -1050,8 +1159,8 @@
(Name Help): Remove an over-long joke.
(Apropos): Document prefix args. Remove duplicated descriptions.
(Help Mode): Add C-c C-b to table. Update TAB binding.
- (Package Keywords): Rename from "Library by Keyword". Describe
- new package menu interface.
+ (Package Keywords): Rename from "Library by Keyword".
+ Describe new package menu interface.
(Help Files, Help Echo): Tweak description.
* mini.texi (Completion Options): Add completion-cycle-threshold.
@@ -1063,8 +1172,8 @@
2011-10-08 Chong Yidong <cyd@stupidchicken.com>
- * basic.texi (Position Info): Omit page commands. Document
- count-words-region and count-words.
+ * basic.texi (Position Info): Omit page commands.
+ Document count-words-region and count-words.
* text.texi (Pages): Move what-page documentation here.
@@ -1087,8 +1196,8 @@
2011-10-07 Chong Yidong <cyd@stupidchicken.com>
- * basic.texi (Inserting Text): Add xref to Completion. Add
- ucs-insert example, and document prefix argument.
+ * basic.texi (Inserting Text): Add xref to Completion.
+ Add ucs-insert example, and document prefix argument.
(Moving Point): Fix introduction; C-f/C-b are no longer equivalent
to left/right. Tweak left-char and right-char descriptions.
M-left and M-right are now bound to left-word/right-word.
@@ -1492,8 +1601,8 @@
2011-04-24 Chong Yidong <cyd@stupidchicken.com>
- * maintaining.texi (List Tags): Document next-file. Suggested by
- Uday S Reddy.
+ * maintaining.texi (List Tags): Document next-file.
+ Suggested by Uday S Reddy.
2011-04-23 Juanma Barranquero <lekktu@gmail.com>
@@ -9194,7 +9303,7 @@
;; coding: utf-8
;; End:
- Copyright (C) 1993-1999, 2001-2012 Free Software Foundation, Inc.
+ Copyright (C) 1993-1999, 2001-2012 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/doc/emacs/Makefile.in b/doc/emacs/Makefile.in
index b25f6dbe490..7ffbf52e94f 100644
--- a/doc/emacs/Makefile.in
+++ b/doc/emacs/Makefile.in
@@ -35,6 +35,15 @@ infodir = $(srcdir)/../../info
# Directory with the (customized) texinfo.tex file.
texinfodir = $(srcdir)/../misc
+MKDIR_P = @MKDIR_P@
+
+INFO_EXT=@INFO_EXT@
+# Options used only when making info output.
+# --no-split is only needed because of MS-DOS.
+# For a possible alternative, see
+# http://lists.gnu.org/archive/html/emacs-devel/2011-01/msg01182.html
+INFO_OPTS=@INFO_OPTS@
+
# The makeinfo program is part of the Texinfo distribution.
# Use --force so that it generates output even if there are errors.
MAKEINFO = @MAKEINFO@
@@ -111,14 +120,12 @@ EMACSSOURCES= \
$(EMACS_XTRA)
## This seems pointless. The info/ directory exists in both the
-## repository and the release tarfiles. We do not use any
-## equivalent of mkdir -p/install-sh -d, so this is not a general
-## solution anyway. The second test -d is for parallel builds.
-mkinfodir = @test -d ${infodir} || mkdir ${infodir} || test -d ${infodir}
+## repository and the release tarfiles.
+mkinfodir = @${MKDIR_P} ${infodir}
.PHONY: info dvi html pdf ps
-info: $(infodir)/emacs
+info: $(infodir)/emacs$(INFO_EXT)
dvi: emacs.dvi
html: emacs.html
pdf: emacs.pdf
@@ -128,9 +135,9 @@ ps: emacs.ps
# There is no provision for Info files to exist in the build directory.
# In a distribution of Emacs, the Info files should be up to date.
# Note: "<" is not portable in ordinary make rules.
-$(infodir)/emacs: ${EMACSSOURCES}
+$(infodir)/emacs$(INFO_EXT): ${EMACSSOURCES}
$(mkinfodir)
- $(MAKEINFO) $(MAKEINFO_OPTS) -o $@ ${srcdir}/emacs.texi
+ $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ ${srcdir}/emacs.texi
emacs.dvi: ${EMACSSOURCES}
$(ENVADD) $(TEXI2DVI) ${srcdir}/emacs.texi
@@ -171,7 +178,7 @@ distclean: clean
## In the standalone tarfile, the clean rule runs this.
infoclean:
- -cd $(infodir) && rm -f emacs emacs-[1-9] emacs-[1-9][0-9]
+ -cd $(infodir) && rm -f emacs$(INFO_EXT) emacs$(INFO_EXT)-[1-9] emacs$(INFO_EXT)-[1-9][0-9]
maintainer-clean: distclean infoclean
diff --git a/doc/emacs/abbrevs.texi b/doc/emacs/abbrevs.texi
index a8a34e62c1f..d3c914d92b0 100644
--- a/doc/emacs/abbrevs.texi
+++ b/doc/emacs/abbrevs.texi
@@ -37,12 +37,12 @@ Automatic Typing}.
@node Abbrev Concepts
@section Abbrev Concepts
- An @dfn{abbrev} is a word which has been defined to @dfn{expand} into
+ An @dfn{abbrev} is a word that has been defined to @dfn{expand} into
a specified @dfn{expansion}. When you insert a word-separator character
following the abbrev, that expands the abbrev---replacing the abbrev
with its expansion. For example, if @samp{foo} is defined as an abbrev
-expanding to @samp{find outer otter}, then you can insert @samp{find
-outer otter.} into the buffer by typing @kbd{f o o .}.
+expanding to @samp{find outer otter}, then typing @kbd{f o o .} will
+insert @samp{find outer otter.}.
@findex abbrev-mode
@cindex Abbrev mode
@@ -61,10 +61,9 @@ mode-specific definitions for different major modes. A mode-specific
definition for the current major mode overrides a global definition.
You can define abbrevs interactively during the editing session,
-irrespective of whether Abbrev mode is enabled. You
-can also save lists of abbrev definitions in files for use in later
-sessions. Some users keep extensive lists of abbrevs that they load
-in every session.
+irrespective of whether Abbrev mode is enabled. You can also save
+lists of abbrev definitions in files, which you can the reload for use
+in later sessions.
@node Defining Abbrevs
@section Defining Abbrevs
diff --git a/doc/emacs/ack.texi b/doc/emacs/ack.texi
index 51f6d70bd90..eafd38155f2 100644
--- a/doc/emacs/ack.texi
+++ b/doc/emacs/ack.texi
@@ -240,7 +240,7 @@ for compiled Emacs Lisp code.
@item
Mathias Dahl wrote @file{image-dired.el}, a package for viewing image
-files as ``thumbnails.''
+files as ``thumbnails''.
@item
Julien Danjou wrote an implementation of ``Desktop Notifications''
@@ -1027,7 +1027,7 @@ Together with Dmitry Dzhus, he wrote @file{gdb-mi.el}, the successor to
@item
Danny Roozendaal implemented @file{handwrite.el}, which converts text
-into ``handwriting.''
+into ``handwriting''.
@item
Markus Rost wrote @file{cus-test.el}, a testing framework for customize.
@@ -1224,7 +1224,7 @@ the keyboard.
@item
Jean-Philippe Theberge wrote @file{thumbs.el}, a package for viewing
-image files as ``thumbnails.''
+image files as ``thumbnails''.
@item
Spencer Thomas wrote the original @file{dabbrev.el}, providing a command
diff --git a/doc/emacs/arevert-xtra.texi b/doc/emacs/arevert-xtra.texi
index 55d7646542d..5a957b02843 100644
--- a/doc/emacs/arevert-xtra.texi
+++ b/doc/emacs/arevert-xtra.texi
@@ -109,6 +109,7 @@ revert-buffer-function,, Reverting, elisp, the Emacs Lisp Reference Manual}.
In addition, it @emph{must} have a @code{buffer-stale-function}.
+@c FIXME only defvar in all of doc/emacs!
@defvar buffer-stale-function
The value of this variable is a function to check whether a non-file
buffer needs reverting. This should be a function with one optional
diff --git a/doc/emacs/basic.texi b/doc/emacs/basic.texi
index 5ad48eb48ef..2650b55811f 100644
--- a/doc/emacs/basic.texi
+++ b/doc/emacs/basic.texi
@@ -668,7 +668,7 @@ those two positions are the accessible ones. @xref{Narrowing}.
@cindex arguments to commands
In the terminology of mathematics and computing, @dfn{argument}
-means ``data provided to a function or operation.'' You can give any
+means ``data provided to a function or operation''. You can give any
Emacs command a @dfn{numeric argument} (also called a @dfn{prefix
argument}). Some commands interpret the argument as a repetition
count. For example, giving @kbd{C-f} an argument of ten causes it to
@@ -762,7 +762,7 @@ described when they come up; they exist to make an individual command
more convenient, and they are documented in that command's
documentation string.
- We use the term ``prefix argument'' as well as ``numeric argument,''
+ We use the term ``prefix argument'' as well as ``numeric argument'',
to emphasize that you type these argument before the command, and to
distinguish them from minibuffer arguments that come after the
command.
diff --git a/doc/emacs/buffers.texi b/doc/emacs/buffers.texi
index d2783bcb0ba..5dd95cc2a6f 100644
--- a/doc/emacs/buffers.texi
+++ b/doc/emacs/buffers.texi
@@ -46,7 +46,7 @@ This is because Emacs tracks buffer positions using that data type.
For typical 64-bit machines, this maximum buffer size is @math{2^61 -
2} bytes, or about 2 EiB. For typical 32-bit machines, the maximum is
usually @math{2^29 - 2} bytes, or about 512 MiB. Buffer sizes are
-also limited by the amount of memory present in the system.
+also limited by the amount of memory in the system.
@menu
* Select Buffer:: Creating a new buffer or reselecting an old one.
@@ -180,7 +180,7 @@ buffers that were current most recently come first.
@samp{.} in the first field of a line indicates that the buffer is
current. @samp{%} indicates a read-only buffer. @samp{*} indicates
-that the buffer is ``modified.'' If several buffers are modified, it
+that the buffer is ``modified''. If several buffers are modified, it
may be time to save some with @kbd{C-x s} (@pxref{Save Commands}).
Here is an example of a buffer list:
@@ -326,8 +326,8 @@ for a mere hour.
@cindex Midnight mode
@vindex midnight-mode
@vindex midnight-hook
- You can also have this buffer purging done for you, every day at
-midnight, by enabling Midnight mode. Midnight mode operates each day
+ You can also have this buffer purging done for you, once a day,
+by enabling Midnight mode. Midnight mode operates each day
at midnight; at that time, it runs @code{clean-buffer-list}, or
whichever functions you have placed in the normal hook
@code{midnight-hook} (@pxref{Hooks}). To enable Midnight mode, use
@@ -361,7 +361,7 @@ the buffer menu in another window, and selects that window.
The buffer menu is a read-only buffer, and can be changed only
through the special commands described in this section. The usual
-Emacs cursor motion commands can be used in this buffer. The
+cursor motion commands can be used in this buffer. The
following commands apply to the buffer described on the current line:
@table @kbd
@@ -392,7 +392,7 @@ line:
@table @kbd
@item ~
-Mark the buffer ``unmodified.'' The command @kbd{~} does this
+Mark the buffer ``unmodified''. The command @kbd{~} does this
immediately when you type it.
@item %
Toggle the buffer's read-only flag. The command @kbd{%} does
@@ -476,13 +476,13 @@ Auto Revert mode applies to the @file{*Buffer List*} buffer only if
An @dfn{indirect buffer} shares the text of some other buffer, which
is called the @dfn{base buffer} of the indirect buffer. In some ways it
-is the analogue, for buffers, of a symbolic link between files.
+is a buffer analogue of a symbolic link between files.
@table @kbd
@findex make-indirect-buffer
@item M-x make-indirect-buffer @key{RET} @var{base-buffer} @key{RET} @var{indirect-name} @key{RET}
-Create an indirect buffer named @var{indirect-name} whose base buffer
-is @var{base-buffer}.
+Create an indirect buffer named @var{indirect-name} with base buffer
+@var{base-buffer}.
@findex clone-indirect-buffer
@item M-x clone-indirect-buffer @key{RET}
Create an indirect buffer that is a twin copy of the current buffer.
@@ -520,10 +520,9 @@ buffer in another window. These functions run the hook
@code{clone-indirect-buffer-hook} after creating the indirect buffer.
The more general way to make an indirect buffer is with the command
-@kbd{M-x make-indirect-buffer}. It creates an indirect buffer from
-buffer @var{base-buffer}, under the name @var{indirect-name}. It
-prompts for both @var{base-buffer} and @var{indirect-name} using the
-minibuffer.
+@kbd{M-x make-indirect-buffer}. It creates an indirect buffer
+named @var{indirect-name} from a buffer @var{base-buffer}, prompting for
+both using the minibuffer.
@node Buffer Convenience
@section Convenience Features and Customization of Buffer Handling
@@ -590,7 +589,7 @@ rule or another is easier for you to remember and apply quickly.
Iswitchb global minor mode provides convenient switching between
buffers using substrings of their names. It replaces the normal
definitions of @kbd{C-x b}, @kbd{C-x 4 b}, @kbd{C-x 5 b}, and @kbd{C-x
-4 C-o} with alternative commands that are somewhat ``smarter.''
+4 C-o} with alternative commands that are somewhat ``smarter''.
When one of these commands prompts you for a buffer name, you can
type in just a substring of the name you want to choose. As you enter
diff --git a/doc/emacs/building.texi b/doc/emacs/building.texi
index fef7d2b2828..999afa7df2c 100644
--- a/doc/emacs/building.texi
+++ b/doc/emacs/building.texi
@@ -331,7 +331,7 @@ you can do anything else in Emacs). @xref{MS-DOS}.
Just as you can run a compiler from Emacs and then visit the lines
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 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}).
@@ -426,11 +426,11 @@ syntax checking tool used depends on the language; for example, for
C/C++ files this is usually the C compiler. Flymake can also use
build tools such as @code{make} for checking complicated projects.
- To enable Flymake mode, type @kbd{M-x flymake-mode}. You can go to
-the errors found by Flymake mode with @kbd{M-x
-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}.
+ To enable Flymake mode, type @kbd{M-x flymake-mode}. You can jump to
+the errors that it finds by using @kbd{M-x
+flymake-goto-next-error} and @kbd{M-x flymake-goto-prev-error}.
+Use the command @kbd{M-x flymake-display-err-menu-for-current-line}
+to display any error messages associated with the current line.
For more details about using Flymake,
@ifnottex
diff --git a/doc/emacs/calendar.texi b/doc/emacs/calendar.texi
index c2851d4abd3..e55d40767f4 100644
--- a/doc/emacs/calendar.texi
+++ b/doc/emacs/calendar.texi
@@ -26,8 +26,8 @@ the calendar, type @kbd{q}.
@iftex
This chapter describes the basic calendar features.
-@inforef{Advanced Calendar/Diary Usage,, emacs-xtra}, for information
-about more specialized features.
+For more advanced topics,
+@pxref{Advanced Calendar/Diary Usage,,, emacs-xtra, Specialized Emacs Features}.
@end iftex
@menu
@@ -489,7 +489,7 @@ window.
calendar, use the @kbd{x} command. This displays the dates that are
holidays in a different face.
@iftex
-@inforef{Calendar Customizing, calendar-holiday-marker, emacs-xtra}.
+@xref{Calendar Customizing,,, emacs-xtra, Specialized Emacs Features}.
@end iftex
@ifnottex
@xref{Calendar Customizing, calendar-holiday-marker}.
@@ -624,7 +624,7 @@ for all users in a @file{default.el} file. @xref{Init File}.
These calendar commands display the dates and times of the phases of
the moon (new moon, first quarter, full moon, last quarter). This
feature is useful for debugging problems that ``depend on the phase of
-the moon.''
+the moon''.
@table @kbd
@item M
@@ -822,7 +822,7 @@ Display Mayan date for selected day (@code{calendar-mayan-print-date}).
Otherwise, move point to the date you want to convert, then type the
appropriate command starting with @kbd{p} from the table above. The
-prefix @kbd{p} is a mnemonic for ``print,'' since Emacs ``prints'' the
+prefix @kbd{p} is a mnemonic for ``print'', since Emacs ``prints'' the
equivalent date in the echo area. @kbd{p o} displays the
date in all forms known to Emacs. You can also use @kbd{Mouse-3} and
then choose @kbd{Other calendars} from the menu that appears. This
@@ -901,7 +901,7 @@ Islamic, or French names.
@findex calendar-hebrew-list-yahrzeits
@cindex yahrzeits
One common issue concerning the Hebrew calendar is the computation
-of the anniversary of a date of death, called a ``yahrzeit.'' The Emacs
+of the anniversary of a date of death, called a ``yahrzeit''. The Emacs
calendar includes a facility for such calculations. If you are in the
calendar, the command @kbd{M-x calendar-hebrew-list-yahrzeits} asks you for
a range of years and then displays a list of the yahrzeit dates for those
@@ -1102,7 +1102,7 @@ current date is visible).
the @kbd{m} command. This marks the dates that have diary entries in
a different face.
@iftex
-@inforef{Calendar Customizing, diary-entry-marker, emacs-xtra}.
+@xref{Calendar Customizing,,, emacs-xtra, Specialized Emacs Features}.
@end iftex
@ifnottex
@xref{Calendar Customizing, diary-entry-marker}.
@@ -1126,7 +1126,7 @@ date, independently of the calendar display, and optionally for the next
few days as well; the variable @code{diary-number-of-entries} specifies
how many days to include.
@iftex
-@inforef{Diary Customizing,, emacs-xtra}.
+@xref{Diary Customizing,,, emacs-xtra, Specialized Emacs Features}.
@end iftex
@ifnottex
@xref{Diary Customizing, diary-number-of-entries}.
@@ -1270,7 +1270,7 @@ entries. The basic commands are listed here; more sophisticated
commands are in the next section (@pxref{Special Diary Entries}).
Entries can also be based on non-Gregorian calendars.
@iftex
-@inforef{Non-Gregorian Diary,, emacs-xtra}.
+@xref{Non-Gregorian Diary,,, emacs-xtra, Specialized Emacs Features}.
@end iftex
@ifnottex
@xref{Non-Gregorian Diary}.
@@ -1426,8 +1426,8 @@ that applies to the fourth Thursday in November:
@noindent
The 11 specifies November (the eleventh month), the 4 specifies Thursday
(the fourth day of the week, where Sunday is numbered zero), and the
-second 4 specifies the fourth Thursday (1 would mean ``first,'' 2 would
-mean ``second,'' @minus{}2 would mean ``second-to-last,'' and so on).
+second 4 specifies the fourth Thursday (1 would mean ``first'', 2 would
+mean ``second'', @minus{}2 would mean ``second-to-last'', and so on).
The month can be a single month or a list of months. Thus you could change
the 11 above to @samp{'(1 2 3)} and have the entry apply to the last
Thursday of January, February, and March. If the month is @code{t}, the
@@ -1438,7 +1438,7 @@ specifying the name of a face or a single-character string to use when
marking the entry in the calendar. Most generally, sexp diary entries
can perform arbitrary computations to determine when they apply.
@iftex
-@inforef{Sexp Diary Entries,, emacs-xtra}.
+@xref{Sexp Diary Entries,,, emacs-xtra, Specialized Emacs Features}.
@end iftex
@ifnottex
@xref{Sexp Diary Entries}.
@@ -1512,7 +1512,7 @@ display the day's diary buffer, unless you set
@code{appt-display-diary} to @code{nil}. The appointments list is
also updated whenever the diary file (or a file it includes; see
@iftex
-@inforef{Fancy Diary Display,, emacs-xtra})
+@ref{Fancy Diary Display,,, emacs-xtra, Specialized Emacs Features})
@end iftex
@ifnottex
@ref{Fancy Diary Display})
@@ -1576,7 +1576,7 @@ and adds the results to an Emacs diary file. For example:
You can use an @code{#include} directive to add the import file contents
to the main diary file, if these are different files.
@iftex
-@inforef{Fancy Diary Display,, emacs-xtra}.
+@xref{Fancy Diary Display,,, emacs-xtra, Specialized Emacs Features}.
@end iftex
@ifnottex
@xref{Fancy Diary Display}.
@@ -1681,7 +1681,7 @@ timeclock-change}.
Once you've collected data from a number of time intervals, you can use
@kbd{M-x timeclock-workday-remaining} to see how much time is left to
work today (assuming a typical average of 8 hours a day), and @kbd{M-x
-timeclock-when-to-leave} which will calculate when you're ``done.''
+timeclock-when-to-leave} which will calculate when you're ``done''.
@vindex timeclock-modeline-display
@findex timeclock-modeline-display
diff --git a/doc/emacs/cmdargs.texi b/doc/emacs/cmdargs.texi
index 4c6d6ef7bad..c387b99915f 100644
--- a/doc/emacs/cmdargs.texi
+++ b/doc/emacs/cmdargs.texi
@@ -308,7 +308,7 @@ in your initialization file (@pxref{Entering Emacs}).
@opindex -Q
@itemx --quick
@opindex --quick
-Start emacs with minimum customizations, similar to using @samp{-q},
+Start emacs with minimum customizations. This is similar to using @samp{-q},
@samp{--no-site-file}, @samp{--no-site-lisp}, and @samp{--no-splash}
together. This also stops Emacs from processing X resources by
setting @code{inhibit-x-resources} to @code{t} (@pxref{Resources}).
@@ -442,7 +442,7 @@ Directory for the documentation string file, which is used to
initialize the Lisp variable @code{doc-directory}.
@item EMACSLOADPATH
A colon-separated list of directories@footnote{ Here and below,
-whenever we say ``colon-separated list of directories,'' it pertains
+whenever we say ``colon-separated list of directories'', it pertains
to Unix and GNU/Linux systems. On MS-DOS and MS-Windows, the
directories are separated by semi-colons instead, since DOS/Windows
file names might include a colon after a drive letter.} to search for
diff --git a/doc/emacs/commands.texi b/doc/emacs/commands.texi
index 3285b65e57b..9678adfe87f 100644
--- a/doc/emacs/commands.texi
+++ b/doc/emacs/commands.texi
@@ -166,7 +166,7 @@ commands, even though strictly speaking the key is bound to a command.
Usually we state the name of the command which really does the work in
parentheses after mentioning the key that runs it. For example, we
will say that ``The command @kbd{C-n} (@code{next-line}) moves point
-vertically down,'' meaning that the command @code{next-line} moves
+vertically down'', meaning that the command @code{next-line} moves
vertically down, and the key @kbd{C-n} is normally bound to it.
Since we are discussing customization, we should tell you about
diff --git a/doc/emacs/custom.texi b/doc/emacs/custom.texi
index 72b4961e209..d5a68249ec4 100644
--- a/doc/emacs/custom.texi
+++ b/doc/emacs/custom.texi
@@ -79,7 +79,7 @@ top-level @code{Emacs} group. It looks like this, in part:
@c we want the buffer example to all be on one page, but unfortunately
@c that's quite a bit of text, so force all space to the bottom.
-@page
+@c @page
@smallexample
@group
To apply changes, use the Save or Set buttons.
@@ -628,7 +628,7 @@ theme, its @samp{State} display shows @samp{THEMED} instead of
@findex disable-theme
You can enable a specific Custom theme in the current Emacs session
by typing @kbd{M-x load-theme}. This prompts for a theme name, loads
-the theme from the theme file, and enables the theme. If a theme file
+the theme from the theme file, and enables it. If a theme file
has been loaded before, you can enable the theme without loading its
file by typing @kbd{M-x enable-theme}. To disable a Custom theme,
type @kbd{M-x disable-theme}.
@@ -636,7 +636,7 @@ type @kbd{M-x disable-theme}.
@findex describe-theme
To see a description of a Custom theme, type @kbd{?} on its line in
the @file{*Custom Themes*} buffer; or type @kbd{M-x describe-theme}
-anywhere in Emacs and enter the theme name in the minibuffer.
+anywhere in Emacs and enter the theme name.
@node Creating Custom Themes
@subsection Creating Custom Themes
@@ -762,7 +762,7 @@ C-h v fill-column @key{RET}
@noindent
displays something like this:
-@smallexample
+@example
fill-column is a variable defined in `C source code'.
fill-column's value is 70
Local in buffer custom.texi; global value is 70
@@ -777,7 +777,7 @@ Documentation:
Interactively, you can set the buffer local value using C-x f.
You can customize this variable.
-@end smallexample
+@end example
@noindent
The line that says ``You can customize the variable'' indicates that
@@ -1054,8 +1054,8 @@ pair with a colon and semicolon. The special variable/value pair
@findex add-file-local-variable-prop-line
@findex delete-file-local-variable-prop-line
@findex copy-dir-locals-to-file-locals-prop-line
- Instead of adding variable/value pairs by hand, you can use the
-command @kbd{M-x add-file-local-variable-prop-line}. This prompts for
+ You can use the command @kbd{M-x add-file-local-variable-prop-line}
+instead of adding entries by hand. It prompts for
a variable and value, and adds them to the first line in the
appropriate way. @kbd{M-x delete-file-local-variable-prop-line}
prompts for a variable, and deletes its entry from the line. @kbd{M-x
@@ -1522,7 +1522,7 @@ circumstances.
@vindex minibuffer-local-completion-map
@vindex minibuffer-local-must-match-map
@vindex minibuffer-local-filename-completion-map
-@vindex minibuffer-local-must-match-filename-map
+@vindex minibuffer-local-filename-must-match-map
The minibuffer has its own set of local keymaps; they contain various
completion and exit commands.
@@ -1539,7 +1539,7 @@ just like @key{RET}.
for cautious completion.
@item
@code{minibuffer-local-filename-completion-map} and
-@code{minibuffer-local-must-match-filename-map} are like the two
+@code{minibuffer-local-filename-must-match-map} are like the two
previous ones, but they are specifically for file name completion.
They do not bind @key{SPC}.
@end itemize
@@ -1922,7 +1922,7 @@ single click definition has run when the first click was received.
This constrains what you can do with double clicks, but user interface
designers say that this constraint ought to be followed in any case. A
double click should do something similar to the single click, only
-``more so.'' The command for the double-click event should perform the
+``more so''. The command for the double-click event should perform the
extra work for the double click.
If a double-click event has no binding, it changes to the
@@ -1970,7 +1970,7 @@ or @samp{triple-}, which always precede @samp{drag-} or @samp{down-}.
A frame includes areas that don't show text from the buffer, such as
the mode line and the scroll bar. You can tell whether a mouse button
comes from a special area of the screen by means of dummy ``prefix
-keys.'' For example, if you click the mouse in the mode line, you get
+keys''. For example, if you click the mouse in the mode line, you get
the prefix key @code{mode-line} before the ordinary mouse-button symbol.
Thus, here is how to define the command for clicking the first button in
a mode line to run @code{scroll-up-command}:
diff --git a/doc/emacs/dired.texi b/doc/emacs/dired.texi
index 301f8a76477..0dcded78364 100644
--- a/doc/emacs/dired.texi
+++ b/doc/emacs/dired.texi
@@ -14,7 +14,7 @@ optionally some of its subdirectories as well. You can use the normal
Emacs commands to move around in this buffer, and special Dired
commands to operate on the listed files.
- The Dired buffer is ``read-only,'' and inserting text in it is not
+ The Dired buffer is ``read-only'', and inserting text in it is not
allowed. Ordinary printing characters such as @kbd{d} and @kbd{x} are
redefined for special Dired commands. Some Dired commands @dfn{mark}
or @dfn{flag} the @dfn{current file} (that is, the file on the current
@@ -104,7 +104,7 @@ use the @samp{--dired} option.
@findex dired-other-frame
@kindex C-x 5 d
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-window}). @kbd{C-x 5 d}
(@code{dired-other-frame}) displays the Dired buffer in a separate
frame.
@@ -1252,7 +1252,7 @@ and erases all flags and marks.
@findex wdired-change-to-wdired-mode
Wdired is a special mode that allows you to perform file operations
by editing the Dired buffer directly (the ``W'' in ``Wdired'' stands
-for ``writable.'') To enter Wdired mode, type @kbd{C-x C-q}
+for ``writable''.) To enter Wdired mode, type @kbd{C-x C-q}
(@code{dired-toggle-read-only}) while in a Dired buffer.
Alternatively, use the @samp{Immediate / Edit File Names} menu item.
@@ -1297,7 +1297,7 @@ buffer containing image-dired, corresponding to the marked files.
You can also enter Image-Dired directly by typing @kbd{M-x
image-dired}. This prompts for a directory; specify one that has
image files. This creates thumbnails for all the images in that
-directory, and displays them all in the ``thumbnail buffer.'' This
+directory, and displays them all in the ``thumbnail buffer''. This
takes a long time if the directory contains many image files, and it
asks for confirmation if the number of image files exceeds
@code{image-dired-show-all-from-dir-max-files}.
@@ -1408,7 +1408,7 @@ the current buffer.
The default comparison method (used if you type @key{RET} at the
prompt) is to compare just the file names---each file name that does
-not appear in the other directory is ``different.'' You can specify
+not appear in the other directory is ``different''. You can specify
more stringent comparisons by entering a Lisp expression, which can
refer to the variables @code{size1} and @code{size2}, the respective
file sizes; @code{mtime1} and @code{mtime2}, the last modification
@@ -1416,7 +1416,7 @@ times in seconds, as floating point numbers; and @code{fa1} and
@code{fa2}, the respective file attribute lists (as returned by the
function @code{file-attributes}). This expression is evaluated for
each pair of like-named files, and if the expression's value is
-non-@code{nil}, those files are considered ``different.''
+non-@code{nil}, those files are considered ``different''.
For instance, the sequence @code{M-x dired-compare-directories
@key{RET} (> mtime1 mtime2) @key{RET}} marks files newer in this
diff --git a/doc/emacs/display.texi b/doc/emacs/display.texi
index da33d352698..de5e8df9dc5 100644
--- a/doc/emacs/display.texi
+++ b/doc/emacs/display.texi
@@ -260,14 +260,11 @@ placed from the top margin of the window; thus, as with
These two variables are ignored if either @code{scroll-step} or
@code{scroll-conservatively} are set to a non-zero value.
- Note that @code{scroll-margin}, described below, limits the amount
-of scrolling so as to put point outside of the top or bottom margin,
-even if aggressive scrolling specifies a fraction @var{f} that is
-larger than the window portion between the top and the bottom margins.
-
@vindex scroll-margin
The variable @code{scroll-margin} restricts how close point can come
-to the top or bottom of a window. Its value is a number of screen
+to the top or bottom of a window (even if aggressive scrolling
+specifies a fraction @var{f} that is larger than the window portion
+between the top and the bottom margins). Its value is a number of screen
lines; if point comes within that many lines of the top or bottom of
the window, Emacs performs automatic scrolling. By default,
@code{scroll-margin} is 0.
@@ -448,7 +445,7 @@ and visits it with View mode enabled.
@cindex synchronizing windows
@dfn{Follow mode} is a minor mode that makes two windows, both
-showing the same buffer, scroll as a single tall ``virtual window.''
+showing the same buffer, scroll as a single tall ``virtual window''.
To use Follow mode, go to a frame with just one window, split it into
two side-by-side windows using @kbd{C-x 3}, and then type @kbd{M-x
follow-mode}. From then on, you can edit the buffer in either of the
@@ -982,15 +979,15 @@ fringes on the selected frame only, use @kbd{M-x set-fringe-style}.
line (@pxref{Continuation Lines}). When one line of text is split
into multiple screen lines, the left fringe shows a curving arrow for
each screen line except the first, indicating that ``this is not the
-real beginning.'' The right fringe shows a curving arrow for each
+real beginning''. The right fringe shows a curving arrow for each
screen line except the last, indicating that ``this is not the real
-end.'' If the line's direction is right-to-left (@pxref{Bidirectional
+end''. If the line's direction is right-to-left (@pxref{Bidirectional
Editing}), the meanings of the curving arrows in the fringes are
swapped.
The fringes indicate line truncation with short horizontal arrows
meaning ``there's more text on this line which is scrolled
-horizontally out of view.'' Clicking the mouse on one of the arrows
+horizontally out of view''. Clicking the mouse on one of the arrows
scrolls the display horizontally in the direction of the arrow.
The fringes can also indicate other things, such as buffer
diff --git a/doc/emacs/emacs.texi b/doc/emacs/emacs.texi
index 25e5bb2af0d..ceb0b4a52d5 100644
--- a/doc/emacs/emacs.texi
+++ b/doc/emacs/emacs.texi
@@ -3,12 +3,27 @@
@setfilename ../../info/emacs
@settitle GNU Emacs Manual
-@c The edition number appears in several places in this file
+@c The edition number appears in more than one place in this file
+@c I don't really know what it means...
+@c For example, it has said "Sixteenth" since sometime in the Emacs 22
+@c series, all through 23, and into 24. So it is not very useful IMO,
+@c and offers nothing that EMACSVER does not. I guess it relates
+@c mainly to the published book sold by the FSF. Hence no longer
+@c bother including it except iftex. Really, I think it should not be
+@c here at all (since anyone can make a pdf version), but should just
+@c be something added by the FSF during the publishing process.
+@c Also, the lispref uses a float (3.0), whereas this uses an ordinal,
+@c so the format is not even consistent.
@set EDITION Sixteenth
@include emacsver.texi
@copying
+@iftex
This is the @value{EDITION} edition of the @cite{GNU Emacs Manual},@*
+@end iftex
+@ifnottex
+This is the @cite{GNU Emacs Manual},
+@end ifnottex
updated for Emacs version @value{EMACSVER}.
Copyright @copyright{} 1985-1987, 1993-2012 Free Software Foundation, Inc.
@@ -72,7 +87,7 @@ developing GNU and promoting software freedom.''
@sp 4
@center @value{EDITION} Edition, Updated for Emacs Version @value{EMACSVER}.
@sp 5
-@center Richard Stallman
+@center Richard Stallman et al.
@page
@vskip 0pt plus 1filll
@insertcopying
@@ -288,11 +303,11 @@ The Mark and the Region
Killing and Moving Text
* Deletion and Killing:: Commands that remove text.
-* Yanking:: Recovering killed text. Moving text. (Pasting.)
+* Yanking:: Commands that insert text.
* Cut and Paste:: Clipboard and selections on graphical displays.
-* Accumulating Text:: Other ways of copying text.
+* Accumulating Text:: Other methods to add text to the buffer.
* Rectangles:: Operating on text in rectangular areas.
-* CUA Bindings:: Using @kbd{C-x}, @kbd{C-c}, @kbd{C-v} to kill and yank.
+* CUA Bindings:: Using @kbd{C-x}/@kbd{C-c}/@kbd{C-v} to kill and yank.
Deletion and Killing
@@ -309,9 +324,9 @@ Yanking
* Earlier Kills:: Yanking something killed some time ago.
* Appending Kills:: Several kills in a row all yank together.
-Killing and Yanking on Graphical Displays
+"Cut and Paste" Operations on Graphical Displays
-* Clipboard:: How Emacs interacts with the system clipboard.
+* Clipboard:: How Emacs uses the system clipboard.
* Primary Selection:: The temporarily selected text selection.
* Secondary Selection:: Cutting without altering point and mark.
@@ -328,7 +343,7 @@ Registers
Controlling the Display
* Scrolling:: Commands to move text up and down in a window.
-* Recentering:: A scrolling command that centers the current line.
+* Recentering:: A scroll command that centers the current line.
* Auto Scrolling:: Redisplay scrolls text automatically when needed.
* Horizontal Scrolling:: Moving text left and right in a window.
* Narrowing:: Restricting display and editing to a portion
@@ -486,7 +501,7 @@ Multiple Windows
* Displaying Buffers:: How Emacs picks a window for displaying a buffer.
* Window Convenience:: Convenience functions for window handling.
-Displaying Buffers
+Displaying a Buffer in a Window
* Window Choice:: How @code{display-buffer} works.
@@ -509,7 +524,7 @@ Frames and Graphical Displays
* Tool Bars:: Enabling and disabling the tool bar.
* Dialog Boxes:: Controlling use of dialog boxes.
* Tooltips:: Displaying information at the current mouse position.
-* Mouse Avoidance:: Moving the mouse pointer out of the way.
+* Mouse Avoidance:: Preventing the mouse pointer from obscuring text.
* Non-Window Terminals:: Multiple frames on terminals that show only one.
* Text-Only Mouse:: Using the mouse in text terminals.
@@ -540,7 +555,7 @@ International Character Set Support
* Charsets:: How Emacs groups its internal character codes.
* Bidirectional Editing:: Support for right-to-left scripts.
-Modes
+Major and Minor Modes
* Major Modes:: Text mode vs. Lisp mode vs. C mode...
* Minor Modes:: Each minor mode is a feature you can turn on
@@ -600,7 +615,7 @@ Org Mode
* TeX Print:: Commands for printing part of a file with TeX.
* TeX Misc:: Customization of TeX mode, and related features.
-Editing Enriched Text
+Enriched Text
* Enriched Mode:: Entering and exiting Enriched mode.
* Hard and Soft Newlines:: There are two different kinds of newlines.
@@ -783,7 +798,7 @@ Introduction to Version Control
* Version Control Systems:: Supported version control back-end systems.
* VCS Concepts:: Words and concepts related to version control.
* VCS Merging:: How file conflicts are handled.
-* VCS Changesets:: Changesets in version control.
+* VCS Changesets:: How changes are grouped.
* VCS Repositories:: Where version control repositories are stored.
* Types of Log File:: The VCS log in contrast to the ChangeLog.
@@ -798,10 +813,10 @@ VC Directory Mode
* VC Directory Buffer:: What the buffer looks like and means.
* VC Directory Commands:: Commands to use in a VC directory buffer.
-Multiple Branches of a File
+Version Control Branches
* Switching Branches:: How to get to another existing branch.
-* VC Pull:: Updating a branch from another branch.
+* VC Pull:: Updating the contents of a branch.
* Merging:: Transferring changes between branches.
* Creating Branches:: How to start a new branch.
@@ -828,12 +843,12 @@ Change Logs
Tags Tables
* 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.
@ifnottex
Merging Files with Emerge
@@ -952,16 +967,9 @@ Customizing the Calendar and Diary
* Sexp Diary Entries:: More flexible diary entries.
@end ifnottex
-Document Viewing
-
-* DocView Navigation:: Navigating DocView buffers.
-* DocView Searching:: Searching inside documents.
-* DocView Slicing:: Specifying which part of a page is displayed.
-* DocView Conversion:: Influencing and triggering conversion.
-
Sending Mail
-* Mail Format:: Format of the mail being composed.
+* Mail Format:: Format of a mail message.
* Mail Headers:: Details of some standard mail header fields.
* Mail Aliases:: Abbreviating and grouping mail addresses.
* Mail Commands:: Special commands for editing mail being composed.
@@ -1012,6 +1020,13 @@ Gnus
* Gnus Group Buffer:: A short description of Gnus group commands.
* Gnus Summary Buffer:: A short description of Gnus summary commands.
+Document Viewing
+
+* DocView Navigation:: Navigating DocView buffers.
+* DocView Searching:: Searching inside documents.
+* DocView Slicing:: Specifying which part of a page is displayed.
+* DocView Conversion:: Influencing and triggering conversion.
+
Running Shell Commands from Emacs
* Single Shell:: How to run one shell command and return.
@@ -1061,10 +1076,10 @@ Customization
* Variables:: Many Emacs commands examine Emacs variables
to decide what to do; by setting variables,
you can control their functioning.
-* Key Bindings:: Keymaps say what command each key runs.
+* Key Bindings:: The keymaps say what command each key runs.
By changing them, you can "redefine" keys.
* Init File:: How to write common customizations in the
- @file{.emacs} file.
+ initialization file.
Easy Customization Interface
@@ -1098,7 +1113,7 @@ Customizing Key Bindings
* Local Keymaps:: Major and minor modes have their own keymaps.
* Minibuffer Maps:: The minibuffer uses its own local keymaps.
* Rebinding:: How to redefine one key's meaning conveniently.
-* Init Rebinding:: Rebinding keys with your init file, @file{.emacs}.
+* Init Rebinding:: Rebinding keys with your initialization file.
* Modifier Keys:: Using modifier keys in key bindings.
* Function Keys:: Rebinding terminal function keys.
* Named ASCII Chars:: Distinguishing @key{TAB} from @kbd{C-i}, and so on.
@@ -1107,7 +1122,7 @@ Customizing Key Bindings
before it can be executed. This is done to protect
beginners from surprises.
-The Init File, @file{~/.emacs}
+The Emacs Initialization File
* Init Syntax:: Syntax of constants in Emacs Lisp.
* Init Examples:: How to do some things with an init file.
@@ -1167,7 +1182,7 @@ GTK resources
* GTK Resource Basics:: Basic usage of GTK+ resources.
* GTK Widget Names:: How GTK+ widgets are named.
-* GTK Names in Emacs:: GTK+ widgets used by Emacs.
+* GTK Names in Emacs:: GTK widgets used by Emacs.
* GTK styles:: What can be customized in a GTK widget.
Emacs and Mac OS / GNUstep
@@ -1183,7 +1198,8 @@ Emacs and Microsoft Windows/MS-DOS
* Text and Binary:: Text files use CRLF to terminate lines.
* Windows Files:: File-name conventions on Windows.
* ls in Lisp:: Emulation of @code{ls} for Dired.
-* Windows HOME:: Where Emacs looks for your @file{.emacs}.
+* Windows HOME:: Where Emacs looks for your @file{.emacs} and
+ where it starts up.
* Windows Keyboard:: Windows-specific keyboard features.
* Windows Mouse:: Windows-specific mouse features.
* Windows Processes:: Running subprocesses on Windows.
@@ -1332,7 +1348,7 @@ USA
Contributors to GNU Emacs include Jari Aalto, Per Abrahamsen, Tomas
Abrahamsson, Jay K.@: Adams, Alon Albert, Michael Albinus, Nagy
-Andras, Benjamin Andresen, Ralf Angeli, Joe Arceneaux, Emil Ĺström,
+Andras, Benjamin Andresen, Ralf Angeli, Dmitry Antipov, Joe Arceneaux, Emil Ĺström,
Miles Bader, David Bakhash, Juanma Barranquero, Eli Barzilay, Thomas
Baumann, Steven L.@: Baur, Jay Belanger, Alexander L.@: Belikoff,
Thomas Bellman, Scott Bender, Boaz Ben-Zvi, Sergey Berezin, Karl
diff --git a/doc/emacs/emerge-xtra.texi b/doc/emacs/emerge-xtra.texi
index 72e0b36b704..552580ef851 100644
--- a/doc/emacs/emerge-xtra.texi
+++ b/doc/emacs/emerge-xtra.texi
@@ -151,7 +151,7 @@ input. The mode line indicates Auto Advance mode with @samp{A}.
If Skip Prefers mode is in effect, the @kbd{n} and @kbd{p} commands
skip over differences in states ``prefer-A'' and ``prefer-B''
(@pxref{State of Difference}). Thus you see only differences for
-which neither version is presumed ``correct.'' The mode line
+which neither version is presumed ``correct''. The mode line
indicates Skip Prefers mode with @samp{S}. This mode is only relevant
when there is an ancestor.
diff --git a/doc/emacs/files.texi b/doc/emacs/files.texi
index 10ba9ed1fa6..088c3ce29a7 100644
--- a/doc/emacs/files.texi
+++ b/doc/emacs/files.texi
@@ -97,7 +97,7 @@ minibuffer, with a directory omitted, specifies the file
When typing a file name into the minibuffer, you can make use of a
couple of shortcuts: a double slash is interpreted as ``ignore
-everything before the second slash in the pair,'' and @samp{~/} is
+everything before the second slash in the pair'', and @samp{~/} is
interpreted as your home directory. @xref{Minibuffer File}.
@cindex environment variables in file names
@@ -739,6 +739,11 @@ directory.) Emacs removes the lock when you save the changes. The
idea is that the file is locked whenever an Emacs buffer visiting it
has unsaved changes.
+@vindex create-lockfiles
+ You can prevent the creation of lock files by setting the variable
+@code{create-lockfiles} to @code{nil}. @strong{Caution:} by
+doing so you will lose the benefits that this feature provides.
+
@cindex collision
If you begin to modify the buffer while the visited file is locked by
someone else, this constitutes a @dfn{collision}. When Emacs detects a
@@ -1340,7 +1345,7 @@ correct the line numbers in the hunk headers, to ensure that the diff
remains ``correct''. To disable automatic line number correction,
change the variable @code{diff-update-on-the-fly} to @code{nil}.
- Diff mode treats each hunk as an ``error message,'' similar to
+ Diff mode treats each hunk as an ``error message'', similar to
Compilation mode. Thus, you can use commands such as @kbd{C-x '} to
visit the corresponding source locations. @xref{Compilation Mode}.
diff --git a/doc/emacs/fixit.texi b/doc/emacs/fixit.texi
index 85fac2b146b..2857e2b1af6 100644
--- a/doc/emacs/fixit.texi
+++ b/doc/emacs/fixit.texi
@@ -8,9 +8,9 @@
@cindex mistakes, correcting
In this chapter we describe commands that are useful when you catch
-a mistake while editing. The most fundamental command for correcting
-erroneous editing is the undo command @kbd{C-/} (which is also bound
-to @kbd{C-x u} and @kbd{C-_}). This undoes a single command, or a
+a mistake while editing. The most fundamental of these commands is
+the undo command @kbd{C-/} (also bound to @kbd{C-x u} and @kbd{C-_}).
+This undoes a single command, or a
part of a command (as in the case of @code{query-replace}), or several
consecutive character insertions. Consecutive repetitions of
@kbd{C-/} undo earlier and earlier changes, back to the limit of the
@@ -60,7 +60,6 @@ beginners to remember: @samp{u} stands for ``undo''. It is also bound
to @kbd{C-_} because typing @kbd{C-/} on some text terminals actually
enters @kbd{C-_}.}. This undoes the most recent change in the buffer,
and moves point back to where it was before that change.
-
Consecutive repetitions of @kbd{C-/} (or its aliases) undo earlier
and earlier changes in the current buffer. If all the recorded
changes have already been undone, the undo command signals an error.
@@ -75,7 +74,7 @@ changes you have undone, type @kbd{C-f} or any other command that
harmlessly breaks the sequence of undoing; then type @kbd{C-/} to undo
the undo command.
- On the other hand, if you want to resume undoing, without redoing
+ Alternatively, if you want to resume undoing, without redoing
previous undo commands, use @kbd{M-x undo-only}. This is like
@code{undo}, but will not redo changes you have just undone.
diff --git a/doc/emacs/fortran-xtra.texi b/doc/emacs/fortran-xtra.texi
index 0dc99034ae6..43e2e63863e 100644
--- a/doc/emacs/fortran-xtra.texi
+++ b/doc/emacs/fortran-xtra.texi
@@ -207,7 +207,7 @@ the Fortran standard counts from 1.) The variable
@code{fortran-continuation-string} specifies what character to put in
column 5. A line that starts with a tab character followed by any digit
except @samp{0} is also a continuation line. We call this style of
-continuation @dfn{tab format}. (Fortran 90 introduced ``free form,''
+continuation @dfn{tab format}. (Fortran 90 introduced ``free form'',
with another style of continuation lines).
@vindex indent-tabs-mode @r{(Fortran mode)}
diff --git a/doc/emacs/frames.texi b/doc/emacs/frames.texi
index 9e9909e8bca..ee468e6f685 100644
--- a/doc/emacs/frames.texi
+++ b/doc/emacs/frames.texi
@@ -67,6 +67,7 @@ for doing so on MS-DOS).
@node Mouse Commands
@section Mouse Commands for Editing
@cindex mouse buttons (what they do)
+@cindex mouse, selecting text using
@kindex Mouse-1
@kindex Mouse-2
@@ -106,6 +107,7 @@ setting the variable @code{x-mouse-click-focus-ignore-position} to
selects the frame, without doing anything else; clicking again selects
the window and sets the cursor position.
+@cindex mouse, dragging
@findex mouse-set-region
Holding down @kbd{Mouse-1} and ``dragging'' the mouse over a stretch
of text activates the region around that text
@@ -235,8 +237,8 @@ Select the text you drag across, in the form of whole lines.
@node Mouse References
@section Following References with the Mouse
-@kindex Mouse-1 @r{(selection)}
-@kindex Mouse-2 @r{(selection)}
+@kindex Mouse-1 @r{(on buttons)}
+@kindex Mouse-2 @r{(on buttons)}
@cindex hyperlinks
@cindex links
@cindex text buttons
@@ -492,13 +494,13 @@ this for future sessions, click on @samp{Save Options} in the
@samp{Options} menu.
@item
-Add a line to your init file (@pxref{Init File}), modifying the
-variable @code{default-frame-alist} to specify the @code{font}
-parameter (@pxref{Creating Frames}), like this:
+Add a line to your init file, modifying the variable
+@code{default-frame-alist} to specify the @code{font} parameter
+(@pxref{Frame Parameters}), like this:
-@smallexample
+@example
(add-to-list 'default-frame-alist '(font . "DejaVu Sans Mono-10"))
-@end smallexample
+@end example
@cindex X defaults file
@cindex X resources file
@@ -506,14 +508,14 @@ parameter (@pxref{Creating Frames}), like this:
Add an @samp{emacs.font} X resource setting to your X resource file,
like this:
-@smallexample
+@example
emacs.font: DejaVu Sans Mono-12
-@end smallexample
+@end example
@noindent
You must restart X, or use the @command{xrdb} command, for the X
-resources file to take effect. @xref{Resources}. When specifying a
-font in your X resources file, you should not quote it.
+resources file to take effect. @xref{Resources}. Do not quote
+font names in X resource files.
@item
If you are running Emacs on the GNOME desktop, you can tell Emacs to
@@ -535,9 +537,9 @@ names the font that it's rendered in.
first is to use a @dfn{Fontconfig pattern}. Fontconfig patterns have
the following form:
-@smallexample
+@example
@var{fontname}[-@var{fontsize}][:@var{name1}=@var{values1}][:@var{name2}=@var{values2}]...
-@end smallexample
+@end example
@noindent
Within this format, any of the elements in braces may be omitted.
@@ -577,13 +579,13 @@ One of @samp{monospace}, @samp{proportional}, @samp{dual-width}, or
@noindent
Here are some examples of Fontconfig patterns:
-@smallexample
+@example
Monospace
Monospace-12
Monospace-12:bold
DejaVu Sans Mono:bold:italic
Monospace-12:weight=bold:slant=italic
-@end smallexample
+@end example
For a more detailed description of Fontconfig patterns, see the
Fontconfig manual, which is distributed with Fontconfig and available
@@ -593,9 +595,9 @@ online at @url{http://fontconfig.org/fontconfig-user.html}.
The second way to specify a font is to use a @dfn{GTK font pattern}.
These have the syntax
-@smallexample
+@example
@var{fontname} [@var{properties}] [@var{fontsize}]
-@end smallexample
+@end example
@noindent
where @var{fontname} is the family name, @var{properties} is a list of
@@ -619,10 +621,10 @@ omitted, a default width is used.
@noindent
Here are some examples of GTK font patterns:
-@smallexample
+@example
Monospace 12
Monospace Bold Italic 12
-@end smallexample
+@end example
@cindex XLFD
@cindex X Logical Font Description
@@ -631,9 +633,9 @@ Logical Font Description}). This is the traditional method for
specifying fonts under X. Each XLFD consists of fourteen words or
numbers, separated by dashes, like this:
-@smallexample
+@example
-misc-fixed-medium-r-semicondensed--13-*-*-*-c-60-iso8859-1
-@end smallexample
+@end example
@noindent
A wildcard character (@samp{*}) in an XLFD matches any sequence of
@@ -644,10 +646,10 @@ results, supply all 14 dashes and use wildcards only within a field.
Case is insignificant in an XLFD. The syntax for an XLFD is as
follows:
-@smallexample
+@example
-@var{maker}-@var{family}-@var{weight}-@var{slant}-@var{widthtype}-@var{style}@dots{}
@dots{}-@var{pixels}-@var{height}-@var{horiz}-@var{vert}-@var{spacing}-@var{width}-@var{registry}-@var{encoding}
-@end smallexample
+@end example
@noindent
The entries have the following meanings:
@@ -666,8 +668,8 @@ The font slant---normally @samp{r} (roman), @samp{i} (italic),
Some font names support other values.
@item widthtype
The font width---normally @samp{normal}, @samp{condensed},
-@samp{extended}, or @samp{semicondensed} (some font names support
-other values).
+@samp{semicondensed}, or @samp{extended}. Some font names support
+other values.
@item style
An optional additional style name. Usually it is empty---most XLFDs
have two hyphens in a row at this point.
@@ -706,9 +708,9 @@ nickname''. Certain fonts have shorter nicknames, which you can use
instead of a normal font specification. For instance, @samp{6x13} is
equivalent to
-@smallexample
+@example
-misc-fixed-medium-r-semicondensed--13-*-*-*-c-60-iso8859-1
-@end smallexample
+@end example
@cindex client-side fonts
@cindex server-side fonts
@@ -1160,9 +1162,9 @@ enable mouse support. You must have the gpm server installed and
running on your system in order for this to work.
@iftex
-@pxref{MS-DOS Mouse,,,emacs-xtra,Specialized Emacs Features},
+@xref{MS-DOS Mouse,,,emacs-xtra,Specialized Emacs Features},
@end iftex
@ifnottex
-@pxref{MS-DOS Mouse},
+@xref{MS-DOS Mouse},
@end ifnottex
for information about mouse support on MS-DOS.
diff --git a/doc/emacs/help.texi b/doc/emacs/help.texi
index eef38136583..e8c5614ff58 100644
--- a/doc/emacs/help.texi
+++ b/doc/emacs/help.texi
@@ -96,7 +96,7 @@ of the major mode, then global bindings (@code{describe-bindings}).
@item C-h c @var{key}
Show the name of the command that the key sequence @var{key} is bound
to (@code{describe-key-briefly}). Here @kbd{c} stands for
-``character.'' For more extensive information on @var{key}, use
+``character''. For more extensive information on @var{key}, use
@kbd{C-h k}.
@item C-h d @var{topics} @key{RET}
Display the commands and variables whose documentation matches
diff --git a/doc/emacs/kmacro.texi b/doc/emacs/kmacro.texi
index 766470e514b..e7522a9db43 100644
--- a/doc/emacs/kmacro.texi
+++ b/doc/emacs/kmacro.texi
@@ -225,7 +225,7 @@ desired macro is at the head of the ring. To execute the new macro
ring head immediately, just type @kbd{C-k}.
Note that Emacs treats the head of the macro ring as the ``last
-defined keyboard macro.'' For instance, @key{F4} will execute that
+defined keyboard macro''. For instance, @key{F4} will execute that
macro, and @kbd{C-x C-k n} will give it a name.
@vindex kmacro-ring-max
diff --git a/doc/emacs/maintaining.texi b/doc/emacs/maintaining.texi
index 9d56b3bdc6e..b0ee5bd5f2f 100644
--- a/doc/emacs/maintaining.texi
+++ b/doc/emacs/maintaining.texi
@@ -711,7 +711,7 @@ 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.
+v} to start editing it.
@node Old Revisions
@subsection Examining And Comparing Old Revisions
@@ -893,7 +893,7 @@ Display the change history for the current repository
(@code{vc-print-root-log}).
@item C-x v I
-Display the changes that will be received with a pull operation
+Display the changes that a pull operation will retrieve
(@code{vc-log-incoming}).
@item C-x v O
@@ -1729,7 +1729,7 @@ find-tag @key{RET} bidule @key{RET}} will just search for any tag
@code{bidule}.
@item
-In assembler code, labels appearing at the beginning of a line,
+In assembler code, labels appearing at the start of a line,
followed by a colon, are tags.
@item
diff --git a/doc/emacs/makefile.w32-in b/doc/emacs/makefile.w32-in
index 488ccbaaf52..4ccecbb7ddf 100644
--- a/doc/emacs/makefile.w32-in
+++ b/doc/emacs/makefile.w32-in
@@ -1,6 +1,6 @@
#### -*- Makefile -*- for the Emacs Manual
-# Copyright (C) 2003-2012 Free Software Foundation, Inc.
+# Copyright (C) 2003-2012 Free Software Foundation, Inc.
# This file is part of GNU Emacs.
@@ -30,7 +30,9 @@ infodir = $(srcdir)/../../info
MAKEINFO = makeinfo
MAKEINFO_OPTS = --force --enable-encoding -I$(srcdir)
MULTI_INSTALL_INFO = $(srcdir)\..\..\nt\multi-install-info.bat
-INFO_TARGETS = $(infodir)/emacs
+INFO_EXT=.info
+INFO_OPTS=--no-split
+INFO_TARGETS = $(infodir)/emacs$(INFO_EXT)
DVI_TARGETS = emacs.dvi
INFOSOURCES = info.texi
@@ -114,8 +116,8 @@ dvi: $(DVI_TARGETS)
$(infodir)/dir:
$(MULTI_INSTALL_INFO) --info-dir=$(infodir) $(INFO_TARGETS)
-$(infodir)/emacs: $(EMACSSOURCES)
- $(MAKEINFO) $(MAKEINFO_OPTS) emacs.texi
+$(infodir)/emacs$(INFO_EXT): $(EMACSSOURCES)
+ $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ emacs.texi
emacs.dvi: $(EMACSSOURCES)
$(ENVADD) $(TEXI2DVI) $(srcdir)/emacs.texi
@@ -129,6 +131,7 @@ emacs-xtra.dvi: emacs-xtra.texi $(EMACS_XTRA)
mostlyclean:
- $(DEL) *.log *.cp *.fn *.ky *.pg *.vr core *.tp *.core gnustmp.*
+## FIXME $(infodir)/emacs* deletes too much, eg emacs-mime.
clean: mostlyclean
- $(DEL) *.dvi
- $(DEL) $(infodir)/emacs*
diff --git a/doc/emacs/mini.texi b/doc/emacs/mini.texi
index e498516ae7f..f50e3085f2d 100644
--- a/doc/emacs/mini.texi
+++ b/doc/emacs/mini.texi
@@ -88,7 +88,7 @@ Find file: /u2/emacs/src//etc/termcap
@cindex slashes repeated in file name
@findex file-name-shadow-mode
Emacs interprets a double slash as ``ignore everything before the
-second slash in the pair.'' In the example above,
+second slash in the pair''. In the example above,
@file{/u2/emacs/src/} is ignored, so the argument you supplied is
@file{/etc/termcap}. The ignored part of the file name is dimmed if
the terminal allows it. (To disable this dimming, turn off File Name
diff --git a/doc/emacs/misc.texi b/doc/emacs/misc.texi
index 50b68767991..ecbcda1ce8a 100644
--- a/doc/emacs/misc.texi
+++ b/doc/emacs/misc.texi
@@ -1191,7 +1191,7 @@ that buffer.
line mode, Term basically acts like Shell mode (@pxref{Shell Mode}).
In char mode, each character is sent directly to the subshell, as
-``terminal input.'' Any ``echoing'' of your input is the
+``terminal input''. Any ``echoing'' of your input is the
responsibility of the subshell. The sole exception is the terminal
escape character, which by default is @kbd{C-c} (@pxref{Term Mode}).
Any ``terminal output'' from the subshell goes into the buffer,
@@ -2076,10 +2076,10 @@ Insert a byte with a code typed in octal.
Insert a byte with a code typed in hex.
@item C-x [
-Move to the beginning of a 1k-byte ``page.''
+Move to the beginning of a 1k-byte ``page''.
@item C-x ]
-Move to the end of a 1k-byte ``page.''
+Move to the end of a 1k-byte ``page''.
@item M-g
Move to an address specified in hex.
@@ -2149,7 +2149,7 @@ usually turned on.
However, this may be slow if there are a lot of buffers in the
desktop. You can specify the maximum number of buffers to restore
immediately with the variable @code{desktop-restore-eager}; the
-remaining buffers are restored ``lazily,'' when Emacs is idle.
+remaining buffers are restored ``lazily'', when Emacs is idle.
@findex desktop-clear
@vindex desktop-globals-to-clear
@@ -2481,8 +2481,8 @@ find the one you select (@code{ffap-menu}).
@findex animate-birthday-present
@cindex animate
- The @code{animate} package makes text dance. For an example, try
-@kbd{M-x animate-birthday-present}.
+ The @code{animate} package makes text dance (e.g. try
+@kbd{M-x animate-birthday-present}).
@findex blackbox
@findex mpuz
diff --git a/doc/emacs/modes.texi b/doc/emacs/modes.texi
index 52ecd37fcf2..a48299768a8 100644
--- a/doc/emacs/modes.texi
+++ b/doc/emacs/modes.texi
@@ -65,8 +65,7 @@ process (@pxref{Interactive Shell}).
first visit a file or create a buffer (@pxref{Choosing Modes}). You
can explicitly select a new major mode by using an @kbd{M-x} command.
Take the name of the mode and add @code{-mode} to get the name of the
-command to select that mode. Thus, you can enter Lisp mode with
-@kbd{M-x lisp-mode}.
+command to select that mode (e.g., @kbd{M-x lisp-mode} enters Lisp mode).
@vindex major-mode
The value of the buffer-local variable @code{major-mode} is a symbol
@@ -81,9 +80,9 @@ change this default value via the Customization interface (@pxref{Easy
Customization}), or by adding a line like this to your init file
(@pxref{Init File}):
-@smallexample
+@example
(setq-default major-mode 'text-mode)
-@end smallexample
+@end example
@noindent
If the default value of @code{major-mode} is @code{nil}, the major
@@ -216,8 +215,7 @@ in individual buffers. @xref{Faces}.
@findex linum-mode
@cindex Linum mode
@item
-Linum mode displays each line's line number in the window's left
-margin. Its mode command is @code{linum-mode}.
+Linum mode displays each line's line number in the window's left margin.
@item
Outline minor mode provides similar facilities to the major mode
diff --git a/doc/emacs/msdog-xtra.texi b/doc/emacs/msdog-xtra.texi
index af8882a1fd4..0d05c8ac9c6 100644
--- a/doc/emacs/msdog-xtra.texi
+++ b/doc/emacs/msdog-xtra.texi
@@ -548,7 +548,7 @@ when invoked with the @samp{-nw} option.
@cindex inferior processes under MS-DOS
@findex compile @r{(MS-DOS)}
@findex grep @r{(MS-DOS)}
- Because MS-DOS is a single-process ``operating system,''
+ Because MS-DOS is a single-process ``operating system'',
asynchronous subprocesses are not available. In particular, Shell
mode and its variants do not work. Most Emacs features that use
asynchronous subprocesses also don't work on MS-DOS, including
diff --git a/doc/emacs/mule.texi b/doc/emacs/mule.texi
index df2d687114b..35aee6b94a2 100644
--- a/doc/emacs/mule.texi
+++ b/doc/emacs/mule.texi
@@ -287,20 +287,17 @@ auto mode selection.
This includes the Emacs initialization
file, @file{.emacs}, and the initialization files of packages
such as Gnus. However, you can specify unibyte loading for a
-particular Lisp file, by adding an entry @samp{unibyte: t} in a file
-local variables section (@pxref{File Variables}). Then that file is
-always loaded as unibyte text. Note that this does not represent a
-real @code{unibyte} variable, rather it just acts as an indicator
-to Emacs in the same way as @code{coding} does (@pxref{Specify Coding}).
+particular Lisp file, by adding an entry @samp{coding: raw-text} in a file
+local variables section. @xref{Specify Coding}.
+Then that file is always loaded as unibyte text.
@ignore
@c I don't see the point of this statement:
The motivation for these conventions is that it is more reliable to
always load any particular Lisp file in the same way.
@end ignore
-Note also that this feature only applies to @emph{loading} Lisp files
-for evaluation, not to visiting them for editing. You can also load a
-Lisp file as unibyte, on any one occasion, by typing @kbd{C-x
-@key{RET} c raw-text @key{RET}} immediately before loading it.
+You can also load a Lisp file as unibyte, on any one occasion, by
+typing @kbd{C-x @key{RET} c raw-text @key{RET}} immediately before
+loading it.
@c See http://debbugs.gnu.org/11226 for lack of unibyte tooltip.
@vindex enable-multibyte-characters
@@ -350,7 +347,7 @@ to the Emacs session. The supported language environments
@cindex Euro sign
@cindex UTF-8
@quotation
-ASCII, Belarusian, Bengali, Brazilian Portuguese, Bulgarian,
+ASCII, Belarusian, Bengali, Brazilian Portuguese, Bulgarian, Cham,
Chinese-BIG5, Chinese-CNS, Chinese-EUC-TW, Chinese-GB, Chinese-GBK,
Chinese-GB18030, Croatian, Cyrillic-ALT, Cyrillic-ISO, Cyrillic-KOI8,
Czech, Devanagari, Dutch, English, Esperanto, Ethiopic, French,
@@ -991,12 +988,11 @@ and asks you to choose one of those coding systems.
behaves a bit differently. It additionally checks whether the
@c What determines this?
most-preferred coding system is recommended for use in MIME messages;
-if not, Emacs tells you that the most-preferred coding system is not
-recommended and prompts you for another coding system. This is so you
-won't inadvertently send a message encoded in a way that your
-recipient's mail software will have difficulty decoding. (You can
-still use an unsuitable coding system if you type its name in response
-to the question.)
+if not, it informs you of this fact and prompts you for another coding
+system. This is so you won't inadvertently send a message encoded in
+a way that your recipient's mail software will have difficulty
+decoding. (You can still use an unsuitable coding system if you enter
+its name at the prompt.)
@c It seems that select-message-coding-system does this.
@c Both sendmail.el and smptmail.el call it; i.e. smtpmail.el still
@@ -1337,6 +1333,7 @@ fontset}, the @dfn{startup fontset} and the @dfn{default fontset}.
@c FIXME? The doc of *standard*-fontset-spec says:
@c "You have the biggest chance to display international characters
@c with correct glyphs by using the *standard* fontset." (my emphasis)
+@c See http://lists.gnu.org/archive/html/emacs-devel/2012-04/msg00430.html
The default fontset is most likely to have fonts for a wide variety of
non-@acronym{ASCII} characters, and is the default fallback for the
other two fontsets, and if you set a default font rather than fontset.
@@ -1762,15 +1759,17 @@ non-@code{nil}, Emacs reorders characters that have right-to-left
directionality when they are displayed. The default value is
@code{t}.
+@cindex base direction of paragraphs
+@cindex paragraph, base direction
Each paragraph of bidirectional text can have its own @dfn{base
direction}, either right-to-left or left-to-right. (Paragraph
@c paragraph-separate etc have no influence on this?
boundaries are empty lines, i.e.@: lines consisting entirely of
-whitespace characters.) Text in left-to-right paragraphs begins at
-the left margin of the window and is truncated or continued when it
-reaches the right margin. By contrast, text in right-to-left
-paragraphs begins at the right margin and is continued or truncated at
-the left margin.
+whitespace characters.) Text in left-to-right paragraphs begins on
+the screen at the left margin of the window and is truncated or
+continued when it reaches the right margin. By contrast, text in
+right-to-left paragraphs is displayed starting at the right margin and
+is continued or truncated at the left margin.
@vindex bidi-paragraph-direction
Emacs determines the base direction of each paragraph dynamically,
diff --git a/doc/emacs/picture-xtra.texi b/doc/emacs/picture-xtra.texi
index 5a10bf2c31c..edf75f078d5 100644
--- a/doc/emacs/picture-xtra.texi
+++ b/doc/emacs/picture-xtra.texi
@@ -199,7 +199,7 @@ C-b} (@code{picture-motion-reverse}) moves in the opposite direction.
With no argument, it moves to a point underneath the next
``interesting'' character that follows whitespace in the previous
nonblank line. ``Next'' here means ``appearing at a horizontal position
-greater than the one point starts out at.'' With an argument, as in
+greater than the one point starts out at''. With an argument, as in
@kbd{C-u M-@key{TAB}}, this command moves to the next such interesting
character in the current line. @kbd{M-@key{TAB}} does not change the
text; it only moves point. ``Interesting'' characters are defined by
diff --git a/doc/emacs/programs.texi b/doc/emacs/programs.texi
index 5f7abcf3881..b7f21e8a93c 100644
--- a/doc/emacs/programs.texi
+++ b/doc/emacs/programs.texi
@@ -9,7 +9,7 @@
@cindex program editing
This chapter describes Emacs features for facilitating editing
-programs. Some of these features can:
+programs. Some of the things these features can do are:
@itemize @bullet
@item
@@ -128,8 +128,7 @@ IDL/Pike/AWK (@pxref{Top, , CC Mode, ccmode, CC Mode}), and IDLWAVE
@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.
+Fortran mode, @pxref{Fortran,,, emacs-xtra, Specialized Emacs Features}.
@end ifnotinfo
@node Defuns
@@ -186,15 +185,13 @@ delimiter from starting a defun. Here's an example:
highlights confusing opening delimiters (those that ought to be
quoted) in bold red.
+@vindex open-paren-in-column-0-is-defun-start
If you need to override this convention, you can do so by setting
-this user option:
-
-@defvar open-paren-in-column-0-is-defun-start
+the variable @code{open-paren-in-column-0-is-defun-start}.
If this user option is set to @code{t} (the default), opening
-parentheses or braces at column zero always start defuns. When it's
+parentheses or braces at column zero always start defuns. When it is
@code{nil}, defuns are found by searching for parens or braces at the
outermost level.
-@end defvar
Usually, you should leave this option at its default value of
@code{t}. If your buffer contains parentheses or braces in column
@@ -1109,7 +1106,7 @@ You can also use @kbd{M-x info-lookup-file} to look for documentation
for a file name.
If you use @kbd{C-h S} in a major mode that does not support it,
-it asks you to specify the ``symbol help mode.'' You should enter
+it asks you to specify the ``symbol help mode''. You should enter
a command such as @code{c-mode} that would select a major
mode which @kbd{C-h S} does support.
@@ -1451,7 +1448,7 @@ with the Foldout package (@pxref{Foldout}).
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.'')
+(These are called ``C mode and related modes''.)
@ifinfo
@xref{Top,, CC Mode, ccmode, CC Mode}, for more details.
@end ifinfo
@@ -1553,8 +1550,8 @@ after the mode name:
@kindex C-c C-l @r{(C mode)}
@findex c-toggle-electric-state
Toggle electric action (@code{c-toggle-electric-state}). With a
-prefix argument, this command enables electric action if the argument
-is positive, disables it if it is negative.
+positive prefix argument, this command enables electric action, with a
+negative one it disables it.
@end table
Electric characters insert newlines only when, in addition to the
@@ -1591,8 +1588,7 @@ preprocessor commands.
@findex c-hungry-delete-backwards
@kindex C-c C-@key{DEL} (C Mode)
@kindex C-c @key{DEL} (C Mode)
-@code{c-hungry-delete-backwards}---Delete the entire block of whitespace
-preceding point.
+Delete the entire block of whitespace preceding point (@code{c-hungry-delete-backwards}).
@item C-c C-d
@itemx C-c C-@key{DELETE}
@@ -1601,8 +1597,7 @@ preceding point.
@kindex C-c C-d (C Mode)
@kindex C-c C-@key{DELETE} (C Mode)
@kindex C-c @key{DELETE} (C Mode)
-@code{c-hungry-delete-forward}---Delete the entire block of whitespace
-following point.
+Delete the entire block of whitespace after point (@code{c-hungry-delete-forward}).
@end table
As an alternative to the above commands, you can enable @dfn{hungry
@@ -1615,9 +1610,7 @@ preceding whitespace, not just one space, and a single @kbd{C-c C-d}
@item M-x c-toggle-hungry-state
@findex c-toggle-hungry-state
Toggle the hungry-delete feature
-(@code{c-toggle-hungry-state})@footnote{This command had the binding
-@kbd{C-c C-d} in earlier versions of Emacs. @kbd{C-c C-d} is now
-bound to @code{c-hungry-delete-forward}.}. With a prefix argument,
+(@code{c-toggle-hungry-state}). With a prefix argument,
this command turns the hungry-delete feature on if the argument is
positive, and off if it is negative.
@end table
@@ -1656,11 +1649,11 @@ needs a binding to be useful. The following code will bind it to
@kbd{C-j}. We use @code{c-initialization-hook} here to make sure
the keymap is loaded before we try to change it.
-@smallexample
+@example
(defun my-bind-clb ()
(define-key c-mode-base-map "\C-j" 'c-context-line-break))
(add-hook 'c-initialization-hook 'my-bind-clb)
-@end smallexample
+@end example
@item C-M-h
Put mark at the end of a function definition, and put point at the
diff --git a/doc/emacs/rmail.texi b/doc/emacs/rmail.texi
index 3b3605f800c..3938712a5e9 100644
--- a/doc/emacs/rmail.texi
+++ b/doc/emacs/rmail.texi
@@ -1232,9 +1232,9 @@ rmail-epa-decrypt} to decrypt it, using the EasyPG library
Address mode:
@c FIXME goto-addr.el commentary says to use goto-address instead.
-@smallexample
+@example
(add-hook 'rmail-show-message-hook 'goto-address-mode)
-@end smallexample
+@end example
@noindent
Then you can browse these URLs by clicking on them with @kbd{Mouse-2}
@@ -1355,7 +1355,7 @@ your Rmail file (@pxref{Rmail Inbox}). When loaded for the first time,
Rmail attempts to locate the @code{movemail} program and determine its
version. There are two versions of the @code{movemail} program: the
native one, shipped with GNU Emacs (the ``emacs version'') and the one
-included in GNU mailutils (the ``mailutils version,''
+included in GNU mailutils (the ``mailutils version'',
@pxref{movemail,,,mailutils,GNU mailutils}). They support the same
command line syntax and the same basic subset of options. However, the
Mailutils version offers additional features.
diff --git a/doc/emacs/search.texi b/doc/emacs/search.texi
index 38f00f03532..152ac605843 100644
--- a/doc/emacs/search.texi
+++ b/doc/emacs/search.texi
@@ -146,7 +146,7 @@ you don't like this feature, you can disable it by setting
After exiting a search, you can search for the same string again by
typing just @kbd{C-s C-s}. The first @kbd{C-s} is the key that
invokes incremental search, and the second @kbd{C-s} means ``search
-again.'' Similarly, @kbd{C-r C-r} searches backward for the last
+again''. Similarly, @kbd{C-r C-r} searches backward for the last
search string. In determining the last search string, it doesn't
matter whether the string was searched for with @kbd{C-s} or
@kbd{C-r}.
@@ -456,7 +456,7 @@ apply to the lazy highlight, which always matches whole words.
@cindex search for a regular expression
A @dfn{regular expression} (or @dfn{regexp} for short) is a pattern
-that denotes a class of alternative strings to match. GNU Emacs
+that denotes a class of alternative strings to match. Emacs
provides both incremental and nonincremental ways to search for a
match for a regexp. The syntax of regular expressions is explained in
the next section.
@@ -552,7 +552,7 @@ therefore @samp{f} is a regular expression that matches the string
@samp{ff}.) Likewise, @samp{o} is a regular expression that matches
only @samp{o}. (When case distinctions are being ignored, these regexps
also match @samp{F} and @samp{O}, but we consider this a generalization
-of ``the same string,'' rather than an exception.)
+of ``the same string'', rather than an exception.)
Any two regular expressions @var{a} and @var{b} can be concatenated.
The result is a regular expression which matches a string if @var{a}
@@ -801,7 +801,7 @@ After the end of a @samp{\( @dots{} \)} construct, the matcher remembers
the beginning and end of the text matched by that construct. Then,
later on in the regular expression, you can use @samp{\} followed by the
digit @var{d} to mean ``match the same text matched the @var{d}th time
-by the @samp{\( @dots{} \)} construct.''
+by the @samp{\( @dots{} \)} construct''.
The strings matching the first nine @samp{\( @dots{} \)} constructs
appearing in a regular expression are assigned numbers 1 through 9 in
@@ -1030,7 +1030,7 @@ it can refer to all or part of what is matched by the @var{regexp}.
@samp{\&} in @var{newstring} stands for the entire match being
replaced. @samp{\@var{d}} in @var{newstring}, where @var{d} is a
digit, stands for whatever matched the @var{d}th parenthesized
-grouping in @var{regexp}. (This is called a ``back reference.'')
+grouping in @var{regexp}. (This is called a ``back reference''.)
@samp{\#} refers to the count of replacements already made in this
command, as a decimal number. In the first replacement, @samp{\#}
stands for @samp{0}; in the second, for @samp{1}; and so on. For
diff --git a/doc/emacs/text.texi b/doc/emacs/text.texi
index e56b00e2723..90f4732079b 100644
--- a/doc/emacs/text.texi
+++ b/doc/emacs/text.texi
@@ -379,8 +379,8 @@ delimited once again. The reason @kbd{C-x C-p} includes only the
following page delimiter in the region is to ensure that.
A numeric argument to @kbd{C-x C-p} specifies which page to go to,
-relative to the current one. Zero means the current page. One means
-the next page, and @minus{}1 means the previous one.
+relative to the current one. Zero means the current page, one
+the next page, and @minus{}1 the previous one.
@kindex C-x l
@findex count-lines-page
@@ -412,7 +412,7 @@ beginning of a line.
specified width. Emacs does filling in two ways. In Auto Fill mode,
inserting text with self-inserting characters also automatically fills
it. There are also explicit fill commands that you can use when editing
-text leaves it unfilled.
+text.
@menu
* Auto Fill:: Auto Fill mode breaks long lines automatically.
@@ -1240,6 +1240,7 @@ quad click: exit all folds and hide text.
@end itemize
@end table
+@c FIXME not marked as a user variable
@vindex foldout-mouse-modifiers
You can specify different modifier keys (instead of
@kbd{Control-Meta-}) by setting @code{foldout-mouse-modifiers}; but if
@@ -1248,7 +1249,7 @@ it in order for this to take effect.
To use the Foldout package, you can type @kbd{M-x load-library
@key{RET} foldout @key{RET}}; or you can arrange for to do that
-automatically by putting this in your init file (@pxref{Init File}):
+automatically by putting the following in your init file:
@example
(eval-after-load "outline" '(require 'foldout))
@@ -1307,8 +1308,8 @@ with @kbd{M-<left>} (@code{org-metaleft}) and @kbd{M-<right>}
if invoked on a body line.
The following subsections give basic instructions for using Org mode
-as an organizer and as an authoring system. @xref{Top,The Org Mode
-Manual,,org, The Org Manual}, for details.
+as an organizer and as an authoring system. For details, @pxref{Top,
+The Org Mode Manual, Introduction, org, The Org Manual}.
@menu
* Org Organizer:: Managing TODO lists and agendas.
@@ -1886,8 +1887,8 @@ the tag at point.
@kindex C-c / @r{(SGML mode)}
@findex sgml-close-tag
Insert a close tag for the innermost unterminated tag
-(@code{sgml-close-tag}). If called from within a tag or a comment,
-close this element instead of inserting a close tag.
+(@code{sgml-close-tag}). If called within a tag or a comment,
+close it instead of inserting a close tag.
@item C-c 8
@kindex C-c 8 @r{(SGML mode)}
@@ -1948,10 +1949,10 @@ always insert explicit closing tags as well.
@cindex nroff
@findex nroff-mode
@vindex nroff-mode-hook
- Nroff mode is a major mode derived from Text mode, which is
+ Nroff mode, a major mode derived from Text mode, 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}
+hook @code{text-mode-hook}, then @code{nroff-mode-hook}
(@pxref{Hooks}).
In Nroff mode, nroff command lines are treated as paragraph
@@ -2209,7 +2210,7 @@ for the right or left margin of a paragraph or a part of a paragraph.
These margins also affect fill commands such as @kbd{M-q}
(@pxref{Filling}).
- The Indentation submenu of Text Properties provides four commands
+ The Indentation submenu of Text Properties offers commands
for specifying indentation:
@table @code
@@ -2292,10 +2293,9 @@ commands do nothing on text with this setting. You can, however,
still indent the left margin.
@end table
+@vindex default-justification
You can also specify justification styles using the Justification
submenu in the Text Properties menu.
-
-@vindex default-justification
The default justification style is specified by the per-buffer
variable @code{default-justification}. Its value should be one of the
symbols @code{left}, @code{right}, @code{full}, @code{center}, or
@@ -2578,10 +2578,12 @@ to @code{nil}.
@findex table-insert-row
@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
+the new row. To insert a row 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.
+bottom edge. You can insert more than one row at a time by using a
+numeric prefix argument.
+
+@c A numeric prefix argument specifies the number of rows to insert.
@findex table-insert-column
Similarly, @kbd{M-x table-insert-column} inserts a column of cells
diff --git a/doc/emacs/trouble.texi b/doc/emacs/trouble.texi
index b118295ab1a..3bbdecc0176 100644
--- a/doc/emacs/trouble.texi
+++ b/doc/emacs/trouble.texi
@@ -534,16 +534,16 @@ large, and Emacs displays @samp{I feel pretty today}. The bug report
would need to provide all that information. You should not assume
that the problem is due to the size of the file and say, ``I visited a
large file, and Emacs displayed @samp{I feel pretty today}.'' This is
-what we mean by ``guessing explanations.'' The problem might be due
+what we mean by ``guessing explanations''. The problem might be due
to the fact that there is a @samp{z} in the file name. If this is so,
then when we got your report, we would try out the problem with some
-``large file,'' probably with no @samp{z} in its name, and not see any
+``large file'', probably with no @samp{z} in its name, and not see any
problem. There is no way we could guess that we should try visiting a
file with a @samp{z} in its name.
You should not even say ``visit a file'' instead of @kbd{C-x C-f}.
Similarly, rather than saying ``if I have three characters on the
-line,'' say ``after I type @kbd{@key{RET} A B C @key{RET} C-p},'' if
+line'', say ``after I type @kbd{@key{RET} A B C @key{RET} C-p}'', if
that is the way you entered the text.
If possible, try quickly to reproduce the bug by invoking Emacs with
@@ -731,7 +731,7 @@ you can copy its output from the @file{*Messages*} buffer.
@item
A description of what behavior you observe that you believe is
-incorrect. For example, ``The Emacs process gets a fatal signal,'' or,
+incorrect. For example, ``The Emacs process gets a fatal signal'', or,
``The resulting text is as follows, which I think is wrong.''
Of course, if the bug is that Emacs gets a fatal signal, then one can't
@@ -872,7 +872,7 @@ More detailed advice and other useful techniques for debugging Emacs
are available in the file @file{etc/DEBUG} in the Emacs distribution.
That file also includes instructions for investigating problems
whereby Emacs stops responding (many people assume that Emacs is
-``hung,'' whereas in fact it might be in an infinite loop).
+``hung'', whereas in fact it might be in an infinite loop).
To find the file @file{etc/DEBUG} in your Emacs installation, use the
directory name stored in the variable @code{data-directory}.
diff --git a/doc/emacs/windows.texi b/doc/emacs/windows.texi
index ee0f0027454..72e01a368a1 100644
--- a/doc/emacs/windows.texi
+++ b/doc/emacs/windows.texi
@@ -151,7 +151,7 @@ selects the window without moving point in it.
@kindex C-x o
@findex other-window
With the keyboard, you can switch windows by typing @kbd{C-x o}
-(@code{other-window}). That is an @kbd{o}, for ``other,'' not a zero.
+(@code{other-window}). That is an @kbd{o}, for ``other'', not a zero.
When there are more than two windows, this command moves through all the
windows in a cyclic order, generally top to bottom and left to right.
After the rightmost and bottommost window, it goes back to the one at
@@ -452,7 +452,7 @@ buffer. @xref{Follow Mode}.
The Windmove package defines commands for moving directionally
between neighboring windows in a frame. @kbd{M-x windmove-right}
selects the window immediately to the right of the currently selected
-one, and similarly for the ``left,'' ``up,'' and ``down''
+one, and similarly for the ``left'', ``up'', and ``down''
counterparts. @kbd{M-x windmove-default-keybindings} binds these
commands to @kbd{S-right} etc.; doing so disables shift selection for
those keys (@pxref{Shift Selection}).
diff --git a/doc/emacs/xresources.texi b/doc/emacs/xresources.texi
index 66281d6dbbb..b99c98d84e0 100644
--- a/doc/emacs/xresources.texi
+++ b/doc/emacs/xresources.texi
@@ -47,7 +47,7 @@ its own list of resources; to update it, use the command
@command{xrdb}---for instance, @samp{xrdb ~/.Xdefaults}.
@cindex registry, setting resources (MS-Windows)
- (MS-Windows systems do not support X resource files; on Windows,
+ (MS-Windows systems do not support X resource files; on such systems,
Emacs looks for X resources in the Windows Registry, first under the
key @samp{HKEY_CURRENT_USER\SOFTWARE\GNU\Emacs}, which affects only
the current user and override the system-wide settings, and then under
diff --git a/doc/lispintro/ChangeLog b/doc/lispintro/ChangeLog
index d9ebf07952c..126c10c4342 100644
--- a/doc/lispintro/ChangeLog
+++ b/doc/lispintro/ChangeLog
@@ -1,3 +1,30 @@
+2012-05-12 Glenn Morris <rgm@gnu.org>
+
+ * Makefile.in (MKDIR_P): New, set by configure.
+ (mkinfodir): Use $MKDIR_P.
+
+2012-05-05 Glenn Morris <rgm@gnu.org>
+
+ * emacs-lisp-intro.texi (Making Errors): Don't mention Emacs 20.
+ (Void Function, Wrong Type of Argument, Recursion with list)
+ (Simple Extension): Assume a non-ancient Emacs.
+ (Void Variable, Switching Buffers): Improve page breaks.
+
+ * emacs-lisp-intro.texi: Update GNU Press contact details.
+
+2012-05-04 Glenn Morris <rgm@gnu.org>
+
+ * Makefile.in (INFO_EXT, INFO_OPTS): New, set by configure.
+ (info, infoclean): Use $INFO_EXT.
+ (${infodir}/eintr$(INFO_EXT)): Use $INFO_EXT and $INFO_OPT.
+ * makefile.w32-in (INFO_EXT, INFO_OPTS): New.
+ (INFO_TARGETS, clean): Use $INFO_EXT.
+ ($(infodir)/eintr$(INFO_EXT)): Use $INFO_EXT and $INFO_OPT.
+
+2012-05-02 Glenn Morris <rgm@gnu.org>
+
+ * emacs-lisp-intro.texi (Syntax): Reword to avoid underfull hbox.
+
2012-04-14 Glenn Morris <rgm@gnu.org>
* Makefile.in: Replace non-portable use of $< in ordinary rules.
@@ -498,7 +525,7 @@
;; coding: utf-8
;; End:
- Copyright (C) 2001-2012 Free Software Foundation, Inc.
+ Copyright (C) 2001-2012 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/doc/lispintro/Makefile.in b/doc/lispintro/Makefile.in
index c638dd6135f..bf10e5c73b7 100644
--- a/doc/lispintro/Makefile.in
+++ b/doc/lispintro/Makefile.in
@@ -26,6 +26,12 @@ infodir = $(srcdir)/../../info
# Directory with the (customized) texinfo.tex file.
texinfodir = $(srcdir)/../misc
+MKDIR_P = @MKDIR_P@
+
+INFO_EXT=@INFO_EXT@
+# Options used only when making info output.
+INFO_OPTS=@INFO_OPTS@
+
MAKEINFO = @MAKEINFO@
MAKEINFO_OPTS = --force -I $(srcdir)
TEXI2DVI = texi2dvi
@@ -35,11 +41,11 @@ DVIPS = dvips
ENVADD = TEXINPUTS="$(srcdir):$(texinfodir):$(TEXINPUTS)" \
MAKEINFO="$(MAKEINFO) $(MAKEINFO_OPTS)"
-mkinfodir = @test -d ${infodir} || mkdir ${infodir} || test -d ${infodir}
+mkinfodir = @${MKDIR_P} ${infodir}
.PHONY: info dvi html pdf ps
-info: ${infodir}/eintr
+info: ${infodir}/eintr$(INFO_EXT)
dvi: emacs-lisp-intro.dvi
html: emacs-lisp-intro.html
@@ -49,9 +55,9 @@ ps: emacs-lisp-intro.ps
# The file name eintr must fit within 5 characters, to allow for
# -NN extensions to fit into DOS 8+3 limits without clashing.
# Note: "<" is not portable in ordinary make rules.
-${infodir}/eintr: ${srcdir}/emacs-lisp-intro.texi
+${infodir}/eintr$(INFO_EXT): ${srcdir}/emacs-lisp-intro.texi
$(mkinfodir)
- $(MAKEINFO) $(MAKEINFO_OPTS) -o $@ ${srcdir}/emacs-lisp-intro.texi
+ $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ ${srcdir}/emacs-lisp-intro.texi
emacs-lisp-intro.dvi: ${srcdir}/emacs-lisp-intro.texi
$(ENVADD) $(TEXI2DVI) ${srcdir}/emacs-lisp-intro.texi
@@ -79,7 +85,7 @@ clean: mostlyclean
distclean: clean
infoclean:
- -cd $(infodir) && rm -f eintr eintr-[1-9]
+ -cd $(infodir) && rm -f eintr$(INFO_EXT) eintr$(INFO_EXT)-[1-9]
maintainer-clean: distclean infoclean
diff --git a/doc/lispintro/emacs-lisp-intro.texi b/doc/lispintro/emacs-lisp-intro.texi
index 6a9927b785f..9446333db2a 100644
--- a/doc/lispintro/emacs-lisp-intro.texi
+++ b/doc/lispintro/emacs-lisp-intro.texi
@@ -234,27 +234,27 @@ Copyright @copyright{} 1990-1995, 1997, 2001-2012 Free Software Foundation, Inc.
@iftex
Published by the:@*
-GNU Press, @hfill @uref{http://www.gnupress.org}@*
-a division of the @hfill General: @email{press@@gnu.org}@*
-Free Software Foundation, Inc. @hfill Orders:@w{ } @email{sales@@gnu.org}@*
-51 Franklin Street, Fifth Floor @hfill Tel: +1 (617) 542-5942@*
-Boston, MA 02110-1301 USA @hfill Fax: +1 (617) 542-2652@*
+GNU Press, @hfill @uref{http://www.fsf.org/campaigns/gnu-press/}@*
+a division of the @hfill email: @email{sales@@fsf.org}@*
+Free Software Foundation, Inc. @hfill Tel: +1 (617) 542-5942@*
+51 Franklin Street, Fifth Floor @hfill Fax: +1 (617) 542-2652@*
+Boston, MA 02110-1301 USA
@end iftex
@ifnottex
Published by the:
@example
-GNU Press, Website: http://www.gnupress.org
-a division of the General: press@@gnu.org
-Free Software Foundation, Inc. Orders: sales@@gnu.org
-51 Franklin Street, Fifth Floor Tel: +1 (617) 542-5942
-Boston, MA 02110-1301 USA Fax: +1 (617) 542-2652
+GNU Press, http://www.fsf.org/campaigns/gnu-press/
+a division of the email: sales@@fsf.org
+Free Software Foundation, Inc. Tel: +1 (617) 542-5942
+51 Franklin Street, Fifth Floor Fax: +1 (617) 542-2652
+Boston, MA 02110-1301 USA
@end example
@end ifnottex
@sp 1
-@c Printed copies are available for $30 each.@*
+@c Printed copies are available from @uref{http://shop.fsf.org/} for $35 each.@*
ISBN 1-882114-43-4
Permission is granted to copy, distribute and/or modify this document
@@ -1084,6 +1084,14 @@ Robert J. Chassell
\fi
@end tex
+@c Note: this resetting of the page number back to 1 causes TeX to gripe
+@c about already having seen page numbers 1-4 before (in the preface):
+@c pdfTeX warning (ext4): destination with the same identifier (name{1})
+@c has been already used, duplicate ignored
+@c I guess that is harmless (what happens if a later part of the text
+@c makes a link to something in the first 4 pages though?).
+@c Note that eg the Emacs manual has a preface, but does not bother
+@c resetting the page numbers back to 1 after that.
@iftex
@headings off
@evenheading @thispage @| @| @thischapter
@@ -1418,6 +1426,7 @@ C-e}:
(this is an unquoted list)
@end smallexample
+@ignore
@noindent
What you see depends on which version of Emacs you are running. GNU
Emacs version 22 provides more information than version 20 and before.
@@ -1428,6 +1437,10 @@ earlier, version 20 result.
@noindent
In GNU Emacs version 22, a @file{*Backtrace*} window will open up and
you will see the following in it:
+@end ignore
+
+A @file{*Backtrace*} window will open up and you should see the
+following in it:
@smallexample
@group
@@ -1506,19 +1519,24 @@ evaluating @code{(+ 2 2)}, we can infer that the symbol @code{+} must
have a set of instructions for the computer to obey and those
instructions must be to add the numbers that follow the @code{+}.
-@need 1250
-In GNU Emacs version 20, and in earlier versions, you will see only
-one line of error message; it will appear in the echo area and look
-like this:
+It is possible to prevent Emacs entering the debugger in cases like
+this. We do not explain how to do that here, but we will mention what
+the result looks like, because you may encounter a similar situation
+if there is a bug in some Emacs code that you are using. In such
+cases, you will see only one line of error message; it will appear in
+the echo area and look like this:
@smallexample
Symbol's function definition is void:@: this
@end smallexample
@noindent
+@ignore
(Also, your terminal may beep at you---some do, some don't; and others
-blink. This is just a device to get your attention.) The message goes
-away as soon as you type another key, even just to move the cursor.
+blink. This is just a device to get your attention.)
+@end ignore
+The message goes away as soon as you type a key, even just to
+move the cursor.
We know the meaning of the word @samp{Symbol}. It refers to the first
atom of the list, the word @samp{this}. The word @samp{function}
@@ -1854,8 +1872,7 @@ Try evaluating this:
@need 1250
@noindent
-In GNU Emacs version 22, you will create a @file{*Backtrace*} buffer
-that says:
+You will create a @file{*Backtrace*} buffer that says:
@smallexample
@group
@@ -1921,7 +1938,7 @@ Debugger entered--Lisp error: (void-variable +)
@end smallexample
@noindent
-(As with the other times we entered the debugger, you can quit by
+(Again, you can quit the debugger by
typing @kbd{q} in the @file{*Backtrace*} buffer.)
This backtrace is different from the very first error message we saw,
@@ -1935,7 +1952,7 @@ interpreter to evaluate the @code{+} and look for the value of the
variable instead of the function definition. We did this by placing the
cursor right after the symbol rather than after the parenthesis of the
enclosing list as we did before. As a consequence, the Lisp interpreter
-evaluated the preceding s-expression, which in this case was the
+evaluated the preceding s-expression, which in this case was
@code{+} by itself.
Since @code{+} does not have a value bound to it, just the function
@@ -2175,8 +2192,7 @@ is that @code{+} has tried to add the 2 to the value returned by
could not carry out its addition.
@need 1250
-In GNU Emacs version 22, you will create and enter a
-@file{*Backtrace*} buffer that says:
+You will create and enter a @file{*Backtrace*} buffer that says:
@noindent
@smallexample
@@ -2904,7 +2920,7 @@ rather, to save typing, you probably only typed @kbd{RET} if the
default buffer was @file{*scratch*}, or if it was different, then you
typed just part of the name, such as @code{*sc}, pressed your
@kbd{TAB} key to cause it to expand to the full name, and then typed
-your @kbd{RET} key.} when prompted in the minibuffer for the name of
+@kbd{RET}.} when prompted in the minibuffer for the name of
the buffer to which you wanted to switch. The keystrokes, @kbd{C-x
b}, cause the Lisp interpreter to evaluate the interactive function
@code{switch-to-buffer}. As we said before, this is how Emacs works:
@@ -2914,10 +2930,7 @@ different keystrokes call or run different functions. For example,
By writing @code{switch-to-buffer} in an expression, and giving it a
buffer to switch to, we can switch buffers just the way @kbd{C-x b}
-does.
-
-@need 1000
-Here is the Lisp expression:
+does:
@smallexample
(switch-to-buffer (other-buffer))
@@ -7714,6 +7727,7 @@ retrieved. @xref{Yanking, , Yanking Text Back}.
@section @code{zap-to-char}
@findex zap-to-char
+@c FIXME remove obsolete stuff
The @code{zap-to-char} function changed little between GNU Emacs
version 19 and GNU Emacs version 22. However, @code{zap-to-char}
calls another function, @code{kill-region}, which enjoyed a major
@@ -11500,9 +11514,10 @@ The example of a @code{while} loop that printed the elements of a list
of numbers can be written recursively. Here is the code, including
an expression to set the value of the variable @code{animals} to a list.
-If you are using GNU Emacs 20 or before, this example must be copied
-to the @file{*scratch*} buffer and each expression must be evaluated
-there. Use @kbd{C-u C-x C-e} to evaluate the
+If you are reading this in Info in Emacs, you can evaluate this
+expression directly in Info. Otherwise, you must copy the example
+to the @file{*scratch*} buffer and evaluate each expression there.
+Use @kbd{C-u C-x C-e} to evaluate the
@code{(print-elements-recursively animals)} expression so that the
results are printed in the buffer; otherwise the Lisp interpreter will
try to squeeze the results into the one line of the echo area.
@@ -11511,9 +11526,6 @@ Also, place your cursor immediately after the last closing parenthesis
of the @code{print-elements-recursively} function, before the comment.
Otherwise, the Lisp interpreter will try to evaluate the comment.
-If you are using a more recent version of Emacs, you can evaluate this
-expression directly in Info.
-
@findex print-elements-recursively
@smallexample
@group
@@ -14855,7 +14867,7 @@ action would serve our purpose, except that a hyphen is merely the
most common character within symbols that is not typically a word
constituent character; there are others, too.
-Alternatively, we can redefine the regular expression used in the
+Alternatively, we can redefine the regexp used in the
@code{@value{COUNT-WORDS}} definition so as to include symbols. This
procedure has the merit of clarity, but the task is a little tricky.
@@ -17941,7 +17953,7 @@ the following conditional:
@end group
@end smallexample
-For example, in contrast to version 20, more recent versions blink
+For example, recent versions blink
their cursors by default. I hate such blinking, as well as other
features, so I placed the following in my @file{.emacs}
file@footnote{When I start instances of Emacs that do not load my
diff --git a/doc/lispintro/makefile.w32-in b/doc/lispintro/makefile.w32-in
index a8aaf43096e..ea9b04b87ca 100644
--- a/doc/lispintro/makefile.w32-in
+++ b/doc/lispintro/makefile.w32-in
@@ -1,6 +1,6 @@
#### -*- Makefile -*- for the Emacs Lisp Introduction manual.
-# Copyright (C) 2003-2012 Free Software Foundation, Inc.
+# Copyright (C) 2003-2012 Free Software Foundation, Inc.
# This file is part of GNU Emacs.
@@ -24,10 +24,12 @@ infodir = $(srcdir)/../../info
# Directory with the (customized) texinfo.tex file.
texinfodir = $(srcdir)/../misc
+INFO_EXT=.info
+INFO_OPTS=--no-split
INFO_SOURCES = $(srcdir)/emacs-lisp-intro.texi $(srcdir)/doclicense.texi
# The file name eintr must fit within 5 characters, to allow for
# -NN extensions to fit into DOS 8+3 limits without clashing
-INFO_TARGETS = $(infodir)/eintr
+INFO_TARGETS = $(infodir)/eintr$(INFO_EXT)
DVI_TARGETS = emacs-lisp-intro.dvi
MAKEINFO = makeinfo
@@ -47,8 +49,8 @@ $(infodir)/dir:
dvi: $(DVI_TARGETS)
-$(infodir)/eintr: $(INFO_SOURCES)
- $(MAKEINFO) -o $@ $(srcdir)/emacs-lisp-intro.texi
+$(infodir)/eintr$(INFO_EXT): $(INFO_SOURCES)
+ $(MAKEINFO) $(INFO_OPTS) -o $@ $(srcdir)/emacs-lisp-intro.texi
emacs-lisp-intro.dvi: $(INFO_SOURCES)
$(ENVADD) $(TEXI2DVI) $(srcdir)/emacs-lisp-intro.texi
@@ -66,7 +68,7 @@ mostlyclean:
- $(DEL) *.log *.cp *.fn *.ky *.pg *.vr *.tp
clean: mostlyclean
- - $(DEL) *.dvi $(infodir)/eintr*
+ - $(DEL) *.dvi $(infodir)/eintr$(INFO_EXT)*
distclean: clean
- $(DEL) makefile
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog
index cc5660653f6..c3b50dbdcd5 100644
--- a/doc/lispref/ChangeLog
+++ b/doc/lispref/ChangeLog
@@ -1,3 +1,186 @@
+2012-05-12 Glenn Morris <rgm@gnu.org>
+
+ * Makefile.in (MKDIR_P): New, set by configure.
+ (mkinfodir): Use $MKDIR_P.
+
+2012-05-10 Glenn Morris <rgm@gnu.org>
+
+ * loading.texi (Loading Non-ASCII): Replace the obsolete "unibyte: t"
+ with "coding: raw-text".
+ Concept of multibyte sessions no longer exists.
+
+ * files.texi (File Locks): Mention create-lockfiles option.
+
+2012-05-09 Glenn Morris <rgm@gnu.org>
+
+ * vol1.texi, vol2.texi: Remove files.
+ * elisp.texi: Add VOL1,2 conditionals equivalent to vol1,2.texi
+ * two-volume.make: Use elisp.texi as input rather than vol1,2.texi.
+
+ * Makefile.in (clean, mostlyclean): Add some more vol1/2 items.
+
+ * two-volume.make (emacsdir): New.
+ (tex): Add directory with emacsver.texi to TEXINPUTS.
+
+ * minibuf.texi (Minibuffer History, Basic Completion):
+ Tweak page breaks.
+
+ * internals.texi (Garbage Collection, Memory Usage)
+ (Writing Emacs Primitives): Tweak page breaks.
+
+ * streams.texi (Output Variables): Improve page break.
+
+ * edebug.texi (Edebug Display Update): Improve page break.
+
+ * compile.texi (Disassembly): Condense the examples.
+
+ * eval.texi, functions.texi, loading.texi, macros.texi:
+ Where possible, use example rather than smallexample.
+
+ * symbols.texi: Where possible, use example rather than smallexample.
+ (Symbol Components): Fix typo.
+ (Other Plists): Tweak page break.
+
+ * sequences.texi (Arrays): Tweak page breaks.
+
+ * customize.texi: Where possible, use example rather than smallexample.
+ (Common Keywords, Variable Definitions, Applying Customizations)
+ (Custom Themes): Tweak page breaks.
+
+ * control.texi: Where possible, use example rather than smallexample.
+ (Sequencing, Conditionals, Signaling Errors, Handling Errors):
+ Tweak page breaks.
+
+2012-05-08 Glenn Morris <rgm@gnu.org>
+
+ * two.el: Remove; unused since creation of two-volume.make.
+
+ * vol1.texi, vol2.texi: No need to keep menus in these files.
+
+2012-05-05 Glenn Morris <rgm@gnu.org>
+
+ * objects.texi (Process Type, Overlay Type): Tweak page-breaks.
+
+ * intro.texi (Caveats): Copyedit.
+ (Lisp History): Convert inforef to xref.
+ (Lisp History, Printing Notation, Version Info): Improve page-breaks.
+
+ * text.texi (Auto Filling): Don't mention Emacs 19.
+
+ * commands.texi (Event Input Misc): Don't mention unread-command-char.
+ * numbers.texi (Predicates on Numbers): Don't mention Emacs 18.
+
+ * elisp.texi (DATE): Forgot to change the month in 2012-04-21 change.
+
+ * lists.texi (List-related Predicates, List Variables):
+ Tweak page-breaks.
+ (Sets And Lists): Convert inforef to xref.
+
+2012-05-04 Glenn Morris <rgm@gnu.org>
+
+ * Makefile.in (INFO_EXT, INFO_OPTS): New, set by configure.
+ (info, infoclean): Use $INFO_EXT.
+ ($(infodir)/elisp$(INFO_EXT)): Use $INFO_EXT and $INFO_OPT.
+ * makefile.w32-in (INFO_EXT, INFO_OPTS): New.
+ (info, maintainer-clean): Use $INFO_EXT.
+ ($(infodir)/elisp$(INFO_EXT)): Use $INFO_EXT and $INFO_OPT.
+
+2012-05-04 Chong Yidong <cyd@gnu.org>
+
+ * os.texi (Timers): Use defopt for timer-max-repeats.
+
+2012-05-03 Paul Eggert <eggert@cs.ucla.edu>
+
+ * os.texi (Time of Day): Do not limit current-time-string
+ to years 1000..9999.
+
+2012-05-02 Chong Yidong <cyd@gnu.org>
+
+ * display.texi (Font Lookup):
+ * frames.texi (Pointer Shape):
+ * processes.texi (Subprocess Creation): Use defopt for options.
+
+2012-05-02 Glenn Morris <rgm@gnu.org>
+
+ * elisp.texi (@copying):
+ * intro.texi (Introduction): Only print VERSION in the TeX version.
+
+2012-05-02 Chong Yidong <cyd@gnu.org>
+
+ * text.texi (Change Hooks): Minor fix for after-change-functions.
+
+2012-05-02 Glenn Morris <rgm@gnu.org>
+
+ * package.texi (Packaging Basics):
+ * loading.texi (Autoload):
+ * files.texi (Magic File Names):
+ Reword to remove/reduce some overly long/short lines.
+
+2012-04-27 Glenn Morris <rgm@gnu.org>
+
+ * elisp.texi, vol1.texi, vol2.texi: Some fixes for detailed menu.
+ * modes.texi (Major Modes, Auto-Indentation):
+ * buffers.texi (Buffers): Some fixes for menu descriptions.
+
+2012-04-27 Stefan Monnier <monnier@iro.umontreal.ca>
+ * functions.texi (Simple Lambda, Argument List):
+ * eval.texi (Function Indirection): Avoid deprecated form.
+
+2012-04-27 Glenn Morris <rgm@gnu.org>
+
+ * book-spine.texi, elisp.texi, vol1.texi, vol2.texi:
+ Add "et al." to authors.
+
+ * buffers.texi, commands.texi, compile.texi, control.texi:
+ * customize.texi, display.texi, eval.texi, files.texi, frames.texi:
+ * hash.texi, help.texi, intro.texi, keymaps.texi, lists.texi:
+ * modes.texi, numbers.texi, objects.texi, streams.texi:
+ * symbols.texi, syntax.texi, text.texi, tips.texi, variables.texi:
+ Use Texinfo recommended convention for quotes+punctuation.
+
+2012-04-27 Chong Yidong <cyd@gnu.org>
+
+ * keymaps.texi (Scanning Keymaps): Fix description of NO-REMAP arg
+ to where-is-internal (Bug#10872).
+
+2012-04-27 Glenn Morris <rgm@gnu.org>
+
+ * macros.texi (Indenting Macros): Fix typo.
+
+ * windows.texi (Basic Windows, Windows and Frames, Window Sizes)
+ (Resizing Windows, Deleting Windows, Selecting Windows)
+ (Choosing Window Options, Horizontal Scrolling)
+ (Cyclic Window Ordering, Window History, Dedicated Windows)
+ (Quitting Windows, Window Configurations, Textual Scrolling):
+ (Coordinates and Windows, Window Configurations)
+ (Window Parameters, Window Hooks): Copyedits.
+ (Splitting Windows, Deleting Windows):
+ Fix ignore-window-parameters logic.
+ (Selecting Windows, Choosing Window Options): Markup fixes.
+ (Window Start and End): Remove pointless example.
+ Remove cross-reference to deleted count-lines content.
+ (Textual Scrolling): Mention recenter-redisplay, recenter-top-bottom,
+ and recenter-positions. Remove recenter example.
+
+ * elisp.texi, vol1.texi, vol2.texi: Bump VERSION and DATE.
+
+ * minibuf.texi (Intro to Minibuffers):
+ Tweak discussion of resizing minibuffer window.
+
+2012-04-26 Glenn Morris <rgm@gnu.org>
+
+ * elisp-covers.texi, front-cover-1.texi: Remove files.
+
+ * tindex.pl: Remove file.
+
+ * makefile.w32-in (srcs):
+ * Makefile.in (srcs): Remove back.texi (which is unused).
+
+2012-04-24 Michael Albinus <michael.albinus@gmx.de>
+
+ * os.texi (Notifications): Extend possible notification hints.
+ Add notifications-get-capabilities.
+
2012-04-20 Chong Yidong <cyd@gnu.org>
* processes.texi (Asynchronous Processes): Mention nil argument to
@@ -10870,7 +11053,7 @@
;; coding: utf-8
;; End:
- Copyright (C) 1998-2012 Free Software Foundation, Inc.
+ Copyright (C) 1998-2012 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/doc/lispref/Makefile.in b/doc/lispref/Makefile.in
index 10ec236eaee..dd820d85133 100644
--- a/doc/lispref/Makefile.in
+++ b/doc/lispref/Makefile.in
@@ -30,6 +30,12 @@ texinfodir = $(srcdir)/../misc
# Directory with emacsver.texi.
emacsdir = $(srcdir)/../emacs
+MKDIR_P = @MKDIR_P@
+
+INFO_EXT=@INFO_EXT@
+# Options used only when making info output.
+INFO_OPTS=@INFO_OPTS@
+
MAKEINFO = @MAKEINFO@
MAKEINFO_OPTS = --force --enable-encoding -I $(emacsdir) -I $(srcdir)
TEXI2DVI = texi2dvi
@@ -47,7 +53,6 @@ srcs = \
$(srcdir)/abbrevs.texi \
$(srcdir)/advice.texi \
$(srcdir)/anti.texi \
- $(srcdir)/back.texi \
$(srcdir)/backups.texi \
$(srcdir)/buffers.texi \
$(srcdir)/commands.texi \
@@ -96,20 +101,20 @@ srcs = \
$(srcdir)/gpl.texi \
$(srcdir)/doclicense.texi
-mkinfodir = @test -d ${infodir} || mkdir ${infodir} || test -d ${infodir}
+mkinfodir = @${MKDIR_P} ${infodir}
.PHONY: info dvi pdf ps
-info: $(infodir)/elisp
+info: $(infodir)/elisp$(INFO_EXT)
dvi: elisp.dvi
html: elisp.html
pdf: elisp.pdf
ps: elisp.ps
## Note: "<" is not portable in ordinary make rules.
-$(infodir)/elisp: $(srcs)
+$(infodir)/elisp$(INFO_EXT): $(srcs)
$(mkinfodir)
- $(MAKEINFO) $(MAKEINFO_OPTS) -o $@ $(srcdir)/elisp.texi
+ $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ $(srcdir)/elisp.texi
elisp.dvi: $(srcs)
$(ENVADD) $(TEXI2DVI) $(srcdir)/elisp.texi
@@ -129,17 +134,18 @@ elisp.pdf: $(srcs)
mostlyclean:
rm -f *.aux *.log *.toc *.cp *.cps *.fn *.fns *.ky *.kys \
*.op *.ops *.pg *.pgs *.tp *.tps *.vr *.vrs
- rm -f elisp[12]*
+ rm -f elisp[12]* vol[12].tmp
clean: mostlyclean
- rm -f elisp.dvi elisp.pdf elisp.ps vol[12].pdf
+ rm -f elisp.dvi elisp.pdf elisp.ps
+ rm -f vol[12].dvi vol[12].pdf vol[12].ps
rm -rf elisp.html
rm -f emacs-lispref-${version}.tar*
distclean: clean
infoclean:
- -cd $(infodir) && rm -f elisp elisp-[1-9] elisp-[1-9][0-9]
+ -cd $(infodir) && rm -f elisp$(INFO_EXT) elisp$(INFO_EXT)-[1-9] elisp$(INFO_EXT)-[1-9][0-9]
maintainer-clean: distclean infoclean
diff --git a/doc/lispref/anti.texi b/doc/lispref/anti.texi
index 59f8f91c855..f70d0235e92 100644
--- a/doc/lispref/anti.texi
+++ b/doc/lispref/anti.texi
@@ -7,8 +7,7 @@
@node Antinews, GNU Free Documentation License, Packaging, Top
@appendix Emacs 23 Antinews
-@c Update the elisp.texi, vol1.texi, vol2.texi Antinews menu entries
-@c with the above version number.
+@c Update the elisp.texi Antinews menu entry with the above version number.
For those users who live backwards in time, here is information about
downgrading to Emacs version 23.4. We hope you will enjoy the greater
diff --git a/doc/lispref/book-spine.texi b/doc/lispref/book-spine.texi
index 270def6d8b3..721416316d2 100644
--- a/doc/lispref/book-spine.texi
+++ b/doc/lispref/book-spine.texi
@@ -20,8 +20,8 @@
@center by
@center Bil Lewis,
@center Dan LaLiberte,
-@center and the
-@center GNU Manual Group
+@center the GNU Manual Group,
+@center et al.
@sp 5
@center Free Software Foundation
@bye
diff --git a/doc/lispref/buffers.texi b/doc/lispref/buffers.texi
index 844b6423a52..165faf32b09 100644
--- a/doc/lispref/buffers.texi
+++ b/doc/lispref/buffers.texi
@@ -23,7 +23,7 @@ not be displayed in any windows.
* Buffer File Name:: The buffer file name indicates which file is visited.
* Buffer Modification:: A buffer is @dfn{modified} if it needs to be saved.
* Modification Time:: Determining whether the visited file was changed
- ``behind Emacs's back''.
+ "behind Emacs's back".
* Read Only Buffers:: Modifying text is not allowed in a read-only buffer.
* The Buffer List:: How to look at all the existing buffers.
* Creating Buffers:: Functions that create buffers.
@@ -481,7 +481,7 @@ correspond to the new file name, unless the new name is already in
use.
If @var{filename} is @code{nil} or the empty string, that stands for
-``no visited file.'' In this case, @code{set-visited-file-name} marks
+``no visited file''. In this case, @code{set-visited-file-name} marks
the buffer as having no visited file, without changing the buffer's
modified flag.
diff --git a/doc/lispref/commands.texi b/doc/lispref/commands.texi
index bf26d83b7bf..50c345b5b15 100644
--- a/doc/lispref/commands.texi
+++ b/doc/lispref/commands.texi
@@ -718,7 +718,7 @@ We use @code{"p"} because the numeric prefix argument is never
message when called from a keyboard macro.
The above method with the additional argument is usually best,
-because it allows callers to say ``treat this call as interactive.''
+because it allows callers to say ``treat this call as interactive''.
But you can also do the job by testing @code{called-interactively-p}.
@defun called-interactively-p kind
@@ -2325,7 +2325,7 @@ same symbol that would normally represent that combination of mouse
button and modifier keys. The information about the window part is kept
elsewhere in the event---in the coordinates. But
@code{read-key-sequence} translates this information into imaginary
-``prefix keys,'' all of which are symbols: @code{header-line},
+``prefix keys'', all of which are symbols: @code{header-line},
@code{horizontal-scroll-bar}, @code{menu-bar}, @code{mode-line},
@code{vertical-line}, and @code{vertical-scroll-bar}. You can define
meanings for mouse clicks in special window parts by defining key
@@ -2703,14 +2703,16 @@ This function converts the string or vector @var{key} to a list of
individual events, which you can put in @code{unread-command-events}.
@end defun
+@ignore
@defvar unread-command-char
This variable holds a character to be read as command input.
-A value of -1 means ``empty.''
+A value of -1 means ``empty''.
This variable is mostly obsolete now that you can use
@code{unread-command-events} instead; it exists only to support programs
written for Emacs versions 18 and earlier.
@end defvar
+@end ignore
@defun input-pending-p
@cindex waiting for command key input
@@ -3195,7 +3197,7 @@ using the minibuffer. Usually it is more convenient for the user if you
change the major mode of the current buffer temporarily to a special
major mode, which should have a command to go back to the previous mode.
(The @kbd{e} command in Rmail uses this technique.) Or, if you wish to
-give the user different text to edit ``recursively,'' create and select
+give the user different text to edit ``recursively'', create and select
a new buffer in a special mode. In this mode, define a command to
complete the processing and go back to the previous buffer. (The
@kbd{m} command in Rmail does this.)
diff --git a/doc/lispref/compile.texi b/doc/lispref/compile.texi
index ead75942b24..c1e0706bb43 100644
--- a/doc/lispref/compile.texi
+++ b/doc/lispref/compile.texi
@@ -274,7 +274,7 @@ reloading each file after recompiling it.
use a special Lisp reader construct, @samp{#@@@var{count}}. This
construct skips the next @var{count} characters. It also uses the
@samp{#$} construct, which stands for ``the name of this file, as a
-string.'' It is usually best not to use these constructs in Lisp source
+string''. It is usually best not to use these constructs in Lisp source
files, since they are not designed to be clear to humans reading the
file.
@@ -637,41 +637,34 @@ Lisp source; these do not appear in the output of @code{disassemble}.
@end group
@group
-0 varref integer ; @r{Get the value of @code{integer}}
- ; @r{and push it onto the stack.}
-1 constant 1 ; @r{Push 1 onto stack.}
+0 varref integer ; @r{Get the value of @code{integer} and}
+ ; @r{push it onto the stack.}
+1 constant 1 ; @r{Push 1 onto stack.}
@end group
-
@group
-2 eqlsign ; @r{Pop top two values off stack, compare}
- ; @r{them, and push result onto stack.}
+2 eqlsign ; @r{Pop top two values off stack, compare}
+ ; @r{them, and push result onto stack.}
@end group
-
@group
-3 goto-if-nil 1 ; @r{Pop and test top of stack;}
- ; @r{if @code{nil}, go to 1,}
- ; @r{else continue.}
-6 constant 1 ; @r{Push 1 onto top of stack.}
-7 return ; @r{Return the top element}
- ; @r{of the stack.}
+3 goto-if-nil 1 ; @r{Pop and test top of stack;}
+ ; @r{if @code{nil}, go to 1, else continue.}
+6 constant 1 ; @r{Push 1 onto top of stack.}
+7 return ; @r{Return the top element of the stack.}
@end group
-
@group
-8:1 varref integer ; @r{Push value of @code{integer} onto stack.}
-9 constant factorial ; @r{Push @code{factorial} onto stack.}
-10 varref integer ; @r{Push value of @code{integer} onto stack.}
-11 sub1 ; @r{Pop @code{integer}, decrement value,}
- ; @r{push new value onto stack.}
-12 call 1 ; @r{Call function @code{factorial} using}
- ; @r{the first (i.e., the top) element}
- ; @r{of the stack as the argument;}
- ; @r{push returned value onto stack.}
+8:1 varref integer ; @r{Push value of @code{integer} onto stack.}
+9 constant factorial ; @r{Push @code{factorial} onto stack.}
+10 varref integer ; @r{Push value of @code{integer} onto stack.}
+11 sub1 ; @r{Pop @code{integer}, decrement value,}
+ ; @r{push new value onto stack.}
+12 call 1 ; @r{Call function @code{factorial} using first}
+ ; @r{(i.e. top) stack element as argument;}
+ ; @r{push returned value onto stack.}
@end group
-
@group
-13 mult ; @r{Pop top two values off stack, multiply}
- ; @r{them, and push result onto stack.}
-14 return ; @r{Return the top element of stack.}
+13 mult ; @r{Pop top two values off stack, multiply}
+ ; @r{them, and push result onto stack.}
+14 return ; @r{Return the top element of the stack.}
@end group
@end example
@@ -693,70 +686,56 @@ The @code{silly-loop} function is somewhat more complex:
@print{} byte-code for silly-loop:
doc: Return time before and after N iterations of a loop.
args: (n)
+@end group
-0 constant current-time-string ; @r{Push}
- ; @r{@code{current-time-string}}
+@group
+0 constant current-time-string ; @r{Push @code{current-time-string}}
; @r{onto top of stack.}
@end group
-
@group
-1 call 0 ; @r{Call @code{current-time-string}}
- ; @r{with no argument,}
- ; @r{pushing result onto stack.}
+1 call 0 ; @r{Call @code{current-time-string} with no}
+ ; @r{argument, push result onto stack.}
@end group
-
@group
-2 varbind t1 ; @r{Pop stack and bind @code{t1}}
- ; @r{to popped value.}
+2 varbind t1 ; @r{Pop stack and bind @code{t1} to popped value.}
@end group
-
@group
-3:1 varref n ; @r{Get value of @code{n} from}
- ; @r{the environment and push}
- ; @r{the value onto the stack.}
-4 sub1 ; @r{Subtract 1 from top of stack.}
+3:1 varref n ; @r{Get value of @code{n} from the environment}
+ ; @r{and push the value on the stack.}
+4 sub1 ; @r{Subtract 1 from top of stack.}
@end group
-
@group
-5 dup ; @r{Duplicate the top of the stack;}
- ; @r{i.e., copy the top of}
- ; @r{the stack and push the}
- ; @r{copy onto the stack.}
-6 varset n ; @r{Pop the top of the stack,}
- ; @r{and bind @code{n} to the value.}
-
- ; @r{In effect, the sequence @code{dup varset}}
- ; @r{copies the top of the stack}
- ; @r{into the value of @code{n}}
- ; @r{without popping it.}
+5 dup ; @r{Duplicate top of stack; i.e. copy the top}
+ ; @r{of the stack and push copy onto stack.}
+6 varset n ; @r{Pop the top of the stack,}
+ ; @r{and bind @code{n} to the value.}
+
+;; @r{(In effect, the sequence @code{dup varset} copies the top of the stack}
+;; @r{into the value of @code{n} without popping it.)}
@end group
@group
-7 constant 0 ; @r{Push 0 onto stack.}
-8 gtr ; @r{Pop top two values off stack,}
- ; @r{test if @var{n} is greater than 0}
- ; @r{and push result onto stack.}
+7 constant 0 ; @r{Push 0 onto stack.}
+8 gtr ; @r{Pop top two values off stack,}
+ ; @r{test if @var{n} is greater than 0}
+ ; @r{and push result onto stack.}
@end group
-
@group
-9 goto-if-not-nil 1 ; @r{Goto 1 if @code{n} > 0}
- ; @r{(this continues the while loop)}
- ; @r{else continue.}
+9 goto-if-not-nil 1 ; @r{Goto 1 if @code{n} > 0}
+ ; @r{(this continues the while loop)}
+ ; @r{else continue.}
@end group
-
@group
-12 varref t1 ; @r{Push value of @code{t1} onto stack.}
+12 varref t1 ; @r{Push value of @code{t1} onto stack.}
13 constant current-time-string ; @r{Push @code{current-time-string}}
- ; @r{onto top of stack.}
-14 call 0 ; @r{Call @code{current-time-string} again.}
+ ; @r{onto the top of the stack.}
+14 call 0 ; @r{Call @code{current-time-string} again.}
@end group
-
@group
-15 unbind 1 ; @r{Unbind @code{t1} in local environment.}
-16 list2 ; @r{Pop top two elements off stack,}
- ; @r{create a list of them,}
- ; @r{and push list onto stack.}
-17 return ; @r{Return value of the top of stack.}
+15 unbind 1 ; @r{Unbind @code{t1} in local environment.}
+16 list2 ; @r{Pop top two elements off stack, create a}
+ ; @r{list of them, and push it onto stack.}
+17 return ; @r{Return value of the top of stack.}
@end group
@end example
diff --git a/doc/lispref/control.texi b/doc/lispref/control.texi
index aa24291d892..a707cda2166 100644
--- a/doc/lispref/control.texi
+++ b/doc/lispref/control.texi
@@ -93,8 +93,8 @@ order, returning the result of the final form.
@end example
@end defspec
- Two other control constructs likewise evaluate a series of forms but return
-a different value:
+ Two other constructs likewise evaluate a series of forms but return
+different values:
@defspec prog1 form1 forms@dots{}
This special form evaluates @var{form1} and all of the @var{forms}, in
@@ -159,8 +159,8 @@ If @var{condition} has the value @code{nil}, and no @var{else-forms} are
given, @code{if} returns @code{nil}.
@code{if} is a special form because the branch that is not selected is
-never evaluated---it is ignored. Thus, in the example below,
-@code{true} is not printed because @code{print} is never called.
+never evaluated---it is ignored. Thus, in this example,
+@code{true} is not printed because @code{print} is never called:
@example
@group
@@ -220,7 +220,7 @@ non-@code{nil}, the clause ``succeeds''; then @code{cond} evaluates its
@var{body-forms}, and the value of the last of @var{body-forms} becomes
the value of the @code{cond}. The remaining clauses are ignored.
-If the value of @var{condition} is @code{nil}, the clause ``fails,'' so
+If the value of @var{condition} is @code{nil}, the clause ``fails'', so
the @code{cond} moves on to the following clause, trying its
@var{condition}.
@@ -257,9 +257,7 @@ clauses was successful. To do this, we use @code{t} as the
@var{condition} of the last clause, like this: @code{(t
@var{body-forms})}. The form @code{t} evaluates to @code{t}, which is
never @code{nil}, so this clause never fails, provided the @code{cond}
-gets to it at all.
-
-For example,
+gets to it at all. For example:
@example
@group
@@ -622,7 +620,7 @@ error is signaled with data @code{(@var{tag} @var{value})}.
@subsection Examples of @code{catch} and @code{throw}
One way to use @code{catch} and @code{throw} is to exit from a doubly
-nested loop. (In most languages, this would be done with a ``goto.'')
+nested loop. (In most languages, this would be done with a ``goto''.)
Here we compute @code{(foo @var{i} @var{j})} for @var{i} and @var{j}
varying from 0 to 9:
@@ -811,10 +809,10 @@ handlers that handle the error: @code{condition-case} binds a local
variable to a list of the form @code{(@var{error-symbol} .@:
@var{data})} (@pxref{Handling Errors}).
-The function @code{signal} never returns (though in older Emacs versions
-it could sometimes return).
+The function @code{signal} never returns.
+@c (though in older Emacs versions it sometimes could).
-@smallexample
+@example
@group
(signal 'wrong-number-of-arguments '(x y))
@error{} Wrong number of arguments: x, y
@@ -824,7 +822,7 @@ it could sometimes return).
(signal 'no-such-error '("My unknown error condition"))
@error{} peculiar error: "My unknown error condition"
@end group
-@end smallexample
+@end example
@end defun
@cindex CL note---no continuable errors
@@ -990,7 +988,7 @@ to allow the debugger to run before the handler); @var{body} is one or more
Lisp expressions to be executed when this handler handles an error.
Here are examples of handlers:
-@smallexample
+@example
@group
(error nil)
@@ -1000,7 +998,7 @@ Here are examples of handlers:
(message
"Either division by zero or failure to open a file"))
@end group
-@end smallexample
+@end example
Each error that occurs has an @dfn{error symbol} that describes what
kind of error it is. The @code{error-conditions} property of this
@@ -1033,9 +1031,9 @@ Sometimes it is necessary to re-throw a signal caught by
@code{condition-case}, for some outer-level handler to catch. Here's
how to do that:
-@smallexample
+@example
(signal (car err) (cdr err))
-@end smallexample
+@end example
@noindent
where @code{err} is the error description variable, the first argument
@@ -1054,7 +1052,7 @@ Here is an example of using @code{condition-case} to handle the error
that results from dividing by zero. The handler displays the error
message (but without a beep), then returns a very large number.
-@smallexample
+@example
@group
(defun safe-divide (dividend divisor)
(condition-case err
@@ -1075,22 +1073,24 @@ message (but without a beep), then returns a very large number.
@print{} Arithmetic error: (arith-error)
@result{} 1000000
@end group
-@end smallexample
+@end example
@noindent
-The handler specifies condition name @code{arith-error} so that it will handle only division-by-zero errors. Other kinds of errors will not be handled, at least not by this @code{condition-case}. Thus,
+The handler specifies condition name @code{arith-error} so that it
+will handle only division-by-zero errors. Other kinds of errors will
+not be handled (by this @code{condition-case}). Thus:
-@smallexample
+@example
@group
(safe-divide nil 3)
@error{} Wrong type argument: number-or-marker-p, nil
@end group
-@end smallexample
+@end example
Here is a @code{condition-case} that catches all kinds of errors,
-including those signaled with @code{error}:
+including those from @code{error}:
-@smallexample
+@example
@group
(setq baz 34)
@result{} 34
@@ -1108,7 +1108,7 @@ including those signaled with @code{error}:
@print{} The error was: (error "Rats! The variable baz was 34, not 35")
@result{} 2
@end group
-@end smallexample
+@end example
@defmac ignore-errors body@dots{}
This construct executes @var{body}, ignoring any errors that occur
@@ -1119,12 +1119,12 @@ otherwise, it returns @code{nil}.
Here's the example at the beginning of this subsection rewritten using
@code{ignore-errors}:
-@smallexample
+@example
@group
(ignore-errors
(delete-file filename))
@end group
-@end smallexample
+@end example
@end defmac
@defmac with-demoted-errors body@dots{}
@@ -1279,7 +1279,7 @@ Variables}).
For example, here we make an invisible buffer for temporary use, and
make sure to kill it before finishing:
-@smallexample
+@example
@group
(let ((buffer (get-buffer-create " *temp*")))
(with-current-buffer buffer
@@ -1287,7 +1287,7 @@ make sure to kill it before finishing:
@var{body-form}
(kill-buffer buffer))))
@end group
-@end smallexample
+@end example
@noindent
You might think that we could just as well write @code{(kill-buffer
@@ -1312,7 +1312,7 @@ is protected with a form that guarantees deletion of the process in the
event of failure. Otherwise, Emacs might fill up with useless
subprocesses.
-@smallexample
+@example
@group
(let ((win nil))
(unwind-protect
@@ -1323,7 +1323,7 @@ subprocesses.
(error "Ftp login failed")))
(or win (and process (delete-process process)))))
@end group
-@end smallexample
+@end example
This example has a small bug: if the user types @kbd{C-g} to
quit, and the quit happens immediately after the function
diff --git a/doc/lispref/customize.texi b/doc/lispref/customize.texi
index 04b3cdd11f0..2fc07907166 100644
--- a/doc/lispref/customize.texi
+++ b/doc/lispref/customize.texi
@@ -157,7 +157,7 @@ Packages distributed as part of Emacs that use the
@defvar customize-package-emacs-version-alist
This alist provides a mapping for the versions of Emacs that are
associated with versions of a package listed in the
-@code{:package-version} keyword. Its elements look like this:
+@code{:package-version} keyword. Its elements are:
@example
(@var{package} (@var{pversion} . @var{eversion})@dots{})
@@ -168,6 +168,8 @@ elements that contain a package version @var{pversion} with an
associated Emacs version @var{eversion}. These versions are strings.
For example, the MH-E package updates this alist with the following:
+@c Must be small else too wide.
+@c FIXME obviously this is out of date (in the code).
@smallexample
(add-to-list 'customize-package-emacs-version-alist
'(MH-E ("6.0" . "22.1") ("6.1" . "22.1") ("7.0" . "22.1")
@@ -394,7 +396,7 @@ Set the variable's @code{safe-local-variable} property to
@item :set-after @var{variables}
@kindex set-after@r{, @code{defcustom} keyword}
When setting variables according to saved customizations, make sure to
-set the variables @var{variables} before this one; in other words, delay
+set the variables @var{variables} before this one; i.e., delay
setting this variable until after those others have been handled. Use
@code{:set-after} if setting this variable won't work properly unless
those other variables already have their intended values.
@@ -673,9 +675,9 @@ The argument to the @code{:options} keywords should be a list of
specifications for reasonable keys in the alist. Ordinarily, they are
simply atoms, which stand for themselves. For example:
-@smallexample
+@example
:options '("foo" "bar" "baz")
-@end smallexample
+@end example
@noindent
specifies that there are three ``known'' keys, namely @code{"foo"},
@@ -687,9 +689,9 @@ integer. You can specify this by using a list instead of an atom in
the list. The first element will specify the key, like before, while
the second element will specify the value type. For example:
-@smallexample
+@example
:options '("foo" ("bar" integer) "baz")
-@end smallexample
+@end example
Finally, you may want to change how the key is presented. By default,
the key is simply shown as a @code{const}, since the user cannot change
@@ -699,37 +701,37 @@ you may want to use a more specialized type for presenting the key, like
This is done by using a customization type specification instead of a
symbol for the key.
-@smallexample
+@example
:options '("foo" ((function-item some-function) integer)
"baz")
-@end smallexample
+@end example
Many alists use lists with two elements, instead of cons cells. For
example,
-@smallexample
+@example
(defcustom list-alist '(("foo" 1) ("bar" 2) ("baz" 3))
"Each element is a list of the form (KEY VALUE).")
-@end smallexample
+@end example
@noindent
instead of
-@smallexample
+@example
(defcustom cons-alist '(("foo" . 1) ("bar" . 2) ("baz" . 3))
"Each element is a cons-cell (KEY . VALUE).")
-@end smallexample
+@end example
Because of the way lists are implemented on top of cons cells, you can
treat @code{list-alist} in the example above as a cons cell alist, where
the value type is a list with a single element containing the real
value.
-@smallexample
+@example
(defcustom list-alist '(("foo" 1) ("bar" 2) ("baz" 3))
"Each element is a list of the form (KEY VALUE)."
:type '(alist :value-type (group integer)))
-@end smallexample
+@end example
The @code{group} widget is used here instead of @code{list} only because
the formatting is better suited for the purpose.
@@ -737,14 +739,14 @@ the formatting is better suited for the purpose.
Similarly, you can have alists with more values associated with each
key, using variations of this trick:
-@smallexample
+@example
(defcustom person-data '(("brian" 50 t)
("dorith" 55 nil)
("ken" 52 t))
"Alist of basic info about people.
Each element has the form (NAME AGE MALE-FLAG)."
:type '(alist :value-type (group integer boolean)))
-@end smallexample
+@end example
@item (plist :key-type @var{key-type} :value-type @var{value-type})
This customization type is similar to @code{alist} (see above), except
@@ -817,7 +819,7 @@ For example,
@noindent
describes a variable for which @code{t} means yes, @code{nil} means no,
-and @code{foo} means ``ask.''
+and @code{foo} means ``ask''.
@item (other @var{value})
This alternative can match any Lisp value, but if the user chooses this
@@ -834,7 +836,7 @@ For example,
@noindent
describes a variable for which @code{t} means yes, @code{nil} means no,
-and anything else means ``ask.'' If the user chooses @samp{Ask} from
+and anything else means ``ask''. If the user chooses @samp{Ask} from
the menu of alternatives, that specifies the value @code{foo}; but any
other value (not @code{t}, @code{nil} or @code{foo}) displays as
@samp{Ask}, just like @code{foo}.
@@ -1255,7 +1257,7 @@ customization settings for variables and faces, respectively. When
the user invokes @samp{Save for future sessions} in the Customize
interface, that takes effect by writing a @code{custom-set-variables}
and/or a @code{custom-set-faces} form into the custom file, to be
-evaluated the next time Emacs starts up.
+evaluated the next time Emacs starts.
@defun custom-set-variables &rest args
This function installs the variable customizations specified by
@@ -1326,11 +1328,10 @@ the theme; this is the description shown when the user invokes the
@code{describe-theme} command or types @kbd{?} in the @samp{*Custom
Themes*} buffer.
-Two special theme names are disallowed: @code{user} is a ``dummy''
-theme which stores the user's direct customization settings, and
-@code{changed} is a ``dummy'' theme which stores changes made outside
-of the Customize system. If you specify either of these as the
-@var{theme} argument, @code{deftheme} signals an error.
+Two special theme names are disallowed (using them causes an error):
+@code{user} is a ``dummy'' theme that stores the user's direct
+customization settings, and @code{changed} is a ``dummy'' theme that
+stores changes made outside of the Customize system.
@end defmac
@defmac provide-theme theme
@@ -1378,7 +1379,7 @@ displays the source file and asks for confirmation from the user
before loading any non-built-in theme for the first time.
The following functions are useful for programmatically enabling and
-disabling Custom themes:
+disabling themes:
@defun custom-theme-p theme
This function return a non-@code{nil} value if @var{theme} (a symbol)
@@ -1391,14 +1392,11 @@ it returns @code{nil}.
This function loads the Custom theme named @var{theme} from its source
file, looking for the source file in the directories specified by the
variable @code{custom-theme-load-path}. @xref{Custom Themes,,, emacs,
-The GNU Emacs Manual}. It also @dfn{enables} the theme, causing its
-variable and face settings to take effect.
-
-If the optional argument @var{no-confirm} is non-@code{nil}, this
-skips prompting the user for confirmation before loading the theme.
-
-If the optional argument @var{no-enable} is non-@code{nil}, the theme
-is loaded but not enabled.
+The GNU Emacs Manual}. It also @dfn{enables} the theme (unless the
+optional argument @var{no-enable} is non-@code{nil}), causing its
+variable and face settings to take effect. It prompts the user for
+confirmation before loading the theme, unless the optional argument
+@var{no-confirm} is non-@code{nil}.
@end deffn
@deffn Command enable-theme theme
diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi
index 0113ae86358..cafa8ddd18b 100644
--- a/doc/lispref/display.texi
+++ b/doc/lispref/display.texi
@@ -155,7 +155,7 @@ boundary. @xref{Filling}.
indicate truncated and continued lines (@pxref{Fringes}). On a text
terminal, a @samp{$} in the rightmost column of the window indicates
truncation; a @samp{\} on the rightmost column indicates a line that
-``wraps.'' (The display table can specify alternate characters to use
+``wraps''. (The display table can specify alternate characters to use
for this; @pxref{Display Tables}).
@defopt truncate-lines
@@ -451,7 +451,7 @@ prints the message of @var{reporter} followed by word ``done'' in the
echo area.
You should always call this function and not hope for
-@code{progress-reporter-update} to print ``100%.'' Firstly, it may
+@code{progress-reporter-update} to print ``100%''. Firstly, it may
never print it, there are many good reasons for this not to happen.
Secondly, ``done'' is more explicit.
@end defun
@@ -1308,7 +1308,7 @@ The return value is @var{overlay}.
This is the only valid way to change the endpoints of an overlay. Do
not try modifying the markers in the overlay by hand, as that fails to
update other vital data structures and can cause some overlays to be
-``lost.''
+``lost''.
@end defun
@defun remove-overlays &optional start end name value
@@ -1385,7 +1385,7 @@ foo
@end example
Emacs stores the overlays of each buffer in two lists, divided
-around an arbitrary ``center position.'' One list extends backwards
+around an arbitrary ``center position''. One list extends backwards
through the buffer from that center position, and the other extends
forwards from that center position. The center position can be anywhere
in the buffer.
@@ -2923,13 +2923,13 @@ The last three elements give additional information about the font.
encoding of the font.
@end defun
-@defvar font-list-limit
+@defopt font-list-limit
This variable specifies maximum number of fonts to consider in font
-matching. The function @code{x-family-fonts} will not return more than
-that many fonts, and font selection will consider only that many fonts
-when searching a matching font for face attributes. The default is
-currently 100.
-@end defvar
+matching. The function @code{x-family-fonts} will not return more
+than that many fonts, and font selection will consider only that many
+fonts when searching a matching font for face attributes. The default
+is 100.
+@end defopt
@node Fontsets
@subsection Fontsets
@@ -4359,7 +4359,7 @@ $$\pmatrix{ 2 & -1 & 0 \cr
@end ifnottex
@item disabled
-Specifies transforming the image so that it looks ``disabled.''
+Specifies transforming the image so that it looks ``disabled''.
@end table
@item :mask @var{mask}
@@ -5531,7 +5531,7 @@ Any @var{args} are passed to @var{map-function}.
@subsection Abstract Display Example
Here is a simple example using functions of the ewoc package to
-implement a ``color components display,'' an area in a buffer that
+implement a ``color components display'', an area in a buffer that
represents a vector of three integers (itself representing a 24-bit RGB
value) in various ways.
@@ -5842,7 +5842,7 @@ display the character @var{c} as those glyphs; @pxref{Glyphs}).
@strong{Warning:} if you use the display table to change the display
of newline characters, the whole buffer will be displayed as one long
-``line.''
+``line''.
The display table also has six ``extra slots'' which serve special
purposes. Here is a table of their meanings; @code{nil} in any slot
@@ -6153,7 +6153,7 @@ capability (@samp{vb}).
@defvar ring-bell-function
If this is non-@code{nil}, it specifies how Emacs should ``ring the
-bell.'' Its value should be a function of no arguments. If this is
+bell''. Its value should be a function of no arguments. If this is
non-@code{nil}, it takes precedence over the @code{visible-bell}
variable.
@end defvar
@@ -6162,7 +6162,7 @@ variable.
@section Window Systems
Emacs works with several window systems, most notably the X Window
-System. Both Emacs and X use the term ``window,'' but use it
+System. Both Emacs and X use the term ``window'', but use it
differently. An Emacs frame is a single window as far as X is
concerned; the individual Emacs windows are not known to X at all.
diff --git a/doc/lispref/edebug.texi b/doc/lispref/edebug.texi
index 9d50f5fb31f..e97e90f947b 100644
--- a/doc/lispref/edebug.texi
+++ b/doc/lispref/edebug.texi
@@ -975,8 +975,8 @@ unless @code{edebug-continue-kbd-macro} is non-@code{nil}.
@c needs an xref to be on just one line.
When Edebug needs to display something (e.g., in trace mode), it saves
the current window configuration from ``outside'' Edebug
-(@pxref{Window Configurations}). When you exit Edebug (by continuing
-the program), it restores the previous window configuration.
+(@pxref{Window Configurations}). When you exit Edebug, it restores
+the previous window configuration.
Emacs redisplays only when it pauses. Usually, when you continue
execution, the program re-enters Edebug at a breakpoint or after
diff --git a/doc/lispref/elisp-covers.texi b/doc/lispref/elisp-covers.texi
deleted file mode 100644
index b2cc5a9adf2..00000000000
--- a/doc/lispref/elisp-covers.texi
+++ /dev/null
@@ -1,252 +0,0 @@
-\input texinfo @c -*-texinfo-*-
-@c This is part of the GNU Emacs Lisp Reference Manual.
-@c Copyright (C) 2001-2012 Free Software Foundation, Inc.
-@c See the file elisp.texi for copying conditions.
-@c
-@comment %**start of header
-@setfilename covers.info
-@settitle GNU Emacs Lisp Reference Manual
-@comment %**end of header
-
-@titlepage
-@c ================ Volume 1 ================
-@w{ }
-@sp 2
-@center @titlefont{The}
-@sp 1
-@center @titlefont{GNU}
-@sp 1
-@center @titlefont{Emacs Lisp}
-@sp 1
-@center @titlefont{Reference}
-@sp 1
-@center @titlefont{Manual}
-@sp 2
-@center GNU Emacs Version 19
-@center for Unix Users
-@center Edition 2.3, June 1994
-@sp 2
-@center @titlefont{Volume 1}
-@sp 2
-@center by Bil Lewis, Dan LaLiberte,
-@center and the GNU Manual Group
-
-@page
-@c ================ Volume 2 ================
-@w{ }
-@sp 5
-@center @titlefont{The}
-@sp 1
-@center @titlefont{GNU}
-@sp 1
-@center @titlefont{Emacs Lisp}
-@sp 1
-@center @titlefont{Reference}
-@sp 1
-@center @titlefont{Manual}
-@sp 2
-@center GNU Emacs Version 19
-@center for Unix Users
-@center Edition 2.3, June 1994
-@sp 2
-@center @titlefont{Volume 2}
-@sp 2
-@center by Bil Lewis,
-@center Dan LaLiberte, and
-@center the GNU Manual Group
-
-@page
-@c ================ Volume 1 with baseline skip 16pt ================
-
-@tex
-\global\baselineskip = 16pt
-@end tex
-
-16 pts baseline skip:
-
-@w{ }
-@sp 2
-@center @titlefont{The}
-@sp 1
-@center @titlefont{GNU}
-@sp 1
-@center @titlefont{Emacs Lisp}
-@sp 1
-@center @titlefont{Reference}
-@sp 1
-@center @titlefont{Manual}
-@sp 2
-@center GNU Emacs Version 19
-@center for Unix Users
-@center Edition 2.3, June 1994
-@sp 2
-@center @titlefont{Volume 1}
-@sp 2
-@center by Bil Lewis, Dan LaLiberte,
-@center and the GNU Manual Group
-
-@page
-@c ================ Volume 1 with baseline skip 18pt ================
-
-@tex
-\global\baselineskip = 18pt
-@end tex
-
-18 pts baseline skip, with 15pts between sections
-
-@w{ }
-@sp 2
-@center @titlefont{The}
-@sp 1
-@center @titlefont{GNU}
-@sp 1
-@center @titlefont{Emacs Lisp}
-@sp 1
-@center @titlefont{Reference}
-@sp 1
-@center @titlefont{Manual}
-@tex
-\global\baselineskip = 15pt
-@end tex
-
-@sp 2
-@center GNU Emacs Version 19
-@center for Unix Users
-@center Edition 2.3, June 1994
-@sp 2
-@center @titlefont{Volume 1}
-@sp 2
-@center by Bil Lewis,
-@center Dan LaLiberte, and
-@center the GNU Manual Group
-
-@page
-@c ================ Volume 1 with more baseline skip 24 pts ================
-
-@tex
-\global\baselineskip = 24pt
-@end tex
-
-24 pts baseline skip:
-
-@w{ }
-@sp 2
-@center @titlefont{The}
-@sp 1
-@center @titlefont{GNU}
-@sp 1
-@center @titlefont{Emacs Lisp}
-@sp 1
-@center @titlefont{Reference}
-@sp 1
-@center @titlefont{Manual}
-@sp 2
-@center GNU Emacs Version 19
-@center for Unix Users
-@center Edition 2.3, June 1994
-@sp 2
-@center @titlefont{Volume 1}
-@sp 2
-@center by Bil Lewis, Dan LaLiberte,
-@center and the GNU Manual Group
-
-@page
-@c ================ Volume 2 with more baseline skip 18 pts ================
-
-@tex
-\global\baselineskip = 18pt
-@end tex
-
-18 pts baseline skip:
-
-@w{ }
-@sp 5
-@center @titlefont{The}
-@sp 1
-@center @titlefont{GNU}
-@sp 1
-@center @titlefont{Emacs Lisp}
-@sp 1
-@center @titlefont{Reference}
-@sp 1
-@center @titlefont{Manual}
-@sp 2
-@center GNU Emacs Version 19
-@center for Unix Users
-@center Edition 2.3, June 1994
-@sp 2
-@center @titlefont{Volume 2}
-@sp 2
-@center by Bil Lewis, Dan LaLiberte,
-@center and the GNU Manual Group
-
-@page
-@c ================ Volume 2 with more baseline skip 24 pts ================
-
-@tex
-\global\baselineskip = 24pt
-@end tex
-
-24 pts baseline skip:
-
-@w{ }
-@sp 5
-@center @titlefont{The}
-@sp 1
-@center @titlefont{GNU}
-@sp 1
-@center @titlefont{Emacs Lisp}
-@sp 1
-@center @titlefont{Reference}
-@sp 1
-@center @titlefont{Manual}
-@sp 2
-@center GNU Emacs Version 19
-@center for Unix Users
-@center Edition 2.3, June 1994
-@sp 2
-@center @titlefont{Volume 2}
-@sp 2
-@center by Bil Lewis, Dan LaLiberte,
-@center and the GNU Manual Group
-
-
-@page
-@c ================ Spine 1 ================
-
-@w{@titlefont{The GNU Emacs Lisp Reference Manual --- Vol. 1}}
-@sp 4
-@center GNU Emacs Version 19
-@center for Unix Users
-@center Edition 2.3, June 1994
-@sp 4
-@center by Bil Lewis, Dan LaLiberte,
-@center and the GNU Manual Group
-
-@sp 4
-@author The GNU Emacs Lisp Reference Manual --- Vol. 1
-@sp 3
-@author FSF
-
-@author
-
-@page
-@c ================ Spine 2 ================
-
-@w{@titlefont{The GNU Emacs Lisp Reference Manual --- Vol. 2}}
-@sp 4
-@center GNU Emacs Version 19
-@center for Unix Users
-@center Edition 2.3, June 1994
-@sp 4
-@center by Bil Lewis, Dan LaLiberte,
-@center and the GNU Manual Group
-
-
-@sp 4
-@author The GNU Emacs Lisp Reference Manual --- Vol. 2
-@sp 3
-@author FSF
-
-@end titlepage
-@bye
diff --git a/doc/lispref/elisp.texi b/doc/lispref/elisp.texi
index 4319d5eddda..6e10ad635be 100644
--- a/doc/lispref/elisp.texi
+++ b/doc/lispref/elisp.texi
@@ -1,21 +1,72 @@
\input texinfo @c -*-texinfo-*-
@c %**start of header
@setfilename elisp
+
+@ifset VOL1
+@set volflag
+@set voltitle Volume 1
+@end ifset
+
+@ifset VOL2
+@set volflag
+@set voltitle Volume 2
+@end ifset
+
+@ifset volflag
+@settitle GNU Emacs Lisp Reference Manual: @value{voltitle}
+@end ifset
+@ifclear volflag
@settitle GNU Emacs Lisp Reference Manual
+@end ifclear
+
@c %**end of header
+@c See two-volume-cross-refs.txt.
+@tex
+@ifset VOL1
+\message{Formatting for two volume edition...Volume 1...}
+%
+% Read special toc file, set up in two-volume.make.
+\gdef\tocreadfilename{elisp1-toc-ready.toc}
+%
+% Don't make outlines, they're not needed and \readdatafile can't pay
+% attention to the special definition above.
+\global\let\pdfmakeoutlines=\relax
+%
+% Start volume 1 chapter numbering at 1; this must be listed as chapno0.
+\global\chapno=0
+@end ifset
+@ifset VOL2
+\message{Formatting for two volume edition...Volume 2...}
+%
+% Read special toc file, set up in two-volume.make.
+\gdef\tocreadfilename{elisp2-toc-ready.toc}
+%
+% Don't make outlines, they're not needed and \readdatafile can't pay
+% attention to the special definition above.
+\global\let\pdfmakeoutlines=\relax
+%
+% Start volume 2 chapter numbering at 27; this must be listed as chapno26
+\global\chapno=26
+@end ifset
+@end tex
+
+
@c Version of the manual and of Emacs.
-@c Please remember to update the edition number in README as well.
-@c And also the copies in vol1.texi and vol2.texi.
-@set VERSION 3.0
+@c (See comments for EDITION in emacs.texi)
+@set VERSION 3.1
@include emacsver.texi
-@set DATE July 2009
+@set DATE May 2012
@c in general, keep the following line commented out, unless doing a
@c copy of this manual that will be published. The manual should go
@c onto the distribution in the full, 8.5 x 11" size.
@c @smallbook
+@ifset volflag
+@smallbook
+@end ifset
+
@ifset smallbook
@smallbook
@end ifset
@@ -41,7 +92,12 @@
@c @syncodeindex tp fn
@copying
-This is edition @value{VERSION} of the GNU Emacs Lisp Reference Manual,@*
+@iftex
+This is edition @value{VERSION} of the @cite{GNU Emacs Lisp Reference Manual},@*
+@end iftex
+@ifnottex
+This is the @cite{GNU Emacs Lisp Reference Manual}
+@end ifnottex
corresponding to Emacs version @value{EMACSVER}.
Copyright @copyright{} 1990-1996, 1998-2012 Free Software Foundation, Inc.
@@ -70,11 +126,14 @@ developing GNU and promoting software freedom.''
@titlepage
@title GNU Emacs Lisp Reference Manual
+@ifset volflag
+@subtitle @value{voltitle}
+@end ifset
@subtitle For Emacs Version @value{EMACSVER}
@subtitle Revision @value{VERSION}, @value{DATE}
-@author by Bil Lewis, Dan LaLiberte, Richard Stallman
-@author and the GNU Manual Group
+@author by Bil Lewis, Dan LaLiberte, Richard Stallman,
+@author the GNU Manual Group, et al.
@page
@vskip 0pt plus 1filll
@insertcopying
@@ -103,7 +162,6 @@ Cover art by Etienne Suvasa.
@insertcopying
@end ifnottex
-@c Copy any updates to vol1.texi and vol2.texi.
@menu
* Introduction:: Introduction and conventions used.
@@ -184,7 +242,6 @@ Appendices
@c be correctly identified by `texinfo-multiple-files-update'. In
@c particular, the detailed menu header line MUST be identical to the
@c value of `texinfo-master-menu-header'. See texnfo-upd.el.
-@c Copy any updates to vol1.texi and vol2.texi.
@detailmenu
--- The Detailed Node Listing ---
@@ -460,7 +517,7 @@ Functions
* Closures:: Functions that enclose a lexical environment.
* Obsolete Functions:: Declaring functions obsolete.
* Inline Functions:: Defining functions that the compiler
- will open code.
+ will expand inline.
* Declaring Functions:: Telling the compiler that a function is defined.
* Function Safety:: Determining whether a function is safe to call.
* Related Topics:: Cross-references to specific Lisp primitives
@@ -493,7 +550,7 @@ Common Problems Using Macros
* Eval During Expansion:: Don't evaluate them; put them in the expansion.
* Repeated Expansion:: Avoid depending on how many times expansion is done.
-Writing Customization Definitions
+Customization Settings
* Common Keywords:: Common keyword arguments for all kinds of
customization declarations.
@@ -754,6 +811,7 @@ Defining Menus
various features.
* Menu Separators:: Drawing a horizontal line through a menu.
* Alias Menu Items:: Using command aliases in menu items.
+* Toolkit Differences:: Not all toolkits provide the same features.
Major and Minor Modes
@@ -824,6 +882,21 @@ Multiline Font Lock Constructs
* Region to Refontify:: Controlling which region gets refontified
after a buffer change.
+Automatic Indentation of code
+
+* SMIE:: A simple minded indentation engine.
+
+Simple Minded Indentation Engine
+
+* SMIE setup:: SMIE setup and features.
+* Operator Precedence Grammars:: A very simple parsing technique.
+* SMIE Grammar:: Defining the grammar of a language.
+* SMIE Lexer:: Defining tokens.
+* SMIE Tricks:: Working around the parser's limitations.
+* SMIE Indentation:: Specifying indentation rules.
+* SMIE Indentation Helpers:: Helper functions for indentation rules.
+* SMIE Indentation Example:: Sample indentation rules.
+
Documentation
* Documentation Basics:: Where doc strings are defined and stored.
@@ -1220,8 +1293,7 @@ Processes
* Datagrams:: UDP network connections.
* Low-Level Network:: Lower-level but more general function
to create connections and servers.
-* Misc Network:: Additional relevant functions for
- network connections.
+* Misc Network:: Additional relevant functions for net connections.
* Serial Ports:: Communicating with serial ports.
* Byte Packing:: Using bindat to pack and unpack binary data.
@@ -1341,6 +1413,7 @@ Images
* GIF Images:: Special features for GIF format.
* TIFF Images:: Special features for TIFF format.
* PostScript Images:: Special features for PostScript format.
+* ImageMagick Images:: Special features available through ImageMagick.
* Other Image Types:: Various other formats are supported.
* Defining Images:: Convenient ways to define an image for later use.
* Showing Images:: Convenient ways to display an image once
@@ -1396,13 +1469,6 @@ Operating System Interface
* Notifications:: Desktop notifications.
* Dynamic Libraries:: On-demand loading of support libraries.
-Preparing Lisp code for distribution
-
-* Packaging Basics:: The basic concepts of Emacs Lisp packages.
-* Simple Packages:: How to package a single .el file.
-* Multi-file Packages:: How to package multiple files.
-* Package Archives:: Maintaining package archives.
-
Starting Up Emacs
* Startup Summary:: Sequence of actions Emacs performs at startup.
@@ -1421,6 +1487,13 @@ Terminal Input
* Input Modes:: Options for how input is processed.
* Recording Input:: Saving histories of recent or all input events.
+Preparing Lisp code for distribution
+
+* Packaging Basics:: The basic concepts of Emacs Lisp packages.
+* Simple Packages:: How to package a single .el file.
+* Multi-file Packages:: How to package multiple files.
+* Package Archives:: Maintaining package archives.
+
Tips and Conventions
* Coding Conventions:: Conventions for clean and robust programs.
@@ -1449,6 +1522,7 @@ Object Internals
@end detailmenu
@end menu
+@ifclear VOL2
@include intro.texi
@include objects.texi
@include numbers.texi
@@ -1482,6 +1556,12 @@ Object Internals
@include files.texi
@include backups.texi
+
+@end ifclear
+
+@c ================ Beginning of Volume 2 ================
+@ifclear VOL1
+
@include buffers.texi
@include windows.texi
@include frames.texi
@@ -1501,12 +1581,8 @@ Object Internals
@include package.texi
-@c MOVE to Emacs Manual: include misc-modes.texi
-
@c appendices
-@c REMOVE this: include non-hacker.texi
-
@include anti.texi
@include doclicense.texi
@include gpl.texi
@@ -1518,6 +1594,8 @@ Object Internals
@include index.texi
+@end ifclear
+
@ignore
@node New Symbols, , Index, Top
@unnumbered New Symbols Since the Previous Edition
diff --git a/doc/lispref/eval.texi b/doc/lispref/eval.texi
index 4c1150d1a51..57cdc57b1b9 100644
--- a/doc/lispref/eval.texi
+++ b/doc/lispref/eval.texi
@@ -103,7 +103,7 @@ interpretation. @xref{Command Loop}.
@dfn{form} (or an @dfn{expression}). How Emacs evaluates a form
depends on its data type. Emacs has three different kinds of form
that are evaluated differently: symbols, lists, and ``all other
-types.'' This section describes all three kinds, one by one, starting
+types''. This section describes all three kinds, one by one, starting
with the ``all other types'' which are self-evaluating forms.
@menu
@@ -260,16 +260,13 @@ use @code{fset} to set the function cell of a symbol and
into the function cell of @code{first}, and the symbol @code{first} into
the function cell of @code{erste}.
-@smallexample
+@example
@group
;; @r{Build this function cell linkage:}
;; ------------- ----- ------- -------
;; | #<subr car> | <-- | car | <-- | first | <-- | erste |
;; ------------- ----- ------- -------
@end group
-@end smallexample
-
-@smallexample
@group
(symbol-function 'car)
@result{} #<subr car>
@@ -286,24 +283,40 @@ the function cell of @code{erste}.
(erste '(1 2 3)) ; @r{Call the function referenced by @code{erste}.}
@result{} 1
@end group
-@end smallexample
+@end example
By contrast, the following example calls a function without any symbol
function indirection, because the first element is an anonymous Lisp
function, not a symbol.
-@smallexample
+@example
@group
((lambda (arg) (erste arg))
'(1 2 3))
@result{} 1
@end group
-@end smallexample
+@end example
@noindent
Executing the function itself evaluates its body; this does involve
symbol function indirection when calling @code{erste}.
+ This form is rarely used and is now deprecated. Instead, you should write it
+as:
+
+@example
+@group
+(funcall (lambda (arg) (erste arg))
+ '(1 2 3))
+@end group
+@end example
+or just
+@example
+@group
+(let ((arg '(1 2 3))) (erste arg))
+@end group
+@end example
+
The built-in function @code{indirect-function} provides an easy way to
perform symbol function indirection explicitly.
@@ -325,12 +338,12 @@ loop in the chain of symbols.
Here is how you could define @code{indirect-function} in Lisp:
-@smallexample
+@example
(defun indirect-function (function)
(if (symbolp function)
(indirect-function (symbol-function function))
function))
-@end smallexample
+@end example
@end defun
@node Function Forms
diff --git a/doc/lispref/files.texi b/doc/lispref/files.texi
index 3597d9f80c4..2ee80504b60 100644
--- a/doc/lispref/files.texi
+++ b/doc/lispref/files.texi
@@ -71,8 +71,8 @@ back into the file.
In spite of the distinction between files and buffers, people often
refer to a file when they mean a buffer and vice-versa. Indeed, we say,
-``I am editing a file,'' rather than, ``I am editing a buffer that I
-will soon save as a file of the same name.'' Humans do not usually need
+``I am editing a file'', rather than, ``I am editing a buffer that I
+will soon save as a file of the same name''. Humans do not usually need
to make the distinction explicit. When dealing with a computer program,
however, it is good to keep the distinction in mind.
@@ -688,7 +688,7 @@ The file lock is really a file, a symbolic link with a special name,
stored in the same directory as the file you are editing.
When you access files using NFS, there may be a small probability that
-you and another user will both lock the same file ``simultaneously.''
+you and another user will both lock the same file ``simultaneously''.
If this happens, it is possible for the two users to make changes
simultaneously, but Emacs will still warn the user who saves second.
Also, the detection of modification of a buffer visiting a file changed
@@ -726,7 +726,12 @@ system does not support locking.
File locking is not supported on some systems. On systems that do not
support it, the functions @code{lock-buffer}, @code{unlock-buffer} and
-@code{file-locked-p} do nothing and return @code{nil}.
+@code{file-locked-p} do nothing and return @code{nil}. It is also
+possible to disable locking, by setting the variable @code{create-lockfiles}.
+
+@defopt create-lockfiles
+If this variable is @code{nil}, Emacs does not lock files.
+@end defopt
@defun ask-user-about-lock file other-user
This function is called when the user tries to modify @var{file}, but it
@@ -1806,7 +1811,7 @@ return value, but backup version numbers are kept.
@end defun
@defun file-name-extension filename &optional period
-This function returns @var{filename}'s final ``extension,'' if any,
+This function returns @var{filename}'s final ``extension'', if any,
after applying @code{file-name-sans-versions} to remove any
version/backup part. The extension, in a file name, is the part that
follows the last @samp{.} in the last name component (minus any
@@ -2798,7 +2803,7 @@ unlocking the buffer if it is locked.
possibly others to be added in the future. It need not implement all
these operations itself---when it has nothing special to do for a
certain operation, it can reinvoke the primitive, to handle the
-operation ``in the usual way.'' It should always reinvoke the primitive
+operation ``in the usual way''. It should always reinvoke the primitive
for an operation it does not recognize. Here's one way to do this:
@smallexample
@@ -2950,7 +2955,8 @@ between consecutive checks. For example:
@example
(defun display-time-file-nonempty-p (file)
- (let ((remote-file-name-inhibit-cache (- display-time-interval 5)))
+ (let ((remote-file-name-inhibit-cache
+ (- display-time-interval 5)))
(and (file-exists-p file)
(< 0 (nth 7 (file-attributes (file-chase-links file)))))))
@end example
diff --git a/doc/lispref/frames.texi b/doc/lispref/frames.texi
index d824f51e47e..2ff4df55669 100644
--- a/doc/lispref/frames.texi
+++ b/doc/lispref/frames.texi
@@ -882,7 +882,7 @@ This variable specifies how to blink the cursor. Each element has the
form @code{(@var{on-state} . @var{off-state})}. Whenever the cursor
type equals @var{on-state} (comparing using @code{equal}), the
corresponding @var{off-state} specifies what the cursor looks like
-when it blinks ``off.'' Both @var{on-state} and @var{off-state}
+when it blinks ``off''. Both @var{on-state} and @var{off-state}
should be suitable values for the @code{cursor-type} frame parameter.
There are various defaults for how to blink each type of cursor, if
@@ -1069,7 +1069,7 @@ characters rather than pixels.
These values include the internal borders, and windows' scroll bars
and fringes (which belong to individual windows, not to the frame
itself). The exact value of the heights depends on the window-system
-and toolkit in use. With Gtk+, the height does not include any tool
+and toolkit in use. With GTK+, the height does not include any tool
bar or menu bar. With the Motif or Lucid toolkits, it includes the
tool bar but not the menu bar. In a graphical version with no
toolkit, it includes both the tool bar and menu bar. For a text
@@ -1532,7 +1532,7 @@ track of such changes. @xref{Misc Events}.
Most window systems use a desktop metaphor. Part of this metaphor is
the idea that windows are stacked in a notional third dimension
perpendicular to the screen surface, and thus ordered from ``highest''
-to ``lowest.'' Where two windows overlap, the one higher up covers
+to ``lowest''. Where two windows overlap, the one higher up covers
the one underneath. Even a window at the bottom of the stack can be
seen if no other window overlaps it.
@@ -1540,7 +1540,7 @@ seen if no other window overlaps it.
@cindex lowering a frame
A window's place in this ordering is not fixed; in fact, users tend
to change the order frequently. @dfn{Raising} a window means moving
-it ``up,'' to the top of the stack. @dfn{Lowering} a window means
+it ``up'', to the top of the stack. @dfn{Lowering} a window means
moving it to the bottom of the stack. This motion is in the notional
third dimension only, and does not change the position of the window
on the screen.
@@ -1814,7 +1814,7 @@ the menu keymap as necessary.
A dialog box is a variant of a pop-up menu---it looks a little
different, it always appears in the center of a frame, and it has just
one level and one or more buttons. The main use of dialog boxes is
-for asking questions that the user can answer with ``yes,'' ``no,''
+for asking questions that the user can answer with ``yes'', ``no'',
and a few other alternatives. With a single button, they can also
force the user to acknowledge important information. The functions
@code{y-or-n-p} and @code{yes-or-no-p} use dialog boxes instead of the
@@ -1881,12 +1881,12 @@ of the buffer contents), the mouse pointer usually uses the
@code{arrow} style, but you can specify a different style (one of
those above) by setting @code{void-text-area-pointer}.
-@defvar void-text-area-pointer
+@defopt void-text-area-pointer
This variable specifies the mouse pointer style for void text areas.
These include the areas after the end of a line or below the last line
in the buffer. The default is to use the @code{arrow} (non-text)
pointer style.
-@end defvar
+@end defopt
When using X, you can specify what the @code{text} pointer style
really looks like by setting the variable @code{x-pointer-shape}.
@@ -2028,7 +2028,7 @@ colors.)
These functions provide a way to determine which color names are
valid, and what they look like. In some cases, the value depends on the
@dfn{selected frame}, as described below; see @ref{Input Focus}, for the
-meaning of the term ``selected frame.''
+meaning of the term ``selected frame''.
To read user input of color names with completion, use
@code{read-color} (@pxref{High-Level Completion, read-color}).
@@ -2425,7 +2425,7 @@ software (as a string). Really this means whoever distributes the X
server.
When the developers of X labeled software distributors as
-``vendors,'' they showed their false assumption that no system could
+``vendors'', they showed their false assumption that no system could
ever be developed and distributed noncommercially.
@end defun
diff --git a/doc/lispref/front-cover-1.texi b/doc/lispref/front-cover-1.texi
deleted file mode 100644
index 56d0f2b1c2d..00000000000
--- a/doc/lispref/front-cover-1.texi
+++ /dev/null
@@ -1,52 +0,0 @@
-\input texinfo @c -*-texinfo-*-
-@comment %**start of header
-@setfilename front1.info
-@settitle GNU Emacs Lisp Reference Manual
-@smallbook
-@comment %**end of header
-
-@titlepage
-.
-@sp 2
-@center @titlefont{The}
-@sp 1
-@center @titlefont{GNU}
-@sp 1
-@center @titlefont{Emacs Lisp}
-@sp 1
-@center @titlefont{Reference}
-@sp 1
-@center @titlefont{Manual}
-@sp 2
-@center GNU Emacs Version 19.29
-@center for Unix Users
-@center Edition 2.4, June 1995
-@sp 2
-@center @titlefont{Volume 1}
-@sp 2
-@center by Bil Lewis, Dan LaLiberte,
-@center and the GNU Manual Group
-@page
-.
-@sp 5
-@center @titlefont{The}
-@sp 1
-@center @titlefont{GNU}
-@sp 1
-@center @titlefont{Emacs Lisp}
-@sp 1
-@center @titlefont{Reference}
-@sp 1
-@center @titlefont{Manual}
-@sp 2
-@center GNU Emacs Version 19.29
-@center for Unix Users
-@center Edition 2.4, June 1995
-@sp 2
-@center @titlefont{Volume 2}
-@sp 2
-@center by Bil Lewis, Dan LaLiberte,
-@center and the GNU Manual Group
-
-@end titlepage
-@bye
diff --git a/doc/lispref/functions.texi b/doc/lispref/functions.texi
index 73bdefe19fc..5e393a399d3 100644
--- a/doc/lispref/functions.texi
+++ b/doc/lispref/functions.texi
@@ -266,13 +266,12 @@ function is the value returned by the last element of the body.
@end example
@noindent
-We can call this function by writing it as the @sc{car} of an
-expression, like this:
+We can call this function by passing it to @code{funcall}, like this:
@example
@group
-((lambda (a b c) (+ a b c))
- 1 2 3)
+(funcall (lambda (a b c) (+ a b c))
+ 1 2 3)
@end group
@end example
@@ -287,8 +286,8 @@ this example:
@example
@group
-((lambda (a b c) (+ a b c))
- 1 (* 2 3) (- 5 4))
+(funcall (lambda (a b c) (+ a b c))
+ 1 (* 2 3) (- 5 4))
@end group
@end example
@@ -398,19 +397,19 @@ after a @code{&rest} argument.
Here are some examples of argument lists and proper calls:
-@smallexample
-((lambda (n) (1+ n)) ; @r{One required:}
- 1) ; @r{requires exactly one argument.}
+@example
+(funcall (lambda (n) (1+ n)) ; @r{One required:}
+ 1) ; @r{requires exactly one argument.}
@result{} 2
-((lambda (n &optional n1) ; @r{One required and one optional:}
- (if n1 (+ n n1) (1+ n))) ; @r{1 or 2 arguments.}
- 1 2)
+(funcall (lambda (n &optional n1) ; @r{One required and one optional:}
+ (if n1 (+ n n1) (1+ n))) ; @r{1 or 2 arguments.}
+ 1 2)
@result{} 3
-((lambda (n &rest ns) ; @r{One required and one rest:}
- (+ n (apply '+ ns))) ; @r{1 or more arguments.}
- 1 2 3 4 5)
+(funcall (lambda (n &rest ns) ; @r{One required and one rest:}
+ (+ n (apply '+ ns))) ; @r{1 or more arguments.}
+ 1 2 3 4 5)
@result{} 15
-@end smallexample
+@end example
@node Function Documentation
@subsection Documentation Strings of Functions
@@ -821,7 +820,7 @@ char-table; that is, a list, a vector, a bool-vector, or a string. The
result is always a list. The length of the result is the same as the
length of @var{sequence}. For example:
-@smallexample
+@example
@group
(mapcar 'car '((a b) (c d) (e f)))
@result{} (a c e)
@@ -853,7 +852,7 @@ Return the list of results."
(mapcar* 'cons '(a b c) '(1 2 3 4))
@result{} ((a . 1) (b . 2) (c . 3))
@end group
-@end smallexample
+@end example
@end defun
@defun mapc function sequence
@@ -874,7 +873,7 @@ argument and return a string. The argument @var{sequence} can be any
kind of sequence except a char-table; that is, a list, a vector, a
bool-vector, or a string.
-@smallexample
+@example
@group
(mapconcat 'symbol-name
'(The cat in the hat)
@@ -888,7 +887,7 @@ bool-vector, or a string.
"")
@result{} "IBM.9111"
@end group
-@end smallexample
+@end example
@end defun
@node Anonymous Functions
@@ -1189,18 +1188,18 @@ still allow the code to be byte compiled).
For instance, in old versions of Emacs the @code{sit-for} function
accepted three arguments, like this
-@smallexample
+@example
(sit-for seconds milliseconds nodisp)
-@end smallexample
+@end example
However, calling @code{sit-for} this way is considered obsolete
(@pxref{Waiting}). The old calling convention is deprecated like
this:
-@smallexample
+@example
(set-advertised-calling-convention
'sit-for '(seconds &optional nodisp))
-@end smallexample
+@end example
@end defun
@node Inline Functions
@@ -1260,11 +1259,11 @@ indicates a real problem, but usually the functions in question are
defined in other files which would be loaded if that code is run. For
example, byte-compiling @file{fortran.el} used to warn:
-@smallexample
+@example
In end of data:
fortran.el:2152:1:Warning: the function `gud-find-c-expr' is not known
to be defined.
-@end smallexample
+@end example
In fact, @code{gud-find-c-expr} is only used in the function that
Fortran mode uses for the local value of
@@ -1277,9 +1276,9 @@ visible. You do that with @code{declare-function}.
All you need to do is add a @code{declare-function} statement before the
first use of the function in question:
-@smallexample
+@example
(declare-function gud-find-c-expr "gud.el" nil)
-@end smallexample
+@end example
This says that @code{gud-find-c-expr} is defined in @file{gud.el} (the
@samp{.el} can be omitted). The compiler takes for granted that that file
diff --git a/doc/lispref/hash.texi b/doc/lispref/hash.texi
index 0ca4c915a65..1aa6004b3a6 100644
--- a/doc/lispref/hash.texi
+++ b/doc/lispref/hash.texi
@@ -74,13 +74,13 @@ alternatives:
Keys which are numbers are ``the same'' if they are @code{equal}, that
is, if they are equal in value and either both are integers or both
are floating point numbers; otherwise, two distinct objects are never
-``the same.''
+``the same''.
@item eq
Any two distinct Lisp objects are ``different'' as keys.
@item equal
-Two Lisp objects are ``the same,'' as keys, if they are equal
+Two Lisp objects are ``the same'', as keys, if they are equal
according to @code{equal}.
@end table
@@ -128,7 +128,7 @@ doing that takes some extra time.
The default size is 65.
@item :rehash-size @var{rehash-size}
-When you add an association to a hash table and the table is ``full,''
+When you add an association to a hash table and the table is ``full'',
it grows automatically. This value specifies how to make the hash table
larger, at that time.
@@ -262,7 +262,7 @@ will use @var{test-fn} to compare key values, and @var{hash-fn} to compute
a ``hash code'' from a key value.
The function @var{test-fn} should accept two arguments, two keys, and
-return non-@code{nil} if they are considered ``the same.''
+return non-@code{nil} if they are considered ``the same''.
The function @var{hash-fn} should accept one argument, a key, and return
an integer that is the ``hash code'' of that key. For good results, the
diff --git a/doc/lispref/help.texi b/doc/lispref/help.texi
index 5dfb2b05ff8..762b42113f2 100644
--- a/doc/lispref/help.texi
+++ b/doc/lispref/help.texi
@@ -599,7 +599,7 @@ subcommands of the prefix key.
@defopt help-event-list
The value of this variable is a list of event types that serve as
-alternative ``help characters.'' These events are handled just like the
+alternative ``help characters''. These events are handled just like the
event specified by @code{help-char}.
@end defopt
diff --git a/doc/lispref/internals.texi b/doc/lispref/internals.texi
index c9758f8704a..aad3d09695c 100644
--- a/doc/lispref/internals.texi
+++ b/doc/lispref/internals.texi
@@ -354,7 +354,7 @@ itself; the latter is only allocated when the string is created.)
If there was overflow in pure space (@pxref{Pure Storage}),
@code{garbage-collect} returns @code{nil}, because a real garbage
-collection can not be done in this situation.
+collection cannot be done.
@end deffn
@defopt garbage-collection-messages
@@ -471,12 +471,12 @@ in this Emacs session.
@defvar string-chars-consed
The total number of string characters that have been allocated so far
-in this Emacs session.
+in this session.
@end defvar
@defvar misc-objects-consed
The total number of miscellaneous objects that have been allocated so
-far in this Emacs session. These include markers and overlays, plus
+far in this session. These include markers and overlays, plus
certain objects not visible to users.
@end defvar
@@ -580,8 +580,8 @@ there is a fixed maximum. Alternatively, it can be @code{UNEVALLED},
indicating a special form that receives unevaluated arguments, or
@code{MANY}, indicating an unlimited number of evaluated arguments (the
equivalent of @code{&rest}). Both @code{UNEVALLED} and @code{MANY} are
-macros. If @var{max} is a number, it may not be less than @var{min} and
-it may not be greater than eight.
+macros. If @var{max} is a number, it must be more than @var{min} but
+less than 8.
@item interactive
This is an interactive specification, a string such as might be used as
diff --git a/doc/lispref/intro.texi b/doc/lispref/intro.texi
index d3a5b253162..282d01c3504 100644
--- a/doc/lispref/intro.texi
+++ b/doc/lispref/intro.texi
@@ -33,8 +33,12 @@ Lisp that have counterparts in many programming languages, and later
chapters describe features that are peculiar to Emacs Lisp or relate
specifically to editing.
- This is edition @value{VERSION} of the GNU Emacs Lisp Reference
-Manual, corresponding to Emacs version @value{EMACSVER}.
+ This is
+@iftex
+edition @value{VERSION} of
+@end iftex
+the @cite{GNU Emacs Lisp Reference Manual},
+corresponding to Emacs version @value{EMACSVER}.
@menu
* Caveats:: Flaws and a request for help.
@@ -69,7 +73,7 @@ real-life example for a function or group of functions, please make an
effort to write it up and send it in. Please reference any comments to
the chapter name, section name, and function name, as appropriate, since
page numbers and chapter and section numbers will change and we may have
-trouble finding the text you are talking about. Also state the number
+trouble finding the text you are talking about. Also state the version
of the edition you are criticizing.
@end iftex
@ifnottex
@@ -116,10 +120,10 @@ worry about it; this manual is self-contained.
@pindex cl
A certain amount of Common Lisp emulation is available via the
-@file{cl} library. @inforef{Top, Overview, cl}.
+@file{cl} library. @xref{Top,, Overview, cl, Common Lisp Extensions}.
Emacs Lisp is not at all influenced by Scheme; but the GNU project has
-an implementation of Scheme, called Guile. We use Guile in all new GNU
+an implementation of Scheme, called Guile. We use it in all new GNU
software that calls for extensibility.
@node Conventions
@@ -146,7 +150,7 @@ printer'' refer to those routines in Lisp that convert textual
representations of Lisp objects into actual Lisp objects, and vice
versa. @xref{Printed Representation}, for more details. You, the
person reading this manual, are thought of as ``the programmer'' and are
-addressed as ``you.'' ``The user'' is the person who uses Lisp
+addressed as ``you''. ``The user'' is the person who uses Lisp
programs, including those you write.
@cindex typographic conventions
@@ -219,7 +223,7 @@ the examples in this manual, this is indicated with @samp{@result{}}:
@end example
@noindent
-You can read this as ``@code{(car '(1 2))} evaluates to 1.''
+You can read this as ``@code{(car '(1 2))} evaluates to 1''.
When a form is a macro call, it expands into a new form for Lisp to
evaluate. We show the result of the expansion with
@@ -253,7 +257,7 @@ displayed in the echo area.
Examples in this manual indicate printed text with @samp{@print{}},
irrespective of where that text goes. The value returned by
-evaluating the form (here @code{bar}) follows on a separate line with
+evaluating the form follows on a separate line with
@samp{@result{}}.
@example
@@ -506,8 +510,6 @@ numeric components, such as @code{"22.0.91.1"}, indicates an
unreleased test version.
@end defvar
- The following two variables have existed since Emacs version 19.23:
-
@defvar emacs-major-version
The major version number of Emacs, as an integer. For Emacs version
23.1, the value is 23.
diff --git a/doc/lispref/keymaps.texi b/doc/lispref/keymaps.texi
index b12752fdeea..337364cb2ce 100644
--- a/doc/lispref/keymaps.texi
+++ b/doc/lispref/keymaps.texi
@@ -1032,7 +1032,7 @@ binding of @var{othertype} in @var{othermap} and uses that.
This feature permits you to define one key as an alias for another key.
For example, an entry whose @sc{car} is the keymap called @code{esc-map}
and whose @sc{cdr} is 32 (the code for @key{SPC}) means, ``Use the global
-binding of @kbd{Meta-@key{SPC}}, whatever that may be.''
+binding of @kbd{Meta-@key{SPC}}, whatever that may be''.
@end itemize
@item @var{symbol}
@@ -1887,9 +1887,9 @@ maps searched are @var{keymap} and the global keymap. If @var{keymap}
is a list of keymaps, only those keymaps are searched.
Usually it's best to use @code{overriding-local-map} as the expression
-for @var{keymap}. Then @code{where-is-internal} searches precisely the
-keymaps that are active. To search only the global map, pass
-@code{(keymap)} (an empty keymap) as @var{keymap}.
+for @var{keymap}. Then @code{where-is-internal} searches precisely
+the keymaps that are active. To search only the global map, pass the
+value @code{(keymap)} (an empty keymap) as @var{keymap}.
If @var{firstonly} is @code{non-ascii}, then the value is a single
vector representing the first key sequence found, rather than a list of
@@ -1903,20 +1903,24 @@ If @var{noindirect} is non-@code{nil}, @code{where-is-internal} doesn't
follow indirect keymap bindings. This makes it possible to search for
an indirect definition itself.
-When command remapping is in effect (@pxref{Remapping Commands}),
-@code{where-is-internal} figures out when a command will be run due to
-remapping and reports keys accordingly. It also returns @code{nil} if
-@var{command} won't really be run because it has been remapped to some
-other command. However, if @var{no-remap} is non-@code{nil}.
-@code{where-is-internal} ignores remappings.
+The fifth argument, @var{no-remap}, determines how this function
+treats command remappings (@pxref{Remapping Commands}). There are two
+cases of interest:
-@smallexample
-@group
-(where-is-internal 'describe-function)
- @result{} ([8 102] [f1 102] [help 102]
- [menu-bar help-menu describe describe-function])
-@end group
-@end smallexample
+@table @asis
+@item If a command @var{other-command} is remapped to @var{command}:
+If @var{no-remap} is @code{nil}, find the bindings for
+@var{other-command} and treat them as though they are also bindings
+for @var{command}. If @var{no-remap} is non-@code{nil}, include the
+vector @code{[remap @var{other-command}]} in the list of possible key
+sequences, instead of finding those bindings.
+
+@item If @var{command} is remapped to @var{other-command}:
+If @var{no-remap} is @code{nil}, return the bindings for
+@var{other-command} rather than @var{command}. If @var{no-remap} is
+non-@code{nil}, return the bindings for @var{command}, ignoring the
+fact that it is remapped.
+@end table
@end defun
@deffn Command describe-bindings &optional prefix buffer-or-name
@@ -2147,7 +2151,7 @@ This works because @code{toggle-debug-on-error} is defined as a command
which toggles the variable @code{debug-on-error}.
@dfn{Radio buttons} are a group of menu items, in which at any time one
-and only one is ``selected.'' There should be a variable whose value
+and only one is ``selected''. There should be a variable whose value
says which one is selected at any time. The @var{selected} form for
each radio button in the group should check whether the variable has the
right value for selecting that button. Clicking on the button should
@@ -2424,7 +2428,7 @@ Next we define the menu items:
Note the symbols which the bindings are ``made for''; these appear
inside square brackets, in the key sequence being defined. In some
cases, this symbol is the same as the command name; sometimes it is
-different. These symbols are treated as ``function keys,'' but they are
+different. These symbols are treated as ``function keys'', but they are
not real function keys on the keyboard. They do not affect the
functioning of the menu itself, but they are ``echoed'' in the echo area
when the user selects from the menu, and they appear in the output of
diff --git a/doc/lispref/lists.texi b/doc/lispref/lists.texi
index 2325915d76a..82a796c6700 100644
--- a/doc/lispref/lists.texi
+++ b/doc/lispref/lists.texi
@@ -34,12 +34,12 @@ object that represents an ordered pair. That is, it has two slots,
and each slot @dfn{holds}, or @dfn{refers to}, some Lisp object. One
slot is known as the @sc{car}, and the other is known as the @sc{cdr}.
(These names are traditional; see @ref{Cons Cell Type}.) @sc{cdr} is
-pronounced ``could-er.''
+pronounced ``could-er''.
We say that ``the @sc{car} of this cons cell is'' whatever object
its @sc{car} slot currently holds, and likewise for the @sc{cdr}.
- A list is a series of cons cells ``chained together,'' so that each
+ A list is a series of cons cells ``chained together'', so that each
cell refers to the next one. There is one cons cell for each element
of the list. By convention, the @sc{car}s of the cons cells hold the
elements of the list, and the @sc{cdr}s are used to chain the list
@@ -87,7 +87,7 @@ structure made out of cons cells as a @dfn{list structure}.
whether it is a cons cell or is a list, or whether it is the
distinguished object @code{nil}. (Many of these predicates can be
defined in terms of the others, but they are used so often that it is
-worth having all of them.)
+worth having them.)
@defun consp object
This function returns @code{t} if @var{object} is a cons cell, @code{nil}
@@ -763,8 +763,7 @@ if it already has one; otherwise, it is equivalent to @code{nil}.
The argument @var{symbol} is not implicitly quoted;
@code{add-to-ordered-list} is an ordinary function, like @code{set}
-and unlike @code{setq}. Quote the argument yourself if that is what
-you want.
+and unlike @code{setq}. Quote the argument yourself if necessary.
The ordering information is stored in a hash table on @var{symbol}'s
@code{list-order} property.
@@ -1269,7 +1268,7 @@ functions for sets include @code{memq} and @code{delq}, and their
@b{Common Lisp note:} Common Lisp has functions @code{union} (which
avoids duplicate elements) and @code{intersection} for set operations.
Although standard GNU Emacs Lisp does not have them, the @file{cl}
-library provides versions. @inforef{Top, Overview, cl}.
+library provides versions. @xref{Top,, Overview, cl, Common Lisp Extensions}.
@end quotation
@defun memq object list
@@ -1632,7 +1631,7 @@ a @sc{cdr} @code{equal} to @var{value}.
@code{rassoc} is like @code{assoc} except that it compares the @sc{cdr} of
each @var{alist} association instead of the @sc{car}. You can think of
-this as ``reverse @code{assoc},'' finding the key for a given value.
+this as ``reverse @code{assoc}'', finding the key for a given value.
@end defun
@defun assq key alist
@@ -1673,7 +1672,7 @@ a @sc{cdr} @code{eq} to @var{value}.
@code{rassq} is like @code{assq} except that it compares the @sc{cdr} of
each @var{alist} association instead of the @sc{car}. You can think of
-this as ``reverse @code{assq},'' finding the key for a given value.
+this as ``reverse @code{assq}'', finding the key for a given value.
For example:
diff --git a/doc/lispref/loading.texi b/doc/lispref/loading.texi
index 2bd500d8479..c585bafbdeb 100644
--- a/doc/lispref/loading.texi
+++ b/doc/lispref/loading.texi
@@ -250,31 +250,31 @@ for @code{PATH}; directory names are separated by @samp{:} (or
current default directory. Here is an example of how to set
@env{EMACSLOADPATH} variable from @command{sh}:
-@smallexample
+@example
export EMACSLOADPATH
EMACSLOADPATH=/home/foo/.emacs.d/lisp:/opt/emacs/lisp
-@end smallexample
+@end example
@noindent
Here is how to set it from @code{csh}:
-@smallexample
+@example
setenv EMACSLOADPATH /home/foo/.emacs.d/lisp:/opt/emacs/lisp
-@end smallexample
+@end example
If @env{EMACSLOADPATH} is not set (which is usually the case), Emacs
initializes @code{load-path} with the following two directories:
-@smallexample
+@example
"/usr/local/share/emacs/@var{version}/site-lisp"
-@end smallexample
+@end example
@noindent
and
-@smallexample
+@example
"/usr/local/share/emacs/site-lisp"
-@end smallexample
+@end example
@noindent
The first one is for locally installed packages for a particular Emacs
@@ -303,9 +303,9 @@ packages are installed, if any (@pxref{Packaging Basics}).
It is common to add code to one's init file (@pxref{Init File}) to
add one or more directories to @code{load-path}. For example:
-@smallexample
+@example
(push "~/.emacs.d/lisp" load-path)
-@end smallexample
+@end example
Dumping Emacs uses a special value of @code{load-path}. If the
value of @code{load-path} at the end of dumping is unchanged (that is,
@@ -339,9 +339,9 @@ similarly-named file in a directory earlier on @code{load-path}.
For instance, suppose @code{load-path} is set to
-@smallexample
+@example
("/opt/emacs/site-lisp" "/usr/share/emacs/23.3/lisp")
-@end smallexample
+@end example
@noindent
and that both these directories contain a file named @file{foo.el}.
@@ -374,11 +374,10 @@ strings are multibyte strings should not be noticeable, since
inserting them in unibyte buffers converts them to unibyte
automatically. However, if this does make a difference, you can force
a particular Lisp file to be interpreted as unibyte by writing
-@samp{unibyte: t} in a local variables section. With
+@samp{coding: raw-text} in a local variables section. With
that designator, the file will unconditionally be interpreted as
-unibyte, even in an ordinary multibyte Emacs session. This can matter
-when making keybindings to non-@acronym{ASCII} characters written as
-@code{?v@var{literal}}.
+unibyte. This can matter when making keybindings to
+non-@acronym{ASCII} characters written as @code{?v@var{literal}}.
@node Autoload
@section Autoload
@@ -513,11 +512,10 @@ the following:
@file{mode-local.el}).
@item Definitions for major or minor modes:
-@code{define-derived-mode}, @code{define-minor-mode},
-@code{define-compilation-mode}, @code{define-generic-mode},
-@code{easy-mmode-define-global-mode}, @code{define-global-minor-mode},
-@code{define-globalized-minor-mode}, and
-@code{easy-mmode-define-minor-mode}.
+@code{define-minor-mode}, @code{define-globalized-minor-mode},
+@code{define-generic-mode}, @code{easy-mmode-define-minor-mode},
+@code{easy-mmode-define-global-mode}, @code{define-compilation-mode},
+@code{define-derived-mode}, and @code{define-global-minor-mode}.
@item Other definition types:
@code{defcustom}, @code{defgroup}, @code{defclass}
@@ -535,24 +533,24 @@ it is executed while building Emacs.
The following example shows how @code{doctor} is prepared for
autoloading with a magic comment:
-@smallexample
+@example
;;;###autoload
(defun doctor ()
"Switch to *doctor* buffer and start giving psychotherapy."
(interactive)
(switch-to-buffer "*doctor*")
(doctor-mode))
-@end smallexample
+@end example
@noindent
Here's what that produces in @file{loaddefs.el}:
-@smallexample
+@example
(autoload (quote doctor) "doctor" "\
Switch to *doctor* buffer and start giving psychotherapy.
\(fn)" t nil)
-@end smallexample
+@end example
@noindent
@cindex @code{fn} in function's documentation string
@@ -571,11 +569,11 @@ ordinary magic autoload comment would copy the whole definition into
@code{loaddefs.el}. That is not desirable. You can put the desired
@code{autoload} call into @code{loaddefs.el} instead by writing this:
-@smallexample
+@example
;;;###autoload (autoload 'foo "myfile")
(mydefunmacro foo
...)
-@end smallexample
+@end example
You can use a non-default string as the autoload cookie and have the
corresponding autoload calls written into a file whose name is
@@ -680,7 +678,7 @@ file should call @code{provide} at the top level to add the feature to
For example, in @file{idlwave.el}, the definition for
@code{idlwave-complete-filename} includes the following code:
-@smallexample
+@example
(defun idlwave-complete-filename ()
"Use the comint stuff to complete a file name."
(require 'comint)
@@ -688,7 +686,7 @@ file should call @code{provide} at the top level to add the feature to
(comint-completion-addsuffix nil)
...)
(comint-dynamic-complete-filename)))
-@end smallexample
+@end example
@noindent
The expression @code{(require 'comint)} loads the file @file{comint.el}
@@ -703,9 +701,9 @@ after the let exits.)
The @file{comint.el} file contains the following top-level expression:
-@smallexample
+@example
(provide 'comint)
-@end smallexample
+@end example
@noindent
This adds @code{comint} to the global @code{features} list, so that
@@ -726,13 +724,13 @@ ensure that a file of definitions is loaded before it is byte-compiled
by including a @code{provide} followed by a @code{require} for the same
feature, as in the following example.
-@smallexample
+@example
@group
(provide 'my-feature) ; @r{Ignored by byte compiler,}
; @r{evaluated by @code{load}.}
(require 'my-feature) ; @r{Evaluated by byte compiler.}
@end group
-@end smallexample
+@end example
@noindent
The compiler ignores the @code{provide}, then processes the
@@ -762,7 +760,7 @@ package, which might or might not be loaded, or might or might not be
present in a given version. @xref{Network Feature Testing}, for
an example.
-@smallexample
+@example
features
@result{} (bar bish)
@@ -770,7 +768,7 @@ features
@result{} foo
features
@result{} (foo bar bish)
-@end smallexample
+@end example
When a file is loaded to satisfy an autoload, and it stops due to an
error in the evaluation of its contents, any function definitions or
diff --git a/doc/lispref/macros.texi b/doc/lispref/macros.texi
index bc4cec3307d..27361a5f07e 100644
--- a/doc/lispref/macros.texi
+++ b/doc/lispref/macros.texi
@@ -109,7 +109,7 @@ If @var{environment} is provided, it specifies an alist of macro
definitions that shadow the currently defined macros. Byte compilation
uses this feature.
-@smallexample
+@example
@group
(defmacro inc (var)
(list 'setq var (list '1+ var)))
@@ -131,7 +131,7 @@ uses this feature.
(macroexpand '(inc2 r s))
@result{} (progn (inc r) (inc s)) ; @r{@code{inc} not expanded here.}
@end group
-@end smallexample
+@end example
@end defun
@@ -145,10 +145,10 @@ Repeating the example used for @code{macroexpand} above with
@code{macroexpand-all}, we see that @code{macroexpand-all} @emph{does}
expand the embedded calls to @code{inc}:
-@smallexample
+@example
(macroexpand-all '(inc2 r s))
@result{} (progn (setq r (1+ r)) (setq s (1+ s)))
-@end smallexample
+@end example
@end defun
@@ -332,7 +332,7 @@ following macro (used to facilitate iteration) illustrates the
problem. This macro allows us to write a ``for'' loop construct.
@findex for
-@smallexample
+@example
@group
(defmacro for (var from init to final do &rest body)
"Execute a simple \"for\" loop.
@@ -363,7 +363,7 @@ For example, (for i from 1 to 10 do (print i))."
@print{}3 9
@result{} nil
@end group
-@end smallexample
+@end example
@noindent
The arguments @code{from}, @code{to}, and @code{do} in this macro are
@@ -373,7 +373,7 @@ in those positions in the macro call.
Here's an equivalent definition simplified through use of backquote:
-@smallexample
+@example
@group
(defmacro for (var from init to final do &rest body)
"Execute a simple \"for\" loop.
@@ -383,7 +383,7 @@ For example, (for i from 1 to 10 do (print i))."
,@@body
(inc ,var))))
@end group
-@end smallexample
+@end example
Both forms of this definition (with backquote and without) suffer from
the defect that @var{final} is evaluated on every iteration. If
@@ -398,7 +398,7 @@ producing an expansion that evaluates the argument expressions exactly
once unless repeated evaluation is part of the intended purpose of the
macro. Here is a correct expansion for the @code{for} macro:
-@smallexample
+@example
@group
(let ((i 1)
(max 3))
@@ -407,11 +407,11 @@ macro. Here is a correct expansion for the @code{for} macro:
(princ (format "%d %d" i square))
(inc i)))
@end group
-@end smallexample
+@end example
Here is a macro definition that creates this expansion:
-@smallexample
+@example
@group
(defmacro for (var from init to final do &rest body)
"Execute a simple for loop: (for i from 1 to 10 do (print i))."
@@ -421,7 +421,7 @@ Here is a macro definition that creates this expansion:
,@@body
(inc ,var))))
@end group
-@end smallexample
+@end example
Unfortunately, this fix introduces another problem,
described in the following section.
@@ -434,7 +434,7 @@ described in the following section.
follows to make the expansion evaluate the macro arguments the proper
number of times:
-@smallexample
+@example
@group
(defmacro for (var from init to final do &rest body)
"Execute a simple for loop: (for i from 1 to 10 do (print i))."
@@ -446,14 +446,14 @@ number of times:
,@@body
(inc ,var))))
@end group
-@end smallexample
+@end example
@end ifnottex
The new definition of @code{for} has a new problem: it introduces a
local variable named @code{max} which the user does not expect. This
causes trouble in examples such as the following:
-@smallexample
+@example
@group
(let ((max 0))
(for x from 0 to 10 do
@@ -461,7 +461,7 @@ causes trouble in examples such as the following:
(if (< max this)
(setq max this)))))
@end group
-@end smallexample
+@end example
@noindent
The references to @code{max} inside the body of the @code{for}, which
@@ -477,7 +477,7 @@ put it into the program later. It will never appear anywhere except
where put by @code{for}. Here is a definition of @code{for} that works
this way:
-@smallexample
+@example
@group
(defmacro for (var from init to final do &rest body)
"Execute a simple for loop: (for i from 1 to 10 do (print i))."
@@ -488,7 +488,7 @@ this way:
,@@body
(inc ,var)))))
@end group
-@end smallexample
+@end example
@noindent
This creates an uninterned symbol named @code{max} and puts it in the
@@ -604,7 +604,7 @@ either.
@section Indenting Macros
Within a macro definition, you can use the @code{declare} form
-(@pxref{Defining Macros}) to specify how to @key{TAB} should indent
+(@pxref{Defining Macros}) to specify how @key{TAB} should indent
calls to the macro. An indentation specification is written like this:
@example
diff --git a/doc/lispref/makefile.w32-in b/doc/lispref/makefile.w32-in
index 0a4aea2d7e0..2914852dc8a 100644
--- a/doc/lispref/makefile.w32-in
+++ b/doc/lispref/makefile.w32-in
@@ -28,6 +28,9 @@ emacsdir = $(srcdir)/../emacs
# Directory with the (customized) texinfo.tex file.
texinfodir = $(srcdir)/../misc
+INFO_EXT=.info
+INFO_OPTS=--no-split
+
# Redefine `TEX' if `tex' does not invoke plain TeX. For example:
# TEX=platex
TEX=tex
@@ -48,7 +51,6 @@ srcs = \
$(srcdir)/abbrevs.texi \
$(srcdir)/advice.texi \
$(srcdir)/anti.texi \
- $(srcdir)/back.texi \
$(srcdir)/backups.texi \
$(srcdir)/buffers.texi \
$(srcdir)/commands.texi \
@@ -103,13 +105,13 @@ srcs = \
# The info file is named `elisp'.
-info: $(infodir)/elisp
+info: $(infodir)/elisp$(INFO_EXT)
$(infodir)/dir:
$(INSTALL_INFO) --info-dir=$(infodir) $(infodir)/elisp
-$(infodir)/elisp: $(srcs)
- $(MAKEINFO) $(MAKEINFO_OPTS) -o $(infodir)/elisp $(srcdir)/elisp.texi
+$(infodir)/elisp$(INFO_EXT): $(srcs)
+ $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ $(srcdir)/elisp.texi
elisp.dvi: $(srcs)
$(texinputdir) $(TEX) $(srcdir)/elisp.texi
@@ -124,4 +126,4 @@ distclean: clean
- $(DEL) makefile
maintainer-clean: distclean
- - $(DEL) elisp elisp-? elisp-?? elisp.dvi elisp.oaux
+ - $(DEL) elisp$(INFO_EXT) elisp$(INFO_EXT)-? elisp$(INFO_EXT)-?? elisp.dvi elisp.oaux
diff --git a/doc/lispref/minibuf.texi b/doc/lispref/minibuf.texi
index c840eb6ded0..99118af19c7 100644
--- a/doc/lispref/minibuf.texi
+++ b/doc/lispref/minibuf.texi
@@ -57,16 +57,17 @@ including @code{beginning-of-line}, @code{forward-word},
@code{forward-sentence}, and @code{forward-paragraph}, stop at the
boundary between the prompt and the actual text.
+@c See http://debbugs.gnu.org/11276
The minibuffer's window is normally a single line; it grows
-automatically if the contents require more space. You can explicitly
-@c FIXME? Works in 23.4, not 24.0.95. (Bug#11276)
-resize it temporarily with the window sizing commands; it reverts to
-its normal size when the minibuffer is exited. You can resize it
-@c FIXME? Doesn't work in any version of Emacs?
+automatically if the contents require more space. Whilst it is
+active, you can explicitly resize it temporarily with the window
+sizing commands; it reverts to its normal size when the minibuffer is
+exited. When the minibuffer is not active, you can resize it
permanently by using the window sizing commands in the frame's other
-window, when the minibuffer is not active. If the frame contains just
-a minibuffer, you can change the minibuffer's size by changing the
-frame's size.
+window, or dragging the mode line with the mouse. (Due to details of
+the current implementation, for this to work @code{resize-mini-windows}
+must be @code{nil}.) If the frame contains just a minibuffer, you can
+change the minibuffer's size by changing the frame's size.
Use of the minibuffer reads input events, and that alters the values
of variables such as @code{this-command} and @code{last-command}
@@ -511,8 +512,7 @@ duplicates, and to add @var{newelt} to the list even if it is empty.
If the value of this variable is @code{nil}, standard functions that
read from the minibuffer don't add new elements to the history list.
This lets Lisp programs explicitly manage input history by using
-@code{add-to-history}. By default, @code{history-add-new-input} is
-non-@code{nil}.
+@code{add-to-history}. The default value is @code{t}.
@end defvar
@defopt history-length
@@ -695,7 +695,7 @@ You can also use a function as @var{collection}. Then the function is
solely responsible for performing completion; @code{try-completion}
returns whatever this function returns. The function is called with
three arguments: @var{string}, @var{predicate} and @code{nil} (the
-reason for the third argument is so that the same function can be used
+third argument is so that the same function can be used
in @code{all-completions} and do the appropriate thing in either
case). @xref{Programmed Completion}.
@@ -718,8 +718,8 @@ handle @code{completion-regexp-list} itself.)
In the first of the following examples, the string @samp{foo} is
matched by three of the alist @sc{car}s. All of the matches begin with
the characters @samp{fooba}, so that is the result. In the second
-example, there is only one possible match, and it is exact, so the value
-is @code{t}.
+example, there is only one possible match, and it is exact, so the
+return value is @code{t}.
@smallexample
@group
diff --git a/doc/lispref/modes.texi b/doc/lispref/modes.texi
index aa089aec36b..00cd43d7b71 100644
--- a/doc/lispref/modes.texi
+++ b/doc/lispref/modes.texi
@@ -283,7 +283,7 @@ buffer is put in Fundamental mode (@pxref{Major Mode Conventions}).
* Derived Modes:: Defining a new major mode based on another major
mode.
* Basic Major Modes:: Modes that other modes are often derived from.
-* Mode Hooks:: Hooks run at the end of major mode commands.
+* Mode Hooks:: Hooks run at the end of major mode functions.
* Tabulated List Mode:: Parent mode for buffers containing tabulated data.
* Generic Modes:: Defining a simple major mode that supports
comment syntax and Font Lock mode.
@@ -384,7 +384,7 @@ reserved for users.
A major mode can also rebind the keys @kbd{M-n}, @kbd{M-p} and
@kbd{M-s}. The bindings for @kbd{M-n} and @kbd{M-p} should normally
-be some kind of ``moving forward and backward,'' but this does not
+be some kind of ``moving forward and backward'', but this does not
necessarily mean cursor motion.
It is legitimate for a major mode to rebind a standard key sequence if
@@ -938,7 +938,7 @@ such a major mode, please correct it to follow these conventions.
When you defined a major mode using @code{define-derived-mode}, it
automatically makes sure these conventions are followed. If you
-define a major mode ``by hand,'' not using @code{define-derived-mode},
+define a major mode ``by hand'', not using @code{define-derived-mode},
use the following functions to handle these conventions automatically.
@defun run-mode-hooks &rest hookvars
@@ -1122,8 +1122,8 @@ documentation for the mode command. If you do not supply it,
The argument @var{comment-list} is a list in which each element is
either a character, a string of one or two characters, or a cons cell.
A character or a string is set up in the mode's syntax table as a
-``comment starter.'' If the entry is a cons cell, the @sc{car} is set
-up as a ``comment starter'' and the @sc{cdr} as a ``comment ender.''
+``comment starter''. If the entry is a cons cell, the @sc{car} is set
+up as a ``comment starter'' and the @sc{cdr} as a ``comment ender''.
(Use @code{nil} for the latter if you want comments to end at the end
of the line.) Note that the syntax table mechanism has limitations
about what comment starters and enders are actually possible.
@@ -1648,7 +1648,7 @@ See the command \\[hungry-electric-delete]."
@end smallexample
@noindent
-This defines a minor mode named ``Hungry mode,'' a command named
+This defines a minor mode named ``Hungry mode'', a command named
@code{hungry-mode} to toggle it, a variable named @code{hungry-mode}
which indicates whether the mode is enabled, and a variable named
@code{hungry-mode-map} which holds the keymap that is active when the
@@ -3374,7 +3374,7 @@ Another one is SMIE which takes an approach in the spirit
of Lisp sexps and adapts it to non-Lisp languages.
@menu
-* SMIE:: A simple minded indentation engine
+* SMIE:: A simple minded indentation engine.
@end menu
@node SMIE
@@ -3400,14 +3400,14 @@ languages cannot be parsed correctly using SMIE, at least not without
resorting to some special tricks (@pxref{SMIE Tricks}).
@menu
-* SMIE setup:: SMIE setup and features
-* Operator Precedence Grammars:: A very simple parsing technique
-* SMIE Grammar:: Defining the grammar of a language
-* SMIE Lexer:: Defining tokens
-* SMIE Tricks:: Working around the parser's limitations
-* SMIE Indentation:: Specifying indentation rules
-* SMIE Indentation Helpers:: Helper functions for indentation rules
-* SMIE Indentation Example:: Sample indentation rules
+* SMIE setup:: SMIE setup and features.
+* Operator Precedence Grammars:: A very simple parsing technique.
+* SMIE Grammar:: Defining the grammar of a language.
+* SMIE Lexer:: Defining tokens.
+* SMIE Tricks:: Working around the parser's limitations.
+* SMIE Indentation:: Specifying indentation rules.
+* SMIE Indentation Helpers:: Helper functions for indentation rules.
+* SMIE Indentation Example:: Sample indentation rules.
@end menu
@node SMIE setup
diff --git a/doc/lispref/numbers.texi b/doc/lispref/numbers.texi
index 66f491b7780..f19dea69036 100644
--- a/doc/lispref/numbers.texi
+++ b/doc/lispref/numbers.texi
@@ -267,8 +267,6 @@ its argument. See also @code{integer-or-marker-p} and
@defun floatp object
This predicate tests whether its argument is a floating point
number and returns @code{t} if so, @code{nil} otherwise.
-
-@code{floatp} does not exist in Emacs versions 18 and earlier.
@end defun
@defun integerp object
@@ -777,7 +775,7 @@ and returns that value as a floating point number.
sequence of @dfn{bits} (digits which are either zero or one). A bitwise
operation acts on the individual bits of such a sequence. For example,
@dfn{shifting} moves the whole sequence left or right one or more places,
-reproducing the same pattern ``moved over.''
+reproducing the same pattern ``moved over''.
The bitwise operations in Emacs Lisp apply only to integers.
diff --git a/doc/lispref/objects.texi b/doc/lispref/objects.texi
index 58ceeb02b76..f43b8d803f5 100644
--- a/doc/lispref/objects.texi
+++ b/doc/lispref/objects.texi
@@ -675,7 +675,7 @@ not distinguish between a cons cell slot ``holding'' a value versus
@cindex atoms
Because cons cells are so central to Lisp, we also have a word for
-``an object which is not a cons cell.'' These objects are called
+``an object which is not a cons cell''. These objects are called
@dfn{atoms}.
@cindex parenthesis
@@ -1289,7 +1289,7 @@ without qualification, we mean a Lisp macro, not a keyboard macro.
A @dfn{primitive function} is a function callable from Lisp but
written in the C programming language. Primitive functions are also
called @dfn{subrs} or @dfn{built-in functions}. (The word ``subr'' is
-derived from ``subroutine.'') Most primitive functions evaluate all
+derived from ``subroutine''.) Most primitive functions evaluate all
their arguments when they are called. A primitive function that does
not evaluate all its arguments is called a @dfn{special form}
(@pxref{Special Forms}).@refill
@@ -1567,7 +1567,6 @@ runs in a process of this sort. However, in Emacs Lisp, a process is a
Lisp object that designates a subprocess created by the Emacs process.
Programs such as shells, GDB, ftp, and compilers, running in
subprocesses of Emacs, extend the capabilities of Emacs.
-
An Emacs subprocess takes textual input from Emacs and returns textual
output to Emacs for further manipulation. Emacs can also send signals
to the subprocess.
@@ -1631,7 +1630,7 @@ buffer temporarily in a different display style. Overlays have no read
syntax, and print in hash notation, giving the buffer name and range of
positions.
- @xref{Overlays}, for how to create and use overlays.
+ @xref{Overlays}, for information on how you can create and use overlays.
@node Font Type
@subsection Font Type
diff --git a/doc/lispref/os.texi b/doc/lispref/os.texi
index aae2e4434d7..ac6711f4827 100644
--- a/doc/lispref/os.texi
+++ b/doc/lispref/os.texi
@@ -1196,11 +1196,14 @@ sections.
@defun current-time-string &optional time-value
This function returns the current time and date as a human-readable
-string. The format of the string is unvarying; the number of
-characters used for each part is always the same, so you can reliably
-use @code{substring} to extract pieces of it. You should count
+string. The format does not vary for the initial part of the string,
+which contains the day of week, month, day of month, and time of day
+in that order: the number of characters used for these fields is
+always the same, so you can reliably
+use @code{substring} to extract them. You should count
characters from the beginning of the string rather than from the end,
-as additional information may some day be added at the end.
+as the year might not have exactly four digits, and additional
+information may some day be added at the end.
The argument @var{time-value}, if given, specifies a time to format
(represented as a list of integers), instead of the current time.
@@ -1732,11 +1735,11 @@ between them). If you want a timer to run again no less than @var{n}
seconds after the last invocation, don't use the @var{repeat} argument.
Instead, the timer function should explicitly reschedule the timer.
-@defvar timer-max-repeats
+@defopt timer-max-repeats
This variable's value specifies the maximum number of times to repeat
calling a timer function in a row, when many previously scheduled
calls were unavoidably delayed.
-@end defvar
+@end defopt
@defmac with-timeout (seconds timeout-forms@dots{}) body@dots{}
Execute @var{body}, but give up after @var{seconds} seconds. If
@@ -2271,7 +2274,7 @@ The notification title.
@item :body @var{text}
The notification body text. Depending on the implementation of the
notification server, the text could contain HTML markups, like
-@samp{"<b>bold text</b>"}, or hyperlinks.
+@samp{"<b>bold text</b>"}, hyperlinks, or images.
@item :app-name @var{name}
The name of the application sending the notification. The default is
@@ -2301,6 +2304,10 @@ the notification never expires. Default value is -1.
@item :urgency @var{urgency}
The urgency level. It can be @code{low}, @code{normal}, or @code{critical}.
+@item :action-items
+When this keyword is given, the @var{title} string of the actions is
+interpreted as icon name.
+
@item :category @var{category}
The type of notification this is, a string.
@@ -2331,6 +2338,17 @@ example would be @samp{"message-new-instant"}.
Causes the server to suppress playing any sounds, if it has that
ability.
+@item :resident
+When set the server will not automatically remove the notification
+when an action has been invoked. The notification will remain resident
+in the server until it is explicitly removed by the user or by the
+sender. This hint is likely only useful when the server has the
+@code{:persistence} capability.
+
+@item :transient
+When set the server will treat the notification as transient and
+by-pass the server's persistence capability, if it should exist.
+
@item :x @var{position}
@itemx :y @var{position}
Specifies the X, Y location on the screen that the
@@ -2355,6 +2373,9 @@ by the user. The function receive the notification @var{id} and the closing
@end itemize
@end table
+Which parameters are accepted by the notification server can be
+checked via @code{notifications-get-capabilities}.
+
This function returns a notification id, an integer, which can be used
to manipulate the notification item with
@code{notifications-close-notification} or the @code{:replaces-id}
@@ -2395,6 +2416,46 @@ A message window opens on the desktop. Press "I agree"
This function closes a notification with identifier @var{id}.
@end defun
+@defun notifications-get-capabilities
+Returns the capabilities of the notification server, a list of strings.
+The following capabilities can be expected:
+
+@table @code
+@item :actions
+The server will provide the specified actions to the user.
+
+@item :body
+Supports body text.
+
+@item :body-hyperlinks
+The server supports hyperlinks in the notifications.
+
+@item :body-images
+The server supports images in the notifications.
+
+@item :body-markup
+Supports markup in the body text.
+
+@item :icon-multi
+The server will render an animation of all the frames in a given image
+array.
+
+@item :icon-static
+Supports display of exactly 1 frame of any given image array. This
+value is mutually exclusive with @code{:icon-multi}.
+
+@item :persistence
+The server supports persistence of notifications.
+
+@item :sound
+The server supports sounds on notifications.
+@end table
+
+Further vendor-specific caps start with @code{:x-vendor}, like
+@code{:x-gnome-foo-cap}.
+@end defun
+
+
@node Dynamic Libraries
@section Dynamically Loaded Libraries
@cindex dynamic libraries
diff --git a/doc/lispref/package.texi b/doc/lispref/package.texi
index 7cb260d32b8..7c6d41b8e23 100644
--- a/doc/lispref/package.texi
+++ b/doc/lispref/package.texi
@@ -76,8 +76,8 @@ if any dependency cannot be found, the package cannot be installed.
@end table
@cindex content directory, package
- Installing a package, either via the Package Menu, or via the
-command @code{package-install-file}, creates a subdirectory of
+ Installing a package, either via the command @code{package-install-file},
+or via the Package Menu, creates a subdirectory of
@code{package-user-dir} named @file{@var{name}-@var{version}}, where
@var{name} is the package's name and @var{version} its version
(e.g. @file{~/.emacs.d/elpa/auctex-11.86/}). We call this the
diff --git a/doc/lispref/processes.texi b/doc/lispref/processes.texi
index 71736584865..ea68cf9ce96 100644
--- a/doc/lispref/processes.texi
+++ b/doc/lispref/processes.texi
@@ -96,12 +96,12 @@ Expansion}). @code{nil} in this list refers to
Executing a program can also try adding suffixes to the specified
name:
-@defvar exec-suffixes
+@defopt exec-suffixes
This variable is a list of suffixes (strings) to try adding to the
specified program file name. The list should include @code{""} if you
want the name to be tried exactly as specified. The default value is
system-dependent.
-@end defvar
+@end defopt
@strong{Please note:} The argument @var{program} contains only the
name of the program; it may not contain any command-line arguments. You
diff --git a/doc/lispref/sequences.texi b/doc/lispref/sequences.texi
index 16cc5f946d0..1ccf525e75f 100644
--- a/doc/lispref/sequences.texi
+++ b/doc/lispref/sequences.texi
@@ -247,7 +247,7 @@ The length of the array is fixed once you create it; you cannot
change the length of an existing array.
@item
-For purposes of evaluation, the array is a constant---in other words,
+For purposes of evaluation, the array is a constant---i.e.,
it evaluates to itself.
@item
diff --git a/doc/lispref/streams.texi b/doc/lispref/streams.texi
index 7028b6e4e3f..acf5fae859e 100644
--- a/doc/lispref/streams.texi
+++ b/doc/lispref/streams.texi
@@ -114,7 +114,7 @@ When it is called with one argument (always a character), @var{function}
should save the argument and arrange to return it on the next call.
This is called @dfn{unreading} the character; it happens when the Lisp
reader reads one character too many and wants to ``put it back where it
-came from.'' In this case, it makes no difference what value
+came from''. In this case, it makes no difference what value
@var{function} returns.
@end itemize
@@ -618,7 +618,7 @@ spacing between calls.
@defun terpri &optional stream
@cindex newline in print
This function outputs a newline to @var{stream}. The name stands
-for ``terminate print.''
+for ``terminate print''.
@end defun
@defun write-char character &optional stream
@@ -812,7 +812,6 @@ reader to produce an uninterned symbol.
If non-@code{nil}, that means number continuously across print calls.
This affects the numbers printed for @samp{#@var{n}=} labels and
@samp{#@var{m}#} references.
-
Don't set this variable with @code{setq}; you should only bind it
temporarily to @code{t} with @code{let}. When you do that, you should
also bind @code{print-number-table} to @code{nil}.
@@ -825,8 +824,8 @@ to bind it to @code{nil} when you bind @code{print-continuous-numbering}.
@end defvar
@defvar float-output-format
-This variable specifies how to print floating point numbers. Its
-default value is @code{nil}, meaning use the shortest output
+This variable specifies how to print floating point numbers. The
+default is @code{nil}, meaning use the shortest output
that represents the number without losing information.
To control output format more precisely, you can put a string in this
diff --git a/doc/lispref/symbols.texi b/doc/lispref/symbols.texi
index ac2cea02040..99928754038 100644
--- a/doc/lispref/symbols.texi
+++ b/doc/lispref/symbols.texi
@@ -90,7 +90,7 @@ the contents of a symbol's function cell, use the function
@code{symbol-function} (@pxref{Function Cells}).
The property list cell normally should hold a correctly formatted
-property list. To get a symbol's function cell, use the function
+property list. To get a symbol's property list, use the function
@code{symbol-plist}. @xref{Property Lists}.
The function cell or the value cell may be @dfn{void}, which means
@@ -140,7 +140,7 @@ act correctly if it is evaluated with lexical scoping enabled
@code{defun} defines a symbol as a function, creating a lambda
expression and storing it in the function cell of the symbol. This
lambda expression thus becomes the function definition of the symbol.
-(The term ``function definition,'' meaning the contents of the function
+(The term ``function definition'', meaning the contents of the function
cell, is derived from the idea that @code{defun} gives the symbol its
definition as a function.) @code{defsubst} and @code{defalias} are two
other ways of defining a function. @xref{Functions}.
@@ -310,7 +310,7 @@ The argument @var{name} may also be a symbol; in that case,
the function returns @var{name} if @var{name} is interned
in the specified obarray, and otherwise @code{nil}.
-@smallexample
+@example
(intern-soft "frazzle") ; @r{No such symbol exists.}
@result{} nil
(make-symbol "frazzle") ; @r{Create an uninterned one.}
@@ -331,7 +331,7 @@ in the specified obarray, and otherwise @code{nil}.
(eq sym 'frazzle) ; @r{And it is the same one.}
@result{} t
@end group
-@end smallexample
+@end example
@end defun
@defvar obarray
@@ -346,7 +346,7 @@ This function calls @var{function} once with each symbol in the obarray
omitted, it defaults to the value of @code{obarray}, the standard
obarray for ordinary symbols.
-@smallexample
+@example
(setq count 0)
@result{} 0
(defun count-syms (s)
@@ -356,7 +356,7 @@ obarray for ordinary symbols.
@result{} nil
count
@result{} 1871
-@end smallexample
+@end example
See @code{documentation} in @ref{Accessing Documentation}, for another
example using @code{mapatoms}.
@@ -462,12 +462,12 @@ This function sets @var{symbol}'s property list to @var{plist}.
Normally, @var{plist} should be a well-formed property list, but this is
not enforced. The return value is @var{plist}.
-@smallexample
+@example
(setplist 'foo '(a 1 b (2 3) c nil))
@result{} (a 1 b (2 3) c nil)
(symbol-plist 'foo)
@result{} (a 1 b (2 3) c nil)
-@end smallexample
+@end example
For symbols in special obarrays, which are not used for ordinary
purposes, it may make sense to use the property list cell in a
@@ -492,7 +492,7 @@ This function puts @var{value} onto @var{symbol}'s property list under
the property name @var{property}, replacing any previous property value.
The @code{put} function returns @var{value}.
-@smallexample
+@example
(put 'fly 'verb 'transitive)
@result{}'transitive
(put 'fly 'noun '(a buzzing little bug))
@@ -501,14 +501,14 @@ The @code{put} function returns @var{value}.
@result{} transitive
(symbol-plist 'fly)
@result{} (verb transitive noun (a buzzing little bug))
-@end smallexample
+@end example
@end defun
@node Other Plists
@subsection Property Lists Outside Symbols
These functions are useful for manipulating property lists
-that are stored in places other than symbols:
+not stored in symbols:
@defun plist-get plist property
This returns the value of the @var{property} property stored in the
diff --git a/doc/lispref/syntax.texi b/doc/lispref/syntax.texi
index 830ceeedefd..4a860657444 100644
--- a/doc/lispref/syntax.texi
+++ b/doc/lispref/syntax.texi
@@ -56,7 +56,7 @@ Modes}, for an example of how to set up a syntax table.
A syntax table can inherit the data for some characters from the
standard syntax table, while specifying other characters itself. The
``inherit'' syntax class means ``inherit this character's syntax from
-the standard syntax table.'' Just changing the standard syntax for a
+the standard syntax table''. Just changing the standard syntax for a
character affects all syntax tables that inherit from it.
@defun syntax-table-p object
@@ -617,7 +617,7 @@ higher-level functions for moving over balanced expressions.
A character's syntax controls how it changes the state of the
parser, rather than describing the state itself. For example, a
string delimiter character toggles the parser state between
-``in-string'' and ``in-code,'' but the syntax of characters does not
+``in-string'' and ``in-code'', but the syntax of characters does not
directly say whether they are inside a string. For example (note that
15 is the syntax code for generic string delimiters),
diff --git a/doc/lispref/text.texi b/doc/lispref/text.texi
index a9c51fead1b..09ea37a96ba 100644
--- a/doc/lispref/text.texi
+++ b/doc/lispref/text.texi
@@ -555,7 +555,7 @@ error; if some of the text in it is read-only, it signals a
asking for any confirmation. It returns @code{nil}.
Normally, deleting a large amount of text from a buffer inhibits further
-auto-saving of that buffer ``because it has shrunk.'' However,
+auto-saving of that buffer ``because it has shrunk''. However,
@code{erase-buffer} does not do this, the idea being that the future
text is not really related to the former text, and its size should not
be compared with that of the former text.
@@ -806,7 +806,7 @@ that treat it as a ring.
Some people think this use of the word ``kill'' is unfortunate, since
it refers to operations that specifically @emph{do not} destroy the
-entities ``killed.'' This is in sharp contrast to ordinary life, in
+entities ``killed''. This is in sharp contrast to ordinary life, in
which death is permanent and ``killed'' entities do not come back to
life. Therefore, other metaphors have been proposed. For example, the
term ``cut ring'' makes sense to people who, in pre-computer days, used
@@ -845,7 +845,7 @@ the entry made by the first one.
For yanking, one entry in the kill ring is designated the ``front'' of
the ring. Some yank commands ``rotate'' the ring by designating a
-different element as the ``front.'' But this virtual rotation doesn't
+different element as the ``front''. But this virtual rotation doesn't
change the list itself---the most recent entry always comes first in the
list.
@@ -1093,8 +1093,8 @@ programs, when you are using a window system. Its value should be
@code{nil} or a function of no arguments.
If the value is a function, @code{current-kill} calls it to get the
-``most recent kill.'' If the function returns a non-@code{nil} value,
-then that value is used as the ``most recent kill.'' If it returns
+``most recent kill''. If the function returns a non-@code{nil} value,
+then that value is used as the ``most recent kill''. If it returns
@code{nil}, then the front of the kill ring is used.
To facilitate support for window systems that support multiple
@@ -1799,12 +1799,6 @@ special is done in that case.
The value of @code{auto-fill-function} is @code{do-auto-fill} when
Auto-Fill mode is enabled. That is a function whose sole purpose is to
implement the usual strategy for breaking a line.
-
-@quotation
-In older Emacs versions, this variable was named @code{auto-fill-hook},
-but since it is not called with the standard convention for hooks, it
-was renamed to @code{auto-fill-function} in version 19.
-@end quotation
@end defvar
@defvar normal-auto-fill-function
@@ -3504,7 +3498,7 @@ once for the same part of the buffer, you can use the variable
If this variable's value is non-@code{nil}, it is a symbol which is used
as a text property name. A non-@code{nil} value for that text property
means, ``the other text properties for this character have already been
-computed.''
+computed''.
If all the characters in the range specified for @code{buffer-substring}
have a non-@code{nil} value for this property, @code{buffer-substring}
@@ -3808,7 +3802,7 @@ after @var{old-pos}.) If @var{escape-from-edge} is non-@code{nil},
@var{new-pos} can be anywhere in the two adjacent fields.
Additionally, if two fields are separated by another field with the
special value @code{boundary}, then any point within this special
-field is also considered to be ``on the boundary.''
+field is also considered to be ``on the boundary''.
Commands like @kbd{C-a} with no argument, that normally move backward
to a specific kind of location and stay there once there, probably
@@ -4333,15 +4327,15 @@ buffer that is about to change is always the current buffer.
@defvar after-change-functions
This variable holds a list of functions to call after any buffer
-modification. Each function receives three arguments: the beginning and
-end of the region just changed, and the length of the text that existed
-before the change. All three arguments are integers. The buffer that's
-about to change is always the current buffer.
-
-The length of the old text is the difference between the buffer positions
-before and after that text as it was before the change. As for the
-changed text, its length is simply the difference between the first two
-arguments.
+modification. Each function receives three arguments: the beginning
+and end of the region just changed, and the length of the text that
+existed before the change. All three arguments are integers. The
+buffer has been changed is always the current buffer.
+
+The length of the old text is the difference between the buffer
+positions before and after that text as it was before the change. As
+for the changed text, its length is simply the difference between the
+first two arguments.
@end defvar
Output of messages into the @file{*Messages*} buffer does not
diff --git a/doc/lispref/tindex.pl b/doc/lispref/tindex.pl
deleted file mode 100755
index a8765716e71..00000000000
--- a/doc/lispref/tindex.pl
+++ /dev/null
@@ -1,124 +0,0 @@
-#! /usr/bin/perl
-
-# Copyright (C) 2000-2012 Free Software Foundation, Inc.
-
-# This file is part of GNU Emacs.
-
-# GNU Emacs 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, either version 3 of the License, or
-# (at your option) any later version.
-
-# GNU Emacs 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 GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
-
-
-require 5;
-use Getopt::Long;
-
-my $USAGE = <<ENDUSAGE;
-Remove \@tindex lines from files that were already present in previous
-versions.
-
-Usage: $0 [--old=EXT] FILE...
- $0 --help
- $0 --version
-
- --help display this help and exit
- --version print version and exit
- --old=DIR find old files in DIR
-
-The script performs two passes. In the first pass, Texinfo files from
-DIR are scanned for \@tindex lines, and identifiers in them are
-recorded. In a second pass, Texinfo files in the current directory
-are scanned, and \@tindex lines for identifiers that were recorded in
-the first pass are removed. Old file contents are saved in files
-with extension ".orig". A list of modified files and removed \@tindex
-identifiers is printed to stdout at the end.
-ENDUSAGE
-
-sub fatal {
- print STDERR "$0: ", @_, ".\n";
- exit 1;
-}
-
-my $help = 0;
-my $version = 0;
-my $old;
-
-my $rc = GetOptions ('help' => \$help, 'version' => \$version,
- 'old=s' => \$old);
-if ($version) {
- print "0.1\n";
- exit 0;
-} elsif (!$rc || !$old || @ARGV) {
- print $USAGE;
- exit 1;
-} elsif ($help) {
- print $USAGE;
- exit 0;
-}
-
-# Fill the hash %tindex with associations VAR -> COUNT where
-# the keys VAR are identifiers mentioned in @tindex lines in the older
-# files to process and COUNT is the number of times they are seen in
-# the files.
-
-my %tindex;
-my %removed;
-my @old_files = glob "$old/*.texi";
-my @new_files = glob "*.texi";
-fatal ("No Texinfo files found in `$old'") unless @old_files;
-fatal ("No Texinfo files found in current directory") unless @new_files;
-
-print "Scanning old files for \@tindex lines\n";
-foreach $file (@old_files) {
- open (IN, "<$file") or fatal "Cannot open $file: $!";
- while (<IN>) {
- ++$tindex{$1} if /^\s*\@tindex\s+(\S+)/;
- }
- close IN;
-}
-
-# Process current files and remove those @tindex lines which we
-# know were already present in the files scanned above.
-
-print "Removing old \@tindex lines\n";
-foreach $file (@new_files) {
- my $modified = 0;
- my $contents = "";
-
- open (IN, "< $file") or fatal "Cannot open $file.orig for reading: $!";
- while (<IN>) {
- if (/^\s*\@tindex\s+(\S+)/ && $tindex{$1}) {
- ++$removed{$1};
- $modified = 1;
- } else {
- $contents = $contents . $_;
- }
- }
-
- close IN;
-
- if ($modified) {
- print " $file\n";
- system ("cp $file $file.orig") == 0 or fatal "Cannot backup $file: $!";
- open (OUT, ">$file") or fatal "Cannot open $file for writing: $!";
- print OUT $contents;
- close OUT;
- }
-}
-
-# Print a list of identifiers removed.
-
-print "Removed \@tindex commands for:\n";
-my $key;
-foreach $key (keys %removed) {
- print " $key\n";
-}
-
diff --git a/doc/lispref/tips.texi b/doc/lispref/tips.texi
index 4ba7dd9dfe9..0e58373119f 100644
--- a/doc/lispref/tips.texi
+++ b/doc/lispref/tips.texi
@@ -640,7 +640,7 @@ have the form (KEY . VALUE). Here, KEY is ...
@item
Never change the case of a Lisp symbol when you mention it in a doc
-string. If the symbol's name is @code{foo}, write ``foo,'' not
+string. If the symbol's name is @code{foo}, write ``foo'', not
``Foo'' (which is a different symbol).
This might appear to contradict the policy of writing function
@@ -772,9 +772,9 @@ is indicative and has a proper subject.
@item
The documentation string for a function that is a yes-or-no predicate
-should start with words such as ``Return t if,'' to indicate
-explicitly what constitutes ``truth.'' The word ``return'' avoids
-starting the sentence with lower-case ``t,'' which could be somewhat
+should start with words such as ``Return t if'', to indicate
+explicitly what constitutes ``truth''. The word ``return'' avoids
+starting the sentence with lower-case ``t'', which could be somewhat
distracting.
@item
@@ -797,8 +797,8 @@ returned.''
@item
Avoid using the word ``cause'' (or its equivalents) unnecessarily.
-Instead of, ``Cause Emacs to display text in boldface,'' write just
-``Display text in boldface.''
+Instead of, ``Cause Emacs to display text in boldface'', write just
+``Display text in boldface''.
@item
Avoid using ``iff'' (a mathematics term meaning ``if and only if''),
@@ -821,7 +821,7 @@ to set, use @code{defcustom}. @xref{Defining Variables}.
@item
The documentation string for a variable that is a yes-or-no flag should
-start with words such as ``Non-nil means,'' to make it clear that
+start with words such as ``Non-nil means'', to make it clear that
all non-@code{nil} values are equivalent and indicate explicitly what
@code{nil} and non-@code{nil} mean.
@end itemize
diff --git a/doc/lispref/two-volume.make b/doc/lispref/two-volume.make
index 4acbb193f82..eb5c0e0193d 100644
--- a/doc/lispref/two-volume.make
+++ b/doc/lispref/two-volume.make
@@ -1,32 +1,45 @@
-# Copyright (C) 2007-2012 Free Software Foundation, Inc.
+# Copyright (C) 2007-2012 Free Software Foundation, Inc.
# See end for copying conditions.
# although it would be nice to use tex rather than pdftex to avoid
# colors, spurious warnings about names being referenced but not
# existing, etc., dvips | ps2pdf doesn't preserve the page size.
# Instead of creating a special dvips config file, put up with the warnings.
+# (Note added 2012/05: for me, using texlive-2007-57, pdftex
+# doesn't work for reason, but tex does.)
texinfodir=../misc
+emacsdir=../emacs
-tex = TEXINPUTS=".:$(texinfodir):${TEXINPUTS}" pdftex -interaction=nonstopmode
+tex = TEXINPUTS=".:$(texinfodir):${emacsdir}:${TEXINPUTS}" pdftex -interaction=nonstopmode
all: vol1.pdf vol2.pdf
-# vol1.texi and vol2.texi specially define \tocreadfilename so we can
-# use our premade .toc's.
+# There's probably a better way to do this, without using a temp file.
+# Something like:
+# tex -jobname=vol1 '\def\SETVOL1 \input{elisp.texi}'
+# but I don't know what to use for "\def\SETVOL1".
+tex1 = sed '/^@setfilename/a\
+@set VOL1' elisp.texi > elisp1tmp.tex && $(tex) -jobname=vol1 elisp1tmp.tex
+
+tex2 = sed '/^@setfilename/a\
+@set VOL2' elisp.texi > elisp2tmp.tex && $(tex) -jobname=vol2 elisp2tmp.tex
+
+# elisp.texi specially defines \tocreadfilename when VOL1 or VOL2 is
+# set, so we can use our premade .toc's.
#
vol1.pdf: elisp1med-fns-ready elisp1med-aux-ready elisp1med-toc-ready
@echo -e "\f Final TeX run for volume 1..."
cp elisp1med-toc-ready elisp1-toc-ready.toc
cp elisp1med-fns-ready vol1.fns
cp elisp1med-aux-ready vol1.aux
- $(tex) vol1.texi
+ $(tex1)
#
vol2.pdf: elisp2med-fns-ready elisp2med-aux-ready elisp2med-toc-ready
@echo "Final TeX run for volume 2..."
cp elisp2med-toc-ready elisp2-toc-ready.toc
cp elisp2med-fns-ready vol2.fns
cp elisp2med-aux-ready vol2.aux
- $(tex) vol2.texi
+ $(tex2)
# intermediate toc files.
#
@@ -104,7 +117,7 @@ elisp1med-init: elisp1-fns-ready elisp1-aux-ready elisp1init-toc-ready $(texinfo
cp elisp1init-toc-ready elisp1-toc-ready.toc
cp elisp1-fns-ready vol1.fns
cp elisp1-aux-ready vol1.aux
- $(tex) vol1.texi
+ $(tex1)
texindex vol1.??
mv vol1.aux elisp1med-aux
mv vol1.toc elisp1med-toc
@@ -114,7 +127,7 @@ elisp2med-init: elisp2-fns-ready elisp2-aux-ready elisp2init-toc-ready $(texinfo
cp elisp2init-toc-ready elisp2-toc-ready.toc
cp elisp2-fns-ready vol2.fns
cp elisp2-aux-ready vol2.aux
- $(tex) vol2.texi
+ $(tex2)
texindex vol2.??
mv vol2.aux elisp2med-aux
mv vol2.toc elisp2med-toc
@@ -188,19 +201,19 @@ elisp2-fn-vol-added: elisp2-init
# but we run texindex and TeX a second time just to get them closer.
# Otherwise it might take even longer for them to converge.
#
-elisp1-init: vol1.texi
+elisp1-init: elisp.texi
@echo -e "\f Initial TeX run for volume 1..."
rm -f vol1.aux vol1.toc
- $(tex) $<
+ $(tex1)
texindex vol1.??
mv vol1.aux elisp1-aux
mv vol1.toc elisp1-toc
touch $@
#
-elisp2-init: vol2.texi
+elisp2-init: elisp.texi
@echo "Initial TeX run for volume 2..."
rm -f vol2.aux vol2.toc
- $(tex) $<
+ $(tex2)
texindex vol2.??
mv vol2.aux elisp2-aux
mv vol2.toc elisp2-toc
diff --git a/doc/lispref/two.el b/doc/lispref/two.el
deleted file mode 100644
index 39dee62d45d..00000000000
--- a/doc/lispref/two.el
+++ /dev/null
@@ -1,78 +0,0 @@
-;; Auxiliary functions for preparing a two volume manual.
-
-;; Copyright (C) 2001-2012 Free Software Foundation, Inc.
-
-;; --rjc 30mar92
-
-;; This file 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, either version 3 of the License, or
-;; (at your option) any later version.
-
-;; This file 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 file. If not, see <http://www.gnu.org/licenses/>.
-
-
-(defun volume-aux-markup (arg)
- "Append `vol. NUMBER' to page number.
-Apply to aux file that you save.
-Then insert marked file into other volume's .aux file."
- (interactive "sType volume number, 1 or 2: " )
- (goto-char (point-min))
- (while (search-forward "-pg" nil t)
- (end-of-line 1)
- (delete-backward-char 1 nil)
- (insert ", vol.'tie" arg "}")))
-
-(defun volume-index-markup (arg)
- "Prepend `NUMBER:' to page number. Use Roman Numeral.
-Apply only to unsorted index file,
-Then insert marked file into other volume's unsorted index file.
-Then run texindex on that file and save."
- (interactive
- "sType volume number, roman number I or II: " )
- (goto-char (point-min))
- (while (search-forward "\\entry" nil t)
- (search-forward "}{" (save-excursion (end-of-line) (point)) nil)
- (insert arg ":")))
-
-(defun volume-numbers-toc-markup (arg)
- (interactive
- "sType volume number, roman number I or II: " )
- (goto-char (point-min))
- (while (search-forward "chapentry" nil t)
- (end-of-line)
- (search-backward "{" nil t)
- (forward-char 1)
- (insert arg ":")))
-
-(defun volume-header-toc-markup ()
- "Insert Volume I and Volume II text into .toc file.
-NOTE: this auxiliary function is file specific.
-This is for the *Elisp Ref Manual*."
- (interactive)
- (goto-char (point-min))
- (insert "\\unnumbchapentry {Volume 1}{}\n\\unnumbchapentry {}{}\n")
- (search-forward "\\unnumbchapentry {Index}")
- (forward-line 1)
- (insert
- "\\unnumbchapentry {}{}\n\\unnumbchapentry {}{}\n\\unnumbchapentry {}{}\n\\unnumbchapentry {}{}\n\\unnumbchapentry {Volume 2}{}\n\\unnumbchapentry {}{}\n"))
-
-
-;;; In batch mode, you cannot call functions with args; hence this kludge:
-
-(defun volume-aux-markup-1 () (volume-aux-markup "1"))
-(defun volume-aux-markup-2 () (volume-aux-markup "2"))
-
-(defun volume-index-markup-I () (volume-index-markup "I"))
-(defun volume-index-markup-II () (volume-index-markup "II"))
-
-(defun volume-numbers-toc-markup-I () (volume-numbers-toc-markup "I"))
-(defun volume-numbers-toc-markup-II () (volume-numbers-toc-markup "II"))
-
-;;; two.el ends here
diff --git a/doc/lispref/variables.texi b/doc/lispref/variables.texi
index e0e629ec9d3..4e622231645 100644
--- a/doc/lispref/variables.texi
+++ b/doc/lispref/variables.texi
@@ -670,7 +670,7 @@ symbol is changed.
@code{setq} does not evaluate @var{symbol}; it sets the symbol that you
write. We say that this argument is @dfn{automatically quoted}. The
-@samp{q} in @code{setq} stands for ``quoted.''
+@samp{q} in @code{setq} stands for ``quoted''.
The value of the @code{setq} form is the value of the last @var{form}.
diff --git a/doc/lispref/vol1.texi b/doc/lispref/vol1.texi
deleted file mode 100644
index 25ea8577467..00000000000
--- a/doc/lispref/vol1.texi
+++ /dev/null
@@ -1,1552 +0,0 @@
-\input texinfo @c -*-texinfo-*-
-@c This file is used for printing the GNU Emacs Lisp Reference Manual
-@c in two volumes. It is a modified version of elisp.texi.
-@c Copyright (C) 1990-1995, 1998-1999, 2001-2012
-@c Free Software Foundation, Inc.
-@c %**start of header
-@setfilename elisp
-@settitle GNU Emacs Lisp Reference Manual: Volume 1
-@c %**end of header
-
-@c See two-volume-cross-refs.txt.
-@tex
-\message{Formatting for two volume edition...Volume 1...}
-%
-% Read special toc file, set up in two-volume.make.
-\gdef\tocreadfilename{elisp1-toc-ready.toc}
-%
-% Don't make outlines, they're not needed and \readdatafile can't pay
-% attention to the special definition above.
-\global\let\pdfmakeoutlines=\relax
-%
-% Start volume 1 chapter numbering at 1; this must be listed as chapno0.
-\global\chapno=0
-@end tex
-
-@c Version of the manual and of Emacs.
-@c Please remember to update the edition number in README as well.
-@set VERSION 3.0
-@include emacsver.texi
-@set DATE July 2009
-
-@dircategory Emacs
-@direntry
-* Elisp: (elisp). The Emacs Lisp Reference Manual.
-@end direntry
-
-@c in general, keep the following line commented out, unless doing a
-@c copy of this manual that will be published. the manual should go
-@c onto the distribution in the full, 8.5 x 11" size.
-@set smallbook
-
-@ifset smallbook
-@smallbook
-@end ifset
-
-@c per rms and peterb, use 10pt fonts for the main text, mostly to
-@c save on paper cost.
-@c Do this inside @tex for now, so current makeinfo does not complain.
-@tex
-@ifset smallbook
-@fonttextsize 10
-\global\let\urlcolor=\Black % don't print links in grayscale
-\global\let\linkcolor=\Black
-@end ifset
-\global\hbadness=6666 % don't worry about not-too-underfull boxes
-@end tex
-
-@c Combine indices.
-@synindex cp fn
-@syncodeindex vr fn
-@syncodeindex ky fn
-@syncodeindex pg fn
-@c We use the "type index" to index new functions and variables.
-@c @syncodeindex tp fn
-
-@copying
-This is edition @value{VERSION} of the GNU Emacs Lisp Reference Manual,@*
-corresponding to Emacs version @value{EMACSVER}.
-
-Copyright @copyright{} 1990-1996, 1998-2012 Free Software Foundation, Inc.
-
-@quotation
-Permission is granted to copy, distribute and/or modify this document
-under the terms of the GNU Free Documentation License, Version 1.3 or
-any later version published by the Free Software Foundation; with the
-Invariant Sections being ``GNU General Public License,'' with the
-Front-Cover texts being ``A GNU Manual,'' and with the Back-Cover
-Texts as in (a) below. A copy of the license is included in the
-section entitled ``GNU Free Documentation License.''
-
-(a) The FSF's Back-Cover Text is: ``You have the freedom to copy and
-modify this GNU manual. Buying copies from the FSF supports it in
-developing GNU and promoting software freedom.''
-@end quotation
-@end copying
-
-@titlepage
-@title GNU Emacs Lisp Reference Manual
-@subtitle Volume 1
-@subtitle For Emacs Version @value{EMACSVER}
-@subtitle Revision @value{VERSION}, @value{DATE}
-
-@author by Bil Lewis, Dan LaLiberte, Richard Stallman
-@author and the GNU Manual Group
-@page
-@vskip 0pt plus 1filll
-@insertcopying
-
-@sp 2
-
-Published by the Free Software Foundation @*
-51 Franklin St, Fifth Floor @*
-Boston, MA 02110-1301 @*
-USA @*
-ISBN 1-882114-74-4
-
-@sp 2
-Cover art by Etienne Suvasa.
-@end titlepage
-
-
-@c Print the tables of contents
-@summarycontents
-@contents
-
-
-@ifnottex
-@node Top, Introduction, (dir), (dir)
-@top Emacs Lisp
-
-This Info file contains edition @value{VERSION} of the GNU Emacs Lisp
-Reference Manual, corresponding to GNU Emacs version @value{EMACSVER}.
-@end ifnottex
-
-@menu
-* Introduction:: Introduction and conventions used.
-
-* Lisp Data Types:: Data types of objects in Emacs Lisp.
-* Numbers:: Numbers and arithmetic functions.
-* Strings and Characters:: Strings, and functions that work on them.
-* Lists:: Lists, cons cells, and related functions.
-* Sequences Arrays Vectors:: Lists, strings and vectors are called sequences.
- Certain functions act on any kind of sequence.
- The description of vectors is here as well.
-* Hash Tables:: Very fast lookup-tables.
-* Symbols:: Symbols represent names, uniquely.
-
-* Evaluation:: How Lisp expressions are evaluated.
-* Control Structures:: Conditionals, loops, nonlocal exits.
-* Variables:: Using symbols in programs to stand for values.
-* Functions:: A function is a Lisp program
- that can be invoked from other functions.
-* Macros:: Macros are a way to extend the Lisp language.
-* Customization:: Making variables and faces customizable.
-
-* Loading:: Reading files of Lisp code into Lisp.
-* Byte Compilation:: Compilation makes programs run faster.
-* Advising Functions:: Adding to the definition of a function.
-* Debugging:: Tools and tips for debugging Lisp programs.
-
-* Read and Print:: Converting Lisp objects to text and back.
-* Minibuffers:: Using the minibuffer to read input.
-* Command Loop:: How the editor command loop works,
- and how you can call its subroutines.
-* Keymaps:: Defining the bindings from keys to commands.
-* Modes:: Defining major and minor modes.
-* Documentation:: Writing and using documentation strings.
-
-* Files:: Accessing files.
-* Backups and Auto-Saving:: Controlling how backups and auto-save
- files are made.
-* Buffers:: Creating and using buffer objects.
-* Windows:: Manipulating windows and displaying buffers.
-* Frames:: Making multiple system-level windows.
-* Positions:: Buffer positions and motion functions.
-* Markers:: Markers represent positions and update
- automatically when the text is changed.
-
-* Text:: Examining and changing text in buffers.
-* Non-ASCII Characters:: Non-ASCII text in buffers and strings.
-* Searching and Matching:: Searching buffers for strings or regexps.
-* Syntax Tables:: The syntax table controls word and list parsing.
-* Abbrevs:: How Abbrev mode works, and its data structures.
-
-* Processes:: Running and communicating with subprocesses.
-* Display:: Features for controlling the screen display.
-* System Interface:: Getting the user id, system type, environment
- variables, and other such things.
-
-* Packaging:: Preparing Lisp code for distribution.
-
-Appendices
-
-* Antinews:: Info for users downgrading to Emacs 23.
-* GNU Free Documentation License:: The license for this documentation.
-* GPL:: Conditions for copying and changing GNU Emacs.
-* Tips:: Advice and coding conventions for Emacs Lisp.
-* GNU Emacs Internals:: Building and dumping Emacs;
- internal data structures.
-* Standard Errors:: List of some standard error symbols.
-* Standard Keymaps:: List of some standard keymaps.
-* Standard Hooks:: List of some standard hook variables.
-
-* Index:: Index including concepts, functions, variables,
- and other terms.
-
-@ignore
-* New Symbols:: New functions and variables in Emacs @value{EMACSVER}.
-@end ignore
-
-@c Do NOT modify the following 3 lines! They must have this form to
-@c be correctly identified by `texinfo-multiple-files-update'. In
-@c particular, the detailed menu header line MUST be identical to the
-@c value of `texinfo-master-menu-header'. See texnfo-upd.el.
-
-@detailmenu
- --- The Detailed Node Listing ---
- ---------------------------------
-
-Here are other nodes that are subnodes of those already listed,
-mentioned here so you can get to them in one step:
-
-Introduction
-
-* Caveats:: Flaws and a request for help.
-* Lisp History:: Emacs Lisp is descended from Maclisp.
-* Conventions:: How the manual is formatted.
-* Version Info:: Which Emacs version is running?
-* Acknowledgements:: The authors, editors, and sponsors of this manual.
-
-Conventions
-
-* Some Terms:: Explanation of terms we use in this manual.
-* nil and t:: How the symbols @code{nil} and @code{t} are used.
-* Evaluation Notation:: The format we use for examples of evaluation.
-* Printing Notation:: The format we use when examples print text.
-* Error Messages:: The format we use for examples of errors.
-* Buffer Text Notation:: The format we use for buffer contents in examples.
-* Format of Descriptions:: Notation for describing functions, variables, etc.
-
-Format of Descriptions
-
-* A Sample Function Description:: A description of an imaginary
- function, @code{foo}.
-* A Sample Variable Description:: A description of an imaginary
- variable, @code{electric-future-map}.
-
-Lisp Data Types
-
-* Printed Representation:: How Lisp objects are represented as text.
-* Comments:: Comments and their formatting conventions.
-* Programming Types:: Types found in all Lisp systems.
-* Editing Types:: Types specific to Emacs.
-* Circular Objects:: Read syntax for circular structure.
-* Type Predicates:: Tests related to types.
-* Equality Predicates:: Tests of equality between any two objects.
-
-Programming Types
-
-* Integer Type:: Numbers without fractional parts.
-* Floating Point Type:: Numbers with fractional parts and with a large range.
-* Character Type:: The representation of letters, numbers and
- control characters.
-* Symbol Type:: A multi-use object that refers to a function,
- variable, or property list, and has a unique identity.
-* Sequence Type:: Both lists and arrays are classified as sequences.
-* Cons Cell Type:: Cons cells, and lists (which are made from cons cells).
-* Array Type:: Arrays include strings and vectors.
-* String Type:: An (efficient) array of characters.
-* Vector Type:: One-dimensional arrays.
-* Char-Table Type:: One-dimensional sparse arrays indexed by characters.
-* Bool-Vector Type:: One-dimensional arrays of @code{t} or @code{nil}.
-* Hash Table Type:: Super-fast lookup tables.
-* Function Type:: A piece of executable code you can call from elsewhere.
-* Macro Type:: A method of expanding an expression into another
- expression, more fundamental but less pretty.
-* Primitive Function Type:: A function written in C, callable from Lisp.
-* Byte-Code Type:: A function written in Lisp, then compiled.
-* Autoload Type:: A type used for automatically loading seldom-used
- functions.
-
-Character Type
-
-* Basic Char Syntax:: Syntax for regular characters.
-* General Escape Syntax:: How to specify characters by their codes.
-* Ctl-Char Syntax:: Syntax for control characters.
-* Meta-Char Syntax:: Syntax for meta-characters.
-* Other Char Bits:: Syntax for hyper-, super-, and alt-characters.
-
-Cons Cell and List Types
-
-* Box Diagrams:: Drawing pictures of lists.
-* Dotted Pair Notation:: A general syntax for cons cells.
-* Association List Type:: A specially constructed list.
-
-String Type
-
-* Syntax for Strings:: How to specify Lisp strings.
-* Non-ASCII in Strings:: International characters in strings.
-* Nonprinting Characters:: Literal unprintable characters in strings.
-* Text Props and Strings:: Strings with text properties.
-
-Editing Types
-
-* Buffer Type:: The basic object of editing.
-* Marker Type:: A position in a buffer.
-* Window Type:: Buffers are displayed in windows.
-* Frame Type:: Windows subdivide frames.
-* Terminal Type:: A terminal device displays frames.
-* Window Configuration Type:: Recording the way a frame is subdivided.
-* Frame Configuration Type:: Recording the status of all frames.
-* Process Type:: A subprocess of Emacs running on the underlying OS.
-* Stream Type:: Receive or send characters.
-* Keymap Type:: What function a keystroke invokes.
-* Overlay Type:: How an overlay is represented.
-* Font Type:: Fonts for displaying text.
-
-Numbers
-
-* Integer Basics:: Representation and range of integers.
-* Float Basics:: Representation and range of floating point.
-* Predicates on Numbers:: Testing for numbers.
-* Comparison of Numbers:: Equality and inequality predicates.
-* Numeric Conversions:: Converting float to integer and vice versa.
-* Arithmetic Operations:: How to add, subtract, multiply and divide.
-* Rounding Operations:: Explicitly rounding floating point numbers.
-* Bitwise Operations:: Logical and, or, not, shifting.
-* Math Functions:: Trig, exponential and logarithmic functions.
-* Random Numbers:: Obtaining random integers, predictable or not.
-
-Strings and Characters
-
-* String Basics:: Basic properties of strings and characters.
-* Predicates for Strings:: Testing whether an object is a string or char.
-* Creating Strings:: Functions to allocate new strings.
-* Modifying Strings:: Altering the contents of an existing string.
-* Text Comparison:: Comparing characters or strings.
-* String Conversion:: Converting to and from characters and strings.
-* Formatting Strings:: @code{format}: Emacs's analogue of @code{printf}.
-* Case Conversion:: Case conversion functions.
-* Case Tables:: Customizing case conversion.
-
-Lists
-
-* Cons Cells:: How lists are made out of cons cells.
-* List-related Predicates:: Is this object a list? Comparing two lists.
-* List Elements:: Extracting the pieces of a list.
-* Building Lists:: Creating list structure.
-* List Variables:: Modifying lists stored in variables.
-* Modifying Lists:: Storing new pieces into an existing list.
-* Sets And Lists:: A list can represent a finite mathematical set.
-* Association Lists:: A list can represent a finite relation or mapping.
-* Rings:: Managing a fixed-size ring of objects.
-
-Modifying Existing List Structure
-
-* Setcar:: Replacing an element in a list.
-* Setcdr:: Replacing part of the list backbone.
- This can be used to remove or add elements.
-* Rearrangement:: Reordering the elements in a list; combining lists.
-
-Sequences, Arrays, and Vectors
-
-* Sequence Functions:: Functions that accept any kind of sequence.
-* Arrays:: Characteristics of arrays in Emacs Lisp.
-* Array Functions:: Functions specifically for arrays.
-* Vectors:: Special characteristics of Emacs Lisp vectors.
-* Vector Functions:: Functions specifically for vectors.
-* Char-Tables:: How to work with char-tables.
-* Bool-Vectors:: How to work with bool-vectors.
-
-Hash Tables
-
-* Creating Hash:: Functions to create hash tables.
-* Hash Access:: Reading and writing the hash table contents.
-* Defining Hash:: Defining new comparison methods.
-* Other Hash:: Miscellaneous.
-
-Symbols
-
-* Symbol Components:: Symbols have names, values, function definitions
- and property lists.
-* Definitions:: A definition says how a symbol will be used.
-* Creating Symbols:: How symbols are kept unique.
-* Property Lists:: Each symbol has a property list
- for recording miscellaneous information.
-
-Property Lists
-
-* Plists and Alists:: Comparison of the advantages of property
- lists and association lists.
-* Symbol Plists:: Functions to access symbols' property lists.
-* Other Plists:: Accessing property lists stored elsewhere.
-
-Evaluation
-
-* Intro Eval:: Evaluation in the scheme of things.
-* Forms:: How various sorts of objects are evaluated.
-* Quoting:: Avoiding evaluation (to put constants in
- the program).
-* Backquote:: Easier construction of list structure.
-* Eval:: How to invoke the Lisp interpreter explicitly.
-
-Kinds of Forms
-
-* Self-Evaluating Forms:: Forms that evaluate to themselves.
-* Symbol Forms:: Symbols evaluate as variables.
-* Classifying Lists:: How to distinguish various sorts of list forms.
-* Function Indirection:: When a symbol appears as the car of a list,
- we find the real function via the symbol.
-* Function Forms:: Forms that call functions.
-* Macro Forms:: Forms that call macros.
-* Special Forms:: "Special forms" are idiosyncratic primitives,
- most of them extremely important.
-* Autoloading:: Functions set up to load files
- containing their real definitions.
-
-Control Structures
-
-* Sequencing:: Evaluation in textual order.
-* Conditionals:: @code{if}, @code{cond}, @code{when}, @code{unless}.
-* Combining Conditions:: @code{and}, @code{or}, @code{not}.
-* Iteration:: @code{while} loops.
-* Nonlocal Exits:: Jumping out of a sequence.
-
-Nonlocal Exits
-
-* Catch and Throw:: Nonlocal exits for the program's own purposes.
-* Examples of Catch:: Showing how such nonlocal exits can be written.
-* Errors:: How errors are signaled and handled.
-* Cleanups:: Arranging to run a cleanup form if an
- error happens.
-
-Errors
-
-* Signaling Errors:: How to report an error.
-* Processing of Errors:: What Emacs does when you report an error.
-* Handling Errors:: How you can trap errors and continue execution.
-* Error Symbols:: How errors are classified for trapping them.
-
-Variables
-
-* Global Variables:: Variable values that exist permanently, everywhere.
-* Constant Variables:: Certain "variables" have values that never change.
-* Local Variables:: Variable values that exist only temporarily.
-* Void Variables:: Symbols that lack values.
-* Defining Variables:: A definition says a symbol is used as a variable.
-* Tips for Defining:: Things you should think about when you
- define a variable.
-* Accessing Variables:: Examining values of variables whose names
- are known only at run time.
-* Setting Variables:: Storing new values in variables.
-* Variable Scoping:: How Lisp chooses among local and global values.
-* Buffer-Local Variables:: Variable values in effect only in one buffer.
-* File Local Variables:: Handling local variable lists in files.
-* Directory Local Variables:: Local variables common to all files in a
- directory.
-* Frame-Local Variables:: Frame-local bindings for variables.
-* Variable Aliases:: Variables that are aliases for other variables.
-* Variables with Restricted Values:: Non-constant variables whose value can
- @emph{not} be an arbitrary Lisp object.
-
-Scoping Rules for Variable Bindings
-
-* Scope:: Scope means where in the program a value
- is visible. Comparison with other languages.
-* Extent:: Extent means how long in time a value exists.
-* Impl of Scope:: Two ways to implement dynamic scoping.
-* Using Scoping:: How to use dynamic scoping carefully and
- avoid problems.
-
-Buffer-Local Variables
-
-* Intro to Buffer-Local:: Introduction and concepts.
-* Creating Buffer-Local:: Creating and destroying buffer-local bindings.
-* Default Value:: The default value is seen in buffers
- that don't have their own buffer-local values.
-
-Functions
-
-* What Is a Function:: Lisp functions vs. primitives; terminology.
-* Lambda Expressions:: How functions are expressed as Lisp objects.
-* Function Names:: A symbol can serve as the name of a function.
-* Defining Functions:: Lisp expressions for defining functions.
-* Calling Functions:: How to use an existing function.
-* Mapping Functions:: Applying a function to each element of a list, etc.
-* Anonymous Functions:: Lambda expressions are functions with no names.
-* Function Cells:: Accessing or setting the function definition
- of a symbol.
-* Closures:: Functions that enclose a lexical environment.
-* Obsolete Functions:: Declaring functions obsolete.
-* Inline Functions:: Defining functions that the compiler
- will open code.
-* Declaring Functions:: Telling the compiler that a function is defined.
-* Function Safety:: Determining whether a function is safe to call.
-* Related Topics:: Cross-references to specific Lisp primitives
- that have a special bearing on how
- functions work.
-
-Lambda Expressions
-
-* Lambda Components:: The parts of a lambda expression.
-* Simple Lambda:: A simple example.
-* Argument List:: Details and special features of argument lists.
-* Function Documentation:: How to put documentation in a function.
-
-Macros
-
-* Simple Macro:: A basic example.
-* Expansion:: How, when and why macros are expanded.
-* Compiling Macros:: How macros are expanded by the compiler.
-* Defining Macros:: How to write a macro definition.
-* Problems with Macros:: Don't evaluate the macro arguments too many times.
- Don't hide the user's variables.
-* Indenting Macros:: Specifying how to indent macro calls.
-
-Common Problems Using Macros
-
-* Wrong Time:: Do the work in the expansion, not in the macro.
-* Argument Evaluation:: The expansion should evaluate each macro arg once.
-* Surprising Local Vars:: Local variable bindings in the expansion
- require special care.
-* Eval During Expansion:: Don't evaluate them; put them in the expansion.
-* Repeated Expansion:: Avoid depending on how many times expansion is done.
-
-Writing Customization Definitions
-
-* Common Keywords:: Common keyword arguments for all kinds of
- customization declarations.
-* Group Definitions:: Writing customization group definitions.
-* Variable Definitions:: Declaring user options.
-* Customization Types:: Specifying the type of a user option.
-* Applying Customizations:: Functions to apply customization settings.
-* Custom Themes:: Writing Custom themes.
-
-Customization Types
-
-* Simple Types:: Simple customization types: sexp, integer, number,
- string, file, directory, alist.
-* Composite Types:: Build new types from other types or data.
-* Splicing into Lists:: Splice elements into list with @code{:inline}.
-* Type Keywords:: Keyword-argument pairs in a customization type.
-* Defining New Types:: Give your type a name.
-
-Loading
-
-* How Programs Do Loading:: The @code{load} function and others.
-* Load Suffixes:: Details about the suffixes that @code{load} tries.
-* Library Search:: Finding a library to load.
-* Loading Non-ASCII:: Non-@acronym{ASCII} characters in Emacs Lisp files.
-* Autoload:: Setting up a function to autoload.
-* Repeated Loading:: Precautions about loading a file twice.
-* Named Features:: Loading a library if it isn't already loaded.
-* Where Defined:: Finding which file defined a certain symbol.
-* Unloading:: How to "unload" a library that was loaded.
-* Hooks for Loading:: Providing code to be run when
- particular libraries are loaded.
-
-Byte Compilation
-
-* Speed of Byte-Code:: An example of speedup from byte compilation.
-* Compilation Functions:: Byte compilation functions.
-* Docs and Compilation:: Dynamic loading of documentation strings.
-* Dynamic Loading:: Dynamic loading of individual functions.
-* Eval During Compile:: Code to be evaluated when you compile.
-* Compiler Errors:: Handling compiler error messages.
-* Byte-Code Objects:: The data type used for byte-compiled functions.
-* Disassembly:: Disassembling byte-code; how to read byte-code.
-
-Advising Emacs Lisp Functions
-
-* Simple Advice:: A simple example to explain the basics of advice.
-* Defining Advice:: Detailed description of @code{defadvice}.
-* Around-Advice:: Wrapping advice around a function's definition.
-* Computed Advice:: ...is to @code{defadvice} as @code{fset} is to @code{defun}.
-* Activation of Advice:: Advice doesn't do anything until you activate it.
-* Enabling Advice:: You can enable or disable each piece of advice.
-* Preactivation:: Preactivation is a way of speeding up the
- loading of compiled advice.
-* Argument Access in Advice:: How advice can access the function's arguments.
-* Combined Definition:: How advice is implemented.
-
-Debugging Lisp Programs
-
-* Debugger:: A debugger for the Emacs Lisp evaluator.
-* Edebug:: A source-level Emacs Lisp debugger.
-* Syntax Errors:: How to find syntax errors.
-* Test Coverage:: Ensuring you have tested all branches in your code.
-
-The Lisp Debugger
-
-* Error Debugging:: Entering the debugger when an error happens.
-* Infinite Loops:: Stopping and debugging a program that doesn't exit.
-* Function Debugging:: Entering it when a certain function is called.
-* Explicit Debug:: Entering it at a certain point in the program.
-* Using Debugger:: What the debugger does; what you see while in it.
-* Debugger Commands:: Commands used while in the debugger.
-* Invoking the Debugger:: How to call the function @code{debug}.
-* Internals of Debugger:: Subroutines of the debugger, and global variables.
-
-Edebug
-
-* Using Edebug:: Introduction to use of Edebug.
-* Instrumenting:: You must instrument your code
- in order to debug it with Edebug.
-* Edebug Execution Modes:: Execution modes, stopping more or less often.
-* Jumping:: Commands to jump to a specified place.
-* Edebug Misc:: Miscellaneous commands.
-* Breaks:: Setting breakpoints to make the program stop.
-* Trapping Errors:: Trapping errors with Edebug.
-* Edebug Views:: Views inside and outside of Edebug.
-* Edebug Eval:: Evaluating expressions within Edebug.
-* Eval List:: Expressions whose values are displayed
- each time you enter Edebug.
-* Printing in Edebug:: Customization of printing.
-* Trace Buffer:: How to produce trace output in a buffer.
-* Coverage Testing:: How to test evaluation coverage.
-* The Outside Context:: Data that Edebug saves and restores.
-* Edebug and Macros:: Specifying how to handle macro calls.
-* Edebug Options:: Option variables for customizing Edebug.
-
-Breaks
-
-* Breakpoints:: Breakpoints at stop points.
-* Global Break Condition:: Breaking on an event.
-* Source Breakpoints:: Embedding breakpoints in source code.
-
-The Outside Context
-
-* Checking Whether to Stop::When Edebug decides what to do.
-* Edebug Display Update:: When Edebug updates the display.
-* Edebug Recursive Edit:: When Edebug stops execution.
-
-Edebug and Macros
-
-* Instrumenting Macro Calls::The basic problem.
-* Specification List:: How to specify complex patterns of evaluation.
-* Backtracking:: What Edebug does when matching fails.
-* Specification Examples:: To help understand specifications.
-
-Debugging Invalid Lisp Syntax
-
-* Excess Open:: How to find a spurious open paren or missing close.
-* Excess Close:: How to find a spurious close paren or missing open.
-
-Reading and Printing Lisp Objects
-
-* Streams Intro:: Overview of streams, reading and printing.
-* Input Streams:: Various data types that can be used as
- input streams.
-* Input Functions:: Functions to read Lisp objects from text.
-* Output Streams:: Various data types that can be used as
- output streams.
-* Output Functions:: Functions to print Lisp objects as text.
-* Output Variables:: Variables that control what the printing
- functions do.
-
-Minibuffers
-
-* Intro to Minibuffers:: Basic information about minibuffers.
-* Text from Minibuffer:: How to read a straight text string.
-* Object from Minibuffer:: How to read a Lisp object or expression.
-* Minibuffer History:: Recording previous minibuffer inputs
- so the user can reuse them.
-* Initial Input:: Specifying initial contents for the minibuffer.
-* Completion:: How to invoke and customize completion.
-* Yes-or-No Queries:: Asking a question with a simple answer.
-* Multiple Queries:: Asking a series of similar questions.
-* Reading a Password:: Reading a password from the terminal.
-* Minibuffer Commands:: Commands used as key bindings in minibuffers.
-* Minibuffer Windows:: Operating on the special minibuffer windows.
-* Minibuffer Contents:: How such commands access the minibuffer text.
-* Recursive Mini:: Whether recursive entry to minibuffer is allowed.
-* Minibuffer Misc:: Various customization hooks and variables.
-
-Completion
-
-* Basic Completion:: Low-level functions for completing strings.
- (These are too low level to use the minibuffer.)
-* Minibuffer Completion:: Invoking the minibuffer with completion.
-* Completion Commands:: Minibuffer commands that do completion.
-* High-Level Completion:: Convenient special cases of completion
- (reading buffer names, variable names, etc.).
-* Reading File Names:: Using completion to read file names and
- shell commands.
-* Completion Variables:: Variables controlling completion behavior.
-* Programmed Completion:: Writing your own completion function.
-* Completion in Buffers:: Completing text in ordinary buffers.
-
-Command Loop
-
-* Command Overview:: How the command loop reads commands.
-* Defining Commands:: Specifying how a function should read arguments.
-* Interactive Call:: Calling a command, so that it will read arguments.
-* Distinguish Interactive:: Making a command distinguish interactive calls.
-* Command Loop Info:: Variables set by the command loop for you to examine.
-* Adjusting Point:: Adjustment of point after a command.
-* Input Events:: What input looks like when you read it.
-* Reading Input:: How to read input events from the keyboard or mouse.
-* Special Events:: Events processed immediately and individually.
-* Waiting:: Waiting for user input or elapsed time.
-* Quitting:: How @kbd{C-g} works. How to catch or defer quitting.
-* Prefix Command Arguments:: How the commands to set prefix args work.
-* Recursive Editing:: Entering a recursive edit,
- and why you usually shouldn't.
-* Disabling Commands:: How the command loop handles disabled commands.
-* Command History:: How the command history is set up, and how accessed.
-* Keyboard Macros:: How keyboard macros are implemented.
-
-Defining Commands
-
-* Using Interactive:: General rules for @code{interactive}.
-* Interactive Codes:: The standard letter-codes for reading arguments
- in various ways.
-* Interactive Examples:: Examples of how to read interactive arguments.
-
-Input Events
-
-* Keyboard Events:: Ordinary characters--keys with symbols on them.
-* Function Keys:: Function keys--keys with names, not symbols.
-* Mouse Events:: Overview of mouse events.
-* Click Events:: Pushing and releasing a mouse button.
-* Drag Events:: Moving the mouse before releasing the button.
-* Button-Down Events:: A button was pushed and not yet released.
-* Repeat Events:: Double and triple click (or drag, or down).
-* Motion Events:: Just moving the mouse, not pushing a button.
-* Focus Events:: Moving the mouse between frames.
-* Misc Events:: Other events the system can generate.
-* Event Examples:: Examples of the lists for mouse events.
-* Classifying Events:: Finding the modifier keys in an event symbol.
- Event types.
-* Accessing Mouse:: Functions to extract info from mouse events.
-* Accessing Scroll:: Functions to get info from scroll bar events.
-* Strings of Events:: Special considerations for putting
- keyboard character events in a string.
-
-Reading Input
-
-* Key Sequence Input:: How to read one key sequence.
-* Reading One Event:: How to read just one event.
-* Event Mod:: How Emacs modifies events as they are read.
-* Invoking the Input Method:: How reading an event uses the input method.
-* Quoted Character Input:: Asking the user to specify a character.
-* Event Input Misc:: How to reread or throw away input events.
-
-Keymaps
-
-* Key Sequences:: Key sequences as Lisp objects.
-* Keymap Basics:: Basic concepts of keymaps.
-* Format of Keymaps:: What a keymap looks like as a Lisp object.
-* Creating Keymaps:: Functions to create and copy keymaps.
-* Inheritance and Keymaps:: How one keymap can inherit the bindings
- of another keymap.
-* Prefix Keys:: Defining a key with a keymap as its definition.
-* Active Keymaps:: How Emacs searches the active keymaps
- for a key binding.
-* Searching Keymaps:: A pseudo-Lisp summary of searching active maps.
-* Controlling Active Maps:: Each buffer has a local keymap
- to override the standard (global) bindings.
- A minor mode can also override them.
-* Key Lookup:: Finding a key's binding in one keymap.
-* Functions for Key Lookup:: How to request key lookup.
-* Changing Key Bindings:: Redefining a key in a keymap.
-* Remapping Commands:: A keymap can translate one command to another.
-* Translation Keymaps:: Keymaps for translating sequences of events.
-* Key Binding Commands:: Interactive interfaces for redefining keys.
-* Scanning Keymaps:: Looking through all keymaps, for printing help.
-* Menu Keymaps:: Defining a menu as a keymap.
-
-Menu Keymaps
-
-* Defining Menus:: How to make a keymap that defines a menu.
-* Mouse Menus:: How users actuate the menu with the mouse.
-* Keyboard Menus:: How users actuate the menu with the keyboard.
-* Menu Example:: Making a simple menu.
-* Menu Bar:: How to customize the menu bar.
-* Tool Bar:: A tool bar is a row of images.
-* Modifying Menus:: How to add new items to a menu.
-
-Defining Menus
-
-* Simple Menu Items:: A simple kind of menu key binding,
- limited in capabilities.
-* Extended Menu Items:: More powerful menu item definitions
- let you specify keywords to enable
- various features.
-* Menu Separators:: Drawing a horizontal line through a menu.
-* Alias Menu Items:: Using command aliases in menu items.
-
-Major and Minor Modes
-
-* Hooks:: How to use hooks; how to write code that provides hooks.
-* Major Modes:: Defining major modes.
-* Minor Modes:: Defining minor modes.
-* Mode Line Format:: Customizing the text that appears in the mode line.
-* Imenu:: Providing a menu of definitions made in a buffer.
-* Font Lock Mode:: How modes can highlight text according to syntax.
-* Auto-Indentation:: How to teach Emacs to indent for a major mode.
-* Desktop Save Mode:: How modes can have buffer state saved between
- Emacs sessions.
-
-Hooks
-
-* Running Hooks:: How to run a hook.
-* Setting Hooks:: How to put functions on a hook, or remove them.
-
-Major Modes
-
-* Major Mode Conventions:: Coding conventions for keymaps, etc.
-* Auto Major Mode:: How Emacs chooses the major mode automatically.
-* Mode Help:: Finding out how to use a mode.
-* Derived Modes:: Defining a new major mode based on another major
- mode.
-* Basic Major Modes:: Modes that other modes are often derived from.
-* Mode Hooks:: Hooks run at the end of major mode commands.
-* Tabulated List Mode:: Parent mode for buffers containing tabulated data.
-* Generic Modes:: Defining a simple major mode that supports
- comment syntax and Font Lock mode.
-* Example Major Modes:: Text mode and Lisp modes.
-
-Minor Modes
-
-* Minor Mode Conventions:: Tips for writing a minor mode.
-* Keymaps and Minor Modes:: How a minor mode can have its own keymap.
-* Defining Minor Modes:: A convenient facility for defining minor modes.
-
-Mode Line Format
-
-* Mode Line Basics:: Basic ideas of mode line control.
-* Mode Line Data:: The data structure that controls the mode line.
-* Mode Line Top:: The top level variable, mode-line-format.
-* Mode Line Variables:: Variables used in that data structure.
-* %-Constructs:: Putting information into a mode line.
-* Properties in Mode:: Using text properties in the mode line.
-* Header Lines:: Like a mode line, but at the top.
-* Emulating Mode Line:: Formatting text as the mode line would.
-
-Font Lock Mode
-
-* Font Lock Basics:: Overview of customizing Font Lock.
-* Search-based Fontification:: Fontification based on regexps.
-* Customizing Keywords:: Customizing search-based fontification.
-* Other Font Lock Variables:: Additional customization facilities.
-* Levels of Font Lock:: Each mode can define alternative levels
- so that the user can select more or less.
-* Precalculated Fontification:: How Lisp programs that produce the buffer
- contents can also specify how to fontify it.
-* Faces for Font Lock:: Special faces specifically for Font Lock.
-* Syntactic Font Lock:: Fontification based on syntax tables.
-* Multiline Font Lock:: How to coerce Font Lock into properly
- highlighting multiline constructs.
-
-Multiline Font Lock Constructs
-
-* Font Lock Multiline:: Marking multiline chunks with a text property.
-* Region to Refontify:: Controlling which region gets refontified
- after a buffer change.
-
-Documentation
-
-* Documentation Basics:: Where doc strings are defined and stored.
-* Accessing Documentation:: How Lisp programs can access doc strings.
-* Keys in Documentation:: Substituting current key bindings.
-* Describing Characters:: Making printable descriptions of
- non-printing characters and key sequences.
-* Help Functions:: Subroutines used by Emacs help facilities.
-
-Files
-
-* Visiting Files:: Reading files into Emacs buffers for editing.
-* Saving Buffers:: Writing changed buffers back into files.
-* Reading from Files:: Reading files into buffers without visiting.
-* Writing to Files:: Writing new files from parts of buffers.
-* File Locks:: Locking and unlocking files, to prevent
- simultaneous editing by two people.
-* Information about Files:: Testing existence, accessibility, size of files.
-* Changing Files:: Renaming files, changing permissions, etc.
-* File Names:: Decomposing and expanding file names.
-* Contents of Directories:: Getting a list of the files in a directory.
-* Create/Delete Dirs:: Creating and Deleting Directories.
-* Magic File Names:: Special handling for certain file names.
-* Format Conversion:: Conversion to and from various file formats.
-
-Visiting Files
-
-* Visiting Functions:: The usual interface functions for visiting.
-* Subroutines of Visiting:: Lower-level subroutines that they use.
-
-Information about Files
-
-* Testing Accessibility:: Is a given file readable? Writable?
-* Kinds of Files:: Is it a directory? A symbolic link?
-* Truenames:: Eliminating symbolic links from a file name.
-* File Attributes:: How large is it? Any other names? Etc.
-* Locating Files:: How to find a file in standard places.
-
-File Names
-
-* File Name Components:: The directory part of a file name, and the rest.
-* Relative File Names:: Some file names are relative to a current directory.
-* Directory Names:: A directory's name as a directory
- is different from its name as a file.
-* File Name Expansion:: Converting relative file names to absolute ones.
-* Unique File Names:: Generating names for temporary files.
-* File Name Completion:: Finding the completions for a given file name.
-* Standard File Names:: If your package uses a fixed file name,
- how to handle various operating systems simply.
-
-File Format Conversion
-
-* Format Conversion Overview:: @code{insert-file-contents} and @code{write-region}.
-* Format Conversion Round-Trip:: Using @code{format-alist}.
-* Format Conversion Piecemeal:: Specifying non-paired conversion.
-
-Backups and Auto-Saving
-
-* Backup Files:: How backup files are made; how their names
- are chosen.
-* Auto-Saving:: How auto-save files are made; how their
- names are chosen.
-* Reverting:: @code{revert-buffer}, and how to customize
- what it does.
-
-Backup Files
-
-* Making Backups:: How Emacs makes backup files, and when.
-* Rename or Copy:: Two alternatives: renaming the old file
- or copying it.
-* Numbered Backups:: Keeping multiple backups for each source file.
-* Backup Names:: How backup file names are computed; customization.
-
-Buffers
-
-* Buffer Basics:: What is a buffer?
-* Current Buffer:: Designating a buffer as current
- so that primitives will access its contents.
-* Buffer Names:: Accessing and changing buffer names.
-* Buffer File Name:: The buffer file name indicates which file
- is visited.
-* Buffer Modification:: A buffer is @dfn{modified} if it needs to be saved.
-* Modification Time:: Determining whether the visited file was changed
- "behind Emacs's back".
-* Read Only Buffers:: Modifying text is not allowed in a
- read-only buffer.
-* The Buffer List:: How to look at all the existing buffers.
-* Creating Buffers:: Functions that create buffers.
-* Killing Buffers:: Buffers exist until explicitly killed.
-* Indirect Buffers:: An indirect buffer shares text with some
- other buffer.
-* Swapping Text:: Swapping text between two buffers.
-* Buffer Gap:: The gap in the buffer.
-
-Windows
-
-* Basic Windows:: Basic information on using windows.
-* Splitting Windows:: Splitting one window into two windows.
-* Deleting Windows:: Deleting a window gives its space to other windows.
-* Selecting Windows:: The selected window is the one that you edit in.
-* Cyclic Window Ordering:: Moving around the existing windows.
-* Buffers and Windows:: Each window displays the contents of a buffer.
-* Switching Buffers:: Higher-level functions for switching to a buffer.
-* Choosing Window:: How to choose a window for displaying a buffer.
-* Display Action Functions:: Subroutines for @code{display-buffer}.
-* Choosing Window Options:: Extra options affecting how buffers are displayed.
-* Window History:: Each window remembers the buffers displayed in it.
-* Dedicated Windows:: How to avoid displaying another buffer in
- a specific window.
-* Window Point:: Each window has its own location of point.
-* Window Start and End:: Buffer positions indicating which text is
- on-screen in a window.
-* Textual Scrolling:: Moving text up and down through the window.
-* Vertical Scrolling:: Moving the contents up and down on the window.
-* Horizontal Scrolling:: Moving the contents sideways on the window.
-* Size of Window:: Accessing the size of a window.
-* Resizing Windows:: Changing the size of a window.
-* Coordinates and Windows:: Converting coordinates to windows.
-* Window Tree:: The layout and sizes of all windows in a frame.
-* Window Configurations:: Saving and restoring the state of the screen.
-* Window Parameters:: Associating additional information with windows.
-* Window Hooks:: Hooks for scrolling, window size changes,
- redisplay going past a certain point,
- or window configuration changes.
-
-Frames
-
-* Creating Frames:: Creating additional frames.
-* Multiple Terminals:: Displaying on several different devices.
-* Frame Parameters:: Controlling frame size, position, font, etc.
-* Terminal Parameters:: Parameters common for all frames on terminal.
-* Frame Titles:: Automatic updating of frame titles.
-* Deleting Frames:: Frames last until explicitly deleted.
-* Finding All Frames:: How to examine all existing frames.
-* Frames and Windows:: A frame contains windows;
- display of text always works through windows.
-* Minibuffers and Frames:: How a frame finds the minibuffer to use.
-* Input Focus:: Specifying the selected frame.
-* Visibility of Frames:: Frames may be visible or invisible, or icons.
-* Raising and Lowering:: Raising a frame makes it hide other windows;
- lowering it makes the others hide it.
-* Frame Configurations:: Saving the state of all frames.
-* Mouse Tracking:: Getting events that say when the mouse moves.
-* Mouse Position:: Asking where the mouse is, or moving it.
-* Pop-Up Menus:: Displaying a menu for the user to select from.
-* Dialog Boxes:: Displaying a box to ask yes or no.
-* Pointer Shape:: Specifying the shape of the mouse pointer.
-* Window System Selections::Transferring text to and from other X clients.
-* Drag and Drop:: Internals of Drag-and-Drop implementation.
-* Color Names:: Getting the definitions of color names.
-* Text Terminal Colors:: Defining colors for text terminals.
-* Resources:: Getting resource values from the server.
-* Display Feature Testing:: Determining the features of a terminal.
-
-Frame Parameters
-
-* Parameter Access:: How to change a frame's parameters.
-* Initial Parameters:: Specifying frame parameters when you make a frame.
-* Window Frame Parameters:: List of frame parameters for window systems.
-* Size and Position:: Changing the size and position of a frame.
-* Geometry:: Parsing geometry specifications.
-
-Window Frame Parameters
-
-* Basic Parameters:: Parameters that are fundamental.
-* Position Parameters:: The position of the frame on the screen.
-* Size Parameters:: Frame's size.
-* Layout Parameters:: Size of parts of the frame, and
- enabling or disabling some parts.
-* Buffer Parameters:: Which buffers have been or should be shown.
-* Management Parameters:: Communicating with the window manager.
-* Cursor Parameters:: Controlling the cursor appearance.
-* Font and Color Parameters:: Fonts and colors for the frame text.
-
-Positions
-
-* Point:: The special position where editing takes place.
-* Motion:: Changing point.
-* Excursions:: Temporary motion and buffer changes.
-* Narrowing:: Restricting editing to a portion of the buffer.
-
-Motion
-
-* Character Motion:: Moving in terms of characters.
-* Word Motion:: Moving in terms of words.
-* Buffer End Motion:: Moving to the beginning or end of the buffer.
-* Text Lines:: Moving in terms of lines of text.
-* Screen Lines:: Moving in terms of lines as displayed.
-* List Motion:: Moving by parsing lists and sexps.
-* Skipping Characters:: Skipping characters belonging to a certain set.
-
-Markers
-
-* Overview of Markers:: The components of a marker, and how it relocates.
-* Predicates on Markers:: Testing whether an object is a marker.
-* Creating Markers:: Making empty markers or markers at certain places.
-* Information from Markers::Finding the marker's buffer or character position.
-* Marker Insertion Types:: Two ways a marker can relocate when you
- insert where it points.
-* Moving Markers:: Moving the marker to a new buffer or position.
-* The Mark:: How "the mark" is implemented with a marker.
-* The Region:: How to access "the region".
-
-Text
-
-* Near Point:: Examining text in the vicinity of point.
-* Buffer Contents:: Examining text in a general fashion.
-* Comparing Text:: Comparing substrings of buffers.
-* Insertion:: Adding new text to a buffer.
-* Commands for Insertion:: User-level commands to insert text.
-* Deletion:: Removing text from a buffer.
-* User-Level Deletion:: User-level commands to delete text.
-* The Kill Ring:: Where removed text sometimes is saved for
- later use.
-* Undo:: Undoing changes to the text of a buffer.
-* Maintaining Undo:: How to enable and disable undo information.
- How to control how much information is kept.
-* Filling:: Functions for explicit filling.
-* Margins:: How to specify margins for filling commands.
-* Adaptive Fill:: Adaptive Fill mode chooses a fill prefix
- from context.
-* Auto Filling:: How auto-fill mode is implemented to break lines.
-* Sorting:: Functions for sorting parts of the buffer.
-* Columns:: Computing horizontal positions, and using them.
-* Indentation:: Functions to insert or adjust indentation.
-* Case Changes:: Case conversion of parts of the buffer.
-* Text Properties:: Assigning Lisp property lists to text characters.
-* Substitution:: Replacing a given character wherever it appears.
-* Transposition:: Swapping two portions of a buffer.
-* Registers:: How registers are implemented. Accessing
- the text or position stored in a register.
-* Base 64:: Conversion to or from base 64 encoding.
-* Checksum/Hash:: Computing cryptographic hashes.
-* Parsing HTML/XML:: Parsing HTML and XML.
-* Atomic Changes:: Installing several buffer changes "atomically".
-* Change Hooks:: Supplying functions to be run when text is changed.
-
-The Kill Ring
-
-* Kill Ring Concepts:: What text looks like in the kill ring.
-* Kill Functions:: Functions that kill text.
-* Yanking:: How yanking is done.
-* Yank Commands:: Commands that access the kill ring.
-* Low-Level Kill Ring:: Functions and variables for kill ring access.
-* Internals of Kill Ring:: Variables that hold kill ring data.
-
-Indentation
-
-* Primitive Indent:: Functions used to count and insert indentation.
-* Mode-Specific Indent:: Customize indentation for different modes.
-* Region Indent:: Indent all the lines in a region.
-* Relative Indent:: Indent the current line based on previous lines.
-* Indent Tabs:: Adjustable, typewriter-like tab stops.
-* Motion by Indent:: Move to first non-blank character.
-
-Text Properties
-
-* Examining Properties:: Looking at the properties of one character.
-* Changing Properties:: Setting the properties of a range of text.
-* Property Search:: Searching for where a property changes value.
-* Special Properties:: Particular properties with special meanings.
-* Format Properties:: Properties for representing formatting of text.
-* Sticky Properties:: How inserted text gets properties from
- neighboring text.
-* Lazy Properties:: Computing text properties in a lazy fashion
- only when text is examined.
-* Clickable Text:: Using text properties to make regions of text
- do something when you click on them.
-* Fields:: The @code{field} property defines
- fields within the buffer.
-* Not Intervals:: Why text properties do not use
- Lisp-visible text intervals.
-
-Non-@acronym{ASCII} Characters
-
-* Text Representations:: How Emacs represents text.
-* Converting Representations:: Converting unibyte to multibyte and vice versa.
-* Selecting a Representation:: Treating a byte sequence as unibyte or multi.
-* Character Codes:: How unibyte and multibyte relate to
- codes of individual characters.
-* Character Properties:: Character attributes that define their
- behavior and handling.
-* Character Sets:: The space of possible character codes
- is divided into various character sets.
-* Scanning Charsets:: Which character sets are used in a buffer?
-* Translation of Characters:: Translation tables are used for conversion.
-* Coding Systems:: Coding systems are conversions for saving files.
-* Input Methods:: Input methods allow users to enter various
- non-ASCII characters without special keyboards.
-* Locales:: Interacting with the POSIX locale.
-
-Coding Systems
-
-* Coding System Basics:: Basic concepts.
-* Encoding and I/O:: How file I/O functions handle coding systems.
-* Lisp and Coding Systems:: Functions to operate on coding system names.
-* User-Chosen Coding Systems:: Asking the user to choose a coding system.
-* Default Coding Systems:: Controlling the default choices.
-* Specifying Coding Systems:: Requesting a particular coding system
- for a single file operation.
-* Explicit Encoding:: Encoding or decoding text without doing I/O.
-* Terminal I/O Encoding:: Use of encoding for terminal I/O.
-* MS-DOS File Types:: How DOS "text" and "binary" files
- relate to coding systems.
-
-Searching and Matching
-
-* String Search:: Search for an exact match.
-* Searching and Case:: Case-independent or case-significant searching.
-* Regular Expressions:: Describing classes of strings.
-* Regexp Search:: Searching for a match for a regexp.
-* POSIX Regexps:: Searching POSIX-style for the longest match.
-* Match Data:: Finding out which part of the text matched,
- after a string or regexp search.
-* Search and Replace:: Commands that loop, searching and replacing.
-* Standard Regexps:: Useful regexps for finding sentences, pages,...
-
-Regular Expressions
-
-* Syntax of Regexps:: Rules for writing regular expressions.
-* Regexp Example:: Illustrates regular expression syntax.
-* Regexp Functions:: Functions for operating on regular expressions.
-
-Syntax of Regular Expressions
-
-* Regexp Special:: Special characters in regular expressions.
-* Char Classes:: Character classes used in regular expressions.
-* Regexp Backslash:: Backslash-sequences in regular expressions.
-
-The Match Data
-
-* Replacing Match:: Replacing a substring that was matched.
-* Simple Match Data:: Accessing single items of match data,
- such as where a particular subexpression started.
-* Entire Match Data:: Accessing the entire match data at once, as a list.
-* Saving Match Data:: Saving and restoring the match data.
-
-Syntax Tables
-
-* Syntax Basics:: Basic concepts of syntax tables.
-* Syntax Descriptors:: How characters are classified.
-* Syntax Table Functions:: How to create, examine and alter syntax tables.
-* Syntax Properties:: Overriding syntax with text properties.
-* Motion and Syntax:: Moving over characters with certain syntaxes.
-* Parsing Expressions:: Parsing balanced expressions
- using the syntax table.
-* Standard Syntax Tables:: Syntax tables used by various major modes.
-* Syntax Table Internals:: How syntax table information is stored.
-* Categories:: Another way of classifying character syntax.
-
-Syntax Descriptors
-
-* Syntax Class Table:: Table of syntax classes.
-* Syntax Flags:: Additional flags each character can have.
-
-Parsing Expressions
-
-* Motion via Parsing:: Motion functions that work by parsing.
-* Position Parse:: Determining the syntactic state of a position.
-* Parser State:: How Emacs represents a syntactic state.
-* Low-Level Parsing:: Parsing across a specified region.
-* Control Parsing:: Parameters that affect parsing.
-
-Abbrevs and Abbrev Expansion
-
-* Abbrev Tables:: Creating and working with abbrev tables.
-* Defining Abbrevs:: Specifying abbreviations and their expansions.
-* Abbrev Files:: Saving abbrevs in files.
-* Abbrev Expansion:: Controlling expansion; expansion subroutines.
-* Standard Abbrev Tables:: Abbrev tables used by various major modes.
-* Abbrev Properties:: How to read and set abbrev properties.
- Which properties have which effect.
-* Abbrev Table Properties:: How to read and set abbrev table properties.
- Which properties have which effect.
-
-Processes
-
-* Subprocess Creation:: Functions that start subprocesses.
-* Shell Arguments:: Quoting an argument to pass it to a shell.
-* Synchronous Processes:: Details of using synchronous subprocesses.
-* Asynchronous Processes:: Starting up an asynchronous subprocess.
-* Deleting Processes:: Eliminating an asynchronous subprocess.
-* Process Information:: Accessing run-status and other attributes.
-* Input to Processes:: Sending input to an asynchronous subprocess.
-* Signals to Processes:: Stopping, continuing or interrupting
- an asynchronous subprocess.
-* Output from Processes:: Collecting output from an asynchronous subprocess.
-* Sentinels:: Sentinels run when process run-status changes.
-* Query Before Exit:: Whether to query if exiting will kill a process.
-* System Processes:: Accessing other processes running on your system.
-* Transaction Queues:: Transaction-based communication with subprocesses.
-* Network:: Opening network connections.
-* Network Servers:: Network servers let Emacs accept net connections.
-* Datagrams:: UDP network connections.
-* Low-Level Network:: Lower-level but more general function
- to create connections and servers.
-* Misc Network:: Additional relevant functions for
- network connections.
-* Serial Ports:: Communicating with serial ports.
-* Byte Packing:: Using bindat to pack and unpack binary data.
-
-Receiving Output from Processes
-
-* Process Buffers:: If no filter, output is put in a buffer.
-* Filter Functions:: Filter functions accept output from the process.
-* Decoding Output:: Filters can get unibyte or multibyte strings.
-* Accepting Output:: How to wait until process output arrives.
-
-Low-Level Network Access
-
-* Network Processes:: Using @code{make-network-process}.
-* Network Options:: Further control over network connections.
-* Network Feature Testing:: Determining which network features work on
- the machine you are using.
-
-Packing and Unpacking Byte Arrays
-
-* Bindat Spec:: Describing data layout.
-* Bindat Functions:: Doing the unpacking and packing.
-* Bindat Examples:: Samples of what bindat.el can do for you!
-
-Emacs Display
-
-* Refresh Screen:: Clearing the screen and redrawing everything on it.
-* Forcing Redisplay:: Forcing redisplay.
-* Truncation:: Folding or wrapping long text lines.
-* The Echo Area:: Displaying messages at the bottom of the screen.
-* Warnings:: Displaying warning messages for the user.
-* Invisible Text:: Hiding part of the buffer text.
-* Selective Display:: Hiding part of the buffer text (the old way).
-* Temporary Displays:: Displays that go away automatically.
-* Overlays:: Use overlays to highlight parts of the buffer.
-* Width:: How wide a character or string is on the screen.
-* Line Height:: Controlling the height of lines.
-* Faces:: A face defines a graphics style
- for text characters: font, colors, etc.
-* Fringes:: Controlling window fringes.
-* Scroll Bars:: Controlling vertical scroll bars.
-* Display Property:: Enabling special display features.
-* Images:: Displaying images in Emacs buffers.
-* Buttons:: Adding clickable buttons to Emacs buffers.
-* Abstract Display:: Emacs's Widget for Object Collections.
-* Blinking:: How Emacs shows the matching open parenthesis.
-* Character Display:: How Emacs displays individual characters.
-* Beeping:: Audible signal to the user.
-* Window Systems:: Which window system is being used.
-* Bidirectional Display:: Display of bidirectional scripts, such as
- Arabic and Farsi.
-
-The Echo Area
-
-* Displaying Messages:: Explicitly displaying text in the echo area.
-* Progress:: Informing user about progress of a long operation.
-* Logging Messages:: Echo area messages are logged for the user.
-* Echo Area Customization:: Controlling the echo area.
-
-Reporting Warnings
-
-* Warning Basics:: Warnings concepts and functions to report them.
-* Warning Variables:: Variables programs bind to customize
- their warnings.
-* Warning Options:: Variables users set to control display of warnings.
-* Delayed Warnings:: Deferring warning display until the end of a command.
-
-Overlays
-
-* Managing Overlays:: Creating and moving overlays.
-* Overlay Properties:: How to read and set properties.
- What properties do to the screen display.
-* Finding Overlays:: Searching for overlays.
-
-Faces
-
-* Defining Faces:: How to define a face.
-* Face Attributes:: What is in a face?
-* Attribute Functions:: Functions to examine and set face attributes.
-* Displaying Faces:: How Emacs combines the faces specified for
- a character.
-* Face Remapping:: Remapping faces to alternative definitions.
-* Face Functions:: How to define and examine faces.
-* Auto Faces:: Hook for automatic face assignment.
-* Basic Faces:: Faces that are defined by default.
-* Font Selection:: Finding the best available font for a face.
-* Font Lookup:: Looking up the names of available fonts
- and information about them.
-* Fontsets:: A fontset is a collection of fonts
- that handle a range of character sets.
-* Low-Level Font:: Lisp representation for character display fonts.
-
-Fringes
-
-* Fringe Size/Pos:: Specifying where to put the window fringes.
-* Fringe Indicators:: Displaying indicator icons in the window fringes.
-* Fringe Cursors:: Displaying cursors in the right fringe.
-* Fringe Bitmaps:: Specifying bitmaps for fringe indicators.
-* Customizing Bitmaps:: Specifying your own bitmaps to use in the fringes.
-* Overlay Arrow:: Display of an arrow to indicate position.
-
-The @code{display} Property
-
-* Replacing Specs:: Display specs that replace the text.
-* Specified Space:: Displaying one space with a specified width.
-* Pixel Specification:: Specifying space width or height in pixels.
-* Other Display Specs:: Displaying an image; adjusting the height,
- spacing, and other properties of text.
-* Display Margins:: Displaying text or images to the side of
- the main text.
-
-Images
-
-* Image Formats:: Supported image formats.
-* Image Descriptors:: How to specify an image for use in @code{:display}.
-* XBM Images:: Special features for XBM format.
-* XPM Images:: Special features for XPM format.
-* GIF Images:: Special features for GIF format.
-* TIFF Images:: Special features for TIFF format.
-* PostScript Images:: Special features for PostScript format.
-* Other Image Types:: Various other formats are supported.
-* Defining Images:: Convenient ways to define an image for later use.
-* Showing Images:: Convenient ways to display an image once
- it is defined.
-* Animated Images:: Some image formats can be animated.
-* Image Cache:: Internal mechanisms of image display.
-
-Buttons
-
-* Button Properties:: Button properties with special meanings.
-* Button Types:: Defining common properties for classes of buttons.
-* Making Buttons:: Adding buttons to Emacs buffers.
-* Manipulating Buttons:: Getting and setting properties of buttons.
-* Button Buffer Commands:: Buffer-wide commands and bindings for buttons.
-
-Abstract Display
-
-* Abstract Display Functions:: Functions in the Ewoc package.
-* Abstract Display Example:: Example of using Ewoc.
-
-Character Display
-
-* Usual Display:: The usual conventions for displaying characters.
-* Display Tables:: What a display table consists of.
-* Active Display Table:: How Emacs selects a display table to use.
-* Glyphs:: How to define a glyph, and what glyphs mean.
-* Glyphless Chars:: How glyphless characters are drawn.
-
-Operating System Interface
-
-* Starting Up:: Customizing Emacs startup processing.
-* Getting Out:: How exiting works (permanent or temporary).
-* 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
- calendrical data and vice versa.
-* Time Parsing:: Converting a time from numeric form to text
- and vice versa.
-* Processor Run Time:: Getting the run time used by Emacs.
-* Time Calculations:: Adding, subtracting, comparing times, etc.
-* Timers:: Setting a timer to call a function at a
- certain time.
-* Idle Timers:: Setting a timer to call a function when Emacs has
- been idle for a certain length of time.
-* Terminal Input:: Accessing and recording terminal input.
-* Terminal Output:: Controlling and recording terminal output.
-* Sound Output:: Playing sounds on the computer's speaker.
-* X11 Keysyms:: Operating on key symbols for X Windows.
-* Batch Mode:: Running Emacs without terminal interaction.
-* Session Management:: Saving and restoring state with
- X Session Management.
-* Notifications:: Desktop notifications.
-* Dynamic Libraries:: On-demand loading of support libraries.
-
-Preparing Lisp code for distribution
-
-* Packaging Basics:: The basic concepts of Emacs Lisp packages.
-* Simple Packages:: How to package a single .el file.
-* Multi-file Packages:: How to package multiple files.
-
-Starting Up Emacs
-
-* Startup Summary:: Sequence of actions Emacs performs at startup.
-* Init File:: Details on reading the init file.
-* Terminal-Specific:: How the terminal-specific Lisp file is read.
-* Command-Line Arguments:: How command-line arguments are processed,
- and how you can customize them.
-
-Getting Out of Emacs
-
-* Killing Emacs:: Exiting Emacs irreversibly.
-* Suspending Emacs:: Exiting Emacs reversibly.
-
-Terminal Input
-
-* Input Modes:: Options for how input is processed.
-* Recording Input:: Saving histories of recent or all input events.
-
-Tips and Conventions
-
-* Coding Conventions:: Conventions for clean and robust programs.
-* Key Binding Conventions:: Which keys should be bound by which programs.
-* Programming Tips:: Making Emacs code fit smoothly in Emacs.
-* Compilation Tips:: Making compiled code run fast.
-* Warning Tips:: Turning off compiler warnings.
-* Documentation Tips:: Writing readable documentation strings.
-* Comment Tips:: Conventions for writing comments.
-* Library Headers:: Standard headers for library packages.
-
-GNU Emacs Internals
-
-* Building Emacs:: How the dumped Emacs is made.
-* 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.
-* Object Internals:: Data formats of buffers, windows, processes.
-
-Object Internals
-
-* Buffer Internals:: Components of a buffer structure.
-* Window Internals:: Components of a window structure.
-* Process Internals:: Components of a process structure.
-@end detailmenu
-@end menu
-
-@include intro.texi
-@include objects.texi
-@include numbers.texi
-@include strings.texi
-
-@include lists.texi
-@include sequences.texi
-@include hash.texi
-@include symbols.texi
-@include eval.texi
-
-@include control.texi
-@include variables.texi
-@include functions.texi
-@include macros.texi
-
-@include customize.texi
-@include loading.texi
-@include compile.texi
-@include advice.texi
-
-@c This includes edebug.texi.
-@include debugging.texi
-@include streams.texi
-@include minibuf.texi
-@include commands.texi
-
-@include keymaps.texi
-@include modes.texi
-@include help.texi
-@include files.texi
-
-@include backups.texi
-
-@c ================ Beginning of Volume 2 ================
-@c include buffers.texi
-@c include windows.texi
-@c include frames.texi
-
-@c include positions.texi
-@c include markers.texi
-@c include text.texi
-@c include nonascii.texi
-
-@c include searching.texi
-@c include syntax.texi
-@c include abbrevs.texi
-@c include processes.texi
-
-@c include display.texi
-@c include os.texi
-
-@c MOVE to Emacs Manual: include misc-modes.texi
-
-@c appendices
-
-@c REMOVE this: include non-hacker.texi
-
-@c include anti.texi
-@c include doclicense.texi
-@c include gpl.texi
-@c include tips.texi
-@c include internals.texi
-@c include errors.texi
-@c include maps.texi
-@c include hooks.texi
-
-@include index.texi
-
-@ignore
-@node New Symbols, , Index, Top
-@unnumbered New Symbols Since the Previous Edition
-
-@printindex tp
-@end ignore
-
-@bye
-
-
-These words prevent "local variables" above from confusing Emacs.
diff --git a/doc/lispref/vol2.texi b/doc/lispref/vol2.texi
deleted file mode 100644
index 2fd2a8d8224..00000000000
--- a/doc/lispref/vol2.texi
+++ /dev/null
@@ -1,1551 +0,0 @@
-\input texinfo @c -*-texinfo-*-
-@c This file is used for printing the GNU Emacs Lisp Reference Manual
-@c in two volumes. It is a modified version of elisp.texi.
-@c Copyright (C) 1990-1995, 1998-1999, 2001-2012
-@c Free Software Foundation, Inc.
-@c %**start of header
-@setfilename elisp
-@settitle GNU Emacs Lisp Reference Manual: Volume 2
-@c %**end of header
-
-@c See two-volume-cross-refs.txt.
-@tex
-\message{Formatting for two volume edition...Volume 2...}
-%
-% Read special toc file, set up in two-volume.make.
-\gdef\tocreadfilename{elisp2-toc-ready.toc}
-%
-% Don't make outlines, they're not needed and \readdatafile can't pay
-% attention to the special definition above.
-\global\let\pdfmakeoutlines=\relax
-%
-% Start volume 2 chapter numbering at 27; this must be listed as chapno26
-\global\chapno=26
-@end tex
-
-@c Version of the manual and of Emacs.
-@c Please remember to update the edition number in README as well.
-@set VERSION 3.0
-@include emacsver.texi
-@set DATE July 2009
-
-@dircategory Emacs
-@direntry
-* Elisp: (elisp). The Emacs Lisp Reference Manual.
-@end direntry
-
-@c in general, keep the following line commented out, unless doing a
-@c copy of this manual that will be published. the manual should go
-@c onto the distribution in the full, 8.5 x 11" size.
-@set smallbook
-
-@ifset smallbook
-@smallbook
-@end ifset
-
-@c per rms and peterb, use 10pt fonts for the main text, mostly to
-@c save on paper cost.
-@c Do this inside @tex for now, so current makeinfo does not complain.
-@tex
-@ifset smallbook
-@fonttextsize 10
-\global\let\urlcolor=\Black % don't print links in grayscale
-\global\let\linkcolor=\Black
-@end ifset
-\global\hbadness=6666 % don't worry about not-too-underfull boxes
-@end tex
-
-@c Combine indices.
-@synindex cp fn
-@syncodeindex vr fn
-@syncodeindex ky fn
-@syncodeindex pg fn
-@c We use the "type index" to index new functions and variables.
-@c @syncodeindex tp fn
-
-@copying
-This is edition @value{VERSION} of the GNU Emacs Lisp Reference Manual,@*
-corresponding to Emacs version @value{EMACSVER}.
-
-Copyright @copyright{} 1990-1996, 1998-2012 Free Software Foundation, Inc.
-
-@quotation
-Permission is granted to copy, distribute and/or modify this document
-under the terms of the GNU Free Documentation License, Version 1.3 or
-any later version published by the Free Software Foundation; with the
-Invariant Sections being ``GNU General Public License,'' with the
-Front-Cover texts being ``A GNU Manual,'' and with the Back-Cover
-Texts as in (a) below. A copy of the license is included in the
-section entitled ``GNU Free Documentation License.''
-
-(a) The FSF's Back-Cover Text is: ``You have the freedom to copy and
-modify this GNU manual. Buying copies from the FSF supports it in
-developing GNU and promoting software freedom.''
-@end quotation
-@end copying
-
-@titlepage
-@title GNU Emacs Lisp Reference Manual
-@subtitle Volume 2
-@subtitle For Emacs Version @value{EMACSVER}
-@subtitle Revision @value{VERSION}, @value{DATE}
-
-@author by Bil Lewis, Dan LaLiberte, Richard Stallman
-@author and the GNU Manual Group
-@page
-@vskip 0pt plus 1filll
-@insertcopying
-
-@sp 2
-Published by the Free Software Foundation @*
-51 Franklin St, Fifth Floor @*
-Boston, MA 02110-1301 @*
-USA @*
-ISBN 1-882114-74-4
-
-@sp 2
-Cover art by Etienne Suvasa.
-@end titlepage
-
-
-@c Print the tables of contents
-@summarycontents
-@contents
-
-
-@ifnottex
-@node Top, Introduction, (dir), (dir)
-@top Emacs Lisp
-
-This Info file contains edition @value{VERSION} of the GNU Emacs Lisp
-Reference Manual, corresponding to GNU Emacs version @value{EMACSVER}.
-@end ifnottex
-
-@menu
-* Introduction:: Introduction and conventions used.
-
-* Lisp Data Types:: Data types of objects in Emacs Lisp.
-* Numbers:: Numbers and arithmetic functions.
-* Strings and Characters:: Strings, and functions that work on them.
-* Lists:: Lists, cons cells, and related functions.
-* Sequences Arrays Vectors:: Lists, strings and vectors are called sequences.
- Certain functions act on any kind of sequence.
- The description of vectors is here as well.
-* Hash Tables:: Very fast lookup-tables.
-* Symbols:: Symbols represent names, uniquely.
-
-* Evaluation:: How Lisp expressions are evaluated.
-* Control Structures:: Conditionals, loops, nonlocal exits.
-* Variables:: Using symbols in programs to stand for values.
-* Functions:: A function is a Lisp program
- that can be invoked from other functions.
-* Macros:: Macros are a way to extend the Lisp language.
-* Customization:: Making variables and faces customizable.
-
-* Loading:: Reading files of Lisp code into Lisp.
-* Byte Compilation:: Compilation makes programs run faster.
-* Advising Functions:: Adding to the definition of a function.
-* Debugging:: Tools and tips for debugging Lisp programs.
-
-* Read and Print:: Converting Lisp objects to text and back.
-* Minibuffers:: Using the minibuffer to read input.
-* Command Loop:: How the editor command loop works,
- and how you can call its subroutines.
-* Keymaps:: Defining the bindings from keys to commands.
-* Modes:: Defining major and minor modes.
-* Documentation:: Writing and using documentation strings.
-
-* Files:: Accessing files.
-* Backups and Auto-Saving:: Controlling how backups and auto-save
- files are made.
-* Buffers:: Creating and using buffer objects.
-* Windows:: Manipulating windows and displaying buffers.
-* Frames:: Making multiple system-level windows.
-* Positions:: Buffer positions and motion functions.
-* Markers:: Markers represent positions and update
- automatically when the text is changed.
-
-* Text:: Examining and changing text in buffers.
-* Non-ASCII Characters:: Non-ASCII text in buffers and strings.
-* Searching and Matching:: Searching buffers for strings or regexps.
-* Syntax Tables:: The syntax table controls word and list parsing.
-* Abbrevs:: How Abbrev mode works, and its data structures.
-
-* Processes:: Running and communicating with subprocesses.
-* Display:: Features for controlling the screen display.
-* System Interface:: Getting the user id, system type, environment
- variables, and other such things.
-
-* Packaging:: Preparing Lisp code for distribution.
-
-Appendices
-
-* Antinews:: Info for users downgrading to Emacs 23.
-* GNU Free Documentation License:: The license for this documentation.
-* GPL:: Conditions for copying and changing GNU Emacs.
-* Tips:: Advice and coding conventions for Emacs Lisp.
-* GNU Emacs Internals:: Building and dumping Emacs;
- internal data structures.
-* Standard Errors:: List of some standard error symbols.
-* Standard Keymaps:: List of some standard keymaps.
-* Standard Hooks:: List of some standard hook variables.
-
-* Index:: Index including concepts, functions, variables,
- and other terms.
-
-@ignore
-* New Symbols:: New functions and variables in Emacs @value{EMACSVER}.
-@end ignore
-
-@c Do NOT modify the following 3 lines! They must have this form to
-@c be correctly identified by `texinfo-multiple-files-update'. In
-@c particular, the detailed menu header line MUST be identical to the
-@c value of `texinfo-master-menu-header'. See texnfo-upd.el.
-
-@detailmenu
- --- The Detailed Node Listing ---
- ---------------------------------
-
-Here are other nodes that are subnodes of those already listed,
-mentioned here so you can get to them in one step:
-
-Introduction
-
-* Caveats:: Flaws and a request for help.
-* Lisp History:: Emacs Lisp is descended from Maclisp.
-* Conventions:: How the manual is formatted.
-* Version Info:: Which Emacs version is running?
-* Acknowledgements:: The authors, editors, and sponsors of this manual.
-
-Conventions
-
-* Some Terms:: Explanation of terms we use in this manual.
-* nil and t:: How the symbols @code{nil} and @code{t} are used.
-* Evaluation Notation:: The format we use for examples of evaluation.
-* Printing Notation:: The format we use when examples print text.
-* Error Messages:: The format we use for examples of errors.
-* Buffer Text Notation:: The format we use for buffer contents in examples.
-* Format of Descriptions:: Notation for describing functions, variables, etc.
-
-Format of Descriptions
-
-* A Sample Function Description:: A description of an imaginary
- function, @code{foo}.
-* A Sample Variable Description:: A description of an imaginary
- variable, @code{electric-future-map}.
-
-Lisp Data Types
-
-* Printed Representation:: How Lisp objects are represented as text.
-* Comments:: Comments and their formatting conventions.
-* Programming Types:: Types found in all Lisp systems.
-* Editing Types:: Types specific to Emacs.
-* Circular Objects:: Read syntax for circular structure.
-* Type Predicates:: Tests related to types.
-* Equality Predicates:: Tests of equality between any two objects.
-
-Programming Types
-
-* Integer Type:: Numbers without fractional parts.
-* Floating Point Type:: Numbers with fractional parts and with a large range.
-* Character Type:: The representation of letters, numbers and
- control characters.
-* Symbol Type:: A multi-use object that refers to a function,
- variable, or property list, and has a unique identity.
-* Sequence Type:: Both lists and arrays are classified as sequences.
-* Cons Cell Type:: Cons cells, and lists (which are made from cons cells).
-* Array Type:: Arrays include strings and vectors.
-* String Type:: An (efficient) array of characters.
-* Vector Type:: One-dimensional arrays.
-* Char-Table Type:: One-dimensional sparse arrays indexed by characters.
-* Bool-Vector Type:: One-dimensional arrays of @code{t} or @code{nil}.
-* Hash Table Type:: Super-fast lookup tables.
-* Function Type:: A piece of executable code you can call from elsewhere.
-* Macro Type:: A method of expanding an expression into another
- expression, more fundamental but less pretty.
-* Primitive Function Type:: A function written in C, callable from Lisp.
-* Byte-Code Type:: A function written in Lisp, then compiled.
-* Autoload Type:: A type used for automatically loading seldom-used
- functions.
-
-Character Type
-
-* Basic Char Syntax:: Syntax for regular characters.
-* General Escape Syntax:: How to specify characters by their codes.
-* Ctl-Char Syntax:: Syntax for control characters.
-* Meta-Char Syntax:: Syntax for meta-characters.
-* Other Char Bits:: Syntax for hyper-, super-, and alt-characters.
-
-Cons Cell and List Types
-
-* Box Diagrams:: Drawing pictures of lists.
-* Dotted Pair Notation:: A general syntax for cons cells.
-* Association List Type:: A specially constructed list.
-
-String Type
-
-* Syntax for Strings:: How to specify Lisp strings.
-* Non-ASCII in Strings:: International characters in strings.
-* Nonprinting Characters:: Literal unprintable characters in strings.
-* Text Props and Strings:: Strings with text properties.
-
-Editing Types
-
-* Buffer Type:: The basic object of editing.
-* Marker Type:: A position in a buffer.
-* Window Type:: Buffers are displayed in windows.
-* Frame Type:: Windows subdivide frames.
-* Terminal Type:: A terminal device displays frames.
-* Window Configuration Type:: Recording the way a frame is subdivided.
-* Frame Configuration Type:: Recording the status of all frames.
-* Process Type:: A subprocess of Emacs running on the underlying OS.
-* Stream Type:: Receive or send characters.
-* Keymap Type:: What function a keystroke invokes.
-* Overlay Type:: How an overlay is represented.
-* Font Type:: Fonts for displaying text.
-
-Numbers
-
-* Integer Basics:: Representation and range of integers.
-* Float Basics:: Representation and range of floating point.
-* Predicates on Numbers:: Testing for numbers.
-* Comparison of Numbers:: Equality and inequality predicates.
-* Numeric Conversions:: Converting float to integer and vice versa.
-* Arithmetic Operations:: How to add, subtract, multiply and divide.
-* Rounding Operations:: Explicitly rounding floating point numbers.
-* Bitwise Operations:: Logical and, or, not, shifting.
-* Math Functions:: Trig, exponential and logarithmic functions.
-* Random Numbers:: Obtaining random integers, predictable or not.
-
-Strings and Characters
-
-* String Basics:: Basic properties of strings and characters.
-* Predicates for Strings:: Testing whether an object is a string or char.
-* Creating Strings:: Functions to allocate new strings.
-* Modifying Strings:: Altering the contents of an existing string.
-* Text Comparison:: Comparing characters or strings.
-* String Conversion:: Converting to and from characters and strings.
-* Formatting Strings:: @code{format}: Emacs's analogue of @code{printf}.
-* Case Conversion:: Case conversion functions.
-* Case Tables:: Customizing case conversion.
-
-Lists
-
-* Cons Cells:: How lists are made out of cons cells.
-* List-related Predicates:: Is this object a list? Comparing two lists.
-* List Elements:: Extracting the pieces of a list.
-* Building Lists:: Creating list structure.
-* List Variables:: Modifying lists stored in variables.
-* Modifying Lists:: Storing new pieces into an existing list.
-* Sets And Lists:: A list can represent a finite mathematical set.
-* Association Lists:: A list can represent a finite relation or mapping.
-* Rings:: Managing a fixed-size ring of objects.
-
-Modifying Existing List Structure
-
-* Setcar:: Replacing an element in a list.
-* Setcdr:: Replacing part of the list backbone.
- This can be used to remove or add elements.
-* Rearrangement:: Reordering the elements in a list; combining lists.
-
-Sequences, Arrays, and Vectors
-
-* Sequence Functions:: Functions that accept any kind of sequence.
-* Arrays:: Characteristics of arrays in Emacs Lisp.
-* Array Functions:: Functions specifically for arrays.
-* Vectors:: Special characteristics of Emacs Lisp vectors.
-* Vector Functions:: Functions specifically for vectors.
-* Char-Tables:: How to work with char-tables.
-* Bool-Vectors:: How to work with bool-vectors.
-
-Hash Tables
-
-* Creating Hash:: Functions to create hash tables.
-* Hash Access:: Reading and writing the hash table contents.
-* Defining Hash:: Defining new comparison methods.
-* Other Hash:: Miscellaneous.
-
-Symbols
-
-* Symbol Components:: Symbols have names, values, function definitions
- and property lists.
-* Definitions:: A definition says how a symbol will be used.
-* Creating Symbols:: How symbols are kept unique.
-* Property Lists:: Each symbol has a property list
- for recording miscellaneous information.
-
-Property Lists
-
-* Plists and Alists:: Comparison of the advantages of property
- lists and association lists.
-* Symbol Plists:: Functions to access symbols' property lists.
-* Other Plists:: Accessing property lists stored elsewhere.
-
-Evaluation
-
-* Intro Eval:: Evaluation in the scheme of things.
-* Forms:: How various sorts of objects are evaluated.
-* Quoting:: Avoiding evaluation (to put constants in
- the program).
-* Backquote:: Easier construction of list structure.
-* Eval:: How to invoke the Lisp interpreter explicitly.
-
-Kinds of Forms
-
-* Self-Evaluating Forms:: Forms that evaluate to themselves.
-* Symbol Forms:: Symbols evaluate as variables.
-* Classifying Lists:: How to distinguish various sorts of list forms.
-* Function Indirection:: When a symbol appears as the car of a list,
- we find the real function via the symbol.
-* Function Forms:: Forms that call functions.
-* Macro Forms:: Forms that call macros.
-* Special Forms:: "Special forms" are idiosyncratic primitives,
- most of them extremely important.
-* Autoloading:: Functions set up to load files
- containing their real definitions.
-
-Control Structures
-
-* Sequencing:: Evaluation in textual order.
-* Conditionals:: @code{if}, @code{cond}, @code{when}, @code{unless}.
-* Combining Conditions:: @code{and}, @code{or}, @code{not}.
-* Iteration:: @code{while} loops.
-* Nonlocal Exits:: Jumping out of a sequence.
-
-Nonlocal Exits
-
-* Catch and Throw:: Nonlocal exits for the program's own purposes.
-* Examples of Catch:: Showing how such nonlocal exits can be written.
-* Errors:: How errors are signaled and handled.
-* Cleanups:: Arranging to run a cleanup form if an
- error happens.
-
-Errors
-
-* Signaling Errors:: How to report an error.
-* Processing of Errors:: What Emacs does when you report an error.
-* Handling Errors:: How you can trap errors and continue execution.
-* Error Symbols:: How errors are classified for trapping them.
-
-Variables
-
-* Global Variables:: Variable values that exist permanently, everywhere.
-* Constant Variables:: Certain "variables" have values that never change.
-* Local Variables:: Variable values that exist only temporarily.
-* Void Variables:: Symbols that lack values.
-* Defining Variables:: A definition says a symbol is used as a variable.
-* Tips for Defining:: Things you should think about when you
- define a variable.
-* Accessing Variables:: Examining values of variables whose names
- are known only at run time.
-* Setting Variables:: Storing new values in variables.
-* Variable Scoping:: How Lisp chooses among local and global values.
-* Buffer-Local Variables:: Variable values in effect only in one buffer.
-* File Local Variables:: Handling local variable lists in files.
-* Directory Local Variables:: Local variables common to all files in a
- directory.
-* Frame-Local Variables:: Frame-local bindings for variables.
-* Variable Aliases:: Variables that are aliases for other variables.
-* Variables with Restricted Values:: Non-constant variables whose value can
- @emph{not} be an arbitrary Lisp object.
-
-Scoping Rules for Variable Bindings
-
-* Scope:: Scope means where in the program a value
- is visible. Comparison with other languages.
-* Extent:: Extent means how long in time a value exists.
-* Impl of Scope:: Two ways to implement dynamic scoping.
-* Using Scoping:: How to use dynamic scoping carefully and
- avoid problems.
-
-Buffer-Local Variables
-
-* Intro to Buffer-Local:: Introduction and concepts.
-* Creating Buffer-Local:: Creating and destroying buffer-local bindings.
-* Default Value:: The default value is seen in buffers
- that don't have their own buffer-local values.
-
-Functions
-
-* What Is a Function:: Lisp functions vs. primitives; terminology.
-* Lambda Expressions:: How functions are expressed as Lisp objects.
-* Function Names:: A symbol can serve as the name of a function.
-* Defining Functions:: Lisp expressions for defining functions.
-* Calling Functions:: How to use an existing function.
-* Mapping Functions:: Applying a function to each element of a list, etc.
-* Anonymous Functions:: Lambda expressions are functions with no names.
-* Function Cells:: Accessing or setting the function definition
- of a symbol.
-* Closures:: Functions that enclose a lexical environment.
-* Obsolete Functions:: Declaring functions obsolete.
-* Inline Functions:: Defining functions that the compiler
- will open code.
-* Declaring Functions:: Telling the compiler that a function is defined.
-* Function Safety:: Determining whether a function is safe to call.
-* Related Topics:: Cross-references to specific Lisp primitives
- that have a special bearing on how
- functions work.
-
-Lambda Expressions
-
-* Lambda Components:: The parts of a lambda expression.
-* Simple Lambda:: A simple example.
-* Argument List:: Details and special features of argument lists.
-* Function Documentation:: How to put documentation in a function.
-
-Macros
-
-* Simple Macro:: A basic example.
-* Expansion:: How, when and why macros are expanded.
-* Compiling Macros:: How macros are expanded by the compiler.
-* Defining Macros:: How to write a macro definition.
-* Problems with Macros:: Don't evaluate the macro arguments too many times.
- Don't hide the user's variables.
-* Indenting Macros:: Specifying how to indent macro calls.
-
-Common Problems Using Macros
-
-* Wrong Time:: Do the work in the expansion, not in the macro.
-* Argument Evaluation:: The expansion should evaluate each macro arg once.
-* Surprising Local Vars:: Local variable bindings in the expansion
- require special care.
-* Eval During Expansion:: Don't evaluate them; put them in the expansion.
-* Repeated Expansion:: Avoid depending on how many times expansion is done.
-
-Writing Customization Definitions
-
-* Common Keywords:: Common keyword arguments for all kinds of
- customization declarations.
-* Group Definitions:: Writing customization group definitions.
-* Variable Definitions:: Declaring user options.
-* Customization Types:: Specifying the type of a user option.
-* Applying Customizations:: Functions to apply customization settings.
-* Custom Themes:: Writing Custom themes.
-
-Customization Types
-
-* Simple Types:: Simple customization types: sexp, integer, number,
- string, file, directory, alist.
-* Composite Types:: Build new types from other types or data.
-* Splicing into Lists:: Splice elements into list with @code{:inline}.
-* Type Keywords:: Keyword-argument pairs in a customization type.
-* Defining New Types:: Give your type a name.
-
-Loading
-
-* How Programs Do Loading:: The @code{load} function and others.
-* Load Suffixes:: Details about the suffixes that @code{load} tries.
-* Library Search:: Finding a library to load.
-* Loading Non-ASCII:: Non-@acronym{ASCII} characters in Emacs Lisp files.
-* Autoload:: Setting up a function to autoload.
-* Repeated Loading:: Precautions about loading a file twice.
-* Named Features:: Loading a library if it isn't already loaded.
-* Where Defined:: Finding which file defined a certain symbol.
-* Unloading:: How to "unload" a library that was loaded.
-* Hooks for Loading:: Providing code to be run when
- particular libraries are loaded.
-
-Byte Compilation
-
-* Speed of Byte-Code:: An example of speedup from byte compilation.
-* Compilation Functions:: Byte compilation functions.
-* Docs and Compilation:: Dynamic loading of documentation strings.
-* Dynamic Loading:: Dynamic loading of individual functions.
-* Eval During Compile:: Code to be evaluated when you compile.
-* Compiler Errors:: Handling compiler error messages.
-* Byte-Code Objects:: The data type used for byte-compiled functions.
-* Disassembly:: Disassembling byte-code; how to read byte-code.
-
-Advising Emacs Lisp Functions
-
-* Simple Advice:: A simple example to explain the basics of advice.
-* Defining Advice:: Detailed description of @code{defadvice}.
-* Around-Advice:: Wrapping advice around a function's definition.
-* Computed Advice:: ...is to @code{defadvice} as @code{fset} is to @code{defun}.
-* Activation of Advice:: Advice doesn't do anything until you activate it.
-* Enabling Advice:: You can enable or disable each piece of advice.
-* Preactivation:: Preactivation is a way of speeding up the
- loading of compiled advice.
-* Argument Access in Advice:: How advice can access the function's arguments.
-* Combined Definition:: How advice is implemented.
-
-Debugging Lisp Programs
-
-* Debugger:: A debugger for the Emacs Lisp evaluator.
-* Edebug:: A source-level Emacs Lisp debugger.
-* Syntax Errors:: How to find syntax errors.
-* Test Coverage:: Ensuring you have tested all branches in your code.
-
-The Lisp Debugger
-
-* Error Debugging:: Entering the debugger when an error happens.
-* Infinite Loops:: Stopping and debugging a program that doesn't exit.
-* Function Debugging:: Entering it when a certain function is called.
-* Explicit Debug:: Entering it at a certain point in the program.
-* Using Debugger:: What the debugger does; what you see while in it.
-* Debugger Commands:: Commands used while in the debugger.
-* Invoking the Debugger:: How to call the function @code{debug}.
-* Internals of Debugger:: Subroutines of the debugger, and global variables.
-
-Edebug
-
-* Using Edebug:: Introduction to use of Edebug.
-* Instrumenting:: You must instrument your code
- in order to debug it with Edebug.
-* Edebug Execution Modes:: Execution modes, stopping more or less often.
-* Jumping:: Commands to jump to a specified place.
-* Edebug Misc:: Miscellaneous commands.
-* Breaks:: Setting breakpoints to make the program stop.
-* Trapping Errors:: Trapping errors with Edebug.
-* Edebug Views:: Views inside and outside of Edebug.
-* Edebug Eval:: Evaluating expressions within Edebug.
-* Eval List:: Expressions whose values are displayed
- each time you enter Edebug.
-* Printing in Edebug:: Customization of printing.
-* Trace Buffer:: How to produce trace output in a buffer.
-* Coverage Testing:: How to test evaluation coverage.
-* The Outside Context:: Data that Edebug saves and restores.
-* Edebug and Macros:: Specifying how to handle macro calls.
-* Edebug Options:: Option variables for customizing Edebug.
-
-Breaks
-
-* Breakpoints:: Breakpoints at stop points.
-* Global Break Condition:: Breaking on an event.
-* Source Breakpoints:: Embedding breakpoints in source code.
-
-The Outside Context
-
-* Checking Whether to Stop::When Edebug decides what to do.
-* Edebug Display Update:: When Edebug updates the display.
-* Edebug Recursive Edit:: When Edebug stops execution.
-
-Edebug and Macros
-
-* Instrumenting Macro Calls::The basic problem.
-* Specification List:: How to specify complex patterns of evaluation.
-* Backtracking:: What Edebug does when matching fails.
-* Specification Examples:: To help understand specifications.
-
-Debugging Invalid Lisp Syntax
-
-* Excess Open:: How to find a spurious open paren or missing close.
-* Excess Close:: How to find a spurious close paren or missing open.
-
-Reading and Printing Lisp Objects
-
-* Streams Intro:: Overview of streams, reading and printing.
-* Input Streams:: Various data types that can be used as
- input streams.
-* Input Functions:: Functions to read Lisp objects from text.
-* Output Streams:: Various data types that can be used as
- output streams.
-* Output Functions:: Functions to print Lisp objects as text.
-* Output Variables:: Variables that control what the printing
- functions do.
-
-Minibuffers
-
-* Intro to Minibuffers:: Basic information about minibuffers.
-* Text from Minibuffer:: How to read a straight text string.
-* Object from Minibuffer:: How to read a Lisp object or expression.
-* Minibuffer History:: Recording previous minibuffer inputs
- so the user can reuse them.
-* Initial Input:: Specifying initial contents for the minibuffer.
-* Completion:: How to invoke and customize completion.
-* Yes-or-No Queries:: Asking a question with a simple answer.
-* Multiple Queries:: Asking a series of similar questions.
-* Reading a Password:: Reading a password from the terminal.
-* Minibuffer Commands:: Commands used as key bindings in minibuffers.
-* Minibuffer Windows:: Operating on the special minibuffer windows.
-* Minibuffer Contents:: How such commands access the minibuffer text.
-* Recursive Mini:: Whether recursive entry to minibuffer is allowed.
-* Minibuffer Misc:: Various customization hooks and variables.
-
-Completion
-
-* Basic Completion:: Low-level functions for completing strings.
- (These are too low level to use the minibuffer.)
-* Minibuffer Completion:: Invoking the minibuffer with completion.
-* Completion Commands:: Minibuffer commands that do completion.
-* High-Level Completion:: Convenient special cases of completion
- (reading buffer names, variable names, etc.).
-* Reading File Names:: Using completion to read file names and
- shell commands.
-* Completion Variables:: Variables controlling completion behavior.
-* Programmed Completion:: Writing your own completion function.
-* Completion in Buffers:: Completing text in ordinary buffers.
-
-Command Loop
-
-* Command Overview:: How the command loop reads commands.
-* Defining Commands:: Specifying how a function should read arguments.
-* Interactive Call:: Calling a command, so that it will read arguments.
-* Distinguish Interactive:: Making a command distinguish interactive calls.
-* Command Loop Info:: Variables set by the command loop for you to examine.
-* Adjusting Point:: Adjustment of point after a command.
-* Input Events:: What input looks like when you read it.
-* Reading Input:: How to read input events from the keyboard or mouse.
-* Special Events:: Events processed immediately and individually.
-* Waiting:: Waiting for user input or elapsed time.
-* Quitting:: How @kbd{C-g} works. How to catch or defer quitting.
-* Prefix Command Arguments:: How the commands to set prefix args work.
-* Recursive Editing:: Entering a recursive edit,
- and why you usually shouldn't.
-* Disabling Commands:: How the command loop handles disabled commands.
-* Command History:: How the command history is set up, and how accessed.
-* Keyboard Macros:: How keyboard macros are implemented.
-
-Defining Commands
-
-* Using Interactive:: General rules for @code{interactive}.
-* Interactive Codes:: The standard letter-codes for reading arguments
- in various ways.
-* Interactive Examples:: Examples of how to read interactive arguments.
-
-Input Events
-
-* Keyboard Events:: Ordinary characters--keys with symbols on them.
-* Function Keys:: Function keys--keys with names, not symbols.
-* Mouse Events:: Overview of mouse events.
-* Click Events:: Pushing and releasing a mouse button.
-* Drag Events:: Moving the mouse before releasing the button.
-* Button-Down Events:: A button was pushed and not yet released.
-* Repeat Events:: Double and triple click (or drag, or down).
-* Motion Events:: Just moving the mouse, not pushing a button.
-* Focus Events:: Moving the mouse between frames.
-* Misc Events:: Other events the system can generate.
-* Event Examples:: Examples of the lists for mouse events.
-* Classifying Events:: Finding the modifier keys in an event symbol.
- Event types.
-* Accessing Mouse:: Functions to extract info from mouse events.
-* Accessing Scroll:: Functions to get info from scroll bar events.
-* Strings of Events:: Special considerations for putting
- keyboard character events in a string.
-
-Reading Input
-
-* Key Sequence Input:: How to read one key sequence.
-* Reading One Event:: How to read just one event.
-* Event Mod:: How Emacs modifies events as they are read.
-* Invoking the Input Method:: How reading an event uses the input method.
-* Quoted Character Input:: Asking the user to specify a character.
-* Event Input Misc:: How to reread or throw away input events.
-
-Keymaps
-
-* Key Sequences:: Key sequences as Lisp objects.
-* Keymap Basics:: Basic concepts of keymaps.
-* Format of Keymaps:: What a keymap looks like as a Lisp object.
-* Creating Keymaps:: Functions to create and copy keymaps.
-* Inheritance and Keymaps:: How one keymap can inherit the bindings
- of another keymap.
-* Prefix Keys:: Defining a key with a keymap as its definition.
-* Active Keymaps:: How Emacs searches the active keymaps
- for a key binding.
-* Searching Keymaps:: A pseudo-Lisp summary of searching active maps.
-* Controlling Active Maps:: Each buffer has a local keymap
- to override the standard (global) bindings.
- A minor mode can also override them.
-* Key Lookup:: Finding a key's binding in one keymap.
-* Functions for Key Lookup:: How to request key lookup.
-* Changing Key Bindings:: Redefining a key in a keymap.
-* Remapping Commands:: A keymap can translate one command to another.
-* Translation Keymaps:: Keymaps for translating sequences of events.
-* Key Binding Commands:: Interactive interfaces for redefining keys.
-* Scanning Keymaps:: Looking through all keymaps, for printing help.
-* Menu Keymaps:: Defining a menu as a keymap.
-
-Menu Keymaps
-
-* Defining Menus:: How to make a keymap that defines a menu.
-* Mouse Menus:: How users actuate the menu with the mouse.
-* Keyboard Menus:: How users actuate the menu with the keyboard.
-* Menu Example:: Making a simple menu.
-* Menu Bar:: How to customize the menu bar.
-* Tool Bar:: A tool bar is a row of images.
-* Modifying Menus:: How to add new items to a menu.
-
-Defining Menus
-
-* Simple Menu Items:: A simple kind of menu key binding,
- limited in capabilities.
-* Extended Menu Items:: More powerful menu item definitions
- let you specify keywords to enable
- various features.
-* Menu Separators:: Drawing a horizontal line through a menu.
-* Alias Menu Items:: Using command aliases in menu items.
-
-Major and Minor Modes
-
-* Hooks:: How to use hooks; how to write code that provides hooks.
-* Major Modes:: Defining major modes.
-* Minor Modes:: Defining minor modes.
-* Mode Line Format:: Customizing the text that appears in the mode line.
-* Imenu:: Providing a menu of definitions made in a buffer.
-* Font Lock Mode:: How modes can highlight text according to syntax.
-* Auto-Indentation:: How to teach Emacs to indent for a major mode.
-* Desktop Save Mode:: How modes can have buffer state saved between
- Emacs sessions.
-
-Hooks
-
-* Running Hooks:: How to run a hook.
-* Setting Hooks:: How to put functions on a hook, or remove them.
-
-Major Modes
-
-* Major Mode Conventions:: Coding conventions for keymaps, etc.
-* Auto Major Mode:: How Emacs chooses the major mode automatically.
-* Mode Help:: Finding out how to use a mode.
-* Derived Modes:: Defining a new major mode based on another major
- mode.
-* Basic Major Modes:: Modes that other modes are often derived from.
-* Mode Hooks:: Hooks run at the end of major mode commands.
-* Tabulated List Mode:: Parent mode for buffers containing tabulated data.
-* Generic Modes:: Defining a simple major mode that supports
- comment syntax and Font Lock mode.
-* Example Major Modes:: Text mode and Lisp modes.
-
-Minor Modes
-
-* Minor Mode Conventions:: Tips for writing a minor mode.
-* Keymaps and Minor Modes:: How a minor mode can have its own keymap.
-* Defining Minor Modes:: A convenient facility for defining minor modes.
-
-Mode Line Format
-
-* Mode Line Basics:: Basic ideas of mode line control.
-* Mode Line Data:: The data structure that controls the mode line.
-* Mode Line Top:: The top level variable, mode-line-format.
-* Mode Line Variables:: Variables used in that data structure.
-* %-Constructs:: Putting information into a mode line.
-* Properties in Mode:: Using text properties in the mode line.
-* Header Lines:: Like a mode line, but at the top.
-* Emulating Mode Line:: Formatting text as the mode line would.
-
-Font Lock Mode
-
-* Font Lock Basics:: Overview of customizing Font Lock.
-* Search-based Fontification:: Fontification based on regexps.
-* Customizing Keywords:: Customizing search-based fontification.
-* Other Font Lock Variables:: Additional customization facilities.
-* Levels of Font Lock:: Each mode can define alternative levels
- so that the user can select more or less.
-* Precalculated Fontification:: How Lisp programs that produce the buffer
- contents can also specify how to fontify it.
-* Faces for Font Lock:: Special faces specifically for Font Lock.
-* Syntactic Font Lock:: Fontification based on syntax tables.
-* Multiline Font Lock:: How to coerce Font Lock into properly
- highlighting multiline constructs.
-
-Multiline Font Lock Constructs
-
-* Font Lock Multiline:: Marking multiline chunks with a text property.
-* Region to Refontify:: Controlling which region gets refontified
- after a buffer change.
-
-Documentation
-
-* Documentation Basics:: Where doc strings are defined and stored.
-* Accessing Documentation:: How Lisp programs can access doc strings.
-* Keys in Documentation:: Substituting current key bindings.
-* Describing Characters:: Making printable descriptions of
- non-printing characters and key sequences.
-* Help Functions:: Subroutines used by Emacs help facilities.
-
-Files
-
-* Visiting Files:: Reading files into Emacs buffers for editing.
-* Saving Buffers:: Writing changed buffers back into files.
-* Reading from Files:: Reading files into buffers without visiting.
-* Writing to Files:: Writing new files from parts of buffers.
-* File Locks:: Locking and unlocking files, to prevent
- simultaneous editing by two people.
-* Information about Files:: Testing existence, accessibility, size of files.
-* Changing Files:: Renaming files, changing permissions, etc.
-* File Names:: Decomposing and expanding file names.
-* Contents of Directories:: Getting a list of the files in a directory.
-* Create/Delete Dirs:: Creating and Deleting Directories.
-* Magic File Names:: Special handling for certain file names.
-* Format Conversion:: Conversion to and from various file formats.
-
-Visiting Files
-
-* Visiting Functions:: The usual interface functions for visiting.
-* Subroutines of Visiting:: Lower-level subroutines that they use.
-
-Information about Files
-
-* Testing Accessibility:: Is a given file readable? Writable?
-* Kinds of Files:: Is it a directory? A symbolic link?
-* Truenames:: Eliminating symbolic links from a file name.
-* File Attributes:: How large is it? Any other names? Etc.
-* Locating Files:: How to find a file in standard places.
-
-File Names
-
-* File Name Components:: The directory part of a file name, and the rest.
-* Relative File Names:: Some file names are relative to a current directory.
-* Directory Names:: A directory's name as a directory
- is different from its name as a file.
-* File Name Expansion:: Converting relative file names to absolute ones.
-* Unique File Names:: Generating names for temporary files.
-* File Name Completion:: Finding the completions for a given file name.
-* Standard File Names:: If your package uses a fixed file name,
- how to handle various operating systems simply.
-
-File Format Conversion
-
-* Format Conversion Overview:: @code{insert-file-contents} and @code{write-region}.
-* Format Conversion Round-Trip:: Using @code{format-alist}.
-* Format Conversion Piecemeal:: Specifying non-paired conversion.
-
-Backups and Auto-Saving
-
-* Backup Files:: How backup files are made; how their names
- are chosen.
-* Auto-Saving:: How auto-save files are made; how their
- names are chosen.
-* Reverting:: @code{revert-buffer}, and how to customize
- what it does.
-
-Backup Files
-
-* Making Backups:: How Emacs makes backup files, and when.
-* Rename or Copy:: Two alternatives: renaming the old file
- or copying it.
-* Numbered Backups:: Keeping multiple backups for each source file.
-* Backup Names:: How backup file names are computed; customization.
-
-Buffers
-
-* Buffer Basics:: What is a buffer?
-* Current Buffer:: Designating a buffer as current
- so that primitives will access its contents.
-* Buffer Names:: Accessing and changing buffer names.
-* Buffer File Name:: The buffer file name indicates which file
- is visited.
-* Buffer Modification:: A buffer is @dfn{modified} if it needs to be saved.
-* Modification Time:: Determining whether the visited file was changed
- "behind Emacs's back".
-* Read Only Buffers:: Modifying text is not allowed in a
- read-only buffer.
-* The Buffer List:: How to look at all the existing buffers.
-* Creating Buffers:: Functions that create buffers.
-* Killing Buffers:: Buffers exist until explicitly killed.
-* Indirect Buffers:: An indirect buffer shares text with some
- other buffer.
-* Swapping Text:: Swapping text between two buffers.
-* Buffer Gap:: The gap in the buffer.
-
-Windows
-
-* Basic Windows:: Basic information on using windows.
-* Splitting Windows:: Splitting one window into two windows.
-* Deleting Windows:: Deleting a window gives its space to other windows.
-* Selecting Windows:: The selected window is the one that you edit in.
-* Cyclic Window Ordering:: Moving around the existing windows.
-* Buffers and Windows:: Each window displays the contents of a buffer.
-* Switching Buffers:: Higher-level functions for switching to a buffer.
-* Choosing Window:: How to choose a window for displaying a buffer.
-* Display Action Functions:: Subroutines for @code{display-buffer}.
-* Choosing Window Options:: Extra options affecting how buffers are displayed.
-* Window History:: Each window remembers the buffers displayed in it.
-* Dedicated Windows:: How to avoid displaying another buffer in
- a specific window.
-* Window Point:: Each window has its own location of point.
-* Window Start and End:: Buffer positions indicating which text is
- on-screen in a window.
-* Textual Scrolling:: Moving text up and down through the window.
-* Vertical Scrolling:: Moving the contents up and down on the window.
-* Horizontal Scrolling:: Moving the contents sideways on the window.
-* Size of Window:: Accessing the size of a window.
-* Resizing Windows:: Changing the size of a window.
-* Coordinates and Windows:: Converting coordinates to windows.
-* Window Tree:: The layout and sizes of all windows in a frame.
-* Window Configurations:: Saving and restoring the state of the screen.
-* Window Parameters:: Associating additional information with windows.
-* Window Hooks:: Hooks for scrolling, window size changes,
- redisplay going past a certain point,
- or window configuration changes.
-
-Frames
-
-* Creating Frames:: Creating additional frames.
-* Multiple Terminals:: Displaying on several different devices.
-* Frame Parameters:: Controlling frame size, position, font, etc.
-* Terminal Parameters:: Parameters common for all frames on terminal.
-* Frame Titles:: Automatic updating of frame titles.
-* Deleting Frames:: Frames last until explicitly deleted.
-* Finding All Frames:: How to examine all existing frames.
-* Frames and Windows:: A frame contains windows;
- display of text always works through windows.
-* Minibuffers and Frames:: How a frame finds the minibuffer to use.
-* Input Focus:: Specifying the selected frame.
-* Visibility of Frames:: Frames may be visible or invisible, or icons.
-* Raising and Lowering:: Raising a frame makes it hide other windows;
- lowering it makes the others hide it.
-* Frame Configurations:: Saving the state of all frames.
-* Mouse Tracking:: Getting events that say when the mouse moves.
-* Mouse Position:: Asking where the mouse is, or moving it.
-* Pop-Up Menus:: Displaying a menu for the user to select from.
-* Dialog Boxes:: Displaying a box to ask yes or no.
-* Pointer Shape:: Specifying the shape of the mouse pointer.
-* Window System Selections::Transferring text to and from other X clients.
-* Drag and Drop:: Internals of Drag-and-Drop implementation.
-* Color Names:: Getting the definitions of color names.
-* Text Terminal Colors:: Defining colors for text terminals.
-* Resources:: Getting resource values from the server.
-* Display Feature Testing:: Determining the features of a terminal.
-
-Frame Parameters
-
-* Parameter Access:: How to change a frame's parameters.
-* Initial Parameters:: Specifying frame parameters when you make a frame.
-* Window Frame Parameters:: List of frame parameters for window systems.
-* Size and Position:: Changing the size and position of a frame.
-* Geometry:: Parsing geometry specifications.
-
-Window Frame Parameters
-
-* Basic Parameters:: Parameters that are fundamental.
-* Position Parameters:: The position of the frame on the screen.
-* Size Parameters:: Frame's size.
-* Layout Parameters:: Size of parts of the frame, and
- enabling or disabling some parts.
-* Buffer Parameters:: Which buffers have been or should be shown.
-* Management Parameters:: Communicating with the window manager.
-* Cursor Parameters:: Controlling the cursor appearance.
-* Font and Color Parameters:: Fonts and colors for the frame text.
-
-Positions
-
-* Point:: The special position where editing takes place.
-* Motion:: Changing point.
-* Excursions:: Temporary motion and buffer changes.
-* Narrowing:: Restricting editing to a portion of the buffer.
-
-Motion
-
-* Character Motion:: Moving in terms of characters.
-* Word Motion:: Moving in terms of words.
-* Buffer End Motion:: Moving to the beginning or end of the buffer.
-* Text Lines:: Moving in terms of lines of text.
-* Screen Lines:: Moving in terms of lines as displayed.
-* List Motion:: Moving by parsing lists and sexps.
-* Skipping Characters:: Skipping characters belonging to a certain set.
-
-Markers
-
-* Overview of Markers:: The components of a marker, and how it relocates.
-* Predicates on Markers:: Testing whether an object is a marker.
-* Creating Markers:: Making empty markers or markers at certain places.
-* Information from Markers::Finding the marker's buffer or character position.
-* Marker Insertion Types:: Two ways a marker can relocate when you
- insert where it points.
-* Moving Markers:: Moving the marker to a new buffer or position.
-* The Mark:: How "the mark" is implemented with a marker.
-* The Region:: How to access "the region".
-
-Text
-
-* Near Point:: Examining text in the vicinity of point.
-* Buffer Contents:: Examining text in a general fashion.
-* Comparing Text:: Comparing substrings of buffers.
-* Insertion:: Adding new text to a buffer.
-* Commands for Insertion:: User-level commands to insert text.
-* Deletion:: Removing text from a buffer.
-* User-Level Deletion:: User-level commands to delete text.
-* The Kill Ring:: Where removed text sometimes is saved for
- later use.
-* Undo:: Undoing changes to the text of a buffer.
-* Maintaining Undo:: How to enable and disable undo information.
- How to control how much information is kept.
-* Filling:: Functions for explicit filling.
-* Margins:: How to specify margins for filling commands.
-* Adaptive Fill:: Adaptive Fill mode chooses a fill prefix
- from context.
-* Auto Filling:: How auto-fill mode is implemented to break lines.
-* Sorting:: Functions for sorting parts of the buffer.
-* Columns:: Computing horizontal positions, and using them.
-* Indentation:: Functions to insert or adjust indentation.
-* Case Changes:: Case conversion of parts of the buffer.
-* Text Properties:: Assigning Lisp property lists to text characters.
-* Substitution:: Replacing a given character wherever it appears.
-* Transposition:: Swapping two portions of a buffer.
-* Registers:: How registers are implemented. Accessing
- the text or position stored in a register.
-* Base 64:: Conversion to or from base 64 encoding.
-* Checksum/Hash:: Computing cryptographic hashes.
-* Parsing HTML/XML:: Parsing HTML and XML.
-* Atomic Changes:: Installing several buffer changes "atomically".
-* Change Hooks:: Supplying functions to be run when text is changed.
-
-The Kill Ring
-
-* Kill Ring Concepts:: What text looks like in the kill ring.
-* Kill Functions:: Functions that kill text.
-* Yanking:: How yanking is done.
-* Yank Commands:: Commands that access the kill ring.
-* Low-Level Kill Ring:: Functions and variables for kill ring access.
-* Internals of Kill Ring:: Variables that hold kill ring data.
-
-Indentation
-
-* Primitive Indent:: Functions used to count and insert indentation.
-* Mode-Specific Indent:: Customize indentation for different modes.
-* Region Indent:: Indent all the lines in a region.
-* Relative Indent:: Indent the current line based on previous lines.
-* Indent Tabs:: Adjustable, typewriter-like tab stops.
-* Motion by Indent:: Move to first non-blank character.
-
-Text Properties
-
-* Examining Properties:: Looking at the properties of one character.
-* Changing Properties:: Setting the properties of a range of text.
-* Property Search:: Searching for where a property changes value.
-* Special Properties:: Particular properties with special meanings.
-* Format Properties:: Properties for representing formatting of text.
-* Sticky Properties:: How inserted text gets properties from
- neighboring text.
-* Lazy Properties:: Computing text properties in a lazy fashion
- only when text is examined.
-* Clickable Text:: Using text properties to make regions of text
- do something when you click on them.
-* Fields:: The @code{field} property defines
- fields within the buffer.
-* Not Intervals:: Why text properties do not use
- Lisp-visible text intervals.
-
-Non-@acronym{ASCII} Characters
-
-* Text Representations:: How Emacs represents text.
-* Converting Representations:: Converting unibyte to multibyte and vice versa.
-* Selecting a Representation:: Treating a byte sequence as unibyte or multi.
-* Character Codes:: How unibyte and multibyte relate to
- codes of individual characters.
-* Character Properties:: Character attributes that define their
- behavior and handling.
-* Character Sets:: The space of possible character codes
- is divided into various character sets.
-* Scanning Charsets:: Which character sets are used in a buffer?
-* Translation of Characters:: Translation tables are used for conversion.
-* Coding Systems:: Coding systems are conversions for saving files.
-* Input Methods:: Input methods allow users to enter various
- non-ASCII characters without special keyboards.
-* Locales:: Interacting with the POSIX locale.
-
-Coding Systems
-
-* Coding System Basics:: Basic concepts.
-* Encoding and I/O:: How file I/O functions handle coding systems.
-* Lisp and Coding Systems:: Functions to operate on coding system names.
-* User-Chosen Coding Systems:: Asking the user to choose a coding system.
-* Default Coding Systems:: Controlling the default choices.
-* Specifying Coding Systems:: Requesting a particular coding system
- for a single file operation.
-* Explicit Encoding:: Encoding or decoding text without doing I/O.
-* Terminal I/O Encoding:: Use of encoding for terminal I/O.
-* MS-DOS File Types:: How DOS "text" and "binary" files
- relate to coding systems.
-
-Searching and Matching
-
-* String Search:: Search for an exact match.
-* Searching and Case:: Case-independent or case-significant searching.
-* Regular Expressions:: Describing classes of strings.
-* Regexp Search:: Searching for a match for a regexp.
-* POSIX Regexps:: Searching POSIX-style for the longest match.
-* Match Data:: Finding out which part of the text matched,
- after a string or regexp search.
-* Search and Replace:: Commands that loop, searching and replacing.
-* Standard Regexps:: Useful regexps for finding sentences, pages,...
-
-Regular Expressions
-
-* Syntax of Regexps:: Rules for writing regular expressions.
-* Regexp Example:: Illustrates regular expression syntax.
-* Regexp Functions:: Functions for operating on regular expressions.
-
-Syntax of Regular Expressions
-
-* Regexp Special:: Special characters in regular expressions.
-* Char Classes:: Character classes used in regular expressions.
-* Regexp Backslash:: Backslash-sequences in regular expressions.
-
-The Match Data
-
-* Replacing Match:: Replacing a substring that was matched.
-* Simple Match Data:: Accessing single items of match data,
- such as where a particular subexpression started.
-* Entire Match Data:: Accessing the entire match data at once, as a list.
-* Saving Match Data:: Saving and restoring the match data.
-
-Syntax Tables
-
-* Syntax Basics:: Basic concepts of syntax tables.
-* Syntax Descriptors:: How characters are classified.
-* Syntax Table Functions:: How to create, examine and alter syntax tables.
-* Syntax Properties:: Overriding syntax with text properties.
-* Motion and Syntax:: Moving over characters with certain syntaxes.
-* Parsing Expressions:: Parsing balanced expressions
- using the syntax table.
-* Standard Syntax Tables:: Syntax tables used by various major modes.
-* Syntax Table Internals:: How syntax table information is stored.
-* Categories:: Another way of classifying character syntax.
-
-Syntax Descriptors
-
-* Syntax Class Table:: Table of syntax classes.
-* Syntax Flags:: Additional flags each character can have.
-
-Parsing Expressions
-
-* Motion via Parsing:: Motion functions that work by parsing.
-* Position Parse:: Determining the syntactic state of a position.
-* Parser State:: How Emacs represents a syntactic state.
-* Low-Level Parsing:: Parsing across a specified region.
-* Control Parsing:: Parameters that affect parsing.
-
-Abbrevs and Abbrev Expansion
-
-* Abbrev Tables:: Creating and working with abbrev tables.
-* Defining Abbrevs:: Specifying abbreviations and their expansions.
-* Abbrev Files:: Saving abbrevs in files.
-* Abbrev Expansion:: Controlling expansion; expansion subroutines.
-* Standard Abbrev Tables:: Abbrev tables used by various major modes.
-* Abbrev Properties:: How to read and set abbrev properties.
- Which properties have which effect.
-* Abbrev Table Properties:: How to read and set abbrev table properties.
- Which properties have which effect.
-
-Processes
-
-* Subprocess Creation:: Functions that start subprocesses.
-* Shell Arguments:: Quoting an argument to pass it to a shell.
-* Synchronous Processes:: Details of using synchronous subprocesses.
-* Asynchronous Processes:: Starting up an asynchronous subprocess.
-* Deleting Processes:: Eliminating an asynchronous subprocess.
-* Process Information:: Accessing run-status and other attributes.
-* Input to Processes:: Sending input to an asynchronous subprocess.
-* Signals to Processes:: Stopping, continuing or interrupting
- an asynchronous subprocess.
-* Output from Processes:: Collecting output from an asynchronous subprocess.
-* Sentinels:: Sentinels run when process run-status changes.
-* Query Before Exit:: Whether to query if exiting will kill a process.
-* System Processes:: Accessing other processes running on your system.
-* Transaction Queues:: Transaction-based communication with subprocesses.
-* Network:: Opening network connections.
-* Network Servers:: Network servers let Emacs accept net connections.
-* Datagrams:: UDP network connections.
-* Low-Level Network:: Lower-level but more general function
- to create connections and servers.
-* Misc Network:: Additional relevant functions for
- network connections.
-* Serial Ports:: Communicating with serial ports.
-* Byte Packing:: Using bindat to pack and unpack binary data.
-
-Receiving Output from Processes
-
-* Process Buffers:: If no filter, output is put in a buffer.
-* Filter Functions:: Filter functions accept output from the process.
-* Decoding Output:: Filters can get unibyte or multibyte strings.
-* Accepting Output:: How to wait until process output arrives.
-
-Low-Level Network Access
-
-* Network Processes:: Using @code{make-network-process}.
-* Network Options:: Further control over network connections.
-* Network Feature Testing:: Determining which network features work on
- the machine you are using.
-
-Packing and Unpacking Byte Arrays
-
-* Bindat Spec:: Describing data layout.
-* Bindat Functions:: Doing the unpacking and packing.
-* Bindat Examples:: Samples of what bindat.el can do for you!
-
-Emacs Display
-
-* Refresh Screen:: Clearing the screen and redrawing everything on it.
-* Forcing Redisplay:: Forcing redisplay.
-* Truncation:: Folding or wrapping long text lines.
-* The Echo Area:: Displaying messages at the bottom of the screen.
-* Warnings:: Displaying warning messages for the user.
-* Invisible Text:: Hiding part of the buffer text.
-* Selective Display:: Hiding part of the buffer text (the old way).
-* Temporary Displays:: Displays that go away automatically.
-* Overlays:: Use overlays to highlight parts of the buffer.
-* Width:: How wide a character or string is on the screen.
-* Line Height:: Controlling the height of lines.
-* Faces:: A face defines a graphics style
- for text characters: font, colors, etc.
-* Fringes:: Controlling window fringes.
-* Scroll Bars:: Controlling vertical scroll bars.
-* Display Property:: Enabling special display features.
-* Images:: Displaying images in Emacs buffers.
-* Buttons:: Adding clickable buttons to Emacs buffers.
-* Abstract Display:: Emacs's Widget for Object Collections.
-* Blinking:: How Emacs shows the matching open parenthesis.
-* Character Display:: How Emacs displays individual characters.
-* Beeping:: Audible signal to the user.
-* Window Systems:: Which window system is being used.
-* Bidirectional Display:: Display of bidirectional scripts, such as
- Arabic and Farsi.
-
-The Echo Area
-
-* Displaying Messages:: Explicitly displaying text in the echo area.
-* Progress:: Informing user about progress of a long operation.
-* Logging Messages:: Echo area messages are logged for the user.
-* Echo Area Customization:: Controlling the echo area.
-
-Reporting Warnings
-
-* Warning Basics:: Warnings concepts and functions to report them.
-* Warning Variables:: Variables programs bind to customize
- their warnings.
-* Warning Options:: Variables users set to control display of warnings.
-* Delayed Warnings:: Deferring a warning until the end of a command.
-
-Overlays
-
-* Managing Overlays:: Creating and moving overlays.
-* Overlay Properties:: How to read and set properties.
- What properties do to the screen display.
-* Finding Overlays:: Searching for overlays.
-
-Faces
-
-* Defining Faces:: How to define a face.
-* Face Attributes:: What is in a face?
-* Attribute Functions:: Functions to examine and set face attributes.
-* Displaying Faces:: How Emacs combines the faces specified for
- a character.
-* Face Remapping:: Remapping faces to alternative definitions.
-* Face Functions:: How to define and examine faces.
-* Auto Faces:: Hook for automatic face assignment.
-* Basic Faces:: Faces that are defined by default.
-* Font Selection:: Finding the best available font for a face.
-* Font Lookup:: Looking up the names of available fonts
- and information about them.
-* Fontsets:: A fontset is a collection of fonts
- that handle a range of character sets.
-* Low-Level Font:: Lisp representation for character display fonts.
-
-Fringes
-
-* Fringe Size/Pos:: Specifying where to put the window fringes.
-* Fringe Indicators:: Displaying indicator icons in the window fringes.
-* Fringe Cursors:: Displaying cursors in the right fringe.
-* Fringe Bitmaps:: Specifying bitmaps for fringe indicators.
-* Customizing Bitmaps:: Specifying your own bitmaps to use in the fringes.
-* Overlay Arrow:: Display of an arrow to indicate position.
-
-The @code{display} Property
-
-* Replacing Specs:: Display specs that replace the text.
-* Specified Space:: Displaying one space with a specified width.
-* Pixel Specification:: Specifying space width or height in pixels.
-* Other Display Specs:: Displaying an image; adjusting the height,
- spacing, and other properties of text.
-* Display Margins:: Displaying text or images to the side of
- the main text.
-
-Images
-
-* Image Formats:: Supported image formats.
-* Image Descriptors:: How to specify an image for use in @code{:display}.
-* XBM Images:: Special features for XBM format.
-* XPM Images:: Special features for XPM format.
-* GIF Images:: Special features for GIF format.
-* TIFF Images:: Special features for TIFF format.
-* PostScript Images:: Special features for PostScript format.
-* Other Image Types:: Various other formats are supported.
-* Defining Images:: Convenient ways to define an image for later use.
-* Showing Images:: Convenient ways to display an image once
- it is defined.
-* Animated Images:: Some image formats can be animated.
-* Image Cache:: Internal mechanisms of image display.
-
-Buttons
-
-* Button Properties:: Button properties with special meanings.
-* Button Types:: Defining common properties for classes of buttons.
-* Making Buttons:: Adding buttons to Emacs buffers.
-* Manipulating Buttons:: Getting and setting properties of buttons.
-* Button Buffer Commands:: Buffer-wide commands and bindings for buttons.
-
-Abstract Display
-
-* Abstract Display Functions:: Functions in the Ewoc package.
-* Abstract Display Example:: Example of using Ewoc.
-
-Character Display
-
-* Usual Display:: The usual conventions for displaying characters.
-* Display Tables:: What a display table consists of.
-* Active Display Table:: How Emacs selects a display table to use.
-* Glyphs:: How to define a glyph, and what glyphs mean.
-* Glyphless Chars:: How glyphless characters are drawn.
-
-Operating System Interface
-
-* Starting Up:: Customizing Emacs startup processing.
-* Getting Out:: How exiting works (permanent or temporary).
-* 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
- calendrical data and vice versa.
-* Time Parsing:: Converting a time from numeric form to text
- and vice versa.
-* Processor Run Time:: Getting the run time used by Emacs.
-* Time Calculations:: Adding, subtracting, comparing times, etc.
-* Timers:: Setting a timer to call a function at a
- certain time.
-* Idle Timers:: Setting a timer to call a function when Emacs has
- been idle for a certain length of time.
-* Terminal Input:: Accessing and recording terminal input.
-* Terminal Output:: Controlling and recording terminal output.
-* Sound Output:: Playing sounds on the computer's speaker.
-* X11 Keysyms:: Operating on key symbols for X Windows.
-* Batch Mode:: Running Emacs without terminal interaction.
-* Session Management:: Saving and restoring state with
- X Session Management.
-* Notifications:: Desktop notifications.
-* Dynamic Libraries:: On-demand loading of support libraries.
-
-Preparing Lisp code for distribution
-
-* Packaging Basics:: The basic concepts of Emacs Lisp packages.
-* Simple Packages:: How to package a single .el file.
-* Multi-file Packages:: How to package multiple files.
-
-Starting Up Emacs
-
-* Startup Summary:: Sequence of actions Emacs performs at startup.
-* Init File:: Details on reading the init file.
-* Terminal-Specific:: How the terminal-specific Lisp file is read.
-* Command-Line Arguments:: How command-line arguments are processed,
- and how you can customize them.
-
-Getting Out of Emacs
-
-* Killing Emacs:: Exiting Emacs irreversibly.
-* Suspending Emacs:: Exiting Emacs reversibly.
-
-Terminal Input
-
-* Input Modes:: Options for how input is processed.
-* Recording Input:: Saving histories of recent or all input events.
-
-Tips and Conventions
-
-* Coding Conventions:: Conventions for clean and robust programs.
-* Key Binding Conventions:: Which keys should be bound by which programs.
-* Programming Tips:: Making Emacs code fit smoothly in Emacs.
-* Compilation Tips:: Making compiled code run fast.
-* Warning Tips:: Turning off compiler warnings.
-* Documentation Tips:: Writing readable documentation strings.
-* Comment Tips:: Conventions for writing comments.
-* Library Headers:: Standard headers for library packages.
-
-GNU Emacs Internals
-
-* Building Emacs:: How the dumped Emacs is made.
-* 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.
-* Object Internals:: Data formats of buffers, windows, processes.
-
-Object Internals
-
-* Buffer Internals:: Components of a buffer structure.
-* Window Internals:: Components of a window structure.
-* Process Internals:: Components of a process structure.
-@end detailmenu
-@end menu
-
-@c include intro.texi
-@c include objects.texi
-@c include numbers.texi
-@c include strings.texi
-
-@c include lists.texi
-@c include sequences.texi
-@c include hash.texi
-@c include symbols.texi
-@c include eval.texi
-
-@c include control.texi
-@c include variables.texi
-@c include functions.texi
-@c include macros.texi
-
-@c include customize.texi
-@c include loading.texi
-@c include compile.texi
-@c include advice.texi
-
-@c This includes edebug.texi.
-@c include debugging.texi
-@c include streams.texi
-@c include minibuf.texi
-@c include commands.texi
-
-@c include keymaps.texi
-@c include modes.texi
-@c include help.texi
-@c include files.texi
-
-@c include backups.texi
-
-@c ================ Beginning of Volume 2 ================
-@include buffers.texi
-@include windows.texi
-@include frames.texi
-
-@include positions.texi
-@include markers.texi
-@include text.texi
-@include nonascii.texi
-
-@include searching.texi
-@include syntax.texi
-@include abbrevs.texi
-@include processes.texi
-
-@include display.texi
-@include os.texi
-
-@c MOVE to Emacs Manual: include misc-modes.texi
-
-@c appendices
-
-@c REMOVE this: include non-hacker.texi
-
-@include anti.texi
-@include doclicense.texi
-@include gpl.texi
-@include tips.texi
-@include internals.texi
-@include errors.texi
-@include maps.texi
-@include hooks.texi
-
-@include index.texi
-
-@ignore
-@node New Symbols, , Index, Top
-@unnumbered New Symbols Since the Previous Edition
-
-@printindex tp
-@end ignore
-
-@bye
-
-
-These words prevent "local variables" above from confusing Emacs.
diff --git a/doc/lispref/windows.texi b/doc/lispref/windows.texi
index a9a25d8e867..094729033b1 100644
--- a/doc/lispref/windows.texi
+++ b/doc/lispref/windows.texi
@@ -49,7 +49,7 @@ is displayed in windows.
@section Basic Concepts of Emacs Windows
@cindex window
-A @dfn{window} is a area of the screen which is used to display a
+A @dfn{window} is a area of the screen that is used to display a
buffer (@pxref{Buffers}). In Emacs Lisp, windows are represented by a
special Lisp object type.
@@ -297,8 +297,8 @@ child of its parent.
The functions @code{window-next-sibling} and
@code{window-prev-sibling} should not be confused with the functions
-@code{next-window} and @code{previous-window} which respectively
-return the next and previous window in the cyclic ordering of windows
+@code{next-window} and @code{previous-window}, which return the next
+and previous window, respectively, in the cyclic ordering of windows
(@pxref{Cyclic Window Ordering}).
You can use the following functions to find the first live window on
@@ -376,7 +376,7 @@ line (@pxref{Mode Line Format}).
Emacs provides several functions for finding the height and width of
a window. Except where noted, Emacs reports window heights and widths
-as integer numbers of lines and columns respectively. On a graphical
+as integer numbers of lines and columns, respectively. On a graphical
display, each ``line'' and ``column'' actually corresponds to the
height and width of a ``default'' character specified by the frame's
default font. Thus, if a window is displaying text with a different
@@ -619,7 +619,7 @@ window.
The optional argument @var{max-height}, if non-@code{nil}, specifies
the maximum total height that this function can give @var{window}.
-The optional argument @var{min-height}, if no-@code{nil}, specifies
+The optional argument @var{min-height}, if non-@code{nil}, specifies
the minimum total height that it can give, which overrides the
variable @code{window-min-height}.
@@ -723,7 +723,7 @@ properties of the window selected within @var{window}'s frame.
The behavior of this function may be altered by the window parameters
of @var{window}, so long as the variable
-@code{ignore-window-parameters} is non-@code{nil}. If the value of
+@code{ignore-window-parameters} is @code{nil}. If the value of
the @code{split-window} window parameter is @code{t}, this function
ignores all other window parameters. Otherwise, if the value of the
@code{split-window} window parameter is a function, that function is
@@ -1062,7 +1062,7 @@ combination. @xref{Splitting Windows}.
The behavior of this function may be altered by the window parameters
of @var{window}, so long as the variable
-@code{ignore-window-parameters} is non-@code{nil}. If the value of
+@code{ignore-window-parameters} is @code{nil}. If the value of
the @code{delete-window} window parameter is @code{t}, this function
ignores all other window parameters. Otherwise, if the value of the
@code{delete-window} window parameter is a function, that function is
@@ -1079,7 +1079,7 @@ defaults to the selected window. The return value is @code{nil}.
The behavior of this function may be altered by the window parameters
of @var{window}, so long as the variable
-@code{ignore-window-parameters} is non-@code{nil}. If the value of
+@code{ignore-window-parameters} is @code{nil}. If the value of
the @code{delete-other-windows} window parameter is @code{t}, this
function ignores all other window parameters. Otherwise, if the value
of the @code{delete-other-windows} window parameter is a function,
@@ -1119,8 +1119,8 @@ means operate on that frame.
Note that this argument does not have the same meaning as in other
functions which scan all live windows (@pxref{Cyclic Window
-Ordering}). Specifically, the values @code{t} and @code{nil} have the
-opposite of their meanings in those other functions.
+Ordering}). Specifically, the meanings of @code{t} and @code{nil} here
+are the opposite of what they are in those other functions.
@end deffn
@node Selecting Windows
@@ -1171,11 +1171,11 @@ the buffer list.
This macro selects @var{window}, executes @var{forms} in sequence, then
restores the previously selected window and current buffer. The ordering
of recently selected windows and the buffer list remain unchanged unless
-you deliberately change them within @var{forms}, for example, by calling
+you deliberately change them within @var{forms}; for example, by calling
@code{select-window} with argument @var{norecord} @code{nil}.
-The order of recently selected windows and the buffer list are not
-changed by this macro.
+This macro does not change the order of recently selected windows or
+the buffer list.
@end defmac
@defun frame-selected-window &optional frame
@@ -1185,7 +1185,7 @@ within that frame. @var{frame} should be a live frame; if omitted or
@end defun
@defun set-frame-selected-window frame window &optional norecord
-This function makes @code{window} the window selected within the frame
+This function makes @var{window} the window selected within the frame
@var{frame}. @var{frame} should be a live frame; if omitted or
@code{nil}, it defaults to the selected frame. @var{window} should be
a live window; if omitted or @code{nil}, it defaults to the selected
@@ -1223,7 +1223,7 @@ the cyclic ordering of windows. @var{window} should be a live window;
if omitted or @code{nil}, it defaults to the selected window.
The optional argument @var{minibuf} specifies whether minibuffer windows
-shall be included in the cyclic ordering. Normally, when @var{minibuf}
+should be included in the cyclic ordering. Normally, when @var{minibuf}
is @code{nil}, a minibuffer window is included only if it is currently
``active''; this matches the behavior of @kbd{C-x o}. (Note that a
minibuffer window is active as long as its minibuffer is in use; see
@@ -1805,14 +1805,14 @@ desired buffer) or @code{nil} (which means the splitting failed).
@end defopt
@defun split-window-sensibly window
-This function tries to split @code{window}, and return the newly
-created window. If @code{window} cannot be split, it returns
+This function tries to split @var{window}, and return the newly
+created window. If @var{window} cannot be split, it returns
@code{nil}.
This function obeys the usual rules that determine when a window may
be split (@pxref{Splitting Windows}). It first tries to split by
placing the new window below, subject to the restriction imposed by
-@code{split-height-threshold} (see below) in addition to any other
+@code{split-height-threshold} (see below), in addition to any other
restrictions. If that fails, it tries to split by placing the new
window to the right, subject to @code{split-width-threshold} (see
below). If that fails, and the window is the only window on its
@@ -1944,7 +1944,7 @@ to display @var{buffer}.
If @var{args} is an alist, it specifies frame parameters for the new
frame. If @var{args} is a list whose @sc{car} is a symbol, then
-@code{(car @var{args})} is called as a function to actually create and
+@code{(car @var{args})} is a function to actually create and
set up the frame; it is called with @var{buffer} as first argument, and
@code{(cdr @var{args})} as additional arguments.
@@ -1962,7 +1962,7 @@ This variable holds frame parameters for
@defopt same-window-buffer-names
A list of buffer names for buffers that should be displayed in the
-selected window. If the buffer's name is in this list,
+selected window. If a buffer's name is in this list,
@code{display-buffer} handles the buffer by switching to it in the
selected window.
@end defopt
@@ -1997,8 +1997,8 @@ above.
@section Window History
@cindex window history
-Each window remembers the buffers it has displayed earlier and the order
-in which these buffers have been removed from it. This history is used,
+Each window remembers the buffers it has previously displayed, and the order
+in which these buffers were removed from it. This history is used,
for example, by @code{replace-buffer-in-windows} (@pxref{Buffers and
Windows}). This list is automatically maintained by Emacs, but you can
use the following functions to explicitly inspect or alter it:
@@ -2061,41 +2061,41 @@ This command displays the previous buffer in @var{window}. The
argument @var{window} should be a live window or @code{nil} (meaning
the selected window). If the optional argument @var{bury-or-kill} is
non-@code{nil}, this means that the buffer currently shown in
-@var{window} is about to be buried or killed and consequently shall
+@var{window} is about to be buried or killed and consequently should
not be switched to in future invocations of this command.
The previous buffer is usually the buffer shown before the buffer
currently shown in @var{window}. However, a buffer that has been buried
-or killed or has been already shown by a recent invocation of
-@code{switch-to-prev-buffer} does not qualify as previous buffer.
+or killed, or has been already shown by a recent invocation of
+@code{switch-to-prev-buffer}, does not qualify as previous buffer.
If repeated invocations of this command have already shown all buffers
previously shown in @var{window}, further invocations will show buffers
from the buffer list of the frame @var{window} appears on (@pxref{The
-Buffer List}) trying to skip buffers that are already shown in another
+Buffer List}), trying to skip buffers that are already shown in another
window on that frame.
@end deffn
@deffn Command switch-to-next-buffer &optional window
-This command switches to the next buffer in @var{window} thus undoing
+This command switches to the next buffer in @var{window}, thus undoing
the effect of the last @code{switch-to-prev-buffer} command in
@var{window}. The argument @var{window} must be a live window and
defaults to the selected one.
-If there is no recent invocation of a @code{switch-to-prev-buffer} that
+If there is no recent invocation of @code{switch-to-prev-buffer} that
can be undone, this function tries to show a buffer from the buffer list
of the frame @var{window} appears on (@pxref{The Buffer List}).
@end deffn
By default @code{switch-to-prev-buffer} and @code{switch-to-next-buffer}
can switch to a buffer that is already shown in another window on the
-same frame. The following option can be used to override that behavior.
+same frame. The following option can be used to override this behavior.
@defopt switch-to-visible-buffer
If this variable is non-@code{nil}, @code{switch-to-prev-buffer} and
@code{switch-to-next-buffer} may switch to a buffer that is already
-visible on the same frame, provided the buffer was shown in the argument
-window before. If it's @code{nil}, @code{switch-to-prev-buffer} and
+visible on the same frame, provided the buffer was shown in the relevant
+window before. If it is @code{nil}, @code{switch-to-prev-buffer} and
@code{switch-to-next-buffer} always try to avoid switching to a buffer
that is already visible in another window on the same frame.
@end defopt
@@ -2137,7 +2137,7 @@ another buffer in it and iconifies the frame.
This function returns non-@code{nil} if @var{window} is dedicated to its
buffer and @code{nil} otherwise. More precisely, the return value is
the value assigned by the last call of @code{set-window-dedicated-p} for
-@var{window} or @code{nil} if that function was never called with
+@var{window}, or @code{nil} if that function was never called with
@var{window} as its argument. The default for @var{window} is the
selected window.
@end defun
@@ -2158,20 +2158,20 @@ non-@code{nil} value.
@node Quitting Windows
@section Quitting Windows
-When you want to get rid of a window used for displaying a buffer you
+When you want to get rid of a window used for displaying a buffer, you
can call @code{delete-window} or @code{delete-windows-on}
(@pxref{Deleting Windows}) to remove that window from its frame. If the
buffer is shown on a separate frame, you might want to call
@code{delete-frame} (@pxref{Deleting Frames}) instead. If, on the other
hand, a window has been reused for displaying the buffer, you might
-prefer showing the buffer previously shown in that window by calling the
+prefer showing the buffer previously shown in that window, by calling the
function @code{switch-to-prev-buffer} (@pxref{Window History}).
Finally, you might want to either bury (@pxref{The Buffer List}) or kill
(@pxref{Killing Buffers}) the window's buffer.
The following function uses information on how the window for
-displaying the buffer was obtained in the first place thus attempting to
-automatize the above decisions for you.
+displaying the buffer was obtained in the first place, thus attempting to
+automate the above decisions for you.
@deffn Command quit-window &optional kill window
This command quits @var{window} and buries its buffer. The argument
@@ -2199,39 +2199,39 @@ restore the original height of @var{window}.
The three cases described so far require that the buffer shown in
@var{window} is still the buffer displayed by the last buffer display
function for this window. If another buffer has been shown in the
-meantime or the buffer previously shown no longer exists, this command
+meantime, or the buffer previously shown no longer exists, this command
calls @code{switch-to-prev-buffer} (@pxref{Window History}) to show some
other buffer instead.
@end deffn
The function @code{quit-window} bases its decisions on information
stored in @var{window}'s @code{quit-restore} window parameter
-(@pxref{Window Parameters}) and resets that parameter to @code{nil}
+(@pxref{Window Parameters}), and resets that parameter to @code{nil}
after it's done.
The following option specifies how to deal with a frame containing just
-one window that shall be either quit or whose buffer shall be buried.
+one window that should be either quit, or whose buffer should be buried.
@defopt frame-auto-hide-function
The function specified by this option is called to automatically hide
-frames. This function is called with one argument - a frame.
+frames. This function is called with one argument---a frame.
The function specified here is called by @code{bury-buffer} (@pxref{The
Buffer List}) when the selected window is dedicated and shows the buffer
-that shall be buried. It is also called by @code{quit-window} (see
-above) when the frame of the window that shall be quit has been
+that should be buried. It is also called by @code{quit-window} (see
+above) when the frame of the window that should be quit has been
specially created for displaying that window's buffer and the buffer
-shall be buried.
+should be buried.
The default is to call @code{iconify-frame} (@pxref{Visibility of
-Frames}). Alternatively, you may either specify @code{delete-frame}
+Frames}). Alternatively, you may specify either @code{delete-frame}
(@pxref{Deleting Frames}) to remove the frame from its display,
@code{ignore} to leave the frame unchanged, or any other function that
can take a frame as its sole argument.
Note that the function specified by this option is called if and only if
-there's at least one other frame on the terminal of the frame it's
-supposed to handle and that frame contains only one live window.
+there is at least one other frame on the terminal of the frame it's
+supposed to handle, and that frame contains only one live window.
@end defopt
@@ -2321,14 +2321,7 @@ command to a key.
@cindex window top line
This function returns the display-start position of window
@var{window}. If @var{window} is @code{nil}, the selected window is
-used. For example,
-
-@example
-@group
-(window-start)
- @result{} 7058
-@end group
-@end example
+used.
When you create a window, or display a different buffer in it, the
display-start position is set to a display-start position recently used
@@ -2340,9 +2333,6 @@ it explicitly since the previous redisplay)---to make sure point appears
on the screen. Nothing except redisplay automatically changes the
window-start position; if you move point, do not expect the window-start
position to change in response until after the next redisplay.
-
-For a realistic example of using @code{window-start}, see the
-description of @code{count-lines}. @xref{Definition of count-lines}.
@end defun
@cindex window end position
@@ -2516,12 +2506,16 @@ commands move the paper up and down. Thus, if you are looking at the
middle of a buffer and repeatedly call @code{scroll-down}, you will
eventually see the beginning of the buffer.
- Some people have urged that the opposite convention be used: they
+ Unfortunately, this sometimes causes confusion, because some people
+tend to think in terms of the opposite convention: they
imagine the window moving over text that remains in place, so that
``down'' commands take you to the end of the buffer. This convention
is consistent with fact that such a command is bound to a key named
-@key{PageDown} on modern keyboards. We have not switched to this
-convention as that is likely to break existing Emacs Lisp code.
+@key{PageDown} on modern keyboards.
+@ignore
+We have not switched to this convention as that is likely to break
+existing Emacs Lisp code.
+@end ignore
Textual scrolling functions (aside from @code{scroll-other-window})
have unpredictable results if the current buffer is not the one
@@ -2551,13 +2545,8 @@ signals an error. Otherwise, it returns @code{nil}.
This function scrolls backward by @var{count} lines in the selected
window.
-If @var{count} is negative, it scrolls forward instead. If
-@var{count} is omitted or @code{nil}, the distance scrolled is
-@code{next-screen-context-lines} lines less than the height of the
-window's text area.
-
-If the selected window cannot be scrolled any further, this function
-signals an error. Otherwise, it returns @code{nil}.
+If @var{count} is negative, it scrolls forward instead. In other
+respects, it behaves the same way as @code{scroll-up} does.
@end deffn
@deffn Command scroll-up-command &optional count
@@ -2587,8 +2576,8 @@ already displayed, @code{scroll-other-window} displays it in some
window.
When the selected window is the minibuffer, the next window is normally
-the one at the top left corner. You can specify a different window to
-scroll, when the minibuffer is selected, by setting the variable
+the leftmost one immediately above it. You can specify a different
+window to scroll, when the minibuffer is selected, by setting the variable
@code{minibuffer-scroll-window}. This variable has no effect when any
other window is selected. When it is non-@code{nil} and the
minibuffer is selected, it takes precedence over
@@ -2600,7 +2589,7 @@ window is the one at the bottom right corner. In this case,
@code{scroll-other-window} attempts to scroll the minibuffer. If the
minibuffer contains just one line, it has nowhere to scroll to, so the
line reappears after the echo area momentarily displays the message
-@samp{Beginning of buffer}.
+@samp{End of buffer}.
@end deffn
@defvar other-window-scroll-buffer
@@ -2699,12 +2688,12 @@ If @var{count} is a non-negative number, that puts the line containing
point @var{count} lines down from the top of the window. If
@var{count} is a negative number, then it counts upward from the
bottom of the window, so that @minus{}1 stands for the last usable
-line in the window. If @var{count} is a non-@code{nil} list, then it
-stands for the line in the middle of the window.
+line in the window.
-If @var{count} is @code{nil}, @code{recenter} puts the line containing
-point in the middle of the window, then clears and redisplays the entire
-selected frame.
+If @var{count} is @code{nil} (or a non-@code{nil} list),
+@code{recenter} puts the line containing point in the middle of the
+window. If @var{count} is @code{nil}, this function may redraw the
+frame, according to the value of @code{recenter-redisplay}.
When @code{recenter} is called interactively, @var{count} is the raw
prefix argument. Thus, typing @kbd{C-u} as the prefix sets the
@@ -2713,22 +2702,32 @@ prefix argument. Thus, typing @kbd{C-u} as the prefix sets the
top.
With an argument of zero, @code{recenter} positions the current line at
-the top of the window. This action is so handy that some people make a
-separate key binding to do this. For example,
+the top of the window. The command @code{recenter-top-bottom} offers
+a more convenient way to achieve this.
+@end deffn
-@example
-@group
-(defun line-to-top-of-window ()
- "Scroll current line to top of window.
-Replaces three keystroke sequence C-u 0 C-l."
- (interactive)
- (recenter 0))
+@defopt recenter-redisplay
+If this variable is non-@code{nil}, calling @code{recenter} with a
+@code{nil} argument redraws the frame. The default value is
+@code{tty}, which means only redraw the frame if it is a tty frame.
+@end defopt
-(global-set-key [kp-multiply] 'line-to-top-of-window)
-@end group
-@end example
+@deffn Command recenter-top-bottom &optional count
+This command, which is the default binding for @kbd{C-l}, acts like
+@code{recenter}, except if called with no argument. In that case,
+successive calls place point according to the cycling order defined
+by the variable @code{recenter-positions}.
@end deffn
+@defopt recenter-positions
+This variable controls how @code{recenter-top-bottom} behaves when
+called with no argument. The default value is @code{(middle top
+bottom)}, which means that successive calls of
+@code{recenter-top-bottom} with no argument cycle between placing
+point at the middle, top, and bottom of the window.
+@end defopt
+
+
@node Vertical Scrolling
@section Vertical Fractional Scrolling
@cindex vertical fractional scrolling
@@ -2817,8 +2816,8 @@ times the normal character width. How many characters actually
disappear off to the left depends on their width, and could vary from
line to line.
- Because we read from side to side in the ``inner loop,'' and from top
-to bottom in the ``outer loop,'' the effect of horizontal scrolling is
+ Because we read from side to side in the ``inner loop'', and from top
+to bottom in the ``outer loop'', the effect of horizontal scrolling is
not like that of textual or vertical scrolling. Textual scrolling
involves selection of a portion of text to display, and vertical
scrolling moves the window contents contiguously; but horizontal
@@ -3014,7 +3013,7 @@ frame.
@defun coordinates-in-window-p coordinates window
This function checks whether a window @var{window} occupies the
-frame-relative coordinates @var{coordinates}, and if so which part of
+frame-relative coordinates @var{coordinates}, and if so, which part of
the window that is. @var{window} should be a live window.
@var{coordinates} should be a cons cell of the form @code{(@var{x}
. @var{y})}, where @var{x} and @var{y} are frame-relative coordinates.
@@ -3112,14 +3111,14 @@ for the current buffer.
You can bring back an entire frame layout by restoring a previously
saved window configuration. If you want to record the layout of all
frames instead of just one, use a frame configuration instead of a
-window configuration; see @ref{Frame Configurations}.
+window configuration. @xref{Frame Configurations}.
@defun current-window-configuration &optional frame
This function returns a new object representing @var{frame}'s current
window configuration. The default for @var{frame} is the selected
frame. The variable @code{window-persistent-parameters} specifies
-whether and which window parameters are saved by this function, see
-@ref{Window Parameters} for details.
+which window parameters (if any) are saved by this function.
+@xref{Window Parameters}.
@end defun
@defun set-window-configuration configuration
@@ -3136,9 +3135,9 @@ change and triggers execution of the @code{window-size-change-functions}
know how to tell whether the new configuration actually differs from the
old one.
-If the frame which @var{configuration} was saved from is dead, all this
+If the frame from which @var{configuration} was saved is dead, all this
function does is restore the three variables @code{window-min-height},
-@code{window-min-width} and @code{minibuffer-scroll-window}. In this
+@code{window-min-width} and @code{minibuffer-scroll-window}. In this
case, the function returns @code{nil}. Otherwise, it returns @code{t}.
Here is a way of using this function to get the same effect
@@ -3221,8 +3220,8 @@ configurations.
The objects returned by @code{current-window-configuration} die
together with the Emacs process. In order to store a window
-configuration on disk and read it back in another Emacs session, the
-functions described next can be used. These functions are also useful
+configuration on disk and read it back in another Emacs session, you
+can use the functions described next. These functions are also useful
to clone the state of a frame into an arbitrary live window
(@code{set-window-configuration} effectively clones the windows of a
frame into the root window of that very frame only).
@@ -3235,17 +3234,17 @@ of the selected frame.
If the optional argument @var{writable} is non-@code{nil}, this means to
not use markers for sampling positions like @code{window-point} or
@code{window-start}. This argument should be non-@code{nil} when the
-state shall be written to disk and read back in another session.
+state will be written to disk and read back in another session.
Together, the argument @var{writable} and the variable
@code{window-persistent-parameters} specify which window parameters are
-saved by this function, see @ref{Window Parameters} for details.
+saved by this function. @xref{Window Parameters}.
@end defun
The value returned by @code{window-state-get} can be used in the same
session to make a clone of a window in another window. It can be also
written to disk and read back in another session. In either case, use
-the function described next to restore the state of the window.
+the following function to restore the state of the window.
@defun window-state-put state &optional window ignore
This function puts the window state @var{state} into @var{window}. The
@@ -3254,9 +3253,9 @@ earlier invocation of @code{window-state-get}, see above. The optional
argument @var{window} must specify a live window and defaults to the
selected one.
-The optional argument @var{ignore} non-@code{nil} means to ignore
-minimum window sizes and fixed size restrictions. If @var{ignore}
-equals @code{safe}, this means windows can get as small as one line
+If the optional argument @var{ignore} is non-@code{nil}, it means to ignore
+minimum window sizes and fixed-size restrictions. If @var{ignore}
+is @code{safe}, this means windows can get as small as one line
and/or two columns.
@end defun
@@ -3276,8 +3275,8 @@ setting for @var{parameter}, this function returns @code{nil}.
@defun window-parameters &optional window
This function returns all parameters of @var{window} and their values.
-The default for @var{window} is the selected window. The return value,
-if non-@code{nil} is an association list whose elements have the form
+The default for @var{window} is the selected window. The return value
+is either @code{nil}, or an association list whose elements have the form
@code{(@var{parameter} . @var{value})}.
@end defun
@@ -3287,34 +3286,34 @@ This function sets @var{window}'s value of @var{parameter} to
is the selected window.
@end defun
-By default, functions saving and restoring window configurations or the
+By default, the functions that save and restore window configurations or the
states of windows (@pxref{Window Configurations}) do not care about
-window parameters. This means, that when you change the value of a
+window parameters. This means that when you change the value of a
parameter within the body of a @code{save-window-excursion}, the
-previous value is not restored upon exit of that macro. It also means
+previous value is not restored when that macro exits. It also means
that when you restore via @code{window-state-put} a window state saved
earlier by @code{window-state-get}, all cloned windows have their
-parameters reset to @code{nil}. The following variable allows to
-override the standard behavior.
+parameters reset to @code{nil}. The following variable allows you to
+override the standard behavior:
@defvar window-persistent-parameters
This variable is an alist specifying which parameters get saved by
-@code{current-window-configuration} and @code{window-state-get} and
+@code{current-window-configuration} and @code{window-state-get}, and
subsequently restored by @code{set-window-configuration} and
-@code{window-state-put}, see @ref{Window Configurations}.
+@code{window-state-put}. @xref{Window Configurations}.
-The @sc{car} of each entry of this alist is the symbol specifying the
+The @sc{car} of each entry of this alist is a symbol specifying the
parameter. The @sc{cdr} should be one of the following:
@table @asis
@item @code{nil}
-This value means the parameter is neither saved by
+This value means the parameter is saved neither by
@code{window-state-get} nor by @code{current-window-configuration}.
@item @code{t}
This value specifies that the parameter is saved by
-@code{current-window-configuration} and, provided its @var{writable}
-argument is @code{nil}, by @code{window-state-get}.
+@code{current-window-configuration} and (provided its @var{writable}
+argument is @code{nil}) by @code{window-state-get}.
@item @code{writable}
This means that the parameter is saved unconditionally by both
@@ -3325,8 +3324,8 @@ may fail with an @code{invalid-read-syntax} error.
@end table
@end defvar
-Some functions, notably @code{delete-window},
-@code{delete-other-windows} and @code{split-window} may behave specially
+Some functions (notably @code{delete-window},
+@code{delete-other-windows} and @code{split-window}), may behave specially
when their @var{window} argument has a parameter set. You can override
such special behavior by binding the following variable to a
non-@code{nil} value:
@@ -3334,7 +3333,7 @@ non-@code{nil} value:
@defvar ignore-window-parameters
If this variable is non-@code{nil}, some standard functions do not
process window parameters. The functions currently affected by this are
-@code{split-window}, @code{delete-window}, @code{delete-other-windows}
+@code{split-window}, @code{delete-window}, @code{delete-other-windows},
and @code{other-window}.
An application can bind this variable to a non-@code{nil} value around
@@ -3368,18 +3367,19 @@ This parameter marks the window as not selectable by @code{other-window}
(@pxref{Cyclic Window Ordering}).
@item @code{clone-of}
-This parameter specifies the window this one has been cloned from and is
-installed by @code{window-state-get}, see @ref{Window Configurations}.
+This parameter specifies the window that this one has been cloned
+from. It is installed by @code{window-state-get} (@pxref{Window
+Configurations}).
@item @code{quit-restore}
-This parameter tells how to proceed with a window when the buffer it
-shows is no more needed. It is installed by the buffer display
-functions (@pxref{Choosing Window}) and consulted by the function
+This parameter specifies what to do with a window when the buffer it
+shows is not needed any more. It is installed by the buffer display
+functions (@pxref{Choosing Window}), and consulted by the function
@code{quit-window} (@pxref{Quitting Windows}).
@end table
-In addition, the parameters @code{window-atom} and @code{window-side}
-are reserved and should not be used by applications.
+There are additional parameters @code{window-atom} and @code{window-side};
+these are reserved and should not be used by applications.
@node Window Hooks
@@ -3401,7 +3401,7 @@ the window also runs these functions.
This variable is not a normal hook, because each function is called with
two arguments: the window, and its new display-start position.
-These functions must be careful in using @code{window-end}
+These functions must take care when using @code{window-end}
(@pxref{Window Start and End}); if you need an up-to-date value, you
must use the @var{update} argument to ensure you get it.
@@ -3439,7 +3439,7 @@ of an existing frame. This includes splitting or deleting windows,
changing the sizes of windows, or displaying a different buffer in a
window.
-The buffer-local part of this hook is run once per each window on the
+The buffer-local part of this hook is run once for each window on the
affected frame, with the relevant window selected and its buffer
current. The global part is run once for the modified frame, with that
frame selected.
diff --git a/doc/misc/ChangeLog b/doc/misc/ChangeLog
index 14f389044bb..a10f65b085c 100644
--- a/doc/misc/ChangeLog
+++ b/doc/misc/ChangeLog
@@ -1,3 +1,93 @@
+2012-05-19 Jay Belanger <jay.p.belanger@gmail.com>
+
+ * doc/misc/calc.texi
+ (Basic Operations on Units, Customizing Calc):
+ Mention `calc-ensure-consistent-units'.
+
+2012-05-14 Andreas Schwab <schwab@linux-m68k.org>
+
+ * cc-mode.texi: Avoid space before macro in 4th argument of cross
+ reference commands. (Bug#11461)
+
+ * Makefile.in (gnus.dvi): Use $@ instead of $*.dvi.
+
+2012-05-12 Glenn Morris <rgm@gnu.org>
+
+ * Makefile.in (mostlyclean): Add more TeX intermediates.
+
+ * Makefile.in: Make it look more like the other doc Makefiles.
+ Use explicit $srcdir in all dependencies.
+ Remove cd $srcdir from rules.
+ (VPATH): Remove.
+ (infodir): Set to an absolute path.
+ (INFO_TARGETS): Use short names.
+ (mkinfodir): infodir is now absolute.
+ (echo-info, maintainer-clean): Update for new format of INFO_TARGETS.
+
+ * Makefile.in (info.info): Rename from info, to avoid duplication.
+ (.SUFFIXES): Disable implicit rules.
+
+ * Makefile.in (MKDIR_P): New, set by configure.
+ (mkinfodir): Use $MKDIR_P.
+
+2012-05-07 Glenn Morris <rgm@gnu.org>
+
+ * forms.texi (Long Example): Update for changed location of files.
+
+2012-05-04 Glenn Morris <rgm@gnu.org>
+
+ * Makefile.in (INFO_EXT, INFO_OPTS): New, set by configure.
+ (INFO_TARGETS): Use $INFO_EXT.
+ Make all rules generating info files use $INFO_EXT, $INFO_OPT, and -o.
+ * makefile.w32-in (INFO_EXT, INFO_OPTS): New.
+ (INFO_TARGETS): Use $INFO_EXT.
+ Make all rules generating info files use $INFO_EXT, $INFO_OPT, and -o.
+
+2012-05-02 Glenn Morris <rgm@gnu.org>
+
+ * Makefile.in (echo-info): New phony target, used by top-level.
+
+ * viper.texi: Make direntry shorter (also it is no longer "newest").
+
+ * emacs-gnutls.texi, ert.texi, org.texi:
+ Fix dircategory, direntry to match info/dir.
+
+ * faq.texi: Convert @inforefs to @xrefs.
+ Fix some malformed cross-references.
+ (File-name conventions): Shorten section name to avoid overfull line.
+ (How to add fonts): Use smallexample to avoid overfull lines.
+
+2012-05-01 Teodor Zlatanov <tzz@lifelogs.com>
+
+ * auth.texi (Help for users): Update for .gpg file being second.
+
+2012-04-27 Ippei Furuhashi <top.tuna+orgmode@gmail.com> (tiny change)
+
+ * org.texi (Agenda commands): Fix two typos: give corresponding
+ function names, according to `org-agenda-view-mode-dispatch'.
+
+2012-04-27 Glenn Morris <rgm@gnu.org>
+
+ * faq.texi (Major packages and programs): Remove section.
+ There is no point listing 6 packages (cf etc/MORE.STUFF).
+ (Finding Emacs and related packages): Move "Spell-checkers" here.
+
+2012-04-22 Michael Albinus <michael.albinus@gmx.de>
+
+ * dbus.texi (Version): New node.
+ (Properties and Annotations): Mention the object manager
+ interface. Describe dbus-get-all-managed-objects.
+ (Type Conversion): Floating point numbers are allowed, if an
+ anteger does not fit Emacs's integer range.
+ (Synchronous Methods): Remove obsolete dbus-call-method-non-blocking.
+ (Asynchronous Methods): Fix description of
+ dbus-call-method-asynchronously.
+ (Receiving Method Calls): Fix some minor errors. Add
+ dbus-interface-emacs.
+ (Signals): Describe unicast signals and the new match rules.
+ (Alternative Buses): Add the PRIVATE optional argument to
+ dbus-init-bus. Describe its new return value. Add dbus-setenv.
+
2012-04-20 Glenn Morris <rgm@gnu.org>
* faq.texi (New in Emacs 24): New section.
@@ -552,7 +642,7 @@
* mh-e.texi (VERSION, EDITION, UPDATED, UPDATE-MONTH): Update for
release 8.3.
(Preface): Updated support information.
- (From Bill Wohler): Reset text to original version. As a
+ (From Bill Wohler): Reset text to original version. As a
historical quote, the tense should be correct in the time that it
was written.
@@ -569,11 +659,11 @@
2011-08-15 Suvayu Ali <fatkasuvayu+linux@gmail.com> (tiny change)
- * org.texi (Images in LaTeX export): rewrite.
+ * org.texi (Images in LaTeX export): Rewrite.
2011-08-15 Bastien Guerry <bzg@gnu.org>
- * org.texi (Using the mapping API): mention 'region as a possible
+ * org.texi (Using the mapping API): Mention 'region as a possible
scope for `org-map-entries'.
2011-08-15 Carsten Dominik <carsten.dominik@gmail.com>
@@ -582,7 +672,7 @@
2011-08-15 Bastien Guerry <bzg@gnu.org>
- * org.texi (Template expansion): order template sequences in the
+ * org.texi (Template expansion): Order template sequences in the
proper order.
2011-08-15 Eric Schulte <schulte.eric@gmail.com>
@@ -596,11 +686,11 @@
2011-08-15 Achim Gratz <stromeko@nexgo.de>
- * org.texi: document that both CLOCK_INTO_DRAWER and
+ * org.texi: Document that both CLOCK_INTO_DRAWER and
LOG_INTO_DRAWER can be used to override the contents of variable
org-clock-into-drawer (or if unset, org-log-into-drawer).
- * org.texi: replace @xref->@pxref.
+ * org.texi: Replace @xref->@pxref.
2011-08-15 Eric Schulte <schulte.eric@gmail.com>
@@ -624,7 +714,7 @@
2011-08-15 Eric Schulte <schulte.eric@gmail.com>
- * org.texi (Structure of code blocks): explicitly state that the
+ * org.texi (Structure of code blocks): Explicitly state that the
behavior of multiple blocks of the same name is undefined
2011-08-15 Christian Egli <christian.egli@sbszh.ch>
@@ -748,7 +838,7 @@
2011-08-15 Bastien Guerry <bzg@gnu.org>
- * org.texi (LaTeX and PDF export): add a note about a limitation
+ * org.texi (LaTeX and PDF export): Add a note about a limitation
of the LaTeX export: the org file has to be properly structured.
2011-08-15 Bastien Guerry <bzg@gnu.org>
@@ -1558,7 +1648,7 @@
2010-11-11 Eric Schulte <schulte.eric@gmail.com>
- * org.texi: multi-line header arguments :PROPERTIES: :ID:
+ * org.texi: Multi-line header arguments :PROPERTIES: :ID:
b77c8857-6c76-4ea9-8a61-ddc2648d96c4 :END:.
2010-11-11 Carsten Dominik <carsten.dominik@gmail.com>
@@ -8937,7 +9027,7 @@
;; coding: utf-8
;; End:
- Copyright (C) 1993-1999, 2001-2012 Free Software Foundation, Inc.
+ Copyright (C) 1993-1999, 2001-2012 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/doc/misc/Makefile.in b/doc/misc/Makefile.in
index 390b077bbb0..c3bbfbb02ad 100644
--- a/doc/misc/Makefile.in
+++ b/doc/misc/Makefile.in
@@ -24,77 +24,31 @@ SHELL = /bin/sh
# set by the configure script's `--srcdir' option.
srcdir=@srcdir@
-# Tell make where to find source files; this is needed for the makefiles.
-# Note the other doc Makefiles do not use VPATH anymore, instead
-# they set infodir to an absolute path. Not doing that here in
-# case INFO_TARGETS gets too long for some feeble shells.
-# (cf src/Makefile.in's passing of $lisp to make-docfile)
-VPATH=@srcdir@
-
## Where the output files go.
-## Note that the setfilename command in the .texi files assumes this.
-infodir=../../info
+infodir = $(srcdir)/../../info
## Directory with emacsver.texi.
## Currently only used by efaq and calc.
emacsdir = $(srcdir)/../emacs
+MKDIR_P = @MKDIR_P@
+
+INFO_EXT=@INFO_EXT@
+# Options used only when making info output.
+INFO_OPTS=@INFO_OPTS@
+
# The makeinfo program is part of the Texinfo distribution.
# Use --force so that it generates output even if there are errors.
MAKEINFO = @MAKEINFO@
MAKEINFO_OPTS = --force -I$(emacsdir)
-# Also add new entries to INFO_FILES in the top-level Makefile.in.
-INFO_TARGETS = \
- $(infodir)/ada-mode \
- $(infodir)/auth \
- $(infodir)/autotype \
- $(infodir)/calc \
- $(infodir)/ccmode \
- $(infodir)/cl \
- $(infodir)/dbus \
- $(infodir)/dired-x \
- $(infodir)/ebrowse \
- $(infodir)/ede \
- $(infodir)/ediff \
- $(infodir)/edt \
- $(infodir)/eieio \
- $(infodir)/emacs-mime \
- $(infodir)/epa \
- $(infodir)/erc \
- $(infodir)/ert \
- $(infodir)/eshell \
- $(infodir)/eudc \
- $(infodir)/efaq \
- $(infodir)/flymake \
- $(infodir)/forms \
- $(infodir)/gnus \
- $(infodir)/emacs-gnutls \
- $(infodir)/idlwave \
- $(infodir)/info \
- $(infodir)/mairix-el \
- $(infodir)/message \
- $(infodir)/mh-e \
- $(infodir)/newsticker \
- $(infodir)/nxml-mode \
- $(infodir)/org \
- $(infodir)/pcl-cvs \
- $(infodir)/pgg \
- $(infodir)/rcirc \
- $(infodir)/remember \
- $(infodir)/reftex \
- $(infodir)/sasl \
- $(infodir)/sc \
- $(infodir)/semantic \
- $(infodir)/ses \
- $(infodir)/sieve \
- $(infodir)/smtpmail \
- $(infodir)/speedbar \
- $(infodir)/tramp \
- $(infodir)/url \
- $(infodir)/vip \
- $(infodir)/viper \
- $(infodir)/widget \
- $(infodir)/woman
+INFO_TARGETS = ada-mode auth autotype calc ccmode cl \
+ dbus dired-x ebrowse ede ediff edt eieio \
+ emacs-mime epa erc ert eshell eudc efaq \
+ flymake forms gnus emacs-gnutls idlwave info.info \
+ mairix-el message mh-e newsticker nxml-mode \
+ org pcl-cvs pgg rcirc remember reftex sasl \
+ sc semantic ses sieve smtpmail speedbar tramp \
+ url vip viper widget woman
DVI_TARGETS = \
ada-mode.dvi \
@@ -208,12 +162,21 @@ TEXI2PDF = texi2pdf
ENVADD = TEXINPUTS="$(srcdir):$(emacsdir):$(TEXINPUTS)" \
MAKEINFO="$(MAKEINFO) $(MAKEINFO_OPTS)"
-mkinfodir = @cd ${srcdir}; test -d ${infodir} || mkdir ${infodir} || test -d ${infodir}
+mkinfodir = @${MKDIR_P} ${infodir}
-.PHONY: info dvi pdf
+.PHONY: info dvi pdf echo-info
+## Prevent implicit rule triggering for foo.info.
+.SUFFIXES:
+# Default.
info: $(INFO_TARGETS)
+## Used by top-level Makefile.
+## Base file names of output info files.
+echo-info:
+ @echo "$(INFO_TARGETS) " | \
+ sed -e 's|[^ ]*/||g' -e 's/\.info//g' -e "s/ /$(INFO_EXT) /g"
+
# please modify this for all the web manual targets
webhack: clean
$(MAKE) pdf MAKEINFO_OPTS="-DWEBHACKDEVEL $(MAKEINFO_OPTS)"
@@ -222,198 +185,196 @@ dvi: $(DVI_TARGETS)
pdf: $(PDF_TARGETS)
-# Note that all the Info targets build the Info files
-# in srcdir. There is no provision for Info files
-# to exist in the build directory.
+# Note that all the Info targets build the Info files in srcdir.
+# There is no provision for Info files to exist in the build directory.
# In a distribution of Emacs, the Info files should be up to date.
# Note: "<" is not portable in ordinary make rules.
-## "short" target names for convenience, to just rebuild one manual.
-ada-mode : $(infodir)/ada-mode
-$(infodir)/ada-mode: ada-mode.texi
+ada-mode : $(infodir)/ada-mode$(INFO_EXT)
+$(infodir)/ada-mode$(INFO_EXT): ${srcdir}/ada-mode.texi
$(mkinfodir)
- cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) ada-mode.texi
+ $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ ${srcdir}/ada-mode.texi
ada-mode.dvi: ${srcdir}/ada-mode.texi
$(ENVADD) $(TEXI2DVI) ${srcdir}/ada-mode.texi
ada-mode.pdf: ${srcdir}/ada-mode.texi
$(ENVADD) $(TEXI2PDF) ${srcdir}/ada-mode.texi
-auth : $(infodir)/auth
-$(infodir)/auth: auth.texi
+auth : $(infodir)/auth$(INFO_EXT)
+$(infodir)/auth$(INFO_EXT): ${srcdir}/auth.texi
$(mkinfodir)
- cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) auth.texi
+ $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ ${srcdir}/auth.texi
auth.dvi: ${srcdir}/auth.texi
$(ENVADD) $(TEXI2DVI) ${srcdir}/auth.texi
auth.pdf: ${srcdir}/auth.texi
$(ENVADD) $(TEXI2PDF) ${srcdir}/auth.texi
-autotype : $(infodir)/autotype
-$(infodir)/autotype: autotype.texi
+autotype : $(infodir)/autotype$(INFO_EXT)
+$(infodir)/autotype$(INFO_EXT): ${srcdir}/autotype.texi
$(mkinfodir)
- cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) autotype.texi
+ $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ ${srcdir}/autotype.texi
autotype.dvi: ${srcdir}/autotype.texi
$(ENVADD) $(TEXI2DVI) ${srcdir}/autotype.texi
autotype.pdf: ${srcdir}/autotype.texi
$(ENVADD) $(TEXI2PDF) ${srcdir}/autotype.texi
-calc : $(infodir)/calc
-$(infodir)/calc: calc.texi $(emacsdir)/emacsver.texi
+calc : $(infodir)/calc$(INFO_EXT)
+$(infodir)/calc$(INFO_EXT): ${srcdir}/calc.texi $(emacsdir)/emacsver.texi
$(mkinfodir)
- cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) calc.texi
+ $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ ${srcdir}/calc.texi
calc.dvi: ${srcdir}/calc.texi $(emacsdir)/emacsver.texi
$(ENVADD) $(TEXI2DVI) ${srcdir}/calc.texi
calc.pdf: ${srcdir}/calc.texi $(emacsdir)/emacsver.texi
$(ENVADD) $(TEXI2PDF) ${srcdir}/calc.texi
-ccmode : $(infodir)/ccmode
-$(infodir)/ccmode: cc-mode.texi
+ccmode : $(infodir)/ccmode$(INFO_EXT)
+$(infodir)/ccmode$(INFO_EXT): ${srcdir}/cc-mode.texi
$(mkinfodir)
- cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) cc-mode.texi
+ $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ ${srcdir}/cc-mode.texi
cc-mode.dvi: ${srcdir}/cc-mode.texi
$(ENVADD) $(TEXI2DVI) ${srcdir}/cc-mode.texi
cc-mode.pdf: ${srcdir}/cc-mode.texi
$(ENVADD) $(TEXI2PDF) ${srcdir}/cc-mode.texi
-cl : $(infodir)/cl
-$(infodir)/cl: cl.texi
+cl : $(infodir)/cl$(INFO_EXT)
+$(infodir)/cl$(INFO_EXT): ${srcdir}/cl.texi
$(mkinfodir)
- cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) cl.texi
+ $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ ${srcdir}/cl.texi
cl.dvi: ${srcdir}/cl.texi
$(ENVADD) $(TEXI2DVI) ${srcdir}/cl.texi
cl.pdf: ${srcdir}/cl.texi
$(ENVADD) $(TEXI2PDF) ${srcdir}/cl.texi
-dbus : $(infodir)/dbus
-$(infodir)/dbus: dbus.texi
+dbus : $(infodir)/dbus$(INFO_EXT)
+$(infodir)/dbus$(INFO_EXT): ${srcdir}/dbus.texi
$(mkinfodir)
- cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) dbus.texi
+ $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ ${srcdir}/dbus.texi
dbus.dvi: ${srcdir}/dbus.texi
$(ENVADD) $(TEXI2DVI) ${srcdir}/dbus.texi
dbus.pdf: ${srcdir}/dbus.texi
$(ENVADD) $(TEXI2PDF) ${srcdir}/dbus.texi
-dired-x : $(infodir)/dired-x
-$(infodir)/dired-x: dired-x.texi $(emacsdir)/emacsver.texi
+dired-x : $(infodir)/dired-x$(INFO_EXT)
+$(infodir)/dired-x$(INFO_EXT): ${srcdir}/dired-x.texi $(emacsdir)/emacsver.texi
$(mkinfodir)
- cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) dired-x.texi
+ $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ ${srcdir}/dired-x.texi
dired-x.dvi: ${srcdir}/dired-x.texi $(emacsdir)/emacsver.texi
$(ENVADD) $(TEXI2DVI) ${srcdir}/dired-x.texi
dired-x.pdf: ${srcdir}/dired-x.texi $(emacsdir)/emacsver.texi
$(ENVADD) $(TEXI2PDF) ${srcdir}/dired-x.texi
-ebrowse : $(infodir)/ebrowse
-$(infodir)/ebrowse: ebrowse.texi
+ebrowse : $(infodir)/ebrowse$(INFO_EXT)
+$(infodir)/ebrowse$(INFO_EXT): ${srcdir}/ebrowse.texi
$(mkinfodir)
- cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) ebrowse.texi
+ $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ ${srcdir}/ebrowse.texi
ebrowse.dvi: ${srcdir}/ebrowse.texi
$(ENVADD) $(TEXI2DVI) ${srcdir}/ebrowse.texi
ebrowse.pdf: ${srcdir}/ebrowse.texi
$(ENVADD) $(TEXI2PDF) ${srcdir}/ebrowse.texi
-ede : $(infodir)/ede
-$(infodir)/ede: ede.texi
+ede : $(infodir)/ede$(INFO_EXT)
+$(infodir)/ede$(INFO_EXT): ${srcdir}/ede.texi
$(mkinfodir)
- cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) ede.texi
+ $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ ${srcdir}/ede.texi
ede.dvi: ${srcdir}/ede.texi
$(ENVADD) $(TEXI2DVI) ${srcdir}/ede.texi
ede.pdf: ${srcdir}/ede.texi
$(ENVADD) $(TEXI2PDF) ${srcdir}/ede.texi
-ediff : $(infodir)/ediff
-$(infodir)/ediff: ediff.texi
+ediff : $(infodir)/ediff$(INFO_EXT)
+$(infodir)/ediff$(INFO_EXT): ${srcdir}/ediff.texi
$(mkinfodir)
- cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) ediff.texi
+ $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ ${srcdir}/ediff.texi
ediff.dvi: ${srcdir}/ediff.texi
$(ENVADD) $(TEXI2DVI) ${srcdir}/ediff.texi
ediff.pdf: ${srcdir}/ediff.texi
$(ENVADD) $(TEXI2PDF) ${srcdir}/ediff.texi
-edt : $(infodir)/edt
-$(infodir)/edt: edt.texi
+edt : $(infodir)/edt$(INFO_EXT)
+$(infodir)/edt$(INFO_EXT): ${srcdir}/edt.texi
$(mkinfodir)
- cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) edt.texi
+ $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ ${srcdir}/edt.texi
edt.dvi: ${srcdir}/edt.texi
$(ENVADD) $(TEXI2DVI) ${srcdir}/edt.texi
edt.pdf: ${srcdir}/edt.texi
$(ENVADD) $(TEXI2PDF) ${srcdir}/edt.texi
-eieio : $(infodir)/eieio
-$(infodir)/eieio: eieio.texi
+eieio : $(infodir)/eieio$(INFO_EXT)
+$(infodir)/eieio$(INFO_EXT): ${srcdir}/eieio.texi
$(mkinfodir)
- cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) eieio.texi
+ $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ ${srcdir}/eieio.texi
eieio.dvi: ${srcdir}/eieio.texi
$(ENVADD) $(TEXI2DVI) ${srcdir}/eieio.texi
eieio.pdf: ${srcdir}/eieio.texi
$(ENVADD) $(TEXI2PDF) ${srcdir}/eieio.texi
-emacs-gnutls : $(infodir)/emacs-gnutls
-$(infodir)/emacs-gnutls: emacs-gnutls.texi
+emacs-gnutls : $(infodir)/emacs-gnutls$(INFO_EXT)
+$(infodir)/emacs-gnutls$(INFO_EXT): ${srcdir}/emacs-gnutls.texi
$(mkinfodir)
- cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) emacs-gnutls.texi
+ $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ ${srcdir}/emacs-gnutls.texi
emacs-gnutls.dvi: ${srcdir}/emacs-gnutls.texi
$(ENVADD) $(TEXI2DVI) ${srcdir}/emacs-gnutls.texi
emacs-gnutls.pdf: ${srcdir}/emacs-gnutls.texi
$(ENVADD) $(TEXI2PDF) ${srcdir}/emacs-gnutls.texi
-emacs-mime : $(infodir)/emacs-mime
-$(infodir)/emacs-mime: emacs-mime.texi
+emacs-mime : $(infodir)/emacs-mime$(INFO_EXT)
+$(infodir)/emacs-mime$(INFO_EXT): ${srcdir}/emacs-mime.texi
$(mkinfodir)
- cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) --enable-encoding emacs-mime.texi
+ $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) --enable-encoding -o $@ ${srcdir}/emacs-mime.texi
emacs-mime.dvi: ${srcdir}/emacs-mime.texi
$(ENVADD) $(TEXI2DVI) ${srcdir}/emacs-mime.texi
emacs-mime.pdf: ${srcdir}/emacs-mime.texi
$(ENVADD) $(TEXI2PDF) ${srcdir}/emacs-mime.texi
-epa : $(infodir)/epa
-$(infodir)/epa: epa.texi
+epa : $(infodir)/epa$(INFO_EXT)
+$(infodir)/epa$(INFO_EXT): ${srcdir}/epa.texi
$(mkinfodir)
- cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) epa.texi
+ $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ ${srcdir}/epa.texi
epa.dvi: ${srcdir}/epa.texi
$(ENVADD) $(TEXI2DVI) ${srcdir}/epa.texi
epa.pdf: ${srcdir}/epa.texi
$(ENVADD) $(TEXI2PDF) ${srcdir}/epa.texi
-erc : $(infodir)/erc
-$(infodir)/erc: erc.texi
+erc : $(infodir)/erc$(INFO_EXT)
+$(infodir)/erc$(INFO_EXT): ${srcdir}/erc.texi
$(mkinfodir)
- cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) erc.texi
+ $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ ${srcdir}/erc.texi
erc.dvi: ${srcdir}/erc.texi
$(ENVADD) $(TEXI2DVI) ${srcdir}/erc.texi
erc.pdf: ${srcdir}/erc.texi
$(ENVADD) $(TEXI2PDF) ${srcdir}/erc.texi
-ert : $(infodir)/ert
-$(infodir)/ert: ert.texi
+ert : $(infodir)/ert$(INFO_EXT)
+$(infodir)/ert$(INFO_EXT): ${srcdir}/ert.texi
$(mkinfodir)
- cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) ert.texi
+ $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ ${srcdir}/ert.texi
ert.dvi: ${srcdir}/ert.texi
$(ENVADD) $(TEXI2DVI) ${srcdir}/ert.texi
ert.pdf: ${srcdir}/ert.texi
$(ENVADD) $(TEXI2PDF) ${srcdir}/ert.texi
-eshell : $(infodir)/eshell
-$(infodir)/eshell: eshell.texi
+eshell : $(infodir)/eshell$(INFO_EXT)
+$(infodir)/eshell$(INFO_EXT): ${srcdir}/eshell.texi
$(mkinfodir)
- cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) eshell.texi
+ $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ ${srcdir}/eshell.texi
eshell.dvi: ${srcdir}/eshell.texi
$(ENVADD) $(TEXI2DVI) ${srcdir}/eshell.texi
eshell.pdf: ${srcdir}/eshell.texi
$(ENVADD) $(TEXI2PDF) ${srcdir}/eshell.texi
-eudc : $(infodir)/eudc
-$(infodir)/eudc: eudc.texi
+eudc : $(infodir)/eudc$(INFO_EXT)
+$(infodir)/eudc$(INFO_EXT): ${srcdir}/eudc.texi
$(mkinfodir)
- cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) eudc.texi
+ $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ ${srcdir}/eudc.texi
eudc.dvi: ${srcdir}/eudc.texi
$(ENVADD) $(TEXI2DVI) ${srcdir}/eudc.texi
eudc.pdf: ${srcdir}/eudc.texi
$(ENVADD) $(TEXI2PDF) ${srcdir}/eudc.texi
-efaq : $(infodir)/efaq
-$(infodir)/efaq: faq.texi $(emacsdir)/emacsver.texi
+efaq : $(infodir)/efaq$(INFO_EXT)
+$(infodir)/efaq$(INFO_EXT): ${srcdir}/faq.texi $(emacsdir)/emacsver.texi
$(mkinfodir)
- cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) faq.texi
+ $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ ${srcdir}/faq.texi
faq.dvi: ${srcdir}/faq.texi $(emacsdir)/emacsver.texi
$(ENVADD) $(TEXI2DVI) ${srcdir}/faq.texi
faq.pdf: ${srcdir}/faq.texi $(emacsdir)/emacsver.texi
@@ -428,274 +389,272 @@ emacs-faq.html: ${srcdir}/faq.texi $(emacsdir)/emacsver.texi
emacs-faq.text: ${srcdir}/faq.texi $(emacsdir)/emacsver.texi
$(MAKEINFO) $(MAKEINFO_OPTS) --plaintext -o $@ ${srcdir}/faq.texi
-flymake : $(infodir)/flymake
-$(infodir)/flymake: flymake.texi
+flymake : $(infodir)/flymake$(INFO_EXT)
+$(infodir)/flymake$(INFO_EXT): ${srcdir}/flymake.texi
$(mkinfodir)
- cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) flymake.texi
+ $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ ${srcdir}/flymake.texi
flymake.dvi: ${srcdir}/flymake.texi
$(ENVADD) $(TEXI2DVI) ${srcdir}/flymake.texi
flymake.pdf: ${srcdir}/flymake.texi
$(ENVADD) $(TEXI2PDF) ${srcdir}/flymake.texi
-forms : $(infodir)/forms
-$(infodir)/forms: forms.texi
+forms : $(infodir)/forms$(INFO_EXT)
+$(infodir)/forms$(INFO_EXT): ${srcdir}/forms.texi
$(mkinfodir)
- cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) forms.texi
+ $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ ${srcdir}/forms.texi
forms.dvi: ${srcdir}/forms.texi
$(ENVADD) $(TEXI2DVI) ${srcdir}/forms.texi
forms.pdf: ${srcdir}/forms.texi
$(ENVADD) $(TEXI2PDF) ${srcdir}/forms.texi
# gnus/message/emacs-mime/sieve/pgg are part of Gnus:
-gnus : $(infodir)/gnus
-$(infodir)/gnus: gnus.texi gnus-faq.texi
+gnus : $(infodir)/gnus$(INFO_EXT)
+$(infodir)/gnus$(INFO_EXT): ${srcdir}/gnus.texi ${srcdir}/gnus-faq.texi
$(mkinfodir)
- cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) gnus.texi
-gnus.dvi: ${srcdir}/gnus.texi gnus-faq.texi
+ $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ ${srcdir}/gnus.texi
+gnus.dvi: ${srcdir}/gnus.texi ${srcdir}/gnus-faq.texi
sed -e '/@iflatex/,/@end iflatex/d' ${srcdir}/gnus.texi > gnustmp.texi
$(ENVADD) $(TEXI2DVI) gnustmp.texi
- cp gnustmp.dvi $*.dvi
+ cp gnustmp.dvi $@
rm gnustmp.*
-gnus.pdf: ${srcdir}/gnus.texi gnus-faq.texi
+gnus.pdf: ${srcdir}/gnus.texi ${srcdir}/gnus-faq.texi
sed -e '/@iflatex/,/@end iflatex/d' ${srcdir}/gnus.texi > gnustmp.texi
$(ENVADD) $(TEXI2PDF) gnustmp.texi
cp gnustmp.pdf $@
rm gnustmp.*
-# This is produced with --no-split to avoid making files whose
-# names clash on DOS 8+3 filesystems
-idlwave : $(infodir)/idlwave
-$(infodir)/idlwave: idlwave.texi
+# NB this one needs --no-split even without a .info extension.
+idlwave : $(infodir)/idlwave$(INFO_EXT)
+$(infodir)/idlwave$(INFO_EXT): ${srcdir}/idlwave.texi
$(mkinfodir)
- cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) --no-split idlwave.texi
+ $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ ${srcdir}/idlwave.texi
idlwave.dvi: ${srcdir}/idlwave.texi
$(ENVADD) $(TEXI2DVI) ${srcdir}/idlwave.texi
idlwave.pdf: ${srcdir}/idlwave.texi
$(ENVADD) $(TEXI2PDF) ${srcdir}/idlwave.texi
-# The following target uses an explicit -o switch to work around
-# the @setfilename directive in info.texi, which is required for
-# the Texinfo distribution.
-###info : $(infodir)/info # circular!
-$(infodir)/info: info.texi
+# NB this one needs --no-split even without a .info extension.
+# Avoid name clash with overall "info" target.
+info.info : $(infodir)/info$(INFO_EXT)
+$(infodir)/info$(INFO_EXT): ${srcdir}/info.texi
$(mkinfodir)
- cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) --no-split -o $@ info.texi
+ $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ ${srcdir}/info.texi
info.dvi: ${srcdir}/info.texi
$(ENVADD) $(TEXI2DVI) ${srcdir}/info.texi
info.pdf: ${srcdir}/info.texi
$(ENVADD) $(TEXI2PDF) ${srcdir}/info.texi
-mairix-el : $(infodir)/mairix-el
-$(infodir)/mairix-el: mairix-el.texi
+mairix-el : $(infodir)/mairix-el$(INFO_EXT)
+$(infodir)/mairix-el$(INFO_EXT): ${srcdir}/mairix-el.texi
$(mkinfodir)
- cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) mairix-el.texi
+ $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ ${srcdir}/mairix-el.texi
mairix-el.dvi: ${srcdir}/mairix-el.texi
$(ENVADD) $(TEXI2DVI) ${srcdir}/mairix-el.texi
mairix-el.pdf: ${srcdir}/mairix-el.texi
$(ENVADD) $(TEXI2PDF) ${srcdir}/mairix-el.texi
-message : $(infodir)/message
-$(infodir)/message: message.texi
+message : $(infodir)/message$(INFO_EXT)
+$(infodir)/message$(INFO_EXT): ${srcdir}/message.texi
$(mkinfodir)
- cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) message.texi
+ $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ ${srcdir}/message.texi
message.dvi: ${srcdir}/message.texi
$(ENVADD) $(TEXI2DVI) ${srcdir}/message.texi
message.pdf: ${srcdir}/message.texi
$(ENVADD) $(TEXI2PDF) ${srcdir}/message.texi
-mh-e : $(infodir)/mh-e
-$(infodir)/mh-e: mh-e.texi
+mh-e : $(infodir)/mh-e$(INFO_EXT)
+$(infodir)/mh-e$(INFO_EXT): ${srcdir}/mh-e.texi
$(mkinfodir)
- cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) mh-e.texi
+ $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ ${srcdir}/mh-e.texi
mh-e.dvi: ${srcdir}/mh-e.texi
$(ENVADD) $(TEXI2DVI) ${srcdir}/mh-e.texi
mh-e.pdf: ${srcdir}/mh-e.texi
$(ENVADD) $(TEXI2PDF) ${srcdir}/mh-e.texi
-newsticker : $(infodir)/newsticker
-$(infodir)/newsticker: newsticker.texi
+newsticker : $(infodir)/newsticker$(INFO_EXT)
+$(infodir)/newsticker$(INFO_EXT): ${srcdir}/newsticker.texi
$(mkinfodir)
- cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) newsticker.texi
+ $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ ${srcdir}/newsticker.texi
newsticker.dvi: ${srcdir}/newsticker.texi
$(ENVADD) $(TEXI2DVI) ${srcdir}/newsticker.texi
newsticker.pdf: ${srcdir}/newsticker.texi
$(ENVADD) $(TEXI2PDF) ${srcdir}/newsticker.texi
-nxml-mode : $(infodir)/nxml-mode
-$(infodir)/nxml-mode: nxml-mode.texi
+nxml-mode : $(infodir)/nxml-mode$(INFO_EXT)
+$(infodir)/nxml-mode$(INFO_EXT): ${srcdir}/nxml-mode.texi
$(mkinfodir)
- cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) nxml-mode.texi
+ $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ ${srcdir}/nxml-mode.texi
nxml-mode.dvi: ${srcdir}/nxml-mode.texi
$(ENVADD) $(TEXI2DVI) ${srcdir}/nxml-mode.texi
nxml-mode.pdf: ${srcdir}/nxml-mode.texi
$(ENVADD) $(TEXI2PDF) ${srcdir}/nxml-mode.texi
-org : $(infodir)/org
-$(infodir)/org: org.texi
+org : $(infodir)/org$(INFO_EXT)
+$(infodir)/org$(INFO_EXT): ${srcdir}/org.texi
$(mkinfodir)
- cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) org.texi
+ $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ ${srcdir}/org.texi
org.dvi: ${srcdir}/org.texi
$(ENVADD) $(TEXI2DVI) ${srcdir}/org.texi
org.pdf: ${srcdir}/org.texi
$(ENVADD) $(TEXI2PDF) ${srcdir}/org.texi
-pcl-cvs : $(infodir)/pcl-cvs
-$(infodir)/pcl-cvs: pcl-cvs.texi
+pcl-cvs : $(infodir)/pcl-cvs$(INFO_EXT)
+$(infodir)/pcl-cvs$(INFO_EXT): ${srcdir}/pcl-cvs.texi
$(mkinfodir)
- cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) pcl-cvs.texi
+ $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ ${srcdir}/pcl-cvs.texi
pcl-cvs.dvi: ${srcdir}/pcl-cvs.texi
$(ENVADD) $(TEXI2DVI) ${srcdir}/pcl-cvs.texi
pcl-cvs.pdf: ${srcdir}/pcl-cvs.texi
$(ENVADD) $(TEXI2PDF) ${srcdir}/pcl-cvs.texi
-pgg : $(infodir)/pgg
-$(infodir)/pgg: pgg.texi
+pgg : $(infodir)/pgg$(INFO_EXT)
+$(infodir)/pgg$(INFO_EXT): ${srcdir}/pgg.texi
$(mkinfodir)
- cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) pgg.texi
+ $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ ${srcdir}/pgg.texi
pgg.dvi: ${srcdir}/pgg.texi
$(ENVADD) $(TEXI2DVI) ${srcdir}/pgg.texi
pgg.pdf: ${srcdir}/pgg.texi
$(ENVADD) $(TEXI2PDF) ${srcdir}/pgg.texi
-rcirc : $(infodir)/rcirc
-$(infodir)/rcirc: rcirc.texi
+rcirc : $(infodir)/rcirc$(INFO_EXT)
+$(infodir)/rcirc$(INFO_EXT): ${srcdir}/rcirc.texi
$(mkinfodir)
- cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) rcirc.texi
+ $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ ${srcdir}/rcirc.texi
rcirc.dvi: ${srcdir}/rcirc.texi
$(ENVADD) $(TEXI2DVI) ${srcdir}/rcirc.texi
rcirc.pdf: ${srcdir}/rcirc.texi
$(ENVADD) $(TEXI2PDF) ${srcdir}/rcirc.texi
-reftex : $(infodir)/reftex
-$(infodir)/reftex: reftex.texi
+reftex : $(infodir)/reftex$(INFO_EXT)
+$(infodir)/reftex$(INFO_EXT): ${srcdir}/reftex.texi
$(mkinfodir)
- cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) reftex.texi
+ $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ ${srcdir}/reftex.texi
reftex.dvi: ${srcdir}/reftex.texi
$(ENVADD) $(TEXI2DVI) ${srcdir}/reftex.texi
reftex.pdf: ${srcdir}/reftex.texi
$(ENVADD) $(TEXI2PDF) ${srcdir}/reftex.texi
-remember : $(infodir)/remember
-$(infodir)/remember: remember.texi
+remember : $(infodir)/remember$(INFO_EXT)
+$(infodir)/remember$(INFO_EXT): ${srcdir}/remember.texi
$(mkinfodir)
- cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) remember.texi
+ $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ ${srcdir}/remember.texi
remember.dvi: ${srcdir}/remember.texi
$(ENVADD) $(TEXI2DVI) ${srcdir}/remember.texi
remember.pdf: ${srcdir}/remember.texi
$(ENVADD) $(TEXI2PDF) ${srcdir}/remember.texi
-sasl : $(infodir)/sasl
-$(infodir)/sasl: sasl.texi
+sasl : $(infodir)/sasl$(INFO_EXT)
+$(infodir)/sasl$(INFO_EXT): ${srcdir}/sasl.texi
$(mkinfodir)
- cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) sasl.texi
+ $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ ${srcdir}/sasl.texi
sasl.dvi: ${srcdir}/sasl.texi
$(ENVADD) $(TEXI2DVI) ${srcdir}/sasl.texi
sasl.pdf: ${srcdir}/sasl.texi
$(ENVADD) $(TEXI2PDF) ${srcdir}/sasl.texi
-sc : $(infodir)/sc
-$(infodir)/sc: sc.texi
+sc : $(infodir)/sc$(INFO_EXT)
+$(infodir)/sc$(INFO_EXT): ${srcdir}/sc.texi
$(mkinfodir)
- cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) sc.texi
+ $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ ${srcdir}/sc.texi
sc.dvi: ${srcdir}/sc.texi
$(ENVADD) $(TEXI2DVI) ${srcdir}/sc.texi
sc.pdf: ${srcdir}/sc.texi
$(ENVADD) $(TEXI2PDF) ${srcdir}/sc.texi
-semantic : $(infodir)/semantic
-$(infodir)/semantic: semantic.texi sem-user.texi
+semantic : $(infodir)/semantic$(INFO_EXT)
+$(infodir)/semantic$(INFO_EXT): ${srcdir}/semantic.texi ${srcdir}/sem-user.texi
$(mkinfodir)
- cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) semantic.texi
-semantic.dvi: ${srcdir}/semantic.texi sem-user.texi
+ $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ ${srcdir}/semantic.texi
+semantic.dvi: ${srcdir}/semantic.texi ${srcdir}/sem-user.texi
$(ENVADD) $(TEXI2DVI) ${srcdir}/semantic.texi
-semantic.pdf: ${srcdir}/semantic.texi sem-user.texi
+semantic.pdf: ${srcdir}/semantic.texi ${srcdir}/sem-user.texi
$(ENVADD) $(TEXI2PDF) ${srcdir}/semantic.texi
-ses : $(infodir)/ses
-$(infodir)/ses: ses.texi
+ses : $(infodir)/ses$(INFO_EXT)
+$(infodir)/ses$(INFO_EXT): ${srcdir}/ses.texi
$(mkinfodir)
- cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) ses.texi
+ $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ ${srcdir}/ses.texi
ses.dvi: ${srcdir}/ses.texi
$(ENVADD) $(TEXI2DVI) ${srcdir}/ses.texi
ses.pdf: ${srcdir}/ses.texi
$(ENVADD) $(TEXI2PDF) ${srcdir}/ses.texi
-sieve : $(infodir)/sieve
-$(infodir)/sieve: sieve.texi
+sieve : $(infodir)/sieve$(INFO_EXT)
+$(infodir)/sieve$(INFO_EXT): ${srcdir}/sieve.texi
$(mkinfodir)
- cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) sieve.texi
+ $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ ${srcdir}/sieve.texi
sieve.dvi: ${srcdir}/sieve.texi
$(ENVADD) $(TEXI2DVI) ${srcdir}/sieve.texi
sieve.pdf: ${srcdir}/sieve.texi
$(ENVADD) $(TEXI2PDF) ${srcdir}/sieve.texi
-smtpmail : $(infodir)/smtpmail
-$(infodir)/smtpmail: smtpmail.texi
+smtpmail : $(infodir)/smtpmail$(INFO_EXT)
+$(infodir)/smtpmail$(INFO_EXT): ${srcdir}/smtpmail.texi
$(mkinfodir)
- cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) smtpmail.texi
+ $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ ${srcdir}/smtpmail.texi
smtpmail.dvi: ${srcdir}/smtpmail.texi
$(ENVADD) $(TEXI2DVI) ${srcdir}/smtpmail.texi
smtpmail.pdf: ${srcdir}/smtpmail.texi
$(ENVADD) $(TEXI2PDF) ${srcdir}/smtpmail.texi
-speedbar : $(infodir)/speedbar
-$(infodir)/speedbar: speedbar.texi
+speedbar : $(infodir)/speedbar$(INFO_EXT)
+$(infodir)/speedbar$(INFO_EXT): ${srcdir}/speedbar.texi
$(mkinfodir)
- cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) speedbar.texi
+ $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ ${srcdir}/speedbar.texi
speedbar.dvi: ${srcdir}/speedbar.texi
$(ENVADD) $(TEXI2DVI) ${srcdir}/speedbar.texi
speedbar.pdf: ${srcdir}/speedbar.texi
$(ENVADD) $(TEXI2PDF) ${srcdir}/speedbar.texi
-tramp : $(infodir)/tramp
-$(infodir)/tramp: tramp.texi trampver.texi
+tramp : $(infodir)/tramp$(INFO_EXT)
+$(infodir)/tramp$(INFO_EXT): ${srcdir}/tramp.texi ${srcdir}/trampver.texi
$(mkinfodir)
- cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) -D emacs tramp.texi
-tramp.dvi: ${srcdir}/tramp.texi trampver.texi
+ $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ -D emacs ${srcdir}/tramp.texi
+tramp.dvi: ${srcdir}/tramp.texi ${srcdir}/trampver.texi
$(ENVADD) $(TEXI2DVI) ${srcdir}/tramp.texi
-tramp.pdf: ${srcdir}/tramp.texi trampver.texi
+tramp.pdf: ${srcdir}/tramp.texi ${srcdir}/trampver.texi
$(ENVADD) $(TEXI2PDF) ${srcdir}/tramp.texi
-url : $(infodir)/url
-$(infodir)/url: url.texi
+url : $(infodir)/url$(INFO_EXT)
+$(infodir)/url$(INFO_EXT): ${srcdir}/url.texi
$(mkinfodir)
- cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) url.texi
+ $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ ${srcdir}/url.texi
url.dvi: ${srcdir}/url.texi
$(ENVADD) $(TEXI2DVI) ${srcdir}/url.texi
url.pdf: ${srcdir}/url.texi
$(ENVADD) $(TEXI2PDF) ${srcdir}/url.texi
-vip : $(infodir)/vip
-$(infodir)/vip: vip.texi
+vip : $(infodir)/vip$(INFO_EXT)
+$(infodir)/vip$(INFO_EXT): ${srcdir}/vip.texi
$(mkinfodir)
- cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) vip.texi
+ $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ ${srcdir}/vip.texi
vip.dvi: ${srcdir}/vip.texi
$(ENVADD) $(TEXI2DVI) ${srcdir}/vip.texi
vip.pdf: ${srcdir}/vip.texi
$(ENVADD) $(TEXI2PDF) ${srcdir}/vip.texi
-viper : $(infodir)/viper
-$(infodir)/viper: viper.texi
+viper : $(infodir)/viper$(INFO_EXT)
+$(infodir)/viper$(INFO_EXT): ${srcdir}/viper.texi
$(mkinfodir)
- cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) viper.texi
+ $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ ${srcdir}/viper.texi
viper.dvi: ${srcdir}/viper.texi
$(ENVADD) $(TEXI2DVI) ${srcdir}/viper.texi
viper.pdf: ${srcdir}/viper.texi
$(ENVADD) $(TEXI2PDF) ${srcdir}/viper.texi
-widget : $(infodir)/widget
-$(infodir)/widget: widget.texi
+widget : $(infodir)/widget$(INFO_EXT)
+$(infodir)/widget$(INFO_EXT): ${srcdir}/widget.texi
$(mkinfodir)
- cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) widget.texi
+ $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ ${srcdir}/widget.texi
widget.dvi: ${srcdir}/widget.texi
$(ENVADD) $(TEXI2DVI) ${srcdir}/widget.texi
widget.pdf: ${srcdir}/widget.texi
$(ENVADD) $(TEXI2PDF) ${srcdir}/widget.texi
-woman : $(infodir)/woman
-$(infodir)/woman: woman.texi
+woman : $(infodir)/woman$(INFO_EXT)
+$(infodir)/woman$(INFO_EXT): ${srcdir}/woman.texi
$(mkinfodir)
- cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) woman.texi
+ $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ ${srcdir}/woman.texi
woman.dvi: ${srcdir}/woman.texi
$(ENVADD) $(TEXI2DVI) ${srcdir}/woman.texi
woman.pdf: ${srcdir}/woman.texi
@@ -705,8 +664,9 @@ woman.pdf: ${srcdir}/woman.texi
.PHONY: mostlyclean clean distclean maintainer-clean
mostlyclean:
- rm -f *.aux *.log *.toc *.cp *.cps *.fn *.fns *.ky *.kys \
- *.op *.ops *.pg *.pgs *.tp *.tps *.vr *.vrs
+ rm -f *.aux *.log *.toc *.c[mp] *.c[mp]s *.fn *.fns \
+ *.ky *.kys *.op *.ops *.p[gj] *.p[gj]s *.sc *.scs *.ss \
+ *.t[gp] *.t[gp]s *.vr *.vrs
rm -f gnustmp.*
clean: mostlyclean
@@ -717,7 +677,8 @@ distclean: clean
## infodir is relative to srcdir.
maintainer-clean: distclean
- cd $(srcdir); for file in $(INFO_TARGETS); do \
+ cd $(infodir); for file in $(INFO_TARGETS); do \
+ file=`echo $${file} | sed 's/\.info$$//'`${INFO_EXT}; \
rm -f $${file} $${file}-[1-9] $${file}-[1-9][0-9]; \
done
diff --git a/doc/misc/auth.texi b/doc/misc/auth.texi
index 4ce4e337a0f..3a1e4155e97 100644
--- a/doc/misc/auth.texi
+++ b/doc/misc/auth.texi
@@ -180,12 +180,15 @@ Here's a mixed example using two sources:
@end defvar
If you don't customize @code{auth-sources}, you'll have to live with
-the defaults: any host and any port are looked up in the netrc
-file @file{~/.authinfo.gpg}, which is a GnuPG encrypted file
-(@pxref{GnuPG and EasyPG Assistant Configuration}).
+the defaults: the unencrypted netrc file @file{~/.authinfo} will be
+used for any host and any port.
-If that fails, the unencrypted netrc files @file{~/.authinfo} and
-@file{~/.netrc} will be used.
+If that fails, any host and any port are looked up in the netrc file
+@file{~/.authinfo.gpg}, which is a GnuPG encrypted file (@pxref{GnuPG
+and EasyPG Assistant Configuration}).
+
+Finally, the unencrypted netrc file @file{~/.netrc} will be used for
+any host and any port.
The typical netrc line example is without a port.
diff --git a/doc/misc/calc.texi b/doc/misc/calc.texi
index 48252ceb327..98b5c44abf8 100644
--- a/doc/misc/calc.texi
+++ b/doc/misc/calc.texi
@@ -27778,6 +27778,11 @@ acres per meter-second.) Remainder units are expressed in terms of
``fundamental'' units like @samp{m} and @samp{s}, regardless of the
input units.
+If you want to disallow using inconsistent units, you can set the customizable variable
+@code{calc-ensure-consistent-units} to @code{t} (@pxref{Customizing Calc}). In this case,
+if you request units which are inconsistent with the original units, you will be warned about
+it and no conversion will occur.
+
One special exception is that if you specify a single unit name, and
a compatible unit appears somewhere in the units expression, then
that compatible unit will be converted to the new unit and the
@@ -35591,6 +35596,19 @@ as @samp{a/(b*c)}. If @code{calc-multiplication-has-precedence} is
of @code{calc-multiplication-has-precedence} is @code{t}.
@end defvar
+@defvar calc-ensure-consistent-units
+When converting units, the variable @code{calc-ensure-consistent-units}
+determines whether or not the target units need to be consistent with the
+original units. If @code{calc-ensure-consistent-units} is @code{nil}, then
+the target units don't need to have the same dimensions as the original units;
+for example, converting @samp{100 ft/s} to @samp{m} will produce @samp{30.48 m/s}.
+If @code{calc-ensure-consistent-units} is non-@code{nil}, then the target units
+need to have the same dimensions as the original units; for example, converting
+@samp{100 ft/s} to @samp{m} will result in an error, since @samp{ft/s} and @samp{m}
+have different dimensions. The default value of @code{calc-ensure-consistent-units}
+is @code{nil}.
+@end defvar
+
@defvar calc-undo-length
The variable @code{calc-undo-length} determines the number of undo
steps that Calc will keep track of when @code{calc-quit} is called.
diff --git a/doc/misc/cc-mode.texi b/doc/misc/cc-mode.texi
index 58420bbd99c..8c574be8f2a 100644
--- a/doc/misc/cc-mode.texi
+++ b/doc/misc/cc-mode.texi
@@ -701,7 +701,7 @@ in some circumstances---@code{c-insert-tab-function} then defines
precisely what sort of ``whitespace'' this will be. Set the standard
Emacs variable @code{indent-tabs-mode} to @code{t} if you want real
@samp{tab} characters to be used in the indentation, to @code{nil} if
-you want only spaces. @xref{Just Spaces,,, @emacsman{},
+you want only spaces. @xref{Just Spaces,,,@emacsman{},
@emacsmantitle{}}.
@defopt c-tab-always-indent
@@ -1058,8 +1058,8 @@ set this up for you, so you probably won't have to bother.
@cindex Auto Fill mode
@cindex paragraph filling
Line breaks are by default handled (almost) the same regardless of
-whether they are made by auto fill mode (@pxref{Auto Fill,,,
-@emacsman{}, @emacsmantitle{}}), by paragraph filling (e.g. with
+whether they are made by auto fill mode (@pxref{Auto
+Fill,,,@emacsman{}, @emacsmantitle{}}), by paragraph filling (e.g. with
@kbd{M-q}), or explicitly with @kbd{M-j} or similar methods. In
string literals, the new line gets the same indentation as the
previous nonempty line.@footnote{You can change this default by
@@ -1402,7 +1402,7 @@ continuation of the preceding @code{if}.
@vindex abbrev-mode
@findex abbrev-mode
@cindex Abbrev mode
-@ccmode{} uses Abbrev mode (@pxref{Abbrevs,,, @emacsman{}, @emacsmantitle{}})
+@ccmode{} uses Abbrev mode (@pxref{Abbrevs,,,@emacsman{}, @emacsmantitle{}})
to accomplish this. It's therefore turned on by default in all language
modes except IDL mode, since CORBA IDL doesn't have any statements.
@end deffn
@@ -2295,14 +2295,14 @@ to create them.
A @dfn{file local variable setting} is a setting which applies to an
individual source file. You put this in a @dfn{local variables list},
a special block at the end of the source file (@pxref{Specifying File
-Variables,,, @emacsman{}}).
+Variables,,,@emacsman{}}).
@item File Styles
A @dfn{file style} is a rarely used variant of the ``style'' mechanism
described above, which applies to an individual source file.
@xref{File Styles}. You use this by setting certain special variables
-in a local variables list (@pxref{Specifying File Variables,,,
-@emacsman{}}).
+in a local variables list (@pxref{Specifying File
+Variables,,,@emacsman{}}).
@item Hooks with Styles
For ultimate flexibility, you can use hooks and styles together. For
@@ -2897,7 +2897,7 @@ these offsets or the parent style name.
The Emacs manual describes how you can customize certain variables on a
per-file basis by including a @dfn{file local variable} block at the end
-of the file (@pxref{File Variables,, Local Variables in Files, @emacsman{},
+of the file (@pxref{File Variables,, Local Variables in Files,@emacsman{},
@emacsmantitle{}}).
So far, you've only seen a functional interface for setting styles in
@@ -3139,8 +3139,9 @@ results in the current implementation.
@end defopt
@vindex comment-multi-line
-If inside a comment and @code{comment-multi-line} (@pxref{Auto Fill,,,
-@emacsman{}, @emacsmantitle{}} is non-@code{nil}, the indentation and
+If inside a comment and @code{comment-multi-line} (@pxref{Auto
+Fill,,,@emacsman{}, @emacsmantitle{}} is non-@code{nil}, the
+indentation and
line prefix are preserved. If inside a comment and
@code{comment-multi-line} is @code{nil}, a new comment of the same
type is started on the next line and indented as appropriate for
@@ -6771,7 +6772,7 @@ The stuff that didn't fit in anywhere else is documented here.
Controls whether a final newline is enforced when the file is saved.
The value is an association list that for each language mode specifies
the value to give to @code{require-final-newline} (@pxref{Saving
-Buffers,,, @lispref{}, @lispreftitle{}}) at mode initialization. If a
+Buffers,,,@lispref{}, @lispreftitle{}}) at mode initialization. If a
language isn't present on the association list, CC Mode won't touch
@code{require-final-newline} in buffers for that language.
diff --git a/doc/misc/dbus.texi b/doc/misc/dbus.texi
index 204afe7056e..865e99a3aa6 100644
--- a/doc/misc/dbus.texi
+++ b/doc/misc/dbus.texi
@@ -53,7 +53,7 @@ another. An overview of D-Bus can be found at
* Asynchronous Methods:: Calling methods non-blocking.
* Receiving Method Calls:: Offering own methods.
* Signals:: Sending and receiving signals.
-* Alternative Buses:: Alternative buses.
+* Alternative Buses:: Alternative buses and environments.
* Errors and Events:: Errors and events.
* Index:: Index including concepts, functions, variables.
@@ -116,6 +116,7 @@ name could be @samp{org.gnu.Emacs.TextEditor} or
@cindex inspection
@menu
+* Version:: Determining the D-Bus version.
* Bus names:: Discovering D-Bus names.
* Introspection:: Knowing the details of D-Bus services.
* Nodes and Interfaces:: Detecting object paths and interfaces.
@@ -125,6 +126,25 @@ name could be @samp{org.gnu.Emacs.TextEditor} or
@end menu
+@node Version
+@section D-Bus version.
+
+D-Bus has evolved over the years. New features have been added with
+new D-Bus versions. There are two variables, which allow to determine
+the used D-Bus version.
+
+@defvar dbus-compiled-version
+This variable, a string, determines the version of D-Bus Emacs is
+compiled against. If it cannot be determined the value is @code{nil}.
+@end defvar
+
+@defvar dbus-runtime-version
+The other D-Bus version to be checked is the version of D-Bus Emacs
+runs with. This string can be different from @code{dbus-compiled-version}.
+It is also @code{nil}, if it cannot be determined at runtime.
+@end defvar
+
+
@node Bus names
@section Bus names.
@@ -149,7 +169,6 @@ activatable service names at all. Example:
(member "org.gnome.evince.Daemon"
(dbus-list-activatable-names :session))
@end lisp
-
@end defun
@defun dbus-list-names bus
@@ -637,6 +656,12 @@ Interfaces can have properties. These can be exposed via the
That is, properties can be retrieved and changed during lifetime of an
element.
+A generalized interface is
+@samp{org.freedesktop.DBus.Objectmanager}@footnote{See
+@uref{http://dbus.freedesktop.org/doc/dbus-specification.html#standard-interfaces-objectmanager}},
+which returns objects, their interfaces and properties for a given
+service in just one call.
+
Annotations, on the other hand, are static values for an element.
Often, they are used to instruct generators, how to generate code from
the interface for a given language binding.
@@ -732,6 +757,61 @@ If there are no properties, @code{nil} is returned. Example:
@end lisp
@end defun
+@defun dbus-get-all-managed-objects bus service path
+This functions returns all objects at @var{bus}, @var{service},
+@var{path}, and the children of @var{path}. The result is a list of
+objects. Every object is a cons of an existing path name, and the
+list of available interface objects. An interface object is another
+cons, which car is the interface name, and the cdr is the list of
+properties as returned by @code{dbus-get-all-properties} for that path
+and interface. Example:
+
+@lisp
+(dbus-get-all-managed-objects
+ :session "org.gnome.SettingsDaemon" "/")
+
+@result{} (("/org/gnome/SettingsDaemon/MediaKeys"
+ ("org.gnome.SettingsDaemon.MediaKeys")
+ ("org.freedesktop.DBus.Peer")
+ ("org.freedesktop.DBus.Introspectable")
+ ("org.freedesktop.DBus.Properties")
+ ("org.freedesktop.DBus.ObjectManager"))
+ ("/org/gnome/SettingsDaemon/Power"
+ ("org.gnome.SettingsDaemon.Power.Keyboard")
+ ("org.gnome.SettingsDaemon.Power.Screen")
+ ("org.gnome.SettingsDaemon.Power"
+ ("Icon" . ". GThemedIcon battery-full-charged-symbolic ")
+ ("Tooltip" . "Laptop battery is charged"))
+ ("org.freedesktop.DBus.Peer")
+ ("org.freedesktop.DBus.Introspectable")
+ ("org.freedesktop.DBus.Properties")
+ ("org.freedesktop.DBus.ObjectManager"))
+ @dots{})
+@end lisp
+
+If possible, @samp{org.freedesktop.DBus.ObjectManager.GetManagedObjects}
+is used for retrieving the information. Otherwise, the information
+is collected via @samp{org.freedesktop.DBus.Introspectable.Introspect}
+and @samp{org.freedesktop.DBus.Properties.GetAll}, which is slow.
+
+An overview of all existing object paths, their interfaces and
+properties could be retrieved by the following code:
+
+@lisp
+(with-current-buffer (switch-to-buffer "*objectmanager*")
+ (erase-buffer)
+ (let (result)
+ (dolist (service (dbus-list-known-names :session) result)
+ (message "%s" service)
+ (add-to-list
+ 'result
+ (cons service
+ (dbus-get-all-managed-objects :session service "/"))))
+ (insert (message "%s" (pp result)))
+ (redisplay t)))
+@end lisp
+@end defun
+
@defun dbus-introspect-get-annotation-names bus service path interface &optional name
Return a list of all annotation names as list of strings. If
@var{name} is @code{nil}, the annotations are children of
@@ -928,6 +1008,10 @@ represented outside this range are stripped of. For example,
@code{:byte ?x} is equal to @code{:byte ?\M-x}, but it is not equal to
@code{:byte ?\C-x} or @code{:byte ?\M-\C-x}.
+Signed and unsigned integer D-Bus types expect a corresponding integer
+value. If the value does not fit Emacs's integer range, it is also
+possible to use an equivalent floating point number.
+
A D-Bus compound type is always represented as a list. The @sc{car}
of this list can be the type symbol @code{:array}, @code{:variant},
@code{:struct} or @code{:dict-entry}, which would result in a
@@ -1182,24 +1266,6 @@ emulate the @code{lshal} command on GNU/Linux systems:
@end lisp
@end defun
-@defun dbus-call-method-non-blocking bus service path interface method &optional :timeout timeout &rest args
-Call @var{method} on the D-Bus @var{bus}, but don't block the event queue.
-This is necessary for communicating to registered D-Bus methods,
-which are running in the same Emacs process.
-
-The arguments are the same as in @code{dbus-call-method}. Example:
-
-@lisp
-(dbus-call-method-non-blocking
- :system "org.freedesktop.Hal"
- "/org/freedesktop/Hal/devices/computer"
- "org.freedesktop.Hal.Device" "GetPropertyString"
- "system.kernel.machine")
-
-@result{} "i686"
-@end lisp
-@end defun
-
@node Asynchronous Methods
@chapter Calling methods non-blocking.
@@ -1229,7 +1295,7 @@ All other arguments args are passed to @var{method} as arguments.
They are converted into D-Bus types as described in @ref{Type
Conversion}.
-Unless @var{handler} is @code{nil}, the function returns a key into
+If @var{handler} is a Lisp function, the function returns a key into
the hash table @code{dbus-registered-objects-table}. The
corresponding entry in the hash table is removed, when the return
message has been arrived, and @var{handler} is called. Example:
@@ -1241,7 +1307,7 @@ message has been arrived, and @var{handler} is called. Example:
"org.freedesktop.Hal.Device" "GetPropertyString" 'message
"system.kernel.machine")
-@result{} (:system 2)
+@result{} (:serial :system 2)
@print{} i686
@end lisp
@@ -1323,19 +1389,21 @@ implementation of an interface of a well known service, like
It could be also an implementation of an own interface. In this case,
the service name must be @samp{org.gnu.Emacs}. The object path shall
-begin with @samp{/org/gnu/Emacs/@strong{Application}/}, and the
+begin with @samp{/org/gnu/Emacs/@strong{Application}}, and the
interface name shall be @code{org.gnu.Emacs.@strong{Application}}.
@samp{@strong{Application}} is the name of the application which
provides the interface.
@deffn Constant dbus-service-emacs
-The well known service name of Emacs.
+The well known service name @samp{org.gnu.Emacs} of Emacs.
@end deffn
@deffn Constant dbus-path-emacs
-The object path head "/org/gnu/Emacs" used by Emacs. All object
-paths, used by offered methods or signals, shall start with this
-string.
+The object path namespace @samp{/org/gnu/Emacs} used by Emacs.
+@end deffn
+
+@deffn Constant dbus-interface-emacs
+The interface namespace @code{org.gnu.Emacs} used by Emacs.
@end deffn
@defun dbus-register-method bus service path interface method handler dont-register-service
@@ -1400,7 +1468,7 @@ registration for @var{method}. Example:
"org.freedesktop.TextEditor" "OpenFile"
'my-dbus-method-handler)
-@result{} ((:session "org.freedesktop.TextEditor" "OpenFile")
+@result{} ((:method :session "org.freedesktop.TextEditor" "OpenFile")
("org.freedesktop.TextEditor" "/org/freedesktop/TextEditor"
my-dbus-method-handler))
@end lisp
@@ -1497,14 +1565,14 @@ clients from discovering the still incomplete interface.
:session "org.freedesktop.TextEditor" "/org/freedesktop/TextEditor"
"org.freedesktop.TextEditor" "name" :read "GNU Emacs")
-@result{} ((:session "org.freedesktop.TextEditor" "name")
+@result{} ((:property :session "org.freedesktop.TextEditor" "name")
("org.freedesktop.TextEditor" "/org/freedesktop/TextEditor"))
(dbus-register-property
:session "org.freedesktop.TextEditor" "/org/freedesktop/TextEditor"
"org.freedesktop.TextEditor" "version" :readwrite emacs-version t)
-@result{} ((:session "org.freedesktop.TextEditor" "version")
+@result{} ((:property :session "org.freedesktop.TextEditor" "version")
("org.freedesktop.TextEditor" "/org/freedesktop/TextEditor"))
@end lisp
@@ -1569,8 +1637,8 @@ to the service from D-Bus.
@chapter Sending and receiving signals.
@cindex signals
-Signals are broadcast messages. They carry input parameters, which
-are received by all objects which have registered for such a signal.
+Signals are one way messages. They carry input parameters, which are
+received by all objects which have registered for such a signal.
@defun dbus-send-signal bus service path interface signal &rest args
This function is similar to @code{dbus-call-method}. The difference
@@ -1580,10 +1648,14 @@ The function emits @var{signal} on the D-Bus @var{bus}. @var{bus} is
either the symbol @code{:system} or the symbol @code{:session}. It
doesn't matter whether another object has registered for @var{signal}.
-@var{service} is the D-Bus service name of the object the signal is
-emitted from. @var{path} is the corresponding D-Bus object path,
-@var{service} is registered at. @var{interface} is an interface
-offered by @var{service}. It must provide @var{signal}.
+Signals can be unicast or broadcast messages. For broadcast messages,
+@var{service} must be @code{nil}. Otherwise, @var{service} is the
+D-Bus service name the signal is sent to as unicast
+message.@footnote{For backward compatibility, a broadcast message is
+also emitted if @var{service} is the known or unique name Emacs is
+registered at D-Bus @var{bus}.} @var{path} is the D-Bus object path
+@var{signal} is sent from. @var{interface} is an interface available
+at @var{path}. It must provide @var{signal}.
All other arguments args are passed to @var{signal} as arguments.
They are converted into D-Bus types as described in @ref{Type
@@ -1591,15 +1663,15 @@ Conversion}. Example:
@lisp
(dbus-send-signal
- :session dbus-service-emacs dbus-path-emacs
- (concat dbus-service-emacs ".FileManager") "FileModified"
+ :session nil dbus-path-emacs
+ (concat dbus-interface-emacs ".FileManager") "FileModified"
"/home/albinus/.emacs")
@end lisp
@end defun
@defun dbus-register-signal bus service path interface signal handler &rest args
-With this function, an application registers for @var{signal} on the
-D-Bus @var{bus}.
+With this function, an application registers for a signal on the D-Bus
+@var{bus}.
@var{bus} is either the symbol @code{:system} or the symbol
@code{:session}.
@@ -1611,24 +1683,46 @@ unique name of the object, owning @var{service} at registration time.
When the corresponding D-Bus object disappears, signals won't be
received any longer.
-When @var{service} is @code{nil}, related signals from all D-Bus
-objects shall be accepted.
-
@var{path} is the corresponding D-Bus object path, @var{service} is
-registered at. It can also be @code{nil} if the path name of incoming
-signals shall not be checked.
+registered at. @var{interface} is an interface offered by
+@var{service}. It must provide @var{signal}.
-@var{interface} is an interface offered by @var{service}. It must
-provide @var{signal}.
+@var{service}, @var{path}, @var{interface} and @var{signal} can be
+@code{nil}. This is interpreted as a wildcard for the respective
+argument.
@var{handler} is a Lisp function to be called when the @var{signal} is
received. It must accept as arguments the output parameters
@var{signal} is sending.
-All other arguments @var{args}, if specified, must be strings. They
-stand for the respective arguments of @var{signal} in their order, and
-are used for filtering as well. A @code{nil} argument might be used
-to preserve the order.
+The remaining arguments @var{args} can be keywords or keyword string
+pairs.@footnote{For backward compatibility, the arguments @var{args}
+can also be just strings. They stand for the respective arguments of
+@var{signal} in their order, and are used for filtering as well. A
+@code{nil} argument might be used to preserve the order.} The meaning
+is as follows:
+
+@itemize
+@item @code{:argN} @var{string}:@*
+@code{:pathN} @var{string}:@*
+This stands for the Nth argument of the signal. @code{:pathN}
+arguments can be used for object path wildcard matches as specified by
+D-Bus, while an @code{:argN} argument requires an exact match.
+
+@item @code{:arg-namespace} @var{string}:@*
+Register for the signals, which first argument defines the service or
+interface namespace @var{string}.
+
+@item @code{:path-namespace} @var{string}:@*
+Register for the object path namespace @var{string}. All signals sent
+from an object path, which has @var{string} as the preceding string,
+are matched. This requires @var{path} to be @code{nil}.
+
+@item @code{:eavesdrop}:@*
+Register for unicast signals which are not directed to the D-Bus
+object Emacs is registered at D-Bus BUS, if the security policy of BUS
+allows this. Otherwise, this argument is ignored.
+@end itemize
@code{dbus-register-signal} returns a Lisp object, which can be used
as argument in @code{dbus-unregister-object} for removing the
@@ -1645,7 +1739,7 @@ registration for @var{signal}. Example:
"org.freedesktop.Hal.Manager" "DeviceAdded"
'my-dbus-signal-handler)
-@result{} ((:system "org.freedesktop.Hal.Manager" "DeviceAdded")
+@result{} ((:signal :system "org.freedesktop.Hal.Manager" "DeviceAdded")
("org.freedesktop.Hal" "/org/freedesktop/Hal/Manager"
my-signal-handler))
@end lisp
@@ -1657,23 +1751,36 @@ The callback function @code{my-dbus-signal-handler} must define one
single string argument therefore. Plugging an USB device to your
machine, when registered for signal @samp{DeviceAdded}, will show you
which objects the GNU/Linux @code{hal} daemon adds.
+
+Some of the match rules have been added to a later version of D-Bus.
+In order to test the availability of such features, you could register
+for a dummy signal, and check the result:
+
+@lisp
+(dbus-ignore-errors
+ (dbus-register-signal
+ :system nil nil nil nil 'ignore :path-namespace "/invalid/path"))
+
+@result{} nil
+@end lisp
@end defun
@node Alternative Buses
-@chapter Alternative buses.
+@chapter Alternative buses and environments.
@cindex bus names
@cindex UNIX domain socket
+@cindex TCP/IP socket
Until now, we have spoken about the system and the session buses,
which are the default buses to be connected to. However, it is
possible to connect to any bus, from which the address is known. This
-is a UNIX domain socket. Everywhere, where a @var{bus} is mentioned
-as argument of a function (the symbol @code{:system} or the symbol
-@code{:session}), this address can be used instead. The connection to
-this bus must be initialized first.
+is a UNIX domain or TCP/IP socket. Everywhere, where a @var{bus} is
+mentioned as argument of a function (the symbol @code{:system} or the
+symbol @code{:session}), this address can be used instead. The
+connection to this bus must be initialized first.
-@defun dbus-init-bus bus
+@defun dbus-init-bus bus &optional private
Establish the connection to D-Bus @var{bus}.
@var{bus} can be either the symbol @code{:system} or the symbol
@@ -1682,30 +1789,90 @@ 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.
-Example: You open another session bus in a terminal window on your host:
+The function returns a number, which counts the connections this Emacs
+session has established to the @var{bus} under the same unique name
+(see @code{dbus-get-unique-name}). It depends on the libraries Emacs
+is linked with, and on the environment Emacs is running. For example,
+if Emacs is linked with the gtk toolkit, and it runs in a GTK-aware
+environment like Gnome, another connection might already be
+established.
-@example
-# eval `dbus-launch --auto-syntax`
-# echo $DBUS_SESSION_BUS_ADDRESS
+When @var{private} is non-@code{nil}, a new connection is established
+instead of reusing an existing one. It results in a new unique name
+at the bus. This can be used, if it is necessary to distinguish from
+another connection used in the same Emacs process, like the one
+established by GTK+. It should be used with care for at least the
+@code{:system} and @code{:session} buses, because other Emacs Lisp
+packages might already use this connection to those buses.
-@print{} unix:abstract=/tmp/dbus-JoFtAVG92w,guid=2f320a1ebe50b7ef58e
-@end example
-
-In Emacs, you can access to this bus via its address:
+Example: You initialize a connection to the AT-SPI bus on your host:
@lisp
(setq my-bus
- "unix:abstract=/tmp/dbus-JoFtAVG92w,guid=2f320a1ebe50b7ef58e")
+ (dbus-call-method
+ :session "org.a11y.Bus" "/org/a11y/bus"
+ "org.a11y.Bus" "GetAddress"))
-@result{} "unix:abstract=/tmp/dbus-JoFtAVG92w,guid=2f320a1ebe50b7ef58e"
+@result{} "unix:abstract=/tmp/dbus-2yzWHOCdSD,guid=a490dd26625870ca1298b6e10000fd7f"
+;; If Emacs is built with gtk support, and you run in a GTK enabled
+;; environment (like a GNOME session), the initialization reuses the
+;; connection established by GTK's atk bindings.
(dbus-init-bus my-bus)
-@result{} nil
+@result{} 2
(dbus-get-unique-name my-bus)
-@result{} ":1.0"
+@result{} ":1.19"
+
+;; Open a new connection to the same bus. This obsoletes the
+;; previous one.
+(dbus-init-bus my-bus 'private)
+
+@result{} 1
+
+(dbus-get-unique-name my-bus)
+
+@result{} ":1.20"
+@end lisp
+
+D-Bus addresses can specify different transport. A possible address
+could be based on TCP/IP sockets, see next example. However, it
+depends on the bus daemon configuration, which transport is supported.
+@end defun
+
+@defun dbus-setenv bus variable value
+Set the value of the @var{bus} environment variable @var{variable} to
+@var{value}.
+
+@var{bus} is either a Lisp symbol, @code{:system} or @code{:session},
+or a string denoting the bus address. Both @var{variable} and
+@var{value} should be strings.
+
+Normally, services inherit the environment of the bus daemon. This
+function adds to or modifies that environment when activating services.
+
+Some bus instances, such as @code{:system}, may disable setting the
+environment. In such cases, or if this feature is not available in
+older D-Bus versions, a @code{dbus-error} error is raised.
+
+As an example, it might be desirable to start X11 enabled services on
+a remote host's bus on the same X11 server the local Emacs is
+running. This could be achieved by
+
+@lisp
+(setq my-bus "unix:host=example.gnu.org,port=4711")
+
+@result{} "unix:host=example.gnu.org,port=4711"
+
+(dbus-init-bus my-bus)
+
+@result{} 1
+
+(dbus-setenv my-bus "DISPLAY" (getenv "DISPLAY"))
+
+@result{} nil
@end lisp
@end defun
@@ -1723,8 +1890,8 @@ If this variable is non-@code{nil}, D-Bus specific debug messages are raised.
@end defvar
Input parameters of @code{dbus-call-method},
-@code{dbus-call-method-non-blocking},
-@code{dbus-call-method-asynchronously}, and
+@code{dbus-call-method-asynchronously}, @code{dbus-send-signal},
+@code{dbus-register-method}, @code{dbus-register-property} and
@code{dbus-register-signal} are checked for correct D-Bus types. If
there is a type mismatch, the Lisp error @code{wrong-type-argument}
@code{D-Bus ARG} is raised.
@@ -1825,7 +1992,7 @@ Example:
@lisp
(defun my-dbus-event-error-handler (event error)
- (when (string-equal (concat dbus-service-emacs ".FileManager")
+ (when (string-equal (concat dbus-interface-emacs ".FileManager")
(dbus-event-interface-name event))
(message "my-dbus-event-error-handler: %S %S" event error)
(signal 'file-error (cdr error))))
diff --git a/doc/misc/emacs-gnutls.texi b/doc/misc/emacs-gnutls.texi
index d429f21fbf6..12e65c9e8dd 100644
--- a/doc/misc/emacs-gnutls.texi
+++ b/doc/misc/emacs-gnutls.texi
@@ -30,9 +30,9 @@ license to the document, as described in section 6 of the license.
@end quotation
@end copying
-@dircategory Emacs lisp libraries
+@dircategory Emacs network features
@direntry
-* GnuTLS: (gnutls). The Emacs GnuTLS Integration.
+* GnuTLS: (emacs-gnutls). The Emacs GnuTLS integration.
@end direntry
@titlepage
diff --git a/doc/misc/ert.texi b/doc/misc/ert.texi
index 6002e678ff1..b357b3d5e67 100644
--- a/doc/misc/ert.texi
+++ b/doc/misc/ert.texi
@@ -4,9 +4,9 @@
@settitle Emacs Lisp Regression Testing
@c %**end of header
-@dircategory Emacs
+@dircategory Emacs misc features
@direntry
-* ERT: (ert). Emacs Lisp Regression Testing.
+* ERT: (ert). Emacs Lisp regression testing tool.
@end direntry
@copying
diff --git a/doc/misc/faq.texi b/doc/misc/faq.texi
index 0f20c41c8eb..9bb3feb52e1 100644
--- a/doc/misc/faq.texi
+++ b/doc/misc/faq.texi
@@ -91,7 +91,6 @@ Emacs, the Emacs manual is often the best starting point.
* Bugs and problems::
* Compiling and installing Emacs::
* Finding Emacs and related packages::
-* Major packages and programs::
* Key bindings::
* Alternate character sets::
* Mail and news::
@@ -196,8 +195,7 @@ pressed.}.
Also, on very few keyboards does @kbd{C-?} generate @acronym{ASCII} code 127.
@c FIXME I cannot understand the previous sentence.
-@inforef{Keys, Keys, emacs}, for more information. (@xref{Emacs
-manual}, for more information about Info.)
+@xref{Keys,,, emacs, The GNU Emacs Manual}.
@node Extended commands
@section What does @file{M-x @var{command}} mean?
@@ -253,7 +251,7 @@ reference to follow it.
Emacs manual.
@node File-name conventions
-@section What are @file{etc/GNU}, @file{src/config.h}, @file{site-lisp/default.el}, etc.?
+@section What are @file{src/config.h}, @file{site-lisp/default.el}, etc.?
@cindex File-name conventions
@cindex Conventions for file names
@cindex Directories and files that come with Emacs
@@ -1050,7 +1048,7 @@ A new command @kbd{customize-themes} allows you to easily change the
appearance of your Emacs.
@item
-Emacs can be compiled with the Gtk+ 3 toolkit.
+Emacs can be compiled with the GTK+ 3 toolkit.
@item
Support for several new external libraries can be included at compile
@@ -1339,7 +1337,7 @@ of files from Macintosh, Microsoft, and Unix platforms.
@cindex Init file, setting up
@cindex Customization file, setting up
-@inforef{Init File, Init File, emacs}.
+@xref{Init File,,, emacs, The GNU Emacs Manual}.
In general, new Emacs users should not be provided with @file{.emacs}
files, because this can cause confusing non-standard behavior. Then
@@ -1354,8 +1352,8 @@ rather than Lisp code.
While Customize might indeed make it easier to configure Emacs,
consider taking a bit of time to learn Emacs Lisp and modifying your
@file{.emacs} directly. Simple configuration options are described
-rather completely in @inforef{Init File, Init File, emacs}, for users
-interested in performing frequently requested, basic tasks.
+rather completely in @ref{Init File,,, emacs, The GNU Emacs Manual},
+for users interested in performing frequently requested, basic tasks.
Sometimes users are unsure as to where their @file{.emacs} file should
be found. Visiting the file as @file{~/.emacs} from Emacs will find
@@ -1371,7 +1369,7 @@ The main Customize entry point is @kbd{M-x customize @key{RET}}. This
command takes you to a buffer listing all the available Customize
groups. From there, you can access all customizable options and faces,
change their values, and save your changes to your init file.
-@inforef{Easy Customization, Easy Customization, emacs}.
+@xref{Easy Customization,,, emacs, The GNU Emacs Manual}.
If you know the name of the group in advance (e.g. ``shell''), use
@kbd{M-x customize-group @key{RET}}.
@@ -1676,16 +1674,16 @@ M-x replace-regexp @key{RET} [^ @key{TAB} C-q @key{LFD} C-q @key{RET} C-q C-l @k
@cindex Searching for newlines
@cindex Replacing newlines
-Use @kbd{C-q C-j}. For more information, see @inforef{Special Isearch,
-Special Input for Incremental Search, emacs}.
-
+Use @kbd{C-q C-j}. For more information,
+@pxref{Special Isearch,, Special Input for Incremental Search, emacs,
+The GNU Emacs Manual}.
@node Yanking text in isearch
@section How do I copy text from the kill ring into the search string?
@cindex Yanking text into the search string
@cindex isearch yanking
-Use @kbd{M-y}. @inforef{Isearch Yank, Isearch Yanking, emacs}.
+Use @kbd{M-y}. @xref{Isearch Yank,,, emacs, The GNU Emacs Manual}.
@node Wrapping words automatically
@section How do I make Emacs wrap words for me?
@@ -2134,7 +2132,7 @@ commands you've typed.
To repeat a set of commands, use keyboard macros. Use @kbd{C-x (} and
@kbd{C-x )} to make a keyboard macro that invokes the command and then
-type @kbd{C-x e}. (@inforef{Keyboard Macros, Keyboard Macros, emacs}.)
+type @kbd{C-x e}. @xref{Keyboard Macros,,, emacs, The GNU Emacs Manual}.
If you're really desperate for the @code{.} command in @code{vi} that
redoes the last insertion/deletion, use VIPER, a @code{vi} emulation
@@ -2146,7 +2144,7 @@ mode which comes with Emacs, and which appears to support it.
@cindex X resources
@cindex Setting X resources
-@inforef{X Resources, X Resources, emacs}.
+@xref{X Resources,,, emacs, The GNU Emacs Manual}.
You can also use a resource editor, such as editres (for X11R5 and
onwards), to look at the resource names for the menu bar, assuming Emacs
@@ -2257,7 +2255,7 @@ See also the variable @code{track-eol} and the command
@cindex Suspending Emacs
@kbd{C-z} iconifies Emacs when running under X and suspends Emacs
-otherwise. @inforef{Frame Commands, Frame Commands, emacs}.
+otherwise. @xref{Frame Commands,,, emacs, The GNU Emacs Manual}.
@node Using regular expressions
@section How do I use regexps (regular expressions) in Emacs?
@@ -2267,7 +2265,7 @@ otherwise. @inforef{Frame Commands, Frame Commands, emacs}.
@cindex Unix regexps, differences from Emacs
@cindex Text strings, putting regexps in
-@inforef{Regexp Backslash, Regexp Backslash, emacs}.
+@xref{Regexp Backslash,,, emacs, The GNU Emacs Manual}.
The @code{or} operator is @samp{\|}, not @samp{|}, and the grouping operators
are @samp{\(} and @samp{\)}. Also, the string syntax for a backslash is
@@ -2324,7 +2322,7 @@ To accept all replacements in each file, hit @kbd{!}.
Another way to do the same thing is to use the ``tags'' feature of
Emacs: it includes the command @code{tags-query-replace} which performs
a query-replace across all the files mentioned in the @file{TAGS} file.
-@inforef{Tags Search, Tags Search, emacs}.
+@xref{Tags Search,,, emacs, The GNU Emacs Manual}.
@node Documentation for etags
@section Where is the documentation for @code{etags}?
@@ -2367,8 +2365,8 @@ the Unix shell, try GNU @code{ls} with the @samp{-B} option. GNU
@code{ls} is part of the GNU Fileutils package, available from
@samp{ftp.gnu.org} and its mirrors (@pxref{Current GNU distributions}).
-To disable or change the way backups are made, @inforef{Backup Names, ,
-emacs}.
+To disable or change the way backups are made,
+@pxref{Backup Names,,, emacs, The GNU Emacs Manual}.
@cindex Backup files in a single directory
Beginning with Emacs 21.1, you can control where Emacs puts backup files
@@ -2398,8 +2396,8 @@ package (@pxref{Packages that do not come with Emacs}). This
package also allows you to place all auto-save files in one directory,
such as @file{/tmp}.
-To disable or change how @code{auto-save-mode} works, @inforef{Auto
-Save, , emacs}.
+To disable or change how @code{auto-save-mode} works,
+@pxref{Auto Save,,, emacs, The GNU Emacs Manual}.
@node Going to a line by number
@section How can I go to a certain line given its number?
@@ -2622,7 +2620,7 @@ consult the documentation of the variables @code{ps-printer-name},
Customize the @code{scroll-conservatively} variable with @kbd{M-x
customize-variable @key{RET} scroll-conservatively @key{RET}} and set it
to a large value like, say, 10000. For an explanation of what this
-means, @inforef{Auto Scrolling, Auto Scrolling, emacs}.
+means, @pxref{Auto Scrolling,,, emacs, The GNU Emacs Manual}.
Alternatively, use the following Lisp form in your @file{.emacs}:
@@ -2693,8 +2691,8 @@ put the following in your @file{.emacs} file:
To avoid the slightly distracting visual effect of Emacs starting with
its default frame size and then growing to fullscreen, you can add an
-@samp{Emacs.Geometry} entry to the Windows registry settings (see
-@pxref{(emacs)X Resources}).
+@samp{Emacs.Geometry} entry to the Windows registry settings.
+@xref{X Resources,,, emacs, The GNU Emacs Manual}.
To compute the correct values for width and height, first maximize the
Emacs frame and then evaluate @code{(frame-height)} and
@@ -3059,7 +3057,7 @@ You can also tell Emacs whether to allow the evaluation of Emacs Lisp
code found at the bottom of files by setting the variable
@code{enable-local-eval}.
-For more information, @inforef{File Variables, File Variables, emacs}.
+@xref{File Variables,,, emacs, The GNU Emacs Manual}.
@item
Synthetic X events. (Yes, a risk; use @samp{MIT-MAGIC-COOKIE-1} or
@@ -3242,6 +3240,7 @@ problem (@pxref{Reporting bugs}).
* Finding Emacs on the Internet::
* Finding a package with particular functionality::
* Packages that do not come with Emacs::
+* Spell-checkers::
* Current GNU distributions::
* Difference between Emacs and XEmacs::
* Emacs for minimalists::
@@ -3323,6 +3322,29 @@ Several packages are stored in
Read the file @file{etc/MORE.STUFF} for more information about
external packages.
+@node Spell-checkers
+@section Spell-checkers
+@cindex Spell-checker
+@cindex Checking spelling
+@cindex Ispell
+@cindex Aspell
+@cindex Hunspell
+
+Various spell-checkers are compatible with Emacs, including:
+
+@table @b
+
+@item GNU Aspell
+@uref{http://aspell.net/}
+
+@item Ispell
+@uref{http://fmg-www.cs.ucla.edu/geoff/ispell.html}
+
+@item Hunspell
+@uref{http://hunspell.sourceforge.net/}
+
+@end table
+
@node Current GNU distributions
@section Where can I get other up-to-date GNU stuff?
@cindex Current GNU distributions
@@ -3443,124 +3465,6 @@ Beginning with version 22.1, Emacs supports Mac OS X natively.
See the file @file{nextstep/INSTALL} in the distribution.
@c ------------------------------------------------------------
-@node Major packages and programs
-@chapter Major packages and programs
-@cindex Major packages and programs
-
-@menu
-* VM::
-* AUCTeX::
-* BBDB::
-* Spell-checkers::
-* Emacs/W3::
-* EDB::
-* JDEE::
-@end menu
-
-@node VM
-@section VM (View Mail) --- another mail reader within Emacs, with MIME support
-@cindex VM
-@cindex Alternative mail software
-@cindex View Mail
-@cindex E-mail reader, VM
-
-@table @b
-
-@item Web site
-@uref{http://launchpad.net/vm}
-(was @uref{http://www.nongnu.org/viewmail/})
-
-@item Informational newsgroup
-@uref{news:gnu.emacs.vm.info}@*
-
-@item Bug reports newsgroup
-@uref{news:gnu.emacs.vm.bug}@*
-@end table
-
-VM was originally written by @uref{http://www.wonderworks.com/vm/,Kyle Jones}.
-@uref{ftp://ftp.wonderworks.com/pub/vm/,Older versions} of VM remain
-available.
-
-
-@node AUCTeX
-@section AUC@TeX{} --- enhanced @TeX{} modes with debugging facilities
-@cindex Mode for @TeX{}
-@cindex @TeX{} mode
-@cindex AUC@TeX{} mode for editing @TeX{}
-@cindex Writing and debugging @TeX{}
-
-AUC@TeX{} is a set of sophisticated major modes for @TeX{}, LaTeX,
-ConTeXt, and Texinfo offering context-sensitive syntax highlighting,
-indentation, formatting and folding, macro completion, @TeX{} shell
-functionality, and debugging. Be also sure to check out
-@ref{Introduction, RefTeX, Introduction, reftex, Ref@TeX{} User Manual}.
-Current versions of AUC@TeX{} include the
-@uref{http://www.gnu.org/software/auctex/preview-latex.html,preview-latex}
-package for WYSIWYG previews of various LaTeX constructs in the Emacs
-source buffer.
-
-@uref{http://www.gnu.org/software/auctex/, AUCTeX}
-
-@node BBDB
-@section BBDB --- personal Info Rolodex integrated with mail/news readers
-@cindex BBDB
-@cindex Rolodex-like functionality
-@cindex Integrated contact database
-@cindex Contact database
-@cindex Big Brother Database
-@cindex Address book
-
-@uref{http://bbdb.sourceforge.net/, The Insidious Big Brother Database}
-
-@node Spell-checkers
-@section Spell-checkers
-@cindex Spell-checker
-@cindex Checking spelling
-@cindex Ispell
-@cindex Aspell
-@cindex Hunspell
-
-Various spell-checkers are compatible with Emacs, including:
-
-@table @b
-
-@item GNU Aspell
-@uref{http://aspell.net/}
-
-@item Ispell
-@uref{http://fmg-www.cs.ucla.edu/geoff/ispell.html}
-
-@item Hunspell
-@uref{http://hunspell.sourceforge.net/}
-
-@end table
-
-@node Emacs/W3
-@section Emacs/W3 --- A World Wide Web browser inside of Emacs
-@cindex WWW browser
-@cindex Web browser
-@cindex HTML browser in Emacs
-@cindex @code{w3-mode}
-
-@uref{http://www.gnu.org/software/w3/, Emacs/W3}
-
-@node EDB
-@section EDB --- Database program for Emacs; replaces forms editing modes
-@cindex EDB
-@cindex Database
-@cindex Forms mode
-
-@uref{http://gnuvola.org/software/edb/, The Emacs Database}
-
-@node JDEE
-@section JDEE --- Integrated development environment for Java
-@cindex Java development environment
-@cindex Integrated Java development environment
-@cindex JDEE
-
-@uref{http://jdee.sourceforge.net/, A Java Development Environment for Emacs}
-
-@c ------------------------------------------------------------
@node Key bindings
@chapter Key bindings
@cindex Key bindings
@@ -3596,7 +3500,7 @@ Keys can be bound to commands either interactively or in your
To bind a key just in the current major mode, type @kbd{M-x
local-set-key @key{RET} @var{key} @var{cmd} @key{RET}}.
-@inforef{Key Bindings, Key Bindings, emacs}, for further details.
+@xref{Key Bindings,,, emacs, The GNU Emacs Manual}.
To make the process of binding keys interactively easier, use the
following ``trick'': First bind the key interactively, then immediately
@@ -3861,8 +3765,8 @@ keymaps.
However, in the specific case of @kbd{C-h} and @key{DEL}, you should
toggle @code{normal-erase-is-backspace-mode} instead of calling
-@code{keyboard-translate}. @inforef{DEL Does Not Delete, DEL Does Not Delete,
-emacs}.
+@code{keyboard-translate}.
+@xref{DEL Does Not Delete,,, emacs, The GNU Emacs Manual}.
Keyboard translations are not the same as key bindings in keymaps.
Emacs contains numerous keymaps that apply in different situations, but
@@ -3990,7 +3894,7 @@ terminals. Non-@acronym{ASCII} keys and mouse events (e.g. @kbd{C-=} and
@cindex @key{Meta} key and @code{xterm}
@cindex Xterm and @key{Meta} key
-@inforef{Unibyte Mode, Single-Byte Character Set Support, emacs}.
+@xref{Unibyte Mode,, Single-Byte Character Set Support, emacs, The GNU Emacs Manual}.
If the advice in the Emacs manual fails, try all of these methods before
asking for further help:
@@ -4114,8 +4018,8 @@ You can get the old behavior by binding @kbd{SPC} to
@cindex Displaying eight-bit characters
@cindex Eight-bit characters, displaying
-@inforef{Unibyte Mode, Single-byte Character Set
-Support, emacs}. On a Unix, when Emacs runs on a text-only terminal
+@xref{Unibyte Mode,, Single-byte Character Set Support, emacs, The GNU
+Emacs Manual}. On a Unix, when Emacs runs on a text-only terminal
display or is invoked with @samp{emacs -nw}, you typically need to use
@code{set-terminal-coding-system} to tell Emacs what the terminal can
display, even after setting the language environment; otherwise
@@ -4130,10 +4034,10 @@ terminal coding system automatically.
@cindex Eight-bit characters, entering
@cindex Input, 8-bit characters
-Various methods are available for input of eight-bit characters. See
-@inforef{Unibyte Mode, Single-byte Character Set
-Support, emacs}. For more sophisticated methods, @inforef{Input
-Methods, Input Methods, emacs}.
+Various methods are available for input of eight-bit characters.
+@xref{Unibyte Mode,, Single-byte Character Set Support, emacs, The GNU
+Emacs Manual}. For more sophisticated methods,
+@pxref{Input Methods,,, emacs, The GNU Emacs Manual}.
@node Right-to-left alphabets
@section Where is an Emacs that can handle Semitic (right-to-left) alphabets?
@@ -4228,7 +4132,7 @@ set up @code{w32-bdf-filename-alist}:
Now, create fontsets for the BDF fonts:
-@lisp
+@smallexample
(create-fontset-from-fontset-spec
"-*-fixed-medium-r-normal-*-16-*-*-*-c-*-fontset-bdf,
japanese-jisx0208:-*-*-medium-r-normal-*-16-*-*-*-c-*-jisx0208.1983-*,
@@ -4240,7 +4144,7 @@ Now, create fontsets for the BDF fonts:
tibetan-1-column:-TibMdXA-fixed-medium-r-normal--16-160-72-72-m-80-MuleTibetan-1,
ethiopic:-Admas-Ethiomx16f-Medium-R-Normal--16-150-100-100-M-160-Ethiopic-Unicode,
tibetan:-TibMdXA-fixed-medium-r-normal--16-160-72-72-m-160-MuleTibetan-0")
-@end lisp
+@end smallexample
Many of the international bdf fonts from Intlfonts are type 0, and
therefore need to be added to font-encoding-alist:
@@ -4472,7 +4376,7 @@ you to start Emacs quickly when you needed to.
Use @kbd{M-x gnus}. For more information on Gnus, @pxref{Top,, the Gnus
Manual, gnus, The Gnus Manual}, which includes @ref{Frequently Asked
-Questions,, the Gnus FAQ, gnus}.
+Questions,, the Gnus FAQ, gnus, The Gnus Manual}.
@node Gnus does not work with NNTP
diff --git a/doc/misc/forms.texi b/doc/misc/forms.texi
index 34c418c14fd..bcb8d8974ea 100644
--- a/doc/misc/forms.texi
+++ b/doc/misc/forms.texi
@@ -861,7 +861,7 @@ you said `no'.
@chapter Long Example
The following example exploits most of the features of Forms mode.
-This example is included in the distribution as file @file{forms-d2.el}.
+This example is included in the distribution as file @file{etc/forms/forms-d2.el}.
@example
;; demo2 -- demo forms-mode -*- emacs-lisp -*-
@@ -869,7 +869,8 @@ This example is included in the distribution as file @file{forms-d2.el}.
;; @r{This sample forms exploit most of the features of forms mode.}
;; @r{Set the name of the data file.}
-(setq forms-file "forms-d2.dat")
+(setq forms-file
+ (expand-file-name "forms/forms-d2.dat" data-directory))
;; @r{Use @code{forms-enumerate} to set field names and number thereof.}
(setq forms-number-of-fields
diff --git a/doc/misc/makefile.w32-in b/doc/misc/makefile.w32-in
index 0f81786cdb5..9e577c351b7 100644
--- a/doc/misc/makefile.w32-in
+++ b/doc/misc/makefile.w32-in
@@ -1,6 +1,6 @@
#### -*- Makefile -*- for documentation other than the Emacs manual.
-# Copyright (C) 2003-2012 Free Software Foundation, Inc.
+# Copyright (C) 2003-2012 Free Software Foundation, Inc.
# This file is part of GNU Emacs.
@@ -30,28 +30,31 @@ infodir = $(srcdir)/../../info
## Currently only used by efaq; could be added to MAKEINFO.
emacsdir = $(srcdir)/../emacs
+INFO_EXT=.info
+INFO_OPTS=--no-split
+
# The makeinfo program is part of the Texinfo distribution.
MAKEINFO = makeinfo
MAKEINFO_OPTS = --force -I$(emacsdir)
MULTI_INSTALL_INFO = $(srcdir)\..\..\nt\multi-install-info.bat
-INFO_TARGETS = $(infodir)/ccmode \
- $(infodir)/cl $(infodir)/dbus $(infodir)/dired-x \
- $(infodir)/ediff $(infodir)/forms $(infodir)/gnus \
- $(infodir)/message $(infodir)/sieve $(infodir)/pgg \
- $(infodir)/emacs-mime $(infodir)/info $(infodir)/mh-e \
- $(infodir)/reftex $(infodir)/sc $(infodir)/vip \
- $(infodir)/viper $(infodir)/widget $(infodir)/efaq \
- $(infodir)/ada-mode $(infodir)/autotype $(infodir)/calc \
- $(infodir)/idlwave $(infodir)/eudc $(infodir)/ebrowse \
- $(infodir)/pcl-cvs $(infodir)/woman $(infodir)/eshell \
- $(infodir)/org $(infodir)/url $(infodir)/speedbar \
- $(infodir)/tramp $(infodir)/ses $(infodir)/smtpmail \
- $(infodir)/flymake $(infodir)/newsticker $(infodir)/rcirc \
- $(infodir)/erc $(infodir)/ert \
- $(infodir)/remember $(infodir)/nxml-mode \
- $(infodir)/epa $(infodir)/mairix-el $(infodir)/sasl \
- $(infodir)/auth $(infodir)/eieio $(infodir)/ede \
- $(infodir)/semantic $(infodir)/edt $(infodir)/emacs-gnutls
+INFO_TARGETS = $(infodir)/ccmode$(INFO_EXT) \
+ $(infodir)/cl$(INFO_EXT) $(infodir)/dbus$(INFO_EXT) $(infodir)/dired-x$(INFO_EXT) \
+ $(infodir)/ediff$(INFO_EXT) $(infodir)/forms$(INFO_EXT) $(infodir)/gnus$(INFO_EXT) \
+ $(infodir)/message$(INFO_EXT) $(infodir)/sieve$(INFO_EXT) $(infodir)/pgg$(INFO_EXT) \
+ $(infodir)/emacs-mime$(INFO_EXT) $(infodir)/info$(INFO_EXT) $(infodir)/mh-e$(INFO_EXT) \
+ $(infodir)/reftex$(INFO_EXT) $(infodir)/sc$(INFO_EXT) $(infodir)/vip$(INFO_EXT) \
+ $(infodir)/viper$(INFO_EXT) $(infodir)/widget$(INFO_EXT) $(infodir)/efaq$(INFO_EXT) \
+ $(infodir)/ada-mode$(INFO_EXT) $(infodir)/autotype$(INFO_EXT) $(infodir)/calc$(INFO_EXT) \
+ $(infodir)/idlwave$(INFO_EXT) $(infodir)/eudc$(INFO_EXT) $(infodir)/ebrowse$(INFO_EXT) \
+ $(infodir)/pcl-cvs$(INFO_EXT) $(infodir)/woman$(INFO_EXT) $(infodir)/eshell$(INFO_EXT) \
+ $(infodir)/org$(INFO_EXT) $(infodir)/url$(INFO_EXT) $(infodir)/speedbar$(INFO_EXT) \
+ $(infodir)/tramp$(INFO_EXT) $(infodir)/ses$(INFO_EXT) $(infodir)/smtpmail$(INFO_EXT) \
+ $(infodir)/flymake$(INFO_EXT) $(infodir)/newsticker$(INFO_EXT) $(infodir)/rcirc$(INFO_EXT) \
+ $(infodir)/erc$(INFO_EXT) $(infodir)/ert$(INFO_EXT) \
+ $(infodir)/remember$(INFO_EXT) $(infodir)/nxml-mode$(INFO_EXT) \
+ $(infodir)/epa$(INFO_EXT) $(infodir)/mairix-el$(INFO_EXT) $(infodir)/sasl$(INFO_EXT) \
+ $(infodir)/auth$(INFO_EXT) $(infodir)/eieio$(INFO_EXT) $(infodir)/ede$(INFO_EXT) \
+ $(infodir)/semantic$(INFO_EXT) $(infodir)/edt$(INFO_EXT) $(infodir)/emacs-gnutls$(INFO_EXT)
DVI_TARGETS = calc.dvi cc-mode.dvi cl.dvi dbus.dvi dired-x.dvi \
ediff.dvi forms.dvi gnus.dvi message.dvi emacs-mime.dvi \
sieve.dvi pgg.dvi mh-e.dvi \
@@ -93,68 +96,68 @@ $(infodir)/dir:
# Some Windows ports of makeinfo seem to require -o to come before the
# texi filename, contrary to GNU standards.
-$(infodir)/info: $(INFOSOURCES)
- $(MAKEINFO) $(MAKEINFO_OPTS) --no-split -o $@ info.texi
+$(infodir)/info$(INFO_EXT): $(INFOSOURCES)
+ $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ info.texi
info.dvi: $(INFOSOURCES)
$(ENVADD) $(TEXI2DVI) $(srcdir)/info.texi
-$(infodir)/ccmode: cc-mode.texi doclicense.texi
- $(MAKEINFO) $(MAKEINFO_OPTS) cc-mode.texi
+$(infodir)/ccmode$(INFO_EXT): cc-mode.texi doclicense.texi
+ $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ cc-mode.texi
cc-mode.dvi: cc-mode.texi doclicense.texi
$(ENVADD) $(TEXI2DVI) $(srcdir)/cc-mode.texi
-$(infodir)/ada-mode: ada-mode.texi doclicense.texi
- $(MAKEINFO) $(MAKEINFO_OPTS) ada-mode.texi
+$(infodir)/ada-mode$(INFO_EXT): ada-mode.texi doclicense.texi
+ $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ ada-mode.texi
ada-mode.dvi: ada-mode.texi doclicense.texi
$(ENVADD) $(TEXI2DVI) $(srcdir)/ada-mode.texi
-$(infodir)/pcl-cvs: pcl-cvs.texi doclicense.texi
- $(MAKEINFO) $(MAKEINFO_OPTS) pcl-cvs.texi
+$(infodir)/pcl-cvs$(INFO_EXT): pcl-cvs.texi doclicense.texi
+ $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ pcl-cvs.texi
pcl-cvs.dvi: pcl-cvs.texi doclicense.texi
$(ENVADD) $(TEXI2DVI) $(srcdir)/pcl-cvs.texi
-$(infodir)/eshell: eshell.texi doclicense.texi
- $(MAKEINFO) $(MAKEINFO_OPTS) eshell.texi
+$(infodir)/eshell$(INFO_EXT): eshell.texi doclicense.texi
+ $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ eshell.texi
eshell.dvi: eshell.texi doclicense.texi
$(ENVADD) $(TEXI2DVI) $(srcdir)/eshell.texi
-$(infodir)/cl: cl.texi doclicense.texi
- $(MAKEINFO) $(MAKEINFO_OPTS) cl.texi
+$(infodir)/cl$(INFO_EXT): cl.texi doclicense.texi
+ $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ cl.texi
cl.dvi: cl.texi doclicense.texi
$(ENVADD) $(TEXI2DVI) $(srcdir)/cl.texi
-$(infodir)/dbus: dbus.texi doclicense.texi
- $(MAKEINFO) $(MAKEINFO_OPTS) dbus.texi
+$(infodir)/dbus$(INFO_EXT): dbus.texi doclicense.texi
+ $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ dbus.texi
dbus.dvi: dbus.texi doclicense.texi
$(ENVADD) $(TEXI2DVI) $(srcdir)/dbus.texi
-$(infodir)/dired-x: dired-x.texi $(emacsdir)/emacsver.texi doclicense.texi
- $(MAKEINFO) $(MAKEINFO_OPTS) dired-x.texi
+$(infodir)/dired-x$(INFO_EXT): dired-x.texi $(emacsdir)/emacsver.texi doclicense.texi
+ $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ dired-x.texi
dired-x.dvi: dired-x.texi $(emacsdir)/emacsver.texi doclicense.texi
$(ENVADD) $(TEXI2DVI) $(srcdir)/dired-x.texi
-$(infodir)/ediff: ediff.texi doclicense.texi
- $(MAKEINFO) $(MAKEINFO_OPTS) ediff.texi
+$(infodir)/ediff$(INFO_EXT): ediff.texi doclicense.texi
+ $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ ediff.texi
ediff.dvi: ediff.texi doclicense.texi
$(ENVADD) $(TEXI2DVI) $(srcdir)/ediff.texi
-$(infodir)/flymake: flymake.texi doclicense.texi
- $(MAKEINFO) $(MAKEINFO_OPTS) flymake.texi
+$(infodir)/flymake$(INFO_EXT): flymake.texi doclicense.texi
+ $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ flymake.texi
flymake.dvi: flymake.texi doclicense.texi
$(ENVADD) $(TEXI2DVI) $(srcdir)/flymake.texi
-$(infodir)/forms: forms.texi doclicense.texi
- $(MAKEINFO) $(MAKEINFO_OPTS) forms.texi
+$(infodir)/forms$(INFO_EXT): forms.texi doclicense.texi
+ $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ forms.texi
forms.dvi: forms.texi doclicense.texi
$(ENVADD) $(TEXI2DVI) $(srcdir)/forms.texi
# gnus/message/emacs-mime/sieve/pgg are part of Gnus:
-$(infodir)/gnus: gnus.texi gnus-overrides.texi message.texi emacs-mime.texi \
+$(infodir)/gnus$(INFO_EXT): gnus.texi gnus-overrides.texi message.texi emacs-mime.texi \
sieve.texi pgg.texi sasl.texi gnus-news.texi gnus-faq.texi \
doclicense.texi
- $(MAKEINFO) $(MAKEINFO_OPTS) gnus.texi
+ $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ gnus.texi
gnus.dvi: gnus.texi gnus-overrides.texi message.texi emacs-mime.texi \
sieve.texi pgg.texi sasl.texi gnus-news.texi gnus-faq.texi \
doclicense.texi
@@ -163,195 +166,195 @@ gnus.dvi: gnus.texi gnus-overrides.texi message.texi emacs-mime.texi \
cp gnustmp.dvi $*.dvi
rm gnustmp.*
#
-$(infodir)/message: message.texi gnus-overrides.texi doclicense.texi
- $(MAKEINFO) $(MAKEINFO_OPTS) message.texi
+$(infodir)/message$(INFO_EXT): message.texi gnus-overrides.texi doclicense.texi
+ $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ message.texi
message.dvi: message.texi gnus-overrides.texi doclicense.texi
$(ENVADD) $(TEXI2DVI) $(srcdir)/message.texi
#
-$(infodir)/emacs-mime: emacs-mime.texi gnus-overrides.texi doclicense.texi
- $(MAKEINFO) $(MAKEINFO_OPTS) --enable-encoding emacs-mime.texi
+$(infodir)/emacs-mime$(INFO_EXT): emacs-mime.texi gnus-overrides.texi doclicense.texi
+ $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ --enable-encoding emacs-mime.texi
emacs-mime.dvi: emacs-mime.texi gnus-overrides.texi doclicense.texi
$(ENVADD) $(TEXI2DVI) $(srcdir)/emacs-mime.texi
#
-$(infodir)/sieve: sieve.texi gnus-overrides.texi doclicense.texi
- $(MAKEINFO) $(MAKEINFO_OPTS) sieve.texi
+$(infodir)/sieve$(INFO_EXT): sieve.texi gnus-overrides.texi doclicense.texi
+ $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ sieve.texi
sieve.dvi: sieve.texi gnus-overrides.texi doclicense.texi
$(ENVADD) $(TEXI2DVI) $(srcdir)/sieve.texi
#
-$(infodir)/pgg: pgg.texi gnus-overrides.texi doclicense.texi
- $(MAKEINFO) $(MAKEINFO_OPTS) pgg.texi
+$(infodir)/pgg$(INFO_EXT): pgg.texi gnus-overrides.texi doclicense.texi
+ $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ pgg.texi
pgg.dvi: pgg.texi gnus-overrides.texi doclicense.texi
$(ENVADD) $(TEXI2DVI) $(srcdir)/pgg.texi
-$(infodir)/mh-e: mh-e.texi doclicense.texi gpl.texi
- $(MAKEINFO) $(MAKEINFO_OPTS) mh-e.texi
+$(infodir)/mh-e$(INFO_EXT): mh-e.texi doclicense.texi gpl.texi
+ $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ mh-e.texi
mh-e.dvi: mh-e.texi doclicense.texi gpl.texi
$(ENVADD) $(TEXI2DVI) $(srcdir)/mh-e.texi
-$(infodir)/reftex: reftex.texi doclicense.texi
- $(MAKEINFO) $(MAKEINFO_OPTS) reftex.texi
+$(infodir)/reftex$(INFO_EXT): reftex.texi doclicense.texi
+ $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ reftex.texi
reftex.dvi: reftex.texi doclicense.texi
$(ENVADD) $(TEXI2DVI) $(srcdir)/reftex.texi
-$(infodir)/remember: remember.texi doclicense.texi
- $(MAKEINFO) $(MAKEINFO_OPTS) remember.texi
+$(infodir)/remember$(INFO_EXT): remember.texi doclicense.texi
+ $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ remember.texi
remember.dvi: remember.texi doclicense.texix
$(ENVADD) $(TEXI2DVI) $(srcdir)/remember.texi
-$(infodir)/sasl: sasl.texi gnus-overrides.texi
- $(MAKEINFO) $(MAKEINFO_OPTS) sasl.texi
+$(infodir)/sasl$(INFO_EXT): sasl.texi gnus-overrides.texi
+ $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ sasl.texi
sasl.dvi: sasl.texi gnus-overrides.texi
$(ENVADD) $(TEXI2DVI) $(srcdir)/sasl.texi
-$(infodir)/sc: sc.texi doclicense.texi
- $(MAKEINFO) $(MAKEINFO_OPTS) sc.texi
+$(infodir)/sc$(INFO_EXT): sc.texi doclicense.texi
+ $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ sc.texi
sc.dvi: sc.texi doclicense.texi
$(ENVADD) $(TEXI2DVI) $(srcdir)/sc.texi
-$(infodir)/vip: vip.texi doclicense.texi
- $(MAKEINFO) $(MAKEINFO_OPTS) vip.texi
+$(infodir)/vip$(INFO_EXT): vip.texi doclicense.texi
+ $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ vip.texi
vip.dvi: vip.texi doclicense.texi
$(ENVADD) $(TEXI2DVI) $(srcdir)/vip.texi
-$(infodir)/viper: viper.texi doclicense.texi
- $(MAKEINFO) $(MAKEINFO_OPTS) viper.texi
+$(infodir)/viper$(INFO_EXT): viper.texi doclicense.texi
+ $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ viper.texi
viper.dvi: viper.texi doclicense.texi
$(ENVADD) $(TEXI2DVI) $(srcdir)/viper.texi
-$(infodir)/widget: widget.texi doclicense.texi
- $(MAKEINFO) $(MAKEINFO_OPTS) widget.texi
+$(infodir)/widget$(INFO_EXT): widget.texi doclicense.texi
+ $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ widget.texi
widget.dvi: widget.texi doclicense.texi
$(ENVADD) $(TEXI2DVI) $(srcdir)/widget.texi
-$(infodir)/efaq: faq.texi $(emacsdir)/emacsver.texi
- $(MAKEINFO) $(MAKEINFO_OPTS) faq.texi
+$(infodir)/efaq$(INFO_EXT): faq.texi $(emacsdir)/emacsver.texi
+ $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ faq.texi
faq.dvi: faq.texi $(emacsdir)/emacsver.texi
$(ENVADD) $(TEXI2DVI) $(srcdir)/faq.texi
-$(infodir)/autotype: autotype.texi doclicense.texi
- $(MAKEINFO) $(MAKEINFO_OPTS) autotype.texi
+$(infodir)/autotype$(INFO_EXT): autotype.texi doclicense.texi
+ $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ autotype.texi
autotype.dvi: autotype.texi doclicense.texi
$(ENVADD) $(TEXI2DVI) $(srcdir)/autotype.texi
-$(infodir)/calc: calc.texi $(emacsdir)/emacsver.texi gpl.texi doclicense.texi
- $(MAKEINFO) $(MAKEINFO_OPTS) calc.texi
+$(infodir)/calc$(INFO_EXT): calc.texi $(emacsdir)/emacsver.texi gpl.texi doclicense.texi
+ $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ calc.texi
calc.dvi: calc.texi $(emacsdir)/emacsver.texi gpl.texi doclicense.texi
$(ENVADD) $(TEXI2DVI) $(srcdir)/calc.texi
# This is produced with --no-split to avoid making files whose
# names clash on DOS 8+3 filesystems
-$(infodir)/idlwave: idlwave.texi doclicense.texi
- $(MAKEINFO) $(MAKEINFO_OPTS) --no-split idlwave.texi
+$(infodir)/idlwave$(INFO_EXT): idlwave.texi doclicense.texi
+ $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ idlwave.texi
idlwave.dvi: idlwave.texi doclicense.texi
$(ENVADD) $(TEXI2DVI) $(srcdir)/idlwave.texi
-$(infodir)/eudc: eudc.texi doclicense.texi
- $(MAKEINFO) $(MAKEINFO_OPTS) eudc.texi
+$(infodir)/eudc$(INFO_EXT): eudc.texi doclicense.texi
+ $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ eudc.texi
eudc.dvi: eudc.texi doclicense.texi
$(ENVADD) $(TEXI2DVI) $(srcdir)/eudc.texi
-$(infodir)/ebrowse: ebrowse.texi doclicense.texi
- $(MAKEINFO) $(MAKEINFO_OPTS) ebrowse.texi
+$(infodir)/ebrowse$(INFO_EXT): ebrowse.texi doclicense.texi
+ $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ ebrowse.texi
ebrowse.dvi: ebrowse.texi doclicense.texi
$(ENVADD) $(TEXI2DVI) $(srcdir)/ebrowse.texi
-$(infodir)/woman: woman.texi doclicense.texi
- $(MAKEINFO) $(MAKEINFO_OPTS) woman.texi
+$(infodir)/woman$(INFO_EXT): woman.texi doclicense.texi
+ $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ woman.texi
woman.dvi: woman.texi doclicense.texi
$(ENVADD) $(TEXI2DVI) $(srcdir)/woman.texi
-$(infodir)/speedbar: speedbar.texi doclicense.texi
- $(MAKEINFO) $(MAKEINFO_OPTS) speedbar.texi
+$(infodir)/speedbar$(INFO_EXT): speedbar.texi doclicense.texi
+ $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ speedbar.texi
speedbar.dvi: speedbar.texi doclicense.texi
$(ENVADD) $(TEXI2DVI) $(srcdir)/speedbar.texi
-$(infodir)/tramp: tramp.texi trampver.texi doclicense.texi
- $(MAKEINFO) $(MAKEINFO_OPTS) tramp.texi
+$(infodir)/tramp$(INFO_EXT): tramp.texi trampver.texi doclicense.texi
+ $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ tramp.texi
tramp.dvi: tramp.texi trampver.texi doclicense.texi
$(ENVADD) $(TEXI2DVI) $(srcdir)/tramp.texi
-$(infodir)/ses: ses.texi doclicense.texi
- $(MAKEINFO) $(MAKEINFO_OPTS) ses.texi
+$(infodir)/ses$(INFO_EXT): ses.texi doclicense.texi
+ $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ ses.texi
ses.dvi: ses.texi doclicense.texi
$(ENVADD) $(TEXI2DVI) $(srcdir)/ses.texi
-$(infodir)/smtpmail: smtpmail.texi doclicense.texi
- $(MAKEINFO) $(MAKEINFO_OPTS) smtpmail.texi
+$(infodir)/smtpmail$(INFO_EXT): smtpmail.texi doclicense.texi
+ $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ smtpmail.texi
smtpmail.dvi: smtpmail.texi doclicense.texi
$(ENVADD) $(TEXI2DVI) $(srcdir)/smtpmail.texi
-$(infodir)/org: org.texi
- $(MAKEINFO) $(MAKEINFO_OPTS) org.texi
+$(infodir)/org$(INFO_EXT): org.texi
+ $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ org.texi
org.dvi: org.texi
$(ENVADD) $(TEXI2DVI) $(srcdir)/org.texi
-$(infodir)/url: url.texi doclicense.texi
- $(MAKEINFO) $(MAKEINFO_OPTS) url.texi
+$(infodir)/url$(INFO_EXT): url.texi doclicense.texi
+ $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ url.texi
url.dvi: url.texi doclicense.texi
$(ENVADD) $(TEXI2DVI) $(srcdir)/url.texi
-$(infodir)/newsticker: newsticker.texi doclicense.texi
- $(MAKEINFO) $(MAKEINFO_OPTS) newsticker.texi
+$(infodir)/newsticker$(INFO_EXT): newsticker.texi doclicense.texi
+ $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ newsticker.texi
newsticker.dvi: newsticker.texi doclicense.texi
$(ENVADD) $(TEXI2DVI) $(srcdir)/newsticker.texi
-$(infodir)/nxml-mode: nxml-mode.texi
- $(MAKEINFO) $(MAKEINFO_OPTS) nxml-mode.texi
+$(infodir)/nxml-mode$(INFO_EXT): nxml-mode.texi
+ $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ nxml-mode.texi
nxml-mod.dvi: nxml-mode.texi
$(ENVADD) $(TEXI2DVI) $(srcdir)/nxml-mode.texi
-$(infodir)/rcirc: rcirc.texi doclicense.texi
- $(MAKEINFO) $(MAKEINFO_OPTS) rcirc.texi
+$(infodir)/rcirc$(INFO_EXT): rcirc.texi doclicense.texi
+ $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ rcirc.texi
rcirc.dvi: rcirc.texi doclicense.texi
$(ENVADD) $(TEXI2DVI) $(srcdir)/rcirc.texi
-$(infodir)/erc: erc.texi gpl.texi doclicense.texi
- $(MAKEINFO) $(MAKEINFO_OPTS) erc.texi
+$(infodir)/erc$(INFO_EXT): erc.texi gpl.texi doclicense.texi
+ $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ erc.texi
erc.dvi: erc.texi gpl.texi doclicense.texi
$(ENVADD) $(TEXI2DVI) $(srcdir)/erc.texi
-$(infodir)/ert: ert.texi
- $(MAKEINFO) $(MAKEINFO_OPTS) ert.texi
+$(infodir)/ert$(INFO_EXT): ert.texi
+ $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ ert.texi
ert.dvi: ert.texi
$(ENVADD) $(TEXI2DVI) $(srcdir)/ert.texi
-$(infodir)/epa: epa.texi
- $(MAKEINFO) $(MAKEINFO_OPTS) epa.texi
+$(infodir)/epa$(INFO_EXT): epa.texi
+ $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ epa.texi
epa.dvi: epa.texi
$(ENVADD) $(TEXI2DVI) $(srcdir)/epa.texi
-$(infodir)/mairix-el: mairix-el.texi
- $(MAKEINFO) $(MAKEINFO_OPTS) mairix-el.texi
+$(infodir)/mairix-el$(INFO_EXT): mairix-el.texi
+ $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ mairix-el.texi
mairix-el.dvi: mairix-el.texi
$(ENVADD) $(TEXI2DVI) $(srcdir)/mairix-el.texi
-$(infodir)/auth: auth.texi gnus-overrides.texi
- $(MAKEINFO) $(MAKEINFO_OPTS) auth.texi
+$(infodir)/auth$(INFO_EXT): auth.texi gnus-overrides.texi
+ $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ auth.texi
auth.dvi: auth.texi gnus-overrides.texi
$(ENVADD) $(TEXI2DVI) $(srcdir)/auth.texi
-$(infodir)/eieio: eieio.texi
- $(MAKEINFO) $(MAKEINFO_OPTS) eieio.texi
+$(infodir)/eieio$(INFO_EXT): eieio.texi
+ $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ eieio.texi
eieio.dvi: eieio.texi
$(ENVADD) $(TEXI2DVI) $(srcdir)/eieio.texi
-$(infodir)/ede: ede.texi
- $(MAKEINFO) $(MAKEINFO_OPTS) ede.texi
+$(infodir)/ede$(INFO_EXT): ede.texi
+ $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ ede.texi
ede.dvi: ede.texi
$(ENVADD) $(TEXI2DVI) $(srcdir)/ede.texi
-$(infodir)/semantic: semantic.texi sem-user.texi doclicense.texi
- $(MAKEINFO) $(MAKEINFO_OPTS) semantic.texi
+$(infodir)/semantic$(INFO_EXT): semantic.texi sem-user.texi doclicense.texi
+ $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ semantic.texi
semantic.dvi: semantic.texi sem-user.texi doclicense.texi
$(ENVADD) $(TEXI2DVI) $(srcdir)/semantic.texi
-$(infodir)/edt: edt.texi doclicense.texi
- $(MAKEINFO) $(MAKEINFO_OPTS) edt.texi
+$(infodir)/edt$(INFO_EXT): edt.texi doclicense.texi
+ $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ edt.texi
edt.dvi: edt.texi doclicense.texi
$(ENVADD) $(TEXI2DVI) $(srcdir)/edt.texi
-$(infodir)/emacs-gnutls: emacs-gnutls.texi doclicense.texi
- $(MAKEINFO) $(MAKEINFO_OPTS) emacs-gnutls.texi
+$(infodir)/emacs-gnutls$(INFO_EXT): emacs-gnutls.texi doclicense.texi
+ $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ emacs-gnutls.texi
emacs-gnutls.dvi: emacs-gnutls.texi doclicense.texi
$(ENVADD) $(TEXI2DVI) $(srcdir)/emacs-gnutls.texi
diff --git a/doc/misc/org.texi b/doc/misc/org.texi
index 67633e1acac..775ff638eef 100644
--- a/doc/misc/org.texi
+++ b/doc/misc/org.texi
@@ -286,7 +286,7 @@ license to the document, as described in section 6 of the license.
@end quotation
@end copying
-@dircategory Emacs
+@dircategory Emacs editing modes
@direntry
* Org Mode: (org). Outline-based notes management and organizer
@end direntry
diff --git a/doc/misc/viper.texi b/doc/misc/viper.texi
index 86455524b1f..94f7e53ce8c 100644
--- a/doc/misc/viper.texi
+++ b/doc/misc/viper.texi
@@ -25,9 +25,7 @@ developing GNU and promoting software freedom.''
@dircategory Emacs misc features
@direntry
-* VIPER: (viper). The newest Emacs VI-emulation mode.
- (also, A VI Plan for Emacs Rescue
- or the VI PERil.)
+* VIPER: (viper). A VI-emulation mode for Emacs.
@end direntry
@finalout
diff --git a/etc/ChangeLog b/etc/ChangeLog
index f2cdfb83c44..ffd9f7d31f6 100644
--- a/etc/ChangeLog
+++ b/etc/ChangeLog
@@ -1,3 +1,19 @@
+2012-05-07 Glenn Morris <rgm@gnu.org>
+
+ * forms/forms-d2.el, forms/forms-pass.el: Move here from ../lisp.
+ * forms/forms-d2.dat: Move to forms/ subdirectory.
+ * forms/README: New.
+
+2012-05-03 Paul Eggert <eggert@cs.ucla.edu>
+
+ * NEWS: Do not limit current-time-string to years 1000..9999.
+
+2012-04-27 Jambunathan K <kjambunathan@gmail.com>
+
+ * org/OrgOdtStyles.xml (OrgDescriptionList): Modify style. With
+ this change, in a description list, if the description paragraph
+ spawns multiple lines then it will correctly indented.
+
2012-04-20 Glenn Morris <rgm@gnu.org>
* CONTRIBUTE: Expand a bit on copyright assignments.
diff --git a/etc/MORE.STUFF b/etc/MORE.STUFF
index 06e0870e4ce..7186047dfb6 100644
--- a/etc/MORE.STUFF
+++ b/etc/MORE.STUFF
@@ -210,8 +210,8 @@ packages that you can install.
Local Variables:
mode: text
-mode: view
-mode: goto-address
+eval: (view-mode 1)
+eval: (goto-address-mode 1)
End:
This file is part of GNU Emacs.
diff --git a/etc/NEWS b/etc/NEWS
index b2c487ba15b..b097757dab6 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -29,6 +29,18 @@ possibly-questionable C code. On a recent GNU system there should be
no warnings; on older and on non-GNU systems the generated warnings
may be useful.
+---
+** Emacs uses libtinfo in preference to libncurses, if available.
+
+---
+** On FreeBSD and NetBSD, configure no longer adds /usr/local/lib and
+/usr/pkg/lib to the linker search path. You must add them yourself if
+you want them.
+
+---
+** On Mac OS X, configure no longer automatically adds the Fink /sw
+directories to the search path. You must add them yourself if you want them.
+
* Startup Changes in Emacs 24.2
@@ -57,6 +69,14 @@ ImageMagick to view images, set
frames, if emacsclient is only told to open a new frame without
specifying any file to visit or expression to evaluate.
++++
+** You can prevent the creation of lock files by setting `create-lockfiles'
+to nil. Use with caution, and only if you really need to.
+
++++
+** Using "unibyte: t" in Lisp source files is obsolete.
+Use "coding: raw-text" instead.
+
* Editing Changes in Emacs 24.2
@@ -74,11 +94,91 @@ character when doing minibuffer filename prompts.
* Changes in Specialized Modes and Packages in Emacs 24.2
-** which-function-mode now applies to all applicable major modes by default.
+** Diff mode
+
+Faces for changes now use the same diff color scheme as in modern VCSes
+where deletions are displayed in red (new faces `diff-refine-removed'
+and `smerge-refined-removed' and new definition of `diff-removed'),
+insertions in green (new faces `diff-refine-added' and
+`smerge-refined-added' and new definition of `diff-added').
+The variable `diff-use-changed-face' defines whether to use
+the face `diff-changed', or `diff-removed' and `diff-added'
+to highlight changes in context diffs.
+
+** `sh-script'
+*** Pairing of parens/quotes uses electric-pair-mode instead of skeleton-pair.
+*** `sh-electric-here-document-mode' now controls auto-insertion of here-docs.
+*** `sh-use-smie' lets you choose a new indentation and navigation code.
+
+** reStructuredText mode
+
+*** Nearly all keys are rebound making room for more keys and comply
+better to usage in other modes. Bindings are described with C-c C-h.
+
+*** Major revision of indentation. Now works very similarly to other modes.
+TAB is your friend.
+
+*** Major revision of filling. Works fine with most of
+reStructuredText syntax. Auto-filling is also supported.
+
+*** Major revision of comment handling.
+
+*** Major revision of fontification. Now works with `jit-lock-mode'.
+
+*** reStructuredText syntax is covered more closely in many cases.
+Among other things this improves the experience for Sphinx users.
+
+*** `rst-insert-list' inserts a new list or continues existing lists.
+
+*** Customization is extended, corrected and improved.
+
+*** Negative prefix argument always works for `rst-adjust'.
+
+*** Window configuration is reset after displaying TOC.
+
+*** There is a package version in `rst-version'.
+
+** New `derived-mode' filter for Ibuffer, bound to `/ M'.
+`/ m' is now bound to filter by used-mode, which used to be bound to `/ M'.
+
+** Apropos
+
+*** The faces used by Apropos are now directly customizable.
+These faces are named `apropos-symbol', `apropos-keybinding', and so on;
+see the `apropos' Custom group for details.
+
+**** The old options whose values specified faces to use were removed
+(i.e. `apropos-symbol-face', `apropos-keybinding-face', etc.).
+
+** Calendar
+
+*** The calendars produced by cal-html include holidays.
+Customize cal-html-holidays to change this.
+
+** Customize
+
+*** `custom-reset-button-menu' now defaults to t.
+
+*** Non-option variables are never matched in `customize-apropos' and
+`customize-apropos-options' (i.e. the prefix argument does nothing for
+these commands now).
** erc will look up server/channel names via auth-source and use the
channel keys found, if any.
+** FFAP
+
+*** The option `ffap-url-unwrap-remote' can now be a list of strings,
+specifying URL types which should be converted to remote file names at
+the FFAP prompt. The default is now '("ftp").
+
+** Follow mode
+
+*** The obsolete variable `follow-mode-off-hook' has been removed.
+
+*** Follow mode no longer works by using advice.
+The option `follow-intercept-processes' has been removed.
+
** The `server-auth-key' variable can be used to set a permanent
shared key for Emacs Server.
@@ -87,12 +187,75 @@ closing brackets to be aligned with the line of the opening bracket.
** FIXME something happened to ses.el, 2012-04-17.
+** which-function-mode now applies to all applicable major modes by default.
+
+** D-Bus
+
++++
+*** New variables `dbus-compiled-version' and `dbus-runtime-version'.
+
++++
+*** The D-Bus object manager interface is implemented.
+
++++
+*** Variables of type :(u)int32 and :(u)int64 accept floating points,
+if their value does not fit into Emacs's integer range.
+
++++
+*** The function `dbus-call-method' works non-blocking now, it can be
+interrupted by C-g. `dbus-call-method-non-blocking' is obsolete.
+
++++
+*** Signals can be sent also as unicast message.
+
++++
+*** The argument list of `dbus-register-signal' has been extended,
+according to the new match rule types of D-Bus. See the manual for
+details.
+
++++
+*** `dbus-init-bus' supports private connections.
+
++++
+*** There is a new function `dbus-setenv'.
+
++++
+** notifications.el supports now version 1.2 of the Notifications API.
+The function `notifications-get-capabilities' returns the supported
+server properties.
+
+** Tabulated List and packages derived from it
+
+*** New command `tabulated-list-sort', bound to `S', sorts the column
+at point, or the Nth column if a numeric prefix argument is given.
+
+** URL
+
+*** Structs made by `url-generic-parse-url' have nil `attributes' slot.
+Previously, this slot stored semicolon-separated attribute-value pairs
+appended to some imap URLs, but this is not compatible with RFC 3986.
+So now the `filename' slot stores the entire path and query components
+and the `attributes' slot is always nil.
+
+*** New function `url-encode-url' for encoding a URI string.
+The `url-retrieve' function now uses this to encode its URL argument,
+in case that is not properly encoded.
+
** Obsolete packages:
+*** assoc.el
+In most cases, assoc+member+push+delq work just as well.
+And in any case it's just a terrible package: ugly semantics, terrible
+inefficiency, and not namespace-clean.
+
+*** bruce.el
+
*** mailpost.el
*** mouse-sel.el
+*** patcomp.el
+
* New Modes and Packages in Emacs 24.2
@@ -104,8 +267,43 @@ Only variables defined using `defcustom' are considered user options.
The function `user-variable-p' is now an obsolete alias for
`custom-variable-p'.
+** `face-spec-set' no longer sets frame-specific attributes when the
+third argument is a frame (that usage was obsolete since Emacs 22.2).
+
++++
+** The arguments of `dbus-register-signal' are no longer just strings,
+but keywords or keyword-string pairs. The old argument list will
+still be supported for Emacs 24.x.
+
+** The following obsolete variables and varaliases have been removed:
+
+*** `facemenu-unlisted-faces'
+*** `rmail-decode-mime-charset'
+
* Lisp changes in Emacs 24.2
+
+** New function `set-temporary-overlay-map'.
+
+** New macros `setq-local' and `defvar-local'.
+
+** New error type and new function `user-error'. Doesn't trigger the debugger.
+
+** Completion
+
+*** New function `completion-table-with-quoting' to handle completion
+in the presence of quoting, such as file completion in shell buffers.
+
+*** New function `completion-table-subvert' to use an existing completion
+table, but with a different prefix.
+
+** Time
+
+*** `current-time-string' no longer requires that its argument's year
+must be in the range 1000..9999. It now works with any year supported
+by the underlying C implementation.
+
+** `automount-dir-prefix' is obsolete.
* Changes in Emacs 24.2 on non-free operating systems
@@ -757,7 +955,7 @@ by default.
(Its name is misleading, since it has nothing to do with MIME
attachments.) The old name is now an obsolete alias to the new name.
-** MH-E has been upgraded to MH-E version 8.3.1.
+** MH-E has been updated to MH-E version 8.3.1.
See MH-E-NEWS for details.
** Modula-2 mode provides auto-indentation.
@@ -769,6 +967,9 @@ Completion is now performed via `completion-at-point', bound to C-M-i
or M-TAB. If `nxml-bind-meta-tab-to-complete-flag' is non-nil (the
default), this performs tag completion.
+** Org mode has been updated to version 7.8.09.
+See ORG-NEWS for details.
+
** Prolog mode has been completely revamped, with lots of additional
functionality such as more intelligent indentation, electricity,
support for more variants, including Mercury, and a lot more.
@@ -1152,6 +1353,8 @@ So do `defcustom' and other forms that call `defvar' as a subroutine.
*** New function `special-variable-p' to check whether a variable is
declared as dynamically bound.
+*** The form ((lambda ...) ...) is deprecated.
+
** An Emacs Lisp testing tool is now included.
Emacs Lisp developers can use this tool to write automated tests for
their code. See the ERT info manual for details.
diff --git a/etc/ORG-NEWS b/etc/ORG-NEWS
new file mode 100644
index 00000000000..a6b31cf1249
--- /dev/null
+++ b/etc/ORG-NEWS
@@ -0,0 +1,948 @@
+ORG NEWS -- history of user-visible changes. -*- org -*-
+
+Copyright (C) 2012 Free Software Foundation, Inc.
+See the end of the file for license conditions.
+
+Please send Org bug reports to emacs-orgmode@gnu.org.
+
+* Incompatible changes
+
+** New keys for TODO sparse trees
+ :PROPERTIES:
+ :OrgVersion: 7.01
+ :END:
+
+ The key =C-c C-v= is now reserved for Org Babel action. TODO sparse
+ trees can still be made with =C-c / t= (all not-done states) and =C-c /
+ T= (specific states).
+
+** The Agenda =org-agenda-ndays= is now obsolete
+ :PROPERTIES:
+ :OrgVersion: 7.4
+ :END:
+
+ The variable =org-agenda-ndays= is obsolete - please use
+ =org-agenda-span= instead.
+
+ Thanks to Julien Danjou for this.
+
+** Changes to the intended use of =org-export-latex-classes=
+ :PROPERTIES:
+ :OrgVersion: 6.35
+ :END:
+
+ So far this variable has been used to specify the complete header of the
+ LaTeX document, including all the =\usepackage= calls necessary for the
+ document. This setup makes it difficult to maintain the list of
+ packages that Org itself would like to call, for example for the special
+ symbol support it needs.
+
+ First of all, you can *opt out of this change* in the following way: You
+ can say: /I want to have full control over headers, and I will take
+ responsibility to include the packages Org needs/. If that is what you
+ want, add this to your configuration and skip the rest of this section
+ (except maybe for the description of the =[EXTRA]= place holder):
+
+ #+begin_src emacs-lisp
+ (setq org-export-latex-default-packages-alist nil
+ org-export-latex-packages-alist nil)
+ #+end_src
+
+ /Continue to read here if you want to go along with the modified setup./
+
+ There are now two variables that should be used to list the LaTeX
+ packages that need to be included in all classes. The header definition
+ in =org-export-latex-classes= should then not contain the corresponding
+ =\usepackage= calls (see below).
+
+ The two new variables are:
+
+ 1. =org-export-latex-default-packages-alist= :: This is the variable
+ where Org-mode itself puts the packages it needs. Normally you
+ should not change this variable. The only reason to change it
+ anyway is when one of these packages causes a conflict with another
+ package you want to use. Then you can remove that packages and
+ hope that you are not using Org-mode functionality that needs it.
+
+ 2. =org-export-latex-packages-alist= :: This is the variable where you
+ can put the packages that you'd like to use across all classes.
+
+ The sequence how these customizations will show up in the LaTeX
+ document are:
+
+ 1. Header from =org-export-latex-classes=
+ 2. =org-export-latex-default-packages-alist=
+ 3. =org-export-latex-packages-alist=
+ 4. Buffer-specific things set with =#+LaTeX_HEADER:=
+
+ If you want more control about which segment is placed where, or if you
+ want, for a specific class, have full control over the header and
+ exclude some of the automatic building blocks, you can put the following
+ macro-like place holders into the header:
+
+ #+begin_example
+ [DEFAULT-PACKAGES] \usepackage statements for default packages
+ [NO-DEFAULT-PACKAGES] do not include any of the default packages
+ [PACKAGES] \usepackage statements for packages
+ [NO-PACKAGES] do not include the packages
+ [EXTRA] the stuff from #+LaTeX_HEADER
+ [NO-EXTRA] do not include #+LaTeX_HEADER stuff
+ #+end_example
+
+ If you have currently customized =org-export-latex-classes=, you should
+ revise that customization and remove any package calls that are covered
+ by =org-export-latex-default-packages-alist=. This applies to the
+ following packages:
+
+ - inputenc
+ - fontenc
+ - fixltx2e
+ - graphicx
+ - longtable
+ - float
+ - wrapfig
+ - soul
+ - t1enc
+ - textcomp
+ - marvosym
+ - wasysym
+ - latexsym
+ - amssymb
+ - hyperref
+
+ If one of these packages creates a conflict with another package you are
+ using, you can remove it from =org-export-latex-default-packages-alist=.
+ But then you risk that some of the advertised export features of Org
+ will not work properly.
+
+ You can also consider moving packages that you use in all classes to
+ =org-export-latex-packages-alist=. If necessary, put the place holders
+ so that the packages get loaded in the right sequence. As said above,
+ for backward compatibility, if you omit the place holders, all the
+ variables will dump their content at the end of the header.
+
+** The constant =org-html-entities= is obsolete
+ :PROPERTIES:
+ :OrgVersion: 6.35
+ :END:
+
+ Its content is now part of the new constant =org-entities=, which is
+ defined in the file org-entities.el. =org-html-entities= was an internal
+ variable, but it is possible that some users did write code using it.
+
+** `org-bbdb-anniversary-format-alist' has changed
+ :PROPERTIES:
+ :OrgVersion: 7.5
+ :END:
+
+ Please check the docstring and update your settings accordingly.
+
+** Deleted =org-mode-p=
+ :PROPERTIES:
+ :OrgVersion: 7.8
+ :END:
+
+ This function has been deleted: please update your code.
+
+* Important new features
+
+** New Org to ODT exporter
+ :PROPERTIES:
+ :OrgVersion: 7.8
+ :END:
+
+ Jambunathan's Org to ODT exporter is now part of Org.
+
+ To use it, it `C-c C-e o' in an Org file. See the documentation for more
+ information on how to customize it.
+
+** org-capture.el is now the default capture system
+ :PROPERTIES:
+ :OrgVersion: 7.01
+ :END:
+
+ This replaces the earlier system org-remember. The manual only describes
+ org-capture, but for people who prefer to continue to use org-remember,
+ we keep a static copy of the former manual section [[http://orgmode.org/org-remember.pdf][chapter about
+ remember]].
+
+ The new system has a technically cleaner implementation and more
+ possibilities for capturing different types of data. See [[http://thread.gmane.org/gmane.emacs.orgmode/26441/focus%3D26441][Carsten's
+ announcement]] for more details.
+
+ To switch over to the new system:
+
+ 1. Run
+
+ : M-x org-capture-import-remember-templates RET
+
+ to get a translated version of your remember templates into the
+ new variable =org-capture-templates=. This will "mostly" work,
+ but maybe not for all cases. At least it will give you a good
+ place to modify your templates. After running this command,
+ enter the customize buffer for this variable with
+
+ : M-x customize-variable RET org-capture-templates RET
+
+ and convince yourself that everything is OK. Then save the
+ customization.
+
+ 2. Bind the command =org-capture= to a key, similar to what you did
+ with org-remember:
+
+ : (define-key global-map "\C-cc" 'org-capture)
+
+ If your fingers prefer =C-c r=, you can also use this key once
+ you have decided to move over completely to the new
+ implementation. During a test time, there is nothing wrong
+ with using both system in parallel.
+
+* New libraries
+
+** New Org libraries
+*** org-eshell.el (Konrad Hinsen)
+ :PROPERTIES:
+ :OrgVersion: 7.8
+ :END:
+
+ Implement links to eshell buffers.
+
+*** org-special-blocks (Carsten Dominik)
+ :PROPERTIES:
+ :OrgVersion: 7.8
+ :END:
+
+This package generalizes the #+begin_foo and #+end_foo tokens.
+
+To use, put the following in your init file:
+
+#+BEGIN_EXAMPLE
+(require 'org-special-blocks)
+#+END_EXAMPLE
+
+The tokens #+begin_center, #+begin_verse, etc. existed previously. This
+package generalizes them (at least for the LaTeX and html exporters). When
+a #+begin_foo token is encountered by the LaTeX exporter, it is expanded
+into \begin{foo}. The text inside the environment is not protected, as
+text inside environments generally is. When #+begin_foo is encountered by
+the html exporter, a div with class foo is inserted into the HTML file. It
+is up to the user to add this class to his or her stylesheet if this div is
+to mean anything.
+
+*** org-taskjuggler.el (Christian Egli)
+ :PROPERTIES:
+ :OrgVersion: 7.01
+ :END:
+
+ Christian Egli's /org-taskjuggler.el/ module is now part of Org. He
+ also wrote a [[http://orgmode.org/worg/org-tutorials/org-taskjuggler.php][tutorial]] for it.
+
+*** org-ctags.el (Paul Sexton)
+ :PROPERTIES:
+ :OrgVersion: 6.34
+ :END:
+
+ Targets like =<<my target>>= can now be found by Emacs' etag
+ functionality, and Org-mode links can be used to to link to etags, also
+ in non-Org-mode files. For details, see the file /org-ctags.el/.
+
+ This feature uses a new hook =org-open-link-functions= which will call
+ function to do something special with text links.
+
+ Thanks to Paul Sexton for this contribution.
+
+*** org-docview.el (Jan Böcker)
+ :PROPERTIES:
+ :OrgVersion: 6.34
+ :END:
+
+ This new module allows links to various file types using docview, where
+ Emacs displays images of document pages. Docview link types can point
+ to a specific page in a document, for example to page 131 of the
+ Org-mode manual:
+
+ : [[docview:~/.elisp/org/doc/org.pdf::131][Org-Mode Manual]]
+
+ Thanks to Jan Böcker for this contribution.
+
+** New Babel libraries
+
+- ob-picolisp.el (Thorsten Jolitz)
+- ob-fortran.el (Sergey Litvinov)
+- ob-shen.el (Eric Schulte)
+- ob-maxima.el (Eric S Fraga)
+- ob-java.el (Eric Schulte)
+- ob-lilypond.el (Martyn Jago)
+- ob-awk.el (Eric Schulte)
+
+* Other new features and various enhancements
+
+** Hyperlinks
+
+*** Org-Bibtex -- major improvements
+ :PROPERTIES:
+ :OrgVersion: 7.6
+ :END:
+
+ Provides support for managing bibtex bibliographical references
+ data in headline properties. Each headline corresponds to a
+ single reference and the relevant bibliographic meta-data is
+ stored in headline properties, leaving the body of the headline
+ free to hold notes and comments. Org-bibtex is aware of all
+ standard bibtex reference types and fields.
+
+ The key new functions are
+
+- org-bibtex-check :: queries the user to flesh out all required
+ (and with prefix argument optional) bibtex fields available
+ for the specific reference =type= of the current headline.
+
+- org-bibtex-create :: Create a new entry at the given level,
+ using org-bibtex-check to flesh out the relevant fields.
+
+- org-bibtex-yank :: Yank a bibtex entry on the kill ring as a
+ formatted Org-mode headline into the current buffer
+
+- org-bibtex-export-to-kill-ring :: Export the current headline
+ to the kill ring as a formatted bibtex entry.
+
+
+
+*** org-gnus.el now allows link creation from messages
+ :PROPERTIES:
+ :OrgVersion: 7.5
+ :END:
+
+ You can now create links from messages. This is particularily
+ useful when the user wants to stored messages that he sends, for
+ later check. Thanks to Ulf Stegemann for the patch.
+
+
+
+*** Modified link escaping
+ :PROPERTIES:
+ :OrgVersion: 7.5
+ :END:
+
+ David Maus worked on `org-link-escape'. See [[http://article.gmane.org/gmane.emacs.orgmode/37888][his message]]:
+
+: Percent escaping is used in Org mode to escape certain characters
+: in links that would either break the parser (e.g. square brackets
+: in link target oder description) or are not allowed to appear in
+: a particular link type (e.g. non-ascii characters in a http:
+: link).
+:
+: With this change in place Org will apply percent escaping and
+: unescaping more consistently especially for non-ascii characters.
+: Additionally some of the outstanding bugs or glitches concerning
+: percent escaped links are solved.
+
+ Thanks a lot to David for this work.
+
+
+
+*** Make =org-store-link= point to directory in a dired buffer
+ :PROPERTIES:
+ :OrgVersion: 6.35
+ :END:
+
+ When, in a dired buffer, the cursor is not in a line listing a
+ file, `org-store-link' will store a link to the directory.
+
+ Patch by Stephen Eglen.
+
+
+
+*** Allow regexps in =org-file-apps= to capture link parameters
+ :PROPERTIES:
+ :OrgVersion: 6.35
+ :END:
+
+ The way extension regexps in =org-file-apps= are handled has
+ changed. Instead of matching against the file name, the regexps
+ are now matched against the whole link, and you can use grouping
+ to extract link parameters which you can then use in a command
+ string to be executed.
+
+ For example, to allow linking to PDF files using the syntax
+ =file:/doc.pdf::<page number>=, you can add the following entry to
+ org-file-apps:
+
+ #+begin_example
+ Extension: \.pdf::\([0-9]+\)\'
+ Command: evince "%s" -p %1
+ #+end_example
+
+ Thanks to Jan Böcker for a patch to this effect.
+
+** Dates and time
+
+*** Allow relative time when scheduling/adding a deadline
+ :PROPERTIES:
+ :OrgVersion: 7.7
+ :END:
+
+ You can now use relative duration strings like "-2d" or "++3w"
+ when calling =org-schedule= or =org-deadline=: it will schedule
+ (or set the deadline for) the item respectively two days before
+ today and three weeks after the current timestamp, if any.
+
+ You can use this programmatically: =(org-schedule nil "+2d")=
+ will work on the current entry.
+
+ You can also use this while (bulk-)rescheduling and
+ (bulk-)resetting the deadline of (several) items from the agenda.
+
+ Thanks to Memnon Anon for a heads up about this!
+
+
+
+
+*** American-style dates are now understood by =org-read-date=
+ :PROPERTIES:
+ :OrgVersion: 6.35
+ :END:
+
+ So when you are prompted for a date, you can now answer like this
+
+ #+begin_example
+ 2/5/3 --> 2003-02-05
+ 2/5 --> <CURRENT-YEAR>-02-05
+ #+end_example
+
+** Agenda
+
+*** =org-agenda-custom-commands= has a default value
+ :PROPERTIES:
+ :OrgVersion: 7.8
+ :END:
+
+ This option used to be `nil' by default. This now has a default
+ value, displaying an agenda and all TODOs. See the docstring for
+ details. Thanks to Carsten for this.
+
+
+*** Improved filtering through =org-agenda-to-appt=
+ :PROPERTIES:
+ :OrgVersion: 7.8
+ :END:
+
+ The new function allows the user to refine the scope of entries
+ to pass to =org-agenda-get-day-entries= and allows to filter out
+ entries using a function.
+
+ Thanks to Peter MĂĽnster for raising a related issue and to
+ Tassilo Horn for this idea. Also thanks to Peter MĂĽnster for
+ [[git:68ffb7a7][fixing a small bug]] in the final implementation.
+
+
+
+*** Allow ap/pm times in agenda time grid
+ :PROPERTIES:
+ :OrgVersion: 7.4
+ :END:
+
+ Times in the agenda can now be displayed in am/pm format. See the new
+ variable =org-agenda-timegrid-use-ampm=. Thanks to C. A. Webber for
+ a patch to this effect.
+
+
+
+*** Agenda: Added a bulk "scattering" command
+ :PROPERTIES:
+ :OrgVersion: 7.4
+ :END:
+
+ =B S= in the agenda buffer will cause tasks to be rescheduled a random
+ number of days into the future, with 7 as the default. This is useful
+ if you've got a ton of tasks scheduled for today, you realize you'll
+ never deal with them all, and you just want them to be distributed
+ across the next N days. When called with a prefix arg, rescheduling
+ will avoid weekend days.
+
+ Thanks to John Wiegley for this.
+
+** Exporting
+
+*** Simplification of org-export-html-preamble/postamble
+ :PROPERTIES:
+ :OrgVersion: 7.5
+ :END:
+
+ When set to `t', export the preamble/postamble as usual, honoring the
+ =org-export-email/author/creator-info= variables.
+
+ When set to a formatting string, insert this string. See the docstring
+ of these variable for details about available %-sequences.
+
+ You can set =:html-preamble= in publishing project in the same way: `t'
+ means to honor =:email/creator/author-info=, and a formatting string
+ will insert a string.
+
+*** New exporters to Latin-1 and UTF-8
+ :PROPERTIES:
+ :OrgVersion: 6.35
+ :END:
+
+ While Ulf Stegemann was going through the entities list to improve the
+ LaTeX export, he had the great idea to provide representations for many
+ of the entities in Latin-1, and for all of them in UTF-8. This means
+ that we can now export files rich in special symbols to Latin-1 and to
+ UTF-8 files. These new exporters can be reached with the commands =C-c
+ C-e n= and =C-c C-e u=, respectively.
+
+ When there is no representation for a given symbol in the targeted
+ coding system, you can choose to keep the TeX-macro-like
+ representation, or to get an "explanatory" representation. For
+ example, =\simeq= could be represented as "[approx. equal to]". Please
+ use the variable =org-entities-ascii-explanatory= to state your
+ preference.
+
+*** HTML export: Add class to outline containers using property
+ :PROPERTIES:
+ :OrgVersion: 6.35
+ :END:
+
+ The =HTML_CONTAINER_CLASS= property can now be used to add a class name
+ to the outline container of a node in HTML export.
+
+*** Throw an error when creating an image from a LaTeX snippet fails
+ :PROPERTIES:
+ :OrgVersion: 6.35
+ :END:
+
+ This behavior can be configured with the new option variable
+ =org-format-latex-signal-error=.
+
+*** Support for creating BEAMER presentations from Org-mode documents
+ :PROPERTIES:
+ :OrgVersion: 6.34
+ :END:
+
+ Org-mode documents or subtrees can now be converted directly in to
+ BEAMER presentation. Turning a tree into a simple presentations is
+ straight forward, and there is also quite some support to make richer
+ presentations as well. See the [[http://orgmode.org/manual/Beamer-class-export.html#Beamer-class-export][BEAMER section]] in the manual for more
+ details.
+
+ Thanks to everyone who has contributed to the discussion about BEAMER
+ support and how it should work. This was a great example for how this
+ community can achieve a much better result than any individual could.
+
+** Refiling
+
+*** Refile targets can now be cached
+ :PROPERTIES:
+ :OrgVersion: 7.01
+ :END:
+
+ You can turn on caching of refile targets by setting the variable
+ =org-refile-use-cache=. This should speed up refiling if you have many
+ eligible targets in many files. If you need to update the cache
+ because Org misses a newly created entry or still offers a deleted one,
+ press =C-0 C-c C-w=.
+
+*** New logging support for refiling
+ :PROPERTIES:
+ :OrgVersion: 6.35
+ :END:
+
+ Whenever you refile an item, a time stamp and even a note can be added
+ to this entry. For details, see the new option =org-log-refile=.
+
+ Thanks to Charles Cave for this idea.
+
+** Completion
+
+*** In-buffer completion is now done using John Wiegleys pcomplete.el
+ :PROPERTIES:
+ :OrgVersion: 7.4
+ :END:
+
+ Thanks to John Wiegley for much of this code.
+
+** Tables
+
+*** New command =org-table-transpose-table-at-point=
+ :PROPERTIES:
+ :OrgVersion: 7.8
+ :END:
+
+ See the docstring. This hack from Juan Pechiar is now part of Org's
+ core. Thanks to Juan!
+
+*** Display field's coordinates when editing it with =C-c `=
+ :PROPERTIES:
+ :OrgVersion: 7.7
+ :END:
+
+ When editing a field with =C-c `=, the field's coordinate will the
+ displayed in the buffer.
+
+ Thanks to Michael Brand for a patch to this effect.
+
+*** Spreadsheet computation of durations and time values
+ :PROPERTIES:
+ :OrgVersion: 7.6
+ :END:
+
+ If you want to compute time values use the =T= flag, either in Calc
+ formulas or Elisp formulas:
+
+ | Task 1 | Task 2 | Total |
+ |--------+--------+---------|
+ | 35:00 | 35:00 | 1:10:00 |
+ #+TBLFM: @2$3=$1+$2;T
+
+ Values must be of the form =[HH:]MM:SS=, where hours are optional.
+
+ Thanks to Martin Halder, Eric Schulte and Carsten for code and feedback
+ on this.
+
+*** Implement formulas applying to field ranges
+ :PROPERTIES:
+ :OrgVersion: 7.5
+ :END:
+
+ Carsten implemented this field-ranges formulas.
+
+ : A frequently requested feature for tables has been to be able to define
+ : row formulas in a way similar to column formulas. The patch below allows
+ : things like
+ :
+ : @3=
+ : @2$2..@5$7=
+ : @I$2..@II$4=
+ :
+ : as the left hand side for table formulas in order to write a formula that
+ : is valid for an entire column or for a rectangular section in a
+ : table.
+
+ Thanks a lot to Carsten for this.
+
+*** Sending radio tables from org buffers is now allowed
+ :PROPERTIES:
+ :OrgVersion: 7.4
+ :END:
+
+ Org radio tables can no also be sent inside Org buffers. Also, there
+ is a new hook which get called after a table has been sent.
+
+ Thanks to Seweryn Kokot.
+
+** Lists
+
+*** Improved handling of lists
+ :PROPERTIES:
+ :OrgVersion: 7.5
+ :END:
+
+ Nicolas Goaziou extended and improved the way Org handles lists.
+
+ 1. Indentation of text determines again end of items in lists. So, some
+ text less indented than the previous item doesn't close the whole
+ list anymore, only all items more indented than it.
+
+ 2. Alphabetical bullets are implemented, through the use of the
+ variable `org-alphabetical-lists'. This also adds alphabetical
+ counters like [@c] or [@W].
+
+ 3. Lists can now safely contain drawers, inline tasks, or various
+ blocks, themselves containing lists. Two variables are controlling
+ this: `org-list-forbidden-blocks', and `org-list-export-context'.
+
+ 4. Improve `newline-and-indent' (C-j): used in an item, it will keep
+ text from moving at column 0. This allows to split text and make
+ paragraphs and still not break the list.
+
+ 5. Improve `org-toggle-item' (C-c -): used on a region with standard
+ text, it will change the region into one item. With a prefix
+ argument, it will fallback to the previous behavior and make every
+ line in region an item. It permits to easily integrate paragraphs
+ inside a list.
+
+ 6. `fill-paragraph' (M-q) now understands lists. It can freely be used
+ inside items, or on text just after a list, even with no blank line
+ around, without breaking list structure.
+
+ Thanks a lot to Nicolas for all this!
+
+** Inline display of linked images
+ :PROPERTIES:
+ :OrgVersion: 6.36
+ :END:
+
+ Images can now be displayed inline. The key C-c C-x C-v does toggle the
+ display of such images. Note that only image links that have no
+ description part will be inlined.
+
+** Implement offsets for ordered lists
+ :PROPERTIES:
+ :OrgVersion: 6.36
+ :END:
+
+ If you want to start an ordered plain list with a number different from
+ 1, you can now do it like this:
+
+ : 1. [@start:12] will star a lit a number 12
+
+** Babel: code block body expansion for table and preview
+ :PROPERTIES:
+ :OrgVersion: 6.36
+ :END:
+
+ In org-babel, code is "expanded" prior to evaluation. I.e. the code that
+ is actually evaluated comprises the code block contents, augmented with
+ the extra code which assigns the referenced data to variables. It is now
+ possible to preview expanded contents, and also to expand code during
+ during tangling. This expansion takes into account all header arguments,
+ and variables.
+
+ A new key-binding `C-c M-b p' bound to `org-babel-expand-src-block' can
+ be used from inside of a source code block to preview its expanded
+ contents (which can be very useful for debugging). tangling
+
+ The expanded body can now be tangled, this includes variable values
+ which may be the results of other source-code blocks, or stored in
+ headline properties or tables. One possible use for this is to allow
+ those using org-babel for their emacs initialization to store values
+ (e.g. usernames, passwords, etc...) in headline properties or in tables.
+
+ Org-babel now supports three new header arguments, and new default
+ behavior for handling horizontal lines in tables (hlines), column names,
+ and rownames across all languages.
+
+** Editing Convenience and Appearance
+
+*** New command =org-copy-visible= (=C-c C-x v=)
+ :PROPERTIES:
+ :OrgVersion: 7.7
+ :END:
+
+ This command will copy the visible text in the region into the kill
+ ring. Thanks to Florian Beck for this function and to Carsten for
+ adding it to org.el and documenting it!
+
+*** Make it possible to protect hidden subtrees from being killed by =C-k=
+ :PROPERTIES:
+ :OrgVersion: 7.01
+ :END:
+
+ See the new variable =org-ctrl-k-protect-subtree=. This was a request
+ by Scott Otterson.
+
+*** Implement pretty display of entities, sub-, and superscripts.
+ :PROPERTIES:
+ :OrgVersion: 7.01
+ :END:
+
+ The command =C-c C-x \= toggles the display of Org's special entities
+ like =\alpha= as pretty unicode characters. Also, sub and superscripts
+ are displayed in a pretty way (raised/lower display, in a smaller
+ font). If you want to exclude sub- and superscripts, see the variable
+ =org-pretty-entities-include-sub-superscripts=.
+
+ Thanks to Eric Schulte and Ulf Stegeman for making this possible.
+
+*** New faces for title, date, author and email address lines
+ :PROPERTIES:
+ :OrgVersion: 6.35
+ :END:
+
+ The keywords in these lines are now dimmed out, and the title is
+ displayed in a larger font, and a special font is also used for author,
+ date, and email information. This is implemented by the following new
+ faces:
+
+ =org-document-title=
+ =org-document-info=
+ =org-document-info-keyword=
+
+ In addition, the variable =org-hidden-keywords= can be used to make the
+ corresponding keywords disappear.
+
+ Thanks to Dan Davison for this feature.
+
+*** Simpler way to specify faces for tags and todo keywords
+ :PROPERTIES:
+ :OrgVersion: 6.35
+ :END:
+
+ The variables =org-todo-keyword-faces=, =org-tag-faces=, and
+ =org-priority-faces= now accept simple color names as specifications.
+ The colors will be used as either foreground or background color for
+ the corresponding keyword. See also the variable
+ =org-faces-easy-properties=, which governs which face property is
+ affected by this setting.
+
+ This is really a great simplification for setting keyword faces. The
+ change is based on an idea and patch by Ryan Thompson.
+
+*** <N> in tables now means fixed width, not maximum width
+ :PROPERTIES:
+ :OrgVersion: 6.35
+ :END:
+
+ Requested by Michael Brand.
+
+*** Better level cycling function
+ :PROPERTIES:
+ :OrgVersion: 6.35
+ :END:
+
+ =TAB= in an empty headline cycles the level of that headline through
+ likely states. Ryan Thompson implemented an improved version of this
+ function, which does not depend upon when exactly this command is used.
+ Thanks to Ryan for this improvement.
+
+*** Adaptive filling
+ :PROPERTIES:
+ :OrgVersion: 6.35
+ :END:
+
+ For paragraph text, =org-adaptive-fill-function= did not handle the
+ base case of regular text which needed to be filled. This is now
+ fixed. Among other things, it allows email-style ">" comments to be
+ filled correctly.
+
+ Thanks to Dan Hackney for this patch.
+
+*** `org-reveal' (=C-c C-r=) also decrypts encrypted entries (org-crypt.el)
+ :PROPERTIES:
+ :OrgVersion: 6.35
+ :END:
+
+ Thanks to Richard Riley for triggering this change.
+
+*** Better automatic letter selection for TODO keywords
+ :PROPERTIES:
+ :OrgVersion: 6.35
+ :END:
+
+ When all first letters of keywords have been used, Org now assigns more
+ meaningful characters based on the keywords.
+
+ Thanks to Mikael Fornius for this patch.
+
+** Clocking
+
+*** Clock: Allow synchronous update of timestamps in CLOCK log
+ :PROPERTIES:
+ :OrgVersion: 7.7
+ :END:
+
+ Using =S-M-<up/down>= on CLOCK log timestamps will increase/decrease
+ the two timestamps on this line so that duration will keep the same.
+ Note that duration can still be slightly modified in case a timestamp
+ needs some rounding.
+
+ Thanks to Rainer Stengele for this idea.
+
+*** Localized clock tables
+ :PROPERTIES:
+ :OrgVersion: 7.5
+ :END:
+
+ Clock tables now support a new new =:lang= parameter, allowing the user
+ to customize the localization of the table headers. See the variable
+ =org-clock-clocktable-language-setup= which controls available
+ translated strings.
+
+*** Show clock overruns in mode line
+ :PROPERTIES:
+ :OrgVersion: 6.35
+ :END:
+
+ When clocking an item with a planned effort, overrunning the planned
+ time is now made visible in the mode line, for example using the new
+ face =org-mode-line-clock-overrun=, or by adding an extra string given
+ by =org-task-overrun-text=.
+
+ Thanks to Richard Riley for a patch to this effect.
+
+*** Clock reports can now include the running, incomplete clock
+ :PROPERTIES:
+ :OrgVersion: 6.35
+ :END:
+
+ If you have a clock running, and the entry being clocked falls into the
+ scope when creating a clock table, the time so far spent can be added
+ to the total. This behavior depends on the setting of
+ =org-clock-report-include-clocking-task=. The default is =nil=.
+
+ Thanks to Bernt Hansen for this useful addition.
+
+** Misc
+
+*** Improvements with inline tasks and indentation
+ :PROPERTIES:
+ :OrgVersion: 7.4
+ :END:
+
+ There is now a configurable way on how to export inline tasks. See the
+ new variable =org-inlinetask-export-templates=.
+
+ Thanks to Nicolas Goaziou for coding these changes.
+
+*** A property value of "nil" now means to unset a property
+ :PROPERTIES:
+ :OrgVersion: 7.01
+ :END:
+
+ This can be useful in particular with property inheritance, if some
+ upper level has the property, and some grandchild of it would like to
+ have the default settings (i.e. not overruled by a property) back.
+
+ Thanks to Robert Goldman and Bernt Hansen for suggesting this change.
+
+*** New helper functions in org-table.el
+ :PROPERTIES:
+ :OrgVersion: 6.35
+ :END:
+
+ There are new functions to access and write to a specific table field.
+ This is for hackers, and maybe for the org-babel people.
+
+ #+begin_example
+ org-table-get
+ org-table-put
+ org-table-current-line
+ org-table-goto-line
+ #+end_example
+
+*** Archiving: Allow to reverse order in target node
+ :PROPERTIES:
+ :OrgVersion: 6.35
+ :END:
+
+ The new option =org-archive-reversed-order= allows to have archived
+ entries inserted in a last-on-top fashion in the target node.
+
+ This was requested by Tom.
+
+*** Org-reveal: Double prefix arg shows the entire subtree of the parent
+ :PROPERTIES:
+ :OrgVersion: 6.35
+ :END:
+
+ This can help to get out of an inconsistent state produced for example
+ by viewing from the agenda.
+
+ This was a request by Matt Lundin.
+
+* License
+
+This file is part of GNU Emacs.
+
+GNU Emacs 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, either version 3 of the License, or
+(at your option) any later version.
+
+GNU Emacs 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 GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
diff --git a/etc/TODO b/etc/TODO
index 6aa74df5a79..2c361ede993 100644
--- a/etc/TODO
+++ b/etc/TODO
@@ -1,6 +1,6 @@
Emacs TODO List -*-outline-*-
-Copyright (C) 2001-2012 Free Software Foundation, Inc.
+Copyright (C) 2001-2012 Free Software Foundation, Inc.
See the end of the file for license conditions.
@@ -24,7 +24,6 @@ to the FSF.
** Improve the "code snippets" support: consolidate skeleton.el, tempo.el,
and expand.el (any other?) and then advertise/use/improve it.
** Improve VC: yes, there's a lot of work to be done there :-(
- And most of it could/should make it into Emacs-23.3.
** Random things that cross my mind right now that I'd like to see (some of
them from my local hacks), but it's not obvious at all whether they'll
@@ -433,18 +432,13 @@ http://lists.gnu.org/archive/html/emacs-devel/2008-02/msg02234.html
** Highlight rectangles (`mouse-track-rectangle-p' in XEmacs). Already in CUA,
but it's a valuable feature worth making more general.
-** Provide MIME support for Rmail using the Gnus MIME library. [Maybe
- not now feasible, given Gnus maintenance decisions. fx looked at
- this and can say where some of the problems are.]
-
** Eliminate the storm of warnings concerning char/unsigned char
mismatches that we get with GCC 4.x and proprietary compilers on
various systems. They make it difficult to spot the important warnings.
** Fix anything necessary to use `long long' EMACS_INTs with GCC.
-** Split out parts of lisp.h [and generate Makefile dependencies automatically.]
-[the last bit is done, see DEPFLAGS etc in src/Makefile.in ]
+** Split out parts of lisp.h.
** Update the FAQ.
diff --git a/etc/forms/README b/etc/forms/README
new file mode 100644
index 00000000000..4d728450ac4
--- /dev/null
+++ b/etc/forms/README
@@ -0,0 +1 @@
+This directory contains some example files for the forms.el library.
diff --git a/etc/forms-d2.dat b/etc/forms/forms-d2.dat
index f6c599c9aa8..f6c599c9aa8 100644
--- a/etc/forms-d2.dat
+++ b/etc/forms/forms-d2.dat
diff --git a/lisp/forms-d2.el b/etc/forms/forms-d2.el
index 7d7336030db..9fa2145e4d0 100644
--- a/lisp/forms-d2.el
+++ b/etc/forms/forms-d2.el
@@ -1,4 +1,4 @@
-;;; forms-d2.el --- demo forms-mode -*- no-byte-compile: t -*-
+;;; forms-d2.el --- demo forms-mode
;; Copyright (C) 1991, 1994-1997, 2001-2012 Free Software Foundation, Inc.
@@ -27,7 +27,7 @@
;;; Code:
;; Set the name of the data file.
-(setq forms-file (expand-file-name "forms-d2.dat" data-directory))
+(setq forms-file (expand-file-name "forms/forms-d2.dat" data-directory))
;; Use 'forms-enumerate' to set field names and number thereof.
(setq forms-number-of-fields
diff --git a/lisp/forms-pass.el b/etc/forms/forms-pass.el
index b635c965cf0..34d4548434b 100644
--- a/lisp/forms-pass.el
+++ b/etc/forms/forms-pass.el
@@ -1,4 +1,4 @@
-;;; forms-pass.el --- passwd file demo for forms-mode -*- no-byte-compile: t -*-
+;;; forms-pass.el --- passwd file demo for forms-mode
;; This file is part of GNU Emacs.
diff --git a/etc/org/OrgOdtStyles.xml b/etc/org/OrgOdtStyles.xml
index 470b7b134a7..84125c96d8a 100644
--- a/etc/org/OrgOdtStyles.xml
+++ b/etc/org/OrgOdtStyles.xml
@@ -649,34 +649,34 @@
<!-- Description List -->
<text:list-style style:name="OrgDescriptionList">
<text:list-level-style-number text:level="1" style:num-format="">
- <style:list-level-properties text:space-before="0.635cm" text:min-label-width="0.635cm"/>
+ <style:list-level-properties text:space-before="0.635cm"/>
</text:list-level-style-number>
<text:list-level-style-number text:level="2" style:num-format="">
- <style:list-level-properties text:space-before="1.27cm" text:min-label-width="0.635cm"/>
+ <style:list-level-properties text:space-before="1.27cm"/>
</text:list-level-style-number>
<text:list-level-style-number text:level="3" style:num-format="">
- <style:list-level-properties text:space-before="1.905cm" text:min-label-width="0.635cm"/>
+ <style:list-level-properties text:space-before="1.905cm"/>
</text:list-level-style-number>
<text:list-level-style-number text:level="4" style:num-format="">
- <style:list-level-properties text:space-before="2.54cm" text:min-label-width="0.635cm"/>
+ <style:list-level-properties text:space-before="2.54cm"/>
</text:list-level-style-number>
<text:list-level-style-number text:level="5" style:num-format="">
- <style:list-level-properties text:space-before="3.175cm" text:min-label-width="0.635cm"/>
+ <style:list-level-properties text:space-before="3.175cm"/>
</text:list-level-style-number>
<text:list-level-style-number text:level="6" style:num-format="">
- <style:list-level-properties text:space-before="3.81cm" text:min-label-width="0.635cm"/>
+ <style:list-level-properties text:space-before="3.81cm"/>
</text:list-level-style-number>
<text:list-level-style-number text:level="7" style:num-format="">
- <style:list-level-properties text:space-before="4.445cm" text:min-label-width="0.635cm"/>
+ <style:list-level-properties text:space-before="4.445cm"/>
</text:list-level-style-number>
<text:list-level-style-number text:level="8" style:num-format="">
- <style:list-level-properties text:space-before="5.08cm" text:min-label-width="0.635cm"/>
+ <style:list-level-properties text:space-before="5.08cm"/>
</text:list-level-style-number>
<text:list-level-style-number text:level="9" style:num-format="">
- <style:list-level-properties text:space-before="5.715cm" text:min-label-width="0.635cm"/>
+ <style:list-level-properties text:space-before="5.715cm"/>
</text:list-level-style-number>
<text:list-level-style-number text:level="10" style:num-format="">
- <style:list-level-properties text:space-before="6.35cm" text:min-label-width="0.635cm"/>
+ <style:list-level-properties text:space-before="6.35cm"/>
</text:list-level-style-number>
</text:list-style>
diff --git a/etc/refcards/README b/etc/refcards/README
index a1fa2f063b5..0372826416e 100644
--- a/etc/refcards/README
+++ b/etc/refcards/README
@@ -1,8 +1,11 @@
-Some of the *.tex files need special versions of TeX to typeset them.
-The files cs-*.tex and sk-*.tex need csTeX, a special version of TeX
-tailored to typesetting Czech and Slovak documents. We provide
-generated files for these documents, so that you could print them
-without installing the modified TeX versions.
+To generate these refcards, you need to install the TeX document
+production system. For example, http://www.tug.org/texlive/ .
+
+All modern GNU/Linux distributions provide TeX packages, so the
+easiest way is just to install those. Your distribution may have
+split some of the files needed to process non-English output into
+separate, optional packages such as: texlive-lang-cyrillic,
+texlive-lang-czechslovak, texlive-lang-german, and texlive-lang-polish.
COPYRIGHT AND LICENSE INFORMATION FOR IMAGE FILES
@@ -12,5 +15,5 @@ it is reproduced here for convenience.
File: gnus-logo.eps, gnus-logo.pdf
Author: Luis Fernandes <elf@ee.ryerson.ca>
- Copyright (C) 2001-2012 Free Software Foundation, Inc.
+ Copyright (C) 2001-2012 Free Software Foundation, Inc.
License: GNU General Public License version 3 or later (see COPYING)
diff --git a/etc/refcards/calccard.pdf b/etc/refcards/calccard.pdf
index 58b203672de..5e97c2a9d92 100644
--- a/etc/refcards/calccard.pdf
+++ b/etc/refcards/calccard.pdf
Binary files differ
diff --git a/etc/refcards/cs-dired-ref.pdf b/etc/refcards/cs-dired-ref.pdf
index cf16c1afd10..1b5a8612ed9 100644
--- a/etc/refcards/cs-dired-ref.pdf
+++ b/etc/refcards/cs-dired-ref.pdf
Binary files differ
diff --git a/etc/refcards/cs-refcard.pdf b/etc/refcards/cs-refcard.pdf
index 7d0f92fa404..963adcc7bb9 100644
--- a/etc/refcards/cs-refcard.pdf
+++ b/etc/refcards/cs-refcard.pdf
Binary files differ
diff --git a/etc/refcards/de-refcard.pdf b/etc/refcards/de-refcard.pdf
index c7a619b0486..bccc60993f6 100644
--- a/etc/refcards/de-refcard.pdf
+++ b/etc/refcards/de-refcard.pdf
Binary files differ
diff --git a/etc/refcards/dired-ref.pdf b/etc/refcards/dired-ref.pdf
index 18a02e28ae7..0f579670808 100644
--- a/etc/refcards/dired-ref.pdf
+++ b/etc/refcards/dired-ref.pdf
Binary files differ
diff --git a/etc/refcards/fr-dired-ref.pdf b/etc/refcards/fr-dired-ref.pdf
index 1bd84b84e75..32f12ab2088 100644
--- a/etc/refcards/fr-dired-ref.pdf
+++ b/etc/refcards/fr-dired-ref.pdf
Binary files differ
diff --git a/etc/refcards/fr-refcard.pdf b/etc/refcards/fr-refcard.pdf
index 91f4fafe2d0..020ffbdeea0 100644
--- a/etc/refcards/fr-refcard.pdf
+++ b/etc/refcards/fr-refcard.pdf
Binary files differ
diff --git a/etc/refcards/gnus-booklet.pdf b/etc/refcards/gnus-booklet.pdf
index f39af860394..6c8fa376234 100644
--- a/etc/refcards/gnus-booklet.pdf
+++ b/etc/refcards/gnus-booklet.pdf
Binary files differ
diff --git a/etc/refcards/gnus-refcard.pdf b/etc/refcards/gnus-refcard.pdf
index 016f8fd7051..c64ed30f39f 100644
--- a/etc/refcards/gnus-refcard.pdf
+++ b/etc/refcards/gnus-refcard.pdf
Binary files differ
diff --git a/etc/refcards/pl-refcard.pdf b/etc/refcards/pl-refcard.pdf
index 47299efa1bf..ddeeca97daa 100644
--- a/etc/refcards/pl-refcard.pdf
+++ b/etc/refcards/pl-refcard.pdf
Binary files differ
diff --git a/etc/refcards/pt-br-refcard.pdf b/etc/refcards/pt-br-refcard.pdf
index dff1c3f6c00..dc61712a998 100644
--- a/etc/refcards/pt-br-refcard.pdf
+++ b/etc/refcards/pt-br-refcard.pdf
Binary files differ
diff --git a/etc/refcards/refcard.pdf b/etc/refcards/refcard.pdf
index f6c47d8a5f6..f2a720d656b 100644
--- a/etc/refcards/refcard.pdf
+++ b/etc/refcards/refcard.pdf
Binary files differ
diff --git a/etc/refcards/ru-refcard.pdf b/etc/refcards/ru-refcard.pdf
index 3bdc7895a9d..2289acff755 100644
--- a/etc/refcards/ru-refcard.pdf
+++ b/etc/refcards/ru-refcard.pdf
Binary files differ
diff --git a/etc/refcards/sk-dired-ref.pdf b/etc/refcards/sk-dired-ref.pdf
index e14764bd8f8..2cd9ef12fd9 100644
--- a/etc/refcards/sk-dired-ref.pdf
+++ b/etc/refcards/sk-dired-ref.pdf
Binary files differ
diff --git a/etc/refcards/sk-refcard.pdf b/etc/refcards/sk-refcard.pdf
index d0a34927a26..e02c7db3d4c 100644
--- a/etc/refcards/sk-refcard.pdf
+++ b/etc/refcards/sk-refcard.pdf
Binary files differ
diff --git a/info/.gitignore b/info/.gitignore
index 72e8ffc0db8..bf12a974f48 100644
--- a/info/.gitignore
+++ b/info/.gitignore
@@ -1 +1 @@
-*
+*.info
diff --git a/info/dir b/info/dir
index d18a38cefa6..cf039593d52 100644
--- a/info/dir
+++ b/info/dir
@@ -19,6 +19,7 @@ The Info Directory
* Menu:
+Texinfo documentation system
* Info: (info). How to use the documentation browsing system.
Emacs
@@ -54,7 +55,7 @@ Emacs network features
you're replying to, in flexible ways.
* Sieve: (sieve). Managing Sieve scripts in Emacs.
* TRAMP: (tramp). Transparent Remote Access, Multiple Protocol
- GNU Emacs remote file access via rsh and rcp.
+ Emacs remote file access via rsh and rcp.
Emacs misc features
* Autotype: (autotype). Convenient features for text that you enter
@@ -67,7 +68,7 @@ Emacs misc features
* Ediff: (ediff). A visual interface for comparing and
merging programs.
* EDT: (edt). An Emacs emulation of the EDT editor.
-* EIEIO: (eieio). An object system for Emacs Lisp.
+* EIEIO: (eieio). An objects system for Emacs Lisp.
* ERT: (ert). Emacs Lisp regression testing tool.
* Eshell: (eshell). A command shell implemented in Emacs Lisp.
* Flymake: (flymake). A universal on-the-fly syntax checker.
@@ -77,18 +78,15 @@ Emacs misc features
* RefTeX: (reftex). Emacs support for LaTeX cross-references
and citations.
* Remember: (remember). Simple information manager for Emacs.
-* Semantic: (semantic). Source code parsing utilities for Emacs.
-* SES: (ses). Simple Emacs Spreadsheet
+* Semantic: (semantic). Source code parser library and utilities.
+* SES: (ses). Simple Emacs Spreadsheet.
* Speedbar: (speedbar). File/Tag summarizing utility.
* VIP: (vip). An older VI-emulation for Emacs.
-* VIPER: (viper). The newest Emacs VI-emulation mode.
- (also, A VI Plan for Emacs Rescue
- or the VI PERil.)
+* VIPER: (viper). A VI-emulation mode for Emacs.
* WoMan: (woman). Browse UN*X Manual Pages "W.O. (without) Man".
Emacs lisp libraries
-* Auth-source: (auth). A single configuration for multiple
- applications.
+* Auth-source: (auth). The Emacs auth-source library.
* CL: (cl). Partial Common Lisp support for Emacs Lisp.
* D-Bus: (dbus). Using D-Bus in Emacs.
* Emacs MIME: (emacs-mime). Emacs MIME de/composition library.
diff --git a/leim/ChangeLog b/leim/ChangeLog
index 07e26cf766b..ddaa404916d 100644
--- a/leim/ChangeLog
+++ b/leim/ChangeLog
@@ -1,3 +1,40 @@
+2012-05-22 Glenn Morris <rgm@gnu.org>
+
+ * Makefile.in (SUBDIRS): Remove variable and rule.
+ (MKDIR_P): Add it back.
+ (all, changed.tit, changed.misc, leim-list.el):
+ Don't depend on SUBDIRS.
+ (changed.tit, changed.misc): Ensure output directory exists.
+ (distclean): Don't use SUBDIRS.
+
+2012-05-21 Glenn Morris <rgm@gnu.org>
+
+ * Makefile.in (install): Remove, let top-level do it.
+ (version, prefix, datarootdir, datadir, ns_appresdir, leimdir):
+ (MKDIR_P, GZIP_PROG): Remove, no longer used.
+
+ * Makefile.in (install_prefix): Remove.
+ (LEIM_INSTALLDIR): Rename to leimdir.
+ (install): Update for this change.
+
+ * Makefile.in (leim-list.el, install): Scrap superfluous subshells.
+
+2012-05-12 Glenn Morris <rgm@gnu.org>
+
+ * Makefile.in (MKDIR_P): New, set by configure.
+ (install): Use $MKDIR_P.
+
+2012-05-10 Glenn Morris <rgm@gnu.org>
+
+ * Makefile.in: Install self-contained ns files directly to
+ their final destination.
+ (install_prefix): New.
+ (LEIM_INSTALLDIR): New, set by configure.
+ (install): Use LEIM_INSTALLDIR.
+
+ * Makefile.in (MV_DIRS): Remove.
+ (install): Simplify the --with-ns case.
+
2012-04-09 Glenn Morris <rgm@gnu.org>
* Makefile.in (EMACS): Rename from BUILT_EMACS.
@@ -2289,7 +2326,7 @@
;; coding: utf-8
;; End:
- Copyright (C) 1997-1999, 2001-2012 Free Software Foundation, Inc.
+ Copyright (C) 1997-1999, 2001-2012 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/leim/Makefile.in b/leim/Makefile.in
index 21561a357d1..04f64c0ce0b 100644
--- a/leim/Makefile.in
+++ b/leim/Makefile.in
@@ -27,17 +27,7 @@
SHELL = /bin/sh
# Here are the things that we expect ../configure to edit.
-version=@version@
-prefix=@prefix@
-datarootdir=@datarootdir@
-datadir=@datadir@
srcdir=@srcdir@
-ns_appresdir=@ns_appresdir@
-
-# Where to install LEIM files.
-INSTALLDIR=$(DESTDIR)${datadir}/emacs/${version}/leim
-
-GZIP_PROG = @GZIP_PROG@
# Which Emacs to use to convert TIT files to Emacs Lisp files,
# byte-compile Emacs Lisp files, and generate the file leim-list.el.
@@ -49,9 +39,7 @@ buildlisppath=${srcdir}/../lisp
RUN_EMACS = EMACSLOADPATH=$(buildlisppath) LC_ALL=C \
${EMACS} -batch --no-site-file --no-site-lisp
-# Subdirectories to be made if ${srcdir} is different from the current
-# directory.
-SUBDIRS=quail
+MKDIR_P = @MKDIR_P@
# Files generated from TIT dictionaries for Chinese GB character set.
TIT_GB=\
@@ -93,11 +81,7 @@ TIT_MISC=${CHINESE_TIT} ${MISC}
@echo Compiling $<
@${RUN_EMACS} -l ${buildlisppath}/international/quail -f batch-byte-compile $<
-all: ${SUBDIRS} leim-list.el compile-main
-
-${SUBDIRS}:
- mkdir $@
- touch stamp-subdir
+all: leim-list.el compile-main
TIT_SOURCES= \
${srcdir}/CXTERM-DIC/4Corner.tit \
@@ -117,9 +101,16 @@ TIT_SOURCES= \
${CHINESE_TIT}: changed.tit
@true
-## FIXME remove subdirs if poss - time-stamping.
-## Emacs should make the directory if it does not exist.
-changed.tit: ${SUBDIRS} ${TIT_SOURCES}
+## The changed.* files act to serialize this part of the build.
+## A single Emacs invocation creates all the CHINESE_TIT files.
+## Otherwise in a parallel build multiple Emacs instances could
+## interfere with each other. If we used GNU make we could probably
+## parallelize this without the need for an explicit rule for each
+## file. Something like the pattern rule:
+## quail/%.el: CXTERM-DIC/%.tit
+## It doesn't seem possible to do this with VPATH and suffix rules.
+changed.tit: ${TIT_SOURCES}
+ @${MKDIR_P} quail
${RUN_EMACS} -l ${buildlisppath}/international/titdic-cnv \
-f batch-titdic-convert -dir quail ${srcdir}/CXTERM-DIC; \
echo "changed" > $@
@@ -135,14 +126,15 @@ MISC_SOURCES= \
${MISC}: changed.misc
@true
-changed.misc: ${SUBDIRS} ${MISC_SOURCES}
+changed.misc: ${MISC_SOURCES}
+ @${MKDIR_P} quail
${RUN_EMACS} -l ${buildlisppath}/international/titdic-cnv \
-f batch-miscdic-convert -dir quail ${srcdir}/MISC-DIC; \
echo "changed" > $@
-leim-list.el: ${SUBDIRS} ${TIT_MISC} ${srcdir}/leim-ext.el
+leim-list.el: ${TIT_MISC} ${srcdir}/leim-ext.el
rm -f leim-list.el
- if [ x`(cd ${srcdir} && /bin/pwd)` = x`(/bin/pwd)` ] ; then \
+ if [ x`cd ${srcdir} && /bin/pwd` = x`/bin/pwd` ] ; then \
${RUN_EMACS} -l ${buildlisppath}/international/quail \
--eval "(update-leim-list-file \".\")" ; \
else \
@@ -174,53 +166,6 @@ compile-main: ${TIT_MISC}
$(MAKE) $(MFLAGS) compile-targets EMACS="$(EMACS)" TARGETS="$$chunk"; \
done
-MV_DIRS = for i in $$dir; do rm -fr `basename "$$i"` ; mv "$$i" . ; done
-
-install: all
- if [ ! -d ${INSTALLDIR} ] ; then \
- umask 022; ${srcdir}/../build-aux/install-sh -d ${INSTALLDIR}; \
- else true; fi
- if [ x`(cd ${INSTALLDIR} && /bin/pwd)` != x`(/bin/pwd)` ] ; then \
- rm -f ${INSTALLDIR}/leim-list.el; \
- rm -rf ${INSTALLDIR}/quail ${INSTALLDIR}/ja-dic ; \
- echo "Copying leim files to ${INSTALLDIR} ..." ; \
- if [ x`(cd ${srcdir} && /bin/pwd)` = x`(/bin/pwd)` ] ; then \
- tar -chf - leim-list.el quail ja-dic \
- | (cd ${INSTALLDIR}; umask 0; tar -xvf - && cat > /dev/null) ;\
- else \
- tar -chf - leim-list.el quail \
- | (cd ${INSTALLDIR}; umask 0; tar -xvf - && cat > /dev/null) ;\
- cd ${srcdir}; \
- tar -chf - quail/* ja-dic \
- | (cd ${INSTALLDIR}; umask 0; tar -xvf - && cat > /dev/null) ;\
- fi; \
- rm -f ${INSTALLDIR}/.gitignore ${INSTALLDIR}/*/.gitignore; \
- rm -f ${INSTALLDIR}/.arch-inventory ${INSTALLDIR}/*/.arch-inventory; \
- rm -f ${INSTALLDIR}/\#* ${INSTALLDIR}/*/\#* ; \
- rm -f ${INSTALLDIR}/.\#* ${INSTALLDIR}/*/.\#* ; \
- rm -f ${INSTALLDIR}/*~ ${INSTALLDIR}/*/*~ ; \
- rm -f ${INSTALLDIR}/*.orig ${INSTALLDIR}/*/*.orig ; \
- else true; fi
- -unset CDPATH; \
- if [ -n "${GZIP_PROG}" ]; \
- then \
- echo "Compressing *.el ..." ; \
- (cd ${INSTALLDIR}; for f in `find . -name "*.elc" -print`; do \
- ${GZIP_PROG} -9n `echo $$f|sed 's/.elc$$/.el/'` ; \
- done) \
- else true; fi
- -chmod -R a+r ${INSTALLDIR}
- for installuser in $${LOGNAME} $${USERNAME} $${USER} \
- `id -un 2> /dev/null`; do \
- [ -n "$${installuser}" ] && break ; \
- done ; \
- find ${INSTALLDIR} -exec chown $${installuser} '{}' ';'
- if [ "${ns_appresdir}" != "" ]; then \
- ( cd ${ns_appresdir} ; \
- if test -d share/emacs ; then dir=share/emacs/*/*; $(MV_DIRS); fi;\
- rm -fr share ) ; \
- else true ; fi
-
clean mostlyclean:
rm -f ${TIT_MISC} ${TIT_MISC:.el=.elc} \
leim-list.el changed.tit changed.misc
@@ -232,7 +177,7 @@ bootstrap-clean: clean
$(setwins); for w in $$wins; do rm -f $$w/*.elc; done
distclean: clean
- if test -f stamp-subdir; then rm -rf ${SUBDIRS} stamp-subdir; fi
+ -[ `cd ${srcdir} && /bin/pwd` != `/bin/pwd` ] && rm -rf quail
rm -f Makefile
maintainer-clean: distclean bootstrap-clean
diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog
index fc6d905cfb2..b32e0607c94 100644
--- a/lib-src/ChangeLog
+++ b/lib-src/ChangeLog
@@ -1,8 +1,69 @@
+2012-05-22 Paul Eggert <eggert@cs.ucla.edu>
+
+ Remove src/m/*.
+ * makefile.w32-in: Remove dependencies on
+ $(EMACS_ROOT)/src/m/intel386.h.
+
+2012-05-22 Glenn Morris <rgm@gnu.org>
+
+ * Makefile.in (install): Remove unneeded chmods.
+
+2012-05-21 Paul Eggert <eggert@cs.ucla.edu>
+
+ Assume C89 or later.
+ * etags.c (static, const): Remove macros.
+ (PTR): Remove; all uses replaced with void *. Omit needless casts.
+
+2012-05-21 Glenn Morris <rgm@gnu.org>
+
+ * Makefile.in (insrcdir, $(DESTDIR)${archlibdir}):
+ Scrap superfluous subshells.
+
+2012-05-18 Glenn Morris <rgm@gnu.org>
+
+ * Makefile.in (install): Ensure $bindir exists.
+
+2012-05-17 Glenn Morris <rgm@gnu.org>
+
+ * Makefile.in (ns_appbindir): New, set by configure.
+
+2012-05-12 Glenn Morris <rgm@gnu.org>
+
+ * Makefile.in (MKDIR_P): New, set by configure.
+ ($(DESTDIR)${archlibdir}): Use $MKDIR_P.
+
+2012-05-10 Paul Eggert <eggert@cs.ucla.edu>
+
+ etags: pacify gcc -Wstack-protector on Ubuntu 12.04 x86
+ * etags.c: Include <stdarg.h>.
+ (error): Declare as printf-style, as that's what it really is.
+ All uses changed.
+ (add_regex): Use single char rather than array-of-one char.
+
+2012-05-05 Jim Meyering <meyering@redhat.com>
+
+ * lib-src/pop.c (pop_stat, pop_list, pop_multi_first, pop_last):
+ NUL-terminate the error buffer (Bug#11372).
+
+2012-05-02 Juanma Barranquero <lekktu@gmail.com>
+
+ * emacsclient.c (min): Undef before redefining it.
+
+2012-05-02 Jim Meyering <jim@meyering.net>
+
+ * emacsclient.c (send_to_emacs): Avoid invalid strcpy upon partial
+ send (Bug#11374).
+
+2012-04-29 Andreas Schwab <schwab@linux-m68k.org>
+
+ * make-docfile.c (scan_lisp_file) [DEBUG]: Also skip if and
+ byte-code forms. (Bug#11380)
+
2012-04-20 Chong Yidong <cyd@gnu.org>
* emacsclient.c (decode_options): Move -t -n corner case handling
into server.el (Bug#11102).
- (main): Send -tty to Emacs under more circumstanced (Bug#8314).
+ (main): Send -tty to Emacs under more circumstances (Bug#8314).
2012-04-18 Paul Eggert <eggert@cs.ucla.edu>
diff --git a/lib-src/Makefile.in b/lib-src/Makefile.in
index 6732030a648..75dd8788870 100644
--- a/lib-src/Makefile.in
+++ b/lib-src/Makefile.in
@@ -45,6 +45,10 @@ TRANSFORM = @program_transform_name@
# ==================== Where To Install Things ====================
+# Location to install Emacs.app under GNUstep / Mac OS X.
+# Later values may use this.
+ns_appbindir=@ns_appbindir@
+
# The default location for installation. Everything is placed in
# subdirectories of this directory. The default values for many of
# the variables below are expressed in terms of this one, so you may
@@ -106,6 +110,7 @@ INSTALL_DATA = @INSTALL_DATA@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
# By default, we uphold the dignity of our programs.
INSTALL_STRIP =
+MKDIR_P = @MKDIR_P@
# ========================== Lists of Files ===========================
@@ -185,7 +190,7 @@ $(EXE_FILES): ../lib/libgnu.a
## These targets copy the scripts into the build directory so that
## they can be run from there in an uninstalled Emacs.
## Nothing to do if pwd = srcdir.
-insrcdir=[ "`/bin/pwd`" = "`(cd $(srcdir) && /bin/pwd)`" ]
+insrcdir=[ "`/bin/pwd`" = "`cd $(srcdir) && /bin/pwd`" ]
stamp-rcs2log: $(srcdir)/rcs2log
$(insrcdir) || cp -p $(srcdir)/rcs2log rcs2log
@@ -231,21 +236,21 @@ maybe-blessmail: $(BLESSMAIL_TARGET)
$(DESTDIR)${archlibdir}: all
@echo
@echo "Installing utilities run internally by Emacs."
- umask 022; $(top_srcdir)/build-aux/install-sh -d $(DESTDIR)${archlibdir}
- if [ `(cd $(DESTDIR)${archlibdir} && /bin/pwd)` != `/bin/pwd` ]; then \
+ umask 022; ${MKDIR_P} $(DESTDIR)${archlibdir}
+ if [ `cd $(DESTDIR)${archlibdir} && /bin/pwd` != `/bin/pwd` ]; then \
for file in ${UTILITIES}; do \
$(INSTALL_PROGRAM) $(INSTALL_STRIP) $$file $(DESTDIR)${archlibdir}/$$file ; \
done ; \
fi
- umask 022; $(top_srcdir)/build-aux/install-sh -d $(DESTDIR)${gamedir}; \
+ umask 022; ${MKDIR_P} $(DESTDIR)${gamedir}; \
touch $(DESTDIR)${gamedir}/snake-scores; \
touch $(DESTDIR)${gamedir}/tetris-scores
-if chown ${gameuser} $(DESTDIR)${archlibdir}/update-game-score && chmod u+s $(DESTDIR)${archlibdir}/update-game-score; then \
chown ${gameuser} $(DESTDIR)${gamedir}; \
chmod u=rwx,g=rwx,o=rx $(DESTDIR)${gamedir}; \
fi
- if [ `(cd $(DESTDIR)${archlibdir} && /bin/pwd)` \
- != `(cd ${srcdir} && /bin/pwd)` ]; then \
+ if [ `cd $(DESTDIR)${archlibdir} && /bin/pwd` \
+ != `cd ${srcdir} && /bin/pwd` ]; then \
for file in ${SCRIPTS}; do \
$(INSTALL_SCRIPT) ${srcdir}/$$file $(DESTDIR)${archlibdir}/$$file; \
done ; \
@@ -254,13 +259,12 @@ $(DESTDIR)${archlibdir}: all
install: $(DESTDIR)${archlibdir}
@echo
@echo "Installing utilities for users to run."
+ umask 022; ${MKDIR_P} $(DESTDIR)${bindir}
for file in ${INSTALLABLES} ; do \
$(INSTALL_PROGRAM) $(INSTALL_STRIP) $${file} $(DESTDIR)${bindir}/`echo $${file} | sed '$(TRANSFORM)'` ; \
- chmod a+rx $(DESTDIR)${bindir}/`echo $${file} | sed '$(TRANSFORM)'`; \
done
for file in ${INSTALLABLE_SCRIPTS} ; do \
$(INSTALL_SCRIPT) ${srcdir}/$${file} $(DESTDIR)${bindir}/`echo $${file} | sed '$(TRANSFORM)'` ; \
- chmod a+rx $(DESTDIR)${bindir}/`echo $${file} | sed '$(TRANSFORM)'`; \
done
uninstall:
diff --git a/lib-src/emacsclient.c b/lib-src/emacsclient.c
index ea55398306b..29504445407 100644
--- a/lib-src/emacsclient.c
+++ b/lib-src/emacsclient.c
@@ -119,6 +119,11 @@ char *(getcwd) (char *, size_t);
# define IF_LINT(Code) /* empty */
#endif
+#ifdef min
+#undef min
+#endif
+#define min(x, y) (((x) < (y)) ? (x) : (y))
+
/* Name used to invoke this program. */
const char *progname;
@@ -783,33 +788,35 @@ sock_err_message (const char *function_name)
static void
send_to_emacs (HSOCKET s, const char *data)
{
- while (data)
+ size_t dlen;
+
+ if (!data)
+ return;
+
+ dlen = strlen (data);
+ while (*data)
{
- size_t dlen = strlen (data);
- if (dlen + sblen >= SEND_BUFFER_SIZE)
- {
- int part = SEND_BUFFER_SIZE - sblen;
- strncpy (&send_buffer[sblen], data, part);
- data += part;
- sblen = SEND_BUFFER_SIZE;
- }
- else if (dlen)
- {
- strcpy (&send_buffer[sblen], data);
- data = NULL;
- sblen += dlen;
- }
- else
- break;
+ size_t part = min (dlen, SEND_BUFFER_SIZE - sblen);
+ memcpy (&send_buffer[sblen], data, part);
+ data += part;
+ sblen += part;
if (sblen == SEND_BUFFER_SIZE
|| (sblen > 0 && send_buffer[sblen-1] == '\n'))
{
int sent = send (s, send_buffer, sblen, 0);
+ if (sent < 0)
+ {
+ message (TRUE, "%s: failed to send %d bytes to socket: %s\n",
+ progname, sblen, strerror (errno));
+ fail ();
+ }
if (sent != sblen)
- strcpy (send_buffer, &send_buffer[sent]);
+ memmove (send_buffer, &send_buffer[sent], sblen - sent);
sblen -= sent;
}
+
+ dlen -= part;
}
}
diff --git a/lib-src/etags.c b/lib-src/etags.c
index c88473ad525..7d2a5a90999 100644
--- a/lib-src/etags.c
+++ b/lib-src/etags.c
@@ -93,22 +93,6 @@ char pot_etags_version[] = "@(#) pot revision number is 17.38.1.4";
#ifdef HAVE_CONFIG_H
# include <config.h>
- /* This is probably not necessary any more. On some systems, config.h
- used to define static as nothing for the sake of unexec. We don't
- want that here since we don't use unexec. None of these systems
- are supported any more, but the idea is still mentioned in
- etc/PROBLEMS. */
-# undef static
-# ifndef PTR /* for XEmacs */
-# define PTR void *
-# endif
-#else /* no config.h */
-# if defined (__STDC__) && (__STDC__ || defined (__SUNPRO_C))
-# define PTR void * /* for generic pointers */
-# else /* not standard C */
-# define const /* remove const for old compilers' sake */
-# define PTR long * /* don't use void* */
-# endif
#endif /* !HAVE_CONFIG_H */
#ifndef _GNU_SOURCE
@@ -158,6 +142,7 @@ char pot_etags_version[] = "@(#) pot revision number is 17.38.1.4";
# endif
#endif /* HAVE_UNISTD_H */
+#include <stdarg.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
@@ -380,7 +365,7 @@ static void get_tag (char *, char **);
static void analyse_regex (char *);
static void free_regexps (void);
static void regex_tag_multiline (void);
-static void error (const char *, const char *);
+static void error (const char *, ...) ATTRIBUTE_FORMAT_PRINTF (1, 2);
static void suggest_asking_for_help (void) NO_RETURN;
void fatal (const char *, const char *) NO_RETURN;
static void pfatal (const char *) NO_RETURN;
@@ -414,8 +399,8 @@ static bool filename_is_absolute (char *f);
static void canonicalize_filename (char *);
static void linebuffer_init (linebuffer *);
static void linebuffer_setlen (linebuffer *, int);
-static PTR xmalloc (size_t);
-static PTR xrealloc (char *, size_t);
+static void *xmalloc (size_t);
+static void *xrealloc (char *, size_t);
static char searchar = '/'; /* use /.../ searches */
@@ -1140,7 +1125,7 @@ main (int argc, char **argv)
case 'o':
if (tagfile)
{
- error ("-o option may only be given once.", (char *)NULL);
+ error ("-o option may only be given once.");
suggest_asking_for_help ();
/* NOTREACHED */
}
@@ -1224,7 +1209,7 @@ main (int argc, char **argv)
if (nincluded_files == 0 && file_count == 0)
{
- error ("no input files specified.", (char *)NULL);
+ error ("no input files specified.");
suggest_asking_for_help ();
/* NOTREACHED */
}
@@ -1447,7 +1432,7 @@ get_language_from_langname (const char *name)
language *lang;
if (name == NULL)
- error ("empty language name", (char *)NULL);
+ error ("empty language name");
else
{
for (lang = lang_names; lang->name != NULL; lang++)
@@ -2233,7 +2218,7 @@ put_entries (register node *np)
{
/* Ctags mode */
if (np->name == NULL)
- error ("internal error: NULL name in ctags mode.", (char *)NULL);
+ error ("internal error: NULL name in ctags mode.");
if (cxref_style)
{
@@ -2773,7 +2758,7 @@ consider_token (register char *str, register int len, register int c, int *c_ext
case dignorerest:
return FALSE;
default:
- error ("internal error: definedef value.", (char *)NULL);
+ error ("internal error: definedef value.");
}
/*
@@ -3061,7 +3046,7 @@ make_C_tag (int isfun)
make_tag (concat ("INVALID TOKEN:-->", token_name.buffer, ""),
token_name.len + 17, isfun, token.line,
token.offset+token.length+1, token.lineno, token.linepos);
- error ("INVALID TOKEN", NULL);
+ error ("INVALID TOKEN");
}
token.valid = FALSE;
@@ -5706,7 +5691,7 @@ add_regex (char *regexp_pattern, language *lang)
{
static struct re_pattern_buffer zeropattern;
char sep, *pat, *name, *modifiers;
- char empty[] = "";
+ char empty = '\0';
const char *err;
struct re_pattern_buffer *patbuf;
regexp *rp;
@@ -5719,7 +5704,7 @@ add_regex (char *regexp_pattern, language *lang)
if (strlen (regexp_pattern) < 3)
{
- error ("null regexp", (char *)NULL);
+ error ("null regexp");
return;
}
sep = regexp_pattern[0];
@@ -5738,7 +5723,7 @@ add_regex (char *regexp_pattern, language *lang)
if (modifiers == NULL) /* no terminating separator --> no name */
{
modifiers = name;
- name = empty;
+ name = &empty;
}
else
modifiers += 1; /* skip separator */
@@ -5749,7 +5734,7 @@ add_regex (char *regexp_pattern, language *lang)
{
case 'N':
if (modifiers == name)
- error ("forcing explicit tag name but no name, ignoring", NULL);
+ error ("forcing explicit tag name but no name, ignoring");
force_explicit_name = TRUE;
break;
case 'i':
@@ -5763,12 +5748,7 @@ add_regex (char *regexp_pattern, language *lang)
need_filebuf = TRUE;
break;
default:
- {
- char wrongmod [2];
- wrongmod[0] = modifiers[0];
- wrongmod[1] = '\0';
- error ("invalid regexp modifier `%s', ignoring", wrongmod);
- }
+ error ("invalid regexp modifier `%c', ignoring", modifiers[0]);
break;
}
@@ -6423,13 +6403,16 @@ suggest_asking_for_help (void)
exit (EXIT_FAILURE);
}
-/* Print error message. `s1' is printf control string, `s2' is arg for it. */
+/* Output a diagnostic with printf-style FORMAT and args. */
static void
-error (const char *s1, const char *s2)
+error (const char *format, ...)
{
+ va_list ap;
+ va_start (ap, format);
fprintf (stderr, "%s: ", progname);
- fprintf (stderr, s1, s2);
+ vfprintf (stderr, format, ap);
fprintf (stderr, "\n");
+ va_end (ap);
}
/* Return a newly-allocated string whose contents
@@ -6687,19 +6670,19 @@ linebuffer_setlen (linebuffer *lbp, int toksize)
}
/* Like malloc but get fatal error if memory is exhausted. */
-static PTR
+static void *
xmalloc (size_t size)
{
- PTR result = (PTR) malloc (size);
+ void *result = malloc (size);
if (result == NULL)
fatal ("virtual memory exhausted", (char *)NULL);
return result;
}
-static PTR
+static void *
xrealloc (char *ptr, size_t size)
{
- PTR result = (PTR) realloc (ptr, size);
+ void *result = realloc (ptr, size);
if (result == NULL)
fatal ("virtual memory exhausted", (char *)NULL);
return result;
diff --git a/lib-src/make-docfile.c b/lib-src/make-docfile.c
index 3e79cae4f41..b33b13f34ce 100644
--- a/lib-src/make-docfile.c
+++ b/lib-src/make-docfile.c
@@ -1361,7 +1361,7 @@ scan_lisp_file (const char *filename, const char *mode)
#ifdef DEBUG
else if (! strcmp (buffer, "if")
|| ! strcmp (buffer, "byte-code"))
- ;
+ continue;
#endif
else
diff --git a/lib-src/makefile.w32-in b/lib-src/makefile.w32-in
index 316e4fb127f..83b818ed6c6 100644
--- a/lib-src/makefile.w32-in
+++ b/lib-src/makefile.w32-in
@@ -354,7 +354,6 @@ SRC = .
$(BLD)/alloca.$(O) : \
$(SRC)/alloca.c \
$(EMACS_ROOT)/src/s/ms-w32.h \
- $(EMACS_ROOT)/src/m/intel386.h \
$(EMACS_ROOT)/src/config.h \
$(EMACS_ROOT)/src/blockinput.h
@@ -363,7 +362,6 @@ $(BLD)/ctags.$(O) : \
$(EMACS_ROOT)/nt/inc/sys/param.h \
$(EMACS_ROOT)/nt/inc/sys/stat.h \
$(EMACS_ROOT)/src/s/ms-w32.h \
- $(EMACS_ROOT)/src/m/intel386.h \
$(EMACS_ROOT)/lib-src/../src/config.h \
$(SRC)/ntlib.h \
$(EMACS_ROOT)/lib/getopt.h
@@ -372,14 +370,12 @@ $(BLD)/ebrowse.$(O) : \
$(SRC)/ebrowse.c \
$(EMACS_ROOT)/lib/min-max.h \
$(EMACS_ROOT)/src/s/ms-w32.h \
- $(EMACS_ROOT)/src/m/intel386.h \
$(EMACS_ROOT)/lib-src/../src/config.h
$(BLD)/emacsclient.$(O) : \
$(SRC)/emacsclient.c \
$(EMACS_ROOT)/nt/inc/sys/stat.h \
$(EMACS_ROOT)/src/s/ms-w32.h \
- $(EMACS_ROOT)/src/m/intel386.h \
$(EMACS_ROOT)/lib-src/../src/config.h
$(BLD)/etags.$(O) : \
@@ -387,7 +383,6 @@ $(BLD)/etags.$(O) : \
$(EMACS_ROOT)/nt/inc/sys/param.h \
$(EMACS_ROOT)/nt/inc/sys/stat.h \
$(EMACS_ROOT)/src/s/ms-w32.h \
- $(EMACS_ROOT)/src/m/intel386.h \
$(EMACS_ROOT)/lib-src/../src/config.h \
$(SRC)/ntlib.h \
$(EMACS_ROOT)/lib/getopt.h
@@ -395,7 +390,6 @@ $(BLD)/etags.$(O) : \
$(BLD)/getdate.$(O) : \
$(SRC)/getdate.c \
$(EMACS_ROOT)/src/s/ms-w32.h \
- $(EMACS_ROOT)/src/m/intel386.h \
$(EMACS_ROOT)/src/config.h \
$(MSTOOLS_SYS)/types.h
@@ -415,7 +409,6 @@ $(BLD)/make-path.$(O) : \
$(BLD)/movemail.$(O) : \
$(SRC)/movemail.c \
$(EMACS_ROOT)/src/s/ms-w32.h \
- $(EMACS_ROOT)/src/m/intel386.h \
$(EMACS_ROOT)/lib-src/../src/config.h \
$(EMACS_ROOT)/nt/inc/sys/file.h \
$(EMACS_ROOT)/nt/inc/sys/stat.h \
@@ -439,7 +432,6 @@ $(BLD)/pop.$(O) : \
$(BLD)/profile.$(O) : \
$(SRC)/profile.c \
$(EMACS_ROOT)/src/s/ms-w32.h \
- $(EMACS_ROOT)/src/m/intel386.h \
$(EMACS_ROOT)/lib-src/../src/config.h \
$(EMACS_ROOT)/lib-src/../src/systime.h
@@ -455,7 +447,6 @@ $(BLD)/test-distrib.$(O) : \
$(BLD)/timer.$(O) : \
$(SRC)/timer.c \
$(EMACS_ROOT)/src/s/ms-w32.h \
- $(EMACS_ROOT)/src/m/intel386.h \
$(EMACS_ROOT)/lib-src/../src/config.h
# The following dependencies are for supporting parallel builds, where
diff --git a/lib-src/pop.c b/lib-src/pop.c
index 37494d17a44..c4c7f2b4e2f 100644
--- a/lib-src/pop.c
+++ b/lib-src/pop.c
@@ -346,6 +346,7 @@ pop_stat (popserver server, int *count, int *size)
if (0 == strncmp (fromserver, "-ERR", 4))
{
strncpy (pop_error, fromserver, ERROR_MAX);
+ pop_error[ERROR_MAX-1] = '\0';
}
else
{
@@ -447,7 +448,10 @@ pop_list (popserver server, int message, int **IDs, int **sizes)
if (strncmp (fromserver, "+OK ", 4))
{
if (! strncmp (fromserver, "-ERR", 4))
- strncpy (pop_error, fromserver, ERROR_MAX);
+ {
+ strncpy (pop_error, fromserver, ERROR_MAX);
+ pop_error[ERROR_MAX-1] = '\0';
+ }
else
{
strcpy (pop_error,
@@ -687,6 +691,7 @@ pop_multi_first (popserver server, const char *command, char **response)
if (0 == strncmp (*response, "-ERR", 4))
{
strncpy (pop_error, *response, ERROR_MAX);
+ pop_error[ERROR_MAX-1] = '\0';
return (-1);
}
else if (0 == strncmp (*response, "+OK", 3))
@@ -860,6 +865,7 @@ pop_last (popserver server)
if (! strncmp (fromserver, "-ERR", 4))
{
strncpy (pop_error, fromserver, ERROR_MAX);
+ pop_error[ERROR_MAX-1] = '\0';
return (-1);
}
else if (strncmp (fromserver, "+OK ", 4))
diff --git a/lib/makefile.w32-in b/lib/makefile.w32-in
index a2870345ad6..8c27f139e76 100644
--- a/lib/makefile.w32-in
+++ b/lib/makefile.w32-in
@@ -67,7 +67,6 @@ $(BLD)/dtoastr.$(O) : \
$(SRC)/intprops.h \
$(EMACS_ROOT)/nt/inc/sys/stat.h \
$(EMACS_ROOT)/src/s/ms-w32.h \
- $(EMACS_ROOT)/src/m/intel386.h \
$(EMACS_ROOT)/src/config.h
$(BLD)/getopt.$(O) : \
@@ -78,7 +77,6 @@ $(BLD)/getopt.$(O) : \
$(EMACS_ROOT)/nt/inc/unistd.h \
$(EMACS_ROOT)/nt/inc/sys/stat.h \
$(EMACS_ROOT)/src/s/ms-w32.h \
- $(EMACS_ROOT)/src/m/intel386.h \
$(EMACS_ROOT)/src/config.h
$(BLD)/getopt1.$(O) : \
@@ -87,7 +85,6 @@ $(BLD)/getopt1.$(O) : \
$(SRC)/getopt_int.h \
$(EMACS_ROOT)/nt/inc/sys/stat.h \
$(EMACS_ROOT)/src/s/ms-w32.h \
- $(EMACS_ROOT)/src/m/intel386.h \
$(EMACS_ROOT)/src/config.h
$(BLD)/strftime.$(O) : \
@@ -96,14 +93,12 @@ $(BLD)/strftime.$(O) : \
$(EMACS_ROOT)/nt/inc/stdbool.h \
$(EMACS_ROOT)/nt/inc/sys/stat.h \
$(EMACS_ROOT)/src/s/ms-w32.h \
- $(EMACS_ROOT)/src/m/intel386.h \
$(EMACS_ROOT)/src/config.h
$(BLD)/time_r.$(O) : \
$(SRC)/time_r.c \
$(EMACS_ROOT)/nt/inc/sys/stat.h \
$(EMACS_ROOT)/src/s/ms-w32.h \
- $(EMACS_ROOT)/src/m/intel386.h \
$(EMACS_ROOT)/src/config.h
$(BLD)/md5.$(O) : \
@@ -112,7 +107,6 @@ $(BLD)/md5.$(O) : \
$(EMACS_ROOT)/nt/inc/stdint.h \
$(EMACS_ROOT)/nt/inc/sys/stat.h \
$(EMACS_ROOT)/src/s/ms-w32.h \
- $(EMACS_ROOT)/src/m/intel386.h \
$(EMACS_ROOT)/src/config.h
$(BLD)/sha1.$(O) : \
@@ -121,7 +115,6 @@ $(BLD)/sha1.$(O) : \
$(EMACS_ROOT)/nt/inc/stdint.h \
$(EMACS_ROOT)/nt/inc/sys/stat.h \
$(EMACS_ROOT)/src/s/ms-w32.h \
- $(EMACS_ROOT)/src/m/intel386.h \
$(EMACS_ROOT)/src/config.h
$(BLD)/sha256.$(O) : \
@@ -130,7 +123,6 @@ $(BLD)/sha256.$(O) : \
$(EMACS_ROOT)/nt/inc/stdint.h \
$(EMACS_ROOT)/nt/inc/sys/stat.h \
$(EMACS_ROOT)/src/s/ms-w32.h \
- $(EMACS_ROOT)/src/m/intel386.h \
$(EMACS_ROOT)/src/config.h
$(BLD)/sha512.$(O) : \
@@ -139,7 +131,6 @@ $(BLD)/sha512.$(O) : \
$(EMACS_ROOT)/nt/inc/stdint.h \
$(EMACS_ROOT)/nt/inc/sys/stat.h \
$(EMACS_ROOT)/src/s/ms-w32.h \
- $(EMACS_ROOT)/src/m/intel386.h \
$(EMACS_ROOT)/src/config.h
$(BLD)/filemode.$(O) : \
@@ -147,7 +138,6 @@ $(BLD)/filemode.$(O) : \
$(SRC)/filemode.h \
$(EMACS_ROOT)/nt/inc/sys/stat.h \
$(EMACS_ROOT)/src/s/ms-w32.h \
- $(EMACS_ROOT)/src/m/intel386.h \
$(EMACS_ROOT)/src/config.h
# The following dependencies are for supporting parallel builds, where
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 2ffd9ce77a8..132a18f7204 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,1368 @@
+2012-05-25 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * progmodes/gdb-mi.el: Minor style changes.
+ (gdb-enable-debug, gdb-speedbar-auto-raise, gdb-many-windows):
+ Turn into minor modes.
+ (gdb--if-arrow): Rename from gdb-if-arrow, make it hygienic.
+ (gdb-mouse-until, gdb-mouse-jump): Adjust uses accordingly.
+ (gdb-shell): Remove unneeded let-binding.
+ (gdb-get-many-fields): Eliminate O(n²) behavior.
+
+2012-05-25 Eli Zaretskii <eliz@gnu.org>
+
+ * cus-start.el <vertical-centering-font-regexp>: Avoid warning on
+ platforms that don't link in fontset.c.
+
+2012-05-25 Juri Linkov <juri@jurta.org>
+
+ Use the same diff color scheme as in modern VCSes (bug#10181).
+
+ * vc/diff-mode.el (diff-header, diff-file-header): Remove "green"
+ to avoid confusion with `diff-added' that now uses green colors.
+ (diff-removed): Use shades of red.
+ (diff-added): Use shades of green.
+ (diff-changed): Leave just the yellow color.
+ (diff-use-changed-face): New variable.
+ (diff-font-lock-keywords): Use `diff-use-changed-face' to decide
+ how to highlight context diff changes.
+ (diff-refine-change): Use shades of yellow.
+ (diff-refine-removed): New face that uses shades of red.
+ (diff-refine-added): New face that uses shades of green.
+ (diff-refine-hunk): Use `diff-refine-change', `diff-refine-added',
+ `diff-refine-removed' in the call to `smerge-refine-subst'
+ depending on the value of `diff-use-changed-face'.
+
+ * vc/smerge-mode.el (smerge-mine): Use shades of red.
+ (smerge-other): Use shades of green.
+ (smerge-base): Use shades of yellow.
+ (smerge-refined-change): Empty face.
+ (smerge-refined-removed): New face that uses shades of red.
+ (smerge-refined-added): New face that uses shades of green.
+ (smerge-refine-subst): Rename arg `props' to `props-c'. Add new
+ args `props-r' and `props-a', and use them. Doc fix.
+ (smerge-refine): Evaluate `smerge-use-changed-face' and depending
+ on its value use different faces `smerge-refined-change',
+ `smerge-refined-removed', `smerge-refined-added' in the call to
+ `smerge-refine-subst'.
+
+ * vc/ediff-init.el (ediff-current-diff-A, ediff-fine-diff-A):
+ Add face condition `min-colors 88' with shades of red.
+ (ediff-current-diff-B, ediff-fine-diff-B): Add face condition
+ `min-colors 88' with shades of green.
+ (ediff-current-diff-C, ediff-fine-diff-C): Add face condition
+ `min-colors 88' with shades of yellow.
+
+2012-05-24 Glenn Morris <rgm@gnu.org>
+
+ * paths.el (prune-directory-list, remote-shell-program): Move to...
+ * files.el (prune-directory-list, remote-shell-program): ...here.
+ For the latter, delay initialization, prefer ssh, just search PATH.
+
+ * paths.el (term-file-prefix): Move to faces.el (the only user).
+ * faces.el (term-file-prefix): Move here, make it a defcustom.
+
+ * paths.el (news-directory, news-path, news-inews-program):
+ Move to gnus/nnspool.el.
+
+ * paths.el (gnus-default-nntp-server): Remove (gnus.el defines it).
+
+ * paths.el (rmail-file-name, rmail-spool-directory): Move from here...
+ * mail/rmail.el (rmail-file-name, rmail-spool-directory): ... to here.
+ Make the latter a defcustom, with a delayed initialization.
+
+ * paths.el (gnus-nntp-service, gnus-local-organization): Remove.
+ These were deleted from Gnus itself late 2010.
+
+2012-05-22 Juanma Barranquero <lekktu@gmail.com>
+
+ * progmodes/which-func.el (which-func-ff-hook):
+ Check against user-error, not error.
+
+ * emacs-lisp/edebug.el (top): Do not load or set up loading of
+ cl-specs.el, which no longer exists.
+
+2012-05-22 Glenn Morris <rgm@gnu.org>
+
+ * info.el (info-emacs-bug): New command.
+ * menu-bar.el (menu-bar-help-menu): Add "How to Report a Bug" to Help.
+ * mail/emacsbug.el (report-emacs-bug): Replace with info-emacs-bug.
+
+2012-05-21 Glenn Morris <rgm@gnu.org>
+
+ * makefile.w32-in (update-subdirs-SH):
+ * Makefile.in (update-subdirs): Update for moved update-subdirs.
+
+2012-05-21 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * hi-lock.el (hi-lock-face-defaults): Move obsolete before definition.
+
+ * progmodes/compile.el (compilation-error-regexp-alist-alist):
+ Simplify Maven regexp, and make sure the file can't start with a space
+ (bug#11517).
+
+2012-05-21 Glenn Morris <rgm@gnu.org>
+
+ * Makefile.in (setwins, setwins_almost, setwins_for_subdirs):
+ Scrap superfluous subshells.
+
+2012-05-19 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * emacs-lisp/bytecomp.el (byte-compile-root-dir): New var.
+ (byte-compile-warning-prefix, batch-byte-compile-file): Use it.
+
+2012-05-19 Jay Belanger <jay.p.belanger@gmail.com>
+
+ * calc/calc.el (calc-ensure-consistent-units): New variable.
+
+ * calc/calc-units.el (math-consistent-units-p)
+ (math-check-unit-consistency): New functions.
+ (calc-quick-units, calc-convert-units):
+ Use `math-check-unit-consistency' when `calc-ensure-consistent-units'
+ is non-nil.
+ (calc-extract-units): Fix typo.
+
+2012-05-18 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * vc/vc-bzr.el (vc-bzr-state-heuristic): Save match-data around sha1.
+
+ * textmodes/flyspell.el: Commenting style, plus code simplifications.
+ (flyspell-default-deplacement-commands): Don't spell check after
+ repeated window/frame switches (e.g. triggered by mouse-movement).
+ (flyspell-delay-commands, flyspell-deplacement-commands): Use mapc.
+ (flyspell-debug-signal-word-checked): Simplify and fit in 80 cols.
+ (flyspell-casechars-cache, flyspell-ispell-casechars-cache)
+ (flyspell-not-casechars-cache, flyspell-ispell-not-casechars-cache):
+ Remove unused vars.
+ (flyspell-get-casechars, flyspell-get-not-casechars):
+ Simplify; Don't bother removing a ] just to add it back.
+ * textmodes/ispell.el (ispell-program-name): Use executable-find.
+
+2012-05-18 RĂĽdiger Sonderfeld <ruediger@c-plusplus.de>
+
+ * calc/calc-lang.el (math-C-parse-bess, math-C-parse-fma):
+ New functions.
+ (math-function-table): Add support for more C functions.
+
+2012-05-18 AgustĂ­n MartĂ­n Domingo <agustin.martin@hispalinux.es>
+
+ * flyspell.el (flyspell-check-pre-word-p, flyspell-check-word-p)
+ (flyspell-debug-signal-word-checked): Protect delay handling for
+ otherchars against empty otherchars.
+
+2012-05-18 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * emacs-lisp/lisp-mode.el (doc-string-elt): Move those properties to
+ their respective macro declarations.
+ * skeleton.el (define-skeleton):
+ * progmodes/compile.el (define-compilation-mode):
+ * ibuf-macs.el (define-ibuffer-sorter, define-ibuffer-op)
+ (define-ibuffer-filter):
+ * emacs-lisp/generic.el (define-generic-mode):
+ * emacs-lisp/easy-mmode.el (define-minor-mode)
+ (define-globalized-minor-mode):
+ * emacs-lisp/cl-macs.el (defun*, defmacro*, defstruct, deftype):
+ * emacs-lisp/byte-run.el (defsubst):
+ * custom.el (deftheme): Add doc-string metadata.
+
+2012-05-17 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * emacs-lisp/cl-macs.el, emacs-lisp/cl.el: Move indent info.
+
+2012-05-17 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * emacs-lisp/pcase.el (pcase--u1): Avoid ((lambda ...) ...).
+
+ * emacs-lisp/cl.el: Add edebug specs from cl-specs.el.
+ * emacs-lisp/cl-macs.el: Idem.
+ * emacs-lisp/cl-specs.el: Remove.
+
+2012-05-17 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ Minor renaming of internal CL functions and variables.
+ * emacs-lisp/cl-seq.el (cl--adjoin): Rename from cl-adjoin.
+ (cl--position): Rename from cl-position.
+ (cl--delete-duplicates): Rename from cl-delete-duplicates.
+ * emacs-lisp/cl.el (cl--gensym-counter): Rename from *gensym-counter*.
+ (cl--random-state): Rename from *random-state*.
+
+2012-05-17 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * emacs-lisp/cl-macs.el (cl-transform-lambda): Don't add spurious
+ parens around the arg list (bug#11499).
+
+2012-05-17 Juri Linkov <juri@jurta.org>
+
+ * isearch.el (word-search-regexp, word-search-backward)
+ (word-search-forward, word-search-backward-lax)
+ (word-search-forward-lax): Move functions from search.c
+ (bug#10145, bug#11381).
+
+2012-05-16 AgustĂ­n MartĂ­n Domingo <agustin.martin@hispalinux.es>
+
+ * flyspell.el (flyspell-check-pre-word-p, flyspell-check-word-p)
+ (flyspell-debug-signal-word-checked): Delay for otherchars as for
+ normal word components.
+
+2012-05-16 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * minibuffer.el (completion--sifn-requote): Fix last change.
+ (minibuffer-local-must-match-filename-map):
+ Move define-obsolete-variable-alias before its var.
+
+2012-05-15 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * emacs-lisp/pcase.el (pcase-let*, pcase-let): Fix edebug spec.
+
+ * minibuffer.el (completion--sifn-requote): Handle sifn's truncation
+ behavior.
+ (completion--string-equal-p): New function.
+ (completion--twq-all): Use it to get better assertion failure data.
+
+ Only handle ".." and '..' quoting in shell-mode (bug#11466).
+ * shell.el (shell--unquote&requote-argument, shell--unquote-argument)
+ (shell--requote-argument): New functions.
+ (shell-completion-vars): Use them.
+ (shell--parse-pcomplete-arguments): Rename from
+ shell-parse-pcomplete-arguments.
+ * comint.el (comint-word): Obey comint-file-name-quote-list. Simplify.
+ (comint--unquote&requote-argument): Don't handle ".." and '..' quoting.
+ Obey comint-file-name-quote-list.
+
+ * emacs-lisp/smie.el (smie-indent--bolp-1): New function.
+ (smie-indent-keyword): Use it.
+
+2012-05-14 Stefan Merten <smerten@oekonux.de>
+
+ * textmodes/rst.el (rst-re-alist): Fix loading (bug#11462).
+
+2012-05-14 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * net/rlogin.el (rlogin-mode-map): Fix last change.
+
+2012-05-14 Jason L. Wright <jason.wright@inl.gov> (tiny change)
+
+ * mail/smtpmail.el (smtpmail-send-command): Send the command and
+ the following \r\n using a single `process-send-string', since the
+ Lotus SMTP server refuses to accept any commands if they are sent
+ with two `process-send-string's (Bug#11444).
+
+2012-05-14 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * shell.el (shell-parse-pcomplete-arguments):
+ Obey pcomplete-arg-quote-list inside double-quoted args (Bug#11348).
+
+2012-05-14 Wolfgang Jenkner <wjenkner@inode.at>
+
+ * image-mode.el: Fit to width/height for rotated images (Bug#11431).
+ (image-transform-scale, image-transform-right-angle-fudge): New vars.
+ (image-transform-width, image-transform-fit-width): New functions.
+ (image-transform-properties): Use them.
+ (image-transform-check-size): New function.
+ (image-toggle-display-image): Use it (for testing).
+ (image-transform-set-rotation): Reduce angle mod 360.
+ Delete obsolete comment.
+
+2012-05-14 Wolfgang Jenkner <wjenkner@inode.at>
+
+ * image-mode.el: Fix scaling (bug#11399).
+ (image-transform-resize): Doc fix.
+ (image-transform-properties): Default scale is 1 and height should
+ be an integer.
+
+2012-05-13 Johan BockgĂĄrd <bojohan@gnu.org>
+
+ * emacs-lisp/smie.el (smie-next-sexp): Use accessor `op-forw' rather
+ than hard-coding `car', to fix misbehavior when moving forward.
+
+2012-05-13 Chong Yidong <cyd@gnu.org>
+
+ * emacs-lisp/tabulated-list.el (tabulated-list-format)
+ (tabulated-list-entries, tabulated-list-padding)
+ (tabulated-list-sort-key): Make permanent-local.
+
+ * ebuff-menu.el: Adapt to Buffer Menu changes (Bug#11455).
+ (electric-buffer-list): Put electric buffer menu
+ command descriptions in this docstring, instead of the docstring
+ of electric-buffer-menu-mode. Code cleanups.
+ (electric-buffer-menu-mode): Use define-derived-mode. Rename from
+ Electric-buffer-menu-mode.
+ (electric-buffer-update-highlight): Minor code cleanup.
+
+2012-05-13 Michael Albinus <michael.albinus@gmx.de>
+
+ * net/dbus.el (dbus-call-method): Restore events not from D-Bus.
+ (Bug#11447)
+
+2012-05-13 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ Move define-obsolete-variable-alias before the var's definition.
+ * vc/log-edit.el (vc-comment-ring, vc-comment-ring-index):
+ * tooltip.el (tooltip-hook):
+ * textmodes/reftex-toc.el (reftex-toc-map):
+ * textmodes/reftex-sel.el (reftex-select-label-map)
+ (reftex-select-bib-map):
+ * textmodes/reftex-index.el (reftex-index-map)
+ (reftex-index-phrases-map):
+ * speedbar.el (speedbar-syntax-table, speedbar-key-map):
+ * progmodes/meta-mode.el (meta-mode-map):
+ * novice.el (disabled-command-hook):
+ * loadhist.el (unload-hook-features-list):
+ * frame.el (blink-cursor):
+ * files.el (find-file-not-found-hooks, write-file-hooks)
+ (write-contents-hooks):
+ * emulation/tpu-edt.el (GOLD-map):
+ * emacs-lock.el (emacs-lock-from-exiting):
+ * emacs-lisp/generic.el (generic-font-lock-defaults):
+ * emacs-lisp/chart.el (chart-map):
+ * dos-fns.el (register-name-alist):
+ * dired-x.el (dired-omit-files-p):
+ * desktop.el (desktop-enable):
+ * cus-edit.el (custom-mode-hook):
+ * buff-menu.el (buffer-menu-mode-hook):
+ * bookmark.el (bookmark-read-annotation-text-func)
+ (bookmark-exit-hooks):
+ * allout.el (allout-mode-deactivate-hook)
+ (allout-exposure-change-hook, allout-structure-added-hook)
+ (allout-structure-deleted-hook, allout-structure-shifted-hook):
+ * dirtrack.el (dirtrack-toggle, dirtrackp, dirtrack-debug-toggle)
+ (dirtrack-debug): Move call to define-obsolete-variable-alias so it
+ comes before the corresponding variable's definition.
+
+2012-05-12 Chong Yidong <cyd@gnu.org>
+
+ * buff-menu.el (Buffer-menu-buffer+size-width): Doc fix (Bug#11454).
+ (Buffer-menu-mouse-select): Restore function (Bug#11459).
+ (Buffer-menu-mode-map): Bind it.
+ (Buffer-menu--pretty-name): Add a mouse-face property.
+
+2012-05-11 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * progmodes/prolog.el: Use SMIE. Cleanup regexp setup.
+ (prolog-upper-case-string, prolog-lower-case-string)
+ (prolog-atom-char-regexp, prolog-atom-regexp): Initialize in defconst.
+ (prolog-use-smie, prolog-smie-grammar): New vars.
+ (prolog-smie-forward-token, prolog-smie-backward-token)
+ (prolog-smie-rules): New funs.
+ (prolog-comment-indent): Remove.
+ (prolog-mode-variables): Use default comment indentation instead.
+ Setup SMIE.
+ (prolog-build-case-strings, prolog-set-atom-regexps): Remove.
+ (prolog-mode): Don't call them any more.
+ (prolog-electric-colon, prolog-electric-dash)
+ (prolog-edit-menu-insert-move): Use indent-according-to-mode.
+
+ * dabbrev.el (dabbrev-expand): Make "no expansion found" a user-error.
+
+ * minibuffer.el (completion--twq-all): Again, allow case differences.
+
+ * term.el: Move keymap initialization code to be more idiomatic.
+ (term-signals-menu, term-mode-map, term-raw-map, term-raw-escape-map)
+ (term-terminal-menu): Move initialization into declaration.
+ (term-escape-char): Let the user set it in her .emacs.
+
+ * progmodes/sh-script.el: Use post-self-insert-hook&electric-pair-mode.
+ Provide SMIE-based indentation (not enabled by default yet).
+ (sh-mode-map): Don't bind electric keys.
+ Use electric-pair-mode instead of skeleton-pair.
+ (sh-assignment-regexp): Fit within 80 columns.
+ (sh-indent-supported): Specify actual shell name instead of boolean.
+ (sh--maybe-here-document): New fun, from sh-maybe-here-document.
+ (sh-maybe-here-document): Use it. Make obsolete.
+ (sh-electric-here-document-mode) New minor mode.
+ (sh-mode): Use it. Don't set sh-indent-supported-here here.
+ (sh-smie-sh-grammar, sh-smie--sh-operators, sh-smie--sh-operators-re)
+ (sh-smie--sh-operators-back-re, sh-indent-after-continuation)
+ (sh-smie-rc-grammar, sh-use-smie): New vars.
+ (sh-smie--keyword-p, sh-smie--newline-semi-p, sh-smie--sh-keyword-p)
+ (sh-smie-sh-forward-token, sh-smie--looking-back-at-continuation-p)
+ (sh-smie-sh-backward-token, sh-smie--continuation-start-indent)
+ (sh-smie-sh-rules, sh-smie-rc-rules, sh-smie--sh-keyword-in-p)
+ (sh-smie--rc-after-special-arg-p, sh-smie-rc-backward-token)
+ (sh-smie-sh-rules, sh-smie--rc-newline-semi-p): New functions.
+ (sh-set-shell): Use smie-setup if requested.
+
+ * term.el (term-set-escape-char): Properly set term-escape-char.
+ See http://stackoverflow.com/questions/10524656.
+
+2012-05-10 Chong Yidong <cyd@gnu.org>
+
+ * ffap.el (ffap-url-unwrap-local): Make it work right (Bug#9131).
+ Use url-generic-parse-url, and handle host names and Windows
+ filenames properly.
+ (ffap-url-unwrap-remote): Use url-generic-parse-url.
+ (ffap-url-unwrap-remote): Accept list values, specifying a list of
+ URL schemes to work on.
+ (ffap--toggle-read-only): New function.
+ (ffap-read-only, ffap-read-only-other-window)
+ (ffap-read-only-other-frame): Use it.
+ (ffap-fixup-url): Don't check ffap-ftp-regexp, since it is not
+ necessary for ffap-url-unwrap-remote.
+
+2012-05-10 Dave Abrahams <dave@boostpro.com>
+
+ * cus-start.el (create-lockfiles): Add it.
+
+2012-05-09 Chong Yidong <cyd@gnu.org>
+
+ * net/browse-url.el (browse-url-url-encode-chars): Use upper-case.
+ (browse-url-encode-url): Encode spaces and quotes (Bug#6300).
+
+2012-05-09 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * shell.el (shell-completion-vars): Fix last change (bug#11348).
+
+2012-05-09 Chong Yidong <cyd@gnu.org>
+
+ * ansi-color.el (ansi-color-process-output): Check for validity of
+ comint-last-output-start before using it. This avoids a bad
+ interaction with gdb-mi's input/output buffer.
+
+2012-05-09 Glenn Morris <rgm@gnu.org>
+
+ * files.el (dir-locals-read-from-file):
+ Mention dir-locals in any error message.
+
+2012-05-09 Chong Yidong <cyd@gnu.org>
+
+ * emacs-lisp/package.el (package-built-in-p): Handle the `emacs'
+ package (Bug#11410).
+
+ * emacs-lisp/package.el (package-buffer-info): Avoid putting local
+ variables into description.
+
+2012-05-09 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * shell.el (shell-completion-vars): Set pcomplete-arg-quote-list like
+ shell-delimiter-argument-list (bug#11348).
+ (shell-parse-pcomplete-arguments): Obey pcomplete-arg-quote-list.
+
+2012-05-09 Juanma Barranquero <lekktu@gmail.com>
+
+ * textmodes/rst.el: Silence byte-compiler warnings.
+ (rst-re-alist, rst-reset-section-caches): Move around.
+ (rst-re): Use `characterp', not `char-valid-p'.
+ (font-lock-beg, font-lock-end): Declare.
+
+ * progmodes/idlw-shell.el (specs): Remove reference to deleted
+ variable `idlwave-shell-activate-alt-keybindings' and simplify.
+
+ * eshell/esh-cmd.el (eshell-debug-command): Fix typo in previous change.
+
+2012-05-08 Glenn Morris <rgm@gnu.org>
+
+ * files.el (auto-mode-alist): Treat ".make" like ".mk".
+
+2012-05-08 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * vc/log-edit.el: Add GNU coding standards highlighting.
+ (log-edit-font-lock-gnu-style)
+ (log-edit-font-lock-gnu-keywords): New vars.
+ (log-edit-font-lock-keywords): New fun.
+ (log-edit-mode): Don't fold case in font-lock.
+ (log-edit-font-lock-keywords): Do not assume case-folding.
+
+ * imenu.el: Misc cleanup. Make docstrings out of comments.
+ Use lexical-binding.
+ (imenu--index-alist, imenu--last-menubar-index-alist)
+ (imenu-menubar-modified-tick): Use defvar-local.
+ (imenu--split-menu): Remove unused var.
+ (imenu--cleanup-seen): Declare as global.
+ (imenu--cleanup): Use dolist.
+
+ * subr.el (defvar-local): Add debug spec and doc-string position.
+
+2012-05-08 Glenn Morris <rgm@gnu.org>
+
+ * lisp/language/burmese.el, language/cham.el, language/czech.el:
+ * language/english.el, language/georgian.el, language/greek.el:
+ * language/japanese.el, language/khmer.el, language/korean.el:
+ * language/lao.el, language/misc-lang.el, language/romanian.el:
+ * language/sinhala.el, language/slovak.el, language/tai-viet.el:
+ * language/thai.el, language/utf-8-lang.el:
+ Remove no-byte-compile setting.
+
+ * play/zone.el (zone-pgm-stress): Don't pollute kill-ring. (Bug#11388)
+
+2012-05-08 Aaron S. Hawley <aaron.s.hawley@gmail.com>
+
+ * progmodes/make-mode.el (makefile-browse):
+ Remove unnecessary interactive. (Bug#11324)
+
+2012-05-07 Glenn Morris <rgm@gnu.org>
+
+ * forms-d2.el, forms-pass.el: Move to ../etc/forms directory.
+
+ * international/mule.el (find-auto-coding): Make "unibyte: t" obsolete.
+
+2012-05-07 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * loadup.el: Preload newcomment.el.
+ * newcomment.el: Move autoload-only code to toplevel.
+
+ * buff-menu.el (list-buffers--refresh): Mark `size' as right-align.
+ * emacs-lisp/tabulated-list.el (tabulated-list-init-header):
+ Handle new :right-align column property.
+ (tabulated-list-print-col): Idem, plus use `display' text-property to
+ try and preserve alignment for variable pitch fonts.
+
+2012-05-07 Chong Yidong <cyd@gnu.org>
+
+ * emacs-lisp/tabulated-list.el: Add no-header-line alternative.
+ (tabulated-list-use-header-line): New var.
+ (tabulated-list-init-header): Use it.
+ (tabulated-list-print-fake-header): New function.
+ (tabulated-list-print): Use it.
+ (tabulated-list-sort-button-map): Add non-header-line commands.
+ (tabulated-list-init-header): Add column name property to basic
+ labels as well.
+ (tabulated-list-col-sort): Handle non-header-line button case.
+ (tabulated-list--sort-by-column-name): Fix a corner case.
+
+ * buff-menu.el (list-buffers--refresh):
+ Handle Buffer-menu-use-header-line.
+
+2012-05-06 Chong Yidong <cyd@gnu.org>
+
+ * buff-menu.el: Convert to Tabulated List mode.
+ (Buffer-menu-buffer+size-width): Make obsolete.
+ (Buffer-menu-name-width, Buffer-menu-size-width): New variables.
+ (Buffer-menu-mode-map): Inherit from tabulated-list-mode-map.
+ (Buffer-menu-mode): Derive from tabulated-list-mode. Move command
+ documentation into docstring of buffer-menu.
+ (Buffer-menu-toggle-files-only): Add an informative message.
+ (Buffer-menu-sort): Convert to alias for tabulated-list-sort.
+ (Buffer-menu-buffer, Buffer-menu-beginning, Buffer-menu-mark)
+ (Buffer-menu-unmark, Buffer-menu-backup-unmark)
+ (Buffer-menu-delete, Buffer-menu-save, Buffer-menu-not-modified)
+ (Buffer-menu-execute, Buffer-menu-select)
+ (Buffer-menu-marked-buffers, Buffer-menu-toggle-read-only)
+ (Buffer-menu-bury): Use Tabulated List machinery.
+ (Buffer-menu-mouse-select, Buffer-menu-sort-by-column)
+ (Buffer-menu-sort-button-map, Buffer-menu-make-sort-button):
+ Delete.
+ (list-buffers--refresh): New function.
+ (list-buffers-noselect): Use it.
+ (tabulated-list-entry-size->, Buffer-menu--pretty-name)
+ (Buffer-menu--pretty-file-name): New helper functions.
+
+ * loadup.el: Preload tabulated-list.
+
+ * emacs-lisp/tabulated-list.el (tabulated-list-sort): Rename from
+ tabulated-list-sort-column.
+ (tabulated-list-init-header): Add the initial aligning space even
+ if tabulated-list-padding is zero.
+
+2012-05-06 Christopher Schmidt <christopher@ch.ristopher.com>
+
+ * emacs-lisp/cl-macs.el (cl-expr-contains): Handle cons cells
+ whose cdr is not a cons cell correctly (bug#11038).
+
+2012-05-06 Chong Yidong <cyd@gnu.org>
+
+ * emacs-lisp/tabulated-list.el (tabulated-list-format):
+ Accept additional plist in column descriptors.
+ (tabulated-list-init-header): Obey it.
+ (tabulated-list-get-entry): New function.
+ (tabulated-list-put-tag): Use it. Use string-width instead of
+ length.
+ (tabulated-list--column-number): New function.
+ (tabulated-list-print): Use it.
+ (tabulated-list-print-col): New function.
+ Set `tabulated-list-column-name' property on each column's text.
+ (tabulated-list-print-entry): Use it.
+ (tabulated-list-delete-entry, tabulated-list-set-col):
+ New functions.
+ (tabulated-list-sort-column): New command (Bug#11337).
+
+ * buff-menu.el (list-buffers): Move C-x C-b binding from
+ buff-menu.el to bindings.el.
+
+ * ebuff-menu.el (Electric-buffer-menu-undefined): Use the
+ :advertised-binding feature.
+
+2012-05-06 Troels Nielsen <bn.troels@gmail.com> (tiny change)
+
+ * progmodes/compile.el (compilation-internal-error-properties):
+ Calculate start position correctly when end-col is set but
+ end-line is not (Bug#11382).
+
+2012-05-06 Wolfgang Jenkner <wjenkner@inode.at>
+
+ * man.el (Man-unindent): Use text-property-default-nonsticky to
+ prevent untabify from inheriting face properties (Bug#11408).
+
+2012-05-05 Glenn Morris <rgm@gnu.org>
+
+ * calendar/cal-html.el: Optionally include holidays in the output.
+ Suggested by Ed Reingold <reingold@emr.cs.iit.edu>.
+ (cal-html-holidays): New option.
+ (cal-html-css-default): Add holiday entry.
+ (holiday-in-range): Autoload it.
+ (cal-html-htmlify-entry): Add optional class argument.
+ (cal-html-htmlify-list): Add optional holidays argument.
+ (cal-html-insert-agenda-days): Include holidays in the output.
+ (cal-html-one-month): Maybe include holidays.
+
+ * calendar/holidays.el (holiday-in-range):
+ Move here from cal-tex-list-holidays.
+ * calendar/cal-tex.el (cal-tex-list-holidays):
+ Make it an obsolete alias for holiday-in-range. Update all callers.
+
+2012-05-05 Chong Yidong <cyd@gnu.org>
+
+ * select.el (xselect--encode-string): Always use utf-8 for TEXT on
+ Nextstep.
+
+2012-05-05 Ransom Williams <auvergnerw@gmail.com> (tiny change)
+
+ * files.el (file-auto-mode-skip): New var.
+ (set-auto-mode-1): Use it.
+
+2012-05-05 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * repeat.el: Use lexical-binding.
+ (repeat-last-self-insert, repeat-num-input-keys-at-self-insert)
+ (repeat-undo-count): Remove.
+ (repeat):
+ * progmodes/octave-mod.el (octave-abbrev-start):
+ * progmodes/f90.el (f90-abbrev-start):
+ * face-remap.el (text-scale-adjust):
+ * kmacro.el (kmacro-call-macro): Use set-temporary-overlay-map.
+
+ * emacs-lisp/pcase.el (pcase--let*): New function.
+ (pcase--expand, pcase-codegen, pcase--q1): Use it to reduce nesting
+ a bit more.
+ (pcase--split-pred): Be more clever about ruling out overlap between
+ a predicate and some constant pattern.
+ (pcase--q1): Use `null' instead of (eq foo nil).
+
+ * subr.el (setq-local, defvar-local): New macros.
+ (kbd): Redefine as an alias.
+ (with-selected-window): Leave unrelated frames alone.
+ (set-temporary-overlay-map): New function.
+
+2012-05-04 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * subr.el (user-error): New function.
+ * window.el (switch-to-buffer):
+ * vc/smerge-mode.el (smerge-resolve-function, smerge-resolve)
+ (smerge-match-conflict):
+ * simple.el (previous-matching-history-element)
+ (next-matching-history-element, goto-history-element, undo-more)
+ (undo-start):
+ * progmodes/etags.el (visit-tags-table-buffer, find-tag-tag)
+ (find-tag-noselect, find-tag-in-order, etags-goto-tag-location)
+ (next-file, tags-loop-scan, list-tags, complete-tag):
+ * progmodes/compile.el (compilation-loop):
+ * mouse.el (mouse-minibuffer-check):
+ * man.el (Man-bgproc-sentinel, Man-goto-page):
+ * info.el (Info-find-node-2, Info-extract-pointer, Info-history-back)
+ (Info-history-forward, Info-follow-reference, Info-menu)
+ (Info-extract-menu-item, Info-extract-menu-counting)
+ (Info-forward-node, Info-backward-node, Info-next-menu-item)
+ (Info-last-menu-item, Info-next-preorder, Info-last-preorder)
+ (Info-next-reference, Info-prev-reference, Info-index)
+ (Info-index-next, Info-follow-nearest-node)
+ (Info-copy-current-node-name):
+ * imenu.el (imenu--make-index-alist)
+ (imenu-default-create-index-function, imenu-add-to-menubar):
+ * files.el (basic-save-buffer, recover-file):
+ * emacs-lisp/easy-mmode.el (easy-mmode-define-navigation):
+ * emacs-lisp/checkdoc.el (checkdoc-continue, checkdoc-comments)
+ (checkdoc-message-text, checkdoc-defun):
+ * dabbrev.el (dabbrev-completion, dabbrev--abbrev-at-point):
+ * cus-edit.el (customize-changed-options, customize-rogue)
+ (customize-saved, custom-variable-set, custom-variable-mark-to-save)
+ (custom-variable-mark-to-reset-standard)
+ (custom-variable-reset-backup, custom-face-mark-to-reset-standard)
+ (custom-file):
+ * completion.el (check-completion-length):
+ * comint.el (comint-search-arg)
+ (comint-previous-matching-input-string-position)
+ (comint-previous-matching-input)
+ (comint-replace-by-expanded-history-before-point, comint-send-input)
+ (comint-copy-old-input, comint-backward-matching-input)
+ (comint-goto-process-mark, comint-set-process-mark):
+ * calendar/calendar.el (calendar-cursor-to-date): Use it.
+ * bindings.el (debug-ignored-errors): Remove regexps, add `user-error'.
+
+2012-05-04 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * dabbrev.el (dabbrev--ignore-case-p): New function.
+ (dabbrev-completion, dabbrev-expand, dabbrev--substitute-expansion):
+ Use it.
+
+ * files.el (automount-dir-prefix): Mark as obsolete.
+
+2012-05-04 Glenn Morris <rgm@gnu.org>
+
+ * patcomp.el, play/bruce.el: Move to obsolete/.
+
+2012-05-04 Paul Eggert <eggert@cs.ucla.edu>
+
+ Fix minor Y10k bugs.
+ * arc-mode.el (archive-unixdate):
+ * autoinsert.el (auto-insert-alist):
+ * calc/calc-forms.el (math-this-year):
+ * emacs-lisp/copyright.el (copyright-current-year)
+ (copyright-update-year, copyright):
+ * tar-mode.el (tar-clip-time-string):
+ * time.el (display-time-update):
+ Don't assume years have 4 digits.
+
+2012-05-04 Chong Yidong <cyd@gnu.org>
+
+ * dos-w32.el (file-name-buffer-file-type-alist)
+ (direct-print-region-use-command-dot-com):
+ * ffap.el (ffap-menu-regexp):
+ * find-file.el (ff-special-constructs):
+ * follow.el (follow-debug):
+ * forms.el (forms--debug):
+ * iswitchb.el (iswitchb-all-frames):
+ * ido.el (ido-all-frames):
+ * emacs-lisp/timer.el (timer-max-repeats):
+ * mail/feedmail.el (feedmail-mail-send-hook)
+ (feedmail-mail-send-hook-queued):
+ * mail/footnote.el (footnote-signature-separator):
+ * mail/mailabbrev.el (mail-alias-separator-string)
+ (mail-abbrev-mode-regexp):
+ * mail/rmail.el (rmail-speedbar-match-folder-regexp):
+ * progmodes/idlwave.el (idlwave-libinfo-file)
+ (idlwave-default-completion-case-is-down)
+ (idlwave-library-routines): Convert defvars to defcustoms.
+
+ * mail/rmail.el (rmail-decode-mime-charset):
+ * progmodes/idlw-shell.el (idlwave-shell-print-expression-function)
+ (idlwave-shell-fix-inserted-breaks)
+ (idlwave-shell-activate-alt-keybindings)
+ (idlwave-shell-use-breakpoint-glyph):
+ * facemenu.el (facemenu-unlisted-faces): Delete obsolete vars.
+
+2012-05-03 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * minibuffer.el (completion--twq-all): Beware completion-ignore-case.
+
+2012-05-03 Wilson Snyder <wsnyder@wsnyder.org>
+
+ * progmodes/verilog-mode.el (font-lock-keywords):
+ Fix mis-highligting auto. Reported by Craig Barner.
+ (verilog-auto, verilog-auto-undef): Add AUTOUNDEF to remove
+ defines from global name space. Reported by Dan Dever.
+ (verilog-auto-reset, verilog-auto-reset-widths)
+ (verilog-auto-tieoff): Support using unbased numbers for
+ AUTORESET and AUTOTIEOFF.
+ (verilog-submit-bug-report): Update variable list.
+ (verilog-read-auto-params): Fix AUTOINPUT regexps containing
+ parenthesis from not matching. Reported by Michael Rytting.
+ (verilog-auto-template-lint): Fix hash error when linting modules
+ with no used templates.
+ (verilog-warn, verilog-warn-error)
+ (verilog-warn-fatal): When non-interactive report multiple
+ warnings before exiting. Suggested by Brad Dobbie.
+ (verilog-auto-template-lint, verilog-auto-template-warn-unused)
+ (verilog-read-auto-template): Add `verilog-auto-template-warn-unused'
+ to report unused template errors. Reported by Brad Dobbie.
+ (verilog-read-decls): Fix AUTOWIRE etc on supply0, supply1 type
+ nets, bug438. Reported by Vns Blore.
+ (verilog-auto-inout-module, verilog-auto-reg)
+ (verilog-read-decls, verilog-read-sub-decls-sig)
+ (verilog-signals-edit-wire-reg, verilog-signals-with):
+ Fix passing of Verilog data types in ANSI input/output ports
+ such as "output logic" into the AUTOs. Special case "wire" and
+ "reg" for backwards compatibility presuming Verilog 2001.
+ (verilog-auto-ascii-enum): Add "auto enum" as alias.
+ (verilog-preprocess): Fix replication of preprocess output.
+ Reported by Brad Dobbie.
+ (verilog-auto-inst-interfaced-ports):
+ Create verilog-auto-inst-interfaced-ports, bug429.
+ Reported by Julian Gorfajn.
+ (verilog-after-save-font-hook)
+ (verilog-before-save-font-hook): New variable.
+ (verilog-modi-cache-results, verilog-save-font-mod-hooked)
+ (verilog-save-font-mods): Wrap disabling fontification, reported
+ by David Rogoff.
+ (verilog-do-indent, verilog-pretty-declarations-auto)
+ (verilog-sk-def-reg): Fix obeying `verilog-auto-lineup', bug305.
+ Reported by Pierre-David Pfister.
+ (verilog-set-auto-endcomments): Fix endtask auto comments outside
+ of class declarations, bug292. Reported by Kevin Heilman.
+ (verilog-read-decls): Fix 'parameter type' not appearing in
+ AUTOINSTPARAM, bug340. Reported by Jonathan Greenlaw.
+ (verilog-auto-logic): Fix when AUTOLOGIC present to properly do
+ AUTOINPUTs, bug411. Reported by Jonathan Greenlaw.
+ (verilog-read-auto-lisp): Avoid syntax-ppss warning on AUTOLISP.
+ Reported by David Kravitz.
+
+2012-05-03 Michael McNamara <mac@mail.brushroad.com>
+
+ * progmodes/verilog-mode.el (verilog-pretty-expr): Don't line up
+ assignment with tests in ifs and for loops.
+ (verilog-extended-complete-re, verilog-complete-reg): Change so
+ that DPI inport functions don't look like fuction declarations.
+ (verilog-pretty-expr): Don't line up assignment
+ operations to the test and increment in if and for loops
+ (verilog-extended-complete-re, verilog-complete-reg): Change so
+ that DPI inport functions don't look like fuction declarations
+
+2012-05-03 Kenichi Handa <handa@m17n.org>
+
+ * mail/rmailmm.el (rmail-show-mime): Catch an error caused by text
+ decoding, and show a warning message without signalling an error
+ (Bug#11282).
+
+2012-05-03 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * emacs-lisp/bytecomp.el
+ (byte-compile-file-form-custom-declare-variable): Compile all elements,
+ since cconv.el might have introduced :fun-body, internal-make-closure,
+ and friends for bytecomp to handle (bug#11391).
+ * custom.el (defcustom): Avoid ((λ ..) ..).
+
+2012-05-02 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * subr.el (read-passwd): Better clean after ourselves (bug#11392).
+
+2012-05-02 Juanma Barranquero <lekktu@gmail.com>
+
+ * notifications.el (dbus-debug):
+ * term/linux.el (gpm-mouse-enable):
+ * term/screen.el (xterm-register-default-colors): Declare.
+
+2012-05-02 Chong Yidong <cyd@gnu.org>
+
+ * cus-start.el (gc-cons-percentage, exec-suffixes)
+ (dos-display-scancodes, dos-hyper-key, dos-super-key)
+ (dos-keypad-mode, debug-on-signal, vertical-centering-font-regexp)
+ (make-cursor-line-fully-visible, void-text-area-pointer)
+ (font-list-limit): Add customization data.
+
+ * allout.el (allout-exposure-change-functions)
+ (allout-structure-added-functions)
+ (allout-structure-deleted-functions)
+ (allout-structure-shifted-functions): Rename abnormal hooks from
+ *-hook, and convert to defcustoms.
+ (allout-after-copy-or-kill-hook, allout-post-undo-hook):
+ Convert to defcustoms.
+ (allout-mode-hook, allout-mode-deactivate-hook): Doc fix.
+
+ * allout-widgets.el: Hook callers changed.
+
+2012-05-02 Eli Zaretskii <eliz@gnu.org>
+
+ * mail/rmail.el (rmail-yank-current-message): Use the encoding of
+ the yanked message in preference to the default value of
+ buffer-file-coding-system.
+
+2012-05-02 Martin Rudalics <rudalics@gmx.at>
+
+ * window.el (display-buffer--action-function-custom-type):
+ Fix entry.
+
+2012-05-02 Alan Mackenzie <acm@muc.de>
+
+ * progmodes/cc-defs.el (c-version): Update to 5.32.3.
+
+2012-05-01 Glenn Morris <rgm@gnu.org>
+
+ * cus-start.el (suggest-key-bindings): Remove, now it is in Lisp.
+
+ * eshell/esh-cmd.el (eshell-debug-command): Doc fix. Add :set.
+
+ * cus-edit.el (custom-variable-documentation): Simplify with format.
+
+2012-05-01 Aaron S. Hawley <aaron.s.hawley@gmail.com>
+ Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * simple.el (suggest-key-bindings, execute-extended-command):
+ Move from keyboard.c.
+
+2012-05-01 Chong Yidong <cyd@gnu.org>
+
+ * follow.el: Eliminate advice.
+ (set-process-filter, process-filter, sit-for): Advice deleted.
+ (follow-mode-off-hook): Obsolete hook removed.
+ (follow-avoid-tail-recenter-p, follow-process-filter-alist):
+ Vars deleted.
+ (follow-auto): Use a :set function.
+ (follow-mode): Rewritten. Don't advise process filters.
+ (follow-switch-to-current-buffer-all, follow-scroll-up)
+ (follow-scroll-down): Assume follow-mode is bound.
+ (follow-comint-scroll-to-bottom)
+ (follow-align-compilation-windows): New functions.
+ (follow--window-sorter): New function.
+ (follow-all-followers): Use it to explicitly sort windows by their
+ positions; don't make assumptions about next-window order.
+ (follow-windows-start-end, follow-delete-other-windows-and-split)
+ (follow-calc-win-start): Doc fix.
+ (follow-windows-aligned-p, follow-select-if-visible): Don't call
+ vertical-motion unnecessarily.
+ (follow-adjust-window): New function.
+ (follow-post-command-hook): Use it.
+ (follow-call-set-process-filter, follow-call-process-filter)
+ (follow-intercept-process-output, follow-tidy-process-filter-alist)
+ (follow-stop-intercept-process-output, follow-generic-filter):
+ Functions deleted.
+ (follow-scroll-bar-toolkit-scroll, follow-scroll-bar-drag)
+ (follow-scroll-bar-scroll-up, follow-scroll-bar-scroll-down):
+ New functions, replacing advice on scroll-bar-* commands.
+ (follow-mwheel-scroll): New function (Bug#4112).
+
+ * comint.el (comint-adjust-point): New function.
+ (comint-postoutput-scroll-to-bottom): Use it.
+ Call follow-comint-scroll-to-bottom for Follow mode buffers.
+
+2012-05-01 Glenn Morris <rgm@gnu.org>
+
+ * term/AT386.el, term/apollo.el, term/bobcat.el, term/cygwin.el:
+ * term/iris-ansi.el, term/linux.el, term/lk201.el, term/news.el:
+ * term/screen.el, term/vt102.el, term/vt125.el, term/vt200.el:
+ * term/vt201.el, term/vt220.el, term/vt240.el, term/vt300.el:
+ * term/vt320.el, term/vt400.el, term/vt420.el, term/wyse50.el:
+ Remove no-byte-compile setting.
+
+2012-05-01 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * minibuffer.el (completion-table-with-quoting): Fix compatibility
+ all-completions code to not return a number in the last cdr.
+
+2012-04-30 Leo Liu <sdl.web@gmail.com>
+
+ * ibuf-ext.el (ibuffer-diff-buffer-with-file-1): Avoid buffer
+ read-only error.
+
+2012-04-29 Chong Yidong <cyd@gnu.org>
+
+ * follow.el (follow-calc-win-end): Rewrite to handle partial
+ screen lines correctly (Bug#8390).
+ (follow-avoid-tail-recenter): Minor cleanup.
+
+2012-04-28 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ Avoid the obsolete `assoc' package.
+ * speedbar.el (speedbar-refresh): Avoid adelete.
+ (speedbar-file-lists): Simplify and avoid aput.
+ * man.el (Man--sections, Man--refpages): New vars, replacing
+ Man-sections-alist and Man-refpages-alist.
+ (Man-build-section-alist, Man-build-references-alist):
+ Use them; avoid aput.
+ (Man--last-section, Man--last-refpage): New vars.
+ (Man-follow-manual-reference): Use them.
+ Use the `default' arg of completing-read.
+ (Man-goto-section): Idem. Move prompt to the `interactive' spec.
+
+2012-04-27 Chong Yidong <cyd@gnu.org>
+
+ * vc/diff.el (diff-sentinel): Go to bob (Bug#10259).
+
+ * startup.el (x-apply-session-resources): New function.
+
+ * term/ns-win.el (ns-initialize-window-system):
+ * term/w32-win.el (w32-initialize-window-system):
+ * term/x-win.el (x-initialize-window-system): Use it to properly
+ set menu-bar-mode and other vars from X resources, even if the
+ initial frame is not a window-system frame (Bug#2299).
+
+ * subr.el (read-key): Avoid running filter function when setting
+ up temporary tool bar entries (Bug#9922).
+
+2012-04-27 Andreas Schwab <schwab@linux-m68k.org>
+
+ * vc/vc-git.el (vc-git-state): Fix regexp matching diff output.
+ (Bug#11344)
+
+2012-04-27 Chong Yidong <cyd@gnu.org>
+
+ * select.el (xselect--encode-string): New function, split from
+ xselect-convert-to-string.
+ (xselect-convert-to-string): Use it.
+ (xselect-convert-to-filename, xselect-convert-to-os)
+ (xselect-convert-to-host, xselect-convert-to-user): Ensure that
+ returned strings are properly encoded (Bug#11315).
+
+2012-04-27 Chong Yidong <cyd@gnu.org>
+
+ * simple.el (delete-active-region): Move to killing custom group.
+
+2012-04-27 Andreas Schwab <schwab@linux-m68k.org>
+
+ * progmodes/which-func.el (which-func-current): Quote %
+ characters for mode-line processing.
+
+2012-04-27 Chong Yidong <cyd@gnu.org>
+
+ * xml.el (xml-parse-region, xml-parse-tag): Avoid errors due to
+ reaching eob (Bug#11286).
+
+2012-04-27 Eli Zaretskii <eliz@gnu.org>
+
+ * progmodes/gdb-mi.el (gdb-control-level): New variable.
+ (gdb): Make it buffer-local and init to zero.
+ (gdb-control-commands-regexp): New variable.
+ (gdb-send): Don't wrap in "-interpreter-exec console" if
+ gdb-control-level is positive. Increment gdb-control-level
+ whenever the command matches gdb-control-commands-regexp, and
+ decrement it each time the command is "end". (Bug#11279)
+
+2012-04-27 Martin Rudalics <rudalics@gmx.at>
+
+ * window.el (adjust-window-trailing-edge, enlarge-window)
+ (shrink-window, window-resize):
+ * mouse.el (mouse-drag-line): Fix resizing of minibuffer
+ windows (Bug#11276).
+
+2012-04-27 Chong Yidong <cyd@gnu.org>
+
+ * progmodes/pascal.el (pascal--extra-indent): Rename from ind, to
+ fix "missing prefix" warning. All callers changed.
+
+2012-04-27 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * emacs-lisp/assoc.el: Move to obsolete/.
+
+2012-04-26 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * emacs-lisp/assoc.el (aget): Fix dynamic-scoping issue (bug#11352).
+
+ * term/ns-win.el (ns-define-service):
+ * progmodes/pascal.el (pascal-goto-defun):
+ * progmodes/js.el (js--read-tab):
+ * progmodes/etags.el (tags-lazy-completion-table):
+ * emacs-lisp/syntax.el (syntax-propertize-via-font-lock):
+ * emacs-lisp/ewoc.el (ewoc--wrap):
+ * emacs-lisp/assoc.el (aput, adelete, amake):
+ * doc-view.el (doc-view-convert-current-doc):
+ * vc/diff.el (diff-no-select): Replace lexical-let by lexical-binding.
+
+2012-04-26 Chong Yidong <cyd@gnu.org>
+
+ * image.el (image-type-from-buffer): Only return supported image
+ type (Bug#9045).
+
+ * vc/diff-mode.el (diff-beginning-of-hunk): Return a meaningful
+ value, for symmetry with diff-end-of-hunk.
+ (diff-split-hunk, diff-find-source-location)
+ (diff-ignore-whitespace-hunk, diff-refine-hunk): Use it.
+ (diff-bounds-of-hunk, diff-bounds-of-file): New functions.
+ (diff-restrict-view, diff-hunk-kill, diff-file-kill): Use them to
+ compute the relevant hunk or file properly (Bug#6005).
+ (diff-file-junk-re): Add bzr's "modified file" tag (Bug#6041).
+
+2012-04-26 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * vc/vc-mtn.el:
+ * vc/vc-hg.el:
+ * vc/vc-git.el:
+ * vc/vc-dir.el:
+ * vc/vc-cvs.el:
+ * vc/vc-bzr.el:
+ * vc/vc-arch.el:
+ * vc/vc.el: Replace lexical-let by lexical-binding.
+ * minibuffer.el (lazy-completion-table): Avoid ((λ ...) ...).
+ * emacs-lisp/cl-macs.el (lexical-let): Fix use in lexical-binding.
+ * emacs-lisp/cconv.el (cconv-analyse-form): Warn use of ((λ ...) ...).
+
+2012-04-26 Chong Yidong <cyd@gnu.org>
+
+ * vc/diff-mode.el (diff-undo): New command (Bug#5302).
+ (diff-mode-shared-map): Bind it to / and [remap undo].
+
+ * vc/ediff-wind.el (ediff-setup-windows-default): New function.
+ (ediff-window-setup-function): Use it as the default, to set up
+ windows based on whether the current frame is graphical (Bug#2138).
+ (ediff-choose-window-setup-function-automatically): Make obsolete.
+
+ * vc/ediff-init.el: Always define ediff-pixel-width/height.
+
+2012-04-25 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * ffap.el: Remove old code for obsolete package.
+ (ffap-complete-as-file-p): Remove.
+
+ Use completion-table-with-quoting for comint and pcomplete.
+ * comint.el (comint--unquote&requote-argument)
+ (comint--unquote-argument, comint--requote-argument): New functions.
+ (comint--unquote&expand-filename, comint-unquote-filename): Obsolete.
+ (comint-quote-filename): Use regexp-opt-charset.
+ (comint--common-suffix, comint--common-quoted-suffix)
+ (comint--table-subvert): Remove.
+ (comint-unquote-function, comint-requote-function): New vars.
+ (comint--complete-file-name-data): Use them with
+ completion-table-with-quoting.
+ * pcmpl-unix.el (pcomplete/scp): Use completion-table-subvert.
+ * pcomplete.el (pcomplete-arg-quote-list)
+ (pcomplete-quote-arg-hook, pcomplete-quote-argument): Obsolete.
+ (pcomplete-unquote-argument-function): Default to non-nil.
+ (pcomplete-unquote-argument): Simplify.
+ (pcomplete--common-quoted-suffix): Remove.
+ (pcomplete-requote-argument-function): New var.
+ (pcomplete--common-suffix): New function.
+ (pcomplete-completions-at-point): Use completion-table-with-quoting
+ and completion-table-subvert.
+
+ * minibuffer.el: Use completion-table-with-quoting for read-file-name.
+ (minibuffer--double-dollars): Preserve properties.
+ (completion--sifn-requote): New function.
+ (completion--file-name-table): Rewrite using it and c-t-with-quoting.
+
+ * minibuffer.el: Add support for completion of quoted/escaped data.
+ (completion-table-with-quoting, completion-table-subvert): New funs.
+ (completion--twq-try, completion--twq-all): New functions.
+ (completion--nth-completion): New function.
+ (completion-try-completion, completion-all-completions): Use it.
+
+2012-04-25 Leo Liu <sdl.web@gmail.com>
+
+ * progmodes/python.el (python-pdbtrack-get-source-buffer):
+ Use compilation-message if available to find real filename.
+
+2012-04-25 Chong Yidong <cyd@gnu.org>
+
+ * vc/diff-mode.el (diff-setup-whitespace): New function.
+ (diff-mode): Use it.
+
+ * vc/diff.el (diff-sentinel):
+ * vc/vc.el (vc-diff-finish): Call diff-setup-whitespace to assign
+ Whitespace mode variables based on diff style (Bug#8612).
+
+2012-04-25 Leo Liu <sdl.web@gmail.com>
+
+ * progmodes/python.el (python-send-region): Add suffix .py to the
+ temp file.
+
+ * files.el (auto-mode-alist): Use javascript-mode instead.
+
+2012-04-25 Alex Harsanyi <AlexHarsanyi@gmail.com>
+
+ Sync with soap-client repository. Support SOAP simpleType (Bug#10331).
+
+ * soap-client.el (soap-resolve-references-for-sequence-type)
+ (soap-resolve-references-for-array-type): Hack to prevent self
+ references, see Bug#9.
+ (soap-parse-envelope): Report the contents of the 'detail' node
+ when receiving a fault reply.
+ (soap-parse-envelope): Report the contents of the entire 'detail' node.
+
+ * soap-inspect.el (soap-sample-value-for-simple-type)
+ (soap-inspect-simple-type): New function.
+
+ * soap-client.el (soap-simple-type): New struct.
+ (soap-default-xsd-types, soap-default-soapenc-types)
+ (soap-decode-basic-type, soap-encode-basic-type):
+ support unsignedInt and double basic types.
+ (soap-resolve-references-for-simple-type)
+ (soap-parse-simple-type, soap-encode-simple-type): New function.
+ (soap-parse-schema): Parse xsd:simpleType declarations.
+
+ * soap-client.el (soap-default-xsd-types)
+ (soap-default-soapenc-types): Add integer, byte and anyURI types.
+ (soap-parse-complex-type-complex-content): Use `soap-wk2l' to find
+ the local name of "soapenc:Array".
+ (soap-decode-basic-type, soap-encode-basic-type): Support encoding
+ decoding integer, byte and anyURI xsd types.
+
+2012-04-25 Chong Yidong <cyd@gnu.org>
+
+ * cus-edit.el (custom-buffer-create-internal): Update header text.
+
+2012-04-25 Eli Zaretskii <eliz@gnu.org>
+
+ * progmodes/gdb-mi.el (gdb-init-1): Condition Windows-specific
+ settings on 'system-type', not on 'window-system'. On MS-Windows,
+ set interactive-mode on in GDB.
+
+2012-04-24 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * progmodes/ruby-mode.el: Simplify last change, and cleanup code.
+ (ruby-syntax-propertize-regexp): Remove.
+ (ruby-syntax-propertize-function): Split regexp into chunks.
+ Match following code directly.
+
+2012-04-24 Dmitry Gutov <dgutov@yandex.ru>
+
+ * progmodes/ruby-mode.el: Handle Cucumber defs (bug#6286).
+ (ruby-syntax-propertize-regexp): New function.
+ (ruby-syntax-propertize-function): Use it to handle regexp not preceded
+ by a special keyword.
+
+ * progmodes/ruby-mode.el: Handle general delimited literals (bug#6286).
+ (ruby-syntax-general-delimiters-goto-beg)
+ (ruby-syntax-propertize-general-delimiters): New functions.
+ (ruby-syntax-propertize-function): Use them to handle GDL.
+ (ruby-font-lock-keywords): Move old handling of GDL...
+ (ruby-font-lock-syntactic-keywords): .. to here.
+ (ruby-calculate-indent): Adjust indentation for GDL.
+
+2012-04-24 Michael Albinus <michael.albinus@gmx.de>
+
+ * notifications.el (top): Remove unneeded declarations.
+ (notifications-specification-version): Change to "1.2".
+ (notifications-interface, notifications-notify-method)
+ (notifications-close-notification-method): Fix docstring.
+ (notifications-get-capabilities-method): New defconst.
+ (notifications-notify): Add :action-items, :resident and
+ :transient hints. Change "image_data" to "image-data" and
+ "image_path" to "image-path".
+ (notifications-get-capabilities): New defun.
+
+2012-04-24 Leo Liu <sdl.web@gmail.com>
+
+ * progmodes/python.el: Move hideshow setup to the end.
+
+2012-04-24 Martin Rudalics <rudalics@gmx.at>
+
+ * window.el (handle-select-window): Clear echo area since this is
+ no more done by read_char (Bug#11304).
+
+2012-04-24 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * ibuffer.el (ibuffer-mode-map): Bind `/ m' to filter-used-mode
+ and `/ M' to filter-derived-mode.
+ * ibuf-ext.el (ibuffer-list-buffer-modes): Simplify; avoid add-to-list.
+ (ibuffer-filter-by-mode, ibuffer-filter-by-used-mode)
+ (ibuffer-mark-by-mode): Use default rather than initial-input.
+ (ibuffer-filter-by-derived-mode): Autoload and require-match.
+
+2012-04-24 Ivan Andrus <darthandrus@gmail.com> (tiny change)
+
+ * ibuf-ext.el (ibuffer-list-buffer-modes): Add `include-parents' arg.
+ (ibuffer-filter-by-derived-mode): New filter.
+ * ibuffer.el (ibuffer-mode-map): Bind to `/ w'.
+
+2012-04-23 Andreas Politz <politza@fh-trier.de>
+
+ * subr.el (accept-change-group): Fix arg usage (Bug#6095).
+
+2012-04-23 Chong Yidong <cyd@gnu.org>
+
+ * cus-edit.el (customize-apropos, customize-apropos-options):
+ Disable matching of non-option variables (Bug#11176).
+ (customize-option, customize-option-other-window)
+ (customize-changed-options): Doc fix.
+ (customize-apropos-options, customize-apropos-faces)
+ (customize-apropos-groups): Use apropos-read-pattern (Bug#11124).
+
+ * apropos.el (apropos-read-pattern): Make prompt less cryptic.
+ Fix word list splitting (Bug#11132).
+ (apropos-symbol, apropos-keybinding, apropos-label)
+ (apropos-property, apropos-function-button)
+ (apropos-variable-button, apropos-misc-button): New faces.
+ (apropos-symbol-face, apropos-keybinding-face)
+ (apropos-label-face, apropos-property-face, apropos-match-face):
+ Variables removed (Bug#8396).
+ (apropos-library-button, apropos-format-plist, apropos-print)
+ (apropos-print-doc, apropos-describe-plist): Callers changed.
+
+2012-04-23 Michael Albinus <michael.albinus@gmx.de>
+
+ * net/xesam.el (xesam-mode-map): Use let-bound map in
+ initialization. (Bug#11292)
+
+2012-04-23 AgustĂ­n MartĂ­n Domingo <agustin.martin@hispalinux.es>
+
+ Preserve ispell session localwords when switching back to
+ original buffer.
+
+ * ispell.el (ispell-buffer-session-localwords): New buffer-local
+ variable to hold buffer session localwords.
+ (ispell-kill-ispell): add option 'clear to delete session
+ localwords.
+ (ispell-command-loop, ispell-change-dictionary)
+ (ispell-buffer-local-words): Preserve session localwords when
+ needed.
+
+ * flyspell.el (flyspell-process-localwords, flyspell-do-correct):
+ Preserve session localwords when needed.
+
+2012-04-23 AgustĂ­n MartĂ­n Domingo <agustin.martin@hispalinux.es>
+
+ * ispell.el (ispell-insert-word) Remove unneeded function using
+ obsolete `translation-table-for-input'.
+ (ispell-word, ispell-process-line, ispell-complete-word):
+ Use plain `insert' instead of removed `ispell-insert-word'.
+
+2012-04-22 Chong Yidong <cyd@gnu.org>
+
+ * cus-edit.el (custom-variable-menu)
+ (custom-variable-reset-saved, custom-face-menu)
+ (custom-face-reset-saved): If there is no saved value, make the
+ "reset-saved" operation bring back the default (Bug#9509).
+ (custom-face-state): Properly detect themed faces.
+
+ * faces.el (face-spec-set): Stop supporting deprecated form of
+ third arg.
+
+2012-04-22 Michael Albinus <michael.albinus@gmx.de>
+
+ Move functions from C to Lisp. Make non-blocking method calls
+ the default. Implement further D-Bus standard interfaces.
+
+ * net/dbus.el (dbus-message-internal): Declare function.
+ Remove unneeded function declarations.
+ (defvar dbus-message-type-invalid, dbus-message-type-method-call)
+ (dbus-message-type-method-return, dbus-message-type-error)
+ (dbus-message-type-signal): Declare variables. Remove local
+ definitions.
+ (dbus-interface-dbus, dbus-interface-peer)
+ (dbus-interface-introspectable, dbus-interface-properties)
+ (dbus-path-emacs, dbus-interface-emacs, dbus-return-values-table):
+ Adapt docstring.
+ (dbus-interface-objectmanager): New defconst.
+ (dbus-call-method, dbus-call-method-asynchronously)
+ (dbus-send-signal, dbus-method-return-internal)
+ (dbus-method-error-internal, dbus-register-service)
+ (dbus-register-signal, dbus-register-method): New defuns, moved
+ from dbusbind.c
+ (dbus-call-method-handler, dbus-setenv)
+ (dbus-get-all-managed-objects, dbus-managed-objects-handler):
+ New defuns.
+ (dbus-call-method-non-blocking): Make it an obsolete function.
+ (dbus-unregister-object, dbus-unregister-service)
+ (dbus-handle-event, dbus-register-property)
+ (dbus-property-handler): Obey the new structure of
+ `bus-registered-objects'.
+ (dbus-introspect): Use `dbus-call-method'. Use a timeout.
+ (dbus-get-property, dbus-set-property, dbus-get-all-properties):
+ Use `dbus-call-method'.
+
+2012-04-22 Chong Yidong <cyd@gnu.org>
+
+ * cus-edit.el (custom-commands, custom-reset-menu)
+ (Custom-reset-standard): Tweak labels.
+ (custom-reset-button-menu): Change default to t.
+ (custom-buffer-create-internal): For the custom-reset-button-menu
+ case, put the revert button first.
+ (custom-group-subtitle): New face.
+ (custom-group-value-create): Align docstring to a specific column.
+
+ * wid-edit.el (widget-documentation-link-add): Don't handle
+ indentation in this function.
+ (widget-documentation-string-indent-to): New function.
+ (widget-documentation-string-value-create): Use it.
+
+ * autorevert.el (auto-revert):
+ * epg-config.el (epg):
+ * ibuffer.el (ibuffer):
+ * mpc.el (mpc):
+ * ses.el (ses):
+ * eshell/eshell.el (eshell):
+ * net/ange-ftp.el (ange-ftp):
+ * progmodes/ebnf2ps.el (postscript):
+ * progmodes/flymake.el (flymake):
+ * progmodes/prolog.el (prolog):
+ * progmodes/verilog-mode.el (verilog-mode):
+ * progmodes/which-func.el (which-func):
+ * term/xterm.el (xterm):
+ * textmodes/picture.el (picture):
+ * textmodes/tildify.el (tildify):
+ * vc/ediff.el (ediff): Tweak defgroups to improve presentation in
+ customization buffers.
+
+2012-04-22 Alan Mackenzie <acm@muc.de>
+
+ * progmodes/cc-engine.el (c-append-lower-brace-pair-to-state-cache):
+ Adding a ) can hide the resulting (..) from searches. Fix it.
+ Bound the backward search to the position of the existing (.
+
2012-04-21 Juanma Barranquero <lekktu@gmail.com>
* progmodes/verilog-mode.el (verilog-mode): Check whether
@@ -74,8 +1439,8 @@
2012-04-20 Chong Yidong <cyd@gnu.org>
- * progmodes/gdb-mi.el (gdb-inferior-io--maybe-delete-pty): New
- function to call delete-process on the gdb-inferior buffer's pty.
+ * progmodes/gdb-mi.el (gdb-inferior-io--maybe-delete-pty):
+ New function to call delete-process on the gdb-inferior buffer's pty.
(gdb-reset): Use it, instead of relying on kill-buffer to kill the
pty process (Bug#11273).
(gdb-update): New arg to suppress talking to the gdb process.
@@ -106,8 +1471,8 @@
(c-comment-indent, c-scan-conditionals, c-indent-defun)
(c-context-line-break): Bind case-fold-search to nil.
- * progmodes/cc-mode.el (c-font-lock-fontify-region): Bind
- case-fold-search to nil.
+ * progmodes/cc-mode.el (c-font-lock-fontify-region):
+ Bind case-fold-search to nil.
2012-04-20 Chong Yidong <cyd@gnu.org>
@@ -858,8 +2223,8 @@
2012-03-30 AgustĂ­n MartĂ­n Domingo <agustin.martin@hispalinux.es>
- * ispell.el (ispell-get-extended-character-mode): Disable
- extended-char-mode for hunspell. hunspell does not support it
+ * ispell.el (ispell-get-extended-character-mode):
+ Disable extended-char-mode for hunspell. hunspell does not support it
and treats ~word as ordinary words in pipe mode.
2012-03-30 Glenn Morris <rgm@gnu.org>
@@ -7719,7 +9084,7 @@
insecure exception for current topic. Also note that auto-saves
are handled differently.
- (allout-auto-save-temporarily-disabled), (allout-just-did-undo):
+ (allout-auto-save-temporarily-disabled, allout-just-did-undo):
State variables for tracking auto-save inhibition situation.
(allout-write-contents-hook-handler): Rename from
@@ -10166,8 +11531,8 @@
(newsticker--plainview-tool-bar-map): Move tool-bar icons to
etc/images/newsticker.
- * net/newst-backend.el (newsticker--do-run-auto-mark-filter),
- (newsticker--process-auto-mark-filter-match): : Tell user about
+ * net/newst-backend.el (newsticker--do-run-auto-mark-filter)
+ (newsticker--process-auto-mark-filter-match): Tell user about
auto-marking.
2011-05-13 Didier Verna <didier@xemacs.org>
diff --git a/lisp/Makefile.in b/lisp/Makefile.in
index d2c4e615577..29ef8e40abe 100644
--- a/lisp/Makefile.in
+++ b/lisp/Makefile.in
@@ -1,5 +1,5 @@
# Maintenance productions for the Lisp directory
-# Copyright (C) 2000-2012 Free Software Foundation, Inc.
+# Copyright (C) 2000-2012 Free Software Foundation, Inc.
# This file is part of GNU Emacs.
@@ -106,7 +106,7 @@ COMPILE_FIRST = \
emacs = EMACSLOADPATH=$(lisp) LC_ALL=C $(EMACS) $(EMACSOPT)
# Common command to find subdirectories
-setwins=subdirs=`(find . -type d -print)`; \
+setwins=subdirs=`find . -type d -print`; \
for file in $$subdirs; do \
case $$file in */.* | */.*/* | */=* ) ;; \
*) wins="$$wins $$file" ;; \
@@ -114,7 +114,7 @@ setwins=subdirs=`(find . -type d -print)`; \
done
# Find all subdirectories except `obsolete' and `term'.
-setwins_almost=subdirs=`(find . -type d -print)`; \
+setwins_almost=subdirs=`find . -type d -print`; \
for file in $$subdirs; do \
case $$file in */.* | */.*/* | */=* | */obsolete | */term ) ;; \
*) wins="$$wins $$file" ;; \
@@ -122,7 +122,7 @@ setwins_almost=subdirs=`(find . -type d -print)`; \
done
# Find all subdirectories in which we might want to create subdirs.el
-setwins_for_subdirs=subdirs=`(find . -type d -print)`; \
+setwins_for_subdirs=subdirs=`find . -type d -print`; \
for file in $$subdirs; do \
case $$file in */.* | */.*/* | */=* | */cedet* ) ;; \
*) wins="$$wins $$file" ;; \
@@ -179,7 +179,7 @@ $(lisp)/subdirs.el:
update-subdirs: doit
cd $(lisp); $(setwins_for_subdirs); \
for file in $$wins; do \
- $(top_srcdir)/update-subdirs $$file; \
+ $(top_srcdir)/build-aux/update-subdirs $$file; \
done;
updates: update-subdirs autoloads finder-data custom-deps
diff --git a/lisp/abbrev.el b/lisp/abbrev.el
index 7f54d3dc253..9b82b3bc893 100644
--- a/lisp/abbrev.el
+++ b/lisp/abbrev.el
@@ -135,7 +135,7 @@ Otherwise display all abbrevs."
(insert-abbrev-table-description table t)))
(dolist (table (nreverse empty-tables))
(insert-abbrev-table-description table t)))
- ;; Note: `list-abbrevs' can dispaly only local abbrevs, in
+ ;; Note: `list-abbrevs' can display only local abbrevs, in
;; which case editing could lose abbrevs of other tables. Thus
;; enter `edit-abbrevs-mode' only if LOCAL is nil.
(edit-abbrevs-mode))
diff --git a/lisp/allout-widgets.el b/lisp/allout-widgets.el
index 16420d8af27..6a5b0d5f7bf 100644
--- a/lisp/allout-widgets.el
+++ b/lisp/allout-widgets.el
@@ -579,13 +579,13 @@ outline hot-spot navigation \(see `allout-mode')."
(if (current-local-map)
(set-keymap-parent allout-item-body-keymap (current-local-map)))
- (add-hook 'allout-exposure-change-hook
+ (add-hook 'allout-exposure-change-functions
'allout-widgets-exposure-change-recorder nil 'local)
- (add-hook 'allout-structure-added-hook
+ (add-hook 'allout-structure-added-functions
'allout-widgets-additions-recorder nil 'local)
- (add-hook 'allout-structure-deleted-hook
+ (add-hook 'allout-structure-deleted-functions
'allout-widgets-deletions-recorder nil 'local)
- (add-hook 'allout-structure-shifted-hook
+ (add-hook 'allout-structure-shifted-functions
'allout-widgets-shifts-recorder nil 'local)
(add-hook 'allout-after-copy-or-kill-hook
'allout-widgets-after-copy-or-kill-function nil 'local)
@@ -626,13 +626,13 @@ outline hot-spot navigation \(see `allout-mode')."
(remove-hook 'after-change-functions
'allout-widgets-after-change-handler 'local)
- (remove-hook 'allout-exposure-change-hook
+ (remove-hook 'allout-exposure-change-functions
'allout-widgets-exposure-change-recorder 'local)
- (remove-hook 'allout-structure-added-hook
+ (remove-hook 'allout-structure-added-functions
'allout-widgets-additions-recorder 'local)
- (remove-hook 'allout-structure-deleted-hook
+ (remove-hook 'allout-structure-deleted-functions
'allout-widgets-deletions-recorder 'local)
- (remove-hook 'allout-structure-shifted-hook
+ (remove-hook 'allout-structure-shifted-functions
'allout-widgets-shifts-recorder 'local)
(remove-hook 'allout-after-copy-or-kill-hook
'allout-widgets-after-copy-or-kill-function 'local)
@@ -992,7 +992,7 @@ Records changes in `allout-widgets-changes-record'."
(defun allout-widgets-exposure-change-processor (changes)
"Widgetize and adjust item widgets tracking allout outline exposure changes.
-Generally invoked via `allout-exposure-change-hook'."
+Generally invoked via `allout-exposure-change-functions'."
(let ((changes (sort changes (function (lambda (this next)
(< (cadr this) (cadr next))))))
@@ -1059,7 +1059,7 @@ Generally invoked via `allout-exposure-change-hook'."
(defun allout-widgets-additions-recorder (from to)
"Record allout item additions for tracking during post-command processing.
-Intended for use on `allout-structure-added-hook'.
+Intended for use on `allout-structure-added-functions'.
FROM point at the start of the first new item and TO is point at the start
of the last one.
@@ -1106,8 +1106,7 @@ Dispatched by `allout-widgets-post-command-business' in response to
;;;_ > allout-widgets-deletions-recorder (depth from)
(defun allout-widgets-deletions-recorder (depth from)
"Record allout item deletions for tracking during post-command processing.
-
-Intended for use on `allout-structure-deleted-hook'.
+Intended for use on `allout-structure-deleted-functions'.
DEPTH is the depth of the deleted subtree, and FROM is the point from which
the subtree was deleted.
@@ -1134,8 +1133,7 @@ Dispatched by `allout-widgets-post-command-business' in response to
;;;_ > allout-widgets-shifts-recorder (shifted-amount at)
(defun allout-widgets-shifts-recorder (shifted-amount at)
"Record outline subtree shifts for tracking during post-command processing.
-
-Intended for use on `allout-structure-shifted-hook'.
+Intended for use on `allout-structure-shifted-functions'.
SHIFTED-AMOUNT is the depth change and AT is the point at the start of the
subtree that's been shifted.
diff --git a/lisp/allout.el b/lisp/allout.el
index 4883e4244a8..7077af55e60 100644
--- a/lisp/allout.el
+++ b/lisp/allout.el
@@ -1403,19 +1403,21 @@ their settings before allout-mode was started."
,expr))
;;;_ = allout-mode-hook
(defvar allout-mode-hook nil
- "Hook that's run when allout mode starts.")
+ "Hook run when allout mode starts.")
;;;_ = allout-mode-deactivate-hook
-(defvar allout-mode-deactivate-hook nil
- "Hook that's run when allout mode ends.")
(define-obsolete-variable-alias 'allout-mode-deactivate-hook
'allout-mode-off-hook "24.1")
+(defvar allout-mode-deactivate-hook nil
+ "Hook run when allout mode ends.")
;;;_ = allout-exposure-category
(defvar allout-exposure-category nil
"Symbol for use as allout invisible-text overlay category.")
-;;;_ = allout-exposure-change-hook
-(defvar allout-exposure-change-hook nil
- "Hook that's run after allout outline subtree exposure changes.
+;;;_ = allout-exposure-change-functions
+(define-obsolete-variable-alias 'allout-exposure-change-hook
+ 'allout-exposure-change-functions "24.2")
+(defcustom allout-exposure-change-functions nil
+ "Abnormal hook run after allout outline subtree exposure changes.
It is run at the conclusion of `allout-flag-region'.
Functions on the hook must take three arguments:
@@ -1424,21 +1426,31 @@ Functions on the hook must take three arguments:
- TO -- integer indicating the point of the end of the change.
- FLAG -- change mode: nil for exposure, otherwise concealment.
-This hook might be invoked multiple times by a single command.")
-;;;_ = allout-structure-added-hook
-(defvar allout-structure-added-hook nil
- "Hook that's run after addition of items to the outline.
+This hook might be invoked multiple times by a single command."
+ :type 'hook
+ :group 'allout
+ :version "24.2")
+;;;_ = allout-structure-added-functions
+(define-obsolete-variable-alias 'allout-structure-added-hook
+ 'allout-structure-added-functions "24.2")
+(defcustom allout-structure-added-functions nil
+ "Abnormal hook run after adding items to an Allout outline.
Functions on the hook should take two arguments:
- NEW-START -- integer indicating position of start of the first new item.
- NEW-END -- integer indicating position of end of the last new item.
-This hook might be invoked multiple times by a single command.")
-;;;_ = allout-structure-deleted-hook
-(defvar allout-structure-deleted-hook nil
- "Hook that's run after disciplined deletion of subtrees from the outline.
+This hook might be invoked multiple times by a single command."
+ :type 'hook
+ :group 'allout
+ :version "24.2")
+;;;_ = allout-structure-deleted-functions
+(define-obsolete-variable-alias 'allout-structure-deleted-hook
+ 'allout-structure-deleted-functions "24.2")
+(defcustom allout-structure-deleted-functions nil
+ "Abnormal hook run after deleting subtrees from an Allout outline.
Functions on the hook must take two arguments:
- DEPTH -- integer indicating the depth of the subtree that was deleted.
@@ -1447,11 +1459,16 @@ Functions on the hook must take two arguments:
Some edits that remove or invalidate items may be missed by this hook:
specifically edits that native allout routines do not control.
-This hook might be invoked multiple times by a single command.")
-;;;_ = allout-structure-shifted-hook
-(defvar allout-structure-shifted-hook nil
- "Hook that's run after shifting of items in the outline.
+This hook might be invoked multiple times by a single command."
+ :type 'hook
+ :group 'allout
+ :version "24.2")
+;;;_ = allout-structure-shifted-functions
+(define-obsolete-variable-alias 'allout-structure-shifted-hook
+ 'allout-structure-shifted-functions "24.2")
+(defcustom allout-structure-shifted-functions nil
+ "Abnormal hook run after shifting items in an Allout outline.
Functions on the hook should take two arguments:
- DEPTH-CHANGE -- integer indicating depth increase, negative for decrease
@@ -1460,20 +1477,27 @@ Functions on the hook should take two arguments:
Some edits that shift items can be missed by this hook: specifically edits
that native allout routines do not control.
-This hook might be invoked multiple times by a single command.")
+This hook might be invoked multiple times by a single command."
+ :type 'hook
+ :group 'allout
+ :version "24.2")
+
;;;_ = allout-after-copy-or-kill-hook
-(defvar allout-after-copy-or-kill-hook nil
- "Hook that's run after copying outline text.
+(defcustom allout-after-copy-or-kill-hook nil
+ "Normal hook run after copying outline text.."
+ :type 'hook
+ :group 'allout
+ :version "24.2")
-Functions on the hook should not require any arguments.")
;;;_ = allout-post-undo-hook
-(defvar allout-post-undo-hook nil
- "Hook that's run after undo activity.
-
+(defcustom allout-post-undo-hook nil
+ "Normal hook run after undo activity.
The item that's current when the hook is run *may* be the one
-that was affected by the undo.
+that was affected by the undo.."
+ :type 'hook
+ :group 'allout
+ :version "24.2")
-Functions on the hook should not require any arguments.")
;;;_ = allout-outside-normal-auto-fill-function
(defvar allout-outside-normal-auto-fill-function nil
"Value of `normal-auto-fill-function' outside of allout mode.
@@ -1883,10 +1907,10 @@ without changes to the allout core. Here are key ones:
`allout-mode-hook'
`allout-mode-deactivate-hook' (deprecated)
`allout-mode-off-hook'
-`allout-exposure-change-hook'
-`allout-structure-added-hook'
-`allout-structure-deleted-hook'
-`allout-structure-shifted-hook'
+`allout-exposure-change-functions'
+`allout-structure-added-functions'
+`allout-structure-deleted-functions'
+`allout-structure-shifted-functions'
`allout-after-copy-or-kill-hook'
`allout-post-undo-hook'
@@ -3845,7 +3869,7 @@ Nuances:
(allout-show-children)))
(end-of-line)
- (run-hook-with-args 'allout-structure-added-hook start end)
+ (run-hook-with-args 'allout-structure-added-functions start end)
)
)
)
@@ -3970,7 +3994,7 @@ Note that refill of indented paragraphs is not done."
nil ;;; number-control
nil ;;; index
t) ;;; do-successors
- (run-hook-with-args 'allout-exposure-change-hook
+ (run-hook-with-args 'allout-exposure-change-functions
from to t))
(setq arg (1- arg))
(if (<= arg 0)
@@ -4071,7 +4095,7 @@ this function."
(not (allout-encrypted-topic-p)))
(allout-reindent-body current-depth new-depth))
- (run-hook-with-args 'allout-exposure-change-hook mb me nil)
+ (run-hook-with-args 'allout-exposure-change-functions mb me nil)
;; Recursively rectify successive siblings of orig topic if
;; caller elected for it:
@@ -4333,7 +4357,7 @@ the file can be adjusted to any positive depth, however."
(allout-show-children))))))
(let ((where (point)))
(allout-rebullet-topic 1 (and (> arg 1) 'sans-offspring))
- (run-hook-with-args 'allout-structure-shifted-hook arg where))))
+ (run-hook-with-args 'allout-structure-shifted-functions arg where))))
;;;_ > allout-shift-out (arg)
(defun allout-shift-out (arg)
"Decrease depth of current heading and any topics collapsed within it.
@@ -4373,7 +4397,7 @@ subtopics into siblings of the item."
(goto-char child-point)
(allout-shift-out 1))))
(allout-rebullet-topic (* arg -1))))
- (run-hook-with-args 'allout-structure-shifted-hook (* arg -1) where))))
+ (run-hook-with-args 'allout-structure-shifted-functions (* arg -1) where))))
;;;_ : Surgery (kill-ring) functions with special provisions for outlines:
;;;_ > allout-kill-line (&optional arg)
(defun allout-kill-line (&optional arg)
@@ -4408,7 +4432,7 @@ subtopics into siblings of the item."
(if (not (save-match-data (looking-at allout-regexp)))
(allout-next-heading))
(allout-renumber-to-depth depth)))
- (run-hook-with-args 'allout-structure-deleted-hook depth (point))))))
+ (run-hook-with-args 'allout-structure-deleted-functions depth (point))))))
;;;_ > allout-copy-line-as-kill ()
(defun allout-copy-line-as-kill ()
"Like `allout-kill-topic', but save to kill ring instead of deleting."
@@ -4456,7 +4480,7 @@ Topic exposure is marked with text-properties, to be used by
(save-excursion
(allout-renumber-to-depth depth))
- (run-hook-with-args 'allout-structure-deleted-hook depth (point)))))
+ (run-hook-with-args 'allout-structure-deleted-functions depth (point)))))
;;;_ > allout-copy-topic-as-kill ()
(defun allout-copy-topic-as-kill ()
"Like `allout-kill-topic', but save to kill ring instead of deleting."
@@ -4668,7 +4692,7 @@ however, are left exactly like normal, non-allout-specific yanks."
(allout-deannotate-hidden (allout-mark-marker t) (point)))
(if (not resituate)
(exchange-point-and-mark))
- (run-hook-with-args 'allout-structure-added-hook subj-beg subj-end))))
+ (run-hook-with-args 'allout-structure-added-functions subj-beg subj-end))))
;;;_ > allout-yank (&optional arg)
(defun allout-yank (&optional arg)
"`allout-mode' yank, with depth and numbering adjustment of yanked topics.
@@ -4765,9 +4789,9 @@ by pops to non-distinctive yanks. Bug..."
;;;_ > allout-flag-region (from to flag)
(defun allout-flag-region (from to flag)
"Conceal text between FROM and TO if FLAG is non-nil, else reveal it.
-
-Exposure-change hook `allout-exposure-change-hook' is run with the same
-arguments as this function, after the exposure changes are made."
+After the exposure changes are made, run the abnormal hook
+`allout-exposure-change-functions' with the same arguments as
+this function."
;; We use outline invisibility spec.
(remove-overlays from to 'category 'allout-exposure-category)
@@ -4783,7 +4807,7 @@ arguments as this function, after the exposure changes are made."
(overlay-put o (pop props) (pop props))
(error nil))))))
(setq allout-this-command-hid-text t))
- (run-hook-with-args 'allout-exposure-change-hook from to flag))
+ (run-hook-with-args 'allout-exposure-change-functions from to flag))
;;;_ > allout-flag-current-subtree (flag)
(defun allout-flag-current-subtree (flag)
"Conceal currently-visible topic's subtree if FLAG non-nil, else reveal it."
@@ -6022,7 +6046,7 @@ See `allout-toggle-current-subtree-encryption' for more details."
(allout-inhibit-auto-save-info-for-decryption was-buffer-saved-size)
(allout-maybe-resume-auto-save-info-after-encryption))
- (run-hook-with-args 'allout-structure-added-hook
+ (run-hook-with-args 'allout-structure-added-functions
bullet-pos subtree-end))))
;;;_ > allout-encrypt-string (text decrypt allout-buffer keymode-cue
;;; &optional rejected)
diff --git a/lisp/ansi-color.el b/lisp/ansi-color.el
index 15a543e9591..6a82f176676 100644
--- a/lisp/ansi-color.el
+++ b/lisp/ansi-color.el
@@ -217,8 +217,12 @@ The comint output is assumed to lie between the marker
`comint-last-output-start' and the process-mark.
This is a good function to put in `comint-output-filter-functions'."
- (let ((start-marker (or comint-last-output-start
- (point-min-marker)))
+ (let ((start-marker (if (and (markerp comint-last-output-start)
+ (eq (marker-buffer comint-last-output-start)
+ (current-buffer))
+ (marker-position comint-last-output-start))
+ comint-last-output-start
+ (point-min-marker)))
(end-marker (process-mark (get-buffer-process (current-buffer)))))
(cond ((eq ansi-color-for-comint-mode nil))
((eq ansi-color-for-comint-mode 'filter)
diff --git a/lisp/apropos.el b/lisp/apropos.el
index 56b27e9b9b4..f5373b38682 100644
--- a/lisp/apropos.el
+++ b/lisp/apropos.el
@@ -85,35 +85,48 @@ include key-binding information in its output."
:group 'apropos
:type 'boolean)
+(defface apropos-symbol
+ '((t (:inherit bold)))
+ "Face for the symbol name in Apropos output."
+ :group 'apropos
+ :version "24.2")
-(defcustom apropos-symbol-face 'bold
- "Face for symbol name in Apropos output, or nil for none."
+(defface apropos-keybinding
+ '((t (:inherit underline)))
+ "Face for lists of keybinding in Apropos output."
:group 'apropos
- :type 'face)
+ :version "24.2")
-(defcustom apropos-keybinding-face 'underline
- "Face for lists of keybinding in Apropos output, or nil for none."
+(defface apropos-property
+ '((t (:inherit font-lock-builtin-face)))
+ "Face for property name in apropos output, or nil for none."
:group 'apropos
- :type 'face)
+ :version "24.2")
-(defcustom apropos-label-face '(italic)
- "Face for label (`Command', `Variable' ...) in Apropos output.
-A value of nil means don't use any special font for them, and also
-turns off mouse highlighting."
+(defface apropos-function-button
+ '((t (:inherit (font-lock-function-name-face button))))
+ "Button face indicating a function, macro, or command in Apropos."
:group 'apropos
- :type 'face)
+ :version "24.2")
-(defcustom apropos-property-face 'bold-italic
- "Face for property name in apropos output, or nil for none."
+(defface apropos-variable-button
+ '((t (:inherit (font-lock-variable-name-face button))))
+ "Button face indicating a variable in Apropos."
:group 'apropos
- :type 'face)
+ :version "24.2")
+
+(defface apropos-misc-button
+ '((t (:inherit (font-lock-constant-face button))))
+ "Button face indicating a miscellaneous object type in Apropos."
+ :group 'apropos
+ :version "24.2")
(defcustom apropos-match-face 'match
"Face for matching text in Apropos documentation/value, or nil for none.
This applies when you look for matches in the documentation or variable value
for the pattern; the part that matches gets displayed in this font."
:group 'apropos
- :type 'face)
+ :version "24.2")
(defcustom apropos-sort-by-scores nil
"Non-nil means sort matches by scores; best match is shown first.
@@ -196,7 +209,7 @@ term, and the rest of the words are alternative terms.")
;;; Button types used by apropos
(define-button-type 'apropos-symbol
- 'face apropos-symbol-face
+ 'face 'apropos-symbol
'help-echo "mouse-2, RET: Display more help on this symbol"
'follow-link t
'action #'apropos-symbol-button-display-help)
@@ -210,7 +223,7 @@ term, and the rest of the words are alternative terms.")
(define-button-type 'apropos-function
'apropos-label "Function"
'apropos-short-label "f"
- 'face '(font-lock-function-name-face button)
+ 'face 'apropos-function-button
'help-echo "mouse-2, RET: Display more help on this function"
'follow-link t
'action (lambda (button)
@@ -219,7 +232,7 @@ term, and the rest of the words are alternative terms.")
(define-button-type 'apropos-macro
'apropos-label "Macro"
'apropos-short-label "m"
- 'face '(font-lock-function-name-face button)
+ 'face 'apropos-function-button
'help-echo "mouse-2, RET: Display more help on this macro"
'follow-link t
'action (lambda (button)
@@ -228,7 +241,7 @@ term, and the rest of the words are alternative terms.")
(define-button-type 'apropos-command
'apropos-label "Command"
'apropos-short-label "c"
- 'face '(font-lock-function-name-face button)
+ 'face 'apropos-function-button
'help-echo "mouse-2, RET: Display more help on this command"
'follow-link t
'action (lambda (button)
@@ -242,7 +255,7 @@ term, and the rest of the words are alternative terms.")
(define-button-type 'apropos-variable
'apropos-label "Variable"
'apropos-short-label "v"
- 'face '(font-lock-variable-name-face button)
+ 'face 'apropos-variable-button
'help-echo "mouse-2, RET: Display more help on this variable"
'follow-link t
'action (lambda (button)
@@ -260,7 +273,7 @@ term, and the rest of the words are alternative terms.")
(define-button-type 'apropos-group
'apropos-label "Group"
'apropos-short-label "g"
- 'face '(font-lock-builtin-face button)
+ 'face 'apropos-misc-button
'help-echo "mouse-2, RET: Display more help on this group"
'follow-link t
'action (lambda (button)
@@ -270,7 +283,7 @@ term, and the rest of the words are alternative terms.")
(define-button-type 'apropos-widget
'apropos-label "Widget"
'apropos-short-label "w"
- 'face '(font-lock-builtin-face button)
+ 'face 'apropos-misc-button
'help-echo "mouse-2, RET: Display more help on this widget"
'follow-link t
'action (lambda (button)
@@ -279,7 +292,7 @@ term, and the rest of the words are alternative terms.")
(define-button-type 'apropos-plist
'apropos-label "Properties"
'apropos-short-label "p"
- 'face '(font-lock-keyword-face button)
+ 'face 'apropos-misc-button
'help-echo "mouse-2, RET: Display more help on this plist"
'follow-link t
'action (lambda (button)
@@ -333,10 +346,10 @@ literally, or a string which is used as a regexp to search for.
SUBJECT is a string that is included in the prompt to identify what
kind of objects to search."
(let ((pattern
- (read-string (concat "Apropos " subject " (word list or regexp): "))))
+ (read-string (concat "Search for " subject " (word list or regexp): "))))
(if (string-equal (regexp-quote pattern) pattern)
;; Split into words
- (split-string pattern "[ \t]+")
+ (split-string pattern "[ \t]+" t)
pattern)))
(defun apropos-parse-pattern (pattern)
@@ -587,7 +600,7 @@ Returns list of symbols and documentation found."
(let ((name (copy-sequence (symbol-name sym))))
(make-text-button name nil
'type 'apropos-library
- 'face apropos-symbol-face
+ 'face 'apropos-symbol
'apropos-symbol name)
name)))
@@ -837,9 +850,8 @@ Returns list of symbols and documentation found."
(while pl
(setq p (format "%s %S" (car pl) (nth 1 pl)))
(if (or (not compare) (string-match apropos-regexp p))
- (if apropos-property-face
- (put-text-property 0 (length (symbol-name (car pl)))
- 'face apropos-property-face p))
+ (put-text-property 0 (length (symbol-name (car pl)))
+ 'face 'apropos-property p)
(setq p nil))
(if p
(progn
@@ -1031,10 +1043,7 @@ If non-nil TEXT is a string that will be printed as a heading."
(insert-text-button (symbol-name symbol)
'type 'apropos-symbol
'skip apropos-multi-type
- ;; Can't use default, since user may have
- ;; changed the variable!
- ;; Just say `no' to variables containing faces!
- 'face apropos-symbol-face)
+ 'face 'apropos-symbol)
(if (and (eq apropos-sort-by-scores 'verbose)
(cadr apropos-item))
(insert " (" (number-to-string (cadr apropos-item)) ") "))
@@ -1072,18 +1081,16 @@ If non-nil TEXT is a string that will be printed as a heading."
(setq key (condition-case ()
(key-description key)
(error)))
- (if apropos-keybinding-face
- (put-text-property 0 (length key)
- 'face apropos-keybinding-face
- key))
+ (put-text-property 0 (length key)
+ 'face 'apropos-keybinding
+ key)
key)
item ", "))
(insert "M-x ... RET")
- (when apropos-keybinding-face
- (put-text-property (- (point) 11) (- (point) 8)
- 'face apropos-keybinding-face)
- (put-text-property (- (point) 3) (point)
- 'face apropos-keybinding-face))))
+ (put-text-property (- (point) 11) (- (point) 8)
+ 'face 'apropos-keybinding)
+ (put-text-property (- (point) 3) (point)
+ 'face 'apropos-keybinding)))
(terpri))
(apropos-print-doc 2
(if (commandp symbol)
@@ -1128,9 +1135,6 @@ If non-nil TEXT is a string that will be printed as a heading."
(format "<%s>" (button-type-get type 'apropos-short-label))
(button-type-get type 'apropos-label))
'type type
- ;; Can't use the default button face, since user may have changed the
- ;; variable! Just say `no' to variables containing faces!
- 'face (append button-face apropos-label-face)
'apropos-symbol (car apropos-item))
(insert (if apropos-compact-layout " " ": ")))
@@ -1177,9 +1181,8 @@ If non-nil TEXT is a string that will be printed as a heading."
(princ "Symbol ")
(prin1 symbol)
(princ "'s plist is\n (")
- (if apropos-symbol-face
- (put-text-property (+ (point-min) 7) (- (point) 14)
- 'face apropos-symbol-face))
+ (put-text-property (+ (point-min) 7) (- (point) 14)
+ 'face 'apropos-symbol)
(insert (apropos-format-plist symbol "\n "))
(princ ")")))
diff --git a/lisp/arc-mode.el b/lisp/arc-mode.el
index 8b17208983f..c776a3f8b5c 100644
--- a/lisp/arc-mode.el
+++ b/lisp/arc-mode.el
@@ -622,11 +622,12 @@ the mode is invalid. If ERROR is nil then nil will be returned."
(defun archive-unixdate (low high)
"Stringify Unix (LOW HIGH) date."
- (let ((str (current-time-string (cons high low))))
+ (let* ((time (cons high low))
+ (str (current-time-string time)))
(format "%s-%s-%s"
(substring str 8 10)
(substring str 4 7)
- (substring str 20 24))))
+ (format-time-string "%Y" time))))
(defun archive-unixtime (low high)
"Stringify Unix (LOW HIGH) time."
diff --git a/lisp/autoinsert.el b/lisp/autoinsert.el
index de2835580c2..e7639b6f8a3 100644
--- a/lisp/autoinsert.el
+++ b/lisp/autoinsert.el
@@ -135,7 +135,7 @@ If this contains a %s, that will be replaced by the matching rule."
(("\\.[1-9]\\'" . "Man page skeleton")
"Short description: "
- ".\\\" Copyright (C), " (substring (current-time-string) -4) " "
+ ".\\\" Copyright (C), " (format-time-string "%Y") " "
(getenv "ORGANIZATION") | (progn user-full-name)
"
.\\\" You may distribute this file under the terms of the GNU Free
@@ -166,7 +166,7 @@ If this contains a %s, that will be replaced by the matching rule."
"Short description: "
";;; " (file-name-nondirectory (buffer-file-name)) " --- " str "
-;; Copyright (C) " (substring (current-time-string) -4) " "
+;; Copyright (C) " (format-time-string "%Y") " "
(getenv "ORGANIZATION") | (progn user-full-name) "
;; Author: " (user-full-name)
@@ -222,7 +222,7 @@ If this contains a %s, that will be replaced by the matching rule."
@copying\n"
(setq short-description (read-string "Short description: "))
".\n\n"
- "Copyright @copyright{} " (substring (current-time-string) -4) " "
+ "Copyright @copyright{} " (format-time-string "%Y") " "
(getenv "ORGANIZATION") | (progn user-full-name) "
@quotation
diff --git a/lisp/autorevert.el b/lisp/autorevert.el
index e0bde7c6dc5..11005f49f44 100644
--- a/lisp/autorevert.el
+++ b/lisp/autorevert.el
@@ -104,9 +104,8 @@
(defgroup auto-revert nil
"Revert individual buffers when files on disk change.
-
-Auto-Revert Mode can be activated for individual buffer.
-Global Auto-Revert Mode applies to all buffers."
+Auto-Revert mode enables auto-revert in individual buffers.
+Global Auto-Revert mode does so in all buffers."
:group 'files
:group 'convenience)
diff --git a/lisp/bindings.el b/lisp/bindings.el
index 8cfeecf5b40..69d96ab6889 100644
--- a/lisp/bindings.el
+++ b/lisp/bindings.el
@@ -40,7 +40,7 @@ corresponding to the mode line clicked."
(interactive "e")
(save-selected-window
(select-window (posn-window (event-start event)))
- (toggle-read-only)
+ (with-no-warnings (toggle-read-only))
(force-mode-line-update)))
@@ -623,24 +623,13 @@ is okay. See `mode-line-format'.")
;; Packages should add to this list appropriately when they are
;; loaded, rather than listing everything here.
(setq debug-ignored-errors
+ ;; FIXME: Maybe beginning-of-line, beginning-of-buffer, end-of-line,
+ ;; end-of-buffer, end-of-file, buffer-read-only, and
+ ;; file-supersession should all be user-errors!
`(beginning-of-line beginning-of-buffer end-of-line
end-of-buffer end-of-file buffer-read-only
file-supersession
- ,(purecopy "^Previous command was not a yank$")
- ,(purecopy "^Minibuffer window is not active$")
- ,(purecopy "^No previous history search regexp$")
- ,(purecopy "^No later matching history item$")
- ,(purecopy "^No earlier matching history item$")
- ,(purecopy "^End of history; no default available$")
- ,(purecopy "^End of defaults; no next item$")
- ,(purecopy "^Beginning of history; no preceding item$")
- ,(purecopy "^No recursive edit is in progress$")
- ,(purecopy "^Changes to be undone are outside visible portion of buffer$")
- ,(purecopy "^No undo information in this buffer$")
- ,(purecopy "^No further undo information")
- ,(purecopy "^Save not confirmed$")
- ,(purecopy "^Recover-file cancelled\\.$")
- ,(purecopy "^Cannot switch buffers in a dedicated window$")
+ user-error ;; That's the main one!
))
@@ -1201,6 +1190,7 @@ if `inhibit-field-text-motion' is non-nil."
;; (define-key ctl-x-map "\-" 'inverse-add-global-abbrev)
(define-key esc-map "'" 'abbrev-prefix-mark)
(define-key ctl-x-map "'" 'expand-abbrev)
+(define-key ctl-x-map "\C-b" 'list-buffers)
(define-key ctl-x-map "z" 'repeat)
diff --git a/lisp/bookmark.el b/lisp/bookmark.el
index 33b91fd7db2..f7266dc2250 100644
--- a/lisp/bookmark.el
+++ b/lisp/bookmark.el
@@ -828,11 +828,11 @@ annotations."
"# Date: " (current-time-string) "\n"))
+(define-obsolete-variable-alias 'bookmark-read-annotation-text-func
+ 'bookmark-edit-annotation-text-func "23.1")
(defvar bookmark-edit-annotation-text-func 'bookmark-default-annotation-text
"Function to return default text to use for a bookmark annotation.
It takes one argument, the name of the bookmark, as a string.")
-(define-obsolete-variable-alias 'bookmark-read-annotation-text-func
- 'bookmark-edit-annotation-text-func "23.1")
(defvar bookmark-edit-annotation-mode-map
(let ((map (make-sparse-keymap)))
@@ -2164,11 +2164,11 @@ strings returned are not."
"Hook run at the end of loading library `bookmark.el'.")
;; Exit Hook, called from kill-emacs-hook
+(define-obsolete-variable-alias 'bookmark-exit-hooks
+ 'bookmark-exit-hook "22.1")
(defvar bookmark-exit-hook nil
"Hook run when Emacs exits.")
-(define-obsolete-variable-alias 'bookmark-exit-hooks 'bookmark-exit-hook "22.1")
-
(defun bookmark-exit-hook-internal ()
"Save bookmark state, if necessary, at Emacs exit time.
This also runs `bookmark-exit-hook'."
diff --git a/lisp/buff-menu.el b/lisp/buff-menu.el
index e1793711607..f501583b9ba 100644
--- a/lisp/buff-menu.el
+++ b/lisp/buff-menu.el
@@ -1,4 +1,4 @@
-;;; buff-menu.el --- buffer menu main function and support functions -*- coding:utf-8 -*-
+;;; buff-menu.el --- Interface for viewing and manipulating buffers
;; Copyright (C) 1985-1987, 1993-1995, 2000-2012
;; Free Software Foundation, Inc.
@@ -24,44 +24,13 @@
;;; Commentary:
-;; Edit, delete, or change attributes of all currently active Emacs
-;; buffers from a list summarizing their state. A good way to browse
-;; any special or scratch buffers you have loaded, since you can't find
-;; them by filename. The single entry point is `list-buffers',
-;; normally bound to C-x C-b.
-
-;;; Change Log:
-
-;; Buffer-menu-view: New function
-;; Buffer-menu-view-other-window: New function
-
-;; Merged by esr with recent mods to Emacs 19 buff-menu, 23 Mar 1993
-;;
-;; Modified by Bob Weiner, Motorola, Inc., 4/14/89
-;;
-;; Added optional backup argument to 'Buffer-menu-unmark' to make it undelete
-;; current entry and then move to previous one.
-;;
-;; Based on FSF code dating back to 1985.
+;; The Buffer Menu is used to view, edit, delete, or change attributes
+;; of buffers. The entry points are C-x C-b (`list-buffers') and
+;; M-x buffer-menu.
;;; Code:
-;;Trying to preserve the old window configuration works well in
-;;simple scenarios, when you enter the buffer menu, use it, and exit it.
-;;But it does strange things when you switch back to the buffer list buffer
-;;with C-x b, later on, when the window configuration is different.
-;;The choice seems to be, either restore the window configuration
-;;in all cases, or in no cases.
-;;I decided it was better not to restore the window config at all. -- rms.
-
-;;But since then, I changed buffer-menu to use the selected window,
-;;so q now once again goes back to the previous window configuration.
-
-;;(defvar Buffer-menu-window-config nil
-;; "Window configuration saved from entry to `buffer-menu'.")
-
-;; Put buffer *Buffer List* into proper mode right away
-;; so that from now on even list-buffers is enough to get a buffer menu.
+(require 'tabulated-list)
(defgroup Buffer-menu nil
"Show a menu of all buffers in a buffer."
@@ -69,23 +38,45 @@
:group 'convenience)
(defcustom Buffer-menu-use-header-line t
- "Non-nil means to use an immovable header-line."
+ "If non-nil, use the header line to display Buffer Menu column titles."
:type 'boolean
:group 'Buffer-menu)
(defface buffer-menu-buffer
'((t (:weight bold)))
- "Face used to highlight buffer names in the buffer menu."
+ "Face for buffer names in the Buffer Menu."
:group 'Buffer-menu)
(put 'Buffer-menu-buffer 'face-alias 'buffer-menu-buffer)
-(defcustom Buffer-menu-buffer+size-width 26
- "How wide to jointly make the buffer name and size columns."
+(defcustom Buffer-menu-buffer+size-width nil
+ "Combined width of buffer name and size columns in Buffer Menu.
+If nil, use `Buffer-menu-name-width' and `Buffer-menu-size-width'.
+
+If non-nil, the value of `Buffer-menu-name-width' is overridden;
+the name column is assigned width `Buffer-menu-buffer+size-width'
+minus `Buffer-menu-size-width'. This use is deprecated."
:type 'number
- :group 'Buffer-menu)
+ :group 'Buffer-menu
+ :version "24.2")
+
+(make-obsolete-variable 'Buffer-menu-buffer+size-width
+ "`Buffer-menu-name-width' and `Buffer-menu-size-width'"
+ "24.2")
+
+(defcustom Buffer-menu-name-width 19
+ "Width of buffer size column in the Buffer Menu."
+ :type 'number
+ :group 'Buffer-menu
+ :version "24.2")
+
+(defcustom Buffer-menu-size-width 7
+ "Width of buffer name column in the Buffer Menu."
+ :type 'number
+ :group 'Buffer-menu
+ :version "24.2")
(defcustom Buffer-menu-mode-width 16
- "How wide to make the mode name column."
+ "Width of mode name column in the Buffer Menu."
:type 'number
:group 'Buffer-menu)
@@ -99,35 +90,19 @@ as it is by default."
:group 'Buffer-menu
:version "22.1")
-;; This should get updated & resorted when you click on a column heading
-(defvar Buffer-menu-sort-column nil
- "Which column to sort the menu on.
-Use 2 to sort by buffer names, or 5 to sort by file names.
-A nil value means sort by visited order (the default).")
-
-(defconst Buffer-menu-buffer-column 4)
-
(defvar Buffer-menu-files-only nil
- "Non-nil if the current buffer-menu lists only file buffers.
-This variable determines whether reverting the buffer lists only
-file buffers. It affects both manual reverting and reverting by
-Auto Revert Mode.")
+ "Non-nil if the current Buffer Menu lists only file buffers.
+This is set by the prefix argument to `buffer-menu' and related
+commands.")
(make-variable-buffer-local 'Buffer-menu-files-only)
-(defvar Buffer-menu--buffers nil
- "If non-nil, list of buffers shown in the current buffer-menu.
-This variable determines whether reverting the buffer lists only
-these buffers. It affects both manual reverting and reverting by
-Auto Revert Mode.")
-(make-variable-buffer-local 'Buffer-menu--buffers)
-
-(defvar Info-current-file) ;; from info.el
-(defvar Info-current-node) ;; from info.el
+(defvar Info-current-file) ; from info.el
+(defvar Info-current-node) ; from info.el
(defvar Buffer-menu-mode-map
- (let ((map (make-keymap))
+ (let ((map (make-sparse-keymap))
(menu-map (make-sparse-keymap)))
- (suppress-keymap map t)
+ (set-keymap-parent map tabulated-list-mode-map)
(define-key map "v" 'Buffer-menu-select)
(define-key map "2" 'Buffer-menu-2-window)
(define-key map "1" 'Buffer-menu-1-window)
@@ -139,12 +114,10 @@ Auto Revert Mode.")
(define-key map "s" 'Buffer-menu-save)
(define-key map "d" 'Buffer-menu-delete)
(define-key map "k" 'Buffer-menu-delete)
- (define-key map "\C-d" 'Buffer-menu-delete-backwards)
(define-key map "\C-k" 'Buffer-menu-delete)
+ (define-key map "\C-d" 'Buffer-menu-delete-backwards)
(define-key map "x" 'Buffer-menu-execute)
(define-key map " " 'next-line)
- (define-key map "n" 'next-line)
- (define-key map "p" 'previous-line)
(define-key map "\177" 'Buffer-menu-backup-unmark)
(define-key map "~" 'Buffer-menu-not-modified)
(define-key map "u" 'Buffer-menu-unmark)
@@ -154,10 +127,12 @@ Auto Revert Mode.")
(define-key map "b" 'Buffer-menu-bury)
(define-key map "V" 'Buffer-menu-view)
(define-key map "T" 'Buffer-menu-toggle-files-only)
- (define-key map [mouse-2] 'Buffer-menu-mouse-select)
- (define-key map [follow-link] 'mouse-face)
(define-key map (kbd "M-s a C-s") 'Buffer-menu-isearch-buffers)
(define-key map (kbd "M-s a M-C-s") 'Buffer-menu-isearch-buffers-regexp)
+
+ (define-key map [mouse-2] 'Buffer-menu-mouse-select)
+ (define-key map [follow-link] 'mouse-face)
+
(define-key map [menu-bar Buffer-menu-mode] (cons (purecopy "Buffer-Menu") menu-map))
(define-key menu-map [quit]
`(menu-item ,(purecopy "Quit") quit-window
@@ -224,143 +199,124 @@ Auto Revert Mode.")
map)
"Local keymap for `Buffer-menu-mode' buffers.")
-;; Buffer Menu mode is suitable only for specially formatted data.
-(put 'Buffer-menu-mode 'mode-class 'special)
+(define-obsolete-variable-alias 'buffer-menu-mode-hook
+ 'Buffer-menu-mode-hook "23.1")
-(define-derived-mode Buffer-menu-mode special-mode "Buffer Menu"
- "Major mode for editing a list of buffers.
-Each line describes one of the buffers in Emacs.
-Letters do not insert themselves; instead, they are commands.
-\\<Buffer-menu-mode-map>
-\\[Buffer-menu-mouse-select] -- select buffer you click on, in place of the buffer menu.
-\\[Buffer-menu-this-window] -- select current line's buffer in place of the buffer menu.
-\\[Buffer-menu-other-window] -- select that buffer in another window,
- so the buffer menu buffer remains visible in its window.
-\\[Buffer-menu-view] -- select current line's buffer, but in view-mode.
-\\[Buffer-menu-view-other-window] -- select that buffer in
- another window, in view-mode.
-\\[Buffer-menu-switch-other-window] -- make another window display that buffer.
-\\[Buffer-menu-mark] -- mark current line's buffer to be displayed.
-\\[Buffer-menu-select] -- select current line's buffer.
- Also show buffers marked with m, in other windows.
-\\[Buffer-menu-1-window] -- select that buffer in full-frame window.
-\\[Buffer-menu-2-window] -- select that buffer in one window,
- together with buffer selected before this one in another window.
-\\[Buffer-menu-isearch-buffers] -- Do incremental search in the marked buffers.
-\\[Buffer-menu-isearch-buffers-regexp] -- Isearch for regexp in the marked buffers.
-\\[Buffer-menu-visit-tags-table] -- visit-tags-table this buffer.
-\\[Buffer-menu-not-modified] -- clear modified-flag on that buffer.
-\\[Buffer-menu-save] -- mark that buffer to be saved, and move down.
-\\[Buffer-menu-delete] -- mark that buffer to be deleted, and move down.
-\\[Buffer-menu-delete-backwards] -- mark that buffer to be deleted, and move up.
-\\[Buffer-menu-execute] -- delete or save marked buffers.
-\\[Buffer-menu-unmark] -- remove all kinds of marks from current line.
- With prefix argument, also move up one line.
-\\[Buffer-menu-backup-unmark] -- back up a line and remove marks.
-\\[Buffer-menu-toggle-read-only] -- toggle read-only status of buffer on this line.
-\\[revert-buffer] -- update the list of buffers.
-\\[Buffer-menu-toggle-files-only] -- toggle whether the menu displays only file buffers.
-\\[Buffer-menu-bury] -- bury the buffer listed on this line."
- (set (make-local-variable 'revert-buffer-function)
- 'Buffer-menu-revert-function)
+(define-derived-mode Buffer-menu-mode tabulated-list-mode "Buffer Menu"
+ "Major mode for Buffer Menu buffers.
+The Buffer Menu is invoked by the commands \\[list-buffers], \\[buffer-menu], and
+\\[buffer-menu-other-window]. See `buffer-menu' for details."
(set (make-local-variable 'buffer-stale-function)
(lambda (&optional _noconfirm) 'fast))
- (setq truncate-lines t)
- (setq buffer-read-only t)
- ;; Force L2R direction, to avoid messing the display if the first
- ;; buffer in the list happens to begin with a strong R2L character.
- (setq bidi-paragraph-direction 'left-to-right))
+ (add-hook 'tabulated-list-revert-hook 'list-buffers--refresh nil t))
-(define-obsolete-variable-alias 'buffer-menu-mode-hook
- 'Buffer-menu-mode-hook "23.1")
+(defun buffer-menu (&optional arg)
+ "Switch to the Buffer Menu.
+By default, all buffers are listed except those whose names start
+with a space (which are for internal use). With prefix argument
+ARG, show only buffers that are visiting files.
-(defun Buffer-menu-revert-function (_ignore1 _ignore2)
- (or (eq buffer-undo-list t)
- (setq buffer-undo-list nil))
- ;; We can not use save-excursion here. The buffer gets erased.
- (let ((opoint (point))
- (eobp (eobp))
- (ocol (current-column))
- (oline (progn (move-to-column Buffer-menu-buffer-column)
- (get-text-property (point) 'buffer)))
- (prop (point-min))
- ;; do not make undo records for the reversion.
- (buffer-undo-list t))
- ;; We can be called by Auto Revert Mode with the "*Buffer Menu*"
- ;; temporarily the current buffer. Make sure that the
- ;; interactively current buffer is correctly identified with a `.'
- ;; by `list-buffers-noselect'.
- (with-current-buffer (window-buffer)
- (list-buffers-noselect Buffer-menu-files-only Buffer-menu--buffers))
- (if oline
- (while (setq prop (next-single-property-change prop 'buffer))
- (when (eq (get-text-property prop 'buffer) oline)
- (goto-char prop)
- (move-to-column ocol)))
- (goto-char (if eobp (point-max) opoint)))))
+The first column (denoted \"C\") shows \".\" for the buffer from
+which you came. It shows \">\" for buffers you mark to be
+displayed, and \"D\" for those you mark for deletion.
-(defun Buffer-menu-toggle-files-only (arg)
- "Toggle whether the current buffer-menu displays only file buffers.
-With a positive ARG display only file buffers. With zero or
-negative ARG, display other buffers as well."
- (interactive "P")
- (setq Buffer-menu-files-only
- (cond ((not arg) (not Buffer-menu-files-only))
- ((> (prefix-numeric-value arg) 0) t)))
- (revert-buffer))
+The \"R\" column has a \"%\" if the buffer is read-only.
+The \"M\" column has a \"*\" if it is modified, or \"S\" if you
+have marked it for saving.
-
-(defun Buffer-menu-buffer (error-if-non-existent-p)
- "Return buffer described by this line of buffer menu."
- (let* ((where (+ (line-beginning-position) Buffer-menu-buffer-column))
- (name (and (not (eobp)) (get-text-property where 'buffer-name)))
- (buf (and (not (eobp)) (get-text-property where 'buffer))))
- (if name
- (or (get-buffer name)
- (and buf (buffer-name buf) buf)
- (if error-if-non-existent-p
- (error "No buffer named `%s'" name)
- nil))
- (or (and buf (buffer-name buf) buf)
- (if error-if-non-existent-p
- (error "No buffer on this line")
- nil)))))
-
-(defun buffer-menu (&optional arg)
- "Make a menu of buffers so you can save, delete or select them.
-With argument, show only buffers that are visiting files.
-Type ? after invocation to get help on commands available.
-Type q to remove the buffer menu from the display.
-
-The first column shows `>' for a buffer you have
-marked to be displayed, `D' for one you have marked for
-deletion, and `.' for the current buffer.
-
-The C column has a `.' for the buffer from which you came.
-The R column has a `%' if the buffer is read-only.
-The M column has a `*' if it is modified,
-or `S' if you have marked it for saving.
-After this come the buffer name, its size in characters,
-its major mode, and the visited file name (if any)."
+After this come the buffer name, its size in characters, its
+major mode, and the visited file name (if any).
+
+
+In the Buffer Menu, the following commands are defined:
+\\<Buffer-menu-mode-map>
+\\[quit-window] Remove the Buffer Menu from the display.
+\\[Buffer-menu-this-window] Select current line's buffer in place of the buffer menu.
+\\[Buffer-menu-other-window] Select that buffer in another window,
+ so the Buffer Menu remains visible in its window.
+\\[Buffer-menu-view] Select current line's buffer, in View mode.
+\\[Buffer-menu-view-other-window] Select that buffer in
+ another window, in view-mode.
+\\[Buffer-menu-switch-other-window] Make another window display that buffer.
+\\[Buffer-menu-mark] Mark current line's buffer to be displayed.
+\\[Buffer-menu-select] Select current line's buffer.
+ Also show buffers marked with m, in other windows.
+\\[Buffer-menu-1-window] Select that buffer in full-frame window.
+\\[Buffer-menu-2-window] Select that buffer in one window, together with the
+ buffer selected before this one in another window.
+\\[Buffer-menu-isearch-buffers] Incremental search in the marked buffers.
+\\[Buffer-menu-isearch-buffers-regexp] Isearch for regexp in the marked buffers.
+\\[Buffer-menu-visit-tags-table] visit-tags-table this buffer.
+\\[Buffer-menu-not-modified] Clear modified-flag on that buffer.
+\\[Buffer-menu-save] Mark that buffer to be saved, and move down.
+\\[Buffer-menu-delete] Mark that buffer to be deleted, and move down.
+\\[Buffer-menu-delete-backwards] Mark that buffer to be deleted, and move up.
+\\[Buffer-menu-execute] Delete or save marked buffers.
+\\[Buffer-menu-unmark] Remove all marks from current line.
+ With prefix argument, also move up one line.
+\\[Buffer-menu-backup-unmark] Back up a line and remove marks.
+\\[Buffer-menu-toggle-read-only] Toggle read-only status of buffer on this line.
+\\[revert-buffer] Update the list of buffers.
+\\[Buffer-menu-toggle-files-only] Toggle whether the menu displays only file buffers.
+\\[Buffer-menu-bury] Bury the buffer listed on this line."
(interactive "P")
-;;; (setq Buffer-menu-window-config (current-window-configuration))
(switch-to-buffer (list-buffers-noselect arg))
(message
"Commands: d, s, x, u; f, o, 1, 2, m, v; ~, %%; q to quit; ? for help."))
(defun buffer-menu-other-window (&optional arg)
- "Display a list of buffers in another window.
-With the buffer list buffer, you can save, delete or select the buffers.
-With argument, show only buffers that are visiting files.
-Type ? after invocation to get help on commands available.
-Type q to remove the buffer menu from the display.
-For more information, see the function `buffer-menu'."
+ "Display the Buffer Menu in another window.
+See `buffer-menu' for a description of the Buffer Menu.
+
+By default, all buffers are listed except those whose names start
+with a space (which are for internal use). With prefix argument
+ARG, show only buffers that are visiting files."
(interactive "P")
-;;; (setq Buffer-menu-window-config (current-window-configuration))
(switch-to-buffer-other-window (list-buffers-noselect arg))
(message
"Commands: d, s, x, u; f, o, 1, 2, m, v; ~, %%; q to quit; ? for help."))
+;;;###autoload
+(defun list-buffers (&optional arg)
+ "Display a list of existing buffers.
+The list is displayed in a buffer named \"*Buffer List*\".
+See `buffer-menu' for details about the Buffer Menu buffer.
+
+By default, all buffers are listed except those whose names start
+with a space (which are for internal use). With prefix argument
+ARG, show only buffers that are visiting files."
+ (interactive "P")
+ (display-buffer (list-buffers-noselect arg)))
+
+(defun Buffer-menu-toggle-files-only (arg)
+ "Toggle whether the current buffer-menu displays only file buffers.
+With a positive ARG, display only file buffers. With zero or
+negative ARG, display other buffers as well."
+ (interactive "P")
+ (setq Buffer-menu-files-only
+ (cond ((not arg) (not Buffer-menu-files-only))
+ ((> (prefix-numeric-value arg) 0) t)))
+ (message (if Buffer-menu-files-only
+ "Showing only file-visiting buffers."
+ "Showing all non-internal buffers."))
+ (revert-buffer))
+
+(defalias 'Buffer-menu-sort 'tabulated-list-sort)
+
+
+(defun Buffer-menu-buffer (&optional error-if-non-existent-p)
+ "Return the buffer described by the current Buffer Menu line.
+If there is no buffer here, return nil if ERROR-IF-NON-EXISTENT-P
+is nil or omitted, and signal an error otherwise."
+ (let ((buffer (tabulated-list-get-id)))
+ (cond ((null buffer)
+ (if error-if-non-existent-p
+ (error "No buffer on this line")))
+ ((not (buffer-live-p buffer))
+ (if error-if-non-existent-p
+ (error "This buffer has been killed")))
+ (t buffer))))
+
(defun Buffer-menu-no-header ()
(beginning-of-line)
(if (or Buffer-menu-use-header-line
@@ -370,166 +326,140 @@ For more information, see the function `buffer-menu'."
(forward-line 1)
nil))
+(defun Buffer-menu-beginning ()
+ (goto-char (point-min))
+ (unless Buffer-menu-use-header-line
+ (forward-line)))
+
+
+;;; Commands for modifying Buffer Menu entries.
+
(defun Buffer-menu-mark ()
- "Mark buffer on this line for being displayed by \\<Buffer-menu-mode-map>\\[Buffer-menu-select] command."
+ "Mark the Buffer menu entry at point for later display.
+It will be displayed by the \\<Buffer-menu-mode-map>\\[Buffer-menu-select] command."
(interactive)
- (when (Buffer-menu-no-header)
- (let ((inhibit-read-only t))
- (delete-char 1)
- (insert ?>)
- (forward-line 1))))
+ (tabulated-list-set-col 0 ">" t)
+ (forward-line))
(defun Buffer-menu-unmark (&optional backup)
"Cancel all requested operations on buffer on this line and move down.
Optional prefix arg means move up."
(interactive "P")
- (when (Buffer-menu-no-header)
- (let* ((buf (Buffer-menu-buffer t))
- (mod (buffer-modified-p buf))
- (readonly (with-current-buffer buf buffer-read-only))
- (inhibit-read-only t))
- (delete-char 3)
- (insert (if readonly (if mod " %*" " % ") (if mod " *" " ")))))
+ (tabulated-list-set-col 0 " " t)
(forward-line (if backup -1 1)))
(defun Buffer-menu-backup-unmark ()
"Move up and cancel all requested operations on buffer on line above."
(interactive)
(forward-line -1)
- (Buffer-menu-unmark)
- (forward-line -1))
+ (tabulated-list-set-col 0 " " t))
(defun Buffer-menu-delete (&optional arg)
- "Mark buffer on this line to be deleted by \\<Buffer-menu-mode-map>\\[Buffer-menu-execute] command.
-Prefix arg is how many buffers to delete.
-Negative arg means delete backwards."
+ "Mark the buffer on this Buffer Menu buffer line for deletion.
+A subsequent \\<Buffer-menu-mode-map>`\\[Buffer-menu-execute]' command
+will delete it.
+
+If prefix argument ARG is non-nil, it specifies the number of
+buffers to delete; a negative ARG means to delete backwards."
(interactive "p")
- (when (Buffer-menu-no-header)
- (let ((inhibit-read-only t))
- (if (or (null arg) (= arg 0))
- (setq arg 1))
- (while (> arg 0)
- (delete-char 1)
- (insert ?D)
- (forward-line 1)
- (setq arg (1- arg)))
- (while (and (< arg 0)
- (Buffer-menu-no-header))
- (delete-char 1)
- (insert ?D)
- (forward-line -1)
- (setq arg (1+ arg))))))
+ (if (or (null arg) (= arg 0))
+ (setq arg 1))
+ (while (> arg 0)
+ (when (Buffer-menu-buffer)
+ (tabulated-list-set-col 0 "D" t))
+ (forward-line 1)
+ (setq arg (1- arg)))
+ (while (< arg 0)
+ (when (Buffer-menu-buffer)
+ (tabulated-list-set-col 0 "D" t))
+ (forward-line -1)
+ (setq arg (1+ arg))))
(defun Buffer-menu-delete-backwards (&optional arg)
- "Mark buffer on this line to be deleted by \\<Buffer-menu-mode-map>\\[Buffer-menu-execute] command
-and then move up one line. Prefix arg means move that many lines."
+ "Mark the buffer on this Buffer Menu line for deletion, and move up.
+Prefix ARG means move that many lines."
(interactive "p")
(Buffer-menu-delete (- (or arg 1))))
(defun Buffer-menu-save ()
- "Mark buffer on this line to be saved by \\<Buffer-menu-mode-map>\\[Buffer-menu-execute] command."
+ "Mark the buffer on this Buffer Menu line for saving.
+A subsequent \\<Buffer-menu-mode-map>`\\[Buffer-menu-execute]' command
+will save it."
(interactive)
- (when (Buffer-menu-no-header)
- (let ((inhibit-read-only t))
- (forward-char 2)
- (delete-char 1)
- (insert ?S)
- (forward-line 1))))
+ (when (Buffer-menu-buffer)
+ (tabulated-list-set-col 2 "S" t)
+ (forward-line 1)))
(defun Buffer-menu-not-modified (&optional arg)
- "Mark buffer on this line as unmodified (no changes to save)."
+ "Mark the buffer on this line as unmodified (no changes to save).
+If ARG is non-nil (interactively, with a prefix argument), mark
+it as modified."
(interactive "P")
(with-current-buffer (Buffer-menu-buffer t)
(set-buffer-modified-p arg))
- (save-excursion
- (beginning-of-line)
- (forward-char 2)
- (if (= (char-after) (if arg ?\s ?*))
- (let ((inhibit-read-only t))
- (delete-char 1)
- (insert (if arg ?* ?\s))))))
-
-(defun Buffer-menu-beginning ()
- (goto-char (point-min))
- (unless Buffer-menu-use-header-line
- (forward-line)))
+ (tabulated-list-set-col 2 (if arg "*" " ") t))
(defun Buffer-menu-execute ()
- "Save and/or delete buffers marked with \\<Buffer-menu-mode-map>\\[Buffer-menu-save] or \\<Buffer-menu-mode-map>\\[Buffer-menu-delete] commands."
+ "Save and/or delete marked buffers in the Buffer Menu.
+Buffers marked with \\<Buffer-menu-mode-map>`\\[Buffer-menu-save]' are saved.
+Buffers marked with \\<Buffer-menu-mode-map>`\\[Buffer-menu-delete]' are deleted."
(interactive)
(save-excursion
(Buffer-menu-beginning)
- (while (re-search-forward "^..S" nil t)
- (let ((modp nil))
- (with-current-buffer (Buffer-menu-buffer t)
- (save-buffer)
- (setq modp (buffer-modified-p)))
- (let ((inhibit-read-only t))
- (delete-char -1)
- (insert (if modp ?* ?\s))))))
- (save-excursion
- (Buffer-menu-beginning)
- (let ((buff-menu-buffer (current-buffer))
- (inhibit-read-only t))
- (while (re-search-forward "^D" nil t)
- (forward-char -1)
- (let ((buf (Buffer-menu-buffer nil)))
- (or (eq buf nil)
- (eq buf buff-menu-buffer)
- (save-excursion (kill-buffer buf)))
- (if (and buf (buffer-name buf))
- (progn (delete-char 1)
- (insert ?\s))
- (delete-region (point) (progn (forward-line 1) (point)))
- (unless (bobp)
- (forward-char -1))))))))
+ (while (not (eobp))
+ (let ((buffer (tabulated-list-get-id))
+ (entry (tabulated-list-get-entry)))
+ (cond ((null entry)
+ (forward-line 1))
+ ((not (buffer-live-p buffer))
+ (tabulated-list-delete-entry))
+ (t
+ (let ((delete (eq (char-after) ?D)))
+ (when (equal (aref entry 2) "S")
+ (condition-case nil
+ (progn
+ (with-current-buffer buffer
+ (save-buffer))
+ (tabulated-list-set-col 2 " " t))
+ (error (warn "Error saving %s" buffer))))
+ (if delete
+ (unless (eq buffer (current-buffer))
+ (kill-buffer buffer)
+ (tabulated-list-delete-entry))
+ (forward-line 1)))))))))
(defun Buffer-menu-select ()
- "Select this line's buffer; also display buffers marked with `>'.
-You can mark buffers with the \\<Buffer-menu-mode-map>\\[Buffer-menu-mark] command.
+ "Select this line's buffer; also, display buffers marked with `>'.
+You can mark buffers with the \\<Buffer-menu-mode-map>`\\[Buffer-menu-mark]' command.
This command deletes and replaces all the previously existing windows
in the selected frame."
(interactive)
- (let ((buff (Buffer-menu-buffer t))
- (menu (current-buffer))
- (others ())
- tem)
- (Buffer-menu-beginning)
- (while (re-search-forward "^>" nil t)
- (setq tem (Buffer-menu-buffer t))
- (let ((inhibit-read-only t))
- (delete-char -1)
- (insert ?\s))
- (or (eq tem buff) (memq tem others) (setq others (cons tem others))))
- (setq others (nreverse others)
- tem (/ (1- (frame-height)) (1+ (length others))))
+ (let* ((this-buffer (Buffer-menu-buffer t))
+ (menu-buffer (current-buffer))
+ (others (delq this-buffer (Buffer-menu-marked-buffers t)))
+ (height (/ (1- (frame-height)) (1+ (length others)))))
(delete-other-windows)
- (switch-to-buffer buff)
- (or (eq menu buff)
- (bury-buffer menu))
- (if (equal (length others) 0)
- (progn
-;;; ;; Restore previous window configuration before displaying
-;;; ;; selected buffers.
-;;; (if Buffer-menu-window-config
-;;; (progn
-;;; (set-window-configuration Buffer-menu-window-config)
-;;; (setq Buffer-menu-window-config nil)))
- (switch-to-buffer buff))
- (while others
- (split-window nil tem)
- (other-window 1)
- (switch-to-buffer (car others))
- (setq others (cdr others)))
- (other-window 1) ;back to the beginning!
-)))
-
-(defun Buffer-menu-marked-buffers ()
- "Return a list of buffers marked with the \\<Buffer-menu-mode-map>\\[Buffer-menu-mark] command."
+ (switch-to-buffer this-buffer)
+ (unless (eq menu-buffer this-buffer)
+ (bury-buffer menu-buffer))
+ (dolist (buffer others)
+ (split-window nil height)
+ (other-window 1)
+ (switch-to-buffer buffer))
+ ;; Back to the beginning!
+ (other-window 1)))
+
+(defun Buffer-menu-marked-buffers (&optional unmark)
+ "Return the list of buffers marked with `Buffer-menu-mark'.
+If UNMARK is non-nil, unmark them."
(let (buffers)
(Buffer-menu-beginning)
(while (re-search-forward "^>" nil t)
- (setq buffers (cons (Buffer-menu-buffer t) buffers)))
+ (let ((buffer (Buffer-menu-buffer)))
+ (if (and buffer unmark)
+ (tabulated-list-set-col 0 " " t))
+ (if (buffer-live-p buffer)
+ (push buffer buffers))))
(nreverse buffers)))
(defun Buffer-menu-isearch-buffers ()
@@ -558,20 +488,6 @@ in the selected frame."
(bury-buffer (other-buffer))
(delete-other-windows))
-(defun Buffer-menu-mouse-select (event)
- "Select the buffer whose line you click on."
- (interactive "e")
- (let (buffer)
- (with-current-buffer (window-buffer (posn-window (event-end event)))
- (save-excursion
- (goto-char (posn-point (event-end event)))
- (setq buffer (Buffer-menu-buffer t))))
- (select-window (posn-window (event-end event)))
- (if (and (window-dedicated-p (selected-window))
- (eq (selected-window) (frame-root-window)))
- (switch-to-buffer-other-frame buffer)
- (switch-to-buffer buffer))))
-
(defun Buffer-menu-this-window ()
"Select this line's buffer in this window."
(interactive)
@@ -599,343 +515,144 @@ The current window remains selected."
(bury-buffer menu)))
(defun Buffer-menu-toggle-read-only ()
- "Toggle read-only status of buffer on this line, perhaps via version control."
+ "Toggle read-only status of buffer on this line."
(interactive)
- (let (char)
+ (let (read-only)
(with-current-buffer (Buffer-menu-buffer t)
- (toggle-read-only)
- (setq char (if buffer-read-only ?% ?\s)))
- (save-excursion
- (beginning-of-line)
- (forward-char 1)
- (if (/= (following-char) char)
- (let ((inhibit-read-only t))
- (delete-char 1)
- (insert char))))))
+ (with-no-warnings (toggle-read-only))
+ (setq read-only buffer-read-only))
+ (tabulated-list-set-col 1 (if read-only "%" " ") t)))
(defun Buffer-menu-bury ()
"Bury the buffer listed on this line."
(interactive)
- (when (Buffer-menu-no-header)
- (save-excursion
- (beginning-of-line)
- (bury-buffer (Buffer-menu-buffer t))
- (let ((line (buffer-substring (point) (progn (forward-line 1) (point))))
- (inhibit-read-only t))
- (delete-region (point) (progn (forward-line -1) (point)))
- (goto-char (point-max))
- (insert line))
- (message "Buried buffer moved to the end"))))
-
+ (let ((buffer (tabulated-list-get-id)))
+ (cond ((null buffer))
+ ((buffer-live-p buffer)
+ (bury-buffer buffer)
+ (save-excursion
+ (let ((elt (tabulated-list-delete-entry)))
+ (goto-char (point-max))
+ (apply 'tabulated-list-print-entry elt)))
+ (message "Buffer buried."))
+ (t
+ (tabulated-list-delete-entry)
+ (message "Buffer is dead; removing from list.")))))
(defun Buffer-menu-view ()
"View this line's buffer in View mode."
(interactive)
(view-buffer (Buffer-menu-buffer t)))
-
(defun Buffer-menu-view-other-window ()
"View this line's buffer in View mode in another window."
(interactive)
(view-buffer-other-window (Buffer-menu-buffer t)))
+;;; Functions for populating the Buffer Menu.
;;;###autoload
-(define-key ctl-x-map "\C-b" 'list-buffers)
-
-;;;###autoload
-(defun list-buffers (&optional files-only)
- "Display a list of names of existing buffers.
-The list is displayed in a buffer named `*Buffer List*'.
-Note that buffers with names starting with spaces are omitted.
-Non-null optional arg FILES-ONLY means mention only file buffers.
-
-For more information, see the function `buffer-menu'."
- (interactive "P")
- (display-buffer (list-buffers-noselect files-only)))
-
-(defconst Buffer-menu-short-ellipsis
- ;; This file is preloaded, so we can't use char-displayable-p here
- ;; because we don't know yet what display we're going to connect to.
- ":" ;; (if (char-displayable-p ?…) "…" ":")
- )
-
-(defun Buffer-menu-buffer+size (name size &optional name-props size-props)
- (if (> (+ (string-width name) (string-width size) 2)
- Buffer-menu-buffer+size-width)
- (setq name
- (let ((tail
- (if (string-match "<[0-9]+>$" name)
- (match-string 0 name)
- "")))
- (concat (truncate-string-to-width
- name
- (- Buffer-menu-buffer+size-width
- (max (string-width size) 3)
- (string-width tail)
- 2))
- Buffer-menu-short-ellipsis
- tail)))
- ;; Don't put properties on (buffer-name).
- (setq name (copy-sequence name)))
- (add-text-properties 0 (length name) name-props name)
- (add-text-properties 0 (length size) size-props size)
- (let ((name+space-width (- Buffer-menu-buffer+size-width
- (string-width size))))
- (concat name
- (propertize (make-string (- name+space-width (string-width name))
- ?\s)
- 'display `(space :align-to
- ,(+ Buffer-menu-buffer-column
- name+space-width)))
- size)))
-
-(defun Buffer-menu-sort (column)
- "Sort the buffer menu by COLUMN."
- (interactive "P")
- (when column
- (setq column (prefix-numeric-value column))
- (if (< column 2) (setq column 2))
- (if (> column 5) (setq column 5)))
- (setq Buffer-menu-sort-column column)
- (let ((inhibit-read-only t) l buf m1 m2)
- (save-excursion
- (Buffer-menu-beginning)
- (while (not (eobp))
- (when (buffer-live-p
- (setq buf (get-text-property
- (+ (point)
- Buffer-menu-buffer-column)
- 'buffer)))
- (setq m1 (char-after)
- m1 (if (memq m1 '(?> ?D)) m1)
- m2 (char-after (+ (point) 2))
- m2 (if (eq m2 ?S) m2))
- (if (or m1 m2)
- (push (list buf m1 m2) l)))
- (forward-line)))
- (revert-buffer)
- (save-excursion
- (Buffer-menu-beginning)
- (while (not (eobp))
- (when (setq buf (assq (get-text-property (+ (point)
- Buffer-menu-buffer-column)
- 'buffer) l))
- (setq m1 (cadr buf)
- m2 (cadr (cdr buf)))
- (when m1
- (delete-char 1)
- (insert m1)
- (backward-char 1))
- (when m2
- (forward-char 2)
- (delete-char 1)
- (insert m2)))
- (forward-line)))))
-
-(defun Buffer-menu-sort-by-column (&optional e)
- "Sort the buffer menu by the column clicked on."
- (interactive (list last-input-event))
- (if e (mouse-select-window e))
- (let* ((pos (event-start e))
- (obj (posn-object pos))
- (col (if obj
- (get-text-property (cdr obj) 'column (car obj))
- (get-text-property (posn-point pos) 'column))))
- (Buffer-menu-sort col)))
-
-(defvar Buffer-menu-sort-button-map
- (let ((map (make-sparse-keymap)))
- ;; This keymap handles both nil and non-nil values for
- ;; Buffer-menu-use-header-line.
- (define-key map [header-line mouse-1] 'Buffer-menu-sort-by-column)
- (define-key map [header-line mouse-2] 'Buffer-menu-sort-by-column)
- (define-key map [mouse-2] 'Buffer-menu-sort-by-column)
- (define-key map [follow-link] 'mouse-face)
- (define-key map "\C-m" 'Buffer-menu-sort-by-column)
- map)
- "Local keymap for Buffer menu sort buttons.")
-
-(defun Buffer-menu-make-sort-button (name column)
- (if (equal column Buffer-menu-sort-column) (setq column nil))
- (propertize name
- 'column column
- 'help-echo (concat
- (if Buffer-menu-use-header-line
- "mouse-1, mouse-2: sort by "
- "mouse-2, RET: sort by ")
- (if column (downcase name) "visited order"))
- 'mouse-face 'highlight
- 'keymap Buffer-menu-sort-button-map))
-
(defun list-buffers-noselect (&optional files-only buffer-list)
- "Create and return a buffer with a list of names of existing buffers.
-The buffer is named `*Buffer List*'.
-Note that buffers with names starting with spaces are omitted.
-Non-null optional arg FILES-ONLY means mention only file buffers.
-
-If BUFFER-LIST is non-nil, it should be a list of buffers;
-it means list those buffers and no others.
-
-For more information, see the function `buffer-menu'."
- (let* ((old-buffer (current-buffer))
- (standard-output standard-output)
- (mode-end (make-string (- Buffer-menu-mode-width 2) ?\s))
- (header (concat "CRM "
- (Buffer-menu-buffer+size
- (Buffer-menu-make-sort-button "Buffer" 2)
- (Buffer-menu-make-sort-button "Size" 3))
- " "
- (Buffer-menu-make-sort-button "Mode" 4) mode-end
- (Buffer-menu-make-sort-button "File" 5) "\n"))
- list desired-point)
- (when Buffer-menu-use-header-line
- (let ((pos 0))
- ;; Turn whitespace chars in the header into stretch specs so
- ;; they work regardless of the header-line face.
- (while (string-match "[ \t\n]+" header pos)
- (setq pos (match-end 0))
- (put-text-property (match-beginning 0) pos 'display
- ;; Assume fixed-size chars in the buffer.
- (list 'space :align-to pos)
- header)))
- ;; Try to better align the one-char headers.
- (put-text-property 0 3 'face 'fixed-pitch header)
- ;; Add a "dummy" leading space to align the beginning of the header
- ;; line with the beginning of the text (rather than with the left
- ;; scrollbar or the left fringe). --Stef
- (setq header (concat (propertize " " 'display '(space :align-to 0))
- header)))
- (with-current-buffer (get-buffer-create "*Buffer List*")
- (setq buffer-read-only nil)
- (erase-buffer)
- (setq standard-output (current-buffer))
- ;; Force L2R direction, to avoid messing the display if the
- ;; first buffer in the list happens to begin with a strong R2L
- ;; character.
- (setq bidi-paragraph-direction 'left-to-right)
- (unless Buffer-menu-use-header-line
- ;; Use U+2014 (EM DASH) to underline if possible, else use ASCII
- ;; (i.e. U+002D, HYPHEN-MINUS).
- (let ((underline (if (char-displayable-p ?\u2014) ?\u2014 ?-)))
- (insert header
- (apply 'string
- (mapcar (lambda (c)
- (if (memq c '(?\n ?\s)) c underline))
- header)))))
- ;; Collect info for every buffer we're interested in.
- (dolist (buffer (or buffer-list
- (buffer-list
- (when Buffer-menu-use-frame-buffer-list
- (selected-frame)))))
- (with-current-buffer buffer
- (let ((name (buffer-name))
- (file buffer-file-name))
- (unless (and (not buffer-list)
- (or
- ;; Don't mention internal buffers.
- (and (string= (substring name 0 1) " ") (null file))
- ;; Maybe don't mention buffers without files.
- (and files-only (not file))
- (string= name "*Buffer List*")))
- ;; Otherwise output info.
- (let ((mode (concat (format-mode-line mode-name nil nil buffer)
- (if mode-line-process
- (format-mode-line mode-line-process
- nil nil buffer))))
- (bits (string
- (if (eq buffer old-buffer) ?. ?\s)
- ;; Handle readonly status. The output buffer
- ;; is special cased to appear readonly; it is
- ;; actually made so at a later date.
- (if (or (eq buffer standard-output)
- buffer-read-only)
- ?% ?\s)
- ;; Identify modified buffers.
- (if (buffer-modified-p) ?* ?\s)
- ;; Space separator.
- ?\s)))
- (unless file
- ;; No visited file. Check local value of
- ;; list-buffers-directory and, for Info buffers,
- ;; Info-current-file.
- (cond ((and (boundp 'list-buffers-directory)
- list-buffers-directory)
- (setq file list-buffers-directory))
- ((eq major-mode 'Info-mode)
- (setq file Info-current-file)
- (cond
- ((equal file "dir")
- (setq file "*Info Directory*"))
- ((eq file 'apropos)
- (setq file "*Info Apropos*"))
- ((eq file 'history)
- (setq file "*Info History*"))
- ((eq file 'toc)
- (setq file "*Info TOC*"))
- ((not (stringp file)) ;; avoid errors
- (setq file nil))
- (t
- (setq file (concat "("
- (file-name-nondirectory file)
- ") "
- Info-current-node)))))))
- (push (list buffer bits name (buffer-size) mode file)
- list))))))
- ;; Preserve the original buffer-list ordering, just in case.
- (setq list (nreverse list))
- ;; Place the buffers's info in the output buffer, sorted if necessary.
- (dolist (buffer
- (if Buffer-menu-sort-column
- (sort list
- (if (eq Buffer-menu-sort-column 3)
- (lambda (a b)
- (< (nth Buffer-menu-sort-column a)
- (nth Buffer-menu-sort-column b)))
- (lambda (a b)
- (string< (nth Buffer-menu-sort-column a)
- (nth Buffer-menu-sort-column b)))))
- list))
- (if (eq (car buffer) old-buffer)
- (setq desired-point (point)))
- (insert (cadr buffer)
- ;; Put the buffer name into a text property
- ;; so we don't have to extract it from the text.
- ;; This way we avoid problems with unusual buffer names.
- (let ((name (nth 2 buffer))
- (size (int-to-string (nth 3 buffer))))
- (Buffer-menu-buffer+size name size
- `(buffer-name ,name
- buffer ,(car buffer)
- font-lock-face buffer-menu-buffer
- mouse-face highlight
- help-echo
- ,(if (>= (length name)
- (- Buffer-menu-buffer+size-width
- (max (length size) 3)
- 2))
- name
- "mouse-2: select this buffer"))))
- " "
- (if (> (string-width (nth 4 buffer)) Buffer-menu-mode-width)
- (truncate-string-to-width (nth 4 buffer)
- Buffer-menu-mode-width)
- (nth 4 buffer)))
- (when (nth 5 buffer)
- (indent-to (+ Buffer-menu-buffer-column Buffer-menu-buffer+size-width
- Buffer-menu-mode-width 4) 1)
- (princ (abbreviate-file-name (nth 5 buffer))))
- (princ "\n"))
+ "Create and return a Buffer Menu buffer.
+This is called by `buffer-menu' and others as a subroutine.
+
+If FILES-ONLY is non-nil, show only file-visiting buffers.
+If BUFFER-LIST is non-nil, it should be a list of buffers; it
+means list those buffers and no others."
+ (let ((old-buffer (current-buffer))
+ (buffer (get-buffer-create "*Buffer List*")))
+ (with-current-buffer buffer
(Buffer-menu-mode)
- (when Buffer-menu-use-header-line
- (setq header-line-format header))
- ;; DESIRED-POINT doesn't have to be set; it is not when the
- ;; current buffer is not displayed for some reason.
- (and desired-point
- (goto-char desired-point))
- (setq Buffer-menu-files-only files-only)
- (setq Buffer-menu--buffers buffer-list)
- (set-buffer-modified-p nil)
- (current-buffer))))
+ (setq Buffer-menu-files-only (and files-only (>= files-only 0)))
+ (list-buffers--refresh buffer-list old-buffer)
+ (tabulated-list-print))
+ buffer))
+
+(defun Buffer-menu-mouse-select (event)
+ "Select the buffer whose line you click on."
+ (interactive "e")
+ (select-window (posn-window (event-end event)))
+ (let ((buffer (tabulated-list-get-id (posn-point (event-end event)))))
+ (when (buffer-live-p buffer)
+ (if (and (window-dedicated-p (selected-window))
+ (eq (selected-window) (frame-root-window)))
+ (switch-to-buffer-other-frame buffer)
+ (switch-to-buffer buffer)))))
+
+(defun list-buffers--refresh (&optional buffer-list old-buffer)
+ ;; Set up `tabulated-list-format'.
+ (let ((name-width Buffer-menu-name-width)
+ (size-width Buffer-menu-size-width))
+ ;; Handle obsolete variable:
+ (if Buffer-menu-buffer+size-width
+ (setq name-width (- Buffer-menu-buffer+size-width size-width)))
+ (setq tabulated-list-format
+ (vector '("C" 1 t :pad-right 0)
+ '("R" 1 t :pad-right 0)
+ '("M" 1 t)
+ `("Buffer" ,name-width t)
+ `("Size" ,size-width tabulated-list-entry-size->
+ :right-align t)
+ `("Mode" ,Buffer-menu-mode-width t)
+ '("File" 1 t))))
+ (setq tabulated-list-use-header-line Buffer-menu-use-header-line)
+ ;; Collect info for each buffer we're interested in.
+ (let ((buffer-menu-buffer (current-buffer))
+ (show-non-file (not Buffer-menu-files-only))
+ entries)
+ (dolist (buffer (or buffer-list
+ (buffer-list (if Buffer-menu-use-frame-buffer-list
+ (selected-frame)))))
+ (with-current-buffer buffer
+ (let* ((name (buffer-name))
+ (file buffer-file-name))
+ (when (and (buffer-live-p buffer)
+ (or buffer-list
+ (and (not (string= (substring name 0 1) " "))
+ (not (eq buffer buffer-menu-buffer))
+ (or file show-non-file))))
+ (push (list buffer
+ (vector (if (eq buffer old-buffer) "." " ")
+ (if buffer-read-only "%" " ")
+ (if (buffer-modified-p) "*" " ")
+ (Buffer-menu--pretty-name name)
+ (number-to-string (buffer-size))
+ (concat (format-mode-line mode-name nil nil buffer)
+ (if mode-line-process
+ (format-mode-line mode-line-process
+ nil nil buffer)))
+ (Buffer-menu--pretty-file-name file)))
+ entries)))))
+ (setq tabulated-list-entries (nreverse entries)))
+ (tabulated-list-init-header))
+
+(defun tabulated-list-entry-size-> (entry1 entry2)
+ (> (string-to-number (aref (cadr entry1) 4))
+ (string-to-number (aref (cadr entry2) 4))))
+
+(defun Buffer-menu--pretty-name (name)
+ (propertize name
+ 'font-lock-face 'buffer-menu-buffer
+ 'mouse-face 'highlight))
+
+(defun Buffer-menu--pretty-file-name (file)
+ (cond (file
+ (abbreviate-file-name file))
+ ((and (boundp 'list-buffers-directory)
+ list-buffers-directory)
+ list-buffers-directory)
+ ((eq major-mode 'Info-mode)
+ (Buffer-menu-info-node-description Info-current-file))
+ (t "")))
+
+(defun Buffer-menu-info-node-description (file)
+ (cond
+ ((equal file "dir") "*Info Directory*")
+ ((eq file 'apropos) "*Info Apropos*")
+ ((eq file 'history) "*Info History*")
+ ((eq file 'toc) "*Info TOC*")
+ ((not (stringp file)) "") ; Avoid errors
+ (t
+ (concat "(" (file-name-nondirectory file) ") " Info-current-node))))
;;; buff-menu.el ends here
diff --git a/lisp/calc/calc-forms.el b/lisp/calc/calc-forms.el
index 96cc74f7ef6..dfc5dfc6588 100644
--- a/lisp/calc/calc-forms.el
+++ b/lisp/calc/calc-forms.el
@@ -444,7 +444,7 @@
(defun math-this-year ()
- (string-to-number (substring (current-time-string) -4)))
+ (nth 5 (decode-time)))
(defun math-leap-year-p (year)
(if (Math-lessp year 1752)
diff --git a/lisp/calc/calc-lang.el b/lisp/calc/calc-lang.el
index c53f59eb0f4..ec4c497a1c6 100644
--- a/lisp/calc/calc-lang.el
+++ b/lisp/calc/calc-lang.el
@@ -133,8 +133,39 @@
( asin . calcFunc-arcsin )
( asinh . calcFunc-arcsinh )
( atan . calcFunc-arctan )
- ( atan2 . calcFunc-arctan2 )
- ( atanh . calcFunc-arctanh )))
+ ( atan2 . calcFunc-arctan2 )
+ ( atanh . calcFunc-arctanh )
+ ( fma . (math-C-parse-fma))
+ ( fmax . calcFunc-max )
+ ( j0 . (math-C-parse-bess))
+ ( jn . calcFunc-besJ )
+ ( j1 . (math-C-parse-bess))
+ ( yn . calcFunc-besY )
+ ( y0 . (math-C-parse-bess))
+ ( y1 . (math-C-parse-bess))
+ ( tgamma . calcFunc-gamma )))
+
+(defun math-C-parse-bess (f val)
+ "Parse C's j0, j1, y0, y1 functions."
+ (let ((args (math-read-expr-list)))
+ (math-read-token)
+ (append
+ (cond ((eq val 'j0) '(calcFunc-besJ 0))
+ ((eq val 'j1) '(calcFunc-besJ 1))
+ ((eq val 'y0) '(calcFunc-besY 0))
+ ((eq val 'y1) '(calcFunc-besY 1)))
+ args)))
+
+(defun math-C-parse-fma (f val)
+ "Parse C's fma function fma(x,y,z) => (x * y + z)."
+ (let ((args (math-read-expr-list)))
+ (math-read-token)
+ (list 'calcFunc-add
+ (list 'calcFunc-mul
+ (nth 0 args)
+ (nth 1 args))
+ (nth 2 args))))
+
(put 'c 'math-variable-table
'( ( M_PI . var-pi )
diff --git a/lisp/calc/calc-units.el b/lisp/calc/calc-units.el
index 9d2583085a2..e5c7b6737fb 100644
--- a/lisp/calc/calc-units.el
+++ b/lisp/calc/calc-units.el
@@ -356,6 +356,8 @@ Entries are (SYMBOL EXPR DOC-STRING TEMP-TYPE BASE-UNITS).")
(math-to-standard-units (calc-top-n 1)
nil))))))
+(defvar calc-ensure-consistent-units)
+
(defun calc-quick-units ()
(interactive)
(calc-slow-wrapper
@@ -370,8 +372,11 @@ Entries are (SYMBOL EXPR DOC-STRING TEMP-TYPE BASE-UNITS).")
(unless (< pos (length units))
(error "Unit number %d not defined" pos))
(if (math-units-in-expr-p expr nil)
- (calc-enter-result 1 (format "cun%d" num)
- (math-convert-units expr (nth pos units)))
+ (progn
+ (if calc-ensure-consistent-units
+ (math-check-unit-consistency expr (nth pos units)))
+ (calc-enter-result 1 (format "cun%d" num)
+ (math-convert-units expr (nth pos units))))
(calc-enter-result 1 (format "*un%d" num)
(math-simplify-units
(math-mul expr (nth pos units))))))))
@@ -477,6 +482,8 @@ If EXPR is nil, return nil."
(setq units (math-read-expr new-units))
(when (eq (car-safe units) 'error)
(error "Bad format in units expression: %s" (nth 2 units)))
+ (if calc-ensure-consistent-units
+ (math-check-unit-consistency expr units))
(math-put-default-units units)
(let ((unew (math-units-in-expr-p units t))
(std (and (eq (car-safe units) 'var)
@@ -560,7 +567,7 @@ If EXPR is nil, return nil."
(defun calc-extract-units ()
(interactive)
(calc-slow-wrapper
- (calc-enter-result 1 "rmun" (math-simplify-units
+ (calc-enter-result 1 "exun" (math-simplify-units
(math-extract-units (calc-top-n 1))))))
;; The variables calc-num-units and calc-den-units are local to
@@ -914,6 +921,20 @@ If EXPR is nil, return nil."
(math-single-units-in-expr-p (nth 1 expr))))
(t 'wrong)))
+(defun math-consistent-units-p (expr newunits)
+ "Non-nil if EXPR and NEWUNITS have consistent units."
+ (or
+ (and (eq (car-safe newunits) 'var)
+ (assq (nth 1 newunits) math-standard-units-systems))
+ (math-numberp (math-get-units (list '/ expr newunits)))))
+
+(defun math-check-unit-consistency (expr units)
+ "Give an error if EXPR and UNITS do not have consistent units."
+ (unless (math-consistent-units-p expr units)
+ (error "New units (%s) are inconsistent with current units (%s)"
+ (math-format-value units)
+ (math-format-value (math-get-units expr)))))
+
(defun math-check-unit-name (v)
(and (eq (car-safe v) 'var)
(or (assq (nth 1 v) (or math-units-table (math-build-units-table)))
diff --git a/lisp/calc/calc.el b/lisp/calc/calc.el
index 5224d1aa4f8..4d64209dd36 100644
--- a/lisp/calc/calc.el
+++ b/lisp/calc/calc.el
@@ -222,7 +222,7 @@
(defgroup calc nil
- "GNU Calc."
+ "Advanced desk calculator and mathematical tool."
:prefix "calc-"
:tag "Calc"
:group 'applications)
@@ -418,6 +418,13 @@ in normal mode."
:group 'calc
:type 'boolean)
+(defcustom calc-ensure-consistent-units
+ nil
+ "If non-nil, make sure new units are consistent with current units
+when converting units."
+ :group 'calc
+ :type 'boolean)
+
(defcustom calc-undo-length
100
"The number of undo steps that will be preserved when Calc is quit."
diff --git a/lisp/calendar/cal-html.el b/lisp/calendar/cal-html.el
index 8073295a412..679fae98bc8 100644
--- a/lisp/calendar/cal-html.el
+++ b/lisp/calendar/cal-html.el
@@ -66,6 +66,12 @@
(string :tag "Sat"))
:group 'calendar-html)
+(defcustom cal-html-holidays t
+ "If non-nil, include holidays as well as diary entries."
+ :version "24.2"
+ :type 'boolean
+ :group 'calendar-html)
+
(defcustom cal-html-css-default
(concat
"<STYLE TYPE=\"text/css\">\n"
@@ -82,9 +88,11 @@
" SPAN.NO-YEAR { color: #0b3; font-weight: bold; }\n"
" SPAN.ANN { color: #0bb; font-weight: bold; }\n"
" SPAN.BLOCK { color: #048; font-style: italic; }\n"
+ " SPAN.HOLIDAY { color: #f00; font-weight: bold; }\n"
"</STYLE>\n\n")
"Default cal-html css style. You can override this with a \"cal.css\" file."
:type 'string
+ :version "24.2" ; added SPAN.HOLIDAY
:group 'calendar-html)
;;; End customizable variables.
@@ -227,6 +235,8 @@ Contains links to previous and next month and year, and current minical."
;;------------------------------------------------------------
;; minical: a small month calendar with links
;;------------------------------------------------------------
+(autoload 'holiday-in-range "holidays")
+
(defun cal-html-insert-minical (month year)
"Insert a minical for numeric MONTH of YEAR."
(let* ((blank-days ; at start of month
@@ -313,10 +323,12 @@ Characters are replaced according to `cal-html-html-subst-list'."
""))
-(defun cal-html-htmlify-entry (entry)
- "Convert a diary entry ENTRY to html with the appropriate class specifier."
+(defun cal-html-htmlify-entry (entry &optional class)
+ "Convert a diary entry ENTRY to html with the appropriate class specifier.
+Optional argument CLASS is the class specifier to use."
(let ((start
(cond
+ (class)
((string-match "block" (nth 2 entry)) "BLOCK")
((string-match "anniversary" (nth 2 entry)) "ANN")
((not (string-match
@@ -328,10 +340,12 @@ Characters are replaced according to `cal-html-html-subst-list'."
(cal-html-htmlify-string (cadr entry)))))
-(defun cal-html-htmlify-list (date-list date)
+(defun cal-html-htmlify-list (date-list date &optional holidays)
"Return a string of concatenated, HTML-ified diary entries.
-DATE-LIST is a list of diary entries. Return only those matching DATE."
- (mapconcat (lambda (x) (cal-html-htmlify-entry x))
+DATE-LIST is a list of diary entries. Return only those matching DATE.
+Optional argument HOLIDAYS non-nil means the input is actually a list
+of holidays, rather than diary entries."
+ (mapconcat (lambda (x) (cal-html-htmlify-entry x (if holidays "HOLIDAY")))
(let (result)
(dolist (p date-list (reverse result))
(and (car p)
@@ -351,11 +365,11 @@ DATE-LIST is a list of diary entries. Return only those matching DATE."
(diary-list-entries (calendar-gregorian-from-absolute d1)
(1+ (- d2 d1)) t))
-
-(defun cal-html-insert-agenda-days (month year diary-list)
+(defun cal-html-insert-agenda-days (month year diary-list holiday-list)
"Insert HTML commands for a range of days in monthly calendars.
HTML commands are inserted for the days of the numeric MONTH in
-four-digit YEAR. Diary entries in DIARY-LIST are included."
+four-digit YEAR. Includes diary entries in DIARY-LIST, and
+holidays in HOLIDAY-LIST."
(let ((blank-days ; at start of month
(mod (- (calendar-day-of-week (list month 1 year))
calendar-week-start-day)
@@ -381,6 +395,8 @@ four-digit YEAR. Diary entries in DIARY-LIST are included."
cal-html-e-tableheader-string
;; Diary entries.
cal-html-b-tabledata-string
+ (cal-html-htmlify-list holiday-list date t)
+ (and holiday-list diary-list "<BR>\n")
(cal-html-htmlify-list diary-list date)
cal-html-e-tabledata-string
cal-html-e-tablerow-string)
@@ -395,16 +411,17 @@ four-digit YEAR. Diary entries in DIARY-LIST are included."
(defun cal-html-one-month (month year dir)
"Write an HTML calendar file for numeric MONTH of YEAR in directory DIR."
- (let ((diary-list (cal-html-list-diary-entries
- (calendar-absolute-from-gregorian (list month 1 year))
- (calendar-absolute-from-gregorian
+ (let* ((d1 (calendar-absolute-from-gregorian (list month 1 year)))
+ (d2 (calendar-absolute-from-gregorian
(list month
(calendar-last-day-of-month month year)
- year)))))
+ year)))
+ (diary-list (cal-html-list-diary-entries d1 d2))
+ (holiday-list (if cal-html-holidays (holiday-in-range d1 d2))))
(with-temp-buffer
(insert cal-html-b-document-string)
(cal-html-insert-month-header month year)
- (cal-html-insert-agenda-days month year diary-list)
+ (cal-html-insert-agenda-days month year diary-list holiday-list)
(insert cal-html-e-document-string)
(write-file (expand-file-name
(cal-html-monthpage-name month year) dir)))))
diff --git a/lisp/calendar/cal-tex.el b/lisp/calendar/cal-tex.el
index 0ae2b38eaf6..2452f44448c 100644
--- a/lisp/calendar/cal-tex.el
+++ b/lisp/calendar/cal-tex.el
@@ -237,31 +237,9 @@ The names are taken from `calendar-day-name-array'.")
"LaTeX code to insert one box with date info in calendar.
This definition is the heart of the calendar!")
-(autoload 'calendar-holiday-list "holidays")
-
-(defun cal-tex-list-holidays (d1 d2)
- "Generate a list of all holidays from absolute date D1 to D2."
- (let* ((start (calendar-gregorian-from-absolute d1))
- (displayed-month (calendar-extract-month start))
- (displayed-year (calendar-extract-year start))
- (end (calendar-gregorian-from-absolute d2))
- (end-month (calendar-extract-month end))
- (end-year (calendar-extract-year end))
- (number-of-intervals
- (1+ (/ (calendar-interval displayed-month displayed-year
- end-month end-year)
- 3)))
- holidays in-range a)
- (calendar-increment-month displayed-month displayed-year 1)
- (dotimes (_idummy number-of-intervals)
- (setq holidays (append holidays (calendar-holiday-list)))
- (calendar-increment-month displayed-month displayed-year 3))
- (dolist (hol holidays)
- (and (car hol)
- (setq a (calendar-absolute-from-gregorian (car hol)))
- (and (<= d1 a) (<= a d2))
- (setq in-range (append (list hol) in-range))))
- in-range))
+(autoload 'holiday-in-range "holidays")
+
+(define-obsolete-function-alias 'cal-tex-list-holidays 'holiday-in-range "24.2")
(autoload 'diary-list-entries "diary-lib")
@@ -446,7 +424,7 @@ Optional EVENT indicates a buffer position to use instead of point."
(calendar-last-day-of-month end-month end-year)
end-year))))
(diary-list (if cal-tex-diary (cal-tex-list-diary-entries d1 d2)))
- (holidays (if cal-tex-holidays (cal-tex-list-holidays d1 d2)))
+ (holidays (if cal-tex-holidays (holiday-in-range d1 d2)))
other-month other-year small-months-at-start)
(cal-tex-insert-preamble (cal-tex-number-weeks month year 1) t "12pt")
(cal-tex-cmd cal-tex-cal-one-month)
@@ -516,7 +494,7 @@ indicates a buffer position to use instead of point."
(calendar-last-day-of-month end-month end-year)
end-year))))
(diary-list (if cal-tex-diary (cal-tex-list-diary-entries d1 d2)))
- (holidays (if cal-tex-holidays (cal-tex-list-holidays d1 d2))))
+ (holidays (if cal-tex-holidays (holiday-in-range d1 d2))))
(cal-tex-insert-preamble (cal-tex-number-weeks month year n) nil "12pt")
(if (> n 1)
(cal-tex-cmd cal-tex-cal-multi-month)
@@ -697,7 +675,7 @@ entries are not shown). The calendar shows the hours 8-12am, 1-5pm."
(d1 (calendar-absolute-from-gregorian date))
(d2 (+ (* 7 n) d1))
(holidays (if cal-tex-holidays
- (cal-tex-list-holidays d1 d2))))
+ (holiday-in-range d1 d2))))
(cal-tex-preamble "11pt")
(cal-tex-cmd "\\textwidth 6.5in")
(cal-tex-cmd "\\textheight 10.5in")
@@ -752,7 +730,7 @@ Optional EVENT indicates a buffer position to use instead of point."
(d1 (calendar-absolute-from-gregorian date))
(d2 (+ (* 7 n) d1))
(holidays (if cal-tex-holidays
- (cal-tex-list-holidays d1 d2))))
+ (holiday-in-range d1 d2))))
(cal-tex-preamble "12pt")
(cal-tex-cmd "\\textwidth 6.5in")
(cal-tex-cmd "\\textheight 10.5in")
@@ -836,7 +814,7 @@ position to use instead of point."
(d1 (calendar-absolute-from-gregorian date))
(d2 (+ (* 7 n) d1))
(holidays (if cal-tex-holidays
- (cal-tex-list-holidays d1 d2)))
+ (holiday-in-range d1 d2)))
(diary-list (if cal-tex-diary
(cal-tex-list-diary-entries
;; FIXME d1?
@@ -1052,7 +1030,7 @@ Optional EVENT indicates a buffer position to use instead of point."
(d1 (calendar-absolute-from-gregorian date))
(d2 (+ (* 7 n) d1))
(holidays (if cal-tex-holidays
- (cal-tex-list-holidays d1 d2)))
+ (holiday-in-range d1 d2)))
(diary-list (if cal-tex-diary
(cal-tex-list-diary-entries
;; FIXME d1?
@@ -1149,7 +1127,7 @@ Optional EVENT indicates a buffer position to use instead of point."
(d1 (calendar-absolute-from-gregorian date))
(d2 (+ (* 7 n) d1))
(holidays (if cal-tex-holidays
- (cal-tex-list-holidays d1 d2)))
+ (holiday-in-range d1 d2)))
(diary-list (if cal-tex-diary
(cal-tex-list-diary-entries
;; FIXME d1?
@@ -1292,7 +1270,7 @@ Optional EVENT indicates a buffer position to use instead of point."
(d1 (calendar-absolute-from-gregorian date))
(d2 (+ (* 7 n) d1))
(holidays (if cal-tex-holidays
- (cal-tex-list-holidays d1 d2)))
+ (holiday-in-range d1 d2)))
(diary-list (if cal-tex-diary
(cal-tex-list-diary-entries
;; FIXME d1?
diff --git a/lisp/calendar/calendar.el b/lisp/calendar/calendar.el
index d9ec27b4f88..4d4f7e14187 100644
--- a/lisp/calendar/calendar.el
+++ b/lisp/calendar/calendar.el
@@ -1888,7 +1888,7 @@ use instead of point."
;; or on or before the digit of a 1-digit date.
(if (not (and (looking-at "[ 0-9]?[0-9][^0-9]")
(get-text-property (point) 'date)))
- (if error (error "Not on a date!"))
+ (if error (user-error "Not on a date!"))
;; Convert segment to real month and year.
(if (zerop month) (setq month 12))
;; Go back to before the first date digit.
@@ -1903,8 +1903,6 @@ use instead of point."
((and (= 1 month) (= segment 2)) (1+ displayed-year))
(t displayed-year))))))))
-(add-to-list 'debug-ignored-errors "Not on a date!")
-
;; The following version of calendar-gregorian-from-absolute is preferred for
;; reasons of clarity, BUT it's much slower than the version that follows it.
diff --git a/lisp/calendar/holidays.el b/lisp/calendar/holidays.el
index 9edd353b889..0bb3c231840 100644
--- a/lisp/calendar/holidays.el
+++ b/lisp/calendar/holidays.el
@@ -645,6 +645,33 @@ strings describing those holidays that apply on DATE, or nil if none do."
(define-obsolete-function-alias
'check-calendar-holidays 'calendar-check-holidays "23.1")
+
+;; Formerly cal-tex-list-holidays.
+(defun holiday-in-range (d1 d2)
+ "Generate a list of all holidays in range from absolute date D1 to D2."
+ (let* ((start (calendar-gregorian-from-absolute d1))
+ (displayed-month (calendar-extract-month start))
+ (displayed-year (calendar-extract-year start))
+ (end (calendar-gregorian-from-absolute d2))
+ (end-month (calendar-extract-month end))
+ (end-year (calendar-extract-year end))
+ (number-of-intervals
+ (1+ (/ (calendar-interval displayed-month displayed-year
+ end-month end-year)
+ 3)))
+ holidays in-range a)
+ (calendar-increment-month displayed-month displayed-year 1)
+ (dotimes (_idummy number-of-intervals)
+ (setq holidays (append holidays (calendar-holiday-list)))
+ (calendar-increment-month displayed-month displayed-year 3))
+ (dolist (hol holidays)
+ (and (car hol)
+ (setq a (calendar-absolute-from-gregorian (car hol)))
+ (and (<= d1 a) (<= a d2))
+ (setq in-range (append (list hol) in-range))))
+ in-range))
+
+
(declare-function x-popup-menu "menu.c" (position menu))
;;;###cal-autoload
diff --git a/lisp/cedet/mode-local.el b/lisp/cedet/mode-local.el
index 7346e88797d..11968f3fa35 100644
--- a/lisp/cedet/mode-local.el
+++ b/lisp/cedet/mode-local.el
@@ -522,6 +522,9 @@ See also the function `define-overload'."
(list (mode-local--override name args body))
result)))
+;;;###autoload
+(put 'define-overloadable-function 'doc-string-elt 3)
+
(defmacro define-overloadable-function (name args docstring &rest body)
"Define a new function, as with `defun', which can be overloaded.
NAME is the name of the function to create.
@@ -546,6 +549,7 @@ defined. The default is to call the function `NAME-default' with the
appropriate arguments deduced from ARGS.
OVERARGS is a list of arguments passed to the override and
`NAME-default' function, in place of those deduced from ARGS."
+ (declare (doc-string 3))
`(eval-and-compile
(defun ,name ,args
,docstring
diff --git a/lisp/comint.el b/lisp/comint.el
index 10981675971..db0f5b8b460 100644
--- a/lisp/comint.el
+++ b/lisp/comint.el
@@ -104,6 +104,7 @@
(eval-when-compile (require 'cl))
(require 'ring)
(require 'ansi-color)
+(require 'regexp-opt) ;For regexp-opt-charset.
;; Buffer Local Variables:
;;============================================================================
@@ -1075,10 +1076,10 @@ See also `comint-read-input-ring'."
(defun comint-search-arg (arg)
;; First make sure there is a ring and that we are after the process mark
(cond ((not (comint-after-pmark-p))
- (error "Not at command line"))
+ (user-error "Not at command line"))
((or (null comint-input-ring)
(ring-empty-p comint-input-ring))
- (error "Empty input ring"))
+ (user-error "Empty input ring"))
((zerop arg)
;; arg of zero resets search from beginning, and uses arg of 1
(setq comint-input-ring-index nil)
@@ -1145,7 +1146,7 @@ Moves relative to `comint-input-ring-index'."
Moves relative to START, or `comint-input-ring-index'."
(if (or (not (ring-p comint-input-ring))
(ring-empty-p comint-input-ring))
- (error "No history"))
+ (user-error "No history"))
(let* ((len (ring-length comint-input-ring))
(motion (if (> arg 0) 1 -1))
(n (mod (- (or start (comint-search-start arg)) motion) len))
@@ -1185,7 +1186,7 @@ If N is negative, find the next or Nth next match."
(let ((pos (comint-previous-matching-input-string-position regexp n)))
;; Has a match been found?
(if (null pos)
- (error "Not found")
+ (user-error "Not found")
;; If leaving the edit line, save partial input
(if (null comint-input-ring-index) ;not yet on ring
(setq comint-stored-incomplete-input
@@ -1371,7 +1372,7 @@ actual side-effect."
(goto-char (match-beginning 0))
(if (not (search-forward old pos t))
(or silent
- (error "Not found"))
+ (user-error "Not found"))
(replace-match new t t)
(message "History item: substituted"))))
(t
@@ -1776,7 +1777,7 @@ Similarly for Soar, Scheme, etc."
(interactive)
;; Note that the input string does not include its terminal newline.
(let ((proc (get-buffer-process (current-buffer))))
- (if (not proc) (error "Current buffer has no process")
+ (if (not proc) (user-error "Current buffer has no process")
(widen)
(let* ((pmark (process-mark proc))
(intxt (if (>= (point) (marker-position pmark))
@@ -2100,43 +2101,51 @@ This function should be a pre-command hook."
(select-window selected))))
nil t))))))
+(defvar follow-mode)
+(declare-function follow-comint-scroll-to-bottom "follow" ())
+
(defun comint-postoutput-scroll-to-bottom (_string)
"Go to the end of buffer in some or all windows showing it.
-Does not scroll if the current line is the last line in the buffer.
+Do not scroll if the current line is the last line in the buffer.
Depends on the value of `comint-move-point-for-output' and
`comint-scroll-show-maximum-output'.
This function should be in the list `comint-output-filter-functions'."
- (let* ((selected (selected-window))
- (current (current-buffer))
- (process (get-buffer-process current))
- (scroll comint-move-point-for-output))
+ (let* ((current (current-buffer))
+ (process (get-buffer-process current)))
(unwind-protect
- (if process
- (walk-windows
- (lambda (window)
- (when (eq (window-buffer window) current)
- (select-window window)
- (if (and (< (point) (process-mark process))
- (or (eq scroll t) (eq scroll 'all)
- ;; Maybe user wants point to jump to end.
- (and (eq scroll 'this) (eq selected window))
- (and (eq scroll 'others) (not (eq selected window)))
- ;; If point was at the end, keep it at end.
- (and (marker-position comint-last-output-start)
- (>= (point) comint-last-output-start))))
- (goto-char (process-mark process)))
- ;; Optionally scroll so that the text
- ;; ends at the bottom of the window.
- (if (and comint-scroll-show-maximum-output
- (= (point) (point-max)))
- (save-excursion
- (goto-char (point-max))
- (recenter (- -1 scroll-margin))))
- (select-window selected)))
- nil t))
+ (cond
+ ((null process))
+ ((bound-and-true-p follow-mode)
+ (follow-comint-scroll-to-bottom))
+ (t
+ (let ((selected (selected-window)))
+ (dolist (w (get-buffer-window-list current nil t))
+ (select-window w)
+ (unwind-protect
+ (progn
+ (comint-adjust-point selected)
+ ;; Optionally scroll to the bottom of the window.
+ (and comint-scroll-show-maximum-output
+ (eobp)
+ (recenter (- -1 scroll-margin))))
+ (select-window selected))))))
(set-buffer current))))
+(defun comint-adjust-point (selected)
+ "Move point in the selected window based on Comint settings.
+SELECTED is the window that was originally selected."
+ (let ((process (get-buffer-process (current-buffer))))
+ (and (< (point) (process-mark process))
+ (or (memq comint-move-point-for-output '(t all))
+ ;; Maybe user wants point to jump to end.
+ (eq comint-move-point-for-output
+ (if (eq (selected-window) selected) 'this 'others))
+ ;; If point was at the end, keep it at end.
+ (and (marker-position comint-last-output-start)
+ (>= (point) comint-last-output-start)))
+ (goto-char (process-mark process)))))
+
(defun comint-truncate-buffer (&optional _string)
"Truncate the buffer to `comint-buffer-maximum-size'.
This function could be on `comint-output-filter-functions' or bound to a key."
@@ -2192,7 +2201,7 @@ Calls `comint-get-old-input' to get old input."
(let ((input (funcall comint-get-old-input))
(process (get-buffer-process (current-buffer))))
(if (not process)
- (error "Current buffer has no process")
+ (user-error "Current buffer has no process")
(goto-char (process-mark process))
(insert input))))
@@ -2499,7 +2508,7 @@ If N is negative, find the next or Nth next match."
(save-excursion
(while (/= n 0)
(unless (re-search-backward regexp nil t dir)
- (error "Not found"))
+ (user-error "Not found"))
(unless (get-char-property (point) 'field)
(setq n (- n dir))))
(field-beginning))))
@@ -2959,19 +2968,20 @@ This is a good thing to set in mode hooks.")
"Return the word of WORD-CHARS at point, or nil if none is found.
Word constituents are considered to be those in WORD-CHARS, which is like the
inside of a \"[...]\" (see `skip-chars-forward'), plus all non-ASCII characters."
+ ;; FIXME: Need to handle "..." and '...' quoting in shell.el!
+ ;; This should be combined with pomplete-parsing somehow.
(save-excursion
(let ((here (point))
giveup)
(while (not giveup)
(let ((startpoint (point)))
(skip-chars-backward (concat "\\\\" word-chars))
- ;; Fixme: This isn't consistent with Bash, at least -- not
- ;; all non-ASCII chars should be word constituents.
- (if (and (> (- (point) 2) (point-min))
- (= (char-after (- (point) 2)) ?\\))
+ (if (and comint-file-name-quote-list
+ (eq (char-before (1- (point))) ?\\))
(forward-char -2))
- (if (and (> (- (point) 1) (point-min))
- (>= (char-after (- (point) 1)) 128))
+ ;; FIXME: This isn't consistent with Bash, at least -- not
+ ;; all non-ASCII chars should be word constituents.
+ (if (and (not (bobp)) (>= (char-before) 128))
(forward-char -1))
(if (= (point) startpoint)
(setq giveup t))))
@@ -3000,26 +3010,53 @@ interpreter (e.g., the percent notation of cmd.exe on Windows)."
See `comint-word'."
(comint-word comint-file-name-chars))
-(defun comint--unquote&expand-filename (filename)
- ;; FIXME: The code below does unquote-then-expand which means that "\\$HOME"
- ;; gets expanded to the same as "$HOME"
- (comint-substitute-in-file-name
- (comint-unquote-filename filename)))
+(defun comint--unquote&requote-argument (qstr &optional upos)
+ (unless upos (setq upos 0))
+ (let* ((qpos 0)
+ (ustrs '())
+ (re (concat
+ "\\$\\(?:\\([[:alpha:]][[:alnum:]]*\\)"
+ "\\|{\\(?1:[^{}]+\\)}\\)"
+ (when (memq system-type '(ms-dos windows-nt))
+ "\\|%\\(?1:[^\\\\/]*\\)%")
+ (when comint-file-name-quote-list
+ "\\|\\\\\\(.\\)")))
+ (qupos nil)
+ (push (lambda (str end)
+ (push str ustrs)
+ (setq upos (- upos (length str)))
+ (unless (or qupos (> upos 0))
+ (setq qupos (if (< end 0) (- end) (+ upos end))))))
+ match)
+ (while (setq match (string-match re qstr qpos))
+ (funcall push (substring qstr qpos match) match)
+ (cond
+ ((match-beginning 2) (funcall push (match-string 2 qstr) (match-end 0)))
+ ((match-beginning 1) (funcall push (getenv (match-string 1 qstr))
+ (- (match-end 0))))
+ (t (error "Unexpected case in comint--unquote&requote-argument!")))
+ (setq qpos (match-end 0)))
+ (funcall push (substring qstr qpos) (length qstr))
+ (list (mapconcat #'identity (nreverse ustrs) "")
+ qupos #'comint-quote-filename)))
+
+(defun comint--unquote-argument (str)
+ (car (comint--unquote&requote-argument str)))
+(define-obsolete-function-alias 'comint--unquote&expand-filename
+ #'comint--unquote-argument "24.2")
(defun comint-match-partial-filename ()
"Return the unquoted&expanded filename at point, or nil if none is found.
Environment variables are substituted. See `comint-word'."
(let ((filename (comint--match-partial-filename)))
- (and filename (comint--unquote&expand-filename filename))))
+ (and filename (comint--unquote-argument filename))))
(defun comint-quote-filename (filename)
"Return FILENAME with magic characters quoted.
Magic characters are those in `comint-file-name-quote-list'."
(if (null comint-file-name-quote-list)
filename
- (let ((regexp
- (format "[%s]"
- (mapconcat 'char-to-string comint-file-name-quote-list ""))))
+ (let ((regexp (regexp-opt-charset comint-file-name-quote-list)))
(save-match-data
(let ((i 0))
(while (string-match regexp filename i)
@@ -3033,6 +3070,12 @@ Magic characters are those in `comint-file-name-quote-list'."
filename
(save-match-data
(replace-regexp-in-string "\\\\\\(.\\)" "\\1" filename t))))
+(make-obsolete 'comint-unquote-filename nil "24.2")
+
+(defun comint--requote-argument (upos qstr)
+ ;; See `completion-table-with-quoting'.
+ (let ((res (comint--unquote&requote-argument qstr upos)))
+ (cons (nth 1 res) (nth 2 res))))
(defun comint-completion-at-point ()
(run-hook-with-args-until-success 'comint-dynamic-complete-functions))
@@ -3066,87 +3109,6 @@ Returns t if successful."
(when (comint--match-partial-filename)
(comint--complete-file-name-data)))
-;; FIXME: comint--common-suffix, comint--common-quoted-suffix, and
-;; comint--table-subvert don't fully solve the problem, since
-;; selecting a file from *Completions* won't quote it, among several
-;; other problems.
-
-(defun comint--common-suffix (s1 s2)
- (assert (not (or (string-match "\n" s1) (string-match "\n" s2))))
- ;; Since S2 is expected to be the "unquoted/expanded" version of S1,
- ;; there shouldn't be any case difference, even if the completion is
- ;; case-insensitive.
- (let ((case-fold-search nil))
- (string-match ".*?\\(.*\\)\n.*\\1\\'" (concat s1 "\n" s2))
- (- (match-end 1) (match-beginning 1))))
-
-(defun comint--common-quoted-suffix (s1 s2)
- ;; FIXME: Copied in pcomplete.el.
- "Find the common suffix between S1 and S2 where S1 is the expanded S2.
-S1 is expected to be the unquoted and expanded version of S2.
-Returns (PS1 . PS2), i.e. the shortest prefixes of S1 and S2, such that
-S1 = (concat PS1 SS1) and S2 = (concat PS2 SS2) and
-SS1 = (unquote SS2)."
- (let* ((cs (comint--common-suffix s1 s2))
- (ss1 (substring s1 (- (length s1) cs)))
- (qss1 (comint-quote-filename ss1))
- qc s2b)
- (if (and (not (equal ss1 qss1))
- (setq qc (comint-quote-filename (substring ss1 0 1)))
- (setq s2b (- (length s2) cs (length qc) -1))
- (>= s2b 0) ;bug#11158.
- (eq t (compare-strings s2 s2b (- (length s2) cs -1)
- qc nil nil)))
- ;; The difference found is just that one char is quoted in S2
- ;; but not in S1, keep looking before this difference.
- (comint--common-quoted-suffix
- (substring s1 0 (- (length s1) cs))
- (substring s2 0 s2b))
- (cons (substring s1 0 (- (length s1) cs))
- (substring s2 0 (- (length s2) cs))))))
-
-(defun comint--table-subvert (table s1 s2 &optional quote-fun unquote-fun)
- "Completion table that replaces the prefix S1 with S2 in STRING.
-The result is a completion table which completes strings of the
-form (concat S1 S) in the same way as TABLE completes strings of
-the form (concat S2 S)."
- (lambda (string pred action)
- (let* ((str (if (eq t (compare-strings string 0 (length s1) s1 nil nil
- completion-ignore-case))
- (let ((rest (substring string (length s1))))
- (concat s2 (if unquote-fun
- (funcall unquote-fun rest) rest)))))
- (res (if str (complete-with-action action table str pred))))
- (when res
- (cond
- ((and (eq (car-safe action) 'boundaries))
- (let ((beg (or (and (eq (car-safe res) 'boundaries) (cadr res)) 0)))
- (list* 'boundaries
- (max (length s1)
- ;; FIXME: Adjust because of quoting/unquoting.
- (+ beg (- (length s1) (length s2))))
- (and (eq (car-safe res) 'boundaries) (cddr res)))))
- ((stringp res)
- (if (eq t (compare-strings res 0 (length s2) s2 nil nil
- completion-ignore-case))
- (let ((rest (substring res (length s2))))
- (concat s1 (if quote-fun (funcall quote-fun rest) rest)))))
- ((eq action t)
- (let ((bounds (completion-boundaries str table pred "")))
- (if (>= (car bounds) (length s2))
- (if quote-fun (mapcar quote-fun res) res)
- (let ((re (concat "\\`"
- (regexp-quote (substring s2 (car bounds))))))
- (delq nil
- (mapcar (lambda (c)
- (if (string-match re c)
- (let ((str (substring c (match-end 0))))
- (if quote-fun
- (funcall quote-fun str) str))))
- res))))))
- ;; E.g. action=nil and it's the only completion.
- (res))))))
-
(defun comint-completion-file-name-table (string pred action)
(if (not (file-name-absolute-p string))
(completion-file-name-table string pred action)
@@ -3165,6 +3127,13 @@ the form (concat S2 S)."
res)))
(t (completion-file-name-table string pred action)))))
+(defvar comint-unquote-function #'comint--unquote-argument
+ "Function to use for completion of quoted data.
+See `completion-table-with-quoting' and `comint-requote-function'.")
+(defvar comint-requote-function #'comint--requote-argument
+ "Function to use for completion of quoted data.
+See `completion-table-with-quoting' and `comint-unquote-function'.")
+
(defun comint--complete-file-name-data ()
"Return the completion data for file name at point."
(let* ((filesuffix (cond ((not comint-completion-addsuffix) "")
@@ -3175,14 +3144,11 @@ the form (concat S2 S)."
(filename (comint--match-partial-filename))
(filename-beg (if filename (match-beginning 0) (point)))
(filename-end (if filename (match-end 0) (point)))
- (unquoted (if filename (comint--unquote&expand-filename filename) ""))
(table
- (let ((prefixes (comint--common-quoted-suffix
- unquoted filename)))
- (comint--table-subvert
- #'comint-completion-file-name-table
- (cdr prefixes) (car prefixes)
- #'comint-quote-filename #'comint-unquote-filename))))
+ (completion-table-with-quoting
+ #'comint-completion-file-name-table
+ comint-unquote-function
+ comint-requote-function)))
(nconc
(list
filename-beg filename-end
@@ -3390,7 +3356,7 @@ The process mark separates output, and input already sent,
from input that has not yet been sent."
(interactive)
(let ((proc (or (get-buffer-process (current-buffer))
- (error "Current buffer has no process"))))
+ (user-error "Current buffer has no process"))))
(goto-char (process-mark proc))
(when (called-interactively-p 'interactive)
(message "Point is now at the process mark"))))
@@ -3415,7 +3381,7 @@ the process mark is at the beginning of the accumulated input."
"Set the process mark at point."
(interactive)
(let ((proc (or (get-buffer-process (current-buffer))
- (error "Current buffer has no process"))))
+ (user-error "Current buffer has no process"))))
(set-marker (process-mark proc) (point))
(message "Process mark set")))
@@ -3767,14 +3733,6 @@ REGEXP-GROUP is the regular expression group in REGEXP to use."
(match-end regexp-group))
results))
results)))
-
-(dolist (x '("^Not at command line$"
- "^Empty input ring$"
- "^No history$"
- "^Not found$" ; Too common?
- "^Current buffer has no process$"))
- (add-to-list 'debug-ignored-errors x))
-
;; Converting process modes to use comint mode
;; ===========================================================================
diff --git a/lisp/completion.el b/lisp/completion.el
index 9c6cd60c96c..75f8920920c 100644
--- a/lisp/completion.el
+++ b/lisp/completion.el
@@ -1301,8 +1301,8 @@ String must be longer than `completion-prefix-min-length'."
(defun check-completion-length (string)
(if (< (length string) completion-min-length)
- (error "The string `%s' is too short to be saved as a completion"
- string)
+ (user-error "The string `%s' is too short to be saved as a completion"
+ string)
(list string)))
(defun add-completion (string &optional num-uses last-use-time)
@@ -2467,10 +2467,6 @@ if ARG is omitted or nil."
(defvaralias 'cmpl-syntax-table 'completion-syntax-table)
(defalias 'initialize-completions 'completion-initialize)
-(dolist (x '("^To complete, the point must be after a symbol at least [0-9]* character long\\.$"
- "^The string \".*\" is too short to be saved as a completion\\.$"))
- (add-to-list 'debug-ignored-errors x))
-
(provide 'completion)
;;; completion.el ends here
diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el
index 4ed72be06fb..e946279ee57 100644
--- a/lisp/cus-edit.el
+++ b/lisp/cus-edit.el
@@ -1,6 +1,6 @@
;;; cus-edit.el --- tools for customizing Emacs and Lisp packages
;;
-;; Copyright (C) 1996-1997, 1999-2012 Free Software Foundation, Inc.
+;; Copyright (C) 1996-1997, 1999-2012 Free Software Foundation, Inc.
;;
;; Author: Per Abrahamsen <abraham@dina.kvl.dk>
;; Maintainer: FSF
@@ -223,7 +223,7 @@
:group 'emacs)
(defgroup languages nil
- "Specialized modes for editing programming languages."
+ "Modes for editing programming languages."
:group 'programming)
(defgroup lisp nil
@@ -255,7 +255,7 @@
:group 'applications)
(defgroup news nil
- "Support for netnews reading and posting."
+ "Reading and posting to newsgroups."
:link '(custom-manual "(gnus)")
:group 'applications)
@@ -297,7 +297,7 @@
:group 'environment)
(defgroup unix nil
- "Front-ends/assistants for, or emulators of, UNIX features."
+ "Interfaces, assistants, and emulators for UNIX features."
:group 'environment)
(defgroup i18n nil
@@ -544,12 +544,6 @@ WIDGET is the widget to apply the filter entries of MENU on."
(erase-buffer)
(princ symbol (current-buffer))
(goto-char (point-min))
- ;; FIXME: Boolean variables are not predicates, so they shouldn't
- ;; end with `-p'. -stef
- ;; (when (and (eq (get symbol 'custom-type) 'boolean)
- ;; (re-search-forward "-p\\'" nil t))
- ;; (replace-match "" t t)
- ;; (goto-char (point-min)))
(if custom-unlispify-remove-prefixes
(let ((prefixes custom-prefix-list)
prefix)
@@ -732,26 +726,26 @@ groups after non-groups, if nil do not order groups at all."
;; `custom-buffer-create-internal' if `custom-buffer-verbose-help' is non-nil.
(defvar custom-commands
- '((" Set for current session " Custom-set t
- "Apply all settings in this buffer to the current session"
+ '((" Apply " Custom-set t
+ "Apply settings (for the current session only)"
"index"
"Apply")
- (" Save for future sessions " Custom-save
+ (" Apply and Save " Custom-save
(or custom-file user-init-file)
- "Apply all settings in this buffer and save them for future Emacs sessions."
+ "Apply settings and save for future sessions."
"save"
"Save")
- (" Undo edits " Custom-reset-current t
- "Restore all settings in this buffer to reflect their current values."
+ (" Undo Edits " Custom-reset-current t
+ "Restore customization buffer to reflect existing settings."
"refresh"
"Undo")
- (" Reset to saved " Custom-reset-saved t
- "Restore all settings in this buffer to their saved values (if any)."
+ (" Reset Customizations " Custom-reset-saved t
+ "Undo any settings applied only for the current session."
"undo"
"Reset")
- (" Erase customizations " Custom-reset-standard
+ (" Erase Customizations " Custom-reset-standard
(or custom-file user-init-file)
- "Un-customize all settings in this buffer and save them with standard values."
+ "Un-customize settings in this and future sessions."
"delete"
"Uncustomize")
(" Help for Customize " Custom-help t
@@ -766,9 +760,9 @@ groups after non-groups, if nil do not order groups at all."
(info "(emacs)Easy Customization"))
(defvar custom-reset-menu
- '(("Undo Edits" . Custom-reset-current)
- ("Reset to Saved" . Custom-reset-saved)
- ("Erase Customizations (use standard values)" . Custom-reset-standard))
+ '(("Undo Edits in Customization Buffer" . Custom-reset-current)
+ ("Revert This Session's Customizations" . Custom-reset-saved)
+ ("Erase Customizations" . Custom-reset-standard))
"Alist of actions for the `Reset' button.
The key is a string containing the name of the action, the value is a
Lisp function taking the widget as an element which will be called
@@ -901,7 +895,8 @@ making them as if they had never been customized at all."
(memq (widget-get widget :custom-state)
'(modified set changed saved rogue))
(widget-apply widget :custom-mark-to-reset-standard)))
- "Erase all customizations for settings in this buffer? " t)
+ "The settings will revert to their default values, in this
+and future sessions. Really erase customizations? " t)
(custom-reset-standard-save-and-update)))
;;; The Customize Commands
@@ -1136,7 +1131,7 @@ If OTHER-WINDOW is non-nil, display in another window."
;;;###autoload
(defun customize-option (symbol)
- "Customize SYMBOL, which must be a user option variable."
+ "Customize SYMBOL, which must be a user option."
(interactive (custom-variable-prompt))
(unless symbol
(error "No variable specified"))
@@ -1152,7 +1147,7 @@ If OTHER-WINDOW is non-nil, display in another window."
;;;###autoload
(defun customize-option-other-window (symbol)
- "Customize SYMBOL, which must be a user option variable.
+ "Customize SYMBOL, which must be a user option.
Show the buffer in another window, but don't select it."
(interactive (custom-variable-prompt))
(unless symbol
@@ -1206,9 +1201,10 @@ the official name of the package, such as MH-E or Gnus.")
;;;###autoload
(defun customize-changed-options (&optional since-version)
"Customize all settings whose meanings have changed in Emacs itself.
-This includes new user option variables and faces, and new
-customization groups, as well as older options and faces whose meanings
-or default values have changed since the previous major Emacs release.
+This includes new user options and faces, and new customization
+groups, as well as older options and faces whose meanings or
+default values have changed since the previous major Emacs
+release.
With argument SINCE-VERSION (a string), customize all settings
that were added or redefined since that version."
@@ -1258,8 +1254,8 @@ that were added or redefined since that version."
(if found
(custom-buffer-create (custom-sort-items found t 'first)
"*Customize Changed Options*")
- (error "No user option defaults have been changed since Emacs %s"
- since-version))))
+ (user-error "No user option defaults have been changed since Emacs %s"
+ since-version))))
(defun customize-package-emacs-version (symbol package-version)
"Return the Emacs version in which SYMBOL's meaning last changed.
@@ -1390,7 +1386,7 @@ suggest to customize that face, if it's customizable."
(default-value symbol))))
(push (list symbol 'custom-variable) found)))))
(if (not found)
- (error "No rogue user options")
+ (user-error "No rogue user options")
(custom-buffer-create (custom-sort-items found t nil)
"*Customize Rogue*"))))
;;;###autoload
@@ -1407,8 +1403,8 @@ suggest to customize that face, if it's customizable."
(get symbol 'saved-variable-comment))
(boundp symbol)
(push (list symbol 'custom-variable) found))))
- (if (not found )
- (error "No saved user options")
+ (if (not found)
+ (user-error "No saved user options")
(custom-buffer-create (custom-sort-items found t nil)
"*Customize Saved*"))))
@@ -1416,7 +1412,7 @@ suggest to customize that face, if it's customizable."
;;;###autoload
(defun customize-apropos (pattern &optional type)
- "Customize all loaded options, faces and groups matching PATTERN.
+ "Customize loaded options, faces and groups matching PATTERN.
PATTERN can be a word, a list of words (separated by spaces),
or a regexp (using some regexp special characters). If it is a word,
search for matches for that word as a substring. If it is a list of words,
@@ -1424,62 +1420,50 @@ search for matches for any two (or more) of those words.
If TYPE is `options', include only options.
If TYPE is `faces', include only faces.
-If TYPE is `groups', include only groups.
-If TYPE is t (interactively, with prefix arg), include variables
-that are not customizable options, as well as faces and groups
-\(but we recommend using `apropos-variable' instead)."
- (interactive (list (apropos-read-pattern "symbol") current-prefix-arg))
+If TYPE is `groups', include only groups."
+ (interactive (list (apropos-read-pattern "symbol") nil))
(require 'apropos)
+ (unless (memq type '(nil options faces groups))
+ (error "Invalid setting type %s" (symbol-name type)))
(apropos-parse-pattern pattern)
(let (found)
(mapatoms
`(lambda (symbol)
(when (string-match apropos-regexp (symbol-name symbol))
- ,(if (not (memq type '(faces options)))
+ ,(if (memq type '(nil groups))
'(if (get symbol 'custom-group)
(push (list symbol 'custom-group) found)))
- ,(if (not (memq type '(options groups)))
+ ,(if (memq type '(nil faces))
'(if (custom-facep symbol)
(push (list symbol 'custom-face) found)))
- ,(if (not (memq type '(groups faces)))
+ ,(if (memq type '(nil options))
`(if (and (boundp symbol)
(eq (indirect-variable symbol) symbol)
(or (get symbol 'saved-value)
- (custom-variable-p symbol)
- ,(if (not (memq type '(nil options)))
- '(get symbol 'variable-documentation))))
+ (custom-variable-p symbol)))
(push (list symbol 'custom-variable) found))))))
- (if (not found)
- (error "No %s matching %s"
- (if (eq type t)
- "items"
- (format "customizable %s"
- (if (memq type '(options faces groups))
- (symbol-name type)
- "items")))
- pattern)
- (custom-buffer-create
- (custom-sort-items found t custom-buffer-order-groups)
- "*Customize Apropos*"))))
+ (unless found
+ (error "No customizable %s matching %s" (symbol-name type) pattern))
+ (custom-buffer-create
+ (custom-sort-items found t custom-buffer-order-groups)
+ "*Customize Apropos*")))
;;;###autoload
-(defun customize-apropos-options (regexp &optional arg)
- "Customize all loaded customizable options matching REGEXP.
-With prefix ARG, include variables that are not customizable options
-\(but it is better to use `apropos-variable' if you want to find those)."
- (interactive "sCustomize options (regexp): \nP")
- (customize-apropos regexp (or arg 'options)))
+(defun customize-apropos-options (regexp &optional ignored)
+ "Customize all loaded customizable options matching REGEXP."
+ (interactive (list (apropos-read-pattern "options")))
+ (customize-apropos regexp 'options))
;;;###autoload
(defun customize-apropos-faces (regexp)
"Customize all loaded faces matching REGEXP."
- (interactive "sCustomize faces (regexp): \n")
+ (interactive (list (apropos-read-pattern "faces")))
(customize-apropos regexp 'faces))
;;;###autoload
(defun customize-apropos-groups (regexp)
"Customize all loaded groups matching REGEXP."
- (interactive "sCustomize groups (regexp): \n")
+ (interactive (list (apropos-read-pattern "groups")))
(customize-apropos regexp 'groups))
;;; Buffer.
@@ -1552,11 +1536,12 @@ that option."
(switch-to-buffer-other-window (custom-get-fresh-buffer name))
(custom-buffer-create-internal options description))
-(defcustom custom-reset-button-menu nil
+(defcustom custom-reset-button-menu t
"If non-nil, only show a single reset button in customize buffers.
This button will have a menu with all three reset operations."
:type 'boolean
- :group 'custom-buffer)
+ :group 'custom-buffer
+ :version "24.2")
(defcustom custom-buffer-verbose-help t
"If non-nil, include explanatory text in the customization buffer."
@@ -1606,13 +1591,12 @@ Otherwise use brackets."
(let ((init-file (or custom-file user-init-file)))
;; Insert verbose help at the top of the custom buffer.
(when custom-buffer-verbose-help
- (widget-insert (if init-file
- "To apply changes, use the Save or Set buttons."
- "Custom settings cannot be saved; maybe you started Emacs with `-q'.")
- "\nFor details, see ")
+ (unless init-file
+ (widget-insert "Custom settings cannot be saved; maybe you started Emacs with `-q'.\n"))
+ (widget-insert "For help using this buffer, see ")
(widget-create 'custom-manual
- :tag "Saving Customizations"
- "(emacs)Saving Customizations")
+ :tag "Easy Customization"
+ "(emacs)Easy Customization")
(widget-insert " in the ")
(widget-create 'custom-manual
:tag "Emacs manual"
@@ -1651,29 +1635,30 @@ or a regular expression.")
;; So now the buttons are always inserted in the buffer. (Bug#1326)
(if custom-buffer-verbose-help
(widget-insert "
- Operate on all settings in this buffer:\n"))
+Operate on all settings in this buffer:\n"))
(let ((button (lambda (tag action active help _icon _label)
(widget-insert " ")
(if (eval active)
(widget-create 'push-button :tag tag
:help-echo help :action action))))
(commands custom-commands))
- (apply button (pop commands)) ; Set for current session
- (apply button (pop commands)) ; Save for future sessions
(if custom-reset-button-menu
(progn
- (widget-insert " ")
(widget-create 'push-button
- :tag "Reset buffer"
+ :tag " Revert... "
:help-echo "Show a menu with reset operations."
:mouse-down-action 'ignore
- :action 'custom-reset))
+ :action 'custom-reset)
+ (apply button (pop commands)) ; Apply
+ (apply button (pop commands))) ; Apply and Save
+ (apply button (pop commands)) ; Apply
+ (apply button (pop commands)) ; Apply and Save
(widget-insert "\n")
- (apply button (pop commands)) ; Undo edits
- (apply button (pop commands)) ; Reset to saved
- (apply button (pop commands)) ; Erase customization
+ (apply button (pop commands)) ; Undo
+ (apply button (pop commands)) ; Reset
+ (apply button (pop commands)) ; Erase
(widget-insert " ")
- (pop commands) ; Help (omitted)
+ (pop commands) ; Help (omitted)
(apply button (pop commands)))) ; Exit
(widget-insert "\n\n"))
@@ -2475,15 +2460,15 @@ If INITIAL-STRING is non-nil, use that rather than \"Parent groups:\"."
"Return documentation of VARIABLE for use in Custom buffer.
Normally just return the docstring. But if VARIABLE automatically
becomes buffer local when set, append a message to that effect."
- (if (and (local-variable-if-set-p variable)
- (or (not (local-variable-p variable))
- (with-temp-buffer
- (local-variable-if-set-p variable))))
- (concat (documentation-property variable 'variable-documentation)
+ (format "%s%s" (documentation-property variable 'variable-documentation)
+ (if (and (local-variable-if-set-p variable)
+ (or (not (local-variable-p variable))
+ (with-temp-buffer
+ (local-variable-if-set-p variable))))
"\n
This variable automatically becomes buffer-local when set outside Custom.
-However, setting it through Custom sets the default value.")
- (documentation-property variable 'variable-documentation)))
+However, setting it through Custom sets the default value."
+ "")))
(define-widget 'custom-variable 'custom
"A widget for displaying a Custom variable.
@@ -2824,12 +2809,10 @@ If STATE is nil, the value is computed by `custom-variable-state'."
(lambda (widget)
(and (default-boundp (widget-value widget))
(memq (widget-get widget :custom-state) '(modified changed)))))
- ("Reset to Saved" custom-variable-reset-saved
+ ("Revert This Session's Customization" custom-variable-reset-saved
(lambda (widget)
- (and (or (get (widget-value widget) 'saved-value)
- (get (widget-value widget) 'saved-variable-comment))
- (memq (widget-get widget :custom-state)
- '(modified set changed rogue)))))
+ (memq (widget-get widget :custom-state)
+ '(modified set changed rogue))))
,@(when (or custom-file init-file-user)
'(("Erase Customization" custom-variable-reset-standard
(lambda (widget)
@@ -2896,7 +2879,7 @@ Optional EVENT is the location for the menu."
(comment (widget-value comment-widget))
val)
(cond ((eq state 'hidden)
- (error "Cannot set hidden variable"))
+ (user-error "Cannot set hidden variable"))
((setq val (widget-apply child :validate))
(goto-char (widget-get val :from))
(error "%s" (widget-get val :error)))
@@ -2938,7 +2921,7 @@ Optional EVENT is the location for the menu."
(comment (widget-value comment-widget))
val)
(cond ((eq state 'hidden)
- (error "Cannot set hidden variable"))
+ (user-error "Cannot set hidden variable"))
((setq val (widget-apply child :validate))
(goto-char (widget-get val :from))
(error "Saving %s: %s" symbol (widget-get val :error)))
@@ -2980,23 +2963,25 @@ Optional EVENT is the location for the menu."
(custom-variable-state-set-and-redraw widget))
(defun custom-variable-reset-saved (widget)
- "Restore the saved value for the variable being edited by WIDGET.
-This also updates the buffer to show that value.
-The value that was current before this operation
-becomes the backup value, so you can get it again."
+ "Restore the value of the variable being edited by WIDGET.
+If there is a saved value, restore it; otherwise reset to the
+uncustomized (themed or standard) value.
+
+Update the widget to show that value. The value that was current
+before this operation becomes the backup value."
(let* ((symbol (widget-value widget))
- (set (or (get symbol 'custom-set) 'set-default))
- (value (get symbol 'saved-value))
+ (saved-value (get symbol 'saved-value))
(comment (get symbol 'saved-variable-comment)))
- (cond ((or value comment)
- (put symbol 'variable-comment comment)
- (custom-variable-backup-value widget)
- (custom-push-theme 'theme-value symbol 'user 'set (car-safe value))
- (condition-case nil
- (funcall set symbol (eval (car value)))
- (error nil)))
- (t
- (error "No saved value for %s" symbol)))
+ (custom-variable-backup-value widget)
+ (if (not (or saved-value comment))
+ ;; If there is no saved value, remove the setting.
+ (custom-push-theme 'theme-value symbol 'user 'reset)
+ ;; Otherwise, apply the saved value.
+ (put symbol 'variable-comment comment)
+ (custom-push-theme 'theme-value symbol 'user 'set (car-safe saved-value))
+ (ignore-errors
+ (funcall (or (get symbol 'custom-set) 'set-default)
+ symbol (eval (car saved-value)))))
(put symbol 'customized-value nil)
(put symbol 'customized-variable-comment nil)
(widget-put widget :custom-state 'unknown)
@@ -3010,7 +2995,7 @@ redraw the widget immediately."
(let* ((symbol (widget-value widget)))
(if (get symbol 'standard-value)
(custom-variable-backup-value widget)
- (error "No standard setting known for %S" symbol))
+ (user-error "No standard setting known for %S" symbol))
(put symbol 'variable-comment nil)
(put symbol 'customized-value nil)
(put symbol 'customized-variable-comment nil)
@@ -3072,7 +3057,7 @@ to switch between two values."
(condition-case nil
(funcall set symbol (car value))
(error nil)))
- (error "No backup value for %s" symbol))
+ (user-error "No backup value for %s" symbol))
(put symbol 'customized-value (list (custom-quote (car value))))
(put symbol 'variable-comment comment)
(put symbol 'customized-variable-comment comment)
@@ -3620,10 +3605,9 @@ the present value is saved to its :shown-value property instead."
("Undo Edits" custom-redraw
(lambda (widget)
(memq (widget-get widget :custom-state) '(modified changed))))
- ("Reset to Saved" custom-face-reset-saved
+ ("Revert This Session's Customization" custom-face-reset-saved
(lambda (widget)
- (or (get (widget-value widget) 'saved-face)
- (get (widget-value widget) 'saved-face-comment))))
+ (memq (widget-get widget :custom-state) '(modified set changed))))
,@(when (or custom-file init-file-user)
'(("Erase Customization" custom-face-reset-standard
(lambda (widget)
@@ -3678,18 +3662,17 @@ This is one of `set', `saved', `changed', `themed', or `rogue'."
'changed))
((or (get face 'saved-face)
(get face 'saved-face-comment))
- (if (equal (get face 'saved-face-comment) comment)
- (cond
- ((eq 'user (caar (get face 'theme-face)))
- 'saved)
- ((eq 'changed (caar (get face 'theme-face)))
- 'changed)
- (t 'themed))
- 'changed))
+ (cond ((not (equal (get face 'saved-face-comment) comment))
+ 'changed)
+ ((eq 'user (caar (get face 'theme-face)))
+ 'saved)
+ ((eq 'changed (caar (get face 'theme-face)))
+ 'changed)
+ (t 'themed)))
((get face 'face-defface-spec)
- (if (equal comment nil)
- 'standard
- 'changed))
+ (cond (comment 'changed)
+ ((get face 'theme-face) 'themed)
+ (t 'standard)))
(t 'rogue))))
;; If the user called set-face-attribute to change the default for
;; new frames, this face is "set outside of Customize".
@@ -3779,24 +3762,26 @@ Optional EVENT is the location for the menu."
"22.1")
(defun custom-face-reset-saved (widget)
- "Restore WIDGET to the face's default attributes."
- (let* ((symbol (widget-value widget))
+ "Restore WIDGET to the face's default attributes.
+If there is a saved face, restore it; otherwise reset to the
+uncustomized (themed or standard) face."
+ (let* ((face (widget-value widget))
(child (car (widget-get widget :children)))
- (value (get symbol 'saved-face))
- (comment (get symbol 'saved-face-comment))
+ (saved-face (get face 'saved-face))
+ (comment (get face 'saved-face-comment))
(comment-widget (widget-get widget :comment-widget)))
- (unless (or value comment)
- (error "No saved value for this face"))
- (put symbol 'customized-face nil)
- (put symbol 'customized-face-comment nil)
- (custom-push-theme 'theme-face symbol 'user 'set value)
- (face-spec-set symbol value t)
- (put symbol 'face-comment comment)
- (widget-value-set child value)
+ (put face 'customized-face nil)
+ (put face 'customized-face-comment nil)
+ (custom-push-theme 'theme-face face 'user
+ (if saved-face 'set 'reset)
+ saved-face)
+ (face-spec-set face saved-face t)
+ (put face 'face-comment comment)
+ (widget-value-set child saved-face)
;; This call manages the comment visibility
(widget-value-set comment-widget (or comment ""))
(custom-face-state-set widget)
- (custom-redraw-magic widget)))
+ (custom-redraw widget)))
(defun custom-face-standard-value (widget)
(get (widget-value widget) 'face-defface-spec))
@@ -3810,7 +3795,7 @@ redraw the widget immediately."
(value (get symbol 'face-defface-spec))
(comment-widget (widget-get widget :comment-widget)))
(unless value
- (error "No standard setting for this face"))
+ (user-error "No standard setting for this face"))
(put symbol 'customized-face nil)
(put symbol 'customized-face-comment nil)
(custom-push-theme 'theme-face symbol 'user 'reset)
@@ -3940,8 +3925,6 @@ restoring it to the state of a face that has never been customized."
;;; The `custom-group' Widget.
(defcustom custom-group-tag-faces nil
- ;; In XEmacs, this ought to play games with font size.
- ;; Fixme: make it do so in Emacs.
"Face used for group tags.
The first member is used for level 1 groups, the second for level 2,
and so forth. The remaining group tags are shown with `custom-group-tag'."
@@ -3978,6 +3961,13 @@ and so forth. The remaining group tags are shown with `custom-group-tag'."
:group 'custom-faces)
(define-obsolete-face-alias 'custom-group-tag-face 'custom-group-tag "22.1")
+(defface custom-group-subtitle
+ `((t (:weight bold)))
+ "Face for the \"Subgroups:\" subtitle in Custom buffers."
+ :group 'custom-faces)
+
+(defvar custom-group-doc-align-col 20)
+
(define-widget 'custom-group 'custom
"Customize group."
:format "%v"
@@ -4043,11 +4033,9 @@ If GROUPS-ONLY non-nil, return only those members that are groups."
(custom-browse-insert-prefix prefix)
(push (widget-create-child-and-convert
widget 'custom-browse-visibility
- ;; :tag-glyph "plus"
:tag "+")
buttons)
(insert "-- ")
- ;; (widget-glyph-insert nil "-- " "horizontal")
(push (widget-create-child-and-convert
widget 'custom-browse-group-tag)
buttons)
@@ -4057,8 +4045,6 @@ If GROUPS-ONLY non-nil, return only those members that are groups."
(zerop (length members)))
(custom-browse-insert-prefix prefix)
(insert "[ ]-- ")
- ;; (widget-glyph-insert nil "[ ]" "empty")
- ;; (widget-glyph-insert nil "-- " "horizontal")
(push (widget-create-child-and-convert
widget 'custom-browse-group-tag)
buttons)
@@ -4136,7 +4122,8 @@ If GROUPS-ONLY non-nil, return only those members that are groups."
:action 'custom-toggle-parent
(not (eq state 'hidden)))
buttons))
- (insert " : ")
+ (if (>= (current-column) custom-group-doc-align-col)
+ (insert " "))
;; Create magic button.
(let ((magic (widget-create-child-and-convert
widget 'custom-magic nil)))
@@ -4146,7 +4133,8 @@ If GROUPS-ONLY non-nil, return only those members that are groups."
(widget-put widget :buttons buttons)
;; Insert documentation.
(if (and (eq custom-buffer-style 'links) (> level 1))
- (widget-put widget :documentation-indent 0))
+ (widget-put widget :documentation-indent
+ custom-group-doc-align-col))
(widget-add-documentation-string-button
widget :visibility-widget 'custom-visibility))
@@ -4224,25 +4212,34 @@ If GROUPS-ONLY non-nil, return only those members that are groups."
(count 0)
(reporter (make-progress-reporter
"Creating group entries..." 0 len))
+ (have-subtitle (and (not (eq symbol 'emacs))
+ (eq custom-buffer-order-groups 'last)))
+ prev-type
children)
- (setq children
- (mapcar
- (lambda (entry)
- (widget-insert "\n")
- (progress-reporter-update reporter (setq count (1+ count)))
- (let ((sym (nth 0 entry))
- (type (nth 1 entry)))
- (prog1
- (widget-create-child-and-convert
- widget type
- :group widget
- :tag (custom-unlispify-tag-name sym)
- :custom-prefixes custom-prefix-list
- :custom-level (1+ level)
- :value sym)
- (unless (eq (preceding-char) ?\n)
- (widget-insert "\n")))))
- members))
+
+ (dolist (entry members)
+ (unless (eq prev-type 'custom-group)
+ (widget-insert "\n"))
+ (progress-reporter-update reporter (setq count (1+ count)))
+ (let ((sym (nth 0 entry))
+ (type (nth 1 entry)))
+ (when (and have-subtitle (eq type 'custom-group))
+ (setq have-subtitle nil)
+ (widget-insert
+ (propertize "Subgroups:\n" 'face 'custom-group-subtitle)))
+ (setq prev-type type)
+ (push (widget-create-child-and-convert
+ widget type
+ :group widget
+ :tag (custom-unlispify-tag-name sym)
+ :custom-prefixes custom-prefix-list
+ :custom-level (1+ level)
+ :value sym)
+ children)
+ (unless (eq (preceding-char) ?\n)
+ (widget-insert "\n"))))
+
+ (setq children (nreverse children))
(mapc 'custom-magic-reset children)
(widget-put widget :children children)
(custom-group-state-update widget)
@@ -4267,7 +4264,7 @@ If GROUPS-ONLY non-nil, return only those members that are groups."
("Undo Edits" custom-group-reset-current
(lambda (widget)
(memq (widget-get widget :custom-state) '(modified))))
- ("Reset to Saved" custom-group-reset-saved
+ ("Revert This Session's Customizations" custom-group-reset-saved
(lambda (widget)
(memq (widget-get widget :custom-state) '(modified set))))
,@(when (or custom-file init-file-user)
@@ -4417,7 +4414,7 @@ if only the first line of the docstring is shown."))
;; sense.
(if no-error
nil
- (error "Saving settings from \"emacs -q\" would overwrite existing customizations"))
+ (user-error "Saving settings from \"emacs -q\" would overwrite existing customizations"))
(file-chase-links (or custom-file user-init-file))))
;; If recentf-mode is non-nil, this is defined.
@@ -4828,6 +4825,7 @@ If several parents are listed, go to the first of them."
(set (make-local-variable 'widget-link-suffix) ""))
(setq show-trailing-whitespace nil))
+(define-obsolete-variable-alias 'custom-mode-hook 'Custom-mode-hook "23.1")
(define-derived-mode Custom-mode nil "Custom"
"Major mode for editing customization buffers.
@@ -4876,20 +4874,8 @@ if that value is non-nil."
(Custom-mode))
(make-obsolete 'custom-mode 'Custom-mode "23.1")
(put 'custom-mode 'mode-class 'special)
-(define-obsolete-variable-alias 'custom-mode-hook 'Custom-mode-hook "23.1")
-(dolist (regexp
- '("^No user option defaults have been changed since Emacs "
- "^Invalid face:? "
- "^No \\(?:customized\\|rogue\\|saved\\) user options"
- "^No customizable items matching "
- "^There are unset changes"
- "^Cannot set hidden variable"
- "^No \\(?:saved\\|backup\\) value for "
- "^No standard setting known for "
- "^No standard setting for this face"
- "^Saving settings from \"emacs -q\" would overwrite existing customizations"))
- (add-to-list 'debug-ignored-errors regexp))
+(add-to-list 'debug-ignored-errors "^Invalid face:? ")
;;; The End.
diff --git a/lisp/cus-start.el b/lisp/cus-start.el
index 83973e4a534..3ea5f41db55 100644
--- a/lisp/cus-start.el
+++ b/lisp/cus-start.el
@@ -1,7 +1,7 @@
;;; cus-start.el --- define customization properties of builtins
-;;
-;; Copyright (C) 1997, 1999-2012 Free Software Foundation, Inc.
-;;
+
+;; Copyright (C) 1997, 1999-2012 Free Software Foundation, Inc.
+
;; Author: Per Abrahamsen <abraham@dina.kvl.dk>
;; Keywords: internal
;; Package: emacs
@@ -22,7 +22,7 @@
;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
;;; Commentary:
-;;
+
;; This file adds customize support for built-in variables.
;; While dumping Emacs, this file is loaded, but it only records
@@ -48,6 +48,7 @@
;; :tag - custom-tag property
(let ((all '(;; alloc.c
(gc-cons-threshold alloc integer)
+ (gc-cons-percentage alloc float)
(garbage-collection-messages alloc boolean)
;; buffer.c
(mode-line-format mode-line sexp) ;Hard to do right.
@@ -132,6 +133,7 @@ Leaving \"Default\" unchecked is equivalent with specifying a default of
(exec-path execute
(repeat (choice (const :tag "default directory" nil)
(directory :format "%v"))))
+ (exec-suffixes execute (repeat string))
;; charset.c
(charset-map-path installation
(repeat (directory :format "%v")))
@@ -174,6 +176,13 @@ Leaving \"Default\" unchecked is equivalent with specifying a default of
(inverse-video display boolean)
(visible-bell display boolean)
(no-redraw-on-reenter display boolean)
+
+ ;; dosfns.c
+ (dos-display-scancodes display boolean)
+ (dos-hyper-key keyboard integer)
+ (dos-super-key keyboard integer)
+ (dos-keypad-mode keyboard integer)
+
;; editfns.c
(user-full-name mail string)
;; eval.c
@@ -190,10 +199,12 @@ Leaving \"Default\" unchecked is equivalent with specifying a default of
(const :tag "always" t)))
(debug-ignored-errors debug (repeat (choice symbol regexp)))
(debug-on-quit debug boolean)
- ;; fileio.c
- (delete-by-moving-to-trash auto-save boolean "23.1")
+ (debug-on-signal debug boolean)
+ ;; fileio.c
+ (delete-by-moving-to-trash auto-save boolean "23.1")
(auto-save-visited-file-name auto-save boolean)
;; filelock.c
+ (create-lockfiles files boolean "24.2")
(temporary-file-directory
;; Darwin section added 24.1, does not seem worth :version bump.
files directory nil
@@ -227,6 +238,8 @@ Leaving \"Default\" unchecked is equivalent with specifying a default of
(use-dialog-box menu boolean "21.1")
(use-file-dialog menu boolean "22.1")
(focus-follows-mouse frames boolean "20.3")
+ ;; fontset.c
+ (vertical-centering-font-regexp display regexp)
;; frame.c
(default-frame-alist frames
(repeat (cons :format "%v"
@@ -269,9 +282,6 @@ Leaving \"Default\" unchecked is equivalent with specifying a default of
(const :tag "only shift-selection or mouse-drag" only)
(const :tag "off" nil))
"24.1")
- (suggest-key-bindings keyboard (choice (const :tag "off" nil)
- (integer :tag "time" 2)
- (other :tag "on")))
(debug-on-event debug
(choice (const :tag "None" nil)
(const :tag "When sent SIGUSR1" sigusr1)
@@ -422,6 +432,7 @@ since it could result in memory overflow and make Emacs crash."
(hscroll-margin windows integer "22.1")
(hscroll-step windows number "22.1")
(truncate-partial-width-windows display boolean "23.1")
+ (make-cursor-line-fully-visible windows boolean)
(mode-line-inverse-video mode-line boolean)
(mode-line-in-non-selected-windows mode-line boolean "22.1")
(line-number-display-limit display
@@ -452,10 +463,21 @@ since it could result in memory overflow and make Emacs crash."
(const :tag "System default" :value nil)) "23.3")
(tool-bar-max-label-size frames integer "23.3")
(auto-hscroll-mode scrolling boolean "21.1")
+ (void-text-area-pointer cursor
+ (choice
+ (const :tag "Standard (text pointer)" :value nil)
+ (const :tag "Arrow" :value arrow)
+ (const :tag "Text pointer" :value text)
+ (const :tag "Hand" :value hand)
+ (const :tag "Vertical dragger" :value vdrag)
+ (const :tag "Horizontal dragger" :value hdrag)
+ (const :tag "Same as mode line" :value modeline)
+ (const :tag "Hourglass" :value hourglass)))
(display-hourglass cursor boolean)
(hourglass-delay cursor number)
;; xfaces.c
+ (font-list-limit display integer)
(scalable-fonts-allowed display boolean "22.1")
;; xfns.c
(x-bitmap-file-path installation
@@ -527,6 +549,10 @@ since it could result in memory overflow and make Emacs crash."
;; the condition for loadup.el to preload tool-bar.el.
((string-match "tool-bar-" (symbol-name symbol))
(fboundp 'x-create-frame))
+ ((equal "vertical-centering-font-regexp"
+ (symbol-name symbol))
+ ;; Any function from fontset.c will do.
+ (fboundp 'new-fontset))
(t t))))
(if (not (boundp symbol))
;; If variables are removed from C code, give an error here!
diff --git a/lisp/custom.el b/lisp/custom.el
index 611d5688f30..50481f2aa7f 100644
--- a/lisp/custom.el
+++ b/lisp/custom.el
@@ -335,7 +335,7 @@ for more information."
;; expression is checked by the byte-compiler, and that
;; lexical-binding is obeyed, so quote the expression with
;; `lambda' rather than with `quote'.
- `(list (lambda () ,standard))
+ ``(funcall #',(lambda () ,standard))
`',standard)
,doc
,@args))
@@ -1048,6 +1048,7 @@ The optional argument DOC is a doc string describing the theme.
Any theme `foo' should be defined in a file called `foo-theme.el';
see `custom-make-theme-feature' for more information."
+ (declare (doc-string 2))
(let ((feature (custom-make-theme-feature theme)))
;; It is better not to use backquote in this file,
;; because that makes a bootstrapping problem
diff --git a/lisp/dabbrev.el b/lisp/dabbrev.el
index c5b370bfa61..ab886edac25 100644
--- a/lisp/dabbrev.el
+++ b/lisp/dabbrev.el
@@ -361,6 +361,13 @@ this list."
;;??? Do we want this?
;;;###autoload (define-key esc-map [?\C-/] 'dabbrev-completion)
+(defun dabbrev--ignore-case-p (abbrev)
+ (and (if (eq dabbrev-case-fold-search 'case-fold-search)
+ case-fold-search
+ dabbrev-case-fold-search)
+ (or (not dabbrev-upcase-means-case-search)
+ (string= abbrev (downcase abbrev)))))
+
;;;###autoload
(defun dabbrev-completion (&optional arg)
"Completion on current word.
@@ -381,12 +388,7 @@ then it searches *all* buffers."
(abbrev (dabbrev--abbrev-at-point))
(beg (progn (search-backward abbrev) (point)))
(end (progn (search-forward abbrev) (point)))
- (ignore-case-p
- (and (if (eq dabbrev-case-fold-search 'case-fold-search)
- case-fold-search
- dabbrev-case-fold-search)
- (or (not dabbrev-upcase-means-case-search)
- (string= abbrev (downcase abbrev)))))
+ (ignore-case-p (dabbrev--ignore-case-p abbrev))
(list 'uninitialized)
(table
(lambda (s p a)
@@ -404,10 +406,10 @@ then it searches *all* buffers."
(dabbrev--find-all-expansions abbrev ignore-case-p))
(completion-ignore-case ignore-case-p))
(or (consp completion-list)
- (error "No dynamic expansion for \"%s\" found%s"
- abbrev
- (if dabbrev--check-other-buffers
- "" " in this-buffer")))
+ (user-error "No dynamic expansion for \"%s\" found%s"
+ abbrev
+ (if dabbrev--check-other-buffers
+ "" " in this-buffer")))
(setq list
(cond
((not (and ignore-case-p dabbrev-case-replace))
@@ -514,11 +516,7 @@ See also `dabbrev-abbrev-char-regexp' and \\[dabbrev-completion]."
(setq expansion
(dabbrev--find-expansion
abbrev direction
- (and (if (eq dabbrev-case-fold-search 'case-fold-search)
- case-fold-search
- dabbrev-case-fold-search)
- (or (not dabbrev-upcase-means-case-search)
- (string= abbrev (downcase abbrev))))))))
+ (dabbrev--ignore-case-p abbrev)))))
(cond
((not expansion)
(dabbrev--reset-global-variables)
@@ -529,8 +527,8 @@ See also `dabbrev-abbrev-char-regexp' and \\[dabbrev-completion]."
(search-backward old)
(insert abbrev)
(delete-region (point) (+ (point) (length old)))))
- (error "No%s dynamic expansion for `%s' found"
- (if old " further" "") abbrev))
+ (user-error "No%s dynamic expansion for `%s' found"
+ (if old " further" "") abbrev))
(t
(if (not (or (eq dabbrev--last-buffer dabbrev--last-buffer-found)
(minibuffer-window-active-p (selected-window))))
@@ -587,7 +585,7 @@ all skip characters."
"Extract the symbol at point to serve as abbreviation."
;; Check for error
(if (bobp)
- (error "No possible abbreviation preceding point"))
+ (user-error "No possible abbreviation preceding point"))
;; Return abbrev at point
(save-excursion
;; Record the end of the abbreviation.
@@ -605,7 +603,7 @@ all skip characters."
"\\sw\\|\\s_")
nil t)
(forward-char 1)
- (error "No possible abbreviation preceding point"))))
+ (user-error "No possible abbreviation preceding point"))))
;; Now find the beginning of that one.
(dabbrev--goto-start-of-abbrev)
(buffer-substring-no-properties
@@ -820,11 +818,7 @@ RECORD-CASE-PATTERN, if non-nil, means set `dabbrev--last-case-pattern'
to record whether we upcased the expansion, downcased it, or did neither."
;;(undo-boundary)
(let ((use-case-replace
- (and (if (eq dabbrev-case-fold-search 'case-fold-search)
- case-fold-search
- dabbrev-case-fold-search)
- (or (not dabbrev-upcase-means-case-search)
- (string= abbrev (downcase abbrev)))
+ (and (dabbrev--ignore-case-p abbrev)
(if (eq dabbrev-case-replace 'case-replace)
case-replace
dabbrev-case-replace))))
@@ -980,11 +974,6 @@ Leaves point at the location of the start of the expansion."
(cons found-string dabbrev--last-table))
result)))))
-(dolist (mess '("^No dynamic expansion for .* found"
- "^No further dynamic expansion for .* found$"
- "^No possible abbreviation preceding point$"))
- (add-to-list 'debug-ignored-errors mess))
-
(provide 'dabbrev)
;;; dabbrev.el ends here
diff --git a/lisp/desktop.el b/lisp/desktop.el
index 674ce72dba3..f7a33f2b05d 100644
--- a/lisp/desktop.el
+++ b/lisp/desktop.el
@@ -145,6 +145,8 @@ backward compatibility.")
"Save status of Emacs when you exit."
:group 'frames)
+;; Maintained for backward compatibility
+(define-obsolete-variable-alias 'desktop-enable 'desktop-save-mode "22.1")
;;;###autoload
(define-minor-mode desktop-save-mode
"Toggle desktop saving (Desktop Save mode).
@@ -158,10 +160,6 @@ one session to another. See variable `desktop-save' and function
:global t
:group 'desktop)
-;; Maintained for backward compatibility
-(define-obsolete-variable-alias 'desktop-enable
- 'desktop-save-mode "22.1")
-
(defun desktop-save-mode-off ()
"Disable `desktop-save-mode'. Provided for use in hooks."
(desktop-save-mode 0))
diff --git a/lisp/dired-x.el b/lisp/dired-x.el
index b45a340706f..1012deccd3c 100644
--- a/lisp/dired-x.el
+++ b/lisp/dired-x.el
@@ -132,6 +132,8 @@ If nil, there is no maximum size."
:type '(choice (const :tag "no maximum" nil) integer)
:group 'dired-x)
+;; For backward compatibility
+(define-obsolete-variable-alias 'dired-omit-files-p 'dired-omit-mode "22.1")
(define-minor-mode dired-omit-mode
"Toggle omission of uninteresting files in Dired (Dired-Omit mode).
With a prefix argument ARG, enable Dired-Omit mode if ARG is
@@ -157,9 +159,6 @@ See Info node `(dired-x) Omitting Variables' for more information."
(put 'dired-omit-mode 'safe-local-variable 'booleanp)
-;; For backward compatibility
-(define-obsolete-variable-alias 'dired-omit-files-p 'dired-omit-mode "22.1")
-
(defcustom dired-omit-files "^\\.?#\\|^\\.$\\|^\\.\\.$"
"Filenames matching this regexp will not be displayed.
This only has effect when `dired-omit-mode' is t. See interactive function
diff --git a/lisp/dired.el b/lisp/dired.el
index 77fe9cb7614..465e485a996 100644
--- a/lisp/dired.el
+++ b/lisp/dired.el
@@ -670,31 +670,31 @@ Don't use that together with FILTER."
;; (dolist (ext completion-ignored-extensions)
;; (if (eq ?/ (aref ext (1- (length ext)))) (push ext cie)))
;; (setq cie (concat (regexp-opt cie "\\(?:") "\\'"))
-;; (lexical-let* ((default (and buffer-file-name
-;; (abbreviate-file-name buffer-file-name)))
-;; (cie cie)
-;; (completion-table
-;; ;; We need a mix of read-file-name and
-;; ;; read-directory-name so that completion to directories
-;; ;; is preferred, but if the user wants to enter a global
-;; ;; pattern, he can still use completion on filenames to
-;; ;; help him write the pattern.
-;; ;; Essentially, we want to use
-;; ;; (completion-table-with-predicate
-;; ;; 'read-file-name-internal 'file-directory-p nil)
-;; ;; but that doesn't work because read-file-name-internal
-;; ;; does not obey its `predicate' argument.
-;; (completion-table-in-turn
-;; (lambda (str pred action)
-;; (let ((read-file-name-predicate
-;; (lambda (f)
-;; (and (not (member f '("./" "../")))
-;; ;; Hack! Faster than file-directory-p!
-;; (eq (aref f (1- (length f))) ?/)
-;; (not (string-match cie f))))))
-;; (complete-with-action
-;; action 'read-file-name-internal str nil)))
-;; 'read-file-name-internal)))
+;; (let* ((default (and buffer-file-name
+;; (abbreviate-file-name buffer-file-name)))
+;; (cie cie)
+;; (completion-table
+;; ;; We need a mix of read-file-name and
+;; ;; read-directory-name so that completion to directories
+;; ;; is preferred, but if the user wants to enter a global
+;; ;; pattern, he can still use completion on filenames to
+;; ;; help him write the pattern.
+;; ;; Essentially, we want to use
+;; ;; (completion-table-with-predicate
+;; ;; 'read-file-name-internal 'file-directory-p nil)
+;; ;; but that doesn't work because read-file-name-internal
+;; ;; does not obey its `predicate' argument.
+;; (completion-table-in-turn
+;; (lambda (str pred action)
+;; (let ((read-file-name-predicate
+;; (lambda (f)
+;; (and (not (member f '("./" "../")))
+;; ;; Hack! Faster than file-directory-p!
+;; (eq (aref f (1- (length f))) ?/)
+;; (not (string-match cie f))))))
+;; (complete-with-action
+;; action 'read-file-name-internal str nil)))
+;; 'read-file-name-internal)))
;; (minibuffer-with-setup-hook
;; (lambda ()
;; (setq minibuffer-default default)
@@ -4200,7 +4200,7 @@ instead.
;;;***
;;;### (autoloads (dired-do-relsymlink dired-jump-other-window dired-jump)
-;;;;;; "dired-x" "dired-x.el" "2a39a8306a5541c304bc4ab602876f92")
+;;;;;; "dired-x" "dired-x.el" "d09d49d54080e60ad6ecee5573b4e517")
;;; Generated autoloads from dired-x.el
(autoload 'dired-jump "dired-x" "\
diff --git a/lisp/dirtrack.el b/lisp/dirtrack.el
index 4f6236b240e..5e825032741 100644
--- a/lisp/dirtrack.el
+++ b/lisp/dirtrack.el
@@ -179,6 +179,8 @@ and ends with a forward slash."
dir))
+(define-obsolete-function-alias 'dirtrack-toggle 'dirtrack-mode "23.1")
+(define-obsolete-variable-alias 'dirtrackp 'dirtrack-mode "23.1")
;;;###autoload
(define-minor-mode dirtrack-mode
"Toggle directory tracking in shell buffers (Dirtrack mode).
@@ -198,10 +200,10 @@ directory."
(add-hook 'comint-preoutput-filter-functions 'dirtrack nil t)
(remove-hook 'comint-preoutput-filter-functions 'dirtrack t)))
-(define-obsolete-function-alias 'dirtrack-toggle 'dirtrack-mode "23.1")
-(define-obsolete-variable-alias 'dirtrackp 'dirtrack-mode "23.1")
-
+(define-obsolete-function-alias 'dirtrack-debug-toggle 'dirtrack-debug-mode
+ "23.1")
+(define-obsolete-variable-alias 'dirtrack-debug 'dirtrack-debug-mode "23.1")
(define-minor-mode dirtrack-debug-mode
"Toggle Dirtrack debugging.
With a prefix argument ARG, enable Dirtrack debugging if ARG is
@@ -211,11 +213,6 @@ the mode if ARG is omitted or nil."
(if dirtrack-debug-mode
(display-buffer (get-buffer-create dirtrack-debug-buffer))))
-(define-obsolete-function-alias 'dirtrack-debug-toggle 'dirtrack-debug-mode
- "23.1")
-(define-obsolete-variable-alias 'dirtrack-debug 'dirtrack-debug-mode "23.1")
-
-
(defun dirtrack-debug-message (msg1 msg2)
"Insert strings at the end of `dirtrack-debug-buffer'."
(when dirtrack-debug-mode
diff --git a/lisp/doc-view.el b/lisp/doc-view.el
index 53e7811bad1..78b6610ff3c 100644
--- a/lisp/doc-view.el
+++ b/lisp/doc-view.el
@@ -960,13 +960,12 @@ Those files are saved in the directory given by the function
(odf
;; ODF files have to be converted to PDF before Ghostscript can
;; process it.
- (lexical-let
- ((pdf (expand-file-name "doc.pdf" doc-view-current-cache-dir))
- (opdf (expand-file-name (concat (file-name-sans-extension
- (file-name-nondirectory doc-view-buffer-file-name))
- ".pdf")
- doc-view-current-cache-dir))
- (png-file png-file))
+ (let ((pdf (expand-file-name "doc.pdf" doc-view-current-cache-dir))
+ (opdf (expand-file-name (concat (file-name-sans-extension
+ (file-name-nondirectory doc-view-buffer-file-name))
+ ".pdf")
+ doc-view-current-cache-dir))
+ (png-file png-file))
;; The unoconv tool only supports a output directory, but no
;; file name. It's named like the input file with the
;; extension replaced by pdf.
diff --git a/lisp/dos-fns.el b/lisp/dos-fns.el
index 074fd642d67..c317bf84db6 100644
--- a/lisp/dos-fns.el
+++ b/lisp/dos-fns.el
@@ -233,15 +233,15 @@ returned unaltered."
(add-hook 'before-init-hook 'dos-reevaluate-defcustoms)
+(define-obsolete-variable-alias
+ 'register-name-alist 'dos-register-name-alist "24.1")
+
(defvar dos-register-name-alist
'((ax . 0) (bx . 1) (cx . 2) (dx . 3) (si . 4) (di . 5)
(cflag . 6) (flags . 7)
(al . (0 . 0)) (bl . (1 . 0)) (cl . (2 . 0)) (dl . (3 . 0))
(ah . (0 . 1)) (bh . (1 . 1)) (ch . (2 . 1)) (dh . (3 . 1))))
-(define-obsolete-variable-alias
- 'register-name-alist 'dos-register-name-alist "24.1")
-
(defun dos-make-register ()
(make-vector 8 0))
diff --git a/lisp/dos-w32.el b/lisp/dos-w32.el
index 071c7b71263..f68af7a73be 100644
--- a/lisp/dos-w32.el
+++ b/lisp/dos-w32.el
@@ -38,9 +38,8 @@
(setq null-device "NUL")
;; For distinguishing file types based upon suffixes.
-(defvar file-name-buffer-file-type-alist
- '(
- ("[:/].*config.sys$" . nil) ; config.sys text
+(defcustom file-name-buffer-file-type-alist
+ '(("[:/].*config.sys$" . nil) ; config.sys text
("\\.\\(obj\\|exe\\|com\\|lib\\|sys\\|bin\\|ico\\|pif\\|class\\)$" . t)
; MS-Dos stuff
("\\.\\(dll\\|drv\\|386\\|vxd\\|fon\\|fnt\\|fot\\|ttf\\|grp\\)$" . t)
@@ -57,7 +56,10 @@
)
"Alist for distinguishing text files from binary files.
Each element has the form (REGEXP . TYPE), where REGEXP is matched
-against the file name, and TYPE is nil for text, t for binary.")
+against the file name, and TYPE is nil for text, t for binary."
+ :type '(repeat (cons regexp boolean))
+ :group 'dos-fns
+ :group 'w32)
;; Return the pair matching filename on file-name-buffer-file-type-alist,
;; or nil otherwise.
@@ -282,8 +284,11 @@ filesystem mounted on drive Z:, FILESYSTEM could be \"Z:\"."
;;; Support for printing under DOS/Windows, see lpr.el and ps-print.el.
-(defvar direct-print-region-use-command-dot-com t
- "Control whether command.com is used to print on Windows 9x.")
+(defcustom direct-print-region-use-command-dot-com t
+ "If non-nil, use command.com to print on Windows 9x."
+ :type 'boolean
+ :group 'dos-fns
+ :group 'w32)
;; Function to actually send data to the printer port.
;; Supports writing directly, and using various programs.
diff --git a/lisp/ebuff-menu.el b/lisp/ebuff-menu.el
index dcde6449d22..e973f45bc44 100644
--- a/lisp/ebuff-menu.el
+++ b/lisp/ebuff-menu.el
@@ -31,9 +31,6 @@
(require 'electric)
-;; this depends on the format of list-buffers (from src/buffer.c) and
-;; on stuff in lisp/buff-menu.el
-
(defvar electric-buffer-menu-mode-map
(let ((map (make-keymap)))
(fillarray (car (cdr map)) 'Electric-buffer-menu-undefined)
@@ -85,26 +82,39 @@
(define-key map [mouse-2] 'Electric-buffer-menu-mouse-select)
map))
+(put 'Electric-buffer-menu-quit :advertised-binding "\C-c\C-c")
+(put 'Electric-buffer-menu-select :advertised-binding " ")
+(put 'Helper-help :advertised-binding (char-to-string help-char))
+(put 'Helper-describe-bindings :advertised-binding "?")
+
(defvar electric-buffer-menu-mode-hook nil
- "Normal hook run by `electric-buffer-list'.")
+ "Normal hook run by `electric-buffer-menu-mode'.")
;;;###autoload
(defun electric-buffer-list (arg)
- "Pop up a buffer describing the set of Emacs buffers.
-Vaguely like ITS lunar select buffer; combining typeoutoid buffer
-listing with menuoid buffer selection.
-
-If the very next character typed is a space then the buffer list
-window disappears. Otherwise, one may move around in the buffer list
-window, marking buffers to be selected, saved or deleted.
-
-To exit and select a new buffer, type a space when the cursor is on
-the appropriate line of the buffer-list window. Other commands are
-much like those of `Buffer-menu-mode'.
+ "Pop up the Buffer Menu in an \"electric\" window.
+If you type SPC or RET (`Electric-buffer-menu-select'), that
+selects the buffer at point and quits the \"electric\" window.
+Otherwise, you can move around in the Buffer Menu, marking
+buffers to be selected, saved or deleted; these other commands
+are much like those of `Buffer-menu-mode'.
Run hooks in `electric-buffer-menu-mode-hook' on entry.
-\\{electric-buffer-menu-mode-map}"
+\\<electric-buffer-menu-mode-map>
+\\[keyboard-quit] or \\[Electric-buffer-menu-quit] -- exit buffer menu, returning to previous window and buffer
+ configuration. If the very first character typed is a space, it
+ also has this effect.
+\\[Electric-buffer-menu-select] -- select buffer of line point is on.
+ Also show buffers marked with m in other windows,
+ deletes buffers marked with \"D\", and saves those marked with \"S\".
+\\[Buffer-menu-mark] -- mark buffer to be displayed.
+\\[Buffer-menu-not-modified] -- clear modified-flag on that buffer.
+\\[Buffer-menu-save] -- mark that buffer to be saved.
+\\[Buffer-menu-delete] or \\[Buffer-menu-delete-backwards] -- mark that buffer to be deleted.
+\\[Buffer-menu-unmark] -- remove all kinds of marks from current line.
+\\[Electric-buffer-menu-mode-view-buffer] -- view buffer, returning when done.
+\\[Buffer-menu-backup-unmark] -- back up a line and remove marks."
(interactive "P")
(let (select buffer)
(save-window-excursion
@@ -113,15 +123,15 @@ Run hooks in `electric-buffer-menu-mode-hook' on entry.
(unwind-protect
(progn
(set-buffer buffer)
- (Electric-buffer-menu-mode)
+ (electric-buffer-menu-mode)
+ (goto-char (point-min))
+ (if (search-forward "\n." nil t)
+ (forward-char -1))
(electric-buffer-update-highlight)
(setq select
(catch 'electric-buffer-menu-select
- (message "<<< Press Return to bury the buffer list >>>")
- (if (eq (setq unread-command-events (list (read-event)))
- ?\s)
- (progn (setq unread-command-events nil)
- (throw 'electric-buffer-menu-select nil)))
+ (message "<<< Type SPC or RET to bury the buffer list >>>")
+ (setq unread-command-events (list (read-event)))
(let ((start-point (point))
(first (progn (goto-char (point-min))
(unless Buffer-menu-use-header-line
@@ -145,15 +155,16 @@ Run hooks in `electric-buffer-menu-mode-hook' on entry.
(Buffer-menu-mode)
(bury-buffer) ;Get rid of window, if dedicated.
(message "")))
- (if select
- (progn (set-buffer buffer)
- (let ((opoint (point-marker)))
- (Buffer-menu-execute)
- (goto-char (point-min))
- (if (prog1 (search-forward "\n>" nil t)
- (goto-char opoint) (set-marker opoint nil))
- (Buffer-menu-select)
- (switch-to-buffer (Buffer-menu-buffer t))))))))
+ (when select
+ (set-buffer buffer)
+ (let ((opoint (point-marker)))
+ (Buffer-menu-execute)
+ (goto-char (point-min))
+ (if (prog1 (search-forward "\n>" nil t)
+ (goto-char opoint)
+ (set-marker opoint nil))
+ (Buffer-menu-select)
+ (switch-to-buffer (Buffer-menu-buffer t)))))))
(defun electric-buffer-menu-looper (state condition)
(cond ((and condition
@@ -174,50 +185,27 @@ Run hooks in `electric-buffer-menu-mode-hook' on entry.
(defvar Helper-return-blurb)
-(put 'Electric-buffer-menu-mode 'mode-class 'special)
-(defun Electric-buffer-menu-mode ()
- "Major mode for editing a list of buffers.
-Each line describes one of the buffers in Emacs.
-Letters do not insert themselves; instead, they are commands.
-\\<electric-buffer-menu-mode-map>
-\\[keyboard-quit] or \\[Electric-buffer-menu-quit] -- exit buffer menu, returning to previous window and buffer
- configuration. If the very first character typed is a space, it
- also has this effect.
-\\[Electric-buffer-menu-select] -- select buffer of line point is on.
- Also show buffers marked with m in other windows,
- deletes buffers marked with \"D\", and saves those marked with \"S\".
-\\[Buffer-menu-mark] -- mark buffer to be displayed.
-\\[Buffer-menu-not-modified] -- clear modified-flag on that buffer.
-\\[Buffer-menu-save] -- mark that buffer to be saved.
-\\[Buffer-menu-delete] or \\[Buffer-menu-delete-backwards] -- mark that buffer to be deleted.
-\\[Buffer-menu-unmark] -- remove all kinds of marks from current line.
-\\[Electric-buffer-menu-mode-view-buffer] -- view buffer, returning when done.
-\\[Buffer-menu-backup-unmark] -- back up a line and remove marks.
+(define-derived-mode electric-buffer-menu-mode Buffer-menu-mode
+ "Electric Buffer Menu"
+ "Toggle Electric Buffer Menu mode in this buffer.
+With a prefix argument ARG, enable Long Lines mode if ARG is
+positive, and disable it otherwise. If called from Lisp, enable
+the mode if ARG is omitted or nil.
-\\{electric-buffer-menu-mode-map}
-
-Entry to this mode via command `electric-buffer-list' calls the value of
-`electric-buffer-menu-mode-hook'."
- (let ((saved header-line-format))
- (kill-all-local-variables)
- (setq header-line-format saved))
- (use-local-map electric-buffer-menu-mode-map)
- (setq mode-name "Electric Buffer Menu")
+Electric Buffer Menu mode is a minor mode which is automatically
+enabled and disabled by the \\[electric-buffer-list] command.
+See the documentation of `electric-buffer-list' for details."
(setq mode-line-buffer-identification "Electric Buffer List")
- (make-local-variable 'Helper-return-blurb)
- (setq Helper-return-blurb "return to buffer editing")
- (setq truncate-lines t)
- (setq buffer-read-only t)
- (setq major-mode 'Electric-buffer-menu-mode)
- (goto-char (point-min))
- (if (search-forward "\n." nil t) (forward-char -1))
- (run-mode-hooks 'electric-buffer-menu-mode-hook))
+ (set (make-local-variable 'Helper-return-blurb)
+ "return to buffer editing"))
+
+(define-obsolete-function-alias 'Electric-buffer-menu-mode
+ 'electric-buffer-menu-mode "24.2")
;; generally the same as Buffer-menu-mode-map
;; (except we don't indirect to global-map)
(put 'Electric-buffer-menu-undefined 'suppress-keymap t)
-
(defun Electric-buffer-menu-exit ()
(interactive)
(setq unread-command-events (listify-key-sequence (this-command-keys)))
@@ -251,15 +239,10 @@ Skip execution of select, save, and delete commands."
(interactive)
(ding)
(message "%s"
- (if (and (eq (key-binding "\C-c\C-c") 'Electric-buffer-menu-quit)
- (eq (key-binding " ") 'Electric-buffer-menu-select)
- (eq (key-binding (char-to-string help-char)) 'Helper-help)
- (eq (key-binding "?") 'Helper-describe-bindings))
- (substitute-command-keys "Type C-c C-c to exit, Space to select, \\[Helper-help] for help, ? for commands")
- (substitute-command-keys "\
+ (substitute-command-keys "\
Type \\[Electric-buffer-menu-quit] to exit, \
\\[Electric-buffer-menu-select] to select, \
-\\[Helper-help] for help, \\[Helper-describe-bindings] for commands.")))
+\\[Helper-help] for help, \\[Helper-describe-bindings] for commands."))
(sit-for 4))
(defun Electric-buffer-menu-mode-view-buffer ()
@@ -274,13 +257,13 @@ Return to Electric Buffer Menu when done."
(sit-for 4))))
(defvar electric-buffer-overlay nil)
+
(defun electric-buffer-update-highlight ()
- (when (eq major-mode 'Electric-buffer-menu-mode)
+ (when (derived-mode-p 'electric-buffer-menu-mode)
;; Make sure we have an overlay to use.
(or electric-buffer-overlay
- (progn
- (make-local-variable 'electric-buffer-overlay)
- (setq electric-buffer-overlay (make-overlay (point) (point)))))
+ (set (make-local-variable 'electric-buffer-overlay)
+ (make-overlay (point) (point))))
(move-overlay electric-buffer-overlay
(line-beginning-position)
(line-end-position))
diff --git a/lisp/emacs-lisp/byte-run.el b/lisp/emacs-lisp/byte-run.el
index dc7166bc2ea..7de3396f8ed 100644
--- a/lisp/emacs-lisp/byte-run.el
+++ b/lisp/emacs-lisp/byte-run.el
@@ -96,7 +96,7 @@ The return value of this function is not used."
;; This has a special byte-hunk-handler in bytecomp.el.
(defmacro defsubst (name arglist &rest body)
"Define an inline function. The syntax is just like that of `defun'."
- (declare (debug defun))
+ (declare (debug defun) (doc-string 3))
(or (memq (get name 'byte-optimizer)
'(nil byte-compile-inline-expand))
(error "`%s' is a primitive" name))
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el
index 93c6518d215..91db288feef 100644
--- a/lisp/emacs-lisp/bytecomp.el
+++ b/lisp/emacs-lisp/bytecomp.el
@@ -1002,12 +1002,14 @@ Each function's symbol gets added to `byte-compile-noruntime-functions'."
(defvar byte-compile-last-warned-form nil)
(defvar byte-compile-last-logged-file nil)
+(defvar byte-compile-root-dir nil
+ "Directory relative to which file names in error messages are written.")
;; This is used as warning-prefix for the compiler.
;; It is always called with the warnings buffer current.
(defun byte-compile-warning-prefix (level entry)
(let* ((inhibit-read-only t)
- (dir default-directory)
+ (dir (or byte-compile-root-dir default-directory))
(file (cond ((stringp byte-compile-current-file)
(format "%s:" (file-relative-name
byte-compile-current-file dir)))
@@ -2267,19 +2269,7 @@ list that represents a doc string reference.
(when (byte-compile-warning-enabled-p 'callargs)
(byte-compile-nogroup-warn form))
(push (nth 1 (nth 1 form)) byte-compile-bound-variables)
- ;; Don't compile the expression because it may be displayed to the user.
- ;; (when (eq (car-safe (nth 2 form)) 'quote)
- ;; ;; (nth 2 form) is meant to evaluate to an expression, so if we have the
- ;; ;; final value already, we can byte-compile it.
- ;; (setcar (cdr (nth 2 form))
- ;; (byte-compile-top-level (cadr (nth 2 form)) nil 'file)))
- (let ((tail (nthcdr 4 form)))
- (while tail
- (unless (keywordp (car tail)) ;No point optimizing keywords.
- ;; Compile the keyword arguments.
- (setcar tail (byte-compile-top-level (car tail) nil 'file)))
- (setq tail (cdr tail))))
- form)
+ (byte-compile-keep-pending form))
(put 'require 'byte-hunk-handler 'byte-compile-file-form-require)
(defun byte-compile-file-form-require (form)
@@ -4527,29 +4517,30 @@ already up-to-date."
(kill-emacs (if error 1 0))))
(defun batch-byte-compile-file (file)
- (if debug-on-error
- (byte-compile-file file)
- (condition-case err
- (byte-compile-file file)
- (file-error
- (message (if (cdr err)
- ">>Error occurred processing %s: %s (%s)"
- ">>Error occurred processing %s: %s")
- file
- (get (car err) 'error-message)
- (prin1-to-string (cdr err)))
- (let ((destfile (byte-compile-dest-file file)))
- (if (file-exists-p destfile)
- (delete-file destfile)))
- nil)
- (error
- (message (if (cdr err)
- ">>Error occurred processing %s: %s (%s)"
- ">>Error occurred processing %s: %s")
- file
- (get (car err) 'error-message)
- (prin1-to-string (cdr err)))
- nil))))
+ (let ((byte-compile-root-dir (or byte-compile-root-dir default-directory)))
+ (if debug-on-error
+ (byte-compile-file file)
+ (condition-case err
+ (byte-compile-file file)
+ (file-error
+ (message (if (cdr err)
+ ">>Error occurred processing %s: %s (%s)"
+ ">>Error occurred processing %s: %s")
+ file
+ (get (car err) 'error-message)
+ (prin1-to-string (cdr err)))
+ (let ((destfile (byte-compile-dest-file file)))
+ (if (file-exists-p destfile)
+ (delete-file destfile)))
+ nil)
+ (error
+ (message (if (cdr err)
+ ">>Error occurred processing %s: %s (%s)"
+ ">>Error occurred processing %s: %s")
+ file
+ (get (car err) 'error-message)
+ (prin1-to-string (cdr err)))
+ nil)))))
(defun byte-compile-refresh-preloaded ()
"Reload any Lisp file that was changed since Emacs was dumped.
diff --git a/lisp/emacs-lisp/cconv.el b/lisp/emacs-lisp/cconv.el
index b6b6a78a9bb..3ce0eadab55 100644
--- a/lisp/emacs-lisp/cconv.el
+++ b/lisp/emacs-lisp/cconv.el
@@ -639,7 +639,9 @@ and updates the data stored in ENV."
(cconv-analyse-form (cadr forms) env)
(setq forms (cddr forms))))
- (`((lambda . ,_) . ,_) ; first element is lambda expression
+ (`((lambda . ,_) . ,_) ; First element is lambda expression.
+ (byte-compile-log-warning
+ "Use of deprecated ((lambda ...) ...) form" t :warning)
(dolist (exp `((function ,(car form)) . ,(cdr form)))
(cconv-analyse-form exp env)))
diff --git a/lisp/emacs-lisp/chart.el b/lisp/emacs-lisp/chart.el
index 2e3abb2e9d3..74087014d69 100644
--- a/lisp/emacs-lisp/chart.el
+++ b/lisp/emacs-lisp/chart.el
@@ -62,8 +62,8 @@
(require 'eieio)
;;; Code:
-(defvar chart-mode-map (make-sparse-keymap) "Keymap used in chart mode.")
(define-obsolete-variable-alias 'chart-map 'chart-mode-map "24.1")
+(defvar chart-mode-map (make-sparse-keymap) "Keymap used in chart mode.")
(defvar chart-local-object nil
"Local variable containing the locally displayed chart object.")
diff --git a/lisp/emacs-lisp/check-declare.el b/lisp/emacs-lisp/check-declare.el
index 3135b9b5827..d4213899ef6 100644
--- a/lisp/emacs-lisp/check-declare.el
+++ b/lisp/emacs-lisp/check-declare.el
@@ -1,6 +1,6 @@
;;; check-declare.el --- Check declare-function statements
-;; Copyright (C) 2007-2012 Free Software Foundation, Inc.
+;; Copyright (C) 2007-2012 Free Software Foundation, Inc.
;; Author: Glenn Morris <rgm@gnu.org>
;; Keywords: lisp, tools, maint
@@ -28,7 +28,7 @@
;; checks that all such statements in a file or directory are accurate.
;; The entry points are `check-declare-file' and `check-declare-directory'.
-;; For more information, see Info node `elisp(Declaring Functions)'.
+;; For more information, see Info node `(elisp)Declaring Functions'.
;;; TODO:
diff --git a/lisp/emacs-lisp/checkdoc.el b/lisp/emacs-lisp/checkdoc.el
index 7a9a33fc2cc..ee8cbd2c3bc 100644
--- a/lisp/emacs-lisp/checkdoc.el
+++ b/lisp/emacs-lisp/checkdoc.el
@@ -916,7 +916,7 @@ is the starting location. If this is nil, `point-min' is used instead."
(progn
(goto-char wrong)
(if (not take-notes)
- (error "%s" (checkdoc-error-text msg)))))
+ (user-error "%s" (checkdoc-error-text msg)))))
(checkdoc-show-diagnostics)
(if (called-interactively-p 'interactive)
(message "No style warnings."))))
@@ -949,7 +949,7 @@ if there is one."
(e (checkdoc-file-comments-engine))
(checkdoc-generate-compile-warnings-flag
(or take-notes checkdoc-generate-compile-warnings-flag)))
- (if e (error "%s" (checkdoc-error-text e)))
+ (if e (user-error "%s" (checkdoc-error-text e)))
(checkdoc-show-diagnostics)
e))
@@ -987,7 +987,7 @@ Optional argument TAKE-NOTES causes all errors to be logged."
(if (not (called-interactively-p 'interactive))
e
(if e
- (error "%s" (checkdoc-error-text e))
+ (user-error "%s" (checkdoc-error-text e))
(checkdoc-show-diagnostics)))
(goto-char p))
(if (called-interactively-p 'interactive)
@@ -1027,19 +1027,14 @@ space at the end of each line."
(car (memq checkdoc-spellcheck-documentation-flag
'(defun t))))
(beg (save-excursion (beginning-of-defun) (point)))
- (end (save-excursion (end-of-defun) (point)))
- (msg (checkdoc-this-string-valid)))
- (if msg (if no-error
- (message "%s" (checkdoc-error-text msg))
- (error "%s" (checkdoc-error-text msg)))
- (setq msg (checkdoc-message-text-search beg end))
- (if msg (if no-error
- (message "%s" (checkdoc-error-text msg))
- (error "%s" (checkdoc-error-text msg)))
- (setq msg (checkdoc-rogue-space-check-engine beg end))
- (if msg (if no-error
- (message "%s" (checkdoc-error-text msg))
- (error "%s" (checkdoc-error-text msg))))))
+ (end (save-excursion (end-of-defun) (point))))
+ (dolist (fun (list #'checkdoc-this-string-valid
+ (lambda () (checkdoc-message-text-search beg end))
+ (lambda () (checkdoc-rogue-space-check-engine beg end))))
+ (let ((msg (funcall fun)))
+ (if msg (if no-error
+ (message "%s" (checkdoc-error-text msg))
+ (user-error "%s" (checkdoc-error-text msg))))))
(if (called-interactively-p 'interactive)
(message "Checkdoc: done."))))))
@@ -2644,12 +2639,6 @@ function called to create the messages."
(custom-add-option 'emacs-lisp-mode-hook 'checkdoc-minor-mode)
-(add-to-list 'debug-ignored-errors
- "Argument `.*' should appear (as .*) in the doc string")
-(add-to-list 'debug-ignored-errors
- "Lisp symbol `.*' should appear in quotes")
-(add-to-list 'debug-ignored-errors "Disambiguate .* by preceding .*")
-
(provide 'checkdoc)
;;; checkdoc.el ends here
diff --git a/lisp/emacs-lisp/cl-extra.el b/lisp/emacs-lisp/cl-extra.el
index 9a3d8cf705b..420480d16ea 100644
--- a/lisp/emacs-lisp/cl-extra.el
+++ b/lisp/emacs-lisp/cl-extra.el
@@ -434,7 +434,7 @@ With two arguments, return rounding and remainder of their quotient."
(defun random* (lim &optional state)
"Return a random nonnegative number less than LIM, an integer or float.
Optional second arg STATE is a random-state object."
- (or state (setq state *random-state*))
+ (or state (setq state cl--random-state))
;; Inspired by "ran3" from Numerical Recipes. Additive congruential method.
(let ((vec (aref state 3)))
(if (integerp vec)
@@ -457,9 +457,9 @@ Optional second arg STATE is a random-state object."
;;;###autoload
(defun make-random-state (&optional state)
- "Return a copy of random-state STATE, or of `*random-state*' if omitted.
+ "Return a copy of random-state STATE, or of the internal state if omitted.
If STATE is t, return a new state object seeded from the time of day."
- (cond ((null state) (make-random-state *random-state*))
+ (cond ((null state) (make-random-state cl--random-state))
((vectorp state) (cl-copy-tree state t))
((integerp state) (vector 'cl-random-state-tag -1 30 state))
(t (make-random-state (cl-random-time)))))
diff --git a/lisp/emacs-lisp/cl-loaddefs.el b/lisp/emacs-lisp/cl-loaddefs.el
index 9e0099bb649..a9380619e6a 100644
--- a/lisp/emacs-lisp/cl-loaddefs.el
+++ b/lisp/emacs-lisp/cl-loaddefs.el
@@ -10,7 +10,7 @@
;;;;;; ceiling* floor* isqrt lcm gcd cl-progv-before cl-set-frame-visible-p
;;;;;; cl-map-overlays cl-map-intervals cl-map-keymap-recursively
;;;;;; notevery notany every some mapcon mapcan mapl maplist map
-;;;;;; cl-mapcar-many equalp coerce) "cl-extra" "cl-extra.el" "5a8a7f7ec2dc453113b8cbda577f2acb")
+;;;;;; cl-mapcar-many equalp coerce) "cl-extra" "cl-extra.el" "1a3a04c6a0286373093bea4b9bcf2e91")
;;; Generated autoloads from cl-extra.el
(autoload 'coerce "cl-extra" "\
@@ -169,7 +169,7 @@ Optional second arg STATE is a random-state object.
\(fn LIM &optional STATE)" nil nil)
(autoload 'make-random-state "cl-extra" "\
-Return a copy of random-state STATE, or of `*random-state*' if omitted.
+Return a copy of random-state STATE, or of the internal state if omitted.
If STATE is t, return a new state object seeded from the time of day.
\(fn &optional STATE)" nil nil)
@@ -286,7 +286,7 @@ This also does some trivial optimizations to make the form prettier.
;;;;;; flet progv psetq do-all-symbols do-symbols dotimes dolist
;;;;;; do* do loop return-from return block etypecase typecase ecase
;;;;;; case load-time-value eval-when destructuring-bind function*
-;;;;;; defmacro* defun* gentemp gensym) "cl-macs" "cl-macs.el" "91b45885535a73dd8015973cb8c988e1")
+;;;;;; defmacro* defun* gentemp gensym) "cl-macs" "cl-macs.el" "c383ef0fa5f6d28796cd8e9cf65e1c5d")
;;; Generated autoloads from cl-macs.el
(autoload 'gensym "cl-macs" "\
@@ -308,6 +308,10 @@ and BODY is implicitly surrounded by (block NAME ...).
\(fn NAME ARGLIST [DOCSTRING] BODY...)" nil (quote macro))
+(put 'defun* 'lisp-indent-function '2)
+
+(put 'defun* 'doc-string-elt '3)
+
(autoload 'defmacro* "cl-macs" "\
Define NAME as a macro.
Like normal `defmacro', except ARGLIST allows full Common Lisp conventions,
@@ -315,6 +319,10 @@ and BODY is implicitly surrounded by (block NAME ...).
\(fn NAME ARGLIST [DOCSTRING] BODY...)" nil (quote macro))
+(put 'defmacro* 'lisp-indent-function '2)
+
+(put 'defmacro* 'doc-string-elt '3)
+
(autoload 'function* "cl-macs" "\
Introduce a function.
Like normal `function', except that if argument is a lambda form,
@@ -327,6 +335,8 @@ its argument list allows full Common Lisp conventions.
\(fn ARGS EXPR &rest BODY)" nil (quote macro))
+(put 'destructuring-bind 'lisp-indent-function '2)
+
(autoload 'eval-when "cl-macs" "\
Control when BODY is evaluated.
If `compile' is in WHEN, BODY is evaluated when compiled at top-level.
@@ -335,6 +345,8 @@ If `eval' is in WHEN, BODY is evaluated when interpreted or at non-top-level.
\(fn (WHEN...) BODY...)" nil (quote macro))
+(put 'eval-when 'lisp-indent-function '1)
+
(autoload 'load-time-value "cl-macs" "\
Like `progn', but evaluates the body at load time.
The result of the body appears to the compiler as a quoted constant.
@@ -352,12 +364,16 @@ Key values are compared by `eql'.
\(fn EXPR (KEYLIST BODY...)...)" nil (quote macro))
+(put 'case 'lisp-indent-function '1)
+
(autoload 'ecase "cl-macs" "\
Like `case', but error if no case fits.
`otherwise'-clauses are not allowed.
\(fn EXPR (KEYLIST BODY...)...)" nil (quote macro))
+(put 'ecase 'lisp-indent-function '1)
+
(autoload 'typecase "cl-macs" "\
Evals EXPR, chooses among clauses on that value.
Each clause looks like (TYPE BODY...). EXPR is evaluated and, if it
@@ -367,12 +383,16 @@ final clause, and matches if no other keys match.
\(fn EXPR (TYPE BODY...)...)" nil (quote macro))
+(put 'typecase 'lisp-indent-function '1)
+
(autoload 'etypecase "cl-macs" "\
Like `typecase', but error if no case fits.
`otherwise'-clauses are not allowed.
\(fn EXPR (TYPE BODY...)...)" nil (quote macro))
+(put 'etypecase 'lisp-indent-function '1)
+
(autoload 'block "cl-macs" "\
Define a lexically-scoped block named NAME.
NAME may be any symbol. Code inside the BODY forms can call `return-from'
@@ -385,6 +405,8 @@ called from BODY.
\(fn NAME &rest BODY)" nil (quote macro))
+(put 'block 'lisp-indent-function '1)
+
(autoload 'return "cl-macs" "\
Return from the block named nil.
This is equivalent to `(return-from nil RESULT)'.
@@ -400,6 +422,8 @@ This is compatible with Common Lisp, but note that `defun' and
\(fn NAME &optional RESULT)" nil (quote macro))
+(put 'return-from 'lisp-indent-function '1)
+
(autoload 'loop "cl-macs" "\
The Common Lisp `loop' macro.
Valid clauses are:
@@ -421,11 +445,15 @@ The Common Lisp `do' loop.
\(fn ((VAR INIT [STEP])...) (END-TEST [RESULT...]) BODY...)" nil (quote macro))
+(put 'do 'lisp-indent-function '2)
+
(autoload 'do* "cl-macs" "\
The Common Lisp `do*' loop.
\(fn ((VAR INIT [STEP])...) (END-TEST [RESULT...]) BODY...)" nil (quote macro))
+(put 'do* 'lisp-indent-function '2)
+
(autoload 'dolist "cl-macs" "\
Loop over a list.
Evaluate BODY with VAR bound to each `car' from LIST, in turn.
@@ -449,11 +477,15 @@ from OBARRAY.
\(fn (VAR [OBARRAY [RESULT]]) BODY...)" nil (quote macro))
+(put 'do-symbols 'lisp-indent-function '1)
+
(autoload 'do-all-symbols "cl-macs" "\
\(fn SPEC &rest BODY)" nil (quote macro))
+(put 'do-all-symbols 'lisp-indent-function '1)
+
(autoload 'psetq "cl-macs" "\
Set SYMs to the values VALs in parallel.
This is like `setq', except that all VAL forms are evaluated (in order)
@@ -471,6 +503,8 @@ a `let' form, except that the list of symbols can be computed at run-time.
\(fn SYMBOLS VALUES &rest BODY)" nil (quote macro))
+(put 'progv 'lisp-indent-function '2)
+
(autoload 'flet "cl-macs" "\
Make temporary function definitions.
This is an analogue of `let' that operates on the function cell of FUNC
@@ -480,6 +514,8 @@ go back to their previous definitions, or lack thereof).
\(fn ((FUNC ARGLIST BODY...) ...) FORM...)" nil (quote macro))
+(put 'flet 'lisp-indent-function '1)
+
(autoload 'labels "cl-macs" "\
Make temporary function bindings.
This is like `flet', except the bindings are lexical instead of dynamic.
@@ -487,12 +523,16 @@ Unlike `flet', this macro is fully compliant with the Common Lisp standard.
\(fn ((FUNC ARGLIST BODY...) ...) FORM...)" nil (quote macro))
+(put 'labels 'lisp-indent-function '1)
+
(autoload 'macrolet "cl-macs" "\
Make temporary macro definitions.
This is like `flet', but for macros instead of functions.
\(fn ((NAME ARGLIST BODY...) ...) FORM...)" nil (quote macro))
+(put 'macrolet 'lisp-indent-function '1)
+
(autoload 'symbol-macrolet "cl-macs" "\
Make symbol macro definitions.
Within the body FORMs, references to the variable NAME will be replaced
@@ -500,6 +540,8 @@ by EXPANSION, and (setq NAME ...) will act like (setf EXPANSION ...).
\(fn ((NAME EXPANSION) ...) FORM...)" nil (quote macro))
+(put 'symbol-macrolet 'lisp-indent-function '1)
+
(autoload 'lexical-let "cl-macs" "\
Like `let', but lexically scoped.
The main visible difference is that lambdas inside BODY will create
@@ -507,6 +549,8 @@ lexical closures as in Common Lisp.
\(fn BINDINGS BODY)" nil (quote macro))
+(put 'lexical-let 'lisp-indent-function '1)
+
(autoload 'lexical-let* "cl-macs" "\
Like `let*', but lexically scoped.
The main visible difference is that lambdas inside BODY, and in
@@ -516,6 +560,8 @@ Common Lisp.
\(fn BINDINGS BODY)" nil (quote macro))
+(put 'lexical-let* 'lisp-indent-function '1)
+
(autoload 'multiple-value-bind "cl-macs" "\
Collect multiple return values.
FORM must return a list; the BODY is then executed with the first N elements
@@ -526,6 +572,8 @@ a synonym for (list A B C).
\(fn (SYM...) FORM BODY)" nil (quote macro))
+(put 'multiple-value-bind 'lisp-indent-function '2)
+
(autoload 'multiple-value-setq "cl-macs" "\
Collect multiple return values.
FORM must return a list; the first N elements of this list are stored in
@@ -535,6 +583,8 @@ values. For compatibility, (values A B C) is a synonym for (list A B C).
\(fn (SYM...) FORM)" nil (quote macro))
+(put 'multiple-value-setq 'lisp-indent-function '1)
+
(autoload 'locally "cl-macs" "\
@@ -545,6 +595,8 @@ values. For compatibility, (values A B C) is a synonym for (list A B C).
\(fn TYPE FORM)" nil (quote macro))
+(put 'the 'lisp-indent-function '1)
+
(autoload 'declare "cl-macs" "\
Declare SPECS about the current function while compiling.
For instance
@@ -649,6 +701,8 @@ the PLACE is not modified before executing BODY.
\(fn ((PLACE VALUE) ...) BODY...)" nil (quote macro))
+(put 'letf 'lisp-indent-function '1)
+
(autoload 'letf* "cl-macs" "\
Temporarily bind to PLACEs.
This is the analogue of `let*', but with generalized variables (in the
@@ -661,6 +715,8 @@ the PLACE is not modified before executing BODY.
\(fn ((PLACE VALUE) ...) BODY...)" nil (quote macro))
+(put 'letf* 'lisp-indent-function '1)
+
(autoload 'callf "cl-macs" "\
Set PLACE to (FUNC PLACE ARGS...).
FUNC should be an unquoted function name. PLACE may be a symbol,
@@ -668,12 +724,16 @@ or any generalized variable allowed by `setf'.
\(fn FUNC PLACE ARGS...)" nil (quote macro))
+(put 'callf 'lisp-indent-function '2)
+
(autoload 'callf2 "cl-macs" "\
Set PLACE to (FUNC ARG1 PLACE ARGS...).
Like `callf', but PLACE is the second argument of FUNC, not the first.
\(fn FUNC ARG1 PLACE ARGS...)" nil (quote macro))
+(put 'callf2 'lisp-indent-function '3)
+
(autoload 'define-modify-macro "cl-macs" "\
Define a `setf'-like modify macro.
If NAME is called, it combines its PLACE argument with the other arguments
@@ -699,6 +759,8 @@ value, that slot cannot be set via `setf'.
\(fn NAME SLOTS...)" nil (quote macro))
+(put 'defstruct 'doc-string-elt '2)
+
(autoload 'cl-struct-setf-expander "cl-macs" "\
@@ -710,6 +772,8 @@ The type name can then be used in `typecase', `check-type', etc.
\(fn NAME ARGLIST &rest BODY)" nil (quote macro))
+(put 'deftype 'doc-string-elt '3)
+
(autoload 'typep "cl-macs" "\
Check that OBJECT is of type TYPE.
TYPE is a Common Lisp-style type specifier.
@@ -764,13 +828,13 @@ surrounded by (block NAME ...).
;;;;;; nsubst subst-if-not subst-if subsetp nset-exclusive-or set-exclusive-or
;;;;;; nset-difference set-difference nintersection intersection
;;;;;; nunion union rassoc-if-not rassoc-if rassoc* assoc-if-not
-;;;;;; assoc-if assoc* cl-adjoin member-if-not member-if member*
+;;;;;; assoc-if assoc* cl--adjoin member-if-not member-if member*
;;;;;; merge stable-sort sort* search mismatch count-if-not count-if
;;;;;; count position-if-not position-if position find-if-not find-if
;;;;;; find nsubstitute-if-not nsubstitute-if nsubstitute substitute-if-not
;;;;;; substitute-if substitute delete-duplicates remove-duplicates
;;;;;; delete-if-not delete-if delete* remove-if-not remove-if remove*
-;;;;;; replace fill reduce) "cl-seq" "cl-seq.el" "99095e49c83af1c8bec0fdcf517b3f95")
+;;;;;; replace fill reduce) "cl-seq" "cl-seq.el" "2d8563fcbdf4bc77e569d0aeb0a35cfc")
;;; Generated autoloads from cl-seq.el
(autoload 'reduce "cl-seq" "\
@@ -1047,7 +1111,7 @@ Keywords supported: :key
\(fn PREDICATE LIST [KEYWORD VALUE]...)" nil nil)
-(autoload 'cl-adjoin "cl-seq" "\
+(autoload 'cl--adjoin "cl-seq" "\
\(fn CL-ITEM CL-LIST &rest CL-KEYS)" nil nil)
diff --git a/lisp/emacs-lisp/cl-macs.el b/lisp/emacs-lisp/cl-macs.el
index 4fc71bbbc60..c547a4f6460 100644
--- a/lisp/emacs-lisp/cl-macs.el
+++ b/lisp/emacs-lisp/cl-macs.el
@@ -143,11 +143,16 @@
;;; Count number of times X refers to Y. Return nil for 0 times.
(defun cl-expr-contains (x y)
+ ;; FIXME: This is naive, and it will count Y as referred twice in
+ ;; (let ((Y 1)) Y) even though it should be 0. Also it is often called on
+ ;; non-macroexpanded code, so it may also miss some occurrences that would
+ ;; only appear in the expanded code.
(cond ((equal y x) 1)
((and (consp x) (not (memq (car-safe x) '(quote function function*))))
(let ((sum 0))
- (while x
+ (while (consp x)
(setq sum (+ sum (or (cl-expr-contains (pop x) y) 0))))
+ (setq sum (+ sum (or (cl-expr-contains x y) 0)))
(and (> sum 0) sum)))
(t nil)))
@@ -162,15 +167,15 @@
;;; Symbols.
-(defvar *gensym-counter*)
+(defvar cl--gensym-counter)
;;;###autoload
(defun gensym (&optional prefix)
"Generate a new uninterned symbol.
The name is made by appending a number to PREFIX, default \"G\"."
(let ((pfix (if (stringp prefix) prefix "G"))
(num (if (integerp prefix) prefix
- (prog1 *gensym-counter*
- (setq *gensym-counter* (1+ *gensym-counter*))))))
+ (prog1 cl--gensym-counter
+ (setq cl--gensym-counter (1+ cl--gensym-counter))))))
(make-symbol (format "%s%d" pfix num))))
;;;###autoload
@@ -179,13 +184,35 @@ The name is made by appending a number to PREFIX, default \"G\"."
The name is made by appending a number to PREFIX, default \"G\"."
(let ((pfix (if (stringp prefix) prefix "G"))
name)
- (while (intern-soft (setq name (format "%s%d" pfix *gensym-counter*)))
- (setq *gensym-counter* (1+ *gensym-counter*)))
+ (while (intern-soft (setq name (format "%s%d" pfix cl--gensym-counter)))
+ (setq cl--gensym-counter (1+ cl--gensym-counter)))
(intern name)))
;;; Program structure.
+(def-edebug-spec cl-declarations
+ (&rest ("declare" &rest sexp)))
+
+(def-edebug-spec cl-declarations-or-string
+ (&or stringp cl-declarations))
+
+(def-edebug-spec cl-lambda-list
+ (([&rest arg]
+ [&optional ["&optional" cl-&optional-arg &rest cl-&optional-arg]]
+ [&optional ["&rest" arg]]
+ [&optional ["&key" [cl-&key-arg &rest cl-&key-arg]
+ &optional "&allow-other-keys"]]
+ [&optional ["&aux" &rest
+ &or (symbolp &optional def-form) symbolp]]
+ )))
+
+(def-edebug-spec cl-&optional-arg
+ (&or (arg &optional def-form arg) arg))
+
+(def-edebug-spec cl-&key-arg
+ (&or ([&or (symbolp arg) arg] &optional def-form arg) arg))
+
;;;###autoload
(defmacro defun* (name args &rest body)
"Define NAME as a function.
@@ -193,10 +220,57 @@ Like normal `defun', except ARGLIST allows full Common Lisp conventions,
and BODY is implicitly surrounded by (block NAME ...).
\(fn NAME ARGLIST [DOCSTRING] BODY...)"
+ (declare (debug
+ ;; Same as defun but use cl-lambda-list.
+ (&define [&or name ("setf" :name setf name)]
+ cl-lambda-list
+ cl-declarations-or-string
+ [&optional ("interactive" interactive)]
+ def-body))
+ (doc-string 3)
+ (indent 2))
(let* ((res (cl-transform-lambda (cons args body) name))
(form (list* 'defun name (cdr res))))
(if (car res) (list 'progn (car res) form) form)))
+;; The lambda list for macros is different from that of normal lambdas.
+;; Note that &environment is only allowed as first or last items in the
+;; top level list.
+
+(def-edebug-spec cl-macro-list
+ (([&optional "&environment" arg]
+ [&rest cl-macro-arg]
+ [&optional ["&optional" &rest
+ &or (cl-macro-arg &optional def-form cl-macro-arg) arg]]
+ [&optional [[&or "&rest" "&body"] cl-macro-arg]]
+ [&optional ["&key" [&rest
+ [&or ([&or (symbolp cl-macro-arg) arg]
+ &optional def-form cl-macro-arg)
+ arg]]
+ &optional "&allow-other-keys"]]
+ [&optional ["&aux" &rest
+ &or (symbolp &optional def-form) symbolp]]
+ [&optional "&environment" arg]
+ )))
+
+(def-edebug-spec cl-macro-arg
+ (&or arg cl-macro-list1))
+
+(def-edebug-spec cl-macro-list1
+ (([&optional "&whole" arg] ;; only allowed at lower levels
+ [&rest cl-macro-arg]
+ [&optional ["&optional" &rest
+ &or (cl-macro-arg &optional def-form cl-macro-arg) arg]]
+ [&optional [[&or "&rest" "&body"] cl-macro-arg]]
+ [&optional ["&key" [&rest
+ [&or ([&or (symbolp cl-macro-arg) arg]
+ &optional def-form cl-macro-arg)
+ arg]]
+ &optional "&allow-other-keys"]]
+ [&optional ["&aux" &rest
+ &or (symbolp &optional def-form) symbolp]]
+ . [&or arg nil])))
+
;;;###autoload
(defmacro defmacro* (name args &rest body)
"Define NAME as a macro.
@@ -204,15 +278,34 @@ Like normal `defmacro', except ARGLIST allows full Common Lisp conventions,
and BODY is implicitly surrounded by (block NAME ...).
\(fn NAME ARGLIST [DOCSTRING] BODY...)"
+ (declare (debug
+ (&define name cl-macro-list cl-declarations-or-string def-body))
+ (doc-string 3)
+ (indent 2))
(let* ((res (cl-transform-lambda (cons args body) name))
(form (list* 'defmacro name (cdr res))))
(if (car res) (list 'progn (car res) form) form)))
+(def-edebug-spec cl-lambda-expr
+ (&define ("lambda" cl-lambda-list
+ ;;cl-declarations-or-string
+ ;;[&optional ("interactive" interactive)]
+ def-body)))
+
+;; Redefine function-form to also match function*
+(def-edebug-spec function-form
+ ;; form at the end could also handle "function",
+ ;; but recognize it specially to avoid wrapping function forms.
+ (&or ([&or "quote" "function"] &or symbolp lambda-expr)
+ ("function*" function*)
+ form))
+
;;;###autoload
(defmacro function* (func)
"Introduce a function.
Like normal `function', except that if argument is a lambda form,
its argument list allows full Common Lisp conventions."
+ (declare (debug (&or symbolp cl-lambda-expr)))
(if (eq (car-safe func) 'lambda)
(let* ((res (cl-transform-lambda (cdr func) 'cl-none))
(form (list 'function (cons 'lambda (cdr res)))))
@@ -313,8 +406,9 @@ It is a list of elements of the form either:
(require 'help-fns)
(cons (help-add-fundoc-usage
(if (stringp (car hdr)) (pop hdr))
- (format "(fn %S)"
- (cl--make-usage-args orig-args)))
+ (format "%S"
+ (cons 'fn
+ (cl--make-usage-args orig-args))))
hdr)))
(list (nconc (list 'let* bind-lets)
(nreverse bind-forms) body)))))))
@@ -465,6 +559,8 @@ It is a list of elements of the form either:
;;;###autoload
(defmacro destructuring-bind (args expr &rest body)
+ (declare (indent 2)
+ (debug (&define cl-macro-list def-form cl-declarations def-body)))
(let* ((bind-lets nil) (bind-forms nil) (bind-inits nil)
(bind-defs nil) (bind-block 'cl-none) (bind-enquote nil))
(cl-do-arglist (or args '(&aux)) expr)
@@ -485,6 +581,7 @@ If `load' is in WHEN, BODY is evaluated when loaded after top-level compile.
If `eval' is in WHEN, BODY is evaluated when interpreted or at non-top-level.
\(fn (WHEN...) BODY...)"
+ (declare (indent 1) (debug ((&rest &or "compile" "load" "eval") body)))
(if (and (fboundp 'cl-compiling-file) (cl-compiling-file)
(not cl-not-toplevel) (not (boundp 'for-effect))) ; horrible kludge
(let ((comp (or (memq 'compile when) (memq :compile-toplevel when)))
@@ -513,6 +610,7 @@ If `eval' is in WHEN, BODY is evaluated when interpreted or at non-top-level.
(defmacro load-time-value (form &optional read-only)
"Like `progn', but evaluates the body at load time.
The result of the body appears to the compiler as a quoted constant."
+ (declare (debug (form &optional sexp)))
(if (cl-compiling-file)
(let* ((temp (gentemp "--cl-load-time--"))
(set (list 'set (list 'quote temp) form)))
@@ -542,6 +640,7 @@ place of a KEYLIST of one atom. A KEYLIST of t or `otherwise' is
allowed only in the final clause, and matches if no other keys match.
Key values are compared by `eql'.
\n(fn EXPR (KEYLIST BODY...)...)"
+ (declare (indent 1) (debug (form &rest (sexp body))))
(let* ((temp (if (cl-simple-expr-p expr 3) expr (make-symbol "--cl-var--")))
(head-list nil)
(body (cons
@@ -572,6 +671,7 @@ Key values are compared by `eql'.
"Like `case', but error if no case fits.
`otherwise'-clauses are not allowed.
\n(fn EXPR (KEYLIST BODY...)...)"
+ (declare (indent 1) (debug case))
(list* 'case expr (append clauses '((ecase-error-flag)))))
;;;###autoload
@@ -582,6 +682,8 @@ satisfies TYPE, the corresponding BODY is evaluated. If no clause succeeds,
typecase returns nil. A TYPE of t or `otherwise' is allowed only in the
final clause, and matches if no other keys match.
\n(fn EXPR (TYPE BODY...)...)"
+ (declare (indent 1)
+ (debug (form &rest ([&or cl-type-spec "otherwise"] body))))
(let* ((temp (if (cl-simple-expr-p expr 3) expr (make-symbol "--cl-var--")))
(type-list nil)
(body (cons
@@ -606,6 +708,7 @@ final clause, and matches if no other keys match.
"Like `typecase', but error if no case fits.
`otherwise'-clauses are not allowed.
\n(fn EXPR (TYPE BODY...)...)"
+ (declare (indent 1) (debug typecase))
(list* 'typecase expr (append clauses '((ecase-error-flag)))))
@@ -621,6 +724,7 @@ quoted symbol or other form; and second, NAME is lexically rather than
dynamically scoped: Only references to it within BODY will work. These
references may appear inside macro expansions, but not inside functions
called from BODY."
+ (declare (indent 1) (debug (symbolp body)))
(if (cl-safe-expr-p (cons 'progn body)) (cons 'progn body)
(list 'cl-block-wrapper
(list* 'catch (list 'quote (intern (format "--cl-block-%s--" name)))
@@ -630,6 +734,7 @@ called from BODY."
(defmacro return (&optional result)
"Return from the block named nil.
This is equivalent to `(return-from nil RESULT)'."
+ (declare (debug (&optional form)))
(list 'return-from nil result))
;;;###autoload
@@ -639,6 +744,7 @@ This jumps out to the innermost enclosing `(block NAME ...)' form,
returning RESULT from that form (or nil if RESULT is omitted).
This is compatible with Common Lisp, but note that `defun' and
`defmacro' do not create implicit blocks as they do in Common Lisp."
+ (declare (indent 1) (debug (symbolp &optional form)))
(let ((name2 (intern (format "--cl-block-%s--" name))))
(list 'cl-block-throw (list 'quote name2) result)))
@@ -668,6 +774,7 @@ Valid clauses are:
finally return EXPR, named NAME.
\(fn CLAUSE...)"
+ (declare (debug (&rest &or symbolp form)))
(if (not (memq t (mapcar 'symbolp (delq nil (delq t (copy-list loop-args))))))
(list 'block nil (list* 'while t loop-args))
(let ((loop-name nil) (loop-bindings nil)
@@ -719,6 +826,158 @@ Valid clauses are:
(setq body (list (list* 'symbol-macrolet loop-symbol-macs body))))
(list* 'block loop-name body)))))
+;; Below is a complete spec for loop, in several parts that correspond
+;; to the syntax given in CLtL2. The specs do more than specify where
+;; the forms are; it also specifies, as much as Edebug allows, all the
+;; syntactically valid loop clauses. The disadvantage of this
+;; completeness is rigidity, but the "for ... being" clause allows
+;; arbitrary extensions of the form: [symbolp &rest &or symbolp form].
+
+;; (def-edebug-spec loop
+;; ([&optional ["named" symbolp]]
+;; [&rest
+;; &or
+;; ["repeat" form]
+;; loop-for-as
+;; loop-with
+;; loop-initial-final]
+;; [&rest loop-clause]
+;; ))
+
+;; (def-edebug-spec loop-with
+;; ("with" loop-var
+;; loop-type-spec
+;; [&optional ["=" form]]
+;; &rest ["and" loop-var
+;; loop-type-spec
+;; [&optional ["=" form]]]))
+
+;; (def-edebug-spec loop-for-as
+;; ([&or "for" "as"] loop-for-as-subclause
+;; &rest ["and" loop-for-as-subclause]))
+
+;; (def-edebug-spec loop-for-as-subclause
+;; (loop-var
+;; loop-type-spec
+;; &or
+;; [[&or "in" "on" "in-ref" "across-ref"]
+;; form &optional ["by" function-form]]
+
+;; ["=" form &optional ["then" form]]
+;; ["across" form]
+;; ["being"
+;; [&or "the" "each"]
+;; &or
+;; [[&or "element" "elements"]
+;; [&or "of" "in" "of-ref"] form
+;; &optional "using" ["index" symbolp]];; is this right?
+;; [[&or "hash-key" "hash-keys"
+;; "hash-value" "hash-values"]
+;; [&or "of" "in"]
+;; hash-table-p &optional ["using" ([&or "hash-value" "hash-values"
+;; "hash-key" "hash-keys"] sexp)]]
+
+;; [[&or "symbol" "present-symbol" "external-symbol"
+;; "symbols" "present-symbols" "external-symbols"]
+;; [&or "in" "of"] package-p]
+
+;; ;; Extensions for Emacs Lisp, including Lucid Emacs.
+;; [[&or "frame" "frames"
+;; "screen" "screens"
+;; "buffer" "buffers"]]
+
+;; [[&or "window" "windows"]
+;; [&or "of" "in"] form]
+
+;; [[&or "overlay" "overlays"
+;; "extent" "extents"]
+;; [&or "of" "in"] form
+;; &optional [[&or "from" "to"] form]]
+
+;; [[&or "interval" "intervals"]
+;; [&or "in" "of"] form
+;; &optional [[&or "from" "to"] form]
+;; ["property" form]]
+
+;; [[&or "key-code" "key-codes"
+;; "key-seq" "key-seqs"
+;; "key-binding" "key-bindings"]
+;; [&or "in" "of"] form
+;; &optional ["using" ([&or "key-code" "key-codes"
+;; "key-seq" "key-seqs"
+;; "key-binding" "key-bindings"]
+;; sexp)]]
+;; ;; For arbitrary extensions, recognize anything else.
+;; [symbolp &rest &or symbolp form]
+;; ]
+
+;; ;; arithmetic - must be last since all parts are optional.
+;; [[&optional [[&or "from" "downfrom" "upfrom"] form]]
+;; [&optional [[&or "to" "downto" "upto" "below" "above"] form]]
+;; [&optional ["by" form]]
+;; ]))
+
+;; (def-edebug-spec loop-initial-final
+;; (&or ["initially"
+;; ;; [&optional &or "do" "doing"] ;; CLtL2 doesn't allow this.
+;; &rest loop-non-atomic-expr]
+;; ["finally" &or
+;; [[&optional &or "do" "doing"] &rest loop-non-atomic-expr]
+;; ["return" form]]))
+
+;; (def-edebug-spec loop-and-clause
+;; (loop-clause &rest ["and" loop-clause]))
+
+;; (def-edebug-spec loop-clause
+;; (&or
+;; [[&or "while" "until" "always" "never" "thereis"] form]
+
+;; [[&or "collect" "collecting"
+;; "append" "appending"
+;; "nconc" "nconcing"
+;; "concat" "vconcat"] form
+;; [&optional ["into" loop-var]]]
+
+;; [[&or "count" "counting"
+;; "sum" "summing"
+;; "maximize" "maximizing"
+;; "minimize" "minimizing"] form
+;; [&optional ["into" loop-var]]
+;; loop-type-spec]
+
+;; [[&or "if" "when" "unless"]
+;; form loop-and-clause
+;; [&optional ["else" loop-and-clause]]
+;; [&optional "end"]]
+
+;; [[&or "do" "doing"] &rest loop-non-atomic-expr]
+
+;; ["return" form]
+;; loop-initial-final
+;; ))
+
+;; (def-edebug-spec loop-non-atomic-expr
+;; ([&not atom] form))
+
+;; (def-edebug-spec loop-var
+;; ;; The symbolp must be last alternative to recognize e.g. (a b . c)
+;; ;; loop-var =>
+;; ;; (loop-var . [&or nil loop-var])
+;; ;; (symbolp . [&or nil loop-var])
+;; ;; (symbolp . loop-var)
+;; ;; (symbolp . (symbolp . [&or nil loop-var]))
+;; ;; (symbolp . (symbolp . loop-var))
+;; ;; (symbolp . (symbolp . symbolp)) == (symbolp symbolp . symbolp)
+;; (&or (loop-var . [&or nil loop-var]) [gate symbolp]))
+
+;; (def-edebug-spec loop-type-spec
+;; (&optional ["of-type" loop-d-type-spec]))
+
+;; (def-edebug-spec loop-d-type-spec
+;; (&or (loop-d-type-spec . [&or nil loop-d-type-spec]) cl-type-spec))
+
+
+
(defun cl-parse-loop-clause () ; uses loop-*
(let ((word (pop loop-args))
(hash-types '(hash-key hash-keys hash-value hash-values))
@@ -1226,6 +1485,11 @@ Valid clauses are:
"The Common Lisp `do' loop.
\(fn ((VAR INIT [STEP])...) (END-TEST [RESULT...]) BODY...)"
+ (declare (indent 2)
+ (debug
+ ((&rest &or symbolp (symbolp &optional form form))
+ (form body)
+ cl-declarations body)))
(cl-expand-do-loop steps endtest body nil))
;;;###autoload
@@ -1233,6 +1497,7 @@ Valid clauses are:
"The Common Lisp `do*' loop.
\(fn ((VAR INIT [STEP])...) (END-TEST [RESULT...]) BODY...)"
+ (declare (indent 2) (debug do))
(cl-expand-do-loop steps endtest body t))
(defun cl-expand-do-loop (steps endtest body star)
@@ -1264,6 +1529,7 @@ Then evaluate RESULT to get return value, default nil.
An implicit nil block is established around the loop.
\(fn (VAR LIST [RESULT]) BODY...)"
+ (declare (debug ((symbolp form &optional form) cl-declarations body)))
(let ((temp (make-symbol "--cl-dolist-temp--")))
;; FIXME: Copy&pasted from subr.el.
`(block nil
@@ -1297,6 +1563,7 @@ to COUNT, exclusive. Then evaluate RESULT to get return value, default
nil.
\(fn (VAR COUNT [RESULT]) BODY...)"
+ (declare (debug dolist))
(let ((temp (make-symbol "--cl-dotimes-temp--"))
(end (nth 1 spec)))
;; FIXME: Copy&pasted from subr.el.
@@ -1329,6 +1596,8 @@ Evaluate BODY with VAR bound to each interned symbol, or to each symbol
from OBARRAY.
\(fn (VAR [OBARRAY [RESULT]]) BODY...)"
+ (declare (indent 1)
+ (debug ((symbolp &optional form form) cl-declarations body)))
;; Apparently this doesn't have an implicit block.
(list 'block nil
(list 'let (list (car spec))
@@ -1339,6 +1608,7 @@ from OBARRAY.
;;;###autoload
(defmacro do-all-symbols (spec &rest body)
+ (declare (indent 1) (debug ((symbolp &optional form) cl-declarations body)))
(list* 'do-symbols (list (car spec) nil (cadr spec)) body))
@@ -1351,6 +1621,7 @@ This is like `setq', except that all VAL forms are evaluated (in order)
before assigning any symbols SYM to the corresponding values.
\(fn SYM VAL SYM VAL ...)"
+ (declare (debug setq))
(cons 'psetf args))
@@ -1364,6 +1635,7 @@ Each symbol in the first list is bound to the corresponding value in the
second list (or made unbound if VALUES is shorter than SYMBOLS); then the
BODY forms are executed and their result is returned. This is much like
a `let' form, except that the list of symbols can be computed at run-time."
+ (declare (indent 2) (debug (form form body)))
(list 'let '((cl-progv-save nil))
(list 'unwind-protect
(list* 'progn (list 'cl-progv-before symbols values) body)
@@ -1379,6 +1651,7 @@ function definitions in place, then the definitions are undone (the FUNCs
go back to their previous definitions, or lack thereof).
\(fn ((FUNC ARGLIST BODY...) ...) FORM...)"
+ (declare (indent 1) (debug ((&rest (defun*)) cl-declarations body)))
(list* 'letf*
(mapcar
(function
@@ -1411,6 +1684,7 @@ This is like `flet', except the bindings are lexical instead of dynamic.
Unlike `flet', this macro is fully compliant with the Common Lisp standard.
\(fn ((FUNC ARGLIST BODY...) ...) FORM...)"
+ (declare (indent 1) (debug flet))
(let ((vars nil) (sets nil) (cl-macro-environment cl-macro-environment))
(while bindings
;; Use `gensym' rather than `make-symbol'. It's important that
@@ -1435,6 +1709,11 @@ Unlike `flet', this macro is fully compliant with the Common Lisp standard.
This is like `flet', but for macros instead of functions.
\(fn ((NAME ARGLIST BODY...) ...) FORM...)"
+ (declare (indent 1)
+ (debug
+ ((&rest (&define name (&rest arg) cl-declarations-or-string
+ def-body))
+ cl-declarations body)))
(if (cdr bindings)
(list 'macrolet
(list (car bindings)) (list* 'macrolet (cdr bindings) body))
@@ -1453,6 +1732,7 @@ Within the body FORMs, references to the variable NAME will be replaced
by EXPANSION, and (setq NAME ...) will act like (setf EXPANSION ...).
\(fn ((NAME EXPANSION) ...) FORM...)"
+ (declare (indent 1) (debug ((&rest (symbol sexp)) cl-declarations body)))
(if (cdr bindings)
(list 'symbol-macrolet
(list (car bindings)) (list* 'symbol-macrolet (cdr bindings) body))
@@ -1469,6 +1749,7 @@ by EXPANSION, and (setq NAME ...) will act like (setf EXPANSION ...).
The main visible difference is that lambdas inside BODY will create
lexical closures as in Common Lisp.
\n(fn BINDINGS BODY)"
+ (declare (indent 1) (debug let))
(let* ((cl-closure-vars cl-closure-vars)
(vars (mapcar (function
(lambda (x)
@@ -1483,18 +1764,24 @@ lexical closures as in Common Lisp.
(cons 'progn body)
(nconc (mapcar (function (lambda (x)
(list (symbol-name (car x))
- (list 'symbol-value (caddr x))
+ (list 'symbol-value (caddr x))
t))) vars)
(list '(defun . cl-defun-expander))
cl-macro-environment))))
(if (not (get (car (last cl-closure-vars)) 'used))
- (list 'let (mapcar (function (lambda (x)
- (list (caddr x) (cadr x)))) vars)
- (sublis (mapcar (function (lambda (x)
- (cons (caddr x)
- (list 'quote (caddr x)))))
- vars)
- ebody))
+ ;; Turn (let ((foo (gensym))) (set foo <val>) ...(symbol-value foo)...)
+ ;; into (let ((foo <val>)) ...(symbol-value 'foo)...).
+ ;; This is good because it's more efficient but it only works with
+ ;; dynamic scoping, since with lexical scoping we'd need
+ ;; (let ((foo <val>)) ...foo...).
+ `(progn
+ ,@(mapcar (lambda (x) `(defvar ,(caddr x))) vars)
+ (let ,(mapcar (lambda (x) (list (caddr x) (cadr x))) vars)
+ ,(sublis (mapcar (lambda (x)
+ (cons (caddr x)
+ (list 'quote (caddr x))))
+ vars)
+ ebody)))
(list 'let (mapcar (function (lambda (x)
(list (caddr x)
(list 'make-symbol
@@ -1515,6 +1802,7 @@ successive bindings within BINDINGS, will create lexical closures
as in Common Lisp. This is similar to the behavior of `let*' in
Common Lisp.
\n(fn BINDINGS BODY)"
+ (declare (indent 1) (debug let))
(if (null bindings) (cons 'progn body)
(setq bindings (reverse bindings))
(while bindings
@@ -1540,6 +1828,7 @@ simulate true multiple return values. For compatibility, (values A B C) is
a synonym for (list A B C).
\(fn (SYM...) FORM BODY)"
+ (declare (indent 2) (debug ((&rest symbolp) form body)))
(let ((temp (make-symbol "--cl-var--")) (n -1))
(list* 'let* (cons (list temp form)
(mapcar (function
@@ -1557,6 +1846,7 @@ each of the symbols SYM in turn. This is analogous to the Common Lisp
values. For compatibility, (values A B C) is a synonym for (list A B C).
\(fn (SYM...) FORM)"
+ (declare (indent 1) (debug ((&rest symbolp) form)))
(cond ((null vars) (list 'progn form nil))
((null (cdr vars)) (list 'setq (car vars) (list 'car form)))
(t
@@ -1576,9 +1866,13 @@ values. For compatibility, (values A B C) is a synonym for (list A B C).
;;; Declarations.
;;;###autoload
-(defmacro locally (&rest body) (cons 'progn body))
+(defmacro locally (&rest body)
+ (declare (debug t))
+ (cons 'progn body))
;;;###autoload
-(defmacro the (type form) form)
+(defmacro the (type form)
+ (declare (indent 1) (debug (cl-type-spec form)))
+ form)
(defvar cl-proclaim-history t) ; for future compilers
(defvar cl-declare-stack t) ; for future compilers
@@ -1658,6 +1952,8 @@ list, a store-variables list (of length one), a store-form, and an access-
form. See `defsetf' for a simpler way to define most setf-methods.
\(fn NAME ARGLIST BODY...)"
+ (declare (debug
+ (&define name cl-lambda-list cl-declarations-or-string def-body)))
(append '(eval-when (compile load eval))
(if (stringp (car body))
(list (list 'put (list 'quote func) '(quote setf-documentation)
@@ -1687,6 +1983,11 @@ Example:
(defsetf nth (n x) (v) (list 'setcar (list 'nthcdr n x) v))
\(fn NAME [FUNC | ARGLIST (STORE) BODY...])"
+ (declare (debug
+ (&define name
+ [&or [symbolp &optional stringp]
+ [cl-lambda-list (symbolp)]]
+ cl-declarations-or-string def-body)))
(if (and (listp arg1) (consp args))
(let* ((largs nil) (largsr nil)
(temps nil) (tempsr nil)
@@ -2025,6 +2326,7 @@ For example, (setf (cadar x) y) is equivalent to (setcar (cdar x) y).
The return value is the last VAL in the list.
\(fn PLACE VAL PLACE VAL ...)"
+ (declare (debug (&rest [place form])))
(if (cdr (cdr args))
(let ((sets nil))
(while args (push (list 'setf (pop args) (pop args)) sets))
@@ -2042,6 +2344,7 @@ This is like `setf', except that all VAL forms are evaluated (in order)
before assigning any PLACEs to the corresponding values.
\(fn PLACE VAL PLACE VAL ...)"
+ (declare (debug setf))
(let ((p args) (simple t) (vars nil))
(while p
(if (or (not (symbolp (car p))) (cl-expr-depends-p (nth 1 p) vars))
@@ -2077,6 +2380,7 @@ before assigning any PLACEs to the corresponding values.
"Remove TAG from property list PLACE.
PLACE may be a symbol, or any generalized variable allowed by `setf'.
The form returns true if TAG was found and removed, nil otherwise."
+ (declare (debug (place form)))
(let* ((method (cl-setf-do-modify place t))
(tag-temp (and (not (cl-const-expr-p tag)) (make-symbol "--cl-remf-tag--")))
(val-temp (and (not (cl-simple-expr-p place))
@@ -2100,6 +2404,7 @@ Example: (shiftf A B C) sets A to B, B to C, and returns the old A.
Each PLACE may be a symbol, or any generalized variable allowed by `setf'.
\(fn PLACE... VAL)"
+ (declare (debug (&rest place)))
(cond
((null args) place)
((symbolp place) `(prog1 ,place (setq ,place (shiftf ,@args))))
@@ -2116,6 +2421,7 @@ Example: (rotatef A B C) sets A to B, B to C, and C to A. It returns nil.
Each PLACE may be a symbol, or any generalized variable allowed by `setf'.
\(fn PLACE...)"
+ (declare (debug (&rest place)))
(if (not (memq nil (mapcar 'symbolp args)))
(and (cdr args)
(let ((sets nil)
@@ -2147,6 +2453,7 @@ As a special case, if `(PLACE)' is used instead of `(PLACE VALUE)',
the PLACE is not modified before executing BODY.
\(fn ((PLACE VALUE) ...) BODY...)"
+ (declare (indent 1) (debug ((&rest (gate place &optional form)) body)))
(if (and (not (cdr bindings)) (cdar bindings) (symbolp (caar bindings)))
(list* 'let bindings body)
(let ((lets nil) (sets nil)
@@ -2204,6 +2511,7 @@ As a special case, if `(PLACE)' is used instead of `(PLACE VALUE)',
the PLACE is not modified before executing BODY.
\(fn ((PLACE VALUE) ...) BODY...)"
+ (declare (indent 1) (debug letf))
(if (null bindings)
(cons 'progn body)
(setq bindings (reverse bindings))
@@ -2218,6 +2526,7 @@ FUNC should be an unquoted function name. PLACE may be a symbol,
or any generalized variable allowed by `setf'.
\(fn FUNC PLACE ARGS...)"
+ (declare (indent 2) (debug (function* place &rest form)))
(let* ((method (cl-setf-do-modify place (cons 'list args)))
(rargs (cons (nth 2 method) args)))
(list 'let* (car method)
@@ -2232,6 +2541,7 @@ or any generalized variable allowed by `setf'.
Like `callf', but PLACE is the second argument of FUNC, not the first.
\(fn FUNC ARG1 PLACE ARGS...)"
+ (declare (indent 3) (debug (function* form place &rest form)))
(if (and (cl-safe-expr-p arg1) (cl-simple-expr-p place) (symbolp func))
(list 'setf place (list* func arg1 place args))
(let* ((method (cl-setf-do-modify place (cons 'list args)))
@@ -2248,6 +2558,9 @@ Like `callf', but PLACE is the second argument of FUNC, not the first.
"Define a `setf'-like modify macro.
If NAME is called, it combines its PLACE argument with the other arguments
from ARGLIST using FUNC: (define-modify-macro incf (&optional (n 1)) +)"
+ (declare (debug
+ (&define name cl-lambda-list ;; should exclude &key
+ symbolp &optional stringp)))
(if (memq '&key arglist) (error "&key not allowed in define-modify-macro"))
(let ((place (make-symbol "--cl-place--")))
(list 'defmacro* name (cons place arglist) doc
@@ -2276,6 +2589,26 @@ one keyword is supported, `:read-only'. If this has a non-nil
value, that slot cannot be set via `setf'.
\(fn NAME SLOTS...)"
+ (declare (doc-string 2)
+ (debug
+ (&define ;Makes top-level form not be wrapped.
+ [&or symbolp
+ (gate
+ symbolp &rest
+ (&or [":conc-name" symbolp]
+ [":constructor" symbolp &optional cl-lambda-list]
+ [":copier" symbolp]
+ [":predicate" symbolp]
+ [":include" symbolp &rest sexp] ;; Not finished.
+ ;; The following are not supported.
+ ;; [":print-function" ...]
+ ;; [":type" ...]
+ ;; [":initial-offset" ...]
+ ))]
+ [&optional stringp]
+ ;; All the above is for the following def-form.
+ &rest &or symbolp (symbolp def-form
+ &optional ":read-only" sexp))))
(let* ((name (if (consp struct) (car struct) struct))
(opts (cdr-safe struct))
(slots nil)
@@ -2524,6 +2857,7 @@ value, that slot cannot be set via `setf'.
(defmacro deftype (name arglist &rest body)
"Define NAME as a new data type.
The type name can then be used in `typecase', `check-type', etc."
+ (declare (debug defmacro*) (doc-string 3))
(list 'eval-when '(compile load eval)
(cl-transform-function-property
name 'cl-deftype-handler (cons (list* '&cl-defs ''('*) arglist) body))))
@@ -2575,6 +2909,7 @@ TYPE is a Common Lisp-style type specifier."
(defmacro check-type (form type &optional string)
"Verify that FORM is of type TYPE; signal an error if not.
STRING is an optional description of the desired type."
+ (declare (debug (place cl-type-spec &optional stringp)))
(and (or (not (cl-compiling-file))
(< cl-optimize-speed 3) (= cl-optimize-safety 3))
(let* ((temp (if (cl-simple-expr-p form 3)
@@ -2593,6 +2928,7 @@ Second arg SHOW-ARGS means to include arguments of FORM in message.
Other args STRING and ARGS... are arguments to be passed to `error'.
They are not evaluated unless the assertion fails. If STRING is
omitted, a default message listing FORM itself is used."
+ (declare (debug (form &rest form)))
(and (or (not (cl-compiling-file))
(< cl-optimize-speed 3) (= cl-optimize-safety 3))
(let ((sargs (and show-args
@@ -2623,6 +2959,7 @@ compiler macros are expanded repeatedly until no further expansions are
possible. Unlike regular macros, BODY can decide to \"punt\" and leave the
original function call alone by declaring an initial `&whole foo' parameter
and then returning foo."
+ (declare (debug defmacro*))
(let ((p args) (res nil))
(while (consp p) (push (pop p) res))
(setq args (nconc (nreverse res) (and p (list '&rest p)))))
@@ -2697,6 +3034,7 @@ ARGLIST allows full Common Lisp conventions, and BODY is implicitly
surrounded by (block NAME ...).
\(fn NAME ARGLIST [DOCSTRING] BODY...)"
+ (declare (debug defun*))
(let* ((argns (cl-arglist-args args)) (p argns)
(pbody (cons 'progn body))
(unsafe (not (cl-safe-expr-p pbody))))
diff --git a/lisp/emacs-lisp/cl-seq.el b/lisp/emacs-lisp/cl-seq.el
index f1890fbccf6..233f0c83a6e 100644
--- a/lisp/emacs-lisp/cl-seq.el
+++ b/lisp/emacs-lisp/cl-seq.el
@@ -213,8 +213,8 @@ to avoid corrupting the original SEQ.
(if (<= (or cl-count (setq cl-count 8000000)) 0)
cl-seq
(if (or (nlistp cl-seq) (and cl-from-end (< cl-count 4000000)))
- (let ((cl-i (cl-position cl-item cl-seq cl-start cl-end
- cl-from-end)))
+ (let ((cl-i (cl--position cl-item cl-seq cl-start cl-end
+ cl-from-end)))
(if cl-i
(let ((cl-res (apply 'delete* cl-item (append cl-seq nil)
(append (if cl-from-end
@@ -279,8 +279,8 @@ This is a destructive function; it reuses the storage of SEQ whenever possible.
(if (and cl-from-end (< cl-count 4000000))
(let (cl-i)
(while (and (>= (setq cl-count (1- cl-count)) 0)
- (setq cl-i (cl-position cl-item cl-seq cl-start
- cl-end cl-from-end)))
+ (setq cl-i (cl--position cl-item cl-seq cl-start
+ cl-end cl-from-end)))
(if (= cl-i 0) (setq cl-seq (cdr cl-seq))
(let ((cl-tail (nthcdr (1- cl-i) cl-seq)))
(setcdr cl-tail (cdr (cdr cl-tail)))))
@@ -330,16 +330,16 @@ This is a destructive function; it reuses the storage of SEQ whenever possible.
"Return a copy of SEQ with all duplicate elements removed.
\nKeywords supported: :test :test-not :key :start :end :from-end
\n(fn SEQ [KEYWORD VALUE]...)"
- (cl-delete-duplicates cl-seq cl-keys t))
+ (cl--delete-duplicates cl-seq cl-keys t))
;;;###autoload
(defun delete-duplicates (cl-seq &rest cl-keys)
"Remove all duplicate elements from SEQ (destructively).
\nKeywords supported: :test :test-not :key :start :end :from-end
\n(fn SEQ [KEYWORD VALUE]...)"
- (cl-delete-duplicates cl-seq cl-keys nil))
+ (cl--delete-duplicates cl-seq cl-keys nil))
-(defun cl-delete-duplicates (cl-seq cl-keys cl-copy)
+(defun cl--delete-duplicates (cl-seq cl-keys cl-copy)
(if (listp cl-seq)
(cl-parsing-keywords (:test :test-not :key (:start 0) :end :from-end :if)
()
@@ -348,8 +348,8 @@ This is a destructive function; it reuses the storage of SEQ whenever possible.
(setq cl-end (- (or cl-end (length cl-seq)) cl-start))
(while (> cl-end 1)
(setq cl-i 0)
- (while (setq cl-i (cl-position (cl-check-key (car cl-p))
- (cdr cl-p) cl-i (1- cl-end)))
+ (while (setq cl-i (cl--position (cl-check-key (car cl-p))
+ (cdr cl-p) cl-i (1- cl-end)))
(if cl-copy (setq cl-seq (copy-sequence cl-seq)
cl-p (nthcdr cl-start cl-seq) cl-copy nil))
(let ((cl-tail (nthcdr cl-i cl-p)))
@@ -360,14 +360,14 @@ This is a destructive function; it reuses the storage of SEQ whenever possible.
cl-seq)
(setq cl-end (- (or cl-end (length cl-seq)) cl-start))
(while (and (cdr cl-seq) (= cl-start 0) (> cl-end 1)
- (cl-position (cl-check-key (car cl-seq))
- (cdr cl-seq) 0 (1- cl-end)))
+ (cl--position (cl-check-key (car cl-seq))
+ (cdr cl-seq) 0 (1- cl-end)))
(setq cl-seq (cdr cl-seq) cl-end (1- cl-end)))
(let ((cl-p (if (> cl-start 0) (nthcdr (1- cl-start) cl-seq)
(setq cl-end (1- cl-end) cl-start 1) cl-seq)))
(while (and (cdr (cdr cl-p)) (> cl-end 1))
- (if (cl-position (cl-check-key (car (cdr cl-p)))
- (cdr (cdr cl-p)) 0 (1- cl-end))
+ (if (cl--position (cl-check-key (car (cdr cl-p)))
+ (cdr (cdr cl-p)) 0 (1- cl-end))
(progn
(if cl-copy (setq cl-seq (copy-sequence cl-seq)
cl-p (nthcdr (1- cl-start) cl-seq)
@@ -376,7 +376,7 @@ This is a destructive function; it reuses the storage of SEQ whenever possible.
(setq cl-p (cdr cl-p)))
(setq cl-end (1- cl-end) cl-start (1+ cl-start)))
cl-seq)))
- (let ((cl-res (cl-delete-duplicates (append cl-seq nil) cl-keys nil)))
+ (let ((cl-res (cl--delete-duplicates (append cl-seq nil) cl-keys nil)))
(if (stringp cl-seq) (concat cl-res) (vconcat cl-res)))))
;;;###autoload
@@ -391,7 +391,7 @@ to avoid corrupting the original SEQ.
(if (or (eq cl-old cl-new)
(<= (or cl-count (setq cl-from-end nil cl-count 8000000)) 0))
cl-seq
- (let ((cl-i (cl-position cl-old cl-seq cl-start cl-end)))
+ (let ((cl-i (cl--position cl-old cl-seq cl-start cl-end)))
(if (not cl-i)
cl-seq
(setq cl-seq (copy-sequence cl-seq))
@@ -502,9 +502,9 @@ Return the index of the matching item, or nil if not found.
\n(fn ITEM SEQ [KEYWORD VALUE]...)"
(cl-parsing-keywords (:test :test-not :key :if :if-not
(:start 0) :end :from-end) ()
- (cl-position cl-item cl-seq cl-start cl-end cl-from-end)))
+ (cl--position cl-item cl-seq cl-start cl-end cl-from-end)))
-(defun cl-position (cl-item cl-seq cl-start &optional cl-end cl-from-end)
+(defun cl--position (cl-item cl-seq cl-start &optional cl-end cl-from-end)
(if (listp cl-seq)
(let ((cl-p (nthcdr cl-start cl-seq)))
(or cl-end (setq cl-end 8000000))
@@ -619,8 +619,8 @@ return nil if there are no matches.
(cl-if nil) cl-pos)
(setq cl-end2 (- cl-end2 (1- cl-len)))
(while (and (< cl-start2 cl-end2)
- (setq cl-pos (cl-position cl-first cl-seq2
- cl-start2 cl-end2 cl-from-end))
+ (setq cl-pos (cl--position cl-first cl-seq2
+ cl-start2 cl-end2 cl-from-end))
(apply 'mismatch cl-seq1 cl-seq2
:start1 (1+ cl-start1) :end1 cl-end1
:start2 (1+ cl-pos) :end2 (+ cl-pos cl-len)
@@ -702,7 +702,7 @@ Return the sublist of LIST whose car matches.
(apply 'member* nil cl-list :if-not cl-pred cl-keys))
;;;###autoload
-(defun cl-adjoin (cl-item cl-list &rest cl-keys)
+(defun cl--adjoin (cl-item cl-list &rest cl-keys)
(if (cl-parsing-keywords (:key) t
(apply 'member* (cl-check-key cl-item) cl-list cl-keys))
cl-list
diff --git a/lisp/emacs-lisp/cl-specs.el b/lisp/emacs-lisp/cl-specs.el
deleted file mode 100644
index dbadf06944f..00000000000
--- a/lisp/emacs-lisp/cl-specs.el
+++ /dev/null
@@ -1,471 +0,0 @@
-;;; cl-specs.el --- Edebug specs for cl.el -*- no-byte-compile: t -*-
-
-;; Copyright (C) 1993, 2001-2012 Free Software Foundation, Inc.
-;; Author: Daniel LaLiberte <liberte@holonexus.org>
-;; Keywords: lisp, tools, maint
-;; Package: emacs
-
-;; LCD Archive Entry:
-;; cl-specs.el|Daniel LaLiberte|liberte@holonexus.org
-;; |Edebug specs for cl.el
-
-;; This file is part of GNU Emacs.
-
-;; GNU Emacs 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, either version 3 of the License, or
-;; (at your option) any later version.
-
-;; GNU Emacs 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 GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
-
-;;; Commentary:
-
-;; These specs are to be used with edebug.el version 3.3 or later and
-;; cl.el version 2.03 or later, by Dave Gillespie <daveg@synaptics.com>.
-
-;; This file need not be byte-compiled, but it shouldn't hurt.
-
-;;; Code:
-
-(provide 'cl-specs)
-;; Do the above provide before the following require.
-;; Otherwise if you load this before edebug if cl is already loaded
-;; an infinite loading loop would occur.
-(require 'edebug)
-
-;; Blocks
-
-(def-edebug-spec block (symbolp body))
-(def-edebug-spec return (&optional form))
-(def-edebug-spec return-from (symbolp &optional form))
-
-;; Loops
-
-(def-edebug-spec case (form &rest (sexp body)))
-(def-edebug-spec ecase case)
-(def-edebug-spec do
- ((&rest &or symbolp (symbolp &optional form form))
- (form body)
- cl-declarations body))
-(def-edebug-spec do* do)
-(def-edebug-spec dolist
- ((symbolp form &optional form) cl-declarations body))
-(def-edebug-spec dotimes dolist)
-(def-edebug-spec do-symbols
- ((symbolp &optional form form) cl-declarations body))
-(def-edebug-spec do-all-symbols
- ((symbolp &optional form) cl-declarations body))
-
-;; Multiple values
-
-(def-edebug-spec multiple-value-list (form))
-(def-edebug-spec multiple-value-call (function-form body))
-(def-edebug-spec multiple-value-bind
- ((&rest symbolp) form body))
-(def-edebug-spec multiple-value-setq ((&rest symbolp) form))
-(def-edebug-spec multiple-value-prog1 (form body))
-
-;; Bindings
-
-(def-edebug-spec lexical-let let)
-(def-edebug-spec lexical-let* let)
-
-(def-edebug-spec psetq setq)
-(def-edebug-spec progv (form form body))
-
-(def-edebug-spec flet ((&rest (defun*)) cl-declarations body))
-(def-edebug-spec labels flet)
-
-(def-edebug-spec macrolet
- ((&rest (&define name (&rest arg) cl-declarations-or-string def-body))
- cl-declarations body))
-
-(def-edebug-spec symbol-macrolet
- ((&rest (symbol sexp)) cl-declarations body))
-
-(def-edebug-spec destructuring-bind
- (&define cl-macro-list def-form cl-declarations def-body))
-
-;; Setf
-
-(def-edebug-spec setf (&rest [place form])) ;; sexp is not specific enough
-(def-edebug-spec psetf setf)
-
-(def-edebug-spec letf ;; *not* available in Common Lisp
- ((&rest (gate place &optional form))
- body))
-(def-edebug-spec letf* letf)
-
-
-(def-edebug-spec defsetf
- (&define name
- [&or [symbolp &optional stringp]
- [cl-lambda-list (symbolp)]]
- cl-declarations-or-string def-body))
-
-(def-edebug-spec define-setf-method
- (&define name cl-lambda-list cl-declarations-or-string def-body))
-
-(def-edebug-spec define-modify-macro
- (&define name cl-lambda-list ;; should exclude &key
- symbolp &optional stringp))
-
-(def-edebug-spec callf (function* place &rest form))
-(def-edebug-spec callf2 (function* form place &rest form))
-
-;; Other operations on places
-
-(def-edebug-spec remf (place form))
-
-(def-edebug-spec incf (place &optional form))
-(def-edebug-spec decf incf)
-(def-edebug-spec push (form place)) ; different for CL
-(def-edebug-spec pushnew
- (form place &rest
- &or [[&or ":test" ":test-not" ":key"] function-form]
- [keywordp form]))
-(def-edebug-spec pop (place)) ; different for CL
-
-(def-edebug-spec shiftf (&rest place)) ;; really [&rest place] form
-(def-edebug-spec rotatef (&rest place))
-
-
-;; Functions with function args. These are only useful if the
-;; function arg is quoted with ' instead of function.
-
-(def-edebug-spec some (function-form form &rest form))
-(def-edebug-spec every some)
-(def-edebug-spec notany some)
-(def-edebug-spec notevery some)
-
-;; Mapping
-
-(def-edebug-spec map (form function-form form &rest form))
-(def-edebug-spec maplist (function-form form &rest form))
-(def-edebug-spec mapc maplist)
-(def-edebug-spec mapl maplist)
-(def-edebug-spec mapcan maplist)
-(def-edebug-spec mapcon maplist)
-
-;; Sequences
-
-(def-edebug-spec reduce (function-form form &rest form))
-
-;; Types and assertions
-
-(def-edebug-spec cl-type-spec (sexp)) ;; not worth the trouble to specify, yet.
-
-(def-edebug-spec deftype defmacro*)
-(def-edebug-spec check-type (place cl-type-spec &optional stringp))
-;; (def-edebug-spec assert (form &optional form stringp &rest form))
-(def-edebug-spec assert (form &rest form))
-(def-edebug-spec typecase (form &rest ([&or cl-type-spec "otherwise"] body)))
-(def-edebug-spec etypecase typecase)
-
-(def-edebug-spec ignore-errors t)
-
-;; Time of Evaluation
-
-(def-edebug-spec eval-when
- ((&rest &or "compile" "load" "eval") body))
-(def-edebug-spec load-time-value (form &optional &or "t" "nil"))
-
-;; Declarations
-
-(def-edebug-spec cl-decl-spec
- ((symbolp &rest sexp)))
-
-(def-edebug-spec cl-declarations
- (&rest ("declare" &rest cl-decl-spec)))
-
-(def-edebug-spec cl-declarations-or-string
- (&or stringp cl-declarations))
-
-(def-edebug-spec declaim (&rest cl-decl-spec))
-(def-edebug-spec declare (&rest cl-decl-spec)) ;; probably not needed.
-(def-edebug-spec locally (cl-declarations &rest form))
-(def-edebug-spec the (cl-type-spec form))
-
-;;======================================================
-;; Lambda things
-
-(def-edebug-spec cl-lambda-list
- (([&rest arg]
- [&optional ["&optional" cl-&optional-arg &rest cl-&optional-arg]]
- [&optional ["&rest" arg]]
- [&optional ["&key" [cl-&key-arg &rest cl-&key-arg]
- &optional "&allow-other-keys"]]
- [&optional ["&aux" &rest
- &or (symbolp &optional def-form) symbolp]]
- )))
-
-(def-edebug-spec cl-&optional-arg
- (&or (arg &optional def-form arg) arg))
-
-(def-edebug-spec cl-&key-arg
- (&or ([&or (symbolp arg) arg] &optional def-form arg) arg))
-
-;; The lambda list for macros is different from that of normal lambdas.
-;; Note that &environment is only allowed as first or last items in the
-;; top level list.
-
-(def-edebug-spec cl-macro-list
- (([&optional "&environment" arg]
- [&rest cl-macro-arg]
- [&optional ["&optional" &rest
- &or (cl-macro-arg &optional def-form cl-macro-arg) arg]]
- [&optional [[&or "&rest" "&body"] cl-macro-arg]]
- [&optional ["&key" [&rest
- [&or ([&or (symbolp cl-macro-arg) arg]
- &optional def-form cl-macro-arg)
- arg]]
- &optional "&allow-other-keys"]]
- [&optional ["&aux" &rest
- &or (symbolp &optional def-form) symbolp]]
- [&optional "&environment" arg]
- )))
-
-(def-edebug-spec cl-macro-arg
- (&or arg cl-macro-list1))
-
-(def-edebug-spec cl-macro-list1
- (([&optional "&whole" arg] ;; only allowed at lower levels
- [&rest cl-macro-arg]
- [&optional ["&optional" &rest
- &or (cl-macro-arg &optional def-form cl-macro-arg) arg]]
- [&optional [[&or "&rest" "&body"] cl-macro-arg]]
- [&optional ["&key" [&rest
- [&or ([&or (symbolp cl-macro-arg) arg]
- &optional def-form cl-macro-arg)
- arg]]
- &optional "&allow-other-keys"]]
- [&optional ["&aux" &rest
- &or (symbolp &optional def-form) symbolp]]
- . [&or arg nil])))
-
-
-(def-edebug-spec defun*
- ;; Same as defun but use cl-lambda-list.
- (&define [&or name
- ("setf" :name setf name)]
- cl-lambda-list
- cl-declarations-or-string
- [&optional ("interactive" interactive)]
- def-body))
-(def-edebug-spec defsubst* defun*)
-
-(def-edebug-spec defmacro*
- (&define name cl-macro-list cl-declarations-or-string def-body))
-(def-edebug-spec define-compiler-macro defmacro*)
-
-
-(def-edebug-spec function*
- (&or symbolp cl-lambda-expr))
-
-(def-edebug-spec cl-lambda-expr
- (&define ("lambda" cl-lambda-list
- ;;cl-declarations-or-string
- ;;[&optional ("interactive" interactive)]
- def-body)))
-
-;; Redefine function-form to also match function*
-(def-edebug-spec function-form
- ;; form at the end could also handle "function",
- ;; but recognize it specially to avoid wrapping function forms.
- (&or ([&or "quote" "function"] &or symbolp lambda-expr)
- ("function*" function*)
- form))
-
-;;======================================================
-;; Structures
-;; (def-edebug-spec defstruct (&rest sexp)) would be sufficient, but...
-
-;; defstruct may contain forms that are evaluated when a structure is created.
-(def-edebug-spec defstruct
- (&define ; makes top-level form not be wrapped
- [&or symbolp
- (gate
- symbolp &rest
- (&or [":conc-name" symbolp]
- [":constructor" symbolp &optional cl-lambda-list]
- [":copier" symbolp]
- [":predicate" symbolp]
- [":include" symbolp &rest sexp];; not finished
- ;; The following are not supported.
- ;; [":print-function" ...]
- ;; [":type" ...]
- ;; [":initial-offset" ...]
- ))]
- [&optional stringp]
- ;; All the above is for the following def-form.
- &rest &or symbolp (symbolp def-form &optional ":read-only" sexp)))
-
-;;======================================================
-;; Loop
-
-;; The loop macro is very complex, and a full spec is found below.
-;; The following spec only minimally specifies that
-;; parenthesized forms are executable, but single variables used as
-;; expressions will be missed. You may want to use this if the full
-;; spec causes problems for you.
-
-(def-edebug-spec loop
- (&rest &or symbolp form))
-
-;; Below is a complete spec for loop, in several parts that correspond
-;; to the syntax given in CLtL2. The specs do more than specify where
-;; the forms are; it also specifies, as much as Edebug allows, all the
-;; syntactically valid loop clauses. The disadvantage of this
-;; completeness is rigidity, but the "for ... being" clause allows
-;; arbitrary extensions of the form: [symbolp &rest &or symbolp form].
-
-(def-edebug-spec loop
- ([&optional ["named" symbolp]]
- [&rest
- &or
- ["repeat" form]
- loop-for-as
- loop-with
- loop-initial-final]
- [&rest loop-clause]
- ))
-
-(def-edebug-spec loop-with
- ("with" loop-var
- loop-type-spec
- [&optional ["=" form]]
- &rest ["and" loop-var
- loop-type-spec
- [&optional ["=" form]]]))
-
-(def-edebug-spec loop-for-as
- ([&or "for" "as"] loop-for-as-subclause
- &rest ["and" loop-for-as-subclause]))
-
-(def-edebug-spec loop-for-as-subclause
- (loop-var
- loop-type-spec
- &or
- [[&or "in" "on" "in-ref" "across-ref"]
- form &optional ["by" function-form]]
-
- ["=" form &optional ["then" form]]
- ["across" form]
- ["being"
- [&or "the" "each"]
- &or
- [[&or "element" "elements"]
- [&or "of" "in" "of-ref"] form
- &optional "using" ["index" symbolp]];; is this right?
- [[&or "hash-key" "hash-keys"
- "hash-value" "hash-values"]
- [&or "of" "in"]
- hash-table-p &optional ["using" ([&or "hash-value" "hash-values"
- "hash-key" "hash-keys"] sexp)]]
-
- [[&or "symbol" "present-symbol" "external-symbol"
- "symbols" "present-symbols" "external-symbols"]
- [&or "in" "of"] package-p]
-
- ;; Extensions for Emacs Lisp, including Lucid Emacs.
- [[&or "frame" "frames"
- "screen" "screens"
- "buffer" "buffers"]]
-
- [[&or "window" "windows"]
- [&or "of" "in"] form]
-
- [[&or "overlay" "overlays"
- "extent" "extents"]
- [&or "of" "in"] form
- &optional [[&or "from" "to"] form]]
-
- [[&or "interval" "intervals"]
- [&or "in" "of"] form
- &optional [[&or "from" "to"] form]
- ["property" form]]
-
- [[&or "key-code" "key-codes"
- "key-seq" "key-seqs"
- "key-binding" "key-bindings"]
- [&or "in" "of"] form
- &optional ["using" ([&or "key-code" "key-codes"
- "key-seq" "key-seqs"
- "key-binding" "key-bindings"]
- sexp)]]
- ;; For arbitrary extensions, recognize anything else.
- [symbolp &rest &or symbolp form]
- ]
-
- ;; arithmetic - must be last since all parts are optional.
- [[&optional [[&or "from" "downfrom" "upfrom"] form]]
- [&optional [[&or "to" "downto" "upto" "below" "above"] form]]
- [&optional ["by" form]]
- ]))
-
-(def-edebug-spec loop-initial-final
- (&or ["initially"
- ;; [&optional &or "do" "doing"] ;; CLtL2 doesn't allow this.
- &rest loop-non-atomic-expr]
- ["finally" &or
- [[&optional &or "do" "doing"] &rest loop-non-atomic-expr]
- ["return" form]]))
-
-(def-edebug-spec loop-and-clause
- (loop-clause &rest ["and" loop-clause]))
-
-(def-edebug-spec loop-clause
- (&or
- [[&or "while" "until" "always" "never" "thereis"] form]
-
- [[&or "collect" "collecting"
- "append" "appending"
- "nconc" "nconcing"
- "concat" "vconcat"] form
- [&optional ["into" loop-var]]]
-
- [[&or "count" "counting"
- "sum" "summing"
- "maximize" "maximizing"
- "minimize" "minimizing"] form
- [&optional ["into" loop-var]]
- loop-type-spec]
-
- [[&or "if" "when" "unless"]
- form loop-and-clause
- [&optional ["else" loop-and-clause]]
- [&optional "end"]]
-
- [[&or "do" "doing"] &rest loop-non-atomic-expr]
-
- ["return" form]
- loop-initial-final
- ))
-
-(def-edebug-spec loop-non-atomic-expr
- ([&not atom] form))
-
-(def-edebug-spec loop-var
- ;; The symbolp must be last alternative to recognize e.g. (a b . c)
- ;; loop-var =>
- ;; (loop-var . [&or nil loop-var])
- ;; (symbolp . [&or nil loop-var])
- ;; (symbolp . loop-var)
- ;; (symbolp . (symbolp . [&or nil loop-var]))
- ;; (symbolp . (symbolp . loop-var))
- ;; (symbolp . (symbolp . symbolp)) == (symbolp symbolp . symbolp)
- (&or (loop-var . [&or nil loop-var]) [gate symbolp]))
-
-(def-edebug-spec loop-type-spec
- (&optional ["of-type" loop-d-type-spec]))
-
-(def-edebug-spec loop-d-type-spec
- (&or (loop-d-type-spec . [&or nil loop-d-type-spec]) cl-type-spec))
-
-;;; cl-specs.el ends here
diff --git a/lisp/emacs-lisp/cl.el b/lisp/emacs-lisp/cl.el
index 971024fcbba..137dd1bfb84 100644
--- a/lisp/emacs-lisp/cl.el
+++ b/lisp/emacs-lisp/cl.el
@@ -120,6 +120,7 @@ a future Emacs interpreter will be able to use it.")
"Increment PLACE by X (1 by default).
PLACE may be a symbol, or any generalized variable allowed by `setf'.
The return value is the incremented value of PLACE."
+ (declare (debug (place &optional form)))
(if (symbolp place)
(list 'setq place (if x (list '+ place x) (list '1+ place)))
(list 'callf '+ place (or x 1))))
@@ -128,6 +129,7 @@ The return value is the incremented value of PLACE."
"Decrement PLACE by X (1 by default).
PLACE may be a symbol, or any generalized variable allowed by `setf'.
The return value is the decremented value of PLACE."
+ (declare (debug incf))
(if (symbolp place)
(list 'setq place (if x (list '- place x) (list '1- place)))
(list 'callf '- place (or x 1))))
@@ -140,6 +142,7 @@ The return value is the decremented value of PLACE."
Analogous to (prog1 (car PLACE) (setf PLACE (cdr PLACE))), though more
careful about evaluating each argument only once and in the right order.
PLACE may be a symbol, or any generalized variable allowed by `setf'."
+ (declare (debug (place)))
(if (symbolp place)
(list 'car (list 'prog1 place (list 'setq place (list 'cdr place))))
(cl-do-pop place)))
@@ -149,6 +152,7 @@ PLACE may be a symbol, or any generalized variable allowed by `setf'."
Analogous to (setf PLACE (cons X PLACE)), though more careful about
evaluating each argument only once and in the right order. PLACE may
be a symbol, or any generalized variable allowed by `setf'."
+ (declare (debug (form place)))
(if (symbolp place) (list 'setq place (list 'cons x place))
(list 'callf2 'cons x place)))
@@ -158,6 +162,10 @@ Like (push X PLACE), except that the list is unmodified if X is `eql' to
an element already on the list.
\nKeywords supported: :test :test-not :key
\n(fn X PLACE [KEYWORD VALUE]...)"
+ (declare (debug
+ (form place &rest
+ &or [[&or ":test" ":test-not" ":key"] function-form]
+ [keywordp form])))
(if (symbolp place)
(if (null keys)
`(let ((x ,x))
@@ -304,7 +312,7 @@ definitions to shadow the loaded ones for use in file byte-compilation.
(while (>= (decf i) 0) (setq v (+ (* v 3) (aref time i))))
v))
-(defvar *gensym-counter* (* (logand (cl-random-time) 1023) 100))
+(defvar cl--gensym-counter (* (logand (cl-random-time) 1023) 100))
;;; Numbers.
@@ -331,7 +339,7 @@ always returns nil."
"Return t if INTEGER is even."
(eq (logand integer 1) 0))
-(defvar *random-state* (vector 'cl-random-state-tag -1 30 (cl-random-time)))
+(defvar cl--random-state (vector 'cl-random-state-tag -1 30 (cl-random-time)))
(defconst most-positive-float nil
"The largest value that a Lisp float can hold.
@@ -608,7 +616,7 @@ Otherwise, return LIST unmodified.
(if (memq cl-item cl-list) cl-list (cons cl-item cl-list)))
((or (equal cl-keys '(:test equal)) (null cl-keys))
(if (member cl-item cl-list) cl-list (cons cl-item cl-list)))
- (t (apply 'cl-adjoin cl-item cl-list cl-keys))))
+ (t (apply 'cl--adjoin cl-item cl-list cl-keys))))
(defun subst (cl-new cl-old cl-tree &rest cl-keys)
"Substitute NEW for OLD everywhere in TREE (non-destructively).
@@ -643,47 +651,20 @@ If ALIST is non-nil, the new pairs are prepended to it."
;;; Miscellaneous.
-;; Define data for indentation and edebug.
-(dolist (entry
- '(((defun* defmacro*) 2)
- ((function*) nil
- (&or symbolp ([&optional 'macro] 'lambda (&rest sexp) &rest form)))
- ((eval-when) 1 (sexp &rest form))
- ((declare) nil (&rest sexp))
- ((the) 1 (sexp &rest form))
- ((case ecase typecase etypecase) 1 (form &rest (sexp &rest form)))
- ((block return-from) 1 (sexp &rest form))
- ((return) nil (&optional form))
- ((do do*) 2 ((&rest &or symbolp (symbolp &optional form form))
- (form &rest form)
- &rest form))
- ((do-symbols) 1 ((symbolp form &optional form form) &rest form))
- ((do-all-symbols) 1 ((symbolp form &optional form) &rest form))
- ((psetq setf psetf) nil edebug-setq-form)
- ((progv) 2 (&rest form))
- ((flet labels macrolet) 1
- ((&rest (sexp sexp &rest form)) &rest form))
- ((symbol-macrolet lexical-let lexical-let*) 1
- ((&rest &or symbolp (symbolp form)) &rest form))
- ((multiple-value-bind) 2 ((&rest symbolp) &rest form))
- ((multiple-value-setq) 1 ((&rest symbolp) &rest form))
- ((incf decf remf pushnew shiftf rotatef) nil (&rest form))
- ((letf letf*) 1 ((&rest (&rest form)) &rest form))
- ((callf destructuring-bind) 2 (sexp form &rest form))
- ((callf2) 3 (sexp form form &rest form))
- ((loop) nil (&rest &or symbolp form))
- ((ignore-errors) 0 (&rest form))))
- (dolist (func (car entry))
- (put func 'lisp-indent-function (nth 1 entry))
- (put func 'lisp-indent-hook (nth 1 entry))
- (or (get func 'edebug-form-spec)
- (put func 'edebug-form-spec (nth 2 entry)))))
-
;; Autoload the other portions of the package.
;; We want to replace the basic versions of dolist, dotimes, declare below.
(fmakunbound 'dolist)
(fmakunbound 'dotimes)
(fmakunbound 'declare)
+;;;###autoload
+(progn
+ ;; Autoload, so autoload.el and font-lock can use it even when CL
+ ;; is not loaded.
+ (put 'defun* 'doc-string-elt 3)
+ (put 'defmacro* 'doc-string-elt 3)
+ (put 'defsubst 'doc-string-elt 3)
+ (put 'defstruct 'doc-string-elt 2))
+
(load "cl-loaddefs" nil 'quiet)
;; This goes here so that cl-macs can find it if it loads right now.
diff --git a/lisp/emacs-lisp/copyright.el b/lisp/emacs-lisp/copyright.el
index 09b456b54ba..8e96d95c5dd 100644
--- a/lisp/emacs-lisp/copyright.el
+++ b/lisp/emacs-lisp/copyright.el
@@ -110,7 +110,7 @@ When this is `function', only ask when called non-interactively."
;; This is a defvar rather than a defconst, because the year can
;; change during the Emacs session.
-(defvar copyright-current-year (substring (current-time-string) -4)
+(defvar copyright-current-year (format-time-string "%Y")
"String representing the current year.")
(defsubst copyright-limit () ; re-search-forward BOUND
@@ -181,8 +181,7 @@ skips to the end of all the years."
;; This uses the match-data from copyright-find-copyright/end.
(goto-char (match-end 1))
(copyright-find-end)
- ;; Note that `current-time-string' isn't locale-sensitive.
- (setq copyright-current-year (substring (current-time-string) -4))
+ (setq copyright-current-year (format-time-string "%Y"))
(unless (string= (buffer-substring (- (match-end 3) 2) (match-end 3))
(substring copyright-current-year -2))
(if (or noquery
@@ -347,7 +346,7 @@ independently replaces consecutive years with a range."
"Insert a copyright by $ORGANIZATION notice at cursor."
"Company: "
comment-start
- "Copyright (C) " `(substring (current-time-string) -4) " by "
+ "Copyright (C) " `(format-time-string "%Y") " by "
(or (getenv "ORGANIZATION")
str)
'(if (copyright-offset-too-large-p)
diff --git a/lisp/emacs-lisp/easy-mmode.el b/lisp/emacs-lisp/easy-mmode.el
index 0d6716a2e63..a11f213e646 100644
--- a/lisp/emacs-lisp/easy-mmode.el
+++ b/lisp/emacs-lisp/easy-mmode.el
@@ -142,7 +142,8 @@ For example, you could write
(define-minor-mode foo-mode \"If enabled, foo on you!\"
:lighter \" Foo\" :require 'foo :global t :group 'hassle :version \"27.5\"
...BODY CODE...)"
- (declare (debug (&define name stringp
+ (declare (doc-string 2)
+ (debug (&define name stringp
[&optional [&not keywordp] sexp
&optional [&not keywordp] sexp
&optional [&not keywordp] sexp]
@@ -335,7 +336,7 @@ enabled, then disabling and reenabling MODE should make MODE work
correctly with the current major mode. This is important to
prevent problems with derived modes, that is, major modes that
call another major mode in their body."
-
+ (declare (doc-string 2))
(let* ((global-mode-name (symbol-name global-mode))
(pretty-name (easy-mmode-pretty-mode-name mode))
(pretty-global-name (easy-mmode-pretty-mode-name global-mode))
@@ -572,8 +573,6 @@ BODY is executed after moving to the destination location."
(when was-narrowed (,narrowfun)))))))
(unless name (setq name base-name))
`(progn
- (add-to-list 'debug-ignored-errors
- ,(concat "^No \\(previous\\|next\\) " (regexp-quote name)))
(defun ,next-sym (&optional count)
,(format "Go to the next COUNT'th %s." name)
(interactive "p")
@@ -584,7 +583,7 @@ BODY is executed after moving to the destination location."
`(if (not (re-search-forward ,re nil t count))
(if (looking-at ,re)
(goto-char (or ,(if endfun `(,endfun)) (point-max)))
- (error "No next %s" ,name))
+ (user-error "No next %s" ,name))
(goto-char (match-beginning 0))
(when (and (eq (current-buffer) (window-buffer (selected-window)))
(called-interactively-p 'interactive))
@@ -603,7 +602,7 @@ BODY is executed after moving to the destination location."
(if (< count 0) (,next-sym (- count))
,(funcall when-narrowed
`(unless (re-search-backward ,re nil t count)
- (error "No previous %s" ,name)))
+ (user-error "No previous %s" ,name)))
,@body))
(put ',prev-sym 'definition-name ',base))))
diff --git a/lisp/emacs-lisp/edebug.el b/lisp/emacs-lisp/edebug.el
index f47feebe5d2..2c7e7cf6362 100644
--- a/lisp/emacs-lisp/edebug.el
+++ b/lisp/emacs-lisp/edebug.el
@@ -1938,7 +1938,6 @@ expressions; a `progn' form will be returned enclosing these forms."
;;;; Edebug Form Specs
;;; ==========================================================
-;;; See cl-specs.el for common lisp specs.
;;;;* Spec for def-edebug-spec
;;; Out of date.
@@ -4437,13 +4436,6 @@ With prefix argument, make it a temporary breakpoint."
;;; Autoloading of Edebug accessories
-(if (featurep 'cl)
- (add-hook 'edebug-setup-hook
- (function (lambda () (require 'cl-specs))))
- ;; The following causes cl-specs to be loaded if you load cl.el.
- (add-hook 'cl-load-hook
- (function (lambda () (require 'cl-specs)))))
-
;; edebug-cl-read and cl-read are available from liberte@cs.uiuc.edu
(if (featurep 'cl-read)
(add-hook 'edebug-setup-hook
diff --git a/lisp/emacs-lisp/ewoc.el b/lisp/emacs-lisp/ewoc.el
index 4fd87209b38..9e214a9703c 100644
--- a/lisp/emacs-lisp/ewoc.el
+++ b/lisp/emacs-lisp/ewoc.el
@@ -1,4 +1,4 @@
-;;; ewoc.el --- utility to maintain a view of a list of objects in a buffer
+;;; ewoc.el --- utility to maintain a view of a list of objects in a buffer -*- lexical-binding: t -*-
;; Copyright (C) 1991-2012 Free Software Foundation, Inc.
@@ -216,10 +216,9 @@ NODE and leaving the new node's start there. Return the new node."
(ewoc--adjust m (point) R dll)))
(defun ewoc--wrap (func)
- (lexical-let ((ewoc--user-pp func))
- (lambda (data)
- (funcall ewoc--user-pp data)
- (insert "\n"))))
+ (lambda (data)
+ (funcall func data)
+ (insert "\n")))
;;; ===========================================================================
diff --git a/lisp/emacs-lisp/generic.el b/lisp/emacs-lisp/generic.el
index 6667a101865..80b6122822e 100644
--- a/lisp/emacs-lisp/generic.el
+++ b/lisp/emacs-lisp/generic.el
@@ -97,10 +97,11 @@
;; Internal Variables
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+(define-obsolete-variable-alias 'generic-font-lock-defaults
+ 'generic-font-lock-keywords "22.1")
(defvar generic-font-lock-keywords nil
"Keywords for `font-lock-defaults' in a generic mode.")
(make-variable-buffer-local 'generic-font-lock-keywords)
-(define-obsolete-variable-alias 'generic-font-lock-defaults 'generic-font-lock-keywords "22.1")
;;;###autoload
(defvar generic-mode-list nil
@@ -150,7 +151,8 @@ mode hook `MODE-hook'.
See the file generic-x.el for some examples of `define-generic-mode'."
(declare (debug (sexp def-form def-form def-form form def-form
[&optional stringp] &rest [keywordp form]))
- (indent 1))
+ (indent 1)
+ (doc-string 7))
;; Backward compatibility.
(when (eq (car-safe mode) 'quote)
diff --git a/lisp/emacs-lisp/lisp-mode.el b/lisp/emacs-lisp/lisp-mode.el
index 95eb8c963be..dfdac92ae32 100644
--- a/lisp/emacs-lisp/lisp-mode.el
+++ b/lisp/emacs-lisp/lisp-mode.el
@@ -136,34 +136,14 @@ It has `lisp-mode-abbrev-table' as its parent."
;; This was originally in autoload.el and is still used there.
(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)
-(put 'deftype 'doc-string-elt 3)
(put 'defconst 'doc-string-elt 3)
(put 'defmacro 'doc-string-elt 3)
-(put 'defmacro* 'doc-string-elt 3)
-(put 'defsubst 'doc-string-elt 3)
-(put 'defstruct 'doc-string-elt 2)
-(put 'define-skeleton 'doc-string-elt 2)
-(put 'define-derived-mode 'doc-string-elt 4)
-(put 'define-compilation-mode 'doc-string-elt 3)
-(put 'easy-mmode-define-minor-mode 'doc-string-elt 2)
-(put 'define-minor-mode 'doc-string-elt 2)
-(put 'easy-mmode-define-global-mode 'doc-string-elt 2)
-(put 'define-global-minor-mode 'doc-string-elt 2)
-(put 'define-globalized-minor-mode 'doc-string-elt 2)
-(put 'define-generic-mode 'doc-string-elt 7)
-(put 'define-ibuffer-filter 'doc-string-elt 2)
-(put 'define-ibuffer-op 'doc-string-elt 3)
-(put 'define-ibuffer-sorter 'doc-string-elt 2)
(put 'lambda 'doc-string-elt 2)
(put 'defalias 'doc-string-elt 3)
(put 'defvaralias 'doc-string-elt 3)
(put 'define-category 'doc-string-elt 2)
-(put 'define-overloadable-function 'doc-string-elt 3)
(defvar lisp-doc-string-elt-property 'doc-string-elt
"The symbol property that holds the docstring position info.")
diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el
index 4b868f72899..66370c643bf 100644
--- a/lisp/emacs-lisp/package.el
+++ b/lisp/emacs-lisp/package.el
@@ -469,8 +469,11 @@ NAME and VERSION are both strings."
Optional arg MIN-VERSION, if non-nil, should be a version list
specifying the minimum acceptable version."
(require 'finder-inf nil t) ; For `package--builtins'.
- (let ((elt (assq package package--builtins)))
- (and elt (version-list-<= min-version (package-desc-vers (cdr elt))))))
+ (if (eq package 'emacs)
+ (version-list-<= min-version (version-to-list emacs-version))
+ (let ((elt (assq package package--builtins)))
+ (and elt (version-list-<= min-version
+ (package-desc-vers (cdr elt)))))))
;; This function goes ahead and activates a newer version of a package
;; if an older one was already activated. This is not ideal; we'd at
@@ -943,7 +946,7 @@ If the buffer does not contain a conforming package, signal an
error. If there is a package, narrow the buffer to the file's
boundaries."
(goto-char (point-min))
- (unless (re-search-forward "^;;; \\([^ ]*\\)\\.el --- \\(.*\\)$" nil t)
+ (unless (re-search-forward "^;;; \\([^ ]*\\)\\.el ---[ \t]*\\(.*?\\)[ \t]*\\(-\\*-.*-\\*-[ \t]*\\)?$" nil t)
(error "Packages lacks a file header"))
(let ((file-name (match-string-no-properties 1))
(desc (match-string-no-properties 2))
diff --git a/lisp/emacs-lisp/pcase.el b/lisp/emacs-lisp/pcase.el
index afbc5df85ce..67b19443967 100644
--- a/lisp/emacs-lisp/pcase.el
+++ b/lisp/emacs-lisp/pcase.el
@@ -113,7 +113,8 @@ like `(,a . ,(pred (< a))) or, with more checks:
"Like `let*' but where you can use `pcase' patterns for bindings.
BODY should be an expression, and BINDINGS should be a list of bindings
of the form (UPAT EXP)."
- (declare (indent 1) (debug let))
+ (declare (indent 1)
+ (debug ((&rest &or (sexp &optional form) symbolp) body)))
(cond
((null bindings) (if (> (length body) 1) `(progn ,@body) (car body)))
((pcase--trivial-upat-p (caar bindings))
@@ -132,7 +133,7 @@ of the form (UPAT EXP)."
"Like `let' but where you can use `pcase' patterns for bindings.
BODY should be a list of expressions, and BINDINGS should be a list of bindings
of the form (UPAT EXP)."
- (declare (indent 1) (debug let))
+ (declare (indent 1) (debug pcase-let*))
(if (null (cdr bindings))
`(pcase-let* ,bindings ,@body)
(let ((matches '()))
@@ -148,6 +149,7 @@ of the form (UPAT EXP)."
`(let ,(nreverse bindings) (pcase-let* ,matches ,@body)))))
(defmacro pcase-dolist (spec &rest body)
+ (declare (indent 1))
(if (pcase--trivial-upat-p (car spec))
`(dolist ,spec ,@body)
(let ((tmpvar (make-symbol "x")))
@@ -217,10 +219,10 @@ of the form (UPAT EXP)."
(cdr case))))
cases))))
(if (null defs) main
- `(let ,defs ,main))))
+ (pcase--let* defs main))))
(defun pcase-codegen (code vars)
- `(let ,(mapcar (lambda (b) (list (car b) (cdr b))) vars)
+ `(let* ,(mapcar (lambda (b) (list (car b) (cdr b))) vars)
,@code))
(defun pcase--small-branch-p (code)
@@ -255,6 +257,13 @@ of the form (UPAT EXP)."
((memq (car-safe then) '(if cond)) (pcase--if `(not ,test) else then))
(t `(if ,test ,then ,else))))
+;; Again, try and reduce nesting.
+(defun pcase--let* (binders body)
+ (if (eq (car-safe body) 'let*)
+ `(let* ,(append binders (nth 1 body))
+ ,@(nthcdr 2 body))
+ `(let* ,binders ,body)))
+
(defun pcase--upat (qpattern)
(cond
((eq (car-safe qpattern) '\,) (cadr qpattern))
@@ -433,26 +442,26 @@ MATCH is the pattern that needs to be matched, of the form:
(defun pcase--split-pred (upat pat)
;; FIXME: For predicates like (pred (> a)), two such predicates may
;; actually refer to different variables `a'.
- (cond
- ((equal upat pat) (cons :pcase--succeed :pcase--fail))
- ((and (eq 'pred (car upat))
- (eq 'pred (car-safe pat))
- (or (member (cons (cadr upat) (cadr pat))
- pcase-mutually-exclusive-predicates)
- (member (cons (cadr pat) (cadr upat))
- pcase-mutually-exclusive-predicates)))
- (cons :pcase--fail nil))
- ;; ((and (eq 'pred (car upat))
- ;; (eq '\` (car-safe pat))
- ;; (symbolp (cadr upat))
- ;; (or (symbolp (cadr pat)) (stringp (cadr pat)) (numberp (cadr pat)))
- ;; (get (cadr upat) 'side-effect-free)
- ;; (progn (message "Trying predicate %S" (cadr upat))
- ;; (ignore-errors
- ;; (funcall (cadr upat) (cadr pat)))))
- ;; (message "Simplify pred %S against %S" upat pat)
- ;; (cons nil :pcase--fail))
- ))
+ (let (test)
+ (cond
+ ((equal upat pat) (cons :pcase--succeed :pcase--fail))
+ ((and (eq 'pred (car upat))
+ (eq 'pred (car-safe pat))
+ (or (member (cons (cadr upat) (cadr pat))
+ pcase-mutually-exclusive-predicates)
+ (member (cons (cadr pat) (cadr upat))
+ pcase-mutually-exclusive-predicates)))
+ (cons :pcase--fail nil))
+ ((and (eq 'pred (car upat))
+ (eq '\` (car-safe pat))
+ (symbolp (cadr upat))
+ (or (symbolp (cadr pat)) (stringp (cadr pat)) (numberp (cadr pat)))
+ (get (cadr upat) 'side-effect-free)
+ (ignore-errors
+ (setq test (list (funcall (cadr upat) (cadr pat))))))
+ (if (car test)
+ (cons nil :pcase--fail)
+ (cons :pcase--fail nil))))))
(defun pcase--fgrep (vars sexp)
"Check which of the symbols VARS appear in SEXP."
@@ -548,7 +557,8 @@ Otherwise, it defers to REST which is a list of branches of the form
(let ((newsym (make-symbol "x")))
(push (list newsym sym) env)
(setq sym newsym)))
- (if (functionp exp) `(,exp ,sym)
+ (if (functionp exp)
+ `(funcall #',exp ,sym)
`(,@exp ,sym)))))
(if (null vs)
call
@@ -673,16 +683,22 @@ Otherwise, it defers to REST which is a list of branches of the form
;; The byte-compiler could do that for us, but it would have to pay
;; attention to the `consp' test in order to figure out that car/cdr
;; can't signal errors and our byte-compiler is not that clever.
- `(let (,@(if (get syma 'pcase-used) `((,syma (car ,sym))))
+ ;; FIXME: Some of those let bindings occur too early (they are used in
+ ;; `then-body', but only within some sub-branch).
+ (pcase--let*
+ `(,@(if (get syma 'pcase-used) `((,syma (car ,sym))))
,@(if (get symd 'pcase-used) `((,symd (cdr ,sym)))))
- ,then-body)
+ then-body)
(pcase--u else-rest))))
((or (integerp qpat) (symbolp qpat) (stringp qpat))
(let* ((splitrest (pcase--split-rest
sym (apply-partially 'pcase--split-equal qpat) rest))
(then-rest (car splitrest))
(else-rest (cdr splitrest)))
- (pcase--if `(,(if (stringp qpat) #'equal #'eq) ,sym ',qpat)
+ (pcase--if (cond
+ ((stringp qpat) `(equal ,sym ,qpat))
+ ((null qpat) `(null ,sym))
+ (t `(eq ,sym ',qpat)))
(pcase--u1 matches code vars then-rest)
(pcase--u else-rest))))
(t (error "Unknown QPattern %s" qpat))))
diff --git a/lisp/emacs-lisp/smie.el b/lisp/emacs-lisp/smie.el
index cafa1942a09..01274b7ba20 100644
--- a/lisp/emacs-lisp/smie.el
+++ b/lisp/emacs-lisp/smie.el
@@ -688,6 +688,7 @@ Possible return values:
is too high. FORW-LEVEL is the forw-level of TOKEN,
POS is its start position in the buffer.
(t POS TOKEN): same thing when we bump on the wrong side of a paren.
+ Instead of t, the `car' can also be some other non-nil non-number value.
(nil POS TOKEN): we skipped over a paren-like pair.
nil: we skipped over an identifier, matched parentheses, ..."
(catch 'return
@@ -728,7 +729,8 @@ Possible return values:
(if (and halfsexp (numberp (funcall op-forw toklevels)))
(push toklevels levels)
(throw 'return
- (prog1 (list (or (car toklevels) t) (point) token)
+ (prog1 (list (or (funcall op-forw toklevels) t)
+ (point) token)
(goto-char pos)))))
(t
(let ((lastlevels levels))
@@ -773,7 +775,8 @@ Possible return values:
((and lastlevels
(smie--associative-p (car lastlevels)))
(throw 'return
- (prog1 (list (or (car toklevels) t) (point) token)
+ (prog1 (list (or (funcall op-forw toklevels) t)
+ (point) token)
(goto-char pos))))
;; - it's an associative operator within a larger construct
;; (e.g. an "elsif"), so we should just ignore it and keep
@@ -793,6 +796,7 @@ Possible return values:
is too high. LEFT-LEVEL is the left-level of TOKEN,
POS is its start position in the buffer.
(t POS TOKEN): same thing but for an open-paren or the beginning of buffer.
+ Instead of t, the `car' can also be some other non-nil non-number value.
(nil POS TOKEN): we skipped over a paren-like pair.
nil: we skipped over an identifier, matched parentheses, ..."
(smie-next-sexp
@@ -812,7 +816,8 @@ Possible return values:
(RIGHT-LEVEL POS TOKEN): we couldn't skip TOKEN because its left-level
is too high. RIGHT-LEVEL is the right-level of TOKEN,
POS is its end position in the buffer.
- (t POS TOKEN): same thing but for an open-paren or the beginning of buffer.
+ (t POS TOKEN): same thing but for a close-paren or the end of buffer.
+ Instead of t, the `car' can also be some other non-nil non-number value.
(nil POS TOKEN): we skipped over a paren-like pair.
nil: we skipped over an identifier, matched parentheses, ..."
(smie-next-sexp
@@ -1074,6 +1079,16 @@ the beginning of a line."
"Return non-nil if the current token is the first on the line."
(save-excursion (skip-chars-backward " \t") (bolp)))
+(defun smie-indent--bolp-1 ()
+ ;; Like smie-indent--bolp but also returns non-nil if it's the first
+ ;; non-comment token. Maybe we should simply always use this?
+ "Return non-nil if the current token is the first on the line.
+Comments are treated as spaces."
+ (let ((bol (line-beginning-position)))
+ (save-excursion
+ (forward-comment (- (point)))
+ (<= (point) bol))))
+
;; Dynamically scoped.
(defvar smie--parent) (defvar smie--after) (defvar smie--token)
@@ -1350,9 +1365,12 @@ should not be computed on the basis of the following token."
;; - middle-of-line: "trust current position".
(cond
((smie-indent--rule :before token))
- ((smie-indent--bolp) ;I.e. non-virtual indent.
+ ((smie-indent--bolp-1) ;I.e. non-virtual indent.
;; For an open-paren-like thingy at BOL, always indent only
;; based on other rules (typically smie-indent-after-keyword).
+ ;; FIXME: we do the same if after a comment, since we may be trying
+ ;; to compute the indentation of this comment and we shouldn't indent
+ ;; based on the indentation of subsequent code.
nil)
(t
;; By default use point unless we're hanging.
@@ -1453,6 +1471,12 @@ should not be computed on the basis of the following token."
(save-excursion
(forward-comment (point-max))
(skip-chars-forward " \t\r\n")
+ ;; FIXME: We assume here that smie-indent-calculate will compute the
+ ;; indentation of the next token based on text before the comment, but
+ ;; this is not guaranteed, so maybe we should let
+ ;; smie-indent-calculate return some info about which buffer position
+ ;; was used as the "indentation base" and check that this base is
+ ;; before `pos'.
(smie-indent-calculate))))
(defun smie-indent-comment-continue ()
diff --git a/lisp/emacs-lisp/syntax.el b/lisp/emacs-lisp/syntax.el
index 611a766922a..583d0b151c9 100644
--- a/lisp/emacs-lisp/syntax.el
+++ b/lisp/emacs-lisp/syntax.el
@@ -1,4 +1,4 @@
-;;; syntax.el --- helper functions to find syntactic context
+;;; syntax.el --- helper functions to find syntactic context -*- lexical-binding: t -*-
;; Copyright (C) 2000-2012 Free Software Foundation, Inc.
@@ -274,13 +274,12 @@ Note: back-references in REGEXPs do not work."
"Propertize for syntax in START..END using font-lock syntax.
KEYWORDS obeys the format used in `font-lock-syntactic-keywords'.
The return value is a function suitable for `syntax-propertize-function'."
- (lexical-let ((keywords keywords))
- (lambda (start end)
- (with-no-warnings
- (let ((font-lock-syntactic-keywords keywords))
- (font-lock-fontify-syntactic-keywords-region start end)
- ;; In case it was eval'd/compiled.
- (setq keywords font-lock-syntactic-keywords))))))
+ (lambda (start end)
+ (with-no-warnings
+ (let ((font-lock-syntactic-keywords keywords))
+ (font-lock-fontify-syntactic-keywords-region start end)
+ ;; In case it was eval'd/compiled.
+ (setq keywords font-lock-syntactic-keywords)))))
(defun syntax-propertize (pos)
"Ensure that syntax-table properties are set until POS."
diff --git a/lisp/emacs-lisp/tabulated-list.el b/lisp/emacs-lisp/tabulated-list.el
index 9439fba2b86..a56a7619ea9 100644
--- a/lisp/emacs-lisp/tabulated-list.el
+++ b/lisp/emacs-lisp/tabulated-list.el
@@ -22,22 +22,31 @@
;;; Commentary:
-;; This file defines `tabulated-list-mode', a generic major mode for displaying
-;; lists of tabulated data, intended for other major modes to inherit from. It
-;; provides several utility routines, e.g. for pretty-printing lines of
-;; tabulated data to fit into the appropriate columns.
+;; This file defines Tabulated List mode, a generic major mode for
+;; displaying lists of tabulated data, intended for other major modes
+;; to inherit from. It provides several utility routines, e.g. for
+;; pretty-printing lines of tabulated data to fit into the appropriate
+;; columns.
;; For usage information, see the documentation of `tabulated-list-mode'.
-;; This package originated from Tom Tromey's Package Menu mode, extended and
-;; generalized to be used by other modes.
+;; This package originated from Tom Tromey's Package Menu mode,
+;; extended and generalized to be used by other modes.
;;; Code:
+;; The reason `tabulated-list-format' and other variables are
+;; permanent-local is to make it convenient to switch to a different
+;; major mode, switch back, and have the original Tabulated List data
+;; still valid. See, for example, ebuff-menu.el.
+
(defvar tabulated-list-format nil
"The format of the current Tabulated List mode buffer.
-This should be a vector of elements (NAME WIDTH SORT), where:
+This should be a vector of elements (NAME WIDTH SORT . PROPS),
+where:
- NAME is a string describing the column.
+ This is the label for the column in the header line.
+ Different columns must have non-`equal' names.
- WIDTH is the width to reserve for the column.
For the final element, its numerical value is ignored.
- SORT specifies how to sort entries by this column.
@@ -45,8 +54,18 @@ This should be a vector of elements (NAME WIDTH SORT), where:
If t, sort by comparing the string value printed in the column.
Otherwise, it should be a predicate function suitable for
`sort', accepting arguments with the same form as the elements
- of `tabulated-list-entries'.")
+ of `tabulated-list-entries'.
+ - PROPS is a plist of additional column properties.
+ Currently supported properties are:
+ - `:right-align': if non-nil, the column should be right-aligned.
+ - `:pad-right': Number of additional padding spaces to the
+ right of the column (defaults to 1 if omitted).")
(make-variable-buffer-local 'tabulated-list-format)
+(put 'tabulated-list-format 'permanent-local t)
+
+(defvar tabulated-list-use-header-line t
+ "Whether the Tabulated List buffer should use a header line.")
+(make-variable-buffer-local 'tabulated-list-use-header-line)
(defvar tabulated-list-entries nil
"Entries displayed in the current Tabulated List buffer.
@@ -67,12 +86,14 @@ where:
If `tabulated-list-entries' is a function, it is called with no
arguments and must return a list of the above form.")
(make-variable-buffer-local 'tabulated-list-entries)
+(put 'tabulated-list-entries 'permanent-local t)
(defvar tabulated-list-padding 0
"Number of characters preceding each Tabulated List mode entry.
By default, lines are padded with spaces, but you can use the
function `tabulated-list-put-tag' to change this.")
(make-variable-buffer-local 'tabulated-list-padding)
+(put 'tabulated-list-padding 'permanent-local t)
(defvar tabulated-list-revert-hook nil
"Hook run before reverting a Tabulated List buffer.
@@ -94,13 +115,20 @@ NAME is a string matching one of the column names in
`tabulated-list-format' then specifies how to sort). FLIP, if
non-nil, means to invert the resulting sort.")
(make-variable-buffer-local 'tabulated-list-sort-key)
+(put 'tabulated-list-sort-key 'permanent-local t)
-(defun tabulated-list-get-id (&optional pos)
- "Obtain the entry ID of the Tabulated List mode entry at POS.
-This is an ID object from `tabulated-list-entries', or nil.
+(defsubst tabulated-list-get-id (&optional pos)
+ "Return the entry ID of the Tabulated List entry at POS.
+The value is an ID object from `tabulated-list-entries', or nil.
POS, if omitted or nil, defaults to point."
(get-text-property (or pos (point)) 'tabulated-list-id))
+(defsubst tabulated-list-get-entry (&optional pos)
+ "Return the Tabulated List entry at POS.
+The value is a vector of column descriptors, or nil if there is
+no entry at POS. POS, if omitted or nil, defaults to point."
+ (get-text-property (or pos (point)) 'tabulated-list-entry))
+
(defun tabulated-list-put-tag (tag &optional advance)
"Put TAG in the padding area of the current line.
TAG should be a string, with length <= `tabulated-list-padding'.
@@ -111,16 +139,16 @@ If ADVANCE is non-nil, move forward by one line afterwards."
(error "Unable to tag the current line"))
(save-excursion
(beginning-of-line)
- (when (get-text-property (point) 'tabulated-list-id)
+ (when (tabulated-list-get-entry)
(let ((beg (point))
(inhibit-read-only t))
(forward-char tabulated-list-padding)
(insert-and-inherit
- (if (<= (length tag) tabulated-list-padding)
- (concat tag
- (make-string (- tabulated-list-padding (length tag))
- ?\s))
- (substring tag 0 tabulated-list-padding)))
+ (let ((width (string-width tag)))
+ (if (<= width tabulated-list-padding)
+ (concat tag
+ (make-string (- tabulated-list-padding width) ?\s))
+ (truncate-string-to-width tag tabulated-list-padding))))
(delete-region beg (+ beg tabulated-list-padding)))))
(if advance
(forward-line)))
@@ -130,6 +158,7 @@ If ADVANCE is non-nil, move forward by one line afterwards."
(set-keymap-parent map button-buffer-map)
(define-key map "n" 'next-line)
(define-key map "p" 'previous-line)
+ (define-key map "S" 'tabulated-list-sort)
(define-key map [follow-link] 'mouse-face)
(define-key map [mouse-2] 'mouse-select-window)
map)
@@ -139,6 +168,9 @@ If ADVANCE is non-nil, move forward by one line afterwards."
(let ((map (make-sparse-keymap)))
(define-key map [header-line mouse-1] 'tabulated-list-col-sort)
(define-key map [header-line mouse-2] 'tabulated-list-col-sort)
+ (define-key map [mouse-1] 'tabulated-list-col-sort)
+ (define-key map [mouse-2] 'tabulated-list-col-sort)
+ (define-key map "\C-m" 'tabulated-list-sort)
(define-key map [follow-link] 'mouse-face)
map)
"Local keymap for `tabulated-list-mode' sort buttons.")
@@ -152,50 +184,79 @@ If ADVANCE is non-nil, move forward by one line afterwards."
table)
"The `glyphless-char-display' table in Tabulated List buffers.")
+(defvar tabulated-list--header-string nil)
+(defvar tabulated-list--header-overlay nil)
+
(defun tabulated-list-init-header ()
"Set up header line for the Tabulated List buffer."
- (let ((x tabulated-list-padding)
+ ;; FIXME: Should share code with tabulated-list-print-col!
+ (let ((x (max tabulated-list-padding 0))
(button-props `(help-echo "Click to sort by column"
mouse-face highlight
keymap ,tabulated-list-sort-button-map))
(cols nil))
- (if (> tabulated-list-padding 0)
- (push (propertize " " 'display `(space :align-to ,x)) cols))
+ (push (propertize " " 'display `(space :align-to ,x)) cols)
(dotimes (n (length tabulated-list-format))
(let* ((col (aref tabulated-list-format n))
+ (label (nth 0 col))
(width (nth 1 col))
- (label (car col)))
- (setq x (+ x 1 width))
- (and (<= tabulated-list-padding 0)
- (= n 0)
- (setq label (concat " " label)))
+ (props (nthcdr 3 col))
+ (pad-right (or (plist-get props :pad-right) 1))
+ (right-align (plist-get props :right-align))
+ (next-x (+ x pad-right width)))
(push
(cond
;; An unsortable column
- ((not (nth 2 col)) label)
+ ((not (nth 2 col))
+ (propertize label 'tabulated-list-column-name label))
;; The selected sort column
((equal (car col) (car tabulated-list-sort-key))
(apply 'propertize
(concat label
(cond
- ((> (+ 2 (length label)) width)
- "")
- ((cdr tabulated-list-sort-key)
- " â–˛")
+ ((> (+ 2 (length label)) width) "")
+ ((cdr tabulated-list-sort-key) " â–˛")
(t " â–Ľ")))
'face 'bold
- 'tabulated-list-column-name (car col)
+ 'tabulated-list-column-name label
button-props))
;; Unselected sortable column.
(t (apply 'propertize label
- 'tabulated-list-column-name (car col)
+ 'tabulated-list-column-name label
button-props)))
- cols))
- (push (propertize " "
- 'display (list 'space :align-to x)
- 'face 'fixed-pitch)
- cols))
- (setq header-line-format (mapconcat 'identity (nreverse cols) ""))))
+ cols)
+ (when right-align
+ (let ((shift (- width (string-width (car cols)))))
+ (when (> shift 0)
+ (setq cols
+ (cons (car cols)
+ (cons (propertize (make-string shift ?\s)
+ 'display
+ `(space :align-to ,(+ x shift)))
+ (cdr cols))))
+ (setq x (+ x shift)))))
+ (if (> pad-right 0)
+ (push (propertize " "
+ 'display `(space :align-to ,next-x)
+ 'face 'fixed-pitch)
+ cols))
+ (setq x next-x)))
+ (setq cols (apply 'concat (nreverse cols)))
+ (if tabulated-list-use-header-line
+ (setq header-line-format cols)
+ (setq header-line-format nil)
+ (set (make-local-variable 'tabulated-list--header-string) cols))))
+
+(defun tabulated-list-print-fake-header ()
+ "Insert a fake Tabulated List \"header line\" at the start of the buffer."
+ (goto-char (point-min))
+ (let ((inhibit-read-only t))
+ (insert tabulated-list--header-string "\n")
+ (if tabulated-list--header-overlay
+ (move-overlay tabulated-list--header-overlay (point-min) (point))
+ (set (make-local-variable 'tabulated-list--header-overlay)
+ (make-overlay (point-min) (point))))
+ (overlay-put tabulated-list--header-overlay 'face 'underline)))
(defun tabulated-list-revert (&rest ignored)
"The `revert-buffer-function' for `tabulated-list-mode'.
@@ -206,6 +267,17 @@ It runs `tabulated-list-revert-hook', then calls `tabulated-list-print'."
(run-hooks 'tabulated-list-revert-hook)
(tabulated-list-print t))
+(defun tabulated-list--column-number (name)
+ (let ((len (length tabulated-list-format))
+ (n 0)
+ found)
+ (while (and (< n len) (null found))
+ (if (equal (car (aref tabulated-list-format n)) name)
+ (setq found n))
+ (setq n (1+ n)))
+ (or found
+ (error "No column named %s" name))))
+
(defun tabulated-list-print (&optional remember-pos)
"Populate the current Tabulated List mode buffer.
This sorts the `tabulated-list-entries' list if sorting is
@@ -223,19 +295,16 @@ to the entry with the same ID element as the current line."
(setq entry-id (tabulated-list-get-id))
(setq saved-col (current-column)))
(erase-buffer)
- ;; Sort the buffers, if necessary.
- (when tabulated-list-sort-key
- (let ((sort-column (car tabulated-list-sort-key))
- (len (length tabulated-list-format))
- (n 0)
- sorter)
- ;; Which column is to be sorted?
- (while (and (< n len)
- (not (equal (car (aref tabulated-list-format n))
- sort-column)))
- (setq n (1+ n)))
- (when (< n len)
- (setq sorter (nth 2 (aref tabulated-list-format n)))
+ (unless tabulated-list-use-header-line
+ (tabulated-list-print-fake-header))
+ ;; Sort the entries, if necessary.
+ (when (and tabulated-list-sort-key
+ (car tabulated-list-sort-key))
+ (let* ((sort-column (car tabulated-list-sort-key))
+ (n (tabulated-list--column-number sort-column))
+ (sorter (nth 2 (aref tabulated-list-format n))))
+ ;; Is the specified column sortable?
+ (when sorter
(when (eq sorter t)
(setq sorter ; Default sorter checks column N:
(lambda (A B)
@@ -267,53 +336,153 @@ to the entry with the same ID element as the current line."
This is the default `tabulated-list-printer' function. ID is a
Lisp object identifying the entry to print, and COLS is a vector
of column descriptors."
- (let ((beg (point))
- (x (max tabulated-list-padding 0))
- (len (length tabulated-list-format)))
+ (let ((beg (point))
+ (x (max tabulated-list-padding 0))
+ (ncols (length tabulated-list-format))
+ (inhibit-read-only t))
(if (> tabulated-list-padding 0)
(insert (make-string x ?\s)))
- (dotimes (n len)
- (let* ((format (aref tabulated-list-format n))
- (desc (aref cols n))
- (width (nth 1 format))
- (label (if (stringp desc) desc (car desc)))
- (help-echo (concat (car format) ": " label)))
- ;; Truncate labels if necessary (except last column).
- (and (< (1+ n) len)
- (> (string-width label) width)
- (setq label (truncate-string-to-width label width nil nil t)))
- (setq label (bidi-string-mark-left-to-right label))
- (if (stringp desc)
- (insert (propertize label 'help-echo help-echo))
- (apply 'insert-text-button label (cdr desc)))
- (setq x (+ x 1 width)))
- ;; No need to append any spaces if this is the last column.
- (if (< (1+ n) len)
- (indent-to x 1)))
+ (dotimes (n ncols)
+ (setq x (tabulated-list-print-col n (aref cols n) x)))
(insert ?\n)
- (put-text-property beg (point) 'tabulated-list-id id)))
+ (put-text-property beg (point) 'tabulated-list-id id)
+ (put-text-property beg (point) 'tabulated-list-entry cols)))
+
+(defun tabulated-list-print-col (n col-desc x)
+ "Insert a specified Tabulated List entry at point.
+N is the column number, COL-DESC is a column descriptor \(see
+`tabulated-list-entries'), and X is the column number at point.
+Return the column number after insertion."
+ ;; TODO: don't truncate to `width' if the next column is align-right
+ ;; and has some space left.
+ (let* ((format (aref tabulated-list-format n))
+ (name (nth 0 format))
+ (width (nth 1 format))
+ (props (nthcdr 3 format))
+ (pad-right (or (plist-get props :pad-right) 1))
+ (right-align (plist-get props :right-align))
+ (label (if (stringp col-desc) col-desc (car col-desc)))
+ (label-width (string-width label))
+ (help-echo (concat (car format) ": " label))
+ (opoint (point))
+ (not-last-col (< (1+ n) (length tabulated-list-format))))
+ ;; Truncate labels if necessary (except last column).
+ (and not-last-col
+ (> label-width width)
+ (setq label (truncate-string-to-width label width nil nil t)
+ label-width width))
+ (setq label (bidi-string-mark-left-to-right label))
+ (when (and right-align (> width label-width))
+ (let ((shift (- width label-width)))
+ (insert (propertize (make-string shift ?\s)
+ 'display `(space :align-to ,(+ x shift))))
+ (setq width (- width shift))
+ (setq x (+ x shift))))
+ (if (stringp col-desc)
+ (insert (propertize label 'help-echo help-echo))
+ (apply 'insert-text-button label (cdr col-desc)))
+ (let ((next-x (+ x pad-right width)))
+ ;; No need to append any spaces if this is the last column.
+ (when not-last-col
+ (when (> pad-right 0) (insert (make-string pad-right ?\s)))
+ (insert (propertize
+ (make-string (- next-x x label-width pad-right) ?\s)
+ 'display `(space :align-to ,next-x))))
+ (put-text-property opoint (point) 'tabulated-list-column-name name)
+ next-x)))
+
+(defun tabulated-list-delete-entry ()
+ "Delete the Tabulated List entry at point.
+Return a list (ID COLS), where ID is the ID of the deleted entry
+and COLS is a vector of its column descriptors. Move point to
+the beginning of the deleted entry. Return nil if there is no
+entry at point.
+
+This function only changes the buffer contents; it does not alter
+`tabulated-list-entries'."
+ ;; Assume that each entry occupies one line.
+ (let* ((id (tabulated-list-get-id))
+ (cols (tabulated-list-get-entry))
+ (inhibit-read-only t))
+ (when cols
+ (delete-region (line-beginning-position) (1+ (line-end-position)))
+ (list id cols))))
+
+(defun tabulated-list-set-col (col desc &optional change-entry-data)
+ "Change the Tabulated List entry at point, setting COL to DESC.
+COL is the column number to change, or the name of the column to change.
+DESC is the new column descriptor, which is inserted via
+`tabulated-list-print-col'.
+
+If CHANGE-ENTRY-DATA is non-nil, modify the underlying entry data
+by setting the appropriate slot of the vector originally used to
+print this entry. If `tabulated-list-entries' has a list value,
+this is the vector stored within it."
+ (let* ((opoint (point))
+ (eol (line-end-position))
+ (pos (line-beginning-position))
+ (id (tabulated-list-get-id pos))
+ (entry (tabulated-list-get-entry pos))
+ (prop 'tabulated-list-column-name)
+ (inhibit-read-only t)
+ name)
+ (cond ((numberp col)
+ (setq name (car (aref tabulated-list-format col))))
+ ((stringp col)
+ (setq name col
+ col (tabulated-list--column-number col)))
+ (t
+ (error "Invalid column %s" col)))
+ (unless entry
+ (error "No Tabulated List entry at position %s" opoint))
+ (unless (equal (get-text-property pos prop) name)
+ (while (and (setq pos
+ (next-single-property-change pos prop nil eol))
+ (< pos eol)
+ (not (equal (get-text-property pos prop) name)))))
+ (when (< pos eol)
+ (delete-region pos (next-single-property-change pos prop nil eol))
+ (goto-char pos)
+ (tabulated-list-print-col col desc (current-column))
+ (if change-entry-data
+ (aset entry col desc))
+ (put-text-property pos (point) 'tabulated-list-id id)
+ (put-text-property pos (point) 'tabulated-list-entry entry)
+ (goto-char opoint))))
(defun tabulated-list-col-sort (&optional e)
"Sort Tabulated List entries by the column of the mouse click E."
(interactive "e")
(let* ((pos (event-start e))
- (obj (posn-object pos))
- (name (get-text-property (if obj (cdr obj) (posn-point pos))
- 'tabulated-list-column-name
- (car obj))))
+ (obj (posn-object pos)))
(with-current-buffer (window-buffer (posn-window pos))
- (when (derived-mode-p 'tabulated-list-mode)
- ;; Flip the sort order on a second click.
- (if (equal name (car tabulated-list-sort-key))
- (setcdr tabulated-list-sort-key
- (not (cdr tabulated-list-sort-key)))
- (setq tabulated-list-sort-key (cons name nil)))
- (tabulated-list-init-header)
- (tabulated-list-print t)))))
+ (tabulated-list--sort-by-column-name
+ (get-text-property (if obj (cdr obj) (posn-point pos))
+ 'tabulated-list-column-name
+ (car obj))))))
+
+(defun tabulated-list-sort (&optional n)
+ "Sort Tabulated List entries by the column at point.
+With a numeric prefix argument N, sort the Nth column."
+ (interactive "P")
+ (let ((name (if n
+ (car (aref tabulated-list-format n))
+ (get-text-property (point)
+ 'tabulated-list-column-name))))
+ (tabulated-list--sort-by-column-name name)))
+
+(defun tabulated-list--sort-by-column-name (name)
+ (when (and name (derived-mode-p 'tabulated-list-mode))
+ ;; Flip the sort order on a second click.
+ (if (equal name (car tabulated-list-sort-key))
+ (setcdr tabulated-list-sort-key
+ (not (cdr tabulated-list-sort-key)))
+ (setq tabulated-list-sort-key (cons name nil)))
+ (tabulated-list-init-header)
+ (tabulated-list-print t)))
;;; The mode definition:
-;;;###autoload
(define-derived-mode tabulated-list-mode special-mode "Tabulated"
"Generic major mode for browsing a list of items.
This mode is usually not used directly; instead, other major
diff --git a/lisp/emacs-lisp/timer.el b/lisp/emacs-lisp/timer.el
index 87b6cceb24b..11ec0f0614c 100644
--- a/lisp/emacs-lisp/timer.el
+++ b/lisp/emacs-lisp/timer.el
@@ -240,12 +240,14 @@ and idle timers such as are scheduled by `run-with-idle-timer'."
(defvar timer-event-last-2 nil
"Third-to-last timer that was run.")
-(defvar timer-max-repeats 10
+(defcustom timer-max-repeats 10
"Maximum number of times to repeat a timer, if many repeats are delayed.
Timer invocations can be delayed because Emacs is suspended or busy,
or because the system's time changes. If such an occurrence makes it
appear that many invocations are overdue, this variable controls
-how many will really happen.")
+how many will really happen."
+ :type 'integer
+ :group 'internal)
(defun timer-until (timer time)
"Calculate number of seconds from when TIMER will run, until TIME.
diff --git a/lisp/emacs-lock.el b/lisp/emacs-lock.el
index f5954564a2f..6d91238f2b1 100644
--- a/lisp/emacs-lock.el
+++ b/lisp/emacs-lock.el
@@ -186,6 +186,8 @@ Return a value appropriate for `kill-buffer-query-functions' (which see)."
;; anything else (turn off)
mode))))
+(define-obsolete-variable-alias 'emacs-lock-from-exiting
+ 'emacs-lock-mode "24.1")
;;;###autoload
(define-minor-mode emacs-lock-mode
"Toggle Emacs Lock mode in the current buffer.
@@ -245,8 +247,6 @@ Other values are interpreted as usual."
;;; Compatibility
-(define-obsolete-variable-alias 'emacs-lock-from-exiting 'emacs-lock-mode "24.1")
-
(defun toggle-emacs-lock ()
"Toggle `emacs-lock-from-exiting' for the current buffer."
(interactive)
diff --git a/lisp/emulation/tpu-edt.el b/lisp/emulation/tpu-edt.el
index eaf88ccdf85..b8d07e8b744 100644
--- a/lisp/emulation/tpu-edt.el
+++ b/lisp/emulation/tpu-edt.el
@@ -315,6 +315,7 @@ Otherwise, use `spell-region'."
;;; Global Keymaps
;;;
+(define-obsolete-variable-alias 'GOLD-map 'tpu-gold-map "23.1")
(defvar tpu-gold-map
(let ((map (make-keymap)))
;; Previously we used escape sequences here. We now instead presume
@@ -494,7 +495,6 @@ Otherwise, use `spell-region'."
map)
"Maps the function keys on the VT100 keyboard preceded by PF1.
GOLD is the ASCII 7-bit escape sequence <ESC>OP.")
-(define-obsolete-variable-alias 'GOLD-map 'tpu-gold-map "23.1")
(defvar tpu-global-map
(let ((map (make-sparse-keymap)))
diff --git a/lisp/epg-config.el b/lisp/epg-config.el
index fd2468f9a4b..aa052206bec 100644
--- a/lisp/epg-config.el
+++ b/lisp/epg-config.el
@@ -33,9 +33,11 @@
"Report bugs to this address.")
(defgroup epg ()
- "The EasyPG library."
+ "Interface to the GNU Privacy Guard (GnuPG)."
+ :tag "EasyPG"
:version "23.1"
- :group 'data)
+ :group 'data
+ :group 'external)
(defcustom epg-gpg-program (or (executable-find "gpg")
(executable-find "gpg2")
diff --git a/lisp/erc/ChangeLog b/lisp/erc/ChangeLog
index 06c6d42ed39..9585c249cb2 100644
--- a/lisp/erc/ChangeLog
+++ b/lisp/erc/ChangeLog
@@ -1,3 +1,14 @@
+2012-05-14 Mike Kazantsev <mk.fraggod@gmail.com> (tiny change)
+
+ * erc-dcc.el (erc-dcc-handle-ctcp-send): Fix a regression
+ introduced on 2011-11-28 when fixing quoted filenames matching,
+ the regex group was not corrected.
+
+2012-05-13 Teemu Likonen <tlikonen@iki.fi>
+
+ * erc-backend.el (erc-server-timestamp-format): New variable to
+ allow specifying the timestamp format (bug#10779).
+
2012-04-11 Vivek Dasmohapatra <vivek@etla.org>
* erc-services.el (erc-nickserv-passwords): Don't display the
diff --git a/lisp/erc/erc-backend.el b/lisp/erc/erc-backend.el
index 62f524ed001..cce24e67cf4 100644
--- a/lisp/erc/erc-backend.el
+++ b/lisp/erc/erc-backend.el
@@ -393,6 +393,13 @@ isn't displayed."
:type 'integer
:group 'erc-server)
+(defcustom erc-server-timestamp-format "%Y-%m-%d %T"
+ "Timestamp format used with server response messages.
+This string is processed using `format-time-string'."
+ :version "24.2"
+ :type 'string
+ :group 'erc-server)
+
;;; Flood-related
;; Most of this is courtesy of Jorgen Schaefer and Circe
@@ -1454,7 +1461,8 @@ add things to `%s' instead."
"The channel topic has changed." nil
(let* ((ch (first (erc-response.command-args parsed)))
(topic (erc-trim-string (erc-response.contents parsed)))
- (time (format-time-string "%T %m/%d/%y" (current-time))))
+ (time (format-time-string erc-server-timestamp-format
+ (current-time))))
(multiple-value-bind (nick login host)
(values-list (erc-parse-user (erc-response.sender parsed)))
(erc-update-channel-member ch nick nick nil nil nil host login)
@@ -1647,7 +1655,7 @@ See `erc-display-server-message'." nil
(multiple-value-bind (nick seconds-idle on-since time)
(values-list (cdr (erc-response.command-args parsed)))
(setq time (when on-since
- (format-time-string "%T %Y/%m/%d"
+ (format-time-string erc-server-timestamp-format
(erc-string-to-emacs-time on-since))))
(erc-update-user-nick nick nick nil nil nil
(and time (format "on since %s" time)))
@@ -1724,7 +1732,8 @@ See `erc-display-server-message'." nil
(third (erc-response.command-args parsed)))))
(erc-display-message
parsed 'notice (erc-get-buffer channel proc)
- 's329 ?c channel ?t (format-time-string "%A %Y/%m/%d %X" time))))
+ 's329 ?c channel ?t (format-time-string erc-server-timestamp-format
+ time))))
(define-erc-response-handler (330)
"Nick is authed as (on Quakenet network)." nil
@@ -1761,7 +1770,7 @@ See `erc-display-server-message'." nil
"Who set the topic, and when." nil
(multiple-value-bind (channel nick time)
(values-list (cdr (erc-response.command-args parsed)))
- (setq time (format-time-string "%T %Y/%m/%d"
+ (setq time (format-time-string erc-server-timestamp-format
(erc-string-to-emacs-time time)))
(erc-update-channel-topic channel
(format "\C-o (%s, %s)" nick time)
diff --git a/lisp/erc/erc-dcc.el b/lisp/erc/erc-dcc.el
index ba87cf63993..d1ef1a99548 100644
--- a/lisp/erc/erc-dcc.el
+++ b/lisp/erc/erc-dcc.el
@@ -674,7 +674,7 @@ It extracts the information about the dcc request and adds it to
?r "SEND" ?n nick ?u login ?h host))
((string-match erc-dcc-ctcp-query-send-regexp query)
(let ((filename
- (or (match-string 3 query)
+ (or (match-string 5 query)
(erc-dcc-unquote-filename (match-string 2 query))))
(ip (erc-decimal-to-ip (match-string 6 query)))
(port (match-string 7 query))
diff --git a/lisp/eshell/esh-cmd.el b/lisp/eshell/esh-cmd.el
index 6075b56915b..850cecbc0a5 100644
--- a/lisp/eshell/esh-cmd.el
+++ b/lisp/eshell/esh-cmd.el
@@ -1,6 +1,6 @@
;;; esh-cmd.el --- command invocation
-;; Copyright (C) 1999-2012 Free Software Foundation, Inc.
+;; Copyright (C) 1999-2012 Free Software Foundation, Inc.
;; Author: John Wiegley <johnw@gnu.org>
@@ -236,10 +236,14 @@ return non-nil if the command is complex."
:group 'eshell-cmd)
(defcustom eshell-debug-command nil
- "If non-nil, enable debugging code. SSLLOOWW.
-This option is only useful for reporting bugs. If you enable it, you
-will have to visit the file 'eshell-cmd.el' and run the command
-\\[eval-buffer]."
+ "If non-nil, enable Eshell debugging code.
+This is slow, and only useful for debugging problems with Eshell.
+If you change this without using customize after Eshell has loaded,
+you must re-load 'esh-cmd.el'."
+ :initialize 'custom-initialize-default
+ :set (lambda (symbol value)
+ (set symbol value)
+ (load-library "esh-cmd"))
:type 'boolean
:group 'eshell-cmd)
diff --git a/lisp/eshell/eshell.el b/lisp/eshell/eshell.el
index 224451eacba..f8c9788b24d 100644
--- a/lisp/eshell/eshell.el
+++ b/lisp/eshell/eshell.el
@@ -228,11 +228,10 @@
(require 'esh-mode)
(defgroup eshell nil
- "A command shell implemented entirely in Emacs Lisp.
+ "Command shell implemented entirely in Emacs Lisp.
It invokes no external processes beyond those requested by the
user, and is intended to be a functional replacement for command
shells such as bash, zsh, rc, 4dos."
- :tag "The Emacs shell"
:link '(info-link "(eshell)Top")
:version "21.1"
:group 'applications)
diff --git a/lisp/face-remap.el b/lisp/face-remap.el
index ca7a28328f9..46dad0fca3a 100644
--- a/lisp/face-remap.el
+++ b/lisp/face-remap.el
@@ -303,26 +303,29 @@ a top-level keymap, `text-scale-increase' or
`text-scale-decrease' may be more appropriate."
(interactive "p")
(let ((first t)
- (step t)
(ev last-command-event)
(echo-keystrokes nil))
- (while step
- (let ((base (event-basic-type ev)))
- (cond ((or (eq base ?+) (eq base ?=))
- (setq step inc))
- ((eq base ?-)
- (setq step (- inc)))
- ((eq base ?0)
- (setq step 0))
- (first
- (setq step inc))
- (t
- (setq step nil))))
- (when step
- (text-scale-increase step)
- (setq inc 1 first nil)
- (setq ev (read-event "+,-,0 for further adjustment: "))))
- (push ev unread-command-events)))
+ (let* ((base (event-basic-type ev))
+ (step
+ (pcase base
+ ((or `?+ `?=) inc)
+ (`?- (- inc))
+ (`?0 0)
+ (t inc))))
+ (text-scale-increase step)
+ ;; FIXME: do it after everu "iteration of the loop".
+ (message "+,-,0 for further adjustment: ")
+ (set-temporary-overlay-map
+ (let ((map (make-sparse-keymap)))
+ (dolist (mods '(() (control)))
+ (define-key map (vector (append mods '(?-))) 'text-scale-decrease)
+ (define-key map (vector (append mods '(?+))) 'text-scale-increase)
+ ;; = is unshifted + on most keyboards.
+ (define-key map (vector (append mods '(?=))) 'text-scale-increase)
+ (define-key map (vector (append mods '(?0)))
+ (lambda () (interactive) (text-scale-increase 0))))
+ map)
+ t))))
;; ----------------------------------------------------------------
diff --git a/lisp/facemenu.el b/lisp/facemenu.el
index e76b61fdacb..bcef25eb893 100644
--- a/lisp/facemenu.el
+++ b/lisp/facemenu.el
@@ -127,15 +127,6 @@ just before \"Other\" at the end."
:type 'boolean
:group 'facemenu)
-(defvar facemenu-unlisted-faces
- `(modeline region secondary-selection highlight scratch-face
- ,(purecopy "^font-lock-") ,(purecopy "^gnus-") ,(purecopy "^message-")
- ,(purecopy "^ediff-") ,(purecopy "^term-") ,(purecopy "^vc-")
- ,(purecopy "^widget-") ,(purecopy "^custom-") ,(purecopy "^vm-"))
- "List of faces that are of no interest to the user.")
-(make-obsolete-variable 'facemenu-unlisted-faces 'facemenu-listed-faces
- "22.1,\n and has no effect on the Face menu")
-
(defcustom facemenu-listed-faces nil
"List of faces to include in the Face menu.
Each element should be a symbol, the name of a face.
diff --git a/lisp/faces.el b/lisp/faces.el
index 8eacf5bcfe2..d96f3af0ac0 100644
--- a/lisp/faces.el
+++ b/lisp/faces.el
@@ -28,6 +28,16 @@
(eval-when-compile
(require 'cl))
+(defcustom term-file-prefix (purecopy "term/")
+ "If non-nil, Emacs startup performs terminal-specific initialization.
+It does this by: (load (concat term-file-prefix (getenv \"TERM\")))
+
+You may set this variable to nil in your init file if you do not wish
+the terminal-initialization file to be loaded."
+ :type '(choice (const :tag "No terminal-specific initialization" nil)
+ (string :tag "Name of directory with term files"))
+ :group 'terminals)
+
(declare-function xw-defined-colors "term/common-win" (&optional frame))
(defvar help-xref-stack-item)
@@ -1532,35 +1542,29 @@ If SPEC is nil, return nil."
face-attribute-name-alist)))))
(defun face-spec-set (face spec &optional for-defface)
- "Set FACE's face spec, which controls its appearance, to SPEC.
-If FOR-DEFFACE is t, set the base spec, the one that `defface'
- and Custom set. (In that case, the caller must put it in the
- appropriate property, because that depends on the caller.)
-If FOR-DEFFACE is nil, set the overriding spec (and store it
- in the `face-override-spec' property of FACE).
-
-The appearance of FACE is controlled by the base spec,
-by any custom theme specs on top of that, and by the
-overriding spec on top of all the rest.
-
-FOR-DEFFACE can also be a frame, in which case we set the
-frame-specific attributes of FACE for that frame based on SPEC.
-That usage is deprecated.
-
-See `defface' for information about the format and meaning of SPEC."
- (if (framep for-defface)
- ;; Handle the deprecated case where third arg is a frame.
- (face-spec-set-2 face for-defface spec)
- (if for-defface
- ;; When we reset the face based on its custom spec, then it is
- ;; unmodified as far as Custom is concerned.
- (put (or (get face 'face-alias) face) 'face-modified nil)
- ;; When we change a face based on a spec from outside custom,
- ;; record it for future frames.
- (put (or (get face 'face-alias) face) 'face-override-spec spec))
- ;; Reset each frame according to the rules implied by all its specs.
- (dolist (frame (frame-list))
- (face-spec-recalc face frame))))
+ "Set and apply the face spec for FACE.
+If the optional argument FOR-DEFFACE is omitted or nil, set the
+overriding spec to SPEC, recording it in the `face-override-spec'
+property of FACE. See `defface' for the format of SPEC.
+
+If FOR-DEFFACE is non-nil, set the base spec (the one set by
+`defface' and Custom). In this case, SPEC is ignored; the caller
+is responsible for putting the face spec in the `saved-face',
+`customized-face', or `face-defface-spec', as appropriate.
+
+The appearance of FACE is controlled by the base spec, by any
+custom theme specs on top of that, and by the overriding spec on
+top of all the rest."
+ (if for-defface
+ ;; When we reset the face based on its custom spec, then it is
+ ;; unmodified as far as Custom is concerned.
+ (put (or (get face 'face-alias) face) 'face-modified nil)
+ ;; When we change a face based on a spec from outside custom,
+ ;; record it for future frames.
+ (put (or (get face 'face-alias) face) 'face-override-spec spec))
+ ;; Reset each frame according to the rules implied by all its specs.
+ (dolist (frame (frame-list))
+ (face-spec-recalc face frame)))
(defun face-spec-recalc (face frame)
"Reset the face attributes of FACE on FRAME according to its specs.
diff --git a/lisp/ffap.el b/lisp/ffap.el
index 52ffc9905ed..a8455189cb9 100644
--- a/lisp/ffap.el
+++ b/lisp/ffap.el
@@ -105,6 +105,8 @@
;;; Code:
+(require 'url-parse)
+
(define-obsolete-variable-alias 'ffap-version 'emacs-version "23.2")
(defgroup ffap nil
@@ -136,10 +138,7 @@ If nil, ffap doesn't do shell prompt stripping."
regexp)
:group 'ffap)
-(defcustom ffap-ftp-regexp
- ;; This used to test for ange-ftp or efs being present, but it should be
- ;; harmless (and simpler) to give it this value unconditionally.
- "\\`/[^/:]+:"
+(defcustom ffap-ftp-regexp "\\`/[^/:]+:"
"File names matching this regexp are treated as remote ffap.
If nil, ffap neither recognizes nor generates such names."
:type '(choice (const :tag "Disable" nil)
@@ -148,15 +147,20 @@ If nil, ffap neither recognizes nor generates such names."
:group 'ffap)
(defcustom ffap-url-unwrap-local t
- "If non-nil, convert `file:' URL to local file name before prompting."
+ "If non-nil, convert some URLs to local file names before prompting.
+Only \"file:\" and \"ftp:\" URLs are converted, and only if they
+do not specify a host, or the host is either \"localhost\" or
+equal to `system-name'."
:type 'boolean
:group 'ffap)
-(defcustom ffap-url-unwrap-remote t
- "If non-nil, convert `ftp:' URL to remote file name before prompting.
-This is ignored if `ffap-ftp-regexp' is nil."
- :type 'boolean
- :group 'ffap)
+(defcustom ffap-url-unwrap-remote '("ftp")
+ "If non-nil, convert URLs to remote file names before prompting.
+If the value is a list of strings, that specifies a list of URL
+schemes (e.g. \"ftp\"); in that case, only convert those URLs."
+ :type '(choice (repeat string) boolean)
+ :group 'ffap
+ :version "24.2")
(defcustom ffap-ftp-default-user "anonymous"
"User name in ftp file names generated by `ffap-host-to-path'.
@@ -247,14 +251,14 @@ ffap most of the time."
(defcustom ffap-file-finder 'find-file
"The command called by `find-file-at-point' to find a file."
:type 'function
- :group 'ffap)
-(put 'ffap-file-finder 'risky-local-variable t)
+ :group 'ffap
+ :risky t)
(defcustom ffap-directory-finder 'dired
"The command called by `dired-at-point' to find a directory."
:type 'function
- :group 'ffap)
-(put 'ffap-directory-finder 'risky-local-variable t)
+ :group 'ffap
+ :risky t)
(defcustom ffap-url-fetcher
(if (fboundp 'browse-url)
@@ -271,8 +275,28 @@ For a fancy alternative, get `ffap-url.el'."
(const browse-url-netscape)
(const browse-url-mosaic)
function)
+ :group 'ffap
+ :risky t)
+
+(defcustom ffap-next-regexp
+ ;; If you want ffap-next to find URL's only, try this:
+ ;; (and ffap-url-regexp (string-match "\\\\`" ffap-url-regexp)
+ ;; (concat "\\<" (substring ffap-url-regexp 2))))
+ ;;
+ ;; It pays to put a big fancy regexp here, since ffap-guesser is
+ ;; much more time-consuming than regexp searching:
+ "[/:.~[:alpha:]]/\\|@[[:alpha:]][-[:alnum:]]*\\."
+ "Regular expression governing movements of `ffap-next'."
+ :type 'regexp
:group 'ffap)
-(put 'ffap-url-fetcher 'risky-local-variable t)
+
+(defcustom dired-at-point-require-prefix nil
+ "If non-nil, reverse the prefix argument to `dired-at-point'.
+This is nil so neophytes notice FFAP. Experts may prefer to
+disable FFAP most of the time."
+ :type 'boolean
+ :group 'ffap
+ :version "20.3")
;;; Compatibility:
@@ -293,18 +317,6 @@ For a fancy alternative, get `ffap-url.el'."
;; then, broke it up into ffap-next-guess (noninteractive) and
;; ffap-next (a command). It now work on files as well as url's.
-(defcustom ffap-next-regexp
- ;; If you want ffap-next to find URL's only, try this:
- ;; (and ffap-url-regexp (string-match "\\\\`" ffap-url-regexp)
- ;; (concat "\\<" (substring ffap-url-regexp 2))))
- ;;
- ;; It pays to put a big fancy regexp here, since ffap-guesser is
- ;; much more time-consuming than regexp searching:
- "[/:.~[:alpha:]]/\\|@[[:alpha:]][-[:alnum:]]*\\."
- "Regular expression governing movements of `ffap-next'."
- :type 'regexp
- :group 'ffap)
-
(defvar ffap-next-guess nil
"Last value returned by `ffap-next-guess'.")
@@ -606,28 +618,45 @@ Looks at `ffap-ftp-default-user', returns \"\" for \"localhost\"."
string)))
;; Broke these out of ffap-fixup-url, for use of ffap-url package.
-(defsubst ffap-url-unwrap-local (url)
- "Return URL as a local file, or nil. Ignores `ffap-url-regexp'."
- (and (string-match "\\`\\(file\\|ftp\\):/?\\([^/]\\|\\'\\)" url)
- (substring url (1+ (match-end 1)))))
-(defsubst ffap-url-unwrap-remote (url)
- "Return URL as a remote file, or nil. Ignores `ffap-url-regexp'."
- (and (string-match "\\`\\(ftp\\|file\\)://\\([^:/]+\\):?\\(/.*\\)" url)
- (concat
- (ffap-host-to-filename (substring url (match-beginning 2) (match-end 2)))
- (substring url (match-beginning 3) (match-end 3)))))
-;; Test: (ffap-url-unwrap-remote "ftp://foo.com/bar.boz")
+(defun ffap-url-unwrap-local (url)
+ "Return URL as a local file name, or nil."
+ (let* ((obj (url-generic-parse-url url))
+ (host (url-host obj))
+ (filename (car (url-path-and-query obj))))
+ (when (and (member (url-type obj) '("ftp" "file"))
+ (member host `("" "localhost" ,(system-name))))
+ ;; On Windows, "file:///C:/foo" should unwrap to "C:/foo"
+ (if (and (memq system-type '(ms-dos windows-nt cygwin))
+ (string-match "\\`/[a-zA-Z]:" filename))
+ (substring filename 1)
+ filename))))
+
+(defun ffap-url-unwrap-remote (url)
+ "Return URL as a remote file name, or nil."
+ (let* ((obj (url-generic-parse-url url))
+ (scheme (url-type obj))
+ (valid-schemes (if (listp ffap-url-unwrap-remote)
+ ffap-url-unwrap-remote
+ '("ftp")))
+ (host (url-host obj))
+ (port (url-port-if-non-default obj))
+ (user (url-user obj))
+ (filename (car (url-path-and-query obj))))
+ (when (and (member scheme valid-schemes)
+ (string-match "\\`[a-zA-Z][-a-zA-Z0-9+.]*\\'" scheme)
+ (not (equal host "")))
+ (concat "/" scheme ":"
+ (if user (concat user "@"))
+ host
+ (if port (concat "#" (number-to-string port)))
+ ":" filename))))
(defun ffap-fixup-url (url)
"Clean up URL and return it, maybe as a file name."
(cond
((not (stringp url)) nil)
- ((and ffap-url-unwrap-local (ffap-url-unwrap-local url)))
- ((and ffap-url-unwrap-remote ffap-ftp-regexp
- (ffap-url-unwrap-remote url)))
- ;; All this seems to do is remove any trailing "#anchor" part (Bug#898).
-;;; ((fboundp 'url-normalize-url) ; may autoload url (part of w3)
-;;; (url-normalize-url url))
+ ((and ffap-url-unwrap-local (ffap-url-unwrap-local url)))
+ ((and ffap-url-unwrap-remote (ffap-url-unwrap-remote url)))
(url)))
@@ -1076,38 +1105,33 @@ Assumes the buffer has not changed."
;; ignore non-relative links, trim punctuation. The other will
;; actually look back if point is in whitespace, but I would rather
;; ffap be less aggressive in such situations.
- (and
- ffap-url-regexp
- (or
- ;; In a w3 buffer button?
- (and (eq major-mode 'w3-mode)
- ;; interface recommended by wmperry:
- (w3-view-this-url t))
- ;; Is there a reason not to strip trailing colon?
- (let ((name (ffap-string-at-point 'url)))
- (cond
- ((string-match "^url:" name) (setq name (substring name 4)))
- ((and (string-match "\\`[^:</>@]+@[^:</>@]+[[:alnum:]]\\'" name)
- ;; "foo@bar": could be "mailto" or "news" (a Message-ID).
- ;; Without "<>" it must be "mailto". Otherwise could be
- ;; either, so consult `ffap-foo-at-bar-prefix'.
- (let ((prefix (if (and (equal (ffap-string-around) "<>")
- ;; Expect some odd characters:
- (string-match "[$.0-9].*[$.0-9].*@" name))
- ;; Could be news:
- ffap-foo-at-bar-prefix
- "mailto")))
- (and prefix (setq name (concat prefix ":" name))))))
- ((ffap-newsgroup-p name) (setq name (concat "news:" name)))
- ((and (string-match "\\`[[:alnum:]]+\\'" name) ; <mic> <root> <nobody>
- (equal (ffap-string-around) "<>")
- ;; (ffap-user-p name):
- (not (string-match "~" (expand-file-name (concat "~" name))))
- )
- (setq name (concat "mailto:" name)))
- )
- (and (ffap-url-p name) name)
- ))))
+ (when ffap-url-regexp
+ (or (and (eq major-mode 'w3-mode) ; In a w3 buffer button?
+ (w3-view-this-url t))
+ ;; Is there a reason not to strip trailing colon?
+ (let ((name (ffap-string-at-point 'url)))
+ (cond
+ ((string-match "^url:" name) (setq name (substring name 4)))
+ ((and (string-match "\\`[^:</>@]+@[^:</>@]+[[:alnum:]]\\'" name)
+ ;; "foo@bar": could be "mailto" or "news" (a Message-ID).
+ ;; Without "<>" it must be "mailto". Otherwise could be
+ ;; either, so consult `ffap-foo-at-bar-prefix'.
+ (let ((prefix (if (and (equal (ffap-string-around) "<>")
+ ;; Expect some odd characters:
+ (string-match "[$.0-9].*[$.0-9].*@" name))
+ ;; Could be news:
+ ffap-foo-at-bar-prefix
+ "mailto")))
+ (and prefix (setq name (concat prefix ":" name))))))
+ ((ffap-newsgroup-p name) (setq name (concat "news:" name)))
+ ((and (string-match "\\`[[:alnum:]]+\\'" name) ; <mic> <root> <nobody>
+ (equal (ffap-string-around) "<>")
+ ;; (ffap-user-p name):
+ (not (string-match "~" (expand-file-name (concat "~" name)))))
+ (setq name (concat "mailto:" name))))
+
+ (if (ffap-url-p name)
+ name)))))
(defvar ffap-gopher-regexp
"^.*\\<\\(Type\\|Name\\|Path\\|Host\\|Port\\) *= *\\(.*\\) *$"
@@ -1340,24 +1364,8 @@ which may actually result in an URL rather than a filename."
;; We must inform complete about whether our completion function
;; will do filename style completion.
-(defun ffap-complete-as-file-p ()
- ;; Will `minibuffer-completion-table' complete the minibuffer
- ;; contents as a filename? Assumes the minibuffer is current.
- ;; Note: t and non-nil mean somewhat different reasons.
- (if (eq minibuffer-completion-table 'ffap-read-file-or-url-internal)
- (not (ffap-url-p (buffer-string))) ; t
- (and minibuffer-completing-file-name '(t)))) ;list
-
-(and
- (featurep 'complete)
- (if (boundp 'PC-completion-as-file-name-predicate)
- ;; modern version of complete.el, just set the variable:
- (setq PC-completion-as-file-name-predicate 'ffap-complete-as-file-p)))
-
;;; Highlighting (`ffap-highlight'):
-;;
-;; Based on overlay highlighting in Emacs 19.28 isearch.el.
(defvar ffap-highlight t
"If non-nil, ffap highlights the current buffer substring.")
@@ -1471,10 +1479,12 @@ and the functions `ffap-file-at-point' and `ffap-url-at-point'."
;;; Menu support (`ffap-menu'):
-(defvar ffap-menu-regexp nil
- "If non-nil, overrides `ffap-next-regexp' during `ffap-menu'.
+(defcustom ffap-menu-regexp nil
+ "If non-nil, regexp overriding `ffap-next-regexp' in `ffap-menu'.
Make this more restrictive for faster menu building.
-For example, try \":/\" for URL (and some ftp) references.")
+For example, try \":/\" for URL (and some ftp) references."
+ :type '(choice (const nil) regexp)
+ :group 'ffap)
(defvar ffap-menu-alist nil
"Buffer local cache of menu presented by `ffap-menu'.")
@@ -1688,6 +1698,11 @@ Only intended for interactive use."
(set-window-dedicated-p win wdp))
value))
+(defun ffap--toggle-read-only (buffer)
+ (with-current-buffer buffer
+ (with-no-warnings
+ (toggle-read-only 1))))
+
(defun ffap-read-only ()
"Like `ffap', but mark buffer as read-only.
Only intended for interactive use."
@@ -1695,7 +1710,7 @@ Only intended for interactive use."
(let ((value (call-interactively 'ffap)))
(unless (or (bufferp value) (bufferp (car-safe value)))
(setq value (current-buffer)))
- (mapc (lambda (b) (with-current-buffer b (toggle-read-only 1)))
+ (mapc #'ffap--toggle-read-only
(if (listp value) value (list value)))
value))
@@ -1704,7 +1719,7 @@ Only intended for interactive use."
Only intended for interactive use."
(interactive)
(let ((value (ffap-other-window)))
- (mapc (lambda (b) (with-current-buffer b (toggle-read-only 1)))
+ (mapc #'ffap--toggle-read-only
(if (listp value) value (list value)))
value))
@@ -1713,7 +1728,7 @@ Only intended for interactive use."
Only intended for interactive use."
(interactive)
(let ((value (ffap-other-frame)))
- (mapc (lambda (b) (with-current-buffer b (toggle-read-only 1)))
+ (mapc #'ffap--toggle-read-only
(if (listp value) value (list value)))
value))
@@ -1755,8 +1770,7 @@ Only intended for interactive use."
(defun ffap-ro-mode-hook ()
"Bind `ffap-next' and `ffap-menu' to M-l and M-m, resp."
(local-set-key "\M-l" 'ffap-next)
- (local-set-key "\M-m" 'ffap-menu)
- )
+ (local-set-key "\M-m" 'ffap-menu))
(defun ffap-gnus-hook ()
"Bind `ffap-gnus-next' and `ffap-gnus-menu' to M-l and M-m, resp."
@@ -1800,13 +1814,6 @@ Only intended for interactive use."
(interactive) (ffap-gnus-wrapper '(ffap-menu)))
-(defcustom dired-at-point-require-prefix nil
- "If set, reverses the prefix argument to `dired-at-point'.
-This is nil so neophytes notice ffap. Experts may prefer to disable
-ffap most of the time."
- :type 'boolean
- :group 'ffap
- :version "20.3")
;;;###autoload
(defun dired-at-point (&optional filename)
@@ -1913,7 +1920,7 @@ Only intended for interactive use."
;;; Hooks to put in `file-name-at-point-functions':
;;;###autoload
-(progn (defun ffap-guess-file-name-at-point ()
+(defun ffap-guess-file-name-at-point ()
"Try to get a file name at point.
This hook is intended to be put in `file-name-at-point-functions'."
(when (fboundp 'ffap-guesser)
@@ -1930,14 +1937,13 @@ This hook is intended to be put in `file-name-at-point-functions'."
(when guess
(if (file-directory-p guess)
(file-name-as-directory guess)
- guess))))))
+ guess)))))
;;; Offer default global bindings (`ffap-bindings'):
(defvar ffap-bindings
- '(
- (global-set-key [S-mouse-3] 'ffap-at-mouse)
+ '((global-set-key [S-mouse-3] 'ffap-at-mouse)
(global-set-key [C-S-mouse-3] 'ffap-menu)
(global-set-key "\C-x\C-f" 'find-file-at-point)
@@ -1957,9 +1963,7 @@ This hook is intended to be put in `file-name-at-point-functions'."
(add-hook 'gnus-summary-mode-hook 'ffap-gnus-hook)
(add-hook 'gnus-article-mode-hook 'ffap-gnus-hook)
(add-hook 'vm-mode-hook 'ffap-ro-mode-hook)
- (add-hook 'rmail-mode-hook 'ffap-ro-mode-hook)
- ;; (setq dired-x-hands-off-my-keys t) ; the default
- )
+ (add-hook 'rmail-mode-hook 'ffap-ro-mode-hook))
"List of binding forms evaluated by function `ffap-bindings'.
A reasonable ffap installation needs just this one line:
(ffap-bindings)
diff --git a/lisp/files.el b/lisp/files.el
index d757e1a277c..dad04236ca3 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -415,13 +415,13 @@ location of point in the current buffer."
;;;It is not useful to make this a local variable.
;;;(put 'find-file-not-found-hooks 'permanent-local t)
+(define-obsolete-variable-alias 'find-file-not-found-hooks
+ 'find-file-not-found-functions "22.1")
(defvar find-file-not-found-functions nil
"List of functions to be called for `find-file' on nonexistent file.
These functions are called as soon as the error is detected.
Variable `buffer-file-name' is already set up.
The functions are called in the order given until one of them returns non-nil.")
-(define-obsolete-variable-alias 'find-file-not-found-hooks
- 'find-file-not-found-functions "22.1")
;;;It is not useful to make this a local variable.
;;;(put 'find-file-hooks 'permanent-local t)
@@ -435,6 +435,7 @@ functions are called."
:options '(auto-insert)
:version "22.1")
+(define-obsolete-variable-alias 'write-file-hooks 'write-file-functions "22.1")
(defvar write-file-functions nil
"List of functions to be called before writing out a buffer to a file.
If one of them returns non-nil, the file is considered already written
@@ -451,13 +452,14 @@ coding system and setting mode bits. (See Info
node `(elisp)Saving Buffers'.) To perform various checks or
updates before the buffer is saved, use `before-save-hook'.")
(put 'write-file-functions 'permanent-local t)
-(define-obsolete-variable-alias 'write-file-hooks 'write-file-functions "22.1")
(defvar local-write-file-hooks nil)
(make-variable-buffer-local 'local-write-file-hooks)
(put 'local-write-file-hooks 'permanent-local t)
(make-obsolete-variable 'local-write-file-hooks 'write-file-functions "22.1")
+(define-obsolete-variable-alias 'write-contents-hooks
+ 'write-contents-functions "22.1")
(defvar write-contents-functions nil
"List of functions to be called before writing out a buffer to a file.
If one of them returns non-nil, the file is considered already written
@@ -475,8 +477,6 @@ For hooks that _do_ pertain to the particular visited file, use
To perform various checks or updates before the buffer is saved,
use `before-save-hook'.")
(make-variable-buffer-local 'write-contents-functions)
-(define-obsolete-variable-alias 'write-contents-hooks
- 'write-contents-functions "22.1")
(defcustom enable-local-variables t
"Control use of local variables in files you visit.
@@ -986,6 +986,29 @@ Tip: You can use this expansion of remote identifier components
(funcall handler 'file-remote-p file identification connected)
nil)))
+;; Probably this entire variable should be obsolete now, in favor of
+;; something Tramp-related (?). It is not used in many places.
+;; It's not clear what the best file for this to be in is, but given
+;; it uses custom-initialize-delay, it is easier if it is preloaded
+;; rather than autoloaded.
+(defcustom remote-shell-program
+ ;; This used to try various hard-coded places for remsh, rsh, and
+ ;; rcmd, trying to guess based on location whether "rsh" was
+ ;; "restricted shell" or "remote shell", but I don't see the point
+ ;; in this day and age. Almost everyone will use ssh, and have
+ ;; whatever command they want to use in PATH.
+ (purecopy
+ (let ((list '("ssh" "remsh" "rcmd" "rsh")))
+ (while (and list
+ (not (executable-find (car list)))
+ (setq list (cdr list))))
+ (or (car list) "ssh")))
+ "Program to use to execute commands on a remote host (e.g. ssh or rsh)."
+ :version "24.2" ; ssh rather than rsh, etc
+ :initialize 'custom-initialize-delay
+ :group 'environment
+ :type 'file)
+
(defcustom remote-file-name-inhibit-cache 10
"Whether to use the remote file-name cache for read access.
When `nil', never expire cached values (caution)
@@ -1627,6 +1650,7 @@ Choose the buffer's name using `generate-new-buffer-name'."
"Regexp to match the automounter prefix in a directory name."
:group 'files
:type 'regexp)
+(make-obsolete-variable 'automount-dir-prefix 'directory-abbrev-alist "24.2")
(defvar abbreviated-home-dir nil
"The user's homedir abbreviated according to `directory-abbrev-alist'.")
@@ -2261,9 +2285,11 @@ since only a single case-insensitive search through the alist is made."
("\\.makepp\\'" . makefile-makepp-mode)
,@(if (memq system-type '(berkeley-unix darwin))
'(("\\.mk\\'" . makefile-bsdmake-mode)
+ ("\\.make\\'" . makefile-bsdmake-mode)
("GNUmakefile\\'" . makefile-gmake-mode)
("[Mm]akefile\\'" . makefile-bsdmake-mode))
'(("\\.mk\\'" . makefile-gmake-mode) ; Might be any make, give Gnu the host advantage
+ ("\\.make\\'" . makefile-gmake-mode)
("[Mm]akefile\\'" . makefile-gmake-mode)))
("\\.am\\'" . makefile-automake-mode)
;; Less common extensions come here
@@ -2340,8 +2366,8 @@ ARC\\|ZIP\\|LZH\\|LHA\\|ZOO\\|[JEW]AR\\|XPI\\|RAR\\|7Z\\)\\'" . archive-mode)
("\\.dbk\\'" . xml-mode)
("\\.dtd\\'" . sgml-mode)
("\\.ds\\(ss\\)?l\\'" . dsssl-mode)
- ("\\.js\\'" . js-mode) ; javascript-mode would be better
- ("\\.json\\'" . js-mode)
+ ("\\.js\\'" . javascript-mode)
+ ("\\.json\\'" . javascript-mode)
("\\.[ds]?vh?\\'" . verilog-mode)
;; .emacs or .gnus or .viper following a directory delimiter in
;; Unix, MSDOG or VMS syntax.
@@ -2781,6 +2807,11 @@ same, do nothing and return nil."
(funcall mode)
mode)))
+(defvar file-auto-mode-skip "^\\(#!\\|'\\\\\"\\)"
+ "Regexp of lines to skip when looking for file-local settings.
+If the first line matches this regular expression, then the -*-...-*- file-
+local settings will be consulted on the second line instead of the first.")
+
(defun set-auto-mode-1 ()
"Find the -*- spec in the buffer.
Call with point at the place to start searching from.
@@ -2803,7 +2834,7 @@ have no effect."
;; interpreter invocation. The same holds
;; for '\" in man pages (preprocessor
;; magic for the `man' program).
- (and (looking-at "^\\(#!\\|'\\\\\"\\)") 2)) t)
+ (and (looking-at file-auto-mode-skip) 2)) t)
(progn
(skip-chars-forward " \t")
(setq beg (point))
@@ -3621,19 +3652,21 @@ FILE is the name of the file holding the variables to apply.
The new class name is the same as the directory in which FILE
is found. Returns the new class name."
(with-temp-buffer
- ;; Errors reading the file are not very informative.
- ;; Eg just "Error: (end-of-file)" does not give any clue that the
- ;; problem is related to dir-locals.
- (with-demoted-errors
- (insert-file-contents file)
- (let* ((dir-name (file-name-directory file))
- (class-name (intern dir-name))
- (variables (let ((read-circle nil))
- (read (current-buffer)))))
- (dir-locals-set-class-variables class-name variables)
- (dir-locals-set-directory-class dir-name class-name
- (nth 5 (file-attributes file)))
- class-name))))
+ ;; This is with-demoted-errors, but we want to mention dir-locals
+ ;; in any error message.
+ (let (err)
+ (condition-case err
+ (progn
+ (insert-file-contents file)
+ (let* ((dir-name (file-name-directory file))
+ (class-name (intern dir-name))
+ (variables (let ((read-circle nil))
+ (read (current-buffer)))))
+ (dir-locals-set-class-variables class-name variables)
+ (dir-locals-set-directory-class dir-name class-name
+ (nth 5 (file-attributes file)))
+ class-name))
+ (error (message "Error reading dir-locals: %S" err) nil)))))
(defun hack-dir-local-variables ()
"Read per-directory local variables for the current buffer.
@@ -3642,7 +3675,8 @@ and `file-local-variables-alist', without applying them."
(when (and enable-local-variables
(not (file-remote-p (or (buffer-file-name) default-directory))))
;; Find the variables file.
- (let ((variables-file (dir-locals-find-file (or (buffer-file-name) default-directory)))
+ (let ((variables-file (dir-locals-find-file
+ (or (buffer-file-name) default-directory)))
(class nil)
(dir-name nil))
(cond
@@ -4495,7 +4529,7 @@ Before and after saving the buffer, this function runs
(format
"%s has changed since visited or saved. Save anyway? "
(file-name-nondirectory buffer-file-name)))
- (error "Save not confirmed"))
+ (user-error "Save not confirmed"))
(save-restriction
(widen)
(save-excursion
@@ -5114,6 +5148,24 @@ directly into NEWNAME instead."
(times (and keep-time (nth 5 (file-attributes directory)))))
(if modes (set-file-modes newname modes))
(if times (set-file-times newname times))))))
+
+
+;; At time of writing, only info uses this.
+(defun prune-directory-list (dirs &optional keep reject)
+ "Return a copy of DIRS with all non-existent directories removed.
+The optional argument KEEP is a list of directories to retain even if
+they don't exist, and REJECT is a list of directories to remove from
+DIRS, even if they exist; REJECT takes precedence over KEEP.
+
+Note that membership in REJECT and KEEP is checked using simple string
+comparison."
+ (apply #'nconc
+ (mapcar (lambda (dir)
+ (and (not (member dir reject))
+ (or (member dir keep) (file-directory-p dir))
+ (list dir)))
+ dirs)))
+
(put 'revert-buffer-function 'permanent-local t)
(defvar revert-buffer-function nil
@@ -5362,7 +5414,7 @@ non-nil, it is called instead of rereading visited file contents."
(insert-file-contents file-name nil)
(set-buffer-file-coding-system coding-system))
(after-find-file nil nil t))
- (t (error "Recover-file cancelled")))))
+ (t (user-error "Recover-file cancelled")))))
(defun recover-session ()
"Recover auto save files from a previous Emacs session.
diff --git a/lisp/find-file.el b/lisp/find-file.el
index fe1ab96add9..1deafc9734c 100644
--- a/lisp/find-file.el
+++ b/lisp/find-file.el
@@ -181,21 +181,21 @@ To override this, give an argument to `ff-find-other-file'."
:group 'ff)
;;;###autoload
-(defvar ff-special-constructs
- `(
- ;; C/C++ include, for NeXTstep too
- (,(purecopy "^\#\\s *\\(include\\|import\\)\\s +[<\"]\\(.*\\)[>\"]") .
+(defcustom ff-special-constructs
+ ;; C/C++ include, for NeXTstep too
+ `((,(purecopy "^\#\\s *\\(include\\|import\\)\\s +[<\"]\\(.*\\)[>\"]") .
(lambda ()
- (buffer-substring (match-beginning 2) (match-end 2))))
- )
+ (buffer-substring (match-beginning 2) (match-end 2)))))
;; We include `ff-treat-as-special' documentation here so that autoload
;; can make it available to be read prior to loading this file.
- "List of special constructs for `ff-treat-as-special' to recognize.
+ "List of special constructs recognized by `ff-treat-as-special'.
Each element, tried in order, has the form (REGEXP . EXTRACT).
If REGEXP matches the current line (from the beginning of the line),
`ff-treat-as-special' calls function EXTRACT with no args.
If EXTRACT returns nil, keep trying. Otherwise, return the
-filename that EXTRACT returned.")
+filename that EXTRACT returned."
+ :type '(repeat (cons regexp function))
+ :group 'ff)
(defvaralias 'ff-related-file-alist 'ff-other-file-alist)
(defcustom ff-other-file-alist 'cc-other-file-alist
diff --git a/lisp/follow.el b/lisp/follow.el
index 850cb7b22db..0dea1917f85 100644
--- a/lisp/follow.el
+++ b/lisp/follow.el
@@ -1,5 +1,4 @@
;;; follow.el --- synchronize windows showing the same buffer
-
;; Copyright (C) 1995-1997, 1999, 2001-2012 Free Software Foundation, Inc.
;; Author: Anders Lindgren <andersl@andersl.com>
@@ -24,8 +23,6 @@
;;; Commentary:
-;;{{{ Documentation
-
;; `Follow mode' is a minor mode for Emacs and XEmacs that
;; combines windows into one tall virtual window.
;;
@@ -109,24 +106,11 @@
;; (setq truncate-partial-width-windows nil)
-;; Since the display of XEmacs is pixel-oriented, a line could be
-;; clipped in half at the bottom of the window.
-;;
-;; To make XEmacs avoid clipping (normal) lines, please place the
-;; following line in your init-file:
-;;
-;; (setq pixel-vertical-clip-threshold 30)
-
-
;; The correct way to configure Follow mode, or any other mode for
;; that matter, is to create one or more functions that do
;; whatever you would like to do. These functions are then added to
;; a hook.
;;
-;; When `Follow' mode is activated, functions stored in the hook
-;; `follow-mode-hook' are called. When it is deactivated
-;; `follow-mode-off-hook' is run.
-;;
;; The keymap `follow-key-map' contains key bindings activated by
;; `follow-mode'.
;;
@@ -198,80 +182,29 @@
;; Example from my ~/.emacs:
;; (global-set-key [f8] 'follow-mode)
-
;; Implementation:
;;
-;; In an ideal world, follow mode would have been implemented in the
-;; kernel of the display routines, making sure that the windows (using
-;; follow mode) ALWAYS are aligned. On planet Earth, however, we must
-;; accept a solution where we ALMOST ALWAYS can make sure that the
-;; windows are aligned.
-;;
-;; Follow mode does this in three places:
-;; 1) After each user command.
-;; 2) After a process output has been performed.
-;; 3) When a scrollbar has been moved.
+;; The main method by which Follow mode aligns windows is via the
+;; function `follow-post-command-hook', which is run after each
+;; command. This "fixes up" the alignment of other windows which are
+;; showing the same Follow mode buffer, on the same frame as the
+;; selected window. It does not try to deal with buffers other than
+;; the buffer of the selected frame, or windows on other frames.
;;
-;; This will cover most situations. (Let me know if there are other
-;; situations that should be covered.)
-;;
-;; Note that only the selected window is checked, for the reason of
-;; efficiency and code complexity. (I.e. it is possible to make a
-;; non-selected window unaligned. It will, however, pop right back
-;; when it is selected.)
-
-;;}}}
+;; Comint mode specially calls `follow-comint-scroll-to-bottom' on
+;; Follow mode buffers. This function scrolls the bottom-most window
+;; in a window chain and aligns the other windows accordingly. Follow
+;; mode adds a function to `compilation-filter-hook' to align
+;; compilation buffers.
;;; Code:
-;;{{{ Preliminaries
-
-;; Make the compiler shut up!
-;; There are two strategies:
-;; 1) Shut warnings off completely.
-;; 2) Handle each warning separately.
-;;
-;; Since I would like to see real errors, I've selected the latter
-;; method.
-;;
-;; The problem with undefined variables and functions has been solved
-;; by using `set', `symbol-value' and `symbol-function' rather than
-;; `setq' and direct references to variables and functions.
-;;
-;; For example:
-;; (if (boundp 'foo) ... (symbol-value 'foo) )
-;; (set 'foo ...) <-- XEmacs doesn't fall for this one.
-;; (funcall (symbol-function 'set) 'bar ...)
-;;
-;; Note: When this file is interpreted, `eval-when-compile' is
-;; evaluated. Since it doesn't hurt to evaluate it, but it is a bit
-;; annoying, we test if the byte-compiler has been loaded. This can,
-;; of course, lead to some occasional unintended evaluation...
-;;
-;; Should someone come up with a better solution, please let me
-;; know.
-
(require 'easymenu)
-(eval-when-compile
- (if (or (featurep 'bytecomp)
- (featurep 'byte-compile))
- (cond ((featurep 'xemacs)
- ;; Make XEmacs shut up! I'm using standard Emacs
- ;; functions, they are NOT obsolete!
- (if (eq (get 'force-mode-line-update 'byte-compile)
- 'byte-compile-obsolete)
- (put 'force-mode-line-update 'byte-compile 'nil))
- (if (eq (get 'frame-first-window 'byte-compile)
- 'byte-compile-obsolete)
- (put 'frame-first-window 'byte-compile 'nil))))))
-
-;;}}}
-;;{{{ Variables
+;;; Variables
(defgroup follow nil
"Synchronize windows showing the same buffer."
- :prefix "follow-"
:group 'windows
:group 'convenience)
@@ -280,28 +213,15 @@
:type 'hook
:group 'follow)
-(defcustom follow-mode-off-hook nil
- "Hooks to run when Follow mode is turned off."
- :type 'hook
- :group 'follow)
-(make-obsolete-variable 'follow-mode-off-hook 'follow-mode-hook "22.2")
-
-;;{{{ Keymap/Menu
+;;; Keymap/Menu
;; Define keys for the follow-mode minor mode map and replace some
-;; functions in the global map. All `follow' mode special functions
-;; can be found on (the somewhat cumbersome) "C-c . <key>"
-;; (Control-C dot <key>). (As of Emacs 19.29 the keys
-;; C-c <punctuation character> are reserved for minor modes.)
+;; functions in the global map. All Follow mode special functions can
+;; be found on the `C-c .' prefix key.
;;
-;; To change the prefix, redefine `follow-mode-prefix' before
-;; `follow' is loaded, or see the section on `follow-mode-hook'
-;; above for an example of how to bind the keys the way you like.
-;;
-;; Please note that the keymap is defined the first time this file is
-;; loaded. Also note that the only valid way to manipulate the
-;; keymap is to use `define-key'. Don't change it using `setq' or
-;; similar!
+;; To change the prefix, redefine `follow-mode-prefix' before `follow'
+;; is loaded, or see the section on `follow-mode-hook' above for an
+;; example of how to bind the keys the way you like.
(defcustom follow-mode-prefix "\C-c."
"Prefix key to use for follow commands in Follow mode.
@@ -334,6 +254,12 @@ After that, changing the prefix key requires manipulating keymaps."
;; the look and feel of Follow mode.)
(define-key mainmap [remap end-of-buffer] 'follow-end-of-buffer)
+ (define-key mainmap [remap scroll-bar-toolkit-scroll] 'follow-scroll-bar-toolkit-scroll)
+ (define-key mainmap [remap scroll-bar-drag] 'follow-scroll-bar-drag)
+ (define-key mainmap [remap scroll-bar-scroll-up] 'follow-scroll-bar-scroll-up)
+ (define-key mainmap [remap scroll-bar-scroll-down] 'follow-scroll-bar-scroll-down)
+ (define-key mainmap [remap mwheel-scroll] 'follow-mwheel-scroll)
+
mainmap)
"Minor mode keymap for Follow mode.")
@@ -345,16 +271,8 @@ After that, changing the prefix key requires manipulating keymaps."
'(["Follow mode" follow-mode
:style toggle :selected follow-mode])))
-;; If there is a `tools' menu, we use it. However, we can't add a
-;; minor-mode specific item to it (it's broken), so we make the
-;; contents ghosted when not in use, and add ourselves to the
-;; global map.
(easy-menu-add-item nil '("Tools")
'("Follow"
- ;; The Emacs code used to just gray out operations when follow-mode was
- ;; not enabled, whereas the XEmacs code used to remove it altogether.
- ;; Not sure which is preferable, but clearly the preference should not
- ;; depend on the flavor.
:filter follow-menu-filter
["Scroll Up" follow-scroll-up follow-mode]
["Scroll Down" follow-scroll-down follow-mode]
@@ -373,8 +291,6 @@ After that, changing the prefix key requires manipulating keymaps."
"--"
["Follow mode" follow-mode :style toggle :selected follow-mode]))
-;;}}}
-
(defcustom follow-mode-line-text " Follow"
"Text shown in the mode line when Follow mode is active.
Defaults to \" Follow\". Examples of other values
@@ -385,30 +301,12 @@ are \" Fw\", or simply \"\"."
(defcustom follow-auto nil
"Non-nil activates Follow mode whenever a file is loaded."
:type 'boolean
- :group 'follow)
-
-(defcustom follow-intercept-processes (fboundp 'start-process)
- "When non-nil, Follow mode will monitor process output."
- :type 'boolean
- :group 'follow)
-
-(defvar follow-avoid-tail-recenter-p (not (featurep 'xemacs))
- "When non-nil, patch Emacs so that tail windows won't be recentered.
-
-A \"tail window\" is a window that displays only the end of
-the buffer. Normally it is practical for the user that empty
-windows are recentered automatically. However, when using
-Follow mode it breaks the display when the end is displayed
-in a window \"above\" the last window. This is for
-example the case when displaying a short page in info.
-
-Must be set before Follow mode is loaded.
-
-Please note that it is not possible to fully prevent Emacs from
-recentering empty windows. Please report if you find a repeatable
-situation in which Emacs recenters empty windows.
-
-XEmacs, as of 19.12, does not recenter windows, good!")
+ :group 'follow
+ :set (lambda (symbol value)
+ (if value
+ (add-hook 'find-file-hook 'follow-find-file-hook t)
+ (remove-hook 'find-file-hook 'follow-find-file-hook))
+ (set-default symbol value)))
(defvar follow-cache-command-list
'(next-line previous-line forward-char backward-char)
@@ -423,18 +321,16 @@ The commands in this list are checked at load time.
To mark other commands as suitable for caching, set the symbol
property `follow-mode-use-cache' to non-nil.")
-(defvar follow-debug nil
- "Non-nil when debugging Follow mode.")
-
+(defcustom follow-debug nil
+ "If non-nil, emit Follow mode debugging messages."
+ :type 'boolean
+ :group 'follow)
;; Internal variables:
(defvar follow-internal-force-redisplay nil
"True when Follow mode should redisplay the windows.")
-(defvar follow-process-filter-alist '()
- "The original filters for processes intercepted by Follow mode.")
-
(defvar follow-active-menu nil
"The menu visible when Follow mode is active.")
@@ -448,8 +344,7 @@ Used by `follow-window-size-change'.")
(defvar follow-windows-start-end-cache nil
"Cache used by `follow-window-start-end'.")
-;;}}}
-;;{{{ Debug messages
+;;; Debug messages
;; This inline function must be as small as possible!
;; Maybe we should define a macro that expands to nil if
@@ -460,15 +355,12 @@ Used by `follow-window-size-change'.")
(if (and (boundp 'follow-debug) follow-debug)
(apply 'message args)))
-;;}}}
-;;{{{ Cache
+;;; Cache
(dolist (cmd follow-cache-command-list)
(put cmd 'follow-mode-use-cache t))
-;;}}}
-
-;;{{{ The mode
+;;; The mode
;;;###autoload
(defun turn-on-follow-mode ()
@@ -514,49 +406,35 @@ To split one large window into two side-by-side windows, the commands
Only windows displayed in the same frame follow each other.
-If the variable `follow-intercept-processes' is non-nil, Follow mode
-will listen to the output of processes and redisplay accordingly.
-\(This is the default.)
-
This command runs the normal hook `follow-mode-hook'.
Keys specific to Follow mode:
\\{follow-mode-map}"
:keymap follow-mode-map
- (when (and follow-mode follow-intercept-processes)
- (follow-intercept-process-output))
- (cond (follow-mode ; On
- ;; XEmacs: If this is non-nil, the window will scroll before
- ;; the point will have a chance to get into the next window.
- (when (boundp 'scroll-on-clipped-lines)
- (setq scroll-on-clipped-lines nil))
- (force-mode-line-update)
- (add-hook 'post-command-hook 'follow-post-command-hook t))
-
- ((not follow-mode) ; Off
- (force-mode-line-update))))
-
-;;}}}
-;;{{{ Find file hook
-
-;; This will start follow-mode whenever a new file is loaded, if
-;; the variable `follow-auto' is non-nil.
-
-(add-hook 'find-file-hook 'follow-find-file-hook t)
+ (if follow-mode
+ (progn
+ (add-hook 'compilation-filter-hook 'follow-align-compilation-windows t t)
+ (add-hook 'post-command-hook 'follow-post-command-hook t)
+ (add-hook 'window-size-change-functions 'follow-window-size-change t))
+ ;; Remove globally-installed hook functions only if there is no
+ ;; other Follow mode buffer.
+ (let ((buffers (buffer-list))
+ following)
+ (while (and (not following) buffers)
+ (setq following (buffer-local-value 'follow-mode (car buffers))
+ buffers (cdr buffers)))
+ (unless following
+ (remove-hook 'post-command-hook 'follow-post-command-hook)
+ (remove-hook 'window-size-change-functions 'follow-window-size-change)))
+ (remove-hook 'compilation-filter-hook 'follow-align-compilation-windows t)))
(defun follow-find-file-hook ()
"Find-file hook for Follow mode. See the variable `follow-auto'."
- (if follow-auto (follow-mode t)))
-
-;;}}}
+ (if follow-auto (follow-mode 1)))
-;;{{{ User functions
+;;; User functions
-;;;
-;;; User functions usable when in Follow mode.
-;;;
-
-;;{{{ Scroll
+;;; Scroll
;; `scroll-up' and `-down', but for windows in Follow mode.
;;
@@ -584,7 +462,7 @@ Negative ARG means scroll downward.
Works like `scroll-up' when not in Follow mode."
(interactive "P")
- (cond ((not (and (boundp 'follow-mode) follow-mode))
+ (cond ((not follow-mode)
(scroll-up arg))
(arg
(save-excursion (scroll-up arg))
@@ -613,7 +491,7 @@ Negative ARG means scroll upward.
Works like `scroll-up' when not in Follow mode."
(interactive "P")
- (cond ((not (and (boundp 'follow-mode) follow-mode))
+ (cond ((not follow-mode)
(scroll-up arg))
(arg
(save-excursion (scroll-down arg)))
@@ -633,8 +511,48 @@ Works like `scroll-up' when not in Follow mode."
(vertical-motion (- next-screen-context-lines 1))
(setq follow-internal-force-redisplay t))))))
-;;}}}
-;;{{{ Buffer
+(declare-function comint-adjust-point "comint" (window))
+(defvar comint-scroll-show-maximum-output)
+
+(defun follow-comint-scroll-to-bottom (&optional window)
+ "Scroll the bottom-most window in the current Follow chain.
+This is to be called by `comint-postoutput-scroll-to-bottom'."
+ (let* ((buffer (current-buffer))
+ (selected (selected-window))
+ (is-selected (eq (window-buffer) buffer))
+ some-window)
+ (when (or is-selected
+ (setq some-window (get-buffer-window)))
+ (let* ((pos (progn (comint-adjust-point nil) (point)))
+ (win (if is-selected
+ selected
+ (car (last (follow-all-followers some-window))))))
+ (select-window win)
+ (goto-char pos)
+ (setq follow-windows-start-end-cache nil)
+ (follow-adjust-window win pos)
+ (unless is-selected
+ (select-window selected)
+ (set-buffer buffer))))))
+
+(defun follow-align-compilation-windows ()
+ "Align the windows of the current Follow mode buffer.
+This is to be called from `compilation-filter-hook'."
+ (let ((buffer (current-buffer))
+ (win (get-buffer-window))
+ (selected (selected-window)))
+ (when (and follow-mode (waiting-for-user-input-p) win)
+ (let ((windows (follow-all-followers win)))
+ (unless (eq (window-buffer selected) buffer)
+ (setq win (car windows))
+ (select-window win))
+ (follow-redisplay windows win t)
+ (setq follow-windows-start-end-cache nil)
+ (unless (eq selected win)
+ (select-window selected)
+ (set-buffer buffer))))))
+
+;;; Buffer
;;;###autoload
(defun follow-delete-other-windows-and-split (&optional arg)
@@ -649,11 +567,7 @@ two windows always will display two successive pages.
If ARG is positive, the leftmost window is selected. If negative,
the rightmost is selected. If ARG is nil, the leftmost window is
-selected if the original window is the first one in the frame.
-
-To bind this command to a hotkey, place the following line
-in your `~/.emacs' file, replacing [f7] by your favorite key:
- (global-set-key [f7] 'follow-delete-other-windows-and-split)"
+selected if the original window is the first one in the frame."
(interactive "P")
(let ((other (or (and (null arg)
(not (eq (selected-window)
@@ -689,28 +603,22 @@ Defaults to current buffer."
(current-buffer))))
(or buffer (setq buffer (current-buffer)))
(let ((orig-window (selected-window)))
- (walk-windows
- (function
- (lambda (win)
- (select-window win)
- (switch-to-buffer buffer))))
+ (walk-windows (lambda (win)
+ (select-window win)
+ (switch-to-buffer buffer))
+ 'no-minibuf)
(select-window orig-window)
(follow-redisplay)))
(defun follow-switch-to-current-buffer-all ()
- "Show current buffer in all windows on this frame, and enter Follow mode.
-
-To bind this command to a hotkey place the following line
-in your `~/.emacs' file:
- (global-set-key [f7] 'follow-switch-to-current-buffer-all)"
+ "Show current buffer in all windows on this frame, and enter Follow mode."
(interactive)
- (or (and (boundp 'follow-mode) follow-mode)
- (follow-mode 1))
+ (unless follow-mode
+ (follow-mode 1))
(follow-switch-to-buffer-all))
-;;}}}
-;;{{{ Movement
+;;; Movement
;; Note, these functions are not very useful, at least not unless you
;; rebind the rather cumbersome key sequence `C-c . p'.
@@ -744,8 +652,7 @@ in your `~/.emacs' file:
(interactive)
(select-window (car (reverse (follow-all-followers)))))
-;;}}}
-;;{{{ Redraw
+;;; Redraw
(defun follow-recenter (&optional arg)
"Recenter the middle window around point.
@@ -777,9 +684,7 @@ from the bottom."
(win (nth (/ (- (length windows) 1) 2) windows)))
(select-window win)
(goto-char dest)
- (recenter)
- ;;(setq follow-internal-force-redisplay t)
- )))
+ (recenter))))
(defun follow-redraw ()
@@ -792,8 +697,7 @@ Follow mode since the windows should always be aligned."
(sit-for 0)
(follow-redisplay))
-;;}}}
-;;{{{ End of buffer
+;;; End of buffer
(defun follow-end-of-buffer (&optional arg)
"Move point to the end of the buffer, Follow mode style.
@@ -816,38 +720,37 @@ of the way from the true end."
(with-no-warnings
(end-of-buffer arg))))
-;;}}}
-
-;;}}}
-
-;;{{{ Display
-
-;;;; The display routines
-
-;;{{{ Information gathering functions
-
-(defun follow-all-followers (&optional testwin)
- "Return all windows displaying the same buffer as the TESTWIN.
-The list contains only windows displayed in the same frame as TESTWIN.
-If TESTWIN is nil the selected window is used."
- (or (window-live-p testwin)
- (setq testwin (selected-window)))
- (let* ((top (frame-first-window (window-frame testwin)))
- (win top)
- (done nil)
- (windows '())
- (buffer (window-buffer testwin)))
- (while (and (not done) win)
- (if (eq (window-buffer win) buffer)
- (setq windows (cons win windows)))
- (setq win (next-window win 'not))
- (if (eq win top)
- (setq done t)))
- (nreverse windows)))
-
+;;; Display
+
+(defun follow--window-sorter (w1 w2)
+ "Sorting function for W1 and W2 based on their positions.
+Return non-nil if W1 is above W2; if their top-lines
+are at the same position, return non-nil if W1 is to the
+left of W2."
+ (let* ((edge-1 (window-pixel-edges w1))
+ (edge-2 (window-pixel-edges w2))
+ (y1 (nth 1 edge-1))
+ (y2 (nth 1 edge-2)))
+ (if (= y1 y2)
+ (< (car edge-1) (car edge-2))
+ (< y1 y2))))
+
+(defun follow-all-followers (&optional win)
+ "Return all windows displaying the same buffer as the WIN.
+The list is sorted with topmost and leftmost windows first, and
+contains only windows in the same frame as WIN. If WIN is nil,
+it defaults to the selected window."
+ (unless (window-live-p win)
+ (setq win (selected-window)))
+ (let ((buffer (window-buffer win))
+ windows)
+ (dolist (w (window-list (window-frame win) 'no-minibuf win))
+ (if (eq (window-buffer w) buffer)
+ (push w windows)))
+ (sort windows 'follow--window-sorter)))
(defun follow-split-followers (windows &optional win)
- "Split the WINDOWS into the sets: predecessors and successors.
+ "Split WINDOWS into two sets: predecessors and successors.
Return `(PRED . SUCC)' where `PRED' and `SUCC' are ordered starting
from the selected window."
(or win
@@ -858,62 +761,35 @@ from the selected window."
(setq windows (cdr windows)))
(cons pred (cdr windows))))
-
-;; This function is optimized function for speed!
-
(defun follow-calc-win-end (&optional win)
- "Calculate the presumed window end for WIN.
-
-Actually, the position returned is the start of the next
-window, normally is the end plus one.
-
-If WIN is nil, the selected window is used.
-
-Returns (end-pos end-of-buffer-p)"
- (if (featurep 'xemacs)
- ;; XEmacs can calculate the end of the window by using
- ;; the 'guarantee options. GOOD!
- (let ((end (window-end win t)))
- (if (= end (point-max (window-buffer win)))
- (list end t)
- (list (+ end 1) nil)))
- ;; Emacs: We have to calculate the end by ourselves.
- ;; This code works on both XEmacs and Emacs, but now
- ;; that XEmacs has got custom-written code, this could
- ;; be optimized for Emacs.
- (let (height buffer-end-p)
- (with-selected-window (or win (selected-window))
- (save-excursion
- (goto-char (window-start))
- (setq height
- (- (window-height)
- (if header-line-format 2 1)))
- (setq buffer-end-p
- (if (bolp)
- (not (= height (vertical-motion height)))
- (save-restriction
- ;; Fix a mis-feature in `vertical-motion':
- ;; The start of the window is assumed to
- ;; coincide with the start of a line.
- (narrow-to-region (point) (point-max))
- (not (= height (vertical-motion height))))))
- (list (point) buffer-end-p))))))
-
-
-;; Can't use `save-window-excursion' since it triggers a redraw.
-(defun follow-calc-win-start (windows pos win)
- "Calculate where WIN will start if the first in WINDOWS start at POS.
+ "Calculate the end position for window WIN.
+Return (END-POS END-OF-BUFFER).
+
+Actually, the position returned is the start of the line after
+the last fully-visible line in WIN. If WIN is nil, the selected
+window is used."
+ (let* ((win (or win (selected-window)))
+ (edges (window-inside-pixel-edges win))
+ (ht (- (nth 3 edges) (nth 1 edges)))
+ (last-line-pos (posn-point (posn-at-x-y 0 (1- ht) win))))
+ (if (pos-visible-in-window-p last-line-pos win)
+ (let ((end (window-end win t)))
+ (list end (= end (point-max))))
+ (list last-line-pos nil))))
-If WIN is nil the point below all windows is returned."
- (let (start)
- (while (and windows (not (eq (car windows) win)))
- (setq start (window-start (car windows)))
+(defun follow-calc-win-start (windows pos win)
+ "Determine the start of window WIN in a Follow mode window chain.
+WINDOWS is a list of chained windows, and POS is the starting
+position for the first window in the list. If WIN is nil, return
+the point below all windows."
+ (while (and windows (not (eq (car windows) win)))
+ (let ((old-start (window-start (car windows))))
+ ;; Can't use `save-window-excursion' since it triggers a redraw.
(set-window-start (car windows) pos 'noforce)
(setq pos (car (follow-calc-win-end (car windows))))
- (set-window-start (car windows) start 'noforce)
- (setq windows (cdr windows)))
- pos))
-
+ (set-window-start (car windows) old-start 'noforce)
+ (setq windows (cdr windows))))
+ pos)
;; The result from `follow-windows-start-end' is cached when using
;; a handful simple commands, like cursor movement commands.
@@ -932,23 +808,8 @@ Note that this handles the case when the cache has been set to nil."
(setq cache (cdr cache)))
(and res (null windows) (null cache))))
-
-(defsubst follow-invalidate-cache ()
- "Force `follow-windows-start-end' to recalculate the end of the window."
- (setq follow-windows-start-end-cache nil))
-
-
-;; Build a list of windows and their start and end positions.
-;; Useful to avoid calculating start/end position whenever they are needed.
-;; The list has the format:
-;; ((Win Start End End-of-buffer-visible-p) ...)
-
-;; Used to have a `save-window-excursion', but it obviously triggered
-;; redraws of the display. Check if I used it for anything.
-
-
(defun follow-windows-start-end (windows)
- "Builds a list of (WIN START END BUFFER-END-P) for every window in WINDOWS."
+ "Return a list of (WIN START END BUFFER-END-P) for window list WINDOWS."
(if (follow-cache-valid-p windows)
follow-windows-start-end-cache
(let ((orig-win (selected-window))
@@ -960,7 +821,6 @@ Note that this handles the case when the cache has been set to nil."
(select-window orig-win)
(setq follow-windows-start-end-cache (nreverse win-start-end)))))
-
(defsubst follow-pos-visible (pos win win-start-end)
"Non-nil when POS is visible in WIN."
(let ((wstart-wend-bend (cdr (assq win win-start-end))))
@@ -974,20 +834,16 @@ Note that this handles the case when the cache has been set to nil."
;; should start at a full screen line.
(defsubst follow-windows-aligned-p (win-start-end)
- "Non-nil if the follower windows are aligned."
- (let ((res t))
- (save-excursion
- (goto-char (window-start (caar win-start-end)))
- (unless (bolp)
- (vertical-motion 0 (caar win-start-end))
- (setq res (eq (point) (window-start (caar win-start-end))))))
- (while (and res (cdr win-start-end))
- ;; At least two followers left
- (setq res (eq (car (cdr (cdr (car win-start-end))))
- (car (cdr (car (cdr win-start-end))))))
+ "Non-nil if the follower windows are aligned.
+The argument, WIN-START-END, should be a list of the form
+returned by `follow-windows-start-end'."
+ (let ((result t))
+ (while (and win-start-end result)
+ (if (cdr win-start-end)
+ (setq result (eq (nth 2 (car win-start-end))
+ (nth 1 (cadr win-start-end)))))
(setq win-start-end (cdr win-start-end)))
- res))
-
+ result))
;; Check if the point is visible in all windows. (So that
;; no one will be recentered.)
@@ -1023,43 +879,22 @@ Note that this handles the case when the cache has been set to nil."
(vertical-motion 1 win)
(set-window-start win (point) 'noforce)))))
-;;}}}
-;;{{{ Selection functions
-
-;; Make a window in WINDOWS selected if it currently
-;; is displaying the position DEST.
-;;
-;; We don't select a window if it just has been moved.
-
(defun follow-select-if-visible (dest win-start-end)
"Select and return a window, if DEST is visible in it.
Return the selected window."
- (let (win win-end)
+ (let (win win-end wse)
(while (and (not win) win-start-end)
;; Don't select a window that was just moved. This makes it
- ;; possible to later select the last window after a `end-of-buffer'
- ;; command.
- (when (follow-pos-visible dest (caar win-start-end) win-start-end)
- (setq win (caar win-start-end)
- win-end (car (cddr (car win-start-end))))
+ ;; possible to later select the last window after a
+ ;; `end-of-buffer' command.
+ (setq wse (car win-start-end))
+ (when (follow-pos-visible dest (car wse) win-start-end)
+ (setq win (car wse)
+ win-end (nth 2 wse))
(select-window win))
(setq win-start-end (cdr win-start-end)))
- ;; The last line of the window may be partially visible; if so,
- ;; and if point is visible in the next window, select the next
- ;; window instead.
- (and win
- (/= dest (point-max))
- win-start-end
- (follow-pos-visible dest (caar win-start-end) win-start-end)
- (save-excursion
- (goto-char dest)
- (vertical-motion 1 win)
- (>= (point) win-end))
- (setq win (caar win-start-end))
- (select-window win))
win))
-
;; Lets select a window showing the end. Make sure we only select it if
;; it wasn't just moved here. (I.e. M-> shall not unconditionally place
;; the point in the selected window.)
@@ -1112,8 +947,8 @@ Otherwise, return nil."
(set-window-start (car windows) (point) 'noforce)
(setq end-pos-end-p (follow-calc-win-end (car windows)))
(goto-char (car end-pos-end-p))
- ;; Visible, if dest above end, or if eob is visible inside
- ;; the window.
+ ;; Visible, if dest above end, or if eob is visible
+ ;; inside the window.
(if (or (car (cdr end-pos-end-p))
(< dest (point)))
(setq win (car windows))
@@ -1124,9 +959,7 @@ Otherwise, return nil."
(goto-char dest))
win))
-
-;;}}}
-;;{{{ Redisplay
+;;; Redisplay
;; Redraw all the windows on the screen, starting with the top window.
;; The window used as as marker is WIN, or the selected window if WIN
@@ -1167,7 +1000,6 @@ repositioning the other windows."
(set-window-start w start))
(setq start (car (follow-calc-win-end w))))))
-
(defun follow-estimate-first-window-start (windows win start)
"Estimate the position of the first window.
The estimate is computed by assuming that the window WIN, which
@@ -1206,9 +1038,6 @@ should be a member of WINDOWS, starts at position START."
;; Find the starting point, start at GUESS and search upward. Return
;; a point on the same line as GUESS, or above.
-;;
-;; (Is this ever used? I must make sure it works just in case it is
-;; ever called.)
(defun follow-calculate-first-window-start-from-below
(windows guess &optional win start)
@@ -1240,65 +1069,40 @@ should be a member of WINDOWS, starts at position START."
(setq res (point))))))
res)))
-;;}}}
-;;{{{ Avoid tail recenter
+;;; Avoid tail recenter
-;; This sets the window internal flag `force_start'. The effect is that
-;; windows only displaying the tail aren't recentered.
-;; Has to be called before every redisplay... (Great isn't it?)
-;;
-;; XEmacs doesn't recenter the tail, GOOD!
-;;
-;; A window displaying only the tail, is a window whose
-;; window-start position is equal to (point-max) of the buffer it
-;; displays.
-;;
-;; This function is also added to `post-command-idle-hook', introduced
-;; in Emacs 19.30. This is needed since the vaccine injected by the
-;; call from `post-command-hook' only works until the next redisplay.
-;; It is possible that the functions in the `post-command-idle-hook'
-;; can cause a redisplay, and hence a new vaccine is needed.
+;; This sets the window internal flag `force_start'. The effect is
+;; that windows only displaying the tail aren't recentered.
;;
-;; Sometimes, calling this function could actually cause a redisplay,
-;; especially if it is placed in the debug filter section. I must
-;; investigate this further...
+;; A window displaying only the tail, is a window whose window-start
+;; position is equal to (point-max) of the buffer it displays.
(defun follow-avoid-tail-recenter (&rest _rest)
"Make sure windows displaying the end of a buffer aren't recentered.
-
This is done by reading and rewriting the start position of
non-first windows in Follow mode."
- (if follow-avoid-tail-recenter-p
- (let* ((orig-buffer (current-buffer))
- (top (frame-first-window (selected-frame)))
- (win top)
- (who '()) ; list of (buffer . frame)
- start
- pair) ; (buffer . frame)
- ;; If the only window in the frame is a minibuffer
- ;; window, `next-window' will never find it again...
- (if (window-minibuffer-p top)
- nil
- (while ;; look, no body!
- (progn
- (setq start (window-start win))
- (set-buffer (window-buffer win))
- (setq pair (cons (window-buffer win) (window-frame win)))
- (if (member pair who)
- (if (and (boundp 'follow-mode) follow-mode
- (eq (point-max) start))
- ;; Write the same window start back, but don't
- ;; set the NOFORCE flag.
- (set-window-start win start))
- (setq who (cons pair who)))
- (setq win (next-window win 'not t))
- (not (eq win top)))) ;; Loop while this is true.
- (set-buffer orig-buffer)))))
-
-;;}}}
-
-;;}}}
-;;{{{ Post Command Hook
+ (let* ((orig-buffer (current-buffer))
+ (top (frame-first-window (selected-frame)))
+ (win top)
+ who) ; list of (buffer . frame)
+ ;; If the only window in the frame is a minibuffer
+ ;; window, `next-window' will never find it again...
+ (unless (window-minibuffer-p top)
+ (while ;; look, no body!
+ (let ((start (window-start win))
+ (pair (cons (window-buffer win) (window-frame win))))
+ (set-buffer (window-buffer win))
+ (cond ((null (member pair who))
+ (setq who (cons pair who)))
+ ((and follow-mode (eq (point-max) start))
+ ;; Write the same window start back, but don't
+ ;; set the NOFORCE flag.
+ (set-window-start win start)))
+ (setq win (next-window win 'not t))
+ (not (eq win top)))) ;; Loop while this is true.
+ (set-buffer orig-buffer))))
+
+;;; Post Command Hook
;; The magic little box. This function is called after every command.
@@ -1319,149 +1123,151 @@ non-first windows in Follow mode."
(with-current-buffer (window-buffer win)
(unless (and (symbolp this-command)
(get this-command 'follow-mode-use-cache))
- (follow-invalidate-cache))
- (when (and follow-mode
- (not (window-minibuffer-p win)))
- ;; The buffer shown in the selected window is in follow
- ;; mode. Find the current state of the display.
- (let* ((windows (follow-all-followers win))
- (dest (point))
- (win-start-end (progn
- (follow-update-window-start (car windows))
- (follow-windows-start-end windows)))
- (aligned (follow-windows-aligned-p win-start-end))
- (visible (follow-pos-visible dest win win-start-end))
- selected-window-up-to-date)
- (unless (and aligned visible)
- (follow-invalidate-cache))
- (follow-avoid-tail-recenter)
- ;; Select a window to display point.
- (unless follow-internal-force-redisplay
- (if (eq dest (point-max))
- ;; At point-max, we have to be careful since the
- ;; display can be aligned while `dest' can be
- ;; visible in several windows.
- (cond
- ;; Select the current window, but only when the
- ;; display is correct. (When inserting characters
- ;; in a tail window, the display is not correct, as
- ;; they are shown twice.)
- ;;
- ;; Never stick to the current window after a
- ;; deletion. The reason is cosmetic: when typing
- ;; `DEL' in a window showing only the end of the
- ;; file, a character would be removed from the
- ;; window above, which is very unintuitive.
- ((and visible
- aligned
- (not (memq this-command
- '(backward-delete-char
- delete-backward-char
- backward-delete-char-untabify
- kill-region))))
- (follow-debug-message "Max: same"))
- ;; If the end is visible, and the window doesn't
- ;; seems like it just has been moved, select it.
- ((follow-select-if-end-visible win-start-end)
- (follow-debug-message "Max: end visible")
- (setq visible t aligned nil)
- (goto-char dest))
- ;; Just show the end...
- (t
- (follow-debug-message "Max: default")
- (select-window (car (reverse windows)))
- (goto-char dest)
- (setq visible nil aligned nil)))
-
- ;; We're not at the end, here life is much simpler.
- (cond
- ;; This is the normal case!
- ;; It should be optimized for speed.
- ((and visible aligned)
- (follow-debug-message "same"))
- ;; Pick a position in any window. If the display is
- ;; ok, this will pick the `correct' window.
- ((follow-select-if-visible dest win-start-end)
- (follow-debug-message "visible")
- (goto-char dest)
- ;; We have to perform redisplay, since scrolling is
- ;; needed in case the line is partially visible.
- (setq visible nil))
- ;; Not visible anywhere else, lets pick this one.
- ;; (Is this case used?)
- (visible
- (follow-debug-message "visible in selected."))
- ;; Far out!
- ((eq dest (point-min))
- (follow-debug-message "min")
- (select-window (car windows))
- (goto-char dest)
- (set-window-start (selected-window) (point-min))
- (setq win-start-end (follow-windows-start-end windows))
- (follow-invalidate-cache)
- (setq visible t aligned nil))
- ;; If we can position the cursor without moving the first
- ;; window, do it. This is the case that catches `RET'
- ;; at the bottom of a window.
- ((follow-select-if-visible-from-first dest windows)
- (follow-debug-message "Below first")
- (setq visible t aligned t))
- ;; None of the above. For simplicity, we stick to the
- ;; selected window.
- (t
- (follow-debug-message "None")
- (setq visible nil aligned nil))))
- ;; If a new window has been selected, make sure that the
- ;; old is not scrolled when the point is outside the
- ;; window.
- (unless (eq win (selected-window))
- (let ((p (window-point win)))
- (set-window-start win (window-start win) nil)
- (set-window-point win p))))
- (unless visible
- ;; If point may not be visible in the selected window,
- ;; perform a redisplay; this ensures scrolling.
- (redisplay)
- (setq selected-window-up-to-date t)
- (follow-avoid-tail-recenter)
- (setq win-start-end (follow-windows-start-end windows))
- (follow-invalidate-cache)
- (setq aligned nil))
- ;; Now redraw the windows around the selected window.
- (unless (and (not follow-internal-force-redisplay)
- (or aligned
- (follow-windows-aligned-p win-start-end))
- (follow-point-visible-all-windows-p
- win-start-end))
- (setq follow-internal-force-redisplay nil)
- (follow-redisplay windows (selected-window)
- selected-window-up-to-date)
- (setq win-start-end (follow-windows-start-end windows))
- (follow-invalidate-cache)
- ;; When the point ends up in another window. This
- ;; happens when dest is in the beginning of the file and
- ;; the selected window is not the first. It can also,
- ;; in rare situations happen when long lines are used
- ;; and there is a big difference between the width of
- ;; the windows. (When scrolling one line in a wide
- ;; window which will cause a move larger that an entire
- ;; small window.)
- (unless (follow-pos-visible dest win win-start-end)
- (follow-select-if-visible dest win-start-end)
- (goto-char dest)))
-
- ;; If the region is visible, make it look good when spanning
- ;; multiple windows.
- (when (region-active-p)
- (follow-maximize-region
- (selected-window) windows win-start-end))))
- ;; Whether or not the buffer was in follow mode, we must
- ;; update the windows displaying the tail so that Emacs won't
- ;; recenter them.
- (follow-avoid-tail-recenter)))))
-
-;;}}}
-;;{{{ The region
+ (setq follow-windows-start-end-cache nil)))
+ (follow-adjust-window win (point)))))
+
+(defun follow-adjust-window (win dest)
+ ;; Adjust the window WIN and its followers.
+ (with-current-buffer (window-buffer win)
+ (when (and follow-mode
+ (not (window-minibuffer-p win)))
+ (let* ((windows (follow-all-followers win))
+ (win-start-end (progn
+ (follow-update-window-start (car windows))
+ (follow-windows-start-end windows)))
+ (aligned (follow-windows-aligned-p win-start-end))
+ (visible (follow-pos-visible dest win win-start-end))
+ selected-window-up-to-date)
+ (unless (and aligned visible)
+ (setq follow-windows-start-end-cache nil))
+
+ ;; Select a window to display point.
+ (unless follow-internal-force-redisplay
+ (if (eq dest (point-max))
+ ;; Be careful at point-max: the display can be aligned
+ ;; while DEST can be visible in several windows.
+ (cond
+ ;; Select the current window, but only when the display
+ ;; is correct. (When inserting characters in a tail
+ ;; window, the display is not correct, as they are
+ ;; shown twice.)
+ ;;
+ ;; Never stick to the current window after a deletion.
+ ;; Otherwise, when typing `DEL' in a window showing
+ ;; only the end of the file, a character would be
+ ;; removed from the window above, which is very
+ ;; unintuitive.
+ ((and visible
+ aligned
+ (not (memq this-command
+ '(backward-delete-char
+ delete-backward-char
+ backward-delete-char-untabify
+ kill-region))))
+ (follow-debug-message "Max: same"))
+ ;; If the end is visible, and the window doesn't
+ ;; seems like it just has been moved, select it.
+ ((follow-select-if-end-visible win-start-end)
+ (follow-debug-message "Max: end visible")
+ (setq visible t aligned nil)
+ (goto-char dest))
+ ;; Just show the end...
+ (t
+ (follow-debug-message "Max: default")
+ (select-window (car (last windows)))
+ (goto-char dest)
+ (setq visible nil aligned nil)))
+
+ ;; We're not at the end, here life is much simpler.
+ (cond
+ ;; This is the normal case!
+ ;; It should be optimized for speed.
+ ((and visible aligned)
+ (follow-debug-message "same"))
+ ;; Pick a position in any window. If the display is ok,
+ ;; this picks the `correct' window.
+ ((follow-select-if-visible dest win-start-end)
+ (follow-debug-message "visible")
+ (goto-char dest)
+ ;; Perform redisplay, in case line is partially visible.
+ (setq visible nil))
+ ;; Not visible anywhere else, lets pick this one.
+ (visible
+ (follow-debug-message "visible in selected."))
+ ;; If DEST is before the first window start, select the
+ ;; first window.
+ ((< dest (nth 1 (car win-start-end)))
+ (follow-debug-message "before first")
+ (select-window (car windows))
+ (goto-char dest)
+ (setq visible nil aligned nil))
+ ;; If we can position the cursor without moving the first
+ ;; window, do it. This is the case that catches `RET' at
+ ;; the bottom of a window.
+ ((follow-select-if-visible-from-first dest windows)
+ (follow-debug-message "Below first")
+ (setq visible t aligned t))
+ ;; None of the above. Stick to the selected window.
+ (t
+ (follow-debug-message "None")
+ (setq visible nil aligned nil))))
+
+ ;; If a new window was selected, make sure that the old is
+ ;; not scrolled when the point is outside the window.
+ (unless (eq win (selected-window))
+ (let ((p (window-point win)))
+ (set-window-start win (window-start win) nil)
+ (set-window-point win p))))
+
+ (unless visible
+ ;; If point may not be visible in the selected window,
+ ;; perform a redisplay; this ensures scrolling.
+ (let ((opoint (point)))
+ (redisplay)
+ ;; If this `redisplay' moved point, we got clobbered by a
+ ;; previous call to `set-window-start'. Try again.
+ (when (/= (point) opoint)
+ (goto-char opoint)
+ (redisplay)))
+
+ (setq selected-window-up-to-date t)
+ (follow-avoid-tail-recenter)
+ (setq win-start-end (follow-windows-start-end windows)
+ follow-windows-start-end-cache nil
+ aligned nil))
+
+ ;; Now redraw the windows around the selected window.
+ (unless (and (not follow-internal-force-redisplay)
+ (or aligned
+ (follow-windows-aligned-p win-start-end))
+ (follow-point-visible-all-windows-p win-start-end))
+ (setq follow-internal-force-redisplay nil)
+ (follow-redisplay windows (selected-window)
+ selected-window-up-to-date)
+ (setq win-start-end (follow-windows-start-end windows)
+ follow-windows-start-end-cache nil)
+ ;; The point can ends up in another window when DEST is at
+ ;; the beginning of the buffer and the selected window is
+ ;; not the first. It can also happen when long lines are
+ ;; used and there is a big difference between the width of
+ ;; the windows. (When scrolling one line in a wide window
+ ;; which will cause a move larger that an entire small
+ ;; window.)
+ (unless (follow-pos-visible dest win win-start-end)
+ (follow-select-if-visible dest win-start-end)
+ (goto-char dest)))
+
+ ;; If the region is visible, make it look good when spanning
+ ;; multiple windows.
+ (when (region-active-p)
+ (follow-maximize-region
+ (selected-window) windows win-start-end)))
+
+ ;; Whether or not the buffer was in follow mode, update windows
+ ;; displaying the tail so that Emacs won't recenter them.
+ (follow-avoid-tail-recenter))))
+
+;;; The region
;; Tries to make the highlighted area representing the region look
;; good when spanning several windows.
@@ -1484,440 +1290,70 @@ non-first windows in Follow mode."
(set-window-point (car succ) (nth 1 (assq (car succ) win-start-end)))
(setq succ (cdr succ)))))
-;;}}}
-;;{{{ Scroll bar
+;;; Scroll bar
;;;; Scroll-bar support code.
-;; Why is it needed? Well, if the selected window is in follow mode,
-;; all its followers stick to it blindly. If one of them is scrolled,
-;; it immediately returns to the original position when the mouse is
-;; released. If the selected window is not a follower of the dragged
-;; window the windows will be unaligned.
-
-;; The advices don't get compiled. Aesthetically, this might be a
-;; problem but in practical life it isn't.
-
-;; Discussion: Now when the other windows in the chain follow the
-;; dragged, should we really select it?
-
-(cond ((fboundp 'scroll-bar-drag)
- ;;;
- ;;; Emacs style scrollbars.
- ;;;
-
- ;; Select the dragged window if it is a follower of the
- ;; selected window.
- ;;
- ;; Generate advices of the form:
- ;; (defadvice scroll-bar-drag (after follow-scroll-bar-drag activate)
- ;; "Adviced by `follow-mode'."
- ;; (follow-redraw-after-event (ad-get-arg 0)))
- (let ((cmds '(scroll-bar-drag
- scroll-bar-drag-1 ; Executed at every move.
- scroll-bar-scroll-down
- scroll-bar-scroll-up
- scroll-bar-set-window-start)))
- (while cmds
- (eval
- `(defadvice ,(intern (symbol-name (car cmds)))
- (after
- ,(intern (concat "follow-" (symbol-name (car cmds))))
- activate)
- "Adviced by Follow mode."
- (follow-redraw-after-event (ad-get-arg 0))))
- (setq cmds (cdr cmds))))
-
-
- (defun follow-redraw-after-event (event)
- "Adviced by Follow mode."
- (condition-case nil
- (let* ((orig-win (selected-window))
- (win (nth 0 (funcall
- (symbol-function 'event-start) event)))
- (fmode (assq 'follow-mode
- (buffer-local-variables
- (window-buffer win)))))
- (if (and fmode (cdr fmode))
- ;; The selected window is in follow-mode
- (progn
- ;; Recenter around the dragged window.
- (select-window win)
- (follow-redisplay)
- (select-window orig-win))))
- (error nil))))
-
-
- ((fboundp 'scrollbar-vertical-drag)
- ;;;
- ;;; XEmacs style scrollbars.
- ;;;
-
- ;; Advice all scrollbar functions on the form:
- ;;
- ;; (defadvice scrollbar-line-down
- ;; (after follow-scrollbar-line-down activate)
- ;; (follow-xemacs-scrollbar-support (ad-get-arg 0)))
-
- (let ((cmds '(scrollbar-line-down ; Window
- scrollbar-line-up
- scrollbar-page-down ; Object
- scrollbar-page-up
- scrollbar-to-bottom ; Window
- scrollbar-to-top
- scrollbar-vertical-drag ; Object
- )))
-
- (while cmds
- (eval
- `(defadvice ,(intern (symbol-name (car cmds)))
- (after
- ,(intern (concat "follow-" (symbol-name (car cmds))))
- activate)
- "Adviced by `follow-mode'."
- (follow-xemacs-scrollbar-support (ad-get-arg 0))))
- (setq cmds (cdr cmds))))
-
-
- (defun follow-xemacs-scrollbar-support (window)
- "Redraw windows showing the same buffer as shown in WINDOW.
-WINDOW is either the dragged window, or a cons containing the
-window as its first element. This is called while the user drags
-the scrollbar.
-
-WINDOW can be an object or a window."
- (condition-case nil
- (progn
- (if (consp window)
- (setq window (car window)))
- (let ((fmode (assq 'follow-mode
- (buffer-local-variables
- (window-buffer window))))
- (orig-win (selected-window)))
- (if (and fmode (cdr fmode))
- (progn
- ;; Recenter around the dragged window.
- (select-window window)
- (follow-redisplay)
- (select-window orig-win)))))
- (error nil)))))
-
-;;}}}
-;;{{{ Process output
-
-;; The following sections installs a spy that listens to process
-;; output and tries to reposition the windows whose buffers are in
-;; Follow mode. We play safe as much as possible...
-;;
-;; When follow-mode is activated all active processes are
-;; intercepted. All new processes that change their filter function
-;; using `set-process-filter' are also intercepted. The reason is
-;; that a process can cause a redisplay recentering "tail" windows.
-;; Note that it doesn't hurt to spy on more processes than needed.
-;;
-;; Technically, we set the process filter to `follow-generic-filter'.
-;; The original filter is stored in `follow-process-filter-alist'.
-;; Our generic filter calls the original filter, or inserts the
-;; output into the buffer, if the buffer originally didn't have an
-;; output filter. It also makes sure that the windows connected to
-;; the buffer are aligned.
-;;
-;; Discussion: How do we find processes that don't call
-;; `set-process-filter'? (How often are processes created in a
-;; buffer after Follow mode are activated?)
-;;
-;; Discussion: Should we also advice `process-filter' to make our
-;; filter invisible to others?
-
-;;{{{ Advice for `set-process-filter'
-
-;; Do not call this with 'follow-generic-filter as the name of the
-;; filter...
-
-(defadvice set-process-filter (before follow-set-process-filter activate)
- "Ensure process output will be displayed correctly in Follow mode buffers.
-
-Follow mode inserts its own process filter to do its
-magic stuff before the real process filter is called."
- (if follow-intercept-processes
- (progn
- (setq follow-process-filter-alist
- (delq (assq (ad-get-arg 0) follow-process-filter-alist)
- follow-process-filter-alist))
- (follow-tidy-process-filter-alist)
- (cond ((eq (ad-get-arg 1) t))
- ((eq (ad-get-arg 1) nil)
- (ad-set-arg 1 'follow-generic-filter))
- (t
- (setq follow-process-filter-alist
- (cons (cons (ad-get-arg 0) (ad-get-arg 1))
- follow-process-filter-alist))
- (ad-set-arg 1 'follow-generic-filter))))))
-
-
-(defun follow-call-set-process-filter (proc filter)
- "Call original `set-process-filter' without the Follow mode advice."
- (ad-disable-advice 'set-process-filter 'before
- 'follow-set-process-filter)
- (ad-activate 'set-process-filter)
- (prog1
- (set-process-filter proc filter)
- (ad-enable-advice 'set-process-filter 'before
- 'follow-set-process-filter)
- (ad-activate 'set-process-filter)))
-
-
-(defadvice process-filter (after follow-process-filter activate)
- "Return the original process filter, not `follow-generic-filter'."
- (cond ((eq ad-return-value 'follow-generic-filter)
- (setq ad-return-value
- (cdr-safe (assq (ad-get-arg 0)
- follow-process-filter-alist))))))
-
-
-(defun follow-call-process-filter (proc)
- "Call original `process-filter' without the Follow mode advice."
- (ad-disable-advice 'process-filter 'after
- 'follow-process-filter)
- (ad-activate 'process-filter)
- (prog1
- (process-filter proc)
- (ad-enable-advice 'process-filter 'after
- 'follow-process-filter)
- (ad-activate 'process-filter)))
-
-
-(defun follow-tidy-process-filter-alist ()
- "Remove old processes from `follow-process-filter-alist'."
- (let ((alist follow-process-filter-alist)
- (ps (process-list))
- (new ()))
- (while alist
- (if (and (not (memq (process-status (car (car alist)))
- '(exit signal closed nil)))
- (memq (car (car alist)) ps))
- (setq new (cons (car alist) new)))
- (setq alist (cdr alist)))
- (setq follow-process-filter-alist new)))
-
-;;}}}
-;;{{{ Start/stop interception of processes.
-
-;; Normally, all new processes are intercepted by our `set-process-filter'.
-;; This is needed to intercept old processes that were started before we were
-;; loaded, and processes we have forgotten by calling
-;; `follow-stop-intercept-process-output'.
-
-(defun follow-intercept-process-output ()
- "Intercept all active processes.
-
-This is needed so that Follow mode can track all display events in the
-system. (See `follow-mode'.)"
- (interactive)
- (let ((list (process-list)))
- (while list
- (if (eq (process-filter (car list)) 'follow-generic-filter)
- nil
- ;; The custom `set-process-filter' defined above.
- (set-process-filter (car list) (process-filter (car list))))
- (setq list (cdr list))))
- (setq follow-intercept-processes t))
-
-
-(defun follow-stop-intercept-process-output ()
- "Stop Follow mode from spying on processes.
-
-All current spypoints are removed and no new will be added.
-
-The effect is that Follow mode won't be able to handle buffers
-connected to processes.
-
-The only reason to call this function is if the Follow mode spy filter
-would interfere with some other package. If this happens, please
-report this using the `report-emacs-bug' function."
- (interactive)
- (follow-tidy-process-filter-alist)
- (dolist (process (process-list))
- (when (eq (follow-call-process-filter process) 'follow-generic-filter)
- (follow-call-set-process-filter
- process
- (cdr-safe (assq process follow-process-filter-alist)))
- (setq follow-process-filter-alist
- (delq (assq process follow-process-filter-alist)
- follow-process-filter-alist))))
- (setq follow-intercept-processes nil))
-
-;;}}}
-;;{{{ The filter
-
-;; The following section is a naive method to make buffers with
-;; process output to work with Follow mode. Whenever the start of the
-;; window displaying the buffer is moved, we move it back to its
-;; original position and try to select a new window. (If we fail,
-;; the normal redisplay functions of Emacs will scroll it right
-;; back!)
-
-(defun follow-generic-filter (proc output)
- "Process output filter for process connected to buffers in Follow mode."
- (let* ((old-buffer (current-buffer))
- (orig-win (selected-window))
- (buf (process-buffer proc))
- (win (and buf (if (eq buf (window-buffer orig-win))
- orig-win
- (get-buffer-window buf t))))
- (return-to-orig-win (and win (not (eq win orig-win))))
- (orig-window-start (and win (window-start win))))
-
- ;; If input is pending, the `sit-for' below won't redraw the
- ;; display. In that case, calling `follow-avoid-tail-recenter' may
- ;; provoke the process handling code to schedule a redisplay.
- ;(or (input-pending-p)
- ; (follow-avoid-tail-recenter))
-
- ;; Output the `output'.
- (let ((filter (cdr-safe (assq proc follow-process-filter-alist))))
- (cond
- ;; Call the original filter function
- (filter
- (funcall filter proc output))
-
- ;; No filter, but we've got a buffer. Just output into it.
- (buf
- (set-buffer buf)
- (if (not (marker-buffer (process-mark proc)))
- (set-marker (process-mark proc) (point-max)))
- (let ((moving (= (point) (process-mark proc)))
- deactivate-mark
- (inhibit-read-only t))
- (save-excursion
- (goto-char (process-mark proc))
- ;; `insert-before-markers' just in case the user's next
- ;; command is M-y.
- (insert-before-markers output)
- (set-marker (process-mark proc) (point)))
- (if moving (goto-char (process-mark proc)))))))
-
- ;; If we're in follow mode, do our stuff. Select a new window and
- ;; redisplay. (Actually, it is redundant to check `buf', but I
- ;; feel it's more correct.)
- (if (and buf (window-live-p win))
- (progn
- (set-buffer buf)
- (if (and (boundp 'follow-mode) follow-mode)
- (progn
- (select-window win)
- (let* ((windows (follow-all-followers win))
- (win-start-end (follow-windows-start-end windows))
- (new-window-start (window-start win))
- (new-window-point (window-point win)))
- (cond
- ;; The start of the selected window was repositioned.
- ;; Try to use the original start position and continue
- ;; working with a window to the "right" in the window
- ;; chain. This will create the effect that the output
- ;; starts in one window and continues into the next.
-
- ;; If the display has changed so much that it is not
- ;; possible to keep the original window fixed and still
- ;; display the point then we give up and use the new
- ;; window start.
-
- ;; This case is typically used when the process filter
- ;; tries to reposition the start of the window in order
- ;; to view the tail of the output.
- ((not (eq orig-window-start new-window-start))
- (follow-debug-message "filter: Moved")
- (set-window-start win orig-window-start)
- (follow-redisplay windows win)
- (setq win-start-end (follow-windows-start-end windows))
- (follow-select-if-visible new-window-point
- win-start-end)
- (goto-char new-window-point)
- (if (eq win (selected-window))
- (set-window-start win new-window-start))
- (setq win-start-end (follow-windows-start-end windows)))
- ;; Stick to this window, if point is visible in it.
- ((pos-visible-in-window-p new-window-point)
- (follow-debug-message "filter: Visible in window"))
- ;; Avoid redisplaying the first window. If the
- ;; point is visible at a window below,
- ;; redisplay and select it.
- ((follow-select-if-visible-from-first
- new-window-point windows)
- (follow-debug-message "filter: Seen from first")
- (setq win-start-end
- (follow-windows-start-end windows)))
- ;; None of the above. We stick to the current window.
- (t
- (follow-debug-message "filter: nothing")))
-
- ;; Here we have selected a window. Make sure the
- ;; windows are aligned and the point is visible
- ;; in the selected window.
- (if (and (not (follow-pos-visible
- (point) (selected-window) win-start-end))
- (not return-to-orig-win))
- (progn
- (sit-for 0)
- (setq win-start-end
- (follow-windows-start-end windows))))
-
- (if (or follow-internal-force-redisplay
- (not (follow-windows-aligned-p win-start-end)))
- (follow-redisplay windows)))))))
-
- ;; return to the original window.
- (if return-to-orig-win
- (select-window orig-win))
- ;; Restore the original buffer, unless the filter explicitly
- ;; changed buffer or killed the old buffer.
- (if (and (eq buf (current-buffer))
- (buffer-name old-buffer))
- (set-buffer old-buffer)))
-
- (follow-invalidate-cache)
-
- ;; Normally, if the display has been changed, it is redrawn. All
- ;; windows showing only the end of a buffer are unconditionally
- ;; recentered; we can't prevent that by calling
- ;; `follow-avoid-tail-recenter'.
- ;;
- ;; We force a redisplay here on our own, so Emacs does need to.
- ;; (However, redisplaying when there's input available just seems
- ;; to make things worse, so we exclude that case.)
- (if (and follow-avoid-tail-recenter-p
- (not (input-pending-p)))
- (sit-for 0)))
-
-;;}}}
-
-;;}}}
-;;{{{ Window size change
-
-;; In Emacs 19.29, the functions in `window-size-change-functions' are
-;; called every time a window in a frame changes size. Most notably, it
-;; is called after the frame has been resized.
-;;
-;; We basically call our post-command-hook for every buffer that is
-;; visible in any window in the resized frame, which is in follow-mode.
-;;
-;; Since this function can be called indirectly from
-;; `follow-post-command-hook' we have a potential infinite loop. We
-;; handle this problem by simply not doing anything at all in this
-;; situation. The variable `follow-inside-post-command-hook' contains
-;; information about whether the execution actually is inside the
+;; This handles the case where the user drags the scroll bar of a
+;; non-selected window whose buffer is in Follow mode.
+
+(defun follow-scroll-bar-toolkit-scroll (event)
+ (interactive "e")
+ (scroll-bar-toolkit-scroll event)
+ (follow-redraw-after-event event))
+
+(defun follow-scroll-bar-drag (event)
+ (interactive "e")
+ (scroll-bar-drag event)
+ (follow-redraw-after-event event))
+
+(defun follow-scroll-bar-scroll-up (event)
+ (interactive "e")
+ (scroll-bar-scroll-up event)
+ (follow-redraw-after-event event))
+
+(defun follow-scroll-bar-scroll-down (event)
+ (interactive "e")
+ (scroll-bar-scroll-down event)
+ (follow-redraw-after-event event))
+
+(defun follow-mwheel-scroll (event)
+ (interactive "e")
+ (mwheel-scroll event)
+ (follow-redraw-after-event event))
+
+(defun follow-redraw-after-event (event)
+ "Re-align the Follow mode windows affected by EVENT."
+ (let* ((window (nth 0 (event-end event)))
+ (buffer (window-buffer window))
+ (orig-win (selected-window)))
+ (when (and (buffer-local-value 'follow-mode buffer)
+ ;; Ignore the case where we scroll the selected window;
+ ;; that is handled by the post-command hook function.
+ (not (eq window (selected-window))))
+ (select-window window)
+ (follow-redisplay)
+ (unless (eq (window-buffer orig-win) buffer)
+ (select-window orig-win)))))
+
+;;; Window size change
+
+;; The functions in `window-size-change-functions' are called every
+;; time a window in a frame changes size, most notably after the frame
+;; has been resized. We call `follow-post-command-hook' for every
+;; Follow mode buffer visible in any window in the resized frame.
+;;
+;; Since `follow-window-size-change' can be called indirectly from
+;; `follow-post-command-hook' we have a potential infinite loop. To
+;; avoid this, we simply do not do anything in this situation. The
+;; variable `follow-inside-post-command-hook' contains information
+;; about whether the execution actually is inside the
;; post-command-hook or not.
-(if (boundp 'window-size-change-functions)
- (add-hook 'window-size-change-functions 'follow-window-size-change))
-
-
(defun follow-window-size-change (frame)
"Redraw all windows in FRAME, when in Follow mode."
- ;; Below, we call `post-command-hook'. This makes sure that we
- ;; don't start a mutually recursive endless loop.
- (if follow-inside-post-command-hook
- nil
+ ;; Below, we call `post-command-hook'. Avoid an infloop.
+ (unless follow-inside-post-command-hook
(let ((buffers '())
(orig-window (selected-window))
(orig-buffer (current-buffer))
@@ -1927,193 +1363,59 @@ report this using the `report-emacs-bug' function."
(select-frame frame)
(unwind-protect
(walk-windows
- (function
- (lambda (win)
- (setq buf (window-buffer win))
- (if (memq buf buffers)
- nil
- (set-buffer buf)
- (if (and (boundp 'follow-mode)
- follow-mode)
- (progn
- (setq windows (follow-all-followers win))
- (if (memq orig-window windows)
- (progn
- ;; Make sure we're redrawing around the
- ;; selected window.
- ;;
- ;; We must be really careful not to do this
- ;; when we are (indirectly) called by
- ;; `post-command-hook'.
- (select-window orig-window)
- (follow-post-command-hook)
- (setq orig-window (selected-window)))
- (follow-redisplay windows win))
- (setq buffers (cons buf buffers))))))))
+ (lambda (win)
+ (setq buf (window-buffer win))
+ (unless (memq buf buffers)
+ (set-buffer buf)
+ (when follow-mode
+ (setq windows (follow-all-followers win))
+ (if (not (memq orig-window windows))
+ (follow-redisplay windows win)
+ ;; Make sure we're redrawing around the selected
+ ;; window.
+ (select-window orig-window)
+ (follow-post-command-hook)
+ (setq orig-window (selected-window)))
+ (setq buffers (cons buf buffers)))))
+ 'no-minibuf)
(select-frame orig-frame)
(set-buffer orig-buffer)
(select-window orig-window)))))
-;;}}}
-
-;;{{{ XEmacs isearch
-
-;; In XEmacs, isearch often finds matches in other windows than the
-;; currently selected. However, when exiting the old window
-;; configuration is restored, with the exception of the beginning of
-;; the start of the window for the selected window. This is not much
-;; help for us.
-;;
-;; We overwrite the stored window configuration with the current,
-;; unless we are in `slow-search-mode', i.e. only a few lines
-;; of text is visible.
-
-(if (featurep 'xemacs)
- (defadvice isearch-done (before follow-isearch-done activate)
- (if (and (boundp 'follow-mode)
- follow-mode
- (boundp 'isearch-window-configuration)
- isearch-window-configuration
- (boundp 'isearch-slow-terminal-mode)
- (not isearch-slow-terminal-mode))
- (let ((buf (current-buffer)))
- (setq isearch-window-configuration
- (current-window-configuration))
- (set-buffer buf)))))
-
-;;}}}
-;;{{{ Tail window handling
-
-;; In Emacs (not XEmacs) windows showing nothing are sometimes
-;; recentered. When in Follow mode, this is not desirable for
-;; non-first windows in the window chain. This section tries to
-;; make the windows stay where they should be.
-;;
-;; If the display is updated, all windows starting at (point-max) are
-;; 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 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
-;; windows.
-;;
-;; By patching `sit-for' we can make sure that to catch all explicit
-;; updates initiated by lisp programs. Internal calls, on the other
-;; hand, are not handled.
-;;
-;; Please note that the function `follow-avoid-tail-recenter' is also
-;; called from other places, e.g. `post-command-hook' and
-;; `post-command-idle-hook'.
-
-;; If this function is called it is too late for this window, but
-;; we might save other windows from being recentered.
-
-(if (and follow-avoid-tail-recenter-p (boundp 'window-scroll-functions))
- (add-hook 'window-scroll-functions 'follow-avoid-tail-recenter t))
-
-
-;; This prevents all packages that calls `sit-for' directly
-;; to recenter tail windows.
-
-(if follow-avoid-tail-recenter-p
- (defadvice sit-for (before follow-sit-for activate)
- "Adviced by Follow mode.
+(add-hook 'window-scroll-functions 'follow-avoid-tail-recenter t)
-Avoid to recenter windows displaying only the end of a file as when
-displaying a short file in two windows, using Follow mode."
- (follow-avoid-tail-recenter)))
-
-
-;; Without this advice, `mouse-drag-region' would start to recenter
-;; tail windows.
-
-(if (and follow-avoid-tail-recenter-p
- (fboundp 'move-overlay))
- (defadvice move-overlay (before follow-move-overlay activate)
- "Adviced by Follow mode.
-Don't recenter windows showing only the end of a buffer.
-This prevents `mouse-drag-region' from messing things up."
- (follow-avoid-tail-recenter)))
-
-;;}}}
-;;{{{ profile support
+;;; Profile support
;; The following (non-evaluated) section can be used to
;; profile this package using `elp'.
;;
;; Invalid indentation on purpose!
-(cond (nil
-(setq elp-function-list
- '(window-end
- vertical-motion
- ; sit-for ;; elp can't handle advices...
- follow-mode
- follow-all-followers
- follow-split-followers
- follow-redisplay
- follow-estimate-first-window-start
- follow-calculate-first-window-start-from-above
- follow-calculate-first-window-start-from-below
- follow-calc-win-end
- follow-calc-win-start
- follow-pos-visible
- follow-windows-start-end
- follow-cache-valid-p
- follow-select-if-visible
- follow-select-if-visible-from-first
- follow-windows-aligned-p
- follow-point-visible-all-windows-p
- follow-avoid-tail-recenter
- follow-update-window-start
- follow-post-command-hook
- ))))
-
-;;}}}
-
-;;{{{ The end
-
-(defun follow-unload-function ()
- "Unload Follow mode library."
- (easy-menu-remove-item nil '("Tools") "Follow")
- (follow-stop-intercept-process-output)
- (dolist (group '((before
- ;; XEmacs
- isearch-done
- ;; both
- set-process-filter sit-for move-overlay)
- (after
- ;; Emacs
- scroll-bar-drag scroll-bar-drag-1 scroll-bar-scroll-down
- scroll-bar-scroll-up scroll-bar-set-window-start
- ;; XEmacs
- scrollbar-line-down scrollbar-line-up scrollbar-page-down
- scrollbar-page-up scrollbar-to-bottom scrollbar-to-top
- scrollbar-vertical-drag
- ;; both
- process-filter)))
- (let ((class (car group)))
- (dolist (fun (cdr group))
- (when (functionp fun)
- (condition-case nil
- (progn
- (ad-remove-advice fun class
- (intern (concat "follow-" (symbol-name fun))))
- (ad-update fun))
- (error nil))))))
- ;; continue standard processing
- nil)
-
-;;
-;; We're done!
-;;
+;; (setq elp-function-list
+;; '(window-end
+;; vertical-motion
+;; follow-mode
+;; follow-all-followers
+;; follow-split-followers
+;; follow-redisplay
+;; follow-estimate-first-window-start
+;; follow-calculate-first-window-start-from-above
+;; follow-calculate-first-window-start-from-below
+;; follow-calc-win-end
+;; follow-calc-win-start
+;; follow-pos-visible
+;; follow-windows-start-end
+;; follow-cache-valid-p
+;; follow-select-if-visible
+;; follow-select-if-visible-from-first
+;; follow-windows-aligned-p
+;; follow-point-visible-all-windows-p
+;; follow-avoid-tail-recenter
+;; follow-update-window-start
+;; follow-post-command-hook))
(provide 'follow)
-;;}}}
-
;; /------------------------------------------------------------------------\
;; | "I [..] am rarely happier then when spending an entire day programming |
;; | my computer to perform automatically a task that it would otherwise |
diff --git a/lisp/forms.el b/lisp/forms.el
index 38670e42bdd..3175ef9dfa9 100644
--- a/lisp/forms.el
+++ b/lisp/forms.el
@@ -21,7 +21,7 @@
;;; Commentary:
-;; Visit a file using a form. See forms-d2.el for examples.
+;; Visit a file using a form. See etc/forms for examples.
;;
;; === Naming conventions
;;
@@ -2030,8 +2030,10 @@ Usage: (setq forms-number-of-fields
;;; Debugging
-(defvar forms--debug nil
- "Enables forms-mode debugging if not nil.")
+(defcustom forms--debug nil
+ "If non-nil, enable Forms mode debugging."
+ :type 'boolean
+ :group 'forms)
(defun forms--debug (&rest args)
"Internal debugging routine."
diff --git a/lisp/frame.el b/lisp/frame.el
index 1ee9d966ef1..5e380cd8fc6 100644
--- a/lisp/frame.el
+++ b/lisp/frame.el
@@ -1612,6 +1612,8 @@ itself as a pre-command hook."
(cancel-timer blink-cursor-timer)
(setq blink-cursor-timer nil)))
+(define-obsolete-variable-alias 'blink-cursor 'blink-cursor-mode "22.1")
+
(define-minor-mode blink-cursor-mode
"Toggle cursor blinking (Blink Cursor mode).
With a prefix argument ARG, enable Blink Cursor mode if ARG is
@@ -1638,8 +1640,6 @@ terminals, cursor blinking is controlled by the terminal."
blink-cursor-delay
'blink-cursor-start))))
-(define-obsolete-variable-alias 'blink-cursor 'blink-cursor-mode "22.1")
-
;;;; Key bindings
@@ -1652,7 +1652,8 @@ terminals, cursor blinking is controlled by the terminal."
;; Misc.
;; Only marked as obsolete in 24.2.
-(define-obsolete-variable-alias 'automatic-hscrolling 'auto-hscroll-mode "22.1")
+(define-obsolete-variable-alias 'automatic-hscrolling
+ 'auto-hscroll-mode "22.1")
(make-variable-buffer-local 'show-trailing-whitespace)
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog
index 52f140d9192..1c5984e96cd 100644
--- a/lisp/gnus/ChangeLog
+++ b/lisp/gnus/ChangeLog
@@ -1,3 +1,63 @@
+2012-05-25 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * gnus-win.el (gnus-configure-frame): Don't signal an error when
+ jumping to *Server* from a dedicated *Group* window.
+ (gnus-configure-frame): CSE.
+
+ * gnus-registry.el: Minor style cleanup.
+ (gnus-registry--set/remove-mark): New function, extracted from
+ gnus-registry-install-shortcuts.
+ (gnus-registry-install-shortcuts): Use it.
+
+2012-05-25 Katsumi Yamaoka <yamaoka@jpl.org>
+
+ * nnspool.el (news-path): Use eval-and-compile.
+
+2012-05-24 Glenn Morris <rgm@gnu.org>
+
+ * nnspool.el (news-directory, news-path, news-inews-program):
+ Move here from paths.el. Don't see a need for these to be autoloaded.
+
+ * gnus.el (gnus-default-nntp-server): Make it a defcustom.
+ Merge in doc from paths.el version. Don't see any need for this to be
+ autoloaded, or for the warning about users not setting it.
+
+2012-05-04 Paul Eggert <eggert@cs.ucla.edu>
+
+ Fix minor Y10k bug.
+ * nnweb.el (nnweb-google-parse-1): Don't assume years have 4 digits.
+
+2012-05-01 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * nnimap.el (nnimap-open-connection-1): Don't leave an "opening..."
+ message once it's actually open.
+
+2012-04-28 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * auth-source.el (auth-source--aput-1, auth-source--aput)
+ (auth-source--aget): New functions and macros.
+ Use them instead of aput/aget.
+
+2012-04-27 Andreas Schwab <schwab@linux-m68k.org>
+
+ * gnus.el (debbugs-gnu): Don't override existing autoload definition.
+
+2012-04-26 Daiki Ueno <ueno@unixuser.org>
+
+ * plstore.el (plstore-called-interactively-p): New compat macro copied
+ from message.el.
+ (plstore-mode): Use it.
+
+2012-04-26 Daiki Ueno <ueno@unixuser.org>
+
+ * plstore.el: Revive the editing feature.
+ (plstore-mode): New mode to edit plstore file.
+ (plstore-mode-toggle-display, plstore-mode-original)
+ (plstore-mode-decoded): New command.
+ (plstore--encode, plstore--decode, plstore--write-contents-functions)
+ (plstore--insert-buffer, plstore--make): New function.
+ (plstore-open, plstore-save): Simplify by using them.
+
2012-04-16 Glenn Morris <rgm@gnu.org>
* nndraft.el (nndraft-request-list): Fix declaration.
@@ -22619,7 +22679,7 @@
See ChangeLog.2 for earlier changes.
- Copyright (C) 2004-2012 Free Software Foundation, Inc.
+ Copyright (C) 2004-2012 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/lisp/gnus/auth-source.el b/lisp/gnus/auth-source.el
index 34fe5afe7af..d3d213a753b 100644
--- a/lisp/gnus/auth-source.el
+++ b/lisp/gnus/auth-source.el
@@ -42,7 +42,6 @@
(require 'password-cache)
(require 'mm-util)
(require 'gnus-util)
-(require 'assoc)
(eval-when-compile (require 'cl))
(require 'eieio)
@@ -853,6 +852,21 @@ while \(:host t) would find all host entries."
;;; Backend specific parsing: netrc/authinfo backend
+(defun auth-source--aput-1 (alist key val)
+ (let ((seen ())
+ (rest alist))
+ (while (and (consp rest) (not (equal key (caar rest))))
+ (push (pop rest) seen))
+ (cons (cons key val)
+ (if (null rest) alist
+ (nconc (nreverse seen)
+ (if (equal key (caar rest)) (cdr rest) rest))))))
+(defmacro auth-source--aput (var key val)
+ `(setq ,var (auth-source--aput-1 ,var ,key ,val)))
+
+(defun auth-source--aget (alist key)
+ (cdr (assoc key alist)))
+
;;; (auth-source-netrc-parse "~/.authinfo.gpg")
(defun* auth-source-netrc-parse (&rest
spec
@@ -888,10 +902,11 @@ Note that the MAX parameter is used so we can exit the parse early."
;; cache all netrc files (used to be just .gpg files)
;; Store the contents of the file heavily encrypted in memory.
;; (note for the irony-impaired: they are just obfuscated)
- (aput 'auth-source-netrc-cache file
- (list :mtime (nth 5 (file-attributes file))
- :secret (lexical-let ((v (mapcar '1+ (buffer-string))))
- (lambda () (apply 'string (mapcar '1- v)))))))
+ (auth-source--aput
+ auth-source-netrc-cache file
+ (list :mtime (nth 5 (file-attributes file))
+ :secret (lexical-let ((v (mapcar '1+ (buffer-string))))
+ (lambda () (apply 'string (mapcar '1- v)))))))
(goto-char (point-min))
;; Go through the file, line by line.
(while (and (not (eobp))
@@ -937,21 +952,21 @@ Note that the MAX parameter is used so we can exit the parse early."
(auth-source-search-collection
host
(or
- (aget alist "machine")
- (aget alist "host")
+ (auth-source--aget alist "machine")
+ (auth-source--aget alist "host")
t))
(auth-source-search-collection
user
(or
- (aget alist "login")
- (aget alist "account")
- (aget alist "user")
+ (auth-source--aget alist "login")
+ (auth-source--aget alist "account")
+ (auth-source--aget alist "user")
t))
(auth-source-search-collection
port
(or
- (aget alist "port")
- (aget alist "protocol")
+ (auth-source--aget alist "port")
+ (auth-source--aget alist "protocol")
t))
(or
;; the required list of keys is nil, or
@@ -1166,7 +1181,7 @@ See `auth-source-search' for details on SPEC."
;; just the value otherwise
(t (symbol-value br)))))
(when br-choice
- (aput 'valist br br-choice)))))
+ (auth-source--aput valist br br-choice)))))
;; for extra required elements, see if the spec includes a value for them
(dolist (er create-extra)
@@ -1175,17 +1190,18 @@ See `auth-source-search' for details on SPEC."
collect (nth i spec))))
(dolist (k keys)
(when (equal (symbol-name k) name)
- (aput 'valist er (plist-get spec k))))))
+ (auth-source--aput valist er (plist-get spec k))))))
;; for each required element
(dolist (r required)
- (let* ((data (aget valist r))
+ (let* ((data (auth-source--aget valist r))
;; take the first element if the data is a list
(data (or (auth-source-netrc-element-or-first data)
(plist-get current-data
(intern (format ":%s" r) obarray))))
;; this is the default to be offered
- (given-default (aget auth-source-creation-defaults r))
+ (given-default (auth-source--aget
+ auth-source-creation-defaults r))
;; the default supplementals are simple:
;; for the user, try `given-default' and then (user-login-name);
;; otherwise take `given-default'
@@ -1197,22 +1213,22 @@ See `auth-source-search' for details on SPEC."
(cons 'user
(or
(auth-source-netrc-element-or-first
- (aget valist 'user))
+ (auth-source--aget valist 'user))
(plist-get artificial :user)
"[any user]"))
(cons 'host
(or
(auth-source-netrc-element-or-first
- (aget valist 'host))
+ (auth-source--aget valist 'host))
(plist-get artificial :host)
"[any host]"))
(cons 'port
(or
(auth-source-netrc-element-or-first
- (aget valist 'port))
+ (auth-source--aget valist 'port))
(plist-get artificial :port)
"[any port]"))))
- (prompt (or (aget auth-source-creation-prompts r)
+ (prompt (or (auth-source--aget auth-source-creation-prompts r)
(case r
(secret "%p password for %u@%h: ")
(user "%p user name for %h: ")
@@ -1221,9 +1237,9 @@ See `auth-source-search' for details on SPEC."
(format "Enter %s (%%u@%%h:%%p): " r)))
(prompt (auth-source-format-prompt
prompt
- `((?u ,(aget printable-defaults 'user))
- (?h ,(aget printable-defaults 'host))
- (?p ,(aget printable-defaults 'port))))))
+ `((?u ,(auth-source--aget printable-defaults 'user))
+ (?h ,(auth-source--aget printable-defaults 'host))
+ (?p ,(auth-source--aget printable-defaults 'port))))))
;; Store the data, prompting for the password if needed.
(setq data (or data
@@ -1384,7 +1400,7 @@ Respects `auth-source-save-behavior'. Uses
file)
(message "Saved new authentication information to %s" file)
nil))))
- (aput 'auth-source-netrc-cache key "ran"))))
+ (auth-source--aput auth-source-netrc-cache key "ran"))))
;;; Backend specific parsing: Secrets API backend
@@ -1609,7 +1625,7 @@ authentication tokens:
;; just the value otherwise
(t (symbol-value br)))))
(when br-choice
- (aput 'valist br br-choice)))))
+ (auth-source--aput valist br br-choice)))))
;; for extra required elements, see if the spec includes a value for them
(dolist (er create-extra)
@@ -1618,17 +1634,18 @@ authentication tokens:
collect (nth i spec))))
(dolist (k keys)
(when (equal (symbol-name k) name)
- (aput 'valist er (plist-get spec k))))))
+ (auth-source--aput valist er (plist-get spec k))))))
;; for each required element
(dolist (r required)
- (let* ((data (aget valist r))
+ (let* ((data (auth-source--aget valist r))
;; take the first element if the data is a list
(data (or (auth-source-netrc-element-or-first data)
(plist-get current-data
(intern (format ":%s" r) obarray))))
;; this is the default to be offered
- (given-default (aget auth-source-creation-defaults r))
+ (given-default (auth-source--aget
+ auth-source-creation-defaults r))
;; the default supplementals are simple:
;; for the user, try `given-default' and then (user-login-name);
;; otherwise take `given-default'
@@ -1640,22 +1657,22 @@ authentication tokens:
(cons 'user
(or
(auth-source-netrc-element-or-first
- (aget valist 'user))
+ (auth-source--aget valist 'user))
(plist-get artificial :user)
"[any user]"))
(cons 'host
(or
(auth-source-netrc-element-or-first
- (aget valist 'host))
+ (auth-source--aget valist 'host))
(plist-get artificial :host)
"[any host]"))
(cons 'port
(or
(auth-source-netrc-element-or-first
- (aget valist 'port))
+ (auth-source--aget valist 'port))
(plist-get artificial :port)
"[any port]"))))
- (prompt (or (aget auth-source-creation-prompts r)
+ (prompt (or (auth-source--aget auth-source-creation-prompts r)
(case r
(secret "%p password for %u@%h: ")
(user "%p user name for %h: ")
@@ -1664,20 +1681,21 @@ authentication tokens:
(format "Enter %s (%%u@%%h:%%p): " r)))
(prompt (auth-source-format-prompt
prompt
- `((?u ,(aget printable-defaults 'user))
- (?h ,(aget printable-defaults 'host))
- (?p ,(aget printable-defaults 'port))))))
+ `((?u ,(auth-source--aget printable-defaults 'user))
+ (?h ,(auth-source--aget printable-defaults 'host))
+ (?p ,(auth-source--aget printable-defaults 'port))))))
;; Store the data, prompting for the password if needed.
(setq data (or data
(if (eq r 'secret)
(or (eval default) (read-passwd prompt))
(if (stringp default)
- (read-string (if (string-match ": *\\'" prompt)
- (concat (substring prompt 0 (match-beginning 0))
- " (default " default "): ")
- (concat prompt "(default " default ") "))
- nil nil default)
+ (read-string
+ (if (string-match ": *\\'" prompt)
+ (concat (substring prompt 0 (match-beginning 0))
+ " (default " default "): ")
+ (concat prompt "(default " default ") "))
+ nil nil default)
(eval default)))))
(when data
diff --git a/lisp/gnus/gnus-registry.el b/lisp/gnus/gnus-registry.el
index f1618b376ef..53690f04169 100644
--- a/lisp/gnus/gnus-registry.el
+++ b/lisp/gnus/gnus-registry.el
@@ -96,7 +96,7 @@
(defvar gnus-adaptive-word-syntax-table)
(defvar gnus-registry-dirty t
- "Boolean set to t when the registry is modified")
+ "Boolean set to t when the registry is modified.")
(defgroup gnus-registry nil
"The Gnus registry."
@@ -284,7 +284,7 @@ the Bit Bucket."
:tracked nil)))
(defvar gnus-registry-db (gnus-registry-make-db)
- "*The article registry by Message ID. See `registry-db'")
+ "The article registry by Message ID. See `registry-db'.")
;; top-level registry data management
(defun gnus-registry-remake-db (&optional forsure)
@@ -418,9 +418,9 @@ This is not required after changing `gnus-registry-cache-file'."
;; Function for nn{mail|imap}-split-fancy: look up all references in
;; the cache and if a match is found, return that group.
(defun gnus-registry-split-fancy-with-parent ()
- "Split this message into the same group as its parent. The parent
-is obtained from the registry. This function can be used as an entry
-in `nnmail-split-fancy' or `nnimap-split-fancy', for example like
+ "Split this message into the same group as its parent.
+The parent is obtained from the registry. This function can be used as an
+entry in `nnmail-split-fancy' or `nnimap-split-fancy', for example like
this: (: gnus-registry-split-fancy-with-parent)
This function tracks ALL backends, unlike
@@ -746,7 +746,7 @@ Overrides existing keywords with FORCE set non-nil."
(registry-lookup-secondary-value gnus-registry-db 'keyword keyword))
(defun gnus-registry-register-message-ids ()
- "Register the Message-ID of every article in the group"
+ "Register the Message-ID of every article in the group."
(unless (gnus-parameter-registry-ignore gnus-newsgroup-name)
(dolist (article gnus-newsgroup-articles)
(let* ((id (gnus-registry-fetch-message-id-fast article))
@@ -761,7 +761,7 @@ Overrides existing keywords with FORCE set non-nil."
;; message field fetchers
(defun gnus-registry-fetch-message-id-fast (article)
- "Fetch the Message-ID quickly, using the internal gnus-data-list function"
+ "Fetch the Message-ID quickly, using the internal gnus-data-list function."
(if (and (numberp article)
(assoc article (gnus-data-list nil)))
(mail-header-id (gnus-data-header (assoc article (gnus-data-list nil))))
@@ -793,7 +793,7 @@ Addresses without a name will say \"noname\"."
nil))
(defun gnus-registry-fetch-simplified-message-subject-fast (article)
- "Fetch the Subject quickly, using the internal gnus-data-list function"
+ "Fetch the Subject quickly, using the internal gnus-data-list function."
(if (and (numberp article)
(assoc article (gnus-data-list nil)))
(gnus-string-remove-all-properties
@@ -811,7 +811,7 @@ Addresses without a name will say \"noname\"."
(or (ignore-errors (gnus-registry-fetch-header-fast "To" article)) "")))
(defun gnus-registry-fetch-header-fast (article header)
- "Fetch the HEADER quickly, using the internal gnus-data-list function"
+ "Fetch the HEADER quickly, using the internal gnus-data-list function."
(if (and (numberp article)
(assoc article (gnus-data-list nil)))
(gnus-string-remove-all-properties
@@ -831,7 +831,34 @@ FUNCTION should take two parameters, a mark symbol and the cell value."
(when cell-data
(funcall function mark cell-data)))))
-;;; this is ugly code, but I don't know how to do it better
+;; FIXME: Why not merge gnus-registry--set/remove-mark and
+;; gnus-registry-set-article-mark-internal?
+(defun gnus-registry--set/remove-mark (remove mark articles)
+ "Set/remove the MARK over process-marked ARTICLES."
+ ;; If this is called and the user doesn't want the
+ ;; registry enabled, we'll ask anyhow.
+ (unless gnus-registry-install
+ (let ((gnus-registry-install 'ask))
+ (gnus-registry-install-p)))
+
+ ;; Now the user is asked if gnus-registry-install is `ask'.
+ (when (gnus-registry-install-p)
+ (gnus-registry-set-article-mark-internal
+ ;; All this just to get the mark, I must be doing it wrong.
+ mark articles remove t)
+ ;; FIXME: Why do we do the above only here and not directly inside
+ ;; gnus-registry-set-article-mark-internal? I.e. we wouldn't we want to do
+ ;; the things below when gnus-registry-set-article-mark-internal is called
+ ;; from gnus-registry-set-article-mark or
+ ;; gnus-registry-remove-article-mark?
+ (gnus-message 9 "Applying mark %s to %d articles"
+ mark (length articles))
+ (dolist (article articles)
+ (gnus-summary-update-article
+ article
+ (assoc article (gnus-data-list nil))))))
+
+;; This is ugly code, but I don't know how to do it better.
(defun gnus-registry-install-shortcuts ()
"Install the keyboard shortcuts and menus for the registry.
Uses `gnus-registry-marks' to find what shortcuts to install."
@@ -843,69 +870,41 @@ Uses `gnus-registry-marks' to find what shortcuts to install."
(let ((function-format
(format "gnus-registry-%%s-article-%s-mark" mark)))
-;;; The following generates these functions:
-;;; (defun gnus-registry-set-article-Important-mark (&rest articles)
-;;; "Apply the Important mark to process-marked ARTICLES."
-;;; (interactive (gnus-summary-work-articles current-prefix-arg))
-;;; (gnus-registry-set-article-mark-internal 'Important articles nil t))
-;;; (defun gnus-registry-remove-article-Important-mark (&rest articles)
-;;; "Apply the Important mark to process-marked ARTICLES."
-;;; (interactive (gnus-summary-work-articles current-prefix-arg))
-;;; (gnus-registry-set-article-mark-internal 'Important articles t t))
+;;; The following generates these functions:
+;;; (defun gnus-registry-set-article-Important-mark (&rest articles)
+;;; "Apply the Important mark to process-marked ARTICLES."
+;;; (interactive (gnus-summary-work-articles current-prefix-arg))
+;;; (gnus-registry-set-article-mark-internal 'Important articles nil t))
+;;; (defun gnus-registry-remove-article-Important-mark (&rest articles)
+;;; "Apply the Important mark to process-marked ARTICLES."
+;;; (interactive (gnus-summary-work-articles current-prefix-arg))
+;;; (gnus-registry-set-article-mark-internal 'Important articles t t))
(dolist (remove '(t nil))
(let* ((variant-name (if remove "remove" "set"))
- (function-name (format function-format variant-name))
- (shortcut (format "%c" data))
- (shortcut (if remove (upcase shortcut) shortcut)))
- (unintern function-name obarray)
- (eval
- `(defun
- ;; function name
- ,(intern function-name)
- ;; parameter definition
- (&rest articles)
- ;; documentation
- ,(format
- "%s the %s mark over process-marked ARTICLES."
- (upcase-initials variant-name)
- mark)
- ;; interactive definition
- (interactive
- (gnus-summary-work-articles current-prefix-arg))
- ;; actual code
-
- ;; if this is called and the user doesn't want the
- ;; registry enabled, we'll ask anyhow
- (unless gnus-registry-install
- (let ((gnus-registry-install 'ask))
- (gnus-registry-install-p)))
-
- ;; now the user is asked if gnus-registry-install is 'ask
- (when (gnus-registry-install-p)
- (gnus-registry-set-article-mark-internal
- ;; all this just to get the mark, I must be doing it wrong
- (intern ,(symbol-name mark))
- articles ,remove t)
- (gnus-message
- 9
- "Applying mark %s to %d articles"
- ,(symbol-name mark) (length articles))
- (dolist (article articles)
- (gnus-summary-update-article
- article
- (assoc article (gnus-data-list nil)))))))
- (push (intern function-name) keys-plist)
+ (function-name
+ (intern (format function-format variant-name)))
+ (shortcut (format "%c" (if remove (upcase data) data))))
+ (defalias function-name
+ ;; If it weren't for the function's docstring, we could
+ ;; use a closure, with lexical-let :-(
+ `(lambda (&rest articles)
+ ,(format
+ "%s the %s mark over process-marked ARTICLES."
+ (upcase-initials variant-name)
+ mark)
+ (interactive
+ (gnus-summary-work-articles current-prefix-arg))
+ (gnus-registry--set/remove-mark ',mark ',remove articles)))
+ (push function-name keys-plist)
(push shortcut keys-plist)
(push (vector (format "%s %s"
(upcase-initials variant-name)
(symbol-name mark))
- (intern function-name) t)
+ function-name t)
gnus-registry-misc-menus)
- (gnus-message
- 9
- "Defined mark handling function %s"
- function-name))))))
+ (gnus-message 9 "Defined mark handling function %s"
+ function-name))))))
(gnus-define-keys-1
'(gnus-registry-mark-map "M" gnus-summary-mark-map)
keys-plist)
@@ -925,7 +924,7 @@ Uses `gnus-registry-marks' to find what shortcuts to install."
;; use like this:
;; (defalias 'gnus-user-format-function-M 'gnus-registry-article-marks-to-chars)
(defun gnus-registry-article-marks-to-chars (headers)
- "Show the marks for an article by the :char property"
+ "Show the marks for an article by the :char property."
(let* ((id (mail-header-message-id headers))
(marks (when id (gnus-registry-get-id-key id 'mark))))
(mapconcat (lambda (mark)
@@ -938,7 +937,7 @@ Uses `gnus-registry-marks' to find what shortcuts to install."
;; use like this:
;; (defalias 'gnus-user-format-function-M 'gnus-registry-article-marks-to-names)
(defun gnus-registry-article-marks-to-names (headers)
- "Show the marks for an article by name"
+ "Show the marks for an article by name."
(let* ((id (mail-header-message-id headers))
(marks (when id (gnus-registry-get-id-key id 'mark))))
(mapconcat (lambda (mark) (symbol-name mark)) marks ",")))
@@ -1153,13 +1152,14 @@ only the last one's marks are returned."
;;;###autoload
(defun gnus-registry-initialize ()
-"Initialize the Gnus registry."
+ "Initialize the Gnus registry."
(interactive)
(gnus-message 5 "Initializing the registry")
(gnus-registry-install-hooks)
(gnus-registry-install-shortcuts)
(gnus-registry-read))
+;; FIXME: Why autoload this function?
;;;###autoload
(defun gnus-registry-install-hooks ()
"Install the registry hooks."
diff --git a/lisp/gnus/gnus-win.el b/lisp/gnus/gnus-win.el
index 579210c6138..34c6c0ca126 100644
--- a/lisp/gnus/gnus-win.el
+++ b/lisp/gnus/gnus-win.el
@@ -239,7 +239,8 @@ See the Gnus manual for an explanation of the syntax used.")
(defun gnus-configure-frame (split &optional window)
"Split WINDOW according to SPLIT."
- (let* ((current-window (or (get-buffer-window (current-buffer)) (selected-window)))
+ (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 evalled to
@@ -269,9 +270,21 @@ See the Gnus manual for an explanation of the syntax used.")
(let ((buf (gnus-get-buffer-create
(gnus-window-to-buffer-helper buffer))))
(when (buffer-name buf)
- (if (eq buf (window-buffer (selected-window)))
- (set-buffer buf)
- (switch-to-buffer buf))))
+ (cond
+ ((eq buf (window-buffer (selected-window)))
+ (set-buffer buf))
+ ((eq t (window-dedicated-p))
+ ;; If the window is hard-dedicated, we have a problem because
+ ;; we just can't do what we're asked. But signalling an error,
+ ;; like `switch-to-buffer' would do, is not an option because
+ ;; it would prevent things like "^" (to jump to the *Servers*)
+ ;; in a dedicated *Group*.
+ ;; FIXME: Maybe a better/additional fix would be to change
+ ;; gnus-configure-windows so that when called
+ ;; from a hard-dedicated frame, it creates (and
+ ;; configures) a new frame, leaving the dedicated frame alone.
+ (pop-to-buffer buf))
+ (t (switch-to-buffer buf)))))
(when (memq 'frame-focus split)
(setq gnus-window-frame-focus window))
;; We return the window if it has the `point' spec.
@@ -340,9 +353,9 @@ See the Gnus manual for an explanation of the syntax used.")
;; fashion.
(setq comp-subs (nreverse comp-subs))
(while comp-subs
- (if (null (cdr comp-subs))
- (setq new-win window)
- (setq new-win
+ (setq new-win
+ (if (null (cdr comp-subs))
+ window
(split-window window (cadar comp-subs)
(eq type 'horizontal))))
(setq result (or (gnus-configure-frame
diff --git a/lisp/gnus/gnus.el b/lisp/gnus/gnus.el
index cc4f2eb1e7a..bba56e31d9b 100644
--- a/lisp/gnus/gnus.el
+++ b/lisp/gnus/gnus.el
@@ -1271,15 +1271,18 @@ Set this variable in `.emacs' instead."
:type '(choice (const :tag "current" nil)
directory))
-;; Site dependent variables. These variables should be defined in
-;; paths.el.
+;; Site dependent variables.
-(defvar gnus-default-nntp-server nil
- "Specify a default NNTP server.
-This variable should be defined in paths.el, and should never be set
-by the user.
-If you want to change servers, you should use `gnus-select-method'.
-See the documentation to that variable.")
+;; Should this be obsolete?
+(defcustom gnus-default-nntp-server nil
+ "The hostname of the default NNTP server.
+The empty string, or nil, means to use the local host.
+You may wish to set this on a site-wide basis.
+
+If you want to change servers, you should use `gnus-select-method'."
+ :group 'gnus-server
+ :type '(choice (const :tag "local host" nil)
+ (string :tag "host name")))
(defcustom gnus-nntpserver-file "/etc/nntpserver"
"A file with only the name of the nntp server in it."
@@ -1326,6 +1329,8 @@ If you use this variable, you must set `gnus-nntp-server' to nil.
There is a lot more to know about select methods and virtual servers -
see the manual for details."
+ ;; Emacs has set-after since 22.1.
+ ;set-after '(gnus-default-nntp-server)
:group 'gnus-server
:group 'gnus-start
:initialize 'custom-initialize-default
@@ -4397,7 +4402,9 @@ prompt the user for the name of an NNTP server to use."
(gnus-1 arg dont-connect slave)
(gnus-final-warning)))
-(autoload 'debbugs-gnu "debbugs-gnu")
+(eval-and-compile
+ (unless (fboundp 'debbugs-gnu)
+ (autoload 'debbugs-gnu "debbugs-gnu" "List all outstanding Emacs bugs." t)))
(defun gnus-list-debbugs ()
"List all open Gnus bug reports."
(interactive)
diff --git a/lisp/gnus/nnimap.el b/lisp/gnus/nnimap.el
index f978b8c9906..114d83b7286 100644
--- a/lisp/gnus/nnimap.el
+++ b/lisp/gnus/nnimap.el
@@ -475,6 +475,8 @@ textual parts.")
(when nnimap-object
(when (nnimap-capability "QRESYNC")
(nnimap-command "ENABLE QRESYNC"))
+ (nnheader-message 7 "Opening connection to %s...done"
+ nnimap-address)
(nnimap-process nnimap-object))))))))
(autoload 'rfc2104-hash "rfc2104")
diff --git a/lisp/gnus/nnspool.el b/lisp/gnus/nnspool.el
index 2b024e20740..ad9e9c62d6d 100644
--- a/lisp/gnus/nnspool.el
+++ b/lisp/gnus/nnspool.el
@@ -31,6 +31,26 @@
(require 'nnoo)
(eval-when-compile (require 'cl))
+;; Probably this entire thing should be obsolete.
+;; It's only used to init nnspool-spool-directory, so why not just
+;; set that variable's default directly?
+(eval-and-compile
+ (defvar news-directory (if (file-exists-p "/usr/spool/news/")
+ "/usr/spool/news/"
+ "/var/spool/news/")
+ "The root directory below which all news files are stored.")
+ (defvaralias 'news-path 'news-directory))
+
+;; Ditto re obsolescence.
+(defvar news-inews-program
+ (cond ((file-exists-p "/usr/bin/inews") "/usr/bin/inews")
+ ((file-exists-p "/usr/local/inews") "/usr/local/inews")
+ ((file-exists-p "/usr/local/bin/inews") "/usr/local/bin/inews")
+ ((file-exists-p "/usr/contrib/lib/news/inews") "/usr/contrib/lib/news/inews")
+ ((file-exists-p "/usr/lib/news/inews") "/usr/lib/news/inews")
+ (t "inews"))
+ "Program to post news.")
+
(nnoo-declare nnspool)
(defvoo nnspool-inews-program news-inews-program
diff --git a/lisp/gnus/nnweb.el b/lisp/gnus/nnweb.el
index a171cb35ae4..8c9c984ba2e 100644
--- a/lisp/gnus/nnweb.el
+++ b/lisp/gnus/nnweb.el
@@ -365,7 +365,7 @@ Valid types include `google', `dejanews', and `gmane'.")
(match-string 1)
(match-string 2)
(or (match-string 3)
- (substring (current-time-string) -4)))
+ (format-time-string "%Y")))
(current-time-string)))
(setq From (match-string 4)))
(widen)
diff --git a/lisp/gnus/plstore.el b/lisp/gnus/plstore.el
index cbd5e2a3b0a..6d5424e833d 100644
--- a/lisp/gnus/plstore.el
+++ b/lisp/gnus/plstore.el
@@ -64,8 +64,18 @@
;;
;; Editing:
;;
-;; Currently not supported but in the future plstore will provide a
-;; major mode to edit PLSTORE files.
+;; This file also provides `plstore-mode', a major mode for editing
+;; the PLSTORE format file. Visit a non-existing file and put the
+;; following line:
+;;
+;; (("foo" :host "foo.example.org" :secret-user "user"))
+;;
+;; where the prefixing `:secret-' means the property (without
+;; `:secret-' prefix) is marked as secret. Thus, when you save the
+;; buffer, the `:secret-user' property is encrypted as `:user'.
+;;
+;; You can toggle the view between encrypted form and the decrypted
+;; form with C-c C-c.
;;; Code:
@@ -107,6 +117,10 @@ symmetric encryption will be used.")
(put 'plstore-encrypt-to 'permanent-local t)
+(defvar plstore-encoded nil)
+
+(put 'plstore-encoded 'permanent-local t)
+
(defvar plstore-cache-passphrase-for-symmetric-encryption nil)
(defvar plstore-passphrase-alist nil)
@@ -194,10 +208,6 @@ symmetric encryption will be used.")
(generate-new-buffer (format " plstore %s" filename))))
(store (plstore--make buffer)))
(with-current-buffer buffer
- ;; In the future plstore will provide a major mode called
- ;; `plstore-mode' to edit PLSTORE files.
- (if (eq major-mode 'plstore-mode)
- (error "%s is opened for editing; kill the buffer first" file))
(erase-buffer)
(condition-case nil
(insert-file-contents-literally file)
@@ -435,6 +445,131 @@ If no one is selected, symmetric encryption will be performed. "
(plstore--insert-buffer plstore)
(save-buffer)))
+(defun plstore--encode (plstore)
+ (plstore--decrypt plstore)
+ (let ((merged-alist (plstore--get-merged-alist plstore)))
+ (concat "("
+ (mapconcat
+ (lambda (entry)
+ (setq entry (copy-sequence entry))
+ (let ((merged-plist (cdr (assoc (car entry) merged-alist)))
+ (plist (cdr entry)))
+ (while plist
+ (if (string-match "\\`:secret-" (symbol-name (car plist)))
+ (setcar (cdr plist)
+ (plist-get
+ merged-plist
+ (intern (concat ":"
+ (substring (symbol-name
+ (car plist))
+ (match-end 0)))))))
+ (setq plist (nthcdr 2 plist)))
+ (prin1-to-string entry)))
+ (plstore--get-alist plstore)
+ "\n")
+ ")")))
+
+(defun plstore--decode (string)
+ (let* ((alist (car (read-from-string string)))
+ (pointer alist)
+ secret-alist
+ plist
+ entry)
+ (while pointer
+ (unless (stringp (car (car pointer)))
+ (error "Invalid PLSTORE format %s" string))
+ (setq plist (cdr (car pointer)))
+ (while plist
+ (when (string-match "\\`:secret-" (symbol-name (car plist)))
+ (setq entry (assoc (car (car pointer)) secret-alist))
+ (unless entry
+ (setq entry (list (car (car pointer)))
+ secret-alist (cons entry secret-alist)))
+ (setcdr entry (plist-put (cdr entry)
+ (intern (concat ":"
+ (substring (symbol-name
+ (car plist))
+ (match-end 0))))
+ (car (cdr plist))))
+ (setcar (cdr plist) t))
+ (setq plist (nthcdr 2 plist)))
+ (setq pointer (cdr pointer)))
+ (plstore--make nil alist nil secret-alist)))
+
+(defun plstore--write-contents-functions ()
+ (when plstore-encoded
+ (let ((store (plstore--decode (buffer-string)))
+ (file (buffer-file-name)))
+ (unwind-protect
+ (progn
+ (set-visited-file-name nil)
+ (with-temp-buffer
+ (plstore--insert-buffer store)
+ (write-region (buffer-string) nil file)))
+ (set-visited-file-name file)
+ (set-buffer-modified-p nil))
+ t)))
+
+(defun plstore-mode-original ()
+ "Show the original form of the this buffer."
+ (interactive)
+ (when plstore-encoded
+ (if (and (buffer-modified-p)
+ (y-or-n-p "Save buffer before reading the original form? "))
+ (save-buffer))
+ (erase-buffer)
+ (insert-file-contents-literally (buffer-file-name))
+ (set-buffer-modified-p nil)
+ (setq plstore-encoded nil)))
+
+(defun plstore-mode-decoded ()
+ "Show the decoded form of the this buffer."
+ (interactive)
+ (unless plstore-encoded
+ (if (and (buffer-modified-p)
+ (y-or-n-p "Save buffer before decoding? "))
+ (save-buffer))
+ (let ((store (plstore--make (current-buffer))))
+ (plstore--init-from-buffer store)
+ (erase-buffer)
+ (insert
+ (substitute-command-keys "\
+;;; You are looking at the decoded form of the PLSTORE file.\n\
+;;; To see the original form content, do \\[plstore-mode-toggle-display]\n\n"))
+ (insert (plstore--encode store))
+ (set-buffer-modified-p nil)
+ (setq plstore-encoded t))))
+
+(defun plstore-mode-toggle-display ()
+ "Toggle the display mode of PLSTORE between the original and decoded forms."
+ (interactive)
+ (if plstore-encoded
+ (plstore-mode-original)
+ (plstore-mode-decoded)))
+
+(eval-when-compile
+ (defmacro plstore-called-interactively-p (kind)
+ (condition-case nil
+ (progn
+ (eval '(called-interactively-p 'any))
+ ;; Emacs >=23.2
+ `(called-interactively-p ,kind))
+ ;; Emacs <23.2
+ (wrong-number-of-arguments '(called-interactively-p))
+ ;; XEmacs
+ (void-function '(interactive-p)))))
+
+;;;###autoload
+(define-derived-mode plstore-mode emacs-lisp-mode "PLSTORE"
+ "Major mode for editing PLSTORE files."
+ (make-local-variable 'plstore-encoded)
+ (add-hook 'write-contents-functions #'plstore--write-contents-functions)
+ (define-key plstore-mode-map "\C-c\C-c" #'plstore-mode-toggle-display)
+ ;; to create a new file with plstore-mode, mark it as already decoded
+ (if (plstore-called-interactively-p 'any)
+ (setq plstore-encoded t)
+ (plstore-mode-decoded)))
+
(provide 'plstore)
;;; plstore.el ends here
diff --git a/lisp/hi-lock.el b/lisp/hi-lock.el
index 32a041e6c09..2c2d08e19cc 100644
--- a/lisp/hi-lock.el
+++ b/lisp/hi-lock.el
@@ -204,16 +204,15 @@ patterns."
(defvar hi-lock-interactive-patterns nil
"Patterns provided to hi-lock by user. Should not be changed.")
+(define-obsolete-variable-alias 'hi-lock-face-history
+ 'hi-lock-face-defaults "23.1")
(defvar hi-lock-face-defaults
'("hi-yellow" "hi-pink" "hi-green" "hi-blue" "hi-black-b"
"hi-blue-b" "hi-red-b" "hi-green-b" "hi-black-hb")
"Default faces for hi-lock interactive functions.")
-;(dolist (f hi-lock-face-defaults) (unless (facep f) (error "%s not a face" f)))
-
-(define-obsolete-variable-alias 'hi-lock-face-history
- 'hi-lock-face-defaults
- "23.1")
+;;(dolist (f hi-lock-face-defaults)
+;; (unless (facep f) (error "%s not a face" f)))
(define-obsolete-variable-alias 'hi-lock-regexp-history
'regexp-history
diff --git a/lisp/ibuf-ext.el b/lisp/ibuf-ext.el
index 22ec2f5df1f..58d38f77b66 100644
--- a/lisp/ibuf-ext.el
+++ b/lisp/ibuf-ext.el
@@ -973,20 +973,17 @@ Interactively, prompt for NAME, and use the current filters."
(concat " [" (cadr type) ": " (format "%s]" (cdr qualifier)))))))
-(defun ibuffer-list-buffer-modes ()
- "Create an alist of buffer modes currently in use.
-The list returned will be of the form (\"MODE-NAME\" . MODE-SYMBOL)."
- (let ((bufs (buffer-list))
- (modes)
- (this-mode))
- (while bufs
- (setq this-mode (buffer-local-value 'major-mode (car bufs))
- bufs (cdr bufs))
- (add-to-list
- 'modes
- `(,(symbol-name this-mode) .
- ,this-mode)))
- modes))
+(defun ibuffer-list-buffer-modes (&optional include-parents)
+ "Create a completion table of buffer modes currently in use.
+If INCLUDE-PARENTS is non-nil then include parent modes."
+ (let ((modes))
+ (dolist (buf (buffer-list))
+ (let ((this-mode (buffer-local-value 'major-mode buf)))
+ (while (and this-mode (not (memq this-mode modes)))
+ (push this-mode modes)
+ (setq this-mode (and include-parents
+ (get this-mode 'derived-mode-parent))))))
+ (mapcar #'symbol-name modes)))
;;; Extra operation definitions
@@ -996,16 +993,19 @@ The list returned will be of the form (\"MODE-NAME\" . MODE-SYMBOL)."
"Toggle current view to buffers with major mode QUALIFIER."
(:description "major mode"
:reader
- (intern
- (completing-read "Filter by major mode: " obarray
- #'(lambda (e)
- (string-match "-mode$"
- (symbol-name e)))
- t
- (let ((buf (ibuffer-current-buffer)))
- (if (and buf (buffer-live-p buf))
- (symbol-name (buffer-local-value 'major-mode buf))
- "")))))
+ (let* ((buf (ibuffer-current-buffer))
+ (default (if (and buf (buffer-live-p buf))
+ (symbol-name (buffer-local-value
+ 'major-mode buf)))))
+ (intern
+ (completing-read
+ (if default
+ (format "Filter by major mode (default %s): " default)
+ "Filter by major mode: ")
+ obarray
+ #'(lambda (e)
+ (string-match "-mode\\'" (symbol-name e)))
+ t nil nil default))))
(eq qualifier (buffer-local-value 'major-mode buf)))
;;;###autoload (autoload 'ibuffer-filter-by-used-mode "ibuf-ext")
@@ -1014,18 +1014,29 @@ The list returned will be of the form (\"MODE-NAME\" . MODE-SYMBOL)."
Called interactively, this function allows selection of modes
currently used by buffers."
(:description "major mode in use"
+ :reader
+ (let* ((buf (ibuffer-current-buffer))
+ (default (if (and buf (buffer-live-p buf))
+ (symbol-name (buffer-local-value
+ 'major-mode buf)))))
+ (intern
+ (completing-read
+ (if default
+ (format "Filter by major mode (default %s): " default)
+ "Filter by major mode: ")
+ (ibuffer-list-buffer-modes) nil t nil nil default))))
+ (eq qualifier (buffer-local-value 'major-mode buf)))
+
+;;;###autoload (autoload 'ibuffer-filter-by-derived-mode "ibuf-ext")
+(define-ibuffer-filter derived-mode
+ "Toggle current view to buffers whose major mode inherits from QUALIFIER."
+ (:description "derived mode"
:reader
(intern
- (completing-read "Filter by major mode: "
- (ibuffer-list-buffer-modes)
- nil
- t
- (let ((buf (ibuffer-current-buffer)))
- (if (and buf (buffer-live-p buf))
- (symbol-name (buffer-local-value
- 'major-mode buf))
- "")))))
- (eq qualifier (buffer-local-value 'major-mode buf)))
+ (completing-read "Filter by derived mode: "
+ (ibuffer-list-buffer-modes t)
+ nil t)))
+ (with-current-buffer buf (derived-mode-p qualifier)))
;;;###autoload (autoload 'ibuffer-filter-by-name "ibuf-ext")
(define-ibuffer-filter name
@@ -1345,8 +1356,8 @@ a prefix argument reverses the meaning of that variable."
(diff-sentinel
(call-process shell-file-name nil
(current-buffer) nil
- shell-command-switch command)))
- (insert "\n"))))
+ shell-command-switch command))
+ (insert "\n")))))
(sit-for 0)
(when (file-exists-p tempfile)
(delete-file tempfile)))))
@@ -1466,19 +1477,16 @@ You can then feed the file name(s) to other commands with \\[yank]."
(defun ibuffer-mark-by-mode (mode)
"Mark all buffers whose major mode equals MODE."
(interactive
- (list (intern (completing-read "Mark by major mode: " obarray
- #'(lambda (e)
- ;; kind of a hack...
- (and (fboundp e)
- (string-match "-mode$"
- (symbol-name e))))
- t
- (let ((buf (ibuffer-current-buffer)))
- (if (and buf (buffer-live-p buf))
- (with-current-buffer buf
- (cons (symbol-name major-mode)
- 0))
- ""))))))
+ (let* ((buf (ibuffer-current-buffer))
+ (default (if (and buf (buffer-live-p buf))
+ (symbol-name (buffer-local-value
+ 'major-mode buf)))))
+ (list (intern
+ (completing-read
+ (if default
+ (format "Mark by major mode (default %s): " default)
+ "Mark by major mode: ")
+ (ibuffer-list-buffer-modes) nil t nil nil default)))))
(ibuffer-mark-on-buffer
#'(lambda (buf)
(eq (buffer-local-value 'major-mode buf) mode))))
diff --git a/lisp/ibuf-macs.el b/lisp/ibuf-macs.el
index f47592e82bb..659b8e7d78c 100644
--- a/lisp/ibuf-macs.el
+++ b/lisp/ibuf-macs.el
@@ -143,7 +143,7 @@ buffer object, and `b' bound to another. BODY should return a non-nil
value if and only if `a' is \"less than\" `b'.
\(fn NAME DOCUMENTATION (&key DESCRIPTION) &rest BODY)"
- (declare (indent 1))
+ (declare (indent 1) (doc-string 2))
`(progn
(defun ,(intern (concat "ibuffer-do-sort-by-" (symbol-name name))) ()
,(or documentation "No :documentation specified for this sorting method.")
@@ -202,7 +202,7 @@ COMPLEX means this function is special; see the source code of this
macro for exactly what it does.
\(fn OP ARGS DOCUMENTATION (&key INTERACTIVE MARK MODIFIER-P DANGEROUS OPSTRING ACTIVE-OPSTRING COMPLEX) &rest BODY)"
- (declare (indent 2))
+ (declare (indent 2) (doc-string 3))
`(progn
(defun ,(intern (concat (if (string-match "^ibuffer-do" (symbol-name op))
"" "ibuffer-do-") (symbol-name op)))
@@ -280,7 +280,7 @@ will be evaluated with BUF bound to the buffer object, and QUALIFIER
bound to the current value of the filter.
\(fn NAME DOCUMENTATION (&key READER DESCRIPTION) &rest BODY)"
- (declare (indent 2))
+ (declare (indent 2) (doc-string 2))
(let ((fn-name (intern (concat "ibuffer-filter-by-" (symbol-name name)))))
`(progn
(defun ,fn-name (qualifier)
diff --git a/lisp/ibuffer.el b/lisp/ibuffer.el
index 536992f5bc8..adb7a12243a 100644
--- a/lisp/ibuffer.el
+++ b/lisp/ibuffer.el
@@ -60,11 +60,10 @@
(declare-function ibuffer-format-filter-group-data "ibuf-ext" (filter))
(defgroup ibuffer nil
- "An advanced replacement for `buffer-menu'.
-
-Ibuffer allows you to operate on buffers in a manner much like Dired.
-Operations include sorting, marking by regular expression, and
-the ability to filter the displayed buffers by various criteria."
+ "Advanced replacement for `buffer-menu'.
+Ibuffer lets you operate on buffers in a Dired-like way,
+with the ability to sort, mark by regular expression,
+and filter displayed buffers by various criteria."
:version "22.1"
:group 'convenience)
@@ -502,8 +501,8 @@ directory, like `default-directory'."
(define-key map (kbd "s f") 'ibuffer-do-sort-by-filename/process)
(define-key map (kbd "s m") 'ibuffer-do-sort-by-major-mode)
- (define-key map (kbd "/ m") 'ibuffer-filter-by-mode)
- (define-key map (kbd "/ M") 'ibuffer-filter-by-used-mode)
+ (define-key map (kbd "/ m") 'ibuffer-filter-by-used-mode)
+ (define-key map (kbd "/ M") 'ibuffer-filter-by-derived-mode)
(define-key map (kbd "/ n") 'ibuffer-filter-by-name)
(define-key map (kbd "/ c") 'ibuffer-filter-by-content)
(define-key map (kbd "/ e") 'ibuffer-filter-by-predicate)
@@ -2646,7 +2645,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" "1400db1bc3d4a3010cbc4807a6725072")
+;;;;;; ibuffer-auto-mode) "ibuf-ext" "ibuf-ext.el" "296999191b08d76d9763a8ebf510d5d8")
;;; Generated autoloads from ibuf-ext.el
(autoload 'ibuffer-auto-mode "ibuf-ext" "\
@@ -2836,6 +2835,7 @@ Set this buffer's filters to filters with NAME from `ibuffer-saved-filters'.
\(fn NAME)" t nil)
(autoload 'ibuffer-filter-by-mode "ibuf-ext")
(autoload 'ibuffer-filter-by-used-mode "ibuf-ext")
+ (autoload 'ibuffer-filter-by-derived-mode "ibuf-ext")
(autoload 'ibuffer-filter-by-name "ibuf-ext")
(autoload 'ibuffer-filter-by-filename "ibuf-ext")
(autoload 'ibuffer-filter-by-size-gt "ibuf-ext")
diff --git a/lisp/ido.el b/lisp/ido.el
index bbf3fe2a1d0..f3deba7ae8b 100644
--- a/lisp/ido.el
+++ b/lisp/ido.el
@@ -893,9 +893,14 @@ Otherwise, only the current list of matches is shown."
:type 'boolean
:group 'ido)
-(defvar ido-all-frames 'visible
- "Argument to pass to `walk-windows' when finding visible files.
-See documentation of `walk-windows' for useful values.")
+(defcustom ido-all-frames 'visible
+ "Argument to pass to `walk-windows' when Ido is finding buffers.
+See documentation of `walk-windows' for useful values."
+ :type '(choice (const :tag "Selected frame only" nil)
+ (const :tag "All existing frames" t)
+ (const :tag "All visible frames" visible)
+ (const :tag "All frames on this terminal" 0))
+ :group 'ido)
(defcustom ido-minibuffer-setup-hook nil
"Ido-specific customization of minibuffer setup.
diff --git a/lisp/image-mode.el b/lisp/image-mode.el
index 900cd725b92..8329c02fb0d 100644
--- a/lisp/image-mode.el
+++ b/lisp/image-mode.el
@@ -532,6 +532,7 @@ was inserted."
(setq image-type type)
(if (eq major-mode 'image-mode)
(setq mode-name (format "Image[%s]" type)))
+ (image-transform-check-size)
(if (called-interactively-p 'any)
(message "Repeat this command to go back to displaying the file as text"))))
@@ -608,23 +609,23 @@ Otherwise it plays once, then stops."
;; Not yet implemented.
-;;; (defvar image-transform-minor-mode-map
-;;; (let ((map (make-sparse-keymap)))
-;;; ;; (define-key map [(control ?+)] 'image-scale-in)
-;;; ;; (define-key map [(control ?-)] 'image-scale-out)
-;;; ;; (define-key map [(control ?=)] 'image-scale-none)
-;;; ;; (define-key map "c f h" 'image-scale-fit-height)
-;;; ;; (define-key map "c ]" 'image-rotate-right)
-;;; map)
-;;; "Minor mode keymap `image-transform-mode'.")
-;;;
-;;; (define-minor-mode image-transform-mode
-;;; "Minor mode for scaling and rotating images.
-;;; With a prefix argument ARG, enable the mode if ARG is positive,
-;;; and disable it otherwise. If called from Lisp, enable the mode
-;;; if ARG is omitted or nil. This minor mode requires Emacs to have
-;;; been compiled with ImageMagick support."
-;;; nil "image-transform" image-transform-minor-mode-map)
+;; (defvar image-transform-minor-mode-map
+;; (let ((map (make-sparse-keymap)))
+;; ;; (define-key map [(control ?+)] 'image-scale-in)
+;; ;; (define-key map [(control ?-)] 'image-scale-out)
+;; ;; (define-key map [(control ?=)] 'image-scale-none)
+;; ;; (define-key map "c f h" 'image-scale-fit-height)
+;; ;; (define-key map "c ]" 'image-rotate-right)
+;; map)
+;; "Minor mode keymap `image-transform-mode'.")
+;;
+;; (define-minor-mode image-transform-mode
+;; "Minor mode for scaling and rotating images.
+;; With a prefix argument ARG, enable the mode if ARG is positive,
+;; and disable it otherwise. If called from Lisp, enable the mode
+;; if ARG is omitted or nil. This minor mode requires Emacs to have
+;; been compiled with ImageMagick support."
+;; nil "image-transform" image-transform-minor-mode-map)
;; FIXME this doesn't seem mature yet. Document in manual when it is.
@@ -634,11 +635,124 @@ Its value should be one of the following:
- nil, meaning no resizing.
- `fit-height', meaning to fit the image to the window height.
- `fit-width', meaning to fit the image to the window width.
- - A number, which is a scale factor (the default size is 100).")
+ - A number, which is a scale factor (the default size is 1).")
+
+(defvar image-transform-scale 1.0
+ "The scale factor of the image being displayed.")
(defvar image-transform-rotation 0.0
"Rotation angle for the image in the current Image mode buffer.")
+(defvar image-transform-right-angle-fudge 0.0001
+ "Snap distance to a multiple of a right angle.
+There's no deep theory behind the default value, it should just
+be somewhat larger than ImageMagick's MagickEpsilon.")
+
+(defsubst image-transform-width (width height)
+ "Return the bounding box width of a rotated WIDTH x HEIGHT rectangle.
+The rotation angle is the value of `image-transform-rotation' in degrees."
+ (let ((angle (degrees-to-radians image-transform-rotation)))
+ ;; Assume, w.l.o.g., that the vertices of the rectangle have the
+ ;; coordinates (+-w/2, +-h/2) and that (0, 0) is the center of the
+ ;; rotation by the angle A. The projections onto the first axis
+ ;; of the vertices of the rotated rectangle are +- (w/2) cos A +-
+ ;; (h/2) sin A, and the difference between the largest and the
+ ;; smallest of the four values is the expression below.
+ (+ (* width (abs (cos angle))) (* height (abs (sin angle))))))
+
+;; The following comment and code snippet are from
+;; ImageMagick-6.7.4-4/magick/distort.c
+
+;; /* Set the output image geometry to calculated 'bestfit'.
+;; Yes this tends to 'over do' the file image size, ON PURPOSE!
+;; Do not do this for DePolar which needs to be exact for virtual tiling.
+;; */
+;; if ( fix_bounds ) {
+;; geometry.x = (ssize_t) floor(min.x-0.5);
+;; geometry.y = (ssize_t) floor(min.y-0.5);
+;; geometry.width=(size_t) ceil(max.x-geometry.x+0.5);
+;; geometry.height=(size_t) ceil(max.y-geometry.y+0.5);
+;; }
+
+;; Other parts of the same file show that here the origin is in the
+;; left lower corner of the image rectangle, the center of the
+;; rotation is the center of the rectangle and min.x and max.x
+;; (resp. min.y and max.y) are the smallest and the largest of the
+;; projections of the vertices onto the first (resp. second) axis.
+
+(defun image-transform-fit-width (width height length)
+ "Return (w . h) so that a rotated w x h image has exactly width LENGTH.
+The rotation angle is the value of `image-transform-rotation'.
+Write W for WIDTH and H for HEIGHT. Then the w x h rectangle is
+an \"approximately uniformly\" scaled W x H rectangle, which
+currently means that w is one of floor(s W) + {0, 1, -1} and h is
+floor(s H), where s can be recovered as the value of `image-transform-scale'.
+The value of `image-transform-rotation' may be replaced by
+a slightly different angle. Currently this is done for values
+close to a multiple of 90, see `image-transform-right-angle-fudge'."
+ (cond ((< (abs (- (mod (+ image-transform-rotation 90) 180) 90))
+ image-transform-right-angle-fudge)
+ (assert (not (zerop width)) t)
+ (setq image-transform-rotation
+ (float (round image-transform-rotation))
+ image-transform-scale (/ (float length) width))
+ (cons length nil))
+ ((< (abs (- (mod (+ image-transform-rotation 45) 90) 45))
+ image-transform-right-angle-fudge)
+ (assert (not (zerop height)) t)
+ (setq image-transform-rotation
+ (float (round image-transform-rotation))
+ image-transform-scale (/ (float length) height))
+ (cons nil length))
+ (t
+ (assert (not (and (zerop width) (zerop height))) t)
+ (setq image-transform-scale
+ (/ (float (1- length)) (image-transform-width width height)))
+ ;; Assume we have a w x h image and an angle A, and let l =
+ ;; l(w, h) = w |cos A| + h |sin A|, which is the actual width
+ ;; of the bounding box of the rotated image, as calculated by
+ ;; `image-transform-width'. The code snippet quoted above
+ ;; means that ImageMagick puts the rotated image in
+ ;; a bounding box of width L = 2 ceil((w+l+1)/2) - w.
+ ;; Elementary considerations show that this is equivalent to
+ ;; L - w being even and L-3 < l(w, h) <= L-1. In our case, L is
+ ;; the given `length' parameter and our job is to determine
+ ;; reasonable values for w and h which satisfy these
+ ;; conditions.
+ (let ((w (floor (* image-transform-scale width)))
+ (h (floor (* image-transform-scale height))))
+ ;; Let w and h as bound above. Then l(w, h) <= l(s W, s H)
+ ;; = L-1 < l(w+1, h+1) = l(w, h) + l(1, 1) <= l(w, h) + 2,
+ ;; hence l(w, h) > (L-1) - 2 = L-3.
+ (cons
+ (cond ((= (mod w 2) (mod length 2))
+ w)
+ ;; l(w+1, h) >= l(w, h) > L-3, but does l(w+1, h) <=
+ ;; L-1 hold?
+ ((<= (image-transform-width (1+ w) h) (1- length))
+ (1+ w))
+ ;; No, it doesn't, but this implies that l(w-1, h) =
+ ;; l(w+1, h) - l(2, 0) >= l(w+1, h) - 2 > (L-1) -
+ ;; 2 = L-3. Clearly, l(w-1, h) <= l(w, h) <= L-1.
+ (t
+ (1- w)))
+ h)))))
+
+(defun image-transform-check-size ()
+ "Check that the image exactly fits the width/height of the window."
+ (unless (numberp image-transform-resize)
+ (let ((size (image-display-size (image-get-display-property) t)))
+ (cond ((eq image-transform-resize 'fit-width)
+ (assert (= (car size)
+ (- (nth 2 (window-inside-pixel-edges))
+ (nth 0 (window-inside-pixel-edges))))
+ t))
+ ((eq image-transform-resize 'fit-height)
+ (assert (= (cdr size)
+ (- (nth 3 (window-inside-pixel-edges))
+ (nth 1 (window-inside-pixel-edges))))
+ t))))))
+
(defun image-transform-properties (spec)
"Return rescaling/rotation properties for image SPEC.
These properties are determined by the Image mode variables
@@ -647,29 +761,36 @@ return value is suitable for appending to an image spec.
Rescaling and rotation properties only take effect if Emacs is
compiled with ImageMagick support."
+ (setq image-transform-scale 1.0)
(when (or image-transform-resize
- (not (equal image-transform-rotation 0.0)))
+ (/= image-transform-rotation 0.0))
;; Note: `image-size' looks up and thus caches the untransformed
;; image. There's no easy way to prevent that.
(let* ((size (image-size spec t))
- (height
+ (resized
(cond
((numberp image-transform-resize)
- (unless (= image-transform-resize 100)
- (* image-transform-resize (cdr size))))
+ (unless (= image-transform-resize 1)
+ (setq image-transform-scale image-transform-resize)
+ (cons nil (floor (* image-transform-resize (cdr size))))))
+ ((eq image-transform-resize 'fit-width)
+ (image-transform-fit-width
+ (car size) (cdr size)
+ (- (nth 2 (window-inside-pixel-edges))
+ (nth 0 (window-inside-pixel-edges)))))
((eq image-transform-resize 'fit-height)
- (- (nth 3 (window-inside-pixel-edges))
- (nth 1 (window-inside-pixel-edges))))))
- (width (if (eq image-transform-resize 'fit-width)
- (- (nth 2 (window-inside-pixel-edges))
- (nth 0 (window-inside-pixel-edges))))))
- ;;TODO fit-to-* should consider the rotation angle
- `(,@(if height (list :height height))
- ,@(if width (list :width width))
- ,@(if (not (equal 0.0 image-transform-rotation))
- (list :rotation image-transform-rotation))))))
-
-;; FIXME 2 works, but eg 1.9 or 0.5 don't?
+ (let ((res (image-transform-fit-width
+ (cdr size) (car size)
+ (- (nth 3 (window-inside-pixel-edges))
+ (nth 1 (window-inside-pixel-edges))))))
+ (cons (cdr res) (car res)))))))
+ `(,@(when (car resized)
+ (list :width (car resized)))
+ ,@(when (cdr resized)
+ (list :height (cdr resized)))
+ ,@(unless (= 0.0 image-transform-rotation)
+ (list :rotation image-transform-rotation))))))
+
(defun image-transform-set-scale (scale)
"Prompt for a number, and resize the current image by that amount.
This command has no effect unless Emacs is compiled with
@@ -699,9 +820,7 @@ ImageMagick support."
ROTATION should be in degrees. This command has no effect unless
Emacs is compiled with ImageMagick support."
(interactive "nRotation angle (in degrees): ")
- ;;TODO 0 90 180 270 degrees are the only reasonable angles here
- ;;otherwise combining with rescaling will get very awkward
- (setq image-transform-rotation (float rotation))
+ (setq image-transform-rotation (float (mod rotation 360)))
(image-toggle-display-image))
(provide 'image-mode)
diff --git a/lisp/image.el b/lisp/image.el
index 348c208781e..27e41a57efe 100644
--- a/lisp/image.el
+++ b/lisp/image.el
@@ -282,7 +282,9 @@ be determined."
types nil)
(setq types (cdr types)))))
(goto-char opoint)
- type))
+ (and type
+ (memq type image-types)
+ type)))
;;;###autoload
diff --git a/lisp/imenu.el b/lisp/imenu.el
index 12ac3540925..24beb9c89c1 100644
--- a/lisp/imenu.el
+++ b/lisp/imenu.el
@@ -1,4 +1,4 @@
-;;; imenu.el --- framework for mode-specific buffer indexes
+;;; imenu.el --- framework for mode-specific buffer indexes -*- lexical-binding: t -*-
;; Copyright (C) 1994-1998, 2001-2012 Free Software Foundation, Inc.
@@ -266,12 +266,12 @@ The function in this variable is called when selecting a normal index-item.")
(and (consp (cdr item)) (listp (cadr item))
(not (eq (car (cadr item)) 'lambda))))
-;; Macro to display a progress message.
-;; RELPOS is the relative position to display.
-;; If RELPOS is nil, then the relative position in the buffer
-;; is calculated.
-;; PREVPOS is the variable in which we store the last position displayed.
-(defmacro imenu-progress-message (prevpos &optional relpos reverse)
+(defmacro imenu-progress-message (_prevpos &optional _relpos _reverse)
+ "Macro to display a progress message.
+RELPOS is the relative position to display.
+If RELPOS is nil, then the relative position in the buffer
+is calculated.
+PREVPOS is the variable in which we store the last position displayed."
;; Made obsolete/empty, as computers are now faster than the eye, and
;; it had problems updating the messages correctly, and could shadow
@@ -419,8 +419,7 @@ Don't move point."
(defconst imenu--rescan-item '("*Rescan*" . -99))
;; The latest buffer index.
-;; Buffer local.
-(defvar imenu--index-alist nil
+(defvar-local imenu--index-alist nil
"The buffer index alist computed for this buffer in Imenu.
Simple elements in the alist look like (INDEX-NAME . POSITION).
@@ -439,16 +438,12 @@ There is one simple element with negative POSITION; selecting that
element recalculates the buffer's index alist.")
;;;###autoload(put 'imenu--index-alist 'risky-local-variable t)
-(make-variable-buffer-local 'imenu--index-alist)
-
-(defvar imenu--last-menubar-index-alist nil
+(defvar-local imenu--last-menubar-index-alist nil
"The latest buffer index alist used to update the menu bar menu.")
-(make-variable-buffer-local 'imenu--last-menubar-index-alist)
-
-;; History list for 'jump-to-function-in-buffer'.
-;; Making this buffer local caused it not to work!
-(defvar imenu--history-list nil)
+(defvar imenu--history-list nil
+ ;; Making this buffer local caused it not to work!
+ "History list for 'jump-to-function-in-buffer'.")
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;
@@ -456,21 +451,18 @@ element recalculates the buffer's index alist.")
;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;;
-;;; Sort function
-;;; Sorts the items depending on their index name.
-;;; An item looks like (NAME . POSITION).
-;;;
(defun imenu--sort-by-name (item1 item2)
+ "Comparison function to sort items depending on their index name.
+An item looks like (NAME . POSITION)."
(string-lessp (car item1) (car item2)))
(defun imenu--sort-by-position (item1 item2)
(< (cdr item1) (cdr item2)))
(defun imenu--relative-position (&optional reverse)
- ;; Support function to calculate relative position in buffer
- ;; Beginning of buffer is 0 and end of buffer is 100
- ;; If REVERSE is non-nil then the beginning is 100 and the end is 0.
+ "Support function to calculate relative position in buffer.
+Beginning of buffer is 0 and end of buffer is 100
+If REVERSE is non-nil then the beginning is 100 and the end is 0."
(let ((pos (point))
(total (buffer-size)))
(and reverse (setq pos (- total pos)))
@@ -479,11 +471,10 @@ element recalculates the buffer's index alist.")
(/ (1- pos) (max (/ total 100) 1))
(/ (* 100 (1- pos)) (max total 1)))))
-;; Split LIST into sublists of max length N.
-;; Example (imenu--split '(1 2 3 4 5 6 7 8) 3)-> '((1 2 3) (4 5 6) (7 8))
-;;
-;; The returned list DOES NOT share structure with LIST.
(defun imenu--split (list n)
+ "Split LIST into sublists of max length N.
+Example (imenu--split '(1 2 3 4 5 6 7 8) 3)-> '((1 2 3) (4 5 6) (7 8))
+The returned list DOES NOT share structure with LIST."
(let ((remain list)
(result '())
(sublist '())
@@ -502,20 +493,18 @@ element recalculates the buffer's index alist.")
(push (nreverse sublist) result))
(nreverse result)))
-;;; Split the alist MENULIST into a nested alist, if it is long enough.
-;;; In any case, add TITLE to the front of the alist.
-;;; If IMENU--RESCAN-ITEM is present in MENULIST, it is moved to the
-;;; beginning of the returned alist.
-;;;
-;;; The returned alist DOES NOT share structure with MENULIST.
(defun imenu--split-menu (menulist title)
+ "Split the alist MENULIST into a nested alist, if it is long enough.
+In any case, add TITLE to the front of the alist.
+If IMENU--RESCAN-ITEM is present in MENULIST, it is moved to the
+beginning of the returned alist.
+The returned alist DOES NOT share structure with MENULIST."
(let ((menulist (copy-sequence menulist))
- keep-at-top tail)
+ keep-at-top)
(if (memq imenu--rescan-item menulist)
(setq keep-at-top (list imenu--rescan-item)
menulist (delq imenu--rescan-item menulist)))
- (setq tail menulist)
- (dolist (item tail)
+ (dolist (item menulist)
(when (imenu--subalist-p item)
(push item keep-at-top)
(setq menulist (delq item menulist))))
@@ -530,32 +519,28 @@ element recalculates the buffer's index alist.")
(cons title
(nconc (nreverse keep-at-top) menulist))))
-;;; Split up each long alist that are nested within ALIST
-;;; into nested alists.
-;;;
-;;; Return a split and sorted copy of ALIST. The returned alist DOES
-;;; NOT share structure with ALIST.
(defun imenu--split-submenus (alist)
- (mapcar (function
- (lambda (elt)
- (if (and (consp elt)
- (stringp (car elt))
- (listp (cdr elt)))
- (imenu--split-menu (cdr elt) (car elt))
- elt)))
+ "Split up each long alist that are nested within ALIST into nested alists.
+Return a split and sorted copy of ALIST. The returned alist DOES
+NOT share structure with ALIST."
+ (mapcar (lambda (elt)
+ (if (and (consp elt)
+ (stringp (car elt))
+ (listp (cdr elt)))
+ (imenu--split-menu (cdr elt) (car elt))
+ elt))
alist))
-;;; Truncate all strings in MENULIST to imenu-max-item-length
(defun imenu--truncate-items (menulist)
- (mapcar (function
- (lambda (item)
- (cond
- ((consp (cdr item))
- (imenu--truncate-items (cdr item)))
- ;; truncate if necessary
- ((and (numberp imenu-max-item-length)
- (> (length (car item)) imenu-max-item-length))
- (setcar item (substring (car item) 0 imenu-max-item-length))))))
+ "Truncate all strings in MENULIST to `imenu-max-item-length'."
+ (mapcar (lambda (item)
+ (cond
+ ((consp (cdr item))
+ (imenu--truncate-items (cdr item)))
+ ;; truncate if necessary
+ ((and (numberp imenu-max-item-length)
+ (> (length (car item)) imenu-max-item-length))
+ (setcar item (substring (car item) 0 imenu-max-item-length)))))
menulist))
@@ -579,19 +564,18 @@ See `imenu--index-alist' for the format of the index alist."
(funcall imenu-create-index-function))))
(imenu--truncate-items imenu--index-alist)))
(or imenu--index-alist noerror
- (error "No items suitable for an index found in this buffer"))
+ (user-error "No items suitable for an index found in this buffer"))
(or imenu--index-alist
(setq imenu--index-alist (list nil)))
;; Add a rescan option to the index.
(cons imenu--rescan-item imenu--index-alist))
-;;; Find all markers in alist and makes
-;;; them point nowhere.
-;;; The top-level call uses nil as the argument;
-;;; non-nil arguments are in recursive calls.
-(defvar imenu--cleanup-seen)
+(defvar imenu--cleanup-seen nil)
(defun imenu--cleanup (&optional alist)
+ "Find all markers in ALIST and make them point nowhere.
+If ALIST is nil (the normal case), use `imenu--index-alist'.
+Non-nil arguments are in recursive calls."
;; If alist is provided use that list.
;; If not, empty the table of lists already seen
;; and use imenu--index-alist.
@@ -599,18 +583,14 @@ See `imenu--index-alist' for the format of the index alist."
(setq imenu--cleanup-seen (cons alist imenu--cleanup-seen))
(setq alist imenu--index-alist imenu--cleanup-seen (list alist)))
- (and alist
- (mapc
- (lambda (item)
- (cond
- ((markerp (cdr item))
- (set-marker (cdr item) nil))
- ;; Don't process one alist twice.
- ((memq (cdr item) imenu--cleanup-seen))
- ((imenu--subalist-p item)
- (imenu--cleanup (cdr item)))))
- alist)
- t))
+ (when alist
+ (dolist (item alist)
+ (cond
+ ((markerp (cdr item)) (set-marker (cdr item) nil))
+ ;; Don't process one alist twice.
+ ((memq (cdr item) imenu--cleanup-seen))
+ ((imenu--subalist-p item) (imenu--cleanup (cdr item)))))
+ t))
(defun imenu--create-keymap (title alist &optional cmd)
(list* 'keymap title
@@ -695,7 +675,7 @@ The alternate method, which is the one most often used, is to call
((and imenu-generic-expression)
(imenu--generic-function imenu-generic-expression))
(t
- (error "This buffer cannot use `imenu-default-create-index-function'"))))
+ (user-error "This buffer cannot use `imenu-default-create-index-function'"))))
;;;
;;; Generic index gathering function.
@@ -968,8 +948,8 @@ See the command `imenu' for more information."
`(menu-item ,name ,(make-sparse-keymap "Imenu")))
(use-local-map newmap)
(add-hook 'menu-bar-update-hook 'imenu-update-menubar)))
- (error "The mode `%s' does not support Imenu"
- (format-mode-line mode-name))))
+ (user-error "The mode `%s' does not support Imenu"
+ (format-mode-line mode-name))))
;;;###autoload
(defun imenu-add-menubar-index ()
@@ -981,10 +961,9 @@ A trivial interface to `imenu-add-to-menubar' suitable for use in a hook."
(defvar imenu-buffer-menubar nil)
-(defvar imenu-menubar-modified-tick 0
+(defvar-local imenu-menubar-modified-tick 0
"The value of (buffer-chars-modified-tick) as of the last call
to `imenu-update-menubar'.")
-(make-variable-buffer-local 'imenu-menubar-modified-tick)
(defun imenu-update-menubar ()
(when (and (current-local-map)
@@ -1058,12 +1037,6 @@ for more information."
(apply function (car index-item) position rest))
(run-hooks 'imenu-after-jump-hook)))
-(dolist (mess
- '("^No items suitable for an index found in this buffer$"
- "^This buffer cannot use `imenu-default-create-index-function'$"
- "^The mode `.*' does not support Imenu$"))
- (add-to-list 'debug-ignored-errors mess))
-
(provide 'imenu)
;;; imenu.el ends here
diff --git a/lisp/info.el b/lisp/info.el
index 042ff158362..367d9d0a9ef 100644
--- a/lisp/info.el
+++ b/lisp/info.el
@@ -1,6 +1,6 @@
;; info.el --- info package for Emacs
-;; Copyright (C) 1985-1986, 1992-2012 Free Software Foundation, Inc.
+;; Copyright (C) 1985-1986, 1992-2012 Free Software Foundation, Inc.
;; Maintainer: FSF
;; Keywords: help
@@ -683,6 +683,12 @@ See a list of available Info commands in `Info-mode'."
(info "emacs"))
;;;###autoload
+(defun info-emacs-bug ()
+ "Display the \"Reporting Bugs\" section of the Emacs manual in Info mode."
+ (interactive)
+ (info "(emacs)Bugs"))
+
+;;;###autoload
(defun info-standalone ()
"Run Emacs as a standalone Info reader.
Usage: emacs -f info-standalone [filename]
@@ -1071,7 +1077,7 @@ a case-insensitive match is tried."
(throw 'foo t))
;; No such anchor in tag table or node in tag table or file
- (error "No such node or anchor: %s" nodename))
+ (user-error "No such node or anchor: %s" nodename))
(Info-select-node)
(goto-char (point-min))
@@ -2012,8 +2018,8 @@ if ERRORNAME is nil, just return nil."
(concat name ":" (Info-following-node-name-re)) bound t)
(match-string-no-properties 1))
((not (eq errorname t))
- (error "Node has no %s"
- (capitalize (or errorname name)))))))))
+ (user-error "Node has no %s"
+ (capitalize (or errorname name)))))))))
(defun Info-following-node-name-re (&optional allowedchars)
"Return a regexp matching a node name.
@@ -2082,7 +2088,7 @@ If SAME-FILE is non-nil, do not move to a different Info file."
"Go back in the history to the last node visited."
(interactive)
(or Info-history
- (error "This is the first Info node you looked at"))
+ (user-error "This is the first Info node you looked at"))
(let ((history-forward
(cons (list Info-current-file Info-current-node (point))
Info-history-forward))
@@ -2102,7 +2108,7 @@ If SAME-FILE is non-nil, do not move to a different Info file."
"Go forward in the history of visited nodes."
(interactive)
(or Info-history-forward
- (error "This is the last Info node you looked at"))
+ (user-error "This is the last Info node you looked at"))
(let ((history-forward (cdr Info-history-forward))
filename nodename opoint)
(setq filename (car (car Info-history-forward)))
@@ -2388,7 +2394,7 @@ new buffer."
completions nil t)))
(list (if (equal input "")
default input) current-prefix-arg))
- (error "No cross-references in this node"))))
+ (user-error "No cross-references in this node"))))
(unless footnotename
(error "No reference was specified"))
@@ -2419,7 +2425,8 @@ new buffer."
(abs (- prev-ref (point))))
next-ref prev-ref))
((or next-ref prev-ref))
- ((error "No cross-reference named %s" footnotename))))
+ ((user-error "No cross-reference named %s"
+ footnotename))))
(setq target (Info-extract-menu-node-name t))))
(while (setq i (string-match "[ \t\n]+" target i))
(setq target (concat (substring target 0 i) " "
@@ -2564,7 +2571,7 @@ new buffer."
(save-excursion
(goto-char (point-min))
(if (not (search-forward "\n* menu:" nil t))
- (error "No menu in this node"))
+ (user-error "No menu in this node"))
(setq beg (point))
(and (< (point) p)
(save-excursion
@@ -2605,10 +2612,10 @@ new buffer."
(let ((case-fold-search t))
(goto-char (point-min))
(or (search-forward "\n* menu:" nil t)
- (error "No menu in this node"))
+ (user-error "No menu in this node"))
(or (re-search-forward (concat "\n\\* +" menu-item ":") nil t)
(re-search-forward (concat "\n\\* +" menu-item) nil t)
- (error "No such item in menu"))
+ (user-error "No such item in menu"))
(beginning-of-line)
(forward-char 2)
(Info-extract-menu-node-name nil (Info-index-node))))))
@@ -2624,7 +2631,7 @@ new buffer."
(match-beginning 0))))
(goto-char (point-min))
(or (search-forward "\n* menu:" bound t)
- (error "No menu in this node"))
+ (user-error "No menu in this node"))
(if count
(or (search-forward "\n* " bound t count)
(error "Too few items in menu"))
@@ -2696,7 +2703,7 @@ N is the digit argument used to invoke this command."
(if Info-history-skip-intermediate-nodes
(setq Info-history old-history)))))
(no-error nil)
- (t (error "No pointer forward from this node")))))
+ (t (user-error "No pointer forward from this node")))))
(defun Info-backward-node ()
"Go backward one node, considering all nodes as forming one sequence."
@@ -2705,7 +2712,7 @@ N is the digit argument used to invoke this command."
(upnode (Info-extract-pointer "up" t))
(case-fold-search t))
(cond ((and upnode (string-match "(" upnode))
- (error "First node in file"))
+ (user-error "First node in file"))
((and upnode (or (null prevnode)
;; Use string-equal, not equal,
;; to ignore text properties.
@@ -2723,7 +2730,7 @@ N is the digit argument used to invoke this command."
(if Info-history-skip-intermediate-nodes
(setq Info-history old-history))))
(t
- (error "No pointer backward from this node")))))
+ (user-error "No pointer backward from this node")))))
(defun Info-exit ()
"Exit Info by selecting some other buffer."
@@ -2744,7 +2751,7 @@ N is the digit argument used to invoke this command."
(and (search-forward "\n* " nil t)
(Info-extract-menu-node-name)))))
(if node (Info-goto-node node)
- (error "No more items in menu"))))
+ (user-error "No more items in menu"))))
(defun Info-last-menu-item ()
"Go to the node of the previous menu item."
@@ -2757,7 +2764,7 @@ N is the digit argument used to invoke this command."
(and (search-backward "\n* menu:" nil t)
(point)))))
(or (and beg (search-backward "\n* " beg t))
- (error "No previous items in menu")))
+ (user-error "No previous items in menu")))
(Info-goto-node (save-excursion
(goto-char (match-end 0))
(Info-extract-menu-node-name)))))
@@ -2782,7 +2789,7 @@ N is the digit argument used to invoke this command."
(if Info-history-skip-intermediate-nodes
(setq Info-history old-history))))
(t
- (error "No more nodes"))))
+ (user-error "No more nodes"))))
(defun Info-last-preorder ()
"Go to the last node, popping up a level if there is none."
@@ -2822,7 +2829,7 @@ N is the digit argument used to invoke this command."
(let ((case-fold-search t))
(or (search-forward "\n* Menu:" nil t)
(goto-char (point-max)))))
- (t (error "No previous nodes"))))
+ (t (user-error "No previous nodes"))))
(defun Info-scroll-up ()
"Scroll one screenful forward in Info, considering all nodes as one sequence.
@@ -2911,11 +2918,11 @@ See `Info-scroll-down'."
(or (re-search-forward pat nil t)
(progn
(goto-char old-pt)
- (error "No cross references in this node")))))
+ (user-error "No cross references in this node")))))
(goto-char (or (match-beginning 1) (match-beginning 0)))
(if (looking-at "\\* Menu:")
(if recur
- (error "No cross references in this node")
+ (user-error "No cross references in this node")
(Info-next-reference t))
(if (looking-at "^\\* ")
(forward-char 2)))))
@@ -2932,11 +2939,11 @@ See `Info-scroll-down'."
(or (re-search-backward pat nil t)
(progn
(goto-char old-pt)
- (error "No cross references in this node")))))
+ (user-error "No cross references in this node")))))
(goto-char (or (match-beginning 1) (match-beginning 0)))
(if (looking-at "\\* Menu:")
(if recur
- (error "No cross references in this node")
+ (user-error "No cross references in this node")
(Info-prev-reference t))
(if (looking-at "^\\* ")
(forward-char 2)))))
@@ -3107,7 +3114,7 @@ Give an empty topic name to go to the Index node itself."
(or matches
(progn
(Info-goto-node orignode)
- (error "No `%s' in index" topic)))
+ (user-error "No `%s' in index" topic)))
;; Here it is a feature that assoc is case-sensitive.
(while (setq found (assoc topic matches))
(setq exact (cons found exact)
@@ -3120,7 +3127,7 @@ Give an empty topic name to go to the Index node itself."
"Go to the next matching index item from the last \\<Info-mode-map>\\[Info-index] command."
(interactive "p")
(or Info-index-alternatives
- (error "No previous `i' command"))
+ (user-error "No previous `i' command"))
(while (< num 0)
(setq num (+ num (length Info-index-alternatives))))
(while (> num 0)
@@ -3640,7 +3647,7 @@ If FORK is a string, it is the name to use for the new buffer."
;; Don't raise an error when mouse-1 is bound to this - it's
;; often used to simply select the window or frame.
(eq 'mouse-1 (event-basic-type last-input-event)))
- (error "Point neither on reference nor in menu item description")))
+ (user-error "Point neither on reference nor in menu item description")))
;; Common subroutine.
(defun Info-try-follow-nearest-node (&optional fork)
@@ -3907,7 +3914,7 @@ The name of the Info file is prepended to the node name in parentheses.
With a zero prefix arg, put the name inside a function call to `info'."
(interactive "P")
(unless Info-current-node
- (error "No current Info node"))
+ (user-error "No current Info node"))
(let ((node (if (stringp Info-current-file)
(concat "(" (file-name-nondirectory Info-current-file) ") "
Info-current-node))))
@@ -4899,25 +4906,8 @@ BUFFER is the buffer speedbar is requesting buttons for."
(erase-buffer))
(Info-speedbar-hierarchy-buttons nil 0))
-(dolist (mess '("^First node in file$"
- "^No `.*' in index$"
- "^No cross-reference named"
- "^No cross.references in this node$"
- "^No current Info node$"
- "^No menu in this node$"
- "^No more items in menu$"
- "^No more nodes$"
- "^No pointer \\(?:forward\\|backward\\) from this node$"
- "^No previous `i' command$"
- "^No previous items in menu$"
- "^No previous nodes$"
- "^No such item in menu$"
- "^No such node or anchor"
- "^Node has no"
- "^Point neither on reference nor in menu item description$"
- "^This is the \\(?:first\\|last\\) Info node you looked at$"
- search-failed))
- (add-to-list 'debug-ignored-errors mess))
+;; FIXME: Really? Why here?
+(add-to-list 'debug-ignored-errors 'search-failed)
;;;; Desktop support
diff --git a/lisp/international/mule.el b/lisp/international/mule.el
index 1f88df52fd4..4d567a6e9d8 100644
--- a/lisp/international/mule.el
+++ b/lisp/international/mule.el
@@ -30,6 +30,7 @@
;;; Code:
+;; FIXME? Are these still relevant? Nothing uses them AFAICS.
(defconst mule-version "6.0 (HANACHIRUSATO)" "\
Version number and name of this version of MULE (multilingual environment).")
@@ -1835,6 +1836,8 @@ If nothing is specified, the return value is nil."
(re-search-forward
"\\(.*;\\)?[ \t]*unibyte:[ \t]*\\([^ ;]+\\)"
head-end t))
+ (display-warning 'mule "`unibyte: t' is obsolete; \
+use \"coding: 'raw-text\" instead." :warning)
(setq coding-system 'raw-text))
(when (and (not coding-system)
(re-search-forward
@@ -1887,6 +1890,8 @@ If nothing is specified, the return value is nil."
(goto-char pos)
(when (and set-auto-coding-for-load
(re-search-forward re-unibyte tail-end t))
+ (display-warning 'mule "`unibyte: t' is obsolete; \
+use \"coding: 'raw-text\" instead." :warning)
(setq coding-system 'raw-text))
(when (and (not coding-system)
(re-search-forward re-coding tail-end t))
diff --git a/lisp/isearch.el b/lisp/isearch.el
index 9d69443b6a4..7f68fb4ad32 100644
--- a/lisp/isearch.el
+++ b/lisp/isearch.el
@@ -1381,6 +1381,94 @@ Use `isearch-exit' to quit without signaling."
(sit-for 1)
(isearch-update))
+
+;; Word search
+
+(defun word-search-regexp (string &optional lax)
+ "Return a regexp which matches words, ignoring punctuation.
+Given STRING, a string of words separated by word delimiters,
+compute a regexp that matches those exact words separated by
+arbitrary punctuation. If LAX is non-nil, the end of the string
+need not match a word boundary unless it ends in whitespace.
+
+Used in `word-search-forward', `word-search-backward',
+`word-search-forward-lax', `word-search-backward-lax'."
+ (if (string-match-p "^\\W*$" string)
+ ""
+ (concat
+ "\\b"
+ (mapconcat 'identity (split-string string "\\W+" t) "\\W+")
+ (if (or (not lax) (string-match-p "\\W$" string)) "\\b"))))
+
+(defun word-search-backward (string &optional bound noerror count)
+ "Search backward from point for STRING, ignoring differences in punctuation.
+Set point to the beginning of the occurrence found, and return point.
+An optional second argument bounds the search; it is a buffer position.
+The match found must not extend before that position.
+Optional third argument, if t, means if fail just return nil (no error).
+ If not nil and not t, move to limit of search and return nil.
+Optional fourth argument is repeat count--search for successive occurrences.
+
+Relies on the function `word-search-regexp' to convert a sequence
+of words in STRING to a regexp used to search words without regard
+to punctuation."
+ (interactive "sWord search backward: ")
+ (re-search-backward (word-search-regexp string nil) bound noerror count))
+
+(defun word-search-forward (string &optional bound noerror count)
+ "Search forward from point for STRING, ignoring differences in punctuation.
+Set point to the end of the occurrence found, and return point.
+An optional second argument bounds the search; it is a buffer position.
+The match found must not extend after that position.
+Optional third argument, if t, means if fail just return nil (no error).
+ If not nil and not t, move to limit of search and return nil.
+Optional fourth argument is repeat count--search for successive occurrences.
+
+Relies on the function `word-search-regexp' to convert a sequence
+of words in STRING to a regexp used to search words without regard
+to punctuation."
+ (interactive "sWord search: ")
+ (re-search-forward (word-search-regexp string nil) bound noerror count))
+
+(defun word-search-backward-lax (string &optional bound noerror count)
+ "Search backward from point for STRING, ignoring differences in punctuation.
+Set point to the beginning of the occurrence found, and return point.
+
+Unlike `word-search-backward', the end of STRING need not match a word
+boundary, unless STRING ends in whitespace.
+
+An optional second argument bounds the search; it is a buffer position.
+The match found must not extend before that position.
+Optional third argument, if t, means if fail just return nil (no error).
+ If not nil and not t, move to limit of search and return nil.
+Optional fourth argument is repeat count--search for successive occurrences.
+
+Relies on the function `word-search-regexp' to convert a sequence
+of words in STRING to a regexp used to search words without regard
+to punctuation."
+ (interactive "sWord search backward: ")
+ (re-search-backward (word-search-regexp string t) bound noerror count))
+
+(defun word-search-forward-lax (string &optional bound noerror count)
+ "Search forward from point for STRING, ignoring differences in punctuation.
+Set point to the end of the occurrence found, and return point.
+
+Unlike `word-search-forward', the end of STRING need not match a word
+boundary, unless STRING ends in whitespace.
+
+An optional second argument bounds the search; it is a buffer position.
+The match found must not extend after that position.
+Optional third argument, if t, means if fail just return nil (no error).
+ If not nil and not t, move to limit of search and return nil.
+Optional fourth argument is repeat count--search for successive occurrences.
+
+Relies on the function `word-search-regexp' to convert a sequence
+of words in STRING to a regexp used to search words without regard
+to punctuation."
+ (interactive "sWord search: ")
+ (re-search-forward (word-search-regexp string t) bound noerror count))
+
+
(defun isearch-query-replace (&optional delimited regexp-flag)
"Start `query-replace' with string to replace from last search string.
The arg DELIMITED (prefix arg if interactive), if non-nil, means replace
diff --git a/lisp/iswitchb.el b/lisp/iswitchb.el
index 9600bd1db2d..6493a8f800c 100644
--- a/lisp/iswitchb.el
+++ b/lisp/iswitchb.el
@@ -372,9 +372,14 @@ See also `iswitchb-newbuffer'."
:type 'string
:group 'iswitchb)
-(defvar iswitchb-all-frames 'visible
- "Argument to pass to `walk-windows' when finding visible buffers.
-See documentation of `walk-windows' for useful values.")
+(defcustom iswitchb-all-frames 'visible
+ "Argument to pass to `walk-windows' when iswitchb is finding buffers.
+See documentation of `walk-windows' for useful values."
+ :type '(choice (const :tag "Selected frame only" nil)
+ (const :tag "All existing frames" t)
+ (const :tag "All visible frames" visible)
+ (const :tag "All frames on this terminal" 0))
+ :group 'iswitchb)
(defcustom iswitchb-minibuffer-setup-hook nil
"Iswitchb-specific customization of minibuffer setup.
diff --git a/lisp/kmacro.el b/lisp/kmacro.el
index b715e44387e..ffc97085a69 100644
--- a/lisp/kmacro.el
+++ b/lisp/kmacro.el
@@ -625,8 +625,10 @@ for details on how to adjust or disable this behavior.
To make a macro permanent so you can call it even after defining
others, use \\[kmacro-name-last-macro]."
(interactive "p")
- (let ((repeat-key (and (null no-repeat)
- (> (length (this-single-command-keys)) 1)
+ (let ((repeat-key (and (or (and (null no-repeat)
+ (> (length (this-single-command-keys)) 1))
+ ;; Used when we're in the process of repeating.
+ (eq no-repeat 'repeating))
last-input-event))
repeat-key-str)
(if end-macro
@@ -640,24 +642,16 @@ others, use \\[kmacro-name-last-macro]."
repeat-key
kmacro-call-repeat-key)))
(setq repeat-key-str (format-kbd-macro (vector repeat-key) nil))
- (while repeat-key
- ;; Issue a hint to the user, if the echo area isn't in use.
- (unless (current-message)
- (message "(Type %s to repeat macro%s)"
- repeat-key-str
- (if (and kmacro-call-repeat-with-arg
- arg (> arg 1))
- (format " %d times" arg) "")))
- (if (equal repeat-key (read-event))
- (progn
- (clear-this-command-keys t)
- (call-last-kbd-macro (and kmacro-call-repeat-with-arg arg)
- #'kmacro-loop-setup-function)
- (setq last-input-event nil))
- (setq repeat-key nil)))
- (when last-input-event
- (clear-this-command-keys t)
- (setq unread-command-events (list last-input-event))))))
+ ;; Can't use the `keep-pred' arg because this overlay keymap needs to be
+ ;; removed during the next run of the kmacro (i.e. we need to add&remove
+ ;; this overlay-map at each repetition).
+ (set-temporary-overlay-map
+ (let ((map (make-sparse-keymap)))
+ (define-key map (vector repeat-key)
+ `(lambda () (interactive)
+ (kmacro-call-macro ,(and kmacro-call-repeat-with-arg arg)
+ 'repeating)))
+ map)))))
;;; Combined function key bindings:
diff --git a/lisp/language/burmese.el b/lisp/language/burmese.el
index 9fce0583161..420e8d74919 100644
--- a/lisp/language/burmese.el
+++ b/lisp/language/burmese.el
@@ -1,4 +1,4 @@
-;;; burmese.el --- support for Burmese -*- coding: utf-8; no-byte-compile: t -*-
+;;; burmese.el --- support for Burmese -*- coding: utf-8 -*-
;; Copyright (C) 2008, 2009, 2010, 2011
;; National Institute of Advanced Industrial Science and Technology (AIST)
diff --git a/lisp/language/cham.el b/lisp/language/cham.el
index b2962fb2889..a025ff0d209 100644
--- a/lisp/language/cham.el
+++ b/lisp/language/cham.el
@@ -1,4 +1,4 @@
-;;; cham.el --- support for Cham -*- coding: utf-8; no-byte-compile: t -*-
+;;; cham.el --- support for Cham -*- coding: utf-8 -*-
;; Copyright (C) 2008, 2009, 2010, 2011, 2012
;; National Institute of Advanced Industrial Science and Technology (AIST)
diff --git a/lisp/language/czech.el b/lisp/language/czech.el
index 93f75694555..5bda5d1faa1 100644
--- a/lisp/language/czech.el
+++ b/lisp/language/czech.el
@@ -1,6 +1,6 @@
-;;; czech.el --- support for Czech -*- coding: iso-2022-7bit; no-byte-compile: t -*-
+;;; czech.el --- support for Czech -*- coding: iso-2022-7bit -*-
-;; Copyright (C) 1998, 2001-2012 Free Software Foundation, Inc.
+;; Copyright (C) 1998, 2001-2012 Free Software Foundation, Inc.
;; Author: Milan Zamazal <pdm@zamazal.org>
;; Maintainer: Pavel Jan,Am(Bk <Pavel@Janik.cz>
diff --git a/lisp/language/english.el b/lisp/language/english.el
index 6d106a5e070..4f4c6788cae 100644
--- a/lisp/language/english.el
+++ b/lisp/language/english.el
@@ -1,6 +1,6 @@
-;;; english.el --- support for English -*- no-byte-compile: t -*-
+;;; english.el --- support for English
-;; Copyright (C) 1997, 2001-2012 Free Software Foundation, Inc.
+;; Copyright (C) 1997, 2001-2012 Free Software Foundation, Inc.
;; Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
;; 2006, 2007, 2008, 2009, 2010, 2011
;; National Institute of Advanced Industrial Science and Technology (AIST)
diff --git a/lisp/language/georgian.el b/lisp/language/georgian.el
index fcbd395e131..a410a722db3 100644
--- a/lisp/language/georgian.el
+++ b/lisp/language/georgian.el
@@ -1,6 +1,6 @@
-;;; georgian.el --- language support for Georgian -*- no-byte-compile: t -*-
+;;; georgian.el --- language support for Georgian
-;; Copyright (C) 2001-2012 Free Software Foundation, Inc.
+;; Copyright (C) 2001-2012 Free Software Foundation, Inc.
;; Author: Dave Love <fx@gnu.org>
;; Keywords: i18n
diff --git a/lisp/language/greek.el b/lisp/language/greek.el
index e4d239cdf27..1c8330936c9 100644
--- a/lisp/language/greek.el
+++ b/lisp/language/greek.el
@@ -1,4 +1,4 @@
-;;; greek.el --- support for Greek -*- no-byte-compile: t -*-
+;;; greek.el --- support for Greek
;; Copyright (C) 2002 Free Software Foundation, Inc.
;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
diff --git a/lisp/language/japanese.el b/lisp/language/japanese.el
index 256263edbb3..83c8fcf66c9 100644
--- a/lisp/language/japanese.el
+++ b/lisp/language/japanese.el
@@ -1,6 +1,6 @@
-;;; japanese.el --- support for Japanese -*- coding: iso-2022-7bit; no-byte-compile: t -*-
+;;; japanese.el --- support for Japanese -*- coding: iso-2022-7bit -*-
-;; Copyright (C) 1997, 2001-2012 Free Software Foundation, Inc.
+;; Copyright (C) 1997, 2001-2012 Free Software Foundation, Inc.
;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
;; 2005, 2006, 2007, 2008, 2009, 2010, 2011
;; National Institute of Advanced Industrial Science and Technology (AIST)
diff --git a/lisp/language/khmer.el b/lisp/language/khmer.el
index d01fa3b33bd..8663ff22ca0 100644
--- a/lisp/language/khmer.el
+++ b/lisp/language/khmer.el
@@ -1,4 +1,4 @@
-;;; khmer.el --- support for Khmer -*- coding: utf-8; no-byte-compile: t -*-
+;;; khmer.el --- support for Khmer -*- coding: utf-8 -*-
;; Copyright (C) 2008, 2009, 2010, 2011
;; National Institute of Advanced Industrial Science and Technology (AIST)
diff --git a/lisp/language/korean.el b/lisp/language/korean.el
index 9f93f76a74e..711d24a5b00 100644
--- a/lisp/language/korean.el
+++ b/lisp/language/korean.el
@@ -1,6 +1,6 @@
-;;; korean.el --- support for Korean -*- coding: iso-2022-7bit; no-byte-compile: t -*-
+;;; korean.el --- support for Korean -*- coding: iso-2022-7bit -*-
-;; Copyright (C) 1998, 2001-2012 Free Software Foundation, Inc.
+;; Copyright (C) 1998, 2001-2012 Free Software Foundation, Inc.
;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
;; 2005, 2006, 2007, 2008, 2009, 2010, 2011
;; National Institute of Advanced Industrial Science and Technology (AIST)
diff --git a/lisp/language/lao.el b/lisp/language/lao.el
index 28449bad071..6a0d431f3ec 100644
--- a/lisp/language/lao.el
+++ b/lisp/language/lao.el
@@ -1,6 +1,6 @@
-;;; lao.el --- support for Lao -*- coding: utf-8; no-byte-compile: t -*-
+;;; lao.el --- support for Lao -*- coding: utf-8 -*-
-;; Copyright (C) 2001-2012 Free Software Foundation, Inc.
+;; Copyright (C) 2001-2012 Free Software Foundation, Inc.
;; Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
;; 2007, 2008, 2009, 2010, 2011
;; National Institute of Advanced Industrial Science and Technology (AIST)
diff --git a/lisp/language/misc-lang.el b/lisp/language/misc-lang.el
index 6fa54ff5c80..1286b361892 100644
--- a/lisp/language/misc-lang.el
+++ b/lisp/language/misc-lang.el
@@ -1,4 +1,4 @@
-;;; misc-lang.el --- support for miscellaneous languages (characters) -*- no-byte-compile: t -*-
+;;; misc-lang.el --- support for miscellaneous languages (characters)
;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
;; 2005, 2006, 2007, 2008, 2009, 2010, 2011
diff --git a/lisp/language/romanian.el b/lisp/language/romanian.el
index 75483917a3b..ff5db222bd2 100644
--- a/lisp/language/romanian.el
+++ b/lisp/language/romanian.el
@@ -1,6 +1,6 @@
-;;; romanian.el --- support for Romanian -*- coding: iso-latin-2; no-byte-compile: t -*-
+;;; romanian.el --- support for Romanian -*- coding: iso-latin-2 -*-
-;; Copyright (C) 1998, 2001-2012 Free Software Foundation, Inc.
+;; Copyright (C) 1998, 2001-2012 Free Software Foundation, Inc.
;; Author: Dan Nicolaescu <done@ece.arizona.edu>
;; Keywords: multilingual, Romanian, i18n
diff --git a/lisp/language/sinhala.el b/lisp/language/sinhala.el
index ea8a6a34cd8..037d753f52a 100644
--- a/lisp/language/sinhala.el
+++ b/lisp/language/sinhala.el
@@ -1,4 +1,4 @@
-;;; sinhala.el --- support for Sinhala -*- coding: utf-8; no-byte-compile: t -*-
+;;; sinhala.el --- support for Sinhala -*- coding: utf-8 -*-
;; Copyright (C) 2008, 2009, 2010, 2011
;; National Institute of Advanced Industrial Science and Technology (AIST)
diff --git a/lisp/language/slovak.el b/lisp/language/slovak.el
index b17dab8e315..27e43fa22cf 100644
--- a/lisp/language/slovak.el
+++ b/lisp/language/slovak.el
@@ -1,6 +1,6 @@
-;;; slovak.el --- support for Slovak -*- coding: iso-2022-7bit; no-byte-compile: t -*-
+;;; slovak.el --- support for Slovak -*- coding: iso-2022-7bit -*-
-;; Copyright (C) 1998, 2001-2012 Free Software Foundation, Inc.
+;; Copyright (C) 1998, 2001-2012 Free Software Foundation, Inc.
;; Authors: Tibor ,B)(Bimko <tibor.simko@fmph.uniba.sk>,
;; Milan Zamazal <pdm@zamazal.org>
diff --git a/lisp/language/tai-viet.el b/lisp/language/tai-viet.el
index f8b7a9d6df8..496453f6502 100644
--- a/lisp/language/tai-viet.el
+++ b/lisp/language/tai-viet.el
@@ -1,6 +1,6 @@
-;;; tai-viet.el --- support for Tai Viet -*- coding: utf-8; no-byte-compile: t -*-
+;;; tai-viet.el --- support for Tai Viet -*- coding: utf-8 -*-
-;; Copyright (C) 2007-2012 Free Software Foundation, Inc.
+;; Copyright (C) 2007-2012 Free Software Foundation, Inc.
;; Copyright (C) 2007, 2008, 2009, 2010, 2011
;; National Institute of Advanced Industrial Science and Technology (AIST)
;; Registration Number H13PRO009
diff --git a/lisp/language/thai.el b/lisp/language/thai.el
index 9bebe6ef185..c7522f94ec8 100644
--- a/lisp/language/thai.el
+++ b/lisp/language/thai.el
@@ -1,6 +1,6 @@
-;;; thai.el --- support for Thai -*- coding: iso-2022-7bit; no-byte-compile: t -*-
+;;; thai.el --- support for Thai -*- coding: iso-2022-7bit -*-
-;; Copyright (C) 1997-1998, 2000-2012 Free Software Foundation, Inc.
+;; Copyright (C) 1997-1998, 2000-2012 Free Software Foundation, Inc.
;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
;; 2005, 2006, 2007, 2008, 2009, 2010, 2011
;; National Institute of Advanced Industrial Science and Technology (AIST)
diff --git a/lisp/language/utf-8-lang.el b/lisp/language/utf-8-lang.el
index eb0828694d4..e0313870323 100644
--- a/lisp/language/utf-8-lang.el
+++ b/lisp/language/utf-8-lang.el
@@ -1,6 +1,6 @@
-;;; utf-8-lang.el --- generic UTF-8 language environment -*- no-byte-compile: t -*-
+;;; utf-8-lang.el --- generic UTF-8 language environment
-;; Copyright (C) 2001-2012 Free Software Foundation, Inc.
+;; Copyright (C) 2001-2012 Free Software Foundation, Inc.
;; Author: Dave Love <fx@gnu.org>
;; Keywords: i18n
diff --git a/lisp/ldefs-boot.el b/lisp/ldefs-boot.el
index 347adb98fd0..7d2372a0ff6 100644
--- a/lisp/ldefs-boot.el
+++ b/lisp/ldefs-boot.el
@@ -5,7 +5,7 @@
;;;### (autoloads (5x5-crack 5x5-crack-xor-mutate 5x5-crack-mutating-best
;;;;;; 5x5-crack-mutating-current 5x5-crack-randomly 5x5) "5x5"
-;;;;;; "play/5x5.el" (20309 60936))
+;;;;;; "play/5x5.el" (20229 56251))
;;; Generated autoloads from play/5x5.el
(autoload '5x5 "5x5" "\
@@ -68,7 +68,7 @@ should return a grid vector array that is the new solution.
;;;***
;;;### (autoloads (ada-mode ada-add-extensions) "ada-mode" "progmodes/ada-mode.el"
-;;;;;; (20341 24416))
+;;;;;; (20355 835))
;;; Generated autoloads from progmodes/ada-mode.el
(autoload 'ada-add-extensions "ada-mode" "\
@@ -88,7 +88,7 @@ Ada mode is the major mode for editing Ada code.
;;;***
;;;### (autoloads (ada-header) "ada-stmt" "progmodes/ada-stmt.el"
-;;;;;; (20309 60936))
+;;;;;; (20229 56251))
;;; Generated autoloads from progmodes/ada-stmt.el
(autoload 'ada-header "ada-stmt" "\
@@ -99,7 +99,7 @@ Insert a descriptive header at the top of the file.
;;;***
;;;### (autoloads (ada-find-file) "ada-xref" "progmodes/ada-xref.el"
-;;;;;; (20309 60936))
+;;;;;; (20355 835))
;;; Generated autoloads from progmodes/ada-xref.el
(autoload 'ada-find-file "ada-xref" "\
@@ -114,7 +114,7 @@ Completion is available.
;;;;;; add-change-log-entry-other-window add-change-log-entry find-change-log
;;;;;; prompt-for-change-log-name add-log-mailing-address add-log-full-name
;;;;;; add-log-current-defun-function) "add-log" "vc/add-log.el"
-;;;;;; (20309 60936))
+;;;;;; (20355 835))
;;; Generated autoloads from vc/add-log.el
(put 'change-log-default-name 'safe-local-variable 'string-or-null-p)
@@ -214,13 +214,13 @@ Runs `change-log-mode-hook'.
\(fn)" t nil)
(defvar add-log-lisp-like-modes '(emacs-lisp-mode lisp-mode scheme-mode dsssl-mode lisp-interaction-mode) "\
-*Modes that look like Lisp to `add-log-current-defun'.")
+Modes that look like Lisp to `add-log-current-defun'.")
(defvar add-log-c-like-modes '(c-mode c++-mode c++-c-mode objc-mode) "\
-*Modes that look like C to `add-log-current-defun'.")
+Modes that look like C to `add-log-current-defun'.")
(defvar add-log-tex-like-modes '(TeX-mode plain-TeX-mode LaTeX-mode tex-mode) "\
-*Modes that look like TeX to `add-log-current-defun'.")
+Modes that look like TeX to `add-log-current-defun'.")
(autoload 'add-log-current-defun "add-log" "\
Return name of function definition point is in, or nil.
@@ -253,7 +253,7 @@ old-style time formats for entries are supported.
;;;### (autoloads (defadvice ad-activate ad-add-advice ad-disable-advice
;;;;;; ad-enable-advice ad-default-compilation-action ad-redefinition-action)
-;;;;;; "advice" "emacs-lisp/advice.el" (20309 60936))
+;;;;;; "advice" "emacs-lisp/advice.el" (20280 8018))
;;; Generated autoloads from emacs-lisp/advice.el
(defvar ad-redefinition-action 'warn "\
@@ -398,7 +398,7 @@ usage: (defadvice FUNCTION (CLASS NAME [POSITION] [ARGLIST] FLAG...)
;;;### (autoloads (align-newline-and-indent align-unhighlight-rule
;;;;;; align-highlight-rule align-current align-entire align-regexp
-;;;;;; align) "align" "align.el" (20309 60936))
+;;;;;; align) "align" "align.el" (20229 56251))
;;; Generated autoloads from align.el
(autoload 'align "align" "\
@@ -489,7 +489,7 @@ A replacement function for `newline-and-indent', aligning as it goes.
;;;### (autoloads (outlineify-sticky allout-mode allout-mode-p allout-auto-activation
;;;;;; allout-setup allout-auto-activation-helper) "allout" "allout.el"
-;;;;;; (20309 60936))
+;;;;;; (20400 16870))
;;; Generated autoloads from allout.el
(autoload 'allout-auto-activation-helper "allout" "\
@@ -746,10 +746,10 @@ without changes to the allout core. Here are key ones:
`allout-mode-hook'
`allout-mode-deactivate-hook' (deprecated)
`allout-mode-off-hook'
-`allout-exposure-change-hook'
-`allout-structure-added-hook'
-`allout-structure-deleted-hook'
-`allout-structure-shifted-hook'
+`allout-exposure-change-functions'
+`allout-structure-added-functions'
+`allout-structure-deleted-functions'
+`allout-structure-shifted-functions'
`allout-after-copy-or-kill-hook'
`allout-post-undo-hook'
@@ -850,7 +850,7 @@ for details on preparing Emacs for automatic allout activation.
;;;### (autoloads (allout-widgets-mode allout-widgets-auto-activation
;;;;;; allout-widgets-setup allout-widgets) "allout-widgets" "allout-widgets.el"
-;;;;;; (20309 60936))
+;;;;;; (20387 12783))
;;; Generated autoloads from allout-widgets.el
(let ((loads (get 'allout-widgets 'custom-loads))) (if (member '"allout-widgets" loads) nil (put 'allout-widgets 'custom-loads (cons '"allout-widgets" loads))))
@@ -910,7 +910,7 @@ outline hot-spot navigation (see `allout-mode').
;;;***
;;;### (autoloads (ange-ftp-hook-function ange-ftp-reread-dir) "ange-ftp"
-;;;;;; "net/ange-ftp.el" (20309 60936))
+;;;;;; "net/ange-ftp.el" (20373 62846))
;;; Generated autoloads from net/ange-ftp.el
(defalias 'ange-ftp-re-read-dir 'ange-ftp-reread-dir)
@@ -932,7 +932,7 @@ directory, so that Emacs will know its current contents.
;;;***
;;;### (autoloads (animate-birthday-present animate-sequence animate-string)
-;;;;;; "animate" "play/animate.el" (20309 60936))
+;;;;;; "animate" "play/animate.el" (20355 835))
;;; Generated autoloads from play/animate.el
(autoload 'animate-string "animate" "\
@@ -965,7 +965,7 @@ the buffer *Birthday-Present-for-Name*.
;;;***
;;;### (autoloads (ansi-color-process-output ansi-color-for-comint-mode-on)
-;;;;;; "ansi-color" "ansi-color.el" (20309 60936))
+;;;;;; "ansi-color" "ansi-color.el" (20395 5351))
;;; Generated autoloads from ansi-color.el
(autoload 'ansi-color-for-comint-mode-on "ansi-color" "\
@@ -991,7 +991,7 @@ This is a good function to put in `comint-output-filter-functions'.
;;;***
;;;### (autoloads (antlr-set-tabs antlr-mode antlr-show-makefile-rules)
-;;;;;; "antlr-mode" "progmodes/antlr-mode.el" (20309 60936))
+;;;;;; "antlr-mode" "progmodes/antlr-mode.el" (20355 835))
;;; Generated autoloads from progmodes/antlr-mode.el
(autoload 'antlr-show-makefile-rules "antlr-mode" "\
@@ -1027,7 +1027,7 @@ Used in `antlr-mode'. Also a useful function in `java-mode-hook'.
;;;***
;;;### (autoloads (appt-activate appt-add) "appt" "calendar/appt.el"
-;;;;;; (20309 60936))
+;;;;;; (20229 56251))
;;; Generated autoloads from calendar/appt.el
(autoload 'appt-add "appt" "\
@@ -1050,7 +1050,7 @@ ARG is positive, otherwise off.
;;;### (autoloads (apropos-documentation apropos-value apropos-library
;;;;;; apropos apropos-documentation-property apropos-command apropos-variable
-;;;;;; apropos-read-pattern) "apropos" "apropos.el" (20309 60936))
+;;;;;; apropos-read-pattern) "apropos" "apropos.el" (20373 62846))
;;; Generated autoloads from apropos.el
(autoload 'apropos-read-pattern "apropos" "\
@@ -1158,8 +1158,8 @@ Returns list of symbols and documentation found.
;;;***
-;;;### (autoloads (archive-mode) "arc-mode" "arc-mode.el" (20309
-;;;;;; 60936))
+;;;### (autoloads (archive-mode) "arc-mode" "arc-mode.el" (20389
+;;;;;; 6410))
;;; Generated autoloads from arc-mode.el
(autoload 'archive-mode "arc-mode" "\
@@ -1179,7 +1179,7 @@ archive.
;;;***
-;;;### (autoloads (array-mode) "array" "array.el" (20309 60936))
+;;;### (autoloads (array-mode) "array" "array.el" (20229 56251))
;;; Generated autoloads from array.el
(autoload 'array-mode "array" "\
@@ -1250,13 +1250,13 @@ Entering array mode calls the function `array-mode-hook'.
;;;***
-;;;### (autoloads (artist-mode) "artist" "textmodes/artist.el" (20328
-;;;;;; 17454))
+;;;### (autoloads (artist-mode) "artist" "textmodes/artist.el" (20357
+;;;;;; 51632))
;;; Generated autoloads from textmodes/artist.el
(autoload 'artist-mode "artist" "\
Toggle Artist mode.
-With argument STATE, turn Artist mode on if STATE is positive.
+With argument ARG, turn Artist mode on if ARG is positive.
Artist lets you draw lines, squares, rectangles and poly-lines,
ellipses and circles with your mouse and/or keyboard.
@@ -1445,20 +1445,19 @@ Variables
Hooks
- When entering artist-mode, the hook `artist-mode-init-hook' is called.
- When quitting artist-mode, the hook `artist-mode-exit-hook' is called.
+ Turning the mode on or off runs `artist-mode-hook'.
Keymap summary
\\{artist-mode-map}
-\(fn &optional STATE)" t nil)
+\(fn &optional ARG)" t nil)
;;;***
-;;;### (autoloads (asm-mode) "asm-mode" "progmodes/asm-mode.el" (20309
-;;;;;; 60936))
+;;;### (autoloads (asm-mode) "asm-mode" "progmodes/asm-mode.el" (20355
+;;;;;; 835))
;;; Generated autoloads from progmodes/asm-mode.el
(autoload 'asm-mode "asm-mode" "\
@@ -1486,7 +1485,7 @@ Special commands:
;;;***
;;;### (autoloads (auth-source-cache-expiry) "auth-source" "gnus/auth-source.el"
-;;;;;; (20332 33075))
+;;;;;; (20382 62774))
;;; Generated autoloads from gnus/auth-source.el
(defvar auth-source-cache-expiry 7200 "\
@@ -1499,7 +1498,7 @@ let-binding.")
;;;***
;;;### (autoloads (autoarg-kp-mode autoarg-mode) "autoarg" "autoarg.el"
-;;;;;; (20309 60936))
+;;;;;; (20229 56251))
;;; Generated autoloads from autoarg.el
(defvar autoarg-mode nil "\
@@ -1560,7 +1559,7 @@ This is similar to `autoarg-mode' but rebinds the keypad keys
;;;***
;;;### (autoloads (autoconf-mode) "autoconf" "progmodes/autoconf.el"
-;;;;;; (20309 60936))
+;;;;;; (20229 56251))
;;; Generated autoloads from progmodes/autoconf.el
(autoload 'autoconf-mode "autoconf" "\
@@ -1571,7 +1570,7 @@ Major mode for editing Autoconf configure.in files.
;;;***
;;;### (autoloads (auto-insert-mode define-auto-insert auto-insert)
-;;;;;; "autoinsert" "autoinsert.el" (20309 60936))
+;;;;;; "autoinsert" "autoinsert.el" (20389 6410))
;;; Generated autoloads from autoinsert.el
(autoload 'auto-insert "autoinsert" "\
@@ -1611,7 +1610,7 @@ insert a template for the file depending on the mode of the buffer.
;;;### (autoloads (batch-update-autoloads update-directory-autoloads
;;;;;; update-file-autoloads) "autoload" "emacs-lisp/autoload.el"
-;;;;;; (20309 60936))
+;;;;;; (20405 42495))
;;; Generated autoloads from emacs-lisp/autoload.el
(put 'generated-autoload-file 'safe-local-variable 'stringp)
@@ -1662,7 +1661,7 @@ should be non-nil).
;;;### (autoloads (global-auto-revert-mode turn-on-auto-revert-tail-mode
;;;;;; auto-revert-tail-mode turn-on-auto-revert-mode auto-revert-mode)
-;;;;;; "autorevert" "autorevert.el" (20317 24654))
+;;;;;; "autorevert" "autorevert.el" (20373 62846))
;;; Generated autoloads from autorevert.el
(autoload 'auto-revert-mode "autorevert" "\
@@ -1751,7 +1750,7 @@ specifies in the mode line.
;;;***
;;;### (autoloads (mouse-avoidance-mode mouse-avoidance-mode) "avoid"
-;;;;;; "avoid.el" (20309 60936))
+;;;;;; "avoid.el" (20370 4296))
;;; Generated autoloads from avoid.el
(defvar mouse-avoidance-mode nil "\
@@ -1792,7 +1791,7 @@ definition of \"random distance\".)
;;;***
;;;### (autoloads (display-battery-mode battery) "battery" "battery.el"
-;;;;;; (20309 60936))
+;;;;;; (20370 4296))
;;; Generated autoloads from battery.el
(put 'battery-mode-line-string 'risky-local-variable t)
@@ -1828,7 +1827,7 @@ seconds.
;;;***
;;;### (autoloads (benchmark benchmark-run-compiled benchmark-run)
-;;;;;; "benchmark" "emacs-lisp/benchmark.el" (20309 60936))
+;;;;;; "benchmark" "emacs-lisp/benchmark.el" (20229 56251))
;;; Generated autoloads from emacs-lisp/benchmark.el
(autoload 'benchmark-run "benchmark" "\
@@ -1861,7 +1860,7 @@ For non-interactive use see also `benchmark-run' and
;;;***
;;;### (autoloads (bibtex-search-entry bibtex-mode bibtex-initialize)
-;;;;;; "bibtex" "textmodes/bibtex.el" (20309 60936))
+;;;;;; "bibtex" "textmodes/bibtex.el" (20355 835))
;;; Generated autoloads from textmodes/bibtex.el
(autoload 'bibtex-initialize "bibtex" "\
@@ -1950,7 +1949,7 @@ A prefix arg negates the value of `bibtex-search-entry-globally'.
;;;***
;;;### (autoloads (bibtex-style-mode) "bibtex-style" "textmodes/bibtex-style.el"
-;;;;;; (20309 60936))
+;;;;;; (20229 56251))
;;; Generated autoloads from textmodes/bibtex-style.el
(autoload 'bibtex-style-mode "bibtex-style" "\
@@ -1962,7 +1961,7 @@ Major mode for editing BibTeX style files.
;;;### (autoloads (binhex-decode-region binhex-decode-region-external
;;;;;; binhex-decode-region-internal) "binhex" "mail/binhex.el"
-;;;;;; (20309 60936))
+;;;;;; (20355 835))
;;; Generated autoloads from mail/binhex.el
(defconst binhex-begin-line "^:...............................................................$" "\
@@ -1986,8 +1985,8 @@ Binhex decode region between START and END.
;;;***
-;;;### (autoloads (blackbox) "blackbox" "play/blackbox.el" (20309
-;;;;;; 60936))
+;;;### (autoloads (blackbox) "blackbox" "play/blackbox.el" (20229
+;;;;;; 56251))
;;; Generated autoloads from play/blackbox.el
(autoload 'blackbox "blackbox" "\
@@ -2110,7 +2109,7 @@ a reflection.
;;;;;; bookmark-save bookmark-write bookmark-delete bookmark-insert
;;;;;; bookmark-rename bookmark-insert-location bookmark-relocate
;;;;;; bookmark-jump-other-window bookmark-jump bookmark-set) "bookmark"
-;;;;;; "bookmark.el" (20309 60936))
+;;;;;; "bookmark.el" (20400 16870))
;;; Generated autoloads from bookmark.el
(define-key ctl-x-r-map "b" 'bookmark-jump)
(define-key ctl-x-r-map "m" 'bookmark-set)
@@ -2311,7 +2310,7 @@ Incremental search of bookmarks, hiding the non-matches as we go.
;;;;;; browse-url-xdg-open browse-url-at-mouse browse-url-at-point
;;;;;; browse-url browse-url-of-region browse-url-of-dired-file
;;;;;; browse-url-of-buffer browse-url-of-file browse-url-browser-function)
-;;;;;; "browse-url" "net/browse-url.el" (20309 60936))
+;;;;;; "browse-url" "net/browse-url.el" (20395 5351))
;;; Generated autoloads from net/browse-url.el
(defvar browse-url-browser-function 'browse-url-default-browser "\
@@ -2626,24 +2625,8 @@ from `browse-url-elinks-wrapper'.
;;;***
-;;;### (autoloads (snarf-bruces bruce) "bruce" "play/bruce.el" (20309
-;;;;;; 60936))
-;;; Generated autoloads from play/bruce.el
-
-(autoload 'bruce "bruce" "\
-Adds that special touch of class to your outgoing mail.
-
-\(fn)" t nil)
-
-(autoload 'snarf-bruces "bruce" "\
-Return a vector containing the lines from `bruce-phrases-file'.
-
-\(fn)" nil nil)
-
-;;;***
-
;;;### (autoloads (bs-show bs-customize bs-cycle-previous bs-cycle-next)
-;;;;;; "bs" "bs.el" (20309 60936))
+;;;;;; "bs" "bs.el" (20370 4296))
;;; Generated autoloads from bs.el
(autoload 'bs-cycle-next "bs" "\
@@ -2683,7 +2666,7 @@ name of buffer configuration.
;;;***
-;;;### (autoloads (bubbles) "bubbles" "play/bubbles.el" (20309 60936))
+;;;### (autoloads (bubbles) "bubbles" "play/bubbles.el" (20229 56251))
;;; Generated autoloads from play/bubbles.el
(autoload 'bubbles "bubbles" "\
@@ -2705,7 +2688,7 @@ columns on its right towards the left.
;;;***
;;;### (autoloads (bug-reference-prog-mode bug-reference-mode) "bug-reference"
-;;;;;; "progmodes/bug-reference.el" (20309 60936))
+;;;;;; "progmodes/bug-reference.el" (20229 56251))
;;; Generated autoloads from progmodes/bug-reference.el
(put 'bug-reference-url-format 'safe-local-variable (lambda (s) (or (stringp s) (and (symbolp s) (get s 'bug-reference-url-format)))))
@@ -2729,7 +2712,7 @@ Like `bug-reference-mode', but only buttonize in comments and strings.
;;;;;; batch-byte-compile-if-not-done display-call-tree byte-compile
;;;;;; compile-defun byte-compile-file byte-recompile-directory
;;;;;; byte-force-recompile byte-compile-enable-warning byte-compile-disable-warning)
-;;;;;; "bytecomp" "emacs-lisp/bytecomp.el" (20341 24416))
+;;;;;; "bytecomp" "emacs-lisp/bytecomp.el" (20387 12783))
;;; Generated autoloads from emacs-lisp/bytecomp.el
(put 'byte-compile-dynamic 'safe-local-variable 'booleanp)
(put 'byte-compile-disable-print-circle 'safe-local-variable 'booleanp)
@@ -2849,8 +2832,8 @@ and corresponding effects.
;;;***
-;;;### (autoloads nil "cal-china" "calendar/cal-china.el" (20309
-;;;;;; 60936))
+;;;### (autoloads nil "cal-china" "calendar/cal-china.el" (20229
+;;;;;; 56251))
;;; Generated autoloads from calendar/cal-china.el
(put 'calendar-chinese-time-zone 'risky-local-variable t)
@@ -2859,7 +2842,7 @@ and corresponding effects.
;;;***
-;;;### (autoloads nil "cal-dst" "calendar/cal-dst.el" (20309 60936))
+;;;### (autoloads nil "cal-dst" "calendar/cal-dst.el" (20229 56251))
;;; Generated autoloads from calendar/cal-dst.el
(put 'calendar-daylight-savings-starts 'risky-local-variable t)
@@ -2871,7 +2854,7 @@ and corresponding effects.
;;;***
;;;### (autoloads (calendar-hebrew-list-yahrzeits) "cal-hebrew" "calendar/cal-hebrew.el"
-;;;;;; (20309 60936))
+;;;;;; (20286 28414))
;;; Generated autoloads from calendar/cal-hebrew.el
(autoload 'calendar-hebrew-list-yahrzeits "cal-hebrew" "\
@@ -2887,8 +2870,8 @@ from the cursor position.
;;;### (autoloads (defmath calc-embedded-activate calc-embedded calc-grab-rectangle
;;;;;; calc-grab-region full-calc-keypad calc-keypad calc-eval quick-calc
-;;;;;; full-calc calc calc-dispatch) "calc" "calc/calc.el" (20309
-;;;;;; 60936))
+;;;;;; full-calc calc calc-dispatch) "calc" "calc/calc.el" (20373
+;;;;;; 62846))
;;; Generated autoloads from calc/calc.el
(define-key ctl-x-map "*" 'calc-dispatch)
@@ -2972,8 +2955,8 @@ See Info node `(calc)Defining Functions'.
;;;***
-;;;### (autoloads (calc-undo) "calc-undo" "calc/calc-undo.el" (20309
-;;;;;; 60936))
+;;;### (autoloads (calc-undo) "calc-undo" "calc/calc-undo.el" (20229
+;;;;;; 56251))
;;; Generated autoloads from calc/calc-undo.el
(autoload 'calc-undo "calc-undo" "\
@@ -2983,8 +2966,8 @@ See Info node `(calc)Defining Functions'.
;;;***
-;;;### (autoloads (calculator) "calculator" "calculator.el" (20309
-;;;;;; 60936))
+;;;### (autoloads (calculator) "calculator" "calculator.el" (20229
+;;;;;; 56251))
;;; Generated autoloads from calculator.el
(autoload 'calculator "calculator" "\
@@ -2995,8 +2978,8 @@ See the documentation for `calculator-mode' for more information.
;;;***
-;;;### (autoloads (calendar) "calendar" "calendar/calendar.el" (20343
-;;;;;; 47906))
+;;;### (autoloads (calendar) "calendar" "calendar/calendar.el" (20389
+;;;;;; 6410))
;;; Generated autoloads from calendar/calendar.el
(autoload 'calendar "calendar" "\
@@ -3040,7 +3023,7 @@ This function is suitable for execution in a .emacs file.
;;;***
;;;### (autoloads (canlock-verify canlock-insert-header) "canlock"
-;;;;;; "gnus/canlock.el" (20309 60936))
+;;;;;; "gnus/canlock.el" (20229 56251))
;;; Generated autoloads from gnus/canlock.el
(autoload 'canlock-insert-header "canlock" "\
@@ -3058,7 +3041,7 @@ it fails.
;;;***
;;;### (autoloads (capitalized-words-mode) "cap-words" "progmodes/cap-words.el"
-;;;;;; (20309 60936))
+;;;;;; (20229 56251))
;;; Generated autoloads from progmodes/cap-words.el
(autoload 'capitalized-words-mode "cap-words" "\
@@ -3097,15 +3080,15 @@ Obsoletes `c-forward-into-nomenclature'.
;;;***
-;;;### (autoloads nil "cc-compat" "progmodes/cc-compat.el" (20309
-;;;;;; 60936))
+;;;### (autoloads nil "cc-compat" "progmodes/cc-compat.el" (20229
+;;;;;; 56251))
;;; Generated autoloads from progmodes/cc-compat.el
(put 'c-indent-level 'safe-local-variable 'integerp)
;;;***
;;;### (autoloads (c-guess-basic-syntax) "cc-engine" "progmodes/cc-engine.el"
-;;;;;; (20324 28875))
+;;;;;; (20373 62846))
;;; Generated autoloads from progmodes/cc-engine.el
(autoload 'c-guess-basic-syntax "cc-engine" "\
@@ -3117,7 +3100,7 @@ Return the syntactic context of the current line.
;;;### (autoloads (c-guess-install c-guess-region-no-install c-guess-region
;;;;;; c-guess-buffer-no-install c-guess-buffer c-guess-no-install
-;;;;;; c-guess) "cc-guess" "progmodes/cc-guess.el" (20309 60936))
+;;;;;; c-guess) "cc-guess" "progmodes/cc-guess.el" (20280 8018))
;;; Generated autoloads from progmodes/cc-guess.el
(defvar c-guess-guessed-offsets-alist nil "\
@@ -3217,7 +3200,7 @@ the absolute file name of the file if STYLE-NAME is nil.
;;;### (autoloads (awk-mode pike-mode idl-mode java-mode objc-mode
;;;;;; c++-mode c-mode c-initialize-cc-mode) "cc-mode" "progmodes/cc-mode.el"
-;;;;;; (20324 28875))
+;;;;;; (20370 4296))
;;; Generated autoloads from progmodes/cc-mode.el
(autoload 'c-initialize-cc-mode "cc-mode" "\
@@ -3394,7 +3377,7 @@ Key bindings:
;;;***
;;;### (autoloads (c-set-offset c-add-style c-set-style) "cc-styles"
-;;;;;; "progmodes/cc-styles.el" (20309 60936))
+;;;;;; "progmodes/cc-styles.el" (20229 56251))
;;; Generated autoloads from progmodes/cc-styles.el
(autoload 'c-set-style "cc-styles" "\
@@ -3445,7 +3428,7 @@ and exists only for compatibility reasons.
;;;***
-;;;### (autoloads nil "cc-vars" "progmodes/cc-vars.el" (20309 60936))
+;;;### (autoloads nil "cc-vars" "progmodes/cc-vars.el" (20280 8018))
;;; Generated autoloads from progmodes/cc-vars.el
(put 'c-basic-offset 'safe-local-variable 'integerp)
(put 'c-backslash-column 'safe-local-variable 'integerp)
@@ -3455,7 +3438,7 @@ and exists only for compatibility reasons.
;;;### (autoloads (ccl-execute-with-args check-ccl-program define-ccl-program
;;;;;; declare-ccl-program ccl-dump ccl-compile) "ccl" "international/ccl.el"
-;;;;;; (20309 60936))
+;;;;;; (20229 56251))
;;; Generated autoloads from international/ccl.el
(autoload 'ccl-compile "ccl" "\
@@ -3716,7 +3699,7 @@ See the documentation of `define-ccl-program' for the detail of CCL program.
;;;***
;;;### (autoloads (cconv-closure-convert) "cconv" "emacs-lisp/cconv.el"
-;;;;;; (20309 60936))
+;;;;;; (20376 44718))
;;; Generated autoloads from emacs-lisp/cconv.el
(autoload 'cconv-closure-convert "cconv" "\
@@ -3731,7 +3714,7 @@ Returns a form where all lambdas don't have any free variables.
;;;***
;;;### (autoloads (cfengine-auto-mode cfengine2-mode cfengine3-mode)
-;;;;;; "cfengine" "progmodes/cfengine.el" (20309 60936))
+;;;;;; "cfengine" "progmodes/cfengine.el" (20355 835))
;;; Generated autoloads from progmodes/cfengine.el
(autoload 'cfengine3-mode "cfengine" "\
@@ -3761,7 +3744,7 @@ on the buffer contents
;;;***
;;;### (autoloads (check-declare-directory check-declare-file) "check-declare"
-;;;;;; "emacs-lisp/check-declare.el" (20309 60936))
+;;;;;; "emacs-lisp/check-declare.el" (20379 60745))
;;; Generated autoloads from emacs-lisp/check-declare.el
(autoload 'check-declare-file "check-declare" "\
@@ -3786,7 +3769,7 @@ Returns non-nil if any false statements are found.
;;;;;; checkdoc-comments checkdoc-continue checkdoc-start checkdoc-current-buffer
;;;;;; checkdoc-eval-current-buffer checkdoc-message-interactive
;;;;;; checkdoc-interactive checkdoc checkdoc-list-of-strings-p)
-;;;;;; "checkdoc" "emacs-lisp/checkdoc.el" (20309 60936))
+;;;;;; "checkdoc" "emacs-lisp/checkdoc.el" (20389 6410))
;;; Generated autoloads from emacs-lisp/checkdoc.el
(put 'checkdoc-force-docstrings-flag 'safe-local-variable 'booleanp)
(put 'checkdoc-force-history-flag 'safe-local-variable 'booleanp)
@@ -3982,7 +3965,7 @@ checking of documentation strings.
;;;### (autoloads (pre-write-encode-hz post-read-decode-hz encode-hz-buffer
;;;;;; encode-hz-region decode-hz-buffer decode-hz-region) "china-util"
-;;;;;; "language/china-util.el" (20309 60936))
+;;;;;; "language/china-util.el" (20229 56251))
;;; Generated autoloads from language/china-util.el
(autoload 'decode-hz-region "china-util" "\
@@ -4020,7 +4003,7 @@ Encode the text in the current buffer to HZ.
;;;***
;;;### (autoloads (command-history list-command-history repeat-matching-complex-command)
-;;;;;; "chistory" "chistory.el" (20309 60936))
+;;;;;; "chistory" "chistory.el" (20229 56251))
;;; Generated autoloads from chistory.el
(autoload 'repeat-matching-complex-command "chistory" "\
@@ -4059,7 +4042,7 @@ and runs the normal hook `command-history-hook'.
;;;***
-;;;### (autoloads nil "cl" "emacs-lisp/cl.el" (20309 60936))
+;;;### (autoloads nil "cl" "emacs-lisp/cl.el" (20405 42971))
;;; Generated autoloads from emacs-lisp/cl.el
(defvar custom-print-functions nil "\
@@ -4072,10 +4055,18 @@ printer proceeds to the next function on the list.
This variable is not used at present, but it is defined in hopes that
a future Emacs interpreter will be able to use it.")
+(put 'defun* 'doc-string-elt 3)
+
+(put 'defmacro* 'doc-string-elt 3)
+
+(put 'defsubst 'doc-string-elt 3)
+
+(put 'defstruct 'doc-string-elt 2)
+
;;;***
;;;### (autoloads (common-lisp-indent-function) "cl-indent" "emacs-lisp/cl-indent.el"
-;;;;;; (20309 60936))
+;;;;;; (20280 8018))
;;; Generated autoloads from emacs-lisp/cl-indent.el
(autoload 'common-lisp-indent-function "cl-indent" "\
@@ -4154,7 +4145,7 @@ For example, the function `case' has an indent property
;;;***
;;;### (autoloads (c-macro-expand) "cmacexp" "progmodes/cmacexp.el"
-;;;;;; (20309 60936))
+;;;;;; (20355 835))
;;; Generated autoloads from progmodes/cmacexp.el
(autoload 'c-macro-expand "cmacexp" "\
@@ -4174,8 +4165,8 @@ For use inside Lisp programs, see also `c-macro-expansion'.
;;;***
-;;;### (autoloads (run-scheme) "cmuscheme" "cmuscheme.el" (20309
-;;;;;; 60936))
+;;;### (autoloads (run-scheme) "cmuscheme" "cmuscheme.el" (20229
+;;;;;; 56251))
;;; Generated autoloads from cmuscheme.el
(autoload 'run-scheme "cmuscheme" "\
@@ -4195,7 +4186,7 @@ is run).
;;;***
-;;;### (autoloads (color-name-to-rgb) "color" "color.el" (20309 60936))
+;;;### (autoloads (color-name-to-rgb) "color" "color.el" (20350 14460))
;;; Generated autoloads from color.el
(autoload 'color-name-to-rgb "color" "\
@@ -4217,7 +4208,7 @@ If FRAME cannot display COLOR, return nil.
;;;### (autoloads (comint-redirect-results-list-from-process comint-redirect-results-list
;;;;;; comint-redirect-send-command-to-process comint-redirect-send-command
;;;;;; comint-run make-comint make-comint-in-buffer) "comint" "comint.el"
-;;;;;; (20321 40986))
+;;;;;; (20405 16851))
;;; Generated autoloads from comint.el
(defvar comint-output-filter-functions '(ansi-color-process-output comint-postoutput-scroll-to-bottom comint-watch-for-password-prompt) "\
@@ -4236,16 +4227,21 @@ either globally or locally.")
(autoload 'make-comint-in-buffer "comint" "\
Make a Comint process NAME in BUFFER, running PROGRAM.
If BUFFER is nil, it defaults to NAME surrounded by `*'s.
-PROGRAM should be either a string denoting an executable program to create
-via `start-file-process', or a cons pair of the form (HOST . SERVICE) denoting
-a TCP connection to be opened via `open-network-stream'. If there is already
-a running process in that buffer, it is not restarted. Optional fourth arg
-STARTFILE is the name of a file, whose contents are sent to the
-process as its initial input.
+If there is a running process in BUFFER, it is not restarted.
+
+PROGRAM should be one of the following:
+- a string, denoting an executable program to create via
+ `start-file-process'
+- a cons pair of the form (HOST . SERVICE), denoting a TCP
+ connection to be opened via `open-network-stream'
+- nil, denoting a newly-allocated pty.
+
+Optional fourth arg STARTFILE is the name of a file, whose
+contents are sent to the process as its initial input.
If PROGRAM is a string, any more args are arguments to PROGRAM.
-Returns the (possibly newly created) process buffer.
+Return the (possibly newly created) process buffer.
\(fn NAME BUFFER PROGRAM &optional STARTFILE &rest SWITCHES)" nil nil)
@@ -4312,7 +4308,7 @@ REGEXP-GROUP is the regular expression group in REGEXP to use.
;;;***
;;;### (autoloads (compare-windows) "compare-w" "vc/compare-w.el"
-;;;;;; (20309 60936))
+;;;;;; (20229 56251))
;;; Generated autoloads from vc/compare-w.el
(autoload 'compare-windows "compare-w" "\
@@ -4349,8 +4345,8 @@ on third call it again advances points to the next difference and so on.
;;;;;; compilation-shell-minor-mode compilation-mode compilation-start
;;;;;; compile compilation-disable-input compile-command compilation-search-path
;;;;;; compilation-ask-about-save compilation-window-height compilation-start-hook
-;;;;;; compilation-mode-hook) "compile" "progmodes/compile.el" (20309
-;;;;;; 60936))
+;;;;;; compilation-mode-hook) "compile" "progmodes/compile.el" (20405
+;;;;;; 42899))
;;; Generated autoloads from progmodes/compile.el
(defvar compilation-mode-hook nil "\
@@ -4374,7 +4370,7 @@ Number of lines in a compilation window. If nil, use Emacs default.")
(custom-autoload 'compilation-window-height "compile" t)
(defvar compilation-process-setup-function nil "\
-*Function to call to customize the compilation process.
+Function to call to customize the compilation process.
This function is called immediately before the compilation process is
started. It can be used to set any variables or functions that are used
while processing the output of the compilation process.")
@@ -4496,6 +4492,8 @@ Runs `compilation-mode-hook' with `run-mode-hooks' (which see).
\(fn &optional NAME-OF-MODE)" t nil)
+(put 'define-compilation-mode 'doc-string-elt 3)
+
(autoload 'compilation-shell-minor-mode "compile" "\
Toggle Compilation Shell minor mode.
With a prefix argument ARG, enable Compilation Shell minor mode
@@ -4530,7 +4528,7 @@ This is the value of `next-error-function' in Compilation buffers.
;;;***
;;;### (autoloads (dynamic-completion-mode) "completion" "completion.el"
-;;;;;; (20309 60936))
+;;;;;; (20389 6410))
;;; Generated autoloads from completion.el
(defvar dynamic-completion-mode nil "\
@@ -4555,7 +4553,7 @@ if ARG is omitted or nil.
;;;### (autoloads (conf-xdefaults-mode conf-ppd-mode conf-colon-mode
;;;;;; conf-space-keywords conf-space-mode conf-javaprop-mode conf-windows-mode
;;;;;; conf-unix-mode conf-mode) "conf-mode" "textmodes/conf-mode.el"
-;;;;;; (20309 60936))
+;;;;;; (20229 56251))
;;; Generated autoloads from textmodes/conf-mode.el
(autoload 'conf-mode "conf-mode" "\
@@ -4711,7 +4709,7 @@ For details see `conf-mode'. Example:
;;;***
;;;### (autoloads (shuffle-vector cookie-snarf cookie-insert cookie)
-;;;;;; "cookie1" "play/cookie1.el" (20309 60936))
+;;;;;; "cookie1" "play/cookie1.el" (20370 4296))
;;; Generated autoloads from play/cookie1.el
(autoload 'cookie "cookie1" "\
@@ -4743,8 +4741,8 @@ Randomly permute the elements of VECTOR (all permutations equally likely).
;;;***
;;;### (autoloads (copyright-update-directory copyright copyright-fix-years
-;;;;;; copyright-update) "copyright" "emacs-lisp/copyright.el" (20324
-;;;;;; 28875))
+;;;;;; copyright-update) "copyright" "emacs-lisp/copyright.el" (20389
+;;;;;; 6410))
;;; Generated autoloads from emacs-lisp/copyright.el
(put 'copyright-at-end-flag 'safe-local-variable 'booleanp)
(put 'copyright-names-regexp 'safe-local-variable 'stringp)
@@ -4783,7 +4781,7 @@ If FIX is non-nil, run `copyright-fix-years' instead.
;;;***
;;;### (autoloads (cperl-perldoc-at-point cperl-perldoc cperl-mode)
-;;;;;; "cperl-mode" "progmodes/cperl-mode.el" (20309 60936))
+;;;;;; "cperl-mode" "progmodes/cperl-mode.el" (20229 56251))
;;; Generated autoloads from progmodes/cperl-mode.el
(put 'cperl-indent-level 'safe-local-variable 'integerp)
(put 'cperl-brace-offset 'safe-local-variable 'integerp)
@@ -4982,7 +4980,7 @@ Run a `perldoc' on the word around point.
;;;***
;;;### (autoloads (cpp-parse-edit cpp-highlight-buffer) "cpp" "progmodes/cpp.el"
-;;;;;; (20309 60936))
+;;;;;; (20355 835))
;;; Generated autoloads from progmodes/cpp.el
(autoload 'cpp-highlight-buffer "cpp" "\
@@ -5001,7 +4999,7 @@ Edit display information for cpp conditionals.
;;;***
;;;### (autoloads (crisp-mode crisp-mode) "crisp" "emulation/crisp.el"
-;;;;;; (20309 60936))
+;;;;;; (20229 56251))
;;; Generated autoloads from emulation/crisp.el
(defvar crisp-mode nil "\
@@ -5027,7 +5025,7 @@ if ARG is omitted or nil.
;;;***
;;;### (autoloads (completing-read-multiple) "crm" "emacs-lisp/crm.el"
-;;;;;; (20309 60936))
+;;;;;; (20229 56251))
;;; Generated autoloads from emacs-lisp/crm.el
(autoload 'completing-read-multiple "crm" "\
@@ -5062,8 +5060,8 @@ INHERIT-INPUT-METHOD.
;;;***
-;;;### (autoloads (css-mode) "css-mode" "textmodes/css-mode.el" (20309
-;;;;;; 60936))
+;;;### (autoloads (css-mode) "css-mode" "textmodes/css-mode.el" (20229
+;;;;;; 56251))
;;; Generated autoloads from textmodes/css-mode.el
(autoload 'css-mode "css-mode" "\
@@ -5074,7 +5072,7 @@ Major mode to edit Cascading Style Sheets.
;;;***
;;;### (autoloads (cua-selection-mode cua-mode) "cua-base" "emulation/cua-base.el"
-;;;;;; (20315 3938))
+;;;;;; (20360 57703))
;;; Generated autoloads from emulation/cua-base.el
(defvar cua-mode nil "\
@@ -5134,7 +5132,7 @@ Enable CUA selection mode without the C-z/C-x/C-c/C-v bindings.
;;;;;; customize-mode customize customize-push-and-save customize-save-variable
;;;;;; customize-set-variable customize-set-value custom-menu-sort-alphabetically
;;;;;; custom-buffer-sort-alphabetically custom-browse-sort-alphabetically)
-;;;;;; "cus-edit" "cus-edit.el" (20309 60936))
+;;;;;; "cus-edit" "cus-edit.el" (20400 16870))
;;; Generated autoloads from cus-edit.el
(defvar custom-browse-sort-alphabetically nil "\
@@ -5239,14 +5237,14 @@ Customize GROUP, which must be a customization group, in another window.
(defalias 'customize-variable 'customize-option)
(autoload 'customize-option "cus-edit" "\
-Customize SYMBOL, which must be a user option variable.
+Customize SYMBOL, which must be a user option.
\(fn SYMBOL)" t nil)
(defalias 'customize-variable-other-window 'customize-option-other-window)
(autoload 'customize-option-other-window "cus-edit" "\
-Customize SYMBOL, which must be a user option variable.
+Customize SYMBOL, which must be a user option.
Show the buffer in another window, but don't select it.
\(fn SYMBOL)" t nil)
@@ -5286,9 +5284,10 @@ the official name of the package, such as MH-E or Gnus.")
(autoload 'customize-changed-options "cus-edit" "\
Customize all settings whose meanings have changed in Emacs itself.
-This includes new user option variables and faces, and new
-customization groups, as well as older options and faces whose meanings
-or default values have changed since the previous major Emacs release.
+This includes new user options and faces, and new customization
+groups, as well as older options and faces whose meanings or
+default values have changed since the previous major Emacs
+release.
With argument SINCE-VERSION (a string), customize all settings
that were added or redefined since that version.
@@ -5332,7 +5331,7 @@ Customize all saved options and faces.
\(fn)" t nil)
(autoload 'customize-apropos "cus-edit" "\
-Customize all loaded options, faces and groups matching PATTERN.
+Customize loaded options, faces and groups matching PATTERN.
PATTERN can be a word, a list of words (separated by spaces),
or a regexp (using some regexp special characters). If it is a word,
search for matches for that word as a substring. If it is a list of words,
@@ -5341,18 +5340,13 @@ search for matches for any two (or more) of those words.
If TYPE is `options', include only options.
If TYPE is `faces', include only faces.
If TYPE is `groups', include only groups.
-If TYPE is t (interactively, with prefix arg), include variables
-that are not customizable options, as well as faces and groups
-\(but we recommend using `apropos-variable' instead).
\(fn PATTERN &optional TYPE)" t nil)
(autoload 'customize-apropos-options "cus-edit" "\
Customize all loaded customizable options matching REGEXP.
-With prefix ARG, include variables that are not customizable options
-\(but it is better to use `apropos-variable' if you want to find those).
-\(fn REGEXP &optional ARG)" t nil)
+\(fn REGEXP &optional IGNORED)" t nil)
(autoload 'customize-apropos-faces "cus-edit" "\
Customize all loaded faces matching REGEXP.
@@ -5450,8 +5444,8 @@ The format is suitable for use with `easy-menu-define'.
;;;***
;;;### (autoloads (customize-themes describe-theme custom-theme-visit-theme
-;;;;;; customize-create-theme) "cus-theme" "cus-theme.el" (20335
-;;;;;; 8681))
+;;;;;; customize-create-theme) "cus-theme" "cus-theme.el" (20339
+;;;;;; 13356))
;;; Generated autoloads from cus-theme.el
(autoload 'customize-create-theme "cus-theme" "\
@@ -5485,7 +5479,7 @@ omitted, a buffer named *Custom Themes* is used.
;;;***
;;;### (autoloads (cvs-status-mode) "cvs-status" "vc/cvs-status.el"
-;;;;;; (20309 60936))
+;;;;;; (20355 835))
;;; Generated autoloads from vc/cvs-status.el
(autoload 'cvs-status-mode "cvs-status" "\
@@ -5496,7 +5490,7 @@ Mode used for cvs status output.
;;;***
;;;### (autoloads (global-cwarn-mode turn-on-cwarn-mode cwarn-mode)
-;;;;;; "cwarn" "progmodes/cwarn.el" (20309 60936))
+;;;;;; "cwarn" "progmodes/cwarn.el" (20355 835))
;;; Generated autoloads from progmodes/cwarn.el
(autoload 'cwarn-mode "cwarn" "\
@@ -5547,7 +5541,7 @@ See `cwarn-mode' for more information on Cwarn mode.
;;;### (autoloads (standard-display-cyrillic-translit cyrillic-encode-alternativnyj-char
;;;;;; cyrillic-encode-koi8-r-char) "cyril-util" "language/cyril-util.el"
-;;;;;; (20309 60936))
+;;;;;; (20229 56251))
;;; Generated autoloads from language/cyril-util.el
(autoload 'cyrillic-encode-koi8-r-char "cyril-util" "\
@@ -5576,7 +5570,7 @@ If the argument is nil, we return the display table to its standard state.
;;;***
;;;### (autoloads (dabbrev-expand dabbrev-completion) "dabbrev" "dabbrev.el"
-;;;;;; (20320 14810))
+;;;;;; (20397 19651))
;;; Generated autoloads from dabbrev.el
(put 'dabbrev-case-fold-search 'risky-local-variable t)
(put 'dabbrev-case-replace 'risky-local-variable t)
@@ -5623,7 +5617,7 @@ See also `dabbrev-abbrev-char-regexp' and \\[dabbrev-completion].
;;;***
;;;### (autoloads (data-debug-new-buffer) "data-debug" "cedet/data-debug.el"
-;;;;;; (20309 60936))
+;;;;;; (20355 835))
;;; Generated autoloads from cedet/data-debug.el
(autoload 'data-debug-new-buffer "data-debug" "\
@@ -5633,8 +5627,8 @@ Create a new data-debug buffer with NAME.
;;;***
-;;;### (autoloads (dbus-handle-event) "dbus" "net/dbus.el" (20314
-;;;;;; 46279))
+;;;### (autoloads (dbus-handle-event) "dbus" "net/dbus.el" (20400
+;;;;;; 16870))
;;; Generated autoloads from net/dbus.el
(autoload 'dbus-handle-event "dbus" "\
@@ -5647,8 +5641,8 @@ If the HANDLER returns a `dbus-error', it is propagated as return message.
;;;***
-;;;### (autoloads (dcl-mode) "dcl-mode" "progmodes/dcl-mode.el" (20309
-;;;;;; 60936))
+;;;### (autoloads (dcl-mode) "dcl-mode" "progmodes/dcl-mode.el" (20355
+;;;;;; 835))
;;; Generated autoloads from progmodes/dcl-mode.el
(autoload 'dcl-mode "dcl-mode" "\
@@ -5775,7 +5769,7 @@ There is some minimal font-lock support (see vars
;;;***
;;;### (autoloads (cancel-debug-on-entry debug-on-entry debug) "debug"
-;;;;;; "emacs-lisp/debug.el" (20309 60936))
+;;;;;; "emacs-lisp/debug.el" (20229 56251))
;;; Generated autoloads from emacs-lisp/debug.el
(setq debugger 'debug)
@@ -5819,7 +5813,7 @@ To specify a nil argument interactively, exit with an empty minibuffer.
;;;***
;;;### (autoloads (decipher-mode decipher) "decipher" "play/decipher.el"
-;;;;;; (20309 60936))
+;;;;;; (20229 56251))
;;; Generated autoloads from play/decipher.el
(autoload 'decipher "decipher" "\
@@ -5848,8 +5842,8 @@ The most useful commands are:
;;;***
;;;### (autoloads (delimit-columns-rectangle delimit-columns-region
-;;;;;; delimit-columns-customize) "delim-col" "delim-col.el" (20309
-;;;;;; 60936))
+;;;;;; delimit-columns-customize) "delim-col" "delim-col.el" (20229
+;;;;;; 56251))
;;; Generated autoloads from delim-col.el
(autoload 'delimit-columns-customize "delim-col" "\
@@ -5873,8 +5867,8 @@ START and END delimits the corners of text rectangle.
;;;***
-;;;### (autoloads (delphi-mode) "delphi" "progmodes/delphi.el" (20309
-;;;;;; 60936))
+;;;### (autoloads (delphi-mode) "delphi" "progmodes/delphi.el" (20355
+;;;;;; 835))
;;; Generated autoloads from progmodes/delphi.el
(autoload 'delphi-mode "delphi" "\
@@ -5925,8 +5919,8 @@ with no args, if that value is non-nil.
;;;***
-;;;### (autoloads (delete-selection-mode) "delsel" "delsel.el" (20309
-;;;;;; 60936))
+;;;### (autoloads (delete-selection-mode) "delsel" "delsel.el" (20229
+;;;;;; 56251))
;;; Generated autoloads from delsel.el
(defalias 'pending-delete-mode 'delete-selection-mode)
@@ -5956,7 +5950,7 @@ any selection.
;;;***
;;;### (autoloads (derived-mode-init-mode-variables define-derived-mode)
-;;;;;; "derived" "emacs-lisp/derived.el" (20309 60936))
+;;;;;; "derived" "emacs-lisp/derived.el" (20229 56251))
;;; Generated autoloads from emacs-lisp/derived.el
(autoload 'define-derived-mode "derived" "\
@@ -6023,7 +6017,7 @@ the first time the mode is used.
;;;***
;;;### (autoloads (describe-char describe-text-properties) "descr-text"
-;;;;;; "descr-text.el" (20309 60936))
+;;;;;; "descr-text.el" (20370 4296))
;;; Generated autoloads from descr-text.el
(autoload 'describe-text-properties "descr-text" "\
@@ -6060,7 +6054,7 @@ relevant to POS.
;;;### (autoloads (desktop-revert desktop-save-in-desktop-dir desktop-change-dir
;;;;;; desktop-load-default desktop-read desktop-remove desktop-save
;;;;;; desktop-clear desktop-locals-to-save desktop-save-mode) "desktop"
-;;;;;; "desktop.el" (20309 60936))
+;;;;;; "desktop.el" (20400 16870))
;;; Generated autoloads from desktop.el
(defvar desktop-save-mode nil "\
@@ -6247,7 +6241,7 @@ Revert to the last loaded desktop.
;;;### (autoloads (gnus-article-outlook-deuglify-article gnus-outlook-deuglify-article
;;;;;; gnus-article-outlook-repair-attribution gnus-article-outlook-unwrap-lines)
-;;;;;; "deuglify" "gnus/deuglify.el" (20309 60936))
+;;;;;; "deuglify" "gnus/deuglify.el" (20229 56251))
;;; Generated autoloads from gnus/deuglify.el
(autoload 'gnus-article-outlook-unwrap-lines "deuglify" "\
@@ -6280,7 +6274,7 @@ Deuglify broken Outlook (Express) articles and redisplay.
;;;***
;;;### (autoloads (diary-mode diary-mail-entries diary) "diary-lib"
-;;;;;; "calendar/diary-lib.el" (20309 60936))
+;;;;;; "calendar/diary-lib.el" (20288 9499))
;;; Generated autoloads from calendar/diary-lib.el
(autoload 'diary "diary-lib" "\
@@ -6323,7 +6317,7 @@ Major mode for editing the diary file.
;;;***
;;;### (autoloads (diff-buffer-with-file diff-backup diff diff-command
-;;;;;; diff-switches) "diff" "vc/diff.el" (20309 60936))
+;;;;;; diff-switches) "diff" "vc/diff.el" (20379 60745))
;;; Generated autoloads from vc/diff.el
(defvar diff-switches (purecopy "-c") "\
@@ -6367,7 +6361,7 @@ This requires the external program `diff' to be in your `exec-path'.
;;;***
;;;### (autoloads (diff-minor-mode diff-mode) "diff-mode" "vc/diff-mode.el"
-;;;;;; (20309 60936))
+;;;;;; (20377 16772))
;;; Generated autoloads from vc/diff-mode.el
(autoload 'diff-mode "diff-mode" "\
@@ -6399,7 +6393,7 @@ the mode if ARG is omitted or nil.
;;;***
-;;;### (autoloads (dig) "dig" "net/dig.el" (20309 60936))
+;;;### (autoloads (dig) "dig" "net/dig.el" (20229 56251))
;;; Generated autoloads from net/dig.el
(autoload 'dig "dig" "\
@@ -6411,7 +6405,7 @@ Optional arguments are passed to `dig-invoke'.
;;;***
;;;### (autoloads (dired-mode dired-noselect dired-other-frame dired-other-window
-;;;;;; dired dired-listing-switches) "dired" "dired.el" (20343 49216))
+;;;;;; dired dired-listing-switches) "dired" "dired.el" (20400 16870))
;;; Generated autoloads from dired.el
(defvar dired-listing-switches (purecopy "-al") "\
@@ -6533,7 +6527,7 @@ Keybindings:
;;;***
;;;### (autoloads (dirtrack dirtrack-mode) "dirtrack" "dirtrack.el"
-;;;;;; (20309 60936))
+;;;;;; (20400 16870))
;;; Generated autoloads from dirtrack.el
(autoload 'dirtrack-mode "dirtrack" "\
@@ -6563,8 +6557,8 @@ from `default-directory'.
;;;***
-;;;### (autoloads (disassemble) "disass" "emacs-lisp/disass.el" (20309
-;;;;;; 60936))
+;;;### (autoloads (disassemble) "disass" "emacs-lisp/disass.el" (20229
+;;;;;; 56251))
;;; Generated autoloads from emacs-lisp/disass.el
(autoload 'disassemble "disass" "\
@@ -6583,7 +6577,7 @@ redefine OBJECT if it is a symbol.
;;;;;; standard-display-g1 standard-display-ascii standard-display-default
;;;;;; standard-display-8bit describe-current-display-table describe-display-table
;;;;;; set-display-table-slot display-table-slot make-display-table)
-;;;;;; "disp-table" "disp-table.el" (20309 60936))
+;;;;;; "disp-table" "disp-table.el" (20229 56251))
;;; Generated autoloads from disp-table.el
(autoload 'make-display-table "disp-table" "\
@@ -6705,7 +6699,7 @@ in `.emacs'.
;;;***
;;;### (autoloads (dissociated-press) "dissociate" "play/dissociate.el"
-;;;;;; (20309 60936))
+;;;;;; (20229 56251))
;;; Generated autoloads from play/dissociate.el
(autoload 'dissociated-press "dissociate" "\
@@ -6721,7 +6715,7 @@ Default is 2.
;;;***
-;;;### (autoloads (dnd-protocol-alist) "dnd" "dnd.el" (20309 60936))
+;;;### (autoloads (dnd-protocol-alist) "dnd" "dnd.el" (20229 56251))
;;; Generated autoloads from dnd.el
(defvar dnd-protocol-alist `((,(purecopy "^file:///") . dnd-open-local-file) (,(purecopy "^file://") . dnd-open-file) (,(purecopy "^file:") . dnd-open-local-file) (,(purecopy "^\\(https?\\|ftp\\|file\\|nfs\\)://") . dnd-open-file)) "\
@@ -6742,7 +6736,7 @@ if some action was made, or nil if the URL is ignored.")
;;;***
;;;### (autoloads (dns-mode-soa-increment-serial dns-mode) "dns-mode"
-;;;;;; "textmodes/dns-mode.el" (20309 60936))
+;;;;;; "textmodes/dns-mode.el" (20229 56251))
;;; Generated autoloads from textmodes/dns-mode.el
(autoload 'dns-mode "dns-mode" "\
@@ -6766,8 +6760,8 @@ Locate SOA record and increment the serial field.
;;;***
;;;### (autoloads (doc-view-bookmark-jump doc-view-minor-mode doc-view-mode-maybe
-;;;;;; doc-view-mode doc-view-mode-p) "doc-view" "doc-view.el" (20309
-;;;;;; 60936))
+;;;;;; doc-view-mode doc-view-mode-p) "doc-view" "doc-view.el" (20376
+;;;;;; 50510))
;;; Generated autoloads from doc-view.el
(autoload 'doc-view-mode-p "doc-view" "\
@@ -6813,7 +6807,7 @@ See the command `doc-view-mode' for more information on this mode.
;;;***
-;;;### (autoloads (doctor) "doctor" "play/doctor.el" (20309 60936))
+;;;### (autoloads (doctor) "doctor" "play/doctor.el" (20235 37244))
;;; Generated autoloads from play/doctor.el
(autoload 'doctor "doctor" "\
@@ -6823,7 +6817,7 @@ Switch to *doctor* buffer and start giving psychotherapy.
;;;***
-;;;### (autoloads (double-mode) "double" "double.el" (20309 60936))
+;;;### (autoloads (double-mode) "double" "double.el" (20229 56251))
;;; Generated autoloads from double.el
(autoload 'double-mode "double" "\
@@ -6839,7 +6833,7 @@ strings when pressed twice. See `double-map' for details.
;;;***
-;;;### (autoloads (dunnet) "dunnet" "play/dunnet.el" (20309 60936))
+;;;### (autoloads (dunnet) "dunnet" "play/dunnet.el" (20229 56251))
;;; Generated autoloads from play/dunnet.el
(autoload 'dunnet "dunnet" "\
@@ -6851,7 +6845,7 @@ Switch to *dungeon* buffer and start game.
;;;### (autoloads (easy-mmode-defsyntax easy-mmode-defmap easy-mmode-define-keymap
;;;;;; define-globalized-minor-mode define-minor-mode) "easy-mmode"
-;;;;;; "emacs-lisp/easy-mmode.el" (20309 60936))
+;;;;;; "emacs-lisp/easy-mmode.el" (20405 42390))
;;; Generated autoloads from emacs-lisp/easy-mmode.el
(defalias 'easy-mmode-define-minor-mode 'define-minor-mode)
@@ -6917,6 +6911,8 @@ For example, you could write
\(fn MODE DOC &optional INIT-VALUE LIGHTER KEYMAP &rest BODY)" nil (quote macro))
+(put 'define-minor-mode 'doc-string-elt '2)
+
(defalias 'easy-mmode-define-global-mode 'define-globalized-minor-mode)
(defalias 'define-global-minor-mode 'define-globalized-minor-mode)
@@ -6942,6 +6938,8 @@ call another major mode in their body.
\(fn GLOBAL-MODE MODE TURN-ON &rest KEYS)" nil (quote macro))
+(put 'define-globalized-minor-mode 'doc-string-elt '2)
+
(autoload 'easy-mmode-define-keymap "easy-mmode" "\
Return a keymap built from bindings BS.
BS must be a list of (KEY . BINDING) where
@@ -6977,8 +6975,8 @@ CSS contains a list of syntax specifications of the form (CHAR . SYNTAX).
;;;***
;;;### (autoloads (easy-menu-change easy-menu-create-menu easy-menu-do-define
-;;;;;; easy-menu-define) "easymenu" "emacs-lisp/easymenu.el" (20309
-;;;;;; 60936))
+;;;;;; easy-menu-define) "easymenu" "emacs-lisp/easymenu.el" (20304
+;;;;;; 58723))
;;; Generated autoloads from emacs-lisp/easymenu.el
(autoload 'easy-menu-define "easymenu" "\
@@ -7132,7 +7130,7 @@ To implement dynamic menus, either call this from
;;;;;; ebnf-eps-file ebnf-eps-directory ebnf-spool-region ebnf-spool-buffer
;;;;;; ebnf-spool-file ebnf-spool-directory ebnf-print-region ebnf-print-buffer
;;;;;; ebnf-print-file ebnf-print-directory ebnf-customize) "ebnf2ps"
-;;;;;; "progmodes/ebnf2ps.el" (20309 60936))
+;;;;;; "progmodes/ebnf2ps.el" (20373 62846))
;;; Generated autoloads from progmodes/ebnf2ps.el
(autoload 'ebnf-customize "ebnf2ps" "\
@@ -7400,14 +7398,13 @@ See `ebnf-style-database' documentation.
;;;;;; ebrowse-electric-position-menu ebrowse-forward-in-position-stack
;;;;;; ebrowse-back-in-position-stack ebrowse-tags-search-member-use
;;;;;; ebrowse-tags-query-replace ebrowse-tags-search ebrowse-tags-loop-continue
-;;;;;; ebrowse-tags-complete-symbol ebrowse-tags-find-definition-other-frame
-;;;;;; ebrowse-tags-view-definition-other-frame ebrowse-tags-find-declaration-other-frame
-;;;;;; ebrowse-tags-find-definition-other-window ebrowse-tags-view-definition-other-window
-;;;;;; ebrowse-tags-find-declaration-other-window ebrowse-tags-find-definition
-;;;;;; ebrowse-tags-view-definition ebrowse-tags-find-declaration
-;;;;;; ebrowse-tags-view-declaration ebrowse-member-mode ebrowse-electric-choose-tree
-;;;;;; ebrowse-tree-mode) "ebrowse" "progmodes/ebrowse.el" (20309
-;;;;;; 60936))
+;;;;;; ebrowse-tags-find-definition-other-frame ebrowse-tags-view-definition-other-frame
+;;;;;; ebrowse-tags-find-declaration-other-frame ebrowse-tags-find-definition-other-window
+;;;;;; ebrowse-tags-view-definition-other-window ebrowse-tags-find-declaration-other-window
+;;;;;; ebrowse-tags-find-definition ebrowse-tags-view-definition
+;;;;;; ebrowse-tags-find-declaration ebrowse-tags-view-declaration
+;;;;;; ebrowse-member-mode ebrowse-electric-choose-tree ebrowse-tree-mode)
+;;;;;; "ebrowse" "progmodes/ebrowse.el" (20355 835))
;;; Generated autoloads from progmodes/ebrowse.el
(autoload 'ebrowse-tree-mode "ebrowse" "\
@@ -7482,14 +7479,6 @@ Find definition of member at point in other frame.
\(fn)" t nil)
-(autoload 'ebrowse-tags-complete-symbol "ebrowse" "\
-Perform completion on the C++ symbol preceding point.
-A second call of this function without changing point inserts the next match.
-A call with prefix PREFIX reads the symbol to insert from the minibuffer with
-completion.
-
-\(fn PREFIX)" t nil)
-
(autoload 'ebrowse-tags-loop-continue "ebrowse" "\
Repeat last operation on files in tree.
FIRST-TIME non-nil means this is not a repetition, but the first time.
@@ -7556,32 +7545,40 @@ Display statistics for a class tree.
;;;***
;;;### (autoloads (electric-buffer-list) "ebuff-menu" "ebuff-menu.el"
-;;;;;; (20309 60936))
+;;;;;; (20400 16870))
;;; Generated autoloads from ebuff-menu.el
(autoload 'electric-buffer-list "ebuff-menu" "\
-Pop up a buffer describing the set of Emacs buffers.
-Vaguely like ITS lunar select buffer; combining typeoutoid buffer
-listing with menuoid buffer selection.
-
-If the very next character typed is a space then the buffer list
-window disappears. Otherwise, one may move around in the buffer list
-window, marking buffers to be selected, saved or deleted.
-
-To exit and select a new buffer, type a space when the cursor is on
-the appropriate line of the buffer-list window. Other commands are
-much like those of `Buffer-menu-mode'.
+Pop up the Buffer Menu in an \"electric\" window.
+If you type SPC or RET (`Electric-buffer-menu-select'), that
+selects the buffer at point and quits the \"electric\" window.
+Otherwise, you can move around in the Buffer Menu, marking
+buffers to be selected, saved or deleted; these other commands
+are much like those of `Buffer-menu-mode'.
Run hooks in `electric-buffer-menu-mode-hook' on entry.
-\\{electric-buffer-menu-mode-map}
+\\<electric-buffer-menu-mode-map>
+\\[keyboard-quit] or \\[Electric-buffer-menu-quit] -- exit buffer menu, returning to previous window and buffer
+ configuration. If the very first character typed is a space, it
+ also has this effect.
+\\[Electric-buffer-menu-select] -- select buffer of line point is on.
+ Also show buffers marked with m in other windows,
+ deletes buffers marked with \"D\", and saves those marked with \"S\".
+\\[Buffer-menu-mark] -- mark buffer to be displayed.
+\\[Buffer-menu-not-modified] -- clear modified-flag on that buffer.
+\\[Buffer-menu-save] -- mark that buffer to be saved.
+\\[Buffer-menu-delete] or \\[Buffer-menu-delete-backwards] -- mark that buffer to be deleted.
+\\[Buffer-menu-unmark] -- remove all kinds of marks from current line.
+\\[Electric-buffer-menu-mode-view-buffer] -- view buffer, returning when done.
+\\[Buffer-menu-backup-unmark] -- back up a line and remove marks.
\(fn ARG)" t nil)
;;;***
;;;### (autoloads (Electric-command-history-redo-expression) "echistory"
-;;;;;; "echistory.el" (20309 60936))
+;;;;;; "echistory.el" (20229 56251))
;;; Generated autoloads from echistory.el
(autoload 'Electric-command-history-redo-expression "echistory" "\
@@ -7593,7 +7590,7 @@ With prefix arg NOCONFIRM, execute current line as-is without editing.
;;;***
;;;### (autoloads (ecomplete-setup) "ecomplete" "gnus/ecomplete.el"
-;;;;;; (20309 60936))
+;;;;;; (20229 56251))
;;; Generated autoloads from gnus/ecomplete.el
(autoload 'ecomplete-setup "ecomplete" "\
@@ -7603,7 +7600,7 @@ With prefix arg NOCONFIRM, execute current line as-is without editing.
;;;***
-;;;### (autoloads (global-ede-mode) "ede" "cedet/ede.el" (20309 60936))
+;;;### (autoloads (global-ede-mode) "ede" "cedet/ede.el" (20255 22932))
;;; Generated autoloads from cedet/ede.el
(defvar global-ede-mode nil "\
@@ -7630,7 +7627,7 @@ an EDE controlled project.
;;;### (autoloads (edebug-all-forms edebug-all-defs edebug-eval-top-level-form
;;;;;; edebug-basic-spec edebug-all-forms edebug-all-defs) "edebug"
-;;;;;; "emacs-lisp/edebug.el" (20343 47906))
+;;;;;; "emacs-lisp/edebug.el" (20355 835))
;;; Generated autoloads from emacs-lisp/edebug.el
(defvar edebug-all-defs nil "\
@@ -7703,7 +7700,7 @@ Toggle edebugging of all forms.
;;;;;; ediff-merge-directories-with-ancestor ediff-merge-directories
;;;;;; ediff-directories3 ediff-directory-revisions ediff-directories
;;;;;; ediff-buffers3 ediff-buffers ediff-backup ediff-current-file
-;;;;;; ediff-files3 ediff-files) "ediff" "vc/ediff.el" (20309 60936))
+;;;;;; ediff-files3 ediff-files) "ediff" "vc/ediff.el" (20373 62846))
;;; Generated autoloads from vc/ediff.el
(autoload 'ediff-files "ediff" "\
@@ -7935,7 +7932,7 @@ With optional NODE, goes to that node.
;;;***
;;;### (autoloads (ediff-customize) "ediff-help" "vc/ediff-help.el"
-;;;;;; (20309 60936))
+;;;;;; (20229 56251))
;;; Generated autoloads from vc/ediff-help.el
(autoload 'ediff-customize "ediff-help" "\
@@ -7946,7 +7943,7 @@ With optional NODE, goes to that node.
;;;***
;;;### (autoloads (ediff-show-registry) "ediff-mult" "vc/ediff-mult.el"
-;;;;;; (20309 60936))
+;;;;;; (20229 56251))
;;; Generated autoloads from vc/ediff-mult.el
(autoload 'ediff-show-registry "ediff-mult" "\
@@ -7959,7 +7956,7 @@ Display Ediff's registry.
;;;***
;;;### (autoloads (ediff-toggle-use-toolbar ediff-toggle-multiframe)
-;;;;;; "ediff-util" "vc/ediff-util.el" (20309 60936))
+;;;;;; "ediff-util" "vc/ediff-util.el" (20304 58723))
;;; Generated autoloads from vc/ediff-util.el
(autoload 'ediff-toggle-multiframe "ediff-util" "\
@@ -7980,7 +7977,7 @@ To change the default, set the variable `ediff-use-toolbar-p', which see.
;;;### (autoloads (format-kbd-macro read-kbd-macro edit-named-kbd-macro
;;;;;; edit-last-kbd-macro edit-kbd-macro) "edmacro" "edmacro.el"
-;;;;;; (20309 60936))
+;;;;;; (20229 56251))
;;; Generated autoloads from edmacro.el
(autoload 'edit-kbd-macro "edmacro" "\
@@ -8029,7 +8026,7 @@ or nil, use a compact 80-column format.
;;;***
;;;### (autoloads (edt-emulation-on edt-set-scroll-margins) "edt"
-;;;;;; "emulation/edt.el" (20309 60936))
+;;;;;; "emulation/edt.el" (20229 56251))
;;; Generated autoloads from emulation/edt.el
(autoload 'edt-set-scroll-margins "edt" "\
@@ -8047,7 +8044,7 @@ Turn on EDT Emulation.
;;;***
;;;### (autoloads (electric-helpify with-electric-help) "ehelp" "ehelp.el"
-;;;;;; (20309 60936))
+;;;;;; (20229 56251))
;;; Generated autoloads from ehelp.el
(autoload 'with-electric-help "ehelp" "\
@@ -8084,7 +8081,7 @@ BUFFER is put back into its original major mode.
;;;***
;;;### (autoloads (turn-on-eldoc-mode eldoc-mode eldoc-minor-mode-string)
-;;;;;; "eldoc" "emacs-lisp/eldoc.el" (20309 60936))
+;;;;;; "eldoc" "emacs-lisp/eldoc.el" (20229 56251))
;;; Generated autoloads from emacs-lisp/eldoc.el
(defvar eldoc-minor-mode-string (purecopy " ElDoc") "\
@@ -8131,7 +8128,7 @@ Emacs Lisp mode) that support ElDoc.")
;;;***
;;;### (autoloads (electric-layout-mode electric-pair-mode electric-indent-mode)
-;;;;;; "electric" "electric.el" (20309 60936))
+;;;;;; "electric" "electric.el" (20370 4296))
;;; Generated autoloads from electric.el
(defvar electric-indent-chars '(10) "\
@@ -8201,8 +8198,8 @@ The variable `electric-layout-rules' says when and how to insert newlines.
;;;***
-;;;### (autoloads (elide-head) "elide-head" "elide-head.el" (20309
-;;;;;; 60936))
+;;;### (autoloads (elide-head) "elide-head" "elide-head.el" (20229
+;;;;;; 56251))
;;; Generated autoloads from elide-head.el
(autoload 'elide-head "elide-head" "\
@@ -8219,7 +8216,7 @@ This is suitable as an entry on `find-file-hook' or appropriate mode hooks.
;;;### (autoloads (elint-initialize elint-defun elint-current-buffer
;;;;;; elint-directory elint-file) "elint" "emacs-lisp/elint.el"
-;;;;;; (20309 60936))
+;;;;;; (20229 56251))
;;; Generated autoloads from emacs-lisp/elint.el
(autoload 'elint-file "elint" "\
@@ -8255,8 +8252,8 @@ optional prefix argument REINIT is non-nil.
;;;***
;;;### (autoloads (elp-results elp-instrument-package elp-instrument-list
-;;;;;; elp-instrument-function) "elp" "emacs-lisp/elp.el" (20309
-;;;;;; 60936))
+;;;;;; elp-instrument-function) "elp" "emacs-lisp/elp.el" (20229
+;;;;;; 56251))
;;; Generated autoloads from emacs-lisp/elp.el
(autoload 'elp-instrument-function "elp" "\
@@ -8291,7 +8288,7 @@ displayed.
;;;***
;;;### (autoloads (emacs-lock-mode) "emacs-lock" "emacs-lock.el"
-;;;;;; (20309 60936))
+;;;;;; (20400 16870))
;;; Generated autoloads from emacs-lock.el
(autoload 'emacs-lock-mode "emacs-lock" "\
@@ -8319,7 +8316,7 @@ Other values are interpreted as usual.
;;;***
;;;### (autoloads (report-emacs-bug-query-existing-bugs report-emacs-bug)
-;;;;;; "emacsbug" "mail/emacsbug.el" (20309 60936))
+;;;;;; "emacsbug" "mail/emacsbug.el" (20355 835))
;;; Generated autoloads from mail/emacsbug.el
(autoload 'report-emacs-bug "emacsbug" "\
@@ -8340,7 +8337,7 @@ The result is an alist with items of the form (URL SUBJECT NO).
;;;;;; emerge-revisions emerge-files-with-ancestor-remote emerge-files-remote
;;;;;; emerge-files-with-ancestor-command emerge-files-command emerge-buffers-with-ancestor
;;;;;; emerge-buffers emerge-files-with-ancestor emerge-files) "emerge"
-;;;;;; "vc/emerge.el" (20309 60936))
+;;;;;; "vc/emerge.el" (20355 835))
;;; Generated autoloads from vc/emerge.el
(autoload 'emerge-files "emerge" "\
@@ -8401,7 +8398,7 @@ Emerge two RCS revisions of a file, with another revision as ancestor.
;;;***
;;;### (autoloads (enriched-decode enriched-encode enriched-mode)
-;;;;;; "enriched" "textmodes/enriched.el" (20309 60936))
+;;;;;; "enriched" "textmodes/enriched.el" (20273 59945))
;;; Generated autoloads from textmodes/enriched.el
(autoload 'enriched-mode "enriched" "\
@@ -8441,8 +8438,8 @@ Commands:
;;;;;; epa-sign-region epa-verify-cleartext-in-region epa-verify-region
;;;;;; epa-decrypt-armor-in-region epa-decrypt-region epa-encrypt-file
;;;;;; epa-sign-file epa-verify-file epa-decrypt-file epa-select-keys
-;;;;;; epa-list-secret-keys epa-list-keys) "epa" "epa.el" (20309
-;;;;;; 60936))
+;;;;;; epa-list-secret-keys epa-list-keys) "epa" "epa.el" (20355
+;;;;;; 835))
;;; Generated autoloads from epa.el
(autoload 'epa-list-keys "epa" "\
@@ -8620,7 +8617,7 @@ Insert selected KEYS after the point.
;;;***
;;;### (autoloads (epa-dired-do-encrypt epa-dired-do-sign epa-dired-do-verify
-;;;;;; epa-dired-do-decrypt) "epa-dired" "epa-dired.el" (20309 60936))
+;;;;;; epa-dired-do-decrypt) "epa-dired" "epa-dired.el" (20229 56251))
;;; Generated autoloads from epa-dired.el
(autoload 'epa-dired-do-decrypt "epa-dired" "\
@@ -8646,7 +8643,7 @@ Encrypt marked files.
;;;***
;;;### (autoloads (epa-file-disable epa-file-enable epa-file-handler)
-;;;;;; "epa-file" "epa-file.el" (20309 60936))
+;;;;;; "epa-file" "epa-file.el" (20229 56251))
;;; Generated autoloads from epa-file.el
(autoload 'epa-file-handler "epa-file" "\
@@ -8668,7 +8665,7 @@ Encrypt marked files.
;;;### (autoloads (epa-global-mail-mode epa-mail-import-keys epa-mail-encrypt
;;;;;; epa-mail-sign epa-mail-verify epa-mail-decrypt epa-mail-mode)
-;;;;;; "epa-mail" "epa-mail.el" (20315 8755))
+;;;;;; "epa-mail" "epa-mail.el" (20325 60273))
;;; Generated autoloads from epa-mail.el
(autoload 'epa-mail-mode "epa-mail" "\
@@ -8738,7 +8735,7 @@ if ARG is omitted or nil.
;;;***
-;;;### (autoloads (epg-make-context) "epg" "epg.el" (20309 60936))
+;;;### (autoloads (epg-make-context) "epg" "epg.el" (20255 22932))
;;; Generated autoloads from epg.el
(autoload 'epg-make-context "epg" "\
@@ -8749,7 +8746,7 @@ Return a context object.
;;;***
;;;### (autoloads (epg-expand-group epg-check-configuration epg-configuration)
-;;;;;; "epg-config" "epg-config.el" (20309 60936))
+;;;;;; "epg-config" "epg-config.el" (20373 62846))
;;; Generated autoloads from epg-config.el
(autoload 'epg-configuration "epg-config" "\
@@ -8769,8 +8766,8 @@ Look at CONFIG and try to expand GROUP.
;;;***
-;;;### (autoloads (erc-handle-irc-url erc-tls erc erc-select-read-args)
-;;;;;; "erc" "erc/erc.el" (20309 60936))
+;;;### (autoloads (erc-handle-irc-url erc-tls erc-select-read-args)
+;;;;;; "erc" "erc/erc.el" (20356 48455))
;;; Generated autoloads from erc/erc.el
(autoload 'erc-select-read-args "erc" "\
@@ -8778,29 +8775,6 @@ Prompt the user for values of nick, server, port, and password.
\(fn)" nil nil)
-(autoload 'erc "erc" "\
-ERC is a powerful, modular, and extensible IRC client.
-This function is the main entry point for ERC.
-
-It permits you to select connection parameters, and then starts ERC.
-
-Non-interactively, it takes the keyword arguments
- (server (erc-compute-server))
- (port (erc-compute-port))
- (nick (erc-compute-nick))
- password
- (full-name (erc-compute-full-name)))
-
-That is, if called with
-
- (erc :server \"irc.freenode.net\" :full-name \"Harry S Truman\")
-
-then the server and full-name will be set to those values, whereas
-`erc-compute-port', `erc-compute-nick' and `erc-compute-full-name' will
-be invoked for the values of the other parameters.
-
-\(fn &key (server (erc-compute-server)) (port (erc-compute-port)) (nick (erc-compute-nick)) PASSWORD (full-name (erc-compute-full-name)))" t nil)
-
(defalias 'erc-select 'erc)
(autoload 'erc-tls "erc" "\
@@ -8818,33 +8792,33 @@ Otherwise, connect to HOST:PORT as USER and /join CHANNEL.
;;;***
-;;;### (autoloads nil "erc-autoaway" "erc/erc-autoaway.el" (20309
-;;;;;; 60936))
+;;;### (autoloads nil "erc-autoaway" "erc/erc-autoaway.el" (20355
+;;;;;; 835))
;;; Generated autoloads from erc/erc-autoaway.el
(autoload 'erc-autoaway-mode "erc-autoaway")
;;;***
-;;;### (autoloads nil "erc-button" "erc/erc-button.el" (20309 60936))
+;;;### (autoloads nil "erc-button" "erc/erc-button.el" (20355 835))
;;; Generated autoloads from erc/erc-button.el
(autoload 'erc-button-mode "erc-button" nil t)
;;;***
-;;;### (autoloads nil "erc-capab" "erc/erc-capab.el" (20309 60936))
+;;;### (autoloads nil "erc-capab" "erc/erc-capab.el" (20229 56251))
;;; Generated autoloads from erc/erc-capab.el
(autoload 'erc-capab-identify-mode "erc-capab" nil t)
;;;***
-;;;### (autoloads nil "erc-compat" "erc/erc-compat.el" (20309 60936))
+;;;### (autoloads nil "erc-compat" "erc/erc-compat.el" (20304 58723))
;;; Generated autoloads from erc/erc-compat.el
(autoload 'erc-define-minor-mode "erc-compat")
;;;***
;;;### (autoloads (erc-ctcp-query-DCC pcomplete/erc-mode/DCC erc-cmd-DCC)
-;;;;;; "erc-dcc" "erc/erc-dcc.el" (20309 60936))
+;;;;;; "erc-dcc" "erc/erc-dcc.el" (20405 16851))
;;; Generated autoloads from erc/erc-dcc.el
(autoload 'erc-dcc-mode "erc-dcc")
@@ -8877,7 +8851,7 @@ that subcommand.
;;;;;; erc-ezb-add-session erc-ezb-end-of-session-list erc-ezb-init-session-list
;;;;;; erc-ezb-identify erc-ezb-notice-autodetect erc-ezb-lookup-action
;;;;;; erc-ezb-get-login erc-cmd-ezb) "erc-ezbounce" "erc/erc-ezbounce.el"
-;;;;;; (20309 60936))
+;;;;;; (20229 56251))
;;; Generated autoloads from erc/erc-ezbounce.el
(autoload 'erc-cmd-ezb "erc-ezbounce" "\
@@ -8939,8 +8913,8 @@ Add EZBouncer convenience functions to ERC.
;;;***
-;;;### (autoloads (erc-fill) "erc-fill" "erc/erc-fill.el" (20309
-;;;;;; 60936))
+;;;### (autoloads (erc-fill) "erc-fill" "erc/erc-fill.el" (20229
+;;;;;; 56251))
;;; Generated autoloads from erc/erc-fill.el
(autoload 'erc-fill-mode "erc-fill" nil t)
@@ -8953,7 +8927,7 @@ You can put this on `erc-insert-modify-hook' and/or `erc-send-modify-hook'.
;;;***
;;;### (autoloads (erc-identd-stop erc-identd-start) "erc-identd"
-;;;;;; "erc/erc-identd.el" (20309 60936))
+;;;;;; "erc/erc-identd.el" (20229 56251))
;;; Generated autoloads from erc/erc-identd.el
(autoload 'erc-identd-mode "erc-identd")
@@ -8975,7 +8949,7 @@ system.
;;;***
;;;### (autoloads (erc-create-imenu-index) "erc-imenu" "erc/erc-imenu.el"
-;;;;;; (20309 60936))
+;;;;;; (20229 56251))
;;; Generated autoloads from erc/erc-imenu.el
(autoload 'erc-create-imenu-index "erc-imenu" "\
@@ -8985,20 +8959,20 @@ system.
;;;***
-;;;### (autoloads nil "erc-join" "erc/erc-join.el" (20309 60936))
+;;;### (autoloads nil "erc-join" "erc/erc-join.el" (20356 48455))
;;; Generated autoloads from erc/erc-join.el
(autoload 'erc-autojoin-mode "erc-join" nil t)
;;;***
-;;;### (autoloads nil "erc-list" "erc/erc-list.el" (20309 60936))
+;;;### (autoloads nil "erc-list" "erc/erc-list.el" (20229 56251))
;;; Generated autoloads from erc/erc-list.el
(autoload 'erc-list-mode "erc-list")
;;;***
;;;### (autoloads (erc-save-buffer-in-logs erc-logging-enabled) "erc-log"
-;;;;;; "erc/erc-log.el" (20309 60936))
+;;;;;; "erc/erc-log.el" (20355 835))
;;; Generated autoloads from erc/erc-log.el
(autoload 'erc-log-mode "erc-log" nil t)
@@ -9030,7 +9004,7 @@ You can save every individual message by putting this function on
;;;### (autoloads (erc-delete-dangerous-host erc-add-dangerous-host
;;;;;; erc-delete-keyword erc-add-keyword erc-delete-fool erc-add-fool
;;;;;; erc-delete-pal erc-add-pal) "erc-match" "erc/erc-match.el"
-;;;;;; (20309 60936))
+;;;;;; (20355 835))
;;; Generated autoloads from erc/erc-match.el
(autoload 'erc-match-mode "erc-match")
@@ -9076,14 +9050,14 @@ Delete dangerous-host interactively to `erc-dangerous-hosts'.
;;;***
-;;;### (autoloads nil "erc-menu" "erc/erc-menu.el" (20309 60936))
+;;;### (autoloads nil "erc-menu" "erc/erc-menu.el" (20229 56251))
;;; Generated autoloads from erc/erc-menu.el
(autoload 'erc-menu-mode "erc-menu" nil t)
;;;***
;;;### (autoloads (erc-cmd-WHOLEFT) "erc-netsplit" "erc/erc-netsplit.el"
-;;;;;; (20309 60936))
+;;;;;; (20229 56251))
;;; Generated autoloads from erc/erc-netsplit.el
(autoload 'erc-netsplit-mode "erc-netsplit")
@@ -9095,7 +9069,7 @@ Show who's gone.
;;;***
;;;### (autoloads (erc-server-select erc-determine-network) "erc-networks"
-;;;;;; "erc/erc-networks.el" (20309 60936))
+;;;;;; "erc/erc-networks.el" (20229 56251))
;;; Generated autoloads from erc/erc-networks.el
(autoload 'erc-determine-network "erc-networks" "\
@@ -9113,7 +9087,7 @@ Interactively select a server to connect to using `erc-server-alist'.
;;;***
;;;### (autoloads (pcomplete/erc-mode/NOTIFY erc-cmd-NOTIFY) "erc-notify"
-;;;;;; "erc/erc-notify.el" (20309 60936))
+;;;;;; "erc/erc-notify.el" (20355 835))
;;; Generated autoloads from erc/erc-notify.el
(autoload 'erc-notify-mode "erc-notify" nil t)
@@ -9131,33 +9105,33 @@ with args, toggle notify status of people.
;;;***
-;;;### (autoloads nil "erc-page" "erc/erc-page.el" (20309 60936))
+;;;### (autoloads nil "erc-page" "erc/erc-page.el" (20239 35035))
;;; Generated autoloads from erc/erc-page.el
(autoload 'erc-page-mode "erc-page")
;;;***
-;;;### (autoloads nil "erc-pcomplete" "erc/erc-pcomplete.el" (20309
-;;;;;; 60936))
+;;;### (autoloads nil "erc-pcomplete" "erc/erc-pcomplete.el" (20355
+;;;;;; 835))
;;; Generated autoloads from erc/erc-pcomplete.el
(autoload 'erc-completion-mode "erc-pcomplete" nil t)
;;;***
-;;;### (autoloads nil "erc-replace" "erc/erc-replace.el" (20309 60936))
+;;;### (autoloads nil "erc-replace" "erc/erc-replace.el" (20229 56251))
;;; Generated autoloads from erc/erc-replace.el
(autoload 'erc-replace-mode "erc-replace")
;;;***
-;;;### (autoloads nil "erc-ring" "erc/erc-ring.el" (20309 60936))
+;;;### (autoloads nil "erc-ring" "erc/erc-ring.el" (20229 56251))
;;; Generated autoloads from erc/erc-ring.el
(autoload 'erc-ring-mode "erc-ring" nil t)
;;;***
;;;### (autoloads (erc-nickserv-identify erc-nickserv-identify-mode)
-;;;;;; "erc-services" "erc/erc-services.el" (20309 60936))
+;;;;;; "erc-services" "erc/erc-services.el" (20357 51632))
;;; Generated autoloads from erc/erc-services.el
(autoload 'erc-services-mode "erc-services" nil t)
@@ -9174,14 +9148,14 @@ When called interactively, read the password using `read-passwd'.
;;;***
-;;;### (autoloads nil "erc-sound" "erc/erc-sound.el" (20309 60936))
+;;;### (autoloads nil "erc-sound" "erc/erc-sound.el" (20355 835))
;;; Generated autoloads from erc/erc-sound.el
(autoload 'erc-sound-mode "erc-sound")
;;;***
;;;### (autoloads (erc-speedbar-browser) "erc-speedbar" "erc/erc-speedbar.el"
-;;;;;; (20309 60936))
+;;;;;; (20229 56251))
;;; Generated autoloads from erc/erc-speedbar.el
(autoload 'erc-speedbar-browser "erc-speedbar" "\
@@ -9192,21 +9166,21 @@ This will add a speedbar major display mode.
;;;***
-;;;### (autoloads nil "erc-spelling" "erc/erc-spelling.el" (20309
-;;;;;; 60936))
+;;;### (autoloads nil "erc-spelling" "erc/erc-spelling.el" (20229
+;;;;;; 56251))
;;; Generated autoloads from erc/erc-spelling.el
(autoload 'erc-spelling-mode "erc-spelling" nil t)
;;;***
-;;;### (autoloads nil "erc-stamp" "erc/erc-stamp.el" (20309 60936))
+;;;### (autoloads nil "erc-stamp" "erc/erc-stamp.el" (20355 835))
;;; Generated autoloads from erc/erc-stamp.el
(autoload 'erc-timestamp-mode "erc-stamp" nil t)
;;;***
;;;### (autoloads (erc-track-minor-mode) "erc-track" "erc/erc-track.el"
-;;;;;; (20309 60936))
+;;;;;; (20355 835))
;;; Generated autoloads from erc/erc-track.el
(defvar erc-track-minor-mode nil "\
@@ -9232,7 +9206,7 @@ keybindings will not do anything useful.
;;;***
;;;### (autoloads (erc-truncate-buffer erc-truncate-buffer-to-size)
-;;;;;; "erc-truncate" "erc/erc-truncate.el" (20309 60936))
+;;;;;; "erc-truncate" "erc/erc-truncate.el" (20355 835))
;;; Generated autoloads from erc/erc-truncate.el
(autoload 'erc-truncate-mode "erc-truncate" nil t)
@@ -9252,7 +9226,7 @@ Meant to be used in hooks, like `erc-insert-post-hook'.
;;;***
;;;### (autoloads (erc-xdcc-add-file) "erc-xdcc" "erc/erc-xdcc.el"
-;;;;;; (20309 60936))
+;;;;;; (20355 835))
;;; Generated autoloads from erc/erc-xdcc.el
(autoload 'erc-xdcc-mode "erc-xdcc")
@@ -9264,31 +9238,10 @@ Add a file to `erc-xdcc-files'.
;;;***
;;;### (autoloads (ert-describe-test ert-run-tests-interactively
-;;;;;; ert-run-tests-batch-and-exit ert-run-tests-batch ert-deftest)
-;;;;;; "ert" "emacs-lisp/ert.el" (20309 60936))
+;;;;;; ert-run-tests-batch-and-exit ert-run-tests-batch) "ert" "emacs-lisp/ert.el"
+;;;;;; (20355 835))
;;; Generated autoloads from emacs-lisp/ert.el
-(autoload 'ert-deftest "ert" "\
-Define NAME (a symbol) as a test.
-
-BODY is evaluated as a `progn' when the test is run. It should
-signal a condition on failure or just return if the test passes.
-
-`should', `should-not' and `should-error' are useful for
-assertions in BODY.
-
-Use `ert' to run tests interactively.
-
-Tests that are expected to fail can be marked as such
-using :expected-result. See `ert-test-result-type-p' for a
-description of valid values for RESULT-TYPE.
-
-\(fn NAME () [DOCSTRING] [:expected-result RESULT-TYPE] [:tags '(TAG...)] BODY...)" nil (quote macro))
-
-(put 'ert-deftest 'lisp-indent-function '2)
-
-(put 'ert-deftest 'doc-string-elt '3)
-
(put 'ert-deftest 'lisp-indent-function 2)
(put 'ert-info 'lisp-indent-function 1)
@@ -9335,7 +9288,7 @@ Display the documentation for TEST-OR-TEST-NAME (a symbol or ert-test).
;;;***
;;;### (autoloads (ert-kill-all-test-buffers) "ert-x" "emacs-lisp/ert-x.el"
-;;;;;; (20309 60936))
+;;;;;; (20370 4296))
;;; Generated autoloads from emacs-lisp/ert-x.el
(put 'ert-with-test-buffer 'lisp-indent-function 1)
@@ -9347,8 +9300,8 @@ Kill all test buffers that are still live.
;;;***
-;;;### (autoloads (eshell-mode) "esh-mode" "eshell/esh-mode.el" (20309
-;;;;;; 60936))
+;;;### (autoloads (eshell-mode) "esh-mode" "eshell/esh-mode.el" (20229
+;;;;;; 56251))
;;; Generated autoloads from eshell/esh-mode.el
(autoload 'eshell-mode "esh-mode" "\
@@ -9361,7 +9314,7 @@ Emacs shell interactive mode.
;;;***
;;;### (autoloads (eshell-command-result eshell-command eshell) "eshell"
-;;;;;; "eshell/eshell.el" (20309 60936))
+;;;;;; "eshell/eshell.el" (20373 62846))
;;; Generated autoloads from eshell/eshell.el
(autoload 'eshell "eshell" "\
@@ -9402,11 +9355,11 @@ corresponding to a successful execution.
;;;;;; visit-tags-table tags-table-mode find-tag-default-function
;;;;;; find-tag-hook tags-add-tables tags-compression-info-list
;;;;;; tags-table-list tags-case-fold-search) "etags" "progmodes/etags.el"
-;;;;;; (20332 33075))
+;;;;;; (20389 6410))
;;; Generated autoloads from progmodes/etags.el
(defvar tags-file-name nil "\
-*File name of tags table.
+File name of tags table.
To switch to a new tags table, setting this variable is sufficient.
If you set this variable, do not also set `tags-table-list'.
Use the `etags' program to make a tags table file.")
@@ -9414,14 +9367,14 @@ Use the `etags' program to make a tags table file.")
(put 'tags-file-name 'safe-local-variable 'stringp)
(defvar tags-case-fold-search 'default "\
-*Whether tags operations should be case-sensitive.
+Whether tags operations should be case-sensitive.
A value of t means case-insensitive, a value of nil means case-sensitive.
Any other value means use the setting of `case-fold-search'.")
(custom-autoload 'tags-case-fold-search "etags" t)
(defvar tags-table-list nil "\
-*List of file names of tags tables to search.
+List of file names of tags tables to search.
An element that is a directory means the file \"TAGS\" in that directory.
To switch to a new list of tags tables, setting this variable is sufficient.
If you set this variable, do not also set `tags-file-name'.
@@ -9430,7 +9383,7 @@ Use the `etags' program to make a tags table file.")
(custom-autoload 'tags-table-list "etags" t)
(defvar tags-compression-info-list (purecopy '("" ".Z" ".bz2" ".gz" ".xz" ".tgz")) "\
-*List of extensions tried by etags when jka-compr is used.
+List of extensions tried by etags when jka-compr is used.
An empty string means search the non-compressed file.
These extensions will be tried only if jka-compr was activated
\(i.e. via customize of `auto-compression-mode' or by calling the function
@@ -9439,7 +9392,7 @@ These extensions will be tried only if jka-compr was activated
(custom-autoload 'tags-compression-info-list "etags" t)
(defvar tags-add-tables 'ask-user "\
-*Control whether to add a new tags table to the current list.
+Control whether to add a new tags table to the current list.
t means do; nil means don't (always start a new list).
Any other value means ask the user whether to add a new tags table
to the current list (as opposed to starting a new list).")
@@ -9447,14 +9400,14 @@ to the current list (as opposed to starting a new list).")
(custom-autoload 'tags-add-tables "etags" t)
(defvar find-tag-hook nil "\
-*Hook to be run by \\[find-tag] after finding a tag. See `run-hooks'.
+Hook to be run by \\[find-tag] after finding a tag. See `run-hooks'.
The value in the buffer in which \\[find-tag] is done is used,
not the value in the buffer \\[find-tag] goes to.")
(custom-autoload 'find-tag-hook "etags" t)
(defvar find-tag-default-function nil "\
-*A function of no arguments used by \\[find-tag] to pick a default tag.
+A function of no arguments used by \\[find-tag] to pick a default tag.
If nil, and the symbol that is the value of `major-mode'
has a `find-tag-default-function' property (see `put'), that is used.
Otherwise, `find-tag-default' is used.")
@@ -9720,7 +9673,7 @@ for \\[find-tag] (which see).
;;;;;; ethio-fidel-to-sera-marker ethio-fidel-to-sera-region ethio-fidel-to-sera-buffer
;;;;;; ethio-sera-to-fidel-marker ethio-sera-to-fidel-region ethio-sera-to-fidel-buffer
;;;;;; setup-ethiopic-environment-internal) "ethio-util" "language/ethio-util.el"
-;;;;;; (20309 60936))
+;;;;;; (20355 835))
;;; Generated autoloads from language/ethio-util.el
(autoload 'setup-ethiopic-environment-internal "ethio-util" "\
@@ -9890,7 +9843,7 @@ With ARG, insert that many delimiters.
;;;### (autoloads (eudc-load-eudc eudc-query-form eudc-expand-inline
;;;;;; eudc-get-phone eudc-get-email eudc-set-server) "eudc" "net/eudc.el"
-;;;;;; (20309 60936))
+;;;;;; (20304 58723))
;;; Generated autoloads from net/eudc.el
(autoload 'eudc-set-server "eudc" "\
@@ -9946,7 +9899,7 @@ This does nothing except loading eudc by autoload side-effect.
;;;### (autoloads (eudc-display-jpeg-as-button eudc-display-jpeg-inline
;;;;;; eudc-display-sound eudc-display-mail eudc-display-url eudc-display-generic-binary)
-;;;;;; "eudc-bob" "net/eudc-bob.el" (20309 60936))
+;;;;;; "eudc-bob" "net/eudc-bob.el" (20229 56251))
;;; Generated autoloads from net/eudc-bob.el
(autoload 'eudc-display-generic-binary "eudc-bob" "\
@@ -9982,7 +9935,7 @@ Display a button for the JPEG DATA.
;;;***
;;;### (autoloads (eudc-try-bbdb-insert eudc-insert-record-at-point-into-bbdb)
-;;;;;; "eudc-export" "net/eudc-export.el" (20309 60936))
+;;;;;; "eudc-export" "net/eudc-export.el" (20229 56251))
;;; Generated autoloads from net/eudc-export.el
(autoload 'eudc-insert-record-at-point-into-bbdb "eudc-export" "\
@@ -9999,7 +9952,7 @@ Call `eudc-insert-record-at-point-into-bbdb' if on a record.
;;;***
;;;### (autoloads (eudc-edit-hotlist) "eudc-hotlist" "net/eudc-hotlist.el"
-;;;;;; (20309 60936))
+;;;;;; (20229 56251))
;;; Generated autoloads from net/eudc-hotlist.el
(autoload 'eudc-edit-hotlist "eudc-hotlist" "\
@@ -10009,8 +9962,8 @@ Edit the hotlist of directory servers in a specialized buffer.
;;;***
-;;;### (autoloads (ewoc-create) "ewoc" "emacs-lisp/ewoc.el" (20309
-;;;;;; 60936))
+;;;### (autoloads (ewoc-create) "ewoc" "emacs-lisp/ewoc.el" (20376
+;;;;;; 50401))
;;; Generated autoloads from emacs-lisp/ewoc.el
(autoload 'ewoc-create "ewoc" "\
@@ -10039,7 +9992,7 @@ fourth arg NOSEP non-nil inhibits this.
;;;### (autoloads (executable-make-buffer-file-executable-if-script-p
;;;;;; executable-self-display executable-set-magic executable-interpret
;;;;;; executable-command-find-posix-p) "executable" "progmodes/executable.el"
-;;;;;; (20309 60936))
+;;;;;; (20355 835))
;;; Generated autoloads from progmodes/executable.el
(autoload 'executable-command-find-posix-p "executable" "\
@@ -10082,7 +10035,7 @@ file modes.
;;;### (autoloads (expand-jump-to-next-slot expand-jump-to-previous-slot
;;;;;; expand-abbrev-hook expand-add-abbrevs) "expand" "expand.el"
-;;;;;; (20309 60936))
+;;;;;; (20229 56251))
;;; Generated autoloads from expand.el
(autoload 'expand-add-abbrevs "expand" "\
@@ -10131,7 +10084,7 @@ This is used only in conjunction with `expand-add-abbrevs'.
;;;***
-;;;### (autoloads (f90-mode) "f90" "progmodes/f90.el" (20309 60936))
+;;;### (autoloads (f90-mode) "f90" "progmodes/f90.el" (20389 6410))
;;; Generated autoloads from progmodes/f90.el
(autoload 'f90-mode "f90" "\
@@ -10201,8 +10154,8 @@ with no args, if that value is non-nil.
;;;### (autoloads (variable-pitch-mode buffer-face-toggle buffer-face-set
;;;;;; buffer-face-mode text-scale-adjust text-scale-decrease text-scale-increase
;;;;;; text-scale-set face-remap-set-base face-remap-reset-base
-;;;;;; face-remap-add-relative) "face-remap" "face-remap.el" (20329
-;;;;;; 30063))
+;;;;;; face-remap-add-relative) "face-remap" "face-remap.el" (20389
+;;;;;; 6410))
;;; Generated autoloads from face-remap.el
(autoload 'face-remap-add-relative "face-remap" "\
@@ -10350,7 +10303,7 @@ Besides the choice of face, it is the same as `buffer-face-mode'.
;;;### (autoloads (feedmail-queue-reminder feedmail-run-the-queue
;;;;;; feedmail-run-the-queue-global-prompt feedmail-run-the-queue-no-prompts
-;;;;;; feedmail-send-it) "feedmail" "mail/feedmail.el" (20309 60936))
+;;;;;; feedmail-send-it) "feedmail" "mail/feedmail.el" (20389 6410))
;;; Generated autoloads from mail/feedmail.el
(autoload 'feedmail-send-it "feedmail" "\
@@ -10403,8 +10356,9 @@ you can set `feedmail-queue-reminder-alist' to nil.
;;;***
-;;;### (autoloads (ffap-bindings dired-at-point ffap-at-mouse ffap-menu
-;;;;;; find-file-at-point ffap-next) "ffap" "ffap.el" (20309 60936))
+;;;### (autoloads (ffap-bindings ffap-guess-file-name-at-point dired-at-point
+;;;;;; ffap-at-mouse ffap-menu find-file-at-point ffap-next) "ffap"
+;;;;;; "ffap.el" (20395 46900))
;;; Generated autoloads from ffap.el
(autoload 'ffap-next "ffap" "\
@@ -10454,9 +10408,11 @@ If `dired-at-point-require-prefix' is set, the prefix meaning is reversed.
\(fn &optional FILENAME)" t nil)
-(defun ffap-guess-file-name-at-point nil "\
+(autoload 'ffap-guess-file-name-at-point "ffap" "\
Try to get a file name at point.
-This hook is intended to be put in `file-name-at-point-functions'." (when (fboundp (quote ffap-guesser)) (let ((guess (ffap-guesser))) (setq guess (if (or (not guess) (and (fboundp (quote ffap-url-p)) (ffap-url-p guess)) (and (fboundp (quote ffap-file-remote-p)) (ffap-file-remote-p guess))) guess (abbreviate-file-name (expand-file-name guess)))) (when guess (if (file-directory-p guess) (file-name-as-directory guess) guess)))))
+This hook is intended to be put in `file-name-at-point-functions'.
+
+\(fn)" nil nil)
(autoload 'ffap-bindings "ffap" "\
Evaluate the forms in variable `ffap-bindings'.
@@ -10468,7 +10424,7 @@ Evaluate the forms in variable `ffap-bindings'.
;;;### (autoloads (file-cache-minibuffer-complete file-cache-add-directory-recursively
;;;;;; file-cache-add-directory-using-locate file-cache-add-directory-using-find
;;;;;; file-cache-add-file file-cache-add-directory-list file-cache-add-directory)
-;;;;;; "filecache" "filecache.el" (20309 60936))
+;;;;;; "filecache" "filecache.el" (20229 56251))
;;; Generated autoloads from filecache.el
(autoload 'file-cache-add-directory "filecache" "\
@@ -10528,7 +10484,7 @@ the name is considered already unique; only the second substitution
;;;;;; copy-file-locals-to-dir-locals delete-dir-local-variable
;;;;;; add-dir-local-variable delete-file-local-variable-prop-line
;;;;;; add-file-local-variable-prop-line delete-file-local-variable
-;;;;;; add-file-local-variable) "files-x" "files-x.el" (20309 60936))
+;;;;;; add-file-local-variable) "files-x" "files-x.el" (20355 835))
;;; Generated autoloads from files-x.el
(autoload 'add-file-local-variable "files-x" "\
@@ -10593,8 +10549,8 @@ Copy directory-local variables to the -*- line.
;;;***
-;;;### (autoloads (filesets-init) "filesets" "filesets.el" (20309
-;;;;;; 60936))
+;;;### (autoloads (filesets-init) "filesets" "filesets.el" (20304
+;;;;;; 58723))
;;; Generated autoloads from filesets.el
(autoload 'filesets-init "filesets" "\
@@ -10605,7 +10561,7 @@ Set up hooks, load the cache file -- if existing -- and build the menu.
;;;***
-;;;### (autoloads (find-cmd) "find-cmd" "find-cmd.el" (20309 60936))
+;;;### (autoloads (find-cmd) "find-cmd" "find-cmd.el" (20229 56251))
;;; Generated autoloads from find-cmd.el
(autoload 'find-cmd "find-cmd" "\
@@ -10625,7 +10581,7 @@ result is a string that should be ready for the command line.
;;;***
;;;### (autoloads (find-grep-dired find-name-dired find-dired) "find-dired"
-;;;;;; "find-dired.el" (20309 60936))
+;;;;;; "find-dired.el" (20255 22932))
;;; Generated autoloads from find-dired.el
(autoload 'find-dired "find-dired" "\
@@ -10664,18 +10620,20 @@ use in place of \"-ls\" as the final argument.
;;;***
;;;### (autoloads (ff-mouse-find-other-file-other-window ff-mouse-find-other-file
-;;;;;; ff-find-other-file ff-get-other-file) "find-file" "find-file.el"
-;;;;;; (20309 60936))
+;;;;;; ff-find-other-file ff-get-other-file ff-special-constructs)
+;;;;;; "find-file" "find-file.el" (20389 6410))
;;; Generated autoloads from find-file.el
(defvar ff-special-constructs `((,(purecopy "^#\\s *\\(include\\|import\\)\\s +[<\"]\\(.*\\)[>\"]") lambda nil (buffer-substring (match-beginning 2) (match-end 2)))) "\
-*List of special constructs for `ff-treat-as-special' to recognize.
+List of special constructs recognized by `ff-treat-as-special'.
Each element, tried in order, has the form (REGEXP . EXTRACT).
If REGEXP matches the current line (from the beginning of the line),
`ff-treat-as-special' calls function EXTRACT with no args.
If EXTRACT returns nil, keep trying. Otherwise, return the
filename that EXTRACT returned.")
+(custom-autoload 'ff-special-constructs "find-file" t)
+
(autoload 'ff-get-other-file "find-file" "\
Find the header or source file corresponding to this file.
See also the documentation for `ff-find-other-file'.
@@ -10759,7 +10717,7 @@ Visit the file you click on in another window.
;;;;;; find-variable find-variable-noselect find-function-other-frame
;;;;;; find-function-other-window find-function find-function-noselect
;;;;;; find-function-search-for-symbol find-library) "find-func"
-;;;;;; "emacs-lisp/find-func.el" (20309 60936))
+;;;;;; "emacs-lisp/find-func.el" (20229 56251))
;;; Generated autoloads from emacs-lisp/find-func.el
(autoload 'find-library "find-func" "\
@@ -10918,7 +10876,7 @@ Define some key bindings for the find-function family of functions.
;;;***
;;;### (autoloads (find-lisp-find-dired-filter find-lisp-find-dired-subdirectories
-;;;;;; find-lisp-find-dired) "find-lisp" "find-lisp.el" (20309 60936))
+;;;;;; find-lisp-find-dired) "find-lisp" "find-lisp.el" (20229 56251))
;;; Generated autoloads from find-lisp.el
(autoload 'find-lisp-find-dired "find-lisp" "\
@@ -10939,7 +10897,7 @@ Change the filter on a find-lisp-find-dired buffer to REGEXP.
;;;***
;;;### (autoloads (finder-by-keyword finder-commentary finder-list-keywords)
-;;;;;; "finder" "finder.el" (20309 60936))
+;;;;;; "finder" "finder.el" (20229 56251))
;;; Generated autoloads from finder.el
(autoload 'finder-list-keywords "finder" "\
@@ -10961,7 +10919,7 @@ Find packages matching a given keyword.
;;;***
;;;### (autoloads (enable-flow-control-on enable-flow-control) "flow-ctrl"
-;;;;;; "flow-ctrl.el" (20309 60936))
+;;;;;; "flow-ctrl.el" (20229 56251))
;;; Generated autoloads from flow-ctrl.el
(autoload 'enable-flow-control "flow-ctrl" "\
@@ -10983,7 +10941,7 @@ to get the effect of a C-q.
;;;***
;;;### (autoloads (fill-flowed fill-flowed-encode) "flow-fill" "gnus/flow-fill.el"
-;;;;;; (20309 60936))
+;;;;;; (20229 56251))
;;; Generated autoloads from gnus/flow-fill.el
(autoload 'fill-flowed-encode "flow-fill" "\
@@ -10999,7 +10957,7 @@ to get the effect of a C-q.
;;;***
;;;### (autoloads (flymake-find-file-hook flymake-mode-off flymake-mode-on
-;;;;;; flymake-mode) "flymake" "progmodes/flymake.el" (20309 60936))
+;;;;;; flymake-mode) "flymake" "progmodes/flymake.el" (20373 62846))
;;; Generated autoloads from progmodes/flymake.el
(autoload 'flymake-mode "flymake" "\
@@ -11029,7 +10987,7 @@ Turn flymake mode off.
;;;### (autoloads (flyspell-buffer flyspell-region flyspell-mode-off
;;;;;; turn-off-flyspell turn-on-flyspell flyspell-mode flyspell-prog-mode)
-;;;;;; "flyspell" "textmodes/flyspell.el" (20309 60936))
+;;;;;; "flyspell" "textmodes/flyspell.el" (20405 16851))
;;; Generated autoloads from textmodes/flyspell.el
(autoload 'flyspell-prog-mode "flyspell" "\
@@ -11101,7 +11059,7 @@ Flyspell whole buffer.
;;;### (autoloads (follow-delete-other-windows-and-split follow-mode
;;;;;; turn-off-follow-mode turn-on-follow-mode) "follow" "follow.el"
-;;;;;; (20329 33834))
+;;;;;; (20389 6410))
;;; Generated autoloads from follow.el
(autoload 'turn-on-follow-mode "follow" "\
@@ -11144,10 +11102,6 @@ To split one large window into two side-by-side windows, the commands
Only windows displayed in the same frame follow each other.
-If the variable `follow-intercept-processes' is non-nil, Follow mode
-will listen to the output of processes and redisplay accordingly.
-\(This is the default.)
-
This command runs the normal hook `follow-mode-hook'.
Keys specific to Follow mode:
@@ -11169,16 +11123,12 @@ If ARG is positive, the leftmost window is selected. If negative,
the rightmost is selected. If ARG is nil, the leftmost window is
selected if the original window is the first one in the frame.
-To bind this command to a hotkey, place the following line
-in your `~/.emacs' file, replacing [f7] by your favorite key:
- (global-set-key [f7] 'follow-delete-other-windows-and-split)
-
\(fn &optional ARG)" t nil)
;;;***
-;;;### (autoloads (footnote-mode) "footnote" "mail/footnote.el" (20309
-;;;;;; 60936))
+;;;### (autoloads (footnote-mode) "footnote" "mail/footnote.el" (20389
+;;;;;; 6410))
;;; Generated autoloads from mail/footnote.el
(autoload 'footnote-mode "footnote" "\
@@ -11197,7 +11147,7 @@ play around with the following keys:
;;;***
;;;### (autoloads (forms-find-file-other-window forms-find-file forms-mode)
-;;;;;; "forms" "forms.el" (20341 24416))
+;;;;;; "forms" "forms.el" (20392 26928))
;;; Generated autoloads from forms.el
(autoload 'forms-mode "forms" "\
@@ -11234,7 +11184,7 @@ Visit a file in Forms mode in other window.
;;;***
;;;### (autoloads (fortran-mode) "fortran" "progmodes/fortran.el"
-;;;;;; (20309 60936))
+;;;;;; (20229 56251))
;;; Generated autoloads from progmodes/fortran.el
(autoload 'fortran-mode "fortran" "\
@@ -11312,7 +11262,7 @@ with no args, if that value is non-nil.
;;;***
;;;### (autoloads (fortune fortune-to-signature fortune-compile fortune-from-region
-;;;;;; fortune-add-fortune) "fortune" "play/fortune.el" (20309 60936))
+;;;;;; fortune-add-fortune) "fortune" "play/fortune.el" (20229 56251))
;;; Generated autoloads from play/fortune.el
(autoload 'fortune-add-fortune "fortune" "\
@@ -11361,7 +11311,7 @@ and choose the directory as the fortune-file.
;;;***
;;;### (autoloads (gdb gdb-enable-debug) "gdb-mi" "progmodes/gdb-mi.el"
-;;;;;; (20320 14810))
+;;;;;; (20405 42390))
;;; Generated autoloads from progmodes/gdb-mi.el
(defvar gdb-enable-debug nil "\
@@ -11428,8 +11378,8 @@ detailed description of this mode.
;;;***
;;;### (autoloads (generic-make-keywords-list generic-mode generic-mode-internal
-;;;;;; define-generic-mode) "generic" "emacs-lisp/generic.el" (20309
-;;;;;; 60936))
+;;;;;; define-generic-mode) "generic" "emacs-lisp/generic.el" (20405
+;;;;;; 42390))
;;; Generated autoloads from emacs-lisp/generic.el
(defvar generic-mode-list nil "\
@@ -11473,6 +11423,8 @@ See the file generic-x.el for some examples of `define-generic-mode'.
\(fn MODE COMMENT-LIST KEYWORD-LIST FONT-LOCK-LIST AUTO-MODE-LIST FUNCTION-LIST &optional DOCSTRING)" nil (quote macro))
+(put 'define-generic-mode 'doc-string-elt '7)
+
(put 'define-generic-mode 'lisp-indent-function '1)
(autoload 'generic-mode-internal "generic" "\
@@ -11506,7 +11458,7 @@ regular expression that can be used as an element of
;;;***
;;;### (autoloads (glasses-mode) "glasses" "progmodes/glasses.el"
-;;;;;; (20309 60936))
+;;;;;; (20355 835))
;;; Generated autoloads from progmodes/glasses.el
(autoload 'glasses-mode "glasses" "\
@@ -11522,7 +11474,7 @@ add virtual separators (like underscores) at places they belong to.
;;;### (autoloads (gmm-tool-bar-from-list gmm-widget-p gmm-error
;;;;;; gmm-message gmm-regexp-concat) "gmm-utils" "gnus/gmm-utils.el"
-;;;;;; (20309 60936))
+;;;;;; (20304 58723))
;;; Generated autoloads from gnus/gmm-utils.el
(autoload 'gmm-regexp-concat "gmm-utils" "\
@@ -11577,7 +11529,7 @@ DEFAULT-MAP specifies the default key map for ICON-LIST.
;;;***
;;;### (autoloads (gnus gnus-other-frame gnus-slave gnus-no-server
-;;;;;; gnus-slave-no-server) "gnus" "gnus/gnus.el" (20309 60936))
+;;;;;; gnus-slave-no-server) "gnus" "gnus/gnus.el" (20379 60745))
;;; Generated autoloads from gnus/gnus.el
(when (fboundp 'custom-autoload)
(custom-autoload 'gnus-select-method "gnus"))
@@ -11630,7 +11582,7 @@ prompt the user for the name of an NNTP server to use.
;;;;;; gnus-agent-get-undownloaded-list gnus-agent-delete-group
;;;;;; gnus-agent-rename-group gnus-agent-possibly-save-gcc gnus-agentize
;;;;;; gnus-slave-unplugged gnus-plugged gnus-unplugged) "gnus-agent"
-;;;;;; "gnus/gnus-agent.el" (20309 60936))
+;;;;;; "gnus/gnus-agent.el" (20304 58723))
;;; Generated autoloads from gnus/gnus-agent.el
(autoload 'gnus-unplugged "gnus-agent" "\
@@ -11721,7 +11673,7 @@ If CLEAN, obsolete (ignore).
;;;***
;;;### (autoloads (gnus-article-prepare-display) "gnus-art" "gnus/gnus-art.el"
-;;;;;; (20309 60936))
+;;;;;; (20360 57703))
;;; Generated autoloads from gnus/gnus-art.el
(autoload 'gnus-article-prepare-display "gnus-art" "\
@@ -11732,7 +11684,7 @@ Make the current buffer look like a nice article.
;;;***
;;;### (autoloads (gnus-bookmark-bmenu-list gnus-bookmark-jump gnus-bookmark-set)
-;;;;;; "gnus-bookmark" "gnus/gnus-bookmark.el" (20309 60936))
+;;;;;; "gnus-bookmark" "gnus/gnus-bookmark.el" (20229 56251))
;;; Generated autoloads from gnus/gnus-bookmark.el
(autoload 'gnus-bookmark-set "gnus-bookmark" "\
@@ -11757,8 +11709,8 @@ deletion, or > if it is flagged for displaying.
;;;### (autoloads (gnus-cache-delete-group gnus-cache-rename-group
;;;;;; gnus-cache-generate-nov-databases gnus-cache-generate-active
-;;;;;; gnus-jog-cache) "gnus-cache" "gnus/gnus-cache.el" (20309
-;;;;;; 60936))
+;;;;;; gnus-jog-cache) "gnus-cache" "gnus/gnus-cache.el" (20229
+;;;;;; 56251))
;;; Generated autoloads from gnus/gnus-cache.el
(autoload 'gnus-jog-cache "gnus-cache" "\
@@ -11800,7 +11752,7 @@ supported.
;;;***
;;;### (autoloads (gnus-delay-initialize gnus-delay-send-queue gnus-delay-article)
-;;;;;; "gnus-delay" "gnus/gnus-delay.el" (20309 60936))
+;;;;;; "gnus-delay" "gnus/gnus-delay.el" (20229 56251))
;;; Generated autoloads from gnus/gnus-delay.el
(autoload 'gnus-delay-article "gnus-delay" "\
@@ -11836,7 +11788,7 @@ Checking delayed messages is skipped if optional arg NO-CHECK is non-nil.
;;;***
;;;### (autoloads (gnus-user-format-function-D gnus-user-format-function-d)
-;;;;;; "gnus-diary" "gnus/gnus-diary.el" (20309 60936))
+;;;;;; "gnus-diary" "gnus/gnus-diary.el" (20229 56251))
;;; Generated autoloads from gnus/gnus-diary.el
(autoload 'gnus-user-format-function-d "gnus-diary" "\
@@ -11852,7 +11804,7 @@ Checking delayed messages is skipped if optional arg NO-CHECK is non-nil.
;;;***
;;;### (autoloads (turn-on-gnus-dired-mode) "gnus-dired" "gnus/gnus-dired.el"
-;;;;;; (20309 60936))
+;;;;;; (20229 56251))
;;; Generated autoloads from gnus/gnus-dired.el
(autoload 'turn-on-gnus-dired-mode "gnus-dired" "\
@@ -11863,7 +11815,7 @@ Convenience method to turn on gnus-dired-mode.
;;;***
;;;### (autoloads (gnus-draft-reminder) "gnus-draft" "gnus/gnus-draft.el"
-;;;;;; (20309 60936))
+;;;;;; (20229 56251))
;;; Generated autoloads from gnus/gnus-draft.el
(autoload 'gnus-draft-reminder "gnus-draft" "\
@@ -11875,8 +11827,8 @@ Reminder user if there are unsent drafts.
;;;### (autoloads (gnus-convert-png-to-face gnus-convert-face-to-png
;;;;;; gnus-face-from-file gnus-x-face-from-file gnus-insert-random-x-face-header
-;;;;;; gnus-random-x-face) "gnus-fun" "gnus/gnus-fun.el" (20309
-;;;;;; 60936))
+;;;;;; gnus-random-x-face) "gnus-fun" "gnus/gnus-fun.el" (20229
+;;;;;; 56251))
;;; Generated autoloads from gnus/gnus-fun.el
(autoload 'gnus-random-x-face "gnus-fun" "\
@@ -11921,7 +11873,7 @@ FILE should be a PNG file that's 48x48 and smaller than or equal to
;;;***
;;;### (autoloads (gnus-treat-mail-gravatar gnus-treat-from-gravatar)
-;;;;;; "gnus-gravatar" "gnus/gnus-gravatar.el" (20309 60936))
+;;;;;; "gnus-gravatar" "gnus/gnus-gravatar.el" (20229 56251))
;;; Generated autoloads from gnus/gnus-gravatar.el
(autoload 'gnus-treat-from-gravatar "gnus-gravatar" "\
@@ -11939,7 +11891,7 @@ If gravatars are already displayed, remove them.
;;;***
;;;### (autoloads (gnus-fetch-group-other-frame gnus-fetch-group)
-;;;;;; "gnus-group" "gnus/gnus-group.el" (20309 60936))
+;;;;;; "gnus-group" "gnus/gnus-group.el" (20268 11628))
;;; Generated autoloads from gnus/gnus-group.el
(autoload 'gnus-fetch-group "gnus-group" "\
@@ -11957,7 +11909,7 @@ Pop up a frame and enter GROUP.
;;;***
;;;### (autoloads (gnus-html-prefetch-images gnus-article-html) "gnus-html"
-;;;;;; "gnus/gnus-html.el" (20309 60936))
+;;;;;; "gnus/gnus-html.el" (20273 59945))
;;; Generated autoloads from gnus/gnus-html.el
(autoload 'gnus-article-html "gnus-html" "\
@@ -11973,7 +11925,7 @@ Pop up a frame and enter GROUP.
;;;***
;;;### (autoloads (gnus-batch-score) "gnus-kill" "gnus/gnus-kill.el"
-;;;;;; (20309 60936))
+;;;;;; (20229 56251))
;;; Generated autoloads from gnus/gnus-kill.el
(defalias 'gnus-batch-kill 'gnus-batch-score)
@@ -11988,7 +11940,7 @@ Usage: emacs -batch -l ~/.emacs -l gnus -f gnus-batch-score
;;;### (autoloads (gnus-mailing-list-mode gnus-mailing-list-insinuate
;;;;;; turn-on-gnus-mailing-list-mode) "gnus-ml" "gnus/gnus-ml.el"
-;;;;;; (20309 60936))
+;;;;;; (20229 56251))
;;; Generated autoloads from gnus/gnus-ml.el
(autoload 'turn-on-gnus-mailing-list-mode "gnus-ml" "\
@@ -12013,7 +11965,7 @@ Minor mode for providing mailing-list commands.
;;;### (autoloads (gnus-group-split-fancy gnus-group-split gnus-group-split-update
;;;;;; gnus-group-split-setup) "gnus-mlspl" "gnus/gnus-mlspl.el"
-;;;;;; (20309 60936))
+;;;;;; (20229 56251))
;;; Generated autoloads from gnus/gnus-mlspl.el
(autoload 'gnus-group-split-setup "gnus-mlspl" "\
@@ -12114,7 +12066,7 @@ Calling (gnus-group-split-fancy nil nil \"mail.others\") returns:
;;;***
;;;### (autoloads (gnus-button-reply gnus-button-mailto gnus-msg-mail)
-;;;;;; "gnus-msg" "gnus/gnus-msg.el" (20321 38938))
+;;;;;; "gnus-msg" "gnus/gnus-msg.el" (20360 57703))
;;; Generated autoloads from gnus/gnus-msg.el
(autoload 'gnus-msg-mail "gnus-msg" "\
@@ -12142,7 +12094,7 @@ Like `message-reply'.
;;;### (autoloads (gnus-treat-newsgroups-picon gnus-treat-mail-picon
;;;;;; gnus-treat-from-picon) "gnus-picon" "gnus/gnus-picon.el"
-;;;;;; (20309 60936))
+;;;;;; (20280 8018))
;;; Generated autoloads from gnus/gnus-picon.el
(autoload 'gnus-treat-from-picon "gnus-picon" "\
@@ -12169,7 +12121,7 @@ If picons are already displayed, remove them.
;;;;;; gnus-sorted-nintersection gnus-sorted-range-intersection
;;;;;; gnus-sorted-intersection gnus-intersection gnus-sorted-complement
;;;;;; gnus-sorted-ndifference gnus-sorted-difference) "gnus-range"
-;;;;;; "gnus/gnus-range.el" (20309 60936))
+;;;;;; "gnus/gnus-range.el" (20229 56251))
;;; Generated autoloads from gnus/gnus-range.el
(autoload 'gnus-sorted-difference "gnus-range" "\
@@ -12237,7 +12189,7 @@ Add NUM into sorted LIST by side effect.
;;;***
;;;### (autoloads (gnus-registry-install-hooks gnus-registry-initialize)
-;;;;;; "gnus-registry" "gnus/gnus-registry.el" (20309 60936))
+;;;;;; "gnus-registry" "gnus/gnus-registry.el" (20376 41972))
;;; Generated autoloads from gnus/gnus-registry.el
(autoload 'gnus-registry-initialize "gnus-registry" "\
@@ -12253,8 +12205,8 @@ Install the registry hooks.
;;;***
;;;### (autoloads (gnus-sieve-article-add-rule gnus-sieve-generate
-;;;;;; gnus-sieve-update) "gnus-sieve" "gnus/gnus-sieve.el" (20309
-;;;;;; 60936))
+;;;;;; gnus-sieve-update) "gnus-sieve" "gnus/gnus-sieve.el" (20229
+;;;;;; 56251))
;;; Generated autoloads from gnus/gnus-sieve.el
(autoload 'gnus-sieve-update "gnus-sieve" "\
@@ -12282,7 +12234,7 @@ See the documentation for these variables and functions for details.
;;;***
;;;### (autoloads (gnus-update-format) "gnus-spec" "gnus/gnus-spec.el"
-;;;;;; (20309 60936))
+;;;;;; (20229 56251))
;;; Generated autoloads from gnus/gnus-spec.el
(autoload 'gnus-update-format "gnus-spec" "\
@@ -12293,7 +12245,7 @@ Update the format specification near point.
;;;***
;;;### (autoloads (gnus-declare-backend) "gnus-start" "gnus/gnus-start.el"
-;;;;;; (20309 60936))
+;;;;;; (20360 57703))
;;; Generated autoloads from gnus/gnus-start.el
(autoload 'gnus-declare-backend "gnus-start" "\
@@ -12304,7 +12256,7 @@ Declare back end NAME with ABILITIES as a Gnus back end.
;;;***
;;;### (autoloads (gnus-summary-bookmark-jump) "gnus-sum" "gnus/gnus-sum.el"
-;;;;;; (20321 38938))
+;;;;;; (20325 60273))
;;; Generated autoloads from gnus/gnus-sum.el
(autoload 'gnus-summary-bookmark-jump "gnus-sum" "\
@@ -12316,7 +12268,7 @@ BOOKMARK is a bookmark name or a bookmark record.
;;;***
;;;### (autoloads (gnus-sync-install-hooks gnus-sync-initialize)
-;;;;;; "gnus-sync" "gnus/gnus-sync.el" (20309 60936))
+;;;;;; "gnus-sync" "gnus/gnus-sync.el" (20229 56251))
;;; Generated autoloads from gnus/gnus-sync.el
(autoload 'gnus-sync-initialize "gnus-sync" "\
@@ -12332,7 +12284,7 @@ Install the sync hooks.
;;;***
;;;### (autoloads (gnus-add-configuration) "gnus-win" "gnus/gnus-win.el"
-;;;;;; (20309 60936))
+;;;;;; (20376 41972))
;;; Generated autoloads from gnus/gnus-win.el
(autoload 'gnus-add-configuration "gnus-win" "\
@@ -12343,7 +12295,7 @@ Add the window configuration CONF to `gnus-buffer-configuration'.
;;;***
;;;### (autoloads (gnutls-min-prime-bits) "gnutls" "net/gnutls.el"
-;;;;;; (20309 60936))
+;;;;;; (20286 28414))
;;; Generated autoloads from net/gnutls.el
(defvar gnutls-min-prime-bits nil "\
@@ -12359,7 +12311,7 @@ A value of nil says to use the default gnutls value.")
;;;***
-;;;### (autoloads (gomoku) "gomoku" "play/gomoku.el" (20309 60936))
+;;;### (autoloads (gomoku) "gomoku" "play/gomoku.el" (20355 835))
;;; Generated autoloads from play/gomoku.el
(autoload 'gomoku "gomoku" "\
@@ -12386,8 +12338,8 @@ Use \\[describe-mode] for more info.
;;;***
;;;### (autoloads (goto-address-prog-mode goto-address-mode goto-address
-;;;;;; goto-address-at-point) "goto-addr" "net/goto-addr.el" (20309
-;;;;;; 60936))
+;;;;;; goto-address-at-point) "goto-addr" "net/goto-addr.el" (20355
+;;;;;; 835))
;;; Generated autoloads from net/goto-addr.el
(define-obsolete-function-alias 'goto-address-at-mouse 'goto-address-at-point "22.1")
@@ -12429,7 +12381,7 @@ Like `goto-address-mode', but only for comments and strings.
;;;***
;;;### (autoloads (gravatar-retrieve-synchronously gravatar-retrieve)
-;;;;;; "gravatar" "gnus/gravatar.el" (20309 60936))
+;;;;;; "gravatar" "gnus/gravatar.el" (20280 8018))
;;; Generated autoloads from gnus/gravatar.el
(autoload 'gravatar-retrieve "gravatar" "\
@@ -12445,13 +12397,13 @@ Retrieve MAIL-ADDRESS gravatar and returns it.
;;;***
-;;;### (autoloads (zrgrep rgrep lgrep grep-find grep grep-mode grep-compute-defaults
+;;;### (autoloads (zrgrep rgrep lgrep grep-find grep grep-compute-defaults
;;;;;; grep-process-setup grep-setup-hook grep-find-command grep-command
-;;;;;; grep-window-height) "grep" "progmodes/grep.el" (20309 60936))
+;;;;;; grep-window-height) "grep" "progmodes/grep.el" (20370 4296))
;;; Generated autoloads from progmodes/grep.el
(defvar grep-window-height nil "\
-*Number of lines in a grep window. If nil, use `compilation-window-height'.")
+Number of lines in a grep window. If nil, use `compilation-window-height'.")
(custom-autoload 'grep-window-height "grep" t)
@@ -12522,16 +12474,11 @@ Set up `compilation-exit-message-function' and run `grep-setup-hook'.
\(fn)" nil nil)
-(autoload 'grep-mode "grep" "\
-Sets `grep-last-buffer' and `compilation-window-height'.
-
-\(fn)" nil nil)
-
(autoload 'grep "grep" "\
Run grep, with user-specified args, and collect output in a buffer.
While grep runs asynchronously, you can use \\[next-error] (M-x next-error),
-or \\<grep-mode-map>\\[compile-goto-error] in the grep output buffer, to go to the lines where grep
-found matches.
+or \\<grep-mode-map>\\[compile-goto-error] in the *grep* buffer, to go to the lines where grep found
+matches. To kill the grep job before it finishes, type \\[kill-compilation].
For doing a recursive `grep', see the `rgrep' command. For running
`grep' in a specific directory, see `lgrep'.
@@ -12587,9 +12534,10 @@ With \\[universal-argument] prefix, you can edit the constructed shell command l
before it is executed.
With two \\[universal-argument] prefixes, directly edit and run `grep-find-command'.
-Collect output in a buffer. While find runs asynchronously, you
-can use \\[next-error] (M-x next-error), or \\<grep-mode-map>\\[compile-goto-error] in the grep output buffer,
-to go to the lines where grep found matches.
+Collect output in a buffer. While the recursive grep is running,
+you can use \\[next-error] (M-x next-error), or \\<grep-mode-map>\\[compile-goto-error] in the grep output buffer,
+to visit the lines where matches were found. To kill the job
+before it finishes, type \\[kill-compilation].
This command shares argument histories with \\[lgrep] and \\[grep-find].
@@ -12609,7 +12557,7 @@ file name to `*.gz', and sets `grep-highlight-matches' to `always'.
;;;***
-;;;### (autoloads (gs-load-image) "gs" "gs.el" (20309 60936))
+;;;### (autoloads (gs-load-image) "gs" "gs.el" (20229 56251))
;;; Generated autoloads from gs.el
(autoload 'gs-load-image "gs" "\
@@ -12623,7 +12571,7 @@ the form \"WINDOW-ID PIXMAP-ID\". Value is non-nil if successful.
;;;***
;;;### (autoloads (gud-tooltip-mode gdb-script-mode jdb pdb perldb
-;;;;;; xdb dbx sdb gud-gdb) "gud" "progmodes/gud.el" (20309 60936))
+;;;;;; xdb dbx sdb gud-gdb) "gud" "progmodes/gud.el" (20373 62846))
;;; Generated autoloads from progmodes/gud.el
(autoload 'gud-gdb "gud" "\
@@ -12711,8 +12659,8 @@ it if ARG is omitted or nil.
;;;***
-;;;### (autoloads (handwrite) "handwrite" "play/handwrite.el" (20309
-;;;;;; 60936))
+;;;### (autoloads (handwrite) "handwrite" "play/handwrite.el" (20304
+;;;;;; 58723))
;;; Generated autoloads from play/handwrite.el
(autoload 'handwrite "handwrite" "\
@@ -12730,7 +12678,7 @@ Variables: `handwrite-linespace' (default 12)
;;;***
;;;### (autoloads (hanoi-unix-64 hanoi-unix hanoi) "hanoi" "play/hanoi.el"
-;;;;;; (20309 60936))
+;;;;;; (19981 63558))
;;; Generated autoloads from play/hanoi.el
(autoload 'hanoi "hanoi" "\
@@ -12759,7 +12707,7 @@ to be updated.
;;;### (autoloads (mail-check-payment mail-add-payment-async mail-add-payment
;;;;;; hashcash-verify-payment hashcash-insert-payment-async hashcash-insert-payment)
-;;;;;; "hashcash" "mail/hashcash.el" (20309 60936))
+;;;;;; "hashcash" "mail/hashcash.el" (20355 835))
;;; Generated autoloads from mail/hashcash.el
(autoload 'hashcash-insert-payment "hashcash" "\
@@ -12804,7 +12752,7 @@ Prefix arg sets default accept amount temporarily.
;;;### (autoloads (scan-buf-previous-region scan-buf-next-region
;;;;;; scan-buf-move-to-region help-at-pt-display-when-idle help-at-pt-set-timer
;;;;;; help-at-pt-cancel-timer display-local-help help-at-pt-kbd-string
-;;;;;; help-at-pt-string) "help-at-pt" "help-at-pt.el" (20309 60936))
+;;;;;; help-at-pt-string) "help-at-pt" "help-at-pt.el" (20229 56251))
;;; Generated autoloads from help-at-pt.el
(autoload 'help-at-pt-string "help-at-pt" "\
@@ -12934,7 +12882,7 @@ different regions. With numeric argument ARG, behaves like
;;;### (autoloads (doc-file-to-info doc-file-to-man describe-categories
;;;;;; describe-syntax describe-variable variable-at-point describe-function-1
;;;;;; find-lisp-object-file-name help-C-file-name describe-function)
-;;;;;; "help-fns" "help-fns.el" (20309 60936))
+;;;;;; "help-fns" "help-fns.el" (20298 64606))
;;; Generated autoloads from help-fns.el
(autoload 'describe-function "help-fns" "\
@@ -13014,7 +12962,7 @@ Produce a texinfo buffer with sorted doc-strings from the DOC file.
;;;***
;;;### (autoloads (three-step-help) "help-macro" "help-macro.el"
-;;;;;; (20309 60936))
+;;;;;; (20255 22932))
;;; Generated autoloads from help-macro.el
(defvar three-step-help nil "\
@@ -13030,8 +12978,8 @@ gives the window that lists the options.")
;;;### (autoloads (help-xref-on-pp help-insert-xref-button help-xref-button
;;;;;; help-make-xrefs help-buffer help-setup-xref help-mode-finish
-;;;;;; help-mode-setup help-mode) "help-mode" "help-mode.el" (20309
-;;;;;; 60936))
+;;;;;; help-mode-setup help-mode) "help-mode" "help-mode.el" (20229
+;;;;;; 56251))
;;; Generated autoloads from help-mode.el
(autoload 'help-mode "help-mode" "\
@@ -13124,7 +13072,7 @@ Add xrefs for symbols in `pp's output between FROM and TO.
;;;***
;;;### (autoloads (Helper-help Helper-describe-bindings) "helper"
-;;;;;; "emacs-lisp/helper.el" (20309 60936))
+;;;;;; "emacs-lisp/helper.el" (20229 56251))
;;; Generated autoloads from emacs-lisp/helper.el
(autoload 'Helper-describe-bindings "helper" "\
@@ -13140,7 +13088,7 @@ Provide help for current mode.
;;;***
;;;### (autoloads (hexlify-buffer hexl-find-file hexl-mode) "hexl"
-;;;;;; "hexl.el" (20309 60936))
+;;;;;; "hexl.el" (20364 20442))
;;; Generated autoloads from hexl.el
(autoload 'hexl-mode "hexl" "\
@@ -13155,7 +13103,7 @@ using the function `hexlify-buffer'.
Each line in the buffer has an \"address\" (displayed in hexadecimal)
representing the offset into the file that the characters on this line
are at and 16 characters from the file (displayed as hexadecimal
-values grouped every 16 bits) and as their ASCII values.
+values grouped every `hexl-bits' bits) and as their ASCII values.
If any of the characters (displayed as ASCII characters) are
unprintable (control or meta characters) they will be replaced as
@@ -13237,7 +13185,7 @@ This discards the buffer's undo information.
;;;### (autoloads (hi-lock-write-interactive-patterns hi-lock-unface-buffer
;;;;;; hi-lock-face-phrase-buffer hi-lock-face-buffer hi-lock-line-face-buffer
;;;;;; global-hi-lock-mode hi-lock-mode) "hi-lock" "hi-lock.el"
-;;;;;; (20309 60936))
+;;;;;; (20229 56251))
;;; Generated autoloads from hi-lock.el
(autoload 'hi-lock-mode "hi-lock" "\
@@ -13376,7 +13324,7 @@ be found in variable `hi-lock-interactive-patterns'.
;;;***
;;;### (autoloads (hide-ifdef-mode) "hideif" "progmodes/hideif.el"
-;;;;;; (20309 60936))
+;;;;;; (20229 56251))
;;; Generated autoloads from progmodes/hideif.el
(autoload 'hide-ifdef-mode "hideif" "\
@@ -13420,11 +13368,11 @@ Several variables affect how the hiding is done:
;;;***
;;;### (autoloads (turn-off-hideshow hs-minor-mode) "hideshow" "progmodes/hideshow.el"
-;;;;;; (20330 2324))
+;;;;;; (20356 52797))
;;; Generated autoloads from progmodes/hideshow.el
(defvar hs-special-modes-alist (mapcar 'purecopy '((c-mode "{" "}" "/[*/]" nil nil) (c++-mode "{" "}" "/[*/]" nil nil) (bibtex-mode ("@\\S(*\\(\\s(\\)" 1)) (java-mode "{" "}" "/[*/]" nil nil) (js-mode "{" "}" "/[*/]" nil))) "\
-*Alist for initializing the hideshow variables for different modes.
+Alist for initializing the hideshow variables for different modes.
Each element has the form
(MODE START END COMMENT-START FORWARD-SEXP-FUNC ADJUST-BEG-FUNC).
@@ -13486,8 +13434,8 @@ Unconditionally turn off `hs-minor-mode'.
;;;;;; highlight-compare-buffers highlight-changes-rotate-faces
;;;;;; highlight-changes-previous-change highlight-changes-next-change
;;;;;; highlight-changes-remove-highlight highlight-changes-visible-mode
-;;;;;; highlight-changes-mode) "hilit-chg" "hilit-chg.el" (20309
-;;;;;; 60936))
+;;;;;; highlight-changes-mode) "hilit-chg" "hilit-chg.el" (20229
+;;;;;; 56251))
;;; Generated autoloads from hilit-chg.el
(autoload 'highlight-changes-mode "hilit-chg" "\
@@ -13622,7 +13570,7 @@ See `highlight-changes-mode' for more information on Highlight-Changes mode.
;;;;;; hippie-expand-ignore-buffers hippie-expand-max-buffers hippie-expand-no-restriction
;;;;;; hippie-expand-dabbrev-as-symbol hippie-expand-dabbrev-skip-space
;;;;;; hippie-expand-verbose hippie-expand-try-functions-list) "hippie-exp"
-;;;;;; "hippie-exp.el" (20309 60936))
+;;;;;; "hippie-exp.el" (20229 56251))
;;; Generated autoloads from hippie-exp.el
(defvar hippie-expand-try-functions-list '(try-complete-file-name-partially try-complete-file-name try-expand-all-abbrevs try-expand-list try-expand-line try-expand-dabbrev try-expand-dabbrev-all-buffers try-expand-dabbrev-from-kill try-complete-lisp-symbol-partially try-complete-lisp-symbol) "\
@@ -13695,7 +13643,7 @@ argument VERBOSE non-nil makes the function verbose.
;;;***
;;;### (autoloads (global-hl-line-mode hl-line-mode) "hl-line" "hl-line.el"
-;;;;;; (20309 60936))
+;;;;;; (20229 56251))
;;; Generated autoloads from hl-line.el
(autoload 'hl-line-mode "hl-line" "\
@@ -13748,7 +13696,7 @@ Global-Hl-Line mode uses the functions `global-hl-line-unhighlight' and
;;;;;; holiday-bahai-holidays holiday-islamic-holidays holiday-christian-holidays
;;;;;; holiday-hebrew-holidays holiday-other-holidays holiday-local-holidays
;;;;;; holiday-oriental-holidays holiday-general-holidays) "holidays"
-;;;;;; "calendar/holidays.el" (20309 60936))
+;;;;;; "calendar/holidays.el" (20390 32086))
;;; Generated autoloads from calendar/holidays.el
(define-obsolete-variable-alias 'general-holidays 'holiday-general-holidays "23.1")
@@ -13896,8 +13844,8 @@ The optional LABEL is used to label the buffer created.
;;;***
-;;;### (autoloads (html2text) "html2text" "gnus/html2text.el" (20309
-;;;;;; 60936))
+;;;### (autoloads (html2text) "html2text" "gnus/html2text.el" (20229
+;;;;;; 56251))
;;; Generated autoloads from gnus/html2text.el
(autoload 'html2text "html2text" "\
@@ -13908,7 +13856,7 @@ Convert HTML to plain text in the current buffer.
;;;***
;;;### (autoloads (htmlfontify-copy-and-link-dir htmlfontify-buffer)
-;;;;;; "htmlfontify" "htmlfontify.el" (20324 39235))
+;;;;;; "htmlfontify" "htmlfontify.el" (20325 60273))
;;; Generated autoloads from htmlfontify.el
(autoload 'htmlfontify-buffer "htmlfontify" "\
@@ -13939,10 +13887,14 @@ You may also want to set `hfy-page-header' and `hfy-page-footer'.
\(fn SRCDIR DSTDIR &optional F-EXT L-EXT)" t nil)
;;;***
+
+;;;***
+
+;;;***
;;;### (autoloads (define-ibuffer-filter define-ibuffer-op define-ibuffer-sorter
-;;;;;; define-ibuffer-column) "ibuf-macs" "ibuf-macs.el" (20309
-;;;;;; 60936))
+;;;;;; define-ibuffer-column) "ibuf-macs" "ibuf-macs.el" (20405
+;;;;;; 42390))
;;; Generated autoloads from ibuf-macs.el
(autoload 'define-ibuffer-column "ibuf-macs" "\
@@ -13984,6 +13936,8 @@ value if and only if `a' is \"less than\" `b'.
\(fn NAME DOCUMENTATION (&key DESCRIPTION) &rest BODY)" nil (quote macro))
+(put 'define-ibuffer-sorter 'doc-string-elt '2)
+
(put 'define-ibuffer-sorter 'lisp-indent-function '1)
(autoload 'define-ibuffer-op "ibuf-macs" "\
@@ -14019,6 +13973,8 @@ macro for exactly what it does.
\(fn OP ARGS DOCUMENTATION (&key INTERACTIVE MARK MODIFIER-P DANGEROUS OPSTRING ACTIVE-OPSTRING COMPLEX) &rest BODY)" nil (quote macro))
+(put 'define-ibuffer-op 'doc-string-elt '3)
+
(put 'define-ibuffer-op 'lisp-indent-function '2)
(autoload 'define-ibuffer-filter "ibuf-macs" "\
@@ -14034,12 +13990,14 @@ bound to the current value of the filter.
\(fn NAME DOCUMENTATION (&key READER DESCRIPTION) &rest BODY)" nil (quote macro))
+(put 'define-ibuffer-filter 'doc-string-elt '2)
+
(put 'define-ibuffer-filter 'lisp-indent-function '2)
;;;***
;;;### (autoloads (ibuffer ibuffer-other-window ibuffer-list-buffers)
-;;;;;; "ibuffer" "ibuffer.el" (20317 25086))
+;;;;;; "ibuffer" "ibuffer.el" (20382 62719))
;;; Generated autoloads from ibuffer.el
(autoload 'ibuffer-list-buffers "ibuffer" "\
@@ -14080,7 +14038,7 @@ FORMATS is the value to use for `ibuffer-formats'.
;;;### (autoloads (icalendar-import-buffer icalendar-import-file
;;;;;; icalendar-export-region icalendar-export-file) "icalendar"
-;;;;;; "calendar/icalendar.el" (20320 14810))
+;;;;;; "calendar/icalendar.el" (20325 60273))
;;; Generated autoloads from calendar/icalendar.el
(autoload 'icalendar-export-file "icalendar" "\
@@ -14132,8 +14090,8 @@ buffer `*icalendar-errors*'.
;;;***
-;;;### (autoloads (icomplete-mode) "icomplete" "icomplete.el" (20309
-;;;;;; 60936))
+;;;### (autoloads (icomplete-mode) "icomplete" "icomplete.el" (20294
+;;;;;; 23710))
;;; Generated autoloads from icomplete.el
(defvar icomplete-mode nil "\
@@ -14155,7 +14113,7 @@ the mode if ARG is omitted or nil.
;;;***
-;;;### (autoloads (icon-mode) "icon" "progmodes/icon.el" (20309 60936))
+;;;### (autoloads (icon-mode) "icon" "progmodes/icon.el" (20355 835))
;;; Generated autoloads from progmodes/icon.el
(autoload 'icon-mode "icon" "\
@@ -14196,7 +14154,7 @@ with no args, if that value is non-nil.
;;;***
;;;### (autoloads (idlwave-shell) "idlw-shell" "progmodes/idlw-shell.el"
-;;;;;; (20309 60936))
+;;;;;; (20395 5351))
;;; Generated autoloads from progmodes/idlw-shell.el
(autoload 'idlwave-shell "idlw-shell" "\
@@ -14222,7 +14180,7 @@ See also the variable `idlwave-shell-prompt-pattern'.
;;;***
;;;### (autoloads (idlwave-mode) "idlwave" "progmodes/idlwave.el"
-;;;;;; (20309 60936))
+;;;;;; (20389 6410))
;;; Generated autoloads from progmodes/idlwave.el
(autoload 'idlwave-mode "idlwave" "\
@@ -14356,8 +14314,8 @@ The main features of this mode are
;;;;;; ido-find-alternate-file ido-find-file-other-window ido-find-file
;;;;;; ido-find-file-in-dir ido-switch-buffer-other-frame ido-insert-buffer
;;;;;; ido-kill-buffer ido-display-buffer ido-switch-buffer-other-window
-;;;;;; ido-switch-buffer ido-mode ido-mode) "ido" "ido.el" (20330
-;;;;;; 976))
+;;;;;; ido-switch-buffer ido-mode ido-mode) "ido" "ido.el" (20389
+;;;;;; 6410))
;;; Generated autoloads from ido.el
(defvar ido-mode nil "\
@@ -14617,7 +14575,7 @@ DEF, if non-nil, is the default value.
;;;***
-;;;### (autoloads (ielm) "ielm" "ielm.el" (20309 60936))
+;;;### (autoloads (ielm) "ielm" "ielm.el" (20229 56251))
;;; Generated autoloads from ielm.el
(autoload 'ielm "ielm" "\
@@ -14628,7 +14586,7 @@ Switches to the buffer `*ielm*', or creates it if it does not exist.
;;;***
-;;;### (autoloads (iimage-mode) "iimage" "iimage.el" (20309 60936))
+;;;### (autoloads (iimage-mode) "iimage" "iimage.el" (20273 59945))
;;; Generated autoloads from iimage.el
(define-obsolete-function-alias 'turn-on-iimage-mode 'iimage-mode "24.1")
@@ -14649,7 +14607,7 @@ the mode if ARG is omitted or nil, and toggle it if ARG is `toggle'.
;;;;;; create-image image-type-auto-detected-p image-type-available-p
;;;;;; image-type image-type-from-file-name image-type-from-file-header
;;;;;; image-type-from-buffer image-type-from-data) "image" "image.el"
-;;;;;; (20341 55868))
+;;;;;; (20377 16772))
;;; Generated autoloads from image.el
(autoload 'image-type-from-data "image" "\
@@ -14828,7 +14786,8 @@ Example:
(autoload 'imagemagick-register-types "image" "\
Register file types that can be handled by ImageMagick.
-This registers the ImageMagick types listed in `imagemagick-types',
+This function is called at startup, after loading the init file.
+It registers the ImageMagick types listed in `imagemagick-types',
excluding those listed in `imagemagick-types-inhibit'.
Registered image types are added to `auto-mode-alist', so that
@@ -14849,7 +14808,7 @@ If Emacs is compiled without ImageMagick support, do nothing.
;;;;;; image-dired-jump-thumbnail-buffer image-dired-delete-tag
;;;;;; image-dired-tag-files image-dired-show-all-from-dir image-dired-display-thumbs
;;;;;; image-dired-dired-with-window-configuration image-dired-dired-toggle-marked-thumbs)
-;;;;;; "image-dired" "image-dired.el" (20309 60936))
+;;;;;; "image-dired" "image-dired.el" (20229 56251))
;;; Generated autoloads from image-dired.el
(autoload 'image-dired-dired-toggle-marked-thumbs "image-dired" "\
@@ -14987,7 +14946,7 @@ easy-to-use form.
;;;### (autoloads (auto-image-file-mode insert-image-file image-file-name-regexp
;;;;;; image-file-name-regexps image-file-name-extensions) "image-file"
-;;;;;; "image-file.el" (20309 60936))
+;;;;;; "image-file.el" (20229 56251))
;;; Generated autoloads from image-file.el
(defvar image-file-name-extensions (purecopy '("png" "jpeg" "jpg" "gif" "tiff" "tif" "xbm" "xpm" "pbm" "pgm" "ppm" "pnm" "svg")) "\
@@ -15050,7 +15009,7 @@ An image file is one whose name has an extension in
;;;***
;;;### (autoloads (image-bookmark-jump image-mode-as-text image-minor-mode
-;;;;;; image-mode) "image-mode" "image-mode.el" (20309 60936))
+;;;;;; image-mode) "image-mode" "image-mode.el" (20400 38248))
;;; Generated autoloads from image-mode.el
(autoload 'image-mode "image-mode" "\
@@ -15095,7 +15054,7 @@ on these modes.
;;;***
;;;### (autoloads (imenu imenu-add-menubar-index imenu-add-to-menubar
-;;;;;; imenu-sort-function) "imenu" "imenu.el" (20321 38938))
+;;;;;; imenu-sort-function) "imenu" "imenu.el" (20395 5351))
;;; Generated autoloads from imenu.el
(defvar imenu-sort-function nil "\
@@ -15212,7 +15171,7 @@ for more information.
;;;### (autoloads (indian-2-column-to-ucs-region in-is13194-pre-write-conversion
;;;;;; in-is13194-post-read-conversion indian-compose-string indian-compose-region)
-;;;;;; "ind-util" "language/ind-util.el" (20309 60936))
+;;;;;; "ind-util" "language/ind-util.el" (20229 56251))
;;; Generated autoloads from language/ind-util.el
(autoload 'indian-compose-region "ind-util" "\
@@ -15244,11 +15203,11 @@ Convert old Emacs Devanagari characters to UCS.
;;;### (autoloads (inferior-lisp inferior-lisp-prompt inferior-lisp-load-command
;;;;;; inferior-lisp-program inferior-lisp-filter-regexp) "inf-lisp"
-;;;;;; "progmodes/inf-lisp.el" (20309 60936))
+;;;;;; "progmodes/inf-lisp.el" (20355 835))
;;; Generated autoloads from progmodes/inf-lisp.el
(defvar inferior-lisp-filter-regexp (purecopy "\\`\\s *\\(:\\(\\w\\|\\s_\\)\\)?\\s *\\'") "\
-*What not to save on inferior Lisp's input history.
+What not to save on inferior Lisp's input history.
Input matching this regexp is not saved on the input history in Inferior Lisp
mode. Default is whitespace followed by 0 or 1 single-letter colon-keyword
\(as in :a, :c, etc.)")
@@ -15256,12 +15215,12 @@ mode. Default is whitespace followed by 0 or 1 single-letter colon-keyword
(custom-autoload 'inferior-lisp-filter-regexp "inf-lisp" t)
(defvar inferior-lisp-program (purecopy "lisp") "\
-*Program name for invoking an inferior Lisp in Inferior Lisp mode.")
+Program name for invoking an inferior Lisp in Inferior Lisp mode.")
(custom-autoload 'inferior-lisp-program "inf-lisp" t)
(defvar inferior-lisp-load-command (purecopy "(load \"%s\")\n") "\
-*Format-string for building a Lisp expression to load a file.
+Format-string for building a Lisp expression to load a file.
This format string should use `%s' to substitute a file name
and should result in a Lisp expression that will command the inferior Lisp
to load that file. The default works acceptably on most Lisps.
@@ -15290,7 +15249,7 @@ This is a fine thing to set in your .emacs file or through Custom.")
(custom-autoload 'inferior-lisp-prompt "inf-lisp" t)
(defvar inferior-lisp-mode-hook 'nil "\
-*Hook for customizing Inferior Lisp mode.")
+Hook for customizing Inferior Lisp mode.")
(autoload 'inferior-lisp "inf-lisp" "\
Run an inferior Lisp process, input and output via buffer `*inferior-lisp*'.
@@ -15311,7 +15270,7 @@ of `inferior-lisp-program'). Runs the hooks from
;;;;;; Info-goto-emacs-key-command-node Info-goto-emacs-command-node
;;;;;; Info-mode info-finder info-apropos Info-index Info-directory
;;;;;; Info-on-current-buffer info-standalone info-emacs-manual
-;;;;;; info info-other-window) "info" "info.el" (20330 2046))
+;;;;;; info info-other-window) "info" "info.el" (20389 6410))
;;; Generated autoloads from info.el
(autoload 'info-other-window "info" "\
@@ -15497,7 +15456,7 @@ Go to Info buffer that displays MANUAL, creating it if none already exists.
;;;### (autoloads (info-complete-file info-complete-symbol info-lookup-file
;;;;;; info-lookup-symbol info-lookup-reset) "info-look" "info-look.el"
-;;;;;; (20309 60936))
+;;;;;; (20229 56251))
;;; Generated autoloads from info-look.el
(autoload 'info-lookup-reset "info-look" "\
@@ -15546,7 +15505,7 @@ Perform completion on file preceding point.
;;;### (autoloads (info-xref-docstrings info-xref-check-all-custom
;;;;;; info-xref-check-all info-xref-check) "info-xref" "info-xref.el"
-;;;;;; (20309 60936))
+;;;;;; (20229 56251))
;;; Generated autoloads from info-xref.el
(autoload 'info-xref-check "info-xref" "\
@@ -15629,7 +15588,7 @@ the sources handy.
;;;***
;;;### (autoloads (batch-info-validate Info-validate Info-split Info-split-threshold
-;;;;;; Info-tagify) "informat" "informat.el" (20309 60936))
+;;;;;; Info-tagify) "informat" "informat.el" (20229 56251))
;;; Generated autoloads from informat.el
(autoload 'Info-tagify "informat" "\
@@ -15676,7 +15635,7 @@ For example, invoke \"emacs -batch -f batch-info-validate $info/ ~/*.info\"
;;;### (autoloads (isearch-process-search-multibyte-characters isearch-toggle-input-method
;;;;;; isearch-toggle-specified-input-method) "isearch-x" "international/isearch-x.el"
-;;;;;; (20309 60936))
+;;;;;; (20229 56251))
;;; Generated autoloads from international/isearch-x.el
(autoload 'isearch-toggle-specified-input-method "isearch-x" "\
@@ -15696,8 +15655,8 @@ Toggle input method in interactive search.
;;;***
-;;;### (autoloads (isearchb-activate) "isearchb" "isearchb.el" (20309
-;;;;;; 60936))
+;;;### (autoloads (isearchb-activate) "isearchb" "isearchb.el" (20229
+;;;;;; 56251))
;;; Generated autoloads from isearchb.el
(autoload 'isearchb-activate "isearchb" "\
@@ -15713,7 +15672,7 @@ accessed via isearchb.
;;;### (autoloads (iso-cvt-define-menu iso-cvt-write-only iso-cvt-read-only
;;;;;; iso-sgml2iso iso-iso2sgml iso-iso2duden iso-iso2gtex iso-gtex2iso
;;;;;; iso-tex2iso iso-iso2tex iso-german iso-spanish) "iso-cvt"
-;;;;;; "international/iso-cvt.el" (20309 60936))
+;;;;;; "international/iso-cvt.el" (20229 56251))
;;; Generated autoloads from international/iso-cvt.el
(autoload 'iso-spanish "iso-cvt" "\
@@ -15804,7 +15763,7 @@ Add submenus to the File menu, to convert to and from various formats.
;;;***
;;;### (autoloads nil "iso-transl" "international/iso-transl.el"
-;;;;;; (20309 60936))
+;;;;;; (20229 56251))
;;; Generated autoloads from international/iso-transl.el
(or key-translation-map (setq key-translation-map (make-sparse-keymap)))
(define-key key-translation-map "\C-x8" 'iso-transl-ctl-x-8-map)
@@ -15816,13 +15775,13 @@ Add submenus to the File menu, to convert to and from various formats.
;;;;;; ispell-complete-word ispell-continue ispell-buffer ispell-comments-and-strings
;;;;;; ispell-region ispell-change-dictionary ispell-kill-ispell
;;;;;; ispell-help ispell-pdict-save ispell-word ispell-personal-dictionary)
-;;;;;; "ispell" "textmodes/ispell.el" (20341 56798))
+;;;;;; "ispell" "textmodes/ispell.el" (20373 62846))
;;; Generated autoloads from textmodes/ispell.el
(put 'ispell-check-comments 'safe-local-variable (lambda (a) (memq a '(nil t exclusive))))
(defvar ispell-personal-dictionary nil "\
-*File name of your personal spelling dictionary, or nil.
+File name of your personal spelling dictionary, or nil.
If nil, the default personal dictionary, (\"~/.ispell_DICTNAME\" for ispell or
\"~/.aspell.LANG.pws\" for aspell) is used, where DICTNAME is the name of your
default dictionary and LANG the two letter language code.")
@@ -15841,7 +15800,7 @@ and added as a submenu of the \"Edit\" menu.")
(defvar ispell-menu-map-needed (and (not ispell-menu-map) (not (featurep 'xemacs)) 'reload))
-(if ispell-menu-map-needed (progn (setq ispell-menu-map (make-sparse-keymap "Spell")) (define-key ispell-menu-map [ispell-change-dictionary] `(menu-item ,(purecopy "Change Dictionary...") ispell-change-dictionary :help ,(purecopy "Supply explicit dictionary file name"))) (define-key ispell-menu-map [ispell-kill-ispell] `(menu-item ,(purecopy "Kill Process") ispell-kill-ispell :enable (and (boundp 'ispell-process) ispell-process (eq (ispell-process-status) 'run)) :help ,(purecopy "Terminate Ispell subprocess"))) (define-key ispell-menu-map [ispell-pdict-save] `(menu-item ,(purecopy "Save Dictionary") (lambda nil (interactive) (ispell-pdict-save t t)) :help ,(purecopy "Save personal dictionary"))) (define-key ispell-menu-map [ispell-customize] `(menu-item ,(purecopy "Customize...") (lambda nil (interactive) (customize-group 'ispell)) :help ,(purecopy "Customize spell checking options"))) (define-key ispell-menu-map [ispell-help] `(menu-item ,(purecopy "Help") (lambda nil (interactive) (describe-function 'ispell-help)) :help ,(purecopy "Show standard Ispell keybindings and commands"))) (define-key ispell-menu-map [flyspell-mode] `(menu-item ,(purecopy "Automatic spell checking (Flyspell)") flyspell-mode :help ,(purecopy "Check spelling while you edit the text") :button (:toggle bound-and-true-p flyspell-mode))) (define-key ispell-menu-map [ispell-complete-word] `(menu-item ,(purecopy "Complete Word") ispell-complete-word :help ,(purecopy "Complete word at cursor using dictionary"))) (define-key ispell-menu-map [ispell-complete-word-interior-frag] `(menu-item ,(purecopy "Complete Word Fragment") ispell-complete-word-interior-frag :help ,(purecopy "Complete word fragment at cursor")))))
+(if ispell-menu-map-needed (progn (setq ispell-menu-map (make-sparse-keymap "Spell")) (define-key ispell-menu-map [ispell-change-dictionary] `(menu-item ,(purecopy "Change Dictionary...") ispell-change-dictionary :help ,(purecopy "Supply explicit dictionary file name"))) (define-key ispell-menu-map [ispell-kill-ispell] `(menu-item ,(purecopy "Kill Process") (lambda nil (interactive) (ispell-kill-ispell nil 'clear)) :enable (and (boundp 'ispell-process) ispell-process (eq (ispell-process-status) 'run)) :help ,(purecopy "Terminate Ispell subprocess"))) (define-key ispell-menu-map [ispell-pdict-save] `(menu-item ,(purecopy "Save Dictionary") (lambda nil (interactive) (ispell-pdict-save t t)) :help ,(purecopy "Save personal dictionary"))) (define-key ispell-menu-map [ispell-customize] `(menu-item ,(purecopy "Customize...") (lambda nil (interactive) (customize-group 'ispell)) :help ,(purecopy "Customize spell checking options"))) (define-key ispell-menu-map [ispell-help] `(menu-item ,(purecopy "Help") (lambda nil (interactive) (describe-function 'ispell-help)) :help ,(purecopy "Show standard Ispell keybindings and commands"))) (define-key ispell-menu-map [flyspell-mode] `(menu-item ,(purecopy "Automatic spell checking (Flyspell)") flyspell-mode :help ,(purecopy "Check spelling while you edit the text") :button (:toggle bound-and-true-p flyspell-mode))) (define-key ispell-menu-map [ispell-complete-word] `(menu-item ,(purecopy "Complete Word") ispell-complete-word :help ,(purecopy "Complete word at cursor using dictionary"))) (define-key ispell-menu-map [ispell-complete-word-interior-frag] `(menu-item ,(purecopy "Complete Word Fragment") ispell-complete-word-interior-frag :help ,(purecopy "Complete word fragment at cursor")))))
(if ispell-menu-map-needed (progn (define-key ispell-menu-map [ispell-continue] `(menu-item ,(purecopy "Continue Spell-Checking") ispell-continue :enable (and (boundp 'ispell-region-end) (marker-position ispell-region-end) (equal (marker-buffer ispell-region-end) (current-buffer))) :help ,(purecopy "Continue spell checking last region"))) (define-key ispell-menu-map [ispell-word] `(menu-item ,(purecopy "Spell-Check Word") ispell-word :help ,(purecopy "Spell-check word at cursor"))) (define-key ispell-menu-map [ispell-comments-and-strings] `(menu-item ,(purecopy "Spell-Check Comments") ispell-comments-and-strings :help ,(purecopy "Spell-check only comments and strings")))))
@@ -15857,7 +15816,7 @@ Valid forms include:
(KEY FUNCTION ARGS) - FUNCTION called with ARGS returns end of region.")
(defvar ispell-tex-skip-alists (purecopy '((("\\\\addcontentsline" ispell-tex-arg-end 2) ("\\\\add\\(tocontents\\|vspace\\)" ispell-tex-arg-end) ("\\\\\\([aA]lph\\|arabic\\)" ispell-tex-arg-end) ("\\\\bibliographystyle" ispell-tex-arg-end) ("\\\\makebox" ispell-tex-arg-end 0) ("\\\\e?psfig" ispell-tex-arg-end) ("\\\\document\\(class\\|style\\)" . "\\\\begin[ \n]*{[ \n]*document[ \n]*}")) (("\\(figure\\|table\\)\\*?" ispell-tex-arg-end 0) ("list" ispell-tex-arg-end 2) ("program" . "\\\\end[ \n]*{[ \n]*program[ \n]*}") ("verbatim\\*?" . "\\\\end[ \n]*{[ \n]*verbatim\\*?[ \n]*}")))) "\
-*Lists of regions to be skipped in TeX mode.
+Lists of regions to be skipped in TeX mode.
First list is used raw.
Second list has key placed inside \\begin{}.
@@ -15865,7 +15824,7 @@ Delete or add any regions you want to be automatically selected
for skipping in latex mode.")
(defconst ispell-html-skip-alists '(("<[cC][oO][dD][eE]\\>[^>]*>" "</[cC][oO][dD][eE]*>") ("<[sS][cC][rR][iI][pP][tT]\\>[^>]*>" "</[sS][cC][rR][iI][pP][tT]>") ("<[aA][pP][pP][lL][eE][tT]\\>[^>]*>" "</[aA][pP][pP][lL][eE][tT]>") ("<[vV][eE][rR][bB]\\>[^>]*>" "<[vV][eE][rR][bB]\\>[^>]*>") ("<[tT][tT]/" "/") ("<[^ \n>]" ">") ("&[^ \n;]" "[; \n]")) "\
-*Lists of start and end keys to skip in HTML buffers.
+Lists of start and end keys to skip in HTML buffers.
Same format as `ispell-skip-region-alist'.
Note - substrings of other matches must come last
(e.g. \"<[tT][tT]/\" and \"<[^ \\t\\n>]\").")
@@ -15939,8 +15898,9 @@ SPC: Accept word this time.
(autoload 'ispell-kill-ispell "ispell" "\
Kill current Ispell process (so that you may start a fresh one).
With NO-ERROR, just return non-nil if there was no Ispell running.
+With CLEAR, buffer session localwords are cleaned.
-\(fn &optional NO-ERROR)" t nil)
+\(fn &optional NO-ERROR CLEAR)" t nil)
(autoload 'ispell-change-dictionary "ispell" "\
Change to dictionary DICT for Ispell.
@@ -16042,8 +16002,8 @@ You can bind this to the key C-c i in GNUS or mail by adding to
;;;***
-;;;### (autoloads (iswitchb-mode) "iswitchb" "iswitchb.el" (20309
-;;;;;; 60936))
+;;;### (autoloads (iswitchb-mode) "iswitchb" "iswitchb.el" (20389
+;;;;;; 6410))
;;; Generated autoloads from iswitchb.el
(defvar iswitchb-mode nil "\
@@ -16071,7 +16031,7 @@ between buffers using substrings. See `iswitchb' for details.
;;;### (autoloads (read-hiragana-string japanese-zenkaku-region japanese-hankaku-region
;;;;;; japanese-hiragana-region japanese-katakana-region japanese-zenkaku
;;;;;; japanese-hankaku japanese-hiragana japanese-katakana setup-japanese-environment-internal)
-;;;;;; "japan-util" "language/japan-util.el" (20309 60936))
+;;;;;; "japan-util" "language/japan-util.el" (20229 56251))
;;; Generated autoloads from language/japan-util.el
(autoload 'setup-japanese-environment-internal "japan-util" "\
@@ -16149,7 +16109,7 @@ If non-nil, second arg INITIAL-INPUT is a string to insert before reading.
;;;***
;;;### (autoloads (jka-compr-uninstall jka-compr-handler) "jka-compr"
-;;;;;; "jka-compr.el" (20309 60936))
+;;;;;; "jka-compr.el" (20304 59396))
;;; Generated autoloads from jka-compr.el
(defvar jka-compr-inhibit nil "\
@@ -16172,7 +16132,7 @@ by `jka-compr-installed'.
;;;***
-;;;### (autoloads (js-mode) "js" "progmodes/js.el" (20309 60936))
+;;;### (autoloads (js-mode) "js" "progmodes/js.el" (20376 50278))
;;; Generated autoloads from progmodes/js.el
(autoload 'js-mode "js" "\
@@ -16186,7 +16146,7 @@ Major mode for editing JavaScript.
;;;### (autoloads (keypad-setup keypad-numlock-shifted-setup keypad-shifted-setup
;;;;;; keypad-numlock-setup keypad-setup) "keypad" "emulation/keypad.el"
-;;;;;; (20309 60936))
+;;;;;; (20239 35035))
;;; Generated autoloads from emulation/keypad.el
(defvar keypad-setup nil "\
@@ -16242,7 +16202,7 @@ the decimal key on the keypad is mapped to DECIMAL instead of `.'
;;;***
;;;### (autoloads (kinsoku) "kinsoku" "international/kinsoku.el"
-;;;;;; (20309 60936))
+;;;;;; (20229 56251))
;;; Generated autoloads from international/kinsoku.el
(autoload 'kinsoku "kinsoku" "\
@@ -16263,8 +16223,8 @@ the context of text formatting.
;;;***
-;;;### (autoloads (kkc-region) "kkc" "international/kkc.el" (20309
-;;;;;; 60936))
+;;;### (autoloads (kkc-region) "kkc" "international/kkc.el" (20229
+;;;;;; 56251))
;;; Generated autoloads from international/kkc.el
(defvar kkc-after-update-conversion-functions nil "\
@@ -16289,7 +16249,7 @@ and the return value is the length of the conversion.
;;;### (autoloads (kmacro-end-call-mouse kmacro-end-and-call-macro
;;;;;; kmacro-end-or-call-macro kmacro-start-macro-or-insert-counter
;;;;;; kmacro-call-macro kmacro-end-macro kmacro-start-macro kmacro-exec-ring-item)
-;;;;;; "kmacro" "kmacro.el" (20309 60936))
+;;;;;; "kmacro" "kmacro.el" (20389 6410))
;;; Generated autoloads from kmacro.el
(global-set-key "\C-x(" 'kmacro-start-macro)
(global-set-key "\C-x)" 'kmacro-end-macro)
@@ -16400,11 +16360,11 @@ If kbd macro currently being defined end it before activating it.
;;;***
;;;### (autoloads (setup-korean-environment-internal) "korea-util"
-;;;;;; "language/korea-util.el" (20309 60936))
+;;;;;; "language/korea-util.el" (20355 835))
;;; Generated autoloads from language/korea-util.el
(defvar default-korean-keyboard (purecopy (if (string-match "3" (or (getenv "HANGUL_KEYBOARD_TYPE") "")) "3" "")) "\
-*The kind of Korean keyboard for Korean input method.
+The kind of Korean keyboard for Korean input method.
\"\" for 2, \"3\" for 3.")
(autoload 'setup-korean-environment-internal "korea-util" "\
@@ -16415,7 +16375,7 @@ If kbd macro currently being defined end it before activating it.
;;;***
;;;### (autoloads (landmark landmark-test-run) "landmark" "play/landmark.el"
-;;;;;; (20309 60936))
+;;;;;; (20355 835))
;;; Generated autoloads from play/landmark.el
(defalias 'landmark-repeat 'landmark-test-run)
@@ -16447,7 +16407,7 @@ Use \\[describe-mode] for more info.
;;;### (autoloads (lao-compose-region lao-composition-function lao-transcribe-roman-to-lao-string
;;;;;; lao-transcribe-single-roman-syllable-to-lao lao-compose-string)
-;;;;;; "lao-util" "language/lao-util.el" (20309 60936))
+;;;;;; "lao-util" "language/lao-util.el" (20229 56251))
;;; Generated autoloads from language/lao-util.el
(autoload 'lao-compose-string "lao-util" "\
@@ -16486,7 +16446,7 @@ Transcribe Romanized Lao string STR to Lao character string.
;;;### (autoloads (latexenc-find-file-coding-system latexenc-coding-system-to-inputenc
;;;;;; latexenc-inputenc-to-coding-system latex-inputenc-coding-alist)
-;;;;;; "latexenc" "international/latexenc.el" (20309 60936))
+;;;;;; "latexenc" "international/latexenc.el" (20229 56251))
;;; Generated autoloads from international/latexenc.el
(defvar latex-inputenc-coding-alist (purecopy '(("ansinew" . windows-1252) ("applemac" . mac-roman) ("ascii" . us-ascii) ("cp1250" . windows-1250) ("cp1252" . windows-1252) ("cp1257" . cp1257) ("cp437de" . cp437) ("cp437" . cp437) ("cp850" . cp850) ("cp852" . cp852) ("cp858" . cp858) ("cp865" . cp865) ("latin1" . iso-8859-1) ("latin2" . iso-8859-2) ("latin3" . iso-8859-3) ("latin4" . iso-8859-4) ("latin5" . iso-8859-5) ("latin9" . iso-8859-15) ("next" . next) ("utf8" . utf-8) ("utf8x" . utf-8))) "\
@@ -16518,7 +16478,7 @@ coding system names is determined from `latex-inputenc-coding-alist'.
;;;***
;;;### (autoloads (latin1-display-ucs-per-lynx latin1-display latin1-display)
-;;;;;; "latin1-disp" "international/latin1-disp.el" (20309 60936))
+;;;;;; "latin1-disp" "international/latin1-disp.el" (20229 56251))
;;; Generated autoloads from international/latin1-disp.el
(defvar latin1-display nil "\
@@ -16560,7 +16520,7 @@ use either \\[customize] or the function `latin1-display'.")
;;;***
;;;### (autoloads (ld-script-mode) "ld-script" "progmodes/ld-script.el"
-;;;;;; (20309 60936))
+;;;;;; (20229 56251))
;;; Generated autoloads from progmodes/ld-script.el
(autoload 'ld-script-mode "ld-script" "\
@@ -16571,7 +16531,7 @@ A major mode to edit GNU ld script files
;;;***
;;;### (autoloads (ledit-from-lisp-mode ledit-mode) "ledit" "ledit.el"
-;;;;;; (20309 60936))
+;;;;;; (20229 56251))
;;; Generated autoloads from ledit.el
(defconst ledit-save-files t "\
@@ -16606,7 +16566,7 @@ do (setq lisp-mode-hook 'ledit-from-lisp-mode)
;;;***
-;;;### (autoloads (life) "life" "play/life.el" (20309 60936))
+;;;### (autoloads (life) "life" "play/life.el" (20229 56251))
;;; Generated autoloads from play/life.el
(autoload 'life "life" "\
@@ -16620,7 +16580,7 @@ generations (this defaults to 1).
;;;***
;;;### (autoloads (global-linum-mode linum-mode linum-format) "linum"
-;;;;;; "linum.el" (20309 60936))
+;;;;;; "linum.el" (20229 56251))
;;; Generated autoloads from linum.el
(defvar linum-format 'dynamic "\
@@ -16665,8 +16625,8 @@ See `linum-mode' for more information on Linum mode.
;;;***
-;;;### (autoloads (unload-feature) "loadhist" "loadhist.el" (20309
-;;;;;; 60936))
+;;;### (autoloads (unload-feature) "loadhist" "loadhist.el" (20400
+;;;;;; 16870))
;;; Generated autoloads from loadhist.el
(autoload 'unload-feature "loadhist" "\
@@ -16698,7 +16658,7 @@ something strange, such as redefining an Emacs function.
;;;***
;;;### (autoloads (locate-with-filter locate locate-ls-subdir-switches)
-;;;;;; "locate" "locate.el" (20309 60936))
+;;;;;; "locate" "locate.el" (20229 56251))
;;; Generated autoloads from locate.el
(defvar locate-ls-subdir-switches (purecopy "-al") "\
@@ -16750,7 +16710,7 @@ except that FILTER is not optional.
;;;***
-;;;### (autoloads (log-edit) "log-edit" "vc/log-edit.el" (20309 60936))
+;;;### (autoloads (log-edit) "log-edit" "vc/log-edit.el" (20400 16870))
;;; Generated autoloads from vc/log-edit.el
(autoload 'log-edit "log-edit" "\
@@ -16777,8 +16737,8 @@ uses the current buffer.
;;;***
-;;;### (autoloads (log-view-mode) "log-view" "vc/log-view.el" (20309
-;;;;;; 60936))
+;;;### (autoloads (log-view-mode) "log-view" "vc/log-view.el" (20280
+;;;;;; 8018))
;;; Generated autoloads from vc/log-view.el
(autoload 'log-view-mode "log-view" "\
@@ -16788,8 +16748,8 @@ Major mode for browsing CVS log output.
;;;***
-;;;### (autoloads (longlines-mode) "longlines" "longlines.el" (20309
-;;;;;; 60936))
+;;;### (autoloads (longlines-mode) "longlines" "longlines.el" (20229
+;;;;;; 56251))
;;; Generated autoloads from longlines.el
(autoload 'longlines-mode "longlines" "\
@@ -16815,8 +16775,8 @@ newlines are indicated with a symbol.
;;;***
;;;### (autoloads (print-region lpr-region print-buffer lpr-buffer
-;;;;;; lpr-command lpr-switches printer-name) "lpr" "lpr.el" (20309
-;;;;;; 60936))
+;;;;;; lpr-command lpr-switches printer-name) "lpr" "lpr.el" (20229
+;;;;;; 56251))
;;; Generated autoloads from lpr.el
(defvar lpr-windows-system (memq system-type '(ms-dos windows-nt)) "\
@@ -16912,7 +16872,7 @@ for further customization of the printer command.
;;;***
;;;### (autoloads (ls-lisp-support-shell-wildcards) "ls-lisp" "ls-lisp.el"
-;;;;;; (20309 60936))
+;;;;;; (20273 59945))
;;; Generated autoloads from ls-lisp.el
(defvar ls-lisp-support-shell-wildcards t "\
@@ -16923,8 +16883,8 @@ Otherwise they are treated as Emacs regexps (for backward compatibility).")
;;;***
-;;;### (autoloads (lunar-phases) "lunar" "calendar/lunar.el" (20309
-;;;;;; 60936))
+;;;### (autoloads (lunar-phases) "lunar" "calendar/lunar.el" (20229
+;;;;;; 56251))
;;; Generated autoloads from calendar/lunar.el
(autoload 'lunar-phases "lunar" "\
@@ -16938,8 +16898,8 @@ This function is suitable for execution in a .emacs file.
;;;***
-;;;### (autoloads (m4-mode) "m4-mode" "progmodes/m4-mode.el" (20309
-;;;;;; 60936))
+;;;### (autoloads (m4-mode) "m4-mode" "progmodes/m4-mode.el" (20355
+;;;;;; 835))
;;; Generated autoloads from progmodes/m4-mode.el
(autoload 'm4-mode "m4-mode" "\
@@ -16950,7 +16910,7 @@ A major mode to edit m4 macro files.
;;;***
;;;### (autoloads (macroexpand-all) "macroexp" "emacs-lisp/macroexp.el"
-;;;;;; (20309 60936))
+;;;;;; (20229 56251))
;;; Generated autoloads from emacs-lisp/macroexp.el
(autoload 'macroexpand-all "macroexp" "\
@@ -16964,7 +16924,7 @@ definitions to shadow the loaded ones for use in file byte-compilation.
;;;***
;;;### (autoloads (apply-macro-to-region-lines kbd-macro-query insert-kbd-macro
-;;;;;; name-last-kbd-macro) "macros" "macros.el" (20309 60936))
+;;;;;; name-last-kbd-macro) "macros" "macros.el" (20229 56251))
;;; Generated autoloads from macros.el
(autoload 'name-last-kbd-macro "macros" "\
@@ -17053,7 +17013,7 @@ and then select the region of un-tablified names and use
;;;***
;;;### (autoloads (what-domain mail-extract-address-components) "mail-extr"
-;;;;;; "mail/mail-extr.el" (20309 60936))
+;;;;;; "mail/mail-extr.el" (20355 835))
;;; Generated autoloads from mail/mail-extr.el
(autoload 'mail-extract-address-components "mail-extr" "\
@@ -17085,7 +17045,7 @@ Convert mail domain DOMAIN to the country it corresponds to.
;;;### (autoloads (mail-hist-put-headers-into-history mail-hist-keep-history
;;;;;; mail-hist-enable mail-hist-define-keys) "mail-hist" "mail/mail-hist.el"
-;;;;;; (20309 60936))
+;;;;;; (20355 835))
;;; Generated autoloads from mail/mail-hist.el
(autoload 'mail-hist-define-keys "mail-hist" "\
@@ -17099,7 +17059,7 @@ Define keys for accessing mail header history. For use in hooks.
\(fn)" nil nil)
(defvar mail-hist-keep-history t "\
-*Non-nil means keep a history for headers and text of outgoing mail.")
+Non-nil means keep a history for headers and text of outgoing mail.")
(custom-autoload 'mail-hist-keep-history "mail-hist" t)
@@ -17117,7 +17077,7 @@ This function normally would be called when the message is sent.
;;;### (autoloads (mail-fetch-field mail-unquote-printable-region
;;;;;; mail-unquote-printable mail-quote-printable-region mail-quote-printable
;;;;;; mail-file-babyl-p mail-dont-reply-to-names mail-use-rfc822)
-;;;;;; "mail-utils" "mail/mail-utils.el" (20315 8755))
+;;;;;; "mail-utils" "mail/mail-utils.el" (20325 60273))
;;; Generated autoloads from mail/mail-utils.el
(defvar mail-use-rfc822 nil "\
@@ -17192,8 +17152,8 @@ matches may be returned from the message body.
;;;***
;;;### (autoloads (define-mail-abbrev build-mail-abbrevs mail-abbrevs-setup
-;;;;;; mail-abbrevs-mode) "mailabbrev" "mail/mailabbrev.el" (20309
-;;;;;; 60936))
+;;;;;; mail-abbrevs-mode) "mailabbrev" "mail/mailabbrev.el" (20389
+;;;;;; 6410))
;;; Generated autoloads from mail/mailabbrev.el
(defvar mail-abbrevs-mode nil "\
@@ -17244,7 +17204,7 @@ double-quotes.
;;;### (autoloads (mail-complete mail-completion-at-point-function
;;;;;; define-mail-alias expand-mail-aliases mail-complete-style)
-;;;;;; "mailalias" "mail/mailalias.el" (20309 60936))
+;;;;;; "mailalias" "mail/mailalias.el" (20229 56251))
;;; Generated autoloads from mail/mailalias.el
(defvar mail-complete-style 'angles "\
@@ -17296,7 +17256,7 @@ current header, calls `mail-complete-function' and passes prefix ARG if any.
;;;***
;;;### (autoloads (mailclient-send-it) "mailclient" "mail/mailclient.el"
-;;;;;; (20309 60936))
+;;;;;; (20239 35035))
;;; Generated autoloads from mail/mailclient.el
(autoload 'mailclient-send-it "mailclient" "\
@@ -17310,7 +17270,7 @@ The mail client is taken to be the handler of mailto URLs.
;;;### (autoloads (makefile-imake-mode makefile-bsdmake-mode makefile-makepp-mode
;;;;;; makefile-gmake-mode makefile-automake-mode makefile-mode)
-;;;;;; "make-mode" "progmodes/make-mode.el" (20309 60936))
+;;;;;; "make-mode" "progmodes/make-mode.el" (20395 5351))
;;; Generated autoloads from progmodes/make-mode.el
(autoload 'makefile-mode "make-mode" "\
@@ -17427,8 +17387,8 @@ An adapted `makefile-mode' that knows about imake.
;;;***
-;;;### (autoloads (make-command-summary) "makesum" "makesum.el" (20309
-;;;;;; 60936))
+;;;### (autoloads (make-command-summary) "makesum" "makesum.el" (20229
+;;;;;; 56251))
;;; Generated autoloads from makesum.el
(autoload 'make-command-summary "makesum" "\
@@ -17440,7 +17400,7 @@ Previous contents of that buffer are killed first.
;;;***
;;;### (autoloads (Man-bookmark-jump man-follow man) "man" "man.el"
-;;;;;; (20309 60936))
+;;;;;; (20390 32086))
;;; Generated autoloads from man.el
(defalias 'manual-entry 'man)
@@ -17494,7 +17454,7 @@ Default bookmark handler for Man buffers.
;;;***
-;;;### (autoloads (master-mode) "master" "master.el" (20309 60936))
+;;;### (autoloads (master-mode) "master" "master.el" (20229 56251))
;;; Generated autoloads from master.el
(autoload 'master-mode "master" "\
@@ -17517,7 +17477,7 @@ yourself the value of `master-of' by calling `master-show-slave'.
;;;***
;;;### (autoloads (minibuffer-depth-indicate-mode) "mb-depth" "mb-depth.el"
-;;;;;; (20309 60936))
+;;;;;; (20229 56251))
;;; Generated autoloads from mb-depth.el
(defvar minibuffer-depth-indicate-mode nil "\
@@ -17550,7 +17510,7 @@ recursion depth in the minibuffer prompt. This is only useful if
;;;;;; message-forward-make-body message-forward message-recover
;;;;;; message-supersede message-cancel-news message-followup message-wide-reply
;;;;;; message-reply message-news message-mail message-mode) "message"
-;;;;;; "gnus/message.el" (20309 60936))
+;;;;;; "gnus/message.el" (20280 8018))
;;; Generated autoloads from gnus/message.el
(define-mail-user-agent 'message-user-agent 'message-mail 'message-send-and-exit 'message-kill-buffer 'message-send-hook)
@@ -17716,7 +17676,7 @@ which specify the range to operate on.
;;;***
;;;### (autoloads (metapost-mode metafont-mode) "meta-mode" "progmodes/meta-mode.el"
-;;;;;; (20309 60936))
+;;;;;; (20400 16870))
;;; Generated autoloads from progmodes/meta-mode.el
(autoload 'metafont-mode "meta-mode" "\
@@ -17733,7 +17693,7 @@ Major mode for editing MetaPost sources.
;;;### (autoloads (metamail-region metamail-buffer metamail-interpret-body
;;;;;; metamail-interpret-header) "metamail" "mail/metamail.el"
-;;;;;; (20309 60936))
+;;;;;; (20355 835))
;;; Generated autoloads from mail/metamail.el
(autoload 'metamail-interpret-header "metamail" "\
@@ -17778,7 +17738,7 @@ redisplayed as output is inserted.
;;;### (autoloads (mh-fully-kill-draft mh-send-letter mh-user-agent-compose
;;;;;; mh-smail-batch mh-smail-other-window mh-smail) "mh-comp"
-;;;;;; "mh-e/mh-comp.el" (20309 60936))
+;;;;;; "mh-e/mh-comp.el" (20229 56251))
;;; Generated autoloads from mh-e/mh-comp.el
(autoload 'mh-smail "mh-comp" "\
@@ -17868,7 +17828,7 @@ delete the draft message.
;;;***
-;;;### (autoloads (mh-version) "mh-e" "mh-e/mh-e.el" (20309 60936))
+;;;### (autoloads (mh-version) "mh-e" "mh-e/mh-e.el" (20229 56251))
;;; Generated autoloads from mh-e/mh-e.el
(put 'mh-progs 'risky-local-variable t)
@@ -17885,7 +17845,7 @@ Display version information about MH-E and the MH mail handling system.
;;;***
;;;### (autoloads (mh-folder-mode mh-nmail mh-rmail) "mh-folder"
-;;;;;; "mh-e/mh-folder.el" (20309 60936))
+;;;;;; "mh-e/mh-folder.el" (20373 62846))
;;; Generated autoloads from mh-e/mh-folder.el
(autoload 'mh-rmail "mh-folder" "\
@@ -17967,7 +17927,7 @@ perform the operation on all messages in that region.
;;;***
;;;### (autoloads (midnight-delay-set clean-buffer-list) "midnight"
-;;;;;; "midnight.el" (20309 60936))
+;;;;;; "midnight.el" (20229 56251))
;;; Generated autoloads from midnight.el
(autoload 'clean-buffer-list "midnight" "\
@@ -17994,7 +17954,7 @@ to its second argument TM.
;;;***
;;;### (autoloads (minibuffer-electric-default-mode) "minibuf-eldef"
-;;;;;; "minibuf-eldef.el" (20309 60936))
+;;;;;; "minibuf-eldef.el" (20355 835))
;;; Generated autoloads from minibuf-eldef.el
(defvar minibuffer-electric-default-mode nil "\
@@ -18024,7 +17984,7 @@ is modified to remove the default indication.
;;;***
;;;### (autoloads (list-dynamic-libraries butterfly) "misc" "misc.el"
-;;;;;; (20309 60936))
+;;;;;; (20356 48455))
;;; Generated autoloads from misc.el
(autoload 'butterfly "misc" "\
@@ -18054,7 +18014,7 @@ The return value is always nil.
;;;### (autoloads (multi-isearch-files-regexp multi-isearch-files
;;;;;; multi-isearch-buffers-regexp multi-isearch-buffers multi-isearch-setup)
-;;;;;; "misearch" "misearch.el" (20309 60936))
+;;;;;; "misearch" "misearch.el" (20229 56251))
;;; Generated autoloads from misearch.el
(add-hook 'isearch-mode-hook 'multi-isearch-setup)
@@ -18136,7 +18096,7 @@ whose file names match the specified wildcard.
;;;***
;;;### (autoloads (mixal-mode) "mixal-mode" "progmodes/mixal-mode.el"
-;;;;;; (20309 60936))
+;;;;;; (20239 35035))
;;; Generated autoloads from progmodes/mixal-mode.el
(autoload 'mixal-mode "mixal-mode" "\
@@ -18147,7 +18107,7 @@ Major mode for the mixal asm language.
;;;***
;;;### (autoloads (mm-default-file-encoding) "mm-encode" "gnus/mm-encode.el"
-;;;;;; (20309 60936))
+;;;;;; (20229 56251))
;;; Generated autoloads from gnus/mm-encode.el
(autoload 'mm-default-file-encoding "mm-encode" "\
@@ -18158,7 +18118,7 @@ Return a default encoding for FILE.
;;;***
;;;### (autoloads (mm-inline-external-body mm-extern-cache-contents)
-;;;;;; "mm-extern" "gnus/mm-extern.el" (20309 60936))
+;;;;;; "mm-extern" "gnus/mm-extern.el" (20229 56251))
;;; Generated autoloads from gnus/mm-extern.el
(autoload 'mm-extern-cache-contents "mm-extern" "\
@@ -18177,7 +18137,7 @@ If NO-DISPLAY is nil, display it. Otherwise, do nothing after replacing.
;;;***
;;;### (autoloads (mm-inline-partial) "mm-partial" "gnus/mm-partial.el"
-;;;;;; (20309 60936))
+;;;;;; (20229 56251))
;;; Generated autoloads from gnus/mm-partial.el
(autoload 'mm-inline-partial "mm-partial" "\
@@ -18191,7 +18151,7 @@ If NO-DISPLAY is nil, display it. Otherwise, do nothing after replacing.
;;;***
;;;### (autoloads (mm-url-insert-file-contents-external mm-url-insert-file-contents)
-;;;;;; "mm-url" "gnus/mm-url.el" (20309 60936))
+;;;;;; "mm-url" "gnus/mm-url.el" (20229 56251))
;;; Generated autoloads from gnus/mm-url.el
(autoload 'mm-url-insert-file-contents "mm-url" "\
@@ -18208,7 +18168,7 @@ Insert file contents of URL using `mm-url-program'.
;;;***
;;;### (autoloads (mm-uu-dissect-text-parts mm-uu-dissect) "mm-uu"
-;;;;;; "gnus/mm-uu.el" (20314 47703))
+;;;;;; "gnus/mm-uu.el" (20325 60273))
;;; Generated autoloads from gnus/mm-uu.el
(autoload 'mm-uu-dissect "mm-uu" "\
@@ -18228,7 +18188,7 @@ Assume text has been decoded if DECODED is non-nil.
;;;***
;;;### (autoloads (mml-attach-file mml-to-mime) "mml" "gnus/mml.el"
-;;;;;; (20309 60936))
+;;;;;; (20229 56251))
;;; Generated autoloads from gnus/mml.el
(autoload 'mml-to-mime "mml" "\
@@ -18253,7 +18213,7 @@ body) or \"attachment\" (separate from the body).
;;;***
;;;### (autoloads (mml1991-sign mml1991-encrypt) "mml1991" "gnus/mml1991.el"
-;;;;;; (20309 60936))
+;;;;;; (20291 40061))
;;; Generated autoloads from gnus/mml1991.el
(autoload 'mml1991-encrypt "mml1991" "\
@@ -18270,7 +18230,7 @@ body) or \"attachment\" (separate from the body).
;;;### (autoloads (mml2015-self-encrypt mml2015-sign mml2015-encrypt
;;;;;; mml2015-verify-test mml2015-verify mml2015-decrypt-test mml2015-decrypt)
-;;;;;; "mml2015" "gnus/mml2015.el" (20309 60936))
+;;;;;; "mml2015" "gnus/mml2015.el" (20229 56251))
;;; Generated autoloads from gnus/mml2015.el
(autoload 'mml2015-decrypt "mml2015" "\
@@ -18310,8 +18270,15 @@ body) or \"attachment\" (separate from the body).
;;;***
-;;;### (autoloads (m2-mode) "modula2" "progmodes/modula2.el" (20309
-;;;;;; 60936))
+;;;### (autoloads nil "mode-local" "cedet/mode-local.el" (20405 42940))
+;;; Generated autoloads from cedet/mode-local.el
+
+(put 'define-overloadable-function 'doc-string-elt 3)
+
+;;;***
+
+;;;### (autoloads (m2-mode) "modula2" "progmodes/modula2.el" (20355
+;;;;;; 835))
;;; Generated autoloads from progmodes/modula2.el
(defalias 'modula-2-mode 'm2-mode)
@@ -18345,7 +18312,7 @@ followed by the first character of the construct.
;;;***
;;;### (autoloads (denato-region nato-region unmorse-region morse-region)
-;;;;;; "morse" "play/morse.el" (20309 60936))
+;;;;;; "morse" "play/morse.el" (20229 56251))
;;; Generated autoloads from play/morse.el
(autoload 'morse-region "morse" "\
@@ -18371,7 +18338,7 @@ Convert NATO phonetic alphabet in region to ordinary ASCII text.
;;;***
;;;### (autoloads (mouse-drag-drag mouse-drag-throw) "mouse-drag"
-;;;;;; "mouse-drag.el" (20309 60936))
+;;;;;; "mouse-drag.el" (20355 835))
;;; Generated autoloads from mouse-drag.el
(autoload 'mouse-drag-throw "mouse-drag" "\
@@ -18418,51 +18385,7 @@ To test this function, evaluate:
;;;***
-;;;### (autoloads (mouse-sel-mode) "mouse-sel" "mouse-sel.el" (20309
-;;;;;; 60936))
-;;; Generated autoloads from mouse-sel.el
-
-(defvar mouse-sel-mode nil "\
-Non-nil if Mouse-Sel mode is enabled.
-See the command `mouse-sel-mode' for a description of this minor mode.
-Setting this variable directly does not take effect;
-either customize it (see the info node `Easy Customization')
-or call the function `mouse-sel-mode'.")
-
-(custom-autoload 'mouse-sel-mode "mouse-sel" nil)
-
-(autoload 'mouse-sel-mode "mouse-sel" "\
-Toggle Mouse Sel mode.
-With a prefix argument ARG, enable Mouse Sel mode if ARG is
-positive, and disable it otherwise. If called from Lisp, enable
-the mode if ARG is omitted or nil.
-
-Mouse Sel mode is a global minor mode. When enabled, mouse
-selection is enhanced in various ways:
-
-- Double-clicking on symbol constituents selects symbols.
-Double-clicking on quotes or parentheses selects sexps.
-Double-clicking on whitespace selects whitespace.
-Triple-clicking selects lines.
-Quad-clicking selects paragraphs.
-
-- Selecting sets the region & X primary selection, but does NOT affect
-the `kill-ring', nor do the kill-ring functions change the X selection.
-Because the mouse handlers set the primary selection directly,
-mouse-sel sets the variables `interprogram-cut-function' and
-`interprogram-paste-function' to nil.
-
-- Clicking mouse-2 inserts the contents of the primary selection at
-the mouse position (or point, if `mouse-yank-at-point' is non-nil).
-
-- mouse-2 while selecting or extending copies selection to the
-kill ring; mouse-1 or mouse-3 kills it.
-
-\(fn &optional ARG)" t nil)
-
-;;;***
-
-;;;### (autoloads (mpc) "mpc" "mpc.el" (20309 60936))
+;;;### (autoloads (mpc) "mpc" "mpc.el" (20376 50653))
;;; Generated autoloads from mpc.el
(autoload 'mpc "mpc" "\
@@ -18472,7 +18395,7 @@ Main entry point for MPC.
;;;***
-;;;### (autoloads (mpuz) "mpuz" "play/mpuz.el" (20309 60936))
+;;;### (autoloads (mpuz) "mpuz" "play/mpuz.el" (20229 56251))
;;; Generated autoloads from play/mpuz.el
(autoload 'mpuz "mpuz" "\
@@ -18482,7 +18405,7 @@ Multiplication puzzle with GNU Emacs.
;;;***
-;;;### (autoloads (msb-mode) "msb" "msb.el" (20309 60936))
+;;;### (autoloads (msb-mode) "msb" "msb.el" (20355 835))
;;; Generated autoloads from msb.el
(defvar msb-mode nil "\
@@ -18512,7 +18435,7 @@ different buffer menu using the function `msb'.
;;;;;; describe-current-coding-system describe-current-coding-system-briefly
;;;;;; describe-coding-system describe-character-set list-charset-chars
;;;;;; read-charset list-character-sets) "mule-diag" "international/mule-diag.el"
-;;;;;; (20309 60936))
+;;;;;; (20229 56251))
;;; Generated autoloads from international/mule-diag.el
(autoload 'list-character-sets "mule-diag" "\
@@ -18649,7 +18572,7 @@ The default is 20. If LIMIT is negative, do not limit the listing.
;;;;;; coding-system-translation-table-for-decode coding-system-pre-write-conversion
;;;;;; coding-system-post-read-conversion lookup-nested-alist set-nested-alist
;;;;;; truncate-string-to-width store-substring string-to-sequence)
-;;;;;; "mule-util" "international/mule-util.el" (20309 60936))
+;;;;;; "mule-util" "international/mule-util.el" (20229 56251))
;;; Generated autoloads from international/mule-util.el
(autoload 'string-to-sequence "mule-util" "\
@@ -18660,11 +18583,9 @@ TYPE should be `list' or `vector'.
(make-obsolete 'string-to-sequence "use `string-to-list' or `string-to-vector'." "22.1")
-(defsubst string-to-list (string) "\
-Return a list of characters in STRING." (append string nil))
+(defsubst string-to-list (string) "Return a list of characters in STRING." (append string nil))
-(defsubst string-to-vector (string) "\
-Return a vector of characters in STRING." (vconcat string))
+(defsubst string-to-vector (string) "Return a vector of characters in STRING." (vconcat string))
(autoload 'store-substring "mule-util" "\
Embed OBJ (string or character) at index IDX of STRING.
@@ -18697,16 +18618,7 @@ defaults to \"...\".
\(fn STR END-COLUMN &optional START-COLUMN PADDING ELLIPSIS)" nil nil)
-(defsubst nested-alist-p (obj) "\
-Return t if OBJ is a nested alist.
-
-Nested alist is a list of the form (ENTRY . BRANCHES), where ENTRY is
-any Lisp object, and BRANCHES is a list of cons cells of the form
-\(KEY-ELEMENT . NESTED-ALIST).
-
-You can use a nested alist to store any Lisp object (ENTRY) for a key
-sequence KEYSEQ, where KEYSEQ is a sequence of KEY-ELEMENT. KEYSEQ
-can be a string, a vector, or a list." (and obj (listp obj) (listp (cdr obj))))
+(defsubst nested-alist-p (obj) "Return t if OBJ is a nested alist.\n\nNested alist is a list of the form (ENTRY . BRANCHES), where ENTRY is\nany Lisp object, and BRANCHES is a list of cons cells of the form\n(KEY-ELEMENT . NESTED-ALIST).\n\nYou can use a nested alist to store any Lisp object (ENTRY) for a key\nsequence KEYSEQ, where KEYSEQ is a sequence of KEY-ELEMENT. KEYSEQ\ncan be a string, a vector, or a list." (and obj (listp obj) (listp (cdr obj))))
(autoload 'set-nested-alist "mule-util" "\
Set ENTRY for KEYSEQ in a nested alist ALIST.
@@ -18789,8 +18701,8 @@ per-character basis, this may not be accurate.
;;;### (autoloads (network-connection network-connection-to-service
;;;;;; whois-reverse-lookup whois finger ftp run-dig dns-lookup-host
;;;;;; nslookup nslookup-host ping traceroute route arp netstat
-;;;;;; iwconfig ifconfig) "net-utils" "net/net-utils.el" (20309
-;;;;;; 60936))
+;;;;;; iwconfig ifconfig) "net-utils" "net/net-utils.el" (20229
+;;;;;; 56251))
;;; Generated autoloads from net/net-utils.el
(autoload 'ifconfig "net-utils" "\
@@ -18884,8 +18796,8 @@ Open a network connection to HOST on PORT.
;;;***
-;;;### (autoloads (netrc-credentials) "netrc" "net/netrc.el" (20309
-;;;;;; 60936))
+;;;### (autoloads (netrc-credentials) "netrc" "net/netrc.el" (20280
+;;;;;; 8018))
;;; Generated autoloads from net/netrc.el
(autoload 'netrc-credentials "netrc" "\
@@ -18898,7 +18810,7 @@ listed in the PORTS list.
;;;***
;;;### (autoloads (open-network-stream) "network-stream" "net/network-stream.el"
-;;;;;; (20332 33075))
+;;;;;; (20370 4296))
;;; Generated autoloads from net/network-stream.el
(autoload 'open-network-stream "network-stream" "\
@@ -18976,9 +18888,8 @@ values:
certificate. This parameter will only be used when doing TLS
or STARTTLS connections.
-If :use-starttls-if-possible is non-nil, do opportunistic
-STARTTLS upgrades even if Emacs doesn't have built-in TLS
-functionality.
+:use-starttls-if-possible is a boolean that says to do opportunistic
+STARTTLS upgrades even if Emacs doesn't have built-in TLS functionality.
:nowait is a boolean that says the connection should be made
asynchronously, if possible.
@@ -18989,254 +18900,8 @@ functionality.
;;;***
-;;;### (autoloads (comment-indent-new-line comment-auto-fill-only-comments
-;;;;;; comment-dwim comment-or-uncomment-region comment-box comment-region
-;;;;;; uncomment-region comment-kill comment-set-column comment-indent
-;;;;;; comment-indent-default comment-normalize-vars comment-multi-line
-;;;;;; comment-padding comment-style comment-column) "newcomment"
-;;;;;; "newcomment.el" (20332 33075))
-;;; Generated autoloads from newcomment.el
-
-(defalias 'indent-for-comment 'comment-indent)
-
-(defalias 'set-comment-column 'comment-set-column)
-
-(defalias 'kill-comment 'comment-kill)
-
-(defalias 'indent-new-comment-line 'comment-indent-new-line)
-
-(defvar comment-use-syntax 'undecided "\
-Non-nil if syntax-tables can be used instead of regexps.
-Can also be `undecided' which means that a somewhat expensive test will
-be used to try to determine whether syntax-tables should be trusted
-to understand comments or not in the given buffer.
-Major modes should set this variable.")
-
-(defvar comment-column 32 "\
-Column to indent right-margin comments to.
-Each mode may establish a different default value for this variable; you
-can set the value for a particular mode using that mode's hook.
-Comments might be indented to a different value in order not to go beyond
-`comment-fill-column' or in order to align them with surrounding comments.")
-
-(custom-autoload 'comment-column "newcomment" t)
-(put 'comment-column 'safe-local-variable 'integerp)
-
-(defvar comment-start nil "\
-*String to insert to start a new comment, or nil if no comment syntax.")
-(put 'comment-start 'safe-local-variable 'string-or-null-p)
-
-(defvar comment-start-skip nil "\
-*Regexp to match the start of a comment plus everything up to its body.
-If there are any \\(...\\) pairs, the comment delimiter text is held to begin
-at the place matched by the close of the first pair.")
-(put 'comment-start-skip 'safe-local-variable 'string-or-null-p)
-
-(defvar comment-end-skip nil "\
-Regexp to match the end of a comment plus everything back to its body.")
-(put 'comment-end-skip 'safe-local-variable 'string-or-null-p)
-
-(defvar comment-end (purecopy "") "\
-*String to insert to end a new comment.
-Should be an empty string if comments are terminated by end-of-line.")
-(put 'comment-end 'safe-local-variable 'string-or-null-p)
-
-(defvar comment-indent-function 'comment-indent-default "\
-Function to compute desired indentation for a comment.
-This function is called with no args with point at the beginning of
-the comment's starting delimiter and should return either the desired
-column indentation or nil.
-If nil is returned, indentation is delegated to `indent-according-to-mode'.")
-
-(defvar comment-insert-comment-function nil "\
-Function to insert a comment when a line doesn't contain one.
-The function has no args.
-
-Applicable at least in modes for languages like fixed-format Fortran where
-comments always start in column zero.")
-
-(defconst comment-styles '((plain nil nil nil nil "Start in column 0 (do not indent), as in Emacs-20") (indent-or-triple nil nil nil multi-char "Start in column 0, but only for single-char starters") (indent nil nil nil t "Full comment per line, ends not aligned") (aligned nil t nil t "Full comment per line, ends aligned") (box nil t t t "Full comment per line, ends aligned, + top and bottom") (extra-line t nil t t "One comment for all lines, end on a line by itself") (multi-line t nil nil t "One comment for all lines, end on last commented line") (box-multi t t t t "One comment for all lines, + top and bottom")) "\
-Comment region style definitions.
-Each style is defined with a form (STYLE . (MULTI ALIGN EXTRA INDENT DOC)).
-DOC should succinctly describe the style.
-STYLE should be a mnemonic symbol.
-MULTI specifies that comments are allowed to span multiple lines.
- e.g. in C it comments regions as
- /* blabla
- * bli */
- rather than
- /* blabla */
- /* bli */
- if `comment-end' is empty, this has no effect.
-
-ALIGN specifies that the `comment-end' markers should be aligned.
- e.g. in C it comments regions as
- /* blabla */
- /* bli */
- rather than
- /* blabla */
- /* bli */
- if `comment-end' is empty, this has no effect, unless EXTRA is also set,
- in which case the comment gets wrapped in a box.
-
-EXTRA specifies that an extra line should be used before and after the
- region to comment (to put the `comment-end' and `comment-start').
- e.g. in C it comments regions as
- /*
- * blabla
- * bli
- */
- rather than
- /* blabla
- * bli */
- if the comment style is not multi line, this has no effect, unless ALIGN
- is also set, in which case the comment gets wrapped in a box.
-
-INDENT specifies that the `comment-start' markers should not be put at the
- left margin but at the current indentation of the region to comment.
-If INDENT is `multi-char', that means indent multi-character
- comment starters, but not one-character comment starters.")
-
-(defvar comment-style 'indent "\
-Style to be used for `comment-region'.
-See `comment-styles' for a list of available styles.")
-
-(custom-autoload 'comment-style "newcomment" t)
-
-(defvar comment-padding (purecopy " ") "\
-Padding string that `comment-region' puts between comment chars and text.
-Can also be an integer which will be automatically turned into a string
-of the corresponding number of spaces.
-
-Extra spacing between the comment characters and the comment text
-makes the comment easier to read. Default is 1. nil means 0.")
-
-(custom-autoload 'comment-padding "newcomment" t)
-
-(defvar comment-multi-line nil "\
-Non-nil means `comment-indent-new-line' continues comments.
-That is, it inserts no new terminator or starter.
-This affects `auto-fill-mode', which is the main reason to
-customize this variable.
-
-It also affects \\[indent-new-comment-line]. However, if you want this
-behavior for explicit filling, you might as well use \\[newline-and-indent].")
-
-(custom-autoload 'comment-multi-line "newcomment" t)
-
-(autoload 'comment-normalize-vars "newcomment" "\
-Check and setup the variables needed by other commenting functions.
-Functions autoloaded from newcomment.el, being entry points, should call
-this function before any other, so the rest of the code can assume that
-the variables are properly set.
-
-\(fn &optional NOERROR)" nil nil)
-
-(autoload 'comment-indent-default "newcomment" "\
-Default for `comment-indent-function'.
-
-\(fn)" nil nil)
-
-(autoload 'comment-indent "newcomment" "\
-Indent this line's comment to `comment-column', or insert an empty comment.
-If CONTINUE is non-nil, use the `comment-continue' markers if any.
-
-\(fn &optional CONTINUE)" t nil)
-
-(autoload 'comment-set-column "newcomment" "\
-Set the comment column based on point.
-With no ARG, set the comment column to the current column.
-With just minus as arg, kill any comment on this line.
-With any other arg, set comment column to indentation of the previous comment
- and then align or create a comment on this line at that column.
-
-\(fn ARG)" t nil)
-
-(autoload 'comment-kill "newcomment" "\
-Kill the first comment on this line, if any.
-With prefix ARG, kill comments on that many lines starting with this one.
-
-\(fn ARG)" t nil)
-
-(autoload 'uncomment-region "newcomment" "\
-Uncomment each line in the BEG .. END region.
-The numeric prefix ARG can specify a number of chars to remove from the
-comment markers.
-
-\(fn BEG END &optional ARG)" t nil)
-
-(autoload 'comment-region "newcomment" "\
-Comment or uncomment each line in the region.
-With just \\[universal-argument] prefix arg, uncomment each line in region BEG .. END.
-Numeric prefix ARG means use ARG comment characters.
-If ARG is negative, delete that many comment characters instead.
-
-The strings used as comment starts are built from `comment-start'
-and `comment-padding'; the strings used as comment ends are built
-from `comment-end' and `comment-padding'.
-
-By default, the `comment-start' markers are inserted at the
-current indentation of the region, and comments are terminated on
-each line (even for syntaxes in which newline does not end the
-comment and blank lines do not get comments). This can be
-changed with `comment-style'.
-
-\(fn BEG END &optional ARG)" t nil)
-
-(autoload 'comment-box "newcomment" "\
-Comment out the BEG .. END region, putting it inside a box.
-The numeric prefix ARG specifies how many characters to add to begin- and
-end- comment markers additionally to what `comment-add' already specifies.
-
-\(fn BEG END &optional ARG)" t nil)
-
-(autoload 'comment-or-uncomment-region "newcomment" "\
-Call `comment-region', unless the region only consists of comments,
-in which case call `uncomment-region'. If a prefix arg is given, it
-is passed on to the respective function.
-
-\(fn BEG END &optional ARG)" t nil)
-
-(autoload 'comment-dwim "newcomment" "\
-Call the comment command you want (Do What I Mean).
-If the region is active and `transient-mark-mode' is on, call
-`comment-region' (unless it only consists of comments, in which
-case it calls `uncomment-region').
-Else, if the current line is empty, call `comment-insert-comment-function'
-if it is defined, otherwise insert a comment and indent it.
-Else if a prefix ARG is specified, call `comment-kill'.
-Else, call `comment-indent'.
-You can configure `comment-style' to change the way regions are commented.
-
-\(fn ARG)" t nil)
-
-(defvar comment-auto-fill-only-comments nil "\
-Non-nil means to only auto-fill inside comments.
-This has no effect in modes that do not define a comment syntax.")
-
-(custom-autoload 'comment-auto-fill-only-comments "newcomment" t)
-
-(autoload 'comment-indent-new-line "newcomment" "\
-Break line at point and indent, continuing comment if within one.
-This indents the body of the continued comment
-under the previous comment line.
-
-This command is intended for styles where you write a comment per line,
-starting a new comment (and terminating it if necessary) on each line.
-If you want to continue one comment across several lines, use \\[newline-and-indent].
-
-If a fill column is specified, it overrides the use of the comment column
-or comment indentation.
-
-The inserted newline is marked hard if variable `use-hard-newlines' is true,
-unless optional argument SOFT is non-nil.
-
-\(fn &optional SOFT)" t nil)
-
-;;;***
-
;;;### (autoloads (newsticker-start newsticker-running-p) "newst-backend"
-;;;;;; "net/newst-backend.el" (20309 60936))
+;;;;;; "net/newst-backend.el" (20229 56251))
;;; Generated autoloads from net/newst-backend.el
(autoload 'newsticker-running-p "newst-backend" "\
@@ -19258,7 +18923,7 @@ Run `newsticker-start-hook' if newsticker was not running already.
;;;***
;;;### (autoloads (newsticker-plainview) "newst-plainview" "net/newst-plainview.el"
-;;;;;; (20309 60936))
+;;;;;; (20229 56251))
;;; Generated autoloads from net/newst-plainview.el
(autoload 'newsticker-plainview "newst-plainview" "\
@@ -19269,7 +18934,7 @@ Start newsticker plainview.
;;;***
;;;### (autoloads (newsticker-show-news) "newst-reader" "net/newst-reader.el"
-;;;;;; (20309 60936))
+;;;;;; (20229 56251))
;;; Generated autoloads from net/newst-reader.el
(autoload 'newsticker-show-news "newst-reader" "\
@@ -19280,7 +18945,7 @@ Start reading news. You may want to bind this to a key.
;;;***
;;;### (autoloads (newsticker-start-ticker newsticker-ticker-running-p)
-;;;;;; "newst-ticker" "net/newst-ticker.el" (20309 60936))
+;;;;;; "newst-ticker" "net/newst-ticker.el" (20229 56251))
;;; Generated autoloads from net/newst-ticker.el
(autoload 'newsticker-ticker-running-p "newst-ticker" "\
@@ -19301,7 +18966,7 @@ running already.
;;;***
;;;### (autoloads (newsticker-treeview) "newst-treeview" "net/newst-treeview.el"
-;;;;;; (20309 60936))
+;;;;;; (20229 56251))
;;; Generated autoloads from net/newst-treeview.el
(autoload 'newsticker-treeview "newst-treeview" "\
@@ -19312,7 +18977,7 @@ Start newsticker treeview.
;;;***
;;;### (autoloads (nndiary-generate-nov-databases) "nndiary" "gnus/nndiary.el"
-;;;;;; (20309 60936))
+;;;;;; (20229 56251))
;;; Generated autoloads from gnus/nndiary.el
(autoload 'nndiary-generate-nov-databases "nndiary" "\
@@ -19322,8 +18987,8 @@ Generate NOV databases in all nndiary directories.
;;;***
-;;;### (autoloads (nndoc-add-type) "nndoc" "gnus/nndoc.el" (20309
-;;;;;; 60936))
+;;;### (autoloads (nndoc-add-type) "nndoc" "gnus/nndoc.el" (20229
+;;;;;; 56251))
;;; Generated autoloads from gnus/nndoc.el
(autoload 'nndoc-add-type "nndoc" "\
@@ -19338,7 +19003,7 @@ symbol in the alist.
;;;***
;;;### (autoloads (nnfolder-generate-active-file) "nnfolder" "gnus/nnfolder.el"
-;;;;;; (20309 60936))
+;;;;;; (20229 56251))
;;; Generated autoloads from gnus/nnfolder.el
(autoload 'nnfolder-generate-active-file "nnfolder" "\
@@ -19350,7 +19015,7 @@ This command does not work if you use short group names.
;;;***
;;;### (autoloads (nnml-generate-nov-databases) "nnml" "gnus/nnml.el"
-;;;;;; (20309 60936))
+;;;;;; (20281 6865))
;;; Generated autoloads from gnus/nnml.el
(autoload 'nnml-generate-nov-databases "nnml" "\
@@ -19361,15 +19026,15 @@ Generate NOV databases in all nnml directories.
;;;***
;;;### (autoloads (disable-command enable-command disabled-command-function)
-;;;;;; "novice" "novice.el" (20309 60936))
+;;;;;; "novice" "novice.el" (20400 16870))
;;; Generated autoloads from novice.el
+(define-obsolete-variable-alias 'disabled-command-hook 'disabled-command-function "22.1")
+
(defvar disabled-command-function 'disabled-command-function "\
Function to call to handle disabled commands.
If nil, the feature is disabled, i.e., all commands work normally.")
-(define-obsolete-variable-alias 'disabled-command-hook 'disabled-command-function "22.1")
-
(autoload 'disabled-command-function "novice" "\
@@ -19394,7 +19059,7 @@ to future sessions.
;;;***
;;;### (autoloads (nroff-mode) "nroff-mode" "textmodes/nroff-mode.el"
-;;;;;; (20309 60936))
+;;;;;; (20229 56251))
;;; Generated autoloads from textmodes/nroff-mode.el
(autoload 'nroff-mode "nroff-mode" "\
@@ -19409,7 +19074,7 @@ closing requests for requests that are used in matched pairs.
;;;***
;;;### (autoloads (nxml-glyph-display-string) "nxml-glyph" "nxml/nxml-glyph.el"
-;;;;;; (20309 60936))
+;;;;;; (20355 835))
;;; Generated autoloads from nxml/nxml-glyph.el
(autoload 'nxml-glyph-display-string "nxml-glyph" "\
@@ -19421,8 +19086,8 @@ Return nil if the face cannot display a glyph for N.
;;;***
-;;;### (autoloads (nxml-mode) "nxml-mode" "nxml/nxml-mode.el" (20317
-;;;;;; 29729))
+;;;### (autoloads (nxml-mode) "nxml-mode" "nxml/nxml-mode.el" (20370
+;;;;;; 4296))
;;; Generated autoloads from nxml/nxml-mode.el
(autoload 'nxml-mode "nxml-mode" "\
@@ -19484,7 +19149,7 @@ Many aspects this mode can be customized using
;;;***
;;;### (autoloads (nxml-enable-unicode-char-name-sets) "nxml-uchnm"
-;;;;;; "nxml/nxml-uchnm.el" (20309 60936))
+;;;;;; "nxml/nxml-uchnm.el" (20229 56251))
;;; Generated autoloads from nxml/nxml-uchnm.el
(autoload 'nxml-enable-unicode-char-name-sets "nxml-uchnm" "\
@@ -19508,7 +19173,7 @@ the variable `nxml-enabled-unicode-blocks'.
;;;;;; org-babel-pop-to-session-maybe org-babel-load-in-session-maybe
;;;;;; org-babel-expand-src-block-maybe org-babel-view-src-block-info
;;;;;; org-babel-execute-maybe org-babel-execute-safely-maybe) "ob"
-;;;;;; "org/ob.el" (20345 9613))
+;;;;;; "org/ob.el" (20347 39495))
;;; Generated autoloads from org/ob.el
(autoload 'org-babel-execute-safely-maybe "ob" "\
@@ -19731,7 +19396,7 @@ Mark current src block
;;;***
;;;### (autoloads (org-babel-describe-bindings) "ob-keys" "org/ob-keys.el"
-;;;;;; (20309 60936))
+;;;;;; (20228 61824))
;;; Generated autoloads from org/ob-keys.el
(autoload 'org-babel-describe-bindings "ob-keys" "\
@@ -19742,7 +19407,7 @@ Describe all keybindings behind `org-babel-key-prefix'.
;;;***
;;;### (autoloads (org-babel-lob-get-info org-babel-lob-execute-maybe
-;;;;;; org-babel-lob-ingest) "ob-lob" "org/ob-lob.el" (20345 9613))
+;;;;;; org-babel-lob-ingest) "ob-lob" "org/ob-lob.el" (20347 39495))
;;; Generated autoloads from org/ob-lob.el
(autoload 'org-babel-lob-ingest "ob-lob" "\
@@ -19767,7 +19432,7 @@ Return a Library of Babel function call as a string.
;;;### (autoloads (org-babel-tangle org-babel-tangle-file org-babel-load-file
;;;;;; org-babel-tangle-lang-exts) "ob-tangle" "org/ob-tangle.el"
-;;;;;; (20344 35712))
+;;;;;; (20347 39495))
;;; Generated autoloads from org/ob-tangle.el
(defvar org-babel-tangle-lang-exts '(("emacs-lisp" . "el")) "\
@@ -19809,7 +19474,7 @@ exported source code blocks by language.
;;;***
;;;### (autoloads (inferior-octave) "octave-inf" "progmodes/octave-inf.el"
-;;;;;; (20309 60936))
+;;;;;; (20355 835))
;;; Generated autoloads from progmodes/octave-inf.el
(autoload 'inferior-octave "octave-inf" "\
@@ -19832,7 +19497,7 @@ startup file, `~/.emacs-octave'.
;;;***
;;;### (autoloads (octave-mode) "octave-mod" "progmodes/octave-mod.el"
-;;;;;; (20309 60936))
+;;;;;; (20389 6410))
;;; Generated autoloads from progmodes/octave-mod.el
(autoload 'octave-mode "octave-mod" "\
@@ -19920,7 +19585,7 @@ including a reproducible test case and send the message.
;;;;;; org-insert-link-global org-store-link org-run-like-in-org-mode
;;;;;; turn-on-orgstruct++ turn-on-orgstruct orgstruct-mode org-global-cycle
;;;;;; org-mode org-version org-babel-do-load-languages) "org" "org/org.el"
-;;;;;; (20345 9613))
+;;;;;; (20379 60745))
;;; Generated autoloads from org/org.el
(autoload 'org-babel-do-load-languages "org" "\
@@ -20153,7 +19818,7 @@ Call the customize function with org as argument.
;;;;;; org-diary org-agenda-list-stuck-projects org-tags-view org-todo-list
;;;;;; org-search-view org-agenda-list org-batch-store-agenda-views
;;;;;; org-store-agenda-views org-batch-agenda-csv org-batch-agenda
-;;;;;; org-agenda) "org-agenda" "org/org-agenda.el" (20344 35712))
+;;;;;; org-agenda) "org-agenda" "org/org-agenda.el" (20379 60745))
;;; Generated autoloads from org/org-agenda.el
(autoload 'org-agenda "org-agenda" "\
@@ -20407,7 +20072,7 @@ details and examples.
;;;### (autoloads (org-archive-subtree-default-with-confirmation
;;;;;; org-archive-subtree-default) "org-archive" "org/org-archive.el"
-;;;;;; (20309 60936))
+;;;;;; (20347 39495))
;;; Generated autoloads from org/org-archive.el
(autoload 'org-archive-subtree-default "org-archive" "\
@@ -20427,8 +20092,8 @@ This command is set with the variable `org-archive-default-command'.
;;;### (autoloads (org-export-as-ascii org-export-region-as-ascii
;;;;;; org-replace-region-by-ascii org-export-as-ascii-to-buffer
;;;;;; org-export-as-utf8-to-buffer org-export-as-utf8 org-export-as-latin1-to-buffer
-;;;;;; org-export-as-latin1) "org-ascii" "org/org-ascii.el" (20345
-;;;;;; 9613))
+;;;;;; org-export-as-latin1) "org-ascii" "org/org-ascii.el" (20344
+;;;;;; 56211))
;;; Generated autoloads from org/org-ascii.el
(autoload 'org-export-as-latin1 "org-ascii" "\
@@ -20501,8 +20166,8 @@ publishing directory.
;;;***
-;;;### (autoloads (org-attach) "org-attach" "org/org-attach.el" (20345
-;;;;;; 9613))
+;;;### (autoloads (org-attach) "org-attach" "org/org-attach.el" (20347
+;;;;;; 39495))
;;; Generated autoloads from org/org-attach.el
(autoload 'org-attach "org-attach" "\
@@ -20514,7 +20179,7 @@ Shows a list of commands and prompts for another key to execute a command.
;;;***
;;;### (autoloads (org-bbdb-anniversaries) "org-bbdb" "org/org-bbdb.el"
-;;;;;; (20345 9613))
+;;;;;; (20344 56211))
;;; Generated autoloads from org/org-bbdb.el
(autoload 'org-bbdb-anniversaries "org-bbdb" "\
@@ -20525,7 +20190,7 @@ Extract anniversaries from BBDB for display in the agenda.
;;;***
;;;### (autoloads (org-capture-import-remember-templates org-capture-insert-template-here
-;;;;;; org-capture) "org-capture" "org/org-capture.el" (20345 9613))
+;;;;;; org-capture) "org-capture" "org/org-capture.el" (20347 39495))
;;; Generated autoloads from org/org-capture.el
(autoload 'org-capture "org-capture" "\
@@ -20563,7 +20228,7 @@ Set org-capture-templates to be similar to `org-remember-templates'.
;;;***
;;;### (autoloads (org-clock-persistence-insinuate org-get-clocktable)
-;;;;;; "org-clock" "org/org-clock.el" (20345 9613))
+;;;;;; "org-clock" "org/org-clock.el" (20379 60745))
;;; Generated autoloads from org/org-clock.el
(autoload 'org-get-clocktable "org-clock" "\
@@ -20581,7 +20246,7 @@ Set up hooks for clock persistence.
;;;***
;;;### (autoloads (org-datetree-find-date-create) "org-datetree"
-;;;;;; "org/org-datetree.el" (20345 9613))
+;;;;;; "org/org-datetree.el" (20344 56211))
;;; Generated autoloads from org/org-datetree.el
(autoload 'org-datetree-find-date-create "org-datetree" "\
@@ -20597,7 +20262,7 @@ tree can be found.
;;;### (autoloads (org-export-as-docbook org-export-as-docbook-pdf-and-open
;;;;;; org-export-as-docbook-pdf org-export-region-as-docbook org-replace-region-by-docbook
;;;;;; org-export-as-docbook-to-buffer org-export-as-docbook-batch)
-;;;;;; "org-docbook" "org/org-docbook.el" (20345 9613))
+;;;;;; "org-docbook" "org/org-docbook.el" (20347 39495))
;;; Generated autoloads from org/org-docbook.el
(autoload 'org-export-as-docbook-batch "org-docbook" "\
@@ -20674,7 +20339,7 @@ publishing directory.
;;;### (autoloads (org-insert-export-options-template org-export-as-org
;;;;;; org-export-visible org-export) "org-exp" "org/org-exp.el"
-;;;;;; (20344 35712))
+;;;;;; (20347 39495))
;;; Generated autoloads from org/org-exp.el
(autoload 'org-export "org-exp" "\
@@ -20735,8 +20400,8 @@ Insert into the buffer a template with information for exporting.
;;;***
;;;### (autoloads (org-feed-show-raw-feed org-feed-goto-inbox org-feed-update
-;;;;;; org-feed-update-all) "org-feed" "org/org-feed.el" (20309
-;;;;;; 60936))
+;;;;;; org-feed-update-all) "org-feed" "org/org-feed.el" (20228
+;;;;;; 61824))
;;; Generated autoloads from org/org-feed.el
(autoload 'org-feed-update-all "org-feed" "\
@@ -20764,7 +20429,7 @@ Show the raw feed buffer of a feed.
;;;***
;;;### (autoloads (org-footnote-normalize org-footnote-action) "org-footnote"
-;;;;;; "org/org-footnote.el" (20344 35712))
+;;;;;; "org/org-footnote.el" (20379 60745))
;;; Generated autoloads from org/org-footnote.el
(autoload 'org-footnote-action "org-footnote" "\
@@ -20815,7 +20480,7 @@ Additional note on `org-footnote-insert-pos-for-preprocessor':
;;;### (autoloads (org-freemind-to-org-mode org-freemind-from-org-sparse-tree
;;;;;; org-freemind-from-org-mode org-freemind-from-org-mode-node
;;;;;; org-freemind-show org-export-as-freemind) "org-freemind"
-;;;;;; "org/org-freemind.el" (20309 60936))
+;;;;;; "org/org-freemind.el" (20347 39495))
;;; Generated autoloads from org/org-freemind.el
(autoload 'org-export-as-freemind "org-freemind" "\
@@ -20876,7 +20541,7 @@ Convert FreeMind file MM-FILE to `org-mode' file ORG-FILE.
;;;### (autoloads (org-export-htmlize-generate-css org-export-as-html
;;;;;; org-export-region-as-html org-replace-region-by-html org-export-as-html-to-buffer
;;;;;; org-export-as-html-batch org-export-as-html-and-open) "org-html"
-;;;;;; "org/org-html.el" (20344 35712))
+;;;;;; "org/org-html.el" (20347 39495))
;;; Generated autoloads from org/org-html.el
(put 'org-export-html-style-include-default 'safe-local-variable 'booleanp)
@@ -20970,7 +20635,7 @@ that uses these same face definitions.
;;;### (autoloads (org-export-icalendar-combine-agenda-files org-export-icalendar-all-agenda-files
;;;;;; org-export-icalendar-this-file) "org-icalendar" "org/org-icalendar.el"
-;;;;;; (20309 60936))
+;;;;;; (20347 39495))
;;; Generated autoloads from org/org-icalendar.el
(autoload 'org-export-icalendar-this-file "org-icalendar" "\
@@ -20998,7 +20663,7 @@ The file is stored under the name `org-combined-agenda-icalendar-file'.
;;;### (autoloads (org-id-store-link org-id-find-id-file org-id-find
;;;;;; org-id-goto org-id-get-with-outline-drilling org-id-get-with-outline-path-completion
;;;;;; org-id-get org-id-copy org-id-get-create) "org-id" "org/org-id.el"
-;;;;;; (20309 60936))
+;;;;;; (20228 61824))
;;; Generated autoloads from org/org-id.el
(autoload 'org-id-get-create "org-id" "\
@@ -21067,7 +20732,7 @@ Store a link to the current entry, using its ID.
;;;***
;;;### (autoloads (org-indent-mode) "org-indent" "org/org-indent.el"
-;;;;;; (20344 35712))
+;;;;;; (20344 56211))
;;; Generated autoloads from org/org-indent.el
(autoload 'org-indent-mode "org-indent" "\
@@ -21085,7 +20750,7 @@ during idle time.
;;;***
;;;### (autoloads (org-irc-store-link) "org-irc" "org/org-irc.el"
-;;;;;; (20309 60936))
+;;;;;; (20228 61824))
;;; Generated autoloads from org/org-irc.el
(autoload 'org-irc-store-link "org-irc" "\
@@ -21098,7 +20763,7 @@ Dispatch to the appropriate function to store a link to an IRC session.
;;;### (autoloads (org-export-as-pdf-and-open org-export-as-pdf org-export-as-latex
;;;;;; org-export-region-as-latex org-replace-region-by-latex org-export-as-latex-to-buffer
;;;;;; org-export-as-latex-batch) "org-latex" "org/org-latex.el"
-;;;;;; (20344 35712))
+;;;;;; (20344 56211))
;;; Generated autoloads from org/org-latex.el
(autoload 'org-export-as-latex-batch "org-latex" "\
@@ -21179,7 +20844,7 @@ Export as LaTeX, then process through to PDF, and open.
;;;### (autoloads (org-lparse-region org-replace-region-by org-lparse-to-buffer
;;;;;; org-lparse-batch org-lparse-and-open) "org-lparse" "org/org-lparse.el"
-;;;;;; (20344 35712))
+;;;;;; (20344 56211))
;;; Generated autoloads from org/org-lparse.el
(autoload 'org-lparse-and-open "org-lparse" "\
@@ -21236,8 +20901,8 @@ in a window. A non-interactive call will only return the buffer.
;;;***
;;;### (autoloads (org-mobile-create-sumo-agenda org-mobile-pull
-;;;;;; org-mobile-push) "org-mobile" "org/org-mobile.el" (20309
-;;;;;; 60936))
+;;;;;; org-mobile-push) "org-mobile" "org/org-mobile.el" (20347
+;;;;;; 39495))
;;; Generated autoloads from org/org-mobile.el
(autoload 'org-mobile-push "org-mobile" "\
@@ -21263,7 +20928,7 @@ Create a file that contains all custom agenda views.
;;;### (autoloads (org-export-as-odf-and-open org-export-as-odf org-export-odt-convert
;;;;;; org-export-as-odt org-export-as-odt-batch org-export-as-odt-and-open)
-;;;;;; "org-odt" "org/org-odt.el" (20344 35712))
+;;;;;; "org-odt" "org/org-odt.el" (20379 60745))
;;; Generated autoloads from org/org-odt.el
(autoload 'org-export-as-odt-and-open "org-odt" "\
@@ -21333,7 +20998,7 @@ formula file.
;;;***
;;;### (autoloads (org-plot/gnuplot) "org-plot" "org/org-plot.el"
-;;;;;; (20309 60936))
+;;;;;; (20228 61824))
;;; Generated autoloads from org/org-plot.el
(autoload 'org-plot/gnuplot "org-plot" "\
@@ -21347,7 +21012,7 @@ line directly before or after the table.
;;;### (autoloads (org-publish-current-project org-publish-current-file
;;;;;; org-publish-all org-publish) "org-publish" "org/org-publish.el"
-;;;;;; (20309 60936))
+;;;;;; (20347 39495))
;;; Generated autoloads from org/org-publish.el
(defalias 'org-publish-project 'org-publish)
@@ -21381,7 +21046,7 @@ the project.
;;;### (autoloads (org-remember-handler org-remember org-remember-apply-template
;;;;;; org-remember-annotation org-remember-insinuate) "org-remember"
-;;;;;; "org/org-remember.el" (20309 60936))
+;;;;;; "org/org-remember.el" (20228 61824))
;;; Generated autoloads from org/org-remember.el
(autoload 'org-remember-insinuate "org-remember" "\
@@ -21457,7 +21122,7 @@ See also the variable `org-reverse-note-order'.
;;;***
;;;### (autoloads (org-table-to-lisp orgtbl-mode turn-on-orgtbl)
-;;;;;; "org-table" "org/org-table.el" (20345 9613))
+;;;;;; "org-table" "org/org-table.el" (20379 60745))
;;; Generated autoloads from org/org-table.el
(autoload 'turn-on-orgtbl "org-table" "\
@@ -21481,7 +21146,7 @@ The table is taken from the parameter TXT, or from the buffer at point.
;;;***
;;;### (autoloads (org-export-as-taskjuggler-and-open org-export-as-taskjuggler)
-;;;;;; "org-taskjuggler" "org/org-taskjuggler.el" (20309 60936))
+;;;;;; "org-taskjuggler" "org/org-taskjuggler.el" (20347 39495))
;;; Generated autoloads from org/org-taskjuggler.el
(autoload 'org-export-as-taskjuggler "org-taskjuggler" "\
@@ -21509,7 +21174,7 @@ with the TaskJuggler GUI.
;;;### (autoloads (org-timer-set-timer org-timer-item org-timer-change-times-in-region
;;;;;; org-timer org-timer-start) "org-timer" "org/org-timer.el"
-;;;;;; (20309 60936))
+;;;;;; (20347 39495))
;;; Generated autoloads from org/org-timer.el
(autoload 'org-timer-start "org-timer" "\
@@ -21570,7 +21235,7 @@ replace any running timer.
;;;***
;;;### (autoloads (org-export-as-xoxo) "org-xoxo" "org/org-xoxo.el"
-;;;;;; (20345 9613))
+;;;;;; (20344 56211))
;;; Generated autoloads from org/org-xoxo.el
(autoload 'org-export-as-xoxo "org-xoxo" "\
@@ -21582,7 +21247,7 @@ The XOXO buffer is named *xoxo-<source buffer name>*
;;;***
;;;### (autoloads (outline-minor-mode outline-mode) "outline" "outline.el"
-;;;;;; (20330 53092))
+;;;;;; (20355 835))
;;; Generated autoloads from outline.el
(put 'outline-regexp 'safe-local-variable 'stringp)
(put 'outline-heading-end-regexp 'safe-local-variable 'stringp)
@@ -21646,7 +21311,7 @@ See the command `outline-mode' for more information on this mode.
;;;### (autoloads (list-packages describe-package package-initialize
;;;;;; package-refresh-contents package-install-file package-install-from-buffer
;;;;;; package-install package-enable-at-startup) "package" "emacs-lisp/package.el"
-;;;;;; (20317 26260))
+;;;;;; (20395 5351))
;;; Generated autoloads from emacs-lisp/package.el
(defvar package-enable-at-startup t "\
@@ -21716,7 +21381,7 @@ The list is displayed in a buffer named `*Packages*'.
;;;***
-;;;### (autoloads (show-paren-mode) "paren" "paren.el" (20309 60936))
+;;;### (autoloads (show-paren-mode) "paren" "paren.el" (20355 835))
;;; Generated autoloads from paren.el
(defvar show-paren-mode nil "\
@@ -21743,7 +21408,7 @@ matching parenthesis is highlighted in `show-paren-style' after
;;;***
;;;### (autoloads (parse-time-string) "parse-time" "calendar/parse-time.el"
-;;;;;; (20309 60936))
+;;;;;; (20298 64606))
;;; Generated autoloads from calendar/parse-time.el
(put 'parse-time-rules 'risky-local-variable t)
@@ -21756,8 +21421,8 @@ unknown are returned as nil.
;;;***
-;;;### (autoloads (pascal-mode) "pascal" "progmodes/pascal.el" (20309
-;;;;;; 60936))
+;;;### (autoloads (pascal-mode) "pascal" "progmodes/pascal.el" (20379
+;;;;;; 60745))
;;; Generated autoloads from progmodes/pascal.el
(autoload 'pascal-mode "pascal" "\
@@ -21810,7 +21475,7 @@ no args, if that value is non-nil.
;;;***
;;;### (autoloads (password-in-cache-p password-cache-expiry password-cache)
-;;;;;; "password-cache" "password-cache.el" (20309 60936))
+;;;;;; "password-cache" "password-cache.el" (20229 56251))
;;; Generated autoloads from password-cache.el
(defvar password-cache t "\
@@ -21832,7 +21497,7 @@ Check if KEY is in the cache.
;;;***
;;;### (autoloads (pcase-let pcase-let* pcase) "pcase" "emacs-lisp/pcase.el"
-;;;;;; (20309 60936))
+;;;;;; (20405 28429))
;;; Generated autoloads from emacs-lisp/pcase.el
(autoload 'pcase "pcase" "\
@@ -21891,8 +21556,8 @@ of the form (UPAT EXP).
;;;***
-;;;### (autoloads (pcomplete/cvs) "pcmpl-cvs" "pcmpl-cvs.el" (20309
-;;;;;; 60936))
+;;;### (autoloads (pcomplete/cvs) "pcmpl-cvs" "pcmpl-cvs.el" (20229
+;;;;;; 56251))
;;; Generated autoloads from pcmpl-cvs.el
(autoload 'pcomplete/cvs "pcmpl-cvs" "\
@@ -21903,7 +21568,7 @@ Completion rules for the `cvs' command.
;;;***
;;;### (autoloads (pcomplete/tar pcomplete/make pcomplete/bzip2 pcomplete/gzip)
-;;;;;; "pcmpl-gnu" "pcmpl-gnu.el" (20309 60936))
+;;;;;; "pcmpl-gnu" "pcmpl-gnu.el" (20255 22932))
;;; Generated autoloads from pcmpl-gnu.el
(autoload 'pcomplete/gzip "pcmpl-gnu" "\
@@ -21931,7 +21596,7 @@ Completion for the GNU tar utility.
;;;***
;;;### (autoloads (pcomplete/mount pcomplete/umount pcomplete/kill)
-;;;;;; "pcmpl-linux" "pcmpl-linux.el" (20309 60936))
+;;;;;; "pcmpl-linux" "pcmpl-linux.el" (20229 56251))
;;; Generated autoloads from pcmpl-linux.el
(autoload 'pcomplete/kill "pcmpl-linux" "\
@@ -21951,8 +21616,8 @@ Completion for GNU/Linux `mount'.
;;;***
-;;;### (autoloads (pcomplete/rpm) "pcmpl-rpm" "pcmpl-rpm.el" (20309
-;;;;;; 60936))
+;;;### (autoloads (pcomplete/rpm) "pcmpl-rpm" "pcmpl-rpm.el" (20360
+;;;;;; 57703))
;;; Generated autoloads from pcmpl-rpm.el
(autoload 'pcomplete/rpm "pcmpl-rpm" "\
@@ -21964,7 +21629,7 @@ Completion for the `rpm' command.
;;;### (autoloads (pcomplete/scp pcomplete/ssh pcomplete/chgrp pcomplete/chown
;;;;;; pcomplete/which pcomplete/xargs pcomplete/rm pcomplete/rmdir
-;;;;;; pcomplete/cd) "pcmpl-unix" "pcmpl-unix.el" (20309 60936))
+;;;;;; pcomplete/cd) "pcmpl-unix" "pcmpl-unix.el" (20376 18781))
;;; Generated autoloads from pcmpl-unix.el
(autoload 'pcomplete/cd "pcmpl-unix" "\
@@ -22021,8 +21686,8 @@ Includes files as well as host names followed by a colon.
;;;### (autoloads (pcomplete-shell-setup pcomplete-comint-setup pcomplete-list
;;;;;; pcomplete-help pcomplete-expand pcomplete-continue pcomplete-expand-and-complete
-;;;;;; pcomplete-reverse pcomplete) "pcomplete" "pcomplete.el" (20309
-;;;;;; 60936))
+;;;;;; pcomplete-reverse pcomplete) "pcomplete" "pcomplete.el" (20376
+;;;;;; 18781))
;;; Generated autoloads from pcomplete.el
(autoload 'pcomplete "pcomplete" "\
@@ -22081,7 +21746,7 @@ Setup `shell-mode' to use pcomplete.
;;;### (autoloads (cvs-dired-use-hook cvs-dired-action cvs-status
;;;;;; cvs-update cvs-examine cvs-quickdir cvs-checkout) "pcvs"
-;;;;;; "vc/pcvs.el" (20309 60936))
+;;;;;; "vc/pcvs.el" (20370 4296))
;;; Generated autoloads from vc/pcvs.el
(autoload 'cvs-checkout "pcvs" "\
@@ -22156,7 +21821,7 @@ The exact behavior is determined also by `cvs-dired-use-hook'." (when (stringp d
;;;***
-;;;### (autoloads nil "pcvs-defs" "vc/pcvs-defs.el" (20309 60936))
+;;;### (autoloads nil "pcvs-defs" "vc/pcvs-defs.el" (20355 835))
;;; Generated autoloads from vc/pcvs-defs.el
(defvar cvs-global-menu (let ((m (make-sparse-keymap "PCL-CVS"))) (define-key m [status] `(menu-item ,(purecopy "Directory Status") cvs-status :help ,(purecopy "A more verbose status of a workarea"))) (define-key m [checkout] `(menu-item ,(purecopy "Checkout Module") cvs-checkout :help ,(purecopy "Check out a module from the repository"))) (define-key m [update] `(menu-item ,(purecopy "Update Directory") cvs-update :help ,(purecopy "Fetch updates from the repository"))) (define-key m [examine] `(menu-item ,(purecopy "Examine Directory") cvs-examine :help ,(purecopy "Examine the current state of a workarea"))) (fset 'cvs-global-menu m)) "\
@@ -22165,7 +21830,7 @@ Global menu used by PCL-CVS.")
;;;***
;;;### (autoloads (perl-mode) "perl-mode" "progmodes/perl-mode.el"
-;;;;;; (20341 24416))
+;;;;;; (20370 4296))
;;; Generated autoloads from progmodes/perl-mode.el
(put 'perl-indent-level 'safe-local-variable 'integerp)
(put 'perl-continued-statement-offset 'safe-local-variable 'integerp)
@@ -22227,7 +21892,7 @@ Turning on Perl mode runs the normal hook `perl-mode-hook'.
;;;***
;;;### (autoloads (picture-mode) "picture" "textmodes/picture.el"
-;;;;;; (20309 60936))
+;;;;;; (20373 62846))
;;; Generated autoloads from textmodes/picture.el
(autoload 'picture-mode "picture" "\
@@ -22307,8 +21972,8 @@ they are not by default assigned to keys.
;;;***
-;;;### (autoloads (plstore-open) "plstore" "gnus/plstore.el" (20309
-;;;;;; 60936))
+;;;### (autoloads (plstore-mode plstore-open) "plstore" "gnus/plstore.el"
+;;;;;; (20377 59525))
;;; Generated autoloads from gnus/plstore.el
(autoload 'plstore-open "plstore" "\
@@ -22316,10 +21981,15 @@ Create a plstore instance associated with FILE.
\(fn FILE)" nil nil)
+(autoload 'plstore-mode "plstore" "\
+Major mode for editing PLSTORE files.
+
+\(fn)" t nil)
+
;;;***
;;;### (autoloads (po-find-file-coding-system) "po" "textmodes/po.el"
-;;;;;; (20309 60936))
+;;;;;; (20229 56251))
;;; Generated autoloads from textmodes/po.el
(autoload 'po-find-file-coding-system "po" "\
@@ -22330,7 +22000,7 @@ Called through `file-coding-system-alist', before the file is visited for real.
;;;***
-;;;### (autoloads (pong) "pong" "play/pong.el" (20309 60936))
+;;;### (autoloads (pong) "pong" "play/pong.el" (20229 56251))
;;; Generated autoloads from play/pong.el
(autoload 'pong "pong" "\
@@ -22346,7 +22016,7 @@ pong-mode keybindings:\\<pong-mode-map>
;;;***
-;;;### (autoloads (pop3-movemail) "pop3" "gnus/pop3.el" (20309 60936))
+;;;### (autoloads (pop3-movemail) "pop3" "gnus/pop3.el" (20229 56251))
;;; Generated autoloads from gnus/pop3.el
(autoload 'pop3-movemail "pop3" "\
@@ -22359,7 +22029,7 @@ Use streaming commands.
;;;### (autoloads (pp-macroexpand-last-sexp pp-eval-last-sexp pp-macroexpand-expression
;;;;;; pp-eval-expression pp pp-buffer pp-to-string) "pp" "emacs-lisp/pp.el"
-;;;;;; (20309 60936))
+;;;;;; (20271 10599))
;;; Generated autoloads from emacs-lisp/pp.el
(autoload 'pp-to-string "pp" "\
@@ -22427,7 +22097,7 @@ Ignores leading comment characters.
;;;;;; pr-ps-buffer-print pr-ps-buffer-using-ghostscript pr-ps-buffer-preview
;;;;;; pr-ps-directory-ps-print pr-ps-directory-print pr-ps-directory-using-ghostscript
;;;;;; pr-ps-directory-preview pr-interface) "printing" "printing.el"
-;;;;;; (20309 60936))
+;;;;;; (20229 56251))
;;; Generated autoloads from printing.el
(autoload 'pr-interface "printing" "\
@@ -23014,7 +22684,7 @@ are both set to t.
;;;***
-;;;### (autoloads (proced) "proced" "proced.el" (20309 60936))
+;;;### (autoloads (proced) "proced" "proced.el" (20229 56251))
;;; Generated autoloads from proced.el
(autoload 'proced "proced" "\
@@ -23030,7 +22700,7 @@ See `proced-mode' for a description of features available in Proced buffers.
;;;***
;;;### (autoloads (run-prolog mercury-mode prolog-mode) "prolog"
-;;;;;; "progmodes/prolog.el" (20309 60936))
+;;;;;; "progmodes/prolog.el" (20397 28824))
;;; Generated autoloads from progmodes/prolog.el
(autoload 'prolog-mode "prolog" "\
@@ -23065,8 +22735,8 @@ With prefix argument ARG, restart the Prolog process if running before.
;;;***
-;;;### (autoloads (bdf-directory-list) "ps-bdf" "ps-bdf.el" (20309
-;;;;;; 60936))
+;;;### (autoloads (bdf-directory-list) "ps-bdf" "ps-bdf.el" (20229
+;;;;;; 56251))
;;; Generated autoloads from ps-bdf.el
(defvar bdf-directory-list (if (memq system-type '(ms-dos windows-nt)) (list (expand-file-name "fonts/bdf" installation-directory)) '("/usr/local/share/emacs/fonts/bdf")) "\
@@ -23077,8 +22747,8 @@ The default value is '(\"/usr/local/share/emacs/fonts/bdf\").")
;;;***
-;;;### (autoloads (ps-mode) "ps-mode" "progmodes/ps-mode.el" (20309
-;;;;;; 60936))
+;;;### (autoloads (ps-mode) "ps-mode" "progmodes/ps-mode.el" (20355
+;;;;;; 835))
;;; Generated autoloads from progmodes/ps-mode.el
(autoload 'ps-mode "ps-mode" "\
@@ -23129,8 +22799,8 @@ Typing \\<ps-run-mode-map>\\[ps-run-goto-error] when the cursor is at the number
;;;;;; ps-spool-region ps-spool-buffer-with-faces ps-spool-buffer
;;;;;; ps-print-region-with-faces ps-print-region ps-print-buffer-with-faces
;;;;;; ps-print-buffer ps-print-customize ps-print-color-p ps-paper-type
-;;;;;; ps-page-dimensions-database) "ps-print" "ps-print.el" (20309
-;;;;;; 60936))
+;;;;;; ps-page-dimensions-database) "ps-print" "ps-print.el" (20229
+;;;;;; 56251))
;;; Generated autoloads from ps-print.el
(defvar ps-page-dimensions-database (purecopy (list (list 'a4 (/ (* 72 21.0) 2.54) (/ (* 72 29.7) 2.54) "A4") (list 'a3 (/ (* 72 29.7) 2.54) (/ (* 72 42.0) 2.54) "A3") (list 'letter (* 72 8.5) (* 72 11.0) "Letter") (list 'legal (* 72 8.5) (* 72 14.0) "Legal") (list 'letter-small (* 72 7.68) (* 72 10.16) "LetterSmall") (list 'tabloid (* 72 11.0) (* 72 17.0) "Tabloid") (list 'ledger (* 72 17.0) (* 72 11.0) "Ledger") (list 'statement (* 72 5.5) (* 72 8.5) "Statement") (list 'executive (* 72 7.5) (* 72 10.0) "Executive") (list 'a4small (* 72 7.47) (* 72 10.85) "A4Small") (list 'b4 (* 72 10.125) (* 72 14.33) "B4") (list 'b5 (* 72 7.16) (* 72 10.125) "B5") '(addresslarge 236.0 99.0 "AddressLarge") '(addresssmall 236.0 68.0 "AddressSmall") '(cuthanging13 90.0 222.0 "CutHanging13") '(cuthanging15 90.0 114.0 "CutHanging15") '(diskette 181.0 136.0 "Diskette") '(eurofilefolder 139.0 112.0 "EuropeanFilefolder") '(eurofoldernarrow 526.0 107.0 "EuroFolderNarrow") '(eurofolderwide 526.0 136.0 "EuroFolderWide") '(euronamebadge 189.0 108.0 "EuroNameBadge") '(euronamebadgelarge 223.0 136.0 "EuroNameBadgeLarge") '(filefolder 230.0 37.0 "FileFolder") '(jewelry 76.0 136.0 "Jewelry") '(mediabadge 180.0 136.0 "MediaBadge") '(multipurpose 126.0 68.0 "MultiPurpose") '(retaillabel 90.0 104.0 "RetailLabel") '(shipping 271.0 136.0 "Shipping") '(slide35mm 26.0 104.0 "Slide35mm") '(spine8mm 187.0 26.0 "Spine8mm") '(topcoated 425.19685 136.0 "TopCoatedPaper") '(topcoatedpaper 396.0 136.0 "TopcoatedPaper150") '(vhsface 205.0 127.0 "VHSFace") '(vhsspine 400.0 50.0 "VHSSpine") '(zipdisk 156.0 136.0 "ZipDisk"))) "\
@@ -23327,7 +22997,7 @@ If EXTENSION is any other symbol, it is ignored.
;;;***
;;;### (autoloads (jython-mode python-mode python-after-info-look
-;;;;;; run-python) "python" "progmodes/python.el" (20309 60936))
+;;;;;; run-python) "python" "progmodes/python.el" (20376 18761))
;;; Generated autoloads from progmodes/python.el
(add-to-list 'interpreter-mode-alist (cons (purecopy "jython") 'jython-mode))
@@ -23413,7 +23083,7 @@ Runs `jython-mode-hook' after `python-mode-hook'.
;;;***
;;;### (autoloads (quoted-printable-decode-region) "qp" "gnus/qp.el"
-;;;;;; (20309 60936))
+;;;;;; (20229 56251))
;;; Generated autoloads from gnus/qp.el
(autoload 'quoted-printable-decode-region "qp" "\
@@ -23436,7 +23106,7 @@ them into characters should be done separately.
;;;;;; quail-defrule quail-install-decode-map quail-install-map
;;;;;; quail-define-rules quail-show-keyboard-layout quail-set-keyboard-layout
;;;;;; quail-define-package quail-use-package quail-title) "quail"
-;;;;;; "international/quail.el" (20330 53092))
+;;;;;; "international/quail.el" (20356 48455))
;;; Generated autoloads from international/quail.el
(autoload 'quail-title "quail" "\
@@ -23667,8 +23337,7 @@ of each directory.
;;;### (autoloads (quickurl-list quickurl-list-mode quickurl-edit-urls
;;;;;; quickurl-browse-url-ask quickurl-browse-url quickurl-add-url
-;;;;;; quickurl-ask quickurl) "quickurl" "net/quickurl.el" (20309
-;;;;;; 60936))
+;;;;;; quickurl-ask) "quickurl" "net/quickurl.el" (20355 835))
;;; Generated autoloads from net/quickurl.el
(defconst quickurl-reread-hook-postfix "\n;; Local Variables:\n;; eval: (progn (require 'quickurl) (add-hook 'local-write-file-hooks (lambda () (quickurl-read) nil)))\n;; End:\n" "\
@@ -23682,15 +23351,6 @@ To make use of this do something like:
in your ~/.emacs (after loading/requiring quickurl).")
-(autoload 'quickurl "quickurl" "\
-Insert a URL based on LOOKUP.
-
-If not supplied LOOKUP is taken to be the word at point in the current
-buffer, this default action can be modified via
-`quickurl-grab-lookup-function'.
-
-\(fn &optional LOOKUP)" t nil)
-
(autoload 'quickurl-ask "quickurl" "\
Insert a URL, with `completing-read' prompt, based on LOOKUP.
@@ -23740,7 +23400,7 @@ Display `quickurl-list' as a formatted list using `quickurl-list-mode'.
;;;***
;;;### (autoloads (rcirc-track-minor-mode rcirc-connect rcirc) "rcirc"
-;;;;;; "net/rcirc.el" (20325 32214))
+;;;;;; "net/rcirc.el" (20373 62846))
;;; Generated autoloads from net/rcirc.el
(autoload 'rcirc "rcirc" "\
@@ -23778,8 +23438,8 @@ if ARG is omitted or nil.
;;;***
-;;;### (autoloads (remote-compile) "rcompile" "net/rcompile.el" (20309
-;;;;;; 60936))
+;;;### (autoloads (remote-compile) "rcompile" "net/rcompile.el" (20291
+;;;;;; 40061))
;;; Generated autoloads from net/rcompile.el
(autoload 'remote-compile "rcompile" "\
@@ -23791,7 +23451,7 @@ See \\[compile].
;;;***
;;;### (autoloads (re-builder) "re-builder" "emacs-lisp/re-builder.el"
-;;;;;; (20309 60936))
+;;;;;; (20229 56251))
;;; Generated autoloads from emacs-lisp/re-builder.el
(defalias 'regexp-builder 're-builder)
@@ -23809,7 +23469,7 @@ matching parts of the target buffer will be highlighted.
;;;***
-;;;### (autoloads (recentf-mode) "recentf" "recentf.el" (20309 60936))
+;;;### (autoloads (recentf-mode) "recentf" "recentf.el" (20356 48455))
;;; Generated autoloads from recentf.el
(defvar recentf-mode nil "\
@@ -23839,7 +23499,7 @@ were operated on recently.
;;;;;; string-rectangle delete-whitespace-rectangle open-rectangle
;;;;;; insert-rectangle yank-rectangle kill-rectangle extract-rectangle
;;;;;; delete-extract-rectangle delete-rectangle) "rect" "rect.el"
-;;;;;; (20309 60936))
+;;;;;; (20229 56251))
;;; Generated autoloads from rect.el
(define-key ctl-x-r-map "c" 'clear-rectangle)
(define-key ctl-x-r-map "k" 'kill-rectangle)
@@ -23975,8 +23635,8 @@ with a prefix argument, prompt for START-AT and FORMAT.
;;;***
-;;;### (autoloads (refill-mode) "refill" "textmodes/refill.el" (20309
-;;;;;; 60936))
+;;;### (autoloads (refill-mode) "refill" "textmodes/refill.el" (20229
+;;;;;; 56251))
;;; Generated autoloads from textmodes/refill.el
(autoload 'refill-mode "refill" "\
@@ -23997,7 +23657,7 @@ For true \"word wrap\" behavior, use `visual-line-mode' instead.
;;;***
;;;### (autoloads (reftex-reset-scanning-information reftex-mode
-;;;;;; turn-on-reftex) "reftex" "textmodes/reftex.el" (20309 60936))
+;;;;;; turn-on-reftex) "reftex" "textmodes/reftex.el" (20229 56251))
;;; Generated autoloads from textmodes/reftex.el
(autoload 'turn-on-reftex "reftex" "\
@@ -24053,7 +23713,7 @@ This enforces rescanning the buffer on next use.
;;;***
;;;### (autoloads (reftex-citation) "reftex-cite" "textmodes/reftex-cite.el"
-;;;;;; (20309 60936))
+;;;;;; (20229 56251))
;;; Generated autoloads from textmodes/reftex-cite.el
(autoload 'reftex-citation "reftex-cite" "\
@@ -24083,7 +23743,7 @@ While entering the regexp, completion on knows citation keys is possible.
;;;***
;;;### (autoloads (reftex-isearch-minor-mode) "reftex-global" "textmodes/reftex-global.el"
-;;;;;; (20309 60936))
+;;;;;; (20229 56251))
;;; Generated autoloads from textmodes/reftex-global.el
(autoload 'reftex-isearch-minor-mode "reftex-global" "\
@@ -24100,7 +23760,7 @@ With no argument, this command toggles
;;;***
;;;### (autoloads (reftex-index-phrases-mode) "reftex-index" "textmodes/reftex-index.el"
-;;;;;; (20309 60936))
+;;;;;; (20400 16870))
;;; Generated autoloads from textmodes/reftex-index.el
(autoload 'reftex-index-phrases-mode "reftex-index" "\
@@ -24133,7 +23793,7 @@ Here are all local bindings.
;;;***
;;;### (autoloads (reftex-all-document-files) "reftex-parse" "textmodes/reftex-parse.el"
-;;;;;; (20309 60936))
+;;;;;; (20229 56251))
;;; Generated autoloads from textmodes/reftex-parse.el
(autoload 'reftex-all-document-files "reftex-parse" "\
@@ -24145,8 +23805,8 @@ of master file.
;;;***
-;;;### (autoloads nil "reftex-vars" "textmodes/reftex-vars.el" (20309
-;;;;;; 60936))
+;;;### (autoloads nil "reftex-vars" "textmodes/reftex-vars.el" (20355
+;;;;;; 835))
;;; Generated autoloads from textmodes/reftex-vars.el
(put 'reftex-vref-is-default 'safe-local-variable (lambda (x) (or (stringp x) (symbolp x))))
(put 'reftex-fref-is-default 'safe-local-variable (lambda (x) (or (stringp x) (symbolp x))))
@@ -24156,7 +23816,7 @@ of master file.
;;;***
;;;### (autoloads (regexp-opt-depth regexp-opt) "regexp-opt" "emacs-lisp/regexp-opt.el"
-;;;;;; (20309 60936))
+;;;;;; (20364 20442))
;;; Generated autoloads from emacs-lisp/regexp-opt.el
(autoload 'regexp-opt "regexp-opt" "\
@@ -24187,7 +23847,7 @@ This means the number of non-shy regexp grouping constructs
;;;### (autoloads (remember-diary-extract-entries remember-clipboard
;;;;;; remember-other-frame remember) "remember" "textmodes/remember.el"
-;;;;;; (20309 60936))
+;;;;;; (20229 56251))
;;; Generated autoloads from textmodes/remember.el
(autoload 'remember "remember" "\
@@ -24218,7 +23878,7 @@ Extract diary entries from the region.
;;;***
-;;;### (autoloads (repeat) "repeat" "repeat.el" (20309 60936))
+;;;### (autoloads (repeat) "repeat" "repeat.el" (20389 6410))
;;; Generated autoloads from repeat.el
(autoload 'repeat "repeat" "\
@@ -24241,7 +23901,7 @@ recently executed command not bound to an input event\".
;;;***
;;;### (autoloads (reporter-submit-bug-report) "reporter" "mail/reporter.el"
-;;;;;; (20309 60936))
+;;;;;; (20229 56251))
;;; Generated autoloads from mail/reporter.el
(autoload 'reporter-submit-bug-report "reporter" "\
@@ -24273,7 +23933,7 @@ mail-sending package is used for editing and sending the message.
;;;***
;;;### (autoloads (reposition-window) "reposition" "reposition.el"
-;;;;;; (20309 60936))
+;;;;;; (20229 56251))
;;; Generated autoloads from reposition.el
(autoload 'reposition-window "reposition" "\
@@ -24300,7 +23960,7 @@ first comment line visible (if point is in a comment).
;;;***
;;;### (autoloads (global-reveal-mode reveal-mode) "reveal" "reveal.el"
-;;;;;; (20309 60936))
+;;;;;; (20229 56251))
;;; Generated autoloads from reveal.el
(autoload 'reveal-mode "reveal" "\
@@ -24336,7 +23996,7 @@ the mode if ARG is omitted or nil.
;;;***
;;;### (autoloads (make-ring ring-p) "ring" "emacs-lisp/ring.el"
-;;;;;; (20321 41303))
+;;;;;; (20325 60273))
;;; Generated autoloads from emacs-lisp/ring.el
(autoload 'ring-p "ring" "\
@@ -24351,7 +24011,7 @@ Make a ring that can contain SIZE elements.
;;;***
-;;;### (autoloads (rlogin) "rlogin" "net/rlogin.el" (20309 60936))
+;;;### (autoloads (rlogin) "rlogin" "net/rlogin.el" (20405 16851))
;;; Generated autoloads from net/rlogin.el
(autoload 'rlogin "rlogin" "\
@@ -24400,7 +24060,7 @@ variable.
;;;;;; rmail-secondary-file-directory rmail-primary-inbox-list rmail-highlighted-headers
;;;;;; rmail-retry-ignored-headers rmail-displayed-headers rmail-ignored-headers
;;;;;; rmail-user-mail-address-regexp rmail-movemail-variant-p)
-;;;;;; "rmail" "mail/rmail.el" (20315 8755))
+;;;;;; "rmail" "mail/rmail.el" (20389 6410))
;;; Generated autoloads from mail/rmail.el
(autoload 'rmail-movemail-variant-p "rmail" "\
@@ -24584,7 +24244,7 @@ Set PASSWORD to be used for retrieving mail from a POP or IMAP server.
;;;***
;;;### (autoloads (rmail-output-body-to-file rmail-output-as-seen
-;;;;;; rmail-output) "rmailout" "mail/rmailout.el" (20309 60936))
+;;;;;; rmail-output) "rmailout" "mail/rmailout.el" (20229 56251))
;;; Generated autoloads from mail/rmailout.el
(put 'rmail-output-file-alist 'risky-local-variable t)
@@ -24649,7 +24309,7 @@ than appending to it. Deletes the message after writing if
;;;***
;;;### (autoloads (rng-c-load-schema) "rng-cmpct" "nxml/rng-cmpct.el"
-;;;;;; (20309 60936))
+;;;;;; (20229 56251))
;;; Generated autoloads from nxml/rng-cmpct.el
(autoload 'rng-c-load-schema "rng-cmpct" "\
@@ -24661,7 +24321,7 @@ Return a pattern.
;;;***
;;;### (autoloads (rng-nxml-mode-init) "rng-nxml" "nxml/rng-nxml.el"
-;;;;;; (20309 60936))
+;;;;;; (20355 835))
;;; Generated autoloads from nxml/rng-nxml.el
(autoload 'rng-nxml-mode-init "rng-nxml" "\
@@ -24674,7 +24334,7 @@ Validation will be enabled if `rng-nxml-auto-validate-flag' is non-nil.
;;;***
;;;### (autoloads (rng-validate-mode) "rng-valid" "nxml/rng-valid.el"
-;;;;;; (20309 60936))
+;;;;;; (20280 8018))
;;; Generated autoloads from nxml/rng-valid.el
(autoload 'rng-validate-mode "rng-valid" "\
@@ -24704,8 +24364,8 @@ to use for finding the schema.
;;;***
-;;;### (autoloads (rng-xsd-compile) "rng-xsd" "nxml/rng-xsd.el" (20309
-;;;;;; 60936))
+;;;### (autoloads (rng-xsd-compile) "rng-xsd" "nxml/rng-xsd.el" (20229
+;;;;;; 56251))
;;; Generated autoloads from nxml/rng-xsd.el
(put 'http://www\.w3\.org/2001/XMLSchema-datatypes 'rng-dt-compile 'rng-xsd-compile)
@@ -24733,7 +24393,7 @@ must be equal.
;;;***
;;;### (autoloads (robin-use-package robin-modify-package robin-define-package)
-;;;;;; "robin" "international/robin.el" (20309 60936))
+;;;;;; "robin" "international/robin.el" (20228 61824))
;;; Generated autoloads from international/robin.el
(autoload 'robin-define-package "robin" "\
@@ -24766,7 +24426,7 @@ Start using robin package NAME, which is a string.
;;;***
;;;### (autoloads (toggle-rot13-mode rot13-other-window rot13-region
-;;;;;; rot13-string rot13) "rot13" "rot13.el" (20309 60936))
+;;;;;; rot13-string rot13) "rot13" "rot13.el" (20229 56251))
;;; Generated autoloads from rot13.el
(autoload 'rot13 "rot13" "\
@@ -24804,23 +24464,17 @@ Toggle the use of ROT13 encoding for the current window.
;;;***
;;;### (autoloads (rst-minor-mode rst-mode) "rst" "textmodes/rst.el"
-;;;;;; (20309 60936))
+;;;;;; (20405 18712))
;;; Generated autoloads from textmodes/rst.el
(add-to-list 'auto-mode-alist (purecopy '("\\.re?st\\'" . rst-mode)))
(autoload 'rst-mode "rst" "\
Major mode for editing reStructuredText documents.
\\<rst-mode-map>
-There are a number of convenient keybindings provided by
-Rst mode. The main one is \\[rst-adjust], it updates or rotates
-the section title around point or promotes/demotes the
-decorations within the region (see full details below).
-Use negative prefix arg to rotate in the other direction.
Turning on `rst-mode' calls the normal hooks `text-mode-hook'
and `rst-mode-hook'. This mode also supports font-lock
-highlighting. You may customize `rst-mode-lazy' to toggle
-font-locking of blocks.
+highlighting.
\\{rst-mode-map}
@@ -24841,7 +24495,7 @@ for modes derived from Text mode, like Mail mode.
;;;***
;;;### (autoloads (ruby-mode) "ruby-mode" "progmodes/ruby-mode.el"
-;;;;;; (20330 53092))
+;;;;;; (20376 18761))
;;; Generated autoloads from progmodes/ruby-mode.el
(autoload 'ruby-mode "ruby-mode" "\
@@ -24862,8 +24516,8 @@ The variable `ruby-indent-level' controls the amount of indentation.
;;;***
-;;;### (autoloads (ruler-mode) "ruler-mode" "ruler-mode.el" (20309
-;;;;;; 60936))
+;;;### (autoloads (ruler-mode) "ruler-mode" "ruler-mode.el" (20229
+;;;;;; 56251))
;;; Generated autoloads from ruler-mode.el
(defvar ruler-mode nil "\
@@ -24880,8 +24534,8 @@ if ARG is omitted or nil.
;;;***
-;;;### (autoloads (rx rx-to-string) "rx" "emacs-lisp/rx.el" (20309
-;;;;;; 60936))
+;;;### (autoloads (rx rx-to-string) "rx" "emacs-lisp/rx.el" (20229
+;;;;;; 56251))
;;; Generated autoloads from emacs-lisp/rx.el
(autoload 'rx-to-string "rx" "\
@@ -25192,8 +24846,8 @@ enclosed in `(and ...)'.
;;;***
-;;;### (autoloads (savehist-mode) "savehist" "savehist.el" (20314
-;;;;;; 46279))
+;;;### (autoloads (savehist-mode) "savehist" "savehist.el" (20325
+;;;;;; 60273))
;;; Generated autoloads from savehist.el
(defvar savehist-mode nil "\
@@ -25225,7 +24879,7 @@ histories, which is probably undesirable.
;;;***
;;;### (autoloads (dsssl-mode scheme-mode) "scheme" "progmodes/scheme.el"
-;;;;;; (20309 60936))
+;;;;;; (20355 835))
;;; Generated autoloads from progmodes/scheme.el
(autoload 'scheme-mode "scheme" "\
@@ -25267,7 +24921,7 @@ that variable's value is a string.
;;;***
;;;### (autoloads (gnus-score-mode) "score-mode" "gnus/score-mode.el"
-;;;;;; (20309 60936))
+;;;;;; (20229 56251))
;;; Generated autoloads from gnus/score-mode.el
(autoload 'gnus-score-mode "score-mode" "\
@@ -25281,7 +24935,7 @@ This mode is an extended emacs-lisp mode.
;;;***
;;;### (autoloads (scroll-all-mode) "scroll-all" "scroll-all.el"
-;;;;;; (20309 60936))
+;;;;;; (20364 20442))
;;; Generated autoloads from scroll-all.el
(defvar scroll-all-mode nil "\
@@ -25307,7 +24961,7 @@ one window apply to all visible windows in the same frame.
;;;***
;;;### (autoloads (scroll-lock-mode) "scroll-lock" "scroll-lock.el"
-;;;;;; (20309 60936))
+;;;;;; (20273 59945))
;;; Generated autoloads from scroll-lock.el
(autoload 'scroll-lock-mode "scroll-lock" "\
@@ -25323,7 +24977,7 @@ vertically fixed relative to window boundaries during scrolling.
;;;***
-;;;### (autoloads nil "secrets" "net/secrets.el" (20309 60936))
+;;;### (autoloads nil "secrets" "net/secrets.el" (20304 58723))
;;; Generated autoloads from net/secrets.el
(when (featurep 'dbusbind)
(autoload 'secrets-show-secrets "secrets" nil t))
@@ -25331,7 +24985,7 @@ vertically fixed relative to window boundaries during scrolling.
;;;***
;;;### (autoloads (semantic-mode semantic-default-submodes) "semantic"
-;;;;;; "cedet/semantic.el" (20309 60936))
+;;;;;; "cedet/semantic.el" (20355 835))
;;; Generated autoloads from cedet/semantic.el
(defvar semantic-default-submodes '(global-semantic-idle-scheduler-mode global-semanticdb-minor-mode) "\
@@ -25385,7 +25039,7 @@ Semantic mode.
;;;;;; mail-personal-alias-file mail-default-reply-to mail-archive-file-name
;;;;;; mail-header-separator send-mail-function mail-interactive
;;;;;; mail-self-blind mail-specify-envelope-from mail-from-style)
-;;;;;; "sendmail" "mail/sendmail.el" (20320 14810))
+;;;;;; "sendmail" "mail/sendmail.el" (20370 4296))
;;; Generated autoloads from mail/sendmail.el
(defvar mail-from-style 'default "\
@@ -25588,7 +25242,7 @@ header when sending a message to a mailing list.")
(custom-autoload 'mail-mailing-lists "sendmail" t)
(defvar sendmail-coding-system nil "\
-*Coding system for encoding the outgoing mail.
+Coding system for encoding the outgoing mail.
This has higher priority than the default `buffer-file-coding-system'
and `default-sendmail-coding-system',
but lower priority than the local value of `buffer-file-coding-system'.
@@ -25667,8 +25321,8 @@ Like `mail' command, but display mail buffer in another frame.
;;;***
;;;### (autoloads (server-save-buffers-kill-terminal server-mode
-;;;;;; server-force-delete server-start) "server" "server.el" (20341
-;;;;;; 60214))
+;;;;;; server-force-delete server-start) "server" "server.el" (20370
+;;;;;; 4296))
;;; Generated autoloads from server.el
(put 'server-host 'risky-local-variable t)
@@ -25679,10 +25333,10 @@ Like `mail' command, but display mail buffer in another frame.
(autoload 'server-start "server" "\
Allow this Emacs process to be a server for client processes.
-This starts a server communications subprocess through which
-client \"editors\" can send your editing commands to this Emacs
-job. To use the server, set up the program `emacsclient' in the
-Emacs distribution as your standard \"editor\".
+This starts a server communications subprocess through which client
+\"editors\" can send your editing commands to this Emacs job.
+To use the server, set up the program `emacsclient' in the Emacs
+distribution as your standard \"editor\".
Optional argument LEAVE-DEAD (interactively, a prefix arg) means just
kill any existing server communications subprocess.
@@ -25735,7 +25389,7 @@ only these files will be asked to be saved.
;;;***
-;;;### (autoloads (ses-mode) "ses" "ses.el" (20309 60936))
+;;;### (autoloads (ses-mode) "ses" "ses.el" (20373 62846))
;;; Generated autoloads from ses.el
(autoload 'ses-mode "ses" "\
@@ -25754,7 +25408,7 @@ These are active only in the minibuffer, when entering or editing a formula:
;;;***
;;;### (autoloads (html-mode sgml-mode) "sgml-mode" "textmodes/sgml-mode.el"
-;;;;;; (20309 60936))
+;;;;;; (20355 835))
;;; Generated autoloads from textmodes/sgml-mode.el
(autoload 'sgml-mode "sgml-mode" "\
@@ -25820,7 +25474,7 @@ To work around that, do:
;;;***
;;;### (autoloads (sh-mode) "sh-script" "progmodes/sh-script.el"
-;;;;;; (20309 60936))
+;;;;;; (20397 7606))
;;; Generated autoloads from progmodes/sh-script.el
(put 'sh-shell 'safe-local-variable 'symbolp)
@@ -25867,9 +25521,8 @@ buffer indents as it currently is indented.
\\[sh-set-shell] Set this buffer's shell, and maybe its magic number.
\\[sh-execute-region] Have optional header and region be executed in a subshell.
-\\[sh-maybe-here-document] Without prefix, following an unquoted < inserts here document.
-{, (, [, ', \", `
- Unless quoted with \\, insert the pairs {}, (), [], or '', \"\", ``.
+`sh-electric-here-document-mode' controls whether insertion of two
+unquoted < insert a here document.
If you generally program a shell different from your login shell you can
set `sh-shell-file' accordingly. If your shell's file name doesn't correctly
@@ -25885,7 +25538,7 @@ with your script for an edit-interpret-debug cycle.
;;;***
;;;### (autoloads (list-load-path-shadows) "shadow" "emacs-lisp/shadow.el"
-;;;;;; (20309 60936))
+;;;;;; (20229 56251))
;;; Generated autoloads from emacs-lisp/shadow.el
(autoload 'list-load-path-shadows "shadow" "\
@@ -25935,8 +25588,8 @@ function, `load-path-shadows-find'.
;;;***
;;;### (autoloads (shadow-initialize shadow-define-regexp-group shadow-define-literal-group
-;;;;;; shadow-define-cluster) "shadowfile" "shadowfile.el" (20309
-;;;;;; 60936))
+;;;;;; shadow-define-cluster) "shadowfile" "shadowfile.el" (20229
+;;;;;; 56251))
;;; Generated autoloads from shadowfile.el
(autoload 'shadow-define-cluster "shadowfile" "\
@@ -25975,7 +25628,7 @@ Set up file shadowing.
;;;***
;;;### (autoloads (shell shell-dumb-shell-regexp) "shell" "shell.el"
-;;;;;; (20321 41252))
+;;;;;; (20405 16851))
;;; Generated autoloads from shell.el
(defvar shell-dumb-shell-regexp (purecopy "cmd\\(proxy\\)?\\.exe") "\
@@ -26023,8 +25676,8 @@ Otherwise, one argument `-i' is passed to the shell.
;;;***
-;;;### (autoloads (shr-insert-document) "shr" "gnus/shr.el" (20327
-;;;;;; 64029))
+;;;### (autoloads (shr-insert-document) "shr" "gnus/shr.el" (20330
+;;;;;; 4833))
;;; Generated autoloads from gnus/shr.el
(autoload 'shr-insert-document "shr" "\
@@ -26037,7 +25690,7 @@ DOM should be a parse tree as generated by
;;;***
;;;### (autoloads (sieve-upload-and-bury sieve-upload sieve-manage)
-;;;;;; "sieve" "gnus/sieve.el" (20309 60936))
+;;;;;; "sieve" "gnus/sieve.el" (20229 56251))
;;; Generated autoloads from gnus/sieve.el
(autoload 'sieve-manage "sieve" "\
@@ -26058,7 +25711,7 @@ DOM should be a parse tree as generated by
;;;***
;;;### (autoloads (sieve-mode) "sieve-mode" "gnus/sieve-mode.el"
-;;;;;; (20309 60936))
+;;;;;; (20229 56251))
;;; Generated autoloads from gnus/sieve-mode.el
(autoload 'sieve-mode "sieve-mode" "\
@@ -26073,8 +25726,8 @@ Turning on Sieve mode runs `sieve-mode-hook'.
;;;***
-;;;### (autoloads (simula-mode) "simula" "progmodes/simula.el" (20309
-;;;;;; 60936))
+;;;### (autoloads (simula-mode) "simula" "progmodes/simula.el" (20355
+;;;;;; 835))
;;; Generated autoloads from progmodes/simula.el
(autoload 'simula-mode "simula" "\
@@ -26123,7 +25776,7 @@ with no arguments, if that value is non-nil.
;;;***
;;;### (autoloads (skeleton-pair-insert-maybe skeleton-insert skeleton-proxy-new
-;;;;;; define-skeleton) "skeleton" "skeleton.el" (20309 60936))
+;;;;;; define-skeleton) "skeleton" "skeleton.el" (20405 42390))
;;; Generated autoloads from skeleton.el
(defvar skeleton-filter-function 'identity "\
@@ -26136,6 +25789,8 @@ SKELETON is as defined under `skeleton-insert'.
\(fn COMMAND DOCUMENTATION &rest SKELETON)" nil (quote macro))
+(put 'define-skeleton 'doc-string-elt '2)
+
(autoload 'skeleton-proxy-new "skeleton" "\
Insert SKELETON.
Prefix ARG allows wrapping around words or regions (see `skeleton-insert').
@@ -26233,7 +25888,7 @@ symmetrical ones, and the same character twice for the others.
;;;***
;;;### (autoloads (smerge-start-session smerge-mode smerge-ediff)
-;;;;;; "smerge-mode" "vc/smerge-mode.el" (20309 60936))
+;;;;;; "smerge-mode" "vc/smerge-mode.el" (20389 6410))
;;; Generated autoloads from vc/smerge-mode.el
(autoload 'smerge-ediff "smerge-mode" "\
@@ -26261,7 +25916,7 @@ If no conflict maker is found, turn off `smerge-mode'.
;;;***
;;;### (autoloads (smiley-buffer smiley-region) "smiley" "gnus/smiley.el"
-;;;;;; (20309 60936))
+;;;;;; (20229 56251))
;;; Generated autoloads from gnus/smiley.el
(autoload 'smiley-region "smiley" "\
@@ -26279,7 +25934,7 @@ interactively. If there's no argument, do it at the current buffer.
;;;***
;;;### (autoloads (smtpmail-send-queued-mail smtpmail-send-it) "smtpmail"
-;;;;;; "mail/smtpmail.el" (20314 46279))
+;;;;;; "mail/smtpmail.el" (20405 16851))
;;; Generated autoloads from mail/smtpmail.el
(autoload 'smtpmail-send-it "smtpmail" "\
@@ -26294,7 +25949,7 @@ Send mail that was queued as a result of setting `smtpmail-queue-mail'.
;;;***
-;;;### (autoloads (snake) "snake" "play/snake.el" (20309 60936))
+;;;### (autoloads (snake) "snake" "play/snake.el" (20229 56251))
;;; Generated autoloads from play/snake.el
(autoload 'snake "snake" "\
@@ -26318,7 +25973,7 @@ Snake mode keybindings:
;;;***
;;;### (autoloads (snmpv2-mode snmp-mode) "snmp-mode" "net/snmp-mode.el"
-;;;;;; (20309 60936))
+;;;;;; (20355 835))
;;; Generated autoloads from net/snmp-mode.el
(autoload 'snmp-mode "snmp-mode" "\
@@ -26347,8 +26002,8 @@ then `snmpv2-mode-hook'.
;;;***
-;;;### (autoloads (sunrise-sunset) "solar" "calendar/solar.el" (20309
-;;;;;; 60936))
+;;;### (autoloads (sunrise-sunset) "solar" "calendar/solar.el" (20229
+;;;;;; 56251))
;;; Generated autoloads from calendar/solar.el
(autoload 'sunrise-sunset "solar" "\
@@ -26363,8 +26018,8 @@ This function is suitable for execution in a .emacs file.
;;;***
-;;;### (autoloads (solitaire) "solitaire" "play/solitaire.el" (20309
-;;;;;; 60936))
+;;;### (autoloads (solitaire) "solitaire" "play/solitaire.el" (20229
+;;;;;; 56251))
;;; Generated autoloads from play/solitaire.el
(autoload 'solitaire "solitaire" "\
@@ -26441,7 +26096,7 @@ Pick your favorite shortcuts:
;;;### (autoloads (reverse-region sort-columns sort-regexp-fields
;;;;;; sort-fields sort-numeric-fields sort-pages sort-paragraphs
-;;;;;; sort-lines sort-subr) "sort" "sort.el" (20320 14810))
+;;;;;; sort-lines sort-subr) "sort" "sort.el" (20325 60273))
;;; Generated autoloads from sort.el
(put 'sort-fold-case 'safe-local-variable 'booleanp)
@@ -26585,8 +26240,8 @@ From a program takes two point or marker arguments, BEG and END.
;;;***
-;;;### (autoloads (spam-initialize) "spam" "gnus/spam.el" (20309
-;;;;;; 60936))
+;;;### (autoloads (spam-initialize) "spam" "gnus/spam.el" (20229
+;;;;;; 56251))
;;; Generated autoloads from gnus/spam.el
(autoload 'spam-initialize "spam" "\
@@ -26602,7 +26257,7 @@ installed through `spam-necessary-extra-headers'.
;;;### (autoloads (spam-report-deagentize spam-report-agentize spam-report-url-to-file
;;;;;; spam-report-url-ping-mm-url spam-report-process-queue) "spam-report"
-;;;;;; "gnus/spam-report.el" (20309 60936))
+;;;;;; "gnus/spam-report.el" (20229 56251))
;;; Generated autoloads from gnus/spam-report.el
(autoload 'spam-report-process-queue "spam-report" "\
@@ -26645,7 +26300,7 @@ Spam reports will be queued with the method used when
;;;***
;;;### (autoloads (speedbar-get-focus speedbar-frame-mode) "speedbar"
-;;;;;; "speedbar.el" (20315 2375))
+;;;;;; "speedbar.el" (20400 16870))
;;; Generated autoloads from speedbar.el
(defalias 'speedbar 'speedbar-frame-mode)
@@ -26669,8 +26324,8 @@ selected. If the speedbar frame is active, then select the attached frame.
;;;***
-;;;### (autoloads (snarf-spooks spook) "spook" "play/spook.el" (20309
-;;;;;; 60936))
+;;;### (autoloads (snarf-spooks spook) "spook" "play/spook.el" (20229
+;;;;;; 56251))
;;; Generated autoloads from play/spook.el
(autoload 'spook "spook" "\
@@ -26689,7 +26344,7 @@ Return a vector containing the lines from `spook-phrases-file'.
;;;;;; sql-ms sql-ingres sql-solid sql-mysql sql-sqlite sql-informix
;;;;;; sql-sybase sql-oracle sql-product-interactive sql-connect
;;;;;; sql-mode sql-help sql-add-product-keywords) "sql" "progmodes/sql.el"
-;;;;;; (20309 60936))
+;;;;;; (20304 58723))
;;; Generated autoloads from progmodes/sql.el
(autoload 'sql-add-product-keywords "sql" "\
@@ -27185,7 +26840,7 @@ buffer.
;;;***
;;;### (autoloads (srecode-template-mode) "srecode/srt-mode" "cedet/srecode/srt-mode.el"
-;;;;;; (20309 60936))
+;;;;;; (20229 56251))
;;; Generated autoloads from cedet/srecode/srt-mode.el
(autoload 'srecode-template-mode "srecode/srt-mode" "\
@@ -27198,7 +26853,7 @@ Major-mode for writing SRecode macros.
;;;***
;;;### (autoloads (starttls-open-stream) "starttls" "gnus/starttls.el"
-;;;;;; (20309 60936))
+;;;;;; (20229 56251))
;;; Generated autoloads from gnus/starttls.el
(autoload 'starttls-open-stream "starttls" "\
@@ -27225,8 +26880,8 @@ GnuTLS requires a port number.
;;;;;; strokes-mode strokes-list-strokes strokes-load-user-strokes
;;;;;; strokes-help strokes-describe-stroke strokes-do-complex-stroke
;;;;;; strokes-do-stroke strokes-read-complex-stroke strokes-read-stroke
-;;;;;; strokes-global-set-stroke) "strokes" "strokes.el" (20309
-;;;;;; 60936))
+;;;;;; strokes-global-set-stroke) "strokes" "strokes.el" (20229
+;;;;;; 56251))
;;; Generated autoloads from strokes.el
(autoload 'strokes-global-set-stroke "strokes" "\
@@ -27340,7 +26995,7 @@ Read a complex stroke and insert its glyph into the current buffer.
;;;***
;;;### (autoloads (studlify-buffer studlify-word studlify-region)
-;;;;;; "studly" "play/studly.el" (20309 60936))
+;;;;;; "studly" "play/studly.el" (19764 44456))
;;; Generated autoloads from play/studly.el
(autoload 'studlify-region "studly" "\
@@ -27361,7 +27016,7 @@ Studlify-case the current buffer.
;;;***
;;;### (autoloads (global-subword-mode subword-mode) "subword" "progmodes/subword.el"
-;;;;;; (20309 60936))
+;;;;;; (20229 56251))
;;; Generated autoloads from progmodes/subword.el
(autoload 'subword-mode "subword" "\
@@ -27417,7 +27072,7 @@ See `subword-mode' for more information on Subword mode.
;;;***
;;;### (autoloads (sc-cite-original) "supercite" "mail/supercite.el"
-;;;;;; (20309 60936))
+;;;;;; (20273 59945))
;;; Generated autoloads from mail/supercite.el
(autoload 'sc-cite-original "supercite" "\
@@ -27449,8 +27104,8 @@ and `sc-post-hook' is run after the guts of this function.
;;;***
-;;;### (autoloads (gpm-mouse-mode) "t-mouse" "t-mouse.el" (20309
-;;;;;; 60936))
+;;;### (autoloads (gpm-mouse-mode) "t-mouse" "t-mouse.el" (20229
+;;;;;; 56251))
;;; Generated autoloads from t-mouse.el
(define-obsolete-function-alias 't-mouse-mode 'gpm-mouse-mode "23.1")
@@ -27478,7 +27133,7 @@ It relies on the `gpm' daemon being activated.
;;;***
-;;;### (autoloads (tabify untabify) "tabify" "tabify.el" (20309 60936))
+;;;### (autoloads (tabify untabify) "tabify" "tabify.el" (20229 56251))
;;; Generated autoloads from tabify.el
(autoload 'untabify "tabify" "\
@@ -27513,7 +27168,7 @@ The variable `tab-width' controls the spacing of tab stops.
;;;;;; table-recognize table-insert-row-column table-insert-column
;;;;;; table-insert-row table-insert table-point-left-cell-hook
;;;;;; table-point-entered-cell-hook table-load-hook table-cell-map-hook)
-;;;;;; "table" "textmodes/table.el" (20309 60936))
+;;;;;; "table" "textmodes/table.el" (20355 835))
;;; Generated autoloads from textmodes/table.el
(defvar table-cell-map-hook nil "\
@@ -28101,50 +27756,7 @@ converts a table into plain text without frames. It is a companion to
;;;***
-;;;### (autoloads (tabulated-list-mode) "tabulated-list" "emacs-lisp/tabulated-list.el"
-;;;;;; (20328 25588))
-;;; Generated autoloads from emacs-lisp/tabulated-list.el
-
-(autoload 'tabulated-list-mode "tabulated-list" "\
-Generic major mode for browsing a list of items.
-This mode is usually not used directly; instead, other major
-modes are derived from it, using `define-derived-mode'.
-
-In this major mode, the buffer is divided into multiple columns,
-which are labeled using the header line. Each non-empty line
-belongs to one \"entry\", and the entries can be sorted according
-to their column values.
-
-An inheriting mode should usually do the following in their body:
-
- - Set `tabulated-list-format', specifying the column format.
- - Set `tabulated-list-revert-hook', if the buffer contents need
- to be specially recomputed prior to `revert-buffer'.
- - Maybe set a `tabulated-list-entries' function (see below).
- - Maybe set `tabulated-list-printer' (see below).
- - Maybe set `tabulated-list-padding'.
- - Call `tabulated-list-init-header' to initialize `header-line-format'
- according to `tabulated-list-format'.
-
-An inheriting mode is usually accompanied by a \"list-FOO\"
-command (e.g. `list-packages', `list-processes'). This command
-creates or switches to a buffer and enables the major mode in
-that buffer. If `tabulated-list-entries' is not a function, the
-command should initialize it to a list of entries for displaying.
-Finally, it should call `tabulated-list-print'.
-
-`tabulated-list-print' calls the printer function specified by
-`tabulated-list-printer', once for each entry. The default
-printer is `tabulated-list-print-entry', but a mode that keeps
-data in an ewoc may instead specify a printer function (e.g., one
-that calls `ewoc-enter-last'), with `tabulated-list-print-entry'
-as the ewoc pretty-printer.
-
-\(fn)" t nil)
-
-;;;***
-
-;;;### (autoloads (talk talk-connect) "talk" "talk.el" (20309 60936))
+;;;### (autoloads (talk talk-connect) "talk" "talk.el" (20229 56251))
;;; Generated autoloads from talk.el
(autoload 'talk-connect "talk" "\
@@ -28159,7 +27771,7 @@ Connect to the Emacs talk group from the current X display or tty frame.
;;;***
-;;;### (autoloads (tar-mode) "tar-mode" "tar-mode.el" (20324 28875))
+;;;### (autoloads (tar-mode) "tar-mode" "tar-mode.el" (20389 6410))
;;; Generated autoloads from tar-mode.el
(autoload 'tar-mode "tar-mode" "\
@@ -28183,7 +27795,7 @@ See also: variables `tar-update-datestamp' and `tar-anal-blocksize'.
;;;***
;;;### (autoloads (tcl-help-on-word inferior-tcl tcl-mode) "tcl"
-;;;;;; "progmodes/tcl.el" (20309 60936))
+;;;;;; "progmodes/tcl.el" (20355 835))
;;; Generated autoloads from progmodes/tcl.el
(autoload 'tcl-mode "tcl" "\
@@ -28231,7 +27843,7 @@ Prefix argument means invert sense of `tcl-use-smart-word-finder'.
;;;***
-;;;### (autoloads (rsh telnet) "telnet" "net/telnet.el" (20309 60936))
+;;;### (autoloads (rsh telnet) "telnet" "net/telnet.el" (20229 56251))
;;; Generated autoloads from net/telnet.el
(autoload 'telnet "telnet" "\
@@ -28257,7 +27869,7 @@ Normally input is edited in Emacs and sent a line at a time.
;;;***
;;;### (autoloads (serial-term ansi-term term make-term) "term" "term.el"
-;;;;;; (20309 60936))
+;;;;;; (20397 10470))
;;; Generated autoloads from term.el
(autoload 'make-term "term" "\
@@ -28299,8 +27911,8 @@ use in that buffer.
;;;***
-;;;### (autoloads (terminal-emulator) "terminal" "terminal.el" (20309
-;;;;;; 60936))
+;;;### (autoloads (terminal-emulator) "terminal" "terminal.el" (20229
+;;;;;; 56251))
;;; Generated autoloads from terminal.el
(autoload 'terminal-emulator "terminal" "\
@@ -28337,7 +27949,7 @@ subprocess started.
;;;***
;;;### (autoloads (testcover-this-defun) "testcover" "emacs-lisp/testcover.el"
-;;;;;; (20309 60936))
+;;;;;; (20229 56251))
;;; Generated autoloads from emacs-lisp/testcover.el
(autoload 'testcover-this-defun "testcover" "\
@@ -28347,7 +27959,7 @@ Start coverage on function under point.
;;;***
-;;;### (autoloads (tetris) "tetris" "play/tetris.el" (20309 60936))
+;;;### (autoloads (tetris) "tetris" "play/tetris.el" (20229 56251))
;;; Generated autoloads from play/tetris.el
(autoload 'tetris "tetris" "\
@@ -28378,7 +27990,7 @@ tetris-mode keybindings:
;;;;;; tex-start-commands tex-start-options slitex-run-command latex-run-command
;;;;;; tex-run-command tex-offer-save tex-main-file tex-first-line-header-regexp
;;;;;; tex-directory tex-shell-file-name) "tex-mode" "textmodes/tex-mode.el"
-;;;;;; (20309 60936))
+;;;;;; (20370 4296))
;;; Generated autoloads from textmodes/tex-mode.el
(defvar tex-shell-file-name nil "\
@@ -28680,7 +28292,7 @@ Major mode to edit DocTeX files.
;;;***
;;;### (autoloads (texi2info texinfo-format-region texinfo-format-buffer)
-;;;;;; "texinfmt" "textmodes/texinfmt.el" (20309 60936))
+;;;;;; "texinfmt" "textmodes/texinfmt.el" (20355 835))
;;; Generated autoloads from textmodes/texinfmt.el
(autoload 'texinfo-format-buffer "texinfmt" "\
@@ -28720,7 +28332,7 @@ if large. You can use `Info-split' to do this manually.
;;;***
;;;### (autoloads (texinfo-mode texinfo-close-quote texinfo-open-quote)
-;;;;;; "texinfo" "textmodes/texinfo.el" (20309 60936))
+;;;;;; "texinfo" "textmodes/texinfo.el" (20229 56251))
;;; Generated autoloads from textmodes/texinfo.el
(defvar texinfo-open-quote (purecopy "``") "\
@@ -28806,7 +28418,7 @@ value of `texinfo-mode-hook'.
;;;### (autoloads (thai-composition-function thai-compose-buffer
;;;;;; thai-compose-string thai-compose-region) "thai-util" "language/thai-util.el"
-;;;;;; (20309 60936))
+;;;;;; (20273 59945))
;;; Generated autoloads from language/thai-util.el
(autoload 'thai-compose-region "thai-util" "\
@@ -28835,7 +28447,7 @@ Compose Thai characters in the current buffer.
;;;### (autoloads (list-at-point number-at-point symbol-at-point
;;;;;; sexp-at-point thing-at-point bounds-of-thing-at-point forward-thing)
-;;;;;; "thingatpt" "thingatpt.el" (20309 60936))
+;;;;;; "thingatpt" "thingatpt.el" (20229 56251))
;;; Generated autoloads from thingatpt.el
(autoload 'forward-thing "thingatpt" "\
@@ -28898,7 +28510,7 @@ Return the Lisp list at point, or nil if none is found.
;;;### (autoloads (thumbs-dired-setroot thumbs-dired-show thumbs-dired-show-marked
;;;;;; thumbs-show-from-dir thumbs-find-thumb) "thumbs" "thumbs.el"
-;;;;;; (20309 60936))
+;;;;;; (20229 56251))
;;; Generated autoloads from thumbs.el
(autoload 'thumbs-find-thumb "thumbs" "\
@@ -28936,8 +28548,8 @@ In dired, call the setroot program on the image at point.
;;;;;; tibetan-post-read-conversion tibetan-compose-buffer tibetan-decompose-buffer
;;;;;; tibetan-decompose-string tibetan-decompose-region tibetan-compose-region
;;;;;; tibetan-compose-string tibetan-transcription-to-tibetan tibetan-tibetan-to-transcription
-;;;;;; tibetan-char-p) "tibet-util" "language/tibet-util.el" (20309
-;;;;;; 60936))
+;;;;;; tibetan-char-p) "tibet-util" "language/tibet-util.el" (20355
+;;;;;; 835))
;;; Generated autoloads from language/tibet-util.el
(autoload 'tibetan-char-p "tibet-util" "\
@@ -29011,7 +28623,7 @@ See also docstring of the function tibetan-compose-region.
;;;***
;;;### (autoloads (tildify-buffer tildify-region) "tildify" "textmodes/tildify.el"
-;;;;;; (20309 60936))
+;;;;;; (20373 62846))
;;; Generated autoloads from textmodes/tildify.el
(autoload 'tildify-region "tildify" "\
@@ -29036,7 +28648,7 @@ This function performs no refilling of the changed text.
;;;### (autoloads (emacs-init-time emacs-uptime display-time-world
;;;;;; display-time-mode display-time display-time-day-and-date)
-;;;;;; "time" "time.el" (20309 60936))
+;;;;;; "time" "time.el" (20389 6410))
;;; Generated autoloads from time.el
(defvar display-time-day-and-date nil "\
@@ -29102,7 +28714,7 @@ Return a string giving the duration of the Emacs initialization.
;;;;;; time-to-day-in-year date-leap-year-p days-between date-to-day
;;;;;; time-add time-subtract time-since days-to-time time-less-p
;;;;;; seconds-to-time date-to-time) "time-date" "calendar/time-date.el"
-;;;;;; (20309 60936))
+;;;;;; (20229 56251))
;;; Generated autoloads from calendar/time-date.el
(autoload 'date-to-time "time-date" "\
@@ -29216,7 +28828,7 @@ This function does not work for SECONDS greater than `most-positive-fixnum'.
;;;***
;;;### (autoloads (time-stamp-toggle-active time-stamp) "time-stamp"
-;;;;;; "time-stamp.el" (20309 60936))
+;;;;;; "time-stamp.el" (20229 56251))
;;; Generated autoloads from time-stamp.el
(put 'time-stamp-format 'safe-local-variable 'stringp)
(put 'time-stamp-time-zone 'safe-local-variable 'string-or-null-p)
@@ -29260,7 +28872,7 @@ With ARG, turn time stamping on if and only if arg is positive.
;;;;;; timeclock-workday-remaining-string timeclock-reread-log timeclock-query-out
;;;;;; timeclock-change timeclock-status-string timeclock-out timeclock-in
;;;;;; timeclock-modeline-display) "timeclock" "calendar/timeclock.el"
-;;;;;; (20309 60936))
+;;;;;; (20304 58723))
;;; Generated autoloads from calendar/timeclock.el
(autoload 'timeclock-modeline-display "timeclock" "\
@@ -29360,7 +28972,7 @@ relative only to the time worked today, and not to past time.
;;;***
;;;### (autoloads (batch-titdic-convert titdic-convert) "titdic-cnv"
-;;;;;; "international/titdic-cnv.el" (20309 60936))
+;;;;;; "international/titdic-cnv.el" (20288 9499))
;;; Generated autoloads from international/titdic-cnv.el
(autoload 'titdic-convert "titdic-cnv" "\
@@ -29383,7 +28995,7 @@ To get complete usage, invoke \"emacs -batch -f batch-titdic-convert -h\".
;;;***
;;;### (autoloads (tmm-prompt tmm-menubar-mouse tmm-menubar) "tmm"
-;;;;;; "tmm.el" (20309 60936))
+;;;;;; "tmm.el" (20356 48455))
;;; Generated autoloads from tmm.el
(define-key global-map "\M-`" 'tmm-menubar)
(define-key global-map [menu-bar mouse-1] 'tmm-menubar-mouse)
@@ -29423,7 +29035,7 @@ Its value should be an event that has a binding in MENU.
;;;### (autoloads (todo-show todo-cp todo-mode todo-print todo-top-priorities
;;;;;; todo-insert-item todo-add-item-non-interactively todo-add-category)
-;;;;;; "todo-mode" "calendar/todo-mode.el" (20309 60936))
+;;;;;; "todo-mode" "calendar/todo-mode.el" (20229 56251))
;;; Generated autoloads from calendar/todo-mode.el
(autoload 'todo-add-category "todo-mode" "\
@@ -29483,7 +29095,7 @@ Show TODO list.
;;;### (autoloads (tool-bar-local-item-from-menu tool-bar-add-item-from-menu
;;;;;; tool-bar-local-item tool-bar-add-item toggle-tool-bar-mode-from-frame)
-;;;;;; "tool-bar" "tool-bar.el" (20309 60936))
+;;;;;; "tool-bar" "tool-bar.el" (20280 8018))
;;; Generated autoloads from tool-bar.el
(autoload 'toggle-tool-bar-mode-from-frame "tool-bar" "\
@@ -29554,7 +29166,7 @@ holds a keymap.
;;;***
;;;### (autoloads (tpu-edt-on tpu-edt-mode) "tpu-edt" "emulation/tpu-edt.el"
-;;;;;; (20309 60936))
+;;;;;; (20400 16870))
;;; Generated autoloads from emulation/tpu-edt.el
(defvar tpu-edt-mode nil "\
@@ -29584,7 +29196,7 @@ Turn on TPU/edt emulation.
;;;***
;;;### (autoloads (tpu-mapper) "tpu-mapper" "emulation/tpu-mapper.el"
-;;;;;; (20309 60936))
+;;;;;; (20229 56251))
;;; Generated autoloads from emulation/tpu-mapper.el
(autoload 'tpu-mapper "tpu-mapper" "\
@@ -29618,7 +29230,7 @@ your local X guru can try to figure out why the key is being ignored.
;;;***
-;;;### (autoloads (tq-create) "tq" "emacs-lisp/tq.el" (20309 60936))
+;;;### (autoloads (tq-create) "tq" "emacs-lisp/tq.el" (20229 56251))
;;; Generated autoloads from emacs-lisp/tq.el
(autoload 'tq-create "tq" "\
@@ -29632,7 +29244,7 @@ to a tcp server on another machine.
;;;***
;;;### (autoloads (trace-function-background trace-function trace-buffer)
-;;;;;; "trace" "emacs-lisp/trace.el" (20309 60936))
+;;;;;; "trace" "emacs-lisp/trace.el" (20229 56251))
;;; Generated autoloads from emacs-lisp/trace.el
(defvar trace-buffer (purecopy "*trace-output*") "\
@@ -29669,11 +29281,11 @@ BUFFER defaults to `trace-buffer'.
;;;### (autoloads (tramp-unload-tramp tramp-completion-handle-file-name-completion
;;;;;; tramp-completion-handle-file-name-all-completions tramp-unload-file-name-handlers
;;;;;; tramp-file-name-handler tramp-syntax tramp-mode) "tramp"
-;;;;;; "net/tramp.el" (20343 48993))
+;;;;;; "net/tramp.el" (20373 62846))
;;; Generated autoloads from net/tramp.el
(defvar tramp-mode t "\
-*Whether Tramp is enabled.
+Whether Tramp is enabled.
If it is set to nil, all remote file names are used literally.")
(custom-autoload 'tramp-mode "tramp" t)
@@ -29706,7 +29318,7 @@ Value for `tramp-file-name-regexp' for URL-like remoting.
See `tramp-file-name-structure' for more explanations.")
(defconst tramp-file-name-regexp (cond ((equal tramp-syntax 'ftp) tramp-file-name-regexp-unified) ((equal tramp-syntax 'sep) tramp-file-name-regexp-separate) ((equal tramp-syntax 'url) tramp-file-name-regexp-url) (t (error "Wrong `tramp-syntax' defined"))) "\
-*Regular expression matching file names handled by Tramp.
+Regular expression matching file names handled by Tramp.
This regexp should match Tramp file names but no other file names.
When tramp.el is loaded, this regular expression is prepended to
`file-name-handler-alist', and that is searched sequentially. Thus,
@@ -29738,7 +29350,7 @@ Value for `tramp-completion-file-name-regexp' for URL-like remoting.
See `tramp-file-name-structure' for more explanations.")
(defconst tramp-completion-file-name-regexp (cond ((equal tramp-syntax 'ftp) tramp-completion-file-name-regexp-unified) ((equal tramp-syntax 'sep) tramp-completion-file-name-regexp-separate) ((equal tramp-syntax 'url) tramp-completion-file-name-regexp-url) (t (error "Wrong `tramp-syntax' defined"))) "\
-*Regular expression matching file names handled by Tramp completion.
+Regular expression matching file names handled by Tramp completion.
This regexp should match partial Tramp file names only.
Please note that the entry in `file-name-handler-alist' is made when
@@ -29802,7 +29414,7 @@ Discard Tramp from loading remote files.
;;;***
;;;### (autoloads (tramp-ftp-enable-ange-ftp) "tramp-ftp" "net/tramp-ftp.el"
-;;;;;; (20309 60936))
+;;;;;; (20355 835))
;;; Generated autoloads from net/tramp-ftp.el
(autoload 'tramp-ftp-enable-ange-ftp "tramp-ftp" "\
@@ -29812,8 +29424,8 @@ Discard Tramp from loading remote files.
;;;***
-;;;### (autoloads (help-with-tutorial) "tutorial" "tutorial.el" (20341
-;;;;;; 56798))
+;;;### (autoloads (help-with-tutorial) "tutorial" "tutorial.el" (20370
+;;;;;; 4296))
;;; Generated autoloads from tutorial.el
(autoload 'help-with-tutorial "tutorial" "\
@@ -29838,7 +29450,7 @@ resumed later.
;;;***
;;;### (autoloads (tai-viet-composition-function) "tv-util" "language/tv-util.el"
-;;;;;; (20309 60936))
+;;;;;; (19764 44456))
;;; Generated autoloads from language/tv-util.el
(autoload 'tai-viet-composition-function "tv-util" "\
@@ -29849,7 +29461,7 @@ resumed later.
;;;***
;;;### (autoloads (2C-split 2C-associate-buffer 2C-two-columns) "two-column"
-;;;;;; "textmodes/two-column.el" (20309 60936))
+;;;;;; "textmodes/two-column.el" (20370 4296))
;;; Generated autoloads from textmodes/two-column.el
(autoload '2C-command "two-column" () t 'keymap)
(global-set-key "\C-x6" '2C-command)
@@ -29900,7 +29512,7 @@ First column's text sSs Second column's text
;;;;;; type-break type-break-mode type-break-keystroke-threshold
;;;;;; type-break-good-break-interval type-break-good-rest-interval
;;;;;; type-break-interval type-break-mode) "type-break" "type-break.el"
-;;;;;; (20309 60936))
+;;;;;; (20355 835))
;;; Generated autoloads from type-break.el
(defvar type-break-mode nil "\
@@ -30082,7 +29694,7 @@ FRAC should be the inverse of the fractional value; for example, a value of
;;;***
-;;;### (autoloads (uce-reply-to-uce) "uce" "mail/uce.el" (20309 60936))
+;;;### (autoloads (uce-reply-to-uce) "uce" "mail/uce.el" (20229 56251))
;;; Generated autoloads from mail/uce.el
(autoload 'uce-reply-to-uce "uce" "\
@@ -30100,7 +29712,7 @@ You might need to set `uce-mail-reader' before using this.
;;;;;; ucs-normalize-NFKC-string ucs-normalize-NFKC-region ucs-normalize-NFKD-string
;;;;;; ucs-normalize-NFKD-region ucs-normalize-NFC-string ucs-normalize-NFC-region
;;;;;; ucs-normalize-NFD-string ucs-normalize-NFD-region) "ucs-normalize"
-;;;;;; "international/ucs-normalize.el" (20309 60936))
+;;;;;; "international/ucs-normalize.el" (20229 56251))
;;; Generated autoloads from international/ucs-normalize.el
(autoload 'ucs-normalize-NFD-region "ucs-normalize" "\
@@ -30166,7 +29778,7 @@ Normalize the string STR by the Unicode NFC and Mac OS's HFS Plus.
;;;***
;;;### (autoloads (ununderline-region underline-region) "underline"
-;;;;;; "textmodes/underline.el" (20309 60936))
+;;;;;; "textmodes/underline.el" (20229 56251))
;;; Generated autoloads from textmodes/underline.el
(autoload 'underline-region "underline" "\
@@ -30187,7 +29799,7 @@ which specify the range to operate on.
;;;***
;;;### (autoloads (unrmail batch-unrmail) "unrmail" "mail/unrmail.el"
-;;;;;; (20309 60936))
+;;;;;; (20370 4296))
;;; Generated autoloads from mail/unrmail.el
(autoload 'batch-unrmail "unrmail" "\
@@ -30206,8 +29818,8 @@ Convert old-style Rmail Babyl file FILE to system inbox format file TO-FILE.
;;;***
-;;;### (autoloads (unsafep) "unsafep" "emacs-lisp/unsafep.el" (20309
-;;;;;; 60936))
+;;;### (autoloads (unsafep) "unsafep" "emacs-lisp/unsafep.el" (20229
+;;;;;; 56251))
;;; Generated autoloads from emacs-lisp/unsafep.el
(autoload 'unsafep "unsafep" "\
@@ -30220,12 +29832,14 @@ UNSAFEP-VARS is a list of symbols with local bindings.
;;;***
;;;### (autoloads (url-retrieve-synchronously url-retrieve) "url"
-;;;;;; "url/url.el" (20309 60936))
+;;;;;; "url/url.el" (20395 5351))
;;; Generated autoloads from url/url.el
(autoload 'url-retrieve "url" "\
Retrieve URL asynchronously and call CALLBACK with CBARGS when finished.
-URL is either a string or a parsed URL.
+URL is either a string or a parsed URL. If it is a string
+containing characters that are not valid in a URI, those
+characters are percent-encoded; see `url-encode-url'.
CALLBACK is called when the object has been completely retrieved, with
the current buffer containing the object, and any MIME headers associated
@@ -30250,6 +29864,8 @@ take effect.
If SILENT, then don't message progress reports and the like.
If INHIBIT-COOKIES, cookies will neither be stored nor sent to
the server.
+If URL is a multibyte string, it will be encoded as utf-8 and
+URL-encoded before it's used.
\(fn URL CALLBACK &optional CBARGS SILENT INHIBIT-COOKIES)" nil nil)
@@ -30264,7 +29880,7 @@ no further processing). URL is either a string or a parsed URL.
;;;***
;;;### (autoloads (url-register-auth-scheme url-get-authentication)
-;;;;;; "url-auth" "url/url-auth.el" (20309 60936))
+;;;;;; "url-auth" "url/url-auth.el" (20239 35035))
;;; Generated autoloads from url/url-auth.el
(autoload 'url-get-authentication "url-auth" "\
@@ -30306,7 +29922,7 @@ RATING a rating between 1 and 10 of the strength of the authentication.
;;;***
;;;### (autoloads (url-cache-extract url-is-cached url-store-in-cache)
-;;;;;; "url-cache" "url/url-cache.el" (20309 60936))
+;;;;;; "url-cache" "url/url-cache.el" (20272 35721))
;;; Generated autoloads from url/url-cache.el
(autoload 'url-store-in-cache "url-cache" "\
@@ -30327,7 +29943,7 @@ Extract FNAM from the local disk cache.
;;;***
-;;;### (autoloads (url-cid) "url-cid" "url/url-cid.el" (20309 60936))
+;;;### (autoloads (url-cid) "url-cid" "url/url-cid.el" (20229 56251))
;;; Generated autoloads from url/url-cid.el
(autoload 'url-cid "url-cid" "\
@@ -30338,7 +29954,7 @@ Extract FNAM from the local disk cache.
;;;***
;;;### (autoloads (url-dav-vc-registered url-dav-supported-p) "url-dav"
-;;;;;; "url/url-dav.el" (20309 60936))
+;;;;;; "url/url-dav.el" (20355 835))
;;; Generated autoloads from url/url-dav.el
(autoload 'url-dav-supported-p "url-dav" "\
@@ -30353,8 +29969,8 @@ Extract FNAM from the local disk cache.
;;;***
-;;;### (autoloads (url-file) "url-file" "url/url-file.el" (20309
-;;;;;; 60936))
+;;;### (autoloads (url-file) "url-file" "url/url-file.el" (20229
+;;;;;; 56251))
;;; Generated autoloads from url/url-file.el
(autoload 'url-file "url-file" "\
@@ -30365,7 +29981,7 @@ Handle file: and ftp: URLs.
;;;***
;;;### (autoloads (url-open-stream url-gateway-nslookup-host) "url-gw"
-;;;;;; "url/url-gw.el" (20309 60936))
+;;;;;; "url/url-gw.el" (20229 56251))
;;; Generated autoloads from url/url-gw.el
(autoload 'url-gateway-nslookup-host "url-gw" "\
@@ -30385,7 +30001,7 @@ Might do a non-blocking connection; use `process-status' to check.
;;;### (autoloads (url-insert-file-contents url-file-local-copy url-copy-file
;;;;;; url-file-handler url-handler-mode) "url-handlers" "url/url-handlers.el"
-;;;;;; (20309 60936))
+;;;;;; (20355 835))
;;; Generated autoloads from url/url-handlers.el
(defvar url-handler-mode nil "\
@@ -30440,7 +30056,7 @@ accessible.
;;;***
;;;### (autoloads (url-http-options url-http-file-attributes url-http-file-exists-p
-;;;;;; url-http) "url-http" "url/url-http.el" (20316 49235))
+;;;;;; url-http) "url-http" "url/url-http.el" (20395 5351))
;;; Generated autoloads from url/url-http.el
(autoload 'url-http "url-http" "\
@@ -30509,7 +30125,7 @@ HTTPS retrievals are asynchronous.")
;;;***
-;;;### (autoloads (url-irc) "url-irc" "url/url-irc.el" (20309 60936))
+;;;### (autoloads (url-irc) "url-irc" "url/url-irc.el" (20229 56251))
;;; Generated autoloads from url/url-irc.el
(autoload 'url-irc "url-irc" "\
@@ -30519,8 +30135,8 @@ HTTPS retrievals are asynchronous.")
;;;***
-;;;### (autoloads (url-ldap) "url-ldap" "url/url-ldap.el" (20309
-;;;;;; 60936))
+;;;### (autoloads (url-ldap) "url-ldap" "url/url-ldap.el" (20355
+;;;;;; 835))
;;; Generated autoloads from url/url-ldap.el
(autoload 'url-ldap "url-ldap" "\
@@ -30534,7 +30150,7 @@ URL can be a URL string, or a URL vector of the type returned by
;;;***
;;;### (autoloads (url-mailto url-mail) "url-mailto" "url/url-mailto.el"
-;;;;;; (20309 60936))
+;;;;;; (20229 56251))
;;; Generated autoloads from url/url-mailto.el
(autoload 'url-mail "url-mailto" "\
@@ -30550,7 +30166,7 @@ Handle the mailto: URL syntax.
;;;***
;;;### (autoloads (url-data url-generic-emulator-loader url-info
-;;;;;; url-man) "url-misc" "url/url-misc.el" (20309 60936))
+;;;;;; url-man) "url-misc" "url/url-misc.el" (20229 56251))
;;; Generated autoloads from url/url-misc.el
(autoload 'url-man "url-misc" "\
@@ -30582,7 +30198,7 @@ Fetch a data URL (RFC 2397).
;;;***
;;;### (autoloads (url-snews url-news) "url-news" "url/url-news.el"
-;;;;;; (20309 60936))
+;;;;;; (20229 56251))
;;; Generated autoloads from url/url-news.el
(autoload 'url-news "url-news" "\
@@ -30599,7 +30215,7 @@ Fetch a data URL (RFC 2397).
;;;### (autoloads (url-ns-user-pref url-ns-prefs isInNet isResolvable
;;;;;; dnsResolve dnsDomainIs isPlainHostName) "url-ns" "url/url-ns.el"
-;;;;;; (20309 60936))
+;;;;;; (20229 56251))
;;; Generated autoloads from url/url-ns.el
(autoload 'isPlainHostName "url-ns" "\
@@ -30640,7 +30256,7 @@ Fetch a data URL (RFC 2397).
;;;***
;;;### (autoloads (url-generic-parse-url url-recreate-url) "url-parse"
-;;;;;; "url/url-parse.el" (20309 60936))
+;;;;;; "url/url-parse.el" (20395 46900))
;;; Generated autoloads from url/url-parse.el
(autoload 'url-recreate-url "url-parse" "\
@@ -30651,14 +30267,48 @@ Recreate a URL string from the parsed URLOBJ.
(autoload 'url-generic-parse-url "url-parse" "\
Return an URL-struct of the parts of URL.
The CL-style struct contains the following fields:
-TYPE USER PASSWORD HOST PORTSPEC FILENAME TARGET ATTRIBUTES FULLNESS.
+
+TYPE is the URI scheme (string or nil).
+USER is the user name (string or nil).
+PASSWORD is the password (string [deprecated] or nil).
+HOST is the host (a registered name, IP literal in square
+ brackets, or IPv4 address in dotted-decimal form).
+PORTSPEC is the specified port (a number), or nil.
+FILENAME is the path AND the query component of the URI.
+TARGET is the fragment identifier component (used to refer to a
+ subordinate resource, e.g. a part of a webpage).
+ATTRIBUTES is nil; this slot originally stored the attribute and
+ value alists for IMAP URIs, but this feature was removed
+ since it conflicts with RFC 3986.
+FULLNESS is non-nil iff the hierarchical sequence component of
+ the URL starts with two slashes, \"//\".
+
+The parser follows RFC 3986, except that it also tries to handle
+URIs that are not fully specified (e.g. lacking TYPE), and it
+does not check for or perform %-encoding.
+
+Here is an example. The URL
+
+ foo://bob:pass@example.com:42/a/b/c.dtb?type=animal&name=narwhal#nose
+
+parses to
+
+ TYPE = \"foo\"
+ USER = \"bob\"
+ PASSWORD = \"pass\"
+ HOST = \"example.com\"
+ PORTSPEC = 42
+ FILENAME = \"/a/b/c.dtb?type=animal&name=narwhal\"
+ TARGET = \"nose\"
+ ATTRIBUTES = nil
+ FULLNESS = t
\(fn URL)" nil nil)
;;;***
;;;### (autoloads (url-setup-privacy-info) "url-privacy" "url/url-privacy.el"
-;;;;;; (20309 60936))
+;;;;;; (20229 56251))
;;; Generated autoloads from url/url-privacy.el
(autoload 'url-setup-privacy-info "url-privacy" "\
@@ -30669,7 +30319,7 @@ Setup variables that expose info about you and your system.
;;;***
;;;### (autoloads (url-queue-retrieve) "url-queue" "url/url-queue.el"
-;;;;;; (20335 9743))
+;;;;;; (20339 13356))
;;; Generated autoloads from url/url-queue.el
(autoload 'url-queue-retrieve "url-queue" "\
@@ -30684,12 +30334,13 @@ The variable `url-queue-timeout' sets a timeout.
;;;***
;;;### (autoloads (url-view-url url-truncate-url-for-viewing url-file-extension
-;;;;;; url-hexify-string url-unhex-string url-parse-query-string
-;;;;;; url-file-nondirectory url-file-directory url-percentage url-display-percentage
-;;;;;; url-pretty-length url-strip-leading-spaces url-eat-trailing-space
-;;;;;; url-get-normalized-date url-lazy-message url-normalize-url
-;;;;;; url-insert-entities-in-string url-parse-args url-debug url-debug)
-;;;;;; "url-util" "url/url-util.el" (20309 60936))
+;;;;;; url-encode-url url-hexify-string url-unhex-string url-build-query-string
+;;;;;; url-parse-query-string url-file-nondirectory url-file-directory
+;;;;;; url-percentage url-display-percentage url-pretty-length url-strip-leading-spaces
+;;;;;; url-eat-trailing-space url-get-normalized-date url-lazy-message
+;;;;;; url-normalize-url url-insert-entities-in-string url-parse-args
+;;;;;; url-debug url-debug) "url-util" "url/url-util.el" (20405
+;;;;;; 16851))
;;; Generated autoloads from url/url-util.el
(defvar url-debug nil "\
@@ -30783,6 +30434,18 @@ Return the nondirectory part of FILE, for a URL.
\(fn QUERY &optional DOWNCASE ALLOW-NEWLINES)" nil nil)
+(autoload 'url-build-query-string "url-util" "\
+Build a query-string.
+
+Given a QUERY in the form:
+'((key1 val1)
+ (key2 val2)
+ (key3 val1 val2)
+ (key4)
+ (key5
+
+\(fn QUERY &optional SEMICOLONS KEEP-EMPTY)" nil nil)
+
(autoload 'url-unhex-string "url-util" "\
Remove %XX embedded spaces, etc in a URL.
If optional second argument ALLOW-NEWLINES is non-nil, then allow the
@@ -30792,13 +30455,27 @@ forbidden in URL encoding.
\(fn STR &optional ALLOW-NEWLINES)" nil nil)
(autoload 'url-hexify-string "url-util" "\
-Return a new string that is STRING URI-encoded.
-First, STRING is converted to utf-8, if necessary. Then, for each
-character in the utf-8 string, those found in `url-unreserved-chars'
-are left as-is, all others are represented as a three-character
-string: \"%\" followed by two lowercase hex digits.
+URI-encode STRING and return the result.
+If STRING is multibyte, it is first converted to a utf-8 byte
+string. Each byte corresponding to an allowed character is left
+as-is, while all other bytes are converted to a three-character
+string: \"%\" followed by two upper-case hex digits.
+
+The allowed characters are specified by ALLOWED-CHARS. If this
+argument is nil, the list `url-unreserved-chars' determines the
+allowed characters. Otherwise, ALLOWED-CHARS should be a vector
+whose Nth element is non-nil if character N is allowed.
+
+\(fn STRING &optional ALLOWED-CHARS)" nil nil)
+
+(autoload 'url-encode-url "url-util" "\
+Return a properly URI-encoded version of URL.
+This function also performs URI normalization, e.g. converting
+the scheme to lowercase if it is uppercase. Apart from
+normalization, if URL is already URI-encoded, this function
+should return it unchanged.
-\(fn STRING)" nil nil)
+\(fn URL)" nil nil)
(autoload 'url-file-extension "url-util" "\
Return the filename extension of FNAME.
@@ -30825,7 +30502,7 @@ This uses `url-current-object', set locally to the buffer.
;;;***
;;;### (autoloads (ask-user-about-supersession-threat ask-user-about-lock)
-;;;;;; "userlock" "userlock.el" (20309 60936))
+;;;;;; "userlock" "userlock.el" (20229 56251))
;;; Generated autoloads from userlock.el
(autoload 'ask-user-about-lock "userlock" "\
@@ -30855,7 +30532,7 @@ The buffer in question is current when this function is called.
;;;### (autoloads (utf-7-imap-pre-write-conversion utf-7-pre-write-conversion
;;;;;; utf-7-imap-post-read-conversion utf-7-post-read-conversion)
-;;;;;; "utf-7" "international/utf-7.el" (20309 60936))
+;;;;;; "utf-7" "international/utf-7.el" (20229 56251))
;;; Generated autoloads from international/utf-7.el
(autoload 'utf-7-post-read-conversion "utf-7" "\
@@ -30880,7 +30557,7 @@ The buffer in question is current when this function is called.
;;;***
-;;;### (autoloads (utf7-encode) "utf7" "gnus/utf7.el" (20309 60936))
+;;;### (autoloads (utf7-encode) "utf7" "gnus/utf7.el" (20229 56251))
;;; Generated autoloads from gnus/utf7.el
(autoload 'utf7-encode "utf7" "\
@@ -30892,7 +30569,7 @@ Encode UTF-7 STRING. Use IMAP modification if FOR-IMAP is non-nil.
;;;### (autoloads (uudecode-decode-region uudecode-decode-region-internal
;;;;;; uudecode-decode-region-external) "uudecode" "mail/uudecode.el"
-;;;;;; (20309 60936))
+;;;;;; (20355 835))
;;; Generated autoloads from mail/uudecode.el
(autoload 'uudecode-decode-region-external "uudecode" "\
@@ -30922,8 +30599,8 @@ If FILE-NAME is non-nil, save the result to FILE-NAME.
;;;;;; vc-print-log vc-retrieve-tag vc-create-tag vc-merge vc-insert-headers
;;;;;; vc-revision-other-window vc-root-diff vc-ediff vc-version-ediff
;;;;;; vc-diff vc-version-diff vc-register vc-next-action vc-before-checkin-hook
-;;;;;; vc-checkin-hook vc-checkout-hook) "vc" "vc/vc.el" (20333
-;;;;;; 51787))
+;;;;;; vc-checkin-hook vc-checkout-hook) "vc" "vc/vc.el" (20376
+;;;;;; 45624))
;;; Generated autoloads from vc/vc.el
(defvar vc-checkout-hook nil "\
@@ -31201,7 +30878,7 @@ Return the branch part of a revision number REV.
;;;***
;;;### (autoloads (vc-annotate) "vc-annotate" "vc/vc-annotate.el"
-;;;;;; (20309 60936))
+;;;;;; (20356 48455))
;;; Generated autoloads from vc/vc-annotate.el
(autoload 'vc-annotate "vc-annotate" "\
@@ -31238,7 +30915,7 @@ mode-specific menu. `vc-annotate-color-map' and
;;;***
-;;;### (autoloads nil "vc-arch" "vc/vc-arch.el" (20309 60936))
+;;;### (autoloads nil "vc-arch" "vc/vc-arch.el" (20376 46117))
;;; Generated autoloads from vc/vc-arch.el
(defun vc-arch-registered (file)
(if (vc-find-root file "{arch}/=tagging-method")
@@ -31248,7 +30925,7 @@ mode-specific menu. `vc-annotate-color-map' and
;;;***
-;;;### (autoloads nil "vc-bzr" "vc/vc-bzr.el" (20332 33075))
+;;;### (autoloads nil "vc-bzr" "vc/vc-bzr.el" (20405 42046))
;;; Generated autoloads from vc/vc-bzr.el
(defconst vc-bzr-admin-dirname ".bzr" "\
@@ -31264,7 +30941,7 @@ Name of the format file in a .bzr directory.")
;;;***
-;;;### (autoloads nil "vc-cvs" "vc/vc-cvs.el" (20309 60936))
+;;;### (autoloads nil "vc-cvs" "vc/vc-cvs.el" (20376 45957))
;;; Generated autoloads from vc/vc-cvs.el
(defun vc-cvs-registered (f)
"Return non-nil if file F is registered with CVS."
@@ -31275,7 +30952,7 @@ Name of the format file in a .bzr directory.")
;;;***
-;;;### (autoloads (vc-dir) "vc-dir" "vc/vc-dir.el" (20309 60936))
+;;;### (autoloads (vc-dir) "vc-dir" "vc/vc-dir.el" (20376 45841))
;;; Generated autoloads from vc/vc-dir.el
(autoload 'vc-dir "vc-dir" "\
@@ -31300,7 +30977,7 @@ These are the commands available for use in the file status buffer:
;;;***
;;;### (autoloads (vc-do-command) "vc-dispatcher" "vc/vc-dispatcher.el"
-;;;;;; (20309 60936))
+;;;;;; (20370 4296))
;;; Generated autoloads from vc/vc-dispatcher.el
(autoload 'vc-do-command "vc-dispatcher" "\
@@ -31323,7 +31000,7 @@ case, and the process object in the asynchronous case.
;;;***
-;;;### (autoloads nil "vc-git" "vc/vc-git.el" (20341 24416))
+;;;### (autoloads nil "vc-git" "vc/vc-git.el" (20379 60745))
;;; Generated autoloads from vc/vc-git.el
(defun vc-git-registered (file)
"Return non-nil if FILE is registered with git."
@@ -31334,7 +31011,7 @@ case, and the process object in the asynchronous case.
;;;***
-;;;### (autoloads nil "vc-hg" "vc/vc-hg.el" (20320 14810))
+;;;### (autoloads nil "vc-hg" "vc/vc-hg.el" (20376 44541))
;;; Generated autoloads from vc/vc-hg.el
(defun vc-hg-registered (file)
"Return non-nil if FILE is registered with hg."
@@ -31345,7 +31022,7 @@ case, and the process object in the asynchronous case.
;;;***
-;;;### (autoloads nil "vc-mtn" "vc/vc-mtn.el" (20309 60936))
+;;;### (autoloads nil "vc-mtn" "vc/vc-mtn.el" (20376 41989))
;;; Generated autoloads from vc/vc-mtn.el
(defconst vc-mtn-admin-dir "_MTN" "\
@@ -31362,7 +31039,7 @@ Name of the monotone directory's format file.")
;;;***
;;;### (autoloads (vc-rcs-master-templates) "vc-rcs" "vc/vc-rcs.el"
-;;;;;; (20309 60936))
+;;;;;; (20296 30097))
;;; Generated autoloads from vc/vc-rcs.el
(defvar vc-rcs-master-templates (purecopy '("%sRCS/%s,v" "%s%s,v" "%sRCS/%s")) "\
@@ -31376,7 +31053,7 @@ For a description of possible values, see `vc-check-master-templates'.")
;;;***
;;;### (autoloads (vc-sccs-master-templates) "vc-sccs" "vc/vc-sccs.el"
-;;;;;; (20309 60936))
+;;;;;; (20296 30097))
;;; Generated autoloads from vc/vc-sccs.el
(defvar vc-sccs-master-templates (purecopy '("%sSCCS/s.%s" "%ss.%s" vc-sccs-search-project-dir)) "\
@@ -31393,7 +31070,7 @@ find any project directory." (let ((project-dir (getenv "PROJECTDIR")) dirs dir)
;;;***
-;;;### (autoloads nil "vc-svn" "vc/vc-svn.el" (20309 60936))
+;;;### (autoloads nil "vc-svn" "vc/vc-svn.el" (20296 30097))
;;; Generated autoloads from vc/vc-svn.el
(defun vc-svn-registered (f)
(let ((admin-dir (cond ((and (eq system-type 'windows-nt)
@@ -31407,7 +31084,7 @@ find any project directory." (let ((project-dir (getenv "PROJECTDIR")) dirs dir)
;;;***
;;;### (autoloads (vera-mode) "vera-mode" "progmodes/vera-mode.el"
-;;;;;; (20309 60936))
+;;;;;; (20355 835))
;;; Generated autoloads from progmodes/vera-mode.el
(add-to-list 'auto-mode-alist (cons (purecopy "\\.vr[hi]?\\'") 'vera-mode))
@@ -31465,7 +31142,7 @@ Key bindings:
;;;***
;;;### (autoloads (verilog-mode) "verilog-mode" "progmodes/verilog-mode.el"
-;;;;;; (20309 60936))
+;;;;;; (20387 12783))
;;; Generated autoloads from progmodes/verilog-mode.el
(autoload 'verilog-mode "verilog-mode" "\
@@ -31604,7 +31281,7 @@ Key bindings specific to `verilog-mode-map' are:
;;;***
;;;### (autoloads (vhdl-mode) "vhdl-mode" "progmodes/vhdl-mode.el"
-;;;;;; (20309 60936))
+;;;;;; (20355 835))
;;; Generated autoloads from progmodes/vhdl-mode.el
(autoload 'vhdl-mode "vhdl-mode" "\
@@ -32145,7 +31822,7 @@ Key bindings:
;;;***
-;;;### (autoloads (vi-mode) "vi" "emulation/vi.el" (20309 60936))
+;;;### (autoloads (vi-mode) "vi" "emulation/vi.el" (20103 44376))
;;; Generated autoloads from emulation/vi.el
(autoload 'vi-mode "vi" "\
@@ -32200,7 +31877,7 @@ Syntax table and abbrevs while in vi mode remain as they were in Emacs.
;;;### (autoloads (viqr-pre-write-conversion viqr-post-read-conversion
;;;;;; viet-encode-viqr-buffer viet-encode-viqr-region viet-decode-viqr-buffer
;;;;;; viet-decode-viqr-region viet-encode-viscii-char) "viet-util"
-;;;;;; "language/viet-util.el" (20309 60936))
+;;;;;; "language/viet-util.el" (20229 56251))
;;; Generated autoloads from language/viet-util.el
(autoload 'viet-encode-viscii-char "viet-util" "\
@@ -32248,7 +31925,7 @@ Convert Vietnamese characters of the current buffer to `VIQR' mnemonics.
;;;;;; view-mode view-buffer-other-frame view-buffer-other-window
;;;;;; view-buffer view-file-other-frame view-file-other-window
;;;;;; view-file kill-buffer-if-not-modified view-remove-frame-by-deleting)
-;;;;;; "view" "view.el" (20324 28875))
+;;;;;; "view" "view.el" (20325 60273))
;;; Generated autoloads from view.el
(defvar view-remove-frame-by-deleting t "\
@@ -32502,8 +32179,8 @@ Exit View mode and make the current buffer editable.
;;;***
-;;;### (autoloads (vip-mode vip-setup) "vip" "emulation/vip.el" (20309
-;;;;;; 60936))
+;;;### (autoloads (vip-mode vip-setup) "vip" "emulation/vip.el" (20229
+;;;;;; 56251))
;;; Generated autoloads from emulation/vip.el
(autoload 'vip-setup "vip" "\
@@ -32519,7 +32196,7 @@ Turn on VIP emulation of VI.
;;;***
;;;### (autoloads (viper-mode toggle-viper-mode) "viper" "emulation/viper.el"
-;;;;;; (20309 60936))
+;;;;;; (20355 835))
;;; Generated autoloads from emulation/viper.el
(autoload 'toggle-viper-mode "viper" "\
@@ -32536,7 +32213,7 @@ Turn on Viper emulation of Vi in Emacs. See Info node `(viper)Top'.
;;;***
;;;### (autoloads (warn lwarn display-warning) "warnings" "emacs-lisp/warnings.el"
-;;;;;; (20309 60936))
+;;;;;; (20229 56251))
;;; Generated autoloads from emacs-lisp/warnings.el
(defvar warning-prefix-function nil "\
@@ -32626,7 +32303,7 @@ this is equivalent to `display-warning', using
;;;***
;;;### (autoloads (wdired-change-to-wdired-mode) "wdired" "wdired.el"
-;;;;;; (20309 60936))
+;;;;;; (20229 56251))
;;; Generated autoloads from wdired.el
(autoload 'wdired-change-to-wdired-mode "wdired" "\
@@ -32642,7 +32319,7 @@ See `wdired-mode'.
;;;***
-;;;### (autoloads (webjump) "webjump" "net/webjump.el" (20309 60936))
+;;;### (autoloads (webjump) "webjump" "net/webjump.el" (20355 835))
;;; Generated autoloads from net/webjump.el
(autoload 'webjump "webjump" "\
@@ -32659,7 +32336,7 @@ Please submit bug reports and other feedback to the author, Neil W. Van Dyke
;;;***
;;;### (autoloads (which-function-mode which-func-mode) "which-func"
-;;;;;; "progmodes/which-func.el" (20309 60936))
+;;;;;; "progmodes/which-func.el" (20379 60745))
;;; Generated autoloads from progmodes/which-func.el
(put 'which-func-format 'risky-local-variable t)
(put 'which-func-current 'risky-local-variable t)
@@ -32695,7 +32372,7 @@ in certain major modes.
;;;### (autoloads (whitespace-report-region whitespace-report whitespace-cleanup-region
;;;;;; whitespace-cleanup global-whitespace-toggle-options whitespace-toggle-options
;;;;;; global-whitespace-newline-mode global-whitespace-mode whitespace-newline-mode
-;;;;;; whitespace-mode) "whitespace" "whitespace.el" (20309 60936))
+;;;;;; whitespace-mode) "whitespace" "whitespace.el" (20229 56251))
;;; Generated autoloads from whitespace.el
(autoload 'whitespace-mode "whitespace" "\
@@ -33094,7 +32771,7 @@ cleaning up these problems.
;;;***
;;;### (autoloads (widget-minor-mode widget-browse-other-window widget-browse
-;;;;;; widget-browse-at) "wid-browse" "wid-browse.el" (20309 60936))
+;;;;;; widget-browse-at) "wid-browse" "wid-browse.el" (20273 59945))
;;; Generated autoloads from wid-browse.el
(autoload 'widget-browse-at "wid-browse" "\
@@ -33123,8 +32800,8 @@ if ARG is omitted or nil.
;;;***
;;;### (autoloads (widget-setup widget-insert widget-delete widget-create
-;;;;;; widget-prompt-value widgetp) "wid-edit" "wid-edit.el" (20329
-;;;;;; 31524))
+;;;;;; widget-prompt-value widgetp) "wid-edit" "wid-edit.el" (20373
+;;;;;; 62846))
;;; Generated autoloads from wid-edit.el
(autoload 'widgetp "wid-edit" "\
@@ -33167,8 +32844,8 @@ Setup current buffer so editing string widgets works.
;;;***
;;;### (autoloads (windmove-default-keybindings windmove-down windmove-right
-;;;;;; windmove-up windmove-left) "windmove" "windmove.el" (20309
-;;;;;; 60936))
+;;;;;; windmove-up windmove-left) "windmove" "windmove.el" (20255
+;;;;;; 22932))
;;; Generated autoloads from windmove.el
(autoload 'windmove-left "windmove" "\
@@ -33221,7 +32898,7 @@ Default MODIFIER is 'shift.
;;;***
;;;### (autoloads (winner-mode winner-mode) "winner" "winner.el"
-;;;;;; (20309 60936))
+;;;;;; (20239 35035))
;;; Generated autoloads from winner.el
(defvar winner-mode nil "\
@@ -33240,7 +32917,7 @@ With arg, turn Winner mode on if and only if arg is positive.
;;;***
;;;### (autoloads (woman-bookmark-jump woman-find-file woman-dired-find-file
-;;;;;; woman woman-locale) "woman" "woman.el" (20309 60936))
+;;;;;; woman woman-locale) "woman" "woman.el" (20373 62846))
;;; Generated autoloads from woman.el
(defvar woman-locale nil "\
@@ -33289,7 +32966,7 @@ Default bookmark handler for Woman buffers.
;;;***
;;;### (autoloads (wordstar-mode) "ws-mode" "emulation/ws-mode.el"
-;;;;;; (20320 14810))
+;;;;;; (20325 60273))
;;; Generated autoloads from emulation/ws-mode.el
(autoload 'wordstar-mode "ws-mode" "\
@@ -33401,7 +33078,7 @@ The key bindings are:
;;;***
-;;;### (autoloads (xesam-search) "xesam" "net/xesam.el" (20309 60936))
+;;;### (autoloads (xesam-search) "xesam" "net/xesam.el" (20373 62846))
;;; Generated autoloads from net/xesam.el
(autoload 'xesam-search "xesam" "\
@@ -33421,7 +33098,7 @@ Example:
;;;***
;;;### (autoloads (xml-parse-region xml-parse-file) "xml" "xml.el"
-;;;;;; (20309 60936))
+;;;;;; (20379 60745))
;;; Generated autoloads from xml.el
(autoload 'xml-parse-file "xml" "\
@@ -33447,7 +33124,7 @@ If PARSE-NS is non-nil, then QNAMES are expanded.
;;;***
;;;### (autoloads (xmltok-get-declared-encoding-position) "xmltok"
-;;;;;; "nxml/xmltok.el" (20309 60936))
+;;;;;; "nxml/xmltok.el" (20229 56251))
;;; Generated autoloads from nxml/xmltok.el
(autoload 'xmltok-get-declared-encoding-position "xmltok" "\
@@ -33465,8 +33142,8 @@ If LIMIT is non-nil, then do not consider characters beyond LIMIT.
;;;***
-;;;### (autoloads (xterm-mouse-mode) "xt-mouse" "xt-mouse.el" (20309
-;;;;;; 60936))
+;;;### (autoloads (xterm-mouse-mode) "xt-mouse" "xt-mouse.el" (20229
+;;;;;; 56251))
;;; Generated autoloads from xt-mouse.el
(defvar xterm-mouse-mode nil "\
@@ -33496,7 +33173,7 @@ down the SHIFT key while pressing the mouse button.
;;;***
;;;### (autoloads (yenc-extract-filename yenc-decode-region) "yenc"
-;;;;;; "gnus/yenc.el" (20309 60936))
+;;;;;; "gnus/yenc.el" (20229 56251))
;;; Generated autoloads from gnus/yenc.el
(autoload 'yenc-decode-region "yenc" "\
@@ -33512,7 +33189,7 @@ Extract file name from an yenc header.
;;;***
;;;### (autoloads (psychoanalyze-pinhead apropos-zippy insert-zippyism
-;;;;;; yow) "yow" "play/yow.el" (20309 60936))
+;;;;;; yow) "yow" "play/yow.el" (20370 4296))
;;; Generated autoloads from play/yow.el
(autoload 'yow "yow" "\
@@ -33538,7 +33215,7 @@ Zippy goes to the analyst.
;;;***
-;;;### (autoloads (zone) "zone" "play/zone.el" (20309 60936))
+;;;### (autoloads (zone) "zone" "play/zone.el" (20395 5351))
;;; Generated autoloads from play/zone.el
(autoload 'zone "zone" "\
@@ -33554,46 +33231,47 @@ Zone out, completely.
;;;;;; "calc/calc-fin.el" "calc/calc-forms.el" "calc/calc-frac.el"
;;;;;; "calc/calc-funcs.el" "calc/calc-graph.el" "calc/calc-help.el"
;;;;;; "calc/calc-incom.el" "calc/calc-keypd.el" "calc/calc-lang.el"
-;;;;;; "calc/calc-macs.el" "calc/calc-map.el" "calc/calc-math.el"
-;;;;;; "calc/calc-menu.el" "calc/calc-misc.el" "calc/calc-mode.el"
-;;;;;; "calc/calc-mtx.el" "calc/calc-nlfit.el" "calc/calc-poly.el"
-;;;;;; "calc/calc-prog.el" "calc/calc-rewr.el" "calc/calc-rules.el"
-;;;;;; "calc/calc-sel.el" "calc/calc-stat.el" "calc/calc-store.el"
-;;;;;; "calc/calc-stuff.el" "calc/calc-trail.el" "calc/calc-units.el"
-;;;;;; "calc/calc-vec.el" "calc/calc-yank.el" "calc/calcalg2.el"
-;;;;;; "calc/calcalg3.el" "calc/calccomp.el" "calc/calcsel2.el"
-;;;;;; "calendar/cal-bahai.el" "calendar/cal-coptic.el" "calendar/cal-french.el"
-;;;;;; "calendar/cal-html.el" "calendar/cal-islam.el" "calendar/cal-iso.el"
-;;;;;; "calendar/cal-julian.el" "calendar/cal-loaddefs.el" "calendar/cal-mayan.el"
-;;;;;; "calendar/cal-menu.el" "calendar/cal-move.el" "calendar/cal-persia.el"
-;;;;;; "calendar/cal-tex.el" "calendar/cal-x.el" "calendar/diary-loaddefs.el"
-;;;;;; "calendar/hol-loaddefs.el" "cdl.el" "cedet/cedet-cscope.el"
-;;;;;; "cedet/cedet-files.el" "cedet/cedet-global.el" "cedet/cedet-idutils.el"
-;;;;;; "cedet/cedet.el" "cedet/ede/auto.el" "cedet/ede/autoconf-edit.el"
-;;;;;; "cedet/ede/base.el" "cedet/ede/cpp-root.el" "cedet/ede/custom.el"
-;;;;;; "cedet/ede/dired.el" "cedet/ede/emacs.el" "cedet/ede/files.el"
-;;;;;; "cedet/ede/generic.el" "cedet/ede/linux.el" "cedet/ede/locate.el"
-;;;;;; "cedet/ede/make.el" "cedet/ede/makefile-edit.el" "cedet/ede/pconf.el"
-;;;;;; "cedet/ede/pmake.el" "cedet/ede/proj-archive.el" "cedet/ede/proj-aux.el"
-;;;;;; "cedet/ede/proj-comp.el" "cedet/ede/proj-elisp.el" "cedet/ede/proj-info.el"
-;;;;;; "cedet/ede/proj-misc.el" "cedet/ede/proj-obj.el" "cedet/ede/proj-prog.el"
-;;;;;; "cedet/ede/proj-scheme.el" "cedet/ede/proj-shared.el" "cedet/ede/proj.el"
-;;;;;; "cedet/ede/project-am.el" "cedet/ede/shell.el" "cedet/ede/simple.el"
-;;;;;; "cedet/ede/source.el" "cedet/ede/speedbar.el" "cedet/ede/srecode.el"
-;;;;;; "cedet/ede/system.el" "cedet/ede/util.el" "cedet/inversion.el"
-;;;;;; "cedet/mode-local.el" "cedet/pulse.el" "cedet/semantic/analyze.el"
-;;;;;; "cedet/semantic/analyze/complete.el" "cedet/semantic/analyze/debug.el"
-;;;;;; "cedet/semantic/analyze/fcn.el" "cedet/semantic/analyze/refs.el"
-;;;;;; "cedet/semantic/bovine.el" "cedet/semantic/bovine/c-by.el"
-;;;;;; "cedet/semantic/bovine/c.el" "cedet/semantic/bovine/debug.el"
-;;;;;; "cedet/semantic/bovine/el.el" "cedet/semantic/bovine/gcc.el"
-;;;;;; "cedet/semantic/bovine/make-by.el" "cedet/semantic/bovine/make.el"
-;;;;;; "cedet/semantic/bovine/scm-by.el" "cedet/semantic/bovine/scm.el"
-;;;;;; "cedet/semantic/chart.el" "cedet/semantic/complete.el" "cedet/semantic/ctxt.el"
-;;;;;; "cedet/semantic/db-debug.el" "cedet/semantic/db-ebrowse.el"
-;;;;;; "cedet/semantic/db-el.el" "cedet/semantic/db-file.el" "cedet/semantic/db-find.el"
-;;;;;; "cedet/semantic/db-global.el" "cedet/semantic/db-javascript.el"
-;;;;;; "cedet/semantic/db-mode.el" "cedet/semantic/db-ref.el" "cedet/semantic/db-typecache.el"
+;;;;;; "calc/calc-loaddefs.el" "calc/calc-macs.el" "calc/calc-map.el"
+;;;;;; "calc/calc-math.el" "calc/calc-menu.el" "calc/calc-misc.el"
+;;;;;; "calc/calc-mode.el" "calc/calc-mtx.el" "calc/calc-nlfit.el"
+;;;;;; "calc/calc-poly.el" "calc/calc-prog.el" "calc/calc-rewr.el"
+;;;;;; "calc/calc-rules.el" "calc/calc-sel.el" "calc/calc-stat.el"
+;;;;;; "calc/calc-store.el" "calc/calc-stuff.el" "calc/calc-trail.el"
+;;;;;; "calc/calc-units.el" "calc/calc-vec.el" "calc/calc-yank.el"
+;;;;;; "calc/calcalg2.el" "calc/calcalg3.el" "calc/calccomp.el"
+;;;;;; "calc/calcsel2.el" "calendar/cal-bahai.el" "calendar/cal-coptic.el"
+;;;;;; "calendar/cal-french.el" "calendar/cal-html.el" "calendar/cal-islam.el"
+;;;;;; "calendar/cal-iso.el" "calendar/cal-julian.el" "calendar/cal-loaddefs.el"
+;;;;;; "calendar/cal-mayan.el" "calendar/cal-menu.el" "calendar/cal-move.el"
+;;;;;; "calendar/cal-persia.el" "calendar/cal-tex.el" "calendar/cal-x.el"
+;;;;;; "calendar/diary-loaddefs.el" "calendar/hol-loaddefs.el" "cdl.el"
+;;;;;; "cedet/cedet-cscope.el" "cedet/cedet-files.el" "cedet/cedet-global.el"
+;;;;;; "cedet/cedet-idutils.el" "cedet/cedet.el" "cedet/ede/auto.el"
+;;;;;; "cedet/ede/autoconf-edit.el" "cedet/ede/base.el" "cedet/ede/cpp-root.el"
+;;;;;; "cedet/ede/custom.el" "cedet/ede/dired.el" "cedet/ede/emacs.el"
+;;;;;; "cedet/ede/files.el" "cedet/ede/generic.el" "cedet/ede/linux.el"
+;;;;;; "cedet/ede/loaddefs.el" "cedet/ede/locate.el" "cedet/ede/make.el"
+;;;;;; "cedet/ede/makefile-edit.el" "cedet/ede/pconf.el" "cedet/ede/pmake.el"
+;;;;;; "cedet/ede/proj-archive.el" "cedet/ede/proj-aux.el" "cedet/ede/proj-comp.el"
+;;;;;; "cedet/ede/proj-elisp.el" "cedet/ede/proj-info.el" "cedet/ede/proj-misc.el"
+;;;;;; "cedet/ede/proj-obj.el" "cedet/ede/proj-prog.el" "cedet/ede/proj-scheme.el"
+;;;;;; "cedet/ede/proj-shared.el" "cedet/ede/proj.el" "cedet/ede/project-am.el"
+;;;;;; "cedet/ede/shell.el" "cedet/ede/simple.el" "cedet/ede/source.el"
+;;;;;; "cedet/ede/speedbar.el" "cedet/ede/srecode.el" "cedet/ede/system.el"
+;;;;;; "cedet/ede/util.el" "cedet/inversion.el" "cedet/pulse.el"
+;;;;;; "cedet/semantic/analyze.el" "cedet/semantic/analyze/complete.el"
+;;;;;; "cedet/semantic/analyze/debug.el" "cedet/semantic/analyze/fcn.el"
+;;;;;; "cedet/semantic/analyze/refs.el" "cedet/semantic/bovine.el"
+;;;;;; "cedet/semantic/bovine/c-by.el" "cedet/semantic/bovine/c.el"
+;;;;;; "cedet/semantic/bovine/debug.el" "cedet/semantic/bovine/el.el"
+;;;;;; "cedet/semantic/bovine/gcc.el" "cedet/semantic/bovine/make-by.el"
+;;;;;; "cedet/semantic/bovine/make.el" "cedet/semantic/bovine/scm-by.el"
+;;;;;; "cedet/semantic/bovine/scm.el" "cedet/semantic/chart.el"
+;;;;;; "cedet/semantic/complete.el" "cedet/semantic/ctxt.el" "cedet/semantic/db-debug.el"
+;;;;;; "cedet/semantic/db-ebrowse.el" "cedet/semantic/db-el.el"
+;;;;;; "cedet/semantic/db-file.el" "cedet/semantic/db-find.el" "cedet/semantic/db-global.el"
+;;;;;; "cedet/semantic/db-javascript.el" "cedet/semantic/db-mode.el"
+;;;;;; "cedet/semantic/db-ref.el" "cedet/semantic/db-typecache.el"
;;;;;; "cedet/semantic/db.el" "cedet/semantic/debug.el" "cedet/semantic/decorate.el"
;;;;;; "cedet/semantic/decorate/include.el" "cedet/semantic/decorate/mode.el"
;;;;;; "cedet/semantic/dep.el" "cedet/semantic/doc.el" "cedet/semantic/ede-grammar.el"
@@ -33601,13 +33279,13 @@ Zone out, completely.
;;;;;; "cedet/semantic/fw.el" "cedet/semantic/grammar-wy.el" "cedet/semantic/grammar.el"
;;;;;; "cedet/semantic/html.el" "cedet/semantic/ia-sb.el" "cedet/semantic/ia.el"
;;;;;; "cedet/semantic/idle.el" "cedet/semantic/imenu.el" "cedet/semantic/java.el"
-;;;;;; "cedet/semantic/lex-spp.el" "cedet/semantic/lex.el" "cedet/semantic/mru-bookmark.el"
-;;;;;; "cedet/semantic/sb.el" "cedet/semantic/scope.el" "cedet/semantic/senator.el"
-;;;;;; "cedet/semantic/sort.el" "cedet/semantic/symref.el" "cedet/semantic/symref/cscope.el"
-;;;;;; "cedet/semantic/symref/filter.el" "cedet/semantic/symref/global.el"
-;;;;;; "cedet/semantic/symref/grep.el" "cedet/semantic/symref/idutils.el"
-;;;;;; "cedet/semantic/symref/list.el" "cedet/semantic/tag-file.el"
-;;;;;; "cedet/semantic/tag-ls.el" "cedet/semantic/tag-write.el"
+;;;;;; "cedet/semantic/lex-spp.el" "cedet/semantic/lex.el" "cedet/semantic/loaddefs.el"
+;;;;;; "cedet/semantic/mru-bookmark.el" "cedet/semantic/sb.el" "cedet/semantic/scope.el"
+;;;;;; "cedet/semantic/senator.el" "cedet/semantic/sort.el" "cedet/semantic/symref.el"
+;;;;;; "cedet/semantic/symref/cscope.el" "cedet/semantic/symref/filter.el"
+;;;;;; "cedet/semantic/symref/global.el" "cedet/semantic/symref/grep.el"
+;;;;;; "cedet/semantic/symref/idutils.el" "cedet/semantic/symref/list.el"
+;;;;;; "cedet/semantic/tag-file.el" "cedet/semantic/tag-ls.el" "cedet/semantic/tag-write.el"
;;;;;; "cedet/semantic/tag.el" "cedet/semantic/texi.el" "cedet/semantic/util-modes.el"
;;;;;; "cedet/semantic/util.el" "cedet/semantic/wisent.el" "cedet/semantic/wisent/comp.el"
;;;;;; "cedet/semantic/wisent/java-tags.el" "cedet/semantic/wisent/javascript.el"
@@ -33619,14 +33297,14 @@ Zone out, completely.
;;;;;; "cedet/srecode/el.el" "cedet/srecode/expandproto.el" "cedet/srecode/extract.el"
;;;;;; "cedet/srecode/fields.el" "cedet/srecode/filters.el" "cedet/srecode/find.el"
;;;;;; "cedet/srecode/getset.el" "cedet/srecode/insert.el" "cedet/srecode/java.el"
-;;;;;; "cedet/srecode/map.el" "cedet/srecode/mode.el" "cedet/srecode/semantic.el"
-;;;;;; "cedet/srecode/srt-wy.el" "cedet/srecode/srt.el" "cedet/srecode/table.el"
-;;;;;; "cedet/srecode/template.el" "cedet/srecode/texi.el" "cus-dep.el"
-;;;;;; "dframe.el" "dired-aux.el" "dired-x.el" "dos-fns.el" "dos-vars.el"
-;;;;;; "dos-w32.el" "dynamic-setting.el" "emacs-lisp/assoc.el" "emacs-lisp/authors.el"
-;;;;;; "emacs-lisp/avl-tree.el" "emacs-lisp/bindat.el" "emacs-lisp/byte-opt.el"
-;;;;;; "emacs-lisp/chart.el" "emacs-lisp/cl-extra.el" "emacs-lisp/cl-loaddefs.el"
-;;;;;; "emacs-lisp/cl-macs.el" "emacs-lisp/cl-seq.el" "emacs-lisp/cl-specs.el"
+;;;;;; "cedet/srecode/loaddefs.el" "cedet/srecode/map.el" "cedet/srecode/mode.el"
+;;;;;; "cedet/srecode/semantic.el" "cedet/srecode/srt-wy.el" "cedet/srecode/srt.el"
+;;;;;; "cedet/srecode/table.el" "cedet/srecode/template.el" "cedet/srecode/texi.el"
+;;;;;; "cus-dep.el" "cus-load.el" "dframe.el" "dired-aux.el" "dired-x.el"
+;;;;;; "dos-fns.el" "dos-vars.el" "dos-w32.el" "dynamic-setting.el"
+;;;;;; "emacs-lisp/authors.el" "emacs-lisp/avl-tree.el" "emacs-lisp/bindat.el"
+;;;;;; "emacs-lisp/byte-opt.el" "emacs-lisp/chart.el" "emacs-lisp/cl-extra.el"
+;;;;;; "emacs-lisp/cl-loaddefs.el" "emacs-lisp/cl-macs.el" "emacs-lisp/cl-seq.el"
;;;;;; "emacs-lisp/cust-print.el" "emacs-lisp/eieio-base.el" "emacs-lisp/eieio-custom.el"
;;;;;; "emacs-lisp/eieio-datadebug.el" "emacs-lisp/eieio-opt.el"
;;;;;; "emacs-lisp/eieio-speedbar.el" "emacs-lisp/eieio.el" "emacs-lisp/find-gc.el"
@@ -33644,32 +33322,33 @@ Zone out, completely.
;;;;;; "eshell/em-pred.el" "eshell/em-prompt.el" "eshell/em-rebind.el"
;;;;;; "eshell/em-script.el" "eshell/em-smart.el" "eshell/em-term.el"
;;;;;; "eshell/em-unix.el" "eshell/em-xtra.el" "eshell/esh-arg.el"
-;;;;;; "eshell/esh-cmd.el" "eshell/esh-ext.el" "eshell/esh-io.el"
-;;;;;; "eshell/esh-module.el" "eshell/esh-opt.el" "eshell/esh-proc.el"
-;;;;;; "eshell/esh-util.el" "eshell/esh-var.el" "ezimage.el" "foldout.el"
-;;;;;; "format-spec.el" "forms-d2.el" "forms-pass.el" "fringe.el"
-;;;;;; "generic-x.el" "gnus/compface.el" "gnus/gnus-async.el" "gnus/gnus-bcklg.el"
-;;;;;; "gnus/gnus-cite.el" "gnus/gnus-cus.el" "gnus/gnus-demon.el"
-;;;;;; "gnus/gnus-dup.el" "gnus/gnus-eform.el" "gnus/gnus-ems.el"
-;;;;;; "gnus/gnus-int.el" "gnus/gnus-logic.el" "gnus/gnus-mh.el"
-;;;;;; "gnus/gnus-salt.el" "gnus/gnus-score.el" "gnus/gnus-setup.el"
-;;;;;; "gnus/gnus-srvr.el" "gnus/gnus-topic.el" "gnus/gnus-undo.el"
-;;;;;; "gnus/gnus-util.el" "gnus/gnus-uu.el" "gnus/gnus-vm.el" "gnus/gssapi.el"
-;;;;;; "gnus/ietf-drums.el" "gnus/legacy-gnus-agent.el" "gnus/mail-parse.el"
-;;;;;; "gnus/mail-prsvr.el" "gnus/mail-source.el" "gnus/mailcap.el"
-;;;;;; "gnus/messcompat.el" "gnus/mm-bodies.el" "gnus/mm-decode.el"
-;;;;;; "gnus/mm-util.el" "gnus/mm-view.el" "gnus/mml-sec.el" "gnus/mml-smime.el"
-;;;;;; "gnus/nnagent.el" "gnus/nnbabyl.el" "gnus/nndir.el" "gnus/nndraft.el"
-;;;;;; "gnus/nneething.el" "gnus/nngateway.el" "gnus/nnheader.el"
-;;;;;; "gnus/nnimap.el" "gnus/nnir.el" "gnus/nnmail.el" "gnus/nnmaildir.el"
-;;;;;; "gnus/nnmairix.el" "gnus/nnmbox.el" "gnus/nnmh.el" "gnus/nnnil.el"
-;;;;;; "gnus/nnoo.el" "gnus/nnregistry.el" "gnus/nnrss.el" "gnus/nnspool.el"
-;;;;;; "gnus/nntp.el" "gnus/nnvirtual.el" "gnus/nnweb.el" "gnus/registry.el"
-;;;;;; "gnus/rfc1843.el" "gnus/rfc2045.el" "gnus/rfc2047.el" "gnus/rfc2104.el"
-;;;;;; "gnus/rfc2231.el" "gnus/rtree.el" "gnus/shr-color.el" "gnus/sieve-manage.el"
-;;;;;; "gnus/smime.el" "gnus/spam-stat.el" "gnus/spam-wash.el" "hex-util.el"
-;;;;;; "hfy-cmap.el" "ibuf-ext.el" "international/cp51932.el" "international/eucjp-ms.el"
-;;;;;; "international/fontset.el" "international/iso-ascii.el" "international/ja-dic-cnv.el"
+;;;;;; "eshell/esh-cmd.el" "eshell/esh-ext.el" "eshell/esh-groups.el"
+;;;;;; "eshell/esh-io.el" "eshell/esh-module.el" "eshell/esh-opt.el"
+;;;;;; "eshell/esh-proc.el" "eshell/esh-util.el" "eshell/esh-var.el"
+;;;;;; "ezimage.el" "finder-inf.el" "foldout.el" "format-spec.el"
+;;;;;; "fringe.el" "generic-x.el" "gnus/compface.el" "gnus/gnus-async.el"
+;;;;;; "gnus/gnus-bcklg.el" "gnus/gnus-cite.el" "gnus/gnus-cus.el"
+;;;;;; "gnus/gnus-demon.el" "gnus/gnus-dup.el" "gnus/gnus-eform.el"
+;;;;;; "gnus/gnus-ems.el" "gnus/gnus-int.el" "gnus/gnus-logic.el"
+;;;;;; "gnus/gnus-mh.el" "gnus/gnus-salt.el" "gnus/gnus-score.el"
+;;;;;; "gnus/gnus-setup.el" "gnus/gnus-srvr.el" "gnus/gnus-topic.el"
+;;;;;; "gnus/gnus-undo.el" "gnus/gnus-util.el" "gnus/gnus-uu.el"
+;;;;;; "gnus/gnus-vm.el" "gnus/gssapi.el" "gnus/ietf-drums.el" "gnus/legacy-gnus-agent.el"
+;;;;;; "gnus/mail-parse.el" "gnus/mail-prsvr.el" "gnus/mail-source.el"
+;;;;;; "gnus/mailcap.el" "gnus/messcompat.el" "gnus/mm-bodies.el"
+;;;;;; "gnus/mm-decode.el" "gnus/mm-util.el" "gnus/mm-view.el" "gnus/mml-sec.el"
+;;;;;; "gnus/mml-smime.el" "gnus/nnagent.el" "gnus/nnbabyl.el" "gnus/nndir.el"
+;;;;;; "gnus/nndraft.el" "gnus/nneething.el" "gnus/nngateway.el"
+;;;;;; "gnus/nnheader.el" "gnus/nnimap.el" "gnus/nnir.el" "gnus/nnmail.el"
+;;;;;; "gnus/nnmaildir.el" "gnus/nnmairix.el" "gnus/nnmbox.el" "gnus/nnmh.el"
+;;;;;; "gnus/nnnil.el" "gnus/nnoo.el" "gnus/nnregistry.el" "gnus/nnrss.el"
+;;;;;; "gnus/nnspool.el" "gnus/nntp.el" "gnus/nnvirtual.el" "gnus/nnweb.el"
+;;;;;; "gnus/registry.el" "gnus/rfc1843.el" "gnus/rfc2045.el" "gnus/rfc2047.el"
+;;;;;; "gnus/rfc2104.el" "gnus/rfc2231.el" "gnus/rtree.el" "gnus/shr-color.el"
+;;;;;; "gnus/sieve-manage.el" "gnus/smime.el" "gnus/spam-stat.el"
+;;;;;; "gnus/spam-wash.el" "hex-util.el" "hfy-cmap.el" "ibuf-ext.el"
+;;;;;; "international/cp51932.el" "international/eucjp-ms.el" "international/fontset.el"
+;;;;;; "international/iso-ascii.el" "international/ja-dic-cnv.el"
;;;;;; "international/ja-dic-utl.el" "international/ogonek.el" "international/uni-bidi.el"
;;;;;; "international/uni-category.el" "international/uni-combining.el"
;;;;;; "international/uni-comment.el" "international/uni-decimal.el"
@@ -33679,14 +33358,13 @@ Zone out, completely.
;;;;;; "international/uni-old-name.el" "international/uni-titlecase.el"
;;;;;; "international/uni-uppercase.el" "json.el" "kermit.el" "language/hanja-util.el"
;;;;;; "language/thai-word.el" "ldefs-boot.el" "loadup.el" "mail/blessmail.el"
-;;;;;; "mail/mailheader.el" "mail/mailpost.el" "mail/mspools.el"
-;;;;;; "mail/rfc2368.el" "mail/rfc822.el" "mail/rmail-spam-filter.el"
-;;;;;; "mail/rmailedit.el" "mail/rmailkwd.el" "mail/rmailmm.el"
-;;;;;; "mail/rmailmsc.el" "mail/rmailsort.el" "mail/rmailsum.el"
-;;;;;; "mail/undigest.el" "md4.el" "mh-e/mh-acros.el" "mh-e/mh-alias.el"
-;;;;;; "mh-e/mh-buffers.el" "mh-e/mh-compat.el" "mh-e/mh-funcs.el"
-;;;;;; "mh-e/mh-gnus.el" "mh-e/mh-identity.el" "mh-e/mh-inc.el"
-;;;;;; "mh-e/mh-junk.el" "mh-e/mh-letter.el" "mh-e/mh-limit.el"
+;;;;;; "mail/mailheader.el" "mail/mspools.el" "mail/rfc2368.el"
+;;;;;; "mail/rfc822.el" "mail/rmail-spam-filter.el" "mail/rmailedit.el"
+;;;;;; "mail/rmailkwd.el" "mail/rmailmm.el" "mail/rmailmsc.el" "mail/rmailsort.el"
+;;;;;; "mail/rmailsum.el" "mail/undigest.el" "md4.el" "mh-e/mh-acros.el"
+;;;;;; "mh-e/mh-alias.el" "mh-e/mh-buffers.el" "mh-e/mh-compat.el"
+;;;;;; "mh-e/mh-funcs.el" "mh-e/mh-gnus.el" "mh-e/mh-identity.el"
+;;;;;; "mh-e/mh-inc.el" "mh-e/mh-junk.el" "mh-e/mh-letter.el" "mh-e/mh-limit.el"
;;;;;; "mh-e/mh-loaddefs.el" "mh-e/mh-mime.el" "mh-e/mh-print.el"
;;;;;; "mh-e/mh-scan.el" "mh-e/mh-search.el" "mh-e/mh-seq.el" "mh-e/mh-show.el"
;;;;;; "mh-e/mh-speed.el" "mh-e/mh-thread.el" "mh-e/mh-tool-bar.el"
@@ -33726,30 +33404,30 @@ Zone out, completely.
;;;;;; "org/org-mew.el" "org/org-mhe.el" "org/org-mks.el" "org/org-mouse.el"
;;;;;; "org/org-pcomplete.el" "org/org-protocol.el" "org/org-rmail.el"
;;;;;; "org/org-special-blocks.el" "org/org-src.el" "org/org-vm.el"
-;;;;;; "org/org-w3m.el" "org/org-wl.el" "patcomp.el" "play/gamegrid.el"
-;;;;;; "play/gametree.el" "play/meese.el" "progmodes/ada-prj.el"
-;;;;;; "progmodes/cc-align.el" "progmodes/cc-awk.el" "progmodes/cc-bytecomp.el"
-;;;;;; "progmodes/cc-cmds.el" "progmodes/cc-defs.el" "progmodes/cc-fonts.el"
-;;;;;; "progmodes/cc-langs.el" "progmodes/cc-menus.el" "progmodes/ebnf-abn.el"
-;;;;;; "progmodes/ebnf-bnf.el" "progmodes/ebnf-dtd.el" "progmodes/ebnf-ebx.el"
-;;;;;; "progmodes/ebnf-iso.el" "progmodes/ebnf-otz.el" "progmodes/ebnf-yac.el"
-;;;;;; "progmodes/idlw-complete-structtag.el" "progmodes/idlw-help.el"
-;;;;;; "progmodes/idlw-toolbar.el" "progmodes/mantemp.el" "progmodes/xscheme.el"
-;;;;;; "ps-def.el" "ps-mule.el" "ps-samp.el" "saveplace.el" "sb-image.el"
-;;;;;; "scroll-bar.el" "select.el" "soundex.el" "subdirs.el" "tempo.el"
-;;;;;; "textmodes/bib-mode.el" "textmodes/makeinfo.el" "textmodes/page-ext.el"
-;;;;;; "textmodes/refbib.el" "textmodes/refer.el" "textmodes/reftex-auc.el"
-;;;;;; "textmodes/reftex-dcr.el" "textmodes/reftex-ref.el" "textmodes/reftex-sel.el"
-;;;;;; "textmodes/reftex-toc.el" "textmodes/texnfo-upd.el" "timezone.el"
-;;;;;; "tooltip.el" "tree-widget.el" "uniquify.el" "url/url-about.el"
-;;;;;; "url/url-cookie.el" "url/url-dired.el" "url/url-expand.el"
-;;;;;; "url/url-ftp.el" "url/url-future.el" "url/url-history.el"
-;;;;;; "url/url-imap.el" "url/url-methods.el" "url/url-nfs.el" "url/url-proxy.el"
+;;;;;; "org/org-w3m.el" "org/org-wl.el" "play/gamegrid.el" "play/gametree.el"
+;;;;;; "play/meese.el" "progmodes/ada-prj.el" "progmodes/cc-align.el"
+;;;;;; "progmodes/cc-awk.el" "progmodes/cc-bytecomp.el" "progmodes/cc-cmds.el"
+;;;;;; "progmodes/cc-defs.el" "progmodes/cc-fonts.el" "progmodes/cc-langs.el"
+;;;;;; "progmodes/cc-menus.el" "progmodes/ebnf-abn.el" "progmodes/ebnf-bnf.el"
+;;;;;; "progmodes/ebnf-dtd.el" "progmodes/ebnf-ebx.el" "progmodes/ebnf-iso.el"
+;;;;;; "progmodes/ebnf-otz.el" "progmodes/ebnf-yac.el" "progmodes/idlw-complete-structtag.el"
+;;;;;; "progmodes/idlw-help.el" "progmodes/idlw-toolbar.el" "progmodes/mantemp.el"
+;;;;;; "progmodes/xscheme.el" "ps-def.el" "ps-mule.el" "ps-samp.el"
+;;;;;; "saveplace.el" "sb-image.el" "scroll-bar.el" "select.el"
+;;;;;; "soundex.el" "subdirs.el" "tempo.el" "textmodes/bib-mode.el"
+;;;;;; "textmodes/makeinfo.el" "textmodes/page-ext.el" "textmodes/refbib.el"
+;;;;;; "textmodes/refer.el" "textmodes/reftex-auc.el" "textmodes/reftex-dcr.el"
+;;;;;; "textmodes/reftex-ref.el" "textmodes/reftex-sel.el" "textmodes/reftex-toc.el"
+;;;;;; "textmodes/texnfo-upd.el" "timezone.el" "tooltip.el" "tree-widget.el"
+;;;;;; "uniquify.el" "url/url-about.el" "url/url-cookie.el" "url/url-dired.el"
+;;;;;; "url/url-domsuf.el" "url/url-expand.el" "url/url-ftp.el"
+;;;;;; "url/url-future.el" "url/url-history.el" "url/url-imap.el"
+;;;;;; "url/url-methods.el" "url/url-nfs.el" "url/url-proxy.el"
;;;;;; "url/url-vars.el" "vc/ediff-diff.el" "vc/ediff-init.el" "vc/ediff-merg.el"
;;;;;; "vc/ediff-ptch.el" "vc/ediff-vers.el" "vc/ediff-wind.el"
;;;;;; "vc/pcvs-info.el" "vc/pcvs-parse.el" "vc/pcvs-util.el" "vc/vc-dav.el"
;;;;;; "vcursor.el" "vt-control.el" "vt100-led.el" "w32-fns.el"
-;;;;;; "w32-vars.el" "x-dnd.el") (20345 10919 58375))
+;;;;;; "w32-vars.el" "x-dnd.el") (20405 43528 205053))
;;;***
diff --git a/lisp/loadhist.el b/lisp/loadhist.el
index d747eb13b79..d5099340a17 100644
--- a/lisp/loadhist.el
+++ b/lisp/loadhist.el
@@ -143,13 +143,13 @@ These are symbols with hooklike values whose names don't end in
`-hook' or `-hooks', from which `unload-feature' should try to remove
pertinent symbols.")
+(define-obsolete-variable-alias 'unload-hook-features-list
+ 'unload-function-defs-list "22.2")
(defvar unload-function-defs-list nil
"List of definitions in the Lisp library being unloaded.
This is meant to be used by `FEATURE-unload-function'; see the
documentation of `unload-feature' for details.")
-(define-obsolete-variable-alias 'unload-hook-features-list
- 'unload-function-defs-list "22.2")
(defun unload--set-major-mode ()
(save-current-buffer
diff --git a/lisp/loadup.el b/lisp/loadup.el
index f7ffa27a9ed..ab3b107e56c 100644
--- a/lisp/loadup.el
+++ b/lisp/loadup.el
@@ -186,8 +186,10 @@
(load "emacs-lisp/lisp-mode")
(load "textmodes/text-mode")
(load "textmodes/fill")
+(load "newcomment")
(load "replace")
+(load "emacs-lisp/tabulated-list")
(load "buff-menu")
(if (fboundp 'x-create-frame)
diff --git a/lisp/mail/emacsbug.el b/lisp/mail/emacsbug.el
index 33b73335a7d..e9ff36a677e 100644
--- a/lisp/mail/emacsbug.el
+++ b/lisp/mail/emacsbug.el
@@ -316,7 +316,7 @@ usually do not have translators for other languages.\n\n")))
(fill-region (line-beginning-position 0) (point))
;; This is so the user has to type something in order to send easily.
(use-local-map (nconc (make-sparse-keymap) (current-local-map)))
- (define-key (current-local-map) "\C-c\C-i" 'report-emacs-bug-info)
+ (define-key (current-local-map) "\C-c\C-i" 'info-emacs-bug)
(if can-insert-mail
(define-key (current-local-map) "\C-cm"
'report-emacs-bug-insert-to-mailer))
@@ -339,7 +339,7 @@ usually do not have translators for other languages.\n\n")))
" Type \\[report-emacs-bug-insert-to-mailer] to copy text to your preferred mail program.\n")))
(terpri)
(princ (substitute-command-keys
- " Type \\[report-emacs-bug-info] to visit in Info the Emacs Manual section
+ " Type \\[info-emacs-bug] to visit in Info the Emacs Manual section
about when and how to write a bug report, and what
information you should include to help fix the bug.")))
(shrink-window-if-larger-than-buffer (get-buffer-window "*Bug Help*")))
@@ -353,10 +353,7 @@ usually do not have translators for other languages.\n\n")))
(buffer-substring-no-properties (point-min) (point)))
(goto-char user-point)))
-(defun report-emacs-bug-info ()
- "Go to the Info node on reporting Emacs bugs."
- (interactive)
- (info "(emacs)Bugs"))
+(define-obsolete-function-alias 'report-emacs-bug-info 'info-emacs-bug "24.2")
;; It's the default mail mode, so it seems OK to use its features.
(autoload 'message-bogus-recipient-p "message")
diff --git a/lisp/mail/feedmail.el b/lisp/mail/feedmail.el
index f35560841e2..df18abbc532 100644
--- a/lisp/mail/feedmail.el
+++ b/lisp/mail/feedmail.el
@@ -1366,17 +1366,19 @@ call to `feedmail-run-the-queue'."
(feedmail-say-debug ">in-> feedmail-mail-send-hook-splitter %s" feedmail-queue-runner-is-active)
(if feedmail-queue-runner-is-active
(run-hooks 'feedmail-mail-send-hook-queued)
- (run-hooks 'feedmail-mail-send-hook))
- )
-
-
-(defvar feedmail-mail-send-hook nil
- "See documentation for `feedmail-mail-send-hook-splitter'.")
+ (run-hooks 'feedmail-mail-send-hook)))
+(defcustom feedmail-mail-send-hook nil
+ "Hook run by `feedmail-mail-send-hook-splitter' for immediate mail.
+See documentation of `feedmail-mail-send-hook-splitter' for details."
+ :type 'hook
+ :group 'feedmail)
-(defvar feedmail-mail-send-hook-queued nil
- "See documentation for `feedmail-mail-send-hook-splitter'.")
-
+(defcustom feedmail-mail-send-hook-queued nil
+ "Hook run by `feedmail-mail-send-hook-splitter' for queued mail.
+See documentation of `feedmail-mail-send-hook-splitter' for details."
+ :type 'hook
+ :group 'feedmail)
(defun feedmail-confirm-addresses-hook-example ()
"An example of a `feedmail-last-chance-hook'.
@@ -1387,9 +1389,7 @@ It shows the simple addresses and gets a confirmation. Use as:
(erase-buffer)
(insert (mapconcat 'identity feedmail-address-list " "))
(if (not (y-or-n-p "How do you like them apples? "))
- (error "FQM: Sending...gave up in last chance hook")
- )))
-
+ (error "FQM: Sending...gave up in last chance hook"))))
(defcustom feedmail-last-chance-hook nil
"User's last opportunity to modify the message on its way out.
@@ -2027,12 +2027,6 @@ backup file names and the like)."
(if (looking-at ".*\r\n.*\r\n")
(while (search-forward "\r\n" nil t)
(replace-match "\n" nil t)))
-;; ;; work around text-vs-binary weirdness
-;; ;; if we don't find the normal M-H-S, try reading the file a different way
-;; (if (not (feedmail-find-eoh t))
-;; (let ((file-name-buffer-file-type-alist nil) (default-buffer-file-type nil))
-;; (erase-buffer)
-;; (insert-file-contents maybe-file)))
(funcall feedmail-queue-runner-mode-setter arg)
(condition-case signal-stuff ; don't give up the loop if user skips some
(let ((feedmail-enable-queue nil)
diff --git a/lisp/mail/footnote.el b/lisp/mail/footnote.el
index c0a63ef197c..f0c6b21513e 100644
--- a/lisp/mail/footnote.el
+++ b/lisp/mail/footnote.el
@@ -126,10 +126,12 @@ has no effect on buffers already displaying footnotes."
:type 'string
:group 'footnote)
-(defvar footnote-signature-separator (if (boundp 'message-signature-separator)
- message-signature-separator
- "^-- $")
- "String used to recognize .signatures.")
+(defcustom footnote-signature-separator (if (boundp 'message-signature-separator)
+ message-signature-separator
+ "^-- $")
+ "Regexp used by Footnote mode to recognize signatures."
+ :type 'regexp
+ :group 'footnote)
;;; Private variables
diff --git a/lisp/mail/mailabbrev.el b/lisp/mail/mailabbrev.el
index fb8e1502f91..290c57c1c55 100644
--- a/lisp/mail/mailabbrev.el
+++ b/lisp/mail/mailabbrev.el
@@ -254,10 +254,12 @@ By default this is the file specified by `mail-personal-alias-file'."
mail-abbrevs)
(message "Parsing %s... done" file))
-(defvar mail-alias-separator-string ", "
- "A string inserted between addresses in multi-address mail aliases.
+(defcustom mail-alias-separator-string ", "
+ "String inserted between addresses in multi-address mail aliases.
This has to contain a comma, so \", \" is a reasonable value. You might
-also want something like \",\\n \" to get each address on its own line.")
+also want something like \",\\n \" to get each address on its own line."
+ :type 'string
+ :group 'mail-abbrev)
;; define-mail-abbrev sets this flag, which causes mail-resolve-all-aliases
;; to be called before expanding abbrevs if it's necessary.
@@ -421,14 +423,16 @@ fill-column, break the line at the previous comma, and indent the next line."
;;; Syntax tables and abbrev-expansion
-(defvar mail-abbrev-mode-regexp
+(defcustom mail-abbrev-mode-regexp
"^\\(Resent-\\)?\\(To\\|From\\|CC\\|BCC\\|Reply-to\\):"
- "Regexp to select mail-headers in which mail abbrevs should be expanded.
+ "Regexp matching mail headers in which mail abbrevs should be expanded.
This string will be handed to `looking-at' with point at the beginning
of the current line; if it matches, abbrev mode will be turned on, otherwise
it will be turned off. (You don't need to worry about continuation lines.)
This should be set to match those mail fields in which you want abbreviations
-turned on.")
+turned on."
+ :type 'regexp
+ :group 'mail-abbrev)
(defvar mail-abbrev-syntax-table nil
"The syntax-table used for abbrev-expansion purposes.
diff --git a/lisp/mail/rmail.el b/lisp/mail/rmail.el
index d2b9890805c..cd2a961638e 100644
--- a/lisp/mail/rmail.el
+++ b/lisp/mail/rmail.el
@@ -100,8 +100,6 @@ its character representation and its display representation.")
"The current header display style choice, one of
'normal (selected headers) or 'full (all headers).")
-;; rmail-spool-directory and rmail-file-name are defined in paths.el.
-
(defgroup rmail nil
"Mail reader for Emacs."
:group 'mail)
@@ -143,6 +141,40 @@ its character representation and its display representation.")
:prefix "rmail-edit-"
:group 'rmail)
+;;;###autoload
+(defcustom rmail-file-name (purecopy "~/RMAIL")
+ "Name of user's primary mail file."
+ :type 'string
+ :group 'rmail
+ :version "21.1")
+
+;;;###autoload
+(put 'rmail-spool-directory 'standard-value
+ '((cond ((file-exists-p "/var/mail") "/var/mail/")
+ ((file-exists-p "/var/spool/mail") "/var/spool/mail/")
+ ((memq system-type '(hpux usg-unix-v irix)) "/usr/mail/")
+ (t "/usr/spool/mail/"))))
+
+;;;###autoload
+(defcustom rmail-spool-directory
+ (purecopy
+ (cond ((file-exists-p "/var/mail")
+ ;; SVR4 and recent BSD are said to use this.
+ ;; Rather than trying to know precisely which systems use it,
+ ;; let's assume this dir is never used for anything else.
+ "/var/mail/")
+ ;; Many GNU/Linux systems use this name.
+ ((file-exists-p "/var/spool/mail") "/var/spool/mail/")
+ ((memq system-type '(hpux usg-unix-v irix)) "/usr/mail/")
+ (t "/usr/spool/mail/")))
+ "Name of directory used by system mailer for delivering new mail.
+Its name should end with a slash."
+ :initialize 'custom-initialize-delay
+ :type 'directory
+ :group 'rmail)
+
+;;;###autoload(custom-initialize-delay 'rmail-spool-directory nil)
+
(defcustom rmail-movemail-program nil
"If non-nil, the file name of the `movemail' program."
:group 'rmail-retrieve
@@ -713,19 +745,6 @@ to an appropriate value, and optionally also set
`rmail-insert-mime-forwarded-message-function', and
`rmail-insert-mime-resent-message-function'.")
-;; FIXME this is unused since 23.1.
-(defvar rmail-decode-mime-charset t
- "Non-nil means a message is decoded by MIME's charset specification.
-If this variable is nil, or the message has not MIME specification,
-the message is decoded as normal way.
-
-If the variable `rmail-enable-mime' is non-nil, this variable is
-ignored, and all the decoding work is done by a feature specified by
-the variable `rmail-mime-feature'.")
-
-(make-obsolete-variable 'rmail-decode-mime-charset
- "it does nothing." "23.1")
-
(defvar rmail-mime-charset-pattern
(concat "^content-type:[ \t]*text/plain;"
"\\(?:[ \t\n]*\\(?:format\\|delsp\\)=\"?[-a-z0-9]+\"?;\\)*"
@@ -3570,8 +3589,17 @@ If BUFFER is not swapped, yank out of its message viewer buffer."
(with-current-buffer buffer
(unless (rmail-buffers-swapped-p)
(setq buffer rmail-view-buffer)))
- (insert-buffer buffer))
-
+ (insert-buffer buffer)
+ ;; If they yank the text of BUFFER, the encoding of BUFFER is a
+ ;; better default for the reply message than the default value of
+ ;; buffer-file-coding-system.
+ (and (coding-system-equal (default-value 'buffer-file-coding-system)
+ buffer-file-coding-system)
+ (setq buffer-file-coding-system
+ (coding-system-change-text-conversion
+ buffer-file-coding-system (coding-system-base
+ (with-current-buffer buffer
+ buffer-file-coding-system))))))
(defun rmail-start-mail (&optional noerase to subject in-reply-to cc
replybuffer sendactions same-window
@@ -4222,10 +4250,13 @@ This has an effect only if a summary buffer exists."
;;; Speedbar support for RMAIL files.
(eval-when-compile (require 'speedbar))
-(defvar rmail-speedbar-match-folder-regexp "^[A-Z0-9]+\\(\\.[A-Z0-9]+\\)?$"
- "This regex is used to match folder names to be displayed in speedbar.
-Enabling this will permit speedbar to display your folders for easy
-browsing, and moving of messages.")
+(defcustom rmail-speedbar-match-folder-regexp "^[A-Z0-9]+\\(\\.[A-Z0-9]+\\)?$"
+ "Regexp matching Rmail folder names to be displayed in Speedbar.
+Enabling this permits Speedbar to display your folders for easy
+browsing, and moving of messages."
+ :type 'regexp
+ :group 'rmail
+ :group 'speedbar)
(defvar rmail-speedbar-last-user nil
"The last user to be displayed in the speedbar.")
@@ -4566,7 +4597,7 @@ With prefix argument N moves forward N messages with these labels.
;;;***
-;;;### (autoloads (rmail-mime) "rmailmm" "rmailmm.el" "be7f4b94a269f840b8707defd515c4f9")
+;;;### (autoloads (rmail-mime) "rmailmm" "rmailmm.el" "cd7656f82944d0b92b0d093a5f3a4c36")
;;; Generated autoloads from rmailmm.el
(autoload 'rmail-mime "rmailmm" "\
diff --git a/lisp/mail/rmailmm.el b/lisp/mail/rmailmm.el
index 9adc5eb9a06..67b2e62275f 100644
--- a/lisp/mail/rmailmm.el
+++ b/lisp/mail/rmailmm.el
@@ -1300,26 +1300,40 @@ The arguments ARG and STATE have no effect in this case."
(rmail-mime-mbox-buffer rmail-buffer)
(rmail-mime-view-buffer rmail-view-buffer)
(rmail-mime-coding-system nil))
+ ;; If ENTITY is not a vector, it is a string describing an error.
(if (vectorp entity)
(with-current-buffer rmail-mime-view-buffer
(erase-buffer)
- (rmail-mime-insert entity)
- (if (consp rmail-mime-coding-system)
- ;; Decoding is done by rfc2047-decode-region only for a
- ;; header. But, as the used coding system may have been
- ;; overridden by mm-charset-override-alist, we can't
- ;; trust (car rmail-mime-coding-system). So, here we
- ;; try the decoding again with mm-charset-override-alist
- ;; bound to nil.
- (let ((mm-charset-override-alist nil))
- (setq rmail-mime-coding-system
- (rmail-mime-find-header-encoding
- (rmail-mime-entity-header entity)))))
- (set-buffer-file-coding-system
- (if rmail-mime-coding-system
- (coding-system-base rmail-mime-coding-system)
- 'undecided)
- t t))
+ ;; This condition-case is for catching an error in the
+ ;; internal MIME decoding (e.g. incorrect BASE64 form) that
+ ;; may be signaled by rmail-mime-insert.
+ ;; FIXME: The current code doesn't set a proper error symbol
+ ;; in ERR. We must find a way to propagate a correct error
+ ;; symbol that is caused in the very deep code of text
+ ;; decoding (e.g. an error by base64-decode-region called by
+ ;; post-read-conversion function of utf-7).
+ (condition-case err
+ (progn
+ (rmail-mime-insert entity)
+ (if (consp rmail-mime-coding-system)
+ ;; Decoding is done by rfc2047-decode-region only for a
+ ;; header. But, as the used coding system may have been
+ ;; overridden by mm-charset-override-alist, we can't
+ ;; trust (car rmail-mime-coding-system). So, here we
+ ;; try the decoding again with mm-charset-override-alist
+ ;; bound to nil.
+ (let ((mm-charset-override-alist nil))
+ (setq rmail-mime-coding-system
+ (rmail-mime-find-header-encoding
+ (rmail-mime-entity-header entity)))))
+ (set-buffer-file-coding-system
+ (if rmail-mime-coding-system
+ (coding-system-base rmail-mime-coding-system)
+ 'undecided)
+ t t))
+ (error (setq entity (format "%s" err))))))
+ ;; Re-check ENTITY. It may be set to an error string.
+ (when (stringp entity)
;; Decoding failed. ENTITY is an error message. Insert the
;; original message body as is, and show warning.
(let ((region (with-current-buffer rmail-mime-mbox-buffer
diff --git a/lisp/mail/smtpmail.el b/lisp/mail/smtpmail.el
index 8e96e2c9438..804fe7a8798 100644
--- a/lisp/mail/smtpmail.el
+++ b/lisp/mail/smtpmail.el
@@ -932,8 +932,7 @@ Returns an error if the server cannot be contacted."
(insert (match-string 0 command) "<omitted>\r\n")
(insert command "\r\n"))
(setq smtpmail-read-point (point))
- (process-send-string process command)
- (process-send-string process "\r\n"))
+ (process-send-string process (concat command "\r\n")))
(defun smtpmail-send-data-1 (process data)
(goto-char (point-max))
diff --git a/lisp/makefile.w32-in b/lisp/makefile.w32-in
index 7907c5f10ce..6cb8b3dd495 100644
--- a/lisp/makefile.w32-in
+++ b/lisp/makefile.w32-in
@@ -1,5 +1,5 @@
# -*- Makefile -*- for GNU Emacs on the Microsoft W32 API.
-# Copyright (C) 2000-2012 Free Software Foundation, Inc.
+# Copyright (C) 2000-2012 Free Software Foundation, Inc.
# This file is part of GNU Emacs.
@@ -243,9 +243,9 @@ update-subdirs-CMD: doit
echo ;; End:>> $(lisp)/subdirs.el
update-subdirs-SH: doit
- $(srcdir)/update-subdirs $(lisp); \
+ $(srcdir)/build-aux/update-subdirs $(lisp); \
for file in $(WINS_SUBDIR); do \
- $(srcdir)/update-subdirs $$file; \
+ $(srcdir)/build-aux/update-subdirs $$file; \
done;
updates: update-subdirs autoloads mh-autoloads finder-data custom-deps
diff --git a/lisp/man.el b/lisp/man.el
index 0a7b831ca8e..ca7df4cd1a4 100644
--- a/lisp/man.el
+++ b/lisp/man.el
@@ -89,7 +89,6 @@
;;; Code:
(eval-when-compile (require 'cl))
-(require 'assoc)
(require 'button)
;; vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
@@ -360,10 +359,10 @@ Otherwise, the value is whatever the function
(make-variable-buffer-local 'Man-arguments)
(put 'Man-arguments 'permanent-local t)
-(defvar Man-sections-alist nil)
-(make-variable-buffer-local 'Man-sections-alist)
-(defvar Man-refpages-alist nil)
-(make-variable-buffer-local 'Man-refpages-alist)
+(defvar Man--sections nil)
+(make-variable-buffer-local 'Man--sections)
+(defvar Man--refpages nil)
+(make-variable-buffer-local 'Man--refpages)
(defvar Man-page-list nil)
(make-variable-buffer-local 'Man-page-list)
(defvar Man-current-page 0)
@@ -1274,8 +1273,8 @@ manpage command."
(if (not Man-page-list)
(let ((args Man-arguments))
(kill-buffer (current-buffer))
- (error "Can't find the %s manpage"
- (Man-page-from-arguments args)))
+ (user-error "Can't find the %s manpage"
+ (Man-page-from-arguments args)))
(set-buffer-modified-p nil))))
;; Restore case-fold-search before calling
;; Man-notify-when-ready because it may switch buffers.
@@ -1370,17 +1369,19 @@ The following key bindings are currently in effect in the buffer:
(run-mode-hooks 'Man-mode-hook))
(defsubst Man-build-section-alist ()
- "Build the association list of manpage sections."
- (setq Man-sections-alist nil)
+ "Build the list of manpage sections."
+ (setq Man--sections nil)
(goto-char (point-min))
(let ((case-fold-search nil))
(while (re-search-forward Man-heading-regexp (point-max) t)
- (aput 'Man-sections-alist (match-string 1))
+ (let ((section (match-string 1)))
+ (unless (member section Man--sections)
+ (push section Man--sections)))
(forward-line 1))))
(defsubst Man-build-references-alist ()
- "Build the association list of references (in the SEE ALSO section)."
- (setq Man-refpages-alist nil)
+ "Build the list of references (in the SEE ALSO section)."
+ (setq Man--refpages nil)
(save-excursion
(if (Man-find-section Man-see-also-regexp)
(let ((start (progn (forward-line 1) (point)))
@@ -1406,10 +1407,11 @@ The following key bindings are currently in effect in the buffer:
len (1- (length word))))
(if (memq (aref word len) '(?- ?­))
(setq hyphenated (substring word 0 len)))
- (if (string-match Man-reference-regexp word)
- (aput 'Man-refpages-alist word))))
+ (and (string-match Man-reference-regexp word)
+ (not (member word Man--refpages))
+ (push word Man--refpages))))
(skip-chars-forward " \t\n,"))))))
- (setq Man-refpages-alist (nreverse Man-refpages-alist)))
+ (setq Man--refpages (nreverse Man--refpages)))
(defun Man-build-page-list ()
"Build the list of separate manpages in the buffer."
@@ -1473,7 +1475,12 @@ The following key bindings are currently in effect in the buffer:
(nindent 0))
(narrow-to-region (car page) (car (cdr page)))
(if Man-uses-untabify-flag
- (untabify (point-min) (point-max)))
+ ;; The space characters inserted by `untabify' inherit
+ ;; sticky text properties, which is unnecessary and looks
+ ;; ugly with underlining (Bug#11408).
+ (let ((text-property-default-nonsticky
+ (cons '(face . t) text-property-default-nonsticky)))
+ (untabify (point-min) (point-max))))
(if (catch 'unindent
(goto-char (point-min))
(if (not (re-search-forward Man-first-heading-regexp nil t))
@@ -1541,21 +1548,22 @@ Returns t if section is found, nil otherwise."
nil)
))
-(defun Man-goto-section ()
- "Query for section to move point to."
- (interactive)
- (aput 'Man-sections-alist
- (let* ((default (aheadsym Man-sections-alist))
- (completion-ignore-case t)
- chosen
- (prompt (concat "Go to section (default " default "): ")))
- (setq chosen (completing-read prompt Man-sections-alist))
- (if (or (not chosen)
- (string= chosen ""))
- default
- chosen)))
- (unless (Man-find-section (aheadsym Man-sections-alist))
- (error "Section not found")))
+(defvar Man--last-section nil)
+
+(defun Man-goto-section (section)
+ "Move point to SECTION."
+ (interactive
+ (let* ((default (if (member Man--last-section Man--sections)
+ Man--last-section
+ (car Man--sections)))
+ (completion-ignore-case t)
+ (prompt (concat "Go to section (default " default "): "))
+ (chosen (completing-read prompt Man--sections
+ nil nil nil nil default)))
+ (list chosen)))
+ (setq Man--last-section section)
+ (unless (Man-find-section section)
+ (error "Section %s not found" section)))
(defun Man-goto-see-also-section ()
@@ -1586,11 +1594,13 @@ as \"tcgetp-grp(3V)\", and point is at \"grp(3V)\", we return
(setq word (current-word))))
word)))
+(defvar Man--last-refpage nil)
+
(defun Man-follow-manual-reference (reference)
"Get one of the manpages referred to in the \"SEE ALSO\" section.
Specify which REFERENCE to use; default is based on word at point."
(interactive
- (if (not Man-refpages-alist)
+ (if (not Man--refpages)
(error "There are no references in the current man page")
(list
(let* ((default (or
@@ -1603,26 +1613,22 @@ Specify which REFERENCE to use; default is based on word at point."
(substring word 0
(match-beginning 0))
word))
- Man-refpages-alist))
- (aheadsym Man-refpages-alist)))
+ Man--refpages))
+ (if (member Man--last-refpage Man--refpages)
+ Man--last-refpage
+ (car Man--refpages))))
(defaults
(mapcar 'substring-no-properties
- (delete-dups
- (delq nil (cons default
- (mapcar 'car Man-refpages-alist))))))
- chosen
- (prompt (concat "Refer to (default " default "): ")))
- (setq chosen (completing-read prompt Man-refpages-alist
- nil nil nil nil defaults))
- (if (or (not chosen)
- (string= chosen ""))
- default
- chosen)))))
- (if (not Man-refpages-alist)
+ (cons default Man--refpages)))
+ (prompt (concat "Refer to (default " default "): "))
+ (chosen (completing-read prompt Man--refpages
+ nil nil nil nil defaults)))
+ chosen))))
+ (if (not Man--refpages)
(error "Can't find any references in the current manpage")
- (aput 'Man-refpages-alist reference)
+ (setq Man--last-refpage reference)
(Man-getpage-in-background
- (Man-translate-references (aheadsym Man-refpages-alist)))))
+ (Man-translate-references reference))))
(defun Man-kill ()
"Kill the buffer containing the manpage."
@@ -1648,7 +1654,7 @@ Specify which REFERENCE to use; default is based on word at point."
(when Man-page-list
(if (or (< page 1)
(> page (length Man-page-list)))
- (error "No manpage %d found" page))
+ (user-error "No manpage %d found" page))
(let* ((page-range (nth (1- page) Man-page-list))
(page-start (car page-range))
(page-end (car (cdr page-range))))
@@ -1741,9 +1747,6 @@ Uses `Man-name-local-regexp'."
;; Init the man package variables, if not already done.
(Man-init-defvars)
-(add-to-list 'debug-ignored-errors "^No manpage [0-9]* found$")
-(add-to-list 'debug-ignored-errors "^Can't find the .* manpage$")
-
(provide 'man)
;;; man.el ends here
diff --git a/lisp/menu-bar.el b/lisp/menu-bar.el
index 1f57601a711..ec6a4621a4e 100644
--- a/lisp/menu-bar.el
+++ b/lisp/menu-bar.el
@@ -1,6 +1,6 @@
;;; menu-bar.el --- define a default menu bar
-;; Copyright (C) 1993-1995, 2000-2012 Free Software Foundation, Inc.
+;; Copyright (C) 1993-1995, 2000-2012 Free Software Foundation, Inc.
;; Author: RMS
;; Maintainer: FSF
@@ -1752,6 +1752,9 @@ key, a click, or a menu-item")))
(define-key menu [send-emacs-bug-report]
`(menu-item ,(purecopy "Send Bug Report...") report-emacs-bug
:help ,(purecopy "Send e-mail to Emacs maintainers")))
+ (define-key menu [emacs-manual-bug]
+ `(menu-item ,(purecopy "How to Report a Bug") info-emacs-bug
+ :help ,(purecopy "Read about how to report an Emacs bug")))
(define-key menu [emacs-known-problems]
`(menu-item ,(purecopy "Emacs Known Problems") view-emacs-problems
:help ,(purecopy "Read about known problems with Emacs")))
diff --git a/lisp/mh-e/ChangeLog b/lisp/mh-e/ChangeLog
index f98b4a7490e..6eedef1980e 100644
--- a/lisp/mh-e/ChangeLog
+++ b/lisp/mh-e/ChangeLog
@@ -1,3 +1,7 @@
+2012-04-25 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * mh-utils.el (minibuffer-completing-file-name): Don't declare, unused.
+
2012-04-21 Juanma Barranquero <lekktu@gmail.com>
* mh-folder.el (top): Check whether which-func-modes is t before
@@ -179,8 +183,8 @@
* mh-mime.el (mh-decode-message-subject): New function to decode
RFC2047 encoded Subject lines. Used for reply drafts.
- * mh-comp.el (mh-compose-and-send-mail): Call
- `mh-decode-message-subject' on (reply or forward) message drafts.
+ * mh-comp.el (mh-compose-and-send-mail):
+ Call `mh-decode-message-subject' on (reply or forward) message drafts.
2010-05-07 Chong Yidong <cyd@stupidchicken.com>
@@ -353,8 +357,8 @@
* mh-show.el (mh-show-preferred-alternative)
* mh-e.el (mh-annotate-msg-hook): Sync docstring with manual.
- * mh-comp.el (mh-send-letter, mh-redistribute): Mention
- mh-annotate-msg-hook in docstring.
+ * mh-comp.el (mh-send-letter, mh-redistribute):
+ Mention mh-annotate-msg-hook in docstring.
2008-06-29 Jeffrey C Honig <jch@honig.net>
@@ -404,8 +408,8 @@
2008-05-23 Bill Wohler <wohler@newt.com>
- * mh-e.el (mh-invisible-header-fields-internal): Remove
- DKIM-Signature as it is covered by DKIM-. Fully qualify X-EID.
+ * mh-e.el (mh-invisible-header-fields-internal):
+ Remove DKIM-Signature as it is covered by DKIM-. Fully qualify X-EID.
2008-05-19 Sergey Poznyakoff <gray@gnu.org.ua>
@@ -488,8 +492,8 @@
2007-08-21 Jeffrey C Honig <jch@honig.net>
- * mh-folder.el (mh-folder-message-menu, mh-folder-mode-map): Add
- folder mode support for mh-show-preferred-alternative (closes SF
+ * mh-folder.el (mh-folder-message-menu, mh-folder-mode-map):
+ Add folder mode support for mh-show-preferred-alternative (closes SF
#1777321).
* mh-show.el (mh-show-preferred-alternative)
@@ -500,8 +504,8 @@
HTML when text content is lacking (closes SF #1777321).
* mh-e.el:
- (mh-invisible-header-fields-internal): Exclude Fax and Phone. Put
- known exclusions as comments before the list and move parens to
+ (mh-invisible-header-fields-internal): Exclude Fax and Phone.
+ Put known exclusions as comments before the list and move parens to
separate lines to aid in sorting (closes SF #1701231).
* mh-mime.el (mm-decode-body): Remove explicit autoload of
@@ -750,16 +754,16 @@
(mh-tool-bar-folder-buttons-set, mh-tool-bar-letter-buttons-set):
Call it (closes SF #1452718).
- * mh-folder.el (mh-folder-buttons-init-flag): Delete. Use
- mh-folder-tool-bar-map instead.
+ * mh-folder.el (mh-folder-buttons-init-flag): Delete.
+ Use mh-folder-tool-bar-map instead.
(image-load-path): Delete. No longer used.
- (mh-folder-mode): Moved setting of image-load-path into
+ (mh-folder-mode): Move setting of image-load-path into
mh-tool-bar-folder-buttons-init.
- * mh-letter.el (mh-letter-buttons-init-flag): Delete. Use
- mh-letter-tool-bar-map instead.
+ * mh-letter.el (mh-letter-buttons-init-flag): Delete.
+ Use mh-letter-tool-bar-map instead.
(image-load-path): Delete. No longer used.
- (mh-letter-mode): Moved setting of image-load-path into
+ (mh-letter-mode): Move setting of image-load-path into
mh-tool-bar-letter-buttons-init.
* mh-seq.el (mh-narrow-to-seq, mh-widen): Use with-current-buffer
@@ -1007,8 +1011,8 @@
(mh-print-background-flag, mh-show-maximum-size)
(mh-show-use-xface-flag, mh-store-default-directory)
(mh-summary-height, mh-speed-update-interval)
- (mh-show-threads-flag, mh-tool-bar-search-function): Add
- :package-version keyword to these options (closes SF #1452724).
+ (mh-show-threads-flag, mh-tool-bar-search-function):
+ Add :package-version keyword to these options (closes SF #1452724).
(mh-after-commands-processed-hook)
(mh-alias-reloaded-hook, mh-before-commands-processed-hook)
(mh-before-quit-hook, mh-before-send-letter-hook)
@@ -1035,15 +1039,15 @@
(mh-speedbar-selected-folder-with-unseen-messages): : Add
:package-version keyword to these faces (closes SF #1452724).
- * mh-tool-bar.el (mh-tool-bar-define): Added commented-out
+ * mh-tool-bar.el (mh-tool-bar-define): Add commented-out
:package-version keywords (closes SF #1452724).
2006-03-28 Bill Wohler <wohler@newt.com>
* mh-tool-bar.el: Use clipboard-kill-region,
clipboard-kill-ring-save, and clipboard-yank instead of undo,
- kill-region, and menu-bar-kill-ring-save respectively. In
- MH-Letter mode, move save-buffer and mh-fully-kill-draft icons in
+ kill-region, and menu-bar-kill-ring-save respectively.
+ In MH-Letter mode, move save-buffer and mh-fully-kill-draft icons in
front of mh-compose-insertion to be consistent with other mailers,
such as Evolution. In MH-Folder mode, move vanilla reply icon to
the left of the other reply icons. Use mail/inbox icon instead of
@@ -1099,8 +1103,8 @@
2006-03-14 Bill Wohler <wohler@newt.com>
- * mh-compat.el (mh-image-load-path-for-library): Incorporate
- changes from image-load-path-for-library, which are:
+ * mh-compat.el (mh-image-load-path-for-library):
+ Incorporate changes from image-load-path-for-library, which are:
(image-load-path-for-library): Pass value of path rather than
symbol. Always return list of directories. Guarantee that image
directory comes first.
@@ -1126,8 +1130,8 @@
flag to replace-in-string. This was badly needed by
mh-quote-pick-expr in order to properly quote subjects when using
/ s on XEmacs (closes SF #1447598).
- (mh-image-load-path-for-library): Merged changes from Reiner. Add
- no-error argument. If path t, just return directory.
+ (mh-image-load-path-for-library): Merged changes from Reiner.
+ Add no-error argument. If path t, just return directory.
* mh-e.el (mh-profile-component): Drop `s' from mhparam
-components for Mailutils compatibility (closes SF #1446985).
@@ -1185,8 +1189,8 @@
local variable mh-image-directory to image-directory. Move error
checks to default case in cond and simplify.
- * mh-comp.el (mh-send-letter, mh-insert-auto-fields): Sync
- docstrings with manual.
+ * mh-comp.el (mh-send-letter, mh-insert-auto-fields):
+ Sync docstrings with manual.
2006-03-02 Bill Wohler <wohler@newt.com>
@@ -1212,8 +1216,8 @@
* mh-utils.el (mh-image-directory)
(mh-image-load-path-called-flag): Delete.
- (mh-image-load-path): Incorporate changes from Gnus team. Biggest
- changes are that it no longer uses/sets mh-image-directory or
+ (mh-image-load-path): Incorporate changes from Gnus team.
+ Biggest changes are that it no longer uses/sets mh-image-directory or
mh-image-load-path-called-flag, and returns the updated path
rather than change it.
(mh-logo-display): Change usage of mh-image-load-path.
@@ -1278,8 +1282,8 @@
goto-addr.el.
(mh-alias-suggest-alias): Use goto-address-mail-regexp instead of
mh-address-mail-regexp.
- (mh-alias-add-address-under-point): Use
- goto-address-find-address-at-point instead of
+ (mh-alias-add-address-under-point):
+ Use goto-address-find-address-at-point instead of
mh-goto-address-find-address-at-point.
* mh-e.el (mh-show-use-goto-addr-flag): Delete.
@@ -1360,7 +1364,7 @@
2006-02-08 Peter S Galbraith <psg@debian.org>
- * mh-e.el (mh-invisible-header-fields-internal): Added entries
+ * mh-e.el (mh-invisible-header-fields-internal): Add entries
"X-BrightmailFiltered:", "X-Brightmail-Tracker:" and "X-Hashcash".
2006-02-04 Bill Wohler <wohler@newt.com>
@@ -1429,17 +1433,17 @@
* mh-search.el (which-func-mode): Shush compiler on Emacs 21 too.
- * mh-alias.el (mh-alias-gecos-name): Use
- mh-replace-regexp-in-string instead of replace-regexp-in-string.
+ * mh-alias.el (mh-alias-gecos-name):
+ Use mh-replace-regexp-in-string instead of replace-regexp-in-string.
(crm, multi-prompt): Use mh-require instead of require.
- (mh-goto-address-find-address-at-point): Use
- mh-line-beginning-position and mh-line-end-position instead of
- line-beginning-position and line-end-position. Use
- mh-match-string-no-properties instead of
+ (mh-goto-address-find-address-at-point):
+ Use mh-line-beginning-position and mh-line-end-position instead of
+ line-beginning-position and line-end-position.
+ Use mh-match-string-no-properties instead of
match-string-no-properties.
- * mh-comp.el (mh-modify-header-field): Use
- mh-line-beginning-position and mh-line-end-position instead of
+ * mh-comp.el (mh-modify-header-field):
+ Use mh-line-beginning-position and mh-line-end-position instead of
line-beginning-position and line-end-position.
* mh-compat.el (mailabbrev): Use mh-require instead of require.
@@ -1474,16 +1478,16 @@
mh-line-end-position instead of line-beginning-position and
line-end-position.
- * mh-limit.el (mh-subject-to-sequence-unthreaded): Use
- mh-match-string-no-properties instead of
+ * mh-limit.el (mh-subject-to-sequence-unthreaded):
+ Use mh-match-string-no-properties instead of
match-string-no-properties.
(mh-narrow-to-header-field): Use mh-line-beginning-position and
mh-line-end-position instead of line-beginning-position and
line-end-position.
* mh-mime.el (mh-mime-inline-part, mh-mm-display-part)
- (mh-mh-quote-unescaped-sharp, mh-mh-directive-present-p): Use
- mh-line-beginning-position and mh-line-end-position instead of
+ (mh-mh-quote-unescaped-sharp, mh-mh-directive-present-p):
+ Use mh-line-beginning-position and mh-line-end-position instead of
line-beginning-position and line-end-position.
* mh-search.el (which-func): Use mh-require instead of require.
@@ -1492,8 +1496,8 @@
(mh-mairix-next-result, mh-namazu-next-result)
(mh-pick-next-result, mh-grep-next-result)
(mh-index-create-imenu-index, mh-index-match-checksum)
- (mh-md5sum-parser, mh-openssl-parser, mh-index-update-maps): Use
- mh-line-beginning-position and mh-line-end-position instead of
+ (mh-md5sum-parser, mh-openssl-parser, mh-index-update-maps):
+ Use mh-line-beginning-position and mh-line-end-position instead of
line-beginning-position and line-end-position.
* mh-seq.el (mh-list-sequences): Use mh-view-mode-enter instead of
@@ -1516,8 +1520,8 @@
(mh-speed-flists): Use mh-cancel-timer instead of cancel-timer.
* mh-thread.el (mh-thread-find-children)
- (mh-thread-parse-scan-line, mh-thread-generate): Use
- mh-line-beginning-position and mh-line-end-position instead of
+ (mh-thread-parse-scan-line, mh-thread-generate):
+ Use mh-line-beginning-position and mh-line-end-position instead of
line-beginning-position and line-end-position.
* mh-utils.el (mh-colors-available-p): Use mh-display-color-cells
@@ -1738,8 +1742,8 @@
(mh-letter-header-field-regexp, mh-pgp-support-flag)
(mh-x-mailer-string): Move here from mh-comp.el.
(mh-folder-line-matches-show-buffer-p): Move to mh-alias.el.
- (mh-thread-scan-line-map, mh-thread-scan-line-map-stack): Move
- here from mh-seq.el.
+ (mh-thread-scan-line-map, mh-thread-scan-line-map-stack):
+ Move here from mh-seq.el.
(mh-draft-folder, mh-inbox, mh-user-path, mh-current-folder)
(mh-previous-window-config, mh-seen-list, mh-seq-list)
(mh-show-buffer, mh-showing-mode, mh-globals-hash)
@@ -2042,10 +2046,10 @@
(mh-show-mouse, mh-modify, mh-goto-msg, mh-set-folder-modified-p):
Move to new file mh-folder.el.
(with-mh-folder-updating, mh-in-show-buffer)
- (mh-do-at-event-location, mh-seq-msgs): Moved to mh-acros.el.
+ (mh-do-at-event-location, mh-seq-msgs): Move to mh-acros.el.
(mh-make-seq, mh-seq-name, mh-notate, mh-find-seq)
(mh-seq-to-msgs, mh-add-msgs-to-seq, mh-canonicalize-sequence):
- Moved to mh-seq.el.
+ Move to mh-seq.el.
(mh-show-xface-function, mh-uncompface-executable, mh-face-to-png)
(mh-uncompface, mh-icontopbm, mh-face-foreground-compat)
(mh-face-background-compat, mh-face-display-function)
@@ -2070,8 +2074,8 @@
mh-init.el.
(mh-help-messages): Now an alist of modes to an alist of messages.
(mh-set-help): New function used to set mh-help-messages.
- (mh-help): Adjust for new format of mh-help-messages. Add
- help-messages argument.
+ (mh-help): Adjust for new format of mh-help-messages.
+ Add help-messages argument.
(mh-prefix-help): Refactor to use mh-help.
(mh-coalesce-msg-list, mh-greaterp, mh-lessp): Move here from
mh-e.el.
@@ -2202,8 +2206,8 @@
(mh-search-mode-map): Autoload so that keys are shown in help even
before mh-search is loaded.
(mh-search-mode): Sync docstring with manual.
- (mh-index-do-search): Rename argument indexer to searcher. Sync
- docstring with manual.
+ (mh-index-do-search): Rename argument indexer to searcher.
+ Sync docstring with manual.
(mh-pick-do-search): Sync docstring with manual.
(mh-index-p): Rename to mh-search-p.
(mh-indexer-choices): Rename to mh-search-choices.
@@ -2220,7 +2224,7 @@
2006-01-13 Bill Wohler <wohler@newt.com>
- * mh-acros.el (require): Added Satyaki's comment regarding what
+ * mh-acros.el (require): Add Satyaki's comment regarding what
needs to happen to remove this defadvice which caused a little
discussion on emacs-devel today (see Subject: mh-e/mh-acros.el
advices `require' incorrectly).
@@ -2292,8 +2296,8 @@
* mh-gnus.el: Require mh-acros.
(mh-defmacro-compat, mh-defun-compat): Move to mh-acros.el.
- * mh-utils.el (mh-x-image-url-cache-canonicalize): Use
- url-hexify-string to remove special characters from filenames
+ * mh-utils.el (mh-x-image-url-cache-canonicalize):
+ Use url-hexify-string to remove special characters from filenames
(closes SF #1396499). Note that this invalidates the existing
names in your cache so you might as well remove
~/Mail/.mhe-x-image-cache/* now.
@@ -2352,16 +2356,16 @@
than file-executable-p which returns t for directories.
(mh-file-command-p): Move here from mh-utils, since
mh-variant-*-info are the only functions to use it.
- (mh-variant-set, mh-variant-set-variant, mh-variant-p): Use
- function mh-variants instead of variable. More robust.
+ (mh-variant-set, mh-variant-set-variant, mh-variant-p):
+ Use function mh-variants instead of variable. More robust.
(mh-find-path-run): Move here from mh-utils.el. Mention that
checking this variable is unnecessary.
(mh-find-path): Move here from mh-utils.el. With the advent of MH
variants and an mhparam command that doesn't work if there isn't
- an MH profile, we can't get libdir for running install-mh. So
- don't bother. If there's an issue with the environment, direct the
- user to install MH and run install-mh (closes SF #835192). Don't
- read ~/.mh_profile directly. Use mh-profile-component which uses
+ an MH profile, we can't get libdir for running install-mh.
+ So don't bother. If there's an issue with the environment, direct the
+ user to install MH and run install-mh (closes SF #835192).
+ Don't read ~/.mh_profile directly. Use mh-profile-component which uses
mhparam (closes SF #1016027).
* mh-utils.el (mh-get-profile-field): Rename to
@@ -2376,12 +2380,12 @@
(mh-no-install, mh-install): Delete.
* mh-customize.el (mh-folder-msg-number):
- * mh-mime.el (mh-file-mime-type): Removed trailing whitespace.
+ * mh-mime.el (mh-file-mime-type): Remove trailing whitespace.
2006-01-09 Bill Wohler <wohler@newt.com>
- * mh-init.el (mh-variant-mu-mh-info, mh-variant-nmh-info): Applied
- patch from Satyaki from SF #1016027.
+ * mh-init.el (mh-variant-mu-mh-info, mh-variant-nmh-info):
+ Applied patch from Satyaki from SF #1016027.
* mh-e.el (mh-rescan-folder): Try to keep cursor at current
message, even if cur sequence is no longer present (closes SF
@@ -2429,7 +2433,7 @@
* mh-comp.el: Require cleanup, wrap compiler-shushing defvars with
eval-when-compile.
- (mh-file-is-vcard-p): Removed redundant test.
+ (mh-file-is-vcard-p): Remove redundant test.
* mh-customize.el: Require cleanup, wrap compiler-shushing defvars
with eval-when-compile.
@@ -2455,8 +2459,8 @@
* mh-mime.el: Wrap compiler-shushing defvars with
eval-when-compile.
- (mh-have-file-command): Initialize variable to 'undefined. Add
- docstring. Update function of same name accordingly. Also don't
+ (mh-have-file-command): Initialize variable to 'undefined.
+ Add docstring. Update function of same name accordingly. Also don't
need to load executable any more.
(mh-mime-content-types): Delete.
(mh-minibuffer-read-type): Prompt user for type if
@@ -2695,11 +2699,11 @@
with manual.
(mh-yank-cur-msg): Mention that mh-ins-buf-prefix isn't used if
you have added a mail-citation-hook and neither are used if you
- use one of the supercite flavors of mh-yank-behavior. Sync
- docstrings with manual.
+ use one of the supercite flavors of mh-yank-behavior.
+ Sync docstrings with manual.
- * mh-customize.el (mh-kill-folder-suppress-prompt-hooks): Rename
- from mh-kill-folder-suppress-prompt-hook since it is an abnormal
+ * mh-customize.el (mh-kill-folder-suppress-prompt-hooks):
+ Rename from mh-kill-folder-suppress-prompt-hook since it is an abnormal
hook. Use "Hook run by `function'..." instead of "Invoked...".
Sync docstrings with manual.
(mh-ins-buf-prefix, mh-yank-behavior): Mention that
@@ -2824,13 +2828,13 @@
* mh-customize.el (mh-speed-flists-interval): Rename to
mh-speed-update-interval.
- (mh-speed-run-flists-flag): Delete. Setting
- mh-speed-flists-interval to 0 accomplishes the same thing.
+ (mh-speed-run-flists-flag): Delete.
+ Setting mh-speed-flists-interval to 0 accomplishes the same thing.
- * mh-speed.el (mh-folder-speedbar-buttons, mh-speed-flists): Use
- mh-speed-update-interval instead of mh-speed-run-flists-flag.
- (mh-speed-toggle, mh-speed-view, mh-speed-refresh): Sync
- docstrings with manual.
+ * mh-speed.el (mh-folder-speedbar-buttons, mh-speed-flists):
+ Use mh-speed-update-interval instead of mh-speed-run-flists-flag.
+ (mh-speed-toggle, mh-speed-view, mh-speed-refresh):
+ Sync docstrings with manual.
2005-12-09 Bill Wohler <wohler@newt.com>
@@ -2847,8 +2851,8 @@
(mh-invisible-header-fields-internal): Add X-Bugzilla-* and
X-Virus-Scanned.
- * mh-customize.el (mh-insert-signature-hook): Rename
- mh-letter-insert-signature-hook to mh-insert-signature-hook.
+ * mh-customize.el (mh-insert-signature-hook):
+ Rename mh-letter-insert-signature-hook to mh-insert-signature-hook.
* mh-comp.el (mh-insert-signature): Ditto.
@@ -2950,10 +2954,10 @@
(mh-next-undeleted-msg, mh-previous-undeleted-msg): Rename arg to
count. Sync docstrings with manual.
(mh-refile-or-write-again): Use output from mh-write-msg-to-file
- so that message doesn't change when using this command. Sync
- docstrings with manual.
- (mh-page-msg, mh-previous-page): Rename arg to lines. Sync
- docstrings with manual.
+ so that message doesn't change when using this command.
+ Sync docstrings with manual.
+ (mh-page-msg, mh-previous-page): Rename arg to lines.
+ Sync docstrings with manual.
(mh-write-msg-to-file): Rename msg to message. Rename no-headers
to no-header. Sync docstrings with manual.
(mh-ps-print-map): Delete keybindings for deleted commands
@@ -2977,8 +2981,8 @@
Sync docstrings with manual.
(mh-toggle-mh-decode-mime-flag): Use English in message, not Lisp.
Sync docstrings with manual.
- (mh-mm-display-part, mh-mm-inline-message): Use
- mh-highlight-citation-style instead of mh-highlight-citation-p.
+ (mh-mm-display-part, mh-mm-inline-message):
+ Use mh-highlight-citation-style instead of mh-highlight-citation-p.
(mh-press-button): Sync docstrings with manual.
(mh-display-with-external-viewer): Fix default output in
minibuffer. Sync docstrings with manual.
@@ -3069,8 +3073,8 @@
(mh-smail, mh-extract-rejected-mail, mh-forward, mh-redistribute)
(mh-reply, mh-send, mh-send-other-window)
(mh-fill-paragraph-function): Sync docstrings with manual.
- (mh-edit-again, mh-extract-rejected-mail, mh-redistribute): Rename
- msg argument to message (to make for a better docstring).
+ (mh-edit-again, mh-extract-rejected-mail, mh-redistribute):
+ Rename msg argument to message (to make for a better docstring).
* mh-customize.el (mh-redist-full-contents-flag): Convert defvar
to defcustom. Rename by adding -flag.
@@ -3095,8 +3099,8 @@
* mh-customize.el (mh-compose-space-does-completion-flag)
(mh-signature-separator-flag, mh-interpret-number-as-range-flag)
(mh-adaptive-cmd-note-flag): Use "Non-nil means" instead of "On
- means" to remain checkdoc clean and consistent with Emacs. I
- raised this issue with the Emacs developers and Stallman agrees
+ means" to remain checkdoc clean and consistent with Emacs.
+ I raised this issue with the Emacs developers and Stallman agrees
that "On means" should be allowed in custom docstrings but that
this change requires thought and should wait until after the Emacs
22 release.
@@ -3108,14 +3112,14 @@
* mh-customize.el (mh-interpret-number-as-range-flag): Add * to
docstring.
- (mh-adaptive-cmd-note-flag-check, mh-scan-format-file-check): New
- functions to check input for mh-adaptive-cmd-note-flag and
+ (mh-adaptive-cmd-note-flag-check, mh-scan-format-file-check):
+ New functions to check input for mh-adaptive-cmd-note-flag and
mh-scan-format-file respectively.
(mh-adaptive-cmd-note-flag, mh-scan-format-file): Docstring fixes,
add :set.
- * mh-e.el (mh-scan-field-destination-offset): New variable. The
- destination is the -, t, b, c, or n character for Replied, To, cc,
+ * mh-e.el (mh-scan-field-destination-offset): New variable.
+ The destination is the -, t, b, c, or n character for Replied, To, cc,
Bcc, or Newsgroups respectively.
(mh-make-folder, mh-regenerate-headers, mh-generate-new-cmd-note):
Call new function mh-msg-num-width-to-column to make leap between
@@ -3235,10 +3239,10 @@
2005-10-23 Bill Wohler <wohler@newt.com>
- * mh-comp.el (mh-letter-menu): Rename
- mh-mhn-compose-external-compressed-tar to
- mh-mh-compose-external-compressed-tar. Rename
- mh-mhn-compose-anon-ftp to mh-mh-compose-anon-ftp. Rename
+ * mh-comp.el (mh-letter-menu):
+ Rename mh-mhn-compose-external-compressed-tar to
+ mh-mh-compose-external-compressed-tar.
+ Rename mh-mhn-compose-anon-ftp to mh-mh-compose-anon-ftp. Rename
mh-edit-mhn to mh-mh-to-mime. Rename mh-mhn-directive-present-p to
mh-mh-directive-present-p. Rename mh-revert-mhn-edit to
mh-mh-to-mime-undo. Rename mh-gnus-pgp-support-flag to
@@ -3248,21 +3252,21 @@
mh-mh-directive-present-p.
(mh-send-letter): Rename mh-mhn-directive-present-p to
mh-mh-directive-present-p. Rename mh-edit-mhn to mh-mh-to-mime.
- (mh-letter-mode-map): Rename mh-edit-mhn to mh-mh-to-mime. Rename
- mh-mhn-compose-anon-ftp to mh-mh-compose-anon-ftp. Rename
- mh-mhn-compose-external-compressed-tar to
+ (mh-letter-mode-map): Rename mh-edit-mhn to mh-mh-to-mime.
+ Rename mh-mhn-compose-anon-ftp to mh-mh-compose-anon-ftp.
+ Rename mh-mhn-compose-external-compressed-tar to
mh-mh-compose-external-compressed-tar. Rename mh-revert-mhn-edit
to mh-mh-to-mime-undo. Rename mh-mhn-compose-external-type to
mh-mh-compose-external-type. Rename mh-mhn-compose-anon-ftp to
- mh-mh-compose-anon-ftp. Rename
- mh-mhn-compose-external-compressed-tar to
+ mh-mh-compose-anon-ftp.
+ Rename mh-mhn-compose-external-compressed-tar to
mh-mh-compose-external-compressed-tar. Rename mh-revert-mhn-edit
to mh-mh-to-mime-undo. Rename mh-mhn-compose-external-type to
mh-mh-compose-external-type.
(mh-send-letter, mh-letter-mode-map): Rename mh-edit-mhn to
mh-mh-to-mime, mh-revert-mhn-edit to mh-mh-to-mime-undo.
- (mh-reply, mh-yank-cur-msg, mh-insert-prefix-string): Rename
- mh-yank-from-start-of-msg to mh-yank-behavior.
+ (mh-reply, mh-yank-cur-msg, mh-insert-prefix-string):
+ Rename mh-yank-from-start-of-msg to mh-yank-behavior.
(mh-letter-mode, mh-to-field, mh-to-fcc, mh-insert-signature)
(mh-check-whom, mh-insert-auto-fields, mh-send-letter)
(mh-insert-letter, mh-yank-cur-msg, mh-insert-prefix-string)
@@ -3305,8 +3309,8 @@
(mh-mhn-compose-anon-ftp): Rename to mh-mh-compose-anon-ftp.
Rename mh-mhn-compose-external-type to mh-mh-compose-external-type.
(mh-mhn-compose-external-compressed-tar): Rename to
- mh-mh-compose-external-compressed-tar. Rename
- mh-mhn-compose-external-type to mh-mh-compose-external-type.
+ mh-mh-compose-external-compressed-tar.
+ Rename mh-mhn-compose-external-type to mh-mh-compose-external-type.
(mh-mhn-compose-external-type): Rename to mh-mh-compose-external-type.
(mh-edit-mhn): Rename to mh-mh-to-mime. Rename mh-mhn-args to
mh-mh-to-mime-args. Rename mh-edit-mhn-hook to mh-mh-to-mime-hook.
@@ -3323,8 +3327,8 @@
(mh-mh-compose-external-type): Rename extra-param argument to
parameters.
(mh-mml-to-mime, mh-secure-message, mh-mml-unsecure-message)
- (mh-mime-display-part, mh-mime-display-single): Rename
- mh-gnus-pgp-support-flag to mh-pgp-support-flag.
+ (mh-mime-display-part, mh-mime-display-single):
+ Rename mh-gnus-pgp-support-flag to mh-pgp-support-flag.
(mh-compose-insertion): Rename mh-mhn-compose-insertion to
mh-mh-attach-file.
(mh-compose-forward): Rename mh-mhn-compose-forw to
@@ -3389,8 +3393,8 @@
* mh-init.el (mh-image-load-path-called-flag): New variable which
is used by mh-image-load-path so that it runs only once.
- (mh-image-load-path): Modify so that it gets run only once. Also
- flatten out heavily nested if statements to make it clearer.
+ (mh-image-load-path): Modify so that it gets run only once.
+ Also flatten out heavily nested if statements to make it clearer.
* mh-e.el (mh-folder-mode): Call mh-image-load-path to allow Emacs
to find images used in the toolbar.
@@ -3414,11 +3418,11 @@
need to be indented.
* mh-e.el: mh-folder-tick-face had been renamed to mh-folder-tick
- but the code that invoked the face had not been updated. Tick
- highlighting working again.
+ but the code that invoked the face had not been updated.
+ Tick highlighting working again.
- * mh-seq.el (mh-non-seq-mode-line-annotation): Move
- make-variable-buffer-local call to top level to avoid warnings in
+ * mh-seq.el (mh-non-seq-mode-line-annotation):
+ Move make-variable-buffer-local call to top level to avoid warnings in
CVS Emacs.
* mh-comp.el (mh-insert-letter): Replace deprecated read-input
diff --git a/lisp/mh-e/mh-utils.el b/lisp/mh-e/mh-utils.el
index 1944a4cd08f..2b5e51cfb34 100644
--- a/lisp/mh-e/mh-utils.el
+++ b/lisp/mh-e/mh-utils.el
@@ -732,8 +732,7 @@ See Info node `(elisp) Programmed Completion' for details."
;; Shush compiler.
(mh-do-in-xemacs
- (defvar completion-root-regexp)
- (defvar minibuffer-completing-file-name))
+ (defvar completion-root-regexp))
(defun mh-folder-completing-read (prompt default allow-root-folder-flag)
"Read folder name with PROMPT and default result DEFAULT.
diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el
index 5a990f6ab35..6cd7af7fd01 100644
--- a/lisp/minibuffer.el
+++ b/lisp/minibuffer.el
@@ -45,17 +45,6 @@
;; corresponding to the displayed completions because we only
;; provide the start info but not the end info in
;; completion-base-position.
-;; - quoting is problematic. E.g. the double-dollar quoting used in
-;; substitute-in-file-name (and hence read-file-name-internal) bumps
-;; into various bugs:
-;; - choose-completion doesn't know how to quote the text it inserts.
-;; E.g. it fails to double the dollars in file-name completion, or
-;; to backslash-escape spaces and other chars in comint completion.
-;; - when completing ~/tmp/fo$$o, the highlighting in *Completions*
-;; is off by one position.
-;; - all code like PCM which relies on all-completions to match
-;; its argument gets confused because all-completions returns unquoted
-;; texts (as desired for *Completions* output).
;; - C-x C-f ~/*/sr ? should not list "~/./src".
;; - minibuffer-force-complete completes ~/src/emacs/t<!>/lisp/minibuffer.el
;; to ~/src/emacs/trunk/ and throws away lisp/minibuffer.el.
@@ -66,12 +55,9 @@
;; - Make things like icomplete-mode or lightning-completion work with
;; completion-in-region-mode.
;; - extend `metadata':
-;; - quoting/unquoting (so we can complete files names with envvars
-;; and backslashes, and all-completion can list names without
-;; quoting backslashes and dollars).
;; - indicate how to turn all-completion's output into
;; try-completion's output: e.g. completion-ignored-extensions.
-;; maybe that could be merged with the "quote" operation above.
+;; maybe that could be merged with the "quote" operation.
;; - indicate that `all-completions' doesn't do prefix-completion
;; but just returns some list that relates in some other way to
;; the provided string (as is the case in filecache.el), in which
@@ -213,7 +199,7 @@ You should give VAR a non-nil `risky-local-variable' property."
`(completion-table-dynamic
(lambda (,str)
(when (functionp ,var)
- (setq ,var (,fun)))
+ (setq ,var (funcall #',fun)))
,var))))
(defun completion-table-case-fold (table &optional dont-fold)
@@ -224,6 +210,42 @@ case sensitive instead."
(let ((completion-ignore-case (not dont-fold)))
(complete-with-action action table string pred))))
+(defun completion-table-subvert (table s1 s2)
+ "Completion table that replaces the prefix S1 with S2 in STRING.
+The result is a completion table which completes strings of the
+form (concat S1 S) in the same way as TABLE completes strings of
+the form (concat S2 S)."
+ (lambda (string pred action)
+ (let* ((str (if (eq t (compare-strings string 0 (length s1) s1 nil nil
+ completion-ignore-case))
+ (concat s2 (substring string (length s1)))))
+ (res (if str (complete-with-action action table str pred))))
+ (when res
+ (cond
+ ((eq (car-safe action) 'boundaries)
+ (let ((beg (or (and (eq (car-safe res) 'boundaries) (cadr res)) 0)))
+ (list* 'boundaries
+ (max (length s1)
+ (+ beg (- (length s1) (length s2))))
+ (and (eq (car-safe res) 'boundaries) (cddr res)))))
+ ((stringp res)
+ (if (eq t (compare-strings res 0 (length s2) s2 nil nil
+ completion-ignore-case))
+ (concat s1 (substring res (length s2)))))
+ ((eq action t)
+ (let ((bounds (completion-boundaries str table pred "")))
+ (if (>= (car bounds) (length s2))
+ res
+ (let ((re (concat "\\`"
+ (regexp-quote (substring s2 (car bounds))))))
+ (delq nil
+ (mapcar (lambda (c)
+ (if (string-match re c)
+ (substring c (match-end 0))))
+ res))))))
+ ;; E.g. action=nil and it's the only completion.
+ (res))))))
+
(defun completion-table-with-context (prefix table string pred action)
;; TODO: add `suffix' maybe?
(let ((pred
@@ -347,6 +369,203 @@ Note: TABLE needs to be a proper completion table which obeys predicates."
(complete-with-action action table string pred))
tables)))
+(defun completion-table-with-quoting (table unquote requote)
+ ;; A difficult part of completion-with-quoting is to map positions in the
+ ;; quoted string to equivalent positions in the unquoted string and
+ ;; vice-versa. There is no efficient and reliable algorithm that works for
+ ;; arbitrary quote and unquote functions.
+ ;; So to map from quoted positions to unquoted positions, we simply assume
+ ;; that `concat' and `unquote' commute (which tends to be the case).
+ ;; And we ask `requote' to do the work of mapping from unquoted positions
+ ;; back to quoted positions.
+ "Return a new completion table operating on quoted text.
+TABLE operates on the unquoted text.
+UNQUOTE is a function that takes a string and returns a new unquoted string.
+REQUOTE is a function of 2 args (UPOS QSTR) where
+ QSTR is a string entered by the user (and hence indicating
+ the user's preferred form of quoting); and
+ UPOS is a position within the unquoted form of QSTR.
+REQUOTE should return a pair (QPOS . QFUN) such that QPOS is the
+position corresponding to UPOS but in QSTR, and QFUN is a function
+of one argument (a string) which returns that argument appropriately quoted
+for use at QPOS."
+ ;; FIXME: One problem with the current setup is that `qfun' doesn't know if
+ ;; its argument is "the end of the completion", so if the quoting used double
+ ;; quotes (for example), we end up completing "fo" to "foobar and throwing
+ ;; away the closing double quote.
+ (lambda (string pred action)
+ (cond
+ ((eq action 'metadata)
+ (append (completion-metadata string table pred)
+ '((completion--unquote-requote . t))))
+
+ ((eq action 'lambda) ;;test-completion
+ (let ((ustring (funcall unquote string)))
+ (test-completion ustring table pred)))
+
+ ((eq (car-safe action) 'boundaries)
+ (let* ((ustring (funcall unquote string))
+ (qsuffix (cdr action))
+ (ufull (if (zerop (length qsuffix)) ustring
+ (funcall unquote (concat string qsuffix))))
+ (_ (assert (string-prefix-p ustring ufull)))
+ (usuffix (substring ufull (length ustring)))
+ (boundaries (completion-boundaries ustring table pred usuffix))
+ (qlboundary (car (funcall requote (car boundaries) string)))
+ (qrboundary (if (zerop (cdr boundaries)) 0 ;Common case.
+ (let* ((urfullboundary
+ (+ (cdr boundaries) (length ustring))))
+ (- (car (funcall requote urfullboundary
+ (concat string qsuffix)))
+ (length string))))))
+ (list* 'boundaries qlboundary qrboundary)))
+
+ ;; In "normal" use a c-t-with-quoting completion table should never be
+ ;; called with action in (t nil) because `completion--unquote' should have
+ ;; been called before and would have returned a different completion table
+ ;; to apply to the unquoted text. But there's still a lot of code around
+ ;; that likes to use all/try-completions directly, so we do our best to
+ ;; handle those calls as well as we can.
+
+ ((eq action nil) ;;try-completion
+ (let* ((ustring (funcall unquote string))
+ (completion (try-completion ustring table pred)))
+ ;; Most forms of quoting allow several ways to quote the same string.
+ ;; So here we could simply requote `completion' in a kind of
+ ;; "canonical" quoted form without paying attention to the way
+ ;; `string' was quoted. But since we have to solve the more complex
+ ;; problems of "pay attention to the original quoting" for
+ ;; all-completions, we may as well use it here, since it provides
+ ;; a nicer behavior.
+ (if (not (stringp completion)) completion
+ (car (completion--twq-try
+ string ustring completion 0 unquote requote)))))
+
+ ((eq action t) ;;all-completions
+ ;; When all-completions is used for completion-try/all-completions
+ ;; (e.g. for `pcm' style), we can't do the job properly here because
+ ;; the caller will match our output against some pattern derived from
+ ;; the user's (quoted) input, and we don't have access to that
+ ;; pattern, so we can't know how to requote our output so that it
+ ;; matches the quoting used in the pattern. It is to fix this
+ ;; fundamental problem that we have to introduce the new
+ ;; unquote-requote method so that completion-try/all-completions can
+ ;; pass the unquoted string to the style functions.
+ (pcase-let*
+ ((ustring (funcall unquote string))
+ (completions (all-completions ustring table pred))
+ (boundary (car (completion-boundaries ustring table pred "")))
+ (completions
+ (completion--twq-all
+ string ustring completions boundary unquote requote))
+ (last (last completions)))
+ (when (consp last) (setcdr last nil))
+ completions))
+
+ ((eq action 'completion--unquote)
+ (let ((ustring (funcall unquote string))
+ (uprefix (funcall unquote (substring string 0 pred))))
+ ;; We presume (more or less) that `concat' and `unquote' commute.
+ (assert (string-prefix-p uprefix ustring))
+ (list ustring table (length uprefix)
+ (lambda (unquoted-result op)
+ (pcase op
+ (`1 ;;try
+ (if (not (stringp (car-safe unquoted-result)))
+ unquoted-result
+ (completion--twq-try
+ string ustring
+ (car unquoted-result) (cdr unquoted-result)
+ unquote requote)))
+ (`2 ;;all
+ (let* ((last (last unquoted-result))
+ (base (or (cdr last) 0)))
+ (when last
+ (setcdr last nil)
+ (completion--twq-all string ustring
+ unquoted-result base
+ unquote requote))))))))))))
+
+(defun completion--twq-try (string ustring completion point
+ unquote requote)
+ ;; Basically two case: either the new result is
+ ;; - commonprefix1 <point> morecommonprefix <qpos> suffix
+ ;; - commonprefix <qpos> newprefix <point> suffix
+ (pcase-let*
+ ((prefix (fill-common-string-prefix ustring completion))
+ (suffix (substring completion (max point (length prefix))))
+ (`(,qpos . ,qfun) (funcall requote (length prefix) string))
+ (qstr1 (if (> point (length prefix))
+ (funcall qfun (substring completion (length prefix) point))))
+ (qsuffix (funcall qfun suffix))
+ (qstring (concat (substring string 0 qpos) qstr1 qsuffix))
+ (qpoint
+ (cond
+ ((zerop point) 0)
+ ((> point (length prefix)) (+ qpos (length qstr1)))
+ (t (car (funcall requote point string))))))
+ ;; Make sure `requote' worked.
+ (assert (equal (funcall unquote qstring) completion))
+ (cons qstring qpoint)))
+
+(defun completion--string-equal-p (s1 s2)
+ (eq t (compare-strings s1 nil nil s2 nil nil 'ignore-case)))
+
+(defun completion--twq-all (string ustring completions boundary
+ unquote requote)
+ (when completions
+ (pcase-let*
+ ((prefix
+ (let ((completion-regexp-list nil))
+ (try-completion "" (cons (substring ustring boundary)
+ completions))))
+ (`(,qfullpos . ,qfun)
+ (funcall requote (+ boundary (length prefix)) string))
+ (qfullprefix (substring string 0 qfullpos))
+ (_ (assert (completion--string-equal-p
+ (funcall unquote qfullprefix)
+ (concat (substring ustring 0 boundary) prefix))
+ t))
+ (qboundary (car (funcall requote boundary string)))
+ (_ (assert (<= qboundary qfullpos)))
+ ;; FIXME: this split/quote/concat business messes up the carefully
+ ;; placed completions-common-part and completions-first-difference
+ ;; faces. We could try within the mapcar loop to search for the
+ ;; boundaries of those faces, pass them to `requote' to find their
+ ;; equivalent positions in the quoted output and re-add the faces:
+ ;; this might actually lead to correct results but would be
+ ;; pretty expensive.
+ ;; The better solution is to not quote the *Completions* display,
+ ;; which nicely circumvents the problem. The solution I used here
+ ;; instead is to hope that `qfun' preserves the text-properties and
+ ;; presume that the `first-difference' is not within the `prefix';
+ ;; this presumption is not always true, but at least in practice it is
+ ;; true in most cases.
+ (qprefix (propertize (substring qfullprefix qboundary)
+ 'face 'completions-common-part)))
+
+ ;; Here we choose to quote all elements returned, but a better option
+ ;; would be to return unquoted elements together with a function to
+ ;; requote them, so that *Completions* can show nicer unquoted values
+ ;; which only get quoted when needed by choose-completion.
+ (nconc
+ (mapcar (lambda (completion)
+ (assert (string-prefix-p prefix completion 'ignore-case) t)
+ (let* ((new (substring completion (length prefix)))
+ (qnew (funcall qfun new))
+ (qcompletion (concat qprefix qnew)))
+ (assert
+ (completion--string-equal-p
+ (funcall unquote
+ (concat (substring string 0 qboundary)
+ qcompletion))
+ (concat (substring ustring 0 boundary)
+ completion))
+ t)
+ qcompletion))
+ completions)
+ qboundary))))
+
;; (defmacro complete-in-turn (a b) `(completion-table-in-turn ,a ,b))
;; (defmacro dynamic-completion-table (fun) `(completion-table-dynamic ,fun))
(define-obsolete-function-alias
@@ -535,21 +754,47 @@ completing buffer and file names, respectively."
(delete-dups (append (cdr over) (copy-sequence completion-styles)))
completion-styles)))
+(defun completion--nth-completion (n string table pred point metadata)
+ "Call the Nth method of completion styles."
+ (unless metadata
+ (setq metadata
+ (completion-metadata (substring string 0 point) table pred)))
+ ;; We provide special support for quoting/unquoting here because it cannot
+ ;; reliably be done within the normal completion-table routines: Completion
+ ;; styles such as `substring' or `partial-completion' need to match the
+ ;; output of all-completions with the user's input, and since most/all
+ ;; quoting mechanisms allow several equivalent quoted forms, the
+ ;; completion-style can't do this matching (e.g. `substring' doesn't know
+ ;; that "\a\b\e" is a valid (quoted) substring of "label").
+ ;; The quote/unquote function needs to come from the completion table (rather
+ ;; than from completion-extra-properties) because it may apply only to some
+ ;; part of the string (e.g. substitute-in-file-name).
+ (let ((requote
+ (when (completion-metadata-get metadata 'completion--unquote-requote)
+ (let ((new (funcall table string point 'completion--unquote)))
+ (setq string (pop new))
+ (setq table (pop new))
+ (setq point (pop new))
+ (pop new))))
+ (result
+ (completion--some (lambda (style)
+ (funcall (nth n (assq style
+ completion-styles-alist))
+ string table pred point))
+ (completion--styles metadata))))
+ (if requote
+ (funcall requote result n)
+ result)))
+
(defun completion-try-completion (string table pred point &optional metadata)
"Try to complete STRING using completion table TABLE.
Only the elements of table that satisfy predicate PRED are considered.
POINT is the position of point within STRING.
The return value can be either nil to indicate that there is no completion,
t to indicate that STRING is the only possible completion,
-or a pair (STRING . NEWPOINT) of the completed result string together with
+or a pair (NEWSTRING . NEWPOINT) of the completed result string together with
a new position for point."
- (completion--some (lambda (style)
- (funcall (nth 1 (assq style completion-styles-alist))
- string table pred point))
- (completion--styles (or metadata
- (completion-metadata
- (substring string 0 point)
- table pred)))))
+ (completion--nth-completion 1 string table pred point metadata))
(defun completion-all-completions (string table pred point &optional metadata)
"List the possible completions of STRING in completion table TABLE.
@@ -559,13 +804,7 @@ The return value is a list of completions and may contain the base-size
in the last `cdr'."
;; FIXME: We need to additionally return the info needed for the
;; second part of completion-base-position.
- (completion--some (lambda (style)
- (funcall (nth 2 (assq style completion-styles-alist))
- string table pred point))
- (completion--styles (or metadata
- (completion-metadata
- (substring string 0 point)
- table pred)))))
+ (completion--nth-completion 2 string table pred point metadata))
(defun minibuffer--bitset (modified completions exact)
(logior (if modified 4 0)
@@ -1713,10 +1952,10 @@ The completion method is determined by `completion-at-point-functions'."
Gets combined either with `minibuffer-local-completion-map' or
with `minibuffer-local-must-match-map'.")
-(defvar minibuffer-local-filename-must-match-map (make-sparse-keymap))
-(make-obsolete-variable 'minibuffer-local-filename-must-match-map nil "24.1")
(define-obsolete-variable-alias 'minibuffer-local-must-match-filename-map
'minibuffer-local-filename-must-match-map "23.1")
+(defvar minibuffer-local-filename-must-match-map (make-sparse-keymap))
+(make-obsolete-variable 'minibuffer-local-filename-must-match-map nil "24.1")
(let ((map minibuffer-local-ns-map))
(define-key map " " 'exit-minibuffer)
@@ -1754,7 +1993,10 @@ This is only used when the minibuffer area has no active minibuffer.")
;;; Completion tables.
(defun minibuffer--double-dollars (str)
- (replace-regexp-in-string "\\$" "$$" str))
+ ;; Reuse the actual "$" from the string to preserve any text-property it
+ ;; might have, such as `face'.
+ (replace-regexp-in-string "\\$" (lambda (dollar) (concat dollar dollar))
+ str))
(defun completion--make-envvar-table ()
(mapcar (lambda (enventry)
@@ -1880,58 +2122,60 @@ same as `substitute-in-file-name'."
(make-obsolete-variable 'read-file-name-predicate
"use the regular PRED argument" "23.2")
-(defun completion--file-name-table (string pred action)
+(defun completion--sifn-requote (upos qstr)
+ ;; We're looking for `qupos' such that:
+ ;; (equal (substring (substitute-in-file-name qstr) 0 upos)
+ ;; (substitute-in-file-name (substring qstr 0 qupos)))
+ ;; Big problem here: we have to reverse engineer substitute-in-file-name to
+ ;; find the position corresponding to UPOS in QSTR, but
+ ;; substitute-in-file-name can do anything, depending on file-name-handlers.
+ ;; Kind of like in rfn-eshadow-update-overlay, only worse.
+ (let ((qpos 0))
+ ;; Handle substitute-in-file-name's truncation behavior.
+ (let (tpos)
+ (while (and (string-match "[\\/][~/\\]" qstr qpos)
+ ;; Hopefully our regexp covers all truncation cases.
+ ;; Also let's make sure sifn indeed truncates here.
+ (progn
+ (setq tpos (1+ (match-beginning 0)))
+ (equal (substitute-in-file-name qstr)
+ (substitute-in-file-name (substring qstr tpos)))))
+ (setq qpos tpos)))
+ ;; `upos' is relative to the position corresponding to `qpos' in
+ ;; (substitute-in-file-name qstr), so as qpos moves forward, upos
+ ;; gets smaller.
+ (while (and (> upos 0)
+ (string-match "\\$\\(\\$\\|\\([[:alnum:]_]+\\|{[^}]*}\\)\\)?"
+ qstr qpos))
+ (cond
+ ((>= (- (match-beginning 0) qpos) upos) ; UPOS is before current match.
+ (setq qpos (+ qpos upos))
+ (setq upos 0))
+ ((not (match-end 1)) ;A sole $: probably an error.
+ (setq upos (- upos (- (match-end 0) qpos)))
+ (setq qpos (match-end 0)))
+ (t
+ (setq upos (- upos (- (match-beginning 0) qpos)))
+ (setq qpos (match-end 0))
+ (setq upos (- upos (length (substitute-in-file-name
+ (match-string 0 qstr))))))))
+ ;; If `upos' is negative, it's because it's within the expansion of an
+ ;; envvar, i.e. there is no exactly matching qpos, so we just use the next
+ ;; available qpos right after the envvar.
+ (cons (if (>= upos 0) (+ qpos upos) qpos)
+ #'minibuffer--double-dollars)))
+
+(defalias 'completion--file-name-table
+ (completion-table-with-quoting #'completion-file-name-table
+ #'substitute-in-file-name
+ #'completion--sifn-requote)
"Internal subroutine for `read-file-name'. Do not call this.
This is a completion table for file names, like `completion-file-name-table'
-except that it passes the file name through `substitute-in-file-name'."
- (cond
- ((eq (car-safe action) 'boundaries)
- ;; For the boundaries, we can't really delegate to
- ;; substitute-in-file-name+completion-file-name-table and then fix
- ;; them up (as we do for the other actions), because it would
- ;; require us to track the relationship between `str' and
- ;; `string', which is difficult. And in any case, if
- ;; substitute-in-file-name turns "fo-$TO-ba" into "fo-o/b-ba",
- ;; there's no way for us to return proper boundaries info, because
- ;; the boundary is not (yet) in `string'.
- ;;
- ;; FIXME: Actually there is a way to return correct boundaries
- ;; info, at the condition of modifying the all-completions
- ;; return accordingly. But for now, let's not bother.
- (completion-file-name-table string pred action))
-
- (t
- (let* ((default-directory
- (if (stringp pred)
- ;; It used to be that `pred' was abused to pass `dir'
- ;; as an argument.
- (prog1 (file-name-as-directory (expand-file-name pred))
- (setq pred nil))
- default-directory))
- (str (condition-case nil
- (substitute-in-file-name string)
- (error string)))
- (comp (completion-file-name-table
- str
- (with-no-warnings (or pred read-file-name-predicate))
- action)))
-
- (cond
- ((stringp comp)
- ;; Requote the $s before returning the completion.
- (minibuffer--double-dollars comp))
- ((and (null action) comp
- ;; Requote the $s before checking for changes.
- (setq str (minibuffer--double-dollars str))
- (not (string-equal string str)))
- ;; If there's no real completion, but substitute-in-file-name
- ;; changed the string, then return the new string.
- str)
- (t comp))))))
+except that it passes the file name through `substitute-in-file-name'.")
(defalias 'read-file-name-internal
- (completion-table-in-turn 'completion--embedded-envvar-table
- 'completion--file-name-table)
+ (completion-table-in-turn #'completion--embedded-envvar-table
+ #'completion--file-name-table)
"Internal subroutine for `read-file-name'. Do not call this.")
(defvar read-file-name-function 'read-file-name-default
@@ -2073,7 +2317,7 @@ and `read-file-name-function'."
;; use (eq minibuffer-completion-table #'read-file-name-internal), which is
;; probably even worse. Maybe We should add some read-file-name-setup-hook
;; instead, but for now, let's keep this non-obsolete.
-;;(make-obsolete-variable 'minibuffer-completing-file-name nil "24.1" 'get)
+;;(make-obsolete-variable 'minibuffer-completing-file-name nil "future" 'get)
(defun read-file-name-default (prompt &optional dir default-filename mustmatch initial predicate)
"Default method for reading file names.
diff --git a/lisp/mouse.el b/lisp/mouse.el
index 8e08f89f22c..f40a0199525 100644
--- a/lisp/mouse.el
+++ b/lisp/mouse.el
@@ -298,7 +298,7 @@ Use the former if the menu bar is showing, otherwise the latter."
(let ((w (posn-window (event-start event))))
(and (window-minibuffer-p w)
(not (minibuffer-window-active-p w))
- (error "Minibuffer window is not active")))
+ (user-error "Minibuffer window is not active")))
;; Give temporary modes such as isearch a chance to turn off.
(run-hooks 'mouse-leave-buffer-hook))
@@ -403,13 +403,16 @@ must be one of the symbols header, mode, or vertical."
(or mouse-1-click-in-non-selected-windows
(eq window (selected-window)))
(mouse-on-link-p start)))
- (enlarge-minibuffer
+ (resize-minibuffer
+ ;; Resize the minibuffer window if it's on the same frame as
+ ;; and immediately below the position window and it's either
+ ;; active or `resize-mini-windows' is nil.
(and (eq line 'mode)
- (not resize-mini-windows)
(eq (window-frame minibuffer-window) frame)
- (not (one-window-p t frame))
(= (nth 1 (window-edges minibuffer-window))
- (nth 3 (window-edges window)))))
+ (nth 3 (window-edges window)))
+ (or (not resize-mini-windows)
+ (eq minibuffer-window (active-minibuffer-window)))))
(which-side
(and (eq line 'vertical)
(or (cdr (assq 'vertical-scroll-bars (frame-parameters frame)))
@@ -424,7 +427,7 @@ must be one of the symbols header, mode, or vertical."
((eq line 'mode)
;; Check whether mode-line can be dragged at all.
(when (and (window-at-side-p window 'bottom)
- (not enlarge-minibuffer))
+ (not resize-minibuffer))
(setq done t)))
((eq line 'vertical)
;; Get the window to adjust for the vertical case.
@@ -498,13 +501,9 @@ must be one of the symbols header, mode, or vertical."
;; Remember that we dragged.
(setq dragged t))
- (cond
- (enlarge-minibuffer
- (adjust-window-trailing-edge window growth))
- ((eq line 'mode)
- (adjust-window-trailing-edge window growth))
- (t
- (adjust-window-trailing-edge window (- growth)))))))
+ (if (eq line 'mode)
+ (adjust-window-trailing-edge window growth)
+ (adjust-window-trailing-edge window (- growth))))))
;; Presumably, if this was just a click, the last event should be
;; `mouse-1', whereas if this did move the mouse, it should be a
diff --git a/lisp/mpc.el b/lisp/mpc.el
index d2203a4deab..a908e4bedac 100644
--- a/lisp/mpc.el
+++ b/lisp/mpc.el
@@ -95,7 +95,7 @@
(eval-when-compile (require 'cl))
(defgroup mpc ()
- "A Client for the Music Player Daemon."
+ "Client for the Music Player Daemon (mpd)."
:prefix "mpc-"
:group 'multimedia
:group 'applications)
@@ -406,7 +406,7 @@ which will be concatenated with proper quoting before passing them to MPD."
(funcall callback (prog1 (mpc-proc-buf-to-alist
(current-buffer))
(set-buffer buf))))))
- ;; (lexical-let ((res nil))
+ ;; (let ((res nil))
;; (mpc-proc-cmd-to-alist cmd (lambda (alist) (setq res alist)))
;; (mpc-proc-sync)
;; res)
diff --git a/lisp/net/ange-ftp.el b/lisp/net/ange-ftp.el
index 455836fdae1..447549f58cd 100644
--- a/lisp/net/ange-ftp.el
+++ b/lisp/net/ange-ftp.el
@@ -671,8 +671,7 @@
;;;; ------------------------------------------------------------
(defgroup ange-ftp nil
- "Accessing remote files and directories using FTP
- made as simple and transparent as possible."
+ "Accessing remote files and directories using FTP."
:group 'files
:group 'comm
:prefix "ange-ftp-")
diff --git a/lisp/net/browse-url.el b/lisp/net/browse-url.el
index 62c0e317a81..f4e7e942931 100644
--- a/lisp/net/browse-url.el
+++ b/lisp/net/browse-url.el
@@ -642,7 +642,7 @@ CHARS is a regexp-like character alternative (e.g., \"[)$]\")."
(s 0))
(while (setq s (string-match chars encoded-text s))
(setq encoded-text
- (replace-match (format "%%%x"
+ (replace-match (format "%%%X"
(string-to-char (match-string 0 encoded-text)))
t t encoded-text)
s (1+ s)))
@@ -655,7 +655,7 @@ regarding its parameter treatment."
;; FIXME: Is there an actual example of a web browser getting
;; confused? (This used to encode commas, but at least Firefox
;; handles commas correctly and doesn't accept encoded commas.)
- (browse-url-url-encode-chars url "[)$]"))
+ (browse-url-url-encode-chars url "[\")$] "))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; URL input
diff --git a/lisp/net/dbus.el b/lisp/net/dbus.el
index e3144a53fab..c83651b41b5 100644
--- a/lisp/net/dbus.el
+++ b/lisp/net/dbus.el
@@ -28,19 +28,19 @@
;; Low-level language bindings are implemented in src/dbusbind.c.
+;; D-Bus support in the Emacs core can be disabled with configuration
+;; option "--without-dbus".
+
;;; Code:
-;; D-Bus support in the Emacs core can be disabled with configuration
-;; option "--without-dbus". Declare used subroutines and variables.
-(declare-function dbus-call-method "dbusbind.c")
-(declare-function dbus-call-method-asynchronously "dbusbind.c")
+;; Declare used subroutines and variables.
+(declare-function dbus-message-internal "dbusbind.c")
(declare-function dbus-init-bus "dbusbind.c")
-(declare-function dbus-method-return-internal "dbusbind.c")
-(declare-function dbus-method-error-internal "dbusbind.c")
-(declare-function dbus-register-service "dbusbind.c")
-(declare-function dbus-register-signal "dbusbind.c")
-(declare-function dbus-register-method "dbusbind.c")
-(declare-function dbus-send-signal "dbusbind.c")
+(defvar dbus-message-type-invalid)
+(defvar dbus-message-type-method-call)
+(defvar dbus-message-type-method-return)
+(defvar dbus-message-type-error)
+(defvar dbus-message-type-signal)
(defvar dbus-debug)
(defvar dbus-registered-objects-table)
@@ -56,39 +56,93 @@
(defconst dbus-path-dbus "/org/freedesktop/DBus"
"The object path used to talk to the bus itself.")
+;; Default D-Bus interfaces.
+
(defconst dbus-interface-dbus "org.freedesktop.DBus"
- "The interface exported by the object with `dbus-service-dbus' and `dbus-path-dbus'.")
+ "The interface exported by the service `dbus-service-dbus'.")
(defconst dbus-interface-peer (concat dbus-interface-dbus ".Peer")
- "The interface for peer objects.")
+ "The interface for peer objects.
+See URL `http://dbus.freedesktop.org/doc/dbus-specification.html#standard-interfaces-peer'.")
+
+;; <interface name="org.freedesktop.DBus.Peer">
+;; <method name="Ping">
+;; </method>
+;; <method name="GetMachineId">
+;; <arg name="machine_uuid" type="s" direction="out"/>
+;; </method>
+;; </interface>
(defconst dbus-interface-introspectable
(concat dbus-interface-dbus ".Introspectable")
- "The interface supported by introspectable objects.")
+ "The interface supported by introspectable objects.
+See URL `http://dbus.freedesktop.org/doc/dbus-specification.html#standard-interfaces-introspectable'.")
-(defconst dbus-interface-properties (concat dbus-interface-dbus ".Properties")
- "The interface for property objects.")
+;; <interface name="org.freedesktop.DBus.Introspectable">
+;; <method name="Introspect">
+;; <arg name="data" type="s" direction="out"/>
+;; </method>
+;; </interface>
+(defconst dbus-interface-properties (concat dbus-interface-dbus ".Properties")
+ "The interface for property objects.
+See URL `http://dbus.freedesktop.org/doc/dbus-specification.html#standard-interfaces-properties'.")
+
+;; <interface name="org.freedesktop.DBus.Properties">
+;; <method name="Get">
+;; <arg name="interface" type="s" direction="in"/>
+;; <arg name="propname" type="s" direction="in"/>
+;; <arg name="value" type="v" direction="out"/>
+;; </method>
+;; <method name="Set">
+;; <arg name="interface" type="s" direction="in"/>
+;; <arg name="propname" type="s" direction="in"/>
+;; <arg name="value" type="v" direction="in"/>
+;; </method>
+;; <method name="GetAll">
+;; <arg name="interface" type="s" direction="in"/>
+;; <arg name="props" type="a{sv}" direction="out"/>
+;; </method>
+;; <signal name="PropertiesChanged">
+;; <arg name="interface" type="s"/>
+;; <arg name="changed_properties" type="a{sv}"/>
+;; <arg name="invalidated_properties" type="as"/>
+;; </signal>
+;; </interface>
+
+(defconst dbus-interface-objectmanager
+ (concat dbus-interface-dbus ".ObjectManager")
+ "The object manager interface.
+See URL `http://dbus.freedesktop.org/doc/dbus-specification.html#standard-interfaces-objectmanager'.")
+
+;; <interface name="org.freedesktop.DBus.ObjectManager">
+;; <method name="GetManagedObjects">
+;; <arg name="object_paths_interfaces_and_properties"
+;; type="a{oa{sa{sv}}}" direction="out"/>
+;; </method>
+;; <signal name="InterfacesAdded">
+;; <arg name="object_path" type="o"/>
+;; <arg name="interfaces_and_properties" type="a{sa{sv}}"/>
+;; </signal>
+;; <signal name="InterfacesRemoved">
+;; <arg name="object_path" type="o"/>
+;; <arg name="interfaces" type="as"/>
+;; </signal>
+;; </interface>
+
+;; Emacs defaults.
(defconst dbus-service-emacs "org.gnu.Emacs"
"The well known service name of Emacs.")
(defconst dbus-path-emacs "/org/gnu/Emacs"
- "The object path head used by Emacs.")
+ "The object path namespace used by Emacs.
+All object paths provided by the service `dbus-service-emacs'
+shall be subdirectories of this path.")
-(defconst dbus-message-type-invalid 0
- "This value is never a valid message type.")
+(defconst dbus-interface-emacs "org.gnu.Emacs"
+ "The interface namespace used by Emacs.")
-(defconst dbus-message-type-method-call 1
- "Message type of a method call message.")
-
-(defconst dbus-message-type-method-return 2
- "Message type of a method return message.")
-
-(defconst dbus-message-type-error 3
- "Message type of an error reply message.")
-
-(defconst dbus-message-type-signal 4
- "Message type of a signal message.")
+;; D-Bus constants.
(defmacro dbus-ignore-errors (&rest body)
"Execute BODY; signal D-Bus error when `dbus-debug' is non-nil.
@@ -105,15 +159,271 @@ Every function must accept two arguments, the event and the error variable
caught in `condition-case' by `dbus-error'.")
-;;; Hash table of registered functions.
+;;; Basic D-Bus message functions.
(defvar dbus-return-values-table (make-hash-table :test 'equal)
"Hash table for temporary storing arguments of reply messages.
-A key in this hash table is a list (BUS SERIAL). BUS is either a
-Lisp symbol, `:system' or `:session', or a string denoting the
-bus address. SERIAL is the serial number of the reply message.
-See `dbus-call-method-non-blocking-handler' and
-`dbus-call-method-non-blocking'.")
+A key in this hash table is a list (:serial BUS SERIAL), like in
+`dbus-registered-objects-table'. BUS is either a Lisp symbol,
+`:system' or `:session', or a string denoting the bus address.
+SERIAL is the serial number of the reply message.")
+
+(defun dbus-call-method-handler (&rest args)
+ "Handler for reply messages of asynchronous D-Bus message calls.
+It calls the function stored in `dbus-registered-objects-table'.
+The result will be made available in `dbus-return-values-table'."
+ (puthash (list :serial
+ (dbus-event-bus-name last-input-event)
+ (dbus-event-serial-number last-input-event))
+ (if (= (length args) 1) (car args) args)
+ dbus-return-values-table))
+
+(defun dbus-call-method (bus service path interface method &rest args)
+ "Call METHOD on the D-Bus BUS.
+
+BUS is either a Lisp symbol, `:system' or `:session', or a string
+denoting the bus address.
+
+SERVICE is the D-Bus service name to be used. PATH is the D-Bus
+object path SERVICE is registered at. INTERFACE is an interface
+offered by SERVICE. It must provide METHOD.
+
+If the parameter `:timeout' is given, the following integer TIMEOUT
+specifies the maximum number of milliseconds the method call must
+return. The default value is 25,000. If the method call doesn't
+return in time, a D-Bus error is raised.
+
+All other arguments ARGS are passed to METHOD as arguments. They are
+converted into D-Bus types via the following rules:
+
+ t and nil => DBUS_TYPE_BOOLEAN
+ number => DBUS_TYPE_UINT32
+ integer => DBUS_TYPE_INT32
+ float => DBUS_TYPE_DOUBLE
+ string => DBUS_TYPE_STRING
+ list => DBUS_TYPE_ARRAY
+
+All arguments can be preceded by a type symbol. For details about
+type symbols, see Info node `(dbus)Type Conversion'.
+
+`dbus-call-method' returns the resulting values of METHOD as a list of
+Lisp objects. The type conversion happens the other direction as for
+input arguments. It follows the mapping rules:
+
+ DBUS_TYPE_BOOLEAN => t or nil
+ DBUS_TYPE_BYTE => number
+ DBUS_TYPE_UINT16 => number
+ DBUS_TYPE_INT16 => integer
+ DBUS_TYPE_UINT32 => number or float
+ DBUS_TYPE_UNIX_FD => number or float
+ DBUS_TYPE_INT32 => integer or float
+ DBUS_TYPE_UINT64 => number or float
+ DBUS_TYPE_INT64 => integer or float
+ DBUS_TYPE_DOUBLE => float
+ DBUS_TYPE_STRING => string
+ DBUS_TYPE_OBJECT_PATH => string
+ DBUS_TYPE_SIGNATURE => string
+ DBUS_TYPE_ARRAY => list
+ DBUS_TYPE_VARIANT => list
+ DBUS_TYPE_STRUCT => list
+ DBUS_TYPE_DICT_ENTRY => list
+
+Example:
+
+\(dbus-call-method
+ :session \"org.gnome.seahorse\" \"/org/gnome/seahorse/keys/openpgp\"
+ \"org.gnome.seahorse.Keys\" \"GetKeyField\"
+ \"openpgp:657984B8C7A966DD\" \"simple-name\")
+
+ => (t (\"Philip R. Zimmermann\"))
+
+If the result of the METHOD call is just one value, the converted Lisp
+object is returned instead of a list containing this single Lisp object.
+
+\(dbus-call-method
+ :system \"org.freedesktop.Hal\" \"/org/freedesktop/Hal/devices/computer\"
+ \"org.freedesktop.Hal.Device\" \"GetPropertyString\"
+ \"system.kernel.machine\")
+
+ => \"i686\""
+
+ (or (memq bus '(:system :session)) (stringp bus)
+ (signal 'wrong-type-argument (list 'keywordp bus)))
+ (or (stringp service)
+ (signal 'wrong-type-argument (list 'stringp service)))
+ (or (stringp path)
+ (signal 'wrong-type-argument (list 'stringp path)))
+ (or (stringp interface)
+ (signal 'wrong-type-argument (list 'stringp interface)))
+ (or (stringp method)
+ (signal 'wrong-type-argument (list 'stringp method)))
+
+ (let ((timeout (plist-get args :timeout))
+ (key
+ (apply
+ 'dbus-message-internal dbus-message-type-method-call
+ bus service path interface method 'dbus-call-method-handler args)))
+
+ ;; Wait until `dbus-call-method-handler' has put the result into
+ ;; `dbus-return-values-table'. If no timeout is given, use the
+ ;; default 25". Events which are not from D-Bus must be restored.
+ (with-timeout ((if timeout (/ timeout 1000.0) 25))
+ (while (eq (gethash key dbus-return-values-table :ignore) :ignore)
+ (let ((event (let (unread-command-events) (read-event))))
+ (when (and event (not (ignore-errors (dbus-check-event event))))
+ (setq unread-command-events
+ (append unread-command-events (list event)))))))
+
+ ;; Cleanup `dbus-return-values-table'. Return the result.
+ (prog1
+ (gethash key dbus-return-values-table)
+ (remhash key dbus-return-values-table))))
+
+;; `dbus-call-method' works non-blocking now.
+(defalias 'dbus-call-method-non-blocking 'dbus-call-method)
+(make-obsolete 'dbus-call-method-non-blocking 'dbus-call-method "24.2")
+
+(defun dbus-call-method-asynchronously
+ (bus service path interface method handler &rest args)
+ "Call METHOD on the D-Bus BUS asynchronously.
+
+BUS is either a Lisp symbol, `:system' or `:session', or a string
+denoting the bus address.
+
+SERVICE is the D-Bus service name to be used. PATH is the D-Bus
+object path SERVICE is registered at. INTERFACE is an interface
+offered by SERVICE. It must provide METHOD.
+
+HANDLER is a Lisp function, which is called when the corresponding
+return message has arrived. If HANDLER is nil, no return message
+will be expected.
+
+If the parameter `:timeout' is given, the following integer TIMEOUT
+specifies the maximum number of milliseconds the method call must
+return. The default value is 25,000. If the method call doesn't
+return in time, a D-Bus error is raised.
+
+All other arguments ARGS are passed to METHOD as arguments. They are
+converted into D-Bus types via the following rules:
+
+ t and nil => DBUS_TYPE_BOOLEAN
+ number => DBUS_TYPE_UINT32
+ integer => DBUS_TYPE_INT32
+ float => DBUS_TYPE_DOUBLE
+ string => DBUS_TYPE_STRING
+ list => DBUS_TYPE_ARRAY
+
+All arguments can be preceded by a type symbol. For details about
+type symbols, see Info node `(dbus)Type Conversion'.
+
+If HANDLER is a Lisp function, the function returns a key into the
+hash table `dbus-registered-objects-table'. The corresponding entry
+in the hash table is removed, when the return message has been arrived,
+and HANDLER is called.
+
+Example:
+
+\(dbus-call-method-asynchronously
+ :system \"org.freedesktop.Hal\" \"/org/freedesktop/Hal/devices/computer\"
+ \"org.freedesktop.Hal.Device\" \"GetPropertyString\" 'message
+ \"system.kernel.machine\")
+
+ => \(:serial :system 2)
+
+ -| i686"
+
+ (or (memq bus '(:system :session)) (stringp bus)
+ (signal 'wrong-type-argument (list 'keywordp bus)))
+ (or (stringp service)
+ (signal 'wrong-type-argument (list 'stringp service)))
+ (or (stringp path)
+ (signal 'wrong-type-argument (list 'stringp path)))
+ (or (stringp interface)
+ (signal 'wrong-type-argument (list 'stringp interface)))
+ (or (stringp method)
+ (signal 'wrong-type-argument (list 'stringp method)))
+ (or (null handler) (functionp handler)
+ (signal 'wrong-type-argument (list 'functionp handler)))
+
+ (apply 'dbus-message-internal dbus-message-type-method-call
+ bus service path interface method handler args))
+
+(defun dbus-send-signal (bus service path interface signal &rest args)
+ "Send signal SIGNAL on the D-Bus BUS.
+
+BUS is either a Lisp symbol, `:system' or `:session', or a string
+denoting the bus address. The signal is sent from the D-Bus object
+Emacs is registered at BUS.
+
+SERVICE is the D-Bus name SIGNAL is sent to. It can be either a known
+name or a unique name. If SERVICE is nil, the signal is sent as
+broadcast message. PATH is the D-Bus object path SIGNAL is sent from.
+INTERFACE is an interface available at PATH. It must provide signal
+SIGNAL.
+
+All other arguments ARGS are passed to SIGNAL as arguments. They are
+converted into D-Bus types via the following rules:
+
+ t and nil => DBUS_TYPE_BOOLEAN
+ number => DBUS_TYPE_UINT32
+ integer => DBUS_TYPE_INT32
+ float => DBUS_TYPE_DOUBLE
+ string => DBUS_TYPE_STRING
+ list => DBUS_TYPE_ARRAY
+
+All arguments can be preceded by a type symbol. For details about
+type symbols, see Info node `(dbus)Type Conversion'.
+
+Example:
+
+\(dbus-send-signal
+ :session nil \"/org/gnu/Emacs\" \"org.gnu.Emacs.FileManager\"
+ \"FileModified\" \"/home/albinus/.emacs\")"
+
+ (or (memq bus '(:system :session)) (stringp bus)
+ (signal 'wrong-type-argument (list 'keywordp bus)))
+ (or (null service) (stringp service)
+ (signal 'wrong-type-argument (list 'stringp service)))
+ (or (stringp path)
+ (signal 'wrong-type-argument (list 'stringp path)))
+ (or (stringp interface)
+ (signal 'wrong-type-argument (list 'stringp interface)))
+ (or (stringp signal)
+ (signal 'wrong-type-argument (list 'stringp signal)))
+
+ (apply 'dbus-message-internal dbus-message-type-signal
+ bus service path interface signal args))
+
+(defun dbus-method-return-internal (bus service serial &rest args)
+ "Return for message SERIAL on the D-Bus BUS.
+This is an internal function, it shall not be used outside dbus.el."
+
+ (or (memq bus '(:system :session)) (stringp bus)
+ (signal 'wrong-type-argument (list 'keywordp bus)))
+ (or (stringp service)
+ (signal 'wrong-type-argument (list 'stringp service)))
+ (or (natnump serial)
+ (signal 'wrong-type-argument (list 'natnump serial)))
+
+ (apply 'dbus-message-internal dbus-message-type-method-return
+ bus service serial args))
+
+(defun dbus-method-error-internal (bus service serial &rest args)
+ "Return error message for message SERIAL on the D-Bus BUS.
+This is an internal function, it shall not be used outside dbus.el."
+
+ (or (memq bus '(:system :session)) (stringp bus)
+ (signal 'wrong-type-argument (list 'keywordp bus)))
+ (or (stringp service)
+ (signal 'wrong-type-argument (list 'stringp service)))
+ (or (natnump serial)
+ (signal 'wrong-type-argument (list 'natnump serial)))
+
+ (apply 'dbus-message-internal dbus-message-type-error
+ bus service serial args))
+
+
+;;; Hash table of registered functions.
(defun dbus-list-hash-table ()
"Returns all registered member registrations to D-Bus.
@@ -126,69 +436,78 @@ hash table."
dbus-registered-objects-table)
result))
-(defun dbus-unregister-object (object)
- "Unregister OBJECT from D-Bus.
-OBJECT must be the result of a preceding `dbus-register-method',
-`dbus-register-property' or `dbus-register-signal' call. It
-returns `t' if OBJECT has been unregistered, `nil' otherwise.
+(defun dbus-setenv (bus variable value)
+ "Set the value of the BUS environment variable named VARIABLE to VALUE.
-When OBJECT identifies the last method or property, which is
-registered for the respective service, Emacs releases its
-association to the service from D-Bus."
- ;; Check parameter.
- (unless (and (consp object) (not (null (car object))) (consp (cdr object)))
- (signal 'wrong-type-argument (list 'D-Bus object)))
+BUS is either a Lisp symbol, `:system' or `:session', or a string
+denoting the bus address. Both VARIABLE and VALUE should be strings.
- ;; Find the corresponding entry in the hash table.
- (let* ((key (car object))
- (value (cadr object))
- (bus (car key))
- (service (car value))
- (entry (gethash key dbus-registered-objects-table))
- ret)
- ;; key has the structure (BUS INTERFACE MEMBER).
- ;; value has the structure (SERVICE PATH [HANDLER]).
- ;; entry has the structure ((UNAME SERVICE PATH MEMBER [RULE]) ...).
- ;; MEMBER is either a string (the handler), or a cons cell (a
- ;; property value). UNAME and property values are not taken into
- ;; account for comparison.
+Normally, services inherit the environment of the BUS daemon. This
+function adds to or modifies that environment when activating services.
- ;; Loop over the registered functions.
- (dolist (elt entry)
- (when (equal
- value
- (butlast (cdr elt) (- (length (cdr elt)) (length value))))
- (setq ret t)
- ;; Compute new hash value. If it is empty, remove it from the
- ;; hash table.
- (unless (puthash key (delete elt entry) dbus-registered-objects-table)
- (remhash key dbus-registered-objects-table))
- ;; Remove match rule of signals.
- (let ((rule (nth 4 elt)))
- (when (stringp rule)
- (setq service nil) ; We do not need to unregister the service.
- (dbus-call-method
- bus dbus-service-dbus dbus-path-dbus dbus-interface-dbus
- "RemoveMatch" rule)))))
- ;; Check, whether there is still a registered function or property
- ;; for the given service. If not, unregister the service from the
- ;; bus.
- (when service
- (dolist (elt entry)
- (let (found)
- (maphash
- (lambda (k v)
- (dolist (e v)
- (ignore-errors
- (when (and (equal bus (car k)) (string-equal service (cadr e)))
- (setq found t)))))
- dbus-registered-objects-table)
- (unless found
- (dbus-call-method
- bus dbus-service-dbus dbus-path-dbus dbus-interface-dbus
- "ReleaseName" service)))))
- ;; Return.
- ret))
+Some bus instances, such as `:system', may disable setting the environment."
+ (dbus-call-method
+ bus dbus-service-dbus dbus-path-dbus
+ dbus-interface-dbus "UpdateActivationEnvironment"
+ `(:array (:dict-entry ,variable ,value))))
+
+(defun dbus-register-service (bus service &rest flags)
+ "Register known name SERVICE on the D-Bus BUS.
+
+BUS is either a Lisp symbol, `:system' or `:session', or a string
+denoting the bus address.
+
+SERVICE is the D-Bus service name that should be registered. It must
+be a known name.
+
+FLAGS are keywords, which control how the service name is registered.
+The following keywords are recognized:
+
+`:allow-replacement': Allow another service to become the primary
+owner if requested.
+
+`:replace-existing': Request to replace the current primary owner.
+
+`:do-not-queue': If we can not become the primary owner do not place
+us in the queue.
+
+The function returns a keyword, indicating the result of the
+operation. One of the following keywords is returned:
+
+`:primary-owner': Service has become the primary owner of the
+requested name.
+
+`:in-queue': Service could not become the primary owner and has been
+placed in the queue.
+
+`:exists': Service is already in the queue.
+
+`:already-owner': Service is already the primary owner."
+
+ ;; Add ObjectManager handler.
+ (dbus-register-method
+ bus service nil dbus-interface-objectmanager "GetManagedObjects"
+ 'dbus-managed-objects-handler 'dont-register)
+
+ (let ((arg 0)
+ reply)
+ (dolist (flag flags)
+ (setq arg
+ (+ arg
+ (case flag
+ (:allow-replacement 1)
+ (:replace-existing 2)
+ (:do-not-queue 4)
+ (t (signal 'wrong-type-argument (list flag)))))))
+ (setq reply (dbus-call-method
+ bus dbus-service-dbus dbus-path-dbus dbus-interface-dbus
+ "RequestName" service arg))
+ (case reply
+ (1 :primary-owner)
+ (2 :in-queue)
+ (3 :exists)
+ (4 :already-owner)
+ (t (signal 'dbus-error (list "Could not register service" service))))))
(defun dbus-unregister-service (bus service)
"Unregister all objects related to SERVICE from D-Bus BUS.
@@ -209,7 +528,7 @@ queue of this service."
(lambda (key value)
(dolist (elt value)
(ignore-errors
- (when (and (equal bus (car key)) (string-equal service (cadr elt)))
+ (when (and (equal bus (cadr key)) (string-equal service (cadr elt)))
(unless
(puthash key (delete elt value) dbus-registered-objects-table)
(remhash key dbus-registered-objects-table))))))
@@ -223,94 +542,274 @@ queue of this service."
(3 :not-owner)
(t (signal 'dbus-error (list "Could not unregister service" service))))))
-(defun dbus-call-method-non-blocking-handler (&rest args)
- "Handler for reply messages of asynchronous D-Bus message calls.
-It calls the function stored in `dbus-registered-objects-table'.
-The result will be made available in `dbus-return-values-table'."
- (puthash (list (dbus-event-bus-name last-input-event)
- (dbus-event-serial-number last-input-event))
- (if (= (length args) 1) (car args) args)
- dbus-return-values-table))
+(defun dbus-register-signal
+ (bus service path interface signal handler &rest args)
+ "Register for a signal on the D-Bus BUS.
-(defun dbus-call-method-non-blocking
- (bus service path interface method &rest args)
- "Call METHOD on the D-Bus BUS, but don't block the event queue.
-This is necessary for communicating to registered D-Bus methods,
-which are running in the same Emacs process.
+BUS is either a Lisp symbol, `:system' or `:session', or a string
+denoting the bus address.
-The arguments are the same as in `dbus-call-method'.
+SERVICE is the D-Bus service name used by the sending D-Bus object.
+It can be either a known name or the unique name of the D-Bus object
+sending the signal.
+
+PATH is the D-Bus object path SERVICE is registered. INTERFACE
+is an interface offered by SERVICE. It must provide SIGNAL.
+HANDLER is a Lisp function to be called when the signal is
+received. It must accept as arguments the values SIGNAL is
+sending.
+
+SERVICE, PATH, INTERFACE and SIGNAL can be nil. This is
+interpreted as a wildcard for the respective argument.
+
+The remaining arguments ARGS can be keywords or keyword string pairs.
+The meaning is as follows:
+
+`:argN' STRING:
+`:pathN' STRING: This stands for the Nth argument of the
+signal. `:pathN' arguments can be used for object path wildcard
+matches as specified by D-Bus, while an `:argN' argument
+requires an exact match.
+
+`:arg-namespace' STRING: Register for the signals, which first
+argument defines the service or interface namespace STRING.
+
+`:path-namespace' STRING: Register for the object path namespace
+STRING. All signals sent from an object path, which has STRING as
+the preceding string, are matched. This requires PATH to be nil.
+
+`:eavesdrop': Register for unicast signals which are not directed
+to the D-Bus object Emacs is registered at D-Bus BUS, if the
+security policy of BUS allows this.
+
+Example:
+
+\(defun my-signal-handler (device)
+ (message \"Device %s added\" device))
+
+\(dbus-register-signal
+ :system \"org.freedesktop.Hal\" \"/org/freedesktop/Hal/Manager\"
+ \"org.freedesktop.Hal.Manager\" \"DeviceAdded\" 'my-signal-handler)
+
+ => \(\(:signal :system \"org.freedesktop.Hal.Manager\" \"DeviceAdded\")
+ \(\"org.freedesktop.Hal\" \"/org/freedesktop/Hal/Manager\" my-signal-handler))
+
+`dbus-register-signal' returns an object, which can be used in
+`dbus-unregister-object' for removing the registration."
+
+ (let ((counter 0)
+ (rule "type='signal'")
+ uname key key1 value)
+
+ ;; Retrieve unique name of service. If service is a known name,
+ ;; we will register for the corresponding unique name, if any.
+ ;; Signals are sent always with the unique name as sender. Note:
+ ;; the unique name of `dbus-service-dbus' is that string itself.
+ (if (and (stringp service)
+ (not (zerop (length service)))
+ (not (string-equal service dbus-service-dbus))
+ (not (string-match "^:" service)))
+ (setq uname (dbus-get-name-owner bus service))
+ (setq uname service))
+
+ (setq rule (concat rule
+ (when uname (format ",sender='%s'" uname))
+ (when interface (format ",interface='%s'" interface))
+ (when signal (format ",member='%s'" signal))
+ (when path (format ",path='%s'" path))))
+
+ ;; Add arguments to the rule.
+ (if (or (stringp (car args)) (null (car args)))
+ ;; As backward compatibility option, we allow just strings.
+ (dolist (arg args)
+ (if (stringp arg)
+ (setq rule (concat rule (format ",arg%d='%s'" counter arg)))
+ (if arg (signal 'wrong-type-argument (list "Wrong argument" arg))))
+ (setq counter (1+ counter)))
+
+ ;; Parse keywords.
+ (while args
+ (setq
+ key (car args)
+ rule (concat
+ rule
+ (cond
+ ;; `:arg0' .. `:arg63', `:path0' .. `:path63'.
+ ((and (keywordp key)
+ (string-match
+ "^:\\(arg\\|path\\)\\([[:digit:]]+\\)$"
+ (symbol-name key)))
+ (setq counter (match-string 2 (symbol-name key))
+ args (cdr args)
+ value (car args))
+ (unless (and (<= counter 63) (stringp value))
+ (signal 'wrong-type-argument
+ (list "Wrong argument" key value)))
+ (format
+ ",arg%s%s='%s'"
+ counter
+ (if (string-equal (match-string 1 (symbol-name key)) "path")
+ "path" "")
+ value))
+ ;; `:arg-namespace', `:path-namespace'.
+ ((and (keywordp key)
+ (string-match
+ "^:\\(arg\\|path\\)-namespace$" (symbol-name key)))
+ (setq args (cdr args)
+ value (car args))
+ (unless (stringp value)
+ (signal 'wrong-type-argument
+ (list "Wrong argument" key value)))
+ (format
+ ",%s='%s'"
+ (if (string-equal (match-string 1 (symbol-name key)) "path")
+ "path_namespace" "arg0namespace")
+ value))
+ ;; `:eavesdrop'.
+ ((eq key :eavesdrop)
+ ",eavesdrop='true'")
+ (t (signal 'wrong-type-argument (list "Wrong argument" key)))))
+ args (cdr args))))
+
+ ;; Add the rule to the bus.
+ (condition-case err
+ (dbus-call-method
+ bus dbus-service-dbus dbus-path-dbus dbus-interface-dbus
+ "AddMatch" rule)
+ (dbus-error
+ (if (not (string-match "eavesdrop" rule))
+ (signal (car err) (cdr err))
+ ;; The D-Bus spec says we shall fall back to a rule without eavesdrop.
+ (when dbus-debug (message "Removing eavesdrop from rule %s" rule))
+ (setq rule (replace-regexp-in-string ",eavesdrop='true'" "" rule))
+ (dbus-call-method
+ bus dbus-service-dbus dbus-path-dbus dbus-interface-dbus
+ "AddMatch" rule))))
-usage: (dbus-call-method-non-blocking
- BUS SERVICE PATH INTERFACE METHOD
- &optional :timeout TIMEOUT &rest ARGS)"
+ (when dbus-debug (message "Matching rule \"%s\" created" rule))
- (let ((key
- (apply
- 'dbus-call-method-asynchronously
- bus service path interface method
- 'dbus-call-method-non-blocking-handler args)))
- ;; Wait until `dbus-call-method-non-blocking-handler' has put the
- ;; result into `dbus-return-values-table'.
- (while (eq (gethash key dbus-return-values-table :ignore) :ignore)
- (read-event nil nil 0.1))
+ ;; Create a hash table entry.
+ (setq key (list :signal bus interface signal)
+ key1 (list uname service path handler rule)
+ value (gethash key dbus-registered-objects-table))
+ (unless (member key1 value)
+ (puthash key (cons key1 value) dbus-registered-objects-table))
- ;; Cleanup `dbus-return-values-table'. Return the result.
- (prog1
- (gethash key dbus-return-values-table nil)
- (remhash key dbus-return-values-table))))
+ ;; Return the object.
+ (list key (list service path handler))))
-(defun dbus-name-owner-changed-handler (&rest args)
- "Reapplies all member registrations to D-Bus.
-This handler is applied when a \"NameOwnerChanged\" signal has
-arrived. SERVICE is the object name for which the name owner has
-been changed. OLD-OWNER is the previous owner of SERVICE, or the
-empty string if SERVICE was not owned yet. NEW-OWNER is the new
-owner of SERVICE, or the empty string if SERVICE loses any name owner.
-
-usage: (dbus-name-owner-changed-handler service old-owner new-owner)"
- (save-match-data
- ;; Check the arguments. We should silently ignore it when they
- ;; are wrong.
- (if (and (= (length args) 3)
- (stringp (car args))
- (stringp (cadr args))
- (stringp (caddr args)))
- (let ((service (car args))
- (old-owner (cadr args)))
- ;; Check whether SERVICE is a known name.
- (when (not (string-match "^:" service))
- (maphash
- (lambda (key value)
- (dolist (elt value)
- ;; key has the structure (BUS INTERFACE MEMBER).
- ;; elt has the structure (UNAME SERVICE PATH HANDLER).
- (when (string-equal old-owner (car elt))
- ;; Remove old key, and add new entry with changed name.
- (dbus-unregister-object (list key (cdr elt)))
- ;; Maybe we could arrange the lists a little bit better
- ;; that we don't need to extract every single element?
- (dbus-register-signal
- ;; BUS SERVICE PATH
- (nth 0 key) (nth 1 elt) (nth 2 elt)
- ;; INTERFACE MEMBER HANDLER
- (nth 1 key) (nth 2 key) (nth 3 elt)))))
- (copy-hash-table dbus-registered-objects-table))))
- ;; The error is reported only in debug mode.
- (when dbus-debug
- (signal
- 'dbus-error
- (cons
- (format "Wrong arguments of %s.NameOwnerChanged" dbus-interface-dbus)
- args))))))
-
-;; Register the handler.
-(when nil ;ignore-errors
- (dbus-register-signal
- :system dbus-service-dbus dbus-path-dbus dbus-interface-dbus
- "NameOwnerChanged" 'dbus-name-owner-changed-handler)
- (dbus-register-signal
- :session dbus-service-dbus dbus-path-dbus dbus-interface-dbus
- "NameOwnerChanged" 'dbus-name-owner-changed-handler))
+(defun dbus-register-method
+ (bus service path interface method handler &optional dont-register-service)
+ "Register for method METHOD on the D-Bus BUS.
+
+BUS is either a Lisp symbol, `:system' or `:session', or a string
+denoting the bus address.
+
+SERVICE is the D-Bus service name of the D-Bus object METHOD is
+registered for. It must be a known name (See discussion of
+DONT-REGISTER-SERVICE below).
+
+PATH is the D-Bus object path SERVICE is registered (See discussion of
+DONT-REGISTER-SERVICE below). INTERFACE is the interface offered by
+SERVICE. It must provide METHOD.
+
+HANDLER is a Lisp function to be called when a method call is
+received. It must accept the input arguments of METHOD. The return
+value of HANDLER is used for composing the returning D-Bus message.
+In case HANDLER shall return a reply message with an empty argument
+list, HANDLER must return the symbol `:ignore'.
+
+When DONT-REGISTER-SERVICE is non-nil, the known name SERVICE is not
+registered. This means that other D-Bus clients have no way of
+noticing the newly registered method. When interfaces are constructed
+incrementally by adding single methods or properties at a time,
+DONT-REGISTER-SERVICE can be used to prevent other clients from
+discovering the still incomplete interface."
+
+ ;; Register SERVICE.
+ (unless (or dont-register-service
+ (member service (dbus-list-names bus)))
+ (dbus-register-service bus service))
+
+ ;; Create a hash table entry. We use nil for the unique name,
+ ;; because the method might be called from anybody.
+ (let* ((key (list :method bus interface method))
+ (key1 (list nil service path handler))
+ (value (gethash key dbus-registered-objects-table)))
+
+ (unless (member key1 value)
+ (puthash key (cons key1 value) dbus-registered-objects-table))
+
+ ;; Return the object.
+ (list key (list service path handler))))
+
+(defun dbus-unregister-object (object)
+ "Unregister OBJECT from D-Bus.
+OBJECT must be the result of a preceding `dbus-register-method',
+`dbus-register-property' or `dbus-register-signal' call. It
+returns `t' if OBJECT has been unregistered, `nil' otherwise.
+
+When OBJECT identifies the last method or property, which is
+registered for the respective service, Emacs releases its
+association to the service from D-Bus."
+ ;; Check parameter.
+ (unless (and (consp object) (not (null (car object))) (consp (cdr object)))
+ (signal 'wrong-type-argument (list 'D-Bus object)))
+
+ ;; Find the corresponding entry in the hash table.
+ (let* ((key (car object))
+ (type (car key))
+ (bus (cadr key))
+ (value (cadr object))
+ (service (car value))
+ (entry (gethash key dbus-registered-objects-table))
+ ret)
+ ;; key has the structure (TYPE BUS INTERFACE MEMBER).
+ ;; value has the structure (SERVICE PATH [HANDLER]).
+ ;; entry has the structure ((UNAME SERVICE PATH MEMBER [RULE]) ...).
+ ;; MEMBER is either a string (the handler), or a cons cell (a
+ ;; property value). UNAME and property values are not taken into
+ ;; account for comparison.
+
+ ;; Loop over the registered functions.
+ (dolist (elt entry)
+ (when (equal
+ value
+ (butlast (cdr elt) (- (length (cdr elt)) (length value))))
+ (setq ret t)
+ ;; Compute new hash value. If it is empty, remove it from the
+ ;; hash table.
+ (unless (puthash key (delete elt entry) dbus-registered-objects-table)
+ (remhash key dbus-registered-objects-table))
+ ;; Remove match rule of signals.
+ (when (eq type :signal)
+ (dbus-call-method
+ bus dbus-service-dbus dbus-path-dbus dbus-interface-dbus
+ "RemoveMatch" (nth 4 elt)))))
+
+ ;; Check, whether there is still a registered function or property
+ ;; for the given service. If not, unregister the service from the
+ ;; bus.
+ (when (and service (memq type '(:method :property))
+ (not (catch :found
+ (progn
+ (maphash
+ (lambda (k v)
+ (dolist (e v)
+ (ignore-errors
+ (and
+ ;; Bus.
+ (equal bus (cadr k))
+ ;; Service.
+ (string-equal service (cadr e))
+ ;; Non-empty object path.
+ (caddr e)
+ (throw :found t)))))
+ dbus-registered-objects-table)
+ nil))))
+ (dbus-unregister-service bus service))
+ ;; Return.
+ ret))
;;; D-Bus type conversion.
@@ -437,9 +936,9 @@ If the HANDLER returns a `dbus-error', it is propagated as return message."
(dbus-ignore-errors
(if (eq result :ignore)
(dbus-method-return-internal
- (nth 1 event) (nth 3 event) (nth 4 event))
+ (nth 1 event) (nth 4 event) (nth 3 event))
(apply 'dbus-method-return-internal
- (nth 1 event) (nth 3 event) (nth 4 event)
+ (nth 1 event) (nth 4 event) (nth 3 event)
(if (consp result) result (list result)))))))
;; Error handling.
(dbus-error
@@ -447,7 +946,7 @@ If the HANDLER returns a `dbus-error', it is propagated as return message."
(when (= dbus-message-type-method-call (nth 2 event))
(dbus-ignore-errors
(dbus-method-error-internal
- (nth 1 event) (nth 3 event) (nth 4 event) (cadr err))))
+ (nth 1 event) (nth 4 event) (nth 3 event) (cadr err))))
;; Propagate D-Bus error messages.
(run-hook-with-args 'dbus-event-error-hooks event err)
(when (or dbus-debug (= dbus-message-type-error (nth 2 event)))
@@ -594,13 +1093,11 @@ denoting the bus address. SERVICE must be a known service name,
and PATH must be a valid object path. The last two parameters
are strings. The result, the introspection data, is a string in
XML format."
- ;; We don't want to raise errors. `dbus-call-method-non-blocking'
- ;; is used, because the handler can be registered in our Emacs
- ;; instance; caller an callee would block each other.
+ ;; We don't want to raise errors.
(dbus-ignore-errors
- (funcall
- (if noninteractive 'dbus-call-method 'dbus-call-method-non-blocking)
- bus service path dbus-interface-introspectable "Introspect")))
+ (dbus-call-method
+ bus service path dbus-interface-introspectable "Introspect"
+ :timeout 1000)))
(defun dbus-introspect-xml (bus service path)
"Return the introspection data of SERVICE in D-Bus BUS at object path PATH.
@@ -854,12 +1351,11 @@ be \"out\"."
It will be checked at BUS, SERVICE, PATH. The result can be any
valid D-Bus value, or `nil' if there is no PROPERTY."
(dbus-ignore-errors
- ;; "Get" returns a variant, so we must use the `car'.
- (car
- (funcall
- (if noninteractive 'dbus-call-method 'dbus-call-method-non-blocking)
- bus service path dbus-interface-properties
- "Get" :timeout 500 interface property))))
+ ;; "Get" returns a variant, so we must use the `car'.
+ (car
+ (dbus-call-method
+ bus service path dbus-interface-properties
+ "Get" :timeout 500 interface property))))
(defun dbus-set-property (bus service path interface property value)
"Set value of PROPERTY of INTERFACE to VALUE.
@@ -867,13 +1363,12 @@ It will be checked at BUS, SERVICE, PATH. When the value has
been set successful, the result is VALUE. Otherwise, `nil' is
returned."
(dbus-ignore-errors
- ;; "Set" requires a variant.
- (funcall
- (if noninteractive 'dbus-call-method 'dbus-call-method-non-blocking)
- bus service path dbus-interface-properties
- "Set" :timeout 500 interface property (list :variant value))
- ;; Return VALUE.
- (dbus-get-property bus service path interface property)))
+ ;; "Set" requires a variant.
+ (dbus-call-method
+ bus service path dbus-interface-properties
+ "Set" :timeout 500 interface property (list :variant value))
+ ;; Return VALUE.
+ (dbus-get-property bus service path interface property)))
(defun dbus-get-all-properties (bus service path interface)
"Return all properties of INTERFACE at BUS, SERVICE, PATH.
@@ -884,10 +1379,7 @@ name of the property, and its value. If there are no properties,
;; "GetAll" returns "a{sv}".
(let (result)
(dolist (dict
- (funcall
- (if noninteractive
- 'dbus-call-method
- 'dbus-call-method-non-blocking)
+ (dbus-call-method
bus service path dbus-interface-properties
"GetAll" :timeout 500 interface)
result)
@@ -931,14 +1423,7 @@ constructed incrementally by adding single methods or properties
at a time, DONT-REGISTER-SERVICE can be used to prevent other
clients from discovering the still incomplete interface."
(unless (member access '(:read :readwrite))
- (signal 'dbus-error (list "Access type invalid" access)))
-
- ;; Register SERVICE.
- (unless (or dont-register-service
- (member service (dbus-list-names bus)))
- (dbus-call-method
- bus dbus-service-dbus dbus-path-dbus dbus-interface-dbus
- "RequestName" service 0))
+ (signal 'wrong-type-argument (list "Access type invalid" access)))
;; Add handlers for the three property-related methods.
(dbus-register-method
@@ -951,20 +1436,20 @@ clients from discovering the still incomplete interface."
bus service path dbus-interface-properties "Set"
'dbus-property-handler 'dont-register)
- ;; Register the name SERVICE with BUS.
- (unless dont-register-service
+ ;; Register SERVICE.
+ (unless (or dont-register-service (member service (dbus-list-names bus)))
(dbus-register-service bus service))
;; Send the PropertiesChanged signal.
(when emits-signal
(dbus-send-signal
bus service path dbus-interface-properties "PropertiesChanged"
- (list (list :dict-entry property (list :variant value)))
+ `((:dict-entry ,property (:variant ,value)))
'(:array)))
;; Create a hash table entry. We use nil for the unique name,
;; because the property might be accessed from anybody.
- (let ((key (list bus interface property))
+ (let ((key (list :property bus interface property))
(val
(list
(list
@@ -979,7 +1464,7 @@ clients from discovering the still incomplete interface."
(defun dbus-property-handler (&rest args)
"Default handler for the \"org.freedesktop.DBus.Properties\" interface.
-It will be registered for all objects created by `dbus-register-object'."
+It will be registered for all objects created by `dbus-register-property'."
(let ((bus (dbus-event-bus-name last-input-event))
(service (dbus-event-service-name last-input-event))
(path (dbus-event-path-name last-input-event))
@@ -989,15 +1474,15 @@ It will be registered for all objects created by `dbus-register-object'."
(cond
;; "Get" returns a variant.
((string-equal method "Get")
- (let ((entry (gethash (list bus interface property)
+ (let ((entry (gethash (list :property bus interface property)
dbus-registered-objects-table)))
(when (string-equal path (nth 2 (car entry)))
- (list (list :variant (cdar (last (car entry))))))))
+ `((:variant ,(cdar (last (car entry))))))))
;; "Set" expects a variant.
((string-equal method "Set")
(let* ((value (caar (cddr args)))
- (entry (gethash (list bus interface property)
+ (entry (gethash (list :property bus interface property)
dbus-registered-objects-table))
;; The value of the hash table is a list; in case of
;; properties it contains just one element (UNAME SERVICE
@@ -1012,7 +1497,7 @@ It will be registered for all objects created by `dbus-register-object'."
(unless (member :readwrite (car object))
(signal 'dbus-error
(list "Property not writable at path" property path)))
- (puthash (list bus interface property)
+ (puthash (list :property bus interface property)
(list (append (butlast (car entry))
(list (cons (car object) value))))
dbus-registered-objects-table)
@@ -1020,7 +1505,7 @@ It will be registered for all objects created by `dbus-register-object'."
(when (member :emits-signal (car object))
(dbus-send-signal
bus service path dbus-interface-properties "PropertiesChanged"
- (list (list :dict-entry property (list :variant value)))
+ `((:dict-entry ,property (:variant ,value)))
'(:array)))
;; Return empty reply.
:ignore))
@@ -1030,7 +1515,7 @@ It will be registered for all objects created by `dbus-register-object'."
(let (result)
(maphash
(lambda (key val)
- (when (and (equal (butlast key) (list bus interface))
+ (when (and (equal (butlast key) (list :property bus interface))
(string-equal path (nth 2 (car val)))
(not (functionp (car (last (car val))))))
(add-to-list
@@ -1042,15 +1527,151 @@ It will be registered for all objects created by `dbus-register-object'."
;; Return the result, or an empty array.
(list :array (or result '(:signature "{sv}"))))))))
+
+;;; D-Bus object manager.
+
+(defun dbus-get-all-managed-objects (bus service path)
+ "Return all objects at BUS, SERVICE, PATH, and the children of PATH.
+The result is a list of objects. Every object is a cons of an
+existing path name, and the list of available interface objects.
+An interface object is another cons, which car is the interface
+name, and the cdr is the list of properties as returned by
+`dbus-get-all-properties' for that path and interface. Example:
+
+\(dbus-get-all-managed-objects :session \"org.gnome.SettingsDaemon\" \"/\")
+
+ => \(\(\"/org/gnome/SettingsDaemon/MediaKeys\"
+ \(\"org.gnome.SettingsDaemon.MediaKeys\")
+ \(\"org.freedesktop.DBus.Peer\")
+ \(\"org.freedesktop.DBus.Introspectable\")
+ \(\"org.freedesktop.DBus.Properties\")
+ \(\"org.freedesktop.DBus.ObjectManager\"))
+ \(\"/org/gnome/SettingsDaemon/Power\"
+ \(\"org.gnome.SettingsDaemon.Power.Keyboard\")
+ \(\"org.gnome.SettingsDaemon.Power.Screen\")
+ \(\"org.gnome.SettingsDaemon.Power\"
+ \(\"Icon\" . \". GThemedIcon battery-full-charged-symbolic \")
+ \(\"Tooltip\" . \"Laptop battery is charged\"))
+ \(\"org.freedesktop.DBus.Peer\")
+ \(\"org.freedesktop.DBus.Introspectable\")
+ \(\"org.freedesktop.DBus.Properties\")
+ \(\"org.freedesktop.DBus.ObjectManager\"))
+ ...)
+
+If possible, \"org.freedesktop.DBus.ObjectManager.GetManagedObjects\"
+is used for retrieving the information. Otherwise, the information
+is collected via \"org.freedesktop.DBus.Introspectable.Introspect\"
+and \"org.freedesktop.DBus.Properties.GetAll\", which is slow."
+ (let ((result
+ ;; Direct call. Fails, if the target does not support the
+ ;; object manager interface.
+ (dbus-ignore-errors
+ (dbus-call-method
+ bus service path dbus-interface-objectmanager
+ "GetManagedObjects" :timeout 1000))))
+
+ (if result
+ ;; Massage the returned structure.
+ (dolist (entry result result)
+ ;; "a{oa{sa{sv}}}".
+ (dolist (entry1 (cdr entry))
+ ;; "a{sa{sv}}".
+ (dolist (entry2 entry1)
+ ;; "a{sv}".
+ (if (cadr entry2)
+ ;; "sv".
+ (dolist (entry3 (cadr entry2))
+ (setcdr entry3 (caadr entry3)))
+ (setcdr entry2 nil)))))
+
+ ;; Fallback: collect the information. Slooow!
+ (dolist (object
+ (dbus-introspect-get-all-nodes bus service path)
+ result)
+ (let (result1)
+ (dolist
+ (interface
+ (dbus-introspect-get-interface-names bus service object)
+ result1)
+ (add-to-list
+ 'result1
+ (cons interface
+ (dbus-get-all-properties bus service object interface))))
+ (when result1
+ (add-to-list 'result (cons object result1))))))))
+
+(defun dbus-managed-objects-handler ()
+ "Default handler for the \"org.freedesktop.DBus.ObjectManager\" interface.
+It will be registered for all objects created by `dbus-register-method'."
+ (let* ((last-input-event last-input-event)
+ (bus (dbus-event-bus-name last-input-event))
+ (service (dbus-event-service-name last-input-event))
+ (path (dbus-event-path-name last-input-event)))
+ ;; "GetManagedObjects" returns "a{oa{sa{sv}}}".
+ (let (interfaces result)
+
+ ;; Check for object path wildcard interfaces.
+ (maphash
+ (lambda (key val)
+ (when (and (equal (butlast key 2) (list :method bus))
+ (null (nth 2 (car-safe val))))
+ (add-to-list 'interfaces (nth 2 key))))
+ dbus-registered-objects-table)
+
+ ;; Check all registered object paths.
+ (maphash
+ (lambda (key val)
+ (let ((object (or (nth 2 (car-safe val)) ""))
+ (interface (nth 2 key)))
+ (when (and (equal (butlast key 2) (list :method bus))
+ (string-prefix-p path object))
+ (dolist (interface (cons (nth 2 key) interfaces))
+ (unless (assoc object result)
+ (add-to-list 'result (list object)))
+ (unless (assoc interface (cdr (assoc object result)))
+ (setcdr
+ (assoc object result)
+ (append
+ (list (cons
+ interface
+ ;; We simulate "org.freedesktop.DBus.Properties.GetAll"
+ ;; by using an appropriate D-Bus event.
+ (let ((last-input-event
+ (append
+ (butlast last-input-event 4)
+ (list object dbus-interface-properties
+ "GetAll" 'dbus-property-handler))))
+ (dbus-property-handler interface))))
+ (cdr (assoc object result)))))))))
+ dbus-registered-objects-table)
+
+ ;; Return the result, or an empty array.
+ (list
+ :array
+ (or
+ (mapcar
+ (lambda (x)
+ (list
+ :dict-entry :object-path (car x)
+ (cons :array (mapcar (lambda (y) (cons :dict-entry y)) (cdr x)))))
+ result)
+ '(:signature "{oa{sa{sv}}}"))))))
+
-;; Initialize :system and :session buses. This adds their file
+;; Initialize `:system' and `:session' buses. This adds their file
;; descriptors to input_wait_mask, in order to detect incoming
;; messages immediately.
(when (featurep 'dbusbind)
(dbus-ignore-errors
- (dbus-init-bus :system)
+ (dbus-init-bus :system))
+ (dbus-ignore-errors
(dbus-init-bus :session)))
(provide 'dbus)
+;;; TODO:
+
+;; * Implement org.freedesktop.DBus.ObjectManager.InterfacesAdded and
+;; org.freedesktop.DBus.ObjectManager.InterfacesRemoved.
+
;;; dbus.el ends here
diff --git a/lisp/net/rlogin.el b/lisp/net/rlogin.el
index ac936ee1429..cef615dc320 100644
--- a/lisp/net/rlogin.el
+++ b/lisp/net/rlogin.el
@@ -114,12 +114,12 @@ this variable is set from that."
(let ((map (if (consp shell-mode-map)
(cons 'keymap shell-mode-map)
(copy-keymap shell-mode-map))))
- (define-key rlogin-mode-map "\C-c\C-c" 'rlogin-send-Ctrl-C)
- (define-key rlogin-mode-map "\C-c\C-d" 'rlogin-send-Ctrl-D)
- (define-key rlogin-mode-map "\C-c\C-z" 'rlogin-send-Ctrl-Z)
- (define-key rlogin-mode-map "\C-c\C-\\" 'rlogin-send-Ctrl-backslash)
- (define-key rlogin-mode-map "\C-d" 'rlogin-delchar-or-send-Ctrl-D)
- (define-key rlogin-mode-map "\C-i" 'rlogin-tab-or-complete)
+ (define-key map "\C-c\C-c" 'rlogin-send-Ctrl-C)
+ (define-key map "\C-c\C-d" 'rlogin-send-Ctrl-D)
+ (define-key map "\C-c\C-z" 'rlogin-send-Ctrl-Z)
+ (define-key map "\C-c\C-\\" 'rlogin-send-Ctrl-backslash)
+ (define-key map "\C-d" 'rlogin-delchar-or-send-Ctrl-D)
+ (define-key map "\C-i" 'rlogin-tab-or-complete)
map)
"Keymap for `rlogin-mode'.")
diff --git a/lisp/net/soap-client.el b/lisp/net/soap-client.el
index e17b283c55f..39369111935 100644
--- a/lisp/net/soap-client.el
+++ b/lisp/net/soap-client.el
@@ -369,6 +369,9 @@ binding) but the same name."
kind ; a symbol of: string, dateTime, long, int
)
+(defstruct (soap-simple-type (:include soap-basic-type))
+ enumeration)
+
(defstruct soap-sequence-element
name type nillable? multiple?)
@@ -415,8 +418,9 @@ binding) but the same name."
(defun soap-default-xsd-types ()
"Return a namespace containing some of the XMLSchema types."
(let ((ns (make-soap-namespace :name "http://www.w3.org/2001/XMLSchema")))
- (dolist (type '("string" "dateTime" "boolean" "long" "int" "float"
- "base64Binary" "anyType" "Array" "byte[]"))
+ (dolist (type '("string" "dateTime" "boolean"
+ "long" "int" "integer" "unsignedInt" "byte" "float" "double"
+ "base64Binary" "anyType" "anyURI" "Array" "byte[]"))
(soap-namespace-put
(make-soap-basic-type :name type :kind (intern type))
ns))
@@ -425,9 +429,10 @@ binding) but the same name."
(defun soap-default-soapenc-types ()
"Return a namespace containing some of the SOAPEnc types."
(let ((ns (make-soap-namespace
- :name "http://schemas.xmlsoap.org/soap/encoding/")))
- (dolist (type '("string" "dateTime" "boolean" "long" "int" "float"
- "base64Binary" "anyType" "Array" "byte[]"))
+ :name "http://schemas.xmlsoap.org/soap/encoding/")))
+ (dolist (type '("string" "dateTime" "boolean"
+ "long" "int" "integer" "unsignedInt" "byte" "float" "double"
+ "base64Binary" "anyType" "anyURI" "Array" "byte[]"))
(soap-namespace-put
(make-soap-basic-type :name type :kind (intern type))
ns))
@@ -555,6 +560,15 @@ updated."
(when resolver
(funcall resolver element wsdl))))
+(defun soap-resolve-references-for-simple-type (type wsdl)
+ "Resolve the base type for the simple TYPE using the WSDL
+ document."
+ (let ((kind (soap-basic-type-kind type)))
+ (unless (symbolp kind)
+ (let ((basic-type (soap-wsdl-get kind wsdl 'soap-basic-type-p)))
+ (setf (soap-basic-type-kind type)
+ (soap-basic-type-kind basic-type))))))
+
(defun soap-resolve-references-for-sequence-type (type wsdl)
"Resolve references for a sequence TYPE using WSDL document.
See also `soap-resolve-references-for-element' and
@@ -562,12 +576,18 @@ See also `soap-resolve-references-for-element' and
(let ((parent (soap-sequence-type-parent type)))
(when (or (consp parent) (stringp parent))
(setf (soap-sequence-type-parent type)
- (soap-wsdl-get parent wsdl 'soap-type-p))))
+ (soap-wsdl-get
+ parent wsdl
+ ;; Prevent self references, see Bug#9
+ (lambda (e) (and (not (eq e type)) (soap-type-p e)))))))
(dolist (element (soap-sequence-type-elements type))
(let ((element-type (soap-sequence-element-type element)))
(cond ((or (consp element-type) (stringp element-type))
(setf (soap-sequence-element-type element)
- (soap-wsdl-get element-type wsdl 'soap-type-p)))
+ (soap-wsdl-get
+ element-type wsdl
+ ;; Prevent self references, see Bug#9
+ (lambda (e) (and (not (eq e type)) (soap-type-p e))))))
((soap-element-p element-type)
;; since the element already has a child element, it
;; could be an inline structure. we must resolve
@@ -582,7 +602,10 @@ See also `soap-resolve-references-for-element' and
(let ((element-type (soap-array-type-element-type type)))
(when (or (consp element-type) (stringp element-type))
(setf (soap-array-type-element-type type)
- (soap-wsdl-get element-type wsdl 'soap-type-p)))))
+ (soap-wsdl-get
+ element-type wsdl
+ ;; Prevent self references, see Bug#9
+ (lambda (e) (and (not (eq e type)) (soap-type-p e))))))))
(defun soap-resolve-references-for-message (message wsdl)
"Resolve references for a MESSAGE type using the WSDL document.
@@ -679,6 +702,8 @@ See also `soap-resolve-references-for-element' and
;; Install resolvers for our types
(progn
+ (put (aref (make-soap-simple-type) 0) 'soap-resolve-references
+ 'soap-resolve-references-for-simple-type)
(put (aref (make-soap-sequence-type) 0) 'soap-resolve-references
'soap-resolve-references-for-sequence-type)
(put (aref (make-soap-array-type) 0) 'soap-resolve-references
@@ -854,6 +879,9 @@ Return a SOAP-NAMESPACE containing the elements."
(let ((ns (make-soap-namespace :name (soap-get-target-namespace node))))
;; NOTE: we only extract the complexTypes from the schema, we wouldn't
;; know how to handle basic types beyond the built in ones anyway.
+ (dolist (node (soap-xml-get-children1 node 'xsd:simpleType))
+ (soap-namespace-put (soap-parse-simple-type node) ns))
+
(dolist (node (soap-xml-get-children1 node 'xsd:complexType))
(soap-namespace-put (soap-parse-complex-type node) ns))
@@ -862,6 +890,26 @@ Return a SOAP-NAMESPACE containing the elements."
ns)))
+(defun soap-parse-simple-type (node)
+ "Parse NODE and construct a simple type from it."
+ (assert (eq (soap-l2wk (xml-node-name node)) 'xsd:simpleType)
+ nil
+ "soap-parse-complex-type: expecting xsd:simpleType node, got %s"
+ (soap-l2wk (xml-node-name node)))
+ (let ((name (xml-get-attribute-or-nil node 'name))
+ type
+ enumeration
+ (restriction (car-safe
+ (soap-xml-get-children1 node 'xsd:restriction))))
+ (unless restriction
+ (error "simpleType %s has no base type" name))
+
+ (setq type (xml-get-attribute-or-nil restriction 'base))
+ (dolist (e (soap-xml-get-children1 restriction 'xsd:enumeration))
+ (push (xml-get-attribute e 'value) enumeration))
+
+ (make-soap-simple-type :name name :kind type :enumeration enumeration)))
+
(defun soap-parse-schema-element (node)
"Parse NODE and construct a schema element from it."
(assert (eq (soap-l2wk (xml-node-name node)) 'xsd:element)
@@ -975,7 +1023,7 @@ contents."
extension 'xsd:sequence)))))
(restriction
(let ((base (xml-get-attribute-or-nil restriction 'base)))
- (assert (equal base "soapenc:Array")
+ (assert (equal base (soap-wk2l "soapenc:Array"))
nil
"restrictions supported only for soapenc:Array types, this is a %s"
base))
@@ -1245,9 +1293,9 @@ type-info stored in TYPE."
(if (null contents)
nil
(ecase type-kind
- (string (car contents))
+ ((string anyURI) (car contents))
(dateTime (car contents)) ; TODO: convert to a date time
- ((long int float) (string-to-number (car contents)))
+ ((long int integer unsignedInt byte float double) (string-to-number (car contents)))
(boolean (string= (downcase (car contents)) "true"))
(base64Binary (base64-decode-string (car contents)))
(anyType (soap-decode-any-type node))
@@ -1293,6 +1341,10 @@ This is because it is easier to work with list results in LISP."
(progn
(put (aref (make-soap-basic-type) 0)
'soap-decoder 'soap-decode-basic-type)
+ ;; just use the basic type decoder for the simple type -- we accept any
+ ;; value and don't do any validation on it.
+ (put (aref (make-soap-simple-type) 0)
+ 'soap-decoder 'soap-decode-basic-type)
(put (aref (make-soap-sequence-type) 0)
'soap-decoder 'soap-decode-sequence-type)
(put (aref (make-soap-array-type) 0)
@@ -1322,10 +1374,11 @@ WSDL is used to decode the NODE"
fault 'faultcode))))
(car-safe (xml-node-children n))))
(fault-string (let ((n (car (xml-get-children
- fault 'faultstring))))
- (car-safe (xml-node-children n)))))
+ fault 'faultstring))))
+ (car-safe (xml-node-children n))))
+ (detail (xml-get-children fault 'detail)))
(while t
- (signal 'soap-error (list fault-code fault-string))))))
+ (signal 'soap-error (list fault-code fault-string detail))))))
;; First (non string) element of the body is the root node of he
;; response
@@ -1457,7 +1510,7 @@ instead."
(progn
(insert ">")
(case basic-type
- (string
+ ((string anyURI)
(unless (stringp value)
(error "Soap-encode-basic-type(%s, %s, %s): not a string value"
xml-tag value xsi-type))
@@ -1484,10 +1537,19 @@ instead."
xml-tag value xsi-type))
(insert (if value "true" "false")))
- ((long int)
+ ((long int integer byte unsignedInt)
(unless (integerp value)
(error "Soap-encode-basic-type(%s, %s, %s): not an integer value"
xml-tag value xsi-type))
+ (when (and (eq basic-type 'unsignedInt) (< value 0))
+ (error "Soap-encode-basic-type(%s, %s, %s): not a positive integer"
+ xml-tag value xsi-type))
+ (insert (number-to-string value)))
+
+ ((float double)
+ (unless (numberp value)
+ (error "Soap-encode-basic-type(%s, %s, %s): not a number"
+ xml-tag value xsi-type))
(insert (number-to-string value)))
(base64Binary
@@ -1504,6 +1566,20 @@ instead."
(insert " xsi:nil=\"true\">"))
(insert "</" xml-tag ">\n")))
+(defun soap-encode-simple-type (xml-tag value type)
+ "Encode inside XML-TAG the LISP VALUE according to TYPE."
+
+ ;; Validate VALUE agains the simple type's enumeration, than just encode it
+ ;; using `soap-encode-basic-type'
+
+ (let ((enumeration (soap-simple-type-enumeration type)))
+ (unless (and (> (length enumeration) 1)
+ (member value enumeration))
+ (error "soap-encode-simple-type(%s, %s, %s): bad value, should be one of %s"
+ xml-tag value (soap-element-fq-name type) enumeration)))
+
+ (soap-encode-basic-type xml-tag value type))
+
(defun soap-encode-sequence-type (xml-tag value type)
"Encode inside XML-TAG the LISP VALUE according to TYPE.
Do not call this function directly, use `soap-encode-value'
@@ -1564,6 +1640,8 @@ instead."
(progn
(put (aref (make-soap-basic-type) 0)
'soap-encoder 'soap-encode-basic-type)
+ (put (aref (make-soap-simple-type) 0)
+ 'soap-encoder 'soap-encode-simple-type)
(put (aref (make-soap-sequence-type) 0)
'soap-encoder 'soap-encode-sequence-type)
(put (aref (make-soap-array-type) 0)
diff --git a/lisp/net/soap-inspect.el b/lisp/net/soap-inspect.el
index 823f815d58f..23937e21770 100644
--- a/lisp/net/soap-inspect.el
+++ b/lisp/net/soap-inspect.el
@@ -66,6 +66,15 @@ use `soap-sample-value' instead."
;; TODO: we need better sample values for more types.
(t (format "%s" (soap-basic-type-kind type)))))
+(defun soap-sample-value-for-simple-type (type)
+ "Provive a sample value for TYPE which is a simple type.
+This is a specific function which should not be called directly,
+use `soap-sample-value' instead."
+ (let ((enumeration (soap-simple-type-enumeration type)))
+ (if (> (length enumeration) 1)
+ (elt enumeration (random (length enumeration)))
+ (soap-sample-value-for-basic-type type))))
+
(defun soap-sample-value-for-seqence-type (type)
"Provide a sample value for TYPE which is a sequence type.
Values for sequence types are ALISTS of (slot-name . VALUE) for
@@ -115,6 +124,9 @@ use `soap-sample-value' instead."
(put (aref (make-soap-basic-type) 0) 'soap-sample-value
'soap-sample-value-for-basic-type)
+ (put (aref (make-soap-simple-type) 0) 'soap-sample-value
+ 'soap-sample-value-for-simple-type)
+
(put (aref (make-soap-sequence-type) 0) 'soap-sample-value
'soap-sample-value-for-seqence-type)
@@ -204,6 +216,16 @@ entire WSDL can be inspected."
(insert "\nSample value\n")
(pp (soap-sample-value basic-type) (current-buffer)))
+(defun soap-inspect-simple-type (simple-type)
+ "Insert information about SIMPLE-TYPE into the current buffer"
+ (insert "Simple type: " (soap-element-fq-name simple-type) "\n")
+ (insert "Base: " (symbol-name (soap-basic-type-kind simple-type)) "\n")
+ (let ((enumeration (soap-simple-type-enumeration simple-type)))
+ (when (> (length enumeration) 1)
+ (insert "Valid values: ")
+ (dolist (e enumeration)
+ (insert "\"" e "\" ")))))
+
(defun soap-inspect-sequence-type (sequence)
"Insert information about SEQUENCE into the current buffer."
(insert "Sequence type: " (soap-element-fq-name sequence) "\n")
@@ -331,6 +353,9 @@ entire WSDL can be inspected."
(put (aref (make-soap-basic-type) 0) 'soap-inspect
'soap-inspect-basic-type)
+ (put (aref (make-soap-simple-type) 0) 'soap-inspect
+ 'soap-inspect-simple-type)
+
(put (aref (make-soap-sequence-type) 0) 'soap-inspect
'soap-inspect-sequence-type)
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el
index 95848ac34ea..beb97c6eb32 100644
--- a/lisp/net/tramp.el
+++ b/lisp/net/tramp.el
@@ -62,7 +62,7 @@
;;; User Customizable Internal Variables:
(defgroup tramp nil
- "Edit remote files with a combination of rsh and rcp or similar programs."
+ "Edit remote files with a combination of ssh, scp, etc."
:group 'files
:group 'comm
:version "22.1")
diff --git a/lisp/net/xesam.el b/lisp/net/xesam.el
index f47eeda8d97..b901c041863 100644
--- a/lisp/net/xesam.el
+++ b/lisp/net/xesam.el
@@ -449,7 +449,7 @@ If there is no registered search engine at all, the function returns `nil'."
(defvar xesam-mode-map
(let ((map (copy-keymap special-mode-map)))
- (set-keymap-parent xesam-mode-map widget-keymap)
+ (set-keymap-parent map widget-keymap)
map))
(define-derived-mode xesam-mode special-mode "Xesam"
diff --git a/lisp/newcomment.el b/lisp/newcomment.el
index 0862427c3ba..5c8829ff72e 100644
--- a/lisp/newcomment.el
+++ b/lisp/newcomment.el
@@ -102,30 +102,35 @@ Comments might be indented to a different value in order not to go beyond
:type 'integer
:group 'comment)
(make-variable-buffer-local 'comment-column)
-;;;###autoload(put 'comment-column 'safe-local-variable 'integerp)
+;;;###autoload
+(put 'comment-column 'safe-local-variable 'integerp)
;;;###autoload
(defvar comment-start nil
"String to insert to start a new comment, or nil if no comment syntax.")
-;;;###autoload(put 'comment-start 'safe-local-variable 'string-or-null-p)
+;;;###autoload
+(put 'comment-start 'safe-local-variable 'string-or-null-p)
;;;###autoload
(defvar comment-start-skip nil
"Regexp to match the start of a comment plus everything up to its body.
If there are any \\(...\\) pairs, the comment delimiter text is held to begin
at the place matched by the close of the first pair.")
-;;;###autoload(put 'comment-start-skip 'safe-local-variable 'string-or-null-p)
+;;;###autoload
+(put 'comment-start-skip 'safe-local-variable 'string-or-null-p)
;;;###autoload
(defvar comment-end-skip nil
"Regexp to match the end of a comment plus everything back to its body.")
-;;;###autoload(put 'comment-end-skip 'safe-local-variable 'string-or-null-p)
+;;;###autoload
+(put 'comment-end-skip 'safe-local-variable 'string-or-null-p)
;;;###autoload
(defvar comment-end (purecopy "")
"String to insert to end a new comment.
Should be an empty string if comments are terminated by end-of-line.")
-;;;###autoload(put 'comment-end 'safe-local-variable 'string-or-null-p)
+;;;###autoload
+(put 'comment-end 'safe-local-variable 'string-or-null-p)
;;;###autoload
(defvar comment-indent-function 'comment-indent-default
diff --git a/lisp/notifications.el b/lisp/notifications.el
index b825eb65abf..7a79d5f6754 100644
--- a/lisp/notifications.el
+++ b/lisp/notifications.el
@@ -23,7 +23,7 @@
;;; Commentary:
;; This package provides an implementation of the Desktop Notifications
-;; <http://www.galago-project.org/specs/notification/>.
+;; <http://developer.gnome.org/notification-spec/>.
;; In order to activate this package, you must add the following code
;; into your .emacs:
@@ -37,15 +37,9 @@
(eval-when-compile
(require 'cl))
-;; Pacify byte-compiler. D-Bus support in the Emacs core can be
-;; disabled with configuration option "--without-dbus". Declare used
-;; subroutines and variables of `dbus' therefore.
-(declare-function dbus-call-method "dbusbind.c")
-(declare-function dbus-register-signal "dbusbind.c")
-
(require 'dbus)
-(defconst notifications-specification-version "1.1"
+(defconst notifications-specification-version "1.2"
"The version of the Desktop Notifications Specification implemented.")
(defconst notifications-application-name "Emacs"
@@ -64,13 +58,16 @@
"D-Bus notifications service path.")
(defconst notifications-interface "org.freedesktop.Notifications"
- "D-Bus notifications service path.")
+ "D-Bus notifications service interface.")
(defconst notifications-notify-method "Notify"
- "D-Bus notifications service path.")
+ "D-Bus notifications notify method.")
(defconst notifications-close-notification-method "CloseNotification"
- "D-Bus notifications service path.")
+ "D-Bus notifications close notification method.")
+
+(defconst notifications-get-capabilities-method "GetCapabilities"
+ "D-Bus notifications get capabilities method.")
(defconst notifications-action-signal "ActionInvoked"
"D-Bus notifications action signal.")
@@ -154,6 +151,8 @@ Various PARAMS can be set:
Default value is -1.
:urgency The urgency level.
Either `low', `normal' or `critical'.
+ :action-items Whether the TITLE of the actions is interpreted as
+ a named icon.
:category The type of notification this is.
:desktop-entry This specifies the name of the desktop filename representing
the calling program.
@@ -170,6 +169,11 @@ Various PARAMS can be set:
be \"message-new-instant\".
:suppress-sound Causes the server to suppress playing any sounds, if it has
that ability.
+ :resident When set the server will not automatically remove the
+ notification when an action has been invoked.
+ :transient When set the server will treat the notification as transient
+ and by-pass the server's persistence capability, if it
+ should exist.
:x Specifies the X location on the screen that the notification
should point to. The \"y\" hint must also be specified.
:y Specifies the Y location on the screen that the notification
@@ -188,6 +192,9 @@ Various PARAMS can be set:
- `undefined' if the notification server hasn't provided
a reason
+Which parameters are accepted by the notification server can be
+checked via `notifications-get-capabilities'.
+
This function returns a notification id, an integer, which can be
used to manipulate the notification item with
`notifications-close-notification' or the `:replaces-id' argument
@@ -206,9 +213,12 @@ of another `notifications-notify' call."
(desktop-entry (plist-get params :desktop-entry))
(image-data (plist-get params :image-data))
(image-path (plist-get params :image-path))
+ (action-items (plist-get params :action-items))
(sound-file (plist-get params :sound-file))
(sound-name (plist-get params :sound-name))
(suppress-sound (plist-get params :suppress-sound))
+ (resident (plist-get params :resident))
+ (transient (plist-get params :transient))
(x (plist-get params :x))
(y (plist-get params :y))
id)
@@ -230,12 +240,16 @@ of another `notifications-notify' call."
(:variant :string ,desktop-entry)) t))
(when image-data
(add-to-list 'hints `(:dict-entry
- "image_data"
+ "image-data"
(:variant :struct ,image-data)) t))
(when image-path
(add-to-list 'hints `(:dict-entry
- "image_path"
+ "image-path"
(:variant :string ,image-path)) t))
+ (when action-items
+ (add-to-list 'hints `(:dict-entry
+ "action-items"
+ (:variant :boolean ,action-items)) t))
(when sound-file
(add-to-list 'hints `(:dict-entry
"sound-file"
@@ -248,6 +262,14 @@ of another `notifications-notify' call."
(add-to-list 'hints `(:dict-entry
"suppress-sound"
(:variant :boolean ,suppress-sound)) t))
+ (when resident
+ (add-to-list 'hints `(:dict-entry
+ "resident"
+ (:variant :boolean ,resident)) t))
+ (when transient
+ (add-to-list 'hints `(:dict-entry
+ "transient"
+ (:variant :boolean ,transient)) t))
(when x
(add-to-list 'hints `(:dict-entry "x" (:variant :int32 ,x)) t))
(when y
@@ -322,4 +344,36 @@ of another `notifications-notify' call."
notifications-close-notification-method
:int32 id))
+(defvar dbus-debug) ; used in the macroexpansion of dbus-ignore-errors
+
+(defun notifications-get-capabilities ()
+ "Return the capabilities of the notification server, a list of strings.
+The following capabilities can be expected:
+
+ :actions The server will provide the specified actions
+ to the user.
+ :action-icons Supports using icons instead of text for
+ displaying actions.
+ :body Supports body text.
+ :body-hyperlinks The server supports hyperlinks in the notifications.
+ :body-images The server supports images in the notifications.
+ :body-markup Supports markup in the body text.
+ :icon-multi The server will render an animation of all the
+ frames in a given image array.
+ :icon-static Supports display of exactly 1 frame of any
+ given image array. This value is mutually exclusive
+ with `:icon-multi'.
+ :persistence The server supports persistence of notifications.
+ :sound The server supports sounds on notifications.
+
+Further vendor-specific caps start with `:x-vendor', like `:x-gnome-foo-cap'."
+ (dbus-ignore-errors
+ (mapcar
+ (lambda (x) (intern (concat ":" x)))
+ (dbus-call-method :session
+ notifications-service
+ notifications-path
+ notifications-interface
+ notifications-get-capabilities-method))))
+
(provide 'notifications)
diff --git a/lisp/novice.el b/lisp/novice.el
index a5d38a3a57f..fa41b2bbc1e 100644
--- a/lisp/novice.el
+++ b/lisp/novice.el
@@ -36,13 +36,13 @@
(eval-when-compile (require 'cl))
;;;###autoload
+(define-obsolete-variable-alias 'disabled-command-hook
+ 'disabled-command-function "22.1")
+;;;###autoload
(defvar disabled-command-function 'disabled-command-function
"Function to call to handle disabled commands.
If nil, the feature is disabled, i.e., all commands work normally.")
-;;;###autoload
-(define-obsolete-variable-alias 'disabled-command-hook 'disabled-command-function "22.1")
-
;; It is ok here to assume that this-command is a symbol
;; because we won't get called otherwise.
;;;###autoload
diff --git a/lisp/emacs-lisp/assoc.el b/lisp/obsolete/assoc.el
index 264374ed721..d0738dfeb2c 100644
--- a/lisp/emacs-lisp/assoc.el
+++ b/lisp/obsolete/assoc.el
@@ -1,9 +1,10 @@
-;;; assoc.el --- insert/delete functions on association lists
+;;; assoc.el --- insert/delete functions on association lists -*- lexical-binding: t -*-
;; Copyright (C) 1996, 2001-2012 Free Software Foundation, Inc.
;; Author: Barry A. Warsaw <bwarsaw@cen.com>
;; Keywords: extensions
+;; Obsolete-since: 24.2
;; This file is part of GNU Emacs.
@@ -36,7 +37,7 @@ the order of any other key-value pair. Side effect sets alist to new
sorted list."
(set alist-symbol
(sort (copy-alist (symbol-value alist-symbol))
- (function (lambda (a b) (equal (car a) key))))))
+ (lambda (a _b) (equal (car a) key)))))
(defun aelement (key value)
@@ -71,8 +72,8 @@ If VALUE is not supplied, or is nil, the key-value pair will not be
modified, but will be moved to the head of the alist. If the key-value
pair cannot be found in the alist, it will be inserted into the head
of the alist (with value nil if VALUE is nil or not supplied)."
- (lexical-let ((elem (aelement key value))
- alist)
+ (let ((elem (aelement key value))
+ alist)
(asort alist-symbol key)
(setq alist (symbol-value alist-symbol))
(cond ((null alist) (set alist-symbol elem))
@@ -86,7 +87,7 @@ of the alist (with value nil if VALUE is nil or not supplied)."
Alist is referenced by ALIST-SYMBOL and the key-value pair to remove
is pair matching KEY. Returns the altered alist."
(asort alist-symbol key)
- (lexical-let ((alist (symbol-value alist-symbol)))
+ (let ((alist (symbol-value alist-symbol)))
(cond ((null alist) nil)
((anot-head-p alist key) alist)
(t (set alist-symbol (cdr alist))))))
@@ -101,6 +102,7 @@ returned.
If no key-value pair matching KEY could be found in ALIST, or ALIST is
nil then nil is returned. ALIST is not altered."
+ (defvar copy)
(let ((copy (copy-alist alist)))
(cond ((null alist) nil)
((progn (asort 'copy key)
@@ -123,10 +125,10 @@ KEYLIST and VALUELIST should have the same number of elements, but
this isn't enforced. If VALUELIST is smaller than KEYLIST, remaining
keys are associated with nil. If VALUELIST is larger than KEYLIST,
extra values are ignored. Returns the created alist."
- (lexical-let ((keycar (car keylist))
- (keycdr (cdr keylist))
- (valcar (car valuelist))
- (valcdr (cdr valuelist)))
+ (let ((keycar (car keylist))
+ (keycdr (cdr keylist))
+ (valcar (car valuelist))
+ (valcdr (cdr valuelist)))
(cond ((null keycdr)
(aput alist-symbol keycar valcar))
(t
diff --git a/lisp/play/bruce.el b/lisp/obsolete/bruce.el
index b8b2f53097d..1dd69c129a0 100644
--- a/lisp/play/bruce.el
+++ b/lisp/obsolete/bruce.el
@@ -6,6 +6,7 @@
;; Maintainer: FSF
;; Keywords: games
;; Created: Jan 1997
+;; Obsolete-since: 24.2
;; This file is part of GNU Emacs.
diff --git a/lisp/patcomp.el b/lisp/obsolete/patcomp.el
index c1965a763ca..b8304143e9f 100644
--- a/lisp/patcomp.el
+++ b/lisp/obsolete/patcomp.el
@@ -2,6 +2,8 @@
;; This file is part of GNU Emacs.
+;; Obsolete-since: 24.2
+
;;; Commentary:
;;; Code:
diff --git a/lisp/org/ChangeLog b/lisp/org/ChangeLog
index 86f493a0a5b..8cdc90109b3 100644
--- a/lisp/org/ChangeLog
+++ b/lisp/org/ChangeLog
@@ -1,3 +1,72 @@
+2012-04-27 Glenn Morris <rgm@gnu.org>
+
+ * org-ctags.el (org-ctags-new-topic-template):
+ Revert 2012-04-09 removal of * from defcustom value, not doc.
+
+2012-04-27 Nicolas Goaziou <n.goaziou@gmail.com>
+
+ * org-table.el (org-table-number-fraction): Fix typo.
+
+2012-04-27 Eric Schulte <eric.schulte@gmx.com>
+
+ * ob-python.el (org-babel-execute:python): Ensure newline precedes
+ automatically-added returns.
+
+2012-04-27 Nicolas Goaziou <n.goaziou@gmail.com>
+
+ * org-mouse.el (org-mode-hook): Do not move point when clicking on
+ a footnote reference.
+
+2012-04-27 Bastien Guerry <bzg@gnu.org>
+
+ * org-faces.el (org-date-selected): Fix docstring.
+
+2012-04-27 Nicolas Goaziou <n.goaziou@gmail.com>
+
+ * org-list.el (org-list-struct-indent): Follow
+ `org-list-demote-modify-bullet' specifications for ordered
+ bullets.
+ (org-list-indent-item-generic, org-indent-item-tree)
+ (org-outdent-item-tree): Fix bug when operating on a region.
+ (org-outdent-item, org-indent-item): Allow to operate on a region.
+
+ * org.el (org-shiftmetaleft, org-shiftmetaright): Allow to operate
+ on a region.
+
+2012-04-27 Nicolas Goaziou <n.goaziou@gmail.com>
+
+ * org-footnote.el (org-footnote-normalize): Fix positioning in
+ HTML export without a footnote section.
+
+2012-04-27 Madan Ramakrishnan <madanr79@gmail.com> (tiny change)
+
+ * org-agenda.el (org-agenda-bulk-mark): Truly make arg optional as
+ advertised by the function.
+
+2012-04-27 Zachary Kanfer <zkanfer@gmail.com> (tiny change)
+
+ * org.el (org-read-date-display): Fix bug when displaying the
+ overlay.
+
+2012-04-27 Bastien Guerry <bzg@gnu.org>
+
+ * org.el (org-mode): Don't use `buffer-face-mode' by default.
+
+2012-04-27 Bastien Guerry <bzg@gnu.org>
+
+ * org-faces.el (org-date-selected): New face.
+
+2012-04-27 Jambunathan K <kjambunathan@gmail.com>
+
+ * org-odt.el (org-odt-format-org-link): Pay no heed to whether the
+ internal links destined for headlines provide a description or
+ not. In fact, the `org-store-link' and `org-insert-link' create
+ internal links which do have a description.
+
+2012-04-27 Bastien Guerry <bzg@gnu.org>
+
+ * org-clock.el (org-program-exists): Fix docstring.
+
2012-04-14 Bastien Guerry <bzg@gnu.org>
* org.el (org-point-at-end-of-empty-headline): Only try to match
@@ -438,11 +507,6 @@
* org-attach.el (org-attach-store-link-p): Remove spurious quote
in customization form choice.
-2012-04-01 Tassilo Horn <tassilo@member.fsf.org>
-
- * org-contacts.el (org-contacts-check-mail-address): Add missing
- word to `y-or-n-p' question.
-
2012-04-01 Eric Schulte <eric.schulte@gmx.com>
* ob-sh.el (org-babel-execute:sh): Pass all params to subroutine.
@@ -934,11 +998,6 @@
* org-footnote.el (org-footnote-normalize): Make sure that
footnotes are moved to a single place during export.
-2012-04-01 Bastien Guerry <bzg@gnu.org>
-
- * org.el (org-cycle-internal-global): Prevent the display of
- messages when cycling from with a Gnus article buffer.
-
2012-04-01 Nicolas Goaziou <n.goaziou@gmail.com>
* org-footnote.el (org-footnote-normalize): Ensure footnote
@@ -1807,11 +1866,6 @@
2012-01-03 Bastien Guerry <bzg@gnu.org>
- * org-drill.el (org-drill-leech-method, org-drill-scope)
- (org-drill-spaced-repetition-algorithm): Fix wrong :type spec.
-
-2012-01-03 Bastien Guerry <bzg@gnu.org>
-
* org.el (org-property-re): Also match cumulating properties
like ":prop+:".
@@ -5929,10 +5983,6 @@
* ob-exp.el (org-babel-exp-in-export-file): Bind
`org-link-search-inhibit-query' to t to inhibit prompts.
-2011-07-28 Julien Danjou <julien@danjou.info>
-
- * org-contacts.el: Merge org-contacts-wl.el.
-
2011-07-28 Carsten Dominik <carsten.dominik@gmail.com>
* org-exp.el (org-export-add-options-to-plist): Use the right
@@ -5967,10 +6017,6 @@
* org-agenda.el (org-agenda-open-link): Pass entire text of agenda
line to `org-offer-links-in-entry'.
-2011-07-28 Michael Markert <markert.michael@googlemail.com>
-
- * org-contacts-wl.el: New file.
-
2011-07-28 Matt Lundin <mdl@imapmail.org>
* org-bibtex.el (org-bibtex-search): New function.
@@ -6736,9 +6782,6 @@
(org-agenda-open-link): Stop using prefix-length.
(org-agenda-change-all-lines): Stop using prefix-length.
- * org-colview-xemacs.el (org-columns-display-here): Stop using
- prefix-length. Always return claned items.
-
* org-colview.el (org-columns-display-here): Stop using
prefix-length. Always return claned items.
@@ -13095,16 +13138,6 @@
* org-capture.el (org-capture-templates): Fix customize type.
-2010-11-11 Carsten Dominik <carsten.dominik@gmail.com>
-
- * org-colview-xemacs.el (org-columns-compile-map):
- (org-columns-number-to-string):
- (org-columns-string-to-number): Handle estimate ranges.
- (org-estimate-mean-and-var): New function.
- (org-estimate-combine): New function.
- (org-estimate-print): New function.
- (org-string-to-estimate): New function.
-
2010-09-25 Juanma Barranquero <lekktu@gmail.com>
* org.el (org-refile-targets):
@@ -14132,9 +14165,6 @@
* org-src.el (org-edit-src-find-region-and-lang): Test for
table.el as late as possible.
- * org-colview-xemacs.el: Make sure this file is never loaded into
- Emacs. Remove all tests for XEmacs.
-
* org-colview.el: Make sure this file is never loaded into XEmacs.
* org-agenda.el (org-highlight, org-unhighlight): Use direct
@@ -15497,9 +15527,6 @@
* org-exp.el (org-export): Use "1" as a sign to export only the
subtree.
- * org-colview-xemacs.el (org-columns-edit-value):
- Use org-unrestricted property.
-
* org-colview.el (org-columns-edit-value):
Use org-unrestricted property.
@@ -15898,13 +15925,6 @@
(org-agenda-colview-summarize): Handle extended summary types
properly.
- * org-colview-xemacs.el (org-columns-display-here): Don't try to
- calculate values if the underlying property is not set.
- (org-columns-string-to-number): Convert age strings back into
- fractional days.
- (org-agenda-colview-summarize): Handle extended summary types
- properly.
-
2009-11-13 Carsten Dominik <carsten.dominik@gmail.com>
* org-exp.el (org-export-format-drawer-function): New variable.
@@ -16083,10 +16103,6 @@
org-return-follows-link' is set and there is nothing else to do in
this line.
-2009-11-13 James TD Smith <ahktenzero@mohorovi.cc>
-
- * org-colview-xemacs.el: Add in changes from org-colview.el.
-
2009-11-13 Dan Davison <davison@stats.ox.ac.uk>
* org-exp-blocks.el: Modify split separator regexp to avoid empty
@@ -17212,9 +17228,6 @@
* org-colview.el (org-columns, org-columns-redo)
(org-agenda-columns): Don't use `goto-line'.
- * org-colview-xemacs.el (org-columns, org-agenda-columns):
- Don't use `goto-line'.
-
* org-agenda.el (org-agenda-mode): Force visual line motion off.
(org-agenda-add-entry-text-maxlines): Improve docstring.
(org-agenda-start-with-entry-text-mode): New option.
@@ -17319,10 +17332,6 @@
* org-colview.el (org-columns-edit-value, org-columns-new)
(org-insert-columns-dblock): Use org-icompleting-read.
- * org-colview-xemacs.el (org-columns-edit-value)
- (org-columns-new, org-insert-columns-dblock):
- Use org-icompleting-read.
-
* org-attach.el (org-attach-delete-one, org-attach-open):
Use org-icompleting-read.
@@ -18017,10 +18026,6 @@
in column values.
(org-columns-capture-view): Exclude comment and archived trees.
- * org-colview-xemacs.el (org-columns-capture-view):
- Protect vertical bars in column values.
- (org-columns-capture-view): Exclude comment and archived trees.
-
* org.el (org-quote-vert): New function.
* org-latex.el (org-export-latex-verbatim-wrap): New option.
@@ -18209,9 +18214,6 @@
* org-colview.el (org-dblock-write:columnview): Allow indented
#+TBLFM line.
- * org-colview-xemacs.el (org-dblock-write:columnview):
- Allow indented #+TBLFM line.
-
* org-clock.el (org-dblock-write:clocktable): Allow indented
#+TBLFM line.
@@ -18288,9 +18290,6 @@
* org.el (org-enable-priority-commands): New option.
- * org-colview-xemacs.el (org-columns-compute)
- (org-columns-number-to-string): Fix problems with empty fields.
-
* org-colview.el (org-columns-compute)
(org-columns-number-to-string): Fix problems with empty fields.
@@ -18493,9 +18492,6 @@
(org-export-region-as-latex): Use the property list.
(org-export-as-latex): ????
- * org-colview-xemacs.el (org-columns-remove-overlays)
- (org-columns): Fix call to `local-variable-p'.
-
2009-08-06 Carsten Dominik <carsten.dominik@gmail.com>
* org-latex.el (org-export-latex-after-blockquotes-hook): New hook.
@@ -18931,12 +18927,6 @@
(org-columns-remove-overlays): Restore the value of `truncate-lines'.
(org-columns): Remember the value of `truncate-lines'.
- * org-colview-xemacs.el (org-colview-initial-truncate-line-value):
- New variable.
- (org-columns-remove-overlays): Restore the value of
- `truncate-lines'.
- (org-columns): Remember the value of `truncate-lines'.
-
* org.el (org-columns-skip-arrchived-trees): New option.
* org-agenda.el (org-agenda-export-html-style): Define color for
@@ -19678,10 +19668,6 @@
Better error catching when a date/time property does not have allowed
values defined.
- * org-colview-xemacs.el (org-colview-construct-allowed-dates):
- Better error catching when a date/time property does not have
- allowed values defined.
-
2009-01-25 Carsten Dominik <carsten.dominik@gmail.com>
* org.el (org-map-entries): Restore point and restriction after
@@ -20429,10 +20415,6 @@
* org-colview.el (org-columns-edit-value, org-columns-new)
(org-insert-columns-dblock): Use `org-ido-completing-read'.
- * org-colview-xemacs.el (org-columns-edit-value)
- (org-columns-new, org-insert-columns-dblock):
- Use `org-ido-completing-read'.
-
* org-attach.el (org-attach-delete-one, org-attach-open):
Use `org-ido-completing-read'.
@@ -21011,9 +20993,6 @@
* org-colview.el (org-columns-get-format-and-top-level):
Remove resetting the marker.
- * org-colview-xemacs.el (org-columns-get-format-and-top-level):
- Remove resetting the marker.
-
* org.el (org-entry-property-inherited-from): Improve docstring.
(org-entry-get-with-inheritance): Reset marker before starting the
search.
@@ -21188,11 +21167,6 @@
(org-columns-next-allowed-value):
Use `org-colview-construct-allowed-dates'.
- * org-colview-xemacs.el (org-colview-construct-allowed-dates):
- New function.
- (org-columns-next-allowed-value):
- Use `org-colview-construct-allowed-dates'.
-
* org.el (org-protect-slash): New function.
(org-get-refile-targets): Use `org-protect-slash'.
@@ -21322,9 +21296,6 @@
* org-colview.el (org-columns-display-here):
Use `org-columns-modify-value-for-display-function'.
- * org-colview-xemacs.el (org-columns-display-here):
- Use `org-columns-modify-value-for-display-function'.
-
* org.el (org-columns-modify-value-for-display-function): New option.
* org-publish.el (org-publish-file): Make sure the directory match
@@ -21515,8 +21486,6 @@
* org-colview.el (org-columns-next-allowed-value): Bug fix.
- * org-colview-xemacs.el (org-columns-next-allowed-value): Bug fix.
-
* org-agenda.el (org-agenda-get-closed): Get the end time into the
agenda prefix as well.
@@ -21637,9 +21606,6 @@
* org-colview.el (org-columns-next-allowed-value): Handle next
argument NTH to directly select a value.
- * org-colview-xemacs.el (org-columns-next-allowed-value): Handle next
- argument NTH to directly select a value.
-
2008-06-17 Carsten Dominik <dominik@science.uva.nl>
* org-agenda.el (org-agenda-scheduled-leaders): Fix docstring.
@@ -21783,9 +21749,6 @@
* org-clock.el (org-clock-display, org-clock-out)
(org-update-mode-line): Use `org-time-clocksum-format'.
- * org-colview-xemacs.el (org-columns-number-to-string):
- Use `org-time-clocksum-format'.
-
* org-colview.el (org-columns-number-to-string):
Use `org-time-clocksum-format'.
@@ -21992,7 +21955,7 @@
;; add-log-time-zone-rule: t
;; End:
- Copyright (C) 2008-2012 Free Software Foundation, Inc.
+ Copyright (C) 2008-2012 Free Software Foundation, Inc.
This file is part of GNU Emacs.
diff --git a/lisp/org/ob-python.el b/lisp/org/ob-python.el
index 0dc744aaa73..348248f35cf 100644
--- a/lisp/org/ob-python.el
+++ b/lisp/org/ob-python.el
@@ -64,7 +64,7 @@ This function is called by `org-babel-execute-src-block'."
(preamble (cdr (assoc :preamble params)))
(full-body
(org-babel-expand-body:generic
- (concat body (if return-val (format "return %s" return-val) ""))
+ (concat body (if return-val (format "\nreturn %s" return-val) ""))
params (org-babel-variable-assignments:python params)))
(result (org-babel-python-evaluate
session full-body result-type result-params preamble)))
diff --git a/lisp/org/org-agenda.el b/lisp/org/org-agenda.el
index 3bb0fc84897..ddb56ca4bac 100644
--- a/lisp/org/org-agenda.el
+++ b/lisp/org/org-agenda.el
@@ -8294,7 +8294,7 @@ This is a command that has to be installed in `calendar-mode-map'."
(defun org-agenda-bulk-mark (&optional arg)
"Mark the entry at point for future bulk action."
(interactive "p")
- (dotimes (i (max arg 1))
+ (dotimes (i (or arg 1))
(unless (org-get-at-bol 'org-agenda-diary-link)
(let* ((m (org-get-at-bol 'org-hd-marker))
ov)
diff --git a/lisp/org/org-clock.el b/lisp/org/org-clock.el
index 434f6a1d5f6..aabcfc187db 100644
--- a/lisp/org/org-clock.el
+++ b/lisp/org/org-clock.el
@@ -664,7 +664,7 @@ Use alsa's aplay tool if available."
(error (beep t) (beep t)))))))))
(defun org-program-exists (program-name)
- "Checks whenever we can locate program and launch it."
+ "Checks whenever we can locate PROGRAM-NAME using the `which' executable."
(if (member system-type '(gnu/linux darwin))
(= 0 (call-process "which" nil nil nil program-name))))
diff --git a/lisp/org/org-ctags.el b/lisp/org/org-ctags.el
index 8b5bc6ecdf6..48656190a0c 100644
--- a/lisp/org/org-ctags.el
+++ b/lisp/org/org-ctags.el
@@ -188,7 +188,7 @@ See the ctags documentation for more information.")
Created as a local variable in each buffer.")
(defcustom org-ctags-new-topic-template
- " <<%t>>\n\n\n\n\n\n"
+ "* <<%t>>\n\n\n\n\n\n"
"Text to insert when creating a new org file via opening a hyperlink.
The following patterns are replaced in the string:
`%t' - replaced with the capitalized title of the hyperlink"
diff --git a/lisp/org/org-faces.el b/lisp/org/org-faces.el
index 481d662eca1..58f879dd51a 100644
--- a/lisp/org/org-faces.el
+++ b/lisp/org/org-faces.el
@@ -285,6 +285,16 @@ column view defines special faces for each outline level. See the file
"Face for date/time stamps."
:group 'org-faces)
+(defface org-date-selected
+ (org-compatible-face nil
+ '((((class color) (min-colors 16) (background light)) (:foreground "Red1" :bold nil))
+ (((class color) (min-colors 16) (background dark)) (:foreground "Pink" :bold nil))
+ (((class color) (min-colors 8) (background light)) (:foreground "red" :bold nil))
+ (((class color) (min-colors 8) (background dark)) (:foreground "red" :bold nil))
+ (t (:inverse-video t))))
+ "Face for highlighting the calendar day when using `org-read-date'."
+ :group 'org-faces)
+
(defface org-sexp-date
'((((class color) (background light)) (:foreground "Purple"))
(((class color) (background dark)) (:foreground "Cyan"))
diff --git a/lisp/org/org-footnote.el b/lisp/org/org-footnote.el
index 9319e0813c0..a9ba8d7510b 100644
--- a/lisp/org/org-footnote.el
+++ b/lisp/org/org-footnote.el
@@ -716,8 +716,8 @@ Additional note on `org-footnote-insert-pos-for-preprocessor':
((and org-footnote-section (eq major-mode 'org-mode))
(goto-char (point-min))
(if (re-search-forward
- (concat "^\\*[ \t]+" (regexp-quote org-footnote-section)
- "[ \t]*$") nil t)
+ (concat "^\\*[ \t]+" (regexp-quote org-footnote-section)
+ "[ \t]*$") nil t)
(delete-region (match-beginning 0) (org-end-of-subtree t t)))
;; A new footnote section is inserted by default at the end of
;; the buffer.
@@ -727,7 +727,14 @@ Additional note on `org-footnote-insert-pos-for-preprocessor':
(unless (bolp) (newline)))
;; No footnote section set: Footnotes will be added at the end
;; of the section containing their first reference.
- ((eq major-mode 'org-mode))
+ ;; Nevertheless, in an export situation, set insertion point to
+ ;; `point-max' by default.
+ ((eq major-mode 'org-mode)
+ (when export-props
+ (goto-char (point-max))
+ (skip-chars-backward " \r\t\n")
+ (forward-line)
+ (delete-region (point) (point-max))))
(t
;; Remove any left-over tag in the buffer, if one is set up.
(when org-footnote-tag-for-non-org-mode-files
diff --git a/lisp/org/org-list.el b/lisp/org/org-list.el
index c3775888325..4498280ac77 100644
--- a/lisp/org/org-list.el
+++ b/lisp/org/org-list.el
@@ -1484,8 +1484,19 @@ bullets between START and END."
(change-bullet-maybe
(function
(lambda (item)
- (let* ((bul (org-trim (org-list-get-bullet item struct)))
- (new-bul-p (cdr (assoc bul org-list-demote-modify-bullet))))
+ (let ((new-bul-p
+ (cdr (assoc
+ ;; Normalize ordered bullets.
+ (let ((bul (org-trim
+ (org-list-get-bullet item struct))))
+ (cond ((string-match "[A-Z]\\." bul) "A.")
+ ((string-match "[A-Z])" bul) "A)")
+ ((string-match "[a-z]\\." bul) "a.")
+ ((string-match "[a-z])" bul) "a)")
+ ((string-match "[0-9]\\." bul) "1.")
+ ((string-match "[0-9])" bul) "1)")
+ (t bul)))
+ org-list-demote-modify-bullet))))
(when new-bul-p (org-list-set-bullet item struct new-bul-p))))))
(ind
(lambda (cell)
@@ -2500,7 +2511,6 @@ STRUCT is the list structure.
Return t if successful."
(save-excursion
- (beginning-of-line)
(let* ((regionp (org-region-active-p))
(rbeg (and regionp (region-beginning)))
(rend (and regionp (region-end)))
@@ -2509,7 +2519,8 @@ Return t if successful."
(prevs (org-list-prevs-alist struct))
;; Are we going to move the whole list?
(specialp
- (and (= top (point))
+ (and (not regionp)
+ (= top (point-at-bol))
(cdr (assq 'indent org-list-automatic-rules))
(if no-subtree
(error
@@ -2523,12 +2534,12 @@ Return t if successful."
(progn
(set-marker org-last-indent-begin-marker rbeg)
(set-marker org-last-indent-end-marker rend))
- (set-marker org-last-indent-begin-marker (point))
+ (set-marker org-last-indent-begin-marker (point-at-bol))
(set-marker org-last-indent-end-marker
(cond
(specialp (org-list-get-bottom-point struct))
- (no-subtree (1+ (point)))
- (t (org-list-get-item-end (point) struct))))))
+ (no-subtree (1+ (point-at-bol)))
+ (t (org-list-get-item-end (point-at-bol) struct))))))
(let* ((beg (marker-position org-last-indent-begin-marker))
(end (marker-position org-last-indent-end-marker)))
(cond
@@ -2583,19 +2594,35 @@ Return t if successful."
"Outdent a local list item, but not its children.
If a region is active, all items inside will be moved."
(interactive)
- (if (org-at-item-p)
- (let ((struct (org-list-struct)))
- (org-list-indent-item-generic -1 t struct))
- (error "Not at an item")))
+ (let ((regionp (org-region-active-p)))
+ (cond
+ ((or (org-at-item-p)
+ (and regionp
+ (save-excursion (goto-char (region-beginning))
+ (org-at-item-p))))
+ (let ((struct (if (not regionp) (org-list-struct)
+ (save-excursion (goto-char (region-beginning))
+ (org-list-struct)))))
+ (org-list-indent-item-generic -1 t struct)))
+ (regionp (error "Region not starting at an item"))
+ (t (error "Not at an item")))))
(defun org-indent-item ()
"Indent a local list item, but not its children.
If a region is active, all items inside will be moved."
(interactive)
- (if (org-at-item-p)
- (let ((struct (org-list-struct)))
- (org-list-indent-item-generic 1 t struct))
- (error "Not at an item")))
+ (let ((regionp (org-region-active-p)))
+ (cond
+ ((or (org-at-item-p)
+ (and regionp
+ (save-excursion (goto-char (region-beginning))
+ (org-at-item-p))))
+ (let ((struct (if (not regionp) (org-list-struct)
+ (save-excursion (goto-char (region-beginning))
+ (org-list-struct)))))
+ (org-list-indent-item-generic 1 t struct)))
+ (regionp (error "Region not starting at an item"))
+ (t (error "Not at an item")))))
(defun org-outdent-item-tree ()
"Outdent a local list item including its children.
@@ -2604,10 +2631,12 @@ If a region is active, all items inside will be moved."
(let ((regionp (org-region-active-p)))
(cond
((or (org-at-item-p)
- (and (org-region-active-p)
- (goto-char (region-beginning))
- (org-at-item-p)))
- (let ((struct (org-list-struct)))
+ (and regionp
+ (save-excursion (goto-char (region-beginning))
+ (org-at-item-p))))
+ (let ((struct (if (not regionp) (org-list-struct)
+ (save-excursion (goto-char (region-beginning))
+ (org-list-struct)))))
(org-list-indent-item-generic -1 nil struct)))
(regionp (error "Region not starting at an item"))
(t (error "Not at an item")))))
@@ -2619,10 +2648,12 @@ If a region is active, all items inside will be moved."
(let ((regionp (org-region-active-p)))
(cond
((or (org-at-item-p)
- (and (org-region-active-p)
- (goto-char (region-beginning))
- (org-at-item-p)))
- (let ((struct (org-list-struct)))
+ (and regionp
+ (save-excursion (goto-char (region-beginning))
+ (org-at-item-p))))
+ (let ((struct (if (not regionp) (org-list-struct)
+ (save-excursion (goto-char (region-beginning))
+ (org-list-struct)))))
(org-list-indent-item-generic 1 nil struct)))
(regionp (error "Region not starting at an item"))
(t (error "Not at an item")))))
diff --git a/lisp/org/org-mouse.el b/lisp/org/org-mouse.el
index 5a87bd64697..b467064b888 100644
--- a/lisp/org/org-mouse.el
+++ b/lisp/org/org-mouse.el
@@ -915,6 +915,7 @@ This means, between the beginning of line and the point."
((assq :checkbox context) (org-toggle-checkbox))
((assq :item-bullet context)
(let ((org-cycle-include-plain-lists t)) (org-cycle)))
+ ((org-footnote-at-reference-p) nil)
(t ad-do-it))))))
(defun org-mouse-move-tree-start (event)
diff --git a/lisp/org/org-odt.el b/lisp/org/org-odt.el
index 234272a378d..2e984a575bd 100644
--- a/lisp/org/org-odt.el
+++ b/lisp/org/org-odt.el
@@ -1689,7 +1689,6 @@ ATTR is a string of other attributes of the a element."
(or (not thefile) (string= thefile ""))
(plist-get org-lparse-opt-plist :section-numbers)
(setq sec-frag fragment)
- (org-find-text-property-in-string 'org-no-description fragment)
(or (string-match "\\`sec\\(\\(-[0-9]+\\)+\\)" sec-frag)
(and (setq sec-frag
(loop for alias in org-export-target-aliases do
diff --git a/lisp/org/org-table.el b/lisp/org/org-table.el
index 08981b57e49..37e5c4f91a6 100644
--- a/lisp/org/org-table.el
+++ b/lisp/org/org-table.el
@@ -135,8 +135,8 @@ Other options offered by the customize interface are more restrictive."
(defcustom org-table-number-fraction 0.5
"Fraction of numbers in a column required to make the column align right.
-In a column all non-white fields are considered. If at least this
-fraction of fields is matched by `org-table-number-fraction',
+In a column all non-white fields are considered. If at least
+this fraction of fields is matched by `org-table-number-regexp',
alignment to the right border applies."
:group 'org-table-settings
:type 'number)
diff --git a/lisp/org/org.el b/lisp/org/org.el
index c2cc2354439..838a9a18ad4 100644
--- a/lisp/org/org.el
+++ b/lisp/org/org.el
@@ -5057,8 +5057,7 @@ The following commands are available:
'org-parse-arguments)
(set (make-local-variable 'pcomplete-termination-string) "")
(when (>= emacs-major-version 23)
- (set (make-local-variable 'buffer-face-mode-face) 'org-default)
- (buffer-face-mode))
+ (set (make-local-variable 'buffer-face-mode-face) 'org-default))
;; If empty file that did not turn on org-mode automatically, make it to.
(if (and org-insert-mode-line-in-empty-file
@@ -14915,7 +14914,7 @@ So these are more for recording a certain time/date."
(org-time-stamp arg 'inactive))
(defvar org-date-ovl (make-overlay 1 1))
-(overlay-put org-date-ovl 'face 'org-warning)
+(overlay-put org-date-ovl 'face 'org-date-selected)
(org-detach-overlay org-date-ovl)
(defvar org-ans1) ; dynamically scoped parameter
@@ -15131,35 +15130,35 @@ user."
(when org-read-date-display-live
(when org-read-date-overlay
(delete-overlay org-read-date-overlay))
- (let ((p (point)))
- (end-of-line 1)
- (while (not (equal (buffer-substring
- (max (point-min) (- (point) 4)) (point))
- " "))
- (insert " "))
- (goto-char p))
- (let* ((ans (concat (buffer-substring (point-at-bol) (point-max))
- " " (or org-ans1 org-ans2)))
- (org-end-time-was-given nil)
- (f (org-read-date-analyze ans org-def org-defdecode))
- (fmts (if org-dcst
- org-time-stamp-custom-formats
- org-time-stamp-formats))
- (fmt (if (or org-with-time
- (and (boundp 'org-time-was-given) org-time-was-given))
- (cdr fmts)
- (car fmts)))
- (txt (concat "=> " (format-time-string fmt (apply 'encode-time f)))))
- (when (and org-end-time-was-given
- (string-match org-plain-time-of-day-regexp txt))
- (setq txt (concat (substring txt 0 (match-end 0)) "-"
- org-end-time-was-given
- (substring txt (match-end 0)))))
- (when org-read-date-analyze-futurep
- (setq txt (concat txt " (=>F)")))
- (setq org-read-date-overlay
- (make-overlay (1- (point-at-eol)) (point-at-eol)))
- (org-overlay-display org-read-date-overlay txt 'secondary-selection))))
+ (when (minibufferp (current-buffer))
+ (save-excursion
+ (end-of-line 1)
+ (while (not (equal (buffer-substring
+ (max (point-min) (- (point) 4)) (point))
+ " "))
+ (insert " ")))
+ (let* ((ans (concat (buffer-substring (point-at-bol) (point-max))
+ " " (or org-ans1 org-ans2)))
+ (org-end-time-was-given nil)
+ (f (org-read-date-analyze ans org-def org-defdecode))
+ (fmts (if org-dcst
+ org-time-stamp-custom-formats
+ org-time-stamp-formats))
+ (fmt (if (or org-with-time
+ (and (boundp 'org-time-was-given) org-time-was-given))
+ (cdr fmts)
+ (car fmts)))
+ (txt (concat "=> " (format-time-string fmt (apply 'encode-time f)))))
+ (when (and org-end-time-was-given
+ (string-match org-plain-time-of-day-regexp txt))
+ (setq txt (concat (substring txt 0 (match-end 0)) "-"
+ org-end-time-was-given
+ (substring txt (match-end 0)))))
+ (when org-read-date-analyze-futurep
+ (setq txt (concat txt " (=>F)")))
+ (setq org-read-date-overlay
+ (make-overlay (1- (point-at-eol)) (point-at-eol)))
+ (org-overlay-display org-read-date-overlay txt 'secondary-selection)))))
(defun org-read-date-analyze (ans org-def org-defdecode)
"Analyze the combined answer of the date prompt."
@@ -17969,28 +17968,34 @@ See the individual commands for more information."
(defun org-shiftmetaleft ()
"Promote subtree or delete table column.
-Calls `org-promote-subtree', `org-outdent-item',
-or `org-table-delete-column', depending on context.
-See the individual commands for more information."
+Calls `org-promote-subtree', `org-outdent-item-tree', or
+`org-table-delete-column', depending on context. See the
+individual commands for more information."
(interactive)
(cond
((run-hook-with-args-until-success 'org-shiftmetaleft-hook))
((org-at-table-p) (call-interactively 'org-table-delete-column))
((org-at-heading-p) (call-interactively 'org-promote-subtree))
- ((org-at-item-p) (call-interactively 'org-outdent-item-tree))
+ ((if (not (org-region-active-p)) (org-at-item-p)
+ (save-excursion (goto-char (region-beginning))
+ (org-at-item-p)))
+ (call-interactively 'org-outdent-item-tree))
(t (org-modifier-cursor-error))))
(defun org-shiftmetaright ()
"Demote subtree or insert table column.
-Calls `org-demote-subtree', `org-indent-item',
-or `org-table-insert-column', depending on context.
-See the individual commands for more information."
+Calls `org-demote-subtree', `org-indent-item-tree', or
+`org-table-insert-column', depending on context. See the
+individual commands for more information."
(interactive)
(cond
((run-hook-with-args-until-success 'org-shiftmetaright-hook))
((org-at-table-p) (call-interactively 'org-table-insert-column))
((org-at-heading-p) (call-interactively 'org-demote-subtree))
- ((org-at-item-p) (call-interactively 'org-indent-item-tree))
+ ((if (not (org-region-active-p)) (org-at-item-p)
+ (save-excursion (goto-char (region-beginning))
+ (org-at-item-p)))
+ (call-interactively 'org-indent-item-tree))
(t (org-modifier-cursor-error))))
(defun org-shiftmetaup (&optional arg)
diff --git a/lisp/paths.el b/lisp/paths.el
index 70b5ca5dbfb..8ed05344f0a 100644
--- a/lisp/paths.el
+++ b/lisp/paths.el
@@ -1,6 +1,6 @@
;;; paths.el --- define pathnames for use by various Emacs commands -*- no-byte-compile: t -*-
-;; Copyright (C) 1986, 1988, 1994, 1999-2012 Free Software Foundation, Inc.
+;; Copyright (C) 1986, 1988, 1994, 1999-2012 Free Software Foundation, Inc.
;; Maintainer: FSF
;; Keywords: internal
@@ -35,22 +35,6 @@
;; conventions described in make-docfile, so that they get put in the
;; DOC file rather than in memory.
-(defun prune-directory-list (dirs &optional keep reject)
- "\
-Return a copy of DIRS with all non-existent directories removed.
-The optional argument KEEP is a list of directories to retain even if
-they don't exist, and REJECT is a list of directories to remove from
-DIRS, even if they exist; REJECT takes precedence over KEEP.
-
-Note that membership in REJECT and KEEP is checked using simple string
-comparison."
- (apply #'nconc
- (mapcar (lambda (dir)
- (and (not (member dir reject))
- (or (member dir keep) (file-directory-p dir))
- (list dir)))
- dirs)))
-
(defvar Info-default-directory-list
(let* ((config-dir
(file-name-as-directory configure-info-directory))
@@ -101,88 +85,5 @@ This variable `Info-default-directory-list' is used as the default
for initializing `Info-directory-list' when Info is started, unless
the environment variable INFOPATH is set.")
-(defvar news-directory
- (purecopy (if (file-exists-p "/usr/spool/news/")
- "/usr/spool/news/"
- "/var/spool/news/"))
- "The root directory below which all news files are stored.")
-(defvaralias 'news-path 'news-directory)
-
-(defvar news-inews-program
- (purecopy
- (cond ((file-exists-p "/usr/bin/inews") "/usr/bin/inews")
- ((file-exists-p "/usr/local/inews") "/usr/local/inews")
- ((file-exists-p "/usr/local/bin/inews") "/usr/local/bin/inews")
- ((file-exists-p "/usr/contrib/lib/news/inews") "/usr/contrib/lib/news/inews")
- ((file-exists-p "/usr/lib/news/inews") "/usr/lib/news/inews")
- (t "inews")))
- "Program to post news.")
-
-;; set this to your local server
-(defvar gnus-default-nntp-server (purecopy "") "\
-The name of the host running an NNTP server.
-The null string means use the local host as the server site.")
-
-(defvar gnus-nntp-service (purecopy "nntp") "\
-NNTP service name, usually \"nntp\" or 119.
-Go to a local news spool if its value is nil, in which case `gnus-nntp-server'
-should be set to `(system-name)'.")
-
-(defvar gnus-local-organization nil "\
-*The name of your organization, as a string.
-The `ORGANIZATION' environment variable is used instead if defined.")
-
-(defcustom rmail-file-name (purecopy "~/RMAIL") "\
-Name of user's primary mail file."
- :type 'string
- :group 'rmail
- :version "21.1")
-
-(defvar rmail-spool-directory
- (purecopy
- (cond ((file-exists-p "/var/mail")
- ;; SVR4 and recent BSD are said to use this.
- ;; Rather than trying to know precisely which systems use it,
- ;; let's assume this dir is never used for anything else.
- "/var/mail/")
- ;; Many GNU/Linux systems use this name.
- ((file-exists-p "/var/spool/mail")
- "/var/spool/mail/")
- ((memq system-type '(hpux usg-unix-v irix))
- "/usr/mail/")
- (t "/usr/spool/mail/")))
- "Name of directory used by system mailer for delivering new mail.
-Its name should end with a slash.")
-
-(defcustom remote-shell-program
- (purecopy
- (cond
- ;; Some systems use rsh for the remote shell; others use that name for the
- ;; restricted shell and use remsh for the remote shell. Let's try to guess
- ;; based on what we actually find out there. The restricted shell is
- ;; almost certainly in /bin or /usr/bin, so it's probably safe to assume
- ;; that an rsh found elsewhere is the remote shell program. The converse
- ;; is not true: /usr/bin/rsh could be either one, so check that last.
- ((file-exists-p "/usr/ucb/remsh") "/usr/ucb/remsh")
- ((file-exists-p "/usr/bsd/remsh") "/usr/bsd/remsh")
- ((file-exists-p "/bin/remsh") "/bin/remsh")
- ((file-exists-p "/usr/bin/remsh") "/usr/bin/remsh")
- ((file-exists-p "/usr/local/bin/remsh") "/usr/local/bin/remsh")
- ((file-exists-p "/usr/ucb/rsh") "/usr/ucb/rsh")
- ((file-exists-p "/usr/bsd/rsh") "/usr/bsd/rsh")
- ((file-exists-p "/usr/local/bin/rsh") "/usr/local/bin/rsh")
- ((file-exists-p "/usr/bin/rcmd") "/usr/bin/rcmd")
- ((file-exists-p "/bin/rcmd") "/bin/rcmd")
- ((file-exists-p "/bin/rsh") "/bin/rsh")
- ((file-exists-p "/usr/bin/rsh") "/usr/bin/rsh")
- (t "rsh")))
- "File name for remote-shell program (often rsh or remsh)."
- :group 'environment
- :type 'file)
-
-(defvar term-file-prefix (purecopy "term/") "\
-If non-nil, Emacs startup does (load (concat term-file-prefix (getenv \"TERM\")))
-You may set this variable to nil in your `.emacs' file if you do not wish
-the terminal-initialization file to be loaded.")
;;; paths.el ends here
diff --git a/lisp/pcmpl-unix.el b/lisp/pcmpl-unix.el
index 3af22c82dfb..ae4bd270b09 100644
--- a/lisp/pcmpl-unix.el
+++ b/lisp/pcmpl-unix.el
@@ -205,8 +205,8 @@ Includes files as well as host names followed by a colon."
;; Avoid connecting to the remote host when we're
;; only completing the host name.
(list string)
- (comint--table-subvert (pcomplete-all-entries)
- "" "/ssh:")))
+ (completion-table-subvert (pcomplete-all-entries)
+ "" "/ssh:")))
((string-match "/" string) ; Local file name.
(pcomplete-all-entries))
(t ;Host name or local file name.
diff --git a/lisp/pcomplete.el b/lisp/pcomplete.el
index cad2ffb2a2c..c9961a67f3d 100644
--- a/lisp/pcomplete.el
+++ b/lisp/pcomplete.el
@@ -165,22 +165,8 @@ A non-nil value is useful if `pcomplete-autolist' is non-nil too."
:type 'boolean
:group 'pcomplete)
-(defcustom pcomplete-arg-quote-list nil
- "List of characters to quote when completing an argument."
- :type '(choice (repeat character)
- (const :tag "Don't quote" nil))
- :group 'pcomplete)
-
-(defcustom pcomplete-quote-arg-hook nil
- "A hook which is run to quote a character within a filename.
-Each function is passed both the filename to be quoted, and the index
-to be considered. If the function wishes to provide an alternate
-quoted form, it need only return the replacement string. If no
-function provides a replacement, quoting shall proceed as normal,
-using a backslash to quote any character which is a member of
-`pcomplete-arg-quote-list'."
- :type 'hook
- :group 'pcomplete)
+(define-obsolete-variable-alias
+ 'pcomplete-arg-quote-list 'comint-file-name-quote-list "24.2")
(defcustom pcomplete-man-function 'man
"A function to that will be called to display a manual page.
@@ -370,48 +356,28 @@ modified to be an empty string, or the desired separation string."
;; it pretty much impossible to have completion other than
;; prefix-completion.
;;
-;; pcomplete--common-quoted-suffix and comint--table-subvert try to
-;; work around this difficulty with heuristics, but it's
-;; really a hack.
-
-(defvar pcomplete-unquote-argument-function nil)
-
-(defun pcomplete-unquote-argument (s)
- (cond
- (pcomplete-unquote-argument-function
- (funcall pcomplete-unquote-argument-function s))
- ((null pcomplete-arg-quote-list) s)
- (t
- (replace-regexp-in-string "\\\\\\(.\\)" "\\1" s t))))
-
-(defun pcomplete--common-quoted-suffix (s1 s2)
- ;; FIXME: Copied in comint.el.
- "Find the common suffix between S1 and S2 where S1 is the expanded S2.
-S1 is expected to be the unquoted and expanded version of S2.
-Returns (PS1 . PS2), i.e. the shortest prefixes of S1 and S2, such that
-S1 = (concat PS1 SS1) and S2 = (concat PS2 SS2) and
-SS1 = (unquote SS2)."
- (let* ((cs (comint--common-suffix s1 s2))
- (ss1 (substring s1 (- (length s1) cs)))
- (qss1 (pcomplete-quote-argument ss1))
- qc s2b)
- (if (and (not (equal ss1 qss1))
- (setq qc (pcomplete-quote-argument (substring ss1 0 1)))
- (setq s2b (- (length s2) cs (length qc) -1))
- (>= s2b 0) ;bug#11158.
- (eq t (compare-strings s2 s2b (- (length s2) cs -1)
- qc nil nil)))
- ;; The difference found is just that one char is quoted in S2
- ;; but not in S1, keep looking before this difference.
- (pcomplete--common-quoted-suffix
- (substring s1 0 (- (length s1) cs))
- (substring s2 0 s2b))
- (cons (substring s1 0 (- (length s1) cs))
- (substring s2 0 (- (length s2) cs))))))
-
-;; I don't think such commands are usable before first setting up buffer-local
-;; variables to parse args, so there's no point autoloading it.
-;; ;;;###autoload
+;; pcomplete--common-suffix and completion-table-subvert try to work around
+;; this difficulty with heuristics, but it's really a hack.
+
+(defvar pcomplete-unquote-argument-function #'comint--unquote-argument)
+
+(defsubst pcomplete-unquote-argument (s)
+ (funcall pcomplete-unquote-argument-function s))
+
+(defvar pcomplete-requote-argument-function #'comint--requote-argument)
+
+(defun pcomplete--common-suffix (s1 s2)
+ ;; Since S2 is expected to be the "unquoted/expanded" version of S1,
+ ;; there shouldn't be any case difference, even if the completion is
+ ;; case-insensitive.
+ (let ((case-fold-search nil))
+ (string-match
+ ;; \x3FFF7F is just an arbitrary char among the ones Emacs accepts
+ ;; that hopefully will never appear in normal text.
+ "\\(?:.\\|\n\\)*?\\(\\(?:.\\|\n\\)*\\)\x3FFF7F\\(?:.\\|\n\\)*\\1\\'"
+ (concat s1 "\x3FFF7F" s2))
+ (- (match-end 1) (match-beginning 1))))
+
(defun pcomplete-completions-at-point ()
"Provide standard completion using pcomplete's completion tables.
Same as `pcomplete' but using the standard completion UI."
@@ -442,34 +408,31 @@ Same as `pcomplete' but using the standard completion UI."
;; pcomplete-stub and works from the buffer's text instead,
;; we need to trick minibuffer-complete, into using
;; pcomplete-stub without its knowledge. To that end, we
- ;; use comint--table-subvert to construct a completion
+ ;; use completion-table-subvert to construct a completion
;; table which expects strings using a prefix from the
;; buffer's text but internally uses the corresponding
;; prefix from pcomplete-stub.
(beg (max (- (point) (length pcomplete-stub))
(pcomplete-begin)))
- (buftext (buffer-substring beg (point))))
+ (buftext (pcomplete-unquote-argument
+ (buffer-substring beg (point)))))
(when completions
(let ((table
- (cond
- ((not (equal pcomplete-stub buftext))
- ;; This isn't always strictly right (e.g. if
- ;; FOO="toto/$FOO", then completion of /$FOO/bar may
- ;; result in something incorrect), but given the lack of
- ;; any other info, it's about as good as it gets, and in
- ;; practice it should work just fine (fingers crossed).
- (let ((prefixes (pcomplete--common-quoted-suffix
+ (completion-table-with-quoting
+ (if (equal pcomplete-stub buftext)
+ completions
+ ;; This may not always be strictly right, but given the lack
+ ;; of any other info, it's about as good as it gets, and in
+ ;; practice it should work just fine (fingers crossed).
+ (let ((suf-len (pcomplete--common-suffix
pcomplete-stub buftext)))
- (comint--table-subvert
- completions (cdr prefixes) (car prefixes)
- #'pcomplete-quote-argument #'pcomplete-unquote-argument)))
- (t
- (lambda (string pred action)
- (let ((res (complete-with-action
- action completions string pred)))
- (if (stringp res)
- (pcomplete-quote-argument res)
- res))))))
+ (completion-table-subvert
+ completions
+ (substring buftext 0 (- (length buftext) suf-len))
+ (substring pcomplete-stub 0
+ (- (length pcomplete-stub) suf-len)))))
+ pcomplete-unquote-argument-function
+ pcomplete-requote-argument-function))
(pred
;; Pare it down, if applicable.
(when (and pcomplete-use-paring pcomplete-seen)
@@ -828,22 +791,8 @@ this is `comint-dynamic-complete-functions'."
(throw 'pcompleted t)
pcomplete-args))))))
-(defun pcomplete-quote-argument (filename)
- "Return FILENAME with magic characters quoted.
-Magic characters are those in `pcomplete-arg-quote-list'."
- (if (null pcomplete-arg-quote-list)
- filename
- (let ((index 0))
- (mapconcat (lambda (c)
- (prog1
- (or (run-hook-with-args-until-success
- 'pcomplete-quote-arg-hook filename index)
- (when (memq c pcomplete-arg-quote-list)
- (string ?\\ c))
- (char-to-string c))
- (setq index (1+ index))))
- filename
- ""))))
+(define-obsolete-function-alias
+ 'pcomplete-quote-argument #'comint-quote-filename "24.2")
;; file-system completion lists
@@ -1179,14 +1128,14 @@ Returns non-nil if a space was appended at the end."
(if (not pcomplete-ignore-case)
(insert-and-inherit (if raw-p
(substring entry (length stub))
- (pcomplete-quote-argument
+ (comint-quote-filename
(substring entry (length stub)))))
;; the stub is not quoted at this time, so to determine the
;; length of what should be in the buffer, we must quote it
;; FIXME: Here we presume that quoting `stub' gives us the exact
;; text in the buffer before point, which is not guaranteed;
;; e.g. it is not the case in eshell when completing ${FOO}tm[TAB].
- (delete-char (- (length (pcomplete-quote-argument stub))))
+ (delete-char (- (length (comint-quote-filename stub))))
;; if there is already a backslash present to handle the first
;; character, don't bother quoting it
(when (eq (char-before) ?\\)
@@ -1194,7 +1143,7 @@ Returns non-nil if a space was appended at the end."
(setq entry (substring entry 1)))
(insert-and-inherit (if raw-p
entry
- (pcomplete-quote-argument entry))))
+ (comint-quote-filename entry))))
(let (space-added)
(when (and (not (memq (char-before) pcomplete-suffix-list))
addsuffix)
@@ -1204,7 +1153,7 @@ Returns non-nil if a space was appended at the end."
pcomplete-last-completion-stub stub)
space-added)))
-;; selection of completions
+;; Selection of completions.
(defun pcomplete-do-complete (stub completions)
"Dynamically complete at point using STUB and COMPLETIONS.
diff --git a/lisp/play/zone.el b/lisp/play/zone.el
index f47e273d612..b64099844e2 100644
--- a/lisp/play/zone.el
+++ b/lisp/play/zone.el
@@ -1,6 +1,6 @@
;;; zone.el --- idle display hacks
-;; Copyright (C) 2000-2012 Free Software Foundation, Inc.
+;; Copyright (C) 2000-2012 Free Software Foundation, Inc.
;; Author: Victor Zandy <zandy@cs.wisc.edu>
;; Maintainer: Thien-Thi Nguyen <ttn@gnu.org>
@@ -595,8 +595,7 @@ If the element is a function or a list of a function and a number,
(when (< 50 (random 100))
(goto-char (point-max))
(forward-line -1)
- (let ((kill-whole-line t))
- (kill-line))
+ (delete-region (point) (line-beginning-position 2))
(goto-char (point-min))
(insert (nth (random (length lines)) lines)))
(message (concat (make-string (random (- (frame-width) 5)) ? ) "grrr"))
diff --git a/lisp/progmodes/cc-defs.el b/lisp/progmodes/cc-defs.el
index 93a72796561..5d758b53b56 100644
--- a/lisp/progmodes/cc-defs.el
+++ b/lisp/progmodes/cc-defs.el
@@ -93,7 +93,7 @@
;;; Variables also used at compile time.
-(defconst c-version "5.32.2"
+(defconst c-version "5.32.3"
"CC Mode version number.")
(defconst c-version-sym (intern c-version))
diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el
index 65e28c11e21..82aee7bdbb9 100644
--- a/lisp/progmodes/cc-engine.el
+++ b/lisp/progmodes/cc-engine.el
@@ -2612,13 +2612,24 @@ comment at the start of cc-engine.el for more info."
(setq c-state-point-min (point-min)))
(defun c-append-lower-brace-pair-to-state-cache (from &optional upper-lim)
- ;; If there is a brace pair preceding FROM in the buffer (not necessarily
- ;; immediately preceding), push a cons onto `c-state-cache' to represent it.
- ;; FROM must not be inside a literal. If UPPER-LIM is non-nil, we append
- ;; the highest brace pair whose "}" is below UPPER-LIM.
+ ;; If there is a brace pair preceding FROM in the buffer, at the same level
+ ;; of nesting (not necessarily immediately preceding), push a cons onto
+ ;; `c-state-cache' to represent it. FROM must not be inside a literal. If
+ ;; UPPER-LIM is non-nil, we append the highest brace pair whose "}" is below
+ ;; UPPER-LIM.
;;
;; Return non-nil when this has been done.
;;
+ ;; The situation it copes with is this transformation:
+ ;;
+ ;; OLD: { (.) {...........}
+ ;; ^ ^
+ ;; FROM HERE
+ ;;
+ ;; NEW: { {....} (.) {.........
+ ;; ^ ^ ^
+ ;; LOWER BRACE PAIR HERE or HERE
+ ;;
;; This routine should be fast. Since it can get called a LOT, we maintain
;; `c-state-brace-pair-desert', a small cache of "failures", such that we
;; reduce the time wasted in repeated fruitless searches in brace deserts.
@@ -2637,10 +2648,25 @@ comment at the start of cc-engine.el for more info."
(unless (and c-state-brace-pair-desert
(eq cache-pos (car c-state-brace-pair-desert))
(<= from (cdr c-state-brace-pair-desert)))
- ;; Only search what we absolutely need to:
- (if (and c-state-brace-pair-desert
- (eq cache-pos (car c-state-brace-pair-desert)))
- (narrow-to-region (cdr c-state-brace-pair-desert) (point-max)))
+ ;; DESERT-LIM. Only search what we absolutely need to,
+ (let ((desert-lim
+ (and c-state-brace-pair-desert
+ (eq cache-pos (car c-state-brace-pair-desert))
+ (cdr c-state-brace-pair-desert)))
+ ;; CACHE-LIM. This limit will be necessary when an opening
+ ;; paren at `cache-pos' has just had its matching close paren
+ ;; inserted. `cache-pos' continues to be a search bound, even
+ ;; though the algorithm below would skip over the new paren
+ ;; pair.
+ (cache-lim (and cache-pos (< cache-pos from) cache-pos)))
+ (narrow-to-region
+ (cond
+ ((and desert-lim cache-lim)
+ (max desert-lim cache-lim))
+ (desert-lim)
+ (cache-lim)
+ ((point-min)))
+ (point-max)))
;; In the next pair of nested loops, the inner one moves back past a
;; pair of (mis-)matching parens or brackets; the outer one moves
@@ -2674,7 +2700,7 @@ comment at the start of cc-engine.el for more info."
(cons new-cons (cdr c-state-cache))))
(t (setq c-state-cache (cons new-cons c-state-cache)))))
- ;; We haven't found a brace pair. Record this.
+ ;; We haven't found a brace pair. Record this in the cache.
(setq c-state-brace-pair-desert (cons cache-pos from))))))))
(defsubst c-state-push-any-brace-pair (bra+1 macro-start-or-here)
diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el
index 2608ba0b0c3..45986591499 100644
--- a/lisp/progmodes/compile.el
+++ b/lisp/progmodes/compile.el
@@ -209,7 +209,7 @@ of[ \t]+\"?\\([a-zA-Z]?:?[^\":\n]+\\)\"?:" 3 2 nil (1))
;; due to matching filenames via \\(.*?\\). This might be faster.
(maven
;; Maven is a popular free software build tool for Java.
- "\\([0-9]*[^0-9\n]\\(?:[^\n :]\\| [^-/\n]\\|:[^ \n]\\)*?\\):\\[\\([0-9]+\\),\\([0-9]+\\)\\] " 1 2 3)
+ "\\([^ \n]\\(?:[^\n :]\\| [^-/\n]\\|:[^ \n]\\)*?\\):\\[\\([0-9]+\\),\\([0-9]+\\)\\] " 1 2 3)
(jikes-line
"^ *\\([0-9]+\\)\\.[ \t]+.*\n +\\(<-*>\n\\*\\*\\* \\(?:Error\\|Warnin\\(g\\)\\)\\)"
@@ -1068,14 +1068,14 @@ FMTS is a list of format specs for transforming the file name.
end-marker loc end-loc)
(if (not (and marker (marker-buffer marker)))
(setq marker nil) ; no valid marker for this file
- (setq loc (or line 1)) ; normalize no linenumber to line 1
+ (unless line (setq line 1)) ; normalize no linenumber to line 1
(catch 'marker ; find nearest loc, at least one exists
(dolist (x (cddr (compilation--file-struct->loc-tree
file-struct))) ; Loop over remaining lines.
- (if (> (car x) loc) ; Still bigger.
+ (if (> (car x) line) ; Still bigger.
(setq marker-line x)
- (if (> (- (or (car marker-line) 1) loc)
- (- loc (car x))) ; Current line is nearer.
+ (if (> (- (or (car marker-line) 1) line)
+ (- line (car x))) ; Current line is nearer.
(setq marker-line x))
(throw 'marker t))))
(setq marker (compilation--loc->marker (cadr marker-line))
@@ -1093,15 +1093,15 @@ FMTS is a list of format specs for transforming the file name.
(save-restriction
(widen)
(goto-char (marker-position marker))
- (when (or end-col end-line)
+ ;; Set end-marker if appropriate and go to line.
+ (if (not (or end-col end-line))
+ (beginning-of-line (- line marker-line -1))
(beginning-of-line (- (or end-line line) marker-line -1))
(if (or (null end-col) (< end-col 0))
(end-of-line)
(compilation-move-to-column end-col screen-columns))
- (setq end-marker (point-marker)))
- (beginning-of-line (if end-line
- (- line end-line -1)
- (- loc marker-line -1)))
+ (setq end-marker (point-marker))
+ (when end-line (beginning-of-line (- line end-line -1))))
(if col
(compilation-move-to-column col screen-columns)
(forward-to-indentation 0))
@@ -1884,6 +1884,9 @@ Runs `compilation-mode-hook' with `run-mode-hooks' (which see).
(setq buffer-read-only t)
(run-mode-hooks 'compilation-mode-hook))
+;;;###autoload
+(put 'define-compilation-mode 'doc-string-elt 3)
+
(defmacro define-compilation-mode (mode name doc &rest body)
"This is like `define-derived-mode' without the PARENT argument.
The parent is always `compilation-mode' and the customizable `compilation-...'
@@ -2132,14 +2135,14 @@ and runs `compilation-filter-hook'."
(if (or (eq (get-text-property ,limit 'compilation-message)
(get-text-property opt 'compilation-message))
(eq pt opt))
- (error ,error compilation-error)
+ (user-error ,error compilation-error)
(setq pt ,limit)))
;; prop 'compilation-message usually has 2 changes, on and off, so
;; re-search if off
(or (setq msg (get-text-property pt 'compilation-message))
(if (setq pt (,property-change pt 'compilation-message nil ,limit))
(setq msg (get-text-property pt 'compilation-message)))
- (error ,error compilation-error))
+ (user-error ,error compilation-error))
(or (< (compilation--message->type msg) compilation-skip-threshold)
(if different-file
(eq (prog1 last
@@ -2660,9 +2663,6 @@ The file-structure looks like this:
(if (eq v fs) (remhash k compilation-locs)))
compilation-locs)))
-(add-to-list 'debug-ignored-errors "\\`No more [-a-z ]+s yet\\'")
-(add-to-list 'debug-ignored-errors "\\`Moved past last .*")
-
;;; Compatibility with the old compile.el.
(defvaralias 'compilation-last-buffer 'next-error-last-buffer)
diff --git a/lisp/progmodes/ebnf2ps.el b/lisp/progmodes/ebnf2ps.el
index 05c9e160ceb..b7cbdcc7018 100644
--- a/lisp/progmodes/ebnf2ps.el
+++ b/lisp/progmodes/ebnf2ps.el
@@ -1181,10 +1181,10 @@ Elements of ALIST that are not conses are ignored."
;;; Interface to the command system
(defgroup postscript nil
- "PostScript Group."
+ "Printing with PostScript"
:tag "PostScript"
:version "20"
- :group 'emacs)
+ :group 'environment)
(defgroup ebnf2ps nil
diff --git a/lisp/progmodes/etags.el b/lisp/progmodes/etags.el
index d8a561340d3..2664b51eea9 100644
--- a/lisp/progmodes/etags.el
+++ b/lisp/progmodes/etags.el
@@ -1,4 +1,4 @@
-;;; etags.el --- etags facility for Emacs
+;;; etags.el --- etags facility for Emacs -*- lexical-binding: t -*-
;; Copyright (C) 1985-1986, 1988-1989, 1992-1996, 1998, 2000-2012
;; Free Software Foundation, Inc.
@@ -554,11 +554,10 @@ Returns t if it visits a tags table, or nil if there are no more in the list."
(cond ((eq cont 'same)
;; Use the ambient value of tags-file-name.
(or tags-file-name
- (error "%s"
- (substitute-command-keys
- (concat "No tags table in use; "
- "use \\[visit-tags-table] to select one")))))
-
+ (user-error "%s"
+ (substitute-command-keys
+ (concat "No tags table in use; "
+ "use \\[visit-tags-table] to select one")))))
((eq t cont)
;; Find the next table.
(if (tags-next-table)
@@ -566,7 +565,6 @@ Returns t if it visits a tags table, or nil if there are no more in the list."
(while (and (not (or (get-file-buffer tags-file-name)
(file-exists-p tags-file-name)))
(tags-next-table)))))
-
(t
;; Pick a table out of our hat.
(tags-table-check-computed-list) ;Get it up to date, we might use it.
@@ -706,7 +704,8 @@ Returns t if it visits a tags table, or nil if there are no more in the list."
(kill-local-variable 'tags-file-name)
(if (eq local-tags-file-name tags-file-name)
(setq tags-file-name nil))
- (error "File %s is not a valid tags table" local-tags-file-name)))))
+ (user-error "File %s is not a valid tags table"
+ local-tags-file-name)))))
(defun tags-reset-tags-tables ()
"Reset tags state to cancel effect of any previous \\[visit-tags-table] or \\[find-tag]."
@@ -781,7 +780,7 @@ tags table and its (recursively) included tags tables."
(setq tags-completion-table nil)))))
(defun tags-lazy-completion-table ()
- (lexical-let ((buf (current-buffer)))
+ (let ((buf (current-buffer)))
(lambda (string pred action)
(with-current-buffer buf
(save-excursion
@@ -831,7 +830,7 @@ If no tags table is loaded, do nothing and return nil."
(tags-lazy-completion-table)
nil nil nil nil default)))
(if (equal spec "")
- (or default (error "There is no default tag"))
+ (or default (user-error "There is no default tag"))
spec)))
(defvar last-tag nil
@@ -886,7 +885,7 @@ See documentation of variable `tags-file-name'."
(if (eq '- next-p)
;; Pop back to a previous location.
(if (ring-empty-p tags-location-ring)
- (error "No previous tag locations")
+ (user-error "No previous tag locations")
(let ((marker (ring-remove tags-location-ring 0)))
(prog1
;; Move to the saved location.
@@ -1150,8 +1149,8 @@ error message."
(set-marker (car tag-lines-already-matched) nil nil)
(setq tag-lines-already-matched (cdr tag-lines-already-matched)))
(set-marker match-marker nil nil)
- (error "No %stags %s %s" (if first-search "" "more ")
- matching pattern))
+ (user-error "No %stags %s %s" (if first-search "" "more ")
+ matching pattern))
;; Found a tag; extract location info.
(beginning-of-line)
@@ -1391,8 +1390,8 @@ hits the start of file."
offset (* 3 offset))) ; expand search window
(or found
(re-search-forward pat nil t)
- (error "Rerun etags: `%s' not found in %s"
- pat buffer-file-name)))
+ (user-error "Rerun etags: `%s' not found in %s"
+ pat buffer-file-name)))
;; Position point at the right place
;; if the search string matched an extra Ctrl-m at the beginning.
(and (eq selective-display t)
@@ -1742,7 +1741,7 @@ if the file was newly read in, the value is the filename."
(and novisit
(get-buffer " *next-file*")
(kill-buffer " *next-file*"))
- (error "All files processed"))
+ (user-error "All files processed"))
(let* ((next (car next-file-list))
(buffer (get-file-buffer next))
(new (not buffer)))
@@ -1775,9 +1774,9 @@ if the file was newly read in, the value is the filename."
"Form for `tags-loop-continue' to eval to change one file.")
(defvar tags-loop-scan
- '(error "%s"
- (substitute-command-keys
- "No \\[tags-search] or \\[tags-query-replace] in progress"))
+ '(user-error "%s"
+ (substitute-command-keys
+ "No \\[tags-search] or \\[tags-query-replace] in progress"))
"Form for `tags-loop-continue' to eval to scan one file.
If it returns non-nil, this file needs processing by evalling
\`tags-loop-operate'. Otherwise, move on to the next file.")
@@ -1937,7 +1936,7 @@ directory specification."
(if (funcall list-tags-function file)
(setq gotany t)))
(or gotany
- (error "File %s not in current tags tables" file)))))
+ (user-error "File %s not in current tags tables" file)))))
(with-current-buffer "*Tags List*"
(require 'apropos)
(with-no-warnings
@@ -2067,28 +2066,15 @@ for \\[find-tag] (which see)."
(interactive)
(or tags-table-list
tags-file-name
- (error "%s"
- (substitute-command-keys
- "No tags table loaded; try \\[visit-tags-table]")))
+ (user-error "%s"
+ (substitute-command-keys
+ "No tags table loaded; try \\[visit-tags-table]")))
(let ((comp-data (tags-completion-at-point-function)))
(if (null comp-data)
- (error "Nothing to complete")
+ (user-error "Nothing to complete")
(completion-in-region (car comp-data) (cadr comp-data)
(nth 2 comp-data)
(plist-get (nthcdr 3 comp-data) :predicate)))))
-
-(dolist (x '("^No tags table in use; use .* to select one$"
- "^There is no default tag$"
- "^No previous tag locations$"
- "^File .* is not a valid tags table$"
- "^No \\(more \\|\\)tags \\(matching\\|containing\\) "
- "^Rerun etags: `.*' not found in "
- "^All files processed$"
- "^No .* or .* in progress$"
- "^File .* not in current tags tables$"
- "^No tags table loaded"
- "^Nothing to complete$"))
- (add-to-list 'debug-ignored-errors x))
(provide 'etags)
diff --git a/lisp/progmodes/f90.el b/lisp/progmodes/f90.el
index 1d2beedd191..712725ffaf0 100644
--- a/lisp/progmodes/f90.el
+++ b/lisp/progmodes/f90.el
@@ -2204,18 +2204,13 @@ Leave point at the end of line."
"Typing `\\[help-command] or `? lists all the F90 abbrevs.
Any other key combination is executed normally."
(interactive "*")
- (insert last-command-event)
- (let (char event)
- (if (fboundp 'next-command-event) ; XEmacs
- (setq event (next-command-event)
- char (and (fboundp 'event-to-character)
- (event-to-character event)))
- (setq event (read-event)
- char event))
- ;; Insert char if not equal to `?', or if abbrev-mode is off.
- (if (and abbrev-mode (memq char (list ?? help-char)))
- (f90-abbrev-help)
- (setq unread-command-events (list event)))))
+ (self-insert-command 1)
+ (when abbrev-mode
+ (set-temporary-overlay-map
+ (let ((map (make-sparse-keymap)))
+ (define-key map [??] 'f90-abbrev-help)
+ (define-key map (vector help-char) 'f90-abbrev-help)
+ map))))
(defun f90-abbrev-help ()
"List the currently defined abbrevs in F90 mode."
diff --git a/lisp/progmodes/flymake.el b/lisp/progmodes/flymake.el
index ed8eb81932e..96d4105f65b 100644
--- a/lisp/progmodes/flymake.el
+++ b/lisp/progmodes/flymake.el
@@ -253,7 +253,7 @@ are the string substitutions (see `format')."
(make-variable-buffer-local 'flymake-output-residual)
(defgroup flymake nil
- "A universal on-the-fly syntax checker."
+ "Universal on-the-fly syntax checker."
:version "23.1"
:group 'tools)
diff --git a/lisp/progmodes/gdb-mi.el b/lisp/progmodes/gdb-mi.el
index 1be74ff544b..5ea0f6a3fd2 100644
--- a/lisp/progmodes/gdb-mi.el
+++ b/lisp/progmodes/gdb-mi.el
@@ -459,9 +459,14 @@ Most recent commands are listed first. This list stores only the last
`gdb-debug-log-max' values. This variable is used to debug GDB-MI.")
;;;###autoload
-(defcustom gdb-enable-debug nil
- "Non-nil means record the process input and output in `gdb-debug-log'."
- :type 'boolean
+(define-minor-mode gdb-enable-debug
+ "Toggle logging of transaction between Emacs and Gdb.
+The log is stored in `gdb-debug-log' as an alist with elements
+whose cons is send, send-item or recv and whose cdr is the string
+being transferred. This list may grow up to a size of
+`gdb-debug-log-max' after which the oldest element (at the end of
+the list) is deleted every time a new one is added (at the front)."
+ :global t
:group 'gdb
:version "22.1")
@@ -512,21 +517,6 @@ Also display the main routine in the disassembly buffer if present."
;; Force mode line redisplay soon.
(force-mode-line-update)))))
-(defun gdb-enable-debug (arg)
- "Toggle logging of transaction between Emacs and Gdb.
-The log is stored in `gdb-debug-log' as an alist with elements
-whose cons is send, send-item or recv and whose cdr is the string
-being transferred. This list may grow up to a size of
-`gdb-debug-log-max' after which the oldest element (at the end of
-the list) is deleted every time a new one is added (at the front)."
- (interactive "P")
- (setq gdb-enable-debug
- (if (null arg)
- (not gdb-enable-debug)
- (> (prefix-numeric-value arg) 0)))
- (message (format "Logging of transaction %sabled"
- (if gdb-enable-debug "en" "dis"))))
-
;; These two are used for menu and toolbar
(defun gdb-control-all-threads ()
"Switch to non-stop/A mode."
@@ -603,6 +593,8 @@ NOARG must be t when this macro is used outside `gud-def'"
(set (make-local-variable 'gud-marker-filter) #'gud-gdb-marker-filter))
(funcall filter proc string))))
+(defvar gdb-control-level 0)
+
;;;###autoload
(defun gdb (command-line)
"Run gdb on program FILE in buffer *gud-FILE*.
@@ -677,6 +669,7 @@ detailed description of this mode.
(set-process-filter proc #'gdb--check-interpreter))
(set (make-local-variable 'gud-minor-mode) 'gdbmi)
+ (set (make-local-variable 'gdb-control-level) 0)
(setq comint-input-sender 'gdb-send)
(when (ring-empty-p comint-input-ring) ; cf shell-mode
(let ((hfile (expand-file-name (or (getenv "GDBHISTFILE")
@@ -827,7 +820,7 @@ detailed description of this mode.
(run-hooks 'gdb-mode-hook))
(defun gdb-init-1 ()
- ;; (re-)initialize
+ ;; (Re-)initialize.
(setq gdb-selected-frame nil
gdb-frame-number nil
gdb-thread-number nil
@@ -862,8 +855,13 @@ detailed description of this mode.
(gdb-clear-inferior-io)
(gdb-inferior-io--init-proc (get-process "gdb-inferior"))
- (if (eq window-system 'w32)
- (gdb-input "-gdb-set new-console off" 'ignore))
+ (when (eq system-type 'windows-nt)
+ ;; Don't create a separate console window for the debuggee.
+ (gdb-input "-gdb-set new-console off" 'ignore)
+ ;; Force GDB to behave as if its input and output stream were
+ ;; connected to a TTY device (since on Windows we use pipes for
+ ;; communicating with GDB).
+ (gdb-input "-gdb-set interactive-mode on" 'ignore))
(gdb-input "-gdb-set height 0" 'ignore)
(when gdb-non-stop
@@ -871,7 +869,7 @@ detailed description of this mode.
(gdb-input "-enable-pretty-printing" 'ignore)
- ;; find source file and compilation directory here
+ ;; Find source file and compilation directory here.
(if gdb-create-source-file-list
;; Needs GDB 6.2 onwards.
(gdb-input "-file-list-exec-source-files" 'gdb-get-source-file-list))
@@ -971,15 +969,17 @@ no input, and GDB is waiting for input."
(gdb-create-define-alist)
(add-hook 'after-save-hook 'gdb-create-define-alist nil t)))
-(defmacro gdb-if-arrow (arrow-position &rest body)
- `(if ,arrow-position
- (let ((buffer (marker-buffer ,arrow-position)) (line))
- (if (equal buffer (window-buffer (posn-window end)))
- (with-current-buffer buffer
- (when (or (equal start end)
- (equal (posn-point start)
- (marker-position ,arrow-position)))
- ,@body))))))
+(defmacro gdb--if-arrow (arrow-position start-posn end-posn &rest body)
+ (declare (indent 3))
+ (let ((buffer (make-symbol "buffer")))
+ `(if ,arrow-position
+ (let ((,buffer (marker-buffer ,arrow-position)))
+ (if (equal ,buffer (window-buffer (posn-window ,end-posn)))
+ (with-current-buffer ,buffer
+ (when (or (equal ,start-posn ,end-posn)
+ (equal (posn-point ,start-posn)
+ (marker-position ,arrow-position)))
+ ,@body)))))))
(defun gdb-mouse-until (event)
"Continue running until a source line past the current line.
@@ -989,15 +989,15 @@ with mouse-1 (default bindings)."
(interactive "e")
(let ((start (event-start event))
(end (event-end event)))
- (gdb-if-arrow gud-overlay-arrow-position
- (setq line (line-number-at-pos (posn-point end)))
- (gud-call (concat "until " (number-to-string line))))
- (gdb-if-arrow gdb-disassembly-position
- (save-excursion
- (goto-char (point-min))
- (forward-line (1- (line-number-at-pos (posn-point end))))
- (forward-char 2)
- (gud-call (concat "until *%a"))))))
+ (gdb--if-arrow gud-overlay-arrow-position start end
+ (let ((line (line-number-at-pos (posn-point end))))
+ (gud-call (concat "until " (number-to-string line)))))
+ (gdb--if-arrow gdb-disassembly-position start end
+ (save-excursion
+ (goto-char (point-min))
+ (forward-line (1- (line-number-at-pos (posn-point end))))
+ (forward-char 2)
+ (gud-call (concat "until *%a"))))))
(defun gdb-mouse-jump (event)
"Set execution address/line.
@@ -1008,19 +1008,17 @@ line, and no execution takes place."
(interactive "e")
(let ((start (event-start event))
(end (event-end event)))
- (gdb-if-arrow gud-overlay-arrow-position
- (setq line (line-number-at-pos (posn-point end)))
- (progn
- (gud-call (concat "tbreak " (number-to-string line)))
- (gud-call (concat "jump " (number-to-string line)))))
- (gdb-if-arrow gdb-disassembly-position
- (save-excursion
- (goto-char (point-min))
- (forward-line (1- (line-number-at-pos (posn-point end))))
- (forward-char 2)
- (progn
- (gud-call (concat "tbreak *%a"))
- (gud-call (concat "jump *%a")))))))
+ (gdb--if-arrow gud-overlay-arrow-position start end
+ (let ((line (line-number-at-pos (posn-point end))))
+ (gud-call (concat "tbreak " (number-to-string line)))
+ (gud-call (concat "jump " (number-to-string line)))))
+ (gdb--if-arrow gdb-disassembly-position start end
+ (save-excursion
+ (goto-char (point-min))
+ (forward-line (1- (line-number-at-pos (posn-point end))))
+ (forward-char 2)
+ (gud-call (concat "tbreak *%a"))
+ (gud-call (concat "jump *%a"))))))
(defcustom gdb-show-changed-values t
"If non-nil change the face of out of scope variables and changed values.
@@ -1042,10 +1040,11 @@ Changed values are highlighted with the face `font-lock-warning-face'."
:group 'gdb
:version "22.2")
-(defcustom gdb-speedbar-auto-raise nil
- "If non-nil raise speedbar every time display of watch expressions is\
- updated."
- :type 'boolean
+(define-minor-mode gdb-speedbar-auto-raise
+ "Minor mode to automatically raise the speedbar for watch expressions.
+With prefix argument ARG, automatically raise speedbar if ARG is
+positive, otherwise don't automatically raise it."
+ :global t
:group 'gdb
:version "22.1")
@@ -1055,18 +1054,6 @@ Changed values are highlighted with the face `font-lock-warning-face'."
:group 'gdb
:version "22.1")
-(defun gdb-speedbar-auto-raise (arg)
- "Toggle automatic raising of the speedbar for watch expressions.
-With prefix argument ARG, automatically raise speedbar if ARG is
-positive, otherwise don't automatically raise it."
- (interactive "P")
- (setq gdb-speedbar-auto-raise
- (if (null arg)
- (not gdb-speedbar-auto-raise)
- (> (prefix-numeric-value arg) 0)))
- (message (format "Auto raising %sabled"
- (if gdb-speedbar-auto-raise "en" "dis"))))
-
(define-key gud-minor-mode-map "\C-c\C-w" 'gud-watch)
(define-key global-map (vconcat gud-key-prefix "\C-w") 'gud-watch)
@@ -1204,8 +1191,8 @@ With arg, enter name of variable to be watched in the minibuffer."
(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: "))
+ (varnum (car var))
+ (value (read-string "New value: ")))
(gdb-input (concat "-var-assign " varnum " " value)
`(lambda () (gdb-edit-value-handler ,value)))))
@@ -1700,6 +1687,16 @@ static char *magick[] = {
:group 'gdb)
+(defvar gdb-control-commands-regexp
+ (concat
+ "^\\("
+ "commands\\|if\\|while\\|define\\|document\\|python\\|"
+ "while-stepping\\|stepping\\|ws\\|actions"
+ "\\)\\([[:blank:]]+.*\\)?$")
+ "Regexp matching GDB commands that enter a recursive reading loop.
+As long as GDB is in the recursive reading loop, it does not expect
+commands to be prefixed by \"-interpreter-exec console\".")
+
(defun gdb-send (proc string)
"A comint send filter for gdb."
(with-current-buffer gud-comint-buffer
@@ -1709,11 +1706,15 @@ static char *magick[] = {
(if (not (string= "" string))
(setq gdb-last-command string)
(if gdb-last-command (setq string gdb-last-command)))
- (if (string-match "^-" string)
- ;; MI command
+ (if (or (string-match "^-" string)
+ (> gdb-control-level 0))
+ ;; Either MI command or we are feeding GDB's recursive reading loop.
(progn
(setq gdb-first-done-or-error t)
- (process-send-string proc (concat string "\n")))
+ (process-send-string proc (concat string "\n"))
+ (if (and (string-match "^end$" string)
+ (> gdb-control-level 0))
+ (setq gdb-control-level (1- gdb-control-level))))
;; CLI command
(if (string-match "\\\\$" string)
(setq gdb-continuation (concat gdb-continuation string "\n"))
@@ -1724,7 +1725,12 @@ static char *magick[] = {
(if gdb-enable-debug
(push (cons 'mi-send to-send) gdb-debug-log))
(process-send-string proc to-send))
- (setq gdb-continuation nil))))
+ (if (and (string-match "^end$" string)
+ (> gdb-control-level 0))
+ (setq gdb-control-level (1- gdb-control-level)))
+ (setq gdb-continuation nil)))
+ (if (string-match gdb-control-commands-regexp string)
+ (setq gdb-control-level (1+ gdb-control-level))))
(defun gdb-mi-quote (string)
"Return STRING quoted properly as an MI argument.
@@ -1838,7 +1844,7 @@ is running."
(setq gud-running
(string= (bindat-get-field (gdb-current-buffer-thread) 'state)
"running"))
- ;; Set frame number to "0" when _current_ threads stops
+ ;; Set frame number to "0" when _current_ threads stops.
(when (and (gdb-current-buffer-thread)
(not (eq gud-running old-value)))
(setq gdb-frame-number "0"))))
@@ -1906,10 +1912,10 @@ is running."
(> (length gdb-debug-log) gdb-debug-log-max))
(setcdr (nthcdr (1- gdb-debug-log-max) gdb-debug-log) nil)))
- ;; Recall the left over gud-marker-acc from last time
+ ;; Recall the left over gud-marker-acc from last time.
(setq gud-marker-acc (concat gud-marker-acc string))
- ;; Start accumulating output for the GUD buffer
+ ;; Start accumulating output for the GUD buffer.
(setq gdb-filter-output "")
(let (output-record-list)
@@ -1955,9 +1961,8 @@ is running."
(defun gdb-gdb (_output-field))
(defun gdb-shell (output-field)
- (let ((gdb-output-sink gdb-output-sink))
- (setq gdb-filter-output
- (concat output-field gdb-filter-output))))
+ (setq gdb-filter-output
+ (concat output-field gdb-filter-output)))
(defun gdb-ignored-notification (_output-field))
@@ -2041,14 +2046,15 @@ current thread and update GDB buffers."
(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.
-;;; (when file
-;;; (setq
-;;; ;; Extract the frame position from the marker.
-;;; gud-last-frame (cons file
-;;; (string-to-number
-;;; (match-string 6 gud-marker-acc)))))
+ ;; 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.
+ ;;(when file
+ ;; (setq
+ ;; ;; Extract the frame position from the marker.
+ ;; gud-last-frame (cons file
+ ;; (string-to-number
+ ;; (match-string 6 gud-marker-acc)))))
(setq gdb-inferior-status (or reason "unknown"))
(gdb-force-mode-line-update
@@ -2332,8 +2338,9 @@ calling `gdb-table-string'."
(defun gdb-get-many-fields (struct &rest fields)
"Return a list of FIELDS values from STRUCT."
(let ((values))
- (dolist (field fields values)
- (setq values (append values (list (bindat-get-field struct field)))))))
+ (dolist (field fields)
+ (push (bindat-get-field struct field) values))
+ (nreverse values)))
(defmacro def-gdb-auto-update-trigger (trigger-name gdb-command
handler-name
@@ -4107,31 +4114,19 @@ window is dedicated."
nil win5))
(select-window win0)))
-(defcustom gdb-many-windows nil
+(define-minor-mode gdb-many-windows
"If nil just pop up the GUD buffer unless `gdb-show-main' is t.
In this case it starts with two windows: one displaying the GUD
buffer and the other with the source file with the main routine
of the debugged program. Non-nil means display the layout shown for
`gdb'."
- :type 'boolean
+ :global t
:group 'gdb
- :version "22.1")
-
-(defun gdb-many-windows (arg)
- "Toggle the number of windows in the basic arrangement.
-With arg, display additional buffers iff arg is positive."
- (interactive "P")
- (setq gdb-many-windows
- (if (null arg)
- (not gdb-many-windows)
- (> (prefix-numeric-value arg) 0)))
- (message (format "Display of other windows %sabled"
- (if gdb-many-windows "en" "dis")))
+ :version "22.1"
(if (and gud-comint-buffer
(buffer-name gud-comint-buffer))
- (condition-case nil
- (gdb-restore-windows)
- (error nil))))
+ (ignore-errors
+ (gdb-restore-windows))))
(defun gdb-restore-windows ()
"Restore the basic arrangement of windows used by gdb.
diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el
index 1f60c351252..7123a8dd7fc 100644
--- a/lisp/progmodes/gud.el
+++ b/lisp/progmodes/gud.el
@@ -58,8 +58,9 @@
;; GUD commands must be visible in C buffers visited by GUD
(defgroup gud nil
- "Grand Unified Debugger mode for gdb and other debuggers under Emacs.
-Supported debuggers include gdb, sdb, dbx, xdb, perldb, pdb (Python) and jdb."
+ "The \"Grand Unified Debugger\" interface.
+Supported debuggers include gdb, sdb, dbx, xdb, perldb,
+pdb (Python), and jdb."
:group 'processes
:group 'tools)
diff --git a/lisp/progmodes/idlw-shell.el b/lisp/progmodes/idlw-shell.el
index d843de04913..da8f30bab43 100644
--- a/lisp/progmodes/idlw-shell.el
+++ b/lisp/progmodes/idlw-shell.el
@@ -183,12 +183,6 @@ so that the name will be unique among multiple Emacs processes."
:group 'idlwave-shell-general-setup
:type 'string)
-(defvar idlwave-shell-fix-inserted-breaks nil
- "OBSOLETE VARIABLE, is no longer used.
-
-The documentation of this variable used to be:
-If non-nil then run `idlwave-shell-remove-breaks' to clean up IDL messages.")
-
(defcustom idlwave-shell-prefix-key "\C-c\C-d"
"The prefix key for the debugging map `idlwave-shell-mode-prefix-map'.
This variable must already be set when idlwave-shell.el is loaded.
@@ -223,9 +217,6 @@ window, but is useful for stepping, etc."
;; (defcustom idlwave-shell-debug-modifiers... See idlwave.el
-(defvar idlwave-shell-activate-alt-keybindings nil
- "Obsolete variable. See `idlwave-shell-debug-modifiers'.")
-
(defcustom idlwave-shell-use-truename nil
"Non-nil means, use `file-truename' when looking for buffers.
If this variable is non-nil, Emacs will use the function `file-truename' to
@@ -335,9 +326,6 @@ expression being examined."
(string :tag "Label ")
(string :tag "Command"))))
-(defvar idlwave-shell-print-expression-function nil
- "OBSOLETE VARIABLE, is no longer used.")
-
(defcustom idlwave-shell-separate-examine-output t
"Non-nil means, put output of examine commands in their own buffer."
:group 'idlwave-shell-command-setup
@@ -520,9 +508,6 @@ t Glyph when possible, otherwise face (same effect as 'glyph)."
(const :tag "Display glyph (red dot)" glyph)
(const :tag "Glyph or face." t)))
-(defvar idlwave-shell-use-breakpoint-glyph t
- "Obsolete variable. See `idlwave-shell-mark-breakpoints'.")
-
(defcustom idlwave-shell-breakpoint-face 'idlwave-shell-bp
"The face for breakpoint lines in the source code.
Allows you to choose the font, color and other properties for
@@ -4198,12 +4183,8 @@ Otherwise, just expand the file name."
([( ?[)] ?[ idlwave-shell-goto-previous-bp t t)
([( ?])] ?] idlwave-shell-goto-next-bp t t)
([(control ?f)] ?f idlwave-shell-window)))
- (mod (cond ((and idlwave-shell-debug-modifiers
- (listp idlwave-shell-debug-modifiers)
- (not (equal '() idlwave-shell-debug-modifiers)))
- idlwave-shell-debug-modifiers)
- (idlwave-shell-activate-alt-keybindings
- '(alt))))
+ (mod (and (listp idlwave-shell-debug-modifiers)
+ idlwave-shell-debug-modifiers))
(shift (memq 'shift mod))
(mod-noshift (delete 'shift (copy-sequence mod)))
s k1 c2 k2 cmd electric only-buffer cannotshift)
diff --git a/lisp/progmodes/idlwave.el b/lisp/progmodes/idlwave.el
index 74f37df9b2d..015f58df3fb 100644
--- a/lisp/progmodes/idlwave.el
+++ b/lisp/progmodes/idlwave.el
@@ -456,9 +456,6 @@ value of `!DIR'. See also `idlwave-library-path'."
(defvar idlwave-xml-system-rinfo-converted-file "idl_xml_rinfo.el")
(defvar idlwave-path-file "idlpath.el")
-(defvar idlwave-libinfo-file nil
- "Obsolete variable, no longer used.")
-
(defcustom idlwave-special-lib-alist nil
"Alist of regular expressions matching special library directories.
When listing routine source locations, IDLWAVE gives a short hint where
@@ -555,10 +552,6 @@ completions."
:group 'idlwave-completion
:type 'boolean)
-(defvar idlwave-default-completion-case-is-down nil
- "Obsolete variable. See `idlwave-complete-empty-string-as-lower-case' and
-`idlwave-completion-case'.")
-
(defcustom idlwave-buffer-case-takes-precedence nil
"Non-nil means, the case of tokens in buffers dominates over system stuff.
To make this possible, we need to re-case everything each time we update
@@ -4525,8 +4518,6 @@ information updated immediately, leave NO-CONCATENATE nil."
nil 'idlwave-load-rinfo-next-step)))
(error nil))))
-(defvar idlwave-library-routines nil "Obsolete variable.")
-
;;------ XML Help routine info system
(defun idlwave-load-system-routine-info ()
;; Load the system routine info from the cached routine info file,
diff --git a/lisp/progmodes/js.el b/lisp/progmodes/js.el
index 69da6737520..cdc3ef1c2e0 100644
--- a/lisp/progmodes/js.el
+++ b/lisp/progmodes/js.el
@@ -1,4 +1,4 @@
-;;; js.el --- Major mode for editing JavaScript
+;;; js.el --- Major mode for editing JavaScript -*- lexical-binding: t -*-
;; Copyright (C) 2008-2012 Free Software Foundation, Inc.
@@ -1036,17 +1036,12 @@ LIMIT defaults to point."
(c-save-buffer-state
(open-items
- orig-match-start
- orig-match-end
- orig-depth
parse
prev-parse-point
name
case-fold-search
filtered-class-styles
- new-item
- goal-point
- end-prop)
+ goal-point)
;; Figure out which class styles we need to look for
(setq filtered-class-styles
@@ -1651,6 +1646,11 @@ This performs fontification according to `js--class-styles'."
(funcall
(syntax-propertize-rules
;; Distinguish /-division from /-regexp chars (and from /-comment-starter).
+ ;; FIXME: Allow regexps after infix ops like + ...
+ ;; https://developer.mozilla.org/en/JavaScript/Reference/Operators
+ ;; We can probably just add +, -, !, <, >, %, ^, ~, |, &, ?, : at which
+ ;; point I think only * and / would be missing which could also be added,
+ ;; but need care to avoid affecting the // and */ comment markers.
("\\(?:^\\|[=([{,:;]\\)\\(?:[ \t]\\)*\\(/\\)[^/*]"
(1 (ignore
(forward-char -1)
@@ -2956,8 +2956,8 @@ browser, respectively."
(ido-mode -1))
(with-js
- (lexical-let ((tabs (js--get-tabs)) selected-tab-cname
- selected-tab prev-hitab)
+ (let ((tabs (js--get-tabs)) selected-tab-cname
+ selected-tab prev-hitab)
;; Disambiguate names
(setq tabs (loop with tab-names = (make-hash-table :test 'equal)
@@ -3053,7 +3053,6 @@ browser, respectively."
"gBrowser"
"selectedTab")
- with index = 0
for match in ido-matches
for candidate-tab = (find-tab-by-cname match)
if (eq (fourth candidate-tab) tab-to-match)
@@ -3330,7 +3329,7 @@ If one hasn't been set, or if it's stale, prompt for a new one."
comment-start-skip "\\(//+\\|/\\*+\\)\\s *")
(set (make-local-variable 'electric-indent-chars)
- (append "{}():;," electric-indent-chars))
+ (append "{}():;," electric-indent-chars)) ;FIXME: js2-mode adds "[]*".
(set (make-local-variable 'electric-layout-rules)
'((?\; . after) (?\{ . after) (?\} . before)))
diff --git a/lisp/progmodes/make-mode.el b/lisp/progmodes/make-mode.el
index a173b11500e..2f4419ba2ea 100644
--- a/lisp/progmodes/make-mode.el
+++ b/lisp/progmodes/make-mode.el
@@ -1493,7 +1493,6 @@ Insertion takes place at point."
(setq buffer-read-only t))
(defun makefile-browse (targets macros)
- (interactive)
(if (zerop (+ (length targets) (length macros)))
(progn
(beep)
diff --git a/lisp/progmodes/meta-mode.el b/lisp/progmodes/meta-mode.el
index d0432f58d60..9978ee62687 100644
--- a/lisp/progmodes/meta-mode.el
+++ b/lisp/progmodes/meta-mode.el
@@ -829,6 +829,7 @@ The environment marked is the one that contains point or follows point."
st)
"Syntax table used in Metafont or MetaPost mode.")
+(define-obsolete-variable-alias 'meta-mode-map 'meta-common-mode-map "24.1")
(defvar meta-common-mode-map
(let ((map (make-sparse-keymap)))
;; Comment Paragraphs:
@@ -858,7 +859,6 @@ The environment marked is the one that contains point or follows point."
;; (define-key map "\C-c\C-l" 'meta-recenter-output)
map)
"Keymap used in Metafont or MetaPost mode.")
-(define-obsolete-variable-alias 'meta-mode-map 'meta-common-mode-map "24.1")
(easy-menu-define
meta-mode-menu meta-common-mode-map
diff --git a/lisp/progmodes/octave-mod.el b/lisp/progmodes/octave-mod.el
index 7091a9468c5..79b3fcee720 100644
--- a/lisp/progmodes/octave-mod.el
+++ b/lisp/progmodes/octave-mod.el
@@ -989,18 +989,13 @@ If Abbrev mode is turned on, typing ` (grave accent) followed by ? or
executed normally.
Note that all Octave mode abbrevs start with a grave accent."
(interactive)
- (if (not abbrev-mode)
- (self-insert-command 1)
- (let (c)
- (insert last-command-event)
- (if (if (featurep 'xemacs)
- (or (eq (event-to-character (setq c (next-event))) ??)
- (eq (event-to-character c) help-char))
- (or (eq (setq c (read-event)) ??)
- (eq c help-char)))
- (let ((abbrev-table-name-list '(octave-abbrev-table)))
- (list-abbrevs))
- (setq unread-command-events (list c))))))
+ (self-insert-command 1)
+ (when abbrev-mode
+ (set-temporary-overlay-map
+ (let ((map (make-sparse-keymap)))
+ (define-key map [??] 'list-abbrevs)
+ (define-key map (vector help-char) 'list-abbrevs)
+ map))))
(define-skeleton octave-insert-defun
"Insert an Octave function skeleton.
diff --git a/lisp/progmodes/pascal.el b/lisp/progmodes/pascal.el
index 8f7f313753c..62ba9418ced 100644
--- a/lisp/progmodes/pascal.el
+++ b/lisp/progmodes/pascal.el
@@ -467,6 +467,8 @@ no args, if that value is non-nil."
;;;
;;; Interactive functions
;;;
+(defvar pascal--extra-indent 0)
+
(defun pascal-insert-block ()
"Insert Pascal begin ... end; block in the code with right indentation."
(interactive)
@@ -757,14 +759,14 @@ on the line which ends a function or procedure named NAME."
;;; Indentation
;;;
(defconst pascal-indent-alist
- '((block . (+ ind pascal-indent-level))
- (case . (+ ind pascal-case-indent))
- (caseblock . ind) (cpp . 0)
- (declaration . (+ ind pascal-indent-level))
+ '((block . (+ pascal--extra-indent pascal-indent-level))
+ (case . (+ pascal--extra-indent pascal-case-indent))
+ (caseblock . pascal--extra-indent) (cpp . 0)
+ (declaration . (+ pascal--extra-indent pascal-indent-level))
(paramlist . (pascal-indent-paramlist t))
(comment . (pascal-indent-comment))
- (defun . ind) (contexp . ind)
- (unknown . ind) (string . 0) (progbeg . 0)))
+ (defun . pascal--extra-indent) (contexp . pascal--extra-indent)
+ (unknown . pascal--extra-indent) (string . 0) (progbeg . 0)))
(defun pascal-indent-command ()
"Indent for special part of code."
@@ -786,12 +788,11 @@ 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))
(type (car indent-str))
- (ind (car (cdr indent-str))))
+ (pascal--extra-indent (car (cdr indent-str))))
;; Labels should not be indented.
(if (and (looking-at "^[0-9a-zA-Z]+[ \t]*:[^=]")
(not (eq type 'declaration)))
@@ -803,13 +804,13 @@ on the line which ends a function or procedure named NAME."
())
(; Other things should have no extra indent
(looking-at pascal-noindent-re)
- (indent-to ind))
+ (indent-to pascal--extra-indent))
(; Nested functions should be indented
(looking-at pascal-defun-re)
(if (and pascal-indent-nested-functions
(eq type 'defun))
- (indent-to (+ ind pascal-indent-level))
- (indent-to ind)))
+ (indent-to (+ pascal--extra-indent pascal-indent-level))
+ (indent-to pascal--extra-indent)))
(; But most lines are treated this way
(indent-to (eval (cdr (assoc type pascal-indent-alist))))
))))
@@ -949,7 +950,7 @@ Do not count labels, case-statements or records."
(point-marker)
(re-search-backward "\\<case\\>" nil t)))
(beg (point))
- (ind 0))
+ (pascal--extra-indent 0))
;; Get right indent
(while (< (point) end)
(if (re-search-forward
@@ -959,8 +960,8 @@ Do not count labels, case-statements or records."
(if (< (point) end)
(progn
(delete-horizontal-space)
- (if (> (current-column) ind)
- (setq ind (current-column)))
+ (if (> (current-column) pascal--extra-indent)
+ (setq pascal--extra-indent (current-column)))
(pascal-end-of-statement))))
(goto-char beg)
;; Indent all case statements
@@ -969,7 +970,7 @@ Do not count labels, case-statements or records."
"^[ \t]*[^][ \t,\\.:]+[ \t]*\\(,[ \t]*[^ \t,:]+[ \t]*\\)*:"
(marker-position end) 'move)
(forward-char -1))
- (indent-to (1+ ind))
+ (indent-to (1+ pascal--extra-indent))
(if (/= (following-char) ?:)
()
(forward-char 1)
@@ -1017,7 +1018,7 @@ indent of the current line in parameterlist."
(max (progn (pascal-declaration-end)
(point))
pos))))
- ind)
+ pascal--extra-indent)
(goto-char stpos)
;; Indent lines in record block
@@ -1031,13 +1032,13 @@ indent of the current line in parameterlist."
(forward-line 1)))
;; Do lineup
- (setq ind (pascal-get-lineup-indent stpos edpos lineup))
+ (setq pascal--extra-indent (pascal-get-lineup-indent stpos edpos lineup))
(goto-char stpos)
(while (and (<= (point) edpos) (not (eobp)))
(if (search-forward lineup (point-at-eol) 'move)
(forward-char -1))
(delete-horizontal-space)
- (indent-to ind)
+ (indent-to pascal--extra-indent)
(if (not (looking-at lineup))
(forward-line 1) ; No more indent if there is no : or =
(forward-char 1)
@@ -1056,7 +1057,7 @@ indent of the current line in parameterlist."
;from b to e nicely. The lineup string is str."
(defun pascal-get-lineup-indent (b e str)
(save-excursion
- (let ((ind 0)
+ (let ((pascal--extra-indent 0)
(reg (concat str "\\|\\(\\<record\\>\\)\\|" pascal-defun-re)))
(goto-char b)
;; Get rightmost position
@@ -1071,14 +1072,14 @@ indent of the current line in parameterlist."
(t
(goto-char (match-beginning 0))
(skip-chars-backward " \t")
- (if (> (current-column) ind)
- (setq ind (current-column)))
+ (if (> (current-column) pascal--extra-indent)
+ (setq pascal--extra-indent (current-column)))
(goto-char (match-end 0))
(end-of-line)
))))
;; In case no lineup was found
- (if (> ind 0)
- (1+ ind)
+ (if (> pascal--extra-indent 0)
+ (1+ pascal--extra-indent)
;; No lineup-string found
(goto-char b)
(end-of-line)
@@ -1353,21 +1354,21 @@ The default is a name found in the buffer around point."
(default (if (pascal-comp-defun default nil 'lambda)
default ""))
(label
- ;; Do completion with default
+ ;; Do completion with default.
(completing-read (if (not (string= default ""))
(concat "Label (default " default "): ")
"Label: ")
;; Complete with the defuns found in the
;; current-buffer.
- (lexical-let ((buf (current-buffer)))
+ (let ((buf (current-buffer)))
(lambda (s p a)
(with-current-buffer buf
(pascal-comp-defun s p a))))
nil t "")))
- ;; If there was no response on prompt, use default value
+ ;; If there was no response on prompt, use default value.
(if (string= label "")
(setq label default))
- ;; Goto right place in buffer if label is not an empty string
+ ;; Goto right place in buffer if label is not an empty string.
(or (string= label "")
(progn
(goto-char (point-min))
diff --git a/lisp/progmodes/prolog.el b/lisp/progmodes/prolog.el
index 74c8c31b425..16d85cb2d79 100644
--- a/lisp/progmodes/prolog.el
+++ b/lisp/progmodes/prolog.el
@@ -295,7 +295,7 @@
(defgroup prolog nil
- "Major modes for editing and running Prolog and Mercury files."
+ "Editing and running Prolog and Mercury files."
:group 'languages)
(defgroup prolog-faces nil
@@ -833,18 +833,116 @@ This is really kludgy, and unneeded (i.e. obsolete) in Emacs>=24."
)
table))
(defvar prolog-mode-abbrev-table nil)
-(defvar prolog-upper-case-string ""
- "A string containing all upper case characters.
-Set by prolog-build-case-strings.")
-(defvar prolog-lower-case-string ""
- "A string containing all lower case characters.
-Set by prolog-build-case-strings.")
-
-(defvar prolog-atom-char-regexp ""
- "Set by prolog-set-atom-regexps.")
-;; "Regexp specifying characters which constitute atoms without quoting.")
-(defvar prolog-atom-regexp ""
- "Set by prolog-set-atom-regexps.")
+
+(if (eval-when-compile
+ (and (string-match "[[:upper:]]" "A")
+ (with-temp-buffer
+ (insert "A") (skip-chars-backward "[:upper:]") (bolp))))
+ (progn
+ (defconst prolog-upper-case-string "[:upper:]"
+ "A string containing a char-range matching all upper case characters.")
+ (defconst prolog-lower-case-string "[:lower:]"
+ "A string containing a char-range matching all lower case characters."))
+
+ ;; GNU Emacs compatibility: GNU Emacs does not differentiate between
+ ;; ints and chars, or at least these two are interchangeable.
+ (defalias 'prolog-int-to-char
+ (if (fboundp 'int-to-char) #'int-to-char #'identity))
+
+ (defalias 'prolog-char-to-int
+ (if (fboundp 'char-to-int) #'char-to-int #'identity))
+
+ (defun prolog-ints-intervals (ints)
+ "Return a list of intervals (from . to) covering INTS."
+ (when ints
+ (setq ints (sort ints '<))
+ (let ((prev (car ints))
+ (interval-start (car ints))
+ intervals)
+ (while ints
+ (let ((next (car ints)))
+ (when (> next (1+ prev)) ; start of new interval
+ (setq intervals (cons (cons interval-start prev) intervals))
+ (setq interval-start next))
+ (setq prev next)
+ (setq ints (cdr ints))))
+ (setq intervals (cons (cons interval-start prev) intervals))
+ (reverse intervals))))
+
+ (defun prolog-dash-letters (string)
+ "Return a condensed regexp covering all letters in STRING."
+ (let ((intervals (prolog-ints-intervals (mapcar #'prolog-char-to-int
+ (string-to-list string))))
+ codes)
+ (while intervals
+ (let* ((i (car intervals))
+ (from (car i))
+ (to (cdr i))
+ (c (cond ((= from to) `(,from))
+ ((= (1+ from) to) `(,from ,to))
+ (t `(,from ?- ,to)))))
+ (setq codes (cons c codes)))
+ (setq intervals (cdr intervals)))
+ (apply 'concat (reverse codes))))
+
+ (let ((up_string "")
+ (low_string ""))
+ ;; Use `map-char-table' if it is defined. Otherwise enumerate all
+ ;; numbers between 0 and 255. `map-char-table' is probably safer.
+ ;;
+ ;; `map-char-table' causes problems under Emacs 23.0.0.1, the
+ ;; while loop seems to do its job well (Ryszard Szopa)
+ ;;
+ ;;(if (and (not (featurep 'xemacs))
+ ;; (fboundp 'map-char-table))
+ ;; (map-char-table
+ ;; (lambda (key value)
+ ;; (cond
+ ;; ((and
+ ;; (eq (prolog-int-to-char key) (downcase key))
+ ;; (eq (prolog-int-to-char key) (upcase key)))
+ ;; ;; Do nothing if upper and lower case are the same
+ ;; )
+ ;; ((eq (prolog-int-to-char key) (downcase key))
+ ;; ;; The char is lower case
+ ;; (setq low_string (format "%s%c" low_string key)))
+ ;; ((eq (prolog-int-to-char key) (upcase key))
+ ;; ;; The char is upper case
+ ;; (setq up_string (format "%s%c" up_string key)))
+ ;; ))
+ ;; (current-case-table))
+ ;; `map-char-table' was undefined.
+ (let ((key 0))
+ (while (< key 256)
+ (cond
+ ((and
+ (eq (prolog-int-to-char key) (downcase key))
+ (eq (prolog-int-to-char key) (upcase key)))
+ ;; Do nothing if upper and lower case are the same
+ )
+ ((eq (prolog-int-to-char key) (downcase key))
+ ;; The char is lower case
+ (setq low_string (format "%s%c" low_string key)))
+ ((eq (prolog-int-to-char key) (upcase key))
+ ;; The char is upper case
+ (setq up_string (format "%s%c" up_string key)))
+ )
+ (setq key (1+ key))))
+ ;; )
+ ;; The strings are single-byte strings.
+ (defconst prolog-upper-case-string (prolog-dash-letters up_string)
+ "A string containing a char-range matching all upper case characters.")
+ (defconst prolog-lower-case-string (prolog-dash-letters low_string)
+ "A string containing a char-range matching all lower case characters.")
+ ))
+
+(defconst prolog-atom-char-regexp
+ (if (string-match "[[:alnum:]]" "0")
+ "[[:alnum:]_$]"
+ (format "[%s%s0-9_$]" prolog-lower-case-string prolog-upper-case-string))
+ "Regexp specifying characters which constitute atoms without quoting.")
+(defconst prolog-atom-regexp
+ (format "[%s$]%s*" prolog-lower-case-string prolog-atom-char-regexp))
(defconst prolog-left-paren "[[({]" ;FIXME: Why not \\s(?
"The characters used as left parentheses for the indentation code.")
@@ -887,6 +985,96 @@ Set by prolog-build-case-strings.")
'(("dcg" . "-->") ("rule" . ":-") ("simplification" . "<=>")
("propagation" . "==>")))))
+;; SMIE support
+
+(require 'smie)
+
+(defvar prolog-use-smie t)
+
+(defun prolog-smie-forward-token ()
+ ;; FIXME: Add support for 0'<char>, if needed after adding it to
+ ;; syntax-propertize-functions.
+ (forward-comment (point-max))
+ (buffer-substring-no-properties
+ (point)
+ (progn (cond
+ ((looking-at "[!;]") (forward-char 1))
+ ((not (zerop (skip-chars-forward "#&*+-./:<=>?@\\^`~"))))
+ ((not (zerop (skip-syntax-forward "w_'"))))
+ ;; In case of non-ASCII punctuation.
+ ((not (zerop (skip-syntax-forward ".")))))
+ (point))))
+
+(defun prolog-smie-backward-token ()
+ ;; FIXME: Add support for 0'<char>, if needed after adding it to
+ ;; syntax-propertize-functions.
+ (forward-comment (- (point-max)))
+ (buffer-substring-no-properties
+ (point)
+ (progn (cond
+ ((memq (char-before) '(?! ?\;)) (forward-char -1))
+ ((not (zerop (skip-chars-backward "#&*+-./:<=>?@\\^`~"))))
+ ((not (zerop (skip-syntax-backward "w_'"))))
+ ;; In case of non-ASCII punctuation.
+ ((not (zerop (skip-syntax-backward ".")))))
+ (point))))
+
+(defconst prolog-smie-grammar
+ ;; Rather than construct the operator levels table from the BNF,
+ ;; we directly provide the operator precedences from GNU Prolog's
+ ;; manual (7.14.10 op/3). The only problem is that GNU Prolog's
+ ;; manual uses precedence levels in the opposite sense (higher
+ ;; numbers bind less tightly) than SMIE, so we use negative numbers.
+ '(("." -10000 -10000)
+ (":-" -1200 -1200)
+ ("-->" -1200 -1200)
+ (";" -1100 -1100)
+ ("->" -1050 -1050)
+ ("," -1000 -1000)
+ ("\\+" -900 -900)
+ ("=" -700 -700)
+ ("\\=" -700 -700)
+ ("=.." -700 -700)
+ ("==" -700 -700)
+ ("\\==" -700 -700)
+ ("@<" -700 -700)
+ ("@=<" -700 -700)
+ ("@>" -700 -700)
+ ("@>=" -700 -700)
+ ("is" -700 -700)
+ ("=:=" -700 -700)
+ ("=\\=" -700 -700)
+ ("<" -700 -700)
+ ("=<" -700 -700)
+ (">" -700 -700)
+ (">=" -700 -700)
+ (":" -600 -600)
+ ("+" -500 -500)
+ ("-" -500 -500)
+ ("/\\" -500 -500)
+ ("\\/" -500 -500)
+ ("*" -400 -400)
+ ("/" -400 -400)
+ ("//" -400 -400)
+ ("rem" -400 -400)
+ ("mod" -400 -400)
+ ("<<" -400 -400)
+ (">>" -400 -400)
+ ("**" -200 -200)
+ ("^" -200 -200)
+ ;; Prefix
+ ;; ("+" 200 200)
+ ;; ("-" 200 200)
+ ;; ("\\" 200 200)
+ (:smie-closer-alist (t . "."))
+ )
+ "Precedence levels of infix operators.")
+
+(defun prolog-smie-rules (kind token)
+ (pcase (cons kind token)
+ (`(:elem . basic) prolog-indent-width)
+ (`(:after . ".") '(column . 0)) ;; To work around smie-closer-alist.
+ (`(:after . ,(or `":-" `"->" `"-->")) prolog-indent-width)))
;;-------------------------------------------------------------------
@@ -959,7 +1147,6 @@ VERSION is of the format (Major . Minor)"
(set (make-local-variable 'paragraph-separate) paragraph-start)
(set (make-local-variable 'paragraph-ignore-fill-prefix) t)
(set (make-local-variable 'normal-auto-fill-function) 'prolog-do-auto-fill)
- (set (make-local-variable 'indent-line-function) 'prolog-indent-line)
(set (make-local-variable 'comment-start) "%")
(set (make-local-variable 'comment-end) "")
(set (make-local-variable 'comment-add) 1)
@@ -968,7 +1155,6 @@ VERSION is of the format (Major . Minor)"
;; inside quoted atoms or strings
(format "^\\(\\(%s\\|%s\\|[^\n\'\"%%]\\)*\\)\\(/\\*+ *\\|%%+ *\\)"
prolog-quoted-atom-regexp prolog-string-regexp))
- (set (make-local-variable 'comment-indent-function) 'prolog-comment-indent)
(set (make-local-variable 'parens-require-spaces) nil)
;; Initialize Prolog system specific variables
(dolist (var '(prolog-keywords prolog-types prolog-mode-specificators
@@ -984,6 +1170,13 @@ VERSION is of the format (Major . Minor)"
'(prolog-font-lock-keywords nil nil ((?_ . "w"))))
(set (make-local-variable 'syntax-propertize-function)
prolog-syntax-propertize-function)
+
+ (if prolog-use-smie
+ ;; Setup SMIE.
+ (smie-setup prolog-smie-grammar #'prolog-smie-rules
+ :forward-token #'prolog-smie-forward-token
+ :backward-token #'prolog-smie-backward-token)
+ (set (make-local-variable 'indent-line-function) 'prolog-indent-line))
)
(defun prolog-mode-keybindings-common (map)
@@ -1096,11 +1289,9 @@ if that value is non-nil."
((eq prolog-system 'gnu) "[GNU]")
(t ""))))
(prolog-mode-variables)
- (prolog-build-case-strings)
- (prolog-set-atom-regexps)
(dolist (ar prolog-align-rules) (add-to-list 'align-rules-list ar))
- ;; imenu entry moved to the appropriate hook for consistency
+ ;; `imenu' entry moved to the appropriate hook for consistency.
;; Load SICStus debugger if suitable
(if (and (eq prolog-system 'sicstus)
@@ -1614,7 +1805,8 @@ For use with the `compilation-parse-errors-function' variable."
limit t)
(setq filepath (match-string 2)))
- ;; ###### Does this work with SICStus under Windows (i.e. backslashes and stuff?)
+ ;; ###### Does this work with SICStus under Windows
+ ;; (i.e. backslashes and stuff?)
(if (string-match "\\(.*/\\)\\([^/]*\\)$" filepath)
(progn
(setq dir (match-string 1 filepath))
@@ -1838,7 +2030,8 @@ Argument BOUND is a buffer position limiting searching."
(defface prolog-builtin-face
'((((class color) (background light)) (:foreground "Purple"))
(((class color) (background dark)) (:foreground "Cyan"))
- (((class grayscale) (background light)) (:foreground "LightGray" :bold t))
+ (((class grayscale) (background light))
+ :foreground "LightGray" :bold t)
(((class grayscale) (background dark)) (:foreground "DimGray" :bold t))
(t (:bold t)))
"Face name to use for compiler warnings."
@@ -2093,20 +2286,6 @@ rigidly along with this one (not yet)."
(prolog-insert-spaces-after-paren))
))
-(defun prolog-comment-indent ()
- "Compute prolog comment indentation."
- ;; FIXME: Only difference with default behavior is that %%% is not
- ;; flushed to column 0 but just left where the user put it.
- (cond ((looking-at "%%%") (prolog-indentation-level-of-line))
- ((looking-at "%%") (prolog-indent-level))
- (t
- (save-excursion
- (skip-chars-backward " \t")
- ;; Insert one space at least, except at left margin.
- (max (+ (current-column) (if (bolp) 0 1))
- comment-column)))
- ))
-
(defun prolog-indent-level ()
"Compute prolog indentation level."
(save-excursion
@@ -3200,7 +3379,8 @@ When called with prefix argument ARG, disable zipping instead."
(save-excursion
(let ((state (prolog-clause-info))
(object (prolog-in-object)))
- (if (or (equal (nth 0 state) "") (equal (prolog-in-string-or-comment) 'cmt))
+ (if (or (equal (nth 0 state) "")
+ (equal (prolog-in-string-or-comment) 'cmt))
nil
(if (and (eq prolog-system 'sicstus)
object)
@@ -3229,6 +3409,7 @@ STRING should be given if the last search was by `string-match' on STRING."
(defun prolog-pred-start ()
"Return the starting point of the first clause of the current predicate."
+ ;; FIXME: Use SMIE.
(save-excursion
(goto-char (prolog-clause-start))
;; Find first clause, unless it was a directive
@@ -3261,8 +3442,9 @@ STRING should be given if the last search was by `string-match' on STRING."
(defun prolog-pred-end ()
"Return the position at the end of the last clause of the current predicate."
+ ;; FIXME: Use SMIE.
(save-excursion
- (goto-char (prolog-clause-end)) ; if we are before the first predicate
+ (goto-char (prolog-clause-end)) ; If we are before the first predicate.
(goto-char (prolog-clause-start))
(let* ((pinfo (prolog-clause-info))
(predname (nth 0 pinfo))
@@ -3517,6 +3699,7 @@ If already at the end of clause, move to next clause."
(defun prolog-beginning-of-predicate ()
"Go to the nearest beginning of predicate before current point.
Return the final point or nil if no such a beginning was found."
+ ;; FIXME: Hook into beginning-of-defun.
(interactive)
(let ((op (point))
(pos (prolog-pred-start)))
@@ -3536,6 +3719,7 @@ Return the final point or nil if no such a beginning was found."
(defun prolog-end-of-predicate ()
"Go to the end of the current predicate."
+ ;; FIXME: Hook into end-of-defun.
(interactive)
(let ((op (point)))
(goto-char (prolog-pred-end))
@@ -3657,7 +3841,7 @@ a new comment is created."
"Delete preceding character or whitespace.
If `prolog-hungry-delete-key-flag' is non-nil, then all preceding whitespace is
consumed. If however an ARG is supplied, or `prolog-hungry-delete-key-flag' is
-nil, or point is inside a literal then the function in the variable
+nil, or point is inside a literal then the function
`backward-delete-char' is called."
(interactive "P")
(if (or (not prolog-hungry-delete-key-flag)
@@ -3677,6 +3861,7 @@ nil, or point is inside a literal then the function in the variable
(defun prolog-electric-if-then-else (arg)
"If `prolog-electric-if-then-else-flag' is non-nil, indent if-then-else constructs.
Bound to the >, ; and ( keys."
+ ;; FIXME: Use post-self-insert-hook or electric-indent-mode.
(interactive "P")
(self-insert-command (prefix-numeric-value arg))
(if prolog-electric-if-then-else-flag (prolog-insert-spaces-after-paren)))
@@ -3686,6 +3871,7 @@ Bound to the >, ; and ( keys."
That is, insert space (if appropriate), `:-' and newline if colon is pressed
at the end of a line that starts in the first column (i.e., clause
heads)."
+ ;; FIXME: Use post-self-insert-hook.
(interactive "P")
(if (and prolog-electric-colon-flag
(null arg)
@@ -3696,7 +3882,7 @@ heads)."
(unless (save-excursion (backward-char 1) (looking-at "\\s "))
(insert " "))
(insert ":-\n")
- (prolog-indent-line))
+ (indent-according-to-mode))
(self-insert-command (prefix-numeric-value arg))))
(defun prolog-electric-dash (arg)
@@ -3704,6 +3890,7 @@ heads)."
that is, insert space (if appropriate), `-->' and newline if dash is pressed
at the end of a line that starts in the first column (i.e., DCG
heads)."
+ ;; FIXME: Use post-self-insert-hook.
(interactive "P")
(if (and prolog-electric-dash-flag
(null arg)
@@ -3714,7 +3901,7 @@ heads)."
(unless (save-excursion (backward-char 1) (looking-at "\\s "))
(insert " "))
(insert "-->\n")
- (prolog-indent-line))
+ (indent-according-to-mode))
(self-insert-command (prefix-numeric-value arg))))
(defun prolog-electric-dot (arg)
@@ -3729,6 +3916,7 @@ When invoked at the beginning of line, insert a head of a new clause
of the current predicate.
When called with prefix argument ARG, insert just dot."
+ ;; FIXME: Use post-self-insert-hook.
(interactive "P")
;; Check for situations when the electricity should not be active
(if (or (not prolog-electric-dot-flag)
@@ -3788,6 +3976,7 @@ If `prolog-electric-underscore-flag' is non-nil and the point is
on a variable then replace the variable with underscore and skip
the following comma and whitespace, if any.
If the point is not on a variable then insert underscore."
+ ;; FIXME: Use post-self-insert-hook.
(interactive)
(if prolog-electric-underscore-flag
(let (;start
@@ -3862,144 +4051,36 @@ PREFIX is the prefix of the search regexp."
(backward-char)))
)))
+;;(defun prolog-regexp-dash-continuous-chars (chars)
+;; (let ((ints (mapcar #'prolog-char-to-int (string-to-list chars)))
+;; (beg 0)
+;; (end 0))
+;; (if (null ints)
+;; chars
+;; (while (and (< (+ beg 1) (length chars))
+;; (not (or (= (+ (nth beg ints) 1) (nth (+ beg 1) ints))
+;; (= (nth beg ints) (nth (+ beg 1) ints)))))
+;; (setq beg (+ beg 1)))
+;; (setq beg (+ beg 1)
+;; end beg)
+;; (while (and (< (+ end 1) (length chars))
+;; (or (= (+ (nth end ints) 1) (nth (+ end 1) ints))
+;; (= (nth end ints) (nth (+ end 1) ints))))
+;; (setq end (+ end 1)))
+;; (if (equal (substring chars end) "")
+;; (substring chars 0 beg)
+;; (concat (substring chars 0 beg) "-"
+;; (prolog-regexp-dash-continuous-chars (substring chars end))))
+;; )))
+
+;;(defun prolog-condense-character-sets (regexp)
+;; "Condense adjacent characters in character sets of REGEXP."
+;; (let ((next -1))
+;; (while (setq next (string-match "\\[\\(.*?\\)\\]" regexp (1+ next)))
+;; (setq regexp (replace-match (prolog-dash-letters (match-string 1 regexp))
+;; t t regexp 1))))
+;; regexp)
-(defun prolog-set-atom-regexps ()
- "Set the `prolog-atom-char-regexp' and `prolog-atom-regexp' variables.
-Must be called after `prolog-build-case-strings'."
- (setq prolog-atom-char-regexp
- (format "[%s%s0-9_$]"
- ;; FIXME: why not a-zA-Z?
- prolog-lower-case-string
- prolog-upper-case-string))
- (setq prolog-atom-regexp
- (format "[%s$]%s*"
- prolog-lower-case-string
- prolog-atom-char-regexp))
- )
-
-(defun prolog-build-case-strings ()
- "Set `prolog-upper-case-string' and `prolog-lower-case-string'.
-Uses the current case-table for extracting the relevant information."
- (let ((up_string "")
- (low_string ""))
- ;; Use `map-char-table' if it is defined. Otherwise enumerate all
- ;; numbers between 0 and 255. `map-char-table' is probably safer.
- ;;
- ;; `map-char-table' causes problems under Emacs 23.0.0.1, the
- ;; while loop seems to do its job well (Ryszard Szopa)
- ;;
- ;;(if (and (not (featurep 'xemacs))
- ;; (fboundp 'map-char-table))
- ;; (map-char-table
- ;; (lambda (key value)
- ;; (cond
- ;; ((and
- ;; (eq (prolog-int-to-char key) (downcase key))
- ;; (eq (prolog-int-to-char key) (upcase key)))
- ;; ;; Do nothing if upper and lower case are the same
- ;; )
- ;; ((eq (prolog-int-to-char key) (downcase key))
- ;; ;; The char is lower case
- ;; (setq low_string (format "%s%c" low_string key)))
- ;; ((eq (prolog-int-to-char key) (upcase key))
- ;; ;; The char is upper case
- ;; (setq up_string (format "%s%c" up_string key)))
- ;; ))
- ;; (current-case-table))
- ;; `map-char-table' was undefined.
- (let ((key 0))
- (while (< key 256)
- (cond
- ((and
- (eq (prolog-int-to-char key) (downcase key))
- (eq (prolog-int-to-char key) (upcase key)))
- ;; Do nothing if upper and lower case are the same
- )
- ((eq (prolog-int-to-char key) (downcase key))
- ;; The char is lower case
- (setq low_string (format "%s%c" low_string key)))
- ((eq (prolog-int-to-char key) (upcase key))
- ;; The char is upper case
- (setq up_string (format "%s%c" up_string key)))
- )
- (setq key (1+ key))))
- ;; )
- ;; The strings are single-byte strings
- (setq prolog-upper-case-string (prolog-dash-letters up_string))
- (setq prolog-lower-case-string (prolog-dash-letters low_string))
- ))
-
-;(defun prolog-regexp-dash-continuous-chars (chars)
-; (let ((ints (mapcar #'prolog-char-to-int (string-to-list chars)))
-; (beg 0)
-; (end 0))
-; (if (null ints)
-; chars
-; (while (and (< (+ beg 1) (length chars))
-; (not (or (= (+ (nth beg ints) 1) (nth (+ beg 1) ints))
-; (= (nth beg ints) (nth (+ beg 1) ints)))))
-; (setq beg (+ beg 1)))
-; (setq beg (+ beg 1)
-; end beg)
-; (while (and (< (+ end 1) (length chars))
-; (or (= (+ (nth end ints) 1) (nth (+ end 1) ints))
-; (= (nth end ints) (nth (+ end 1) ints))))
-; (setq end (+ end 1)))
-; (if (equal (substring chars end) "")
-; (substring chars 0 beg)
-; (concat (substring chars 0 beg) "-"
-; (prolog-regexp-dash-continuous-chars (substring chars end))))
-; )))
-
-(defun prolog-ints-intervals (ints)
- "Return a list of intervals (from . to) covering INTS."
- (when ints
- (setq ints (sort ints '<))
- (let ((prev (car ints))
- (interval-start (car ints))
- intervals)
- (while ints
- (let ((next (car ints)))
- (when (> next (1+ prev)) ; start of new interval
- (setq intervals (cons (cons interval-start prev) intervals))
- (setq interval-start next))
- (setq prev next)
- (setq ints (cdr ints))))
- (setq intervals (cons (cons interval-start prev) intervals))
- (reverse intervals))))
-
-(defun prolog-dash-letters (string)
- "Return a condensed regexp covering all letters in STRING."
- (let ((intervals (prolog-ints-intervals (mapcar #'prolog-char-to-int
- (string-to-list string))))
- codes)
- (while intervals
- (let* ((i (car intervals))
- (from (car i))
- (to (cdr i))
- (c (cond ((= from to) `(,from))
- ((= (1+ from) to) `(,from ,to))
- (t `(,from ?- ,to)))))
- (setq codes (cons c codes)))
- (setq intervals (cdr intervals)))
- (apply 'concat (reverse codes))))
-
-;(defun prolog-condense-character-sets (regexp)
-; "Condense adjacent characters in character sets of REGEXP."
-; (let ((next -1))
-; (while (setq next (string-match "\\[\\(.*?\\)\\]" regexp (1+ next)))
-; (setq regexp (replace-match (prolog-dash-letters (match-string 1 regexp))
-; t t regexp 1))))
-; regexp)
-
-;; GNU Emacs compatibility: GNU Emacs does not differentiate between
-;; ints and chars, or at least these two are interchangeable.
-(defalias 'prolog-int-to-char
- (if (fboundp 'int-to-char) #'int-to-char #'identity))
-
-(defalias 'prolog-char-to-int
- (if (fboundp 'char-to-int) #'char-to-int #'identity))
-
;;-------------------------------------------------------------------
;; Menu stuff (both for the editing buffer and for the inferior
;; prolog buffer)
@@ -4110,7 +4191,7 @@ Uses the current case-table for extracting the relevant information."
["Beginning of predicate" prolog-beginning-of-predicate t]
["End of predicate" prolog-end-of-predicate t]
"---"
- ["Indent line" prolog-indent-line t]
+ ["Indent line" indent-according-to-mode t]
["Indent region" indent-region (region-exists-p)]
["Indent predicate" prolog-indent-predicate t]
["Indent buffer" prolog-indent-buffer t]
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el
index 2922330e6f9..620ea8cd519 100644
--- a/lisp/progmodes/python.el
+++ b/lisp/progmodes/python.el
@@ -1601,7 +1601,7 @@ behavior, change `python-remove-cwd-from-path' to nil."
;; Fixme: Write a `coding' header to the temp file if the region is
;; non-ASCII.
(interactive "r")
- (let* ((f (make-temp-file "py"))
+ (let* ((f (make-temp-file "py" nil ".py"))
(command
;; IPython puts the FakeModule module into __main__ so
;; emacs.eexecfile becomes useless.
@@ -2468,15 +2468,6 @@ with skeleton expansions for compound statement templates.
nil t)
(add-hook 'completion-at-point-functions
'python-completion-at-point nil 'local)
- ;; Fixme: should be in hideshow. This seems to be of limited use
- ;; since it isn't (can't be) indentation-based. Also hide-level
- ;; doesn't seem to work properly.
- (add-to-list 'hs-special-modes-alist
- `(python-mode "^\\s-*\\(?:def\\|class\\)\\>" nil "#"
- ,(lambda (_arg)
- (python-end-of-defun)
- (skip-chars-backward " \t\n"))
- nil))
(set (make-local-variable 'skeleton-further-elements)
'((< '(backward-delete-char-untabify (min python-indent
(current-column))))
@@ -2615,9 +2606,17 @@ problem."
(let* ((filename (match-string 1 block))
(lineno (string-to-number (match-string 2 block)))
(funcname (match-string 3 block))
+ (msg (get-text-property 0 'compilation-message filename))
+ (loc (and msg (compilation--message->loc msg)))
funcbuffer)
- (cond ((file-exists-p filename)
+ (cond ((and loc (markerp (compilation--loc->marker loc)))
+ (setq funcbuffer (marker-buffer (compilation--loc->marker loc)))
+ (list (with-current-buffer funcbuffer
+ (line-number-at-pos (compilation--loc->marker loc)))
+ funcbuffer))
+
+ ((file-exists-p filename)
(list lineno (find-file-noselect filename)))
((setq funcbuffer (python-pdbtrack-grub-for-buffer funcname lineno))
@@ -2635,15 +2634,12 @@ problem."
(buffer-substring
(point-min) (point-max)))
)))))))
- (list lineno funcbuffer))
+ (list lineno funcbuffer))
((= (elt filename 0) ?\<)
(format "(Non-file source: '%s')" filename))
- (t (format "Not found: %s(), %s" funcname filename)))
- )
- )
- )
+ (t (format "Not found: %s(), %s" funcname filename))))))
(defun python-pdbtrack-grub-for-buffer (funcname _lineno)
"Find recent Python mode buffer named, or having function named FUNCNAME."
@@ -2717,6 +2713,17 @@ comint believe the user typed this string so that
;; continue standard unloading
nil)
+;;;; Finish up
+;; Fixme: should be in hideshow. This seems to be of limited use
+;; since it isn't (can't be) indentation-based. Also hide-level
+;; doesn't seem to work properly.
+(add-to-list 'hs-special-modes-alist
+ `(python-mode "^\\s-*\\(?:def\\|class\\)\\>" nil "#"
+ ,(lambda (_arg)
+ (python-end-of-defun)
+ (skip-chars-backward " \t\n"))
+ nil))
+
(provide 'python)
(provide 'python-21)
diff --git a/lisp/progmodes/ruby-mode.el b/lisp/progmodes/ruby-mode.el
index 66aa256f947..5d79437c3c2 100644
--- a/lisp/progmodes/ruby-mode.el
+++ b/lisp/progmodes/ruby-mode.el
@@ -784,7 +784,7 @@ and `\\' when preceded by `?'."
(not (looking-at "[a-z_]"))))
(and (looking-at ruby-operator-re)
(not (ruby-special-char-p))
- ;; operator at the end of line
+ ;; Operator at the end of line.
(let ((c (char-after (point))))
(and
;; (or (null begin)
@@ -794,8 +794,9 @@ and `\\' when preceded by `?'."
;; (not (or (eolp) (looking-at "#")
;; (and (eq (car (nth 1 state)) ?{)
;; (looking-at "|"))))))
- (or (not (eq ?/ c))
- (null (nth 0 (ruby-parse-region (or begin parse-start) (point)))))
+ ;; Not a regexp or general delimited literal.
+ (null (nth 0 (ruby-parse-region (or begin parse-start)
+ (point))))
(or (not (eq ?| (char-after (point))))
(save-excursion
(or (eolp) (forward-char -1))
@@ -1110,6 +1111,8 @@ See `add-log-current-defun-function'."
mlist)))))
(declare-function ruby-syntax-propertize-heredoc "ruby-mode" (limit))
+(declare-function ruby-syntax-general-delimiters-goto-beg "ruby-mode" ())
+(declare-function ruby-syntax-propertize-general-delimiters "ruby-mode" (limit))
(if (eval-when-compile (fboundp #'syntax-propertize-rules))
;; New code that works independently from font-lock.
@@ -1118,26 +1121,48 @@ See `add-log-current-defun-function'."
"Syntactic keywords for Ruby mode. See `syntax-propertize-function'."
(goto-char start)
(ruby-syntax-propertize-heredoc end)
+ (ruby-syntax-general-delimiters-goto-beg)
(funcall
(syntax-propertize-rules
- ;; #{ }, #$hoge, #@foo are not comments
+ ;; #{ }, #$hoge, #@foo are not comments.
("\\(#\\)[{$@]" (1 "."))
- ;; $' $" $` .... are variables
- ;; ?' ?" ?` are ascii codes
+ ;; $' $" $` .... are variables.
+ ;; ?' ?" ?` are ascii codes.
("\\([?$]\\)[#\"'`]"
(1 (unless (save-excursion
;; Not within a string.
(nth 3 (syntax-ppss (match-beginning 0))))
(string-to-syntax "\\"))))
- ;; regexps
- ("\\(^\\|[[=(,~?:;<>]\\|\\(^\\|\\s \\)\\(if\\|elsif\\|unless\\|while\\|until\\|when\\|and\\|or\\|&&\\|||\\)\\|g?sub!?\\|scan\\|split!?\\)\\s *\\(/\\)[^/\n\\\\]*\\(\\\\.[^/\n\\\\]*\\)*\\(/\\)"
- (4 "\"/")
- (6 "\"/"))
+ ;; Regexps: regexps are distinguished from division either because
+ ;; of the keyword/symbol before them, or because of the code
+ ;; following them.
+ ((concat
+ ;; Special tokens that can't be followed by a division operator.
+ "\\(?:\\(^\\|[[=(,~?:;<>]\\|\\(?:^\\|\\s \\)"
+ (regexp-opt '("if" "elsif" "unless" "while" "until" "when" "and"
+ "or" "&&" "||"
+ "gsub" "gsub!" "sub" "sub!" "scan" "split" "split!"))
+ "\\)\\s *\\)?"
+ ;; The regular expression itself.
+ "\\(/\\)[^/\n\\\\]*\\(?:\\\\.[^/\n\\\\]*\\)*\\(/\\)"
+ ;; Special code that cannot follow a division operator.
+ ;; FIXME: Just because the second slash of "/foo/ do bar" can't
+ ;; be a division, doesn't mean it can't *start* a regexp, as in
+ ;; "x = toto/foo; if /do bar/".
+ "\\([imxo]*\\s *\\(?:,\\|\\_<do\\_>\\)\\)?")
+ (2 (when (or (match-beginning 1) (match-beginning 4))
+ (string-to-syntax "\"/")))
+ (3 (if (or (match-beginning 1) (match-beginning 4))
+ (string-to-syntax "\"/")
+ (goto-char (match-end 2)))))
("^=en\\(d\\)\\_>" (1 "!"))
("^\\(=\\)begin\\_>" (1 "!"))
;; Handle here documents.
((concat ruby-here-doc-beg-re ".*\\(\n\\)")
- (7 (prog1 "\"" (ruby-syntax-propertize-heredoc end)))))
+ (7 (prog1 "\"" (ruby-syntax-propertize-heredoc end))))
+ ;; Handle percent literals: %w(), %q{}, etc.
+ ("\\(?:^\\|[[ \t\n<+(,=]\\)\\(%\\)[qQrswWx]?\\([[:punct:]]\\)"
+ (1 (prog1 "|" (ruby-syntax-propertize-general-delimiters end)))))
(point) end))
(defun ruby-syntax-propertize-heredoc (limit)
@@ -1163,6 +1188,41 @@ See `add-log-current-defun-function'."
;; Make extra sure we don't move back, lest we could fall into an
;; inf-loop.
(if (< (point) start) (goto-char start))))))
+
+ (defun ruby-syntax-general-delimiters-goto-beg ()
+ (let ((state (syntax-ppss)))
+ ;; Move to the start of the literal, in case it's multiline.
+ ;; TODO: determine the literal type more reliably here?
+ (when (eq t (nth 3 state))
+ (goto-char (nth 8 state))
+ (beginning-of-line))))
+
+ (defun ruby-syntax-propertize-general-delimiters (limit)
+ (goto-char (match-beginning 2))
+ (let* ((op (char-after))
+ (ops (char-to-string op))
+ (cl (or (cdr (aref (syntax-table) op))
+ (cdr (assoc op '((?< . ?>))))))
+ parse-sexp-lookup-properties)
+ (ignore-errors
+ (if cl
+ (progn ; Paired delimiters.
+ ;; Delimiter pairs of the same kind can be nested
+ ;; inside the literal, as long as they are balanced.
+ ;; Create syntax table that ignores other characters.
+ (with-syntax-table (make-char-table 'syntax-table nil)
+ (modify-syntax-entry op (concat "(" (char-to-string cl)))
+ (modify-syntax-entry cl (concat ")" ops))
+ (modify-syntax-entry ?\\ "\\")
+ (save-restriction
+ (narrow-to-region (point) limit)
+ (forward-list)))) ; skip to the paired character
+ ;; Single character delimiter.
+ (re-search-forward (concat "[^\\]\\(?:\\\\\\\\\\)*"
+ (regexp-quote ops)) limit nil))
+ ;; If we reached here, the closing delimiter was found.
+ (put-text-property (1- (point)) (point)
+ 'syntax-table (string-to-syntax "|")))))
)
;; For Emacsen where syntax-propertize-rules is not (yet) available,
@@ -1207,6 +1267,10 @@ This should only be called after matching against `ruby-here-doc-end-re'."
(4 (7 . ?/))
(6 (7 . ?/)))
("^=en\\(d\\)\\_>" 1 "!")
+ ;; General delimited string.
+ ("\\(^\\|[[ \t\n<+(,=]\\)\\(%[xrqQwW]?\\([^<[{(a-zA-Z0-9 \n]\\)[^\n\\\\]*\\(\\\\.[^\n\\\\]*\\)*\\(\\3\\)\\)"
+ (3 "\"")
+ (5 "\""))
("^\\(=\\)begin\\_>" 1 (ruby-comment-beg-syntax))
;; Currently, the following case is highlighted incorrectly:
;;
@@ -1415,9 +1479,6 @@ See `font-lock-syntax-table'.")
1 font-lock-variable-name-face)
'("\\(\\$\\|@\\|@@\\)\\(\\w\\|_\\)+"
0 font-lock-variable-name-face)
- ;; general delimited string
- '("\\(^\\|[[ \t\n<+(,=]\\)\\(%[xrqQwW]?\\([^<[{(a-zA-Z0-9 \n]\\)[^\n\\\\]*\\(\\\\.[^\n\\\\]*\\)*\\(\\3\\)\\)"
- (2 font-lock-string-face))
;; constants
'("\\(^\\|[^_]\\)\\b\\([A-Z]+\\(\\w\\|_\\)*\\)"
2 font-lock-type-face)
diff --git a/lisp/progmodes/sh-script.el b/lisp/progmodes/sh-script.el
index f60ce185bc7..a07ecfcb3a4 100644
--- a/lisp/progmodes/sh-script.el
+++ b/lisp/progmodes/sh-script.el
@@ -326,7 +326,9 @@ shell it really is."
(defcustom sh-imenu-generic-expression
`((sh
- . ((nil "^\\s-*\\(function\\s-+\\)?\\([[:alpha:]_][[:alnum:]_]+\\)\\s-*()" 2))))
+ . ((nil
+ "^\\s-*\\(function\\s-+\\)?\\([[:alpha:]_][[:alnum:]_]+\\)\\s-*()"
+ 2))))
"Alist of regular expressions for recognizing shell function definitions.
See `sh-feature' and `imenu-generic-expression'."
:type '(alist :key-type (symbol :tag "Shell")
@@ -460,14 +462,6 @@ This is buffer-local in every such buffer.")
(define-key map "\C-c+" 'sh-add)
(define-key map "\C-\M-x" 'sh-execute-region)
(define-key map "\C-c\C-x" 'executable-interpret)
- ;; FIXME: Use post-self-insert-hook.
- (define-key map "<" 'sh-maybe-here-document)
- (define-key map "(" 'skeleton-pair-insert-maybe)
- (define-key map "{" 'skeleton-pair-insert-maybe)
- (define-key map "[" 'skeleton-pair-insert-maybe)
- (define-key map "'" 'skeleton-pair-insert-maybe)
- (define-key map "`" 'skeleton-pair-insert-maybe)
- (define-key map "\"" 'skeleton-pair-insert-maybe)
(define-key map [remap complete-tag] 'comint-dynamic-complete)
(define-key map [remap delete-backward-char]
@@ -478,10 +472,10 @@ This is buffer-local in every such buffer.")
(define-key map [menu-bar sh-script] (cons "Sh-Script" menu-map))
(define-key menu-map [sh-learn-buffer-indent]
'(menu-item "Learn buffer indentation" sh-learn-buffer-indent
- :help "Learn how to indent the buffer the way it currently is."))
+ :help "Learn how to indent the buffer the way it currently is."))
(define-key menu-map [sh-learn-line-indent]
'(menu-item "Learn line indentation" sh-learn-line-indent
- :help "Learn how to indent a line as it currently is indented"))
+ :help "Learn how to indent a line as it currently is indented"))
(define-key menu-map [sh-show-indent]
'(menu-item "Show indentation" sh-show-indent
:help "Show the how the current line would be indented"))
@@ -491,13 +485,9 @@ This is buffer-local in every such buffer.")
(define-key menu-map [sh-pair]
'(menu-item "Insert braces and quotes in pairs"
- (lambda ()
- (interactive)
- (require 'skeleton)
- (setq skeleton-pair (not skeleton-pair)))
- :button (:toggle . (and (boundp 'skeleton-pair)
- skeleton-pair))
- :help "Inserting a brace or quote automatically inserts the matching pair"))
+ electric-pair-mode
+ :button (:toggle . (bound-and-true-p electric-pair-mode))
+ :help "Inserting a brace or quote automatically inserts the matching pair"))
(define-key menu-map [sh-s0] '("--"))
;; Insert
@@ -506,7 +496,7 @@ This is buffer-local in every such buffer.")
:help "Insert a function definition"))
(define-key menu-map [sh-add]
'(menu-item "Addition..." sh-add
- :help "Insert an addition of VAR and prefix DELTA for Bourne (type) shell"))
+ :help "Insert an addition of VAR and prefix DELTA for Bourne (type) shell"))
(define-key menu-map [sh-until]
'(menu-item "Until Loop" sh-until
:help "Insert an until loop"))
@@ -537,16 +527,16 @@ This is buffer-local in every such buffer.")
(define-key menu-map [sh-s1] '("--"))
(define-key menu-map [sh-exec]
'(menu-item "Execute region" sh-execute-region
- :help "Pass optional header and region to a subshell for noninteractive execution"))
+ :help "Pass optional header and region to a subshell for noninteractive execution"))
(define-key menu-map [sh-exec-interpret]
'(menu-item "Execute script..." executable-interpret
- :help "Run script with user-specified args, and collect output in a buffer"))
+ :help "Run script with user-specified args, and collect output in a buffer"))
(define-key menu-map [sh-set-shell]
'(menu-item "Set shell type..." sh-set-shell
:help "Set this buffer's shell to SHELL (a string)"))
(define-key menu-map [sh-backslash-region]
'(menu-item "Backslash region" sh-backslash-region
- :help "Insert, align, or delete end-of-line backslashes on the lines in the region."))
+ :help "Insert, align, or delete end-of-line backslashes on the lines in the region."))
map)
"Keymap used in Shell-Script mode.")
@@ -564,9 +554,10 @@ This is buffer-local in every such buffer.")
:group 'sh-script)
(defcustom sh-assignment-regexp
- '((csh . "\\<\\([[:alnum:]_]+\\)\\(\\[.+\\]\\)?[ \t]*[-+*/%^]?=")
+ `((csh . "\\<\\([[:alnum:]_]+\\)\\(\\[.+\\]\\)?[ \t]*[-+*/%^]?=")
;; actually spaces are only supported in let/(( ... ))
- (ksh88 . "\\<\\([[:alnum:]_]+\\)\\(\\[.+\\]\\)?[ \t]*\\([-+*/%&|~^]\\|<<\\|>>\\)?=")
+ (ksh88 . ,(concat "\\<\\([[:alnum:]_]+\\)\\(\\[.+\\]\\)?"
+ "[ \t]*\\(?:[-+*/%&|~^]\\|<<\\|>>\\)?="))
(bash . "\\<\\([[:alnum:]_]+\\)\\(\\[.+\\]\\)?\\+?=")
(rc . "\\<\\([[:alnum:]_*]+\\)[ \t]*=")
(sh . "\\<\\([[:alnum:]_]+\\)="))
@@ -1379,10 +1370,10 @@ punctuation characters like '-'."
(defconst sh-indent-supported
- '((sh . t)
+ '((sh . sh)
(csh . nil)
- (rc . t))
- "Shell types that shell indenting can do something with.")
+ (rc . rc))
+ "Indentation rule set to use for each shell type.")
(defvar sh-indent-supported-here nil
"Non-nil if we support indentation for the current buffer's shell type.")
@@ -1464,9 +1455,8 @@ buffer indents as it currently is indented.
\\[sh-set-shell] Set this buffer's shell, and maybe its magic number.
\\[sh-execute-region] Have optional header and region be executed in a subshell.
-\\[sh-maybe-here-document] Without prefix, following an unquoted < inserts here document.
-\{, (, [, ', \", `
- Unless quoted with \\, insert the pairs {}, (), [], or '', \"\", ``.
+`sh-electric-here-document-mode' controls whether insertion of two
+unquoted < insert a here document.
If you generally program a shell different from your login shell you can
set `sh-shell-file' accordingly. If your shell's file name doesn't correctly
@@ -1503,13 +1493,13 @@ with your script for an edit-interpret-debug cycle."
#'sh-syntax-propertize-function)
(add-hook 'syntax-propertize-extend-region-functions
#'syntax-propertize-multiline 'append 'local)
+ (sh-electric-here-document-mode 1)
(set (make-local-variable 'skeleton-pair-alist) '((?` _ ?`)))
(set (make-local-variable 'skeleton-pair-filter-function) 'sh-quoted-p)
(set (make-local-variable 'skeleton-further-elements)
'((< '(- (min sh-indentation (current-column))))))
(set (make-local-variable 'skeleton-filter-function) 'sh-feature)
(set (make-local-variable 'skeleton-newline-indent-rigidly) t)
- (set (make-local-variable 'sh-indent-supported-here) nil)
(set (make-local-variable 'defun-prompt-regexp)
(concat "^\\(function[ \t]\\|[[:alnum:]]+[ \t]+()[ \t]+\\)"))
;; Parse or insert magic number for exec, and set all variables depending
@@ -1519,23 +1509,15 @@ with your script for an edit-interpret-debug cycle."
(goto-char (point-min))
(looking-at "#![ \t]?\\([^ \t\n]*/bin/env[ \t]\\)?\\([^ \t\n]+\\)"))
(match-string 2))
- ((not buffer-file-name)
- sh-shell-file)
+ ((not buffer-file-name) sh-shell-file)
;; Checks that use `buffer-file-name' follow.
- ((string-match "\\.m?spec\\'" buffer-file-name)
- "rpm")
- ((string-match "[.]sh\\>" buffer-file-name)
- "sh")
- ((string-match "[.]bash\\>" buffer-file-name)
- "bash")
- ((string-match "[.]ksh\\>" buffer-file-name)
- "ksh")
- ((string-match "[.]csh\\>" buffer-file-name)
- "csh")
- ((equal (file-name-nondirectory buffer-file-name) ".profile")
- "sh")
- (t
- sh-shell-file))
+ ((string-match "\\.m?spec\\'" buffer-file-name) "rpm")
+ ((string-match "[.]sh\\>" buffer-file-name) "sh")
+ ((string-match "[.]bash\\>" buffer-file-name) "bash")
+ ((string-match "[.]ksh\\>" buffer-file-name) "ksh")
+ ((string-match "[.]csh\\>" buffer-file-name) "csh")
+ ((equal (file-name-nondirectory buffer-file-name) ".profile") "sh")
+ (t sh-shell-file))
nil nil))
;;;###autoload
@@ -1578,6 +1560,426 @@ This adds rules for comments and assignments."
"Function to get better fontification including keywords and builtins."
(sh-font-lock-keywords-1 t))
+;;; Indentation and navigation with SMIE.
+
+(require 'smie)
+
+;; The SMIE code should generally be preferred, but it currently does not obey
+;; the various indentation custom-vars, and it misses some important features
+;; of the old code, mostly: sh-learn-line/buffer-indent, sh-show-indent,
+;; sh-name/save/load-style.
+(defvar sh-use-smie nil
+ "Whether to use the SMIE code for navigation and indentation.")
+
+(defun sh-smie--keyword-p (tok)
+ "Non-nil if TOK (at which we're looking) really is a keyword."
+ (let ((prev (funcall smie-backward-token-function)))
+ (if (zerop (length prev))
+ (looking-back "\\s(" (1- (point)))
+ (assoc prev smie-grammar))))
+
+(defun sh-smie--newline-semi-p (&optional tok)
+ "Return non-nil if a newline should be treated as a semi-colon.
+Here we assume that a newline should be treated as a semi-colon unless it
+comes right after a special keyword.
+This function does not pay attention to line-continuations.
+If TOK is nil, point should be before the newline; otherwise, TOK is the token
+before the newline and in that case point should be just before the token."
+ (save-excursion
+ (unless tok
+ (setq tok (funcall smie-backward-token-function)))
+ (if (and (zerop (length tok))
+ (looking-back "\\s(" (1- (point))))
+ nil
+ (not (numberp (nth 2 (assoc tok smie-grammar)))))))
+
+;;;; SMIE support for `sh'.
+
+(defconst sh-smie-sh-grammar
+ (smie-prec2->grammar
+ (smie-bnf->prec2
+ '((exp) ;A constant, or a $var, or a sequence of them...
+ (cmd ("case" exp "in" branches "esac")
+ ("if" cmd "then" cmd "fi")
+ ("if" cmd "then" cmd "else" cmd "fi")
+ ("if" cmd "then" cmd "elif" cmd "then" cmd "fi")
+ ("if" cmd "then" cmd "elif" cmd "then" cmd "else" cmd "fi")
+ ("if" cmd "then" cmd "elif" cmd "then" cmd
+ "elif" cmd "then" cmd "else" cmd "fi")
+ ("while" cmd "do" cmd "done")
+ ("until" cmd "do" cmd "done")
+ ("for" exp "in" cmd "do" cmd "done")
+ ("for" exp "do" cmd "done")
+ ("select" exp "in" cmd "do" cmd "done") ;bash&zsh&ksh88.
+ ("repeat" exp "do" cmd "done") ;zsh.
+ (exp "always" exp) ;zsh.
+ (cmd "|" cmd) (cmd "|&" cmd)
+ (cmd "&&" cmd) (cmd "||" cmd)
+ (cmd ";" cmd) (cmd "&" cmd))
+ (pattern (pattern "|" pattern))
+ (branches (branches ";;" branches)
+ (branches ";&" branches) (branches ";;&" branches) ;bash.
+ (pattern "case-)" cmd)))
+ '((assoc ";;" ";&" ";;&"))
+ '((assoc ";" "&") (assoc "&&" "||") (assoc "|" "|&")))))
+
+(defconst sh-smie--sh-operators
+ (delq nil (mapcar (lambda (x)
+ (setq x (car x))
+ (and (stringp x)
+ (not (string-match "\\`[a-z]" x))
+ x))
+ sh-smie-sh-grammar)))
+
+(defconst sh-smie--sh-operators-re (regexp-opt sh-smie--sh-operators))
+(defconst sh-smie--sh-operators-back-re
+ (concat "\\(?:^\\|[^\\]\\)\\(?:\\\\\\\\\\)*"
+ "\\(" sh-smie--sh-operators-re "\\)"))
+
+(defun sh-smie--sh-keyword-in-p ()
+ "Assuming we're looking at \"in\", return non-nil if it's a keyword.
+Does not preserve point."
+ (let ((forward-sexp-function nil)
+ (words nil) ;We've seen words.
+ (newline nil) ;We've seen newlines after the words.
+ (res nil)
+ prev)
+ (while (not res)
+ (setq prev (funcall smie-backward-token-function))
+ (cond
+ ((zerop (length prev))
+ (if newline
+ (progn (assert words) (setq res 'word))
+ (setq words t)
+ (condition-case nil
+ (forward-sexp -1)
+ (scan-error (setq res 'unknown)))))
+ ((equal prev ";")
+ (if words (setq newline t)
+ (setq res 'keyword)))
+ ((member prev '("case" "for" "select")) (setq res 'keyword))
+ ((assoc prev smie-grammar) (setq res 'word))
+ (t
+ (if newline
+ (progn (assert words) (setq res 'word))
+ (setq words t)))))
+ (eq res 'keyword)))
+
+(defun sh-smie--sh-keyword-p (tok)
+ "Non-nil if TOK (at which we're looking) really is a keyword."
+ (if (equal tok "in")
+ (sh-smie--sh-keyword-in-p)
+ (sh-smie--keyword-p tok)))
+
+(defun sh-smie-sh-forward-token ()
+ (if (and (looking-at "[ \t]*\\(?:#\\|\\(\\s|\\)\\|$\\)")
+ (save-excursion
+ (skip-chars-backward " \t")
+ (not (bolp))))
+ (if (and (match-end 1) (not (nth 3 (syntax-ppss))))
+ ;; Right before a here-doc.
+ (let ((forward-sexp-function nil))
+ (forward-sexp 1)
+ ;; Pretend the here-document is a "newline representing a
+ ;; semi-colon", since the here-doc otherwise covers the newline(s).
+ ";")
+ (let ((semi (sh-smie--newline-semi-p)))
+ (forward-line 1)
+ (if semi ";"
+ (sh-smie-sh-forward-token))))
+ (forward-comment (point-max))
+ (cond
+ ((looking-at "\\\\\n") (forward-line 1) (sh-smie-sh-forward-token))
+ ((looking-at sh-smie--sh-operators-re)
+ (goto-char (match-end 0))
+ (let ((tok (match-string-no-properties 0)))
+ (if (and (memq (aref tok (1- (length tok))) '(?\; ?\& ?\|))
+ (looking-at "[ \t]*\\(?:#\\|$\\)"))
+ (forward-line 1))
+ tok))
+ (t
+ (let* ((pos (point))
+ (tok (smie-default-forward-token)))
+ (cond
+ ((equal tok ")") "case-)")
+ ((and tok (string-match "\\`[a-z]" tok)
+ (assoc tok smie-grammar)
+ (not
+ (save-excursion
+ (goto-char pos)
+ (sh-smie--sh-keyword-p tok))))
+ " word ")
+ (t tok)))))))
+
+(defun sh-smie--looking-back-at-continuation-p ()
+ (save-excursion
+ (and (if (eq (char-before) ?\n) (progn (forward-char -1) t) (eolp))
+ (looking-back "\\(?:^\\|[^\\]\\)\\(?:\\\\\\\\\\)*\\\\"
+ (line-beginning-position)))))
+
+(defun sh-smie-sh-backward-token ()
+ (let ((bol (line-beginning-position))
+ pos tok)
+ (forward-comment (- (point)))
+ (cond
+ ((and (bolp) (not (bobp))
+ (equal (syntax-after (1- (point))) (string-to-syntax "|"))
+ (not (nth 3 (syntax-ppss))))
+ ;; Right after a here-document.
+ (let ((forward-sexp-function nil))
+ (forward-sexp -1)
+ ;; Pretend the here-document is a "newline representing a
+ ;; semi-colon", since the here-doc otherwise covers the newline(s).
+ ";"))
+ ((< (point) bol)
+ (cond
+ ((sh-smie--looking-back-at-continuation-p)
+ (forward-char -1)
+ (funcall smie-backward-token-function))
+ ((sh-smie--newline-semi-p) ";")
+ (t (funcall smie-backward-token-function))))
+ ((looking-back sh-smie--sh-operators-back-re
+ (line-beginning-position) 'greedy)
+ (goto-char (match-beginning 1))
+ (match-string-no-properties 1))
+ (t
+ (let ((tok (smie-default-backward-token)))
+ (cond
+ ((equal tok ")") "case-)")
+ ((and tok (string-match "\\`[a-z]" tok)
+ (assoc tok smie-grammar)
+ (not (save-excursion (sh-smie--sh-keyword-p tok))))
+ " word ")
+ (t tok)))))))
+
+(defcustom sh-indent-after-continuation t
+ "If non-nil, try to make sure text is indented after a line continuation."
+ :type 'boolean)
+
+(defun sh-smie--continuation-start-indent ()
+ "Return the initial indentation of a continued line.
+May return nil if the line should not be treated as continued."
+ (save-excursion
+ (forward-line -1)
+ (unless (sh-smie--looking-back-at-continuation-p)
+ (current-indentation))))
+
+(defun sh-smie-sh-rules (kind token)
+ (pcase (cons kind token)
+ (`(:elem . basic) sh-indentation)
+ (`(:after . "case-)") (or sh-indentation smie-indent-basic))
+ ((and `(:before . ,_)
+ (guard (when sh-indent-after-continuation
+ (save-excursion
+ (ignore-errors
+ (skip-chars-backward " \t")
+ (sh-smie--looking-back-at-continuation-p))))))
+ ;; After a line-continuation, make sure the rest is indented.
+ (let* ((sh-indent-after-continuation nil)
+ (indent (smie-indent-calculate))
+ (initial (sh-smie--continuation-start-indent)))
+ (when (and (numberp indent) (numberp initial)
+ (<= indent initial))
+ `(column . ,(+ initial sh-indentation)))))
+ (`(:before . ,(or `"(" `"{" `"["))
+ (if (smie-rule-hanging-p) (smie-rule-parent)))
+ ;; FIXME: Maybe this handling of ;; should be made into
+ ;; a smie-rule-terminator function that takes the substitute ";" as arg.
+ (`(:before . ,(or `";;" `";&" `";;&"))
+ (if (and (smie-rule-bolp) (looking-at ";;?&?[ \t]*\\(#\\|$\\)"))
+ (cons 'column (smie-indent-keyword ";"))
+ (smie-rule-separator kind)))
+ (`(:after . ,(or `";;" `";&" `";;&"))
+ (with-demoted-errors
+ (smie-backward-sexp token)
+ (cons 'column
+ (if (or (smie-rule-bolp)
+ (save-excursion
+ (and (member (funcall smie-backward-token-function)
+ '("in" ";;"))
+ (smie-rule-bolp))))
+ (current-column)
+ (smie-indent-calculate)))))
+ (`(:after . "|") (if (smie-rule-parent-p "|") nil 4))
+ ))
+
+;; (defconst sh-smie-csh-grammar
+;; (smie-prec2->grammar
+;; (smie-bnf->prec2
+;; '((exp) ;A constant, or a $var, or a sequence of them…
+;; (elseifcmd (cmd)
+;; (cmd "else" "else-if" exp "then" elseifcmd))
+;; (cmd ("switch" branches "endsw")
+;; ("if" exp)
+;; ("if" exp "then" cmd "endif")
+;; ("if" exp "then" cmd "else" cmd "endif")
+;; ("if" exp "then" elseifcmd "endif")
+;; ;; ("if" exp "then" cmd "else" cmd "endif")
+;; ;; ("if" exp "then" cmd "else" "if" exp "then" cmd "endif")
+;; ;; ("if" exp "then" cmd "else" "if" exp "then" cmd
+;; ;; "else" cmd "endif")
+;; ;; ("if" exp "then" cmd "else" "if" exp "then" cmd
+;; ;; "else" "if" exp "then" cmd "endif")
+;; ("while" cmd "end")
+;; ("foreach" cmd "end")
+;; (cmd "|" cmd) (cmd "|&" cmd)
+;; (cmd "&&" cmd) (cmd "||" cmd)
+;; (cmd ";" cmd) (cmd "&" cmd))
+;; ;; This is a lie, but (combined with the corresponding disambiguation
+;; ;; rule) it makes it more clear that `case' and `default' are the key
+;; ;; separators and the `:' is a secondary tokens.
+;; (branches (branches "case" branches)
+;; (branches "default" branches)
+;; (exp ":" branches)))
+;; '((assoc "else" "then" "endif"))
+;; '((assoc "case" "default") (nonassoc ":"))
+;; '((assoc ";;" ";&" ";;&"))
+;; '((assoc ";" "&") (assoc "&&" "||") (assoc "|" "|&")))))
+
+;;;; SMIE support for `rc'.
+
+(defconst sh-smie-rc-grammar
+ (smie-prec2->grammar
+ (smie-bnf->prec2
+ '((exp) ;A constant, or a $var, or a sequence of them...
+ (cmd (cmd "case" cmd)
+ ("if" exp)
+ ("switch" exp)
+ ("for" exp) ("while" exp)
+ (cmd "|" cmd) (cmd "|&" cmd)
+ (cmd "&&" cmd) (cmd "||" cmd)
+ (cmd ";" cmd) (cmd "&" cmd))
+ (pattern (pattern "|" pattern))
+ (branches (branches ";;" branches)
+ (branches ";&" branches) (branches ";;&" branches) ;bash.
+ (pattern "case-)" cmd)))
+ '((assoc ";;" ";&" ";;&"))
+ '((assoc "case") (assoc ";" "&") (assoc "&&" "||") (assoc "|" "|&")))))
+
+(defun sh-smie--rc-after-special-arg-p ()
+ "Check if we're after the first arg of an if/while/for/... construct.
+Returns the construct's token and moves point before it, if so."
+ (forward-comment (- (point)))
+ (when (looking-back ")\\|\\_<not" (- (point) 3))
+ (ignore-errors
+ (let ((forward-sexp-function nil))
+ (forward-sexp -1)
+ (car (member (funcall smie-backward-token-function)
+ '("if" "for" "switch" "while")))))))
+
+(defun sh-smie--rc-newline-semi-p ()
+ "Return non-nil if a newline should be treated as a semi-colon.
+Point should be before the newline."
+ (save-excursion
+ (let ((tok (funcall smie-backward-token-function)))
+ (if (or (when (equal tok "not") (forward-word 1) t)
+ (and (zerop (length tok)) (eq (char-before) ?\))))
+ (not (sh-smie--rc-after-special-arg-p))
+ (sh-smie--newline-semi-p tok)))))
+
+(defun sh-smie-rc-forward-token ()
+ ;; FIXME: Code duplication with sh-smie-sh-forward-token.
+ (if (and (looking-at "[ \t]*\\(?:#\\|\\(\\s|\\)\\|$\\)")
+ (save-excursion
+ (skip-chars-backward " \t")
+ (not (bolp))))
+ (if (and (match-end 1) (not (nth 3 (syntax-ppss))))
+ ;; Right before a here-doc.
+ (let ((forward-sexp-function nil))
+ (forward-sexp 1)
+ ;; Pretend the here-document is a "newline representing a
+ ;; semi-colon", since the here-doc otherwise covers the newline(s).
+ ";")
+ (let ((semi (sh-smie--rc-newline-semi-p)))
+ (forward-line 1)
+ (if semi ";"
+ (sh-smie-rc-forward-token))))
+ (forward-comment (point-max))
+ (cond
+ ((looking-at "\\\\\n") (forward-line 1) (sh-smie-rc-forward-token))
+ ;; ((looking-at sh-smie--rc-operators-re)
+ ;; (goto-char (match-end 0))
+ ;; (let ((tok (match-string-no-properties 0)))
+ ;; (if (and (memq (aref tok (1- (length tok))) '(?\; ?\& ?\|))
+ ;; (looking-at "[ \t]*\\(?:#\\|$\\)"))
+ ;; (forward-line 1))
+ ;; tok))
+ (t
+ (let* ((pos (point))
+ (tok (smie-default-forward-token)))
+ (cond
+ ;; ((equal tok ")") "case-)")
+ ((and tok (string-match "\\`[a-z]" tok)
+ (assoc tok smie-grammar)
+ (not
+ (save-excursion
+ (goto-char pos)
+ (sh-smie--keyword-p tok))))
+ " word ")
+ (t tok)))))))
+
+(defun sh-smie-rc-backward-token ()
+ ;; FIXME: Code duplication with sh-smie-sh-backward-token.
+ (let ((bol (line-beginning-position))
+ pos tok)
+ (forward-comment (- (point)))
+ (cond
+ ((and (bolp) (not (bobp))
+ (equal (syntax-after (1- (point))) (string-to-syntax "|"))
+ (not (nth 3 (syntax-ppss))))
+ ;; Right after a here-document.
+ (let ((forward-sexp-function nil))
+ (forward-sexp -1)
+ ;; Pretend the here-document is a "newline representing a
+ ;; semi-colon", since the here-doc otherwise covers the newline(s).
+ ";"))
+ ((< (point) bol) ;We skipped over a newline.
+ (cond
+ ;; A continued line.
+ ((and (eolp)
+ (looking-back "\\(?:^\\|[^\\]\\)\\(?:\\\\\\\\\\)*\\\\"
+ (line-beginning-position)))
+ (forward-char -1)
+ (funcall smie-backward-token-function))
+ ((sh-smie--rc-newline-semi-p) ";")
+ (t (funcall smie-backward-token-function))))
+ ;; ((looking-back sh-smie--sh-operators-back-re
+ ;; (line-beginning-position) 'greedy)
+ ;; (goto-char (match-beginning 1))
+ ;; (match-string-no-properties 1))
+ (t
+ (let ((tok (smie-default-backward-token)))
+ (cond
+ ;; ((equal tok ")") "case-)")
+ ((and tok (string-match "\\`[a-z]" tok)
+ (assoc tok smie-grammar)
+ (not (save-excursion (sh-smie--keyword-p tok))))
+ " word ")
+ (t tok)))))))
+
+(defun sh-smie-rc-rules (kind token)
+ (pcase (cons kind token)
+ (`(:elem . basic) sh-indentation)
+ ;; (`(:after . "case") (or sh-indentation smie-indent-basic))
+ (`(:after . ";") (if (smie-rule-parent-p "case")
+ (smie-rule-parent sh-indentation)))
+ (`(:before . "{")
+ (save-excursion
+ (when (sh-smie--rc-after-special-arg-p)
+ `(column . ,(current-column)))))
+ (`(:before . ,(or `"(" `"{" `"["))
+ (if (smie-rule-hanging-p) (smie-rule-parent)))
+ ;; FIXME: SMIE parses "if (exp) cmd" as "(if ((exp) cmd))" so "cmd" is
+ ;; treated as an arg to (exp) by default, which indents it all wrong.
+ ;; To handle it right, we should extend smie-indent-exps so that the
+ ;; preceding keyword can give special rules. Currently the only special
+ ;; rule we have is the :list-intro hack, which we use here to align "cmd"
+ ;; with "(exp)", which is rarely the right thing to do, but is better
+ ;; than nothing.
+ (`(:list-intro . ,(or `"for" `"if" `"while")) t)
+ ))
+
+;;; End of SMIE code.
(defvar sh-regexp-for-done nil
"A buffer-local regexp to match opening keyword for done.")
@@ -1677,19 +2079,28 @@ Calls the value of `sh-set-shell-hook' if set."
(set-syntax-table sh-mode-syntax-table)))
(dolist (var (sh-feature sh-variables))
(sh-remember-variable var))
- (if (setq sh-indent-supported-here (sh-feature sh-indent-supported))
+ (if (set (make-local-variable 'sh-indent-supported-here)
+ (sh-feature sh-indent-supported))
(progn
(message "Setting up indent for shell type %s" sh-shell)
- (set (make-local-variable 'parse-sexp-lookup-properties) t)
- (set (make-local-variable 'sh-kw-alist) (sh-feature sh-kw))
- (let ((regexp (sh-feature sh-kws-for-done)))
- (if regexp
- (set (make-local-variable 'sh-regexp-for-done)
- (sh-mkword-regexpr (regexp-opt regexp t)))))
- (message "setting up indent stuff")
- ;; sh-mode has already made indent-line-function local
- ;; but do it in case this is called before that.
- (set (make-local-variable 'indent-line-function) 'sh-indent-line)
+ (if sh-use-smie
+ (let ((mksym (lambda (name)
+ (intern (format "sh-smie-%s-%s"
+ sh-indent-supported-here name)))))
+ (smie-setup (symbol-value (funcall mksym "grammar"))
+ (funcall mksym "rules")
+ :forward-token (funcall mksym "forward-token")
+ :backward-token (funcall mksym "backward-token")))
+ (set (make-local-variable 'parse-sexp-lookup-properties) t)
+ (set (make-local-variable 'sh-kw-alist) (sh-feature sh-kw))
+ (let ((regexp (sh-feature sh-kws-for-done)))
+ (if regexp
+ (set (make-local-variable 'sh-regexp-for-done)
+ (sh-mkword-regexpr (regexp-opt regexp t)))))
+ (message "setting up indent stuff")
+ ;; sh-mode has already made indent-line-function local
+ ;; but do it in case this is called before that.
+ (set (make-local-variable 'indent-line-function) 'sh-indent-line))
(if sh-make-vars-local
(sh-make-vars-local))
(message "Indentation setup for shell type %s" sh-shell))
@@ -3237,8 +3648,9 @@ overwritten if
(defun sh-save-styles-to-buffer (buff)
"Save all current styles in elisp to buffer BUFF.
This is always added to the end of the buffer."
- (interactive (list
- (read-from-minibuffer "Buffer to save styles in? " "*scratch*")))
+ (interactive
+ (list
+ (read-from-minibuffer "Buffer to save styles in? " "*scratch*")))
(with-current-buffer (get-buffer-create buff)
(goto-char (point-max))
(insert "\n")
@@ -3656,8 +4068,12 @@ option followed by a colon `:' if the option accepts an argument."
The document is bounded by `sh-here-document-word'."
(interactive "*P")
(self-insert-command (prefix-numeric-value arg))
- (or arg
- (not (looking-back "[^<]<<"))
+ (or arg (sh--maybe-here-document)))
+(make-obsolete 'sh--maybe-here-document
+ 'sh-electric-here-document-mode "24.2")
+
+(defun sh--maybe-here-document ()
+ (or (not (looking-back "[^<]<<"))
(save-excursion
(backward-char 2)
(sh-quoted-p))
@@ -3678,6 +4094,12 @@ The document is bounded by `sh-here-document-word'."
(insert ?\n tabs (replace-regexp-in-string
"\\`-?[ \t]*" "" delim))))))
+(define-minor-mode sh-electric-here-document-mode
+ "Make << insert a here document skeleton."
+ nil nil nil
+ (if sh-electric-here-document-mode
+ (add-hook 'post-self-insert-hook #'sh--maybe-here-document nil t)
+ (remove-hook 'post-self-insert-hook #'sh--maybe-here-document t)))
;; various other commands
@@ -3696,12 +4118,14 @@ The document is bounded by `sh-here-document-word'."
(defun sh-beginning-of-command ()
+ ;; FIXME: Redefine using SMIE.
"Move point to successive beginnings of commands."
(interactive)
(if (re-search-backward sh-beginning-of-command nil t)
(goto-char (match-beginning 2))))
(defun sh-end-of-command ()
+ ;; FIXME: Redefine using SMIE.
"Move point to successive ends of commands."
(interactive)
(if (re-search-forward sh-end-of-command nil t)
diff --git a/lisp/progmodes/verilog-mode.el b/lisp/progmodes/verilog-mode.el
index 0139795dd38..0cd8d01aff1 100644
--- a/lisp/progmodes/verilog-mode.el
+++ b/lisp/progmodes/verilog-mode.el
@@ -123,9 +123,9 @@
;;; Code:
;; This variable will always hold the version number of the mode
-(defconst verilog-mode-version "725"
+(defconst verilog-mode-version "800"
"Version of this Verilog mode.")
-(defconst verilog-mode-release-date "2011-11-27-GNU"
+(defconst verilog-mode-release-date "2012-04-23-GNU"
"Release date of this Verilog mode.")
(defconst verilog-mode-release-emacs t
"If non-nil, this version of Verilog mode was released with Emacs itself.")
@@ -393,7 +393,7 @@ Set `verilog-in-hooks' during this time, to assist AUTO caches."
(parse-partial-sexp (point-min) (or pos (point)))))
(defgroup verilog-mode nil
- "Facilitates easy editing of Verilog source text."
+ "Major mode for Verilog source code."
:version "22.2"
:group 'languages)
@@ -415,7 +415,10 @@ Set `verilog-in-hooks' during this time, to assist AUTO caches."
:group 'verilog-mode)
(defvar verilog-debug nil
- "If set, enable debug messages for `verilog-mode' internals.")
+ "Non-nil means enable debug messages for `verilog-mode' internals.")
+
+(defvar verilog-warn-fatal nil
+ "Non-nil means `verilog-warn-error' warnings are fatal `error's.")
(defcustom verilog-linter
"echo 'No verilog-linter set, see \"M-x describe-variable verilog-linter\"'"
@@ -524,6 +527,8 @@ are lineup only when \\[verilog-pretty-declarations] is typed."
(const :tag "Line up Declarations" declarations)
(function :tag "Other"))
:group 'verilog-mode-indent )
+(put 'verilog-auto-lineup 'safe-local-variable
+ '(lambda (x) (memq x '(nil all assignments declarations))))
(defcustom verilog-indent-level 3
"Indentation of Verilog statements with respect to containing block."
@@ -600,40 +605,39 @@ Set to 0 to have all directives start at the left side of the screen."
(put 'verilog-case-indent 'safe-local-variable 'integerp)
(defcustom verilog-auto-newline t
- "True means automatically newline after semicolons."
+ "Non-nil means automatically newline after semicolons."
:group 'verilog-mode-indent
:type 'boolean)
(put 'verilog-auto-newline 'safe-local-variable 'verilog-booleanp)
(defcustom verilog-auto-indent-on-newline t
- "True means automatically indent line after newline."
+ "Non-nil means automatically indent line after newline."
:group 'verilog-mode-indent
:type 'boolean)
(put 'verilog-auto-indent-on-newline 'safe-local-variable 'verilog-booleanp)
(defcustom verilog-tab-always-indent t
- "True means TAB should always re-indent the current line.
+ "Non-nil means TAB should always re-indent the current line.
A nil value means TAB will only reindent when at the beginning of the line."
:group 'verilog-mode-indent
:type 'boolean)
(put 'verilog-tab-always-indent 'safe-local-variable 'verilog-booleanp)
(defcustom verilog-tab-to-comment nil
- "True means TAB moves to the right hand column in preparation for a comment."
+ "Non-nil means TAB moves to the right hand column in preparation for a comment."
:group 'verilog-mode-actions
:type 'boolean)
(put 'verilog-tab-to-comment 'safe-local-variable 'verilog-booleanp)
(defcustom verilog-indent-begin-after-if t
- "If true, indent begin statements following if, else, while, for and repeat.
+ "Non-nil means indent begin statements following if, else, while, etc.
Otherwise, line them up."
:group 'verilog-mode-indent
:type 'boolean)
(put 'verilog-indent-begin-after-if 'safe-local-variable 'verilog-booleanp)
-
(defcustom verilog-align-ifelse nil
- "If true, align `else' under matching `if'.
+ "Non-nil means align `else' under matching `if'.
Otherwise else is lined up with first character on line holding matching if."
:group 'verilog-mode-indent
:type 'boolean)
@@ -648,7 +652,7 @@ default avoids too many redundant comments in tight quarters."
(put 'verilog-minimum-comment-distance 'safe-local-variable 'integerp)
(defcustom verilog-highlight-p1800-keywords nil
- "True means highlight words newly reserved by IEEE-1800.
+ "Non-nil means highlight words newly reserved by IEEE-1800.
These will appear in `verilog-font-lock-p1800-face' in order to gently
suggest changing where these words are used as variables to something else.
A nil value means highlight these words as appropriate for the SystemVerilog
@@ -659,7 +663,7 @@ to see the effect as font color choices are cached by Emacs."
(put 'verilog-highlight-p1800-keywords 'safe-local-variable 'verilog-booleanp)
(defcustom verilog-highlight-grouping-keywords nil
- "True means highlight grouping keywords 'begin' and 'end' more dramatically.
+ "Non-nil means highlight grouping keywords 'begin' and 'end' more dramatically.
If false, these words are in the `font-lock-type-face'; if True then they are in
`verilog-font-lock-ams-face'. Some find that special highlighting on these
grouping constructs allow the structure of the code to be understood at a glance."
@@ -668,7 +672,7 @@ grouping constructs allow the structure of the code to be understood at a glance
(put 'verilog-highlight-grouping-keywords 'safe-local-variable 'verilog-booleanp)
(defcustom verilog-highlight-modules nil
- "True means highlight module statements for `verilog-load-file-at-point'.
+ "Non-nil means highlight module statements for `verilog-load-file-at-point'.
When true, mousing over module names will allow jumping to the
module definition. If false, this is not supported. Setting
this is experimental, and may lead to bad performance."
@@ -677,7 +681,7 @@ this is experimental, and may lead to bad performance."
(put 'verilog-highlight-modules 'safe-local-variable 'verilog-booleanp)
(defcustom verilog-highlight-includes t
- "True means highlight module statements for `verilog-load-file-at-point'.
+ "Non-nil means highlight module statements for `verilog-load-file-at-point'.
When true, mousing over include file names will allow jumping to the
file referenced. If false, this is not supported."
:group 'verilog-mode-indent
@@ -689,7 +693,7 @@ file referenced. If false, this is not supported."
Set this to \"wire\" if the Verilog code uses \"`default_nettype
none\". Note using `default_nettype none isn't recommended practice; this
mode is experimental."
- :version "24.1"
+ :version "24.1" ;; rev670
:group 'verilog-mode-actions
:type 'boolean)
(put 'verilog-auto-declare-nettype 'safe-local-variable `stringp)
@@ -697,27 +701,27 @@ mode is experimental."
(defcustom verilog-auto-wire-type nil
"Non-nil specifies the data type to use with `verilog-auto-wire' etc.
Set this to \"logic\" for SystemVerilog code, or use `verilog-auto-logic'."
- :version "24.1"
+ :version "24.1" ;; rev673
:group 'verilog-mode-actions
:type 'boolean)
(put 'verilog-auto-wire-type 'safe-local-variable `stringp)
(defcustom verilog-auto-endcomments t
- "True means insert a comment /* ... */ after 'end's.
+ "Non-nil means insert a comment /* ... */ after 'end's.
The name of the function or case will be set between the braces."
:group 'verilog-mode-actions
:type 'boolean)
(put 'verilog-auto-endcomments 'safe-local-variable 'verilog-booleanp)
(defcustom verilog-auto-delete-trailing-whitespace nil
- "True means to `delete-trailing-whitespace' in `verilog-auto'."
- :version "24.1"
+ "Non-nil means to `delete-trailing-whitespace' in `verilog-auto'."
+ :version "24.1" ;; rev703
:group 'verilog-mode-actions
:type 'boolean)
(put 'verilog-auto-delete-trailing-whitespace 'safe-local-variable 'verilog-booleanp)
(defcustom verilog-auto-ignore-concat nil
- "True means ignore signals in {...} concatenations for AUTOWIRE etc.
+ "Non-nil means ignore signals in {...} concatenations for AUTOWIRE etc.
This will exclude signals referenced as pin connections in {...}
from AUTOWIRE, AUTOOUTPUT and friends. This flag should be set
for backward compatibility only and not set in new designs; it
@@ -727,7 +731,7 @@ may be removed in future versions."
(put 'verilog-auto-ignore-concat 'safe-local-variable 'verilog-booleanp)
(defcustom verilog-auto-read-includes nil
- "True means to automatically read includes before AUTOs.
+ "Non-nil means to automatically read includes before AUTOs.
This will do a `verilog-read-defines' and `verilog-read-includes' before
each AUTO expansion. This makes it easier to embed defines and includes,
but can result in very slow reading times if there are many or large
@@ -750,15 +754,15 @@ sub-module's port list has changed."
:type '(choice (const nil) (const ask) (const detect) (const force)))
(defcustom verilog-auto-star-expand t
- "Non-nil indicates to expand a SystemVerilog .* instance ports.
-They will be expanded in the same way as if there was a AUTOINST in the
+ "Non-nil means to expand SystemVerilog .* instance ports.
+They will be expanded in the same way as if there was an AUTOINST in the
instantiation. See also `verilog-auto-star' and `verilog-auto-star-save'."
:group 'verilog-mode-actions
:type 'boolean)
(put 'verilog-auto-star-expand 'safe-local-variable 'verilog-booleanp)
(defcustom verilog-auto-star-save nil
- "Non-nil indicates to save to disk SystemVerilog .* instance expansions.
+ "Non-nil means save to disk SystemVerilog .* instance expansions.
A nil value indicates direct connections will be removed before saving.
Only meaningful to those created due to `verilog-auto-star-expand' being set.
@@ -964,7 +968,7 @@ you will probably also need `verilog-auto-reset-widths' set."
(put 'verilog-active-low-regexp 'safe-local-variable 'stringp)
(defcustom verilog-auto-sense-include-inputs nil
- "If true, AUTOSENSE should include all inputs.
+ "Non-nil means AUTOSENSE should include all inputs.
If nil, only inputs that are NOT output signals in the same block are
included."
:group 'verilog-mode-auto
@@ -972,7 +976,7 @@ included."
(put 'verilog-auto-sense-include-inputs 'safe-local-variable 'verilog-booleanp)
(defcustom verilog-auto-sense-defines-constant nil
- "If true, AUTOSENSE should assume all defines represent constants.
+ "Non-nil means AUTOSENSE should assume all defines represent constants.
When true, the defines will not be included in sensitivity lists. To
maintain compatibility with other sites, this should be set at the bottom
of each Verilog file that requires it, rather than being set globally."
@@ -981,28 +985,36 @@ of each Verilog file that requires it, rather than being set globally."
(put 'verilog-auto-sense-defines-constant 'safe-local-variable 'verilog-booleanp)
(defcustom verilog-auto-reset-blocking-in-non t
- "If true, AUTORESET will reset those signals which were
-assigned with blocking assignments (=) even in a block with
-non-blocking assignments (<=).
+ "Non-nil means AUTORESET will reset blocking statements.
+When true, AUTORESET will reset in blocking statements 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
those temporaries reset. See example in `verilog-auto-reset'."
- :version "24.1"
+ :version "24.1" ;; rev718
:type 'boolean
:group 'verilog-mode-auto)
(put 'verilog-auto-reset-blocking-in-non 'safe-local-variable 'verilog-booleanp)
(defcustom verilog-auto-reset-widths t
- "If true, AUTORESET should determine the width of signals.
+ "True means AUTORESET should determine the width of signals.
This is then used to set the width of the zero (32'h0 for example). This
is required by some lint tools that aren't smart enough to ignore widths of
-the constant zero. This may result in ugly code when parameters determine
-the MSB or LSB of a signal inside an AUTORESET."
+the constant zero. This may result in ugly code when parameters determine
+the MSB or LSB of a signal inside an AUTORESET.
+
+If nil, AUTORESET uses \"0\" as the constant.
+
+If 'unbased', AUTORESET used the unbased unsized literal \"'0\"
+as the constant. This setting is strongly recommended for
+SystemVerilog designs."
:type 'boolean
:group 'verilog-mode-auto)
-(put 'verilog-auto-reset-widths 'safe-local-variable 'verilog-booleanp)
+(put 'verilog-auto-reset-widths 'safe-local-variable
+ '(lambda (x) (memq x '(nil t unbased))))
(defcustom verilog-assignment-delay ""
"Text used for delays in delayed assignments. Add a trailing space if set."
@@ -1011,7 +1023,7 @@ the MSB or LSB of a signal inside an AUTORESET."
(put 'verilog-assignment-delay 'safe-local-variable 'stringp)
(defcustom verilog-auto-arg-sort nil
- "If set, AUTOARG signal names will be sorted, not in declaration order.
+ "Non-nil means AUTOARG signal names will be sorted, not in declaration order.
Declaration order is advantageous with order based instantiations
and is the default for backward compatibility. Sorted order
reduces changes when declarations are moved around in a file, and
@@ -1023,7 +1035,7 @@ See also `verilog-auto-inst-sort'."
(put 'verilog-auto-arg-sort 'safe-local-variable 'verilog-booleanp)
(defcustom verilog-auto-inst-dot-name nil
- "If true, when creating ports with AUTOINST, use .name syntax.
+ "Non-nil means when creating ports with AUTOINST, use .name syntax.
This will use \".port\" instead of \".port(port)\" when possible.
This is only legal in SystemVerilog files, and will confuse older
simulators. Setting `verilog-auto-inst-vector' to nil may also
@@ -1033,7 +1045,7 @@ be desirable to increase how often .name will be used."
(put 'verilog-auto-inst-dot-name 'safe-local-variable 'verilog-booleanp)
(defcustom verilog-auto-inst-param-value nil
- "If set, AUTOINST will replace parameters with the parameter value.
+ "Non-nil means AUTOINST will replace parameters with the parameter value.
If nil, leave parameters as symbolic names.
Parameters must be in Verilog 2001 format #(...), and if a parameter is not
@@ -1041,7 +1053,7 @@ listed as such there (as when the default value is acceptable), it will not
be replaced, and will remain symbolic.
For example, imagine a submodule uses parameters to declare the size of its
-inputs. This is then used by a upper module:
+inputs. This is then used by an upper module:
module InstModule (o,i);
parameter WIDTH;
@@ -1070,20 +1082,20 @@ instead expand to:
(put 'verilog-auto-inst-param-value 'safe-local-variable 'verilog-booleanp)
(defcustom verilog-auto-inst-sort nil
- "If set, AUTOINST signal names will be sorted, not in declaration order.
+ "Non-nil means AUTOINST signals will be sorted, not in declaration order.
Also affects AUTOINSTPARAM. Declaration order is the default for
backward compatibility, and as some teams prefer signals that are
declared together to remain together. Sorted order reduces
changes when declarations are moved around in a file.
See also `verilog-auto-arg-sort'."
- :version "24.1"
+ :version "24.1" ;; rev688
:group 'verilog-mode-auto
:type 'boolean)
(put 'verilog-auto-inst-sort 'safe-local-variable 'verilog-booleanp)
(defcustom verilog-auto-inst-vector t
- "If true, when creating default ports with AUTOINST, use bus subscripts.
+ "Non-nil means when creating default ports with AUTOINST, use bus subscripts.
If nil, skip the subscript when it matches the entire bus as declared in
the module (AUTOWIRE signals always are subscripted, you must manually
declare the wire to have the subscripts removed.) Setting this to nil may
@@ -1115,6 +1127,12 @@ won't merge conflict."
:type 'integer)
(put 'verilog-auto-inst-column 'safe-local-variable 'integerp)
+(defcustom verilog-auto-inst-interfaced-ports t
+ "Non-nil means include interfaced ports in AUTOINST expansions."
+ :group 'verilog-mode-auto
+ :type 'boolean)
+(put 'verilog-auto-inst-interfaced-ports 'safe-local-variable 'verilog-booleanp)
+
(defcustom verilog-auto-input-ignore-regexp nil
"If set, when creating AUTOINPUT list, ignore signals matching this regexp.
See the \\[verilog-faq] for examples on using this."
@@ -1136,11 +1154,18 @@ See the \\[verilog-faq] for examples on using this."
:type 'string)
(put 'verilog-auto-output-ignore-regexp 'safe-local-variable 'stringp)
+(defcustom verilog-auto-template-warn-unused nil
+ "Non-nil means report warning if an AUTO_TEMPLATE line is not used.
+This feature is not supported before Emacs 21.1 or XEmacs 21.4."
+ :group 'verilog-mode-auto
+ :type 'boolean)
+(put 'verilog-auto-template-warn-unused 'safe-local-variable 'verilog-booleanp)
+
(defcustom verilog-auto-tieoff-declaration "wire"
- "Data type used for the declaration for AUTOTIEOFF. If \"wire\" then
-create a wire, if \"assign\" create an assignment, else the data type for
-variable creation."
- :version "24.1"
+ "Data type used for the declaration for AUTOTIEOFF.
+If \"wire\" then create a wire, if \"assign\" create an
+assignment, else the data type for variable creation."
+ :version "24.1" ;; rev713
:group 'verilog-mode-auto
:type 'string)
(put 'verilog-auto-tieoff-declaration 'safe-local-variable 'stringp)
@@ -1201,6 +1226,16 @@ For example, \"_t$\" matches typedefs named with _t, as in the C language."
:group 'verilog-mode-auto
:type 'hook)
+(defcustom verilog-before-save-font-hook nil
+ "Hook run before `verilog-save-font-mods' removes highlighting."
+ :group 'verilog-mode-auto
+ :type 'hook)
+
+(defcustom verilog-after-save-font-hook nil
+ "Hook run after `verilog-save-font-mods' restores highlighting."
+ :group 'verilog-mode-auto
+ :type 'hook)
+
(defvar verilog-imenu-generic-expression
'((nil "^\\s-*\\(\\(m\\(odule\\|acromodule\\)\\)\\|primitive\\)\\s-+\\([a-zA-Z0-9_.:]+\\)" 4)
("*Vars*" "^\\s-*\\(reg\\|wire\\)\\s-+\\(\\|\\[[^]]+\\]\\s-+\\)\\([A-Za-z0-9_]+\\)" 3))
@@ -1430,6 +1465,8 @@ If set will become buffer local.")
:help "Help on AUTOSENSE - sensitivity lists for always blocks"]
["AUTOTIEOFF" (describe-function 'verilog-auto-tieoff)
:help "Help on AUTOTIEOFF - tying off unused outputs"]
+ ["AUTOUNDEF" (describe-function 'verilog-auto-undef)
+ :help "Help on AUTOUNDEF - undefine all local defines"]
["AUTOUNUSED" (describe-function 'verilog-auto-unused)
:help "Help on AUTOUNUSED - terminating unused inputs"]
["AUTOWIRE" (describe-function 'verilog-auto-wire)
@@ -1552,7 +1589,7 @@ If set will become buffer local.")
FIXEDCASE and LITERAL as in `replace-match`. STRING is what to replace.
The case (verilog-string-replace-matches \"o\" \"oo\" nil nil \"foobar\")
will break, as the o's continuously replace. xa -> x works ok though."
- ;; Hopefully soon to a emacs built-in
+ ;; Hopefully soon to an Emacs built-in
;; Also note \ in the replacement prevent multiple replacements; IE
;; (verilog-string-replace-matches "@" "\\\\([0-9]+\\\\)" nil nil "wire@_@")
;; Gives "wire\([0-9]+\)_@" not "wire\([0-9]+\)_\([0-9]+\)"
@@ -2401,7 +2438,6 @@ find the errors."
"\\|\\(\\<`[ou]vm_[a-z_]+_begin\\>\\)" ;28
"\\|\\(\\<`vmm_[a-z_]+_member_begin\\>\\)"
;;
-
))
(defconst verilog-end-block-ordered-rry
@@ -2629,11 +2665,11 @@ find the errors."
"endmodule" "endprimitive" "endinterface" "endpackage" "endprogram" "endclass"
))))
(defconst verilog-disable-fork-re "\\(disable\\|wait\\)\\s-+fork\\>")
-(defconst verilog-extended-case-re "\\(unique\\s-+\\|priority\\s-+\\)?case[xz]?")
+(defconst verilog-extended-case-re "\\(\\(unique\\s-+\\|priority\\s-+\\)?case[xz]?\\)")
(defconst verilog-extended-complete-re
- (concat "\\(\\<extern\\s-+\\|\\<\\(\\<pure\\>\\s-+\\)?virtual\\s-+\\|\\<protected\\s-+\\)*\\(\\<function\\>\\|\\<task\\>\\)"
- "\\|\\(\\<typedef\\>\\s-+\\)*\\(\\<struct\\>\\|\\<union\\>\\|\\<class\\>\\)"
- "\\|\\(\\<import\\>\\s-+\\)?\"DPI-C\"\\s-+\\(function\\>\\|task\\>\\)"
+ (concat "\\(\\(\\<extern\\s-+\\|\\<\\(\\<pure\\>\\s-+\\)?virtual\\s-+\\|\\<protected\\s-+\\)*\\(\\<function\\>\\|\\<task\\>\\)\\)"
+ "\\|\\(\\(\\<typedef\\>\\s-+\\)*\\(\\<struct\\>\\|\\<union\\>\\|\\<class\\>\\)\\)"
+ "\\|\\(\\(\\<import\\>\\s-+\\)?\\(\"DPI-C\"\\s-+\\)?\\(\\<pure\\>\\s-+\\)?\\(function\\>\\|task\\>\\)\\)"
"\\|" verilog-extended-case-re ))
(defconst verilog-basic-complete-re
(eval-when-compile
@@ -2645,9 +2681,7 @@ find the errors."
))))
(defconst verilog-complete-reg
(concat
- verilog-extended-complete-re
- "\\|"
- verilog-basic-complete-re))
+ verilog-extended-complete-re "\\|\\(" verilog-basic-complete-re "\\)"))
(defconst verilog-end-statement-re
(concat "\\(" verilog-beg-block-re "\\)\\|\\("
@@ -2764,7 +2798,8 @@ See also `verilog-font-lock-extra-types'.")
(defvar verilog-font-lock-keywords-3 nil
"Gaudy level highlighting for Verilog mode.
See also `verilog-font-lock-extra-types'.")
-(defvar verilog-font-lock-translate-off-face
+
+(defvar verilog-font-lock-translate-off-face
'verilog-font-lock-translate-off-face
"Font to use for translated off regions.")
(defface verilog-font-lock-translate-off-face
@@ -2842,8 +2877,8 @@ See also `verilog-font-lock-extra-types'.")
(verilog-pragma-keywords
(eval-when-compile
(verilog-regexp-opt
- '("surefire" "synopsys" "rtl_synthesis" "verilint" "leda" "0in") nil
- )))
+ '("surefire" "auto" "synopsys" "rtl_synthesis" "verilint" "leda" "0in"
+ ) nil )))
(verilog-1800-2005-keywords
(eval-when-compile
@@ -2968,7 +3003,7 @@ See also `verilog-font-lock-extra-types'.")
(append verilog-font-lock-keywords-1
(list
;; Fontify pragmas
- (concat "\\(//\\s-*" verilog-pragma-keywords "\\s-.*\\)")
+ (concat "\\(//\\s-*\\(" verilog-pragma-keywords "\\)\\s-.*\\)")
;; Fontify escaped names
'("\\(\\\\\\S-*\\s-\\)" 0 font-lock-function-name-face)
;; Fontify macro definitions/ uses
@@ -3030,6 +3065,31 @@ For insignificant changes, see instead `verilog-save-buffer-state'."
after-change-functions)
(progn ,@body)))
+(defvar verilog-save-font-mod-hooked nil
+ "Local variable when inside a `verilog-save-font-mods' block.")
+(make-variable-buffer-local 'verilog-save-font-mod-hooked)
+
+(defmacro verilog-save-font-mods (&rest body)
+ "Execute BODY forms, disabling text modifications to allow performing BODY.
+Includes temporary disabling of `font-lock' to restore the buffer
+to full text form for parsing. Additional actions may be specified with
+`verilog-before-save-font-hook' and `verilog-after-save-font-hook'."
+ ;; Before version 20, match-string with font-lock returns a
+ ;; vector that is not equal to the string. IE if on "input"
+ ;; nil==(equal "input" (progn (looking-at "input") (match-string 0)))
+ `(let* ((hooked (unless verilog-save-font-mod-hooked
+ (verilog-run-hooks 'verilog-before-save-font-hook)
+ t))
+ (verilog-save-font-mod-hooked t)
+ (fontlocked (when (and (boundp 'font-lock-mode) font-lock-mode)
+ (font-lock-mode 0)
+ t)))
+ (unwind-protect
+ (progn ,@body)
+ ;; Unwind forms
+ (when fontlocked (font-lock-mode t))
+ (when hooked (verilog-run-hooks 'verilog-after-save-font-hook)))))
+
;;
;; Comment detection and caching
@@ -3161,7 +3221,7 @@ to establish comment properties on all text."
(defun verilog-insert (&rest stuff)
"Insert STUFF arguments, tracking for `verilog-inside-comment-or-string-p'.
-Any insert that includes a comment must have the entire commente
+Any insert that includes a comment must have the entire comment
inserted using a single call to `verilog-insert'."
(let ((pt (point)))
(while stuff
@@ -3565,9 +3625,10 @@ Key bindings specific to `verilog-mode-map' are:
;; Stuff for GNU Emacs
(set (make-local-variable 'font-lock-defaults)
- `((verilog-font-lock-keywords verilog-font-lock-keywords-1
- verilog-font-lock-keywords-2
- verilog-font-lock-keywords-3)
+ `((verilog-font-lock-keywords
+ verilog-font-lock-keywords-1
+ verilog-font-lock-keywords-2
+ verilog-font-lock-keywords-3)
nil nil nil
,(if (functionp 'syntax-ppss)
;; verilog-beg-of-defun uses syntax-ppss, and syntax-ppss uses
@@ -4049,7 +4110,7 @@ With ARG, first kill any existing labels."
(if (looking-at verilog-label-re)
(setq h (point))))
(goto-char h)))
- ;; stop if we see a complete reg, perhaps an extended one
+ ;; stop if we see an extended complete reg, perhaps a complete one
(and
(looking-at verilog-complete-reg)
(let* ((p (point)))
@@ -4186,32 +4247,20 @@ More specifically, point @ in the line foo : @ begin"
nil)))
(defun verilog-backward-up-list (arg)
- "Like `backward-up-list', but deal with comments."
+ "Call `backward-up-list' ARG, ignoring comments."
(let ((parse-sexp-ignore-comments t))
(backward-up-list arg)))
(defun verilog-forward-sexp-cmt (arg)
- "Call `forward-sexp', inside comments."
+ "Call `forward-sexp' ARG, inside comments."
(let ((parse-sexp-ignore-comments nil))
(forward-sexp arg)))
(defun verilog-forward-sexp-ign-cmt (arg)
- "Call `forward-sexp', ignoring comments."
+ "Call `forward-sexp' ARG, ignoring comments."
(let ((parse-sexp-ignore-comments t))
(forward-sexp arg)))
-(defun verilog-in-struct-region-p ()
- "Return true if in a struct region.
-More specifically, in a list after a struct|union keyword."
- (interactive)
- (save-excursion
- (let* ((state (verilog-syntax-ppss))
- (depth (nth 0 state)))
- (if depth
- (progn (verilog-backward-up-list depth)
- (verilog-beg-of-statement)
- (looking-at "\\<typedef\\>?\\s-*\\<struct\\|union\\>"))))))
-
(defun verilog-in-generate-region-p ()
"Return true if in a generate region.
More specifically, after a generate and before an endgenerate."
@@ -4658,10 +4707,10 @@ primitive or interface named NAME."
(cond
((match-end 5) ;; of verilog-end-block-ordered-re
(setq reg "\\(\\<function\\>\\)\\|\\(\\<\\(endfunction\\|task\\|\\(macro\\)?module\\|primitive\\)\\>\\)")
- (setq name-re "\\w+\\s-*(")
- )
+ (setq name-re "\\w+\\s-*("))
((match-end 6) ;; of verilog-end-block-ordered-re
- (setq reg "\\(\\<task\\>\\)\\|\\(\\<\\(endtask\\|function\\|\\(macro\\)?module\\|primitive\\)\\>\\)"))
+ (setq reg "\\(\\<task\\>\\)\\|\\(\\<\\(endtask\\|function\\|\\(macro\\)?module\\|primitive\\)\\>\\)")
+ (setq name-re "\\w+\\s-*("))
((match-end 7) ;; of verilog-end-block-ordered-re
(setq reg "\\(\\<\\(macro\\)?module\\>\\)\\|\\<endmodule\\>"))
((match-end 8) ;; of verilog-end-block-ordered-re
@@ -4977,25 +5026,24 @@ becomes:
(compile compile-command))
(defun verilog-preprocess (&optional command filename)
- "Preprocess the buffer, similar to `compile', but leave output in Verilog-Mode.
+ "Preprocess the buffer, similar to `compile', but put output in Verilog-Mode.
Takes optional COMMAND or defaults to `verilog-preprocessor', and
-FILENAME or defaults to `buffer-file-name`."
+FILENAME to find directory to run in, or defaults to `buffer-file-name`."
(interactive
(list
(let ((default (verilog-expand-command verilog-preprocessor)))
(set (make-local-variable `verilog-preprocessor)
- (read-from-minibuffer "Run Preprocessor (like this): "
- default nil nil
- 'verilog-preprocess-history default)))))
+ (read-from-minibuffer "Run Preprocessor (like this): "
+ default nil nil
+ 'verilog-preprocess-history default)))))
(unless command (setq command (verilog-expand-command verilog-preprocessor)))
(let* ((fontlocked (and (boundp 'font-lock-mode) font-lock-mode))
- (dir (file-name-directory (or filename buffer-file-name)))
- (file (file-name-nondirectory (or filename buffer-file-name)))
- (cmd (concat "cd " dir "; " command " " file)))
+ (dir (file-name-directory (or filename buffer-file-name)))
+ (cmd (concat "cd " dir "; " command)))
(with-output-to-temp-buffer "*Verilog-Preprocessed*"
(with-current-buffer (get-buffer "*Verilog-Preprocessed*")
(insert (concat "// " cmd "\n"))
- (shell-command cmd "*Verilog-Preprocessed*")
+ (call-process shell-file-name nil t nil shell-command-switch cmd)
(verilog-mode)
;; Without this force, it takes a few idle seconds
;; to get the color, which is very jarring
@@ -5006,17 +5054,30 @@ FILENAME or defaults to `buffer-file-name`."
;; Batch
;;
+(defun verilog-warn (string &rest args)
+ "Print a warning with `format' using STRING and optional ARGS."
+ (apply 'message (concat "%%Warning: " string) args))
+
+(defun verilog-warn-error (string &rest args)
+ "Call `error' using STRING and optional ARGS.
+If `verilog-warn-fatal' is non-nil, call `verilog-warn' instead."
+ (if verilog-warn-fatal
+ (apply 'error string args)
+ (apply 'verilog-warn string args)))
+
(defmacro verilog-batch-error-wrapper (&rest body)
"Execute BODY and add error prefix to any errors found.
This lets programs calling batch mode to easily extract error messages."
- `(condition-case err
- (progn ,@body)
- (error
- (error "%%Error: %s%s" (error-message-string err)
- (if (featurep 'xemacs) "\n" ""))))) ;; XEmacs forgets to add a newline
+ `(let ((verilog-warn-fatal nil))
+ (condition-case err
+ (progn ,@body)
+ (error
+ (error "%%Error: %s%s" (error-message-string err)
+ (if (featurep 'xemacs) "\n" "")))))) ;; XEmacs forgets to add a newline
(defun verilog-batch-execute-func (funref &optional no-save)
- "Internal processing of a batch command, running FUNREF on all command arguments.
+ "Internal processing of a batch command.
+Runs FUNREF on all command arguments.
Save the result unless optional NO-SAVE is t."
(verilog-batch-error-wrapper
;; Setting global variables like that is *VERY NASTY* !!! --Stef
@@ -5088,7 +5149,7 @@ line in bottom-up order."
(verilog-batch-execute-func `verilog-inject-auto))
(defun verilog-batch-indent ()
- "For use with --batch, reindent an a entire file as a stand-alone tool.
+ "For use with --batch, reindent an entire file as a stand-alone tool.
This sets up the appropriate Verilog mode environment, calls
\\[verilog-indent-buffer] on all command-line files, and saves the buffers."
(unless noninteractive
@@ -5219,7 +5280,7 @@ Return a list of two elements: (INDENT-TYPE INDENT-LEVEL)."
(verilog-beg-of-statement) ;; doesn't get to beginning
(if (looking-at verilog-property-re)
(throw 'nesting 'statement) ; We don't need an endproperty for these
- (throw 'nesting 'block) ;We still need a endproperty
+ (throw 'nesting 'block) ;We still need an endproperty
))
(t ; endblock
; try to leap back to matching outward block by striding across
@@ -5312,7 +5373,6 @@ Return a list of two elements: (INDENT-TYPE INDENT-LEVEL)."
(t
(setq depth (verilog-current-indent-level)))))
(message "You are at nesting %s depth %d" type depth))))
-
(defun verilog-calc-1 ()
(catch 'nesting
(let ((re (concat "\\({\\|}\\|" verilog-indent-re "\\)")))
@@ -5370,9 +5430,10 @@ Return a list of two elements: (INDENT-TYPE INDENT-LEVEL)."
; endfunction
(verilog-beg-of-statement)
(if (looking-at verilog-beg-block-re-ordered)
- (throw 'nesting 'block)
- (throw 'nesting 'defun)))
+ (throw 'nesting 'block)
+ (throw 'nesting 'defun)))
+ ;;
((looking-at "\\<property\\>")
; *sigh*
; {assert|assume|cover} property (); are complete
@@ -5382,7 +5443,7 @@ Return a list of two elements: (INDENT-TYPE INDENT-LEVEL)."
(verilog-beg-of-statement)
(if (looking-at verilog-property-re)
(throw 'continue 'statement) ; We don't need an endproperty for these
- (throw 'nesting 'block) ;We still need a endproperty
+ (throw 'nesting 'block) ;We still need an endproperty
))
(t (throw 'nesting 'block))))
@@ -5715,7 +5776,7 @@ Set point to where line starts."
(forward-comment (- (buffer-size))))
(defun verilog-backward-syntactic-ws-quick ()
- "As with `verilog-backward-syntactic-ws' but uses `verilog-scan' cache."
+ "As with `verilog-backward-syntactic-ws' but use `verilog-scan' cache."
(while (cond ((bobp)
nil) ; Done
((> (skip-syntax-backward " ") 0)
@@ -5864,7 +5925,7 @@ May cache result using `verilog-syntax-ppss'."
(defun verilog-in-paren-quick ()
"Return true if in a parenthetical expression.
-Always starts from point-min, to allow inserts with hooks disabled."
+Always starts from `point-min', to allow inserts with hooks disabled."
;; The -quick refers to its use alongside the other -quick functions,
;; not that it's likely to be faster than verilog-in-paren.
(let ((state (save-excursion (parse-partial-sexp (point-min) (point)))))
@@ -6118,7 +6179,7 @@ Only look at a few lines to determine indent level."
(indent-line-to val)
(if (and (not verilog-indent-lists)
(verilog-in-paren))
- (verilog-pretty-declarations))
+ (verilog-pretty-declarations-auto))
))
((= (preceding-char) ?\) )
(goto-char here)
@@ -6154,7 +6215,7 @@ Only look at a few lines to determine indent level."
(looking-at verilog-declaration-re))))
(indent-line-to val)
(if decl
- (verilog-pretty-declarations))))
+ (verilog-pretty-declarations-auto))))
(;-- Handle the ends
(or
@@ -6285,6 +6346,12 @@ ARG is ignored, for `comment-indent-function' compatibility."
;;
+(defun verilog-pretty-declarations-auto (&optional quiet)
+ "Call `verilog-pretty-declarations' QUIET based on `verilog-auto-lineup'."
+ (when (or (eq 'all verilog-auto-lineup)
+ (eq 'declarations verilog-auto-lineup))
+ (verilog-pretty-declarations quiet)))
+
(defun verilog-pretty-declarations (&optional quiet)
"Line up declarations around point.
Be verbose about progress unless optional QUIET set."
@@ -6431,100 +6498,101 @@ Be verbose about progress unless optional QUIET set."
(interactive)
(if (not (verilog-in-comment-or-string-p))
(save-excursion
- (let ((rexp (concat "^\\s-*" verilog-complete-reg)))
- (beginning-of-line)
- (if (and (not (looking-at rexp ))
- (looking-at verilog-assignment-operation-re)
- (save-excursion
- (goto-char (match-end 2))
- (and (not (verilog-in-attribute-p))
- (not (verilog-in-parameter-p))
- (not (verilog-in-comment-or-string-p)))))
- (let* ((here (point))
- (e) (r)
- (start
- (progn
- (beginning-of-line)
- (setq e (point))
- (verilog-backward-syntactic-ws)
- (beginning-of-line)
- (while (and (not (looking-at rexp ))
- (looking-at verilog-assignment-operation-re)
- (not (bobp))
- )
- (setq e (point))
- (verilog-backward-syntactic-ws)
- (beginning-of-line)
- ) ;Ack, need to grok `define
- e))
- (end
- (progn
- (goto-char here)
- (end-of-line)
- (setq e (point)) ;Might be on last line
- (verilog-forward-syntactic-ws)
- (beginning-of-line)
- (while (and
- (not (looking-at rexp ))
- (looking-at verilog-assignment-operation-re)
- (progn
- (end-of-line)
- (not (eq e (point)))))
- (setq e (point))
- (verilog-forward-syntactic-ws)
- (beginning-of-line)
- )
- e))
- (endpos (set-marker (make-marker) end))
- (ind)
- )
- (goto-char start)
- (verilog-do-indent (verilog-calculate-indent))
- (if (and (not quiet)
- (> (- end start) 100))
- (message "Lining up expressions..(please stand by)"))
-
- ;; Set indent to minimum throughout region
- (while (< (point) (marker-position endpos))
- (beginning-of-line)
- (verilog-just-one-space verilog-assignment-operation-re)
- (beginning-of-line)
- (verilog-do-indent (verilog-calculate-indent))
- (end-of-line)
- (verilog-forward-syntactic-ws)
- )
-
- ;; Now find biggest prefix
- (setq ind (verilog-get-lineup-indent-2 verilog-assignment-operation-re start endpos))
-
- ;; Now indent each line.
- (goto-char start)
- (while (progn (setq e (marker-position endpos))
- (setq r (- e (point)))
- (> r 0))
- (setq e (point))
- (if (not quiet) (message "%d" r))
- (cond
- ((looking-at verilog-assignment-operation-re)
- (goto-char (match-beginning 2))
- (if (not (or (verilog-in-parenthesis-p) ;; leave attributes and comparisons alone
- (verilog-in-coverage-p)))
- (if (eq (char-after) ?=)
- (indent-to (1+ ind)) ; line up the = of the <= with surrounding =
- (indent-to ind)
- ))
- )
- ((verilog-continued-line-1 start)
- (goto-char e)
- (indent-line-to ind))
- (t ; Must be comment or white space
- (goto-char e)
- (verilog-forward-ws&directives)
- (forward-line -1))
- )
- (forward-line 1))
- (unless quiet (message ""))
- ))))))
+ (let ( (rexp (concat "^\\s-*" verilog-complete-reg))
+ (rexp1 (concat "^\\s-*" verilog-basic-complete-re)))
+ (beginning-of-line)
+ (if (and (not (looking-at rexp ))
+ (looking-at verilog-assignment-operation-re)
+ (save-excursion
+ (goto-char (match-end 2))
+ (and (not (verilog-in-attribute-p))
+ (not (verilog-in-parameter-p))
+ (not (verilog-in-comment-or-string-p)))))
+ (let* ((here (point))
+ (e) (r)
+ (start
+ (progn
+ (beginning-of-line)
+ (setq e (point))
+ (verilog-backward-syntactic-ws)
+ (beginning-of-line)
+ (while (and (not (looking-at rexp1))
+ (looking-at verilog-assignment-operation-re)
+ (not (bobp))
+ )
+ (setq e (point))
+ (verilog-backward-syntactic-ws)
+ (beginning-of-line)
+ ) ;Ack, need to grok `define
+ e))
+ (end
+ (progn
+ (goto-char here)
+ (end-of-line)
+ (setq e (point)) ;Might be on last line
+ (verilog-forward-syntactic-ws)
+ (beginning-of-line)
+ (while (and
+ (not (looking-at rexp1 ))
+ (looking-at verilog-assignment-operation-re)
+ (progn
+ (end-of-line)
+ (not (eq e (point)))))
+ (setq e (point))
+ (verilog-forward-syntactic-ws)
+ (beginning-of-line)
+ )
+ e))
+ (endpos (set-marker (make-marker) end))
+ (ind)
+ )
+ (goto-char start)
+ (verilog-do-indent (verilog-calculate-indent))
+ (if (and (not quiet)
+ (> (- end start) 100))
+ (message "Lining up expressions..(please stand by)"))
+
+ ;; Set indent to minimum throughout region
+ (while (< (point) (marker-position endpos))
+ (beginning-of-line)
+ (verilog-just-one-space verilog-assignment-operation-re)
+ (beginning-of-line)
+ (verilog-do-indent (verilog-calculate-indent))
+ (end-of-line)
+ (verilog-forward-syntactic-ws)
+ )
+
+ ;; Now find biggest prefix
+ (setq ind (verilog-get-lineup-indent-2 verilog-assignment-operation-re start endpos))
+
+ ;; Now indent each line.
+ (goto-char start)
+ (while (progn (setq e (marker-position endpos))
+ (setq r (- e (point)))
+ (> r 0))
+ (setq e (point))
+ (if (not quiet) (message "%d" r))
+ (cond
+ ((looking-at verilog-assignment-operation-re)
+ (goto-char (match-beginning 2))
+ (if (not (or (verilog-in-parenthesis-p) ;; leave attributes and comparisons alone
+ (verilog-in-coverage-p)))
+ (if (eq (char-after) ?=)
+ (indent-to (1+ ind)) ; line up the = of the <= with surrounding =
+ (indent-to ind)
+ ))
+ )
+ ((verilog-continued-line-1 start)
+ (goto-char e)
+ (indent-line-to ind))
+ (t ; Must be comment or white space
+ (goto-char e)
+ (verilog-forward-ws&directives)
+ (forward-line -1))
+ )
+ (forward-line 1))
+ (unless quiet (message ""))
+ ))))))
(defun verilog-just-one-space (myre)
"Remove extra spaces around regular expression MYRE."
@@ -7365,6 +7433,7 @@ See also `verilog-sk-header' for an alternative format."
;;
;; Elements of a signal list
+;; Unfortunately we use 'assoc' on this, so can't be a vector
(defsubst verilog-sig-new (name bits comment mem enum signed type multidim modport)
(list name bits comment mem enum signed type multidim modport))
(defsubst verilog-sig-name (sig)
@@ -7381,6 +7450,8 @@ See also `verilog-sk-header' for an alternative format."
(nth 5 sig))
(defsubst verilog-sig-type (sig)
(nth 6 sig))
+(defsubst verilog-sig-type-set (sig type)
+ (setcar (nthcdr 6 sig) type))
(defsubst verilog-sig-multidim (sig)
(nth 7 sig))
(defsubst verilog-sig-multidim-string (sig)
@@ -7396,17 +7467,17 @@ See also `verilog-sk-header' for an alternative format."
(verilog-make-width-expression (verilog-sig-bits sig)))
(defsubst verilog-alw-new (outputs-del outputs-imm temps inputs)
- (list outputs-del outputs-imm temps inputs))
+ (vector outputs-del outputs-imm temps inputs))
(defsubst verilog-alw-get-outputs-delayed (sigs)
- (nth 0 sigs))
+ (aref sigs 0))
(defsubst verilog-alw-get-outputs-immediate (sigs)
- (nth 1 sigs))
+ (aref sigs 1))
(defsubst verilog-alw-get-temps (sigs)
- (nth 2 sigs))
+ (aref sigs 2))
(defsubst verilog-alw-get-inputs (sigs)
- (nth 3 sigs))
+ (aref sigs 3))
(defsubst verilog-alw-get-uses-delayed (sigs)
- (nth 0 sigs))
+ (aref sigs 0))
(defsubst verilog-modi-new (name fob pt type)
(vector name fob pt type))
@@ -7459,6 +7530,11 @@ See also `verilog-sk-header' for an alternative format."
(defsubst verilog-subdecls-get-interfaced (subdecls)
(aref subdecls 4))
+(defun verilog-signals-from-signame (signame-list)
+ "Return signals in standard form from SIGNAME-LIST, a simple list of names."
+ (mapcar (lambda (name) (verilog-sig-new name nil nil nil nil nil nil nil nil))
+ signame-list))
+
(defun verilog-signals-not-in (in-list not-list)
"Return list of signals in IN-LIST that aren't also in NOT-LIST.
Also remove any duplicates in IN-LIST.
@@ -7471,17 +7547,17 @@ Signals must be in standard (base vector) form."
(puthash (car (car not-list)) t ht)
(setq not-list (cdr not-list)))
(while in-list
- (when (not (gethash (car (car in-list)) ht))
+ (when (not (gethash (verilog-sig-name (car in-list)) ht))
(setq out-list (cons (car in-list) out-list))
- (puthash (car (car in-list)) t ht))
+ (puthash (verilog-sig-name (car in-list)) t ht))
(setq in-list (cdr in-list)))
(nreverse out-list)))
;; Slower Fallback if no hash tables (pre Emacs 21.1/XEmacs 21.4)
(t
(let (out-list)
(while in-list
- (if (not (or (assoc (car (car in-list)) not-list)
- (assoc (car (car in-list)) out-list)))
+ (if (not (or (assoc (verilog-sig-name (car in-list)) not-list)
+ (assoc (verilog-sig-name (car in-list)) out-list)))
(setq out-list (cons (car in-list) out-list)))
(setq in-list (cdr in-list)))
(nreverse out-list)))))
@@ -7499,13 +7575,22 @@ Signals must be in standard (base vector) form."
(defun verilog-signals-sort-compare (a b)
"Compare signal A and B for sorting."
- (string< (car a) (car b)))
+ (string< (verilog-sig-name a) (verilog-sig-name b)))
(defun verilog-signals-not-params (in-list)
"Return list of signals in IN-LIST that aren't parameters or numeric constants."
(let (out-list)
(while in-list
- (unless (boundp (intern (concat "vh-" (car (car in-list)))))
+ (unless (boundp (intern (concat "vh-" (verilog-sig-name (car in-list)))))
+ (setq out-list (cons (car in-list) out-list)))
+ (setq in-list (cdr in-list)))
+ (nreverse out-list)))
+
+(defun verilog-signals-with (func in-list)
+ "Return IN-LIST with only signals where FUNC passed each signal is true."
+ (let (out-list)
+ (while in-list
+ (when (funcall func (car in-list))
(setq out-list (cons (car in-list) out-list)))
(setq in-list (cdr in-list)))
(nreverse out-list)))
@@ -7594,20 +7679,67 @@ Duplicate signals are also removed. For example A[2] and A[1] become A[2:1]."
;;
out-list))
-(defun verilog-sig-tieoff (sig &optional no-width)
+(defun verilog-sig-tieoff (sig)
"Return tieoff expression for given SIG, with appropriate width.
-Ignore width if optional NO-WIDTH is set."
- (let* ((width (if no-width nil (verilog-sig-width sig))))
- (concat
- (if (and verilog-active-low-regexp
- (string-match verilog-active-low-regexp (verilog-sig-name sig)))
- "~" "")
- (cond ((not width)
- "0")
- ((string-match "^[0-9]+$" width)
- (concat width (if (verilog-sig-signed sig) "'sh0" "'h0")))
- (t
- (concat "{" width "{1'b0}}"))))))
+Tieoff value uses `verilog-active-low-regexp' and
+`verilog-auto-reset-widths'."
+ (concat
+ (if (and verilog-active-low-regexp
+ (string-match verilog-active-low-regexp (verilog-sig-name sig)))
+ "~" "")
+ (cond ((not verilog-auto-reset-widths)
+ "0")
+ ((equal verilog-auto-reset-widths 'unbased)
+ "'0")
+ ;; Else presume verilog-auto-reset-widths is true
+ (t
+ (let* ((width (verilog-sig-width sig)))
+ (if (string-match "^[0-9]+$" width)
+ (concat width (if (verilog-sig-signed sig) "'sh0" "'h0"))
+ (concat "{" width "{1'b0}}")))))))
+
+;;
+;; Dumping
+;;
+
+(defun verilog-decls-princ (decls)
+ "For debug, dump the `verilog-read-decls' structure DECLS."
+ (verilog-signals-princ (verilog-decls-get-outputs decls)
+ "Outputs:\n" " ")
+ (verilog-signals-princ (verilog-decls-get-inouts decls)
+ "Inout:\n" " ")
+ (verilog-signals-princ (verilog-decls-get-inputs decls)
+ "Inputs:\n" " ")
+ (verilog-signals-princ (verilog-decls-get-vars decls)
+ "Vars:\n" " ")
+ (verilog-signals-princ (verilog-decls-get-assigns decls)
+ "Assigns:\n" " ")
+ (verilog-signals-princ (verilog-decls-get-consts decls)
+ "Consts:\n" " ")
+ (verilog-signals-princ (verilog-decls-get-gparams decls)
+ "Gparams:\n" " ")
+ (verilog-signals-princ (verilog-decls-get-interfaces decls)
+ "Interfaces:\n" " ")
+ (princ "\n"))
+
+(defun verilog-signals-princ (signals &optional header prefix)
+ "For debug, dump internal SIGNALS structures, with HEADER and PREFIX."
+ (when signals
+ (princ header)
+ (while signals
+ (let ((sig (car signals)))
+ (setq signals (cdr signals))
+ (princ prefix)
+ (princ "\"") (princ (verilog-sig-name sig)) (princ "\"")
+ (princ " bits=") (princ (verilog-sig-bits sig))
+ (princ " cmt=") (princ (verilog-sig-comment sig))
+ (princ " mem=") (princ (verilog-sig-memory sig))
+ (princ " enum=") (princ (verilog-sig-enum sig))
+ (princ " sign=") (princ (verilog-sig-signed sig))
+ (princ " type=") (princ (verilog-sig-type sig))
+ (princ " dim=") (princ (verilog-sig-multidim sig))
+ (princ " modp=") (princ (verilog-sig-modport sig))
+ (princ "\n")))))
;;
;; Port/Wire/Etc Reading
@@ -7701,7 +7833,7 @@ Optional NUM-PARAM and MAX-PARAM check for a specific number of parameters."
(let ((olist))
(save-excursion
;; /*AUTOPUNT("parameter", "parameter")*/
- (search-backward "(")
+ (backward-sexp 1)
(while (looking-at "(?\\s *\"\\([^\"]*\\)\"\\s *,?")
(setq olist (cons (match-string 1) olist))
(goto-char (match-end 0))))
@@ -7716,10 +7848,10 @@ Optional NUM-PARAM and MAX-PARAM check for a specific number of parameters."
(defun verilog-read-decls ()
"Compute signal declaration information for the current module at point.
-Return a array of [outputs inouts inputs wire reg assign const]."
+Return an array of [outputs inouts inputs wire reg assign const]."
(let ((end-mod-point (or (verilog-get-end-of-defun t) (point-max)))
(functask 0) (paren 0) (sig-paren 0) (v2kargs-ok t)
- in-modport ign-prop
+ in-modport ptype ign-prop
sigs-in sigs-out sigs-inout sigs-var sigs-assign sigs-const
sigs-gparam sigs-intf
vec expect-signal keywd newsig rvalue enum io signed typedefed multidim
@@ -7731,13 +7863,13 @@ Return a array of [outputs inouts inputs wire reg assign const]."
;;(if dbg (setq dbg (concat dbg (format "Pt %s Vec %s C%c Kwd'%s'\n" (point) vec (following-char) keywd))))
(cond
((looking-at "//")
- (if (looking-at "[^\n]*synopsys\\s +enum\\s +\\([a-zA-Z0-9_]+\\)")
- (setq enum (match-string 1)))
+ (if (looking-at "[^\n]*\\(auto\\|synopsys\\)\\s +enum\\s +\\([a-zA-Z0-9_]+\\)")
+ (setq enum (match-string 2)))
(search-forward "\n"))
((looking-at "/\\*")
(forward-char 2)
- (if (looking-at "[^\n]*synopsys\\s +enum\\s +\\([a-zA-Z0-9_]+\\)")
- (setq enum (match-string 1)))
+ (if (looking-at "[^\n]*\\(auto\\|synopsys\\)\\s +enum\\s +\\([a-zA-Z0-9_]+\\)")
+ (setq enum (match-string 2)))
(or (search-forward "*/")
(error "%s: Unmatched /* */, at char %d" (verilog-point-text) (point))))
((looking-at "(\\*")
@@ -7795,33 +7927,49 @@ Return a array of [outputs inouts inputs wire reg assign const]."
(when (string-match "^\\\\" (match-string 1))
(setq keywd (concat keywd " ")))) ;; Escaped ID needs space at end
(cond ((equal keywd "input")
- (setq vec nil enum nil rvalue nil newsig nil signed nil typedefed nil multidim nil sig-paren paren
- expect-signal 'sigs-in io t modport nil))
+ (setq vec nil enum nil rvalue nil newsig nil signed nil
+ typedefed nil multidim nil ptype nil modport nil
+ expect-signal 'sigs-in io t sig-paren paren))
((equal keywd "output")
- (setq vec nil enum nil rvalue nil newsig nil signed nil typedefed nil multidim nil sig-paren paren
- expect-signal 'sigs-out io t modport nil))
+ (setq vec nil enum nil rvalue nil newsig nil signed nil
+ typedefed nil multidim nil ptype nil modport nil
+ expect-signal 'sigs-out io t sig-paren paren))
((equal keywd "inout")
- (setq vec nil enum nil rvalue nil newsig nil signed nil typedefed nil multidim nil sig-paren paren
- expect-signal 'sigs-inout io t modport nil))
+ (setq vec nil enum nil rvalue nil newsig nil signed nil
+ typedefed nil multidim nil ptype nil modport nil
+ expect-signal 'sigs-inout io t sig-paren paren))
((equal keywd "parameter")
- (setq vec nil enum nil rvalue nil signed nil typedefed nil multidim nil sig-paren paren
- expect-signal 'sigs-gparam io t modport nil))
- ((member keywd '("wire"
- "tri" "tri0" "tri1" "triand" "trior" "wand" "wor"
- "reg" "trireg"
+ (setq vec nil enum nil rvalue nil signed nil
+ typedefed nil multidim nil ptype nil modport nil
+ expect-signal 'sigs-gparam io t sig-paren paren))
+ ((member keywd '("wire" "reg" ; Fast
+ ;; net_type
+ "tri" "tri0" "tri1" "triand" "trior" "trireg"
+ "uwire" "wand" "wor"
+ ;; integer_atom_type
"byte" "shortint" "int" "longint" "integer" "time"
+ "supply0" "supply1"
+ ;; integer_vector_type - "reg" above
"bit" "logic"
+ ;; non_integer_type
"shortreal" "real" "realtime"
+ ;; data_type
"string" "event" "chandle"))
- (unless io (setq vec nil enum nil rvalue nil signed nil typedefed nil multidim nil sig-paren paren
- expect-signal 'sigs-var modport nil)))
+ (cond (io
+ (setq typedefed
+ (if typedefed (concat typedefed " " keywd) keywd)))
+ (t (setq vec nil enum nil rvalue nil signed nil
+ typedefed nil multidim nil sig-paren paren
+ expect-signal 'sigs-var modport nil))))
((equal keywd "assign")
- (setq vec nil enum nil rvalue nil signed nil typedefed nil multidim nil sig-paren paren
- expect-signal 'sigs-assign modport nil))
- ((member keywd '("supply0" "supply1" "supply"
- "localparam" "genvar"))
- (unless io (setq vec nil enum nil rvalue nil signed nil typedefed nil multidim nil sig-paren paren
- expect-signal 'sigs-const modport nil)))
+ (setq vec nil enum nil rvalue nil signed nil
+ typedefed nil multidim nil ptype nil modport nil
+ expect-signal 'sigs-assign sig-paren paren))
+ ((member keywd '("localparam" "genvar"))
+ (unless io
+ (setq vec nil enum nil rvalue nil signed nil
+ typedefed nil multidim nil ptype nil modport nil
+ expect-signal 'sigs-const sig-paren paren)))
((member keywd '("signed" "unsigned"))
(setq signed keywd))
((member keywd '("assert" "assume" "cover" "expect" "restrict"))
@@ -7835,11 +7983,14 @@ Return a array of [outputs inouts inputs wire reg assign const]."
(setq functask (1- functask)))
((equal keywd "modport")
(setq in-modport t))
+ ((equal keywd "type")
+ (setq ptype t))
;; Ifdef? Ignore name of define
((member keywd '("`ifdef" "`ifndef" "`elsif"))
(setq rvalue t))
;; Type?
- ((verilog-typedef-name-p keywd)
+ ((unless ptype
+ (verilog-typedef-name-p keywd))
(setq typedefed keywd))
;; Interface with optional modport in v2k arglist?
;; Skip over parsing modport, and take the interface name as the type
@@ -7848,8 +7999,10 @@ Return a array of [outputs inouts inputs wire reg assign const]."
(not rvalue)
(looking-at "\\s-*\\(\\.\\(\\s-*[a-zA-Z`_$][a-zA-Z0-9`_$]*\\)\\|\\)\\s-*[a-zA-Z`_$][a-zA-Z0-9`_$]*"))
(when (match-end 2) (goto-char (match-end 2)))
- (setq vec nil enum nil rvalue nil newsig nil signed nil typedefed keywd multidim nil sig-paren paren
- expect-signal 'sigs-intf io t modport (match-string 2)))
+ (setq vec nil enum nil rvalue nil signed nil
+ typedefed keywd multidim nil ptype nil modport (match-string 2)
+ newsig nil sig-paren paren
+ expect-signal 'sigs-intf io t ))
;; Ignore dotted LHS assignments: "assign foo.bar = z;"
((looking-at "\\s-*\\.")
(goto-char (match-end 0))
@@ -7888,7 +8041,7 @@ Return a array of [outputs inouts inputs wire reg assign const]."
(eval-when-compile
;; Prevent compile warnings; these are let's, not globals
;; Do not remove the eval-when-compile
- ;; - we want a error when we are debugging this code if they are refed.
+ ;; - we want an error when we are debugging this code if they are refed.
(defvar sigs-in)
(defvar sigs-inout)
(defvar sigs-out)
@@ -7918,7 +8071,8 @@ Return a array of [outputs inouts inputs wire reg assign const]."
(verilog-sig-memory portdata)
nil
(verilog-sig-signed portdata)
- (verilog-sig-type portdata)
+ (unless (member (verilog-sig-type portdata) '("wire" "reg"))
+ (verilog-sig-type portdata))
multidim nil)
sigs-inout)))
((or (setq portdata (assoc port (verilog-decls-get-outputs submoddecls)))
@@ -7931,7 +8085,13 @@ Return a array of [outputs inouts inputs wire reg assign const]."
(verilog-sig-memory portdata)
nil
(verilog-sig-signed portdata)
- (verilog-sig-type portdata)
+ ;; Though ok in SV, in V2K code, propagating the
+ ;; "reg" in "output reg" upwards isn't legal.
+ ;; Also for backwards compatibility we don't propagate
+ ;; "input wire" upwards.
+ ;; See also `verilog-signals-edit-wire-reg'.
+ (unless (member (verilog-sig-type portdata) '("wire" "reg"))
+ (verilog-sig-type portdata))
multidim nil)
sigs-out)))
((or (setq portdata (assoc port (verilog-decls-get-inputs submoddecls)))
@@ -7944,7 +8104,8 @@ Return a array of [outputs inouts inputs wire reg assign const]."
(verilog-sig-memory portdata)
nil
(verilog-sig-signed portdata)
- (verilog-sig-type portdata)
+ (unless (member (verilog-sig-type portdata) '("wire" "reg"))
+ (verilog-sig-type portdata))
multidim nil)
sigs-in)))
((setq portdata (assoc port (verilog-decls-get-interfaces submoddecls)))
@@ -8110,9 +8271,9 @@ Inserts the list of signals found."
(defun verilog-read-sub-decls ()
"Internally parse signals going to modules under this module.
-Return a array of [ outputs inouts inputs ] signals for modules that are
+Return an array of [ outputs inouts inputs ] signals for modules that are
instantiated in this module. For example if declare A A (.B(SIG)) and SIG
-is a output, then SIG will be included in the list.
+is an output, then SIG will be included in the list.
This only works on instantiations created with /*AUTOINST*/ converted by
\\[verilog-auto-inst]. Otherwise, it would have to read in the whole
@@ -8245,7 +8406,7 @@ For example if declare A A (.B(SIG)) then B will be included in the list."
(setq verilog-cache-has-lisp (re-search-forward "\\<AUTO_LISP(" nil t))))
(defun verilog-read-auto-lisp (start end)
- "Look for and evaluate a AUTO_LISP between START and END.
+ "Look for and evaluate an AUTO_LISP between START and END.
Must call `verilog-read-auto-lisp-present' before this function."
;; This function is expensive for large buffers, so we cache if any AUTO_LISP exists
(when verilog-cache-has-lisp
@@ -8255,13 +8416,14 @@ Must call `verilog-read-auto-lisp-present' before this function."
(backward-char)
(let* ((beg-pt (prog1 (point)
(verilog-forward-sexp-cmt 1))) ;; Closing paren
- (end-pt (point)))
+ (end-pt (point))
+ (verilog-in-hooks t))
(eval-region beg-pt end-pt nil))))))
(eval-when-compile
;; Prevent compile warnings; these are let's, not globals
;; Do not remove the eval-when-compile
- ;; - we want a error when we are debugging this code if they are refed.
+ ;; - we want an error when we are debugging this code if they are refed.
(defvar sigs-in)
(defvar sigs-out-d)
(defvar sigs-out-i)
@@ -8455,17 +8617,89 @@ IGNORE-NEXT is true to ignore next token, fake from inside case statement."
instants-list))
-(defun verilog-read-auto-template (module)
- "Look for a auto_template for the instantiation of the given MODULE.
-If found returns the signal name connections. Return REGEXP and
-list of ( (signal_name connection_name)... )."
+(defun verilog-read-auto-template-middle ()
+ "With point in middle of an AUTO_TEMPLATE, parse it.
+Returns REGEXP and list of ( (signal_name connection_name)... )."
(save-excursion
;; Find beginning
(let ((tpl-regexp "\\([0-9]+\\)")
(lineno -1) ; -1 to offset for the AUTO_TEMPLATE's newline
(templateno 0)
- (pt (point))
tpl-sig-list tpl-wild-list tpl-end-pt rep)
+ ;; Parse "REGEXP"
+ ;; We reserve @"..." for future lisp expressions that evaluate
+ ;; once-per-AUTOINST
+ (when (looking-at "\\s-*\"\\([^\"]*\\)\"")
+ (setq tpl-regexp (match-string 1))
+ (goto-char (match-end 0)))
+ (search-forward "(")
+ ;; Parse lines in the template
+ (when (or verilog-auto-inst-template-numbers
+ verilog-auto-template-warn-unused)
+ (save-excursion
+ (let ((pre-pt (point)))
+ (goto-char (point-min))
+ (while (search-forward "AUTO_TEMPLATE" pre-pt t)
+ (setq templateno (1+ templateno)))
+ (while (< (point) pre-pt)
+ (forward-line 1)
+ (setq lineno (1+ lineno))))))
+ (setq tpl-end-pt (save-excursion
+ (backward-char 1)
+ (verilog-forward-sexp-cmt 1) ;; Moves to paren that closes argdecl's
+ (backward-char 1)
+ (point)))
+ ;;
+ (while (< (point) tpl-end-pt)
+ (cond ((looking-at "\\s-*\\.\\([a-zA-Z0-9`_$]+\\)\\s-*(\\(.*\\))\\s-*\\(,\\|)\\s-*;\\)")
+ (setq tpl-sig-list
+ (cons (list
+ (match-string-no-properties 1)
+ (match-string-no-properties 2)
+ templateno lineno)
+ tpl-sig-list))
+ (goto-char (match-end 0)))
+ ;; Regexp form??
+ ((looking-at
+ ;; Regexp bug in XEmacs disallows ][ inside [], and wants + last
+ "\\s-*\\.\\(\\([a-zA-Z0-9`_$+@^.*?|---]+\\|[][]\\|\\\\[()|]\\)+\\)\\s-*(\\(.*\\))\\s-*\\(,\\|)\\s-*;\\)")
+ (setq rep (match-string-no-properties 3))
+ (goto-char (match-end 0))
+ (setq tpl-wild-list
+ (cons (list
+ (concat "^"
+ (verilog-string-replace-matches "@" "\\\\([0-9]+\\\\)" nil nil
+ (match-string 1))
+ "$")
+ rep
+ templateno lineno)
+ tpl-wild-list)))
+ ((looking-at "[ \t\f]+")
+ (goto-char (match-end 0)))
+ ((looking-at "\n")
+ (setq lineno (1+ lineno))
+ (goto-char (match-end 0)))
+ ((looking-at "//")
+ (search-forward "\n")
+ (setq lineno (1+ lineno)))
+ ((looking-at "/\\*")
+ (forward-char 2)
+ (or (search-forward "*/")
+ (error "%s: Unmatched /* */, at char %d" (verilog-point-text) (point))))
+ (t
+ (error "%s: AUTO_TEMPLATE parsing error: %s"
+ (verilog-point-text)
+ (progn (looking-at ".*$") (match-string 0))))))
+ ;; Return
+ (vector tpl-regexp
+ (list tpl-sig-list tpl-wild-list)))))
+
+(defun verilog-read-auto-template (module)
+ "Look for an auto_template for the instantiation of the given MODULE.
+If found returns `verilog-read-auto-template-inside' structure."
+ (save-excursion
+ ;; Find beginning
+ (let ((pt (point)))
;; Note this search is expensive, as we hunt from mod-begin to point
;; for every instantiation. Likewise in verilog-read-auto-lisp.
;; So, we look first for an exact string rather than a slow regexp.
@@ -8473,6 +8707,7 @@ list of ( (signal_name connection_name)... )."
;; need to record the relative position of each AUTOINST, as multiple
;; templates exist for each module, and we're inserting lines.
(cond ((or
+ ;; See also regexp in `verilog-auto-template-lint'
(verilog-re-search-backward-substr
"AUTO_TEMPLATE"
(concat "^\\s-*/?\\*?\\s-*" module "\\s-+AUTO_TEMPLATE") nil t)
@@ -8484,76 +8719,24 @@ list of ( (signal_name connection_name)... )."
"AUTO_TEMPLATE"
(concat "^\\s-*/?\\*?\\s-*" module "\\s-+AUTO_TEMPLATE") nil t)))
(goto-char (match-end 0))
- ;; Parse "REGEXP"
- ;; We reserve @"..." for future lisp expressions that evaluate
- ;; once-per-AUTOINST
- (when (looking-at "\\s-*\"\\([^\"]*\\)\"")
- (setq tpl-regexp (match-string 1))
- (goto-char (match-end 0)))
- (search-forward "(")
- ;; Parse lines in the template
- (when verilog-auto-inst-template-numbers
- (save-excursion
- (let ((pre-pt (point)))
- (goto-char (point-min))
- (while (search-forward "AUTO_TEMPLATE" pre-pt t)
- (setq templateno (1+ templateno)))
- (while (< (point) pre-pt)
- (forward-line 1)
- (setq lineno (1+ lineno))))))
- (setq tpl-end-pt (save-excursion
- (backward-char 1)
- (verilog-forward-sexp-cmt 1) ;; Moves to paren that closes argdecl's
- (backward-char 1)
- (point)))
- ;;
- (while (< (point) tpl-end-pt)
- (cond ((looking-at "\\s-*\\.\\([a-zA-Z0-9`_$]+\\)\\s-*(\\(.*\\))\\s-*\\(,\\|)\\s-*;\\)")
- (setq tpl-sig-list
- (cons (list
- (match-string-no-properties 1)
- (match-string-no-properties 2)
- templateno lineno)
- tpl-sig-list))
- (goto-char (match-end 0)))
- ;; Regexp form??
- ((looking-at
- ;; Regexp bug in XEmacs disallows ][ inside [], and wants + last
- "\\s-*\\.\\(\\([a-zA-Z0-9`_$+@^.*?|---]+\\|[][]\\|\\\\[()|]\\)+\\)\\s-*(\\(.*\\))\\s-*\\(,\\|)\\s-*;\\)")
- (setq rep (match-string-no-properties 3))
- (goto-char (match-end 0))
- (setq tpl-wild-list
- (cons (list
- (concat "^"
- (verilog-string-replace-matches "@" "\\\\([0-9]+\\\\)" nil nil
- (match-string 1))
- "$")
- rep
- templateno lineno)
- tpl-wild-list)))
- ((looking-at "[ \t\f]+")
- (goto-char (match-end 0)))
- ((looking-at "\n")
- (setq lineno (1+ lineno))
- (goto-char (match-end 0)))
- ((looking-at "//")
- (search-forward "\n")
- (setq lineno (1+ lineno)))
- ((looking-at "/\\*")
- (forward-char 2)
- (or (search-forward "*/")
- (error "%s: Unmatched /* */, at char %d" (verilog-point-text) (point))))
- (t
- (error "%s: AUTO_TEMPLATE parsing error: %s"
- (verilog-point-text)
- (progn (looking-at ".*$") (match-string 0))))))
- ;; Return
- (vector tpl-regexp
- (list tpl-sig-list tpl-wild-list)))
+ (verilog-read-auto-template-middle))
;; If no template found
- (t (vector tpl-regexp nil))))))
+ (t (vector "" nil))))))
;;(progn (find-file "auto-template.v") (verilog-read-auto-template "ptl_entry"))
+(defvar verilog-auto-template-hits nil "Successful lookups with `verilog-read-auto-template-hit'.")
+(make-variable-buffer-local 'verilog-auto-template-hits)
+
+(defun verilog-read-auto-template-hit (tpl-ass)
+ "Record that TPL-ASS template from `verilog-read-auto-template' was used."
+ (when (eval-when-compile (fboundp 'make-hash-table)) ;; else feature not allowed
+ (when verilog-auto-template-warn-unused
+ (unless verilog-auto-template-hits
+ (setq verilog-auto-template-hits
+ (make-hash-table :test 'equal :rehash-size 4.0)))
+ (puthash (vector (nth 2 tpl-ass) (nth 3 tpl-ass)) t
+ verilog-auto-template-hits))))
+
(defun verilog-set-define (defname defvalue &optional buffer enumname)
"Set the definition DEFNAME to the DEFVALUE in the given BUFFER.
Optionally associate it with the specified enumeration ENUMNAME."
@@ -8642,15 +8825,15 @@ warning message, you need to add to your .emacs file:
(let (enumname)
;; The primary way of getting defines is verilog-read-decls
;; However, that isn't called yet for included files, so we'll add another scheme
- (if (looking-at "[^\n]*synopsys\\s +enum\\s +\\([a-zA-Z0-9_]+\\)")
- (setq enumname (match-string-no-properties 1)))
- (forward-comment 999)
+ (if (looking-at "[^\n]*\\(auto\\|synopsys\\)\\s +enum\\s +\\([a-zA-Z0-9_]+\\)")
+ (setq enumname (match-string-no-properties 2)))
+ (forward-comment 99999)
(while (looking-at (concat "\\s-*,?\\s-*\\(?:/[/*].*?$\\)?\\s-*\\([a-zA-Z0-9_$]+\\)"
"\\s-*=\\s-*\\([^;,]*\\),?\\s-*\\(/[/*].*?$\\)?\\s-*"))
(verilog-set-define (match-string-no-properties 1)
(match-string-no-properties 2) origbuf enumname)
(goto-char (match-end 0))
- (forward-comment 999)))))))
+ (forward-comment 99999)))))))
(defun verilog-read-includes ()
"Read `includes for the current file.
@@ -8675,7 +8858,7 @@ this process, Verilint, and readability. To prevent defining the same
variable over and over when many modules are compiled together, put a test
around the inside each include file:
-foo.v (a include):
+foo.v (an include file):
`ifdef _FOO_V // include if not already included
`else
`define _FOO_V
@@ -9038,7 +9221,7 @@ Or, just the existing dirnames themselves if there are no wildcards."
(defun verilog-library-filenames (filename &optional current check-ext)
"Return a search path to find the given FILENAME or module name.
-Uses the optional CURRENT filename or buffer-file-name, plus
+Uses the optional CURRENT filename or variable `buffer-file-name', plus
`verilog-library-directories' and `verilog-library-extensions'
variables to build the path. With optional CHECK-EXT also check
`verilog-library-extensions'."
@@ -9091,7 +9274,7 @@ variables to build the path."
;; A modi is: [module-name-string file-name begin-point]
(defvar verilog-cache-enabled t
- "If true, enable caching of signals, etc. Set to nil for debugging to make things SLOW!")
+ "Non-nil enables caching of signals, etc. Set to nil for debugging to make things SLOW!")
(defvar verilog-modi-cache-list nil
"Cache of ((Module Function) Buf-Tick Buf-Modtime Func-Returns)...
@@ -9106,7 +9289,7 @@ Use `verilog-preserve-modi-cache' to set it.")
"Modification tick after which the cache is still considered valid.
Use `verilog-preserve-modi-cache' to set it.")
(defvar verilog-modi-cache-current-enable nil
- "If true, allow caching `verilog-modi-current', set by let().")
+ "Non-nil means allow caching `verilog-modi-current', set by let().")
(defvar verilog-modi-cache-current nil
"Currently active `verilog-modi-current', if any, set by let().")
(defvar verilog-modi-cache-current-max nil
@@ -9245,13 +9428,9 @@ Cache the output of function so next call may have faster access."
(t
;; Read from file
;; Clear then restore any highlighting to make emacs19 happy
- (let ((fontlocked (when (and (boundp 'font-lock-mode)
- font-lock-mode)
- (font-lock-mode 0)
- t))
- func-returns)
- (setq func-returns (funcall function))
- (when fontlocked (font-lock-mode t))
+ (let (func-returns)
+ (verilog-save-font-mods
+ (setq func-returns (funcall function)))
;; Cache for next time
(setq verilog-modi-cache-list
(cons (list (list modi function)
@@ -9341,9 +9520,16 @@ if non-nil."
(setq in-list (cdr in-list)))
(nreverse out-list))))
+(defun verilog-signals-edit-wire-reg (in-list)
+ "Return all signals in IN-LIST with wire/reg data types made blank."
+ (mapcar (lambda (sig)
+ (when (member (verilog-sig-type sig) '("wire" "reg"))
+ (verilog-sig-type-set sig nil))
+ sig) in-list))
+
;; Combined
(defun verilog-decls-get-signals (decls)
- "Return all declared signals, excluding 'assign' statements."
+ "Return all declared signals in DECLS, excluding 'assign' statements."
(append
(verilog-decls-get-outputs decls)
(verilog-decls-get-inouts decls)
@@ -9367,10 +9553,6 @@ if non-nil."
(defsubst verilog-modi-cache-add-vars (modi sig-list)
(verilog-modi-cache-add modi 'verilog-read-decls 3 sig-list))
-(defun verilog-signals-from-signame (signame-list)
- "Return signals in standard form from SIGNAME-LIST, a simple list of signal names."
- (mapcar (function (lambda (name) (list name nil nil)))
- signame-list))
;;
;; Auto creation utilities
@@ -9473,7 +9655,7 @@ Presumes that any newlines end a list element."
;;(let ((indent-pt 10)) (verilog-insert-indent "hello\n" "addon" "there\n"))
(defun verilog-repair-open-comma ()
- "Insert comma if previous argument is other than a open parenthesis or endif."
+ "Insert comma if previous argument is other than an open parenthesis or endif."
;; We can't just search backward for ) as it might be inside another expression.
;; Also want "`ifdef X input foo `endif" to just leave things to the human to deal with
(save-excursion
@@ -9489,7 +9671,7 @@ Presumes that any newlines end a list element."
(defun verilog-repair-close-comma ()
"If point is at a comma followed by a close parenthesis, fix it.
-This repairs those mis-inserted by a AUTOARG."
+This repairs those mis-inserted by an AUTOARG."
;; It would be much nicer if Verilog allowed extra commas like Perl does!
(save-excursion
(verilog-forward-close-paren)
@@ -9974,15 +10156,16 @@ Ignores WHITESPACE if t, and writes output to stdout if SHOW."
Differences are between buffers B1 and B2, starting at point
DIFFPT. This function is called via `verilog-diff-function'."
(let ((name1 (with-current-buffer b1 (buffer-file-name))))
- (message "%%Warning: %s:%d: Difference in AUTO expansion found"
- name1 (with-current-buffer b1 (1+ (count-lines (point-min) (point)))))
+ (verilog-warn "%s:%d: Difference in AUTO expansion found"
+ name1 (with-current-buffer b1
+ (1+ (count-lines (point-min) (point)))))
(cond (noninteractive
(verilog-diff-file-with-buffer name1 b2 t t))
(t
(ediff-buffers b1 b2)))))
(defun verilog-diff-auto ()
- "Expand AUTOs in a temporary buffer and indicate any changes.
+ "Expand AUTOs in a temporary buffer and indicate any change.
Whitespace differences are ignored to determine identicalness, but
once a difference is detected, whitespace differences may be shown.
@@ -10076,7 +10259,7 @@ If FORCE, always reread it."
;;
(defun verilog-auto-arg-ports (sigs message indent-pt)
- "Print a list of ports for a AUTOINST.
+ "Print a list of ports for an AUTOINST.
Takes SIGS list, adds MESSAGE to front and inserts each at INDENT-PT."
(when sigs
(when verilog-auto-arg-sort
@@ -10178,7 +10361,7 @@ Avoid declaring ports manually, as it makes code harder to maintain."
(defvar vl-mbits nil "See `verilog-auto-inst'.") ; Prevent compile warning
(defun verilog-auto-inst-port (port-st indent-pt tpl-list tpl-num for-star par-values)
- "Print out a instantiation connection for this PORT-ST.
+ "Print out an instantiation connection for this PORT-ST.
Insert to INDENT-PT, use template TPL-LIST.
@ are instantiation numbers, replaced with TPL-NUM.
@\"(expression @)\" are evaluated, with @ as a variable.
@@ -10266,6 +10449,7 @@ If PAR-VALUES replace final strings with these parameter values."
(insert "(" tpl-net ")"))
(insert ",")
(cond (tpl-ass
+ (verilog-read-auto-template-hit tpl-ass)
(indent-to (+ (if (< verilog-auto-inst-column 48) 24 16)
verilog-auto-inst-column))
;; verilog-insert requires the complete comment in one call - including the newline
@@ -10302,7 +10486,7 @@ If PAR-VALUES replace final strings with these parameter values."
(defun verilog-auto-inst-first ()
"Insert , etc before first ever port in this instant, as part of \\[verilog-auto-inst]."
;; Do we need a trailing comma?
- ;; There maybe a ifdef or something similar before us. What a mess. Thus
+ ;; There maybe an ifdef or something similar before us. What a mess. Thus
;; to avoid trouble we only insert on preceding ) or *.
;; Insert first port on new line
(insert "\n") ;; Must insert before search, so point will move forward if insert comma
@@ -10375,7 +10559,7 @@ For example, first take the submodule InstModule.v:
wire [31:0] o = {32{i}};
endmodule
-This is then used in a upper level module:
+This is then used in an upper level module:
module ExampInst (o,i);
output o;
@@ -10438,6 +10622,8 @@ Templates:
expanded `verilog-mode' simply searches up for the closest template.
Thus you can have multiple templates for the same module, just alternate
between the template for an instantiation and the instantiation itself.
+ (For backward compatibility if no template is found above, it
+ will also look below, but do not use this behavior in new designs.)
The module name must be the same as the name of the module in the
instantiation name, and the code \"AUTO_TEMPLATE\" must be in these exact
@@ -10456,6 +10642,9 @@ Templates:
debugging is completed though, it will result in lots of extra differences
and merge conflicts.
+ Setting `verilog-auto-template-warn-unused' will report errors
+ if any template lines are unused.
+
For example:
/* InstModule AUTO_TEMPLATE (
@@ -10656,7 +10845,7 @@ For more information see the \\[verilog-faq] and forums at URL
(when (and (not (member submod verilog-gate-keywords))
(setq submodi (verilog-modi-lookup submod t)))
(setq submoddecls (verilog-modi-get-decls submodi))
- ;; If there's a number in the instantiation, it may be a argument to the
+ ;; If there's a number in the instantiation, it may be an argument to the
;; automatic variable instantiation program.
(let* ((tpl-info (verilog-read-auto-template submod))
(tpl-regexp (aref tpl-info 0)))
@@ -10670,7 +10859,8 @@ For more information see the \\[verilog-faq] and forums at URL
(verilog-decls-get-vars submoddecls)
skip-pins)))
(vl-dir "interfaced"))
- (when sig-list
+ (when (and sig-list
+ verilog-auto-inst-interfaced-ports)
(when (not did-first) (verilog-auto-inst-first) (setq did-first t))
;; Note these are searched for in verilog-read-sub-decls.
(verilog-insert-indent "// Interfaced\n")
@@ -10740,7 +10930,7 @@ For example, first take the submodule InstModule.v:
parameter PAR;
endmodule
-This is then used in a upper level module:
+This is then used in an upper level module:
module ExampInst (o,i);
parameter PAR;
@@ -10798,7 +10988,7 @@ Templates:
;; Note this may raise an error
(when (setq submodi (verilog-modi-lookup submod t))
(setq submoddecls (verilog-modi-get-decls submodi))
- ;; If there's a number in the instantiation, it may be a argument to the
+ ;; If there's a number in the instantiation, it may be an argument to the
;; automatic variable instantiation program.
(let* ((tpl-info (verilog-read-auto-template submod))
(tpl-regexp (aref tpl-info 0)))
@@ -10867,7 +11057,10 @@ Typing \\[verilog-auto] will make this into:
(modsubdecls (verilog-modi-get-sub-decls modi))
(sig-list (verilog-signals-not-in
(verilog-decls-get-outputs moddecls)
- (append (verilog-decls-get-vars moddecls)
+ (append (verilog-signals-with ;; ignore typed signals
+ 'verilog-sig-type
+ (verilog-decls-get-outputs moddecls))
+ (verilog-decls-get-vars moddecls)
(verilog-decls-get-assigns moddecls)
(verilog-decls-get-consts moddecls)
(verilog-decls-get-gparams moddecls)
@@ -10935,6 +11128,12 @@ Typing \\[verilog-auto] will make this into:
(verilog-insert-definition modi sig-list "reg" indent-pt nil)
(verilog-insert-indent "// End of automatics\n")))))
+(defun verilog-auto-logic-setup ()
+ "Prepare variables due to AUTOLOGIC."
+ (unless verilog-auto-wire-type
+ (set (make-local-variable 'verilog-auto-wire-type)
+ "logic")))
+
(defun verilog-auto-logic ()
"Expand AUTOLOGIC statements, as part of \\[verilog-auto].
Make wire statements using the SystemVerilog logic keyword.
@@ -10951,15 +11150,13 @@ with the below at the bottom of the file
In the future AUTOLOGIC may declare additional identifiers,
while AUTOWIRE will not."
(save-excursion
- (unless verilog-auto-wire-type
- (set (make-local-variable 'verilog-auto-wire-type)
- "logic"))
+ (verilog-auto-logic-setup)
(verilog-auto-wire)))
(defun verilog-auto-wire ()
"Expand AUTOWIRE statements, as part of \\[verilog-auto].
Make wire statements for instantiations outputs that aren't
-already declared. `verilog-auto-wire-type' may be used to change
+already declared. `verilog-auto-wire-type' may be used to change
the datatype of the declarations.
Limitations:
@@ -11027,7 +11224,7 @@ Typing \\[verilog-auto] will make this into:
(defun verilog-auto-output (&optional with-params)
"Expand AUTOOUTPUT statements, as part of \\[verilog-auto].
Make output statements for any output signal from an /*AUTOINST*/ that
-isn't a input to another AUTOINST. This is useful for modules which
+isn't an input to another AUTOINST. This is useful for modules which
only instantiate other modules.
Limitations:
@@ -11037,7 +11234,7 @@ Limitations:
Verilog 2001 style, else uses Verilog 1995 style.
If any concatenation, or bit-subscripts are missing in the AUTOINSTant's
- instantiation, all bets are off. (For example due to a AUTO_TEMPLATE).
+ instantiation, all bets are off. (For example due to an AUTO_TEMPLATE).
Typedefs must match `verilog-typedef-regexp', which is disabled by default.
@@ -11104,7 +11301,7 @@ same expansion will result from only extracting outputs starting with ov:
(defun verilog-auto-output-every ()
"Expand AUTOOUTPUTEVERY statements, as part of \\[verilog-auto].
Make output statements for any signals that aren't primary inputs or
-outputs already. This makes every signal in the design a output. This is
+outputs already. This makes every signal in the design an output. This is
useful to get Synopsys to preserve every signal in the design, since it
won't optimize away the outputs.
@@ -11164,7 +11361,7 @@ Limitations:
Verilog 2001 style, else uses Verilog 1995 style.
If any concatenation, or bit-subscripts are missing in the AUTOINSTant's
- instantiation, all bets are off. (For example due to a AUTO_TEMPLATE).
+ instantiation, all bets are off. (For example due to an AUTO_TEMPLATE).
Typedefs must match `verilog-typedef-regexp', which is disabled by default.
@@ -11243,7 +11440,7 @@ Limitations:
Verilog 2001 style, else uses Verilog 1995 style.
If any concatenation, or bit-subscripts are missing in the AUTOINSTant's
- instantiation, all bets are off. (For example due to a AUTO_TEMPLATE).
+ instantiation, all bets are off. (For example due to an AUTO_TEMPLATE).
Typedefs must match `verilog-typedef-regexp', which is disabled by default.
@@ -11326,9 +11523,14 @@ Limitations:
Module names must be resolvable to filenames. See `verilog-auto-inst'.
Signals are not inserted in the same order as in the original module,
- though they will appear to be in the same order to a AUTOINST
+ though they will appear to be in the same order to an AUTOINST
instantiating either module.
+ Signals declared as \"output reg\" or \"output wire\" etc will
+ lose the wire/reg declaration so that shell modules may
+ generate those outputs differently. However, \"output logic\"
+ is propagated.
+
An example:
module ExampShell (/*AUTOARG*/);
@@ -11408,22 +11610,25 @@ against the previous example's module:
(verilog-decls-get-interfaces submoddecls)
(append (verilog-decls-get-interfaces moddecls)))))
(forward-line 1)
- (setq sig-list-i (verilog-signals-matching-dir-re
- (verilog-signals-matching-regexp sig-list-i regexp)
- "input" direction-re)
- sig-list-o (verilog-signals-matching-dir-re
- (verilog-signals-matching-regexp sig-list-o regexp)
- "output" direction-re)
- sig-list-io (verilog-signals-matching-dir-re
- (verilog-signals-matching-regexp sig-list-io regexp)
- "inout" direction-re)
+ (setq sig-list-i (verilog-signals-edit-wire-reg
+ (verilog-signals-matching-dir-re
+ (verilog-signals-matching-regexp sig-list-i regexp)
+ "input" direction-re))
+ sig-list-o (verilog-signals-edit-wire-reg
+ (verilog-signals-matching-dir-re
+ (verilog-signals-matching-regexp sig-list-o regexp)
+ "output" direction-re))
+ sig-list-io (verilog-signals-edit-wire-reg
+ (verilog-signals-matching-dir-re
+ (verilog-signals-matching-regexp sig-list-io regexp)
+ "inout" direction-re))
sig-list-if (verilog-signals-matching-dir-re
(verilog-signals-matching-regexp sig-list-if regexp)
"interface" direction-re))
(when v2k (verilog-repair-open-comma))
(when (or sig-list-i sig-list-o sig-list-io)
(verilog-insert-indent "// Beginning of automatic in/out/inouts (from specific module)\n")
- ;; Don't sort them so a upper AUTOINST will match the main module
+ ;; Don't sort them so an upper AUTOINST will match the main module
(verilog-insert-definition modi sig-list-o "output" indent-pt v2k t)
(verilog-insert-definition modi sig-list-io "inout" indent-pt v2k t)
(verilog-insert-definition modi sig-list-i "input" indent-pt v2k t)
@@ -11450,7 +11655,7 @@ Limitations:
Module names must be resolvable to filenames. See `verilog-auto-inst'.
Signals are not inserted in the same order as in the original module,
- though they will appear to be in the same order to a AUTOINST
+ though they will appear to be in the same order to an AUTOINST
instantiating either module.
An example:
@@ -11501,7 +11706,7 @@ Limitations:
Module names must be resolvable to filenames. See `verilog-auto-inst'.
Signals are not inserted in the same order as in the original module,
- though they will appear to be in the same order to a AUTOINST
+ though they will appear to be in the same order to an AUTOINST
instantiating either module.
An example:
@@ -11624,7 +11829,7 @@ Limitations:
Constant signals:
AUTOSENSE cannot always determine if a `define is a constant or a signal
- (it could be in a include file for example). If a `define or other signal
+ (it could be in an include file for example). If a `define or other signal
is put into the AUTOSENSE list and is not desired, use the AUTO_CONSTANT
declaration anywhere in the module (parenthesis are required):
@@ -11726,9 +11931,9 @@ begin/case/if statement and the AUTORESET comment are being reset manually
and should not be automatically reset. This includes omitting any signals
used on the right hand side of assignments.
-By default, AUTORESET will include the width of the signal in the autos,
-this is a recent change. To control this behavior, see
-`verilog-auto-reset-widths'.
+By default, AUTORESET will include the width of the signal in the
+autos, SystemVerilog designs may want to change this. To control
+this behavior, see `verilog-auto-reset-widths'.
AUTORESET ties signals to deasserted, which is presumed to be zero.
Signals that match `verilog-active-low-regexp' will be deasserted by tying
@@ -11806,7 +12011,7 @@ Typing \\[verilog-auto] will make this into:
(if (assoc (verilog-sig-name sig) dly-list)
(concat " <= " verilog-assignment-delay)
" = ")
- (verilog-sig-tieoff sig (not verilog-auto-reset-widths))
+ (verilog-sig-tieoff sig)
";\n")
(setq sig-list (cdr sig-list))))
(verilog-insert-indent "// End of automatics")))))
@@ -11831,6 +12036,9 @@ You can add signals you do not want included in AUTOTIEOFF with
`verilog-auto-wire-type' may be used to change the datatype of
the declarations.
+`verilog-auto-reset-widths' may be used to change how the tieoff
+value's width is generated.
+
An example of making a stub for another module:
module ExampStub (/*AUTOINST*/);
@@ -11893,6 +12101,73 @@ Typing \\[verilog-auto] will make this into:
(setq sig-list (cdr sig-list))))
(verilog-insert-indent "// End of automatics\n")))))
+(defun verilog-auto-undef ()
+ "Expand AUTOUNDEF statements, as part of \\[verilog-auto].
+Take any `defines since the last AUTOUNDEF in the current file
+and create `undefs for them. This is used to insure that
+file-local defines do not polute the global `define name space.
+
+Limitations:
+ AUTOUNDEF presumes any identifier following `define is the
+ name of a define. Any `ifdefs are ignored.
+
+ AUTOUNDEF suppresses creating an `undef for any define that was
+ `undefed before the AUTOUNDEF. This may be used to work around
+ the ignoring of `ifdefs as shown below.
+
+An example:
+
+ `define XX_FOO
+ `define M_BAR(x)
+ `define M_BAZ
+ ...
+ `ifdef NEVER
+ `undef M_BAZ // Emacs will see this and not `undef M_BAZ
+ `endif
+ ...
+ /*AUTOUNDEF*/
+
+Typing \\[verilog-auto] will make this into:
+
+ ...
+ /*AUTOUNDEF*/
+ // Beginning of automatic undefs
+ `undef XX_FOO
+ `undef M_BAR
+ // End of automatics
+
+You may also provide an optional regular expression, in which case only
+defines the regular expression will be undefed."
+ (save-excursion
+ (let* ((params (verilog-read-auto-params 0 1))
+ (regexp (nth 0 params))
+ (indent-pt (current-indentation))
+ (end-pt (point))
+ defs def)
+ (save-excursion
+ ;; Scan from beginnng of file, or last AUTOUNDEF
+ (or (verilog-re-search-backward-quick "/\\*AUTOUNDEF\\>" end-pt t)
+ (goto-char (point-min)))
+ (while (verilog-re-search-forward-quick
+ "`\\(define\\|undef\\)\\s-*\\([a-zA-Z_][a-zA-Z_0-9]*\\)" end-pt t)
+ (cond ((equal (match-string-no-properties 1) "define")
+ (setq def (match-string-no-properties 2))
+ (when (and (or (not regexp)
+ (string-match regexp def))
+ (not (member def defs))) ;; delete-dups not in 21.1
+ (setq defs (cons def defs))))
+ (t
+ (setq defs (delete (match-string-no-properties 2) defs))))))
+ ;; Insert
+ (setq defs (sort defs 'string<))
+ (when defs
+ (forward-line 1)
+ (verilog-insert-indent "// Beginning of automatic undefs\n")
+ (while defs
+ (verilog-insert-indent "`undef " (car defs) "\n")
+ (setq defs (cdr defs)))
+ (verilog-insert-indent "// End of automatics\n")))))
+
(defun verilog-auto-unused ()
"Expand AUTOUNUSED statements, as part of \\[verilog-auto].
Replace the /*AUTOUNUSED*/ comment with a comma separated list of all unused
@@ -11981,17 +12256,17 @@ Remove user provided prefix ELIM-REGEXP."
(defun verilog-auto-ascii-enum ()
"Expand AUTOASCIIENUM statements, as part of \\[verilog-auto].
-Create a register to contain the ASCII decode of a enumerated signal type.
+Create a register to contain the ASCII decode of an enumerated signal type.
This will allow trace viewers to show the ASCII name of states.
-First, parameters are built into a enumeration using the synopsys enum
+First, parameters are built into an enumeration using the synopsys enum
comment. The comment must be between the keyword and the symbol.
\(Annoying, but that's what Synopsys's dc_shell FSM reader requires.)
Next, registers which that enum applies to are also tagged with the same
enum.
-Finally, a AUTOASCIIENUM command is used.
+Finally, an AUTOASCIIENUM command is used.
The first parameter is the name of the signal to be decoded.
@@ -12001,17 +12276,19 @@ Finally, a AUTOASCIIENUM command is used.
tell viewers like Dinotrace to display in ASCII format.
The third optional parameter is a string which will be removed
- from the state names. It defaults to "" which removes nothing.
+ from the state names. It defaults to \"\" which removes nothing.
The fourth optional parameter is \"onehot\" to force one-hot
- decoding. If unspecified, if and only if the first parameter
+ decoding. If unspecified, if and only if the first parameter
width is 2^(number of states in enum) and does NOT match the
- width of the enum, the signal is assumed to be a one hot
+ width of the enum, the signal is assumed to be a one-hot
decode. Otherwise, it's a normal encoded state vector.
`verilog-auto-wire-type' may be used to change the datatype of
the declarations.
+ \"auto enum\" may be used in place of \"synopsys enum\".
+
An example:
//== State enumeration
@@ -12066,7 +12343,7 @@ Typing \\[verilog-auto] will make this into:
(undecode-sig (or (assoc undecode-name sig-list-all)
(error "%s: Signal %s not found in design" (verilog-point-text) undecode-name)))
(undecode-enum (or (verilog-sig-enum undecode-sig)
- (error "%s: Signal %s does not have a enum tag" (verilog-point-text) undecode-name)))
+ (error "%s: Signal %s does not have an enum tag" (verilog-point-text) undecode-name)))
;;
(enum-sigs (verilog-signals-not-in
(or (verilog-signals-matching-enum sig-list-consts undecode-enum)
@@ -12159,12 +12436,39 @@ being different from the final output's line numbering."
(string-to-number (match-string 2)))))
t t))))
+(defun verilog-auto-template-lint ()
+ "Check AUTO_TEMPLATEs for unused lines.
+Enable with `verilog-auto-template-warn-unused'."
+ (let ((name1 (or (buffer-file-name) (buffer-name))))
+ (save-excursion
+ (goto-char (point-min))
+ (while (re-search-forward
+ "^\\s-*/?\\*?\\s-*[a-zA-Z0-9`_$]+\\s-+AUTO_TEMPLATE" nil t)
+ (let* ((tpl-info (verilog-read-auto-template-middle))
+ (tpl-list (aref tpl-info 1))
+ (tlines (append (nth 0 tpl-list) (nth 1 tpl-list)))
+ tpl-ass)
+ (while tlines
+ (setq tpl-ass (car tlines)
+ tlines (cdr tlines))
+ ;;;
+ (unless (or (not (eval-when-compile (fboundp 'make-hash-table))) ;; Not supported, no warning
+ (not verilog-auto-template-hits)
+ (gethash (vector (nth 2 tpl-ass) (nth 3 tpl-ass))
+ verilog-auto-template-hits))
+ (verilog-warn-error "%s:%d: AUTO_TEMPLATE line unused: \".%s (%s)\""
+ name1
+ (+ (elt tpl-ass 3) ;; Template line number
+ (count-lines (point-min) (point)))
+ (elt tpl-ass 0) (elt tpl-ass 1))
+ )))))))
+
;;
;; Auto top level
;;
-(defun verilog-auto (&optional inject) ; Use verilog-inject-auto instead of passing a arg
+(defun verilog-auto (&optional inject) ; Use verilog-inject-auto instead of passing an arg
"Expand AUTO statements.
Look for any /*AUTO...*/ commands in the code, as used in
instantiations or argument headers. Update the list of signals
@@ -12219,6 +12523,7 @@ Using \\[describe-function], see also:
`verilog-auto-reset' for AUTORESET flop resets
`verilog-auto-sense' for AUTOSENSE always sensitivity lists
`verilog-auto-tieoff' for AUTOTIEOFF output tieoffs
+ `verilog-auto-undef' for AUTOUNDEF `undef of local `defines
`verilog-auto-unused' for AUTOUNUSED unused inputs/inouts
`verilog-auto-wire' for AUTOWIRE instantiation wires
@@ -12232,21 +12537,15 @@ Wilson Snyder (wsnyder@wsnyder.org)."
(unless noninteractive (message "Updating AUTOs..."))
(if (fboundp 'dinotrace-unannotate-all)
(dinotrace-unannotate-all))
- (let ((oldbuf (if (not (buffer-modified-p))
- (buffer-string)))
- ;; Before version 20, match-string with font-lock returns a
- ;; vector that is not equal to the string. IE if on "input"
- ;; nil==(equal "input" (progn (looking-at "input") (match-string 0)))
- (fontlocked (when (and (boundp 'font-lock-mode)
- font-lock-mode)
- (font-lock-mode 0)
- t))
- ;; Cache directories; we don't write new files, so can't change
- (verilog-dir-cache-preserving t)
- ;; Cache current module
- (verilog-modi-cache-current-enable t)
- (verilog-modi-cache-current-max (point-min)) ; IE it's invalid
- verilog-modi-cache-current)
+ (verilog-save-font-mods
+ (let ((oldbuf (if (not (buffer-modified-p))
+ (buffer-string)))
+ ;; Cache directories; we don't write new files, so can't change
+ (verilog-dir-cache-preserving t)
+ ;; Cache current module
+ (verilog-modi-cache-current-enable t)
+ (verilog-modi-cache-current-max (point-min)) ; IE it's invalid
+ verilog-modi-cache-current)
(unwind-protect
;; Disable change hooks for speed
;; This let can't be part of above let; must restore
@@ -12257,6 +12556,8 @@ Wilson Snyder (wsnyder@wsnyder.org)."
;; Wipe cache; otherwise if we AUTOed a block above this one,
;; we'll misremember we have generated IOs, confusing AUTOOUTPUT
(setq verilog-modi-cache-list nil)
+ ;; Local state
+ (setq verilog-auto-template-hits nil)
;; If we're not in verilog-mode, change syntax table so parsing works right
(unless (eq major-mode `verilog-mode) (verilog-mode))
;; Allow user to customize
@@ -12272,6 +12573,8 @@ Wilson Snyder (wsnyder@wsnyder.org)."
(when verilog-auto-read-includes
(verilog-read-includes)
(verilog-read-defines nil nil t))
+ ;; Setup variables due to SystemVerilog expansion
+ (verilog-auto-re-search-do "/\\*AUTOLOGIC\\*/" 'verilog-auto-logic-setup)
;; This particular ordering is important
;; INST: Lower modules correct, no internal dependencies, FIRST
(verilog-preserve-modi-cache
@@ -12284,7 +12587,7 @@ Wilson Snyder (wsnyder@wsnyder.org)."
(verilog-inject-arg))
;;
;; Do user inserts first, so their code can insert AUTOs
- ;; We may provide a AUTOINSERTLISPLAST if another cleanup pass is needed
+ ;; We may provide an AUTOINSERTLISPLAST if another cleanup pass is needed
(verilog-auto-re-search-do "/\\*AUTOINSERTLISP(.*?)\\*/"
'verilog-auto-insert-lisp)
;; Expand instances before need the signals the instances input/output
@@ -12313,6 +12616,8 @@ Wilson Snyder (wsnyder@wsnyder.org)."
(verilog-auto-re-search-do "/\\*AUTOINOUT\\*/" 'verilog-auto-inout)
;; Then tie off those in/outs
(verilog-auto-re-search-do "/\\*AUTOTIEOFF\\*/" 'verilog-auto-tieoff)
+ ;; These can be anywhere after AUTOINSERTLISP
+ (verilog-auto-re-search-do "/\\*AUTOUNDEF\\((\"[^\"]*\")\\)?\\*/" 'verilog-auto-undef)
;; Wires/regs must be after inputs/outputs
(verilog-auto-re-search-do "/\\*AUTOLOGIC\\*/" 'verilog-auto-logic)
(verilog-auto-re-search-do "/\\*AUTOWIRE\\*/" 'verilog-auto-wire)
@@ -12326,7 +12631,9 @@ Wilson Snyder (wsnyder@wsnyder.org)."
(verilog-auto-re-search-do "/\\*AUTOARG\\*/" 'verilog-auto-arg)
;; Fix line numbers (comments only)
(when verilog-auto-inst-template-numbers
- (verilog-auto-templated-rel))))
+ (verilog-auto-templated-rel))
+ (when verilog-auto-template-warn-unused
+ (verilog-auto-template-lint))))
;;
(verilog-run-hooks 'verilog-auto-hook)
;;
@@ -12343,9 +12650,8 @@ Wilson Snyder (wsnyder@wsnyder.org)."
;; End of after-change protection
)))
;; Unwind forms
- (progn
- ;; Restore font-lock
- (when fontlocked (font-lock-mode t))))))
+ ;; Currently handled in verilog-save-font-mods
+ ))))
;;
@@ -12650,7 +12956,7 @@ and the case items."
(define-skeleton verilog-sk-def-reg
"Insert a reg definition."
()
- > "reg [" '(verilog-sk-prompt-width) | -1 verilog-sk-signal ";" \n (verilog-pretty-declarations) )
+ > "reg [" '(verilog-sk-prompt-width) | -1 verilog-sk-signal ";" \n (verilog-pretty-declarations-auto) )
(defun verilog-sk-define-signal ()
"Insert a definition of signal under point at top of module."
@@ -12914,9 +13220,12 @@ Files are checked based on `verilog-library-flags'."
(concat "verilog-mode v" verilog-mode-version)
'(
verilog-active-low-regexp
+ verilog-after-save-font-hook
verilog-align-ifelse
verilog-assignment-delay
verilog-auto-arg-sort
+ verilog-auto-declare-nettype
+ verilog-auto-delete-trailing-whitespace
verilog-auto-endcomments
verilog-auto-hook
verilog-auto-ignore-concat
@@ -12925,23 +13234,32 @@ Files are checked based on `verilog-library-flags'."
verilog-auto-input-ignore-regexp
verilog-auto-inst-column
verilog-auto-inst-dot-name
+ verilog-auto-inst-interfaced-ports
verilog-auto-inst-param-value
+ verilog-auto-inst-sort
verilog-auto-inst-template-numbers
verilog-auto-inst-vector
verilog-auto-lineup
verilog-auto-newline
verilog-auto-output-ignore-regexp
verilog-auto-read-includes
+ verilog-auto-reset-blocking-in-non
verilog-auto-reset-widths
verilog-auto-save-policy
verilog-auto-sense-defines-constant
verilog-auto-sense-include-inputs
verilog-auto-star-expand
verilog-auto-star-save
+ verilog-auto-template-warn-unused
+ verilog-auto-tieoff-declaration
+ verilog-auto-tieoff-ignore-regexp
verilog-auto-unused-ignore-regexp
+ verilog-auto-wire-type
verilog-before-auto-hook
verilog-before-delete-auto-hook
verilog-before-getopt-flags-hook
+ verilog-before-save-font-hook
+ verilog-cache-enabled
verilog-case-indent
verilog-cexp-indent
verilog-compiler
@@ -12949,6 +13267,8 @@ Files are checked based on `verilog-library-flags'."
verilog-delete-auto-hook
verilog-getopt-flags-hook
verilog-highlight-grouping-keywords
+ verilog-highlight-includes
+ verilog-highlight-modules
verilog-highlight-p1800-keywords
verilog-highlight-translate-off
verilog-indent-begin-after-if
@@ -12966,11 +13286,15 @@ Files are checked based on `verilog-library-flags'."
verilog-linter
verilog-minimum-comment-distance
verilog-mode-hook
+ verilog-mode-release-date
+ verilog-mode-release-emacs
+ verilog-mode-version
verilog-preprocessor
verilog-simulator
verilog-tab-always-indent
verilog-tab-to-comment
verilog-typedef-regexp
+ verilog-warn-fatal
)
nil nil
(concat "Hi Mac,
diff --git a/lisp/progmodes/which-func.el b/lisp/progmodes/which-func.el
index c8435c14ea2..07cb43b64a2 100644
--- a/lisp/progmodes/which-func.el
+++ b/lisp/progmodes/which-func.el
@@ -68,7 +68,7 @@
"String to display in the mode line when current function is unknown.")
(defgroup which-func nil
- "Mode to display the current function name in the modeline."
+ "Display the current function name in the modeline."
:group 'tools
:version "20.3")
@@ -179,7 +179,9 @@ and you want to simplify them for the mode line
(defvar which-func-table (make-hash-table :test 'eq :weakness 'key))
(defconst which-func-current
- '(:eval (gethash (selected-window) which-func-table which-func-unknown)))
+ '(:eval (replace-regexp-in-string
+ "%" "%%"
+ (gethash (selected-window) which-func-table which-func-unknown))))
;;;###autoload (put 'which-func-current 'risky-local-variable t)
(defvar which-func-mode nil
@@ -207,7 +209,8 @@ It creates the Imenu index for the buffer, if necessary."
(setq imenu--index-alist
(save-excursion (funcall imenu-create-index-function))))
(error
- (unless (equal err '(error "This buffer cannot use `imenu-default-create-index-function'"))
+ (unless (equal err
+ '(user-error "This buffer cannot use `imenu-default-create-index-function'"))
(message "which-func-ff-hook error: %S" err))
(setq which-func-mode nil))))
diff --git a/lisp/repeat.el b/lisp/repeat.el
index 94efc717be5..e577c461bc5 100644
--- a/lisp/repeat.el
+++ b/lisp/repeat.el
@@ -1,4 +1,4 @@
-;;; repeat.el --- convenient way to repeat the previous command
+;;; repeat.el --- convenient way to repeat the previous command -*- lexical-binding: t -*-
;; Copyright (C) 1998, 2001-2012 Free Software Foundation, Inc.
@@ -156,15 +156,6 @@ member of that sequence. If this variable is nil, no re-execution occurs."
;; `repeat' now repeats that command instead of `real-last-command' to
;; avoid a "... must be bound to an event with parameters" error.
-(defvar repeat-last-self-insert nil
- "If last repeated command was `self-insert-command', it inserted this.")
-
-;; That'll require another keystroke count so we know we're in a string of
-;; repetitions of self-insert commands:
-
-(defvar repeat-num-input-keys-at-self-insert -1
- "# key sequences read in Emacs session when `self-insert-command' repeated.")
-
;;;;; *************** ANALOGOUS HACKS TO `repeat' ITSELF **************** ;;;;;
;; That mechanism of checking num-input-keys to figure out what's really
@@ -199,14 +190,6 @@ this function is always whether the value of `this-command' would've been
(defvar repeat-previous-repeated-command nil
"The previous repeated command.")
-;; The following variable counts repeated self-insertions. The idea is
-;; that repeating a self-insertion command and subsequently undoing it
-;; should have almost the same effect as if the characters were inserted
-;; manually. The basic difference is that we leave in one undo-boundary
-;; between the original insertion and its first repetition.
-(defvar repeat-undo-count nil
- "Number of self-insertions since last `undo-boundary'.")
-
;;;###autoload
(defun repeat (repeat-arg)
"Repeat most recently executed command.
@@ -254,7 +237,7 @@ recently executed command not bound to an input event\"."
(let ((repeat-repeat-char
(if (eq repeat-on-final-keystroke t)
last-command-event
- ;; allow only specified final keystrokes
+ ;; Allow only specified final keystrokes.
(car (memq last-command-event
(listify-key-sequence
repeat-on-final-keystroke))))))
@@ -269,90 +252,45 @@ recently executed command not bound to an input event\"."
(setq current-prefix-arg repeat-arg)
(repeat-message
"Repeating command %S %S" repeat-arg last-repeatable-command))
- (if (eq last-repeatable-command 'self-insert-command)
- (let ((insertion
- (if (<= (- num-input-keys
- repeat-num-input-keys-at-self-insert)
- 1)
- repeat-last-self-insert
- (let ((range (nth 1 buffer-undo-list)))
- (condition-case nil
- (setq repeat-last-self-insert
- (buffer-substring (car range)
- (cdr range)))
- (error (error "%s %s %s" ;Danger, Will Robinson!
- "repeat can't intuit what you"
- "inserted before auto-fill"
- "clobbered it, sorry")))))))
- (setq repeat-num-input-keys-at-self-insert num-input-keys)
- ;; If the self-insert had a repeat count, INSERTION
- ;; includes that many copies of the same character.
- ;; So use just the first character
- ;; and repeat it the right number of times.
- (setq insertion (substring insertion -1))
- (let ((count (prefix-numeric-value repeat-arg))
- (i 0))
- ;; Run pre- and post-command hooks for self-insertion too.
- (run-hooks 'pre-command-hook)
- (cond
- ((not repeat-undo-count))
- ((< repeat-undo-count 20)
- ;; Don't make an undo-boundary here.
- (setq repeat-undo-count (1+ repeat-undo-count)))
- (t
- ;; Make an undo-boundary after 20 repetitions only.
- (undo-boundary)
- (setq repeat-undo-count 1)))
- (while (< i count)
- (repeat-self-insert insertion)
- (setq i (1+ i)))
- (run-hooks 'post-command-hook)))
- (let ((indirect (indirect-function last-repeatable-command)))
- ;; Make each repetition undo separately.
- (undo-boundary)
- (if (or (stringp indirect)
- (vectorp indirect))
- ;; Bind real-last-command so that executing the macro does
- ;; not alter it. Do the same for last-repeatable-command.
- (let ((real-last-command real-last-command)
- (last-repeatable-command last-repeatable-command))
- (execute-kbd-macro last-repeatable-command))
- (run-hooks 'pre-command-hook)
- (call-interactively last-repeatable-command)
- (run-hooks 'post-command-hook)))))
+ (when (eq last-repeatable-command 'self-insert-command)
+ ;; We used to use a much more complex code to try and figure out
+ ;; what key was used to run that self-insert-command:
+ ;; (if (<= (- num-input-keys
+ ;; repeat-num-input-keys-at-self-insert)
+ ;; 1)
+ ;; repeat-last-self-insert
+ ;; (let ((range (nth 1 buffer-undo-list)))
+ ;; (condition-case nil
+ ;; (setq repeat-last-self-insert
+ ;; (buffer-substring (car range)
+ ;; (cdr range)))
+ ;; (error (error "%s %s %s" ;Danger, Will Robinson!
+ ;; "repeat can't intuit what you"
+ ;; "inserted before auto-fill"
+ ;; "clobbered it, sorry")))))
+ (setq last-command-event (char-before)))
+ (let ((indirect (indirect-function last-repeatable-command)))
+ (if (or (stringp indirect)
+ (vectorp indirect))
+ ;; Bind last-repeatable-command so that executing the macro does
+ ;; not alter it.
+ (let ((last-repeatable-command last-repeatable-command))
+ (execute-kbd-macro last-repeatable-command))
+ (call-interactively last-repeatable-command))))
(when repeat-repeat-char
- ;; A simple recursion here gets into trouble with max-lisp-eval-depth
- ;; on long sequences of repetitions of a command like `forward-word'
- ;; (only 32 repetitions are possible given the default value of 200 for
- ;; max-lisp-eval-depth), but if I now locally disable the repeat char I
- ;; can iterate indefinitely here around a single level of recursion.
- (let (repeat-on-final-keystroke
- ;; Bind `undo-inhibit-record-point' to t in order to avoid
- ;; recording point in `buffer-undo-list' here. We have to
- ;; do this since the command loop does not set the last
- ;; position of point thus confusing the point recording
- ;; mechanism when inserting or deleting text.
- (undo-inhibit-record-point t))
- (setq real-last-command 'repeat)
- (setq repeat-undo-count 1)
- (unwind-protect
- (while (let ((evt (read-key)))
- ;; For clicks, we need to strip the meta-data to
- ;; check the underlying event name.
- (eq (or (car-safe evt) evt)
- (or (car-safe repeat-repeat-char)
- repeat-repeat-char)))
- (repeat repeat-arg))
- ;; Make sure `repeat-undo-count' is reset.
- (setq repeat-undo-count nil))
- (setq unread-command-events (list last-input-event))))))
-
-(defun repeat-self-insert (string)
- (let ((i 0))
- (while (< i (length string))
- (let ((last-command-event (aref string i)))
- (self-insert-command 1))
- (setq i (1+ i)))))
+ (set-temporary-overlay-map
+ (let ((map (make-sparse-keymap)))
+ (define-key map (vector repeat-repeat-char)
+ (if (null repeat-message-function) 'repeat
+ ;; If repeat-message-function is let-bound, preserve it for the
+ ;; next "iterations of the loop".
+ (let ((fun repeat-message-function))
+ (lambda ()
+ (interactive)
+ (let ((repeat-message-function fun))
+ (setq this-command 'repeat)
+ (call-interactively 'repeat))))))
+ map)))))
(defun repeat-message (format &rest args)
"Like `message' but displays with `repeat-message-function' if non-nil."
diff --git a/lisp/select.el b/lisp/select.el
index 0260eba4682..d3153a0ce0e 100644
--- a/lisp/select.el
+++ b/lisp/select.el
@@ -213,44 +213,45 @@ two markers or an overlay. Otherwise, it is nil."
(defun xselect--int-to-cons (n)
(cons (ash n -16) (logand n 65535)))
-(defun xselect-convert-to-string (_selection type value)
- (let (str coding)
- ;; Get the actual string from VALUE.
- (cond ((stringp value)
- (setq str value))
- ((setq value (xselect--selection-bounds value))
- (with-current-buffer (nth 2 value)
- (setq str (buffer-substring (nth 0 value)
- (nth 1 value))))))
- (when str
- ;; If TYPE is nil, this is a local request, thus return STR as
- ;; is. Otherwise, encode STR.
- (if (not type)
- str
- (setq coding (or next-selection-coding-system selection-coding-system))
+(defun xselect--encode-string (type str &optional can-modify)
+ (when str
+ ;; If TYPE is nil, this is a local request; return STR as-is.
+ (if (null type)
+ str
+ ;; Otherwise, encode STR.
+ (let ((coding (or next-selection-coding-system
+ selection-coding-system)))
(if coding
(setq coding (coding-system-base coding)))
(let ((inhibit-read-only t))
;; Suppress producing escape sequences for compositions.
+ ;; But avoid modifying the string if it's a buffer name etc.
+ (unless can-modify (setq str (substring str 0)))
(remove-text-properties 0 (length str) '(composition nil) str)
- (if (eq type 'TEXT)
- ;; TEXT is a polymorphic target. We must select the
- ;; actual type from `UTF8_STRING', `COMPOUND_TEXT',
- ;; `STRING', and `C_STRING'.
- (if (not (multibyte-string-p str))
- (setq type 'C_STRING)
- (let (non-latin-1 non-unicode eight-bit)
- (mapc #'(lambda (x)
- (if (>= x #x100)
- (if (< x #x110000)
- (setq non-latin-1 t)
- (if (< x #x3FFF80)
- (setq non-unicode t)
- (setq eight-bit t)))))
- str)
- (setq type (if non-unicode 'COMPOUND_TEXT
- (if non-latin-1 'UTF8_STRING
- (if eight-bit 'C_STRING 'STRING)))))))
+ ;; For X selections, TEXT is a polymorphic target; choose
+ ;; the actual type from `UTF8_STRING', `COMPOUND_TEXT',
+ ;; `STRING', and `C_STRING'. On Nextstep, always use UTF-8
+ ;; (see ns_string_to_pasteboard_internal in nsselect.m).
+ (when (eq type 'TEXT)
+ (cond
+ ((featurep 'ns)
+ (setq type 'UTF8_STRING))
+ ((not (multibyte-string-p str))
+ (setq type 'C_STRING))
+ (t
+ (let (non-latin-1 non-unicode eight-bit)
+ (mapc #'(lambda (x)
+ (if (>= x #x100)
+ (if (< x #x110000)
+ (setq non-latin-1 t)
+ (if (< x #x3FFF80)
+ (setq non-unicode t)
+ (setq eight-bit t)))))
+ str)
+ (setq type (if non-unicode 'COMPOUND_TEXT
+ (if non-latin-1 'UTF8_STRING
+ (if eight-bit 'C_STRING
+ 'STRING))))))))
(cond
((eq type 'UTF8_STRING)
(if (or (not coding)
@@ -279,6 +280,14 @@ two markers or an overlay. Otherwise, it is nil."
(setq next-selection-coding-system nil)
(cons type str))))
+(defun xselect-convert-to-string (_selection type value)
+ (let ((str (cond ((stringp value) value)
+ ((setq value (xselect--selection-bounds value))
+ (with-current-buffer (nth 2 value)
+ (buffer-substring (nth 0 value)
+ (nth 1 value)))))))
+ (xselect--encode-string type str t)))
+
(defun xselect-convert-to-length (_selection _type value)
(let ((len (cond ((stringp value)
(length value))
@@ -311,7 +320,7 @@ two markers or an overlay. Otherwise, it is nil."
(defun xselect-convert-to-filename (_selection _type value)
(when (setq value (xselect--selection-bounds value))
- (buffer-file-name (nth 2 value))))
+ (xselect--encode-string 'TEXT (buffer-file-name (nth 2 value)))))
(defun xselect-convert-to-charpos (_selection _type value)
(when (setq value (xselect--selection-bounds value))
@@ -337,13 +346,13 @@ two markers or an overlay. Otherwise, it is nil."
(xselect--int-to-cons (max beg end))))))))
(defun xselect-convert-to-os (_selection _type _size)
- (symbol-name system-type))
+ (xselect--encode-string 'TEXT (symbol-name system-type)))
(defun xselect-convert-to-host (_selection _type _size)
- (system-name))
+ (xselect--encode-string 'TEXT (system-name)))
(defun xselect-convert-to-user (_selection _type _size)
- (user-full-name))
+ (xselect--encode-string 'TEXT (user-full-name)))
(defun xselect-convert-to-class (_selection _type _size)
"Convert selection to class.
diff --git a/lisp/ses.el b/lisp/ses.el
index da18046c953..876537413ca 100644
--- a/lisp/ses.el
+++ b/lisp/ses.el
@@ -65,6 +65,7 @@
(defgroup ses nil
"Simple Emacs Spreadsheet."
+ :tag "SES"
:group 'applications
:prefix "ses-"
:version "21.1")
diff --git a/lisp/shell.el b/lisp/shell.el
index 7c5ce49a967..ca238a443f3 100644
--- a/lisp/shell.el
+++ b/lisp/shell.el
@@ -372,8 +372,57 @@ Thus, this does not include the shell's current directory.")
;;; Basic Procedures
-(defun shell-parse-pcomplete-arguments ()
+(defun shell--unquote&requote-argument (qstr &optional upos)
+ (unless upos (setq upos 0))
+ (let* ((qpos 0)
+ (dquotes nil)
+ (ustrs '())
+ (re (concat
+ "[\"']"
+ "\\|\\$\\(?:\\([[:alpha:]][[:alnum:]]*\\)"
+ "\\|{\\(?1:[^{}]+\\)}\\)"
+ (when (memq system-type '(ms-dos windows-nt))
+ "\\|%\\(?1:[^\\\\/]*\\)%")
+ (when comint-file-name-quote-list
+ "\\|\\\\\\(.\\)")))
+ (qupos nil)
+ (push (lambda (str end)
+ (push str ustrs)
+ (setq upos (- upos (length str)))
+ (unless (or qupos (> upos 0))
+ (setq qupos (if (< end 0) (- end) (+ upos end))))))
+ match)
+ (while (setq match (string-match re qstr qpos))
+ (funcall push (substring qstr qpos match) match)
+ (cond
+ ((match-beginning 2) (funcall push (match-string 2 qstr) (match-end 0)))
+ ((match-beginning 1) (funcall push (getenv (match-string 1 qstr))
+ (- (match-end 0))))
+ ((eq (aref qstr match) ?\") (setq dquotes (not dquotes)))
+ ((eq (aref qstr match) ?\')
+ (cond
+ (dquotes (funcall push "'" (match-end 0)))
+ ((< match (1+ (length qstr)))
+ (let ((end (string-match "'" qstr (1+ match))))
+ (funcall push (substring qstr (1+ match) end)
+ (or end (length qstr)))))
+ (t nil)))
+ (t (error "Unexpected case in shell--unquote&requote-argument!")))
+ (setq qpos (match-end 0)))
+ (funcall push (substring qstr qpos) (length qstr))
+ (list (mapconcat #'identity (nreverse ustrs) "")
+ qupos #'comint-quote-filename)))
+
+(defun shell--unquote-argument (str)
+ (car (shell--unquote&requote-argument str)))
+(defun shell--requote-argument (upos qstr)
+ ;; See `completion-table-with-quoting'.
+ (let ((res (shell--unquote&requote-argument qstr upos)))
+ (cons (nth 1 res) (nth 2 res))))
+
+(defun shell--parse-pcomplete-arguments ()
"Parse whitespace separated arguments in the current region."
+ ;; FIXME: share code with shell--unquote&requote-argument.
(let ((begin (save-excursion (shell-backward-command 1) (point)))
(end (point))
begins args)
@@ -393,12 +442,16 @@ Thus, this does not include the shell's current directory.")
(goto-char (match-end 0))
(cond
((match-beginning 3) ;Backslash escape.
- (push (if (= (match-beginning 3) (match-end 3))
- "\\" (match-string 3))
+ (push (cond
+ ((null comint-file-name-quote-list)
+ (goto-char (match-beginning 3)) "\\")
+ ((= (match-beginning 3) (match-end 3)) "\\")
+ (t (match-string 3)))
arg))
((match-beginning 2) ;Double quote.
- (push (replace-regexp-in-string
- "\\\\\\(.\\)" "\\1" (match-string 2))
+ (push (if (null comint-file-name-quote-list) (match-string 2)
+ (replace-regexp-in-string
+ "\\\\\\(.\\)" "\\1" (match-string 2)))
arg))
((match-beginning 1) ;Single quote.
(push (match-string 1) arg))
@@ -426,10 +479,10 @@ Shell buffers. It implements `shell-completion-execonly' for
shell-file-name-quote-list)
(set (make-local-variable 'comint-dynamic-complete-functions)
shell-dynamic-complete-functions)
+ (setq-local comint-unquote-function #'shell--unquote-argument)
+ (setq-local comint-requote-function #'shell--requote-argument)
(set (make-local-variable 'pcomplete-parse-arguments-function)
- #'shell-parse-pcomplete-arguments)
- (set (make-local-variable 'pcomplete-arg-quote-list)
- (append "\\ \t\n\r\"'`$|&;(){}[]<>#" nil))
+ #'shell--parse-pcomplete-arguments)
(set (make-local-variable 'pcomplete-termination-string)
(cond ((not comint-completion-addsuffix) "")
((stringp comint-completion-addsuffix)
diff --git a/lisp/simple.el b/lisp/simple.el
index 67f6e4eedf7..2b7d5580ba2 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -817,7 +817,7 @@ instead of deleted."
:type '(choice (const :tag "Delete active region" t)
(const :tag "Kill active region" kill)
(const :tag "Do ordinary deletion" nil))
- :group 'editing
+ :group 'killing
:version "24.1")
(defun delete-backward-char (n &optional killflag)
@@ -1354,6 +1354,56 @@ to get different commands to edit and resubmit."
"M-x ")
obarray 'commandp t nil 'extended-command-history)))
+(defcustom suggest-key-bindings t
+ "Non-nil means show the equivalent key-binding when M-x command has one.
+The value can be a length of time to show the message for.
+If the value is non-nil and not a number, we wait 2 seconds."
+ :group 'keyboard
+ :type '(choice (const :tag "off" nil)
+ (integer :tag "time" 2)
+ (other :tag "on")))
+
+(defun execute-extended-command (prefixarg &optional command-name)
+ ;; Based on Fexecute_extended_command in keyboard.c of Emacs.
+ ;; Aaron S. Hawley <aaron.s.hawley(at)gmail.com> 2009-08-24
+ "Read function name, then read its arguments and call it.
+
+To pass a numeric argument to the command you are invoking with, specify
+the numeric argument to this command.
+
+Noninteractively, the argument PREFIXARG is the prefix argument to
+give to the command you invoke, if it asks for an argument."
+ (interactive (list current-prefix-arg (read-extended-command)))
+ ;; Emacs<24 calling-convention was with a single `prefixarg' argument.
+ (if (null command-name) (setq command-name (read-extended-command)))
+ (let* ((function (and (stringp command-name) (intern-soft command-name)))
+ (binding (and suggest-key-bindings
+ (not executing-kbd-macro)
+ (where-is-internal function overriding-local-map t))))
+ (unless (commandp function)
+ (error "`%s' is not a valid command name" command-name))
+ ;; Set this_command_keys to the concatenation of saved-keys and
+ ;; function, followed by a RET.
+ (setq this-command function)
+ (let ((prefix-arg prefixarg))
+ (command-execute function 'record))
+ ;; If enabled, show which key runs this command.
+ (when binding
+ ;; But first wait, and skip the message if there is input.
+ (let* ((waited
+ ;; If this command displayed something in the echo area;
+ ;; wait a few seconds, then display our suggestion message.
+ (sit-for (cond
+ ((zerop (length (current-message))) 0)
+ ((numberp suggest-key-bindings) suggest-key-bindings)
+ (t 2)))))
+ (when (and waited (not (consp unread-command-events)))
+ (with-temp-message
+ (format "You can run the command `%s' with %s"
+ function (key-description binding))
+ (sit-for (if (numberp suggest-key-bindings)
+ suggest-key-bindings
+ 2))))))))
(defvar minibuffer-history nil
"Default minibuffer history list.
@@ -1415,7 +1465,7 @@ See also `minibuffer-history-case-insensitive-variables'."
(list (if (string= regexp "")
(if minibuffer-history-search-history
(car minibuffer-history-search-history)
- (error "No previous history search regexp"))
+ (user-error "No previous history search regexp"))
regexp)
(prefix-numeric-value current-prefix-arg))))
(unless (zerop n)
@@ -1441,9 +1491,9 @@ See also `minibuffer-history-case-insensitive-variables'."
(setq prevpos pos)
(setq pos (min (max 1 (+ pos (if (< n 0) -1 1))) (length history)))
(when (= pos prevpos)
- (error (if (= pos 1)
- "No later matching history item"
- "No earlier matching history item")))
+ (user-error (if (= pos 1)
+ "No later matching history item"
+ "No earlier matching history item")))
(setq match-string
(if (eq minibuffer-history-sexp-flag (minibuffer-depth))
(let ((print-level nil))
@@ -1486,7 +1536,7 @@ makes the search case-sensitive."
(list (if (string= regexp "")
(if minibuffer-history-search-history
(car minibuffer-history-search-history)
- (error "No previous history search regexp"))
+ (user-error "No previous history search regexp"))
regexp)
(prefix-numeric-value current-prefix-arg))))
(previous-matching-history-element regexp (- n)))
@@ -1545,11 +1595,11 @@ The argument NABS specifies the absolute history position."
(setq minibuffer-text-before-history
(minibuffer-contents-no-properties)))
(if (< nabs minimum)
- (if minibuffer-default
- (error "End of defaults; no next item")
- (error "End of history; no default available")))
+ (user-error (if minibuffer-default
+ "End of defaults; no next item"
+ "End of history; no default available")))
(if (> nabs (length (symbol-value minibuffer-history-variable)))
- (error "Beginning of history; no preceding item"))
+ (user-error "Beginning of history; no preceding item"))
(unless (memq last-command '(next-history-element
previous-history-element))
(let ((prompt-end (minibuffer-prompt-end)))
@@ -1895,8 +1945,8 @@ Some change-hooks test this variable to do something different.")
Call `undo-start' to get ready to undo recent changes,
then call `undo-more' one or more times to undo them."
(or (listp pending-undo-list)
- (error (concat "No further undo information"
- (and undo-in-region " for region"))))
+ (user-error (concat "No further undo information"
+ (and undo-in-region " for region"))))
(let ((undo-in-progress t))
;; Note: The following, while pulling elements off
;; `pending-undo-list' will call primitive change functions which
@@ -1922,7 +1972,7 @@ If BEG and END are specified, then only undo elements
that apply to text between BEG and END are used; other undo elements
are ignored. If BEG and END are nil, all undo elements are used."
(if (eq buffer-undo-list t)
- (error "No undo information in this buffer"))
+ (user-error "No undo information in this buffer"))
(setq pending-undo-list
(if (and beg end (not (= beg end)))
(undo-make-selective-list (min beg end) (max beg end))
@@ -3194,10 +3244,6 @@ move the yanking point; just return the Nth kill forward."
:type 'boolean
:group 'killing)
-(put 'text-read-only 'error-conditions
- '(text-read-only buffer-read-only error))
-(put 'text-read-only 'error-message (purecopy "Text is read-only"))
-
(defun kill-region (beg end &optional yank-handler)
"Kill (\"cut\") text between point and mark.
This deletes the text from the buffer and saves it in the kill ring.
diff --git a/lisp/skeleton.el b/lisp/skeleton.el
index 328f795ecd2..34d69a74369 100644
--- a/lisp/skeleton.el
+++ b/lisp/skeleton.el
@@ -121,7 +121,7 @@ are integer buffer positions in the reverse order of the insertion order.")
"Define a user-configurable COMMAND that enters a statement skeleton.
DOCUMENTATION is that of the command.
SKELETON is as defined under `skeleton-insert'."
- (declare (debug (&define name stringp skeleton-edebug-spec)))
+ (declare (doc-string 2) (debug (&define name stringp skeleton-edebug-spec)))
(if skeleton-debug
(set command skeleton))
`(progn
diff --git a/lisp/speedbar.el b/lisp/speedbar.el
index 9065d9ed131..28879fed30b 100644
--- a/lisp/speedbar.el
+++ b/lisp/speedbar.el
@@ -125,7 +125,6 @@ this version is not backward compatible to 0.14 or earlier.")
;;; TODO:
;; - Timeout directories we haven't visited in a while.
-(require 'assoc)
(require 'easymenu)
(require 'dframe)
(require 'sb-image)
@@ -775,6 +774,8 @@ If you want to change this while speedbar is active, either use
(defvar speedbar-update-flag-disable nil
"Permanently disable changing of the update flag.")
+(define-obsolete-variable-alias
+ 'speedbar-syntax-table 'speedbar-mode-syntax-table "24.1")
(defvar speedbar-mode-syntax-table
(let ((st (make-syntax-table)))
;; Turn off paren matching around here.
@@ -788,10 +789,9 @@ If you want to change this while speedbar is active, either use
(modify-syntax-entry ?\] " " st)
st)
"Syntax-table used on the speedbar.")
-(define-obsolete-variable-alias
- 'speedbar-syntax-table 'speedbar-mode-syntax-table "24.1")
+(define-obsolete-variable-alias 'speedbar-key-map 'speedbar-mode-map "24.1")
(defvar speedbar-mode-map
(let ((map (make-keymap)))
(suppress-keymap map t)
@@ -826,7 +826,6 @@ If you want to change this while speedbar is active, either use
(dframe-update-keymap map)
map)
"Keymap used in speedbar buffer.")
-(define-obsolete-variable-alias 'speedbar-key-map 'speedbar-mode-map "24.1")
(defun speedbar-make-specialized-keymap ()
"Create a keymap for use with a speedbar major or minor display mode.
@@ -1413,9 +1412,10 @@ Argument ARG represents to force a refresh past any caches that may exist."
(dframe-power-click arg)
deactivate-mark)
;; We need to hack something so this works in detached frames.
- (while dl
- (adelete 'speedbar-directory-contents-alist (car dl))
- (setq dl (cdr dl)))
+ (dolist (d dl)
+ (setq speedbar-directory-contents-alist
+ (delq (assoc d speedbar-directory-contents-alist)
+ speedbar-directory-contents-alist)))
(if (<= 1 speedbar-verbosity-level)
(speedbar-message "Refreshing speedbar..."))
(speedbar-update-contents)
@@ -1898,12 +1898,9 @@ matching ignored headers. Cache any directory files found in
`speedbar-directory-contents-alist' and use that cache before scanning
the file-system."
(setq directory (expand-file-name directory))
- ;; If in powerclick mode, then the directory we are getting
- ;; should be rescanned.
- (if dframe-power-click
- (adelete 'speedbar-directory-contents-alist directory))
;; find the directory, either in the cache, or build it.
- (or (cdr-safe (assoc directory speedbar-directory-contents-alist))
+ (or (and (not dframe-power-click) ;; In powerclick mode, always rescan.
+ (cdr-safe (assoc directory speedbar-directory-contents-alist)))
(let ((default-directory directory)
(dir (directory-files directory nil))
(dirs nil)
@@ -1917,8 +1914,11 @@ the file-system."
(setq dirs (cons (car dir) dirs))
(setq files (cons (car dir) files))))
(setq dir (cdr dir)))
- (let ((nl (cons (nreverse dirs) (list (nreverse files)))))
- (aput 'speedbar-directory-contents-alist directory nl)
+ (let ((nl (cons (nreverse dirs) (list (nreverse files))))
+ (ae (assoc directory speedbar-directory-contents-alist)))
+ (if ae (setcdr ae nl)
+ (push (cons directory nl)
+ speedbar-directory-contents-alist))
nl))
))
diff --git a/lisp/startup.el b/lisp/startup.el
index 4a8af55af2f..862e14f0c9d 100644
--- a/lisp/startup.el
+++ b/lisp/startup.el
@@ -41,7 +41,7 @@
(defcustom initial-buffer-choice nil
"Buffer to show after starting Emacs.
If the value is nil and `inhibit-startup-screen' is nil, show the
-startup screen. If the value is string, visit the specified file
+startup screen. If the value is a string, visit the specified file
or directory using `find-file'. If t, open the `*scratch*'
buffer."
:type '(choice
@@ -905,33 +905,12 @@ Amongst another things, it parses the command-line arguments."
(run-hooks 'before-init-hook)
- ;; Under X, this creates the X frame and deletes the terminal frame.
+ ;; Under X, create the X frame and delete the terminal frame.
(unless (daemonp)
-
- ;; If X resources are available, use them to initialize the values
- ;; of `tool-bar-mode' and `menu-bar-mode', as well as the value of
- ;; `no-blinking-cursor' and the `cursor' face.
- (cond
- ((or noninteractive emacs-basic-display)
- (setq menu-bar-mode nil
- tool-bar-mode nil
- no-blinking-cursor t))
- ((memq initial-window-system '(x w32 ns))
- (let ((no-vals '("no" "off" "false" "0")))
- (if (member (x-get-resource "menuBar" "MenuBar") no-vals)
- (setq menu-bar-mode nil))
- (if (member (x-get-resource "toolBar" "ToolBar") no-vals)
- (setq tool-bar-mode nil))
- (if (member (x-get-resource "cursorBlink" "CursorBlink")
- no-vals)
- (setq no-blinking-cursor t)))
- ;; If the cursorColor X resource exists, alter the `cursor' face
- ;; spec, but mark it as changed outside of Customize.
- (let ((color (x-get-resource "cursorColor" "Foreground")))
- (when color
- (put 'cursor 'theme-face
- `((changed ((t :background ,color)))))
- (put 'cursor 'face-modified t)))))
+ (if (or noninteractive emacs-basic-display)
+ (setq menu-bar-mode nil
+ tool-bar-mode nil
+ no-blinking-cursor t))
(frame-initialize))
(when (fboundp 'x-create-frame)
@@ -1266,6 +1245,29 @@ the `--debug-init' option to view a complete error backtrace."
(with-no-warnings
(emacs-session-restore x-session-previous-id))))
+(defun x-apply-session-resources ()
+ "Apply X resources which specify initial values for Emacs variables.
+This is called from a window-system initialization function, such
+as `x-initialize-window-system' for X, either at startup (prior
+to reading the init file), or afterwards when the user first
+opens a graphical frame.
+
+This can set the values of `menu-bar-mode', `tool-bar-mode', and
+`no-blinking-cursor', as well as the `cursor' face. Changed
+settings will be marked as \"CHANGED outside of Customize\"."
+ (let ((no-vals '("no" "off" "false" "0"))
+ (settings '(("menuBar" "MenuBar" menu-bar-mode nil)
+ ("toolBar" "ToolBar" tool-bar-mode nil)
+ ("cursorBlink" "CursorBlink" no-blinking-cursor t))))
+ (dolist (x settings)
+ (if (member (x-get-resource (nth 0 x) (nth 1 x)) no-vals)
+ (set (nth 2 x) (nth 3 x)))))
+ (let ((color (x-get-resource "cursorColor" "Foreground")))
+ (when color
+ (put 'cursor 'theme-face
+ `((changed ((t :background ,color)))))
+ (put 'cursor 'face-modified t))))
+
(defcustom initial-scratch-message (purecopy "\
;; This buffer is for notes you don't want to save, and for Lisp evaluation.
;; If you want to create a file, visit that file with C-x C-f,
diff --git a/lisp/subr.el b/lisp/subr.el
index 8e296aa7422..0166a3276a8 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -116,6 +116,20 @@ BODY should be a list of Lisp expressions.
;; depend on backquote.el.
(list 'function (cons 'lambda cdr)))
+(defmacro setq-local (var val)
+ "Set variable VAR to value VAL in current buffer."
+ ;; Can't use backquote here, it's too early in the bootstrap.
+ (list 'set (list 'make-local-variable (list 'quote var)) val))
+
+(defmacro defvar-local (var val &optional docstring)
+ "Define VAR as a buffer-local variable with default value VAL.
+Like `defvar' but additionally marks the variable as being automatically
+buffer-local wherever it is set."
+ (declare (debug defvar) (doc-string 3))
+ ;; Can't use backquote here, it's too early in the bootstrap.
+ (list 'progn (list 'defvar var val docstring)
+ (list 'make-variable-buffer-local (list 'quote var))))
+
(defun apply-partially (fun &rest args)
"Return a function that is a partial application of FUN to ARGS.
ARGS is a list of the first N arguments to pass to FUN.
@@ -274,6 +288,17 @@ for the sake of consistency."
(signal 'error (list (apply 'format args)))))
(set-advertised-calling-convention 'error '(string &rest args) "23.1")
+(defun user-error (format &rest args)
+ "Signal a pilot error, making error message by passing all args to `format'.
+In Emacs, the convention is that error messages start with a capital
+letter but *do not* end with a period. Please follow this convention
+for the sake of consistency.
+This is just like `error' except that `user-error's are expected to be the
+result of an incorrect manipulation on the part of the user, rather than the
+result of an actual problem."
+ (while t
+ (signal 'user-error (list (apply #'format format args)))))
+
;; We put this here instead of in frame.el so that it's defined even on
;; systems where frame.el isn't loaded.
(defun frame-configuration-p (object)
@@ -495,11 +520,8 @@ side-effects, and the argument LIST is not modified."
;;;; Keymap support.
-(defmacro kbd (keys)
- "Convert KEYS to the internal Emacs key representation.
-KEYS should be a string constant in the format used for
-saving keyboard macros (see `edmacro-mode')."
- (read-kbd-macro keys))
+(defalias 'kbd 'read-kbd-macro)
+(put 'kbd 'pure t)
(defun undefined ()
"Beep to tell the user this binding is undefined."
@@ -2023,7 +2045,10 @@ some sort of escape sequence, the ambiguity is resolved via `read-key-delay'."
(let ((map (make-sparse-keymap)))
;; Don't hide the menu-bar and tool-bar entries.
(define-key map [menu-bar] (lookup-key global-map [menu-bar]))
- (define-key map [tool-bar] (lookup-key global-map [tool-bar]))
+ (define-key map [tool-bar]
+ ;; This hack avoids evaluating the :filter (Bug#9922).
+ (or (cdr (assq 'tool-bar global-map))
+ (lookup-key global-map [tool-bar])))
map))
(aref (catch 'read-key (read-key-sequence-vector prompt nil t)) 0))
(cancel-timer timer)
@@ -2112,21 +2137,21 @@ by doing (clear-string STRING)."
(message "Password not repeated accurately; please start over")
(sit-for 1))))
success)
- (let (minibuf)
+ (let ((hide-chars-fun
+ (lambda (beg end _len)
+ (clear-this-command-keys)
+ (setq beg (min end (max (minibuffer-prompt-end)
+ beg)))
+ (dotimes (i (- end beg))
+ (put-text-property (+ i beg) (+ 1 i beg)
+ 'display (string ?.)))))
+ minibuf)
(minibuffer-with-setup-hook
(lambda ()
(setq minibuf (current-buffer))
;; Turn off electricity.
(set (make-local-variable 'post-self-insert-hook) nil)
- (add-hook 'after-change-functions
- (lambda (beg end _len)
- (clear-this-command-keys)
- (setq beg (min end (max (minibuffer-prompt-end)
- beg)))
- (dotimes (i (- end beg))
- (put-text-property (+ i beg) (+ 1 i beg)
- 'display (string ?.))))
- nil t))
+ (add-hook 'after-change-functions hide-chars-fun nil 'local))
(unwind-protect
(read-string prompt nil
(let ((sym (make-symbol "forget-history")))
@@ -2134,7 +2159,14 @@ by doing (clear-string STRING)."
sym)
default)
(when (buffer-live-p minibuf)
- (with-current-buffer minibuf (erase-buffer))))))))
+ (with-current-buffer minibuf
+ ;; Not sure why but it seems that there might be cases where the
+ ;; minibuffer is not always properly reset later on, so undo
+ ;; whatever we've done here (bug#11392).
+ (remove-hook 'after-change-functions hide-chars-fun 'local)
+ (kill-local-variable 'post-self-insert-hook)
+ ;; And of course, don't keep the sensitive data around.
+ (erase-buffer))))))))
;; This should be used by `call-interactively' for `n' specs.
(defun read-number (prompt &optional default)
@@ -2391,7 +2423,7 @@ to `accept-change-group' or `cancel-change-group'."
This finishes the change group by accepting its changes as final."
(dolist (elt handle)
(with-current-buffer (car elt)
- (if (eq elt t)
+ (if (eq (cdr elt) t)
(setq buffer-undo-list t)))))
(defun cancel-change-group (handle)
@@ -2965,21 +2997,26 @@ potentially make a different buffer current. It does not alter
the buffer list ordering."
(declare (indent 1) (debug t))
;; Most of this code is a copy of save-selected-window.
- `(let ((save-selected-window-window (selected-window))
- ;; It is necessary to save all of these, because calling
- ;; select-window changes frame-selected-window for whatever
- ;; frame that window is in.
- (save-selected-window-alist
- (mapcar (lambda (frame) (list frame (frame-selected-window frame)))
- (frame-list))))
+ `(let* ((save-selected-window-destination ,window)
+ (save-selected-window-window (selected-window))
+ ;; Selecting a window on another frame changes not only the
+ ;; selected-window but also the frame-selected-window of the
+ ;; destination frame. So we need to save&restore it.
+ (save-selected-window-other-frame
+ (unless (eq (selected-frame)
+ (window-frame save-selected-window-destination))
+ (frame-selected-window
+ (window-frame save-selected-window-destination)))))
(save-current-buffer
(unwind-protect
- (progn (select-window ,window 'norecord)
+ (progn (select-window save-selected-window-destination 'norecord)
,@body)
- (dolist (elt save-selected-window-alist)
- (and (frame-live-p (car elt))
- (window-live-p (cadr elt))
- (set-frame-selected-window (car elt) (cadr elt) 'norecord)))
+ ;; First reset frame-selected-window.
+ (if (window-live-p save-selected-window-other-frame)
+ ;; We don't use set-frame-selected-window because it does not
+ ;; pass the `norecord' argument to Fselect_window.
+ (select-window save-selected-window-other-frame 'norecord))
+ ;; Then reset the actual selected-window.
(when (window-live-p save-selected-window-window)
(select-window save-selected-window-window 'norecord))))))
@@ -3787,6 +3824,29 @@ The properties used on SYMBOL are `composefunc', `sendfunc',
(put symbol 'abortfunc (or abortfunc 'kill-buffer))
(put symbol 'hookvar (or hookvar 'mail-send-hook)))
+(defun set-temporary-overlay-map (map &optional keep-pred)
+ (let* ((clearfunsym (make-symbol "clear-temporary-overlay-map"))
+ (overlaysym (make-symbol "t"))
+ (alist (list (cons overlaysym map)))
+ (clearfun
+ ;; FIXME: Use lexical-binding.
+ `(lambda ()
+ (unless ,(cond ((null keep-pred) nil)
+ ((eq t keep-pred)
+ `(eq this-command
+ (lookup-key ',map
+ (this-command-keys-vector))))
+ (t `(funcall ',keep-pred)))
+ (remove-hook 'pre-command-hook ',clearfunsym)
+ (setq emulation-mode-map-alists
+ (delq ',alist emulation-mode-map-alists))))))
+ (set overlaysym overlaysym)
+ (fset clearfunsym clearfun)
+ (add-hook 'pre-command-hook clearfunsym)
+ ;; FIXME: That's the keymaps with highest precedence, except for
+ ;; the `keymap' text-property ;-(
+ (push alist emulation-mode-map-alists)))
+
;;;; Progress reporters.
;; Progress reporter has the following structure:
diff --git a/lisp/tar-mode.el b/lisp/tar-mode.el
index 7c95f47e0fb..82329677643 100644
--- a/lisp/tar-mode.el
+++ b/lisp/tar-mode.el
@@ -396,7 +396,7 @@ write-date, checksum, link-type, and link-name."
(defun tar-clip-time-string (time)
(let ((str (current-time-string time)))
- (concat " " (substring str 4 16) (substring str 19 24))))
+ (concat " " (substring str 4 16) (format-time-string " %Y" time))))
(defun tar-grind-file-mode (mode)
"Construct a `-rw--r--r--' string indicating MODE.
diff --git a/lisp/term.el b/lisp/term.el
index f44f34226f2..e6a4bc15dd6 100644
--- a/lisp/term.el
+++ b/lisp/term.el
@@ -622,6 +622,28 @@ executed once when the buffer is created."
:type 'hook
:group 'term)
+(defvar term-signals-menu
+ (let ((map (make-sparse-keymap "Signals")))
+ (define-key map [eof]
+ '(menu-item "EOF" term-send-eof
+ :help "Send an EOF to the current buffer's process"))
+ (define-key map [kill]
+ '(menu-item "KILL" term-kill-subjob
+ :help "Send kill signal to the current subjob"))
+ (define-key map [quit]
+ '(menu-item "QUIT" term-quit-subjob
+ :help "Send quit signal to the current subjob."))
+ (define-key map [cont]
+ '(menu-item "CONT" term-continue-subjob
+ :help "Send CONT signal to process buffer's process group"))
+ (define-key map [stop]
+ '(menu-item "STOP" term-stop-subjob
+ :help "Stop the current subjob"))
+ (define-key map [brk]
+ '(menu-item "BREAK" term-interrupt-subjob
+ :help "Interrupt the current subjob"))
+ (cons "Signals" map)))
+
(defvar term-mode-map
(let ((map (make-sparse-keymap)))
(define-key map "\ep" 'term-previous-input)
@@ -653,28 +675,66 @@ executed once when the buffer is created."
(define-key map "\C-c\C-j" 'term-line-mode)
(define-key map "\C-c\C-q" 'term-pager-toggle)
- ;; ;; completion:
- ;; (define-key map [menu-bar completion]
- ;; (cons "Complete" (make-sparse-keymap "Complete")))
- ;; (define-key map [menu-bar completion complete-expand]
- ;; '("Expand File Name" . term-replace-by-expanded-filename))
- ;; (define-key map [menu-bar completion complete-listing]
- ;; '("File Completion Listing" . term-dynamic-list-filename-completions))
- ;; (define-key map [menu-bar completion complete-file]
- ;; '("Complete File Name" . term-dynamic-complete-filename))
- ;; (define-key map [menu-bar completion complete]
- ;; '("Complete Before Point" . term-dynamic-complete))
- ;; ;; Put them in the menu bar:
- ;; (setq menu-bar-final-items (append '(terminal completion inout signals)
- ;; menu-bar-final-items))
+ ;; completion: (line mode only)
+ (let ((completion-menu (make-sparse-keymap "Complete")))
+ (define-key map [menu-bar completion]
+ (cons "Complete" completion-menu))
+ (define-key completion-menu [complete-expand]
+ '("Expand File Name" . term-replace-by-expanded-filename))
+ (define-key completion-menu [complete-listing]
+ '("File Completion Listing" . term-dynamic-list-filename-completions))
+ (define-key completion-menu [complete-file]
+ '("Complete File Name" . term-dynamic-complete-filename))
+ (define-key completion-menu [complete]
+ '("Complete Before Point" . term-dynamic-complete)))
+
+ ;; Input history: (line mode only)
+ (let ((inout-menu (make-sparse-keymap "In/Out")))
+ (define-key map [menu-bar inout]
+ (cons "In/Out" inout-menu))
+ (define-key inout-menu [kill-output]
+ '("Kill Current Output Group" . term-kill-output))
+ (define-key inout-menu [next-prompt]
+ '("Forward Output Group" . term-next-prompt))
+ (define-key inout-menu [previous-prompt]
+ '("Backward Output Group" . term-previous-prompt))
+ (define-key inout-menu [show-maximum-output]
+ '("Show Maximum Output" . term-show-maximum-output))
+ (define-key inout-menu [show-output]
+ '("Show Current Output Group" . term-show-output))
+ (define-key inout-menu [kill-input]
+ '("Kill Current Input" . term-kill-input))
+ (define-key inout-menu [copy-input]
+ '("Copy Old Input" . term-copy-old-input))
+ (define-key inout-menu [forward-matching-history]
+ '("Forward Matching Input..." . term-forward-matching-input))
+ (define-key inout-menu [backward-matching-history]
+ '("Backward Matching Input..." . term-backward-matching-input))
+ (define-key inout-menu [next-matching-history]
+ '("Next Matching Input..." . term-next-matching-input))
+ (define-key inout-menu [previous-matching-history]
+ '("Previous Matching Input..." . term-previous-matching-input))
+ (define-key inout-menu [next-matching-history-from-input]
+ '("Next Matching Current Input" . term-next-matching-input-from-input))
+ (define-key inout-menu [previous-matching-history-from-input]
+ '("Previous Matching Current Input" .
+ term-previous-matching-input-from-input))
+ (define-key inout-menu [next-history]
+ '("Next Input" . term-next-input))
+ (define-key inout-menu [previous-history]
+ '("Previous Input" . term-previous-input))
+ (define-key inout-menu [list-history]
+ '("List Input History" . term-dynamic-list-input-ring))
+ (define-key inout-menu [expand-history]
+ '("Expand History Before Point" . term-replace-by-expanded-history)))
+
+ (define-key map [menu-bar signals] term-signals-menu)
+
map))
-(defvar term-raw-map nil
- "Keyboard map for sending characters directly to the inferior process.")
(defvar term-escape-char nil
"Escape character for char sub-mode of term mode.
Do not change it directly; use `term-set-escape-char' instead.")
-(defvar term-raw-escape-map nil)
(defvar term-pager-break-map nil)
@@ -713,9 +773,6 @@ Buffer local variable.")
(defmacro term-handling-pager () 'term-pager-old-local-map)
(defmacro term-using-alternate-sub-buffer () 'term-saved-home-marker)
-(defvar term-signals-menu)
-(defvar term-terminal-menu)
-
;; Let's silence the byte-compiler -mm
(defvar term-ansi-at-host nil)
(defvar term-ansi-at-dir nil)
@@ -770,169 +827,94 @@ is buffer-local."
:group 'term
:type 'integer)
-(when (featurep 'xemacs)
- (defvar term-terminal-menu
- '("Terminal"
- [ "Character mode" term-char-mode (term-in-line-mode)]
- [ "Line mode" term-line-mode (term-in-char-mode)]
- [ "Enable paging" term-pager-toggle (not term-pager-count)]
- [ "Disable paging" term-pager-toggle term-pager-count])))
-
-;; Menu bars:
-(unless (featurep 'xemacs)
- ;; terminal:
- (let (newmap)
- (setq newmap (make-sparse-keymap "Terminal"))
- (define-key newmap [terminal-pager-enable]
- '(menu-item "Enable paging" term-fake-pager-enable
- :help "Enable paging feature"))
- (define-key newmap [terminal-pager-disable]
- '(menu-item "Disable paging" term-fake-pager-disable
- :help "Disable paging feature"))
- (define-key newmap [terminal-char-mode]
- '(menu-item "Character mode" term-char-mode
- :help "Switch to char (raw) sub-mode of term mode"))
- (define-key newmap [terminal-line-mode]
- '(menu-item "Line mode" term-line-mode
- :help "Switch to line (cooked) sub-mode of term mode"))
- (setq term-terminal-menu (cons "Terminal" newmap))
-
- ;; completion: (line mode only)
- (defvar term-completion-menu (make-sparse-keymap "Complete"))
- (define-key term-mode-map [menu-bar completion]
- (cons "Complete" term-completion-menu))
- (define-key term-completion-menu [complete-expand]
- '("Expand File Name" . term-replace-by-expanded-filename))
- (define-key term-completion-menu [complete-listing]
- '("File Completion Listing" . term-dynamic-list-filename-completions))
- (define-key term-completion-menu [menu-bar completion complete-file]
- '("Complete File Name" . term-dynamic-complete-filename))
- (define-key term-completion-menu [menu-bar completion complete]
- '("Complete Before Point" . term-dynamic-complete))
-
- ;; Input history: (line mode only)
- (defvar term-inout-menu (make-sparse-keymap "In/Out"))
- (define-key term-mode-map [menu-bar inout]
- (cons "In/Out" term-inout-menu))
- (define-key term-inout-menu [kill-output]
- '("Kill Current Output Group" . term-kill-output))
- (define-key term-inout-menu [next-prompt]
- '("Forward Output Group" . term-next-prompt))
- (define-key term-inout-menu [previous-prompt]
- '("Backward Output Group" . term-previous-prompt))
- (define-key term-inout-menu [show-maximum-output]
- '("Show Maximum Output" . term-show-maximum-output))
- (define-key term-inout-menu [show-output]
- '("Show Current Output Group" . term-show-output))
- (define-key term-inout-menu [kill-input]
- '("Kill Current Input" . term-kill-input))
- (define-key term-inout-menu [copy-input]
- '("Copy Old Input" . term-copy-old-input))
- (define-key term-inout-menu [forward-matching-history]
- '("Forward Matching Input..." . term-forward-matching-input))
- (define-key term-inout-menu [backward-matching-history]
- '("Backward Matching Input..." . term-backward-matching-input))
- (define-key term-inout-menu [next-matching-history]
- '("Next Matching Input..." . term-next-matching-input))
- (define-key term-inout-menu [previous-matching-history]
- '("Previous Matching Input..." . term-previous-matching-input))
- (define-key term-inout-menu [next-matching-history-from-input]
- '("Next Matching Current Input" . term-next-matching-input-from-input))
- (define-key term-inout-menu [previous-matching-history-from-input]
- '("Previous Matching Current Input" .
- term-previous-matching-input-from-input))
- (define-key term-inout-menu [next-history]
- '("Next Input" . term-next-input))
- (define-key term-inout-menu [previous-history]
- '("Previous Input" . term-previous-input))
- (define-key term-inout-menu [list-history]
- '("List Input History" . term-dynamic-list-input-ring))
- (define-key term-inout-menu [expand-history]
- '("Expand History Before Point" . term-replace-by-expanded-history))
-
- ;; Signals
- (setq newmap (make-sparse-keymap "Signals"))
- (define-key term-mode-map [menu-bar signals]
- (setq term-signals-menu (cons "Signals" newmap)))
- (define-key newmap [eof]
- '(menu-item "EOF" term-send-eof
- :help "Send an EOF to the current buffer's process"))
- (define-key newmap [kill]
- '(menu-item "KILL" term-kill-subjob
- :help "Send kill signal to the current subjob"))
- (define-key newmap [quit]
- '(menu-item "QUIT" term-quit-subjob
- :help "Send quit signal to the current subjob."))
- (define-key newmap [cont]
- '(menu-item "CONT" term-continue-subjob
- :help "Send CONT signal to process buffer's process group"))
- (define-key newmap [stop]
- '(menu-item "STOP" term-stop-subjob
- :help "Stop the current subjob"))
- (define-key newmap [brk]
- '(menu-item "BREAK" term-interrupt-subjob
- :help "Interrupt the current subjob"))
- ))
+(defvar term-terminal-menu
+ (if (featurep 'xemacs)
+ '("Terminal"
+ [ "Character mode" term-char-mode (term-in-line-mode)]
+ [ "Line mode" term-line-mode (term-in-char-mode)]
+ [ "Enable paging" term-pager-toggle (not term-pager-count)]
+ [ "Disable paging" term-pager-toggle term-pager-count])
+ (let ((map (make-sparse-keymap "Terminal")))
+ (define-key map [terminal-pager-enable]
+ '(menu-item "Enable paging" term-fake-pager-enable
+ :help "Enable paging feature"))
+ (define-key map [terminal-pager-disable]
+ '(menu-item "Disable paging" term-fake-pager-disable
+ :help "Disable paging feature"))
+ (define-key map [terminal-char-mode]
+ '(menu-item "Character mode" term-char-mode
+ :help "Switch to char (raw) sub-mode of term mode"))
+ (define-key map [terminal-line-mode]
+ '(menu-item "Line mode" term-line-mode
+ :help "Switch to line (cooked) sub-mode of term mode"))
+ (cons "Terminal" map))))
;; Set up term-raw-map, etc.
-(defun term-set-escape-char (c)
+(defvar term-raw-map
+ (let* ((map (make-keymap))
+ (esc-map (make-keymap))
+ (i 0))
+ (while (< i 128)
+ (define-key map (make-string 1 i) 'term-send-raw)
+ ;; Avoid O and [. They are used in escape sequences for various keys.
+ (unless (or (eq i ?O) (eq i 91))
+ (define-key esc-map (make-string 1 i) 'term-send-raw-meta))
+ (setq i (1+ i)))
+ (define-key map [remap self-insert-command] 'term-send-raw)
+ (define-key map "\e" esc-map)
+
+ ;; Added nearly all the 'gray keys' -mm
+
+ (if (featurep 'xemacs)
+ (define-key map [button2] 'term-mouse-paste)
+ (define-key map [mouse-2] 'term-mouse-paste)
+ (define-key map [menu-bar terminal] term-terminal-menu)
+ (define-key map [menu-bar signals] term-signals-menu))
+ (define-key map [up] 'term-send-up)
+ (define-key map [down] 'term-send-down)
+ (define-key map [right] 'term-send-right)
+ (define-key map [left] 'term-send-left)
+ (define-key map [delete] 'term-send-del)
+ (define-key map [deletechar] 'term-send-del)
+ (define-key map [backspace] 'term-send-backspace)
+ (define-key map [home] 'term-send-home)
+ (define-key map [end] 'term-send-end)
+ (define-key map [insert] 'term-send-insert)
+ (define-key map [S-prior] 'scroll-down)
+ (define-key map [S-next] 'scroll-up)
+ (define-key map [S-insert] 'term-paste)
+ (define-key map [prior] 'term-send-prior)
+ (define-key map [next] 'term-send-next)
+ map)
+ "Keyboard map for sending characters directly to the inferior process.")
+
+(defvar term-raw-escape-map
+ (let ((map (make-sparse-keymap)))
+ (set-keymap-parent map 'Control-X-prefix)
+ ;; Define standard bindings in term-raw-escape-map.
+ (define-key map "\C-v" (lookup-key (current-global-map) "\C-v"))
+ (define-key map "\C-u" (lookup-key (current-global-map) "\C-u"))
+ (define-key map "\C-q" 'term-pager-toggle)
+ ;; The keybinding for term-char-mode is needed by the menubar code.
+ (define-key map "\C-k" 'term-char-mode)
+ (define-key map "\C-j" 'term-line-mode)
+ ;; It's convenient to have execute-extended-command here.
+ (define-key map [?\M-x] 'execute-extended-command)
+ map))
+
+(defun term-set-escape-char (key)
"Change `term-escape-char' and keymaps that depend on it."
(when term-escape-char
+ ;; Undo previous term-set-escape-char.
(define-key term-raw-map term-escape-char 'term-send-raw))
- (setq c (make-string 1 c))
- (define-key term-raw-map c term-raw-escape-map)
- ;; Define standard bindings in term-raw-escape-map
- (define-key term-raw-escape-map "\C-v"
- (lookup-key (current-global-map) "\C-v"))
- (define-key term-raw-escape-map "\C-u"
- (lookup-key (current-global-map) "\C-u"))
- (define-key term-raw-escape-map c 'term-send-raw)
- (define-key term-raw-escape-map "\C-q" 'term-pager-toggle)
- ;; The keybinding for term-char-mode is needed by the menubar code.
- (define-key term-raw-escape-map "\C-k" 'term-char-mode)
- (define-key term-raw-escape-map "\C-j" 'term-line-mode)
- ;; It's convenient to have execute-extended-command here.
- (define-key term-raw-escape-map [?\M-x] 'execute-extended-command))
-
-(let* ((map (make-keymap))
- (esc-map (make-keymap))
- (i 0))
- (while (< i 128)
- (define-key map (make-string 1 i) 'term-send-raw)
- ;; Avoid O and [. They are used in escape sequences for various keys.
- (unless (or (eq i ?O) (eq i 91))
- (define-key esc-map (make-string 1 i) 'term-send-raw-meta))
- (setq i (1+ i)))
- (define-key map [remap self-insert-command] 'term-send-raw)
- (define-key map "\e" esc-map)
- (setq term-raw-map map)
- (setq term-raw-escape-map (copy-keymap 'Control-X-prefix))
-
- ;; Added nearly all the 'gray keys' -mm
+ (setq term-escape-char (vector key))
+ (define-key term-raw-map term-escape-char term-raw-escape-map)
+ ;; FIXME: If we later call term-set-escape-char again with another key,
+ ;; we should undo this binding.
+ (define-key term-raw-escape-map term-escape-char 'term-send-raw))
- (if (featurep 'xemacs)
- (define-key term-raw-map [button2] 'term-mouse-paste)
- (define-key term-raw-map [mouse-2] 'term-mouse-paste)
- (define-key term-raw-map [menu-bar terminal] term-terminal-menu)
- (define-key term-raw-map [menu-bar signals] term-signals-menu))
- (define-key term-raw-map [up] 'term-send-up)
- (define-key term-raw-map [down] 'term-send-down)
- (define-key term-raw-map [right] 'term-send-right)
- (define-key term-raw-map [left] 'term-send-left)
- (define-key term-raw-map [delete] 'term-send-del)
- (define-key term-raw-map [deletechar] 'term-send-del)
- (define-key term-raw-map [backspace] 'term-send-backspace)
- (define-key term-raw-map [home] 'term-send-home)
- (define-key term-raw-map [end] 'term-send-end)
- (define-key term-raw-map [insert] 'term-send-insert)
- (define-key term-raw-map [S-prior] 'scroll-down)
- (define-key term-raw-map [S-next] 'scroll-up)
- (define-key term-raw-map [S-insert] 'term-paste)
- (define-key term-raw-map [prior] 'term-send-prior)
- (define-key term-raw-map [next] 'term-send-next))
-
-(term-set-escape-char ?\C-c)
+(term-set-escape-char (or term-escape-char ?\C-c))
(defvar overflow-newline-into-fringe)
diff --git a/lisp/term/AT386.el b/lisp/term/AT386.el
index bbd408e8fbc..12707c12ba2 100644
--- a/lisp/term/AT386.el
+++ b/lisp/term/AT386.el
@@ -1,4 +1,4 @@
-;;; AT386.el --- terminal support package for IBM AT keyboards -*- no-byte-compile: t -*-
+;;; AT386.el --- terminal support package for IBM AT keyboards
;; Copyright (C) 1992, 2001-2012 Free Software Foundation, Inc.
diff --git a/lisp/term/apollo.el b/lisp/term/apollo.el
index c570a20112b..e4cabac3bf1 100644
--- a/lisp/term/apollo.el
+++ b/lisp/term/apollo.el
@@ -1,4 +1,3 @@
-;; -*- no-byte-compile: t -*-
(defun terminal-init-apollo ()
"Terminal initialization function for apollo."
(tty-run-terminal-initialization (selected-frame) "vt100"))
diff --git a/lisp/term/bobcat.el b/lisp/term/bobcat.el
index d9ab1a5fb16..f26dc6b9198 100644
--- a/lisp/term/bobcat.el
+++ b/lisp/term/bobcat.el
@@ -1,4 +1,3 @@
-;; -*- no-byte-compile: t -*-
(defun terminal-init-bobcat ()
"Terminal initialization function for bobcat."
diff --git a/lisp/term/cygwin.el b/lisp/term/cygwin.el
index cfce07035cf..d69433a77c2 100644
--- a/lisp/term/cygwin.el
+++ b/lisp/term/cygwin.el
@@ -1,4 +1,4 @@
-;;; cygwin.el --- support for the Cygwin terminal -*- no-byte-compile: t -*-
+;;; cygwin.el --- support for the Cygwin terminal
;;; The Cygwin terminal can't really display underlines.
diff --git a/lisp/term/iris-ansi.el b/lisp/term/iris-ansi.el
index 945fe1f5a69..9a9a31f4253 100644
--- a/lisp/term/iris-ansi.el
+++ b/lisp/term/iris-ansi.el
@@ -1,4 +1,4 @@
-;;; iris-ansi.el --- configure Emacs for SGI xwsh and winterm apps -*- no-byte-compile: t -*-
+;;; iris-ansi.el --- configure Emacs for SGI xwsh and winterm apps
;; Copyright (C) 1997, 2001-2012 Free Software Foundation, Inc.
diff --git a/lisp/term/linux.el b/lisp/term/linux.el
index 76115e7d58a..00bcdfdf542 100644
--- a/lisp/term/linux.el
+++ b/lisp/term/linux.el
@@ -1,6 +1,7 @@
-;; -*- no-byte-compile: t -*-
;; The Linux console handles Latin-1 by default.
+(declare-function gpm-mouse-enable "t-mouse" ())
+
(defun terminal-init-linux ()
"Terminal initialization function for linux."
(unless (terminal-coding-system)
diff --git a/lisp/term/lk201.el b/lisp/term/lk201.el
index e1da0f6f1db..76a3a31cedc 100644
--- a/lisp/term/lk201.el
+++ b/lisp/term/lk201.el
@@ -1,4 +1,3 @@
-;; -*- no-byte-compile: t -*-
;; Define function key sequences for DEC terminals.
(defvar lk201-function-map
diff --git a/lisp/term/news.el b/lisp/term/news.el
index 19d0ff3f7e6..70a1be8497e 100644
--- a/lisp/term/news.el
+++ b/lisp/term/news.el
@@ -1,4 +1,4 @@
-;;; news.el --- keypad and function key bindings for the Sony NEWS keyboard -*- no-byte-compile: t -*-
+;;; news.el --- keypad and function key bindings for the Sony NEWS keyboard
;; Copyright (C) 1989, 1993, 2001-2012 Free Software Foundation, Inc.
diff --git a/lisp/term/ns-win.el b/lisp/term/ns-win.el
index b681ec3440f..6dd9eed0d2b 100644
--- a/lisp/term/ns-win.el
+++ b/lisp/term/ns-win.el
@@ -1,4 +1,4 @@
-;;; ns-win.el --- lisp side of interface with NeXT/Open/GNUstep/MacOS X window system
+;;; ns-win.el --- lisp side of interface with NeXT/Open/GNUstep/MacOS X window system -*- lexical-binding: t -*-
;; Copyright (C) 1993-1994, 2005-2012 Free Software Foundation, Inc.
@@ -44,7 +44,7 @@
(error "%s: Loading ns-win.el but not compiled for GNUstep/MacOS"
(invocation-name)))
-(eval-when-compile (require 'cl)) ; lexical-let
+(eval-when-compile (require 'cl))
;; Documentation-purposes only: actually loaded in loadup.el.
(require 'frame)
@@ -65,7 +65,7 @@
;; nsterm.m.
(defvar ns-input-file)
-(defun ns-handle-nxopen (switch &optional temp)
+(defun ns-handle-nxopen (_switch &optional temp)
(setq unread-command-events (append unread-command-events
(if temp '(ns-open-temp-file)
'(ns-open-file)))
@@ -74,7 +74,7 @@
(defun ns-handle-nxopentemp (switch)
(ns-handle-nxopen switch t))
-(defun ns-ignore-1-arg (switch)
+(defun ns-ignore-1-arg (_switch)
(setq x-invocation-args (cdr x-invocation-args)))
(defun ns-parse-geometry (geom)
@@ -201,21 +201,20 @@ The properties returned may include `top', `left', `height', and `width'."
(mapconcat 'identity (cons "ns-service" path) "-")))))
;; This defines the function.
(defalias name
- (lexical-let ((service service))
- (lambda (arg)
- (interactive "p")
- (let* ((in-string
- (cond ((stringp arg) arg)
- (mark-active
- (buffer-substring (region-beginning) (region-end)))))
- (out-string (ns-perform-service service in-string)))
- (cond
- ((stringp arg) out-string)
- ((and out-string (or (not in-string)
- (not (string= in-string out-string))))
- (if mark-active (delete-region (region-beginning) (region-end)))
- (insert out-string)
- (setq deactivate-mark nil)))))))
+ (lambda (arg)
+ (interactive "p")
+ (let* ((in-string
+ (cond ((stringp arg) arg)
+ (mark-active
+ (buffer-substring (region-beginning) (region-end)))))
+ (out-string (ns-perform-service service in-string)))
+ (cond
+ ((stringp arg) out-string)
+ ((and out-string (or (not in-string)
+ (not (string= in-string out-string))))
+ (if mark-active (delete-region (region-beginning) (region-end)))
+ (insert out-string)
+ (setq deactivate-mark nil))))))
(cond
((lookup-key global-map mapping)
(while (cdr path)
@@ -924,6 +923,7 @@ See the documentation of `create-fontset-from-fontset-spec' for the format.")
;; http://lists.gnu.org/archive/html/emacs-devel/2011-06/msg00505.html
(ns-set-resource nil "ApplePressAndHoldEnabled" "NO")
+ (x-apply-session-resources)
(setq ns-initialized t))
(add-to-list 'handle-args-function-alist '(ns . x-handle-args))
diff --git a/lisp/term/screen.el b/lisp/term/screen.el
index 4931a422e09..d37a695086a 100644
--- a/lisp/term/screen.el
+++ b/lisp/term/screen.el
@@ -1,7 +1,8 @@
-;; -*- no-byte-compile: t -*-
;; Treat a screen terminal similar to an xterm.
(load "term/xterm")
+(declare-function xterm-register-default-colors "xterm" ())
+
(defun terminal-init-screen ()
"Terminal initialization function for screen."
;; Use the xterm color initialization code.
diff --git a/lisp/term/vt102.el b/lisp/term/vt102.el
index 0f2e3805f58..261b0bb5fd6 100644
--- a/lisp/term/vt102.el
+++ b/lisp/term/vt102.el
@@ -1,4 +1,3 @@
-;; -*- no-byte-compile: t -*-
(defun terminal-init-vt102 ()
"Terminal initialization function for vt102."
diff --git a/lisp/term/vt125.el b/lisp/term/vt125.el
index 029f762ef3f..2b2098d483d 100644
--- a/lisp/term/vt125.el
+++ b/lisp/term/vt125.el
@@ -1,4 +1,3 @@
-;; -*- no-byte-compile: t -*-
(defun terminal-init-vt125 ()
"Terminal initialization function for vt125."
diff --git a/lisp/term/vt200.el b/lisp/term/vt200.el
index 09ad64d01f6..550266816e0 100644
--- a/lisp/term/vt200.el
+++ b/lisp/term/vt200.el
@@ -1,4 +1,3 @@
-;; -*- no-byte-compile: t -*-
;; For our purposes we can treat the vt200 and vt100 almost alike.
;; Most differences are handled by the termcap entry.
(defun terminal-init-vt200 ()
diff --git a/lisp/term/vt201.el b/lisp/term/vt201.el
index cbeba00b651..a65b4737731 100644
--- a/lisp/term/vt201.el
+++ b/lisp/term/vt201.el
@@ -1,4 +1,3 @@
-;; -*- no-byte-compile: t -*-
;; For our purposes we can treat the vt200 and vt100 almost alike.
;; Most differences are handled by the termcap entry.
(defun terminal-init-vt201 ()
diff --git a/lisp/term/vt220.el b/lisp/term/vt220.el
index 647b79ea357..0dd43353c55 100644
--- a/lisp/term/vt220.el
+++ b/lisp/term/vt220.el
@@ -1,4 +1,3 @@
-;; -*- no-byte-compile: t -*-
;; For our purposes we can treat the vt200 and vt100 almost alike.
;; Most differences are handled by the termcap entry.
(defun terminal-init-vt220 ()
diff --git a/lisp/term/vt240.el b/lisp/term/vt240.el
index 2da4e7ed3c7..b58d4211ce7 100644
--- a/lisp/term/vt240.el
+++ b/lisp/term/vt240.el
@@ -1,4 +1,3 @@
-;; -*- no-byte-compile: t -*-
;; For our purposes we can treat the vt200 and vt100 almost alike.
;; Most differences are handled by the termcap entry.
(defun terminal-init-vt240 ()
diff --git a/lisp/term/vt300.el b/lisp/term/vt300.el
index 52198d840ae..a2664552a64 100644
--- a/lisp/term/vt300.el
+++ b/lisp/term/vt300.el
@@ -1,4 +1,3 @@
-;; -*- no-byte-compile: t -*-
(defun terminal-init-vt300 ()
"Terminal initialization function for vt300."
(tty-run-terminal-initialization (selected-frame) "vt100")
diff --git a/lisp/term/vt320.el b/lisp/term/vt320.el
index 9b04a5d6ee4..08ed9a8ffb9 100644
--- a/lisp/term/vt320.el
+++ b/lisp/term/vt320.el
@@ -1,4 +1,3 @@
-;; -*- no-byte-compile: t -*-
(defun terminal-init-vt320 ()
"Terminal initialization function for vt320."
(tty-run-terminal-initialization (selected-frame) "vt100")
diff --git a/lisp/term/vt400.el b/lisp/term/vt400.el
index 4c5870c5ad8..ad4a5fdbb4f 100644
--- a/lisp/term/vt400.el
+++ b/lisp/term/vt400.el
@@ -1,4 +1,3 @@
-;; -*- no-byte-compile: t -*-
(defun terminal-init-vt400 ()
"Terminal initialization function for vt400."
(tty-run-terminal-initialization (selected-frame) "vt100")
diff --git a/lisp/term/vt420.el b/lisp/term/vt420.el
index 0476b639c23..f6745a3953a 100644
--- a/lisp/term/vt420.el
+++ b/lisp/term/vt420.el
@@ -1,4 +1,3 @@
-;; -*- no-byte-compile: t -*-
(defun terminal-init-vt420 ()
"Terminal initialization function for vt420."
(tty-run-terminal-initialization (selected-frame) "vt100")
diff --git a/lisp/term/w32-win.el b/lisp/term/w32-win.el
index 3e1c4161667..a4fac3441db 100644
--- a/lisp/term/w32-win.el
+++ b/lisp/term/w32-win.el
@@ -309,6 +309,7 @@ See the documentation of `create-fontset-from-fontset-spec' for the format.")
;; Set to a system sound if you want a fancy bell.
(set-message-beep 'ok)
+ (x-apply-session-resources)
(setq w32-initialized t))
(add-to-list 'handle-args-function-alist '(w32 . x-handle-args))
diff --git a/lisp/term/wyse50.el b/lisp/term/wyse50.el
index f08ababe0df..d037962af19 100644
--- a/lisp/term/wyse50.el
+++ b/lisp/term/wyse50.el
@@ -1,4 +1,4 @@
-;;; wyse50.el --- terminal support code for Wyse 50 -*- no-byte-compile: t -*-
+;;; wyse50.el --- terminal support code for Wyse 50
;; Copyright (C) 1989, 1993-1994, 2001-2012 Free Software Foundation, Inc.
@@ -141,7 +141,7 @@ C-l Scrn CLR
M-r M-x move-to-window-line, Funct up-arrow or down-arrow are similar"
(interactive)
;; Not needed any more now that we use input-decode-map.
- ;; (dolist (key-definition
+ ;; (dolist (key-definition
;; ;; By unsetting C-a and then binding it to a prefix, we
;; ;; allow the rest of the function keys which start with C-a
;; ;; to be recognized.
diff --git a/lisp/term/x-win.el b/lisp/term/x-win.el
index 21d49267b21..498cc01fe22 100644
--- a/lisp/term/x-win.el
+++ b/lisp/term/x-win.el
@@ -1445,6 +1445,7 @@ Request data types in the order specified by `x-select-request-type'."
;; :help "Paste (yank) text most recently cut/copied")
;; nil))
+ (x-apply-session-resources)
(setq x-initialized t))
(add-to-list 'handle-args-function-alist '(x . x-handle-args))
diff --git a/lisp/term/xterm.el b/lisp/term/xterm.el
index 7e56cd9fa1d..51e5aa5796d 100644
--- a/lisp/term/xterm.el
+++ b/lisp/term/xterm.el
@@ -27,7 +27,7 @@
(defgroup xterm nil
"XTerm support."
:version "24.1"
- :group 'emacs)
+ :group 'environment)
(defcustom xterm-extra-capabilities 'check
"Whether Xterm supports some additional, more modern, features.
diff --git a/lisp/textmodes/flyspell.el b/lisp/textmodes/flyspell.el
index 72a3eb474f8..c0b0a837a9d 100644
--- a/lisp/textmodes/flyspell.el
+++ b/lisp/textmodes/flyspell.el
@@ -143,10 +143,9 @@ whose length is specified by `flyspell-delay'."
:type '(repeat (symbol)))
(defcustom flyspell-default-deplacement-commands
- '(next-line
- previous-line
- scroll-up
- scroll-down)
+ '(next-line previous-line
+ handle-switch-frame handle-select-window
+ scroll-up scroll-down)
"The standard list of deplacement commands for Flyspell.
See `flyspell-deplacement-commands'."
:group 'flyspell
@@ -631,7 +630,7 @@ in your .emacs file.
(defun flyspell-delay-commands ()
"Install the standard set of Flyspell delayed commands."
(mapc 'flyspell-delay-command flyspell-default-delayed-commands)
- (mapcar 'flyspell-delay-command flyspell-delayed-commands))
+ (mapc 'flyspell-delay-command flyspell-delayed-commands))
;;*---------------------------------------------------------------------*/
;;* flyspell-delay-command ... */
@@ -639,7 +638,7 @@ in your .emacs file.
(defun flyspell-delay-command (command)
"Set COMMAND to be delayed, for Flyspell.
When flyspell `post-command-hook' is invoked because a delayed command
-as been used the current word is not immediately checked.
+has been used, the current word is not immediately checked.
It will be checked only after `flyspell-delay' seconds."
(interactive "SDelay Flyspell after Command: ")
(put command 'flyspell-delayed t))
@@ -650,16 +649,15 @@ It will be checked only after `flyspell-delay' seconds."
(defun flyspell-deplacement-commands ()
"Install the standard set of Flyspell deplacement commands."
(mapc 'flyspell-deplacement-command flyspell-default-deplacement-commands)
- (mapcar 'flyspell-deplacement-command flyspell-deplacement-commands))
+ (mapc 'flyspell-deplacement-command flyspell-deplacement-commands))
;;*---------------------------------------------------------------------*/
;;* flyspell-deplacement-command ... */
;;*---------------------------------------------------------------------*/
(defun flyspell-deplacement-command (command)
"Set COMMAND that implement cursor movements, for Flyspell.
-When flyspell `post-command-hook' is invoked because of a deplacement command
-as been used the current word is checked only if the previous command was
-not the very same deplacement command."
+When flyspell `post-command-hook' is invoked because a deplacement command
+has been used, the current word is not checked."
(interactive "SDeplacement Flyspell after Command: ")
(put command 'flyspell-deplacement t))
@@ -680,12 +678,12 @@ not the very same deplacement command."
;;* post command hook, we will check, if the word at this position */
;;* has to be spell checked. */
;;*---------------------------------------------------------------------*/
-(defvar flyspell-pre-buffer nil)
-(defvar flyspell-pre-point nil)
-(defvar flyspell-pre-column nil)
+(defvar flyspell-pre-buffer nil "Buffer current before `this-command'.")
+(defvar flyspell-pre-point nil "Point before running `this-command'")
+(defvar flyspell-pre-column nil "Column before running `this-command'")
(defvar flyspell-pre-pre-buffer nil)
(defvar flyspell-pre-pre-point nil)
-(make-variable-buffer-local 'flyspell-pre-point)
+(make-variable-buffer-local 'flyspell-pre-point) ;Why?? --Stef
;;*---------------------------------------------------------------------*/
;;* flyspell-previous-command ... */
@@ -709,18 +707,18 @@ not the very same deplacement command."
;;;###autoload
(defun flyspell-mode-off ()
"Turn Flyspell mode off."
- ;; we remove the hooks
+ ;; We remove the hooks.
(remove-hook 'post-command-hook (function flyspell-post-command-hook) t)
(remove-hook 'pre-command-hook (function flyspell-pre-command-hook) t)
(remove-hook 'after-change-functions 'flyspell-after-change-function t)
(remove-hook 'hack-local-variables-hook
(function flyspell-hack-local-variables-hook) t)
- ;; we remove all the flyspell highlightings
+ ;; We remove all the flyspell highlightings.
(flyspell-delete-all-overlays)
- ;; we have to erase pre cache variables
+ ;; We have to erase pre cache variables.
(setq flyspell-pre-buffer nil)
(setq flyspell-pre-point nil)
- ;; we mark the mode as killed
+ ;; We mark the mode as killed.
(setq flyspell-mode nil))
;;*---------------------------------------------------------------------*/
@@ -730,39 +728,49 @@ not the very same deplacement command."
"Return non-nil if we should check the word before point.
More precisely, it applies to the word that was before point
before the current command."
- (cond
- ((or (not (numberp flyspell-pre-point))
- (not (bufferp flyspell-pre-buffer))
- (not (buffer-live-p flyspell-pre-buffer)))
- nil)
- ((and (eq flyspell-pre-pre-point flyspell-pre-point)
- (eq flyspell-pre-pre-buffer flyspell-pre-buffer))
- nil)
- ((or (and (= flyspell-pre-point (- (point) 1))
- (eq (char-syntax (char-after flyspell-pre-point)) ?w))
- (= flyspell-pre-point (point))
- (= flyspell-pre-point (+ (point) 1)))
- nil)
- ((and (symbolp this-command)
- (not executing-kbd-macro)
- (or (get this-command 'flyspell-delayed)
- (and (get this-command 'flyspell-deplacement)
- (eq flyspell-previous-command this-command)))
- (or (= (current-column) 0)
- (= (current-column) flyspell-pre-column)
- ;; If other post-command-hooks change the buffer,
- ;; flyspell-pre-point can lie past eob (bug#468).
- (null (char-after flyspell-pre-point))
- (eq (char-syntax (char-after flyspell-pre-point)) ?w)))
- nil)
- ((not (eq (current-buffer) flyspell-pre-buffer))
- t)
- ((not (and (numberp flyspell-word-cache-start)
- (numberp flyspell-word-cache-end)))
- t)
- (t
- (or (< flyspell-pre-point flyspell-word-cache-start)
- (> flyspell-pre-point flyspell-word-cache-end)))))
+ (let ((ispell-otherchars (ispell-get-otherchars)))
+ (cond
+ ((not (and (numberp flyspell-pre-point)
+ (buffer-live-p flyspell-pre-buffer)))
+ nil)
+ ((and (eq flyspell-pre-pre-point flyspell-pre-point)
+ (eq flyspell-pre-pre-buffer flyspell-pre-buffer))
+ nil)
+ ((or (and (= flyspell-pre-point (- (point) 1))
+ (or (eq (char-syntax (char-after flyspell-pre-point)) ?w)
+ (and (not (string= "" ispell-otherchars))
+ (string-match-p
+ ispell-otherchars
+ (buffer-substring-no-properties
+ flyspell-pre-point (1+ flyspell-pre-point))))))
+ (= flyspell-pre-point (point))
+ (= flyspell-pre-point (+ (point) 1)))
+ nil)
+ ((and (symbolp this-command)
+ (not executing-kbd-macro)
+ (or (get this-command 'flyspell-delayed)
+ (and (get this-command 'flyspell-deplacement)
+ (eq flyspell-previous-command this-command)))
+ (or (= (current-column) 0)
+ (= (current-column) flyspell-pre-column)
+ ;; If other post-command-hooks change the buffer,
+ ;; flyspell-pre-point can lie past eob (bug#468).
+ (null (char-after flyspell-pre-point))
+ (or (eq (char-syntax (char-after flyspell-pre-point)) ?w)
+ (and (not (string= "" ispell-otherchars))
+ (string-match-p
+ ispell-otherchars
+ (buffer-substring-no-properties
+ flyspell-pre-point (1+ flyspell-pre-point)))))))
+ nil)
+ ((not (eq (current-buffer) flyspell-pre-buffer))
+ t)
+ ((not (and (numberp flyspell-word-cache-start)
+ (numberp flyspell-word-cache-end)))
+ t)
+ (t
+ (or (< flyspell-pre-point flyspell-word-cache-start)
+ (> flyspell-pre-point flyspell-word-cache-end))))))
;;*---------------------------------------------------------------------*/
;;* The flyspell after-change-hook, store the change position. In */
@@ -783,21 +791,15 @@ before the current command."
;;* flyspell-check-changed-word-p ... */
;;*---------------------------------------------------------------------*/
(defun flyspell-check-changed-word-p (start stop)
- "Return t when the changed word has to be checked.
+ "Return non-nil when the changed word has to be checked.
The answer depends of several criteria.
Mostly we check word delimiters."
- (cond
- ((and (memq (char-after start) '(?\n ? )) (> stop start))
- t)
- ((not (numberp flyspell-pre-point))
- t)
- ((and (>= flyspell-pre-point start) (<= flyspell-pre-point stop))
- nil)
- ((let ((pos (point)))
- (or (>= pos start) (<= pos stop) (= pos (1+ stop))))
- nil)
- (t
- t)))
+ (not (and (not (and (memq (char-after start) '(?\n ? )) (> stop start)))
+ (numberp flyspell-pre-point)
+ (or
+ (and (>= flyspell-pre-point start) (<= flyspell-pre-point stop))
+ (let ((pos (point)))
+ (or (>= pos start) (<= pos stop) (= pos (1+ stop))))))))
;;*---------------------------------------------------------------------*/
;;* flyspell-check-word-p ... */
@@ -806,30 +808,33 @@ Mostly we check word delimiters."
"Return t when the word at `point' has to be checked.
The answer depends of several criteria.
Mostly we check word delimiters."
- (cond
- ((<= (- (point-max) 1) (point-min))
- ;; the buffer is not filled enough
- nil)
- ((and (and (> (current-column) 0)
- (not (eq (current-column) flyspell-pre-column)))
- (save-excursion
- (backward-char 1)
- (and (looking-at (flyspell-get-not-casechars))
- (or flyspell-consider-dash-as-word-delimiter-flag
- (not (looking-at "-"))))))
- ;; yes because we have reached or typed a word delimiter.
- t)
- ((symbolp this-command)
+ (let ((ispell-otherchars (ispell-get-otherchars)))
(cond
- ((get this-command 'flyspell-deplacement)
- (not (eq flyspell-previous-command this-command)))
- ((get this-command 'flyspell-delayed)
- ;; the current command is not delayed, that
- ;; is that we must check the word now
- (and (not unread-command-events)
- (sit-for flyspell-delay)))
- (t t)))
- (t t)))
+ ((<= (- (point-max) 1) (point-min))
+ ;; The buffer is not filled enough.
+ nil)
+ ((and (and (> (current-column) 0)
+ (not (eq (current-column) flyspell-pre-column)))
+ (save-excursion
+ (backward-char 1)
+ (and (looking-at (flyspell-get-not-casechars))
+ (or (string= "" ispell-otherchars)
+ (not (looking-at ispell-otherchars)))
+ (or flyspell-consider-dash-as-word-delimiter-flag
+ (not (looking-at "-"))))))
+ ;; Yes because we have reached or typed a word delimiter.
+ t)
+ ((symbolp this-command)
+ (cond
+ ((get this-command 'flyspell-deplacement)
+ (not (eq flyspell-previous-command this-command)))
+ ((get this-command 'flyspell-delayed)
+ ;; The current command is not delayed, that
+ ;; is that we must check the word now.
+ (and (not unread-command-events)
+ (sit-for flyspell-delay)))
+ (t t)))
+ (t t))))
;;*---------------------------------------------------------------------*/
;;* flyspell-debug-signal-no-check ... */
@@ -859,52 +864,55 @@ Mostly we check word delimiters."
;;*---------------------------------------------------------------------*/
(defun flyspell-debug-signal-word-checked ()
(setq debug-on-error t)
- (let ((oldbuf (current-buffer))
+ (let ((ispell-otherchars (ispell-get-otherchars))
+ (oldbuf (current-buffer))
(point (point)))
(with-current-buffer (get-buffer-create "*flyspell-debug*")
- (insert "WORD:\n")
- (insert (format " this-cmd : %S\n" this-command))
- (insert (format " delayed : %S\n" (and (symbolp this-command)
- (get this-command 'flyspell-delayed))))
- (insert (format " point : %S\n" point))
- (insert (format " prev-char : [%c] %S\n"
- (with-current-buffer oldbuf
- (let ((c (if (> (point) (point-min))
- (save-excursion
- (backward-char 1)
- (char-after (point)))
- ? )))
- c))
- (with-current-buffer oldbuf
- (let ((c (if (> (point) (point-min))
- (save-excursion
- (backward-char 1)
- (and (and (looking-at (flyspell-get-not-casechars)) 1)
- (and (or flyspell-consider-dash-as-word-delimiter-flag
- (not (looking-at "\\-"))) 2))))))
- c))))
- (insert (format " because : %S\n"
- (cond
- ((not (and (symbolp this-command)
- (get this-command 'flyspell-delayed)))
- ;; the current command is not delayed, that
- ;; is that we must check the word now
- 'not-delayed)
- ((with-current-buffer oldbuf
- (let ((c (if (> (point) (point-min))
- (save-excursion
- (backward-char 1)
- (and (looking-at (flyspell-get-not-casechars))
- (or flyspell-consider-dash-as-word-delimiter-flag
- (not (looking-at "\\-"))))))))
- c))
- ;; yes because we have reached or typed a word delimiter.
- 'separator)
- ((not (integerp flyspell-delay))
- ;; yes because the user had set up a no-delay configuration.
- 'no-delay)
- (t
- 'sit-for))))
+ (insert
+ "WORD:\n"
+ (format " this-cmd : %S\n" this-command)
+ (format " delayed : %S\n" (and (symbolp this-command)
+ (get this-command
+ 'flyspell-delayed)))
+ (format " point : %S\n" point)
+ (format " prev-char : [%c] %S\n"
+ (with-current-buffer oldbuf
+ (if (bobp) ?\ (char-before)))
+ (with-current-buffer oldbuf
+ (if (bobp)
+ nil
+ (save-excursion
+ (backward-char 1)
+ (and (looking-at (flyspell-get-not-casechars))
+ (or (string= "" ispell-otherchars)
+ (not (looking-at ispell-otherchars)))
+ (or flyspell-consider-dash-as-word-delimiter-flag
+ (not (looking-at "\\-")))
+ 2)))))
+ (format " because : %S\n"
+ (cond
+ ((not (and (symbolp this-command)
+ (get this-command 'flyspell-delayed)))
+ ;; The current command is not delayed, that
+ ;; is that we must check the word now.
+ 'not-delayed)
+ ((with-current-buffer oldbuf
+ (if (bobp)
+ nil
+ (save-excursion
+ (backward-char 1)
+ (and (looking-at (flyspell-get-not-casechars))
+ (or (string= "" ispell-otherchars)
+ (not (looking-at ispell-otherchars)))
+ (or flyspell-consider-dash-as-word-delimiter-flag
+ (not (looking-at "\\-")))))))
+ ;; Yes because we have reached or typed a word delimiter.
+ 'separator)
+ ((not (integerp flyspell-delay))
+ ;; Yes because the user set up a no-delay configuration.
+ 'no-delay)
+ (t
+ 'sit-for))))
(goto-char (point-max)))))
;;*---------------------------------------------------------------------*/
@@ -927,7 +935,7 @@ Mostly we check word delimiters."
;;* 2- the word that used to be the current word before the */
;;* THIS-COMMAND is checked if: */
;;* a- the previous word is different from the current word */
-;;* b- the previous word as not just been checked by the */
+;;* b- the previous word has not just been checked by the */
;;* previous FLYSPELL-POST-COMMAND-HOOK */
;;* 3- the words changed by the THIS-COMMAND that are neither the */
;;* previous word nor the current word */
@@ -954,7 +962,7 @@ Mostly we check word delimiters."
;; we remember which word we have just checked.
;; this will be used next time we will check a word
;; to compare the next current word with the word
- ;; that as been registered in the pre-command-hook
+ ;; that has been registered in the pre-command-hook
;; that is these variables are used within the predicate
;; FLYSPELL-CHECK-PRE-WORD-P
(setq flyspell-pre-pre-buffer (current-buffer))
@@ -1221,63 +1229,8 @@ misspelling and skips redundant spell-checking step."
(>= (match-end 0) b))))))
(flyspell-math-tex-command-p)))
-;;*---------------------------------------------------------------------*/
-;;* flyspell-casechars-cache ... */
-;;*---------------------------------------------------------------------*/
-(defvar flyspell-casechars-cache nil)
-(defvar flyspell-ispell-casechars-cache nil)
-(make-variable-buffer-local 'flyspell-casechars-cache)
-(make-variable-buffer-local 'flyspell-ispell-casechars-cache)
-
-;;*---------------------------------------------------------------------*/
-;;* flyspell-get-casechars ... */
-;;*---------------------------------------------------------------------*/
-(defun flyspell-get-casechars ()
- "This function builds a string that is the regexp of word chars.
-In order to avoid one useless string construction,
-this function changes the last char of the `ispell-casechars' string."
- (let ((ispell-casechars (ispell-get-casechars)))
- (cond
- ((eq ispell-parser 'tex)
- (setq flyspell-ispell-casechars-cache ispell-casechars)
- (setq flyspell-casechars-cache
- (concat (substring ispell-casechars
- 0
- (- (length ispell-casechars) 1))
- "]"))
- flyspell-casechars-cache)
- (t
- (setq flyspell-ispell-casechars-cache ispell-casechars)
- (setq flyspell-casechars-cache ispell-casechars)
- flyspell-casechars-cache))))
-
-;;*---------------------------------------------------------------------*/
-;;* flyspell-get-not-casechars-cache ... */
-;;*---------------------------------------------------------------------*/
-(defvar flyspell-not-casechars-cache nil)
-(defvar flyspell-ispell-not-casechars-cache nil)
-(make-variable-buffer-local 'flyspell-not-casechars-cache)
-(make-variable-buffer-local 'flyspell-ispell-not-casechars-cache)
-
-;;*---------------------------------------------------------------------*/
-;;* flyspell-get-not-casechars ... */
-;;*---------------------------------------------------------------------*/
-(defun flyspell-get-not-casechars ()
- "This function builds a string that is the regexp of non-word chars."
- (let ((ispell-not-casechars (ispell-get-not-casechars)))
- (cond
- ((eq ispell-parser 'tex)
- (setq flyspell-ispell-not-casechars-cache ispell-not-casechars)
- (setq flyspell-not-casechars-cache
- (concat (substring ispell-not-casechars
- 0
- (- (length ispell-not-casechars) 1))
- "]"))
- flyspell-not-casechars-cache)
- (t
- (setq flyspell-ispell-not-casechars-cache ispell-not-casechars)
- (setq flyspell-not-casechars-cache ispell-not-casechars)
- flyspell-not-casechars-cache))))
+(defalias 'flyspell-get-casechars 'ispell-get-casechars)
+(defalias 'flyspell-get-not-casechars 'ispell-get-not-casechars)
;;*---------------------------------------------------------------------*/
;;* flyspell-get-word ... */
@@ -1414,7 +1367,7 @@ The buffer to mark them in is `flyspell-large-region-buffer'."
(goto-char buffer-scan-pos)
(let ((keep t))
;; Iterate on string search until string is found as word,
- ;; not as substring
+ ;; not as substring.
(while keep
(if (search-forward word
flyspell-large-region-end t)
@@ -1430,13 +1383,14 @@ The buffer to mark them in is `flyspell-large-region-buffer'."
(when (or
;; Size matches, we really found it.
(= found-length misspell-length)
- ;; Matches as part of a boundary-char separated word
+ ;; Matches as part of a boundary-char separated
+ ;; word.
(member word
(split-string found ispell-otherchars))
;; Misspelling has higher length than
- ;; what flyspell considers the
- ;; word. Caused by boundary-chars
- ;; mismatch. Validating seems safe.
+ ;; what flyspell considers the word.
+ ;; Caused by boundary-chars mismatch.
+ ;; Validating seems safe.
(< found-length misspell-length)
;; ispell treats beginning of some TeX
;; commands as nroff control sequences
@@ -1479,7 +1433,8 @@ The buffer to mark them in is `flyspell-large-region-buffer'."
;;* declared correct. */
;;*---------------------------------------------------------------------*/
(defun flyspell-process-localwords (misspellings-buffer)
- (let (localwords case-fold-search
+ (let ((localwords ispell-buffer-session-localwords)
+ case-fold-search
(ispell-casechars (ispell-get-casechars)))
;; Get localwords from the original buffer
(save-excursion
@@ -1900,11 +1855,11 @@ This command proposes various successive corrections for the current word."
(interactive)
(let ((pos (point))
(old-max (point-max)))
- ;; use the correct dictionary
+ ;; Use the correct dictionary.
(flyspell-accept-buffer-local-defs)
(if (and (eq flyspell-auto-correct-pos pos)
(consp flyspell-auto-correct-region))
- ;; we have already been using the function at the same location
+ ;; We have already been using the function at the same location.
(let* ((start (car flyspell-auto-correct-region))
(len (cdr flyspell-auto-correct-region)))
(flyspell-unhighlight-at start)
@@ -1926,7 +1881,7 @@ This command proposes various successive corrections for the current word."
(flyspell-display-next-corrections flyspell-auto-correct-ring))
(flyspell-ajust-cursor-point pos (point) old-max)
(setq flyspell-auto-correct-pos (point)))
- ;; fetch the word to be checked
+ ;; Fetch the word to be checked.
(let ((word (flyspell-get-word)))
(if (consp word)
(let ((start (car (cdr word)))
@@ -1934,30 +1889,30 @@ This command proposes various successive corrections for the current word."
(word (car word))
poss ispell-filter)
(setq flyspell-auto-correct-word word)
- ;; now check spelling of word.
- (ispell-send-string "%\n") ;put in verbose mode
+ ;; Now check spelling of word..
+ (ispell-send-string "%\n") ;Put in verbose mode.
(ispell-send-string (concat "^" word "\n"))
- ;; wait until ispell has processed word.
+ ;; Wait until ispell has processed word.
(while (progn
(accept-process-output ispell-process)
(not (string= "" (car ispell-filter)))))
- ;; Remove leading empty element
+ ;; Remove leading empty element.
(setq ispell-filter (cdr ispell-filter))
- ;; ispell process should return something after word is sent.
- ;; Tag word as valid (i.e., skip) otherwise
+ ;; Ispell process should return something after word is sent.
+ ;; Tag word as valid (i.e., skip) otherwise.
(or ispell-filter
(setq ispell-filter '(*)))
(if (consp ispell-filter)
(setq poss (ispell-parse-output (car ispell-filter))))
(cond
((or (eq poss t) (stringp poss))
- ;; don't correct word
+ ;; Don't correct word.
t)
((null poss)
- ;; ispell error
+ ;; Ispell error.
(error "Ispell: error in Ispell process"))
(t
- ;; the word is incorrect, we have to propose a replacement
+ ;; The word is incorrect, we have to propose a replacement.
(let ((replacements (if flyspell-sort-corrections
(sort (car (cdr (cdr poss))) 'string<)
(car (cdr (cdr poss))))))
@@ -2147,6 +2102,9 @@ If OPOINT is non-nil, restore point there after adjusting it for replacement."
(setq ispell-pdict-modified-p '(t)))
((or (eq replace 'buffer) (eq replace 'session))
(ispell-send-string (concat "@" word "\n"))
+ (add-to-list 'ispell-buffer-session-localwords word)
+ (or ispell-buffer-local-name ; session localwords might conflict
+ (setq ispell-buffer-local-name (buffer-name)))
(flyspell-unhighlight-at cursor-location)
(if (null ispell-pdict-modified-p)
(setq ispell-pdict-modified-p
diff --git a/lisp/textmodes/ispell.el b/lisp/textmodes/ispell.el
index 53822694698..892f43e09fe 100644
--- a/lisp/textmodes/ispell.el
+++ b/lisp/textmodes/ispell.el
@@ -349,9 +349,9 @@ Must be greater than 1."
:group 'ispell)
(defcustom ispell-program-name
- (or (locate-file "aspell" exec-path exec-suffixes 'file-executable-p)
- (locate-file "ispell" exec-path exec-suffixes 'file-executable-p)
- (locate-file "hunspell" exec-path exec-suffixes 'file-executable-p)
+ (or (executable-find "aspell")
+ (executable-find "ispell")
+ (executable-find "hunspell")
"ispell")
"Program invoked by \\[ispell-word] and \\[ispell-region] commands."
:type 'string
@@ -909,7 +909,7 @@ Otherwise returns the library directory name, if that is defined."
;;;###autoload
(defvar ispell-menu-map nil "Key map for ispell menu.")
-;;; redo menu when loading ispell to get dictionary modifications
+;; Redo menu when loading ispell to get dictionary modifications
(setq ispell-menu-map nil)
;;;###autoload
@@ -1175,7 +1175,7 @@ The variable `ispell-library-directory' defines their location."
(push name dict-list)))
dict-list))
-;;; define commands in menu in opposite order you want them to appear.
+;; Define commands in menu in opposite order you want them to appear.
;;;###autoload
(if ispell-menu-map-needed
(progn
@@ -1184,7 +1184,8 @@ The variable `ispell-library-directory' defines their location."
`(menu-item ,(purecopy "Change Dictionary...") ispell-change-dictionary
:help ,(purecopy "Supply explicit dictionary file name")))
(define-key ispell-menu-map [ispell-kill-ispell]
- `(menu-item ,(purecopy "Kill Process") ispell-kill-ispell
+ `(menu-item ,(purecopy "Kill Process")
+ (lambda () (interactive) (ispell-kill-ispell nil 'clear))
:enable (and (boundp 'ispell-process) ispell-process
(eq (ispell-process-status) 'run))
:help ,(purecopy "Terminate Ispell subprocess")))
@@ -1268,7 +1269,7 @@ The variable `ispell-library-directory' defines their location."
["Continue Check" ispell-continue t]
["Complete Word Frag"ispell-complete-word-interior-frag t]
["Complete Word" ispell-complete-word t]
- ["Kill Process" ispell-kill-ispell t]
+ ["Kill Process" (ispell-kill-ispell nil 'clear) t]
["Customize..." (customize-group 'ispell) t]
;; flyspell-mode may not be bound...
;;["flyspell" flyspell-mode
@@ -1371,9 +1372,9 @@ Protects against bogus binding of `enable-multibyte-characters' in XEmacs."
(defvar ispell-pdict-modified-p nil
"Non-nil means personal dictionary has modifications to be saved.")
-;;; If you want to save the dictionary when quitting, must do so explicitly.
-;;; When non-nil, the spell session is terminated.
-;;; When numeric, contains cursor location in buffer, and cursor remains there.
+;; If you want to save the dictionary when quitting, must do so explicitly.
+;; When non-nil, the spell session is terminated.
+;; When numeric, contains cursor location in buffer, and cursor remains there.
(defvar ispell-quit nil)
(defvar ispell-process-directory nil
@@ -1537,6 +1538,11 @@ local variable syntax.")
"Contains the buffer name if local word definitions were used.
Ispell is then restarted because the local words could conflict.")
+(defvar ispell-buffer-session-localwords nil
+ "List of words accepted for session in this buffer.")
+
+(make-variable-buffer-local 'ispell-buffer-session-localwords)
+
(defvar ispell-parser 'use-mode-name
"Indicates whether ispell should parse the current buffer as TeX Code.
Special value `use-mode-name' tries to guess using the name of `major-mode'.
@@ -1665,16 +1671,6 @@ This allows it to improve the suggestion list based on actual misspellings."
(setq more-lines (= 0 (forward-line))))))))))))))
-;; Insert WORD while possibly translating characters by
-;; translation-table-for-input.
-(defun ispell-insert-word (word)
- (let ((pos (point)))
- (insert word)
- ;; Avoid "obsolete" warnings for translation-table-for-input.
- (with-no-warnings
- (if (char-table-p translation-table-for-input)
- (translate-region pos (point) translation-table-for-input)))))
-
;;;###autoload
(defun ispell-word (&optional following quietly continue region)
"Check spelling of word under or before the cursor.
@@ -1787,7 +1783,7 @@ quit spell session exited."
;; Insert first and then delete,
;; to avoid collapsing markers before and after
;; into a single place.
- (ispell-insert-word new-word)
+ (insert new-word)
(delete-region (point) end)
;; It is meaningless to preserve the cursor position
;; inside a word that has changed.
@@ -1878,10 +1874,10 @@ which is in `ispell-local-dictionary-alist' or `ispell-dictionary-alist'."
(list word start end))))
-;;; Global ispell-pdict-modified-p is set by ispell-command-loop and
-;;; tracks changes in the dictionary. The global may either be
-;;; a value or a list, whose value is the state of whether the
-;;; dictionary needs to be saved.
+;; Global ispell-pdict-modified-p is set by ispell-command-loop and
+;; tracks changes in the dictionary. The global may either be
+;; a value or a list, whose value is the state of whether the
+;; dictionary needs to be saved.
;;;###autoload
(defun ispell-pdict-save (&optional no-query force-save)
@@ -2035,6 +2031,9 @@ Global `ispell-quit' set to start location to continue spell session."
nil)
((or (= char ?a) (= char ?A)) ; accept word without insert
(ispell-send-string (concat "@" word "\n"))
+ (add-to-list 'ispell-buffer-session-localwords word)
+ (or ispell-buffer-local-name ; session localwords might conflict
+ (setq ispell-buffer-local-name (buffer-name)))
(if (null ispell-pdict-modified-p)
(setq ispell-pdict-modified-p
(list ispell-pdict-modified-p)))
@@ -2417,8 +2416,8 @@ if defined."
(setq start end)))))) ; else move start to next line of input
-;;; This function destroys the mark location if it is in the word being
-;;; highlighted.
+;; This function destroys the mark location if it is in the word being
+;; highlighted.
(defun ispell-highlight-spelling-error-generic (start end &optional highlight
refresh)
"Highlight the word from START to END with a kludge using `inverse-video'.
@@ -2550,7 +2549,7 @@ scrolling the current window. Leave the new window selected."
(set-window-start (next-window) top))))
-;;; Should we add a compound word match return value?
+;; Should we add a compound word match return value?
(defun ispell-parse-output (output &optional accept-list shift)
"Parse the OUTPUT string from Ispell process and return:
1: t for an exact match.
@@ -2616,8 +2615,8 @@ When asynchronous processes are not supported, `run' is always returned."
(defun ispell-start-process ()
- "Start the ispell process, with support for no asynchronous processes.
-Keeps argument list for future ispell invocations for no async support."
+ "Start the Ispell process, with support for no asynchronous processes.
+Keeps argument list for future Ispell invocations for no async support."
;; Local dictionary becomes the global dictionary in use.
(setq ispell-current-dictionary
(or ispell-local-dictionary ispell-dictionary))
@@ -2780,21 +2779,24 @@ Keeps argument list for future ispell invocations for no async support."
(process-kill-without-query ispell-process)))))))
;;;###autoload
-(defun ispell-kill-ispell (&optional no-error)
+(defun ispell-kill-ispell (&optional no-error clear)
"Kill current Ispell process (so that you may start a fresh one).
-With NO-ERROR, just return non-nil if there was no Ispell running."
+With NO-ERROR, just return non-nil if there was no Ispell running.
+With CLEAR, buffer session localwords are cleaned."
(interactive)
;; This hook is typically used by flyspell to flush some variables used
;; to optimize the common cases.
(run-hooks 'ispell-kill-ispell-hook)
+ (if (or clear (interactive-p))
+ (setq ispell-buffer-session-localwords nil))
(if (not (and ispell-process
(eq (ispell-process-status) 'run)))
(or no-error
- (error "There is no ispell process running!"))
+ (error "There is no Ispell process running!"))
(if ispell-async-processp
(delete-process ispell-process)
- ;; synchronous processes
- (ispell-send-string "\n") ; make sure side effects occurred.
+ ;; Synchronous processes.
+ (ispell-send-string "\n") ; Make sure side effects occurred.
(kill-buffer ispell-output-buffer)
(kill-buffer ispell-session-buffer)
(setq ispell-output-buffer nil
@@ -2803,8 +2805,8 @@ With NO-ERROR, just return non-nil if there was no Ispell running."
(message "Ispell process killed")
nil))
-;;; ispell-change-dictionary is set in some people's hooks. Maybe this should
-;;; call ispell-init-process rather than wait for a spell checking command?
+;; ispell-change-dictionary is set in some people's hooks. Maybe this should
+;; call ispell-init-process rather than wait for a spell checking command?
;;;###autoload
(defun ispell-change-dictionary (dict &optional arg)
@@ -2847,6 +2849,7 @@ By just answering RET you can find out what the current dictionary is."
(setq ispell-local-dictionary-overridden t))
(error "Undefined dictionary: %s" dict))
(ispell-internal-change-dictionary)
+ (setq ispell-buffer-session-localwords nil)
(message "%s Ispell dictionary set to %s"
(if arg "Global" "Local")
dict))))
@@ -3277,7 +3280,7 @@ Returns the sum SHIFT due to changes in word replacements."
(delete-region (point) (+ word-len (point)))
(if (not (listp replace))
(progn
- (ispell-insert-word replace) ; insert dictionary word
+ (insert replace) ; insert dictionary word
(ispell-send-replacement (car poss) replace)
(setq accept-list (cons replace accept-list)))
(let ((replace-word (car replace)))
@@ -3408,6 +3411,7 @@ If optional INTERIOR-FRAG is non-nil then the word may be a character
sequence inside of a word.
Standard ispell choices are then available."
+ ;; FIXME: completion-at-point-function.
(interactive "P")
(let ((cursor-location (point))
(case-fold-search-val case-fold-search)
@@ -3451,7 +3455,7 @@ Standard ispell choices are then available."
(setq word (if (atom replacement) replacement (car replacement))
cursor-location (+ (- (length word) (- end start))
cursor-location))
- (ispell-insert-word word)
+ (insert word)
(if (not (atom replacement)) ; recheck spelling of replacement.
(progn
(goto-char cursor-location)
@@ -3916,6 +3920,11 @@ Both should not be used to define a buffer-local dictionary."
;; Actually start a new ispell process, because we need
;; to send commands now to specify the local words to it.
(ispell-init-process)
+ (dolist (session-localword ispell-buffer-session-localwords)
+ (ispell-send-string (concat "@" session-localword "\n")))
+ (or ispell-buffer-local-name
+ (if ispell-buffer-session-localwords
+ (setq ispell-buffer-local-name (buffer-name))))
(save-excursion
(goto-char (point-min))
(while (search-forward ispell-words-keyword nil t)
@@ -3935,7 +3944,7 @@ Both should not be used to define a buffer-local dictionary."
(ispell-send-string (concat "@" string "\n"))))))))
-;;; returns optionally adjusted region-end-point.
+;; Returns optionally adjusted region-end-point.
;; If comment-padright is defined, newcomment must be loaded.
(declare-function comment-add "newcomment" (arg))
diff --git a/lisp/textmodes/picture.el b/lisp/textmodes/picture.el
index 191e9f3672b..24a4ac1b033 100644
--- a/lisp/textmodes/picture.el
+++ b/lisp/textmodes/picture.el
@@ -31,7 +31,7 @@
;;; Code:
(defgroup picture nil
- "Picture mode --- editing using quarter-plane screen model."
+ "Editing text-based pictures (\"ASCII art\")."
:prefix "picture-"
:group 'wp)
diff --git a/lisp/textmodes/reftex-index.el b/lisp/textmodes/reftex-index.el
index fdcbf8b0b43..2d395fe3df2 100644
--- a/lisp/textmodes/reftex-index.el
+++ b/lisp/textmodes/reftex-index.el
@@ -274,6 +274,8 @@ will prompt for other arguments."
(and newtag (cdr cell) (not (member newtag (cdr cell)))
(push newtag (cdr cell)))))
+(define-obsolete-variable-alias
+ 'reftex-index-map 'reftex-index-mode-map "24.1")
(defvar reftex-index-mode-map
(let ((map (make-sparse-keymap)))
;; Index map
@@ -377,8 +379,6 @@ will prompt for other arguments."
map)
"Keymap used for *Index* buffers.")
-(define-obsolete-variable-alias
- 'reftex-index-map 'reftex-index-mode-map "24.1")
(defvar reftex-index-menu)
@@ -1179,6 +1179,8 @@ This gets refreshed in every phrases command.")
"Font lock keywords for reftex-index-phrases-mode.")
(defvar reftex-index-phrases-font-lock-defaults nil
"Font lock defaults for reftex-index-phrases-mode.")
+(define-obsolete-variable-alias
+ 'reftex-index-phrases-map 'reftex-index-phrases-mode-map "24.1")
(defvar reftex-index-phrases-mode-map
(let ((map (make-sparse-keymap)))
;; Keybindings and Menu for phrases buffer
@@ -1244,8 +1246,6 @@ This gets refreshed in every phrases command.")
map)
"Keymap used for *toc* buffer.")
-(define-obsolete-variable-alias
- 'reftex-index-phrases-map 'reftex-index-phrases-mode-map "24.1")
(defun reftex-index-phrase-selection-or-word (arg)
diff --git a/lisp/textmodes/reftex-sel.el b/lisp/textmodes/reftex-sel.el
index c583b67f13a..627dfba0071 100644
--- a/lisp/textmodes/reftex-sel.el
+++ b/lisp/textmodes/reftex-sel.el
@@ -71,6 +71,8 @@
(define-key map "-" 'negative-argument)
map))
+(define-obsolete-variable-alias
+ 'reftex-select-label-map 'reftex-select-label-mode-map "24.1")
(defvar reftex-select-label-mode-map
(let ((map (make-sparse-keymap)))
(set-keymap-parent map reftex-select-shared-map)
@@ -102,8 +104,6 @@
"Keymap used for *RefTeX Select* buffer, when selecting a label.
This keymap can be used to configure the label selection process which is
started with the command \\[reftex-reference].")
-(define-obsolete-variable-alias
- 'reftex-select-label-map 'reftex-select-label-mode-map "24.1")
(define-derived-mode reftex-select-label-mode fundamental-mode "LSelect"
"Major mode for selecting a label in a LaTeX document.
@@ -126,6 +126,8 @@ During a selection process, these are the local bindings.
;; We do not set a local map - reftex-select-item does this.
)
+(define-obsolete-variable-alias
+ 'reftex-select-bib-map 'reftex-select-bib-mode-map "24.1")
(defvar reftex-select-bib-mode-map
(let ((map (make-sparse-keymap)))
(set-keymap-parent map reftex-select-shared-map)
@@ -147,8 +149,6 @@ During a selection process, these are the local bindings.
"Keymap used for *RefTeX Select* buffer, when selecting a BibTeX entry.
This keymap can be used to configure the BibTeX selection process which is
started with the command \\[reftex-citation].")
-(define-obsolete-variable-alias
- 'reftex-select-bib-map 'reftex-select-bib-mode-map "24.1")
(define-derived-mode reftex-select-bib-mode fundamental-mode "BSelect"
"Major mode for selecting a citation key in a LaTeX document.
diff --git a/lisp/textmodes/reftex-toc.el b/lisp/textmodes/reftex-toc.el
index 5d293d404e6..519236a3621 100644
--- a/lisp/textmodes/reftex-toc.el
+++ b/lisp/textmodes/reftex-toc.el
@@ -31,6 +31,7 @@
(require 'reftex)
;;;
+(define-obsolete-variable-alias 'reftex-toc-map 'reftex-toc-mode-map "24.1")
(defvar reftex-toc-mode-map
(let ((map (make-sparse-keymap)))
@@ -122,7 +123,6 @@
map)
"Keymap used for *toc* buffer.")
-(define-obsolete-variable-alias 'reftex-toc-map 'reftex-toc-mode-map "24.1")
(defvar reftex-toc-menu)
(defvar reftex-last-window-height nil)
diff --git a/lisp/textmodes/rst.el b/lisp/textmodes/rst.el
index 1b1860c833d..262a49e2668 100644
--- a/lisp/textmodes/rst.el
+++ b/lisp/textmodes/rst.el
@@ -2,9 +2,10 @@
;; Copyright (C) 2003-2012 Free Software Foundation, Inc.
-;; Authors: Martin Blais <blais@furius.ca>,
-;; Stefan Merten <smerten@oekonux.de>,
-;; David Goodger <goodger@python.org>
+;; Maintainer: Stefan Merten <smerten@oekonux.de>
+;; Author: Martin Blais <blais@furius.ca>,
+;; David Goodger <goodger@python.org>,
+;; Wei-Wei Guo <wwguocn@gmail.com>
;; This file is part of GNU Emacs.
@@ -23,19 +24,23 @@
;;; Commentary:
-;; This package provides major mode rst-mode, which supports documents marked up
-;; using the reStructuredText format. Support includes font locking as well as
-;; some convenience functions for editing. It does this by defining a Emacs
-;; major mode: rst-mode (ReST). This mode is derived from text-mode (and
-;; inherits much of it). This package also contains:
+;; This package provides major mode rst-mode, which supports documents marked
+;; up using the reStructuredText format. Support includes font locking as well
+;; as a lot of convenience functions for editing. It does this by defining a
+;; Emacs major mode: rst-mode (ReST). This mode is derived from text-mode. This
+;; package also contains:
;;
;; - Functions to automatically adjust and cycle the section underline
-;; decorations;
+;; adornments;
;; - A mode that displays the table of contents and allows you to jump anywhere
;; from it;
;; - Functions to insert and automatically update a TOC in your source
;; document;
-;; - Font-lock highlighting of notable reStructuredText structures;
+;; - Function to insert list, processing item bullets and enumerations
+;; automatically;
+;; - Font-lock highlighting of most reStructuredText structures;
+;; - Indentation and filling according to reStructuredText syntax;
+;; - Cursor movement according to reStructuredText syntax;
;; - Some other convenience functions.
;;
;; See the accompanying document in the docutils documentation about
@@ -49,17 +54,8 @@
;;
;;
;; There are a number of convenient keybindings provided by rst-mode.
-;; The main one is
-;;
-;; C-c C-a (also C-=): rst-adjust
-;;
-;; Updates or rotates the section title around point or promotes/demotes the
-;; decorations within the region (see full details below). Note that C-= is a
-;; good binding, since it allows you to specify a negative arg easily with C--
-;; C-= (easy to type), as well as ordinary prefix arg with C-u C-=.
-;;
;; For more on bindings, see rst-mode-map below. There are also many variables
-;; that can be customized, look for defcustom and defvar in this file.
+;; that can be customized, look for defcustom in this file.
;;
;; If you use the table-of-contents feature, you may want to add a hook to
;; update the TOC automatically everytime you adjust a section title::
@@ -71,52 +67,16 @@
;;
;; (setq font-lock-global-modes '(not rst-mode ...))
;;
-
-
-;; CUSTOMIZATION
-;;
-;; rst
-;; ---
-;; This group contains some general customizable features.
-;;
-;; The group is contained in the wp group.
-;;
-;; rst-faces
-;; ---------
-;; This group contains all necessary for customizing fonts. The default
-;; settings use standard font-lock-*-face's so if you set these to your
-;; liking they are probably good in rst-mode also.
-;;
-;; The group is contained in the faces group as well as in the rst group.
;;
-;; rst-faces-defaults
-;; ------------------
-;; This group contains all necessary for customizing the default fonts used for
-;; section title faces.
;;
-;; The general idea for section title faces is to have a non-default background
-;; but do not change the background. The section level is shown by the
-;; lightness of the background color. If you like this general idea of
-;; generating faces for section titles but do not like the details this group
-;; is the point where you can customize the details. If you do not like the
-;; general idea, however, you should customize the faces used in
-;; rst-adornment-faces-alist.
+;; Customization is done by customizable variables contained in customization
+;; group "rst" and subgroups. Group "rst" is contained in the "wp" group.
;;
-;; Note: If you are using a dark background please make sure the variable
-;; frame-background-mode is set to the symbol dark. This triggers
-;; some default values which are probably right for you.
-;;
-;; The group is contained in the rst-faces group.
-;;
-;; All customizable features have a comment explaining their meaning.
-;; Refer to the customization of your Emacs (try ``M-x customize``).
-
;;; DOWNLOAD
-;; The latest version of this file lies in the docutils source code repository:
-;; http://svn.berlios.de/svnroot/repos/docutils/trunk/docutils/tools/editors/emacs/rst.el
-
+;; The latest release of this file lies in the docutils source code repository:
+;; http://docutils.svn.sourceforge.net/svnroot/docutils/trunk/docutils/tools/editors/emacs/rst.el
;;; INSTALLATION
@@ -140,62 +100,81 @@
;; ("\\.rest$" . rst-mode)) auto-mode-alist))
;;
-;;; BUGS
-
-;; - rst-enumeration-region: Select a single paragraph, with the top at one
-;; blank line before the beginning, and it will fail.
-;; - The active region goes away when we shift it left or right, and this
-;; prevents us from refilling it automatically when shifting many times.
-;; - The suggested decorations when adjusting should not have to cycle
-;; below one below the last section decoration level preceding the
-;; cursor. We need to fix that.
-
-;;; TODO LIST
-
-;; rst-toc-insert features
-;; ------------------------
-;; - rst-toc-insert: We should parse the contents:: options to figure out how
-;; deep to render the inserted TOC.
-;; - On load, detect any existing TOCs and set the properties for links.
-;; - TOC insertion should have an option to add empty lines.
-;; - TOC insertion should deal with multiple lines.
-;; - There is a bug on redo after undo of adjust when rst-adjust-hook uses the
-;; automatic toc update. The cursor ends up in the TOC and this is
-;; annoying. Gotta fix that.
-;; - numbering: automatically detect if we have a section-numbering directive in
-;; the corresponding section, to render the toc.
-;;
-;; bulleted and enumerated list items
-;; ----------------------------------
-;; - We need to provide way to rebullet bulleted lists, and that would include
-;; automatic enumeration as well.
-;;
-;; Other
-;; -----
-;; - It would be nice to differentiate between text files using
-;; reStructuredText_ and other general text files. If we had a
-;; function to automatically guess whether a .txt file is following the
-;; reStructuredText_ conventions, we could trigger rst-mode without
-;; having to hard-code this in every text file, nor forcing the user to
-;; add a local mode variable at the top of the file.
-;; We could perform this guessing by searching for a valid decoration
-;; at the top of the document or searching for reStructuredText_
-;; directives further on.
-;;
-;; - We should support imenu in our major mode, with the menu filled with the
-;; section titles (this should be really easy).
-;;
-;; - We should rename "adornment" to "decoration" or vice-versa in this
-;; document (Stefan's code ("adornment") vs Martin ("decoration")), maybe some
-;; functions even overlap.
-;;
-;; - We need to automatically recenter on rst-forward-section movement commands.
+;;; Code:
+(require 'cl)
-;;; HISTORY
-;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; Versions
+
+(defun rst-extract-version (delim-re head-re re tail-re var &optional default)
+ "Return the version matching RE after regex DELIM-RE and HEAD-RE
+and before TAIL-RE and DELIM-RE in VAR or DEFAULT for no match"
+ (if (string-match
+ (concat delim-re head-re "\\(" re "\\)" tail-re delim-re)
+ var)
+ (match-string 1 var)
+ default))
+
+;; Use CVSHeader to really get information from CVS and not other version
+;; control systems
+(defconst rst-cvs-header
+ "$CVSHeader: sm/rst_el/rst.el,v 1.257 2012-04-29 15:01:17 stefan Exp $")
+(defconst rst-cvs-rev
+ (rst-extract-version "\\$" "CVSHeader: \\S + " "[0-9]+\\(?:\\.[0-9]+\\)+"
+ " .*" rst-cvs-header "0.0")
+ "The CVS revision of this file. CVS revision is the development revision.")
+(defconst rst-cvs-timestamp
+ (rst-extract-version "\\$" "CVSHeader: \\S + \\S + "
+ "[0-9]+-[0-9]+-[0-9]+ [0-9]+:[0-9]+:[0-9]+" " .*"
+ rst-cvs-header "1970-01-01 00:00:00")
+ "The CVS timestamp of this file.")
+
+;; Use LastChanged... to really get information from SVN
+(defconst rst-svn-rev
+ (rst-extract-version "\\$" "LastChangedRevision: " "[0-9]+" " "
+ "$LastChangedRevision: 7399 $")
+ "The SVN revision of this file.
+SVN revision is the upstream (docutils) revision.")
+(defconst rst-svn-timestamp
+ (rst-extract-version "\\$" "LastChangedDate: " ".+?+" " "
+ "$LastChangedDate: 2012-04-29 17:01:05 +0200 (Sun, 29 Apr 2012) $")
+ "The SVN timestamp of this file.")
+
+;; Maintained by the release process
+(defconst rst-official-version
+ (rst-extract-version "%" "OfficialVersion: " "[0-9]+\\(?:\\.[0-9]+\\)+" " "
+ "%OfficialVersion: 1.2.1 %")
+ "Official version of the package.")
+(defconst rst-official-cvs-rev
+ (rst-extract-version "[%$]" "Revision: " "[0-9]+\\(?:\\.[0-9]+\\)+" " "
+ "%Revision: 1.256 %")
+ "CVS revision of this file in the official version.")
+
+(defconst rst-version
+ (if (equal rst-official-cvs-rev rst-cvs-rev)
+ rst-official-version
+ (format "%s (development %s [%s])" rst-official-version
+ rst-cvs-rev rst-cvs-timestamp))
+ "The version string.
+Starts with the current official version. For developer versions
+in parentheses follows the development revision and the timestamp.")
+
+(defconst rst-package-emacs-version-alist
+ '(("1.0.0" . "24.0")
+ ("1.1.0" . "24.0")
+ ("1.2.0" . "24.0")
+ ("1.2.1" . "24.0")))
+
+(unless (assoc rst-official-version rst-package-emacs-version-alist)
+ (error "Version %s not listed in `rst-package-emacs-version-alist'"
+ rst-version))
+
+(add-to-list 'customize-package-emacs-version-alist
+ (cons 'ReST rst-package-emacs-version-alist))
-;;; Code:
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; Initialize customization
(defgroup rst nil "Support for reStructuredText documents."
@@ -203,102 +182,461 @@
:version "23.1"
:link '(url-link "http://docutils.sourceforge.net/rst.html"))
-
-
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; Define some generic support functions.
-
-(eval-when-compile (require 'cl)) ;; We need this for destructuring-bind below.
-
-
-;; From Emacs-22
-(unless (fboundp 'line-number-at-pos)
- (defun line-number-at-pos (&optional pos)
- "Return (narrowed) buffer line number at position POS.
- If POS is nil, use current buffer location."
- (let ((opoint (or pos (point))) start)
- (save-excursion
- (goto-char (point-min))
- (setq start (point))
- (goto-char opoint)
- (forward-line 0)
- (1+ (count-lines start (point)))))) )
-
+;; Facilities for regular expressions used everywhere
+
+;; The trailing numbers in the names give the number of referenceable regex
+;; groups contained in the regex
+
+;; Used to be customizable but really is not customizable but fixed by the reST
+;; syntax
+(defconst rst-bullets
+ ;; Sorted so they can form a character class when concatenated
+ '(?- ?* ?+ ?\u2022 ?\u2023 ?\u2043)
+ "List of all possible bullet characters for bulleted lists.")
+
+(defconst rst-uri-schemes
+ '("acap" "cid" "data" "dav" "fax" "file" "ftp" "gopher" "http" "https" "imap"
+ "ldap" "mailto" "mid" "modem" "news" "nfs" "nntp" "pop" "prospero" "rtsp"
+ "service" "sip" "tel" "telnet" "tip" "urn" "vemmi" "wais")
+ "Supported URI schemes.")
+
+(defconst rst-adornment-chars
+ ;; Sorted so they can form a character class when concatenated
+ '(?\]
+ ?! ?\" ?# ?$ ?% ?& ?' ?\( ?\) ?* ?+ ?, ?. ?/ ?: ?\; ?< ?= ?> ?? ?@ ?\[ ?\\
+ ?^ ?_ ?` ?{ ?| ?} ?~
+ ?-)
+ "Characters which may be used in adornments for sections and transitions.")
+
+(defconst rst-max-inline-length
+ 1000
+ "Maximum length of inline markup to recognize.")
+
+(defconst rst-re-alist-def
+ ;; `*-beg' matches * at the beginning of a line
+ ;; `*-end' matches * at the end of a line
+ ;; `*-prt' matches a part of *
+ ;; `*-tag' matches *
+ ;; `*-sta' matches the start of * which may be followed by respective content
+ ;; `*-pfx' matches the delimiter left of *
+ ;; `*-sfx' matches the delimiter right of *
+ ;; `*-hlp' helper for *
+ ;;
+ ;; A trailing number says how many referenceable groups are contained.
+ `(
+
+ ;; Horizontal white space (`hws')
+ (hws-prt "[\t ]")
+ (hws-tag hws-prt "*") ; Optional sequence of horizontal white space
+ (hws-sta hws-prt "+") ; Mandatory sequence of horizontal white space
+
+ ;; Lines (`lin')
+ (lin-beg "^" hws-tag) ; Beginning of a possibly indented line
+ (lin-end hws-tag "$") ; End of a line with optional trailing white space
+ (linemp-tag "^" hws-tag "$") ; Empty line with optional white space
+
+ ;; Various tags and parts
+ (ell-tag "\\.\\.\\.") ; Ellipsis
+ (bul-tag ,(concat "[" rst-bullets "]")) ; A bullet
+ (ltr-tag "[a-zA-Z]") ; A letter enumerator tag
+ (num-prt "[0-9]") ; A number enumerator part
+ (num-tag num-prt "+") ; A number enumerator tag
+ (rom-prt "[IVXLCDMivxlcdm]") ; A roman enumerator part
+ (rom-tag rom-prt "+") ; A roman enumerator tag
+ (aut-tag "#") ; An automatic enumerator tag
+ (dcl-tag "::") ; Double colon
+
+ ;; Block lead in (`bli')
+ (bli-sfx (:alt hws-sta "$")) ; Suffix of a block lead-in with *optional*
+ ; immediate content
+
+ ;; Various starts
+ (bul-sta bul-tag bli-sfx) ; Start of a bulleted item
+
+ ;; Explicit markup tag (`exm')
+ (exm-tag "\\.\\.")
+ (exm-sta exm-tag hws-sta)
+ (exm-beg lin-beg exm-sta)
+
+ ;; Counters in enumerations (`cnt')
+ (cntany-tag (:alt ltr-tag num-tag rom-tag aut-tag)) ; An arbitrary counter
+ (cntexp-tag (:alt ltr-tag num-tag rom-tag)) ; An arbitrary explicit counter
+
+ ;; Enumerator (`enm')
+ (enmany-tag (:alt
+ (:seq cntany-tag "\\.")
+ (:seq "(?" cntany-tag ")"))) ; An arbitrary enumerator
+ (enmexp-tag (:alt
+ (:seq cntexp-tag "\\.")
+ (:seq "(?" cntexp-tag ")"))) ; An arbitrary explicit
+ ; enumerator
+ (enmaut-tag (:alt
+ (:seq aut-tag "\\.")
+ (:seq "(?" aut-tag ")"))) ; An automatic enumerator
+ (enmany-sta enmany-tag bli-sfx) ; An arbitrary enumerator start
+ (enmexp-sta enmexp-tag bli-sfx) ; An arbitrary explicit enumerator start
+ (enmexp-beg lin-beg enmexp-sta) ; An arbitrary explicit enumerator start
+ ; at the beginning of a line
+
+ ;; Items may be enumerated or bulleted (`itm')
+ (itmany-tag (:alt enmany-tag bul-tag)) ; An arbitrary item tag
+ (itmany-sta-1 (:grp itmany-tag) bli-sfx) ; An arbitrary item start, group
+ ; is the item tag
+ (itmany-beg-1 lin-beg itmany-sta-1) ; An arbitrary item start at the
+ ; beginning of a line, group is the
+ ; item tag
+
+ ;; Inline markup (`ilm')
+ (ilm-pfx (:alt "^" hws-prt "[-'\"([{<\u2018\u201c\u00ab\u2019/:]"))
+ (ilm-sfx (:alt "$" hws-prt "[]-'\")}>\u2019\u201d\u00bb/:.,;!?\\]"))
+
+ ;; Inline markup content (`ilc')
+ (ilcsgl-tag "\\S ") ; A single non-white character
+ (ilcast-prt (:alt "[^*\\]" "\\\\.")) ; Part of non-asterisk content
+ (ilcbkq-prt (:alt "[^`\\]" "\\\\.")) ; Part of non-backquote content
+ (ilcbkqdef-prt (:alt "[^`\\\n]" "\\\\.")) ; Part of non-backquote
+ ; definition
+ (ilcbar-prt (:alt "[^|\\]" "\\\\.")) ; Part of non-vertical-bar content
+ (ilcbardef-prt (:alt "[^|\\\n]" "\\\\.")) ; Part of non-vertical-bar
+ ; definition
+ (ilcast-sfx "[^\t *\\]") ; Suffix of non-asterisk content
+ (ilcbkq-sfx "[^\t `\\]") ; Suffix of non-backquote content
+ (ilcbar-sfx "[^\t |\\]") ; Suffix of non-vertical-bar content
+ (ilcrep-hlp ,(format "\\{0,%d\\}" rst-max-inline-length)) ; Repeat count
+ (ilcast-tag (:alt ilcsgl-tag
+ (:seq ilcsgl-tag
+ ilcast-prt ilcrep-hlp
+ ilcast-sfx))) ; Non-asterisk content
+ (ilcbkq-tag (:alt ilcsgl-tag
+ (:seq ilcsgl-tag
+ ilcbkq-prt ilcrep-hlp
+ ilcbkq-sfx))) ; Non-backquote content
+ (ilcbkqdef-tag (:alt ilcsgl-tag
+ (:seq ilcsgl-tag
+ ilcbkqdef-prt ilcrep-hlp
+ ilcbkq-sfx))) ; Non-backquote definition
+ (ilcbar-tag (:alt ilcsgl-tag
+ (:seq ilcsgl-tag
+ ilcbar-prt ilcrep-hlp
+ ilcbar-sfx))) ; Non-vertical-bar content
+ (ilcbardef-tag (:alt ilcsgl-tag
+ (:seq ilcsgl-tag
+ ilcbardef-prt ilcrep-hlp
+ ilcbar-sfx))) ; Non-vertical-bar definition
+
+ ;; Fields (`fld')
+ (fldnam-prt (:alt "[^:\n]" "\\\\:")) ; Part of a field name
+ (fldnam-tag fldnam-prt "+") ; A field name
+ (fld-tag ":" fldnam-tag ":") ; A field marker
+
+ ;; Options (`opt')
+ (optsta-tag (:alt "[-+/]" "--")) ; Start of an option
+ (optnam-tag "\\sw" (:alt "-" "\\sw") "*") ; Name of an option
+ (optarg-tag (:shy "[ =]\\S +")) ; Option argument
+ (optsep-tag (:shy "," hws-prt)) ; Separator between options
+ (opt-tag (:shy optsta-tag optnam-tag optarg-tag "?")) ; A complete option
+
+ ;; Footnotes and citations (`fnc')
+ (fncnam-prt "[^\]\n]") ; Part of a footnote or citation name
+ (fncnam-tag fncnam-prt "+") ; A footnote or citation name
+ (fnc-tag "\\[" fncnam-tag "]") ; A complete footnote or citation tag
+ (fncdef-tag-2 (:grp exm-sta)
+ (:grp fnc-tag)) ; A complete footnote or citation definition
+ ; tag; first group is the explicit markup
+ ; start, second group is the footnote /
+ ; citation tag
+ (fnc-sta-2 fncdef-tag-2 bli-sfx) ; Start of a footnote or citation
+ ; definition; first group is the explicit
+ ; markup start, second group is the
+ ; footnote / citation tag
+
+ ;; Substitutions (`sub')
+ (sub-tag "|" ilcbar-tag "|") ; A complete substitution tag
+ (subdef-tag "|" ilcbardef-tag "|") ; A complete substitution definition
+ ; tag
+
+ ;; Symbol (`sym')
+ (sym-tag (:shy "\\sw+" (:shy "\\s_\\sw+") "*"))
+
+ ;; URIs (`uri')
+ (uri-tag (:alt ,@rst-uri-schemes))
+
+ ;; Adornment (`ado')
+ (ado-prt "[" ,(concat rst-adornment-chars) "]")
+ (adorep3-hlp "\\{3,\\}") ; There must be at least 3 characters because
+ ; otherwise explicit markup start would be
+ ; recognized
+ (adorep2-hlp "\\{2,\\}") ; As `adorep3-hlp' but when the first of three
+ ; characters is matched differently
+ (ado-tag-1-1 (:grp ado-prt)
+ "\\1" adorep2-hlp) ; A complete adornment, group is the first
+ ; adornment character and MUST be the FIRST
+ ; group in the whole expression
+ (ado-tag-1-2 (:grp ado-prt)
+ "\\2" adorep2-hlp) ; A complete adornment, group is the first
+ ; adornment character and MUST be the
+ ; SECOND group in the whole expression
+ (ado-beg-2-1 "^" (:grp ado-tag-1-2)
+ lin-end) ; A complete adornment line; first group is the whole
+ ; adornment and MUST be the FIRST group in the whole
+ ; expression; second group is the first adornment
+ ; character
+
+ ;; Titles (`ttl')
+ (ttl-tag "\\S *\\w\\S *") ; A title text
+ (ttl-beg lin-beg ttl-tag) ; A title text at the beginning of a line
+
+ ;; Directives and substitution definitions (`dir')
+ (dir-tag-3 (:grp exm-sta)
+ (:grp (:shy subdef-tag hws-sta) "?")
+ (:grp sym-tag dcl-tag)) ; A directive or substitution definition
+ ; tag; first group is explicit markup
+ ; start, second group is a possibly
+ ; empty substitution tag, third group is
+ ; the directive tag including the double
+ ; colon
+ (dir-sta-3 dir-tag-3 bli-sfx) ; Start of a directive or substitution
+ ; definition; groups are as in dir-tag-3
+
+ ;; Literal block (`lit')
+ (lit-sta-2 (:grp (:alt "[^.\n]" "\\.[^.\n]") ".*") "?"
+ (:grp dcl-tag) "$") ; Start of a literal block; first group is
+ ; any text before the double colon tag which
+ ; may not exist, second group is the double
+ ; colon tag
+
+ ;; Comments (`cmt')
+ (cmt-sta-1 (:grp exm-sta) "[^\[|_\n]"
+ (:alt "[^:\n]" (:seq ":" (:alt "[^:\n]" "$")))
+ "*$") ; Start of a comment block; first group is explicit markup
+ ; start
+
+ ;; Paragraphs (`par')
+ (par-tag- (:alt itmany-tag fld-tag opt-tag fncdef-tag-2 dir-tag-3 exm-tag)
+ ) ; Tag at the beginning of a paragraph; there may be groups in
+ ; certain cases
+ )
+ "Definition alist of relevant regexes.
+Each entry consists of the symbol naming the regex and an
+argument list for `rst-re'.")
+
+;; FIXME: Use `sregex` or `rx` instead of re-inventing the wheel
+(defun rst-re (&rest args)
+ "Interpret ARGS as regular expressions and return a regex string.
+Each element of ARGS may be one of the following:
+
+A string which is inserted unchanged.
+
+A character which is resolved to a quoted regex.
+
+A symbol which is resolved to a string using `rst-re-alist-def'.
+
+A list with a keyword in the car. Each element of the cdr of such
+a list is recursively interpreted as ARGS. The results of this
+interpretation are concatenated according to the keyword.
+
+For the keyword `:seq' the results are simply concatenated.
+
+For the keyword `:shy' the results are concatenated and
+surrounded by a shy-group (\"\\(?:...\\)\").
+
+For the keyword `:alt' the results form an alternative (\"\\|\")
+which is shy-grouped (\"\\(?:...\\)\").
+
+For the keyword `:grp' the results are concatenated and form a
+referencable grouped (\"\\(...\\)\").
+
+After interpretation of ARGS the results are concatenated as for
+`:seq'.
+"
+ (apply 'concat
+ (mapcar
+ (lambda (re)
+ (cond
+ ((stringp re)
+ re)
+ ((symbolp re)
+ (cadr (assoc re rst-re-alist)))
+ ((characterp re)
+ (regexp-quote (char-to-string re)))
+ ((listp re)
+ (let ((nested
+ (mapcar (lambda (elt)
+ (rst-re elt))
+ (cdr re))))
+ (cond
+ ((eq (car re) :seq)
+ (mapconcat 'identity nested ""))
+ ((eq (car re) :shy)
+ (concat "\\(?:" (mapconcat 'identity nested "") "\\)"))
+ ((eq (car re) :grp)
+ (concat "\\(" (mapconcat 'identity nested "") "\\)"))
+ ((eq (car re) :alt)
+ (concat "\\(?:" (mapconcat 'identity nested "\\|") "\\)"))
+ (t
+ (error "Unknown list car: %s" (car re))))))
+ (t
+ (error "Unknown object type for building regex: %s" re))))
+ args)))
+
+;; FIXME: Remove circular dependency between `rst-re' and `rst-re-alist'.
+(defconst rst-re-alist
+ ;; Shadow global value we are just defining so we can construct it step by
+ ;; step
+ (let (rst-re-alist)
+ (dolist (re rst-re-alist-def)
+ (setq rst-re-alist
+ (nconc rst-re-alist
+ (list (list (car re) (apply 'rst-re (cdr re)))))))
+ rst-re-alist)
+ "Alist mapping symbols from `rst-re-alist-def' to regex strings.")
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Mode definition.
+(defvar rst-deprecated-keys nil
+ "Alist mapping deprecated keys to the new key to use and the definition.")
+
+(require 'edmacro)
+
+(defun rst-call-deprecated ()
+ (interactive)
+ (let* ((dep-key (this-command-keys-vector))
+ (dep-key-s (format-kbd-macro dep-key))
+ (fnd (assoc dep-key rst-deprecated-keys)))
+ (if (not fnd)
+ ;; Exact key sequence not found. Maybe a deprecated key sequence has
+ ;; been followed by another key.
+ (let* ((dep-key-pfx (butlast (append dep-key nil) 1))
+ (dep-key-def (vconcat dep-key-pfx '(t)))
+ (fnd-def (assoc dep-key-def rst-deprecated-keys)))
+ (if (not fnd-def)
+ (error "Unknown deprecated key sequence %s" dep-key-s)
+ ;; Don't execute the command in this case
+ (message "[Deprecated use of key %s; use key %s instead]"
+ (format-kbd-macro dep-key-pfx)
+ (format-kbd-macro (second fnd-def)))))
+ (message "[Deprecated use of key %s; use key %s instead]"
+ dep-key-s (format-kbd-macro (second fnd)))
+ (call-interactively (third fnd)))))
+
+(defun rst-define-key (keymap key def &rest deprecated)
+ "Bind like `define-key' using DEPRECATED as deprecated key definitions.
+DEPRECATED key definitions should be in vector notation. These
+are defined as well but give an additional message."
+ (define-key keymap key def)
+ (dolist (dep-key deprecated)
+ (push (list dep-key key def) rst-deprecated-keys)
+ (define-key keymap dep-key 'rst-call-deprecated)))
+
;; Key bindings.
(defvar rst-mode-map
(let ((map (make-sparse-keymap)))
+ ;; \C-c is the general keymap
+ (rst-define-key map [?\C-c ?\C-h] 'describe-prefix-bindings)
+
;;
- ;; Section Decorations.
+ ;; Section Adornments.
;;
- ;; The adjustment function that decorates or rotates a section title.
- (define-key map [(control c) (control a)] 'rst-adjust)
- (define-key map [(control c) (control ?=)] 'rst-adjust)
- (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)
- ;; 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)
+ ;; The adjustment function that adorns or rotates a section title.
+ (rst-define-key map [?\C-c ?\C-=] 'rst-adjust [?\C-c ?\C-a t])
+ (rst-define-key map [?\C-=] 'rst-adjust) ; (Does not work on the Mac OSX.)
+
+ ;; \C-c \C-a is the keymap for adornments
+ (rst-define-key map [?\C-c ?\C-a ?\C-h] 'describe-prefix-bindings)
+ ;; Display the hierarchy of adornments implied by the current document contents.
+ (rst-define-key map [?\C-c ?\C-a ?\C-d] 'rst-display-adornments-hierarchy)
+ ;; Homogenize the adornments in the document.
+ (rst-define-key map [?\C-c ?\C-a ?\C-s] 'rst-straighten-adornments
+ [?\C-c ?\C-s])
;;
;; Section Movement and Selection.
;;
;; Mark the subsection where the cursor is.
- (define-key map [(control c) (control m)] 'rst-mark-section)
+ (rst-define-key map [?\C-\M-h] 'rst-mark-section
+ ;; same as mark-defun sgml-mark-current-element
+ [?\C-c ?\C-m])
;; Move forward/backward between section titles.
- (define-key map [(control c) (control n)] 'rst-forward-section)
- (define-key map [(control c) (control p)] 'rst-backward-section)
+ (rst-define-key map [?\C-\M-a] 'rst-forward-section
+ ;; same as beginning-of-defun
+ [?\C-c ?\C-n])
+ (rst-define-key map [?\C-\M-e] 'rst-backward-section
+ ;; same as end-of-defun
+ [?\C-c ?\C-p])
;;
- ;; Operating on Blocks of Text.
+ ;; Operating on regions.
;;
+ ;; \C-c \C-r is the keymap for regions
+ (rst-define-key map [?\C-c ?\C-r ?\C-h] 'describe-prefix-bindings)
+ ;; Makes region a line-block.
+ (rst-define-key map [?\C-c ?\C-r ?\C-l] 'rst-line-block-region
+ [?\C-c ?\C-d])
+ ;; Shift region left or right according to tabs
+ (rst-define-key map [?\C-c ?\C-r tab] 'rst-shift-region
+ [?\C-c ?\C-r t] [?\C-c ?\C-l t])
+
+ ;;
+ ;; Operating on lists.
+ ;;
+ ;; \C-c \C-l is the keymap for lists
+ (rst-define-key map [?\C-c ?\C-l ?\C-h] 'describe-prefix-bindings)
;; Makes paragraphs in region as a bullet list.
- (define-key map [(control c) (control b)] 'rst-bullet-list-region)
+ (rst-define-key map [?\C-c ?\C-l ?\C-b] 'rst-bullet-list-region
+ [?\C-c ?\C-b])
;; Makes paragraphs in region as a enumeration.
- (define-key map [(control c) (control e)] 'rst-enumerate-region)
+ (rst-define-key map [?\C-c ?\C-l ?\C-e] 'rst-enumerate-region
+ [?\C-c ?\C-e])
;; Converts bullets to an enumeration.
- (define-key map [(control c) (control v)] 'rst-convert-bullets-to-enumeration)
- ;; Makes region a line-block.
- (define-key map [(control c) (control d)] 'rst-line-block-region)
+ (rst-define-key map [?\C-c ?\C-l ?\C-c] 'rst-convert-bullets-to-enumeration
+ [?\C-c ?\C-v])
;; Make sure that all the bullets in the region are consistent.
- (define-key map [(control c) (control w)] 'rst-straighten-bullets-region)
- ;; Shift region left or right (taking into account of enumerations/bullets, etc.).
- (define-key map [(control c) (control l)] 'rst-shift-region-left)
- (define-key map [(control c) (control r)] 'rst-shift-region-right)
- ;; Comment/uncomment the active region.
- (define-key map [(control c) (control c)] 'comment-region)
+ (rst-define-key map [?\C-c ?\C-l ?\C-s] 'rst-straighten-bullets-region
+ [?\C-c ?\C-w])
+ ;; Insert a list item
+ (rst-define-key map [?\C-c ?\C-l ?\C-i] 'rst-insert-list)
;;
;; Table-of-Contents Features.
;;
+ ;; \C-c \C-t is the keymap for table of contents
+ (rst-define-key map [?\C-c ?\C-t ?\C-h] 'describe-prefix-bindings)
;; Enter a TOC buffer to view and move to a specific section.
- (define-key map [(control c) (control t)] 'rst-toc)
+ (rst-define-key map [?\C-c ?\C-t ?\C-t] 'rst-toc)
;; Insert a TOC here.
- (define-key map [(control c) (control i)] 'rst-toc-insert)
+ (rst-define-key map [?\C-c ?\C-t ?\C-i] 'rst-toc-insert
+ [?\C-c ?\C-i])
;; Update the document's TOC (without changing the cursor position).
- (define-key map [(control c) (control u)] 'rst-toc-update)
+ (rst-define-key map [?\C-c ?\C-t ?\C-u] 'rst-toc-update
+ [?\C-c ?\C-u])
;; Got to the section under the cursor (cursor must be in TOC).
- (define-key map [(control c) (control f)] 'rst-goto-section)
+ (rst-define-key map [?\C-c ?\C-t ?\C-j] 'rst-goto-section
+ [?\C-c ?\C-f])
;;
;; Converting Documents from Emacs.
;;
+ ;; \C-c \C-c is the keymap for compilation
+ (rst-define-key map [?\C-c ?\C-c ?\C-h] 'describe-prefix-bindings)
;; Run one of two pre-configured toolset commands on the document.
- (define-key map [(control c) (?1)] 'rst-compile)
- (define-key map [(control c) (?2)] 'rst-compile-alt-toolset)
+ (rst-define-key map [?\C-c ?\C-c ?\C-c] 'rst-compile
+ [?\C-c ?1])
+ (rst-define-key map [?\C-c ?\C-c ?\C-a] 'rst-compile-alt-toolset
+ [?\C-c ?2])
;; Convert the active region to pseudo-xml using the docutils tools.
- (define-key map [(control c) (?3)] 'rst-compile-pseudo-region)
+ (rst-define-key map [?\C-c ?\C-c ?\C-x] 'rst-compile-pseudo-region
+ [?\C-c ?3])
;; Convert the current document to PDF and launch a viewer on the results.
- (define-key map [(control c) (?4)] 'rst-compile-pdf-preview)
+ (rst-define-key map [?\C-c ?\C-c ?\C-p] 'rst-compile-pdf-preview
+ [?\C-c ?4])
;; Convert the current document to S5 slides and view in a web browser.
- (define-key map [(control c) (?5)] 'rst-compile-slides-preview)
+ (rst-define-key map [?\C-c ?\C-c ?\C-s] 'rst-compile-slides-preview
+ [?\C-c ?5])
map)
"Keymap for reStructuredText mode commands.
@@ -307,7 +645,7 @@ This inherits from Text mode.")
;; Abbrevs.
(defvar rst-mode-abbrev-table nil
- "Abbrev table used while in Rst mode.")
+ "Abbrev table used while in `rst-mode'.")
(define-abbrev-table 'rst-mode-abbrev-table
(mapcar (lambda (x) (append x '(nil 0 system)))
'(("contents" ".. contents::\n..\n ")
@@ -328,38 +666,34 @@ This inherits from Text mode.")
(modify-syntax-entry ?& "." st)
(modify-syntax-entry ?' "." st)
(modify-syntax-entry ?* "." st)
- (modify-syntax-entry ?+ "." st)
+ (modify-syntax-entry ?+ "_" st)
(modify-syntax-entry ?. "_" st)
(modify-syntax-entry ?/ "." st)
+ (modify-syntax-entry ?: "_" st)
(modify-syntax-entry ?< "." st)
(modify-syntax-entry ?= "." st)
(modify-syntax-entry ?> "." st)
(modify-syntax-entry ?\\ "\\" st)
(modify-syntax-entry ?| "." st)
- (modify-syntax-entry ?_ "." st)
+ (modify-syntax-entry ?_ "_" st)
+ (modify-syntax-entry ?\u00ab "." st)
+ (modify-syntax-entry ?\u00bb "." st)
+ (modify-syntax-entry ?\u2018 "." st)
+ (modify-syntax-entry ?\u2019 "." st)
+ (modify-syntax-entry ?\u201c "." st)
+ (modify-syntax-entry ?\u201d "." st)
st)
"Syntax table used while in `rst-mode'.")
(defcustom rst-mode-hook nil
- "Hook run when Rst mode is turned on.
-The hook for Text mode is run before this one."
+ "Hook run when `rst-mode' is turned on.
+The hook for `text-mode' is run before this one."
:group 'rst
:type '(hook))
-(defcustom rst-mode-lazy t
- "If non-nil Rst mode tries to font-lock multi-line elements correctly.
-Because this is really slow it should be set to nil if neither `jit-lock-mode'
-not `lazy-lock-mode' and activated.
-
-If nil, comments and literal blocks are font-locked only on the line they start.
-
-The value of this variable is used when Rst mode is turned on."
- :group 'rst
- :type '(boolean))
-
;; Use rst-mode for *.rst and *.rest files. Many ReStructured-Text files
;; use *.txt, but this is too generic to be set as a default.
;;;###autoload (add-to-list 'auto-mode-alist (purecopy '("\\.re?st\\'" . rst-mode)))
@@ -367,78 +701,74 @@ The value of this variable is used when Rst mode is turned on."
(define-derived-mode rst-mode text-mode "ReST"
"Major mode for editing reStructuredText documents.
\\<rst-mode-map>
-There are a number of convenient keybindings provided by
-Rst mode. The main one is \\[rst-adjust], it updates or rotates
-the section title around point or promotes/demotes the
-decorations within the region (see full details below).
-Use negative prefix arg to rotate in the other direction.
Turning on `rst-mode' calls the normal hooks `text-mode-hook'
and `rst-mode-hook'. This mode also supports font-lock
-highlighting. You may customize `rst-mode-lazy' to toggle
-font-locking of blocks.
+highlighting.
\\{rst-mode-map}"
:abbrev-table rst-mode-abbrev-table
:syntax-table rst-mode-syntax-table
:group 'rst
- (set (make-local-variable 'paragraph-separate) paragraph-start)
- (set (make-local-variable 'indent-line-function) 'indent-relative-maybe)
+ ;; Paragraph recognition
+ (set (make-local-variable 'paragraph-separate)
+ (rst-re '(:alt
+ "\f"
+ lin-end)))
(set (make-local-variable 'paragraph-start)
- "\f\\|>*[ \t]*$\\|>*[ \t]*[-+*] \\|>*[ \t]*[0-9#]+\\. ")
- (set (make-local-variable 'adaptive-fill-mode) t)
+ (rst-re '(:alt
+ "\f"
+ lin-end
+ (:seq hws-tag par-tag- bli-sfx))))
- ;; FIXME: No need to reset this.
- ;; (set (make-local-variable 'indent-line-function) 'indent-relative)
+ ;; Indenting and filling
+ (set (make-local-variable 'indent-line-function) 'rst-indent-line)
+ (set (make-local-variable 'adaptive-fill-mode) t)
+ (set (make-local-variable 'adaptive-fill-regexp)
+ (rst-re 'hws-tag 'par-tag- "?" 'hws-tag))
+ (set (make-local-variable 'adaptive-fill-function) 'rst-adaptive-fill)
+ (set (make-local-variable 'fill-paragraph-handle-comment) nil)
- ;; The details of the following comment setup is important because it affects
- ;; auto-fill, and it is pretty common in running text to have an ellipsis
- ;; ("...") which trips because of the rest comment syntax (".. ").
+ ;; Comments
(set (make-local-variable 'comment-start) ".. ")
- (set (make-local-variable 'comment-start-skip) "^\\.\\. ")
- (set (make-local-variable 'comment-multi-line) nil)
-
- ;; Special variables
- (make-local-variable 'rst-adornment-level-alist)
+ (set (make-local-variable 'comment-start-skip)
+ (rst-re 'lin-beg 'exm-tag 'bli-sfx))
+ (set (make-local-variable 'comment-continue) " ")
+ (set (make-local-variable 'comment-multi-line) t)
+ (set (make-local-variable 'comment-use-syntax) nil)
+ ;; reStructuredText has not really a comment ender but nil is not really a
+ ;; permissible value
+ (set (make-local-variable 'comment-end) "")
+ (set (make-local-variable 'comment-end-skip) nil)
+
+ (set (make-local-variable 'comment-line-break-function)
+ 'rst-comment-line-break)
+ (set (make-local-variable 'comment-indent-function)
+ 'rst-comment-indent)
+ (set (make-local-variable 'comment-insert-comment-function)
+ 'rst-comment-insert-comment)
+ (set (make-local-variable 'comment-region-function)
+ 'rst-comment-region)
+ (set (make-local-variable 'uncomment-region-function)
+ 'rst-uncomment-region)
;; Font lock
- (set (make-local-variable 'font-lock-defaults)
- '(rst-font-lock-keywords-function
- t nil nil nil
- (font-lock-mark-block-function . mark-paragraph)))
- ;; `jit-lock-mode' has been the default since Emacs-21.1, so there's no
- ;; point messing around with font-lock-support-mode any more.
- ;; (when (boundp 'font-lock-support-mode)
- ;; ;; rst-mode has its own mind about font-lock-support-mode
- ;; (make-local-variable 'font-lock-support-mode)
- ;; ;; jit-lock-mode replaced lazy-lock-mode in GNU Emacs 21.
- ;; (let ((jit-or-lazy-lock-mode
- ;; (cond
- ;; ((fboundp 'lazy-lock-mode) 'lazy-lock-mode)
- ;; ((fboundp 'jit-lock-mode) 'jit-lock-mode)
- ;; ;; if neither lazy-lock nor jit-lock is supported,
- ;; ;; tell user and disable rst-mode-lazy
- ;; (t (when rst-mode-lazy
- ;; (message "Disabled lazy fontification, because no known support mode found.")
- ;; (setq rst-mode-lazy nil))))))
- ;; (cond
- ;; ((and (not rst-mode-lazy) (not font-lock-support-mode)))
- ;; ;; No support mode set and none required - leave it alone
- ;; ((or (not font-lock-support-mode) ;; No support mode set (but required)
- ;; (symbolp font-lock-support-mode)) ;; or a fixed mode for all
- ;; (setq font-lock-support-mode
- ;; (list (cons 'rst-mode (and rst-mode-lazy jit-or-lazy-lock-mode))
- ;; (cons t font-lock-support-mode))))
- ;; ((and (listp font-lock-support-mode)
- ;; (not (assoc 'rst-mode font-lock-support-mode)))
- ;; ;; A list of modes missing rst-mode
- ;; (setq font-lock-support-mode
- ;; (cons (cons 'rst-mode (and rst-mode-lazy jit-or-lazy-lock-mode))
- ;; font-lock-support-mode))))))
-
- )
-
+ (setq font-lock-defaults
+ '(rst-font-lock-keywords
+ t nil nil nil
+ (font-lock-multiline . t)
+ (font-lock-mark-block-function . mark-paragraph)
+ ;; rst-mode does not need font-lock-support-mode because it's fast
+ ;; enough. In fact using `jit-lock-mode` slows things down
+ ;; considerably even if `rst-font-lock-extend-region` is in place and
+ ;; compiled.
+ ;;(font-lock-support-mode . nil)
+ ))
+ (add-hook 'font-lock-extend-region-functions 'rst-font-lock-extend-region t)
+
+ ;; Text after a changed line may need new fontification
+ (set (make-local-variable 'jit-lock-contextually) t))
;;;###autoload
(define-minor-mode rst-minor-mode
@@ -462,31 +792,19 @@ for modes derived from Text mode, like Mail mode."
;; :abbrev-table rst-mode-abbrev-table
;; :syntax-table rst-mode-syntax-table
-
-
-
-
-;; Bulleted item lists.
-(defcustom rst-bullets
- '(?- ?* ?+)
- "List of all possible bullet characters for bulleted lists."
- :group 'rst)
-
-
-
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; Section Decoration Adjustment
-;; =============================
+;; Section Adornment Adjustment
+;; ============================
;;
;; The following functions implement a smart automatic title sectioning feature.
;; The idea is that with the cursor sitting on a section title, we try to get as
;; much information from context and try to do the best thing automatically.
;; This function can be invoked many times and/or with prefix argument to rotate
-;; between the various sectioning decorations.
+;; between the various sectioning adornments.
;;
;; Definitions: the two forms of sectioning define semantically separate section
-;; levels. A sectioning DECORATION consists in:
+;; levels. A sectioning ADORNMENT consists in:
;;
;; - a CHARACTER
;;
@@ -496,10 +814,7 @@ for modes derived from Text mode, like Mail mode."
;; how many characters and over-and-under style is hanging outside of the
;; title at the beginning and ending.
;;
-;; Important note: an existing decoration must be formed by at least two
-;; characters to be recognized.
-;;
-;; Here are two examples of decorations (| represents the window border, column
+;; Here are two examples of adornments (| represents the window border, column
;; 0):
;;
;; |
@@ -516,17 +831,15 @@ for modes derived from Text mode, like Mail mode."
;; - The underlining character that is used depends on context. The file is
;; scanned to find other sections and an appropriate character is selected.
;; If the function is invoked on a section that is complete, the character is
-;; rotated among the existing section decorations.
+;; rotated among the existing section adornments.
;;
;; Note that when rotating the characters, if we come to the end of the
-;; hierarchy of decorations, the variable rst-preferred-decorations is
-;; consulted to propose a new underline decoration, and if continued, we cycle
-;; the decorations all over again. Set this variable to nil if you want to
-;; limit the underlining character propositions to the existing decorations in
+;; hierarchy of adornments, the variable rst-preferred-adornments is
+;; consulted to propose a new underline adornment, and if continued, we cycle
+;; the adornments all over again. Set this variable to nil if you want to
+;; limit the underlining character propositions to the existing adornments in
;; the file.
;;
-;; - A prefix argument can be used to alternate the style.
-;;
;; - An underline/overline that is not extended to the column at which it should
;; be hanging is dubbed INCOMPLETE. For example::
;;
@@ -547,128 +860,108 @@ for modes derived from Text mode, like Mail mode."
;;
;; In over-and-under style, when alternating the style, a variable is
;; available to select how much default indent to use (it can be zero). Note
-;; that if the current section decoration already has an indent, we don't
+;; that if the current section adornment already has an indent, we don't
;; adjust it to the default, we rather use the current indent that is already
;; there for adjustment (unless we cycle, in which case we use the indent
;; that has been found previously).
(defgroup rst-adjust nil
- "Settings for adjustment and cycling of section title decorations."
+ "Settings for adjustment and cycling of section title adornments."
:group 'rst
:version "21.1")
-(defcustom rst-preferred-decorations '( (?= over-and-under 1)
- (?= simple 0)
- (?- simple 0)
- (?~ simple 0)
- (?+ simple 0)
- (?` simple 0)
- (?# simple 0)
- (?@ simple 0) )
- "Preferred ordering of section title decorations.
-
-This sequence is consulted to offer a new decoration suggestion
+(define-obsolete-variable-alias
+ 'rst-preferred-decorations 'rst-preferred-adornments "r6506")
+(defcustom rst-preferred-adornments '((?= over-and-under 1)
+ (?= simple 0)
+ (?- simple 0)
+ (?~ simple 0)
+ (?+ simple 0)
+ (?` simple 0)
+ (?# simple 0)
+ (?@ simple 0))
+ "Preferred hierarchy of section title adornments.
+
+A list consisting of lists of the form (CHARACTER STYLE INDENT).
+CHARACTER is the character used. STYLE is one of the symbols
+OVER-AND-UNDER or SIMPLE. INDENT is an integer giving the wanted
+indentation for STYLE OVER-AND-UNDER. CHARACTER and STYLE are
+always used when a section adornment is described. In other
+places t instead of a list stands for a transition.
+
+This sequence is consulted to offer a new adornment suggestion
when we rotate the underlines at the end of the existing
hierarchy of characters, or when there is no existing section
-title in the file."
- :group 'rst-adjust)
-
+title in the file.
+
+Set this to an empty list to use only the adornment found in the
+file."
+ :group 'rst-adjust
+ :type `(repeat
+ (group :tag "Adornment specification"
+ (choice :tag "Adornment character"
+ ,@(mapcar (lambda (char)
+ (list 'const
+ :tag (char-to-string char) char))
+ rst-adornment-chars))
+ (radio :tag "Adornment type"
+ (const :tag "Overline and underline" over-and-under)
+ (const :tag "Underline only" simple))
+ (integer :tag "Indentation for overline and underline type"
+ :value 0))))
(defcustom rst-default-indent 1
"Number of characters to indent the section title.
-This is used for when toggling decoration styles, when switching
-from a simple decoration style to a over-and-under decoration
+This is used for when toggling adornment styles, when switching
+from a simple adornment style to a over-and-under adornment
style."
- :group 'rst-adjust)
-
-
-(defvar rst-section-text-regexp "^[ \t]*\\S-*\\w\\S-*"
- "Regular expression for valid section title text.")
-
-
-(defun rst-line-homogeneous-p (&optional accept-special)
- "Return true if the line is homogeneous.
-
-Predicate that returns the unique char if the current line is
-composed only of a single repeated non-whitespace character.
-This returns the char even if there is whitespace at the
-beginning of the line.
-
-If ACCEPT-SPECIAL is specified we do not ignore special sequences
-which normally we would ignore when doing a search on many lines.
-For example, normally we have cases to ignore commonly occurring
-patterns, such as :: or ...; with the flag do not ignore them."
- (save-excursion
- (back-to-indentation)
- (unless (looking-at "\n")
- (let ((c (thing-at-point 'char)))
- (if (and (looking-at (format "[%s]+[ \t]*$" c))
- (or accept-special
- (and
- ;; Common patterns.
- (not (looking-at "::[ \t]*$"))
- (not (looking-at "\\.\\.\\.[ \t]*$"))
- ;; Discard one char line
- (not (looking-at ".[ \t]*$"))
- )))
- (string-to-char c))
- ))
- ))
-
-(defun rst-line-homogeneous-nodent-p (&optional accept-special)
- "Return true if the line is homogeneous with no indent.
-See `rst-line-homogeneous-p' about ACCEPT-SPECIAL."
- (save-excursion
- (beginning-of-line)
- (if (looking-at "^[ \t]+")
- nil
- (rst-line-homogeneous-p accept-special)
- )))
+ :group 'rst-adjust
+ :type '(integer))
-(defun rst-compare-decorations (deco1 deco2)
- "Compare decorations.
-Return true if both DECO1 and DECO2 decorations are equal,
+(defun rst-compare-adornments (ado1 ado2)
+ "Compare adornments.
+Return true if both ADO1 and ADO2 adornments are equal,
according to restructured text semantics (only the character and
the style are compared, the indentation does not matter)."
- (and (eq (car deco1) (car deco2))
- (eq (cadr deco1) (cadr deco2))))
+ (and (eq (car ado1) (car ado2))
+ (eq (cadr ado1) (cadr ado2))))
-(defun rst-get-decoration-match (hier deco)
- "Return the index (level) in hierarchy HIER of decoration DECO.
+(defun rst-get-adornment-match (hier ado)
+ "Return the index (level) in hierarchy HIER of adornment ADO.
This basically just searches for the item using the appropriate
comparison and returns the index. Return nil if the item is
not found."
(let ((cur hier))
- (while (and cur (not (rst-compare-decorations (car cur) deco)))
+ (while (and cur (not (rst-compare-adornments (car cur) ado)))
(setq cur (cdr cur)))
cur))
-(defun rst-suggest-new-decoration (alldecos &optional prev)
- "Suggest a new, different decoration from all that have been seen.
+(defun rst-suggest-new-adornment (allados &optional prev)
+ "Suggest a new, different adornment from all that have been seen.
-ALLDECOS is the set of all decorations, including the line numbers.
-PREV is the optional previous decoration, in order to suggest a
+ALLADOS is the set of all adornments, including the line numbers.
+PREV is the optional previous adornment, in order to suggest a
better match."
- ;; For all the preferred decorations...
+ ;; For all the preferred adornments...
(let* (
;; If 'prev' is given, reorder the list to start searching after the
;; match.
(fplist
- (cdr (rst-get-decoration-match rst-preferred-decorations prev)))
+ (cdr (rst-get-adornment-match rst-preferred-adornments prev)))
;; List of candidates to search.
- (curpotential (append fplist rst-preferred-decorations)))
+ (curpotential (append fplist rst-preferred-adornments)))
(while
- ;; For all the decorations...
- (let ((cur alldecos)
+ ;; For all the adornments...
+ (let ((cur allados)
found)
(while (and cur (not found))
- (if (rst-compare-decorations (car cur) (car curpotential))
+ (if (rst-compare-adornments (car cur) (car curpotential))
;; Found it!
(setq found (car curpotential))
(setq cur (cdr cur))))
@@ -684,7 +977,7 @@ better match."
(line-beginning-position 2)))
(defun rst-update-section (char style &optional indent)
- "Unconditionally update the style of a section decoration.
+ "Unconditionally update the style of a section adornment.
Do this using the given character CHAR, with STYLE 'simple
or 'over-and-under, and with indent INDENT. If the STYLE
@@ -692,11 +985,9 @@ is 'simple, whitespace before the title is removed (indent
is always assumed to be 0).
If there are existing overline and/or underline from the
-existing decoration, they are removed before adding the
-requested decoration."
-
- (interactive)
- (end-of-line)
+existing adornment, they are removed before adding the
+requested adornment."
+ (end-of-line)
(let ((marker (point-marker))
len)
@@ -713,21 +1004,20 @@ requested decoration."
;; Set the current column, we're at the end of the title line
(setq len (+ (current-column) indent))
- ;; Remove previous line if it consists only of a single repeated character
+ ;; Remove previous line if it is an adornment
(save-excursion
(forward-line -1)
- (and (rst-line-homogeneous-p 1)
- ;; Avoid removing the underline of a title right above us.
- (save-excursion (forward-line -1)
- (not (looking-at rst-section-text-regexp)))
- (rst-delete-entire-line)))
-
- ;; Remove following line if it consists only of a single repeated
- ;; character
+ (if (and (looking-at (rst-re 'ado-beg-2-1))
+ ;; Avoid removing the underline of a title right above us.
+ (save-excursion (forward-line -1)
+ (not (looking-at (rst-re 'ttl-beg)))))
+ (rst-delete-entire-line)))
+
+ ;; Remove following line if it is an adornment
(save-excursion
(forward-line +1)
- (and (rst-line-homogeneous-p 1)
- (rst-delete-entire-line))
+ (if (looking-at (rst-re 'ado-beg-2-1))
+ (rst-delete-entire-line))
;; Add a newline if we're at the end of the buffer, for the subsequence
;; inserting of the underline
(if (= (point) (buffer-end 1))
@@ -749,186 +1039,277 @@ requested decoration."
(goto-char marker)
))
+(defun rst-classify-adornment (adornment end)
+ "Classify adornment for section titles and transitions.
+ADORNMENT is the complete adornment string as found in the buffer
+with optional trailing whitespace. END is the point after the
+last character of ADORNMENT.
-(defun rst-normalize-cursor-position ()
- "Normalize the cursor position.
-If the cursor is on a decoration line or an empty line , place it
-on the section title line (at the end). Returns the line offset
-by which the cursor was moved. This works both over or under a
-line."
- (if (save-excursion (beginning-of-line)
- (or (rst-line-homogeneous-p 1)
- (looking-at "^[ \t]*$")))
- (progn
- (beginning-of-line)
- (cond
- ((save-excursion (forward-line -1)
- (beginning-of-line)
- (and (looking-at rst-section-text-regexp)
- (not (rst-line-homogeneous-p 1))))
- (progn (forward-line -1) -1))
- ((save-excursion (forward-line +1)
- (beginning-of-line)
- (and (looking-at rst-section-text-regexp)
- (not (rst-line-homogeneous-p 1))))
- (progn (forward-line +1) +1))
- (t 0)))
- 0 ))
-
-
-(defun rst-find-all-decorations ()
- "Find all the decorations in the file.
-Return a list of (line, decoration) pairs. Each decoration
-consists in a (char, style, indent) triple.
-
-This function does not detect the hierarchy of decorations, it
-just finds all of them in a file. You can then invoke another
-function to remove redundancies and inconsistencies."
-
- (let ((positions ())
- (curline 1))
- ;; Iterate over all the section titles/decorations in the file.
- (save-excursion
- (goto-char (point-min))
- (while (< (point) (buffer-end 1))
- (if (rst-line-homogeneous-nodent-p)
- (progn
- (setq curline (+ curline (rst-normalize-cursor-position)))
-
- ;; Here we have found a potential site for a decoration,
- ;; characterize it.
- (let ((deco (rst-get-decoration)))
- (if (cadr deco) ;; Style is existing.
- ;; Found a real decoration site.
- (progn
- (push (cons curline deco) positions)
- ;; Push beyond the underline.
- (forward-line 1)
- (setq curline (+ curline 1))
- )))
- ))
- (forward-line 1)
- (setq curline (+ curline 1))
- ))
- (reverse positions)))
-
+Return a list. The first entry is t for a transition or a
+cons (CHARACTER . STYLE). Check `rst-preferred-adornments' for
+the meaning of CHARACTER and STYLE.
-(defun rst-infer-hierarchy (decorations)
- "Build a hierarchy of decorations using the list of given DECORATIONS.
+The remaining list forms four match groups as returned by
+`match-data'. Match group 0 matches the whole construct. Match
+group 1 matches the overline adornment if present. Match group 2
+matches the section title text or the transition. Match group 3
+matches the underline adornment.
-This function expects a list of (char, style, indent) decoration
+Return nil if no syntactically valid adornment is found."
+ (save-excursion
+ (save-match-data
+ (when (string-match (rst-re 'ado-beg-2-1) adornment)
+ (goto-char end)
+ (let* ((ado-ch (string-to-char (match-string 2 adornment)))
+ (ado-re (rst-re ado-ch 'adorep3-hlp))
+ (end-pnt (point))
+ (beg-pnt (progn
+ (forward-line 0)
+ (point)))
+ (nxt-emp ; Next line inexistant or empty
+ (save-excursion
+ (or (not (zerop (forward-line 1)))
+ (looking-at (rst-re 'lin-end)))))
+ (prv-emp ; Previous line inexistant or empty
+ (save-excursion
+ (or (not (zerop (forward-line -1)))
+ (looking-at (rst-re 'lin-end)))))
+ (ttl-blw ; Title found below starting here
+ (save-excursion
+ (and
+ (zerop (forward-line 1))
+ (looking-at (rst-re 'ttl-beg))
+ (point))))
+ (ttl-abv ; Title found above starting here
+ (save-excursion
+ (and
+ (zerop (forward-line -1))
+ (looking-at (rst-re 'ttl-beg))
+ (point))))
+ (und-fnd ; Matching underline found starting here
+ (save-excursion
+ (and ttl-blw
+ (zerop (forward-line 2))
+ (looking-at (rst-re ado-re 'lin-end))
+ (point))))
+ (ovr-fnd ; Matching overline found starting here
+ (save-excursion
+ (and ttl-abv
+ (zerop (forward-line -2))
+ (looking-at (rst-re ado-re 'lin-end))
+ (point))))
+ key beg-ovr end-ovr beg-txt end-txt beg-und end-und)
+ (cond
+ ((and nxt-emp prv-emp)
+ ;; A transition
+ (setq key t
+ beg-txt beg-pnt
+ end-txt end-pnt))
+ ((or und-fnd ovr-fnd)
+ ;; An overline with an underline
+ (setq key (cons ado-ch 'over-and-under))
+ (let (;; Prefer overline match over underline match
+ (und-pnt (if ovr-fnd beg-pnt und-fnd))
+ (ovr-pnt (if ovr-fnd ovr-fnd beg-pnt))
+ (txt-pnt (if ovr-fnd ttl-abv ttl-blw)))
+ (goto-char ovr-pnt)
+ (setq beg-ovr (point)
+ end-ovr (line-end-position))
+ (goto-char txt-pnt)
+ (setq beg-txt (point)
+ end-txt (line-end-position))
+ (goto-char und-pnt)
+ (setq beg-und (point)
+ end-und (line-end-position))))
+ (ttl-abv
+ ;; An underline
+ (setq key (cons ado-ch 'simple)
+ beg-und beg-pnt
+ end-und end-pnt)
+ (goto-char ttl-abv)
+ (setq beg-txt (point)
+ end-txt (line-end-position)))
+ (t
+ ;; Invalid adornment
+ (setq key nil)))
+ (if key
+ (list key
+ (or beg-ovr beg-txt beg-und)
+ (or end-und end-txt end-ovr)
+ beg-ovr end-ovr beg-txt end-txt beg-und end-und)))))))
+
+(defun rst-find-title-line ()
+ "Find a section title line around point and return its characteristics.
+If the point is on an adornment line find the respective title
+line. If the point is on an empty line check previous or next
+line whether it is a suitable title line and use it if so. If
+point is on a suitable title line use it.
+
+If no title line is found return nil.
+
+Otherwise return as `rst-classify-adornment' does. However, if
+the title line has no syntactically valid adornment STYLE is nil
+in the first element. If there is no adornment around the title
+CHARACTER is also nil and match groups for overline and underline
+are nil."
+ (save-excursion
+ (forward-line 0)
+ (let ((orig-pnt (point))
+ (orig-end (line-end-position)))
+ (cond
+ ((looking-at (rst-re 'ado-beg-2-1))
+ (let ((char (string-to-char (match-string-no-properties 2)))
+ (r (rst-classify-adornment (match-string-no-properties 0)
+ (match-end 0))))
+ (cond
+ ((not r)
+ ;; Invalid adornment - check whether this is an incomplete overline
+ (if (and
+ (zerop (forward-line 1))
+ (looking-at (rst-re 'ttl-beg)))
+ (list (cons char nil) orig-pnt (line-end-position)
+ orig-pnt orig-end (point) (line-end-position) nil nil)))
+ ((consp (car r))
+ ;; A section title - not a transition
+ r))))
+ ((looking-at (rst-re 'lin-end))
+ (or
+ (save-excursion
+ (if (and (zerop (forward-line -1))
+ (looking-at (rst-re 'ttl-beg)))
+ (list (cons nil nil) (point) (line-end-position)
+ nil nil (point) (line-end-position) nil nil)))
+ (save-excursion
+ (if (and (zerop (forward-line 1))
+ (looking-at (rst-re 'ttl-beg)))
+ (list (cons nil nil) (point) (line-end-position)
+ nil nil (point) (line-end-position) nil nil)))))
+ ((looking-at (rst-re 'ttl-beg))
+ ;; Try to use the underline
+ (let ((r (rst-classify-adornment
+ (buffer-substring-no-properties
+ (line-beginning-position 2) (line-end-position 2))
+ (line-end-position 2))))
+ (if r
+ r
+ ;; No valid adornment found
+ (list (cons nil nil) (point) (line-end-position)
+ nil nil (point) (line-end-position) nil nil))))))))
+
+;; The following function and variables are used to maintain information about
+;; current section adornment in a buffer local cache. Thus they can be used for
+;; font-locking and manipulation commands.
+
+(defvar rst-all-sections nil
+ "All section adornments in the buffer as found by `rst-find-all-adornments'.
+t when no section adornments were found.")
+(make-variable-buffer-local 'rst-all-sections)
+
+;; FIXME: If this variable is set to a different value font-locking of section
+;; headers is wrong
+(defvar rst-section-hierarchy nil
+ "Section hierarchy in the buffer as determined by `rst-get-hierarchy'.
+t when no section adornments were found. Value depends on
+`rst-all-sections'.")
+(make-variable-buffer-local 'rst-section-hierarchy)
+
+(defun rst-reset-section-caches ()
+ "Reset all section cache variables.
+Should be called by interactive functions which deal with sections."
+ (setq rst-all-sections nil
+ rst-section-hierarchy nil))
+
+(defun rst-find-all-adornments ()
+ "Return all the section adornments in the current buffer.
+Return a list of (LINE . ADORNMENT) with ascending LINE where
+LINE is the line containing the section title. ADORNMENT consists
+of a (CHARACTER STYLE INDENT) triple as described for
+`rst-preferred-adornments'.
+
+Uses and sets `rst-all-sections'."
+ (unless rst-all-sections
+ (let (positions)
+ ;; Iterate over all the section titles/adornments in the file.
+ (save-excursion
+ (goto-char (point-min))
+ (while (re-search-forward (rst-re 'ado-beg-2-1) nil t)
+ (let ((ado-data (rst-classify-adornment
+ (match-string-no-properties 0) (point))))
+ (when (and ado-data
+ (consp (car ado-data))) ; Ignore transitions
+ (set-match-data (cdr ado-data))
+ (goto-char (match-beginning 2)) ; Goto the title start
+ (push (cons (1+ (count-lines (point-min) (point)))
+ (list (caar ado-data)
+ (cdar ado-data)
+ (current-indentation)))
+ positions)
+ (goto-char (match-end 0))))) ; Go beyond the whole thing
+ (setq positions (nreverse positions))
+ (setq rst-all-sections (or positions t)))))
+ (if (eq rst-all-sections t)
+ nil
+ rst-all-sections))
+
+(defun rst-infer-hierarchy (adornments)
+ "Build a hierarchy of adornments using the list of given ADORNMENTS.
+
+ADORNMENTS is a list of (CHARACTER STYLE INDENT) adornment
specifications, in order that they appear in a file, and will
-infer a hierarchy of section levels by removing decorations that
-have already been seen in a forward traversal of the decorations,
-comparing just the character and style.
+infer a hierarchy of section levels by removing adornments that
+have already been seen in a forward traversal of the adornments,
+comparing just CHARACTER and STYLE.
-Similarly returns a list of (char, style, indent), where each
+Similarly returns a list of (CHARACTER STYLE INDENT), where each
list element should be unique."
-
- (let ((hierarchy-alist (list)))
- (dolist (x decorations)
+ (let (hierarchy-alist)
+ (dolist (x adornments)
(let ((char (car x))
(style (cadr x)))
(unless (assoc (cons char style) hierarchy-alist)
- (push (cons (cons char style) x) hierarchy-alist))
- ))
+ (push (cons (cons char style) x) hierarchy-alist))))
+ (mapcar 'cdr (nreverse hierarchy-alist))))
- (mapcar 'cdr (nreverse hierarchy-alist))
- ))
-
-
-(defun rst-get-hierarchy (&optional alldecos ignore)
+(defun rst-get-hierarchy (&optional ignore)
"Return the hierarchy of section titles in the file.
-Return a list of decorations that represents the hierarchy of
-section titles in the file. Reuse the list of decorations
-already computed in ALLDECOS if present. If the line number in
-IGNORE is specified, the decoration found on that line (if there
-is one) is not taken into account when building the hierarchy."
- (let ((all (or alldecos (rst-find-all-decorations))))
- (setq all (assq-delete-all ignore all))
- (rst-infer-hierarchy (mapcar 'cdr all))))
-
-
-(defun rst-get-decoration (&optional point)
- "Get the decoration at POINT.
-
-Looks around point and finds the characteristics of the
-decoration that is found there. Assumes that the cursor is
-already placed on the title line (and not on the overline or
-underline).
-
-This function returns a (char, style, indent) triple. If the
-characters of overline and underline are different, return
-the underline character. The indent is always calculated.
-A decoration can be said to exist if the style is not nil.
-
-A point can be specified to go to the given location before
-extracting the decoration."
-
- (let (char style)
- (save-excursion
- (if point (goto-char point))
- (beginning-of-line)
- (if (looking-at rst-section-text-regexp)
- (let* ((over (save-excursion
- (forward-line -1)
- (rst-line-homogeneous-nodent-p)))
-
- (under (save-excursion
- (forward-line +1)
- (rst-line-homogeneous-nodent-p)))
- )
-
- ;; Check that the line above the overline is not part of a title
- ;; above it.
- (if (and over
- (save-excursion
- (and (equal (forward-line -2) 0)
- (looking-at rst-section-text-regexp))))
- (setq over nil))
-
- (cond
- ;; No decoration found, leave all return values nil.
- ((and (eq over nil) (eq under nil)))
-
- ;; Overline only, leave all return values nil.
- ;;
- ;; Note: we don't return the overline character, but it could
- ;; perhaps in some cases be used to do something.
- ((and over (eq under nil)))
-
- ;; Underline only.
- ((and under (eq over nil))
- (setq char under
- style 'simple))
-
- ;; Both overline and underline.
- (t
- (setq char under
- style 'over-and-under)))))
- ;; Return values.
- (list char style
- ;; Find indentation.
- (save-excursion (back-to-indentation) (current-column))))))
-
-
-(defun rst-get-decorations-around (&optional alldecos)
- "Return the decorations around point.
-
-Given the list of all decorations ALLDECOS (with positions),
-find the decorations before and after the given point.
-A list of the previous and next decorations is returned."
- (let* ((all (or alldecos (rst-find-all-decorations)))
+Return a list of adornments that represents the hierarchy of
+section titles in the file. Each element consists of (CHARACTER
+STYLE INDENT) as described for `rst-find-all-adornments'. If the
+line number in IGNORE is specified, a possibly adornment found on
+that line is not taken into account when building the hierarchy.
+
+Uses and sets `rst-section-hierarchy' unless IGNORE is given."
+ (if (and (not ignore) rst-section-hierarchy)
+ (if (eq rst-section-hierarchy t)
+ nil
+ rst-section-hierarchy)
+ (let ((r (rst-infer-hierarchy
+ (mapcar 'cdr
+ (assq-delete-all
+ ignore
+ (rst-find-all-adornments))))))
+ (setq rst-section-hierarchy
+ (if ignore
+ ;; Clear cache reflecting that a possible update is not
+ ;; reflected
+ nil
+ (or r t)))
+ r)))
+
+(defun rst-get-adornments-around ()
+ "Return the adornments around point.
+Return a list of the previous and next adornments."
+ (let* ((all (rst-find-all-adornments))
(curline (line-number-at-pos))
prev next
(cur all))
- ;; Search for the decorations around the current line.
+ ;; Search for the adornments around the current line.
(while (and cur (< (caar cur) curline))
(setq prev cur
cur (cdr cur)))
- ;; 'cur' is the following decoration.
+ ;; 'cur' is the following adornment.
(if (and cur (caar cur))
(setq next (if (= curline (caar cur)) (cdr cur) cur)))
@@ -937,23 +1318,21 @@ A list of the previous and next decorations is returned."
))
-(defun rst-decoration-complete-p (deco)
- "Return true if the decoration DECO around point is complete."
+(defun rst-adornment-complete-p (ado)
+ "Return true if the adornment ADO around point is complete."
;; Note: we assume that the detection of the overline as being the underline
;; of a preceding title has already been detected, and has been eliminated
- ;; from the decoration that is given to us.
+ ;; from the adornment that is given to us.
;; There is some sectioning already present, so check if the current
;; sectioning is complete and correct.
- (let* ((char (car deco))
- (style (cadr deco))
- (indent (caddr deco))
+ (let* ((char (car ado))
+ (style (cadr ado))
+ (indent (caddr ado))
(endcol (save-excursion (end-of-line) (current-column)))
)
(if char
- (let ((exps (concat "^"
- (regexp-quote (make-string (+ endcol indent) char))
- "$")))
+ (let ((exps (rst-re "^" char (format "\\{%d\\}" (+ endcol indent)) "$")))
(and
(save-excursion (forward-line +1)
(beginning-of-line)
@@ -966,57 +1345,56 @@ A list of the previous and next decorations is returned."
))
-(defun rst-get-next-decoration
- (curdeco hier &optional suggestion reverse-direction)
- "Get the next decoration for CURDECO, in given hierarchy HIER.
-If suggesting, suggest for new decoration SUGGESTION.
+(defun rst-get-next-adornment
+ (curado hier &optional suggestion reverse-direction)
+ "Get the next adornment for CURADO, in given hierarchy HIER.
+If suggesting, suggest for new adornment SUGGESTION.
REVERSE-DIRECTION is used to reverse the cycling order."
(let* (
- (char (car curdeco))
- (style (cadr curdeco))
+ (char (car curado))
+ (style (cadr curado))
- ;; Build a new list of decorations for the rotation.
- (rotdecos
+ ;; Build a new list of adornments for the rotation.
+ (rotados
(append hier
- ;; Suggest a new decoration.
+ ;; Suggest a new adornment.
(list suggestion
- ;; If nothing to suggest, use first decoration.
+ ;; If nothing to suggest, use first adornment.
(car hier)))) )
(or
- ;; Search for next decoration.
+ ;; Search for next adornment.
(cadr
- (let ((cur (if reverse-direction rotdecos
- (reverse rotdecos))))
+ (let ((cur (if reverse-direction rotados
+ (reverse rotados))))
(while (and cur
(not (and (eq char (caar cur))
(eq style (cadar cur)))))
(setq cur (cdr cur)))
cur))
- ;; If not found, take the first of all decorations.
+ ;; If not found, take the first of all adornments.
suggestion
)))
-(defun rst-adjust ()
- "Auto-adjust the decoration around point.
+;; FIXME: A line "``/`` full" is not accepted as a section title
+(defun rst-adjust (pfxarg)
+ "Auto-adjust the adornment around point.
-Adjust/rotate the section decoration for the section title
-around point or promote/demote the decorations inside the region,
+Adjust/rotate the section adornment for the section title
+around point or promote/demote the adornments inside the region,
depending on if the region is active. This function is meant to
be invoked possibly multiple times, and can vary its behavior
with a positive prefix argument (toggle style), or with a
negative prefix argument (alternate behavior).
-This function is the main focus of this module and is a bit of a
-swiss knife. It is meant as the single most essential function
-to be bound to invoke to adjust the decorations of a section
-title in restructuredtext. It tries to deal with all the
-possible cases gracefully and to do `the right thing' in all
-cases.
+This function is a bit of a swiss knife. It is meant to adjust
+the adornments of a section title in reStructuredText. It tries
+to deal with all the possible cases gracefully and to do `the
+right thing' in all cases.
-See the documentations of `rst-adjust-decoration' and
+See the documentations of `rst-adjust-adornment-work' and
`rst-promote-region' for full details.
Prefix Arguments
@@ -1025,28 +1403,24 @@ Prefix Arguments
The method can take either (but not both) of
a. a (non-negative) prefix argument, which means to toggle the
- decoration style. Invoke with a prefix arg for example;
+ adornment style. Invoke with a prefix arg for example;
b. a negative numerical argument, which generally inverts the
direction of search in the file or hierarchy. Invoke with C--
prefix for example."
- (interactive)
+ (interactive "P")
(let* (;; Save our original position on the current line.
(origpt (point-marker))
- ;; Parse the positive and negative prefix arguments.
- (reverse-direction
- (and current-prefix-arg
- (< (prefix-numeric-value current-prefix-arg) 0)))
- (toggle-style
- (and current-prefix-arg (not reverse-direction))))
+ (reverse-direction (and pfxarg (< (prefix-numeric-value pfxarg) 0)))
+ (toggle-style (and pfxarg (not reverse-direction))))
(if (rst-portable-mark-active-p)
- ;; Adjust decorations within region.
- (rst-promote-region current-prefix-arg)
- ;; Adjust decoration around point.
- (rst-adjust-decoration toggle-style reverse-direction))
+ ;; Adjust adornments within region.
+ (rst-promote-region (and pfxarg t))
+ ;; Adjust adornment around point.
+ (rst-adjust-adornment-work toggle-style reverse-direction))
;; Run the hooks to run after adjusting.
(run-hooks 'rst-adjust-hook)
@@ -1056,18 +1430,32 @@ b. a negative numerical argument, which generally inverts the
))
-(defvar rst-adjust-hook nil
- "Hooks to be run after running `rst-adjust'.")
+(defcustom rst-adjust-hook nil
+ "Hooks to be run after running `rst-adjust'."
+ :group 'rst-adjust
+ :type '(hook)
+ :package-version '(rst . "1.1.0"))
-(defvar rst-new-decoration-down nil
- "Non-nil if new decoration is added deeper.
-If non-nil, a new decoration being added will be initialized to
-be one level down from the previous decoration. If nil, a new
-decoration will be equal to the level of the previous
-decoration.")
+(defcustom rst-new-adornment-down nil
+ "Controls level of new adornment for section headers."
+ :group 'rst-adjust
+ :type '(choice
+ (const :tag "Same level as previous one" nil)
+ (const :tag "One level down relative to the previous one" t))
+ :package-version '(rst . "1.1.0"))
-(defun rst-adjust-decoration (&optional toggle-style reverse-direction)
-"Adjust/rotate the section decoration for the section title around point.
+(defun rst-adjust-adornment (pfxarg)
+ "Call `rst-adjust-adornment-work' interactively.
+
+Keep this for compatibility for older bindings (are there any?)."
+ (interactive "P")
+
+ (let* ((reverse-direction (and pfxarg (< (prefix-numeric-value pfxarg) 0)))
+ (toggle-style (and pfxarg (not reverse-direction))))
+ (rst-adjust-adornment-work toggle-style reverse-direction)))
+
+(defun rst-adjust-adornment-work (toggle-style reverse-direction)
+"Adjust/rotate the section adornment for the section title around point.
This function is meant to be invoked possibly multiple times, and
can vary its behavior with a true TOGGLE-STYLE argument, or with
@@ -1080,13 +1468,13 @@ The next action it takes depends on context around the point, and
it is meant to be invoked possibly more than once to rotate among
the various possibilities. Basically, this function deals with:
-- adding a decoration if the title does not have one;
+- adding a adornment if the title does not have one;
- adjusting the length of the underline characters to fit a
modified title;
-- rotating the decoration in the set of already existing
- sectioning decorations used in the file;
+- rotating the adornment in the set of already existing
+ sectioning adornments used in the file;
- switching between simple and over-and-under styles.
@@ -1095,10 +1483,10 @@ invoke the method and it will do the most obvious thing that you
would expect.
-Decoration Definitions
-======================
+Adornment Definitions
+=====================
-The decorations consist in
+The adornments consist in
1. a CHARACTER
@@ -1119,71 +1507,69 @@ Here are the gory details of the algorithm (it seems quite
complicated, but really, it does the most obvious thing in all
the particular cases):
-Before applying the decoration change, the cursor is placed on
+Before applying the adornment change, the cursor is placed on
the closest line that could contain a section title.
-Case 1: No Decoration
----------------------
+Case 1: No Adornment
+--------------------
-If the current line has no decoration around it,
+If the current line has no adornment around it,
-- search backwards for the last previous decoration, and apply
- the decoration one level lower to the current line. If there
- is no defined level below this previous decoration, we suggest
- the most appropriate of the `rst-preferred-decorations'.
+- search backwards for the last previous adornment, and apply
+ the adornment one level lower to the current line. If there
+ is no defined level below this previous adornment, we suggest
+ the most appropriate of the `rst-preferred-adornments'.
If REVERSE-DIRECTION is true, we simply use the previous
- decoration found directly.
+ adornment found directly.
-- if there is no decoration found in the given direction, we use
- the first of `rst-preferred-decorations'.
+- if there is no adornment found in the given direction, we use
+ the first of `rst-preferred-adornments'.
-The prefix argument forces a toggle of the prescribed decoration
-style.
+TOGGLE-STYLE forces a toggle of the prescribed adornment style.
-Case 2: Incomplete Decoration
------------------------------
+Case 2: Incomplete Adornment
+----------------------------
-If the current line does have an existing decoration, but the
-decoration is incomplete, that is, the underline/overline does
+If the current line does have an existing adornment, but the
+adornment is incomplete, that is, the underline/overline does
not extend to exactly the end of the title line (it is either too
short or too long), we simply extend the length of the
underlines/overlines to fit exactly the section title.
-If the prefix argument is given, we toggle the style of the
-decoration as well.
+If TOGGLE-STYLE we toggle the style of the adornment as well.
REVERSE-DIRECTION has no effect in this case.
-Case 3: Complete Existing Decoration
-------------------------------------
+Case 3: Complete Existing Adornment
+-----------------------------------
-If the decoration is complete (i.e. the underline (overline)
+If the adornment is complete (i.e. the underline (overline)
length is already adjusted to the end of the title line), we
search/parse the file to establish the hierarchy of all the
-decorations (making sure not to include the decoration around
-point), and we rotate the current title's decoration from within
+adornments (making sure not to include the adornment around
+point), and we rotate the current title's adornment from within
that list (by default, going *down* the hierarchy that is present
in the file, i.e. to a lower section level). This is meant to be
-used potentially multiple times, until the desired decoration is
+used potentially multiple times, until the desired adornment is
found around the title.
If we hit the boundary of the hierarchy, exactly one choice from
-the list of preferred decorations is suggested/chosen, the first
-of those decoration that has not been seen in the file yet (and
-not including the decoration around point), and the next
+the list of preferred adornments is suggested/chosen, the first
+of those adornment that has not been seen in the file yet (and
+not including the adornment around point), and the next
invocation rolls over to the other end of the hierarchy (i.e. it
cycles). This allows you to avoid having to set which character
to use.
If REVERSE-DIRECTION is true, the effect is to change the
-direction of rotation in the hierarchy of decorations, thus
+direction of rotation in the hierarchy of adornments, thus
instead going *up* the hierarchy.
-However, if there is a non-negative prefix argument, we do not
-rotate the decoration, but instead simply toggle the style of the
-current decoration (this should be the most common way to toggle
-the style of an existing complete decoration).
+However, if TOGGLE-STYLE, we do not rotate the adornment, but
+instead simply toggle the style of the current adornment (this
+should be the most common way to toggle the style of an existing
+complete adornment).
Point Location
@@ -1203,7 +1589,7 @@ Indented section titles such as ::
My Title
--------
-are invalid in restructuredtext and thus not recognized by the
+are invalid in reStructuredText and thus not recognized by the
parser. This code will thus not work in a way that would support
indented sections (it would be ambiguous anyway).
@@ -1213,166 +1599,103 @@ Joint Sections
Section titles that are right next to each other may not be
treated well. More work might be needed to support those, and
-special conditions on the completeness of existing decorations
+special conditions on the completeness of existing adornments
might be required to make it non-ambiguous.
-For now we assume that the decorations are disjoint, that is,
-there is at least a single line between the titles/decoration
-lines.
-
-
-Suggested Binding
-=================
-
-We suggest that you bind this function on C-=. It is close to
-C-- so a negative argument can be easily specified with a flick
-of the right hand fingers and the binding is unused in `text-mode'."
- (interactive)
-
- ;; If we were invoked directly, parse the prefix arguments into the
- ;; arguments of the function.
- (if current-prefix-arg
- (setq reverse-direction
- (and current-prefix-arg
- (< (prefix-numeric-value current-prefix-arg) 0))
-
- toggle-style
- (and current-prefix-arg (not reverse-direction))))
-
- (let* (;; Check if we're on an underline around a section title, and move the
- ;; cursor to the title if this is the case.
- (moved (rst-normalize-cursor-position))
-
- ;; Find the decoration and completeness around point.
- (curdeco (rst-get-decoration))
- (char (car curdeco))
- (style (cadr curdeco))
- (indent (caddr curdeco))
-
- ;; New values to be computed.
- char-new style-new indent-new
- )
-
- ;; We've moved the cursor... if we're not looking at some text, we have
- ;; nothing to do.
- (if (save-excursion (beginning-of-line)
- (looking-at rst-section-text-regexp))
- (progn
- (cond
- ;;-------------------------------------------------------------------
- ;; Case 1: No Decoration
- ((and (eq char nil) (eq style nil))
-
- (let* ((alldecos (rst-find-all-decorations))
-
- (around (rst-get-decorations-around alldecos))
- (prev (car around))
- cur
-
- (hier (rst-get-hierarchy alldecos))
- )
-
- ;; Advance one level down.
- (setq cur
- (if prev
- (if (not reverse-direction)
- (or (funcall (if rst-new-decoration-down 'cadr 'car)
- (rst-get-decoration-match hier prev))
- (rst-suggest-new-decoration hier prev))
- prev)
- (copy-sequence (car rst-preferred-decorations))))
-
- ;; Invert the style if requested.
- (if toggle-style
- (setcar (cdr cur) (if (eq (cadr cur) 'simple)
- 'over-and-under 'simple)) )
-
- (setq char-new (car cur)
- style-new (cadr cur)
- indent-new (caddr cur))
- ))
-
- ;;-------------------------------------------------------------------
- ;; Case 2: Incomplete Decoration
- ((not (rst-decoration-complete-p curdeco))
-
- ;; Invert the style if requested.
- (if toggle-style
- (setq style (if (eq style 'simple) 'over-and-under 'simple)))
-
- (setq char-new char
- style-new style
- indent-new indent))
-
- ;;-------------------------------------------------------------------
- ;; Case 3: Complete Existing Decoration
- (t
- (if toggle-style
-
- ;; Simply switch the style of the current decoration.
- (setq char-new char
- style-new (if (eq style 'simple) 'over-and-under 'simple)
- indent-new rst-default-indent)
-
- ;; Else, we rotate, ignoring the decoration around the current
- ;; line...
- (let* ((alldecos (rst-find-all-decorations))
-
- (hier (rst-get-hierarchy alldecos (line-number-at-pos)))
-
- ;; Suggestion, in case we need to come up with something
- ;; new
- (suggestion (rst-suggest-new-decoration
- hier
- (car (rst-get-decorations-around alldecos))))
-
- (nextdeco (rst-get-next-decoration
- curdeco hier suggestion reverse-direction))
-
- )
-
- ;; Indent, if present, always overrides the prescribed indent.
- (setq char-new (car nextdeco)
- style-new (cadr nextdeco)
- indent-new (caddr nextdeco))
-
- )))
- )
-
- ;; Override indent with present indent!
- (setq indent-new (if (> indent 0) indent indent-new))
-
- (if (and char-new style-new)
- (rst-update-section char-new style-new indent-new))
- ))
-
-
- ;; Correct the position of the cursor to more accurately reflect where it
- ;; was located when the function was invoked.
- (unless (= moved 0)
- (forward-line (- moved))
- (end-of-line))
-
- ))
+For now we assume that the adornments are disjoint, that is,
+there is at least a single line between the titles/adornment
+lines."
+ (rst-reset-section-caches)
+ (let ((ttl-fnd (rst-find-title-line))
+ (orig-pnt (point)))
+ (when ttl-fnd
+ (set-match-data (cdr ttl-fnd))
+ (goto-char (match-beginning 2))
+ (let* ((moved (- (line-number-at-pos) (line-number-at-pos orig-pnt)))
+ (char (caar ttl-fnd))
+ (style (cdar ttl-fnd))
+ (indent (current-indentation))
+ (curado (list char style indent))
+ char-new style-new indent-new)
+ (cond
+ ;;-------------------------------------------------------------------
+ ;; Case 1: No valid adornment
+ ((not style)
+ (let ((prev (car (rst-get-adornments-around)))
+ cur
+ (hier (rst-get-hierarchy)))
+ ;; Advance one level down.
+ (setq cur
+ (if prev
+ (if (or (and rst-new-adornment-down reverse-direction)
+ (and (not rst-new-adornment-down)
+ (not reverse-direction)))
+ prev
+ (or (cadr (rst-get-adornment-match hier prev))
+ (rst-suggest-new-adornment hier prev)))
+ (copy-sequence (car rst-preferred-adornments))))
+ ;; Invert the style if requested.
+ (if toggle-style
+ (setcar (cdr cur) (if (eq (cadr cur) 'simple)
+ 'over-and-under 'simple)) )
+ (setq char-new (car cur)
+ style-new (cadr cur)
+ indent-new (caddr cur))))
+ ;;-------------------------------------------------------------------
+ ;; Case 2: Incomplete Adornment
+ ((not (rst-adornment-complete-p curado))
+ ;; Invert the style if requested.
+ (if toggle-style
+ (setq style (if (eq style 'simple) 'over-and-under 'simple)))
+ (setq char-new char
+ style-new style
+ indent-new indent))
+ ;;-------------------------------------------------------------------
+ ;; Case 3: Complete Existing Adornment
+ (t
+ (if toggle-style
+ ;; Simply switch the style of the current adornment.
+ (setq char-new char
+ style-new (if (eq style 'simple) 'over-and-under 'simple)
+ indent-new rst-default-indent)
+ ;; Else, we rotate, ignoring the adornment around the current
+ ;; line...
+ (let* ((hier (rst-get-hierarchy (line-number-at-pos)))
+ ;; Suggestion, in case we need to come up with something new
+ (suggestion (rst-suggest-new-adornment
+ hier
+ (car (rst-get-adornments-around))))
+ (nextado (rst-get-next-adornment
+ curado hier suggestion reverse-direction)))
+ ;; Indent, if present, always overrides the prescribed indent.
+ (setq char-new (car nextado)
+ style-new (cadr nextado)
+ indent-new (caddr nextado))))))
+ ;; Override indent with present indent!
+ (setq indent-new (if (> indent 0) indent indent-new))
+ (if (and char-new style-new)
+ (rst-update-section char-new style-new indent-new))
+ ;; Correct the position of the cursor to more accurately reflect where
+ ;; it was located when the function was invoked.
+ (unless (zerop moved)
+ (forward-line (- moved))
+ (end-of-line))))))
;; Maintain an alias for compatibility.
(defalias 'rst-adjust-section-title 'rst-adjust)
-(defun rst-promote-region (&optional demote)
+(defun rst-promote-region (demote)
"Promote the section titles within the region.
With argument DEMOTE or a prefix argument, demote the section
titles instead. The algorithm used at the boundaries of the
-hierarchy is similar to that used by `rst-adjust-decoration'."
- (interactive)
-
- (let* ((demote (or current-prefix-arg demote))
- (alldecos (rst-find-all-decorations))
- (cur alldecos)
-
- (hier (rst-get-hierarchy alldecos))
- (suggestion (rst-suggest-new-decoration hier))
+hierarchy is similar to that used by `rst-adjust-adornment-work'."
+ (interactive "P")
+ (rst-reset-section-caches)
+ (let* ((cur (rst-find-all-adornments))
+ (hier (rst-get-hierarchy))
+ (suggestion (rst-suggest-new-adornment hier))
(region-begin-line (line-number-at-pos (region-beginning)))
(region-end-line (line-number-at-pos (region-end)))
@@ -1384,7 +1707,7 @@ hierarchy is similar to that used by `rst-adjust-decoration'."
(while (and cur (< (caar cur) region-begin-line))
(setq cur (cdr cur)))
- ;; Create a list of markers for all the decorations which are found within
+ ;; Create a list of markers for all the adornments which are found within
;; the region.
(save-excursion
(let (line)
@@ -1396,34 +1719,34 @@ hierarchy is similar to that used by `rst-adjust-decoration'."
;; Apply modifications.
(dolist (p marker-list)
- ;; Go to the decoration to promote.
- (goto-char (car p))
+ ;; Go to the adornment to promote.
+ (goto-char (car p))
- ;; Update the decoration.
- (apply 'rst-update-section
- ;; Rotate the next decoration.
- (rst-get-next-decoration
- (cadr p) hier suggestion demote))
+ ;; Update the adornment.
+ (apply 'rst-update-section
+ ;; Rotate the next adornment.
+ (rst-get-next-adornment
+ (cadr p) hier suggestion demote))
- ;; Clear marker to avoid slowing down the editing after we're done.
- (set-marker (car p) nil))
+ ;; Clear marker to avoid slowing down the editing after we're done.
+ (set-marker (car p) nil))
(setq deactivate-mark nil)
)))
-(defun rst-display-decorations-hierarchy (&optional decorations)
- "Display the current file's section title decorations hierarchy.
-This function expects a list of (char, style, indent) triples in
-DECORATIONS."
+(defun rst-display-adornments-hierarchy (&optional adornments)
+ "Display the current file's section title adornments hierarchy.
+This function expects a list of (CHARACTER STYLE INDENT) triples
+in ADORNMENTS."
(interactive)
-
- (if (not decorations)
- (setq decorations (rst-get-hierarchy)))
+ (rst-reset-section-caches)
+ (if (not adornments)
+ (setq adornments (rst-get-hierarchy)))
(with-output-to-temp-buffer "*rest section hierarchy*"
(let ((level 1))
(with-current-buffer standard-output
- (dolist (x decorations)
+ (dolist (x adornments)
(insert (format "\nSection Level %d" level))
(apply 'rst-update-section x)
(goto-char (point-max))
@@ -1437,32 +1760,30 @@ DECORATIONS."
(let ((tail (member elem list)))
(if tail (- (length list) (length tail)))))
-(defun rst-straighten-decorations ()
- "Redo all the decorations in the current buffer.
-This is done using our preferred set of decorations. This can be
+(defun rst-straighten-adornments ()
+ "Redo all the adornments in the current buffer.
+This is done using our preferred set of adornments. This can be
used, for example, when using somebody else's copy of a document,
in order to adapt it to our preferred style."
(interactive)
+ (rst-reset-section-caches)
(save-excursion
- (let* ((alldecos (rst-find-all-decorations))
- (hier (rst-get-hierarchy alldecos))
-
- ;; Get a list of pairs of (level . marker)
- (levels-and-markers (mapcar
- (lambda (deco)
- (cons (rst-position (cdr deco) hier)
- (progn
- (goto-char (point-min))
- (forward-line (1- (car deco)))
- (point-marker))))
- alldecos))
- )
+ (let (;; Get a list of pairs of (level . marker)
+ (levels-and-markers (mapcar
+ (lambda (ado)
+ (cons (rst-position (cdr ado)
+ (rst-get-hierarchy))
+ (progn
+ (goto-char (point-min))
+ (forward-line (1- (car ado)))
+ (point-marker))))
+ (rst-find-all-adornments))))
(dolist (lm levels-and-markers)
;; Go to the appropriate position
(goto-char (cdr lm))
;; Apply the new styule
- (apply 'rst-update-section (nth (car lm) rst-preferred-decorations))
+ (apply 'rst-update-section (nth (car lm) rst-preferred-adornments))
;; Reset the market to avoid slowing down editing until it gets GC'ed
(set-marker (cdr lm) nil)
@@ -1470,71 +1791,257 @@ in order to adapt it to our preferred style."
)))
-
-
-(defun rst-straighten-deco-spacing ()
- "Adjust the spacing before and after decorations in the entire document.
-The spacing will be set to two blank lines before the first two
-section levels, and one blank line before any of the other
-section levels."
-;; FIXME: we need to take care of subtitle at some point.
- (interactive)
- (save-excursion
- (let* ((alldecos (rst-find-all-decorations)))
-
- ;; Work the list from the end, so that we don't have to use markers to
- ;; adjust for the changes in the document.
- (dolist (deco (nreverse alldecos))
- ;; Go to the appropriate position.
- (goto-char (point-min))
- (forward-line (1- (car deco)))
- (insert "@\n")
-;; FIXME: todo, we
- )
- )))
-
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; Insert list items
+;; =================
+
+
+;=================================================
+; Borrowed from a2r.el (version 1.3), by Lawrence Mitchell <wence@gmx.li>
+; I needed to make some tiny changes to the functions, so I put it here.
+; -- Wei-Wei Guo
+
+(defconst rst-arabic-to-roman
+ '((1000 . "M") (900 . "CM") (500 . "D") (400 . "CD")
+ (100 . "C") (90 . "XC") (50 . "L") (40 . "XL")
+ (10 . "X") (9 . "IX") (5 . "V") (4 . "IV")
+ (1 . "I"))
+ "List of maps between Arabic numbers and their Roman numeral equivalents.")
+
+(defun rst-arabic-to-roman (num &optional arg)
+ "Convert Arabic number NUM to its Roman numeral representation.
+
+Obviously, NUM must be greater than zero. Don't blame me, blame the
+Romans, I mean \"what have the Romans ever _done_ for /us/?\" (with
+apologies to Monty Python).
+If optional prefix ARG is non-nil, insert in current buffer."
+ (let ((map rst-arabic-to-roman)
+ res)
+ (while (and map (> num 0))
+ (if (or (= num (caar map))
+ (> num (caar map)))
+ (setq res (concat res (cdar map))
+ num (- num (caar map)))
+ (setq map (cdr map))))
+ res))
+
+(defun rst-roman-to-arabic (string &optional arg)
+ "Convert STRING of Roman numerals to an Arabic number.
+
+If STRING contains a letter which isn't a valid Roman numeral, the rest
+of the string from that point onwards is ignored.
+
+Hence:
+MMD == 2500
+and
+MMDFLXXVI == 2500.
+If optional ARG is non-nil, insert in current buffer."
+ (let ((res 0)
+ (map rst-arabic-to-roman))
+ (while map
+ (if (string-match (concat "^" (cdar map)) string)
+ (setq res (+ res (caar map))
+ string (replace-match "" nil t string))
+ (setq map (cdr map))))
+ res))
+;=================================================
(defun rst-find-pfx-in-region (beg end pfx-re)
"Find all the positions of prefixes in region between BEG and END.
-This is used to find bullets and enumerated list items. PFX-RE
-is a regular expression for matching the lines with items."
+This is used to find bullets and enumerated list items. PFX-RE is
+a regular expression for matching the lines after indentation
+with items. Returns a list of cons cells consisting of the point
+and the column of the point."
(let ((pfx ()))
(save-excursion
(goto-char beg)
(while (< (point) end)
(back-to-indentation)
(when (and
- (looking-at pfx-re)
+ (looking-at pfx-re) ; pfx found and...
(let ((pfx-col (current-column)))
(save-excursion
- (forward-line -1)
+ (forward-line -1) ; ...previous line is...
(back-to-indentation)
- (or (looking-at "^[ \t]*$")
- (> (current-column) pfx-col)
+ (or (looking-at (rst-re 'lin-end)) ; ...empty,
+ (> (current-column) pfx-col) ; ...deeper level, or
(and (= (current-column) pfx-col)
- (looking-at pfx-re))))))
+ (looking-at pfx-re)))))) ; ...pfx at same level
(push (cons (point) (current-column))
pfx))
(forward-line 1)) )
(nreverse pfx)))
-(defvar rst-re-bullets
- (format "\\([%s][ \t]\\)[^ \t]" (regexp-quote (concat rst-bullets)))
- "Regexp for finding bullets.")
+(defun rst-insert-list-pos (newitem)
+ "Arrange relative position of a newly inserted list item.
+
+Adding a new list might consider three situations:
-;; (defvar rst-re-enumerations
-;; "\\(\\(#\\|[0-9]+\\)\\.[ \t]\\)[^ \t]"
-;; "Regexp for finding bullets.")
+ (a) Current line is a blank line.
+ (b) Previous line is a blank line.
+ (c) Following line is a blank line.
-(defvar rst-re-items
- (format "\\(%s\\|%s\\)[^ \t]"
- (format "[%s][ \t]" (regexp-quote (concat rst-bullets)))
- "\\(#\\|[0-9]+\\)\\.[ \t]")
- "Regexp for finding bullets.")
+When (a) and (b), just add the new list at current line.
-(defvar rst-preferred-bullets
- '(?- ?* ?+)
- "List of favorite bullets to set for straightening bullets.")
+when (a) and not (b), a blank line is added before adding the new list.
+
+When not (a), first forward point to the end of the line, and add two
+blank lines, then add the new list.
+
+Other situations are just ignored and left to users themselves."
+ (if (save-excursion
+ (beginning-of-line)
+ (looking-at (rst-re 'lin-end)))
+ (if (save-excursion
+ (forward-line -1)
+ (looking-at (rst-re 'lin-end)))
+ (insert newitem " ")
+ (insert "\n" newitem " "))
+ (end-of-line)
+ (insert "\n\n" newitem " ")))
+
+(defvar rst-initial-enums
+ (let (vals)
+ (dolist (fmt '("%s." "(%s)" "%s)"))
+ (dolist (c '("1" "a" "A" "I" "i"))
+ (push (format fmt c) vals)))
+ (cons "#." (nreverse vals)))
+ "List of initial enumerations.")
+
+(defvar rst-initial-items
+ (append (mapcar 'char-to-string rst-bullets) rst-initial-enums)
+ "List of initial items. It's collection of bullets and enumerations.")
+
+(defun rst-insert-list-new-item ()
+ "Insert a new list item.
+
+User is asked to select the item style first, for example (a), i), +. Use TAB
+for completition and choices.
+
+If user selects bullets or #, it's just added with position arranged by
+`rst-insert-list-pos'.
+
+If user selects enumerations, a further prompt is given. User need to input a
+starting item, for example 'e' for 'A)' style. The position is also arranged by
+`rst-insert-list-pos'."
+ (interactive)
+ ;; FIXME: Make this comply to `interactive' standards
+ (let* ((itemstyle (completing-read
+ "Select preferred item style [#.]: "
+ rst-initial-items nil t nil nil "#."))
+ (cnt (if (string-match (rst-re 'cntexp-tag) itemstyle)
+ (match-string 0 itemstyle)))
+ (no
+ (save-match-data
+ ;; FIXME: Make this comply to `interactive' standards
+ (cond
+ ((equal cnt "a")
+ (let ((itemno (read-string "Give starting value [a]: "
+ nil nil "a")))
+ (downcase (substring itemno 0 1))))
+ ((equal cnt "A")
+ (let ((itemno (read-string "Give starting value [A]: "
+ nil nil "A")))
+ (upcase (substring itemno 0 1))))
+ ((equal cnt "I")
+ (let ((itemno (read-number "Give starting value [1]: " 1)))
+ (rst-arabic-to-roman itemno)))
+ ((equal cnt "i")
+ (let ((itemno (read-number "Give starting value [1]: " 1)))
+ (downcase (rst-arabic-to-roman itemno))))
+ ((equal cnt "1")
+ (let ((itemno (read-number "Give starting value [1]: " 1)))
+ (number-to-string itemno)))))))
+ (if no
+ (setq itemstyle (replace-match no t t itemstyle)))
+ (rst-insert-list-pos itemstyle)))
+
+(defcustom rst-preferred-bullets
+ '(?* ?- ?+)
+ "List of favorite bullets."
+ :group 'rst
+ :type `(repeat
+ (choice ,@(mapcar (lambda (char)
+ (list 'const
+ :tag (char-to-string char) char))
+ rst-bullets)))
+ :package-version '(rst . "1.1.0"))
+
+(defun rst-insert-list-continue (curitem prefer-roman)
+ "Insert a list item with list start CURITEM including its indentation level."
+ (end-of-line)
+ (insert
+ "\n" ; FIXME: Separating lines must be possible
+ (cond
+ ((string-match (rst-re '(:alt enmaut-tag
+ bul-tag)) curitem)
+ curitem)
+ ((string-match (rst-re 'num-tag) curitem)
+ (replace-match (number-to-string
+ (1+ (string-to-number (match-string 0 curitem))))
+ nil nil curitem))
+ ((and (string-match (rst-re 'rom-tag) curitem)
+ (save-match-data
+ (if (string-match (rst-re 'ltr-tag) curitem) ; Also a letter tag
+ (save-excursion
+ ;; FIXME: Assumes one line list items without separating
+ ;; empty lines
+ (if (and (zerop (forward-line -1))
+ (looking-at (rst-re 'enmexp-beg)))
+ (string-match
+ (rst-re 'rom-tag)
+ (match-string 0)) ; Previous was a roman tag
+ prefer-roman)) ; Don't know - use flag
+ t))) ; Not a letter tag
+ (replace-match
+ (let* ((old (match-string 0 curitem))
+ (new (save-match-data
+ (rst-arabic-to-roman
+ (1+ (rst-roman-to-arabic
+ (upcase old)))))))
+ (if (equal old (upcase old))
+ (upcase new)
+ (downcase new)))
+ t nil curitem))
+ ((string-match (rst-re 'ltr-tag) curitem)
+ (replace-match (char-to-string
+ (1+ (string-to-char (match-string 0 curitem))))
+ nil nil curitem)))))
+
+
+(defun rst-insert-list (&optional prefer-roman)
+ "Insert a list item at the current point.
+
+The command can insert a new list or a continuing list. When it is called at a
+non-list line, it will promote to insert new list. When it is called at a list
+line, it will insert a list with the same list style.
+
+1. When inserting a new list:
+
+User is asked to select the item style first, for example (a), i), +. Use TAB
+for completition and choices.
+
+ (a) If user selects bullets or #, it's just added.
+ (b) If user selects enumerations, a further prompt is given. User needs to
+ input a starting item, for example 'e' for 'A)' style.
+
+The position of the new list is arranged according to whether or not the
+current line and the previous line are blank lines.
+
+2. When continuing a list, one thing need to be noticed:
+
+List style alphabetical list, such as 'a.', and roman numerical list, such as
+'i.', have some overlapping items, for example 'v.' The function can deal with
+the problem elegantly in most situations. But when those overlapped list are
+preceded by a blank line, it is hard to determine which type to use
+automatically. The function uses alphabetical list by default. If you want
+roman numerical list, just use a prefix (\\[universal-argument])."
+ (interactive "P")
+ (beginning-of-line)
+ (if (looking-at (rst-re 'itmany-beg-1))
+ (rst-insert-list-continue (match-string 0) prefer-roman)
+ (rst-insert-list-new-item)))
(defun rst-straighten-bullets-region (beg end)
"Make all the bulleted list items in the region consistent.
@@ -1547,8 +2054,7 @@ adjust. If bullets are found on levels beyond the
`rst-preferred-bullets' list, they are not modified."
(interactive "r")
- (let ((bullets (rst-find-pfx-in-region beg end
- rst-re-bullets))
+ (let ((bullets (rst-find-pfx-in-region beg end (rst-re 'bul-sta)))
(levtable (make-hash-table :size 4)))
;; Create a map of levels to list of positions.
@@ -1573,25 +2079,25 @@ adjust. If bullets are found on levels beyond the
(insert (string (car bullets))))
(setq bullets (cdr bullets))))))))
-(defun rst-rstrip (str)
- "Strips the whitespace at the end of string STR."
- (string-match "[ \t\n]*\\'" str)
- (substring str 0 (match-beginning 0)))
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; Table of contents
+;; =================
(defun rst-get-stripped-line ()
"Return the line at cursor, stripped from whitespace."
- (re-search-forward "\\S-.*\\S-" (line-end-position))
+ (re-search-forward (rst-re "\\S .*\\S ") (line-end-position))
(buffer-substring-no-properties (match-beginning 0)
(match-end 0)) )
-(defun rst-section-tree (alldecos)
+(defun rst-section-tree ()
"Get the hierarchical tree of section titles.
Returns a hierarchical tree of the sections titles in the
-document, for decorations ALLDECOS. This can be used to generate
-a table of contents for the document. The top node will always
-be a nil node, with the top level titles as children (there may
-potentially be more than one).
+document. This can be used to generate a table of contents for
+the document. The top node will always be a nil node, with the
+top level titles as children (there may potentially be more than
+one).
Each section title consists in a cons of the stripped title
string and a marker to the section in the original text document.
@@ -1603,57 +2109,56 @@ Conceptually, the nil nodes--i.e. those which have no title--are
to be considered as being the same line as their first non-nil
child. This has advantages later in processing the graph."
- (let* ((hier (rst-get-hierarchy alldecos))
- (levels (make-hash-table :test 'equal :size 10))
- lines)
+ (let ((hier (rst-get-hierarchy))
+ (levels (make-hash-table :test 'equal :size 10))
+ lines)
(let ((lev 0))
- (dolist (deco hier)
+ (dolist (ado hier)
;; Compare just the character and indent in the hash table.
- (puthash (cons (car deco) (cadr deco)) lev levels)
+ (puthash (cons (car ado) (cadr ado)) lev levels)
(incf lev)))
;; Create a list of lines that contains (text, level, marker) for each
- ;; decoration.
+ ;; adornment.
(save-excursion
(setq lines
- (mapcar (lambda (deco)
+ (mapcar (lambda (ado)
(goto-char (point-min))
- (forward-line (1- (car deco)))
- (list (gethash (cons (cadr deco) (caddr deco)) levels)
+ (forward-line (1- (car ado)))
+ (list (gethash (cons (cadr ado) (caddr ado)) levels)
(rst-get-stripped-line)
(progn
(beginning-of-line 1)
(point-marker))))
- alldecos)))
-
+ (rst-find-all-adornments))))
(let ((lcontnr (cons nil lines)))
(rst-section-tree-rec lcontnr -1))))
-(defun rst-section-tree-rec (decos lev)
+(defun rst-section-tree-rec (ados lev)
"Recursive guts of the section tree construction.
-DECOS is a cons cell whose cdr is the remaining list of
-decorations, and we change it as we consume them. LEV is
+ADOS is a cons cell whose cdr is the remaining list of
+adornments, and we change it as we consume them. LEV is
the current level of that node. This function returns a
-pair of the subtree that was built. This treats the DECOS
+pair of the subtree that was built. This treats the ADOS
list destructively."
- (let ((ndeco (cadr decos))
+ (let ((nado (cadr ados))
node
children)
- ;; If the next decoration matches our level
- (when (and ndeco (= (car ndeco) lev))
- ;; Pop the next decoration and create the current node with it
- (setcdr decos (cddr decos))
- (setq node (cdr ndeco)) )
+ ;; If the next adornment matches our level
+ (when (and nado (= (car nado) lev))
+ ;; Pop the next adornment and create the current node with it
+ (setcdr ados (cddr ados))
+ (setq node (cdr nado)) )
;; Else we let the node title/marker be unset.
;; Build the child nodes
- (while (and (cdr decos) (> (caadr decos) lev))
+ (while (and (cdr ados) (> (caadr ados) lev))
(setq children
- (cons (rst-section-tree-rec decos (1+ lev))
+ (cons (rst-section-tree-rec ados (1+ lev))
children)))
(setq children (reverse children))
@@ -1749,9 +2254,8 @@ If a numeric prefix argument PFXARG is given, insert the TOC up
to the specified level.
The TOC is inserted indented at the current column."
-
(interactive "P")
-
+ (rst-reset-section-caches)
(let* (;; Check maximum level override
(rst-toc-insert-max-level
(if (and (integerp pfxarg) (> (prefix-numeric-value pfxarg) 0))
@@ -1760,7 +2264,7 @@ The TOC is inserted indented at the current column."
;; Get the section tree for the current cursor point.
(sectree-pair
(rst-section-tree-point
- (rst-section-tree (rst-find-all-decorations))))
+ (rst-section-tree)))
;; Figure out initial indent.
(initial-indent (make-string (current-column) ? ))
@@ -1830,8 +2334,9 @@ level to align."
(if do-child-numbering
(progn
;; Add a separating dot if there is already a prefix
- (if (> (length pfx) 0)
- (setq pfx (concat (rst-rstrip pfx) ".")))
+ (when (> (length pfx) 0)
+ (string-match (rst-re "[ \t\n]*\\'") pfx)
+ (setq pfx (concat (replace-match "" t t pfx) ".")))
;; Calculate the amount of space that the prefix will require
;; for the numbers.
@@ -1852,59 +2357,48 @@ level to align."
)))
-(defun rst-toc-insert-find-delete-contents ()
- "Find and delete an existing comment after the first contents directive.
-Delete that region. Return t if found and the cursor is left after the comment."
- (goto-char (point-min))
- ;; We look for the following and the following only (in other words, if your
- ;; syntax differs, this won't work. If you would like a more flexible thing,
- ;; contact the author, I just can't imagine that this requirement is
- ;; unreasonable for now).
- ;;
- ;; .. contents:: [...anything here...]
- ;; ..
- ;; XXXXXXXX
- ;; XXXXXXXX
- ;; [more lines]
- ;;
- (let ((beg
- (re-search-forward "^\\.\\. contents[ \t]*::\\(.*\\)\n\\.\\."
- nil t))
- last-real)
- (when beg
- ;; Look for the first line that starts at the first column.
- (forward-line 1)
- (beginning-of-line)
- (while (and
- (< (point) (point-max))
- (or (and (looking-at "[ \t]+[^ \t]") (setq last-real (point)) t)
- (looking-at "[ \t]*$")))
- (forward-line 1)
- )
- (if last-real
- (progn
- (goto-char last-real)
- (end-of-line)
- (delete-region beg (point)))
- (goto-char beg))
- t
- )))
-
(defun rst-toc-update ()
"Automatically find the contents section of a document and update.
Updates the inserted TOC if present. You can use this in your
file-write hook to always make it up-to-date automatically."
(interactive)
- (let ((p (point)))
- (save-excursion
- (when (rst-toc-insert-find-delete-contents)
- (insert "\n ")
- (rst-toc-insert)
- ))
- ;; Somehow save-excursion does not really work well.
- (goto-char p))
+ (save-excursion
+ ;; Find and delete an existing comment after the first contents directive.
+ ;; Delete that region.
+ (goto-char (point-min))
+ ;; We look for the following and the following only (in other words, if your
+ ;; syntax differs, this won't work.).
+ ;;
+ ;; .. contents:: [...anything here...]
+ ;; [:field: value]...
+ ;; ..
+ ;; XXXXXXXX
+ ;; XXXXXXXX
+ ;; [more lines]
+ (let ((beg (re-search-forward
+ (rst-re "^" 'exm-sta "contents" 'dcl-tag ".*\n"
+ "\\(?:" 'hws-sta 'fld-tag ".*\n\\)*" 'exm-tag) nil t))
+ last-real)
+ (when beg
+ ;; Look for the first line that starts at the first column.
+ (forward-line 1)
+ (while (and
+ (< (point) (point-max))
+ (or (if (looking-at
+ (rst-re 'hws-sta "\\S ")) ; indented content
+ (setq last-real (point)))
+ (looking-at (rst-re 'lin-end)))) ; empty line
+ (forward-line 1))
+ (if last-real
+ (progn
+ (goto-char last-real)
+ (end-of-line)
+ (delete-region beg (point)))
+ (goto-char beg))
+ (insert "\n ")
+ (rst-toc-insert))))
;; Note: always return nil, because this may be used as a hook.
- )
+ nil)
;; Note: we cannot bind the TOC update on file write because it messes with
;; undo. If we disable undo, since it adds and removes characters, the
@@ -1916,7 +2410,7 @@ file-write hook to always make it up-to-date automatically."
;; ;; Disable undo for the write file hook.
;; (let ((buffer-undo-list t)) (rst-toc-update) ))
-(defalias 'rst-toc-insert-update 'rst-toc-update) ;; backwards compat.
+(defalias 'rst-toc-insert-update 'rst-toc-update) ; backwards compat.
;;------------------------------------------------------------------------------
@@ -1962,13 +2456,13 @@ children, and t if the node has been found."
(defvar rst-toc-buffer-name "*Table of Contents*"
"Name of the Table of Contents buffer.")
-(defvar rst-toc-return-buffer nil
- "Buffer to which to return when leaving the TOC.")
+(defvar rst-toc-return-wincfg nil
+ "Window configuration to which to return when leaving the TOC.")
(defun rst-toc ()
"Display a table-of-contents.
-Finds all the section titles and their decorations in the
+Finds all the section titles and their adornments in the
file, and displays a hierarchically-organized list of the
titles, which is essentially a table-of-contents of the
document.
@@ -1976,11 +2470,9 @@ document.
The Emacs buffer can be navigated, and selecting a section
brings the cursor in that section."
(interactive)
- (let* ((curbuf (current-buffer))
-
- ;; Get the section tree
- (alldecos (rst-find-all-decorations))
- (sectree (rst-section-tree alldecos))
+ (rst-reset-section-caches)
+ (let* ((curbuf (list (current-window-configuration) (point-marker)))
+ (sectree (rst-section-tree))
(our-node (cdr (rst-section-tree-point sectree)))
line
@@ -2006,7 +2498,7 @@ brings the cursor in that section."
(pop-to-buffer buf)
;; Save the buffer to return to.
- (set (make-local-variable 'rst-toc-return-buffer) curbuf)
+ (set (make-local-variable 'rst-toc-return-wincfg) curbuf)
;; Move the cursor near the right section in the TOC.
(goto-char (point-min))
@@ -2023,11 +2515,15 @@ brings the cursor in that section."
(error "Buffer for this section was killed"))
pos))
+;; FIXME: Cursor before or behind the list must be handled properly; before the
+;; list should jump to the top and behind the list to the last normal
+;; paragraph
(defun rst-goto-section (&optional kill)
"Go to the section the current line describes."
(interactive)
(let ((pos (rst-toc-mode-find-section)))
(when kill
+ (set-window-configuration (car rst-toc-return-wincfg))
(kill-buffer (get-buffer rst-toc-buffer-name)))
(pop-to-buffer (marker-buffer pos))
(goto-char pos)
@@ -2044,9 +2540,9 @@ brings the cursor in that section."
EVENT is the input event."
(interactive "e")
(let ((pos
- (with-current-buffer (window-buffer (posn-window (event-end event)))
- (save-excursion
- (goto-char (posn-point (event-end event)))
+ (with-current-buffer (window-buffer (posn-window (event-end event)))
+ (save-excursion
+ (goto-char (posn-point (event-end event)))
(rst-toc-mode-find-section)))))
(pop-to-buffer (marker-buffer pos))
(goto-char pos)
@@ -2061,8 +2557,9 @@ EVENT is the input event."
(defun rst-toc-quit-window ()
"Leave the current TOC buffer."
(interactive)
- (quit-window)
- (pop-to-buffer rst-toc-return-buffer))
+ (let ((retbuf rst-toc-return-wincfg))
+ (set-window-configuration (car retbuf))
+ (goto-char (cadr retbuf))))
(defvar rst-toc-mode-map
(let ((map (make-sparse-keymap)))
@@ -2087,40 +2584,40 @@ EVENT is the input event."
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
-;; Section movement commands.
-;;
+;; Section movement commands
+;; =========================
(defun rst-forward-section (&optional offset)
- "Skip to the next restructured text section title.
+ "Skip to the next reStructuredText section title.
OFFSET specifies how many titles to skip. Use a negative OFFSET to move
backwards in the file (default is to use 1)."
(interactive)
+ (rst-reset-section-caches)
(let* (;; Default value for offset.
(offset (or offset 1))
- ;; Get all the decorations in the file, with their line numbers.
- (alldecos (rst-find-all-decorations))
+ ;; Get all the adornments in the file, with their line numbers.
+ (allados (rst-find-all-adornments))
;; Get the current line.
(curline (line-number-at-pos))
- (cur alldecos)
+ (cur allados)
(idx 0)
)
- ;; Find the index of the "next" decoration w.r.t. to the current line.
+ ;; Find the index of the "next" adornment w.r.t. to the current line.
(while (and cur (< (caar cur) curline))
(setq cur (cdr cur))
(incf idx))
- ;; 'cur' is the decoration on or following the current line.
+ ;; 'cur' is the adornment on or following the current line.
(if (and (> offset 0) cur (= (caar cur) curline))
(incf idx))
;; Find the final index.
(setq idx (+ idx (if (> offset 0) (- offset 1) offset)))
- (setq cur (nth idx alldecos))
+ (setq cur (nth idx allados))
;; If the index is positive, goto the line, otherwise go to the buffer
;; boundaries.
@@ -2156,245 +2653,25 @@ backwards in the file (default is to use 1)."
(push-mark nil t t)
(rst-forward-section (- arg)))))
-
-
-
-
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Functions to work on item lists (e.g. indent/dedent, enumerate), which are
;; always 2 or 3 characters apart horizontally with rest.
-;; (FIXME: there is currently a bug that makes the region go away when we do that.)
-(defvar rst-shift-fill-region nil
- "If non-nil, automatically re-fill the region that is being shifted.")
-
(defun rst-find-leftmost-column (beg end)
- "Find the leftmost column in the region."
- (let ((mincol 1000))
+ "Return the leftmost column in region BEG to END."
+ (let (mincol)
(save-excursion
(goto-char beg)
(while (< (point) end)
(back-to-indentation)
- (unless (looking-at "[ \t]*$")
- (setq mincol (min mincol (current-column))))
- (forward-line 1)
- ))
+ (unless (looking-at (rst-re 'lin-end))
+ (setq mincol (if mincol
+ (min mincol (current-column))
+ (current-column))))
+ (forward-line 1)))
mincol))
-
-;; What we really need to do is compute all the possible alignment possibilities
-;; and then select one.
-;;
-;; .. line-block::
-;;
-;; a) sdjsds
-;;
-;; - sdjsd jsjds
-;;
-;; sdsdsjdsj
-;;
-;; 11. sjdss jddjs
-;;
-;; * * * * * * *
-;;
-;; Move backwards, accumulate the beginning positions, and also the second
-;; positions, in case the line matches the bullet pattern, and then sort.
-
-(defun rst-compute-bullet-tabs (&optional pt)
- "Build the list of possible horizontal alignment points.
-Search backwards from point (or point PT if specified) to
-build the list of possible horizontal alignment points that
-includes the beginning and contents of a restructuredtext
-bulleted or enumerated list item. Return a sorted list
-of (COLUMN-NUMBER . LINE) pairs."
- (save-excursion
- (when pt (goto-char pt))
-
- ;; We work our way backwards and towards the left.
- (let ((leftcol 100000) ;; Current column.
- (tablist nil) ;; List of tab positions.
- )
-
- ;; Start by skipping the current line.
- (beginning-of-line 0)
-
- ;; Search backwards for each line.
- (while (and (> (point) (point-min))
- (> leftcol 0))
-
- ;; Skip empty lines.
- (unless (looking-at "^[ \t]*$")
- ;; Inspect the current non-empty line
- (back-to-indentation)
-
- ;; Skip lines that are beyond the current column (we want to move
- ;; towards the left).
- (let ((col (current-column)))
- (when (< col leftcol)
-
- ;; Add the beginning of the line as a tabbing point.
- (unless (memq col (mapcar 'car tablist))
- (push (cons col (point)) tablist))
-
- ;; Look at the line to figure out if it is a bulleted or enumerate
- ;; list item.
- (when (looking-at
- (concat
- "\\(?:"
- "\\(\\(?:[0-9a-zA-Z#]\\{1,3\\}[.):-]\\|[*+-]\\)[ \t]+\\)[^ \t\n]"
- "\\|"
- (format "\\(%s%s+[ \t]+\\)[^ \t\n]"
- (regexp-quote (thing-at-point 'char))
- (regexp-quote (thing-at-point 'char)))
- "\\)"
- ))
- ;; Add the column of the contained item.
- (let* ((matchlen (length (or (match-string 1) (match-string 2))))
- (newcol (+ col matchlen)))
- (unless (or (>= newcol leftcol)
- (memq (+ col matchlen) (mapcar 'car tablist)))
- (push (cons (+ col matchlen) (+ (point) matchlen))
- tablist)))
- )
-
- (setq leftcol col)
- )))
-
- ;; Move backwards one line.
- (beginning-of-line 0))
-
- (sort tablist (lambda (x y) (<= (car x) (car y))))
- )))
-
-(defun rst-debug-print-tabs (tablist)
- "Insert a line and place special characters at the tab points in TABLIST."
- (beginning-of-line)
- (insert (concat "\n" (make-string 1000 ? ) "\n"))
- (beginning-of-line 0)
- (dolist (col tablist)
- (beginning-of-line)
- (forward-char (car col))
- (delete-char 1)
- (insert "@")
- ))
-
-(defun rst-debug-mark-found (tablist)
- "Insert a line and place special characters at the tab points in TABLIST."
- (dolist (col tablist)
- (when (cdr col)
- (goto-char (cdr col))
- (insert "@"))))
-
-
-(defvar rst-shift-basic-offset 2
- "Basic horizontal shift distance when there is no preceding alignment tabs.")
-
-(defun rst-shift-region-guts (find-next-fun offset-fun)
- "(See `rst-shift-region-right' for a description)."
- (let* ((mbeg (copy-marker (region-beginning)))
- (mend (copy-marker (region-end)))
- (tabs (rst-compute-bullet-tabs mbeg))
- (leftmostcol (rst-find-leftmost-column (region-beginning) (region-end)))
- )
- ;; Add basic offset tabs at the end of the list. This is a better
- ;; implementation technique than hysteresis and a basic offset because it
- ;; insures that movement in both directions is consistently using the same
- ;; column positions. This makes it more predictable.
- (setq tabs
- (append tabs
- (mapcar (lambda (x) (cons x nil))
- (let ((maxcol 120)
- (max-lisp-eval-depth 2000))
- (flet ((addnum (x)
- (if (> x maxcol)
- nil
- (cons x (addnum
- (+ x rst-shift-basic-offset))))))
- (addnum (or (caar (last tabs)) 0))))
- )))
-
- ;; (For debugging.)
- ;;; (save-excursion (goto-char mbeg) (forward-char -1) (rst-debug-print-tabs tabs))))
- ;;; (print tabs)
- ;;; (save-excursion (rst-debug-mark-found tabs))
-
- ;; Apply the indent.
- (indent-rigidly
- mbeg mend
-
- ;; Find the next tab after the leftmost column.
- (let ((tab (funcall find-next-fun tabs leftmostcol)))
-
- (if tab
- (progn
- (when (cdar tab)
- (message "Aligned on '%s'"
- (save-excursion
- (goto-char (cdar tab))
- (buffer-substring-no-properties
- (line-beginning-position)
- (line-end-position))))
- )
- (- (caar tab) leftmostcol)) ;; Num chars.
-
- ;; Otherwise use the basic offset
- (funcall offset-fun rst-shift-basic-offset)
- )))
-
- ;; Optionally reindent.
- (when rst-shift-fill-region
- (fill-region mbeg mend))
- ))
-
-(defun rst-shift-region-right (pfxarg)
- "Indent region rigidly, by a few characters to the right.
-This function first computes all possible alignment columns by
-inspecting the lines preceding the region for bulleted or
-enumerated list items. If the leftmost column is beyond the
-preceding lines, the region is moved to the right by
-`rst-shift-basic-offset'. With a prefix argument, do not
-automatically fill the region."
- (interactive "P")
- (let ((rst-shift-fill-region
- (if (not pfxarg) rst-shift-fill-region)))
- (rst-shift-region-guts (lambda (tabs leftmostcol)
- (let ((cur tabs))
- (while (and cur (<= (caar cur) leftmostcol))
- (setq cur (cdr cur)))
- cur))
- 'identity
- )))
-
-(defun rst-shift-region-left (pfxarg)
- "Like `rst-shift-region-right', except we move to the left.
-Also, if invoked with a negative prefix arg, the entire
-indentation is removed, up to the leftmost character in the
-region, and automatic filling is disabled."
- (interactive "P")
- (let ((mbeg (copy-marker (region-beginning)))
- (mend (copy-marker (region-end)))
- (leftmostcol (rst-find-leftmost-column
- (region-beginning) (region-end)))
- (rst-shift-fill-region
- (if (not pfxarg) rst-shift-fill-region)))
-
- (when (> leftmostcol 0)
- (if (and pfxarg (< (prefix-numeric-value pfxarg) 0))
- (progn
- (indent-rigidly (region-beginning) (region-end) (- leftmostcol))
- (when rst-shift-fill-region
- (fill-region mbeg mend))
- )
- (rst-shift-region-guts (lambda (tabs leftmostcol)
- (let ((cur (reverse tabs)))
- (while (and cur (>= (caar cur) leftmostcol))
- (setq cur (cdr cur)))
- cur))
- '-
- ))
- )))
-
(defmacro rst-iterate-leftmost-paragraphs
(beg end first-only body-consequent body-alternative)
"FIXME This definition is old and deprecated / we need to move
@@ -2419,9 +2696,9 @@ of each paragraph only."
(current-column))
(valid (and (= curcol leftcol)
- (not (looking-at "[ \t]*$")))
+ (not (looking-at (rst-re 'lin-end))))
(and (= curcol leftcol)
- (not (looking-at "[ \t]*$"))))
+ (not (looking-at (rst-re 'lin-end)))))
)
((>= (point) endm))
@@ -2433,7 +2710,6 @@ of each paragraph only."
))))
-
(defmacro rst-iterate-leftmost-paragraphs-2 (spec &rest body)
"Evaluate BODY for each line in region defined by BEG END.
LEFTMOST is set to true if the line is one of the leftmost of the
@@ -2453,8 +2729,8 @@ first of a paragraph."
(empty-line-previous nil ,isempty)
- (,isempty (looking-at "[ \t]*$")
- (looking-at "[ \t]*$"))
+ (,isempty (looking-at (rst-re 'lin-end))
+ (looking-at (rst-re 'lin-end)))
(,parabegin (not ,isempty)
(and empty-line-previous
@@ -2471,6 +2747,307 @@ first of a paragraph."
)))))
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; Indentation
+
+;; FIXME: At the moment only block comments with leading empty comment line are
+;; supported; comment lines with leading comment markup should be also
+;; supported; may be a customizable option could control which style to prefer
+
+(defgroup rst-indent nil "Settings for indendation in reStructuredText.
+
+In reStructuredText indendation points are usually determined by
+preceding lines. Sometimes the syntax allows arbitrary
+indendation points such as where to start the first line
+following a directive. These indentation widths can be customized
+here."
+ :group 'rst
+ :package-version '(rst . "1.1.0"))
+
+(define-obsolete-variable-alias
+ 'rst-shift-basic-offset 'rst-indent-width "r6713")
+(defcustom rst-indent-width 2
+ "Indentation when there is no more indentation point given."
+ :group 'rst-indent
+ :type '(integer))
+
+(defcustom rst-indent-field 3
+ "Default indendation for first line after a field or 0 to always indent for
+content."
+ :group 'rst-indent
+ :type '(integer))
+
+(defcustom rst-indent-literal-normal 3
+ "Default indendation for literal block after a markup on an own
+line."
+ :group 'rst-indent
+ :type '(integer))
+
+(defcustom rst-indent-literal-minimized 2
+ "Default indendation for literal block after a minimized
+markup."
+ :group 'rst-indent
+ :type '(integer))
+
+(defcustom rst-indent-comment 3
+ "Default indendation for first line of a comment."
+ :group 'rst-indent
+ :type '(integer))
+
+;; FIXME: Must consider other tabs:
+;; * Line blocks
+;; * Definition lists
+;; * Option lists
+(defun rst-line-tabs ()
+ "Return tabs of the current line or nil for no tab.
+The list is sorted so the tab where writing continues most likely
+is the first one. Each tab is of the form (COLUMN . INNER).
+COLUMN is the column of the tab. INNER is non-nil if this is an
+inner tab. I.e. a tab which does come from the basic indentation
+and not from inner alignment points."
+ (save-excursion
+ (forward-line 0)
+ (save-match-data
+ (unless (looking-at (rst-re 'lin-end))
+ (back-to-indentation)
+ ;; Current indendation is always the least likely tab
+ (let ((tabs (list (list (point) 0 nil)))) ; (POINT OFFSET INNER)
+ ;; Push inner tabs more likely to continue writing
+ (cond
+ ;; Item
+ ((looking-at (rst-re '(:grp itmany-tag hws-sta) '(:grp "\\S ") "?"))
+ (when (match-string 2)
+ (push (list (match-beginning 2) 0 t) tabs)))
+ ;; Field
+ ((looking-at (rst-re '(:grp fld-tag) '(:grp hws-tag)
+ '(:grp "\\S ") "?"))
+ (unless (zerop rst-indent-field)
+ (push (list (match-beginning 1) rst-indent-field t) tabs))
+ (if (match-string 3)
+ (push (list (match-beginning 3) 0 t) tabs)
+ (if (zerop rst-indent-field)
+ (push (list (match-end 2)
+ (if (string= (match-string 2) "") 1 0)
+ t) tabs))))
+ ;; Directive
+ ((looking-at (rst-re 'dir-sta-3 '(:grp "\\S ") "?"))
+ (push (list (match-end 1) 0 t) tabs)
+ (unless (string= (match-string 2) "")
+ (push (list (match-end 2) 0 t) tabs))
+ (when (match-string 4)
+ (push (list (match-beginning 4) 0 t) tabs)))
+ ;; Footnote or citation definition
+ ((looking-at (rst-re 'fnc-sta-2 '(:grp "\\S ") "?"))
+ (push (list (match-end 1) 0 t) tabs)
+ (when (match-string 3)
+ (push (list (match-beginning 3) 0 t) tabs)))
+ ;; Comment
+ ((looking-at (rst-re 'cmt-sta-1))
+ (push (list (point) rst-indent-comment t) tabs)))
+ ;; Start of literal block
+ (when (looking-at (rst-re 'lit-sta-2))
+ (let ((tab0 (first tabs)))
+ (push (list (first tab0)
+ (+ (second tab0)
+ (if (match-string 1)
+ rst-indent-literal-minimized
+ rst-indent-literal-normal))
+ t) tabs)))
+ (mapcar (lambda (tab)
+ (goto-char (first tab))
+ (cons (+ (current-column) (second tab)) (third tab)))
+ tabs))))))
+
+(defun rst-compute-tabs (pt)
+ "Build the list of possible tabs for all lines above.
+Search backwards from point PT to build the list of possible
+tabs. Return a list of tabs sorted by likeliness to continue
+writing like `rst-line-tabs'. Nearer lines have generally a
+higher likeliness than farer lines. Return nil if no tab is found
+in the text above."
+ (save-excursion
+ (goto-char pt)
+ (let (leftmost ; Leftmost column found so far
+ innermost ; Leftmost column for inner tab
+ tablist)
+ (while (and (zerop (forward-line -1))
+ (or (not leftmost)
+ (> leftmost 0)))
+ (let* ((tabs (rst-line-tabs))
+ (leftcol (if tabs (apply 'min (mapcar 'car tabs)))))
+ (when tabs
+ ;; Consider only lines indented less or same if not INNERMOST
+ (when (or (not leftmost)
+ (< leftcol leftmost)
+ (and (not innermost) (= leftcol leftmost)))
+ (dolist (tab tabs)
+ (let ((inner (cdr tab))
+ (newcol (car tab)))
+ (when (and
+ (or
+ (and (not inner)
+ (or (not leftmost)
+ (< newcol leftmost)))
+ (and inner
+ (or (not innermost)
+ (< newcol innermost))))
+ (not (memq newcol tablist)))
+ (push newcol tablist))))
+ (setq innermost (if (some 'identity
+ (mapcar 'cdr tabs)) ; Has inner
+ leftcol
+ innermost))
+ (setq leftmost leftcol)))))
+ (nreverse tablist))))
+
+(defun rst-indent-line (&optional dflt)
+ "Indent current line to next best reStructuredText tab.
+The next best tab is taken from the tab list returned by
+`rst-compute-tabs' which is used in a cyclic manner. If the
+current indentation does not end on a tab use the first one. If
+the current indentation is on a tab use the next tab. This allows
+a repeated use of \\[indent-for-tab-command] to cycle through all
+possible tabs. If no indentation is possible return `noindent' or
+use DFLT. Return the indentation indented to. When point is in
+indentation it ends up at its end. Otherwise the point is kept
+relative to the content."
+ (let* ((pt (point-marker))
+ (cur (current-indentation))
+ (clm (current-column))
+ (tabs (rst-compute-tabs (point)))
+ (fnd (position cur tabs))
+ ind)
+ (if (and (not tabs) (not dflt))
+ 'noindent
+ (if (not tabs)
+ (setq ind dflt)
+ (if (not fnd)
+ (setq fnd 0)
+ (setq fnd (1+ fnd))
+ (if (>= fnd (length tabs))
+ (setq fnd 0)))
+ (setq ind (nth fnd tabs)))
+ (indent-line-to ind)
+ (if (> clm cur)
+ (goto-char pt))
+ (set-marker pt nil)
+ ind)))
+
+(defun rst-shift-region (beg end cnt)
+ "Shift region BEG to END by CNT tabs.
+Shift by one tab to the right (CNT > 0) or left (CNT < 0) or
+remove all indentation (CNT = 0). An tab is taken from the text
+above. If no suitable tab is found `rst-indent-width' is used."
+ (interactive "r\np")
+ (let ((tabs (sort (rst-compute-tabs beg) (lambda (x y) (<= x y))))
+ (leftmostcol (rst-find-leftmost-column beg end)))
+ (when (or (> leftmostcol 0) (> cnt 0))
+ ;; Apply the indent
+ (indent-rigidly
+ beg end
+ (if (zerop cnt)
+ (- leftmostcol)
+ ;; Find the next tab after the leftmost column
+ (let* ((cmp (if (> cnt 0) '> '<))
+ (tabs (if (> cnt 0) tabs (reverse tabs)))
+ (len (length tabs))
+ (dir (signum cnt)) ; Direction to take
+ (abs (abs cnt)) ; Absolute number of steps to take
+ ;; Get the position of the first tab beyond leftmostcol
+ (fnd (position-if (lambda (elt)
+ (funcall cmp elt leftmostcol))
+ tabs))
+ ;; Virtual position of tab
+ (pos (+ (or fnd len) (1- abs)))
+ (tab (if (< pos len)
+ ;; Tab exists - use it
+ (nth pos tabs)
+ ;; Column needs to be computed
+ (let ((col (+ (or (car (last tabs)) leftmostcol)
+ ;; Base on last known column
+ (* (- pos (1- len)) ; Distance left
+ dir ; Direction to take
+ rst-indent-width))))
+ (if (< col 0) 0 col)))))
+ (- tab leftmostcol)))))))
+
+;; FIXME: A paragraph with an (incorrectly) indented second line is not filled
+;; correctly::
+;;
+;; Some start
+;; continued wrong
+(defun rst-adaptive-fill ()
+ "Return fill prefix found at point.
+Value for `adaptive-fill-function'."
+ (let ((fnd (if (looking-at adaptive-fill-regexp)
+ (match-string-no-properties 0))))
+ (if (save-match-data
+ (not (string-match comment-start-skip fnd)))
+ ;; An non-comment prefix is fine
+ fnd
+ ;; Matches a comment - return whitespace instead
+ (make-string (-
+ (save-excursion
+ (goto-char (match-end 0))
+ (current-column))
+ (save-excursion
+ (goto-char (match-beginning 0))
+ (current-column))) ? ))))
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; Comments
+
+(defun rst-comment-line-break (&optional soft)
+ "Break line and indent, continuing reStructuredText comment if within one.
+Value for `comment-line-break-function'."
+ (if soft
+ (insert-and-inherit ?\n)
+ (newline 1))
+ (save-excursion
+ (forward-char -1)
+ (delete-horizontal-space))
+ (delete-horizontal-space)
+ (let ((tabs (rst-compute-tabs (point))))
+ (when tabs
+ (indent-line-to (car tabs)))))
+
+(defun rst-comment-indent ()
+ "Return indentation for current comment line."
+ (car (rst-compute-tabs (point))))
+
+(defun rst-comment-insert-comment ()
+ "Insert a comment in the current line."
+ (rst-indent-line 0)
+ (insert comment-start))
+
+(defun rst-comment-region (beg end &optional arg)
+ "Comment the current region or uncomment it if ARG is \\[universal-argument]."
+ (save-excursion
+ (if (consp arg)
+ (rst-uncomment-region beg end arg)
+ (goto-char beg)
+ (let ((ind (current-indentation))
+ bol)
+ (forward-line 0)
+ (setq bol (point))
+ (indent-rigidly bol end rst-indent-comment)
+ (goto-char bol)
+ (open-line 1)
+ (indent-line-to ind)
+ (insert (comment-string-strip comment-start t t))))))
+
+(defun rst-uncomment-region (beg end &optional arg)
+ "Uncomment the current region.
+ARG is ignored"
+ (save-excursion
+ (let (bol eol)
+ (goto-char beg)
+ (forward-line 0)
+ (setq bol (point))
+ (forward-line 1)
+ (setq eol (point))
+ (indent-rigidly eol end (- rst-indent-comment))
+ (delete-region bol eol))))
;;------------------------------------------------------------------------------
@@ -2478,60 +3055,54 @@ first of a paragraph."
;; bullets in bulleted lists. The enumerate would just be one of the possible
;; outputs.
;;
-;; FIXME: TODO we need to do the enumeration removal as well.
+;; FIXME: We need to do the enumeration removal as well.
-(defun rst-enumerate-region (beg end)
+(defun rst-enumerate-region (beg end all)
"Add enumeration to all the leftmost paragraphs in the given region.
-The region is specified between BEG and END. With prefix argument,
+The region is specified between BEG and END. With ALL,
do all lines instead of just paragraphs."
- (interactive "r")
+ (interactive "r\nP")
(let ((count 0)
(last-insert-len nil))
(rst-iterate-leftmost-paragraphs
- beg end (not current-prefix-arg)
+ beg end (not all)
(let ((ins-string (format "%d. " (incf count))))
(setq last-insert-len (length ins-string))
(insert ins-string))
(insert (make-string last-insert-len ?\ ))
)))
-(defun rst-bullet-list-region (beg end)
+(defun rst-bullet-list-region (beg end all)
"Add bullets to all the leftmost paragraphs in the given region.
-The region is specified between BEG and END. With prefix argument,
+The region is specified between BEG and END. With ALL,
do all lines instead of just paragraphs."
- (interactive "r")
+ (interactive "r\nP")
(rst-iterate-leftmost-paragraphs
- beg end (not current-prefix-arg)
- (insert "- ")
+ beg end (not all)
+ (insert (car rst-preferred-bullets) " ")
(insert " ")
))
-
-;; FIXME: there are some problems left with the following function
-;; implementation:
-;;
-;; * It does not deal with a varying number of digits appropriately
-;; * It does not deal with multiple levels independently, and it should.
-;;
-;; I suppose it does 90% of the job for now.
-
+;; FIXME: Does not deal with a varying number of digits appropriately
+;; FIXME: Does not deal with multiple levels independently
+;; FIXME: Does not indent a multiline item correctly
(defun rst-convert-bullets-to-enumeration (beg end)
- "Convert all the bulleted items and enumerated items in the
-region to enumerated lists, renumbering as necessary."
+ "Convert the bulleted and enumerated items in the region to enumerated lists.
+Renumber as necessary."
(interactive "r")
(let* (;; Find items and convert the positions to markers.
(items (mapcar
(lambda (x)
(cons (copy-marker (car x))
(cdr x)))
- (rst-find-pfx-in-region beg end rst-re-items)))
+ (rst-find-pfx-in-region beg end (rst-re 'itmany-sta-1))))
(count 1)
)
(save-excursion
(dolist (x items)
(goto-char (car x))
- (looking-at rst-re-items)
- (replace-match (format "%d. " count) nil nil nil 1)
+ (looking-at (rst-re 'itmany-beg-1))
+ (replace-match (format "%d." count) nil nil nil 1)
(incf count)
))
))
@@ -2559,9 +3130,13 @@ With prefix argument set the empty lines too."
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; Font lock
+;; =========
(require 'font-lock)
+;; FIXME: The obsolete variables need to disappear
+
(defgroup rst-faces nil "Faces used in Rst Mode."
:group 'rst
:group 'faces
@@ -2724,8 +3299,7 @@ general but you do not like the details."
:type '(integer)
:set 'rst-set-level-default)
(defcustom rst-level-face-base-color "grey"
- "The base name of the color to be used for creating background colors in
-section title faces for all levels."
+ "Base name of the color for creating background colors in section title faces."
:group 'rst-faces-defaults
:type '(string)
:set 'rst-set-level-default)
@@ -2788,6 +3362,7 @@ details check the Rst Faces Defaults group."
:value-type (face))
:set-after '(rst-level-face-max))
+;; FIXME: It should be possible to give "#RRGGBB" type of color values
(defun rst-define-level-faces ()
"Define the faces for the section title text faces from the values."
;; All variables used here must be checked in `rst-set-level-default'
@@ -2804,214 +3379,280 @@ details check the Rst Faces Defaults group."
(set-face-doc-string sym doc)
(set-face-background sym col)
(set sym sym))
- (setq i (1+ i))))))
+ (setq i (1+ i))))))
(rst-define-level-faces)
-
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; Font lock
-
-(defvar rst-use-char-classes
- (string-match "[[:alpha:]]" "b")
- "Non-nil if we can use the character classes in our regexps.")
-(defun rst-font-lock-keywords-function ()
- "Return keywords to highlight in Rst mode according to current settings."
+(defvar rst-font-lock-keywords
;; The reST-links in the comments below all relate to sections in
;; http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html
- (let* ( ;; This gets big - so let's define some abbreviations
- ;; horizontal white space
- (re-hws "[\t ]")
- ;; beginning of line with possible indentation
- (re-bol (concat "^" re-hws "*"))
- ;; Separates block lead-ins from their content
- (re-blksep1 (concat "\\(" re-hws "+\\|$\\)"))
- ;; explicit markup tag
- (re-emt "\\.\\.")
- ;; explicit markup start
- (re-ems (concat re-emt re-hws "+"))
- ;; inline markup prefix
- (re-imp1 (concat "\\(^\\|" re-hws "\\|[-'\"([{</:]\\)"))
- ;; inline markup suffix
- (re-ims1 (concat "\\(" re-hws "\\|[]-'\")}>/:.,;!?\\]\\|$\\)"))
- ;; symbol character
- (re-sym1 "\\(\\sw\\|\\s_\\)")
- ;; inline markup content begin
- (re-imbeg2 "\\(\\S \\|\\S \\([^")
-
- ;; There seems to be a bug leading to error "Stack overflow in regexp
- ;; matcher" when "|" or "\\*" are the characters searched for
- (re-imendbeg "\\]\\|\\\\.")
- ;; inline markup content end
- (re-imend (concat re-imendbeg "\\)*[^\t \\\\]\\)"))
- ;; inline markup content without asterisk
- (re-ima2 (concat re-imbeg2 "*" re-imend))
- ;; inline markup content without backquote
- (re-imb2 (concat re-imbeg2 "`" re-imend))
- ;; inline markup content without vertical bar
- (re-imv2 (concat re-imbeg2 "|" re-imend))
- ;; Supported URI schemes
- (re-uris1 "\\(acap\\|cid\\|data\\|dav\\|fax\\|file\\|ftp\\|gopher\\|http\\|https\\|imap\\|ldap\\|mailto\\|mid\\|modem\\|news\\|nfs\\|nntp\\|pop\\|prospero\\|rtsp\\|service\\|sip\\|tel\\|telnet\\|tip\\|urn\\|vemmi\\|wais\\)")
- ;; Line starting with adornment and optional whitespace; complete
- ;; adornment is in (match-string 1); there must be at least 3
- ;; characters because otherwise explicit markup start would be
- ;; recognized
- (re-ado2 (concat "^\\(\\(["
- (if rst-use-char-classes
- "^[:word:][:space:][:cntrl:]" "^\\w \t\x00-\x1F")
- "]\\)\\2\\2+\\)" re-hws "*$"))
- )
- (list
- ;; FIXME: Block markup is not recognized in blocks after explicit markup
- ;; start
-
- ;; Simple `Body Elements`_
- ;; `Bullet Lists`_
- `(,(concat re-bol "\\([-*+]" re-blksep1 "\\)")
- 1 rst-block-face)
- ;; `Enumerated Lists`_
- `(,(concat re-bol "\\((?\\(#\\|[0-9]+\\|[A-Za-z]\\|[IVXLCMivxlcm]+\\)[.)]"
- re-blksep1 "\\)")
- 1 rst-block-face)
- ;; `Definition Lists`_ FIXME: missing
- ;; `Field Lists`_
- `(,(concat re-bol "\\(:[^:\n]+:\\)" re-blksep1)
- 1 rst-external-face)
- ;; `Option Lists`_
- `(,(concat re-bol "\\(\\(\\(\\([-+/]\\|--\\)\\sw\\(-\\|\\sw\\)*"
- "\\([ =]\\S +\\)?\\)\\(,[\t ]\\)?\\)+\\)\\($\\|[\t ]\\{2\\}\\)")
- 1 rst-block-face)
-
- ;; `Tables`_ FIXME: missing
-
- ;; All the `Explicit Markup Blocks`_
- ;; `Footnotes`_ / `Citations`_
- `(,(concat re-bol "\\(" re-ems "\\[[^[\n]+\\]\\)" re-blksep1)
- 1 rst-definition-face)
- ;; `Directives`_ / `Substitution Definitions`_
- `(,(concat re-bol "\\(" re-ems "\\)\\(\\(|[^|\n]+|[\t ]+\\)?\\)\\("
- re-sym1 "+::\\)" re-blksep1)
- (1 rst-directive-face)
- (2 rst-definition-face)
- (4 rst-directive-face))
- ;; `Hyperlink Targets`_
- `(,(concat re-bol "\\(" re-ems "_\\([^:\\`\n]\\|\\\\.\\|`[^`\n]+`\\)+:\\)"
- re-blksep1)
- 1 rst-definition-face)
- `(,(concat re-bol "\\(__\\)" re-blksep1)
- 1 rst-definition-face)
-
- ;; All `Inline Markup`_
- ;; FIXME: Condition 5 preventing fontification of e.g. "*" not implemented
- ;; `Strong Emphasis`_
- `(,(concat re-imp1 "\\(\\*\\*" re-ima2 "\\*\\*\\)" re-ims1)
- 2 rst-emphasis2-face)
- ;; `Emphasis`_
- `(,(concat re-imp1 "\\(\\*" re-ima2 "\\*\\)" re-ims1)
- 2 rst-emphasis1-face)
- ;; `Inline Literals`_
- `(,(concat re-imp1 "\\(``" re-imb2 "``\\)" re-ims1)
- 2 rst-literal-face)
- ;; `Inline Internal Targets`_
- `(,(concat re-imp1 "\\(_`" re-imb2 "`\\)" re-ims1)
- 2 rst-definition-face)
- ;; `Hyperlink References`_
- ;; FIXME: `Embedded URIs`_ not considered
- `(,(concat re-imp1 "\\(\\(`" re-imb2 "`\\|\\(\\sw\\(\\sw\\|-\\)+\\sw\\)\\)__?\\)" re-ims1)
- 2 rst-reference-face)
- ;; `Interpreted Text`_
- `(,(concat re-imp1 "\\(\\(:" re-sym1 "+:\\)?\\)\\(`" re-imb2 "`\\)\\(\\(:"
- re-sym1 "+:\\)?\\)" re-ims1)
- (2 rst-directive-face)
- (5 rst-external-face)
- (8 rst-directive-face))
- ;; `Footnote References`_ / `Citation References`_
- `(,(concat re-imp1 "\\(\\[[^]]+\\]_\\)" re-ims1)
- 2 rst-reference-face)
- ;; `Substitution References`_
- `(,(concat re-imp1 "\\(|" re-imv2 "|\\)" re-ims1)
- 2 rst-reference-face)
- ;; `Standalone Hyperlinks`_
- `(;; FIXME: This takes it easy by using a whitespace as delimiter
- ,(concat re-imp1 "\\(" re-uris1 ":\\S +\\)" re-ims1)
- 2 rst-definition-face)
- `(,(concat re-imp1 "\\(" re-sym1 "+@" re-sym1 "+\\)" re-ims1)
- 2 rst-definition-face)
-
- ;; Do all block fontification as late as possible so 'append works
-
- ;; Sections_ / Transitions_
- (append
- (list
- re-ado2)
- (if (not rst-mode-lazy)
- '(1 rst-block-face)
- (list
- (list 'rst-font-lock-handle-adornment
- '(progn
- (setq rst-font-lock-adornment-point (match-end 1))
- (point-max))
- nil
- (list 1 '(cdr (assoc nil rst-adornment-faces-alist))
- 'append t)
- (list 2 '(cdr (assoc rst-font-lock-level
- rst-adornment-faces-alist))
- 'append t)
- (list 3 '(cdr (assoc nil rst-adornment-faces-alist))
- 'append t)))))
-
- ;; `Comments`_
- (append
- (list
- (concat re-bol "\\(" re-ems "\\)\[^[|_]\\([^:\n]\\|:\\([^:\n]\\|$\\)\\)*$")
-
- '(1 rst-comment-face))
- (if rst-mode-lazy
- (list
- (list 'rst-font-lock-find-unindented-line
- '(progn
- (setq rst-font-lock-indentation-point (match-end 1))
- (point-max))
- nil
- '(0 rst-comment-face append)))))
- (append
- (list
- (concat re-bol "\\(" re-emt "\\)\\(\\s *\\)$")
- '(1 rst-comment-face)
- '(2 rst-comment-face))
- (if rst-mode-lazy
- (list
- (list 'rst-font-lock-find-unindented-line
- '(progn
- (setq rst-font-lock-indentation-point 'next)
- (point-max))
- nil
- '(0 rst-comment-face append)))))
-
- ;; `Literal Blocks`_
- (append
- (list
- (concat re-bol "\\(\\([^.\n]\\|\\.[^.\n]\\).*\\)?\\(::\\)$")
- '(3 rst-block-face))
- (if rst-mode-lazy
- (list
- (list 'rst-font-lock-find-unindented-line
- '(progn
- (setq rst-font-lock-indentation-point t)
- (point-max))
- nil
- '(0 rst-literal-face append)))))
+ `(;; FIXME: Block markup is not recognized in blocks after explicit markup
+ ;; start
+
+ ;; Simple `Body Elements`_
+ ;; `Bullet Lists`_
+ ;; FIXME: A bullet directly after a field name is not recognized
+ (,(rst-re 'lin-beg '(:grp bul-sta))
+ 1 rst-block-face)
+ ;; `Enumerated Lists`_
+ (,(rst-re 'lin-beg '(:grp enmany-sta))
+ 1 rst-block-face)
+ ;; `Definition Lists`_ FIXME: missing
+ ;; `Field Lists`_
+ (,(rst-re 'lin-beg '(:grp fld-tag) 'bli-sfx)
+ 1 rst-external-face)
+ ;; `Option Lists`_
+ (,(rst-re 'lin-beg '(:grp opt-tag (:shy optsep-tag opt-tag) "*")
+ '(:alt "$" (:seq hws-prt "\\{2\\}")))
+ 1 rst-block-face)
+ ;; `Line Blocks`_
+ ;; Only for lines containing no more bar - to distinguish from tables
+ (,(rst-re 'lin-beg '(:grp "|" bli-sfx) "[^|\n]*$")
+ 1 rst-block-face)
+
+ ;; `Tables`_ FIXME: missing
+
+ ;; All the `Explicit Markup Blocks`_
+ ;; `Footnotes`_ / `Citations`_
+ (,(rst-re 'lin-beg 'fnc-sta-2)
+ (1 rst-definition-face)
+ (2 rst-definition-face))
+ ;; `Directives`_ / `Substitution Definitions`_
+ (,(rst-re 'lin-beg 'dir-sta-3)
+ (1 rst-directive-face)
+ (2 rst-definition-face)
+ (3 rst-directive-face))
+ ;; `Hyperlink Targets`_
+ (,(rst-re 'lin-beg
+ '(:grp exm-sta "_" (:alt
+ (:seq "`" ilcbkqdef-tag "`")
+ (:seq (:alt "[^:\\\n]" "\\\\.") "+")) ":")
+ 'bli-sfx)
+ 1 rst-definition-face)
+ (,(rst-re 'lin-beg '(:grp "__") 'bli-sfx)
+ 1 rst-definition-face)
+
+ ;; All `Inline Markup`_ - most of them may be multiline though this is
+ ;; uninteresting
+
+ ;; FIXME: Condition 5 preventing fontification of e.g. "*" not implemented
+ ;; `Strong Emphasis`_
+ (,(rst-re 'ilm-pfx '(:grp "\\*\\*" ilcast-tag "\\*\\*") 'ilm-sfx)
+ 1 rst-emphasis2-face)
+ ;; `Emphasis`_
+ (,(rst-re 'ilm-pfx '(:grp "\\*" ilcast-tag "\\*") 'ilm-sfx)
+ 1 rst-emphasis1-face)
+ ;; `Inline Literals`_
+ (,(rst-re 'ilm-pfx '(:grp "``" ilcbkq-tag "``") 'ilm-sfx)
+ 1 rst-literal-face)
+ ;; `Inline Internal Targets`_
+ (,(rst-re 'ilm-pfx '(:grp "_`" ilcbkq-tag "`") 'ilm-sfx)
+ 1 rst-definition-face)
+ ;; `Hyperlink References`_
+ ;; FIXME: `Embedded URIs`_ not considered
+ ;; FIXME: Directly adjacing marked up words are not fontified correctly
+ ;; unless they are not separated by two spaces: foo_ bar_
+ (,(rst-re 'ilm-pfx '(:grp (:alt (:seq "`" ilcbkq-tag "`")
+ (:seq "\\sw" (:alt "\\sw" "-") "+\\sw"))
+ "__?") 'ilm-sfx)
+ 1 rst-reference-face)
+ ;; `Interpreted Text`_
+ (,(rst-re 'ilm-pfx '(:grp (:shy ":" sym-tag ":") "?")
+ '(:grp "`" ilcbkq-tag "`")
+ '(:grp (:shy ":" sym-tag ":") "?") 'ilm-sfx)
+ (1 rst-directive-face)
+ (2 rst-external-face)
+ (3 rst-directive-face))
+ ;; `Footnote References`_ / `Citation References`_
+ (,(rst-re 'ilm-pfx '(:grp fnc-tag "_") 'ilm-sfx)
+ 1 rst-reference-face)
+ ;; `Substitution References`_
+ ;; FIXME: References substitutions like |this|_ or |this|__ are not
+ ;; fontified correctly
+ (,(rst-re 'ilm-pfx '(:grp sub-tag) 'ilm-sfx)
+ 1 rst-reference-face)
+ ;; `Standalone Hyperlinks`_
+ ;; FIXME: This takes it easy by using a whitespace as delimiter
+ (,(rst-re 'ilm-pfx '(:grp uri-tag ":\\S +") 'ilm-sfx)
+ 1 rst-definition-face)
+ (,(rst-re 'ilm-pfx '(:grp sym-tag "@" sym-tag ) 'ilm-sfx)
+ 1 rst-definition-face)
+
+ ;; Do all block fontification as late as possible so 'append works
+
+ ;; Sections_ / Transitions_ - for sections this is multiline
+ (,(rst-re 'ado-beg-2-1)
+ (rst-font-lock-handle-adornment-matcher
+ (rst-font-lock-handle-adornment-pre-match-form
+ (match-string-no-properties 1) (match-end 1))
+ nil
+ (1 (cdr (assoc nil rst-adornment-faces-alist)) append t)
+ (2 (cdr (assoc rst-font-lock-adornment-level
+ rst-adornment-faces-alist)) append t)
+ (3 (cdr (assoc nil rst-adornment-faces-alist)) append t)))
+
+ ;; FIXME: FACESPEC could be used instead of ordinary faces to set
+ ;; properties on comments and literal blocks so they are *not*
+ ;; inline fontified; see (elisp)Search-based Fontification
+
+ ;; FIXME: And / or use `syntax-propertize` functions as in `octave-mod.el`
+ ;; and other V24 modes; may make `font-lock-extend-region`
+ ;; superfluous
+
+ ;; `Comments`_ - this is multiline
+ (,(rst-re 'lin-beg 'cmt-sta-1)
+ (1 rst-comment-face)
+ (rst-font-lock-find-unindented-line-match
+ (rst-font-lock-find-unindented-line-limit (match-end 1))
+ nil
+ (0 rst-comment-face append)))
+ (,(rst-re 'lin-beg '(:grp exm-tag) '(:grp hws-tag) "$")
+ (1 rst-comment-face)
+ (2 rst-comment-face)
+ (rst-font-lock-find-unindented-line-match
+ (rst-font-lock-find-unindented-line-limit 'next)
+ nil
+ (0 rst-comment-face append)))
+
+ ;; FIXME: This is not rendered as comment::
+ ;; .. .. list-table::
+ ;; :stub-columns: 1
+ ;; :header-rows: 1
+
+ ;; FIXME: This is rendered wrong::
+ ;;
+ ;; xxx yyy::
+ ;;
+ ;; ----|> KKKKK <|----
+ ;; / \
+ ;; -|> AAAAAAAAAAPPPPPP <|- -|> AAAAAAAAAABBBBBBB <|-
+ ;; | | | |
+ ;; | | | |
+ ;; PPPPPP PPPPPPDDDDDDD BBBBBBB PPPPPPBBBBBBB
+ ;;
+ ;; Indentation needs to be taken from the line with the ``::`` and not from
+ ;; the first content line.
- ;; `Doctest Blocks`_
- (append
- (list
- (concat re-bol "\\(>>>\\|\\.\\.\\.\\)\\(.+\\)")
- '(1 rst-block-face)
- '(2 rst-literal-face)))
- )))
+ ;; `Indented Literal Blocks`_ - this is multiline
+ (,(rst-re 'lin-beg 'lit-sta-2)
+ (2 rst-block-face)
+ (rst-font-lock-find-unindented-line-match
+ (rst-font-lock-find-unindented-line-limit t)
+ nil
+ (0 rst-literal-face append)))
+ ;; FIXME: `Quoted Literal Blocks`_ missing - this is multiline
+ ;; `Doctest Blocks`_
+ ;; FIXME: This is wrong according to the specification:
+ ;;
+ ;; Doctest blocks are text blocks which begin with ">>> ", the Python
+ ;; interactive interpreter main prompt, and end with a blank line.
+ ;; Doctest blocks are treated as a special case of literal blocks,
+ ;; without requiring the literal block syntax. If both are present, the
+ ;; literal block syntax takes priority over Doctest block syntax:
+ ;;
+ ;; This is an ordinary paragraph.
+ ;;
+ ;; >>> print 'this is a Doctest block'
+ ;; this is a Doctest block
+ ;;
+ ;; The following is a literal block::
+ ;;
+ ;; >>> This is not recognized as a doctest block by
+ ;; reStructuredText. It *will* be recognized by the doctest
+ ;; module, though!
+ ;;
+ ;; Indentation is not required for doctest blocks.
+ (,(rst-re 'lin-beg '(:grp (:alt ">>>" ell-tag)) '(:grp ".+"))
+ (1 rst-block-face)
+ (2 rst-literal-face))
+ )
+ "Keywords to highlight in rst mode.")
+
+(defvar font-lock-beg)
+(defvar font-lock-end)
+
+(defun rst-font-lock-extend-region ()
+ "Extend the region `font-lock-beg' / `font-lock-end' iff it may
+be in the middle of a multiline construct and return non-nil if so."
+ (let ((r (rst-font-lock-extend-region-internal font-lock-beg font-lock-end)))
+ (when r
+ (setq font-lock-beg (car r))
+ (setq font-lock-end (cdr r))
+ t)))
+
+(defun rst-font-lock-extend-region-internal (beg end)
+ "Check the region BEG / END for being in the middle of a multiline construct.
+Return nil if not or a cons with new values for BEG / END"
+ (let ((nbeg (rst-font-lock-extend-region-extend beg -1))
+ (nend (rst-font-lock-extend-region-extend end 1)))
+ (if (or nbeg nend)
+ (cons (or nbeg beg) (or nend end)))))
+
+(defun rst-forward-line (&optional n)
+ "Like `forward-line' but always end up in column 0 and return accordingly."
+ (let ((moved (forward-line n)))
+ (if (bolp)
+ moved
+ (forward-line 0)
+ (- moved (signum n)))))
+
+(defun rst-font-lock-extend-region-extend (pt dir)
+ "Extend the region starting at point PT and extending in direction DIR.
+Return extended point or nil if not moved."
+ ;; There are many potential multiline constructs but there are two groups
+ ;; which are really relevant. The first group consists of
+ ;;
+ ;; * comment lines without leading explicit markup tag and
+ ;;
+ ;; * literal blocks following "::"
+ ;;
+ ;; which are both indented. Thus indendation is the first thing recognized
+ ;; here. The second criteria is an explicit markup tag which may be a comment
+ ;; or a double colon at the end of a line.
+ ;;
+ ;; The second group consists of the adornment cases.
+ (if (not (get-text-property pt 'font-lock-multiline))
+ ;; Move only if we don't start inside a multiline construct already
+ (save-excursion
+ (let (;; non-empty non-indented line, explicit markup tag or literal
+ ;; block tag
+ (stop-re (rst-re '(:alt "[^ \t\n]"
+ (:seq hws-tag exm-tag)
+ (:seq ".*" dcl-tag lin-end)))))
+ ;; The comments below are for dir == -1 / dir == 1
+ (goto-char pt)
+ (forward-line 0)
+ (setq pt (point))
+ (while (and (not (looking-at stop-re))
+ (zerop (rst-forward-line dir)))) ; try previous / next
+ ; line if it exists
+ (if (looking-at (rst-re 'ado-beg-2-1)) ; may be an underline /
+ ; overline
+ (if (zerop (rst-forward-line dir))
+ (if (looking-at (rst-re 'ttl-beg)) ; title found, i.e.
+ ; underline / overline
+ ; found
+ (if (zerop (rst-forward-line dir))
+ (if (not
+ (looking-at (rst-re 'ado-beg-2-1))) ; no
+ ; overline /
+ ; underline
+ (rst-forward-line (- dir)))) ; step back to title
+ ; / adornment
+ (if (< dir 0) ; keep downward adornment
+ (rst-forward-line (- dir))))) ; step back to adornment
+ (if (looking-at (rst-re 'ttl-beg)) ; may be a title
+ (if (zerop (rst-forward-line dir))
+ (if (not
+ (looking-at (rst-re 'ado-beg-2-1))) ; no overline /
+ ; underline
+ (rst-forward-line (- dir)))))) ; step back to line
+ (if (not (= (point) pt))
+ (point))))))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Indented blocks
@@ -3034,198 +3675,154 @@ point is not moved."
(forward-line 1)
(when (< (point) limit)
(setq beg (point))
- (if (looking-at "\\s *$")
+ (if (looking-at (rst-re 'lin-end))
(setq cand (or cand beg)) ; An empty line is a candidate
(move-to-column clm)
;; FIXME: No indentation [(zerop clm)] must be handled in some
;; useful way - though it is not clear what this should mean at all
(if (string-match
- "^\\s *$" (buffer-substring-no-properties beg (point)))
+ (rst-re 'linemp-tag)
+ (buffer-substring-no-properties beg (point)))
(setq cand nil) ; An indented line resets a candidate
(setq fnd (or cand beg)))))))
(goto-char (or fnd start))
fnd))
-;; Stores the point where the current indentation ends if a number. If `next'
-;; indicates `rst-font-lock-find-unindented-line' shall take the indentation
-;; from the next line if this is not empty. If non-nil indicates
-;; `rst-font-lock-find-unindented-line' shall take the indentation from the
-;; next non-empty line. Also used as a trigger for
-;; `rst-font-lock-find-unindented-line'.
-(defvar rst-font-lock-indentation-point nil)
-
-(defun rst-font-lock-find-unindented-line (limit)
- (let* ((ind-pnt rst-font-lock-indentation-point)
- (beg-pnt ind-pnt))
- ;; May run only once - enforce this
- (setq rst-font-lock-indentation-point nil)
- (when (and ind-pnt (not (numberp ind-pnt)))
- ;; Find indentation point in next line if any
- (setq ind-pnt
- (save-excursion
- (save-match-data
- (if (eq ind-pnt 'next)
- (when (and (zerop (forward-line 1)) (< (point) limit))
- (setq beg-pnt (point))
- (when (not (looking-at "\\s *$"))
- (looking-at "\\s *")
- (match-end 0)))
- (while (and (zerop (forward-line 1)) (< (point) limit)
- (looking-at "\\s *$")))
- (when (< (point) limit)
- (setq beg-pnt (point))
- (looking-at "\\s *")
- (match-end 0)))))))
- (when ind-pnt
- (goto-char ind-pnt)
- ;; Always succeeds because the limit set by PRE-MATCH-FORM is the
- ;; ultimate point to find
- (goto-char (or (rst-forward-indented-block nil limit) limit))
- (save-excursion
- ;; Include subsequent empty lines in the font-lock block,
- ;; in case the user subsequently changes the indentation of the next
- ;; non-empty line to move it into the indented element.
- (skip-chars-forward " \t\n")
- (put-text-property beg-pnt (point) 'font-lock-multiline t))
- (set-match-data (list beg-pnt (point)))
- t)))
+(defvar rst-font-lock-find-unindented-line-begin nil
+ "Beginning of the match if `rst-font-lock-find-unindented-line-end'")
+
+(defvar rst-font-lock-find-unindented-line-end nil
+ "End of the match as determined by `rst-font-lock-find-unindented-line-limit'.
+Also used as a trigger for
+`rst-font-lock-find-unindented-line-match'.")
+
+(defun rst-font-lock-find-unindented-line-limit (ind-pnt)
+ "Find the next unindented line relative to indenation at IND-PNT.
+Return this point, the end of the buffer or nil if nothing found.
+If IND-PNT is `next' take the indentation from the next line if
+this is not empty and indented more than the current one. If
+IND-PNT is non-nil but not a number take the indentation from the
+next non-empty line if this is indented more than the current
+one."
+ (setq rst-font-lock-find-unindented-line-begin ind-pnt)
+ (setq rst-font-lock-find-unindented-line-end
+ (save-excursion
+ (when (not (numberp ind-pnt))
+ ;; Find indentation point in next line if any
+ (setq ind-pnt
+ ;; FIXME: Should be refactored to two different functions
+ ;; giving their result to this function, may be
+ ;; integrated in caller
+ (save-match-data
+ (let ((cur-ind (current-indentation)))
+ (if (eq ind-pnt 'next)
+ (when (and (zerop (forward-line 1))
+ (< (point) (point-max)))
+ ;; Not at EOF
+ (setq rst-font-lock-find-unindented-line-begin
+ (point))
+ (when (and (not (looking-at (rst-re 'lin-end)))
+ (> (current-indentation) cur-ind))
+ ;; Use end of indentation if non-empty line
+ (looking-at (rst-re 'hws-tag))
+ (match-end 0)))
+ ;; Skip until non-empty line or EOF
+ (while (and (zerop (forward-line 1))
+ (< (point) (point-max))
+ (looking-at (rst-re 'lin-end))))
+ (when (< (point) (point-max))
+ ;; Not at EOF
+ (setq rst-font-lock-find-unindented-line-begin
+ (point))
+ (when (> (current-indentation) cur-ind)
+ ;; Indentation bigger than line of departure
+ (looking-at (rst-re 'hws-tag))
+ (match-end 0))))))))
+ (when ind-pnt
+ (goto-char ind-pnt)
+ (or (rst-forward-indented-block nil (point-max))
+ (point-max))))))
+
+(defun rst-font-lock-find-unindented-line-match (limit)
+ "Set the match found by
+`rst-font-lock-find-unindented-line-limit' the first time called
+or nil."
+ (when rst-font-lock-find-unindented-line-end
+ (set-match-data
+ (list rst-font-lock-find-unindented-line-begin
+ rst-font-lock-find-unindented-line-end))
+ (put-text-property rst-font-lock-find-unindented-line-begin
+ rst-font-lock-find-unindented-line-end
+ 'font-lock-multiline t)
+ ;; Make sure this is called only once
+ (setq rst-font-lock-find-unindented-line-end nil)
+ t))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Adornments
-(defvar rst-font-lock-adornment-point nil
- "Stores the point where the current adornment ends.
-Also used as a trigger for `rst-font-lock-handle-adornment'.")
-
-;; Here `rst-font-lock-handle-adornment' stores the section level of the
-;; current adornment or t for a transition.
-(defvar rst-font-lock-level nil)
-
-;; FIXME: It would be good if this could be used to markup section titles of
-;; given level with a special key; it would be even better to be able to
-;; customize this so it can be used for a generally available personal style
-;;
-;; FIXME: There should be some way to reset and reload this variable - probably
-;; a special key
-;;
-;; FIXME: Some support for `outline-mode' would be nice which should be based
-;; on this information
-(defvar rst-adornment-level-alist nil
- "Associates adornments with section levels.
-The key is a two character string. The first character is the adornment
-character. The second character distinguishes underline section titles (`u')
-from overline/underline section titles (`o'). The value is the section level.
-
-This is made buffer local on start and adornments found during font lock are
-entered.")
-
-;; Returns section level for adornment key KEY. Adds new section level if KEY
-;; is not found and ADD. If KEY is not a string it is simply returned.
-(defun rst-adornment-level (key &optional add)
- (let ((fnd (assoc key rst-adornment-level-alist))
- (new 1))
- (cond
- ((not (stringp key))
- key)
- (fnd
- (cdr fnd))
- (add
- (while (rassoc new rst-adornment-level-alist)
- (setq new (1+ new)))
- (setq rst-adornment-level-alist
- (append rst-adornment-level-alist (list (cons key new))))
- new))))
-
-;; Classifies adornment for section titles and transitions. ADORNMENT is the
-;; complete adornment string as found in the buffer. END is the point after the
-;; last character of ADORNMENT. For overline section adornment LIMIT limits the
-;; search for the matching underline. Returns a list. The first entry is t for
-;; a transition, or a key string for `rst-adornment-level' for a section title.
-;; The following eight values forming four match groups as can be used for
-;; `set-match-data'. First match group contains the maximum points of the whole
-;; construct. Second and last match group matched pure section title adornment
-;; while third match group matched the section title text or the transition.
-;; Each group but the first may or may not exist.
-(defun rst-classify-adornment (adornment end limit)
- (save-excursion
- (save-match-data
- (goto-char end)
- (let ((ado-ch (aref adornment 0))
- (ado-re (regexp-quote adornment))
- (end-pnt (point))
- (beg-pnt (progn
- (forward-line 0)
- (point)))
- (nxt-emp
- (save-excursion
- (or (not (zerop (forward-line 1)))
- (looking-at "\\s *$"))))
- (prv-emp
- (save-excursion
- (or (not (zerop (forward-line -1)))
- (looking-at "\\s *$"))))
- key beg-ovr end-ovr beg-txt end-txt beg-und end-und)
- (cond
- ((and nxt-emp prv-emp)
- ;; A transition
- (setq key t)
- (setq beg-txt beg-pnt)
- (setq end-txt end-pnt))
- (prv-emp
- ;; An overline
- (setq key (concat (list ado-ch) "o"))
- (setq beg-ovr beg-pnt)
- (setq end-ovr end-pnt)
- (forward-line 1)
- (setq beg-txt (point))
- (while (and (< (point) limit) (not end-txt))
- (if (looking-at "\\s *$")
- ;; No underline found
- (setq end-txt (1- (point)))
- (when (looking-at (concat "\\(" ado-re "\\)\\s *$"))
- (setq end-und (match-end 1))
- (setq beg-und (point))
- (setq end-txt (1- beg-und))))
- (forward-line 1)))
- (t
- ;; An underline
- (setq key (concat (list ado-ch) "u"))
- (setq beg-und beg-pnt)
- (setq end-und end-pnt)
- (setq end-txt (1- beg-und))
- (setq beg-txt (progn
- (if (re-search-backward "^\\s *$" 1 'move)
- (forward-line 1))
- (point)))))
- (list key
- (or beg-ovr beg-txt beg-und)
- (or end-und end-txt end-und)
- beg-ovr end-ovr beg-txt end-txt beg-und end-und)))))
-
-;; Handles adornments for font-locking section titles and transitions. Returns
-;; three match groups. First and last match group matched pure overline /
-;; underline adornment while second group matched section title text. Each
-;; group may not exist.
-(defun rst-font-lock-handle-adornment (limit)
- (let ((ado-pnt rst-font-lock-adornment-point))
+(defvar rst-font-lock-adornment-level nil
+ "Storage for `rst-font-lock-handle-adornment-matcher'.
+Either section level of the current adornment or t for a transition.")
+
+(defun rst-adornment-level (key)
+ "Return section level for adornment KEY.
+KEY is the first element of the return list of
+`rst-classify-adornment'. If KEY is not a cons return it. If KEY is found
+in the hierarchy return its level. Otherwise return a level one
+beyond the existing hierarchy."
+ (if (not (consp key))
+ key
+ (let* ((hier (rst-get-hierarchy))
+ (char (car key))
+ (style (cdr key)))
+ (1+ (or (position-if (lambda (elt)
+ (and (equal (car elt) char)
+ (equal (cadr elt) style))) hier)
+ (length hier))))))
+
+(defvar rst-font-lock-adornment-match nil
+ "Storage for match for current adornment.
+Set by `rst-font-lock-handle-adornment-pre-match-form'. Also used
+as a trigger for `rst-font-lock-handle-adornment-matcher'.")
+
+(defun rst-font-lock-handle-adornment-pre-match-form (ado ado-end)
+ "Determine limit for adornments for font-locking section titles and transitions.
+In fact determine all things necessary and put the result to
+`rst-font-lock-adornment-match' and
+`rst-font-lock-adornment-level'. ADO is the complete adornment
+matched. ADO-END is the point where ADO ends. Return the point
+where the whole adorned construct ends.
+
+Called as a PRE-MATCH-FORM in the sense of `font-lock-keywords'."
+ (let ((ado-data (rst-classify-adornment ado ado-end)))
+ (if (not ado-data)
+ (setq rst-font-lock-adornment-level nil
+ rst-font-lock-adornment-match nil)
+ (setq rst-font-lock-adornment-level
+ (rst-adornment-level (car ado-data)))
+ (setq rst-font-lock-adornment-match (cdr ado-data))
+ (goto-char (nth 1 ado-data)) ; Beginning of construct
+ (nth 2 ado-data)))) ; End of construct
+
+(defun rst-font-lock-handle-adornment-matcher (limit)
+ "Set the match found by `rst-font-lock-handle-adornment-pre-match-form'
+the first time called or nil.
+
+Called as a MATCHER in the sense of `font-lock-keywords'."
+ (let ((match rst-font-lock-adornment-match))
;; May run only once - enforce this
- (setq rst-font-lock-adornment-point nil)
- (if ado-pnt
- (let* ((ado (rst-classify-adornment (match-string-no-properties 1)
- ado-pnt limit))
- (key (car ado))
- (mtc (cdr ado)))
- (setq rst-font-lock-level (rst-adornment-level key t))
- (goto-char (nth 1 mtc))
- (put-text-property (nth 0 mtc) (nth 1 mtc) 'font-lock-multiline t)
- (set-match-data mtc)
- t))))
-
-
+ (setq rst-font-lock-adornment-match nil)
+ (when match
+ (set-match-data match)
+ (goto-char (match-end 0))
+ (put-text-property (match-beginning 0) (match-end 0)
+ 'font-lock-multiline t)
+ t)))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; Support for conversion from within Emacs
+;; Compilation
(defgroup rst-compile nil
"Settings for support of conversion of reStructuredText
@@ -3254,6 +3851,8 @@ document with \\[rst-compile]."
An association list of the toolset to a list of the (command to use,
extension of produced filename, options to the tool (nil or a
string)) to be used for converting the document."
+ ;; FIXME: These are not options but symbols which may be referenced by
+ ;; `rst-compile-*-toolset` below
:type '(alist :options (html latex newlatex pseudoxml xml pdf s5)
:key-type symbol
:value-type (list :tag "Specification"
@@ -3265,15 +3864,11 @@ string)) to be used for converting the document."
:group 'rst
:version "24.1")
-;; Note for Python programmers not familiar with association lists: you can set
-;; values in an alists like this, e.g. :
-;; (setcdr (assq 'html rst-compile-toolsets)
-;; '("rst2html.py" ".htm" "--stylesheet=/docutils.css"))
-
-
+;; FIXME: Must be `defcustom`
(defvar rst-compile-primary-toolset 'html
"The default toolset for `rst-compile'.")
+;; FIXME: Must be `defcustom`
(defvar rst-compile-secondary-toolset 'latex
"The default toolset for `rst-compile' with a prefix argument.")
@@ -3301,15 +3896,15 @@ string)) to be used for converting the document."
(require 'compile)
-(defun rst-compile (&optional pfxarg)
+(defun rst-compile (&optional use-alt)
"Compile command to convert reST document into some output file.
Attempts to find configuration file, if it can, overrides the
-options. There are two commands to choose from, with a prefix
-argument, select the alternative toolset."
+options. There are two commands to choose from, with USE-ALT,
+select the alternative toolset."
(interactive "P")
;; Note: maybe we want to check if there is a Makefile too and not do anything
;; if that is the case. I dunno.
- (let* ((toolset (cdr (assq (if pfxarg
+ (let* ((toolset (cdr (assq (if use-alt
rst-compile-secondary-toolset
rst-compile-primary-toolset)
rst-compile-toolsets)))
@@ -3326,14 +3921,14 @@ argument, select the alternative toolset."
(list command
(or options "")
(if conffile
- (concat "--config=\"" conffile "\"")
+ (concat "--config=" (shell-quote-argument conffile))
"")
- bufname
- (concat outname extension))
+ (shell-quote-argument bufname)
+ (shell-quote-argument (concat outname extension)))
" "))
;; Invoke the compile command.
- (if (or compilation-read-command current-prefix-arg)
+ (if (or compilation-read-command use-alt)
(call-interactively 'compile)
(compile compile-command))
))
@@ -3341,7 +3936,7 @@ argument, select the alternative toolset."
(defun rst-compile-alt-toolset ()
"Compile command with the alternative toolset."
(interactive)
- (rst-compile 't))
+ (rst-compile t))
(defun rst-compile-pseudo-region ()
"Show the pseudo-XML rendering of the current active region,
@@ -3354,45 +3949,45 @@ or of the entire buffer, if the region is not selected."
(cadr (assq 'pseudoxml rst-compile-toolsets))
standard-output)))
+;; FIXME: Should be `defcustom`
(defvar rst-pdf-program "xpdf"
"Program used to preview PDF files.")
(defun rst-compile-pdf-preview ()
"Convert the document to a PDF file and launch a preview program."
(interactive)
- (let* ((tmp-filename (make-temp-file "rst-out" nil ".pdf"))
- (command (format "%s %s %s && %s %s"
+ (let* ((tmp-filename (make-temp-file "rst_el" nil ".pdf"))
+ (command (format "%s %s %s && %s %s ; rm %s"
(cadr (assq 'pdf rst-compile-toolsets))
buffer-file-name tmp-filename
- rst-pdf-program tmp-filename)))
+ rst-pdf-program tmp-filename tmp-filename)))
(start-process-shell-command "rst-pdf-preview" nil command)
;; Note: you could also use (compile command) to view the compilation
;; output.
))
+;; FIXME: Should be `defcustom` or use something like `browse-url`
(defvar rst-slides-program "firefox"
"Program used to preview S5 slides.")
(defun rst-compile-slides-preview ()
"Convert the document to an S5 slide presentation and launch a preview program."
(interactive)
- (let* ((tmp-filename (make-temp-file "rst-slides" nil ".html"))
- (command (format "%s %s %s && %s %s"
+ (let* ((tmp-filename (make-temp-file "rst_el" nil ".html"))
+ (command (format "%s %s %s && %s %s ; rm %s"
(cadr (assq 's5 rst-compile-toolsets))
buffer-file-name tmp-filename
- rst-slides-program tmp-filename)))
+ rst-slides-program tmp-filename tmp-filename)))
(start-process-shell-command "rst-slides-preview" nil command)
;; Note: you could also use (compile command) to view the compilation
;; output.
))
-
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;
;; Generic text functions that are more convenient than the defaults.
-;;
+;; FIXME: Unbound command - should be bound or removed
(defun rst-replace-lines (fromchar tochar)
"Replace flush-left lines, consisting of multiple FROMCHAR characters,
with equal-length lines of TOCHAR."
@@ -3400,7 +3995,7 @@ with equal-length lines of TOCHAR."
cSearch for flush-left lines of char:
cand replace with char: ")
(save-excursion
- (let ((searchre (concat "^" (regexp-quote (string fromchar)) "+\\( *\\)$"))
+ (let ((searchre (rst-re "^" fromchar "+\\( *\\)$"))
(found 0))
(while (search-forward-regexp searchre nil t)
(setq found (1+ found))
@@ -3410,12 +4005,14 @@ cand replace with char: ")
(insert-char tochar width)))
(message (format "%d lines replaced." found)))))
+;; FIXME: Unbound command - should be bound or removed
(defun rst-join-paragraph ()
"Join lines in current paragraph into one line, removing end-of-lines."
(interactive)
(let ((fill-column 65000)) ; some big number
(call-interactively 'fill-paragraph)))
+;; FIXME: Unbound command - should be bound or removed
(defun rst-force-fill-paragraph ()
"Fill paragraph at point, first joining the paragraph's lines into one.
This is useful for filling list item paragraphs."
@@ -3424,41 +4021,40 @@ This is useful for filling list item paragraphs."
(fill-paragraph nil))
+;; FIXME: Unbound command - should be bound or removed
;; Generic character repeater function.
;; For sections, better to use the specialized function above, but this can
;; be useful for creating separators.
-(defun rst-repeat-last-character (&optional tofill)
+(defun rst-repeat-last-character (use-next)
"Fill the current line up to the length of the preceding line (if not
empty), using the last character on the current line. If the preceding line is
empty, we use the `fill-column'.
-If a prefix argument is provided, use the next line rather than the preceding
-line.
+If USE-NEXT, use the next line rather than the preceding line.
If the current line is longer than the desired length, shave the characters off
the current line to fit the desired length.
As an added convenience, if the command is repeated immediately, the alternative
column is used (fill-column vs. end of previous/next line)."
- (interactive)
+ (interactive "P")
(let* ((curcol (current-column))
(curline (+ (count-lines (point-min) (point))
- (if (eq curcol 0) 1 0)))
+ (if (zerop curcol) 1 0)))
(lbp (line-beginning-position 0))
- (prevcol (if (and (= curline 1) (not current-prefix-arg))
+ (prevcol (if (and (= curline 1) (not use-next))
fill-column
(save-excursion
- (forward-line (if current-prefix-arg 1 -1))
+ (forward-line (if use-next 1 -1))
(end-of-line)
(skip-chars-backward " \t" lbp)
(let ((cc (current-column)))
- (if (= cc 0) fill-column cc)))))
+ (if (zerop cc) fill-column cc)))))
(rightmost-column
- (cond (tofill fill-column)
- ((equal last-command 'rst-repeat-last-character)
+ (cond ((equal last-command 'rst-repeat-last-character)
(if (= curcol fill-column) prevcol fill-column))
(t (save-excursion
- (if (= prevcol 0) fill-column prevcol)))
+ (if (zerop prevcol) fill-column prevcol)))
)) )
(end-of-line)
(if (> (current-column) rightmost-column)
@@ -3481,5 +4077,4 @@ column is used (fill-column vs. end of previous/next line)."
(provide 'rst)
-
;;; rst.el ends here
diff --git a/lisp/textmodes/tildify.el b/lisp/textmodes/tildify.el
index 5552eff7186..583e4a4d35d 100644
--- a/lisp/textmodes/tildify.el
+++ b/lisp/textmodes/tildify.el
@@ -51,7 +51,7 @@
(defgroup tildify nil
- "Adding missing hard spaces or other text fragments into texts."
+ "Add hard spaces or other text fragments to text buffers."
:version "21.1"
:group 'wp)
diff --git a/lisp/time.el b/lisp/time.el
index c7fa5927e48..8d43b565416 100644
--- a/lisp/time.el
+++ b/lisp/time.el
@@ -465,7 +465,7 @@ update which can wait for the next redisplay."
(seconds (substring time 17 19))
(time-zone (car (cdr (current-time-zone now))))
(day (substring time 8 10))
- (year (substring time 20 24))
+ (year (format-time-string "%Y" now))
(monthname (substring time 4 7))
(month
(cdr
diff --git a/lisp/tooltip.el b/lisp/tooltip.el
index 1fab25fe5cd..9d0fbaae9d8 100644
--- a/lisp/tooltip.el
+++ b/lisp/tooltip.el
@@ -154,6 +154,8 @@ This variable is obsolete; instead of setting it to t, disable
;;; Variables that are not customizable.
+(define-obsolete-variable-alias 'tooltip-hook 'tooltip-functions "23.1")
+
(defvar tooltip-functions nil
"Functions to call to display tooltips.
Each function is called with one argument EVENT which is a copy
@@ -161,8 +163,6 @@ of the last mouse movement event that occurred. If one of these
functions displays the tooltip, it should return non-nil and the
rest are not called.")
-(define-obsolete-variable-alias 'tooltip-hook 'tooltip-functions "23.1")
-
(defvar tooltip-timeout-id nil
"The id of the timeout started when Emacs becomes idle.")
diff --git a/lisp/url/ChangeLog b/lisp/url/ChangeLog
index 3c9313e3e7d..40295f6e1d8 100644
--- a/lisp/url/ChangeLog
+++ b/lisp/url/ChangeLog
@@ -1,3 +1,59 @@
+2012-05-25 Leo Liu <sdl.web@gmail.com>
+
+ * url-http.el (url-http-codes): Fix mal-formed defconst.
+
+2012-05-15 Ian Eure <ian@simplegeo.com>
+
+ * url-util.el (url-build-query-string): New function (Bug#8706).
+ (url-parse-query-string): Allow that '=' is not required and split
+ URL parameters on ';', not just '&'.
+
+2012-05-14 Lars Magne Ingebrigtsen <larsi@gnus.org>
+
+ * url-expand.el (url-default-expander): Copy over the fullness of
+ the new URL object based on the definition URL object.
+
+2012-05-10 Chong Yidong <cyd@gnu.org>
+
+ * url-parse.el (url-path-and-query, url-port-if-non-default): New
+ functions.
+ (url-generic-parse-url): Don't set the portspec slot if it is not
+ specified; that is what `url-port' is for.
+ (url-port): Only require the scheme to be specified to call
+ url-scheme-get-property.
+
+ * url-util.el (url-encode-url): Use url-path-and-query.
+
+ * url-vars.el (url-mime-charset-string): Load mm-util lazily.
+
+2012-05-09 Chong Yidong <cyd@gnu.org>
+
+ * url-util.el (url-encode-url): New function for URL quoting.
+ (url-encoding-table, url-host-allowed-chars)
+ (url-path-allowed-chars): New constants.
+ (url--allowed-chars): New helper function. Use upper-case.
+ (url-hexify-string): Use them.
+
+ * url-parse.el: Improve RFC 3986 conformance.
+ (url-generic-parse-url): Do not populate the ATTRIBUTES slot,
+ since this is not reliable for general RFC 3986 URIs. Keep the
+ whole path and query inside the FILENAME slot. Improve docstring.
+ (url-recreate-url-attributes): Mark as obsolete.
+ (url-recreate-url): Handle missing scheme and userinfo.
+ (url-path-and-query): New function.
+
+ * url-http.el (url-http-create-request): Ignore obsolete
+ attributes slot of url-object.
+
+ * url-vars.el (url-nonrelative-link): Make the regexp stricter.
+
+ * url.el (url-retrieve-internal): Use url-encode-url (Bug#7017).
+
+2012-04-26 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * url.el (url-retrieve-synchronously): Replace lexical-let by
+ lexical-binding.
+
2012-04-10 William Xu <william.xwl@gmail.com> (tiny change)
* url.el (url-retrieve-internal): Hexify multibye URL string first
@@ -28,8 +84,8 @@
2012-03-11 Chong Yidong <cyd@gnu.org>
- * url-http.el (url-http-end-of-document-sentinel): Handle
- keepalive expiry by calling url-http again (Bug#10223).
+ * url-http.el (url-http-end-of-document-sentinel):
+ Handle keepalive expiry by calling url-http again (Bug#10223).
(url-http): New arg, for the above.
2012-03-11 Devon Sean McCullough <emacs-hacker2012@jovi.net>
@@ -180,8 +236,8 @@
2011-07-03 Lars Magne Ingebrigtsen <larsi@gnus.org>
- * url-http.el (url-http-wait-for-headers-change-function): Remove
- pointless "HTTP/0.9 How I hate thee!" message (bug#6735).
+ * url-http.el (url-http-wait-for-headers-change-function):
+ Remove pointless "HTTP/0.9 How I hate thee!" message (bug#6735).
2011-06-04 Andreas Schwab <schwab@linux-m68k.org>
diff --git a/lisp/url/url-expand.el b/lisp/url/url-expand.el
index 156b06c895b..e5c795969aa 100644
--- a/lisp/url/url-expand.el
+++ b/lisp/url/url-expand.el
@@ -116,13 +116,17 @@ path components followed by `..' are removed, along with the `..' itself."
(setf (url-port urlobj) (or (url-port urlobj)
(and (string= (url-type urlobj)
(url-type defobj))
- (url-port defobj))))
+ (url-port defobj))))
(if (not (string= "file" (url-type urlobj)))
(setf (url-host urlobj) (or (url-host urlobj) (url-host defobj))))
(if (string= "ftp" (url-type urlobj))
(setf (url-user urlobj) (or (url-user urlobj) (url-user defobj))))
(if (string= (url-filename urlobj) "")
(setf (url-filename urlobj) "/"))
+ ;; If the object we're expanding from is full, then we are now
+ ;; full.
+ (unless (url-fullness urlobj)
+ (setf (url-fullness urlobj) (url-fullness defobj)))
(if (string-match "^/" (url-filename urlobj))
nil
(let ((query nil)
diff --git a/lisp/url/url-http.el b/lisp/url/url-http.el
index a4726489814..fbefdbba560 100644
--- a/lisp/url/url-http.el
+++ b/lisp/url/url-http.el
@@ -110,8 +110,8 @@ request.")
(503 service-unavailable "Service unavailable")
(504 gateway-timeout "Gateway time-out")
(505 http-version-not-supported "HTTP version not supported")
- (507 insufficient-storage "Insufficient storage")
-"The HTTP return codes and their text."))
+ (507 insufficient-storage "Insufficient storage"))
+ "The HTTP return codes and their text.")
;(eval-when-compile
;; These are all macros so that they are hidden from external sight
@@ -223,8 +223,7 @@ request.")
(let ((url-basic-auth-storage
'url-http-proxy-basic-auth-storage))
(url-get-authentication url-http-target-url nil 'any nil))))
- (real-fname (concat (url-filename url-http-target-url)
- (url-recreate-url-attributes url-http-target-url)))
+ (real-fname (url-filename url-http-target-url))
(host (url-host url-http-target-url))
(auth (if (cdr-safe (assoc "Authorization" url-http-extra-headers))
nil
diff --git a/lisp/url/url-parse.el b/lisp/url/url-parse.el
index b91c85c0c3d..18c5790313e 100644
--- a/lisp/url/url-parse.el
+++ b/lisp/url/url-parse.el
@@ -39,30 +39,62 @@
silent (use-cookies t))
(defsubst url-port (urlobj)
+ "Return the port number for the URL specified by URLOBJ."
(or (url-portspec urlobj)
- (if (url-fullness urlobj)
+ (if (url-type urlobj)
(url-scheme-get-property (url-type urlobj) 'default-port))))
(defsetf url-port (urlobj) (port) `(setf (url-portspec ,urlobj) ,port))
+(defun url-path-and-query (urlobj)
+ "Return the path and query components of URLOBJ.
+These two components are store together in the FILENAME slot of
+the object. The return value of this function is (PATH . QUERY),
+where each of PATH and QUERY are strings or nil."
+ (let ((name (url-filename urlobj))
+ path query)
+ (when name
+ (if (string-match "\\?" name)
+ (setq path (substring name 0 (match-beginning 0))
+ query (substring name (match-end 0)))
+ (setq path name)))
+ (if (equal path "") (setq path nil))
+ (if (equal query "") (setq query nil))
+ (cons path query)))
+
+(defun url-port-if-non-default (urlobj)
+ "Return the port number specified by URLOBJ, if it is not the default.
+If the specified port number is the default, return nil."
+ (let ((port (url-portspec urlobj))
+ type)
+ (and port
+ (or (null (setq type (url-type urlobj)))
+ (not (equal port (url-scheme-get-property type 'default-port))))
+ port)))
+
;;;###autoload
(defun url-recreate-url (urlobj)
"Recreate a URL string from the parsed URLOBJ."
- (concat (url-type urlobj) ":" (if (url-host urlobj) "//" "")
- (if (url-user urlobj)
- (concat (url-user urlobj)
- (if (url-password urlobj)
- (concat ":" (url-password urlobj)))
- "@"))
- (url-host urlobj)
- (if (and (url-port urlobj)
- (not (equal (url-port urlobj)
- (url-scheme-get-property (url-type urlobj) 'default-port))))
- (format ":%d" (url-port urlobj)))
- (or (url-filename urlobj) "/")
- (url-recreate-url-attributes urlobj)
- (if (url-target urlobj)
- (concat "#" (url-target urlobj)))))
+ (let* ((type (url-type urlobj))
+ (user (url-user urlobj))
+ (pass (url-password urlobj))
+ (host (url-host urlobj))
+ ;; RFC 3986: "omit the port component and its : delimiter if
+ ;; port is empty or if its value would be the same as that of
+ ;; the scheme's default."
+ (port (url-port-if-non-default urlobj))
+ (file (url-filename urlobj))
+ (frag (url-target urlobj)))
+ (concat (if type (concat type ":"))
+ (if (url-fullness urlobj) "//")
+ (if (or user pass)
+ (concat user
+ (if pass (concat ":" pass))
+ "@"))
+ host
+ (if port (format ":%d" (url-port urlobj)))
+ (or file "/")
+ (if frag (concat "#" frag)))))
(defun url-recreate-url-attributes (urlobj)
"Recreate the attributes of an URL string from the parsed URLOBJ."
@@ -73,107 +105,125 @@
(concat (car x) "=" (cdr x))
(car x)))
(url-attributes urlobj) ";"))))
+(make-obsolete 'url-recreate-url-attributes nil "24.2")
;;;###autoload
(defun url-generic-parse-url (url)
"Return an URL-struct of the parts of URL.
The CL-style struct contains the following fields:
-TYPE USER PASSWORD HOST PORTSPEC FILENAME TARGET ATTRIBUTES FULLNESS."
- ;; See RFC 3986.
- (cond
- ((null url)
- (url-parse-make-urlobj))
- ((or (not (string-match url-nonrelative-link url))
- (= ?/ (string-to-char url)))
- ;; This isn't correct, as a relative URL can be a fragment link
- ;; (e.g. "#foo") and many other things (see section 4.2).
- ;; However, let's not fix something that isn't broken, especially
- ;; when close to a release.
- (url-parse-make-urlobj nil nil nil nil nil url))
- (t
+
+TYPE is the URI scheme (string or nil).
+USER is the user name (string or nil).
+PASSWORD is the password (string [deprecated] or nil).
+HOST is the host (a registered name, IP literal in square
+ brackets, or IPv4 address in dotted-decimal form).
+PORTSPEC is the specified port (a number), or nil.
+FILENAME is the path AND the query component of the URI.
+TARGET is the fragment identifier component (used to refer to a
+ subordinate resource, e.g. a part of a webpage).
+ATTRIBUTES is nil; this slot originally stored the attribute and
+ value alists for IMAP URIs, but this feature was removed
+ since it conflicts with RFC 3986.
+FULLNESS is non-nil iff the hierarchical sequence component of
+ the URL starts with two slashes, \"//\".
+
+The parser follows RFC 3986, except that it also tries to handle
+URIs that are not fully specified (e.g. lacking TYPE), and it
+does not check for or perform %-encoding.
+
+Here is an example. The URL
+
+ foo://bob:pass@example.com:42/a/b/c.dtb?type=animal&name=narwhal#nose
+
+parses to
+
+ TYPE = \"foo\"
+ USER = \"bob\"
+ PASSWORD = \"pass\"
+ HOST = \"example.com\"
+ PORTSPEC = 42
+ FILENAME = \"/a/b/c.dtb?type=animal&name=narwhal\"
+ TARGET = \"nose\"
+ ATTRIBUTES = nil
+ FULLNESS = t"
+ (if (null url)
+ (url-parse-make-urlobj)
(with-temp-buffer
;; Don't let those temp-buffer modifications accidentally
;; deactivate the mark of the current-buffer.
(let ((deactivate-mark nil))
(set-syntax-table url-parse-syntax-table)
- (let ((save-pos nil)
- (prot nil)
- (user nil)
- (pass nil)
- (host nil)
- (port nil)
- (file nil)
- (refs nil)
- (attr nil)
- (full nil)
+ (erase-buffer)
+ (insert url)
+ (goto-char (point-min))
+ (let ((save-pos (point))
+ scheme user pass host port file fragment full
(inhibit-read-only t))
- (erase-buffer)
- (insert url)
- (goto-char (point-min))
- (setq save-pos (point))
;; 3.1. Scheme
- (unless (looking-at "//")
- (skip-chars-forward "a-zA-Z+.\\-")
- (downcase-region save-pos (point))
- (setq prot (buffer-substring save-pos (point)))
- (skip-chars-forward ":")
- (setq save-pos (point)))
+ ;; This is nil for a URI that is not fully specified.
+ (when (looking-at "\\([a-zA-Z][-a-zA-Z0-9+.]*\\):")
+ (goto-char (match-end 0))
+ (setq save-pos (point))
+ (setq scheme (downcase (match-string 1))))
;; 3.2. Authority
(when (looking-at "//")
(setq full t)
(forward-char 2)
(setq save-pos (point))
- (skip-chars-forward "^/")
+ (skip-chars-forward "^/?#")
(setq host (buffer-substring save-pos (point)))
+ ;; 3.2.1 User Information
(if (string-match "^\\([^@]+\\)@" host)
(setq user (match-string 1 host)
- host (substring host (match-end 0) nil)))
- (if (and user (string-match "\\([^:]+\\):\\(.*\\)" user))
+ host (substring host (match-end 0))))
+ (if (and user (string-match "\\`\\([^:]*\\):\\(.*\\)" user))
(setq pass (match-string 2 user)
user (match-string 1 user)))
- ;; This gives wrong results for IPv6 literal addresses.
- (if (string-match ":\\([0-9+]+\\)" host)
- (setq port (string-to-number (match-string 1 host))
- host (substring host 0 (match-beginning 0))))
- (if (string-match ":$" host)
- (setq host (substring host 0 (match-beginning 0))))
- (setq host (downcase host)
- save-pos (point)))
-
- (if (not port)
- (setq port (url-scheme-get-property prot 'default-port)))
-
- ;; 3.3. Path
- ;; Gross hack to preserve ';' in data URLs
+ (cond
+ ;; IPv6 literal address.
+ ((string-match "^\\(\\[[^]]+\\]\\)\\(?::\\([0-9]*\\)\\)?$" host)
+ (setq port (match-string 2 host)
+ host (match-string 1 host)))
+ ;; Registered name or IPv4 address.
+ ((string-match ":\\([0-9]*\\)$" host)
+ (setq port (match-string 1 host)
+ host (substring host 0 (match-beginning 0)))))
+ (cond ((equal port "")
+ (setq port nil))
+ (port
+ (setq port (string-to-number port))))
+ (setq host (downcase host)))
+
+ ;; Now point is on the / ? or # which terminates the
+ ;; authority, or at the end of the URI, or (if there is no
+ ;; authority) at the beginning of the absolute path.
+
(setq save-pos (point))
+ (if (string= "data" scheme)
+ ;; For the "data" URI scheme, all the rest is the FILE.
+ (setq file (buffer-substring save-pos (point-max)))
+ ;; For hysterical raisins, our data structure returns the
+ ;; path and query components together in one slot.
+ ;; 3.3. Path
+ (skip-chars-forward "^?#")
+ ;; 3.4. Query
+ (when (looking-at "?")
+ (skip-chars-forward "^#"))
+ (setq file (buffer-substring save-pos (point)))
+ ;; 3.5 Fragment
+ (when (looking-at "#")
+ (let ((opoint (point)))
+ (forward-char 1)
+ (unless (eobp)
+ (setq fragment (buffer-substring (point) (point-max))))
+ (delete-region opoint (point-max)))))
- ;; 3.4. Query
- (if (string= "data" prot)
- (goto-char (point-max))
- ;; Now check for references
- (skip-chars-forward "^#")
- (if (eobp)
- nil
- (delete-region
- (point)
- (progn
- (skip-chars-forward "#")
- (setq refs (buffer-substring (point) (point-max)))
- (point-max))))
- (goto-char save-pos)
- (skip-chars-forward "^;")
- (unless (eobp)
- (setq attr (url-parse-args (buffer-substring (point) (point-max))
- t)
- attr (nreverse attr))))
-
- (setq file (buffer-substring save-pos (point)))
(if (and host (string-match "%[0-9][0-9]" host))
(setq host (url-unhex-string host)))
- (url-parse-make-urlobj
- prot user pass host port file refs attr full)))))))
+ (url-parse-make-urlobj scheme user pass host port file
+ fragment nil full))))))
(defmacro url-bit-for-url (method lookfor url)
`(let* ((urlobj (url-generic-parse-url url))
diff --git a/lisp/url/url-util.el b/lisp/url/url-util.el
index d12bd5447fa..18fc51f0d10 100644
--- a/lisp/url/url-util.el
+++ b/lisp/url/url-util.el
@@ -263,24 +263,65 @@ Will not do anything if `url-show-status' is nil."
;;;###autoload
(defun url-parse-query-string (query &optional downcase allow-newlines)
(let (retval pairs cur key val)
- (setq pairs (split-string query "&"))
+ (setq pairs (split-string query "[;&]"))
(while pairs
(setq cur (car pairs)
pairs (cdr pairs))
- (if (not (string-match "=" cur))
- nil ; Grace
- (setq key (url-unhex-string (substring cur 0 (match-beginning 0))
- allow-newlines))
- (setq val (url-unhex-string (substring cur (match-end 0) nil)
- allow-newlines))
- (if downcase
- (setq key (downcase key)))
- (setq cur (assoc key retval))
- (if cur
- (setcdr cur (cons val (cdr cur)))
- (setq retval (cons (list key val) retval)))))
+ (unless (string-match "=" cur)
+ (setq cur (concat cur "=")))
+
+ (when (string-match "=" cur)
+ (setq key (url-unhex-string (substring cur 0 (match-beginning 0))
+ allow-newlines))
+ (setq val (url-unhex-string (substring cur (match-end 0) nil)
+ allow-newlines))
+ (if downcase
+ (setq key (downcase key)))
+ (setq cur (assoc key retval))
+ (if cur
+ (setcdr cur (cons val (cdr cur)))
+ (setq retval (cons (list key val) retval)))))
retval))
+;;;###autoload
+(defun url-build-query-string (query &optional semicolons keep-empty)
+ "Build a query-string.
+
+Given a QUERY in the form:
+'((key1 val1)
+ (key2 val2)
+ (key3 val1 val2)
+ (key4)
+ (key5 ""))
+
+\(This is the same format as produced by `url-parse-query-string')
+
+This will return a string
+\"key1=val1&key2=val2&key3=val1&key3=val2&key4&key5\". Keys may
+be strings or symbols; if they are symbols, the symbol name will
+be used.
+
+When SEMICOLONS is given, the separator will be \";\".
+
+When KEEP-EMPTY is given, empty values will show as \"key=\"
+instead of just \"key\" as in the example above."
+ (mapconcat
+ (lambda (key-vals)
+ (let ((escaped
+ (mapcar (lambda (sym)
+ (url-hexify-string (format "%s" sym))) key-vals)))
+ (mapconcat (lambda (val)
+ (let ((vprint (format "%s" val))
+ (eprint (format "%s" (car escaped))))
+ (concat eprint
+ (if (or keep-empty
+ (and val (not (zerop (length vprint)))))
+ "="
+ "")
+ vprint)))
+ (or (cdr escaped) '("")) (if semicolons ";" "&"))))
+ query (if semicolons ";" "&")))
+
(defun url-unhex (x)
(if (> x ?9)
(if (>= x ?a)
@@ -333,40 +374,115 @@ forbidden in URL encoding."
(concat tmp str)))
(defconst url-unreserved-chars
- '(
- ?a ?b ?c ?d ?e ?f ?g ?h ?i ?j ?k ?l ?m ?n ?o ?p ?q ?r ?s ?t ?u ?v ?w ?x ?y ?z
+ '(?a ?b ?c ?d ?e ?f ?g ?h ?i ?j ?k ?l ?m ?n ?o ?p ?q ?r ?s ?t ?u ?v ?w ?x ?y ?z
?A ?B ?C ?D ?E ?F ?G ?H ?I ?J ?K ?L ?M ?N ?O ?P ?Q ?R ?S ?T ?U ?V ?W ?X ?Y ?Z
?0 ?1 ?2 ?3 ?4 ?5 ?6 ?7 ?8 ?9
- ?- ?_ ?. ?! ?~ ?* ?' ?\( ?\))
- "A list of characters that are _NOT_ reserved in the URL spec.
-This is taken from RFC 2396.")
+ ?- ?_ ?. ?~)
+ "List of characters that are unreserved in the URL spec.
+This is taken from RFC 3986 (section 2.3).")
+
+(defconst url-encoding-table
+ (let ((vec (make-vector 256 nil)))
+ (dotimes (byte 256)
+ ;; RFC 3986 (Section 2.1): For consistency, URI producers and
+ ;; normalizers should use uppercase hexadecimal digits for all
+ ;; percent-encodings.
+ (aset vec byte (format "%%%02X" byte)))
+ vec)
+ "Vector translating bytes to URI-encoded %-sequences.")
+
+(defun url--allowed-chars (char-list)
+ "Return an \"allowed character\" mask (a 256-slot vector).
+The Nth element is non-nil if character N is in CHAR-LIST. The
+result can be passed as the second arg to `url-hexify-string'."
+ (let ((vec (make-vector 256 nil)))
+ (dolist (byte char-list)
+ (ignore-errors (aset vec byte t)))
+ vec))
;;;###autoload
-(defun url-hexify-string (string)
- "Return a new string that is STRING URI-encoded.
-First, STRING is converted to utf-8, if necessary. Then, for each
-character in the utf-8 string, those found in `url-unreserved-chars'
-are left as-is, all others are represented as a three-character
-string: \"%\" followed by two lowercase hex digits."
- ;; To go faster and avoid a lot of consing, we could do:
- ;;
- ;; (defconst url-hexify-table
- ;; (let ((map (make-vector 256 nil)))
- ;; (dotimes (byte 256) (aset map byte
- ;; (if (memq byte url-unreserved-chars)
- ;; (char-to-string byte)
- ;; (format "%%%02x" byte))))
- ;; map))
- ;;
- ;; (mapconcat (curry 'aref url-hexify-table) ...)
+(defun url-hexify-string (string &optional allowed-chars)
+ "URI-encode STRING and return the result.
+If STRING is multibyte, it is first converted to a utf-8 byte
+string. Each byte corresponding to an allowed character is left
+as-is, while all other bytes are converted to a three-character
+string: \"%\" followed by two upper-case hex digits.
+
+The allowed characters are specified by ALLOWED-CHARS. If this
+argument is nil, the list `url-unreserved-chars' determines the
+allowed characters. Otherwise, ALLOWED-CHARS should be a vector
+whose Nth element is non-nil if character N is allowed."
+ (unless allowed-chars
+ (setq allowed-chars (url--allowed-chars url-unreserved-chars)))
(mapconcat (lambda (byte)
- (if (memq byte url-unreserved-chars)
- (char-to-string byte)
- (format "%%%02x" byte)))
- (if (multibyte-string-p string)
- (encode-coding-string string 'utf-8)
- string)
- ""))
+ (if (aref allowed-chars byte)
+ (char-to-string byte)
+ (aref url-encoding-table byte)))
+ (if (multibyte-string-p string)
+ (encode-coding-string string 'utf-8)
+ string)
+ ""))
+
+(defconst url-host-allowed-chars
+ ;; Allow % to avoid re-encoding %-encoded sequences.
+ (url--allowed-chars (append '(?% ?! ?$ ?& ?' ?\( ?\) ?* ?+ ?, ?\; ?=)
+ url-unreserved-chars))
+ "Allowed-character byte mask for the host segment of a URI.
+These characters are specified in RFC 3986, Appendix A.")
+
+(defconst url-path-allowed-chars
+ (let ((vec (copy-sequence url-host-allowed-chars)))
+ (aset vec ?/ t)
+ (aset vec ?: t)
+ (aset vec ?@ t)
+ vec)
+ "Allowed-character byte mask for the path segment of a URI.
+These characters are specified in RFC 3986, Appendix A.")
+
+(defconst url-query-allowed-chars
+ (let ((vec (copy-sequence url-path-allowed-chars)))
+ (aset vec ?? t)
+ vec)
+ "Allowed-character byte mask for the query segment of a URI.
+These characters are specified in RFC 3986, Appendix A.")
+
+;;;###autoload
+(defun url-encode-url (url)
+ "Return a properly URI-encoded version of URL.
+This function also performs URI normalization, e.g. converting
+the scheme to lowercase if it is uppercase. Apart from
+normalization, if URL is already URI-encoded, this function
+should return it unchanged."
+ (if (multibyte-string-p url)
+ (setq url (encode-coding-string url 'utf-8)))
+ (let* ((obj (url-generic-parse-url url))
+ (user (url-user obj))
+ (pass (url-password obj))
+ (host (url-host obj))
+ (path-and-query (url-path-and-query obj))
+ (path (car path-and-query))
+ (query (cdr path-and-query))
+ (frag (url-target obj)))
+ (if user
+ (setf (url-user obj) (url-hexify-string user)))
+ (if pass
+ (setf (url-password obj) (url-hexify-string pass)))
+ ;; No special encoding for IPv6 literals.
+ (and host
+ (not (string-match "\\`\\[.*\\]\\'" host))
+ (setf (url-host obj)
+ (url-hexify-string host url-host-allowed-chars)))
+
+ (if path
+ (setq path (url-hexify-string path url-path-allowed-chars)))
+ (if query
+ (setq query (url-hexify-string query url-query-allowed-chars)))
+ (setf (url-filename obj) (if query (concat path "?" query) path))
+
+ (if frag
+ (setf (url-target obj)
+ (url-hexify-string frag url-query-allowed-chars)))
+ (url-recreate-url obj)))
;;;###autoload
(defun url-file-extension (fname &optional x)
diff --git a/lisp/url/url-vars.el b/lisp/url/url-vars.el
index ff18049e97b..6aa14b8bae1 100644
--- a/lisp/url/url-vars.el
+++ b/lisp/url/url-vars.el
@@ -21,8 +21,6 @@
;;; Code:
-(require 'mm-util)
-
(defconst url-version "Emacs"
"Version number of URL package.")
@@ -221,6 +219,7 @@ Should be an assoc list of headers/contents.")
(defun url-mime-charset-string ()
"Generate a list of preferred MIME charsets for HTTP requests.
Generated according to current coding system priorities."
+ (require 'mm-util)
(if (fboundp 'sort-coding-systems)
(let ((ordered (sort-coding-systems
(let (accum)
@@ -304,8 +303,12 @@ undefined."
:type '(choice (const :tag "None" :value nil) string)
:group 'url)
+;; From RFC3986: Scheme names consist of a sequence of characters
+;; beginning with a letter and followed by any combination of letters,
+;; digits, plus ("+"), period ("."), or hyphen ("-").
+
(defvar url-nonrelative-link
- "\\`\\([-a-zA-Z0-9+.]+:\\)"
+ "\\`\\([a-zA-Z][-a-zA-Z0-9+.]*:\\)"
"A regular expression that will match an absolute URL.")
(defcustom url-max-redirections 30
diff --git a/lisp/url/url.el b/lisp/url/url.el
index f3ef553bbce..6d276273c2d 100644
--- a/lisp/url/url.el
+++ b/lisp/url/url.el
@@ -1,4 +1,4 @@
-;;; url.el --- Uniform Resource Locator retrieval tool
+;;; url.el --- Uniform Resource Locator retrieval tool -*- lexical-binding: t -*-
;; Copyright (C) 1996-1999, 2001, 2004-2012 Free Software Foundation, Inc.
@@ -125,7 +125,9 @@ variable in the original buffer as a forwarding pointer.")
;;;###autoload
(defun url-retrieve (url callback &optional cbargs silent inhibit-cookies)
"Retrieve URL asynchronously and call CALLBACK with CBARGS when finished.
-URL is either a string or a parsed URL.
+URL is either a string or a parsed URL. If it is a string
+containing characters that are not valid in a URI, those
+characters are percent-encoded; see `url-encode-url'.
CALLBACK is called when the object has been completely retrieved, with
the current buffer containing the object, and any MIME headers associated
@@ -179,10 +181,8 @@ URL-encoded before it's used."
(url-do-setup)
(url-gc-dead-buffers)
(if (stringp url)
- (set-text-properties 0 (length url) nil url))
- (when (multibyte-string-p url)
- (let ((url-unreserved-chars (append '(?: ?/) url-unreserved-chars)))
- (setq url (url-hexify-string url))))
+ (set-text-properties 0 (length url) nil url))
+ (setq url (url-encode-url url))
(if (not (vectorp url))
(setq url (url-generic-parse-url url)))
(if (not (functionp callback))
@@ -225,8 +225,8 @@ associated with it (the case for dired, info, or mailto URLs that need
no further processing). URL is either a string or a parsed URL."
(url-do-setup)
- (lexical-let ((retrieval-done nil)
- (asynch-buffer nil))
+ (let ((retrieval-done nil)
+ (asynch-buffer nil))
(setq asynch-buffer
(url-retrieve url (lambda (&rest ignored)
(url-debug 'retrieval "Synchronous fetching done (%S)" (current-buffer))
diff --git a/lisp/vc/diff-mode.el b/lisp/vc/diff-mode.el
index 8b6b85dd22e..9034ffe520f 100644
--- a/lisp/vc/diff-mode.el
+++ b/lisp/vc/diff-mode.el
@@ -107,8 +107,7 @@ when editing big diffs)."
;;;;
(easy-mmode-defmap diff-mode-shared-map
- '(;; From Pavel Machek's patch-mode.
- ("n" . diff-hunk-next)
+ '(("n" . diff-hunk-next)
("N" . diff-file-next)
("p" . diff-hunk-prev)
("P" . diff-file-prev)
@@ -116,27 +115,17 @@ when editing big diffs)."
([backtab] . diff-hunk-prev)
("k" . diff-hunk-kill)
("K" . diff-file-kill)
- ;; From compilation-minor-mode.
- ("}" . diff-file-next)
+ ("}" . diff-file-next) ; From compilation-minor-mode.
("{" . diff-file-prev)
("\C-m" . diff-goto-source)
([mouse-2] . diff-goto-source)
- ;; From XEmacs's diff-mode.
("W" . widen)
- ;;("." . diff-goto-source) ;display-buffer
- ;;("f" . diff-goto-source) ;find-file
- ("o" . diff-goto-source) ;other-window
- ;;("w" . diff-goto-source) ;other-frame
- ;;("N" . diff-narrow)
- ;;("h" . diff-show-header)
- ;;("j" . diff-show-difference) ;jump to Nth diff
- ;;("q" . diff-quit)
- ;; Not useful if you have to metafy them.
- ;;(" " . scroll-up)
- ;;("\177" . scroll-down)
+ ("o" . diff-goto-source) ; other-window
("A" . diff-ediff-patch)
("r" . diff-restrict-view)
- ("R" . diff-reverse-direction))
+ ("R" . diff-reverse-direction)
+ ("/" . diff-undo)
+ ([remap undo] . diff-undo))
"Basic keymap for `diff-mode', bound to various prefix keys."
:inherit special-mode-map)
@@ -248,10 +237,8 @@ well."
:background "grey80")
(((class color) (min-colors 88) (background dark))
:background "grey45")
- (((class color) (background light))
+ (((class color))
:foreground "blue1" :weight bold)
- (((class color) (background dark))
- :foreground "green" :weight bold)
(t :weight bold))
"`diff-mode' face inherited by hunk and index header faces."
:group 'diff-mode)
@@ -263,9 +250,7 @@ well."
:background "grey70" :weight bold)
(((class color) (min-colors 88) (background dark))
:background "grey60" :weight bold)
- (((class color) (background light))
- :foreground "green" :weight bold)
- (((class color) (background dark))
+ (((class color))
:foreground "cyan" :weight bold)
(t :weight bold)) ; :height 1.3
"`diff-mode' face used to highlight file header lines."
@@ -288,14 +273,28 @@ well."
(defvar diff-hunk-header-face 'diff-hunk-header)
(defface diff-removed
- '((t :inherit diff-changed))
+ '((default
+ :inherit diff-changed)
+ (((class color) (min-colors 88) (background light))
+ :background "#ffdddd")
+ (((class color) (min-colors 88) (background dark))
+ :background "#553333")
+ (((class color))
+ :foreground "red"))
"`diff-mode' face used to highlight removed lines."
:group 'diff-mode)
(define-obsolete-face-alias 'diff-removed-face 'diff-removed "22.1")
(defvar diff-removed-face 'diff-removed)
(defface diff-added
- '((t :inherit diff-changed))
+ '((default
+ :inherit diff-changed)
+ (((class color) (min-colors 88) (background light))
+ :background "#ddffdd")
+ (((class color) (min-colors 88) (background dark))
+ :background "#335533")
+ (((class color))
+ :foreground "green"))
"`diff-mode' face used to highlight added lines."
:group 'diff-mode)
(define-obsolete-face-alias 'diff-added-face 'diff-added "22.1")
@@ -307,10 +306,8 @@ well."
'((((class color grayscale) (min-colors 88)))
;; If the terminal lacks sufficient colors for shadowing,
;; highlight changed lines explicitly.
- (((class color) (background light))
- :foreground "magenta" :weight bold :slant italic)
- (((class color) (background dark))
- :foreground "yellow" :weight bold :slant italic))
+ (((class color))
+ :foreground "yellow"))
"`diff-mode' face used to highlight changed lines."
:group 'diff-mode)
(define-obsolete-face-alias 'diff-changed-face 'diff-changed "22.1")
@@ -385,6 +382,13 @@ well."
(defconst diff-context-mid-hunk-header-re
"--- \\([0-9]+\\)\\(?:,\\([0-9]+\\)\\)? ----$")
+(defvar diff-use-changed-face (and (face-differs-from-default-p diff-changed-face)
+ (not (face-equal diff-changed-face diff-added-face))
+ (not (face-equal diff-changed-face diff-removed-face)))
+ "If non-nil, use the face `diff-changed' for changed lines in context diffs.
+Otherwise, use the face `diff-removed' for removed lines,
+and the face `diff-added' for added lines.")
+
(defvar diff-font-lock-keywords
`((,(concat "\\(" diff-hunk-header-re-unified "\\)\\(.*\\)$")
(1 diff-hunk-header-face) (6 diff-function-face))
@@ -404,8 +408,25 @@ well."
("^\\([+>]\\)\\(.*\n\\)"
(1 diff-indicator-added-face) (2 diff-added-face))
("^\\(!\\)\\(.*\n\\)"
- (1 diff-indicator-changed-face) (2 diff-changed-face))
- ("^Index: \\(.+\\).*\n"
+ (1 (if diff-use-changed-face
+ diff-indicator-changed-face
+ ;; Otherwise, search for `diff-context-mid-hunk-header-re' and
+ ;; if the line of context diff is above, use `diff-removed-face';
+ ;; if below, use `diff-added-face'.
+ (save-match-data
+ (let ((limit (save-excursion (diff-beginning-of-hunk))))
+ (if (save-excursion (re-search-backward diff-context-mid-hunk-header-re limit t))
+ diff-indicator-added-face
+ diff-indicator-removed-face)))))
+ (2 (if diff-use-changed-face
+ diff-changed-face
+ ;; Otherwise, use the same method as above.
+ (save-match-data
+ (let ((limit (save-excursion (diff-beginning-of-hunk))))
+ (if (save-excursion (re-search-backward diff-context-mid-hunk-header-re limit t))
+ diff-added-face
+ diff-removed-face))))))
+ ("^\\(?:Index\\|revno\\): \\(.+\\).*\n"
(0 diff-header-face) (1 diff-index-face prepend))
("^Only in .*\n" . diff-nonexistent-face)
("^\\(#\\)\\(.*\\)"
@@ -445,6 +466,7 @@ See http://lists.gnu.org/archive/html/emacs-devel/2007-11/msg01990.html")
style)
(defun diff-end-of-hunk (&optional style donttrustheader)
+ "Advance to the end of the current hunk, and return its position."
(let (end)
(when (looking-at diff-hunk-header-re)
;; Especially important for unified (because headers are ambiguous).
@@ -492,19 +514,21 @@ See http://lists.gnu.org/archive/html/emacs-devel/2007-11/msg01990.html")
(goto-char (or end (point-max)))))
(defun diff-beginning-of-hunk (&optional try-harder)
- "Move back to beginning of hunk.
-If TRY-HARDER is non-nil, try to cater to the case where we're not in a hunk
-but in the file header instead, in which case move forward to the first hunk."
+ "Move back to the previous hunk beginning, and return its position.
+If point is in a file header rather than a hunk, advance to the
+next hunk if TRY-HARDER is non-nil; otherwise signal an error."
(beginning-of-line)
- (unless (looking-at diff-hunk-header-re)
+ (if (looking-at diff-hunk-header-re)
+ (point)
(forward-line 1)
(condition-case ()
(re-search-backward diff-hunk-header-re)
(error
- (if (not try-harder)
- (error "Can't find the beginning of the hunk")
- (diff-beginning-of-file-and-junk)
- (diff-hunk-next))))))
+ (unless try-harder
+ (error "Can't find the beginning of the hunk"))
+ (diff-beginning-of-file-and-junk)
+ (diff-hunk-next)
+ (point)))))
(defun diff-unified-hunk-p ()
(save-excursion
@@ -547,44 +571,72 @@ but in the file header instead, in which case move forward to the first hunk."
(easy-mmode-define-navigation
diff-file diff-file-header-re "file" diff-end-of-file)
+(defun diff-bounds-of-hunk ()
+ "Return the bounds of the diff hunk at point.
+The return value is a list (BEG END), which are the hunk's start
+and end positions. Signal an error if no hunk is found. If
+point is in a file header, return the bounds of the next hunk."
+ (save-excursion
+ (let ((pos (point))
+ (beg (diff-beginning-of-hunk t))
+ (end (diff-end-of-hunk)))
+ (cond ((>= end pos)
+ (list beg end))
+ ;; If this hunk ends above POS, consider the next hunk.
+ ((re-search-forward diff-hunk-header-re nil t)
+ (list (match-beginning 0) (diff-end-of-hunk)))
+ (t (error "No hunk found"))))))
+
+(defun diff-bounds-of-file ()
+ "Return the bounds of the file segment at point.
+The return value is a list (BEG END), which are the segment's
+start and end positions."
+ (save-excursion
+ (let ((pos (point))
+ (beg (progn (diff-beginning-of-file-and-junk)
+ (point))))
+ (diff-end-of-file)
+ ;; bzr puts a newline after the last hunk.
+ (while (looking-at "^\n")
+ (forward-char 1))
+ (if (> pos (point))
+ (error "Not inside a file diff"))
+ (list beg (point)))))
+
(defun diff-restrict-view (&optional arg)
"Restrict the view to the current hunk.
If the prefix ARG is given, restrict the view to the current file instead."
(interactive "P")
- (save-excursion
- (if arg (diff-beginning-of-file) (diff-beginning-of-hunk 'try-harder))
- (narrow-to-region (point)
- (progn (if arg (diff-end-of-file) (diff-end-of-hunk))
- (point)))
- (set (make-local-variable 'diff-narrowed-to) (if arg 'file 'hunk))))
-
+ (apply 'narrow-to-region
+ (if arg (diff-bounds-of-file) (diff-bounds-of-hunk)))
+ (set (make-local-variable 'diff-narrowed-to) (if arg 'file 'hunk)))
(defun diff-hunk-kill ()
- "Kill current hunk."
+ "Kill the hunk at point."
(interactive)
- (diff-beginning-of-hunk)
- (let* ((start (point))
- ;; Search the second match, since we're looking at the first.
- (nexthunk (when (re-search-forward diff-hunk-header-re nil t 2)
- (match-beginning 0)))
- (firsthunk (ignore-errors
- (goto-char start)
- (diff-beginning-of-file) (diff-hunk-next) (point)))
- (nextfile (ignore-errors (diff-file-next) (point)))
+ (let* ((hunk-bounds (diff-bounds-of-hunk))
+ (file-bounds (ignore-errors (diff-bounds-of-file)))
+ ;; If the current hunk is the only one for its file, kill the
+ ;; file header too.
+ (bounds (if (and file-bounds
+ (progn (goto-char (car file-bounds))
+ (= (progn (diff-hunk-next) (point))
+ (car hunk-bounds)))
+ (progn (goto-char (cadr hunk-bounds))
+ ;; bzr puts a newline after the last hunk.
+ (while (looking-at "^\n")
+ (forward-char 1))
+ (= (point) (cadr file-bounds))))
+ file-bounds
+ hunk-bounds))
(inhibit-read-only t))
- (goto-char start)
- (if (and firsthunk (= firsthunk start)
- (or (null nexthunk)
- (and nextfile (> nexthunk nextfile))))
- ;; It's the only hunk for this file, so kill the file.
- (diff-file-kill)
- (diff-end-of-hunk)
- (kill-region start (point)))))
+ (apply 'kill-region bounds)
+ (goto-char (car bounds))))
;; "index ", "old mode", "new mode", "new file mode" and
;; "deleted file mode" are output by git-diff.
(defconst diff-file-junk-re
- "diff \\|index \\|\\(?:deleted file\\|new\\(?: file\\)?\\|old\\) mode")
+ "diff \\|index \\|\\(?:deleted file\\|new\\(?: file\\)?\\|old\\) mode\\|=== modified file")
(defun diff-beginning-of-file-and-junk ()
"Go to the beginning of file-related diff-info.
@@ -636,13 +688,8 @@ data such as \"Index: ...\" and such."
(defun diff-file-kill ()
"Kill current file's hunks."
(interactive)
- (let ((orig (point))
- (start (progn (diff-beginning-of-file-and-junk) (point)))
- (inhibit-read-only t))
- (diff-end-of-file)
- (if (looking-at "^\n") (forward-char 1)) ;`tla' generates such diffs.
- (if (> orig (point)) (error "Not inside a file diff"))
- (kill-region start (point))))
+ (let ((inhibit-read-only t))
+ (apply 'kill-region (diff-bounds-of-file))))
(defun diff-kill-junk ()
"Kill spurious empty diffs."
@@ -678,7 +725,7 @@ data such as \"Index: ...\" and such."
(interactive)
(beginning-of-line)
(let ((pos (point))
- (start (progn (diff-beginning-of-hunk) (point))))
+ (start (diff-beginning-of-hunk)))
(unless (looking-at diff-hunk-header-re-unified)
(error "diff-split-hunk only works on unified context diffs"))
(forward-line 1)
@@ -1283,11 +1330,7 @@ a diff with \\[diff-reverse-direction].
(set (make-local-variable 'end-of-defun-function)
'diff-end-of-file)
- ;; Set up `whitespace-mode' so that turning it on will show trailing
- ;; whitespace problems on the modified lines of the diff.
- (set (make-local-variable 'whitespace-style) '(face trailing))
- (set (make-local-variable 'whitespace-trailing-regexp)
- "^[-\+!<>].*?\\([\t ]+\\)$")
+ (diff-setup-whitespace)
(setq buffer-read-only diff-default-read-only)
;; setup change hooks
@@ -1332,6 +1375,22 @@ the mode if ARG is omitted or nil.
;;; Handy hook functions ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+(defun diff-setup-whitespace ()
+ "Set up Whitespace mode variables for the current Diff mode buffer.
+This sets `whitespace-style' and `whitespace-trailing-regexp' so
+that Whitespace mode shows trailing whitespace problems on the
+modified lines of the diff."
+ (set (make-local-variable 'whitespace-style) '(face trailing))
+ (let ((style (save-excursion
+ (goto-char (point-min))
+ (when (re-search-forward diff-hunk-header-re nil t)
+ (goto-char (match-beginning 0))
+ (diff-hunk-style)))))
+ (set (make-local-variable 'whitespace-trailing-regexp)
+ (if (eq style 'context)
+ "^[-\+!] .*?\\([\t ]+\\)$"
+ "^[-\+!<>].*?\\([\t ]+\\)$"))))
+
(defun diff-delete-if-empty ()
;; An empty diff file means there's no more diffs to integrate, so we
;; can just remove the file altogether. Very handy for .rej files if we
@@ -1588,8 +1647,7 @@ SWITCHED is non-nil if the patch is already applied.
NOPROMPT, if non-nil, means not to prompt the user."
(save-excursion
(let* ((other (diff-xor other-file diff-jump-to-old-file))
- (char-offset (- (point) (progn (diff-beginning-of-hunk 'try-harder)
- (point))))
+ (char-offset (- (point) (diff-beginning-of-hunk t)))
;; Check that the hunk is well-formed. Otherwise diff-mode and
;; the user may disagree on what constitutes the hunk
;; (e.g. because an empty line truncates the hunk mid-course),
@@ -1776,8 +1834,7 @@ For use in `add-log-current-defun-function'."
(defun diff-ignore-whitespace-hunk ()
"Re-diff the current hunk, ignoring whitespace differences."
(interactive)
- (let* ((char-offset (- (point) (progn (diff-beginning-of-hunk 'try-harder)
- (point))))
+ (let* ((char-offset (- (point) (diff-beginning-of-hunk t)))
(opts (case (char-after) (?@ "-bu") (?* "-bc") (t "-b")))
(line-nb (and (or (looking-at "[^0-9]+\\([0-9]+\\)")
(error "Can't find line number"))
@@ -1822,17 +1879,35 @@ For use in `add-log-current-defun-function'."
(defface diff-refine-change
'((((class color) (min-colors 88) (background light))
- :background "grey85")
+ :background "#ffff55")
(((class color) (min-colors 88) (background dark))
- :background "grey60")
- (((class color) (background light))
- :background "yellow")
- (((class color) (background dark))
- :background "green")
- (t :weight bold))
+ :background "#aaaa22")
+ (t :inverse-video t))
"Face used for char-based changes shown by `diff-refine-hunk'."
:group 'diff-mode)
+(defface diff-refine-removed
+ '((default
+ :inherit diff-refine-change)
+ (((class color) (min-colors 88) (background light))
+ :background "#ffaaaa")
+ (((class color) (min-colors 88) (background dark))
+ :background "#aa2222"))
+ "Face used for removed characters shown by `diff-refine-hunk'."
+ :group 'diff-mode
+ :version "24.2")
+
+(defface diff-refine-added
+ '((default
+ :inherit diff-refine-change)
+ (((class color) (min-colors 88) (background light))
+ :background "#aaffaa")
+ (((class color) (min-colors 88) (background dark))
+ :background "#22aa22"))
+ "Face used for added characters shown by `diff-refine-hunk'."
+ :group 'diff-mode
+ :version "24.2")
+
(defun diff-refine-preproc ()
(while (re-search-forward "^[+>]" nil t)
;; Remove spurious changes due to the fact that one side of the hunk is
@@ -1846,18 +1921,20 @@ For use in `add-log-current-defun-function'."
)
(declare-function smerge-refine-subst "smerge-mode"
- (beg1 end1 beg2 end2 props &optional preproc))
+ (beg1 end1 beg2 end2 props-c &optional preproc props-r props-a))
(defun diff-refine-hunk ()
"Highlight changes of hunk at point at a finer granularity."
(interactive)
(require 'smerge-mode)
(save-excursion
- (diff-beginning-of-hunk 'try-harder)
+ (diff-beginning-of-hunk t)
(let* ((start (point))
(style (diff-hunk-style)) ;Skips the hunk header as well.
(beg (point))
- (props '((diff-mode . fine) (face diff-refine-change)))
+ (props-c '((diff-mode . fine) (face diff-refine-change)))
+ (props-r '((diff-mode . fine) (face diff-refine-removed)))
+ (props-a '((diff-mode . fine) (face diff-refine-added)))
;; Be careful to go back to `start' so diff-end-of-hunk gets
;; to read the hunk header's line info.
(end (progn (goto-char start) (diff-end-of-hunk) (point))))
@@ -1871,7 +1948,7 @@ For use in `add-log-current-defun-function'."
end t)
(smerge-refine-subst (match-beginning 0) (match-end 1)
(match-end 1) (match-end 0)
- props 'diff-refine-preproc)))
+ nil 'diff-refine-preproc props-r props-a)))
(context
(let* ((middle (save-excursion (re-search-forward "^---")))
(other middle))
@@ -1883,15 +1960,23 @@ For use in `add-log-current-defun-function'."
(setq other (match-end 0))
(match-beginning 0))
other
- props 'diff-refine-preproc))))
+ (if diff-use-changed-face props-c)
+ 'diff-refine-preproc
+ (unless diff-use-changed-face props-r)
+ (unless diff-use-changed-face props-a)))))
(t ;; Normal diffs.
(let ((beg1 (1+ (point))))
(when (re-search-forward "^---.*\n" end t)
;; It's a combined add&remove, so there's something to do.
(smerge-refine-subst beg1 (match-beginning 0)
(match-end 0) end
- props 'diff-refine-preproc))))))))
+ nil 'diff-refine-preproc props-r props-a))))))))
+(defun diff-undo (&optional arg)
+ "Perform `undo', ignoring the buffer's read-only status."
+ (interactive "P")
+ (let ((inhibit-read-only t))
+ (undo arg)))
(defun diff-add-change-log-entries-other-window ()
"Iterate through the current diff and create ChangeLog entries.
diff --git a/lisp/vc/diff.el b/lisp/vc/diff.el
index 05208894356..6cfee52cbb5 100644
--- a/lisp/vc/diff.el
+++ b/lisp/vc/diff.el
@@ -1,4 +1,4 @@
-;;; diff.el --- run `diff'
+;;; diff.el --- run `diff' -*- lexical-binding: t -*-
;; Copyright (C) 1992, 1994, 1996, 2001-2012 Free Software Foundation, Inc.
@@ -30,6 +30,8 @@
;;; Code:
+(declare-function diff-setup-whitespace "diff-mode" ())
+
(eval-when-compile (require 'cl))
(defgroup diff nil
@@ -64,6 +66,8 @@ If optional args OLD-TEMP-FILE and/or NEW-TEMP-FILE are non-nil,
delete the temporary files so named."
(if old-temp-file (delete-file old-temp-file))
(if new-temp-file (delete-file new-temp-file))
+ (diff-setup-whitespace)
+ (goto-char (point-min))
(save-excursion
(goto-char (point-max))
(let ((inhibit-read-only t))
@@ -144,11 +148,8 @@ specified in `diff-switches' are passed to the diff command."
(buffer-enable-undo (current-buffer))
(diff-mode)
(set (make-local-variable 'revert-buffer-function)
- (lexical-let ((old old) (new new)
- (switches switches)
- (no-async no-async))
- (lambda (ignore-auto noconfirm)
- (diff-no-select old new switches no-async (current-buffer)))))
+ (lambda (_ignore-auto _noconfirm)
+ (diff-no-select old new switches no-async (current-buffer))))
(setq default-directory thisdir)
(let ((inhibit-read-only t))
(insert command "\n"))
@@ -156,12 +157,11 @@ specified in `diff-switches' are passed to the diff command."
(let ((proc (start-process "Diff" buf shell-file-name
shell-command-switch command)))
(set-process-filter proc 'diff-process-filter)
- (lexical-let ((old-alt old-alt) (new-alt new-alt))
- (set-process-sentinel
- proc (lambda (proc msg)
- (with-current-buffer (process-buffer proc)
- (diff-sentinel (process-exit-status proc)
- old-alt new-alt))))))
+ (set-process-sentinel
+ proc (lambda (proc _msg)
+ (with-current-buffer (process-buffer proc)
+ (diff-sentinel (process-exit-status proc)
+ old-alt new-alt)))))
;; Async processes aren't available.
(let ((inhibit-read-only t))
(diff-sentinel
diff --git a/lisp/vc/ediff-init.el b/lisp/vc/ediff-init.el
index ad6d69ee924..674688df1c2 100644
--- a/lisp/vc/ediff-init.el
+++ b/lisp/vc/ediff-init.el
@@ -786,19 +786,12 @@ TYPE-OF-EMACS is either 'xemacs or 'emacs."
"")
-(if (ediff-window-display-p)
- (if (featurep 'xemacs)
- (progn
- (defalias 'ediff-display-pixel-width 'device-pixel-width)
- (defalias 'ediff-display-pixel-height 'device-pixel-height))
- (defalias 'ediff-display-pixel-width
- (if (fboundp 'display-pixel-width)
- 'display-pixel-width
- 'x-display-pixel-width))
- (defalias 'ediff-display-pixel-height
- (if (fboundp 'display-pixel-height)
- 'display-pixel-height
- 'x-display-pixel-height))))
+(if (featurep 'xemacs)
+ (progn
+ (defalias 'ediff-display-pixel-width 'device-pixel-width)
+ (defalias 'ediff-display-pixel-height 'device-pixel-height))
+ (defalias 'ediff-display-pixel-width 'display-pixel-width)
+ (defalias 'ediff-display-pixel-height 'display-pixel-height))
;; A-list of current-diff-overlay symbols associated with buf types
(defconst ediff-current-diff-overlay-alist
@@ -860,7 +853,11 @@ TYPE-OF-EMACS is either 'xemacs or 'emacs."
(defface ediff-current-diff-A
(if (featurep 'emacs)
- '((((class color) (min-colors 16))
+ '((((class color) (min-colors 88) (background light))
+ :background "#ffdddd")
+ (((class color) (min-colors 88) (background dark))
+ :background "#553333")
+ (((class color) (min-colors 16))
(:foreground "firebrick" :background "pale green"))
(((class color))
(:foreground "blue3" :background "yellow3"))
@@ -889,7 +886,11 @@ this variable represents.")
(defface ediff-current-diff-B
(if (featurep 'emacs)
- '((((class color) (min-colors 16))
+ '((((class color) (min-colors 88) (background light))
+ :background "#ddffdd")
+ (((class color) (min-colors 88) (background dark))
+ :background "#335533")
+ (((class color) (min-colors 16))
(:foreground "DarkOrchid" :background "Yellow"))
(((class color))
(:foreground "magenta3" :background "yellow3"
@@ -919,7 +920,11 @@ this variable represents.")
(defface ediff-current-diff-C
(if (featurep 'emacs)
- '((((class color) (min-colors 16))
+ '((((class color) (min-colors 88) (background light))
+ :background "#ffffaa")
+ (((class color) (min-colors 88) (background dark))
+ :background "#888833")
+ (((class color) (min-colors 16))
(:foreground "Navy" :background "Pink"))
(((class color))
(:foreground "cyan3" :background "yellow3" :weight bold))
@@ -975,7 +980,11 @@ this variable represents.")
(defface ediff-fine-diff-A
(if (featurep 'emacs)
- '((((class color) (min-colors 16))
+ '((((class color) (min-colors 88) (background light))
+ :background "#ffaaaa")
+ (((class color) (min-colors 88) (background dark))
+ :background "#aa2222")
+ (((class color) (min-colors 16))
(:foreground "Navy" :background "sky blue"))
(((class color))
(:foreground "white" :background "sky blue" :weight bold))
@@ -996,7 +1005,11 @@ this variable represents.")
(defface ediff-fine-diff-B
(if (featurep 'emacs)
- '((((class color) (min-colors 16))
+ '((((class color) (min-colors 88) (background light))
+ :background "#aaffaa")
+ (((class color) (min-colors 88) (background dark))
+ :background "#22aa22")
+ (((class color) (min-colors 16))
(:foreground "Black" :background "cyan"))
(((class color))
(:foreground "magenta3" :background "cyan3"))
@@ -1017,7 +1030,11 @@ this variable represents.")
(defface ediff-fine-diff-C
(if (featurep 'emacs)
- '((((type pc))
+ '((((class color) (min-colors 88) (background light))
+ :background "#ffff55")
+ (((class color) (min-colors 88) (background dark))
+ :background "#aaaa22")
+ (((type pc))
(:foreground "white" :background "Turquoise"))
(((class color) (min-colors 16))
(:foreground "Black" :background "Turquoise"))
diff --git a/lisp/vc/ediff-wind.el b/lisp/vc/ediff-wind.el
index 83098fcb0c7..50f2be3b8dc 100644
--- a/lisp/vc/ediff-wind.el
+++ b/lisp/vc/ediff-wind.el
@@ -67,16 +67,23 @@
'ediff-setup-windows-multiframe
'ediff-setup-windows-plain))
-(defcustom ediff-window-setup-function (ediff-choose-window-setup-function-automatically)
+(make-obsolete 'ediff-choose-window-setup-function-automatically
+ 'ediff-setup-windows-default "24.2")
+
+(defcustom ediff-window-setup-function 'ediff-setup-windows-default
"Function called to set up windows.
-Ediff provides a choice of two functions: `ediff-setup-windows-plain', for
-doing everything in one frame and `ediff-setup-windows-multiframe', which sets
-the control panel in a separate frame. By default, the appropriate function is
-chosen automatically depending on the current window system.
-However, `ediff-toggle-multiframe' can be used to toggle between the multiframe
-display and the single frame display.
-If the multiframe function detects that one of the buffers A/B is seen in some
-other frame, it will try to keep that buffer in that frame.
+Ediff provides a choice of three functions:
+ (1) `ediff-setup-windows-multiframe', which sets the control panel
+ in a separate frame.
+ (2) `ediff-setup-windows-plain', which does everything in one frame
+ (3) `ediff-setup-windows-default' (the default), which does (1)
+ on a graphical display and (2) on a text terminal.
+
+The command \\[ediff-toggle-multiframe] can be used to toggle
+between the multiframe display and the single frame display. If
+the multiframe function detects that one of the buffers A/B is
+seen in some other frame, it will try to keep that buffer in that
+frame.
If you don't like any of the two provided functions, write your own one.
The basic guidelines:
@@ -90,10 +97,12 @@ The basic guidelines:
Buffer C may not be used in jobs that compare only two buffers.
If you plan to do something fancy, take a close look at how the two
provided functions are written."
- :type '(choice (const :tag "Multi Frame" ediff-setup-windows-multiframe)
+ :type '(choice (const :tag "Choose Automatically" ediff-setup-windows-default)
+ (const :tag "Multi Frame" ediff-setup-windows-multiframe)
(const :tag "Single Frame" ediff-setup-windows-plain)
(function :tag "Other function"))
- :group 'ediff-window)
+ :group 'ediff-window
+ :version "24.2")
;; indicates if we are in a multiframe setup
(ediff-defvar-local ediff-multiframe nil "")
@@ -333,6 +342,12 @@ into icons, regardless of the window manager."
buffer-A buffer-B buffer-C control-buffer))
(run-hooks 'ediff-after-setup-windows-hook))
+(defun ediff-setup-windows-default (buffer-A buffer-B buffer-C control-buffer)
+ (funcall (if (display-graphic-p)
+ 'ediff-setup-windows-multiframe
+ 'ediff-setup-windows-plain)
+ buffer-A buffer-B buffer-C control-buffer))
+
;; Just set up 3 windows.
;; Usually used without windowing systems
;; With windowing, we want to use dedicated frames.
diff --git a/lisp/vc/ediff.el b/lisp/vc/ediff.el
index 4d6afa96d64..a1d778beebc 100644
--- a/lisp/vc/ediff.el
+++ b/lisp/vc/ediff.el
@@ -127,7 +127,7 @@
(require 'ediff-mult) ; required because of the registry stuff
(defgroup ediff nil
- "A comprehensive visual interface to diff & patch."
+ "Comprehensive visual interface to `diff' and `patch'."
:tag "Ediff"
:group 'tools)
diff --git a/lisp/vc/log-edit.el b/lisp/vc/log-edit.el
index db70f417393..5ecd5c44b2e 100644
--- a/lisp/vc/log-edit.el
+++ b/lisp/vc/log-edit.el
@@ -195,7 +195,10 @@ when this variable is set to nil.")
(defconst log-edit-maximum-comment-ring-size 32
"Maximum number of saved comments in the comment ring.")
+(define-obsolete-variable-alias 'vc-comment-ring 'log-edit-comment-ring "22.1")
(defvar log-edit-comment-ring (make-ring log-edit-maximum-comment-ring-size))
+(define-obsolete-variable-alias 'vc-comment-ring-index
+ 'log-edit-comment-ring-index "22.1")
(defvar log-edit-comment-ring-index nil)
(defvar log-edit-last-comment-match "")
@@ -301,8 +304,6 @@ automatically."
(insert "\n"))))
;; Compatibility with old names.
-(define-obsolete-variable-alias 'vc-comment-ring 'log-edit-comment-ring "22.1")
-(define-obsolete-variable-alias 'vc-comment-ring-index 'log-edit-comment-ring-index "22.1")
(define-obsolete-function-alias 'vc-previous-comment 'log-edit-previous-comment "22.1")
(define-obsolete-function-alias 'vc-next-comment 'log-edit-next-comment "22.1")
(define-obsolete-function-alias 'vc-comment-search-reverse 'log-edit-comment-search-backward "22.1")
@@ -349,7 +350,7 @@ automatically."
(defvar log-edit-font-lock-keywords
;; Copied/inspired by message-font-lock-keywords.
`((log-edit-match-to-eoh
- (,(concat "^\\(\\([a-z]+\\):\\)" log-edit-header-contents-regexp)
+ (,(concat "^\\(\\([[:alpha:]]+\\):\\)" log-edit-header-contents-regexp)
(progn (goto-char (match-beginning 0)) (match-end 0)) nil
(1 (if (assoc (match-string 2) log-edit-headers-alist)
'log-edit-header
@@ -360,6 +361,48 @@ automatically."
'log-edit-header)
nil lax)))))
+(defvar log-edit-font-lock-gnu-style nil
+ "If non-nil, highlight common failures to follow the GNU coding standards.")
+(put 'log-edit-font-lock-gnu-style 'safe-local-variable 'booleanp)
+
+(defconst log-edit-font-lock-gnu-keywords
+ ;; Use
+ ;; * foo.el (bla, bli)
+ ;; (blo, blu): Toto.
+ ;; Rather than
+ ;; * foo.el (bla, bli,
+ ;; blo, blu): Toto.
+ '(("^[ \t]*\\(?:\\* .*\\)?\\(([^\n)]*,\\s-*\\)$"
+ (1 '(face font-lock-warning-face
+ help-echo "Continue function lists with \")\\n(\".") t))
+ ;; Don't leave a lone word on a single line.
+ ;;("^\\s-*\\(\\S-*[^\n:)]\\)\\s-*$" (1 font-lock-warning-face t))
+ ;; Don't cut a sentence right after the first word (better to move
+ ;; the sentence on the next line, then).
+ ;;("[.:]\\s-+\\(\\sw+\\)\\s-*$" (1 font-lock-warning-face t))
+ ;; Change Log entries should use present tense.
+ ("):[ \t\n]*[[:alpha:]]+\\(ed\\)\\>"
+ (1 '(face font-lock-warning-face help-echo "Use present tense.") t))
+ ;; Change log entries start with a capital letter.
+ ("): [a-z]" (0 '(face font-lock-warning-face help-echo "Capitalize.") t))
+ ("[^[:upper:]]\\(\\. [[:upper:]]\\)"
+ (1 '(face font-lock-warning-face
+ help-echo "Use two spaces to end a sentence") t))
+ ("^("
+ (0 (let ((beg (max (point-min) (- (match-beginning 0) 2))))
+ (put-text-property beg (match-end 0) 'font-lock-multiline t)
+ (if (eq (char-syntax (char-after beg)) ?w)
+ '(face font-lock-warning-face
+ help-echo "Punctuate previous line.")))
+ t))
+ ))
+
+(defun log-edit-font-lock-keywords ()
+ (if log-edit-font-lock-gnu-style
+ (append log-edit-font-lock-keywords
+ log-edit-font-lock-gnu-keywords)
+ log-edit-font-lock-keywords))
+
;;;###autoload
(defun log-edit (callback &optional setup params buffer mode &rest _ignore)
"Setup a buffer to enter a log message.
@@ -416,7 +459,7 @@ commands (under C-x v for VC, for example).
\\{log-edit-mode-map}"
(set (make-local-variable 'font-lock-defaults)
- '(log-edit-font-lock-keywords t t))
+ '(log-edit-font-lock-keywords t))
(make-local-variable 'log-edit-comment-ring-index)
(hack-dir-local-variables-non-file-buffer))
diff --git a/lisp/vc/smerge-mode.el b/lisp/vc/smerge-mode.el
index d2881b40ad0..cf1cdabc80f 100644
--- a/lisp/vc/smerge-mode.el
+++ b/lisp/vc/smerge-mode.el
@@ -78,36 +78,36 @@ Used in `smerge-diff-base-mine' and related functions."
:type 'boolean)
(defface smerge-mine
- '((((min-colors 88) (background light))
- (:foreground "blue1"))
- (((background light))
- (:foreground "blue"))
- (((min-colors 88) (background dark))
- (:foreground "cyan1"))
- (((background dark))
- (:foreground "cyan")))
+ '((((class color) (min-colors 88) (background light))
+ :background "#ffdddd")
+ (((class color) (min-colors 88) (background dark))
+ :background "#553333")
+ (((class color))
+ :foreground "red"))
"Face for your code."
:group 'smerge)
(define-obsolete-face-alias 'smerge-mine-face 'smerge-mine "22.1")
(defvar smerge-mine-face 'smerge-mine)
(defface smerge-other
- '((((background light))
- (:foreground "darkgreen"))
- (((background dark))
- (:foreground "lightgreen")))
+ '((((class color) (min-colors 88) (background light))
+ :background "#ddffdd")
+ (((class color) (min-colors 88) (background dark))
+ :background "#335533")
+ (((class color))
+ :foreground "green"))
"Face for the other code."
:group 'smerge)
(define-obsolete-face-alias 'smerge-other-face 'smerge-other "22.1")
(defvar smerge-other-face 'smerge-other)
(defface smerge-base
- '((((min-colors 88) (background light))
- (:foreground "red1"))
- (((background light))
- (:foreground "red"))
- (((background dark))
- (:foreground "orange")))
+ '((((class color) (min-colors 88) (background light))
+ :background "#ffffaa")
+ (((class color) (min-colors 88) (background dark))
+ :background "#888833")
+ (((class color))
+ :foreground "yellow"))
"Face for the base code."
:group 'smerge)
(define-obsolete-face-alias 'smerge-base-face 'smerge-base "22.1")
@@ -124,10 +124,34 @@ Used in `smerge-diff-base-mine' and related functions."
(defvar smerge-markers-face 'smerge-markers)
(defface smerge-refined-change
- '((t :background "yellow"))
+ '((t nil))
"Face used for char-based changes shown by `smerge-refine'."
:group 'smerge)
+(defface smerge-refined-removed
+ '((default
+ :inherit smerge-refined-change)
+ (((class color) (min-colors 88) (background light))
+ :background "#ffaaaa")
+ (((class color) (min-colors 88) (background dark))
+ :background "#aa2222")
+ (t :inverse-video t))
+ "Face used for removed characters shown by `smerge-refine'."
+ :group 'smerge
+ :version "24.2")
+
+(defface smerge-refined-added
+ '((default
+ :inherit smerge-refined-change)
+ (((class color) (min-colors 88) (background light))
+ :background "#aaffaa")
+ (((class color) (min-colors 88) (background dark))
+ :background "#22aa22")
+ (t :inverse-video t))
+ "Face used for added characters shown by `smerge-refine'."
+ :group 'smerge
+ :version "24.2")
+
(easy-mmode-defmap smerge-basic-map
`(("n" . smerge-next)
("p" . smerge-prev)
@@ -342,12 +366,11 @@ Can be nil if the style is undecided, or else:
))))
(defvar smerge-resolve-function
- (lambda () (error "Don't know how to resolve"))
+ (lambda () (user-error "Don't know how to resolve"))
"Mode-specific merge function.
The function is called with zero or one argument (non-nil if the resolution
function should only apply safe heuristics) and with the match data set
according to `smerge-match-conflict'.")
-(add-to-list 'debug-ignored-errors "Don't know how to resolve")
(defvar smerge-text-properties
`(help-echo "merge conflict: mouse-3 shows a menu"
@@ -626,7 +649,7 @@ major modes. Uses `smerge-resolve-function' to do the actual work."
(set-match-data md)
(smerge-keep-n choice))
(t
- (error "Don't know how to resolve"))))
+ (user-error "Don't know how to resolve"))))
(if (buffer-name buf) (kill-buffer buf))
(if m (delete-file m))
(if b (delete-file b))
@@ -810,9 +833,7 @@ An error is raised if not inside a conflict."
(when base-start (1- base-start)) base-start
(1- other-start) other-start))
t)
- (search-failed (error "Point not in conflict region")))))
-
-(add-to-list 'debug-ignored-errors "Point not in conflict region")
+ (search-failed (user-error "Point not in conflict region")))))
(defun smerge-conflict-overlay (pos)
"Return the conflict overlay at POS if any."
@@ -983,9 +1004,17 @@ chars to try and eliminate some spurious differences."
(dolist (x props) (overlay-put ol (car x) (cdr x)))
ol)))))
-(defun smerge-refine-subst (beg1 end1 beg2 end2 props &optional preproc)
+(defun smerge-refine-subst (beg1 end1 beg2 end2 props-c &optional preproc props-r props-a)
"Show fine differences in the two regions BEG1..END1 and BEG2..END2.
-PROPS is an alist of properties to put (via overlays) on the changes.
+PROPS-C is an alist of properties to put (via overlays) on the changes.
+PROPS-R is an alist of properties to put on removed characters.
+PROPS-A is an alist of properties to put on added characters.
+If PROPS-R and PROPS-A are nil, put PROPS-C on all changes.
+If PROPS-C is nil, but PROPS-R and PROPS-A are non-nil,
+put PROPS-A on added characters, PROPS-R on removed characters.
+If PROPS-C, PROPS-R and PROPS-A are non-nil, put PROPS-C on changed characters,
+PROPS-A on added characters, and PROPS-R on removed characters.
+
If non-nil, PREPROC is called with no argument in a buffer that contains
a copy of a region, just before preparing it to for `diff'. It can be
used to replace chars to try and eliminate some spurious differences."
@@ -1029,10 +1058,18 @@ used to replace chars to try and eliminate some spurious differences."
(m5 (match-string 5)))
(when (memq op '(?d ?c))
(setq last1
- (smerge-refine-highlight-change buf beg1 m1 m2 props)))
+ (smerge-refine-highlight-change
+ buf beg1 m1 m2
+ ;; Try to use props-c only for changed chars,
+ ;; fallback to props-r for changed/removed chars,
+ ;; but if props-r is nil then fallback to props-c.
+ (or (and (eq op '?c) props-c) props-r props-c))))
(when (memq op '(?a ?c))
(setq last2
- (smerge-refine-highlight-change buf beg2 m4 m5 props))))
+ (smerge-refine-highlight-change
+ buf beg2 m4 m5
+ ;; Same logic as for removed chars above.
+ (or (and (eq op '?c) props-c) props-a props-c)))))
(forward-line 1) ;Skip hunk header.
(and (re-search-forward "^[0-9]" nil 'move) ;Skip hunk body.
(goto-char (match-beginning 0))))
@@ -1084,7 +1121,11 @@ repeating the command will highlight other two parts."
((eq (match-end 3) (match-beginning 3)) 3)
(t 2)))
(let ((n1 (if (eq part 1) 2 1))
- (n2 (if (eq part 3) 2 3)))
+ (n2 (if (eq part 3) 2 3))
+ (smerge-use-changed-face
+ (and (face-differs-from-default-p 'smerge-refined-change)
+ (not (face-equal 'smerge-refined-change 'smerge-refined-added))
+ (not (face-equal 'smerge-refined-change 'smerge-refined-removed)))))
(smerge-ensure-match n1)
(smerge-ensure-match n2)
(with-silent-modifications
@@ -1093,8 +1134,13 @@ repeating the command will highlight other two parts."
(cons (buffer-chars-modified-tick) part)))
(smerge-refine-subst (match-beginning n1) (match-end n1)
(match-beginning n2) (match-end n2)
- '((smerge . refine)
- (face . smerge-refined-change)))))
+ (if smerge-use-changed-face
+ '((smerge . refine) (face . smerge-refined-change)))
+ nil
+ (unless smerge-use-changed-face
+ '((smerge . refine) (face . smerge-refined-removed)))
+ (unless smerge-use-changed-face
+ '((smerge . refine) (face . smerge-refined-added))))))
(defun smerge-diff (n1 n2)
(smerge-match-conflict)
diff --git a/lisp/vc/vc-arch.el b/lisp/vc/vc-arch.el
index 052e6784b08..18dfbe1f5fa 100644
--- a/lisp/vc/vc-arch.el
+++ b/lisp/vc/vc-arch.el
@@ -1,4 +1,4 @@
-;;; vc-arch.el --- VC backend for the Arch version-control system
+;;; vc-arch.el --- VC backend for the Arch version-control system -*- lexical-binding: t -*-
;; Copyright (C) 2004-2012 Free Software Foundation, Inc.
@@ -59,7 +59,7 @@
;;; Properties of the backend
(defun vc-arch-revision-granularity () 'repository)
-(defun vc-arch-checkout-model (files) 'implicit)
+(defun vc-arch-checkout-model (_files) 'implicit)
;;;
;;; Customization options
@@ -227,7 +227,7 @@ Only the value `maybe' can be trusted :-(."
(vc-file-setprop
file 'arch-root root)))))
-(defun vc-arch-register (files &optional rev comment)
+(defun vc-arch-register (files &optional rev _comment)
(if rev (error "Explicit initial revision not supported for Arch"))
(dolist (file files)
(let ((tagmet (vc-arch-tagging-method file)))
@@ -258,7 +258,7 @@ Only the value `maybe' can be trusted :-(."
;; Strip the terminating newline.
(buffer-substring (point-min) (1- (point-max)))))))))
-(defun vc-arch-workfile-unchanged-p (file)
+(defun vc-arch-workfile-unchanged-p (_file)
"Stub: arch workfiles are always considered to be in a changed state,"
nil)
@@ -508,12 +508,11 @@ CALLBACK expects (ENTRIES &optional MORE-TO-COME); see
"*"))))))
(defun vc-arch-revision-completion-table (files)
- (lexical-let ((files files))
- (lambda (string pred action)
- ;; FIXME: complete revision patches as well.
- (let* ((root (expand-file-name "{arch}" (vc-arch-root (car files))))
- (table (vc-arch--version-completion-table root string)))
- (complete-with-action action table string pred)))))
+ (lambda (string pred action)
+ ;; FIXME: complete revision patches as well.
+ (let* ((root (expand-file-name "{arch}" (vc-arch-root (car files))))
+ (table (vc-arch--version-completion-table root string)))
+ (complete-with-action action table string pred))))
;;; Trimming revision libraries.
@@ -547,13 +546,12 @@ CALLBACK expects (ENTRIES &optional MORE-TO-COME); see
minrev))
(defun vc-arch-trim-make-sentinel (revs)
- (if (null revs) (lambda (proc msg) (message "VC-Arch trimming ... done"))
- (lexical-let ((revs revs))
- (lambda (proc msg)
- (message "VC-Arch trimming %s..." (file-name-nondirectory (car revs)))
- (rename-file (car revs) (concat (car revs) "*rm*"))
- (setq proc (start-process "vc-arch-trim" nil
- "rm" "-rf" (concat (car revs) "*rm*")))
+ (if (null revs) (lambda (_proc _msg) (message "VC-Arch trimming ... done"))
+ (lambda (_proc _msg)
+ (message "VC-Arch trimming %s..." (file-name-nondirectory (car revs)))
+ (rename-file (car revs) (concat (car revs) "*rm*"))
+ (let ((proc (start-process "vc-arch-trim" nil
+ "rm" "-rf" (concat (car revs) "*rm*"))))
(set-process-sentinel proc (vc-arch-trim-make-sentinel (cdr revs)))))))
(defun vc-arch-trim-one-revlib (dir)
@@ -572,7 +570,7 @@ CALLBACK expects (ENTRIES &optional MORE-TO-COME); see
'car-less-than-car))
(subdirs nil))
(when (cddr revs)
- (dotimes (i (/ (length revs) 2))
+ (dotimes (_i (/ (length revs) 2))
(let ((minrev (vc-arch-trim-find-least-useful-rev revs)))
(setq revs (delq minrev revs))
(push minrev subdirs)))
diff --git a/lisp/vc/vc-bzr.el b/lisp/vc/vc-bzr.el
index 505e40f46ba..b5488eb96a9 100644
--- a/lisp/vc/vc-bzr.el
+++ b/lisp/vc/vc-bzr.el
@@ -1,4 +1,4 @@
-;;; vc-bzr.el --- VC backend for the bzr revision control system
+;;; vc-bzr.el --- VC backend for the bzr revision control system -*- lexical-binding: t -*-
;; Copyright (C) 2006-2012 Free Software Foundation, Inc.
@@ -41,7 +41,7 @@
;;; Properties of the backend
(defun vc-bzr-revision-granularity () 'repository)
-(defun vc-bzr-checkout-model (files) 'implicit)
+(defun vc-bzr-checkout-model (_files) 'implicit)
;;; Code:
@@ -208,85 +208,88 @@ in the repository root directory of FILE."
;; + working ( = packed_stat )
;; parent = common ( as above ) + history ( = rev_id )
;; kinds = (r)elocated, (a)bsent, (d)irectory, (f)ile, (l)ink
- (lexical-let ((root (vc-bzr-root file)))
- (when root ; Short cut.
- (lexical-let ((dirstate (expand-file-name vc-bzr-admin-dirstate root)))
- (condition-case nil
- (with-temp-buffer
- (insert-file-contents dirstate)
- (goto-char (point-min))
- (if (not (looking-at "#bazaar dirstate flat format 3"))
- (vc-bzr-state file) ; Some other unknown format?
- (let* ((relfile (file-relative-name file root))
- (reldir (file-name-directory relfile)))
- (if (re-search-forward
- (concat "^\0"
- (if reldir (regexp-quote
- (directory-file-name reldir)))
- "\0"
- (regexp-quote (file-name-nondirectory relfile))
- "\0"
- "[^\0]*\0" ;id?
- "\\([^\0]*\\)\0" ;"a/f/d", a=removed?
- "\\([^\0]*\\)\0" ;sha1 (empty if conflicted)?
- "\\([^\0]*\\)\0" ;size?p
- ;; y/n. Whether or not the current copy
- ;; was executable the last time bzr checked?
- "[^\0]*\0"
- "[^\0]*\0" ;?
- ;; Parent information. Absent in a new repo.
- "\\(?:\\([^\0]*\\)\0" ;"a/f/d" a=added?
- "\\([^\0]*\\)\0" ;sha1 again?
- "\\([^\0]*\\)\0" ;size again?
- ;; y/n. Whether or not the repo thinks
- ;; the file should be executable?
- "\\([^\0]*\\)\0"
- "[^\0]*\0\\)?" ;last revid?
- ;; There are more fields when merges are pending.
- )
- nil t)
- ;; Apparently the second sha1 is the one we want: when
- ;; there's a conflict, the first sha1 is absent (and the
- ;; first size seems to correspond to the file with
- ;; conflict markers).
- (cond
- ((eq (char-after (match-beginning 1)) ?a) 'removed)
- ;; If there is no parent, this must be a new repo.
- ;; If file is in dirstate, can only be added (b#8025).
- ((or (not (match-beginning 4))
- (eq (char-after (match-beginning 4)) ?a)) 'added)
- ((or (and (eq (string-to-number (match-string 3))
- (nth 7 (file-attributes file)))
- (equal (match-string 5)
- (vc-bzr-sha1 file))
- ;; For a file, does the executable state match?
- ;; (Bug#7544)
- (or (not
- (eq (char-after (match-beginning 1)) ?f))
- (let ((exe
- (memq
- ?x
- (mapcar
- 'identity
- (nth 8 (file-attributes file))))))
- (if (eq (char-after (match-beginning 7))
- ?y)
- exe
- (not exe)))))
- (and
- ;; It looks like for lightweight
- ;; checkouts \2 is empty and we need to
- ;; look for size in \6.
- (eq (match-beginning 2) (match-end 2))
- (eq (string-to-number (match-string 6))
- (nth 7 (file-attributes file)))
- (equal (match-string 5)
- (vc-bzr-sha1 file))))
- 'up-to-date)
- (t 'edited))
- 'unregistered))))
- ;; The dirstate file can't be read, or some other problem.
- (error (vc-bzr-state file)))))))
+ (let* ((root (vc-bzr-root file))
+ (dirstate (expand-file-name vc-bzr-admin-dirstate root)))
+ (when root ; Short cut.
+ (condition-case err
+ (with-temp-buffer
+ (insert-file-contents dirstate)
+ (goto-char (point-min))
+ (if (not (looking-at "#bazaar dirstate flat format 3"))
+ (vc-bzr-state file) ; Some other unknown format?
+ (let* ((relfile (file-relative-name file root))
+ (reldir (file-name-directory relfile)))
+ (cond
+ ((not
+ (re-search-forward
+ (concat "^\0"
+ (if reldir (regexp-quote
+ (directory-file-name reldir)))
+ "\0"
+ (regexp-quote (file-name-nondirectory relfile))
+ "\0"
+ "[^\0]*\0" ;id?
+ "\\([^\0]*\\)\0" ;"a/f/d", a=removed?
+ "\\([^\0]*\\)\0" ;sha1 (empty if conflicted)?
+ "\\([^\0]*\\)\0" ;size?p
+ ;; y/n. Whether or not the current copy
+ ;; was executable the last time bzr checked?
+ "[^\0]*\0"
+ "[^\0]*\0" ;?
+ ;; Parent information. Absent in a new repo.
+ "\\(?:\\([^\0]*\\)\0" ;"a/f/d" a=added?
+ "\\([^\0]*\\)\0" ;sha1 again?
+ "\\([^\0]*\\)\0" ;size again?
+ ;; y/n. Whether or not the repo thinks
+ ;; the file should be executable?
+ "\\([^\0]*\\)\0"
+ "[^\0]*\0\\)?" ;last revid?
+ ;; There are more fields when merges are pending.
+ )
+ nil t))
+ 'unregistered)
+ ;; Apparently the second sha1 is the one we want: when
+ ;; there's a conflict, the first sha1 is absent (and the
+ ;; first size seems to correspond to the file with
+ ;; conflict markers).
+ ((eq (char-after (match-beginning 1)) ?a) 'removed)
+ ;; If there is no parent, this must be a new repo.
+ ;; If file is in dirstate, can only be added (b#8025).
+ ((or (not (match-beginning 4))
+ (eq (char-after (match-beginning 4)) ?a)) 'added)
+ ((or (and (eq (string-to-number (match-string 3))
+ (nth 7 (file-attributes file)))
+ (equal (match-string 5)
+ (save-match-data (vc-bzr-sha1 file)))
+ ;; For a file, does the executable state match?
+ ;; (Bug#7544)
+ (or (not
+ (eq (char-after (match-beginning 1)) ?f))
+ (let ((exe
+ (memq
+ ?x
+ (mapcar
+ 'identity
+ (nth 8 (file-attributes file))))))
+ (if (eq (char-after (match-beginning 7))
+ ?y)
+ exe
+ (not exe)))))
+ (and
+ ;; It looks like for lightweight
+ ;; checkouts \2 is empty and we need to
+ ;; look for size in \6.
+ (eq (match-beginning 2) (match-end 2))
+ (eq (string-to-number (match-string 6))
+ (nth 7 (file-attributes file)))
+ (equal (match-string 5)
+ (vc-bzr-sha1 file))))
+ 'up-to-date)
+ (t 'edited)))))
+ ;; The dirstate file can't be read, or some other problem.
+ (error
+ (message "Falling back on \"slow\" status detection (%S)" err)
+ (vc-bzr-state file))))))
(defun vc-bzr-registered (file)
@@ -303,9 +306,8 @@ in the repository root directory of FILE."
(defun vc-bzr-file-name-relative (filename)
"Return file name FILENAME stripped of the initial Bzr repository path."
- (lexical-let*
- ((filename* (expand-file-name filename))
- (rootdir (vc-bzr-root filename*)))
+ (let* ((filename* (expand-file-name filename))
+ (rootdir (vc-bzr-root filename*)))
(when rootdir
(file-relative-name filename* rootdir))))
@@ -412,9 +414,8 @@ in the branch repository (or whose status not be determined)."
(with-temp-buffer
;; This is with-demoted-errors without the condition-case-unless-debug
;; annoyance, which makes it fail during ert testing.
- (let (err)
- (condition-case err (vc-bzr-command "status" t 0 file)
- (error (message "Error: %S" err) nil)))
+ (condition-case err (vc-bzr-command "status" t 0 file)
+ (error (message "Error: %S" err) nil))
(let ((status 'unchanged))
;; the only secure status indication in `bzr status' output
;; is a couple of lines following the pattern::
@@ -433,7 +434,7 @@ in the branch repository (or whose status not be determined)."
(if (file-directory-p file) "/?" "\\*?")
"[ \t\n]*$")
nil t)
- (lexical-let ((statusword (match-string 1)))
+ (let ((statusword (match-string 1)))
;; Erase the status text that matched.
(delete-region (match-beginning 0) (match-end 0))
(setq status
@@ -452,7 +453,7 @@ in the branch repository (or whose status not be determined)."
(unless (eobp) (buffer-substring (point) (point-max))))))))
(defun vc-bzr-state (file)
- (lexical-let ((result (vc-bzr-status file)))
+ (let ((result (vc-bzr-status file)))
(when (consp result)
(let ((warnings (cdr result)))
(when warnings
@@ -504,16 +505,15 @@ in the branch repository (or whose status not be determined)."
(defun vc-bzr-working-revision (file)
;; Together with the code in vc-state-heuristic, this makes it possible
;; to get the initial VC state of a Bzr file even if Bzr is not installed.
- (lexical-let*
- ((rootdir (vc-bzr-root file))
- (branch-format-file (expand-file-name vc-bzr-admin-branch-format-file
- rootdir))
- (revhistory-file (expand-file-name vc-bzr-admin-revhistory rootdir))
- (lastrev-file (expand-file-name vc-bzr-admin-lastrev rootdir)))
+ (let* ((rootdir (vc-bzr-root file))
+ (branch-format-file (expand-file-name vc-bzr-admin-branch-format-file
+ rootdir))
+ (revhistory-file (expand-file-name vc-bzr-admin-revhistory rootdir))
+ (lastrev-file (expand-file-name vc-bzr-admin-lastrev rootdir)))
;; This looks at internal files to avoid forking a bzr process.
;; May break if they change their format.
(if (and (file-exists-p branch-format-file)
- ;; For lightweight checkouts (obtained with bzr checkout --lightweight)
+ ;; For lightweight checkouts (obtained with bzr co --lightweight)
;; the branch-format-file does not contain the revision
;; information, we need to look up the branch-format-file
;; in the place where the lightweight checkout comes
@@ -532,17 +532,21 @@ in the branch repository (or whose status not be determined)."
(when (re-search-forward "file://\\(.+\\)" nil t)
(let ((l-c-parent-dir (match-string 1)))
(when (and (memq system-type '(ms-dos windows-nt))
- (string-match-p "^/[[:alpha:]]:" l-c-parent-dir))
- ;;; The non-Windows code takes a shortcut by using the host/path
- ;;; separator slash as the start of the absolute path. That
- ;;; does not work on Windows, so we must remove it (bug#5345)
+ (string-match-p "^/[[:alpha:]]:"
+ l-c-parent-dir))
+ ;;; The non-Windows code takes a shortcut by using
+ ;;; the host/path separator slash as the start of
+ ;;; the absolute path. That does not work on
+ ;;; Windows, so we must remove it (bug#5345)
(setq l-c-parent-dir (substring l-c-parent-dir 1)))
(setq branch-format-file
(expand-file-name vc-bzr-admin-branch-format-file
l-c-parent-dir))
(setq lastrev-file
- (expand-file-name vc-bzr-admin-lastrev l-c-parent-dir))
- ;; FIXME: maybe it's overkill to check if both these files exist.
+ (expand-file-name vc-bzr-admin-lastrev
+ l-c-parent-dir))
+ ;; FIXME: maybe it's overkill to check if both these
+ ;; files exist.
(and (file-exists-p branch-format-file)
(file-exists-p lastrev-file)))))
t)))
@@ -564,11 +568,10 @@ in the branch repository (or whose status not be determined)."
(when (re-search-forward "[0-9]+" nil t)
(buffer-substring (match-beginning 0) (match-end 0))))))
;; fallback to calling "bzr revno"
- (lexical-let*
- ((result (vc-bzr-command-discarding-stderr
- vc-bzr-program "revno" (file-relative-name file)))
- (exitcode (car result))
- (output (cdr result)))
+ (let* ((result (vc-bzr-command-discarding-stderr
+ vc-bzr-program "revno" (file-relative-name file)))
+ (exitcode (car result))
+ (output (cdr result)))
(cond
((eq exitcode 0) (substring output 0 -1))
(t nil))))))
@@ -577,21 +580,21 @@ in the branch repository (or whose status not be determined)."
"Create a new Bzr repository."
(vc-bzr-command "init" nil 0 nil))
-(defun vc-bzr-init-revision (&optional file)
+(defun vc-bzr-init-revision (&optional _file)
"Always return nil, as Bzr cannot register explicit versions."
nil)
-(defun vc-bzr-previous-revision (file rev)
+(defun vc-bzr-previous-revision (_file rev)
(if (string-match "\\`[0-9]+\\'" rev)
(number-to-string (1- (string-to-number rev)))
(concat "before:" rev)))
-(defun vc-bzr-next-revision (file rev)
+(defun vc-bzr-next-revision (_file rev)
(if (string-match "\\`[0-9]+\\'" rev)
(number-to-string (1+ (string-to-number rev)))
(error "Don't know how to compute the next revision of %s" rev)))
-(defun vc-bzr-register (files &optional rev comment)
+(defun vc-bzr-register (files &optional rev _comment)
"Register FILES under bzr.
Signal an error unless REV is nil.
COMMENT is ignored."
@@ -640,7 +643,7 @@ REV non-nil gets an error."
(vc-bzr-command "cat" t 0 file "-r" rev)
(vc-bzr-command "cat" t 0 file))))
-(defun vc-bzr-checkout (file &optional editable rev)
+(defun vc-bzr-checkout (_file &optional _editable rev)
(if rev (error "Operation not supported")
;; Else, there's nothing to do.
nil))
@@ -791,7 +794,7 @@ Each line is tagged with the revision number, which has a `help-echo'
property containing author and date information."
(apply #'vc-bzr-command "annotate" buffer 'async file "--long" "--all"
(if revision (list "-r" revision)))
- (lexical-let ((table (make-hash-table :test 'equal)))
+ (let ((table (make-hash-table :test 'equal)))
(set-process-filter
(get-buffer-process buffer)
(lambda (proc string)
@@ -956,7 +959,7 @@ stream. Standard error output is discarded."
;; frob the results accordingly.
(file-relative-name ,dir (vc-bzr-root ,dir)))))
-(defun vc-bzr-dir-status-files (dir files default-state update-function)
+(defun vc-bzr-dir-status-files (dir files _default-state update-function)
"Return a list of conses (file . state) for DIR."
(apply 'vc-bzr-command "status" (current-buffer) 'async dir "-v" "-S" files)
(vc-exec-after
@@ -1193,74 +1196,73 @@ stream. Standard error output is discarded."
"revno" "submit" "tag")))
(defun vc-bzr-revision-completion-table (files)
- (lexical-let ((files files))
- ;; What about using `files'?!? --Stef
- (lambda (string pred action)
- (cond
- ((string-match "\\`\\(ancestor\\|branch\\|\\(revno:\\)?[-0-9]+:\\):"
- string)
- (completion-table-with-context (substring string 0 (match-end 0))
- (apply-partially
- 'completion-table-with-predicate
- 'completion-file-name-table
- 'file-directory-p t)
- (substring string (match-end 0))
- pred
- action))
- ((string-match "\\`\\(before\\):" string)
- (completion-table-with-context (substring string 0 (match-end 0))
- (vc-bzr-revision-completion-table files)
- (substring string (match-end 0))
- pred
- action))
- ((string-match "\\`\\(tag\\):" string)
- (let ((prefix (substring string 0 (match-end 0)))
- (tag (substring string (match-end 0)))
- (table nil)
- process-file-side-effects)
- (with-temp-buffer
- ;; "bzr-1.2 tags" is much faster with --show-ids.
- (process-file vc-bzr-program nil '(t) nil "tags" "--show-ids")
- ;; The output is ambiguous, unless we assume that revids do not
- ;; contain spaces.
- (goto-char (point-min))
- (while (re-search-forward "^\\(.*[^ \n]\\) +[^ \n]*$" nil t)
- (push (match-string-no-properties 1) table)))
- (completion-table-with-context prefix table tag pred action)))
-
- ((string-match "\\`annotate:" string)
- (completion-table-with-context
- (substring string 0 (match-end 0))
- (apply-partially #'completion-table-with-terminator '(":" . "\\`a\\`")
- #'completion-file-name-table)
- (substring string (match-end 0)) pred action))
-
- ((string-match "\\`date:" string)
- (completion-table-with-context
- (substring string 0 (match-end 0))
- '("yesterday" "today" "tomorrow")
- (substring string (match-end 0)) pred action))
-
- ((string-match "\\`\\([a-z]+\\):" string)
- ;; no actual completion for the remaining keywords.
- (completion-table-with-context (substring string 0 (match-end 0))
- (if (member (match-string 1 string)
- vc-bzr-revision-keywords)
- ;; If it's a valid keyword,
- ;; use a non-empty table to
- ;; indicate it.
- '("") nil)
- (substring string (match-end 0))
- pred
- action))
- (t
- ;; Could use completion-table-with-terminator, except that it
- ;; currently doesn't work right w.r.t pcm and doesn't give
- ;; the *Completions* output we want.
- (complete-with-action action (eval-when-compile
- (mapcar (lambda (s) (concat s ":"))
- vc-bzr-revision-keywords))
- string pred))))))
+ ;; What about using `files'?!? --Stef
+ (lambda (string pred action)
+ (cond
+ ((string-match "\\`\\(ancestor\\|branch\\|\\(revno:\\)?[-0-9]+:\\):"
+ string)
+ (completion-table-with-context (substring string 0 (match-end 0))
+ (apply-partially
+ 'completion-table-with-predicate
+ 'completion-file-name-table
+ 'file-directory-p t)
+ (substring string (match-end 0))
+ pred
+ action))
+ ((string-match "\\`\\(before\\):" string)
+ (completion-table-with-context (substring string 0 (match-end 0))
+ (vc-bzr-revision-completion-table files)
+ (substring string (match-end 0))
+ pred
+ action))
+ ((string-match "\\`\\(tag\\):" string)
+ (let ((prefix (substring string 0 (match-end 0)))
+ (tag (substring string (match-end 0)))
+ (table nil)
+ process-file-side-effects)
+ (with-temp-buffer
+ ;; "bzr-1.2 tags" is much faster with --show-ids.
+ (process-file vc-bzr-program nil '(t) nil "tags" "--show-ids")
+ ;; The output is ambiguous, unless we assume that revids do not
+ ;; contain spaces.
+ (goto-char (point-min))
+ (while (re-search-forward "^\\(.*[^ \n]\\) +[^ \n]*$" nil t)
+ (push (match-string-no-properties 1) table)))
+ (completion-table-with-context prefix table tag pred action)))
+
+ ((string-match "\\`annotate:" string)
+ (completion-table-with-context
+ (substring string 0 (match-end 0))
+ (apply-partially #'completion-table-with-terminator '(":" . "\\`a\\`")
+ #'completion-file-name-table)
+ (substring string (match-end 0)) pred action))
+
+ ((string-match "\\`date:" string)
+ (completion-table-with-context
+ (substring string 0 (match-end 0))
+ '("yesterday" "today" "tomorrow")
+ (substring string (match-end 0)) pred action))
+
+ ((string-match "\\`\\([a-z]+\\):" string)
+ ;; no actual completion for the remaining keywords.
+ (completion-table-with-context (substring string 0 (match-end 0))
+ (if (member (match-string 1 string)
+ vc-bzr-revision-keywords)
+ ;; If it's a valid keyword,
+ ;; use a non-empty table to
+ ;; indicate it.
+ '("") nil)
+ (substring string (match-end 0))
+ pred
+ action))
+ (t
+ ;; Could use completion-table-with-terminator, except that it
+ ;; currently doesn't work right w.r.t pcm and doesn't give
+ ;; the *Completions* output we want.
+ (complete-with-action action (eval-when-compile
+ (mapcar (lambda (s) (concat s ":"))
+ vc-bzr-revision-keywords))
+ string pred)))))
(provide 'vc-bzr)
diff --git a/lisp/vc/vc-cvs.el b/lisp/vc/vc-cvs.el
index 2d8d132a249..4d06e766a35 100644
--- a/lisp/vc/vc-cvs.el
+++ b/lisp/vc/vc-cvs.el
@@ -1,4 +1,4 @@
-;;; vc-cvs.el --- non-resident support for CVS version-control
+;;; vc-cvs.el --- non-resident support for CVS version-control -*- lexical-binding: t -*-
;; Copyright (C) 1995, 1998-2012 Free Software Foundation, Inc.
@@ -280,7 +280,7 @@ committed and support display of sticky tags."
;;; State-changing functions
;;;
-(defun vc-cvs-register (files &optional rev comment)
+(defun vc-cvs-register (files &optional _rev comment)
"Register FILES into the CVS version-control system.
COMMENT can be used to provide an initial description of FILES.
Passes either `vc-cvs-register-switches' or `vc-register-switches'
@@ -502,7 +502,7 @@ Will fail unless you have administrative privileges on the repo."
(declare-function vc-rcs-print-log-cleanup "vc-rcs" ())
-(defun vc-cvs-print-log (files buffer &optional shortlog start-revision-ignored limit)
+(defun vc-cvs-print-log (files buffer &optional _shortlog _start-revision limit)
"Get change logs associated with FILES."
(require 'vc-rcs)
;; It's just the catenation of the individual logs.
@@ -1006,7 +1006,7 @@ state."
(vc-exec-after
`(vc-cvs-after-dir-status (quote ,update-function))))))
-(defun vc-cvs-dir-status-files (dir files default-state update-function)
+(defun vc-cvs-dir-status-files (dir files _default-state update-function)
"Create a list of conses (file . state) for DIR."
(apply 'vc-cvs-command (current-buffer) 'async dir "-f" "status" files)
(vc-exec-after
@@ -1021,7 +1021,7 @@ state."
(buffer-substring (point) (point-max)))
(file-error nil)))
-(defun vc-cvs-dir-extra-headers (dir)
+(defun vc-cvs-dir-extra-headers (_dir)
"Extract and represent per-directory properties of a CVS working copy."
(let ((repo
(condition-case nil
@@ -1206,10 +1206,8 @@ is non-nil."
res)))
(defun vc-cvs-revision-completion-table (files)
- (lexical-let ((files files)
- table)
- (setq table (lazy-completion-table
- table (lambda () (vc-cvs-revision-table (car files)))))
+ (letrec ((table (lazy-completion-table
+ table (lambda () (vc-cvs-revision-table (car files))))))
table))
diff --git a/lisp/vc/vc-dir.el b/lisp/vc/vc-dir.el
index 4c32eea2f72..acb1a4d8862 100644
--- a/lisp/vc/vc-dir.el
+++ b/lisp/vc/vc-dir.el
@@ -1,4 +1,4 @@
-;;; vc-dir.el --- Directory status display under VC
+;;; vc-dir.el --- Directory status display under VC -*- lexical-binding: t -*-
;; Copyright (C) 2007-2012 Free Software Foundation, Inc.
@@ -529,7 +529,7 @@ If a prefix argument is given, move by that many lines."
(defun vc-dir-mark-unmark (mark-unmark-function)
(if (use-region-p)
- (let ((firstl (line-number-at-pos (region-beginning)))
+ (let (;; (firstl (line-number-at-pos (region-beginning)))
(lastl (line-number-at-pos (region-end))))
(save-excursion
(goto-char (region-beginning))
@@ -546,7 +546,7 @@ If a prefix argument is given, move by that many lines."
;; 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))
+ ;; (arglen (length argdir))
(crt arg)
(found nil))
;; Go through the predecessors, checking if any directory that is
@@ -814,7 +814,7 @@ child files."
;; FIXME: use vc-dir-child-files-and-states here instead of duplicating it.
(if (vc-dir-fileinfo->directory crt-data)
(let* ((dir (vc-dir-fileinfo->directory crt-data))
- (dirlen (length dir))
+ ;; (dirlen (length dir))
data)
(while
(and (setq crt (ewoc-next vc-ewoc crt))
@@ -842,7 +842,7 @@ If it is a file, return the corresponding cons for the file itself."
result)
(if (vc-dir-fileinfo->directory crt-data)
(let* ((dir (vc-dir-fileinfo->directory crt-data))
- (dirlen (length dir))
+ ;; (dirlen (length dir))
data)
(while
(and (setq crt (ewoc-next vc-ewoc crt))
@@ -861,7 +861,7 @@ If it is a file, return the corresponding cons for the file itself."
(defun vc-dir-recompute-file-state (fname def-dir)
(let* ((file-short (file-relative-name fname def-dir))
- (remove-me-when-CVS-works
+ (_remove-me-when-CVS-works
(when (eq vc-dir-backend 'CVS)
;; FIXME: Warning: UGLY HACK. The CVS backend caches the state
;; info, this forces the backend to update it.
@@ -875,15 +875,14 @@ If it is a file, return the corresponding cons for the file itself."
;; Give a DIRNAME string return the list of all child files shown in
;; the current *vc-dir* buffer.
(let ((crt (ewoc-nth vc-ewoc 0))
- children
- dname)
+ children)
;; Find DIR
(while (and crt (not (string-prefix-p
dirname (vc-dir-node-directory crt))))
(setq crt (ewoc-next vc-ewoc crt)))
(while (and crt (string-prefix-p
dirname
- (setq dname (vc-dir-node-directory crt))))
+ (vc-dir-node-directory crt)))
(let ((data (ewoc-data crt)))
(unless (vc-dir-fileinfo->directory data)
(push (expand-file-name (vc-dir-fileinfo->name data)) children)))
@@ -1014,7 +1013,7 @@ specific headers."
(unless (buffer-live-p vc-dir-process-buffer)
(setq vc-dir-process-buffer
(generate-new-buffer (format " *VC-%s* tmp status" backend))))
- (lexical-let ((buffer (current-buffer)))
+ (let ((buffer (current-buffer)))
(with-current-buffer vc-dir-process-buffer
(setq default-directory def-dir)
(erase-buffer)
@@ -1045,7 +1044,7 @@ specific headers."
(not (vc-dir-fileinfo->needs-update info))))))))))))
-(defun vc-dir-revert-buffer-function (&optional ignore-auto noconfirm)
+(defun vc-dir-revert-buffer-function (&optional _ignore-auto _noconfirm)
(vc-dir-refresh))
(defun vc-dir-refresh ()
@@ -1079,7 +1078,7 @@ Throw an error if another update process is in progress."
;; Bzr has serious locking problems, so setup the headers first (this is
;; synchronous) rather than doing it while dir-status is running.
(ewoc-set-hf vc-ewoc (vc-dir-headers backend def-dir) "")
- (lexical-let ((buffer (current-buffer)))
+ (let ((buffer (current-buffer)))
(with-current-buffer vc-dir-process-buffer
(setq default-directory def-dir)
(erase-buffer)
@@ -1219,7 +1218,7 @@ These are the commands available for use in the file status buffer:
(let ((use-vc-backend backend))
(vc-dir-mode))))
-(defun vc-default-dir-extra-headers (backend dir)
+(defun vc-default-dir-extra-headers (_backend _dir)
;; Be loud by default to remind people to add code to display
;; backend specific headers.
;; XXX: change this to return nil before the release.
@@ -1234,7 +1233,7 @@ These are the commands available for use in the file status buffer:
map)
"Local keymap for visiting a file.")
-(defun vc-default-dir-printer (backend fileentry)
+(defun vc-default-dir-printer (_backend fileentry)
"Pretty print FILEENTRY."
;; If you change the layout here, change vc-dir-move-to-goal-column.
;; VC backends can implement backend specific versions of this
@@ -1267,10 +1266,10 @@ These are the commands available for use in the file status buffer:
'mouse-face 'highlight
'keymap vc-dir-filename-mouse-map))))
-(defun vc-default-extra-status-menu (backend)
+(defun vc-default-extra-status-menu (_backend)
nil)
-(defun vc-default-status-fileinfo-extra (backend file)
+(defun vc-default-status-fileinfo-extra (_backend _file)
"Default absence of extra information returned for a file."
nil)
diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el
index b71dc95dba2..ebaec2494ac 100644
--- a/lisp/vc/vc-git.el
+++ b/lisp/vc/vc-git.el
@@ -1,4 +1,4 @@
-;;; vc-git.el --- VC backend for the git version control system
+;;; vc-git.el --- VC backend for the git version control system -*- lexical-binding: t -*-
;; Copyright (C) 2006-2012 Free Software Foundation, Inc.
@@ -160,7 +160,7 @@ matching the resulting Git log output, and KEYWORDS is a list of
;;; BACKEND PROPERTIES
(defun vc-git-revision-granularity () 'repository)
-(defun vc-git-checkout-model (files) 'implicit)
+(defun vc-git-checkout-model (_files) 'implicit)
;;; STATE-QUERYING FUNCTIONS
@@ -220,7 +220,7 @@ matching the resulting Git log output, and KEYWORDS is a list of
(let ((diff (vc-git--run-command-string
file "diff-index" "-p" "--raw" "-z" "HEAD" "--")))
(if (and diff
- (string-match ":[0-7]\\{6\\} [0-7]\\{6\\} [0-9a-f]\\{40\\} [0-9a-f]\\{40\\} \\([ADMUT]\\)\0[^\0]+\0\\(.\\)?"
+ (string-match ":[0-7]\\{6\\} [0-7]\\{6\\} [0-9a-f]\\{40\\} [0-9a-f]\\{40\\} \\([ADMUT]\\)\0[^\0]+\0\\(.*\n.\\)?"
diff))
(let ((diff-letter (match-string 1 diff)))
(if (not (match-beginning 2))
@@ -233,7 +233,7 @@ matching the resulting Git log output, and KEYWORDS is a list of
(vc-git--state-code diff-letter)))
(if (vc-git--empty-db-p) 'added 'up-to-date)))))
-(defun vc-git-working-revision (file)
+(defun vc-git-working-revision (_file)
"Git-specific version of `vc-working-revision'."
(let* (process-file-side-effects
(str (with-output-to-string
@@ -471,14 +471,14 @@ or an empty string if none."
(vc-exec-after
`(vc-git-after-dir-status-stage ',stage ',files ',update-function)))
-(defun vc-git-dir-status (dir update-function)
+(defun vc-git-dir-status (_dir update-function)
"Return a list of (FILE STATE EXTRA) entries for DIR."
;; Further things that would have to be fixed later:
;; - how to handle unregistered directories
;; - how to support vc-dir on a subdir of the project tree
(vc-git-dir-status-goto-stage 'update-index nil update-function))
-(defun vc-git-dir-status-files (dir files default-state update-function)
+(defun vc-git-dir-status-files (_dir files _default-state update-function)
"Return a list of (FILE STATE EXTRA) entries for FILES in DIR."
(vc-git-dir-status-goto-stage 'update-index files update-function))
@@ -512,7 +512,7 @@ or an empty string if none."
:help "Show the contents of the current stash"))
map))
-(defun vc-git-dir-extra-headers (dir)
+(defun vc-git-dir-extra-headers (_dir)
(let ((str (with-output-to-string
(with-current-buffer standard-output
(vc-git--out-ok "symbolic-ref" "HEAD"))))
@@ -590,7 +590,7 @@ The car of the list is the current branch."
"Create a new Git repository."
(vc-git-command nil 0 nil "init"))
-(defun vc-git-register (files &optional rev comment)
+(defun vc-git-register (files &optional _rev _comment)
"Register FILES into the git version-control system."
(let (flist dlist)
(dolist (crt files)
@@ -609,7 +609,7 @@ The car of the list is the current branch."
(declare-function log-edit-extract-headers "log-edit" (headers string))
-(defun vc-git-checkin (files rev comment)
+(defun vc-git-checkin (files _rev comment)
(let ((coding-system-for-write vc-git-commits-coding-system))
(apply 'vc-git-command nil 0 files
(nconc (list "commit" "-m")
@@ -635,7 +635,7 @@ The car of the list is the current branch."
nil
"cat-file" "blob" (concat (if rev rev "HEAD") ":" fullname))))
-(defun vc-git-checkout (file &optional editable rev)
+(defun vc-git-checkout (file &optional _editable rev)
(vc-git-command nil 0 file "checkout" (or rev "HEAD")))
(defun vc-git-revert (file &optional contents-done)
@@ -821,7 +821,7 @@ or BRANCH^ (where \"^\" can be repeated)."
(append (vc-switches 'git 'diff)
(list "-p" (or rev1 "HEAD") rev2 "--")))))
-(defun vc-git-revision-table (files)
+(defun vc-git-revision-table (_files)
;; What about `files'?!? --Stef
(let (process-file-side-effects
(table (list "HEAD")))
@@ -834,10 +834,8 @@ or BRANCH^ (where \"^\" can be repeated)."
table))
(defun vc-git-revision-completion-table (files)
- (lexical-let ((files files)
- table)
- (setq table (lazy-completion-table
- table (lambda () (vc-git-revision-table files))))
+ (letrec ((table (lazy-completion-table
+ table (lambda () (vc-git-revision-table files)))))
table))
(defun vc-git-annotate-command (file buf &optional rev)
@@ -876,7 +874,7 @@ or BRANCH^ (where \"^\" can be repeated)."
(vc-git-command nil 0 nil "checkout" "-b" name)
(vc-git-command nil 0 nil "tag" name)))))
-(defun vc-git-retrieve-tag (dir name update)
+(defun vc-git-retrieve-tag (dir name _update)
(let ((default-directory dir))
(vc-git-command nil 0 nil "checkout" name)
;; FIXME: update buffers if `update' is true
diff --git a/lisp/vc/vc-hg.el b/lisp/vc/vc-hg.el
index a2728268816..e3af8a353ef 100644
--- a/lisp/vc/vc-hg.el
+++ b/lisp/vc/vc-hg.el
@@ -1,4 +1,4 @@
-;;; vc-hg.el --- VC backend for the mercurial version control system
+;;; vc-hg.el --- VC backend for the mercurial version control system -*- lexical-binding: t -*-
;; Copyright (C) 2006-2012 Free Software Foundation, Inc.
@@ -168,7 +168,7 @@ highlighting the Log View buffer."
(defvar vc-hg-history nil)
(defun vc-hg-revision-granularity () 'repository)
-(defun vc-hg-checkout-model (files) 'implicit)
+(defun vc-hg-checkout-model (_files) 'implicit)
;;; State querying functions
@@ -338,10 +338,8 @@ highlighting the Log View buffer."
;; Modeled after the similar function in vc-cvs.el
(defun vc-hg-revision-completion-table (files)
- (lexical-let ((files files)
- table)
- (setq table (lazy-completion-table
- table (lambda () (vc-hg-revision-table files))))
+ (letrec ((table (lazy-completion-table
+ table (lambda () (vc-hg-revision-table files)))))
table))
(defun vc-hg-annotate-command (file buffer &optional revision)
@@ -377,12 +375,12 @@ Optional arg REVISION is a revision to annotate from."
(expand-file-name (match-string-no-properties 4)
(vc-hg-root default-directory)))))))
-(defun vc-hg-previous-revision (file rev)
+(defun vc-hg-previous-revision (_file rev)
(let ((newrev (1- (string-to-number rev))))
(when (>= newrev 0)
(number-to-string newrev))))
-(defun vc-hg-next-revision (file rev)
+(defun vc-hg-next-revision (_file rev)
(let ((newrev (1+ (string-to-number rev)))
(tip-revision
(with-temp-buffer
@@ -408,7 +406,7 @@ Optional arg REVISION is a revision to annotate from."
"Rename file from OLD to NEW using `hg mv'."
(vc-hg-command nil 0 new "mv" old))
-(defun vc-hg-register (files &optional rev comment)
+(defun vc-hg-register (files &optional _rev _comment)
"Register FILES under hg.
REV is ignored.
COMMENT is ignored."
@@ -438,7 +436,7 @@ COMMENT is ignored."
(declare-function log-edit-extract-headers "log-edit" (headers string))
-(defun vc-hg-checkin (files rev comment)
+(defun vc-hg-checkin (files _rev comment)
"Hg-specific version of `vc-backend-checkin'.
REV is ignored."
(apply 'vc-hg-command nil 0 files
@@ -455,7 +453,7 @@ REV is ignored."
(vc-hg-command buffer 0 file "cat"))))
;; Modeled after the similar function in vc-bzr.el
-(defun vc-hg-checkout (file &optional editable rev)
+(defun vc-hg-checkout (file &optional _editable rev)
"Retrieve a revision of FILE.
EDITABLE is ignored.
REV is the revision to check out into WORKFILE."
@@ -511,8 +509,7 @@ REV is the revision to check out into WORKFILE."
'face 'font-lock-comment-face)))))
(defun vc-hg-after-dir-status (update-function)
- (let ((status-char nil)
- (file nil)
+ (let ((file nil)
(translation '((?= . up-to-date)
(?C . up-to-date)
(?A . added)
@@ -567,7 +564,7 @@ REV is the revision to check out into WORKFILE."
(vc-exec-after
`(vc-hg-after-dir-status (quote ,update-function))))
-(defun vc-hg-dir-status-files (dir files default-state update-function)
+(defun vc-hg-dir-status-files (dir files _default-state update-function)
(apply 'vc-hg-command (current-buffer) 'async dir "status" "-C" files)
(vc-exec-after
`(vc-hg-after-dir-status (quote ,update-function))))
diff --git a/lisp/vc/vc-mtn.el b/lisp/vc/vc-mtn.el
index 122743c3747..bd3a6207b73 100644
--- a/lisp/vc/vc-mtn.el
+++ b/lisp/vc/vc-mtn.el
@@ -1,4 +1,4 @@
-;;; vc-mtn.el --- VC backend for Monotone
+;;; vc-mtn.el --- VC backend for Monotone -*- lexical-binding: t -*-
;; Copyright (C) 2007-2012 Free Software Foundation, Inc.
@@ -76,7 +76,7 @@ If nil, use the value of `vc-diff-switches'. If t, use no switches."
;;;###autoload (vc-mtn-registered file))))
(defun vc-mtn-revision-granularity () 'repository)
-(defun vc-mtn-checkout-model (files) 'implicit)
+(defun vc-mtn-checkout-model (_files) 'implicit)
(defun vc-mtn-root (file)
(setq file (if (file-directory-p file)
@@ -173,7 +173,7 @@ If nil, use the value of `vc-diff-switches'. If t, use no switches."
(t ?:))
branch)))
-(defun vc-mtn-register (files &optional rev comment)
+(defun vc-mtn-register (files &optional _rev _comment)
(vc-mtn-command nil 0 files "add"))
(defun vc-mtn-responsible-p (file) (vc-mtn-root file))
@@ -181,7 +181,7 @@ If nil, use the value of `vc-diff-switches'. If t, use no switches."
(declare-function log-edit-extract-headers "log-edit" (headers string))
-(defun vc-mtn-checkin (files rev comment)
+(defun vc-mtn-checkin (files _rev comment)
(apply 'vc-mtn-command nil 0 files
(nconc (list "commit" "-m")
(log-edit-extract-headers '(("Author" . "--author")
@@ -201,7 +201,7 @@ If nil, use the value of `vc-diff-switches'. If t, use no switches."
;; (defun vc-mtn-rollback (files)
;; )
-(defun vc-mtn-print-log (files buffer &optional shortlog start-revision limit)
+(defun vc-mtn-print-log (files buffer &optional _shortlog start-revision limit)
(apply 'vc-mtn-command buffer 0 files "log"
(append
(when start-revision (list "--from" (format "%s" start-revision)))
@@ -304,44 +304,43 @@ If nil, use the value of `vc-diff-switches'. If t, use no switches."
(push (match-string 0) ids))
ids)))
-(defun vc-mtn-revision-completion-table (files)
+(defun vc-mtn-revision-completion-table (_files)
;; TODO: Implement completion for selectors
;; TODO: Implement completion for composite selectors.
- (lexical-let ((files files))
- ;; What about using `files'?!? --Stef
- (lambda (string pred action)
- (cond
- ;; "Tag" selectors.
- ((string-match "\\`t:" string)
- (complete-with-action action
- (mapcar (lambda (tag) (concat "t:" tag))
- (vc-mtn-list-tags))
- string pred))
- ;; "Branch" selectors.
- ((string-match "\\`b:" string)
- (complete-with-action action
- (mapcar (lambda (tag) (concat "b:" tag))
- (vc-mtn-list-branches))
- string pred))
- ;; "Head" selectors. Not sure how they differ from "branch" selectors.
- ((string-match "\\`h:" string)
- (complete-with-action action
- (mapcar (lambda (tag) (concat "h:" tag))
- (vc-mtn-list-branches))
- string pred))
- ;; "ID" selectors.
- ((string-match "\\`i:" string)
- (complete-with-action action
- (mapcar (lambda (tag) (concat "i:" tag))
- (vc-mtn-list-revision-ids
- (substring string (match-end 0))))
- string pred))
- (t
- (complete-with-action action
- '("t:" "b:" "h:" "i:"
- ;; Completion not implemented for these.
- "a:" "c:" "d:" "e:" "l:")
- string pred))))))
+ ;; What about using `files'?!? --Stef
+ (lambda (string pred action)
+ (cond
+ ;; "Tag" selectors.
+ ((string-match "\\`t:" string)
+ (complete-with-action action
+ (mapcar (lambda (tag) (concat "t:" tag))
+ (vc-mtn-list-tags))
+ string pred))
+ ;; "Branch" selectors.
+ ((string-match "\\`b:" string)
+ (complete-with-action action
+ (mapcar (lambda (tag) (concat "b:" tag))
+ (vc-mtn-list-branches))
+ string pred))
+ ;; "Head" selectors. Not sure how they differ from "branch" selectors.
+ ((string-match "\\`h:" string)
+ (complete-with-action action
+ (mapcar (lambda (tag) (concat "h:" tag))
+ (vc-mtn-list-branches))
+ string pred))
+ ;; "ID" selectors.
+ ((string-match "\\`i:" string)
+ (complete-with-action action
+ (mapcar (lambda (tag) (concat "i:" tag))
+ (vc-mtn-list-revision-ids
+ (substring string (match-end 0))))
+ string pred))
+ (t
+ (complete-with-action action
+ '("t:" "b:" "h:" "i:"
+ ;; Completion not implemented for these.
+ "a:" "c:" "d:" "e:" "l:")
+ string pred)))))
diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el
index ab7e587eb79..ad828d6f78f 100644
--- a/lisp/vc/vc.el
+++ b/lisp/vc/vc.el
@@ -1,4 +1,4 @@
-;;; vc.el --- drive a version-control system from within Emacs
+;;; vc.el --- drive a version-control system from within Emacs -*- lexical-binding: t -*-
;; Copyright (C) 1992-1998, 2000-2012 Free Software Foundation, Inc.
@@ -655,6 +655,8 @@
(require 'vc-dispatcher)
(require 'ediff)
+(declare-function diff-setup-whitespace "diff-mode" ())
+
(eval-when-compile
(require 'cl)
(require 'dired))
@@ -667,7 +669,7 @@
;; General customization
(defgroup vc nil
- "Version-control system in Emacs."
+ "Emacs interface to version control systems."
:group 'tools)
(defcustom vc-initial-comment nil
@@ -1073,7 +1075,7 @@ For old-style locking-based version control systems, like RCS:
(let* ((vc-fileset (vc-deduce-fileset nil t 'state-model-only-files))
(backend (car vc-fileset))
(files (nth 1 vc-fileset))
- (fileset-only-files (nth 2 vc-fileset))
+ ;; (fileset-only-files (nth 2 vc-fileset))
;; FIXME: We used to call `vc-recompute-state' here.
(state (nth 3 vc-fileset))
;; The backend should check that the checkout-model is consistent
@@ -1408,34 +1410,31 @@ that the version control system supports this mode of operation.
Runs the normal hooks `vc-before-checkin-hook' and `vc-checkin-hook'."
(when vc-before-checkin-hook
(run-hooks 'vc-before-checkin-hook))
- (lexical-let
- ((backend backend))
- (vc-start-logentry
- files comment initial-contents
- "Enter a change comment."
- "*vc-log*"
- (lambda ()
- (vc-call-backend backend 'log-edit-mode))
- (lexical-let ((rev rev))
- (lambda (files comment)
- (message "Checking in %s..." (vc-delistify files))
- ;; "This log message intentionally left almost blank".
- ;; RCS 5.7 gripes about white-space-only comments too.
- (or (and comment (string-match "[^\t\n ]" comment))
- (setq comment "*** empty log message ***"))
- (with-vc-properties
- files
- ;; We used to change buffers to get local value of
- ;; vc-checkin-switches, but 'the' local buffer is
- ;; not a well-defined concept for filesets.
- (progn
- (vc-call-backend backend 'checkin files rev comment)
- (mapc 'vc-delete-automatic-version-backups files))
- `((vc-state . up-to-date)
- (vc-checkout-time . ,(nth 5 (file-attributes file)))
- (vc-working-revision . nil)))
- (message "Checking in %s...done" (vc-delistify files))))
- 'vc-checkin-hook)))
+ (vc-start-logentry
+ files comment initial-contents
+ "Enter a change comment."
+ "*vc-log*"
+ (lambda ()
+ (vc-call-backend backend 'log-edit-mode))
+ (lambda (files comment)
+ (message "Checking in %s..." (vc-delistify files))
+ ;; "This log message intentionally left almost blank".
+ ;; RCS 5.7 gripes about white-space-only comments too.
+ (or (and comment (string-match "[^\t\n ]" comment))
+ (setq comment "*** empty log message ***"))
+ (with-vc-properties
+ files
+ ;; We used to change buffers to get local value of
+ ;; vc-checkin-switches, but 'the' local buffer is
+ ;; not a well-defined concept for filesets.
+ (progn
+ (vc-call-backend backend 'checkin files rev comment)
+ (mapc 'vc-delete-automatic-version-backups files))
+ `((vc-state . up-to-date)
+ (vc-checkout-time . ,(nth 5 (file-attributes file)))
+ (vc-working-revision . nil)))
+ (message "Checking in %s...done" (vc-delistify files)))
+ 'vc-checkin-hook))
;;; Additional entry points for examining version histories
@@ -1524,17 +1523,18 @@ to override the value of `vc-diff-switches' and `diff-switches'."
;; possibility of an empty output is for an async process.
(when (buffer-live-p buffer)
(let ((window (get-buffer-window buffer t))
- (emptyp (zerop (buffer-size buffer))))
+ (emptyp (zerop (buffer-size buffer))))
(with-current-buffer buffer
- (and messages emptyp
- (let ((inhibit-read-only t))
- (insert (cdr messages) ".\n")
- (message "%s" (cdr messages))))
- (goto-char (point-min))
- (when window
- (shrink-window-if-larger-than-buffer window)))
+ (and messages emptyp
+ (let ((inhibit-read-only t))
+ (insert (cdr messages) ".\n")
+ (message "%s" (cdr messages))))
+ (diff-setup-whitespace)
+ (goto-char (point-min))
+ (when window
+ (shrink-window-if-larger-than-buffer window)))
(when (and messages (not emptyp))
- (message "%sdone" (car messages))))))
+ (message "%sdone" (car messages))))))
(defvar vc-diff-added-files nil
"If non-nil, diff added files by comparing them to /dev/null.")
@@ -1668,7 +1668,7 @@ Return t if the buffer had changes, nil otherwise."
(list files rev1 rev2))))
;;;###autoload
-(defun vc-version-diff (files rev1 rev2)
+(defun vc-version-diff (_files rev1 rev2)
"Report diffs between revisions of the fileset in the repository history."
(interactive (vc-diff-build-argument-list-internal))
;; All that was just so we could do argument completion!
@@ -1880,11 +1880,9 @@ The headers are reset to their non-expanded form."
"Enter a replacement change comment."
"*vc-log*"
(lambda () (vc-call-backend backend 'log-edit-mode))
- (lexical-let ((rev rev)
- (backend backend))
- (lambda (files comment)
- (vc-call-backend backend
- 'modify-change-comment files rev comment))))))
+ (lambda (files comment)
+ (vc-call-backend backend
+ 'modify-change-comment files rev comment)))))
;;;###autoload
(defun vc-merge ()
@@ -1949,7 +1947,7 @@ changes from the current branch."
(error "Sorry, merging is not implemented for %s" backend)))))
-(defun vc-maybe-resolve-conflicts (file status &optional name-A name-B)
+(defun vc-maybe-resolve-conflicts (file status &optional _name-A _name-B)
(vc-resynch-buffer file t (not (buffer-modified-p)))
(if (zerop status) (message "Merge successful")
(smerge-mode 1)
@@ -2074,22 +2072,20 @@ Not all VC backends support short logs!")
(when (and limit (not (eq 'limit-unsupported pl-return))
(not is-start-revision))
(goto-char (point-max))
- (lexical-let ((working-revision working-revision)
- (limit limit))
- (insert "\n")
- (insert-text-button "Show 2X entries"
- 'action (lambda (&rest ignore)
- (vc-print-log-internal
- log-view-vc-backend log-view-vc-fileset
- working-revision nil (* 2 limit)))
- 'help-echo "Show the log again, and double the number of log entries shown")
- (insert " ")
- (insert-text-button "Show unlimited entries"
- 'action (lambda (&rest ignore)
- (vc-print-log-internal
- log-view-vc-backend log-view-vc-fileset
- working-revision nil nil))
- 'help-echo "Show the log again, including all entries"))))
+ (insert "\n")
+ (insert-text-button "Show 2X entries"
+ 'action (lambda (&rest _ignore)
+ (vc-print-log-internal
+ log-view-vc-backend log-view-vc-fileset
+ working-revision nil (* 2 limit)))
+ 'help-echo "Show the log again, and double the number of log entries shown")
+ (insert " ")
+ (insert-text-button "Show unlimited entries"
+ 'action (lambda (&rest _ignore)
+ (vc-print-log-internal
+ log-view-vc-backend log-view-vc-fileset
+ working-revision nil nil))
+ 'help-echo "Show the log again, including all entries")))
(defun vc-print-log-internal (backend files working-revision
&optional is-start-revision limit)
@@ -2099,8 +2095,7 @@ Not all VC backends support short logs!")
(let ((dir-present nil)
(vc-short-log nil)
(buffer-name "*vc-change-log*")
- type
- pl-return)
+ type)
(dolist (file files)
(when (file-directory-p file)
(setq dir-present t)))
@@ -2109,25 +2104,20 @@ Not all VC backends support short logs!")
(memq 'directory vc-log-short-style)
(memq 'file vc-log-short-style)))))
(setq type (if vc-short-log 'short 'long))
- (lexical-let
- ((working-revision working-revision)
- (backend backend)
- (limit limit)
- (shortlog vc-short-log)
- (files files)
- (is-start-revision is-start-revision))
+ (let ((shortlog vc-short-log))
(vc-log-internal-common
backend buffer-name files type
- (lambda (bk buf type-arg files-arg)
- (vc-call-backend bk 'print-log files-arg buf
- shortlog (when is-start-revision working-revision) limit))
- (lambda (bk files-arg ret)
+ (lambda (bk buf _type-arg files-arg)
+ (vc-call-backend bk 'print-log files-arg buf shortlog
+ (when is-start-revision working-revision) limit))
+ (lambda (_bk _files-arg ret)
(vc-print-log-setup-buttons working-revision
is-start-revision limit ret))
(lambda (bk)
(vc-call-backend bk 'show-log-entry working-revision))
- (lambda (ignore-auto noconfirm)
- (vc-print-log-internal backend files working-revision is-start-revision limit))))))
+ (lambda (_ignore-auto _noconfirm)
+ (vc-print-log-internal backend files working-revision
+ is-start-revision limit))))))
(defvar vc-log-view-type nil
"Set this to differentiate the different types of logs.")
@@ -2165,20 +2155,12 @@ Not all VC backends support short logs!")
(defun vc-incoming-outgoing-internal (backend remote-location buffer-name type)
(vc-log-internal-common
backend buffer-name nil type
- (lexical-let
- ((remote-location remote-location))
- (lambda (bk buf type-arg files)
- (vc-call-backend bk type-arg buf remote-location)))
- (lambda (bk files-arg ret))
- (lambda (bk)
- (goto-char (point-min)))
- (lexical-let
- ((backend backend)
- (remote-location remote-location)
- (buffer-name buffer-name)
- (type type))
- (lambda (ignore-auto noconfirm)
- (vc-incoming-outgoing-internal backend remote-location buffer-name type)))))
+ (lambda (bk buf type-arg _files)
+ (vc-call-backend bk type-arg buf remote-location))
+ (lambda (_bk _files-arg _ret) nil)
+ (lambda (_bk) (goto-char (point-min)))
+ (lambda (_ignore-auto _noconfirm)
+ (vc-incoming-outgoing-internal backend remote-location buffer-name type))))
;;;###autoload
(defun vc-print-log (&optional working-revision limit)
@@ -2243,11 +2225,11 @@ When called interactively with a prefix argument, prompt for REMOTE-LOCATION.."
(interactive
(when current-prefix-arg
(list (read-string "Remote location (empty for default): "))))
- (let ((backend (vc-deduce-backend))
- rootdir working-revision)
+ (let ((backend (vc-deduce-backend)))
(unless backend
(error "Buffer is not version controlled"))
- (vc-incoming-outgoing-internal backend remote-location "*vc-incoming*" 'log-incoming)))
+ (vc-incoming-outgoing-internal backend remote-location "*vc-incoming*"
+ 'log-incoming)))
;;;###autoload
(defun vc-log-outgoing (&optional remote-location)
@@ -2256,11 +2238,11 @@ When called interactively with a prefix argument, prompt for REMOTE-LOCATION."
(interactive
(when current-prefix-arg
(list (read-string "Remote location (empty for default): "))))
- (let ((backend (vc-deduce-backend))
- rootdir working-revision)
+ (let ((backend (vc-deduce-backend)))
(unless backend
(error "Buffer is not version controlled"))
- (vc-incoming-outgoing-internal backend remote-location "*vc-outgoing*" 'log-outgoing)))
+ (vc-incoming-outgoing-internal backend remote-location "*vc-outgoing*"
+ 'log-outgoing)))
;;;###autoload
(defun vc-revert ()
@@ -2685,23 +2667,23 @@ log entries should be gathered."
(when index
(substring rev 0 index))))
-(defun vc-default-responsible-p (backend file)
+(defun vc-default-responsible-p (_backend _file)
"Indicate whether BACKEND is responsible for FILE.
The default is to return nil always."
nil)
-(defun vc-default-could-register (backend file)
+(defun vc-default-could-register (_backend _file)
"Return non-nil if BACKEND could be used to register FILE.
The default implementation returns t for all files."
t)
-(defun vc-default-latest-on-branch-p (backend file)
+(defun vc-default-latest-on-branch-p (_backend _file)
"Return non-nil if FILE is the latest on its branch.
This default implementation always returns non-nil, which means that
editing non-current revisions is not supported by default."
t)
-(defun vc-default-init-revision (backend) vc-default-init-revision)
+(defun vc-default-init-revision (_backend) vc-default-init-revision)
(defun vc-default-find-revision (backend file rev buffer)
"Provide the new `find-revision' op based on the old `checkout' op.
@@ -2715,7 +2697,7 @@ to provide the `find-revision' operation instead."
(insert-file-contents-literally tmpfile)))
(delete-file tmpfile))))
-(defun vc-default-rename-file (backend old new)
+(defun vc-default-rename-file (_backend old new)
(condition-case nil
(add-name-to-file old new)
(error (rename-file old new)))
@@ -2727,11 +2709,11 @@ to provide the `find-revision' operation instead."
(declare-function log-edit-mode "log-edit" ())
-(defun vc-default-log-edit-mode (backend) (log-edit-mode))
+(defun vc-default-log-edit-mode (_backend) (log-edit-mode))
-(defun vc-default-log-view-mode (backend) (log-view-mode))
+(defun vc-default-log-view-mode (_backend) (log-view-mode))
-(defun vc-default-show-log-entry (backend rev)
+(defun vc-default-show-log-entry (_backend rev)
(with-no-warnings
(log-view-goto-rev rev)))
@@ -2797,7 +2779,7 @@ to provide the `find-revision' operation instead."
(defalias 'vc-default-revision-completion-table 'ignore)
(defalias 'vc-default-mark-resolved 'ignore)
-(defun vc-default-dir-status-files (backend dir files default-state update-function)
+(defun vc-default-dir-status-files (_backend _dir files default-state update-function)
(funcall update-function
(mapcar (lambda (file) (list file default-state)) files)))
diff --git a/lisp/version.el b/lisp/version.el
index d7fb05ea465..804727a07c2 100644
--- a/lisp/version.el
+++ b/lisp/version.el
@@ -1,4 +1,4 @@
-;;; version.el --- record version number of Emacs
+;;; version.el --- record version number of Emacs -*- no-byte-compile: t -*-
;; Copyright (C) 1985, 1992, 1994-1995, 1999-2012
;; Free Software Foundation, Inc.
@@ -121,9 +121,4 @@ Optional argument DIR is a directory to use instead of `source-directory'."
(purecopy (concat "\n$Id: " (subst-char-in-string ?\n ?\s (emacs-version))
" $\n"))
-;; Local Variables:
-;; version-control: never
-;; no-byte-compile: t
-;; End:
-
;;; version.el ends here
diff --git a/lisp/wid-edit.el b/lisp/wid-edit.el
index b6feecebde5..9c5c6462bcc 100644
--- a/lisp/wid-edit.el
+++ b/lisp/wid-edit.el
@@ -2907,15 +2907,7 @@ link for that string."
(push (widget-convert-button widget-documentation-link-type
begin end :value name)
buttons)))))
- (widget-put widget :buttons buttons)))
- (let ((indent (widget-get widget :indent)))
- (when (and indent (not (zerop indent)))
- (save-excursion
- (save-restriction
- (narrow-to-region from to)
- (goto-char (point-min))
- (while (search-forward "\n" nil t)
- (insert-char ?\s indent)))))))
+ (widget-put widget :buttons buttons))))
;;; The `documentation-string' Widget.
@@ -2934,10 +2926,9 @@ link for that string."
(start (point)))
(if (string-match "\n" doc)
(let ((before (substring doc 0 (match-beginning 0)))
- (after (substring doc (match-beginning 0)))
- button)
- (when (and indent (not (zerop indent)))
- (insert-char ?\s indent))
+ (after (substring doc (match-end 0)))
+ button end)
+ (widget-documentation-string-indent-to indent)
(insert before ?\s)
(widget-documentation-link-add widget start (point))
(setq button
@@ -2950,18 +2941,35 @@ link for that string."
:action 'widget-parent-action
shown))
(when shown
+ (insert ?\n)
(setq start (point))
(when (and indent (not (zerop indent)))
(insert-char ?\s indent))
(insert after)
- (widget-documentation-link-add widget start (point)))
+ (setq end (point))
+ (widget-documentation-link-add widget start end)
+ ;; Indent the subsequent lines.
+ (when (and indent (> indent 0))
+ (save-excursion
+ (save-restriction
+ (narrow-to-region start end)
+ (goto-char (point-min))
+ (while (search-forward "\n" nil t)
+ (widget-documentation-string-indent-to indent))))))
(widget-put widget :buttons (list button)))
- (when (and indent (not (zerop indent)))
- (insert-char ?\s indent))
+ (widget-documentation-string-indent-to indent)
(insert doc)
(widget-documentation-link-add widget start (point))))
(insert ?\n))
+(defun widget-documentation-string-indent-to (col)
+ (when (and (numberp col)
+ (> col 0))
+ (let ((opoint (point)))
+ (indent-to col)
+ (put-text-property opoint (point)
+ 'display `(space :align-to ,col)))))
+
(defun widget-documentation-string-action (widget &rest _ignore)
;; Toggle documentation.
(let ((parent (widget-get widget :parent)))
diff --git a/lisp/window.el b/lisp/window.el
index c148f5ee01f..a650c5602ba 100644
--- a/lisp/window.el
+++ b/lisp/window.el
@@ -1482,12 +1482,24 @@ edge of WINDOW consider using `adjust-window-trailing-edge'
instead."
(setq window (window-normalize-window window))
(let* ((frame (window-frame window))
+ (minibuffer-window (minibuffer-window frame))
sibling)
(cond
((eq window (frame-root-window frame))
(error "Cannot resize the root window of a frame"))
((window-minibuffer-p window)
- (window--resize-mini-window window delta))
+ (if horizontal
+ (error "Cannot resize minibuffer window horizontally")
+ (window--resize-mini-window window delta)))
+ ((and (not horizontal)
+ (window-full-height-p window)
+ (eq (window-frame minibuffer-window) frame)
+ (or (not resize-mini-windows)
+ (eq minibuffer-window (active-minibuffer-window))))
+ ;; If WINDOW is full height and either `resize-mini-windows' is
+ ;; nil or the minibuffer window is active, resize the minibuffer
+ ;; window.
+ (window--resize-mini-window minibuffer-window (- delta)))
((window--resizable-p window delta horizontal ignore)
(window--resize-reset frame horizontal)
(window--resize-this-window window delta horizontal ignore t)
@@ -2002,17 +2014,25 @@ right. If DELTA is less than zero, move the edge upwards or to
the left. If the edge can't be moved by DELTA lines or columns,
move it as far as possible in the desired direction."
(setq window (window-normalize-window window))
- (let ((frame (window-frame window))
- (right window)
- left this-delta min-delta max-delta)
+ (let* ((frame (window-frame window))
+ (minibuffer-window (minibuffer-window frame))
+ (right window)
+ left this-delta min-delta max-delta)
;; Find the edge we want to move.
(while (and (or (not (window-combined-p right horizontal))
(not (window-right right)))
(setq right (window-parent right))))
(cond
- ((and (not right) (not horizontal) (not resize-mini-windows)
- (eq (window-frame (minibuffer-window frame)) frame))
- (window--resize-mini-window (minibuffer-window frame) (- delta)))
+ ((and (not right) (not horizontal)
+ ;; Resize the minibuffer window if it's on the same frame as
+ ;; and immediately below WINDOW and it's either active or
+ ;; `resize-mini-windows' is nil.
+ (eq (window-frame minibuffer-window) frame)
+ (= (nth 1 (window-edges minibuffer-window))
+ (nth 3 (window-edges window)))
+ (or (not resize-mini-windows)
+ (eq minibuffer-window (active-minibuffer-window))))
+ (window--resize-mini-window minibuffer-window (- delta)))
((or (not (setq left right)) (not (setq right (window-right right))))
(if horizontal
(error "No window on the right of this one")
@@ -2109,18 +2129,30 @@ make selected window wider by DELTA columns. If DELTA is
negative, shrink selected window by -DELTA lines or columns.
Return nil."
(interactive "p")
- (cond
- ((zerop delta))
- ((window-size-fixed-p nil horizontal)
- (error "Selected window has fixed size"))
- ((window--resizable-p nil delta horizontal)
- (window-resize nil delta horizontal))
- (t
- (window-resize
- nil (if (> delta 0)
- (window-max-delta nil horizontal)
- (- (window-min-delta nil horizontal)))
- horizontal))))
+ (let ((minibuffer-window (minibuffer-window)))
+ (cond
+ ((zerop delta))
+ ((window-size-fixed-p nil horizontal)
+ (error "Selected window has fixed size"))
+ ((window-minibuffer-p)
+ (if horizontal
+ (error "Cannot resize minibuffer window horizontally")
+ (window--resize-mini-window (selected-window) delta)))
+ ((and (not horizontal)
+ (window-full-height-p)
+ (eq (window-frame minibuffer-window) (selected-frame))
+ (not resize-mini-windows))
+ ;; If the selected window is full height and `resize-mini-windows'
+ ;; is nil, resize the minibuffer window.
+ (window--resize-mini-window minibuffer-window (- delta)))
+ ((window--resizable-p nil delta horizontal)
+ (window-resize nil delta horizontal))
+ (t
+ (window-resize
+ nil (if (> delta 0)
+ (window-max-delta nil horizontal)
+ (- (window-min-delta nil horizontal)))
+ horizontal)))))
(defun shrink-window (delta &optional horizontal)
"Make the selected window DELTA lines smaller.
@@ -2131,18 +2163,30 @@ negative, enlarge selected window by -DELTA lines or columns.
Also see the `window-min-height' variable.
Return nil."
(interactive "p")
- (cond
- ((zerop delta))
- ((window-size-fixed-p nil horizontal)
- (error "Selected window has fixed size"))
- ((window--resizable-p nil (- delta) horizontal)
- (window-resize nil (- delta) horizontal))
- (t
- (window-resize
- nil (if (> delta 0)
- (- (window-min-delta nil horizontal))
- (window-max-delta nil horizontal))
- horizontal))))
+ (let ((minibuffer-window (minibuffer-window)))
+ (cond
+ ((zerop delta))
+ ((window-size-fixed-p nil horizontal)
+ (error "Selected window has fixed size"))
+ ((window-minibuffer-p)
+ (if horizontal
+ (error "Cannot resize minibuffer window horizontally")
+ (window--resize-mini-window (selected-window) (- delta))))
+ ((and (not horizontal)
+ (window-full-height-p)
+ (eq (window-frame minibuffer-window) (selected-frame))
+ (not resize-mini-windows))
+ ;; If the selected window is full height and `resize-mini-windows'
+ ;; is nil, resize the minibuffer window.
+ (window--resize-mini-window minibuffer-window delta))
+ ((window--resizable-p nil (- delta) horizontal)
+ (window-resize nil (- delta) horizontal))
+ (t
+ (window-resize
+ nil (if (> delta 0)
+ (- (window-min-delta nil horizontal))
+ (window-max-delta nil horizontal))
+ horizontal)))))
(defun maximize-window (&optional window)
"Maximize WINDOW.
@@ -4567,7 +4611,7 @@ The actual non-nil value of this variable will be copied to the
'(choice :tag "Function"
(const :tag "--" ignore) ; default for insertion
(const display-buffer-reuse-window)
- (const display-buffer-use-some-window)
+ (const display-buffer-pop-up-window)
(const display-buffer-same-window)
(const display-buffer-pop-up-frame)
(const display-buffer-use-some-window)
@@ -5050,11 +5094,11 @@ Return the buffer switched to."
((eq buffer (window-buffer)))
((window-minibuffer-p)
(if force-same-window
- (error "Cannot switch buffers in minibuffer window")
+ (user-error "Cannot switch buffers in minibuffer window")
(pop-to-buffer buffer norecord)))
((eq (window-dedicated-p) t)
(if force-same-window
- (error "Cannot switch buffers in a dedicated window")
+ (user-error "Cannot switch buffers in a dedicated window")
(pop-to-buffer buffer norecord)))
(t (set-window-buffer nil buffer)))
@@ -5727,6 +5771,8 @@ is active. This function is run by `mouse-autoselect-window-timer'."
(setq mouse-autoselect-window-state nil)
;; Run `mouse-leave-buffer-hook' when autoselecting window.
(run-hooks 'mouse-leave-buffer-hook))
+ ;; Clear echo area.
+ (message nil)
(select-window window))))
(defun truncated-partial-width-window-p (&optional window)
diff --git a/lisp/xml.el b/lisp/xml.el
index 39a8da0f337..cb56f023af0 100644
--- a/lisp/xml.el
+++ b/lisp/xml.el
@@ -323,7 +323,8 @@ If PARSE-NS is non-nil, then QNAMES are expanded."
(cond
((null result)
;; Not looking at an xml start tag.
- (forward-char 1))
+ (unless (eobp)
+ (forward-char 1)))
((and xml (not xml-sub-parser))
;; Translation of rule [1] of XML specifications
(error "XML: (Not Well-Formed) Only one root tag allowed"))
@@ -422,7 +423,8 @@ Returns one of:
((looking-at "<!--")
(search-forward "-->")
(skip-syntax-forward " ")
- (xml-parse-tag parse-dtd xml-ns))
+ (unless (eobp)
+ (xml-parse-tag parse-dtd xml-ns)))
;; end tag
((looking-at "</")
'())
diff --git a/m4/gl-comp.m4 b/m4/gnulib-comp.m4
index 73a26c41324..73a26c41324 100644
--- a/m4/gl-comp.m4
+++ b/m4/gnulib-comp.m4
diff --git a/make-dist b/make-dist
index 55dac98d713..ead1fa544ec 100755
--- a/make-dist
+++ b/make-dist
@@ -1,7 +1,7 @@
#!/bin/sh
### make-dist: create an Emacs distribution tar file from current srcdir
-## Copyright (C) 1995, 1997-1998, 2000-2012 Free Software Foundation, Inc.
+## Copyright (C) 1995, 1997-1998, 2000-2012 Free Software Foundation, Inc.
## This file is part of GNU Emacs.
@@ -285,7 +285,7 @@ mkdir ${tempdir}
echo "Making links to top-level files"
ln INSTALL README BUGS ${tempdir}
ln ChangeLog Makefile.in configure configure.in ${tempdir}
-ln config.bat make-dist update-subdirs vpath.sed .dir-locals.el ${tempdir}
+ln config.bat make-dist .dir-locals.el ${tempdir}
ln aclocal.m4 ${tempdir}
echo "Creating subdirectories"
@@ -293,7 +293,7 @@ for subdir in site-lisp \
leim leim/CXTERM-DIC leim/MISC-DIC \
leim/SKK-DIC leim/ja-dic leim/quail \
build-aux build-aux/snippet \
- src src/m src/s src/bitmaps lib lib-src oldXMenu lwlib \
+ src src/s src/bitmaps lib lib-src oldXMenu lwlib \
nt nt/inc nt/inc/sys nt/inc/arpa nt/inc/netinet nt/icons \
`find etc lisp admin -type d` \
doc doc/emacs doc/misc doc/man doc/lispref doc/lispintro \
@@ -346,7 +346,7 @@ echo "Making links to \`leim' and its subdirectories"
echo "Making links to \`build-aux'"
(cd build-aux
ln compile config.guess config.sub depcomp ../${tempdir}/build-aux
- ln install-sh missing move-if-change ../${tempdir}/build-aux)
+ ln install-sh missing move-if-change update-subdirs ../${tempdir}/build-aux)
echo "Making links to \`build-aux/snippet'"
(cd build-aux/snippet
@@ -370,10 +370,6 @@ echo "Making links to \`src/bitmaps'"
(cd src/bitmaps
ln README *.xbm ../../${tempdir}/src/bitmaps)
-echo "Making links to \`src/m'"
-(cd src/m
- ln README [a-zA-Z0-9]*.h ../../${tempdir}/src/m)
-
echo "Making links to \`src/s'"
(cd src/s
ln README [a-zA-Z0-9]*.h ../../${tempdir}/src/s)
@@ -478,8 +474,8 @@ echo "Making links to \`doc/misc'"
echo "Making links to \`doc/lispref'"
(cd doc/lispref
ln *.texi *.in makefile.w32-in README ChangeLog* ../../${tempdir}/doc/lispref
- ln *.txt *.el spellfile tindex.pl ../../${tempdir}/doc/lispref
- ln two-volume.make ../../${tempdir}/doc/lispref)
+ ln spellfile ../../${tempdir}/doc/lispref
+ ln two-volume.make two-volume-cross-refs.txt ../../${tempdir}/doc/lispref)
echo "Making links to \`doc/lispintro'"
(cd doc/lispintro
diff --git a/msdos/ChangeLog b/msdos/ChangeLog
index 603baa978e0..ae72d182803 100644
--- a/msdos/ChangeLog
+++ b/msdos/ChangeLog
@@ -1,3 +1,18 @@
+2012-05-25 Eli Zaretskii <eliz@gnu.org>
+
+ * sed6.inp (INFO_EXT): Edit to .info.
+ (INFO_OPTS): Edit to --no-split.
+
+2012-05-22 Paul Eggert <eggert@cs.ucla.edu>
+
+ Remove src/m/*.
+ * mainmake.v2 (TAGS tags): Don't look at $(CURDIR)/src/m/intel386.h.
+
+2012-05-19 Paul Eggert <eggert@cs.ucla.edu>
+
+ * sed2v2.inp (HAVE_MBLEN): Remove.
+ * sed2x.inp (HAVE_XSETWMPROTOCOLS): Remove.
+
2012-04-21 Eli Zaretskii <eliz@gnu.org>
* sedleim.inp (RUN_EMACS): Replace BUILT_EMACS with EMACS.
diff --git a/msdos/mainmake.v2 b/msdos/mainmake.v2
index 2113dc4a127..b4837b99fb9 100644
--- a/msdos/mainmake.v2
+++ b/msdos/mainmake.v2
@@ -162,7 +162,7 @@ TAGS tags: lib-src FRC
../bin/etags --include=../lisp/TAGS \
--regex='/[ ]*DEFVAR_[A-Z_ (]+"\([^"]+\)"/' \
$(CURDIR)/src/*.c $(CURDIR)/src/*.h \
- $(CURDIR)/src/s/msdos.h $(CURDIR)/src/m/intel386.h
+ $(CURDIR)/src/s/msdos.h
cd ..
./bin/etags --include=src/TAGS
@@ -299,4 +299,3 @@ bootstrap-clean: FRC
bootstrap: bootstrap-clean FRC
command.com /e:2048 /c config msdos
$(MAKE) $(MFLAGS) info all
-
diff --git a/msdos/sed2v2.inp b/msdos/sed2v2.inp
index 7c7a4ad6271..06a59513af7 100644
--- a/msdos/sed2v2.inp
+++ b/msdos/sed2v2.inp
@@ -46,7 +46,6 @@
/^#undef HAVE_SETRLIMIT *$/s/^.*$/#define HAVE_SETRLIMIT 1/
/^#undef HAVE_GETRUSAGE *$/s/^.*$/#define HAVE_GETRUSAGE 1/
/^#undef HAVE_TM_GMTOFF *$/s/^.*$/#define HAVE_TM_GMTOFF 1/
-/^#undef HAVE_MBLEN *$/s/^.*$/#define HAVE_MBLEN 1/
/^#undef HAVE_STRUCT_TIMEZONE *$/s/^.*$/#define HAVE_STRUCT_TIMEZONE 1/
/^#undef HAVE_SIZE_T *$/s/^.*$/#define HAVE_SIZE_T 1/
/^#undef HAVE_MKSTEMP *$/s/^.*$/#define HAVE_MKSTEMP 1/
@@ -119,4 +118,3 @@ s/^#undef HAVE_STRTOULL *$/#define HAVE_STRTOULL 1/
# might be defined in sys/config.h we include at the top of config.h.
/^#undef BSTRING/s|#undef|# undef|
/^#undef .*$/s|^.*$|/* & */|
-
diff --git a/msdos/sed2x.inp b/msdos/sed2x.inp
index 159c35fd251..fa920246c96 100644
--- a/msdos/sed2x.inp
+++ b/msdos/sed2x.inp
@@ -20,6 +20,5 @@
/^#undef HAVE_X11 *$/s/undef/define/
/^#undef HAVE_X_MENU *$/s/undef/define/
/^#undef HAVE_XSCREENNUMBEROFSCREEN *$/s/undef/define/
-/^#undef HAVE_XSETWMPROTOCOLS *$/s/undef/define/
/^#undef HAVE_SELECT *$/s/undef/define/
diff --git a/msdos/sed6.inp b/msdos/sed6.inp
index 6d44f995307..22052140b82 100644
--- a/msdos/sed6.inp
+++ b/msdos/sed6.inp
@@ -19,6 +19,8 @@
/^srcdir *=/s/@[^@\n]*@/./
/^VPATH *=/s/@[^@\n]*@/./
/^MAKEINFO *=/s/@[^@\n]*@/makeinfo/
+/^INFO_EXT *=/s/@[^@\n]*@/.info/
+/^INFO_OPTS *=/s/@[^@\n]*@/--no-split/
/^ENVADD/,/^$/c\
ENVADD =\
export TEXINPUTS := $(srcdir)";"$(TEXINPUTS)\
diff --git a/nextstep/INSTALL b/nextstep/INSTALL
index 1e7109a3910..634ff012782 100644
--- a/nextstep/INSTALL
+++ b/nextstep/INSTALL
@@ -16,7 +16,8 @@ In order to run Emacs.app, you must run:
make install
-This will assemble the app in nextstep/Emacs.app.
+This will assemble the app in nextstep/Emacs.app (i.e., the --prefix
+argument has no effect in this case).
If you pass the --disable-ns-self-contained option to configure, the lisp
files will be installed under whatever 'prefix' is set to (defaults to
diff --git a/nt/ChangeLog b/nt/ChangeLog
index c76695a4a99..198729776b5 100644
--- a/nt/ChangeLog
+++ b/nt/ChangeLog
@@ -1,3 +1,22 @@
+2012-05-22 Paul Eggert <eggert@cs.ucla.edu>
+
+ Remove src/m/*.
+ * config.nt: Do not include "m/intel386.h"; file was removed.
+ (BITS_PER_CHAR, BITS_PER_SHORT, BITS_PER_INT, BITS_PER_LONG):
+ Move to src/lisp.h.
+ (EMACS_INT_MAX): New macro.
+
+2012-05-19 Paul Eggert <eggert@cs.ucla.edu>
+
+ * config.nt (HAVE_GETDOMAINNAME, HAVE_XSETWMPROTOCOLS)
+ (HAVE_GETSOCKOPT, HAVE_SETSOCKOPT): Remove; not needed.
+
+ * config.nt (HAVE_FTIME): Remove undef; not needed.
+
+2012-05-01 Glenn Morris <rgm@gnu.org>
+
+ * config.nt (HAVE_LIBNCURSES): Remove undef; not needed.
+
2012-04-14 Dani Moncayo <dmoncayo@gmail.com> (tiny change)
* makefile.w32-in: Fix typo (Bug#10261).
diff --git a/nt/config.nt b/nt/config.nt
index 8aadf2c150d..16122b5e10e 100644
--- a/nt/config.nt
+++ b/nt/config.nt
@@ -1,6 +1,6 @@
/* GNU Emacs site configuration template file. -*- C -*-
-Copyright (C) 1988, 1993-1994, 2001-2012 Free Software Foundation, Inc.
+Copyright (C) 1988, 1993-1994, 2001-2012 Free Software Foundation, Inc.
This file is part of GNU Emacs.
@@ -138,7 +138,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#undef HAVE_LIBPTHREADS
#undef HAVE_LIBRESOLV
#undef HAVE_LIBXMU
-#undef HAVE_LIBNCURSES
#undef HAVE_LIBINTL
/* movemail Kerberos support */
@@ -180,7 +179,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#undef GETTIMEOFDAY_ONE_ARGUMENT
#endif
#undef HAVE_GETHOSTNAME
-#undef HAVE_GETDOMAINNAME
#undef HAVE_DUP2
#undef HAVE_RENAME
#undef HAVE_CLOSEDIR
@@ -206,7 +204,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#undef HAVE_XRMSETDATABASE
#undef HAVE_XSCREENRESOURCESTRING
#undef HAVE_XSCREENNUMBEROFSCREEN
-#undef HAVE_XSETWMPROTOCOLS
#undef HAVE_MKDIR
#undef HAVE_RMDIR
@@ -222,7 +219,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#undef HAVE_FMOD
#undef HAVE_RINT
#undef HAVE_CBRT
-#undef HAVE_FTIME
#undef HAVE_RES_INIT /* For -lresolv on Suns. */
#undef HAVE_SETSID
#undef HAVE_FPATHCONF
@@ -246,8 +242,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#define HAVE_SENDTO 1
#define HAVE_RECVFROM 1
-#define HAVE_GETSOCKOPT 1
-#define HAVE_SETSOCKOPT 1
#define HAVE_GETSOCKNAME 1
#define HAVE_GETPEERNAME 1
#define HAVE_SNPRINTF 1
@@ -427,17 +421,6 @@ typedef unsigned short mode_t;
#undef config_opsysfile
#include "s/ms-w32.h"
-/* The configuration script defines machfile to be the name of the
- m/MACHINE.h file that describes the machine you are using. The file is
- chosen based on the configuration name you give.
-
- See the file ../etc/MACHINES for a list of machines and the
- configuration names to use for them.
-
- See m/template.h for documentation on writing m/MACHINE.h files. */
-#undef config_machfile
-#include "m/intel386.h"
-
/* Define `subprocesses' should be defined if you want to
have code for asynchronous subprocesses
(as used in M-x compile and M-x shell).
@@ -471,28 +454,6 @@ extern char *getenv ();
#endif /* EMACS_CONFIG_H */
-/* These default definitions are good for almost all machines.
- The exceptions override them in m/MACHINE.h. */
-
-#ifndef BITS_PER_CHAR
-#define BITS_PER_CHAR 8
-#endif
-
-#ifndef BITS_PER_SHORT
-#define BITS_PER_SHORT 16
-#endif
-
-/* Note that lisp.h uses this in a preprocessor conditional, so it
- would not work to use sizeof. That being so, we do all of them
- without sizeof, for uniformity's sake. */
-#ifndef BITS_PER_INT
-#define BITS_PER_INT 32
-#endif
-
-#ifndef BITS_PER_LONG
-#define BITS_PER_LONG 32
-#endif
-
#if defined (__MINGW32__) || _MSC_VER >= 1400
/* Define to 1 if the system has the type `long long int'. */
@@ -511,7 +472,7 @@ extern char *getenv ();
/* Use pre-C99-style 64-bit integers. */
# define EMACS_INT __int64
-# define BITS_PER_EMACS_INT 64
+# define EMACS_INT_MAX _I64_MAX
# define pI "I64"
# endif
diff --git a/src/.gdbinit b/src/.gdbinit
index 7cd828733b1..8f8508f291f 100644
--- a/src/.gdbinit
+++ b/src/.gdbinit
@@ -54,7 +54,7 @@ end
define xgetint
set $bugfix = $arg0
- set $int = gdb_use_union ? $bugfix.s.val : (gdb_use_lsb ? $bugfix : $bugfix << gdb_gctypebits) >> gdb_gctypebits
+ set $int = gdb_use_union ? $bugfix.s.val : (gdb_use_lsb ? $bugfix >> (gdb_gctypebits - 1) : $bugfix << gdb_gctypebits) >> gdb_gctypebits
end
define xgettype
@@ -703,60 +703,6 @@ Print $ as a misc free-cell pointer.
This command assumes that $ is an Emacs Lisp Misc value.
end
-define xintfwd
- xgetptr $
- print (struct Lisp_Intfwd *) $ptr
-end
-document xintfwd
-Print $ as an integer forwarding pointer.
-This command assumes that $ is an Emacs Lisp Misc value.
-end
-
-define xboolfwd
- xgetptr $
- print (struct Lisp_Boolfwd *) $ptr
-end
-document xboolfwd
-Print $ as a boolean forwarding pointer.
-This command assumes that $ is an Emacs Lisp Misc value.
-end
-
-define xobjfwd
- xgetptr $
- print (struct Lisp_Objfwd *) $ptr
-end
-document xobjfwd
-Print $ as an object forwarding pointer.
-This command assumes that $ is an Emacs Lisp Misc value.
-end
-
-define xbufobjfwd
- xgetptr $
- print (struct Lisp_Buffer_Objfwd *) $ptr
-end
-document xbufobjfwd
-Print $ as a buffer-local object forwarding pointer.
-This command assumes that $ is an Emacs Lisp Misc value.
-end
-
-define xkbobjfwd
- xgetptr $
- print (struct Lisp_Kboard_Objfwd *) $ptr
-end
-document xkbobjfwd
-Print $ as a kboard-local object forwarding pointer.
-This command assumes that $ is an Emacs Lisp Misc value.
-end
-
-define xbuflocal
- xgetptr $
- print (struct Lisp_Buffer_Local_Value *) $ptr
-end
-document xbuflocal
-Print $ as a buffer-local-value pointer.
-This command assumes that $ is an Emacs Lisp Misc value.
-end
-
define xsymbol
set $sym = $
xgetptr $sym
@@ -1003,8 +949,15 @@ end
define xpr
xtype
- if $type == Lisp_Int
- xint
+ if gdb_use_union
+ if $type == Lisp_Int
+ xint
+ end
+ end
+ if !gdb_use_union
+ if $type == Lisp_Int0 || $type == Lisp_Int1
+ xint
+ end
end
if $type == Lisp_Symbol
xsymbol
@@ -1023,36 +976,12 @@ define xpr
if $misc == Lisp_Misc_Free
xmiscfree
end
- if $misc == Lisp_Misc_Boolfwd
- xboolfwd
- end
if $misc == Lisp_Misc_Marker
xmarker
end
- if $misc == Lisp_Misc_Intfwd
- xintfwd
- end
- if $misc == Lisp_Misc_Boolfwd
- xboolfwd
- end
- if $misc == Lisp_Misc_Objfwd
- xobjfwd
- end
- if $misc == Lisp_Misc_Buffer_Objfwd
- xbufobjfwd
- end
- if $misc == Lisp_Misc_Buffer_Local_Value
- xbuflocal
- end
-# if $misc == Lisp_Misc_Some_Buffer_Local_Value
-# xvalue
-# end
if $misc == Lisp_Misc_Overlay
xoverlay
end
- if $misc == Lisp_Misc_Kboard_Objfwd
- xkbobjfwd
- end
# if $misc == Lisp_Misc_Save_Value
# xsavevalue
# end
diff --git a/src/ChangeLog b/src/ChangeLog
index bdc70f54f29..6217560409d 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,9 +1,8 @@
-2012-04-22 Paul Eggert <eggert@cs.ucla.edu>
+2012-05-25 Paul Eggert <eggert@cs.ucla.edu>
+ Fix integer width and related bugs (Bug#9874).
* process.h (struct Lisp_Process): Members tick and update_tick
are now of type EMACS_INT, not int.
-
- Fix integer width and related bugs (Bug#9874).
* alloc.c (pure_bytes_used_lisp, pure_bytes_used_non_lisp):
(allocate_vectorlike, buffer_memory_full, struct sdata, SDATA_SIZE)
(string_bytes, check_sblock, allocate_string_data):
@@ -47,12 +46,6 @@
(Foverlays_at, Fnext_overlay_change, Fprevious_overlay_change):
Omit pointer cast, which isn't needed anyway, and doesn't work
after the EMACS_INT -> ptrdiff_t change.
- (Fmove_overlay): Delete an evaporating overlay
- if it becomes empty after its bounds are adjusted to fit within
- its buffer. Without this fix, in a nonempty buffer (let ((o
- (make-overlay 1 2))) (overlay-put o 'evaporate t) (move-overlay o 0 1))
- yields an empty overlay that has the evaporate property, which is
- not supposed to happen. (Bug#9642)
* buffer.h: Adjust decls to match defn changes elsewhere.
(struct buffer_text, struct buffer):
Use ptrdiff_t, not EMACS_INT, where ptrdiff_t is wide enough.
@@ -218,6 +211,7 @@
(Frem): Don't assume arg is nonnegative.
* dbusbind.c (xd_append_arg): Check for integers out of range.
(Fdbus_call_method): Don't overflow the timeout int.
+ (extract_signed, extract_unsigned): New functions.
* dired.c (directory_files_internal, file_name_completion, scmp)
(file_name_completion_stat):
Use ptrdiff_t, not int, to avoid needless 32-bit limit on 64-bit hosts.
@@ -796,6 +790,539 @@
rather than rolling our own approximation.
(SCROLL_BAR_VEC_SIZE): Remove; not used.
+2012-05-25 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * fileio.c, character.h: Minor style tweaks.
+
+2012-05-24 Dmitry Antipov <dmantipov@yandex.ru>
+
+ * window.h (clip_changed): Remove useless declaration.
+
+2012-05-22 Juanma Barranquero <lekktu@gmail.com>
+
+ * makefile.w32-in: Follow-up to 2012-05-22T16:20:27Z!eggert@cs.ucla.edu.
+ (TAGS, TAGS-gmake, CONFIG_H): Remove further references to m/intel386.h.
+
+2012-05-22 Paul Eggert <eggert@cs.ucla.edu>
+
+ Remove src/m/*.
+ This directory predates autoconf and is no longer needed nowadays.
+ Move its few remaining bits of functionality to where they're needed.
+ * m/README, m/alpha.h, m/amdx86-64.h, m/ia64.h, m/ibmrs6000.h:
+ * m/ibms390x.h, m/intel386.h, m/m68k.h, m/macppc.h, m/sparc.h:
+ * m/template.h: Remove.
+ * Makefile.in (M_FILE): Remove. All uses removed.
+ * alloc.c (POINTERS_MIGHT_HIDE_IN_OBJECTS):
+ * lisp.h (USE_LSB_TAG):
+ * mem-limits.h (EXCEEDS_LISP_PTR):
+ Use VAL_MAX, not VALBITS, in #if.
+ * lisp.h (EMACS_INT_MAX): New macro, useful in #if.
+ (EMACS_UINT): Define unconditionally now.
+ (BITS_PER_CHAR, BITS_PER_SHORT, BITS_PER_INT, BITS_PER_LONG)
+ (BITS_PER_EMACS_INT): New constants, replacing
+ what used to be in config.h, but not useful in #if.
+ (GCTYPEBITS, VALBITS): Define unconditionally, since m/* files don't
+ define them any more.
+ (VAL_MAX): New macro.
+ (VALMASK): Use it.
+ * puresize.h (PURESIZE_RATIO): Use EMACS_INT_MAX, not
+ BITS_PER_EMACS_INT, in #if.
+ * s/aix4-2.h (BROKEN_FIONREAD, BROKEN_SIGAIO, BROKEN_SIGPTY)
+ (BROKEN_SIGPOLL): Move here from m/ibmrs6000.h, which was removed.
+ * s/gnu-linux.h (ULIMIT_BREAK_VALUE) [__i386__]:
+ * s/ms-w32.h (DATA_START):
+ Move here from removed file m/intel386.h.
+ * s/gnu.h (NLIST_STRUCT): Remove undef; 'configure' does this.
+ * s/irix6-5.h (_LP64): Remove; lisp.h no longer needs this.
+
+2012-05-21 Paul Eggert <eggert@cs.ucla.edu>
+
+ Assume C89 or later.
+ * alloc.c, buffer.c, lisp.h: Replace POINTER_TYPE with void.
+ * alloc.c (overrun_check_malloc, overrun_check_realloc, xmalloc)
+ (xrealloc):
+ * buffer.c (mmap_free_1, mmap_enlarge): Omit needless casts.
+ * editfns.c, fns.c, gmalloc.c, insdel.c, sysdep.c, termcap.c (NULL):
+ * textprop.c, tparam.c (NULL): Remove.
+ * ralloc.c, vm-limit.c (POINTER): Assume void * works.
+ * regex.c (SIGN_EXTEND_CHAR): Assume signed char works.
+ * regex.h (_RE_ARGS): Remove. All uses rewritten to use prototypes.
+ * unexelf.c (ElfBitsW): Assume c89 preprocessor or better.
+ * xterm.c (input_signal_count): Assume volatile works.
+
+2012-05-21 Ken Brown <kbrown@cornell.edu>
+
+ * xgselect.c (xg_select): Fix first argument in call to 'select'
+ (bug#11508).
+
+2012-05-20 Ken Brown <kbrown@cornell.edu>
+
+ * gmalloc.c (_free_internal_nolock, _realloc_internal_nolock)
+ [CYGWIN]: Cast ptr to (char *) before comparing to _heapbase.
+
+2012-05-19 Ken Brown <kbrown@cornell.edu>
+
+ * xfns.c (x_in_use): Remove `static' qualifier.
+ * xterm.h (x_in_use): Declare.
+ * xgselect.c: Include xterm.h.
+ (xg_select): Test `x_in_use' instead of `inhibit_window_system'
+ and `display_arg' (bug#9754).
+
+2012-05-19 Paul Eggert <eggert@cs.ucla.edu>
+
+ * s/ms-w32.h (HAVE_GETDOMAINNAME): Remove; not needed.
+
+ * m/vax.h: Remove; no longer needed since HAVE_FTIME is being removed.
+ * s/ms-w32.h (HAVE_FTIME): Remove; not needed.
+
+2012-05-18 Eli Zaretskii <eliz@gnu.org>
+
+ Fix compilation with -DGLYPH_DEBUG=1 on MS-Windows.
+
+ * w32term.c [GLYPH_DEBUG]: Add prototype for x_check_font.
+ (x_check_font) [GLYPH_DEBUG]: New function, copied from xterm.c
+
+ * w32fns.c (unwind_create_frame) [GLYPH_DEBUG]: Fix broken
+ reference to image_cache->refcount.
+ (x_create_tip_frame): Fix broken use of FRAME_IMAGE_CACHE.
+
+2012-05-17 Juri Linkov <juri@jurta.org>
+
+ * search.c (Fword_search_regexp, Fword_search_backward)
+ (Fword_search_forward, Fword_search_backward_lax)
+ (Fword_search_forward_lax): Move functions to isearch.el
+ (bug#10145, bug#11381).
+
+2012-05-16 Paul Eggert <eggert@cs.ucla.edu>
+
+ * xgselect.c (xg_select): Just invoke 'select' if -nw (Bug#9754).
+
+2012-05-15 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * lread.c (init_obarray): Declare Qt and Qnil as special.
+
+2012-05-14 Glenn Morris <rgm@gnu.org>
+
+ * nsterm.m (ns_init_paths): Fix typo ("libexec" not "lib-exec").
+ Put "libexec" before "bin", for the sake of init_callproc_1.
+
+2012-05-14 Paul Eggert <eggert@cs.ucla.edu>
+
+ * keyboard.c (kbd_buffer_get_event) [!HAVE_DBUS]: Omit unused local.
+
+ * unexaix.c: Port to more-recent AIX compilers.
+ (report_error, report_error_1, make_hdr, copy_sym)
+ (mark_x, adjust_lnnoptrs, unrelocate_symbols):
+ Make arguments const char *, not char *, to avoid violations of C
+ standard and to fix some AIX warnings reported by Gilles Pion.
+
+2012-05-14 Eli Zaretskii <eliz@gnu.org>
+
+ * xdisp.c (handle_stop): Don't call get_overlay_strings_1 if we
+ already have overlays loaded.
+ (handle_single_display_spec): Before returning without displaying
+ fringe bitmap, synchronize the bidi iterator with the main display
+ iterator, by calling iterate_out_of_display_property.
+ (iterate_out_of_display_property): Detect buffer iteration by
+ testing that it->string is a Lisp string.
+ (get_next_display_element): When the current object is exhausted,
+ and there's something on it->stack, call set_iterator_to_next to
+ proceed with what's on the stack, instead of returning zero.
+ (set_iterator_to_next): If called at the end of a Lisp string,
+ proceed to consider_string_end without incrementing string
+ position. Don't increment display vector index past the end of
+ the display vector. (Bug#11417)
+ (pos_visible_p): Don't report a position visible when move_it_to
+ stopped at the last line of window, which happens to be scanned
+ backwards by the bidi iteration. (Bug#11464)
+
+2012-05-14 Eli Zaretskii <eliz@gnu.org>
+
+ * xdisp.c (handle_single_display_spec): Return 1 for left-margin
+ and right-margin display specs even if the spec is invalid or we
+ are on a TTY, and thus unable to display on the fringes. That's
+ because the text with the property will not be displayed anyway,
+ so we need to signal to the caller that this is a "replacing"
+ display spec. This fixes display when the spec is invalid or we
+ are on a TTY.
+
+2012-05-14 Paul Eggert <eggert@cs.ucla.edu>
+
+ * unexaix.c (make_hdr): Fix typo in prototype.
+ This bug broke the build on AIX. Problem reported by Gilles Pion.
+
+2012-05-14 Michael Albinus <michael.albinus@gmx.de>
+
+ * keyboard.c (kbd_buffer_get_event): Read special events also in
+ batch mode. (Bug#11415)
+
+2012-05-12 Glenn Morris <rgm@gnu.org>
+
+ * ns.mk: Update for ns_appbindir no longer having trailing "/".
+
+2012-05-12 Eli Zaretskii <eliz@gnu.org>
+
+ * lisp.mk (lisp): Add newcomment.elc.
+
+2012-05-12 Glenn Morris <rgm@gnu.org>
+
+ * Makefile.in (MKDIR_P): New, set by configure.
+ * ns.mk (${ns_appdir}, ${ns_appbindir}Emacs): Use $MKDIR_P.
+
+2012-05-11 Paul Eggert <eggert@cs.ucla.edu>
+
+ Remove unused function hourglass_started.
+ * dispextern.h (hourglass_started):
+ * w32fns.c (hourglass_started):
+ * xdisp.c (hourglass_started): Remove.
+
+2012-05-10 Juanma Barranquero <lekktu@gmail.com>
+
+ * makefile.w32-in ($(BLD)/gmalloc.$(O), $(BLD)/w32menu.$(O)):
+ Update dependencies.
+
+2012-05-10 Paul Eggert <eggert@cs.ucla.edu>
+
+ * xgselect.c (xg_select): Put maxfds+1 into a var.
+ This is slightly clearer, and pacifies Ubuntu 12.04 gcc.
+
+ * sound.c (DEFAULT_ALSA_SOUND_DEVICE): Define only if HAVE_ALSA.
+
+2012-05-10 Dave Abrahams <dave@boostpro.com>
+
+ * filelock.c (syms_of_filelock): New boolean create-lockfiles.
+ (lock_file): If create_lockfiles is 0, do nothing. (Bug#11227)
+
+2012-05-09 Michael Albinus <michael.albinus@gmx.de>
+
+ * dbusbind.c (xd_registered_buses): New internal Lisp object.
+ Rename all occurences of Vdbus_registered_buses to xd_registered_buses.
+ (syms_of_dbusbind): Remove declaration of Vdbus_registered_buses.
+ Initialize xd_registered_buses.
+
+2012-05-09 Paul Eggert <eggert@cs.ucla.edu>
+
+ Untag more efficiently if USE_LSB_TAG.
+ This is based on a proposal by YAMAMOTO Mitsuharu in
+ <http://lists.gnu.org/archive/html/emacs-devel/2008-01/msg01876.html>.
+ For an admittedly artificial (nth 8000 longlist) benchmark on
+ Fedora 15 x86-64, this yields a 25% CPU speedup. Also, it shrinks
+ Emacs's overall text size by 1%.
+ * lisp.h (XUNTAG): New macro.
+ (XCONS, XVECTOR, XSTRING, XSYMBOL, XFLOAT, XMISC, XPROCESS, XWINDOW)
+ (XTERMINAL, XSUBR, XBUFFER, XCHAR_TABLE, XSUB_CHAR_TABLE, XBOOL_VECTOR)
+ (XSETTYPED_PSEUDOVECTOR, XHASH_TABLE, TYPED_PSEUDOVECTORP): Use it.
+ * eval.c (Fautoload):
+ * font.h (XFONT_SPEC, XFONT_ENTITY, XFONT_OBJECT):
+ * frame.h (XFRAME): Use XUNTAG.
+
+ Port recent dbusbind.c changes to 32-bit --with-wide-int.
+ * dbusbind.c (xd_append_arg, xd_retrieve_arg, Fdbus_message_internal):
+ Remove unportable assumptions about print widths of types like
+ dbus_uint32_t.
+ (xd_get_connection_address, Fdbus_init_bus): Cast Emacs integer to
+ intptr_t when converting between pointer and integer, to avoid GCC
+ warnings about wrong width.
+
+2012-05-09 Eli Zaretskii <eliz@gnu.org>
+
+ * w32proc.c (new_child): Force Windows to reserve only 64KB of
+ stack for each reader_thread, instead of defaulting to 8MB
+ determined by the linker. This avoids failures in creating
+ subprocesses on Windows 7, see the discussion in this thread:
+ http://lists.gnu.org/archive/html/emacs-devel/2012-03/msg00119.html.
+
+2012-05-07 Jérémy Compostella <jeremy.compostella@gmail.com>
+
+ Fix up display of the *Minibuf-0* buffer in the mini window.
+ * keyboard.c (read_char): Don't clear the echo area if there's no
+ message to clear.
+ * xdisp.c (redisplay_internal): Redisplay the mini window (with the
+ contents of *Minibuf-0*) if there's no message displayed in its stead.
+
+2012-05-07 Michael Albinus <michael.albinus@gmx.de>
+
+ * dbusbind.c (XD_DEBUG_MESSAGE): Don't print message twice in
+ batch mode.
+
+2012-05-06 Chong Yidong <cyd@gnu.org>
+
+ * lisp.mk (lisp): Update.
+
+2012-05-05 Jim Meyering <meyering@redhat.com>
+
+ * w32font.c (fill_in_logfont): NUL-terminate a string (Bug#11372).
+
+2012-05-04 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * data.c (PUT_ERROR): New macro.
+ (syms_of_data): Use it. Add new error type `user-error'.
+ * undo.c (user_error): New function.
+ (Fprimitive_undo): Use it.
+ * print.c (print_error_message): Adjust print style for `user-error'.
+ * keyboard.c (user_error): New function.
+ (Fexit_recursive_edit, Fabort_recursive_edit): Use it.
+
+2012-05-03 Paul Eggert <eggert@cs.ucla.edu>
+
+ Do not limit current-time-string to years 1000..9999.
+ * editfns.c (TM_YEAR_IN_ASCTIME_RANGE): Remove.
+ (Fcurrent_time_string): Support any year that is supported by the
+ underlying localtime representation. Don't use asctime, as it
+ has undefined behavior for years outside the range -999..9999.
+
+2012-05-02 Paul Eggert <eggert@cs.ucla.edu>
+
+ Fix race conditions involving setenv, gmtime, localtime, asctime.
+ Without this fix, interrupts could mess up code that uses these
+ nonreentrant functions, since setting TZ invalidates existing
+ tm_zone or tzname values, and since most of these functions return
+ pointers to static storage.
+ * editfns.c (format_time_string, Fdecode_time, Fencode_time)
+ (Fcurrent_time_string, Fcurrent_time_zone, Fset_time_zone_rule):
+ Grow the critical sections to include not just invoking
+ localtime/gmtime, but also accessing these functions' results
+ including their tm_zone values if any, and any related TZ setting.
+ (format_time_string): Last arg is now struct tm *, not struct tm **,
+ so that the struct tm is saved in the critical section.
+ All callers changed. Simplify allocation of initial buffer, partly
+ motivated by the fact that memory allocation needs to be outside
+ the critical section.
+
+2012-05-02 Dmitry Antipov <dmantipov@yandex.ru>
+
+ * intervals.c (adjust_intervals_for_insertion): Initialize `newi'
+ with RESET_INTERVAL.
+
+ * buffer.c (Fget_buffer_create, Fmake_indirect_buffer):
+ Remove duplicated buffer name initialization.
+
+2012-05-02 Jim Meyering <jim@meyering.net>
+
+ * xterm.c (x_term_init): Use memcpy instead of strncpy (Bug#11373).
+
+ * xfns.c (x_window): Use xstrdup (Bug#11375).
+
+2012-05-02 Eli Zaretskii <eliz@gnu.org>
+
+ * xdisp.c (pos_visible_p): If already at a newline from the
+ display string before the 'while' loop, don't walk back the glyphs
+ from it3.glyph_row. Solves assertion violation when the display
+ string begins with a newline (egg.el). (Bug#11367)
+
+2012-05-01 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * keyboard.c (Fexecute_extended_command, Vsuggest_key_bindings):
+ Move to simple.el.
+
+2012-05-01 Glenn Morris <rgm@gnu.org>
+
+ * syssignal.h: Remove reference to BROKEN_SIGINFO (last used in
+ s/ptx4.h), BROKEN_SIGTSTP (last used in m/ustation.h, m/dpx2.h),
+ and BROKEN_SIGURG (was in s/gnu-linux.h prior to 2008-02-10).
+ All were removed before 23.1.
+
+ * dispnew.c: Remove HAVE_LIBNCURSES test;
+ it is always true on relevant platforms.
+
+ * Makefile.in (LD_SWITCH_X_SITE_RPATH):
+ Rename from LD_SWITCH_X_SITE_AUX_RPATH.
+
+ * Makefile.in (LD_SWITCH_X_SITE_AUX): Remove; no longer used.
+
+2012-04-30 Andreas Schwab <schwab@linux-m68k.org>
+
+ * .gdbinit (xpr): Remove checks for no longer existing misc types.
+ (xintfwd, xboolfwd, xobjfwd, xbufobjfwd, xkbobjfwd, xbuflocal):
+ Remove.
+
+2012-04-28 Paul Eggert <eggert@cs.ucla.edu>
+
+ Do not avoid creating empty evaporating overlays (Bug#9642).
+ * buffer.c (Fmove_overlay): Revert the change of 2012-04-23.
+ That is, do not delete an evaporating overlay if it becomes
+ empty after its bounds are adjusted to fit within its buffer.
+ This fix caused other problems, and I'm reverting it until we get
+ to the bottom of them.
+
+2012-04-27 Chong Yidong <cyd@gnu.org>
+
+ * xselect.c (x_convert_selection): Initialize a pointer (Bug#11315).
+
+2012-04-27 Eli Zaretskii <eliz@gnu.org>
+
+ * xdisp.c (pos_visible_p): If the window start position is beyond
+ ZV, start the display from buffer beginning. Prevents assertion
+ violation in init_iterator when the minibuffer window is scrolled
+ via the scroll bar.
+
+ * window.c (window_scroll_pixel_based): Likewise.
+
+2012-04-27 Chong Yidong <cyd@gnu.org>
+
+ * keymap.c (where_is_internal): Doc fix (Bug#10872).
+
+2012-04-27 Glenn Morris <rgm@gnu.org>
+
+ * fileio.c (Fcopy_file, Fset_file_selinux_context):
+ Ignore ENOTSUP failures from setfilecon functions. (Bug#11245)
+
+2012-04-27 Eli Zaretskii <eliz@gnu.org>
+
+ * dispnew.c (swap_glyph_pointers, copy_row_except_pointers):
+ Don't overrun array limits of glyph row's used[] array. (Bug#11288)
+
+2012-04-26 Eli Zaretskii <eliz@gnu.org>
+
+ * xdisp.c (IT_DISPLAYING_WHITESPACE): In addition to the loaded
+ display element, check also the underlying string or buffer
+ character. (Bug#11341)
+
+ * w32menu.c: Include w32heap.h.
+ (add_menu_item): If the call to AppendMenuW (via
+ unicode_append_menu) fails, disable Unicode menus only if we are
+ running on Windows 9X/Me.
+
+2012-04-24 Andreas Schwab <schwab@linux-m68k.org>
+
+ * .gdbinit (xpr): Handle USE_2_TAGS_FOR_INTS.
+ (xgetint): Add missing shift for LSB tags.
+
+2012-04-24 Martin Rudalics <rudalics@gmx.at>
+
+ * keyboard.c (read_char): Don't wipe echo area for select window
+ events: These might get delayed via `mouse-autoselect-window'
+ (Bug#11304).
+
+2012-04-24 Juanma Barranquero <lekktu@gmail.com>
+
+ * gnutls.c (init_gnutls_functions): Protect against (unlikely)
+ manipulation of :loaded-from data.
+
+2012-04-23 Juanma Barranquero <lekktu@gmail.com>
+
+ * gnutls.c (init_gnutls_functions): The value of :loaded-from is
+ now a cons (bug#11311).
+
+2012-04-23 Paul Eggert <eggert@cs.ucla.edu>
+
+ Do not create empty overlays with the evaporate property (Bug#9642).
+ * buffer.c (Fmove_overlay): Delete an evaporating overlay
+ if it becomes empty after its bounds are adjusted to fit within
+ its buffer. Without this fix, in a nonempty buffer (let ((o
+ (make-overlay 1 2))) (overlay-put o 'evaporate t) (move-overlay o 0 1))
+ yields an empty overlay that has the evaporate property, which is
+ not supposed to happen.
+
+ Fix minor GTK3 problems found by static checking.
+ * emacsgtkfixed.c (EMACS_TYPE_FIXED, EMACS_FIXED, EmacsFixed)
+ (EmacsFixedPrivate, EmacsFixedClass, struct _EmacsFixed)
+ (struct _EmacsFixedClass, emacs_fixed_get_type):
+ Move decls here from emacsgtkfixed.h, since they needn't be public.
+ (emacs_fixed_get_type): Now static.
+ (emacs_fixed_class_init): Omit unused local.
+ (emacs_fixed_child_type): Remove; unused.
+ * emacsgtkfixed.h (EMACS_TYPE_FIXED, EMACS_FIXED, EmacsFixed)
+ (EmacsFixedPrivate, EmacsFixedClass, struct _EmacsFixed)
+ (struct _EmacsFixedClass): Move to emacsgtkfixed.c.
+ (EMACS_FIXED_CLASS, EMACS_IS_FIXED, EMACS_IS_FIXED_CLASS)
+ (EMACS_FIXED_GET_CLASS): Remove; unused.
+ * gtkutil.c (xg_create_frame_widgets) [!HAVE_GTK3]: Omit unused local.
+
+ * keyboard.c (handle_async_input): Define only if SYNC_INPUT || SIGIO.
+ Problem reported by Juanma Barranquero for Windows -Wunused-function.
+
+2012-04-22 Paul Eggert <eggert@cs.ucla.edu>
+
+ Modernize and clean up gmalloc.c to assume C89 (Bug#9119).
+ * gmalloc.c (_MALLOC_INTERNAL, _MALLOC_H, _PP, __ptr_t)
+ (__malloc_size_t, __malloc_ptrdiff_t):
+ Remove. All uses removed, replaced by the definiens if needed,
+ since we can assume C89 or better now.
+ Include <stdint.h>, for PTRDIFF_MAX, uintptr_t.
+ (protect_malloc_state, align, get_contiguous_space)
+ (malloc_atfork_handler_prepare, malloc_atfork_handler_parent)
+ (malloc_atfork_handler_child, malloc_enable_thread)
+ (malloc_initialize_1, __malloc_initialize, morecore_nolock)
+ (_malloc_internal_nolock, _malloc_internal, malloc, _malloc)
+ (_free, _realloc, _free_internal_nolock, _free_internal, free, cfree)
+ (special_realloc, _realloc_internal_nolock, _realloc_internal)
+ (realloc, calloc, __default_morecore, memalign, valloc, checkhdr)
+ (freehook, mallochook, reallochook, mabort, mcheck, mprobe):
+ Define using prototypes, not old style.
+ (align, _malloc_internal_nolock, _free_internal_nolock, memalign):
+ Don't assume ptrdiff_t and uintptr_t are no wider than unsigned long.
+ (align): Don't assume that signed integer overflow wraps around.
+ Omit unused local var.
+ (malloc_initialize_1, morecore_nolock, _malloc_internal_nolock)
+ (_free_internal_nolock, memalign, mallochook, reallochook):
+ Omit no-longer-needed casts.
+ (valloc): Use getpagesize, not __getpagesize.
+ (MAGICWORD, MAGICFREE): Now randomish size_t values, not 32-bit.
+ (struct hdr): The 'magic' member is now size_t, not unsigned long.
+
+ * dbusbind.c (XD_DBUS_VALIDATE_OBJECT): Define only if needed.
+
+2012-04-22 Michael Albinus <michael.albinus@gmx.de>
+
+ Move functions from C to Lisp. Make non-blocking method calls
+ the default. Implement further D-Bus standard interfaces.
+
+ * dbusbind.c (DBUS_NUM_MESSAGE_TYPES): Declare.
+ (QCdbus_request_name_allow_replacement)
+ (QCdbus_request_name_replace_existing)
+ (QCdbus_request_name_do_not_queue)
+ (QCdbus_request_name_reply_primary_owner)
+ (QCdbus_request_name_reply_in_queue)
+ (QCdbus_request_name_reply_exists)
+ (QCdbus_request_name_reply_already_owner): Move to dbus.el.
+ (QCdbus_registered_serial, QCdbus_registered_method)
+ (QCdbus_registered_signal): New Lisp objects.
+ (XD_DEBUG_MESSAGE): Use sizeof.
+ (XD_MESSAGE_TYPE_TO_STRING, XD_OBJECT_TO_STRING)
+ (XD_DBUS_VALIDATE_BUS_ADDRESS, XD_DBUS_VALIDATE_OBJECT)
+ (XD_DBUS_VALIDATE_BUS_NAME, XD_DBUS_VALIDATE_PATH)
+ (XD_DBUS_VALIDATE_INTERFACE, XD_DBUS_VALIDATE_MEMBER): New macros.
+ (XD_CHECK_DBUS_SERIAL): Rename from CHECK_DBUS_SERIAL_GET_SERIAL.
+ (xd_signature, xd_append_arg): Allow float for integer types.
+ (xd_get_connection_references): New function.
+ (xd_get_connection_address): Rename from xd_initialize.
+ Return cached address.
+ (xd_remove_watch): Do not unset $DBUS_SESSION_BUS_ADDRESS.
+ (xd_close_bus): Rename from Fdbus_close_bus. Not needed on Lisp
+ level.
+ (Fdbus_init_bus): New optional arg PRIVATE. Cache address.
+ Return number of refcounts.
+ (Fdbus_get_unique_name): Make stronger parameter check.
+ (Fdbus_message_internal): New defun.
+ (Fdbus_call_method, Fdbus_call_method_asynchronously)
+ (Fdbus_method_return_internal, Fdbus_method_error_internal)
+ (Fdbus_send_signal, Fdbus_register_service)
+ (Fdbus_register_signal, Fdbus_register_method): Move to dbus.el.
+ (xd_read_message_1): Obey new structure of Vdbus_registered_objects.
+ (xd_read_queued_messages): Obey new structure of Vdbus_registered_buses.
+ (Vdbus_compiled_version, Vdbus_runtime_version)
+ (Vdbus_message_type_invalid, Vdbus_message_type_method_call)
+ (Vdbus_message_type_method_return, Vdbus_message_type_error)
+ (Vdbus_message_type_signal): New defvars.
+ (Vdbus_registered_buses, Vdbus_registered_objects_table):
+ Adapt docstring.
+
+2012-04-22 Paul Eggert <eggert@cs.ucla.edu>
+
+ Fix GC_MALLOC_CHECK debugging output on 64-bit hosts.
+ * alloc.c (emacs_blocked_malloc) [GC_MALLOC_CHECK]:
+ Do not assume ptrdiff_t is the same width as 'int'.
+
+ * alloc.c: Handle unusual debugging option combinations.
+ (GC_CHECK_MARKED_OBJECTS): Undef if ! GC_MARK_STACK,
+ since the two debugging options are incompatible.
+ (GC_MALLOC_CHECK): Similarly, undef if GC_CHECK_MARKED_OBJECTS
+ is defined.
+ (mem_init, mem_insert, mem_insert_fixup):
+ Define if GC_MARK_STACK || GC_MALLOC_CHECK.
+ (NEED_MEM_INSERT): Remove; no longer needed.
+
2012-04-22 Leo Liu <sdl.web@gmail.com>
* sysdep.c (list_system_processes): Support Darwin (Bug#5725).
@@ -809,8 +1336,8 @@
2012-04-21 Eduard Wiebe <usenet@pusto.de>
- * sysdep.c (list_system_processes, system_process_attributes): Add
- implementation for FreeBSD (Bug#5243).
+ * sysdep.c (list_system_processes, system_process_attributes):
+ Add implementation for FreeBSD (Bug#5243).
2012-04-21 Andreas Schwab <schwab@linux-m68k.org>
diff --git a/src/Makefile.in b/src/Makefile.in
index 37480f8269d..27199578fc0 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -40,6 +40,7 @@ version = @version@
# Substitute an assignment for the MAKE variable, because
# BSD doesn't have it as a default.
@SET_MAKE@
+MKDIR_P = @MKDIR_P@
# Don't use LIBS. configure puts stuff in it that either shouldn't be
# linked with Emacs or is duplicated by the other stuff below.
# LIBS = @LIBS@
@@ -55,9 +56,8 @@ lwlibdir = ../lwlib
lispdir = ../lisp
# Configuration files for .o files to depend on.
-M_FILE = @M_FILE@
S_FILE = @S_FILE@
-config_h = config.h $(M_FILE) $(S_FILE)
+config_h = config.h $(S_FILE)
bootstrap_exe = $(abs_builddir)/bootstrap-emacs$(EXEEXT)
@@ -94,11 +94,9 @@ C_SWITCH_X_SITE=@C_SWITCH_X_SITE@
## substituted in this or any other Makefile. Cf C_SWITCH_X_SITE.
LD_SWITCH_X_SITE=
-## Next two must come before LD_SWITCH_SYSTEM.
-## If needed, a -R option that says where to find X windows at run time.
-LD_SWITCH_X_SITE_AUX=@LD_SWITCH_X_SITE_AUX@
-## As above, but using -rpath instead.
-LD_SWITCH_X_SITE_AUX_RPATH=@LD_SWITCH_X_SITE_AUX_RPATH@
+## This must come before LD_SWITCH_SYSTEM.
+## If needed, a -rpath option that says where to find X windows at run time.
+LD_SWITCH_X_SITE_RPATH=@LD_SWITCH_X_SITE_RPATH@
## System-specific LDFLAGS.
LD_SWITCH_SYSTEM=@LD_SWITCH_SYSTEM@
@@ -286,7 +284,7 @@ CANNOT_DUMP=@CANNOT_DUMP@
DEPDIR=deps
## -MMD -MF $(DEPDIR)/$*.d if AUTO_DEPEND; else empty.
DEPFLAGS=@DEPFLAGS@
-## test -d $(DEPDIR) || mkdir $(DEPDIR) (if AUTO_DEPEND); else ':'.
+## ${MKDIR_P} ${DEPDIR} (if AUTO_DEPEND); else ':'.
MKDEPDIR=@MKDEPDIR@
## DO NOT use -R. There is a special hack described in lastfile.c
@@ -535,10 +533,10 @@ extraclean: distclean
ctagsfiles1 = [xyzXYZ]*.[hcm]
ctagsfiles2 = [a-wA-W]*.[hcm]
-TAGS: $(srcdir)/$(ctagsfiles1) $(srcdir)/$(ctagsfiles2) $(M_FILE) $(S_FILE)
+TAGS: $(srcdir)/$(ctagsfiles1) $(srcdir)/$(ctagsfiles2) $(S_FILE)
../lib-src/etags --include=TAGS-LISP --include=$(lwlibdir)/TAGS \
--regex='/[ ]*DEFVAR_[A-Z_ (]+"\([^"]+\)"/' \
- $(srcdir)/$(ctagsfiles1) $(srcdir)/$(ctagsfiles2) $(M_FILE) $(S_FILE)
+ $(srcdir)/$(ctagsfiles1) $(srcdir)/$(ctagsfiles2) $(S_FILE)
frc:
TAGS-LISP: frc
$(MAKE) -f $(lispdir)/Makefile TAGS-LISP ETAGS=../lib-src/etags
diff --git a/src/alloc.c b/src/alloc.c
index c07d5c929f9..05d2db274da 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -49,16 +49,24 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#include <setjmp.h>
#include <verify.h>
+/* GC_CHECK_MARKED_OBJECTS means do sanity checks on allocated objects.
+ Doable only if GC_MARK_STACK. */
+#if ! GC_MARK_STACK
+# undef GC_CHECK_MARKED_OBJECTS
+#endif
+
/* GC_MALLOC_CHECK defined means perform validity checks of malloc'd
- memory. Can do this only if using gmalloc.c. */
+ memory. Can do this only if using gmalloc.c and if not checking
+ marked objects. */
-#if defined SYSTEM_MALLOC || defined DOUG_LEA_MALLOC
+#if (defined SYSTEM_MALLOC || defined DOUG_LEA_MALLOC \
+ || defined GC_CHECK_MARKED_OBJECTS)
#undef GC_MALLOC_CHECK
#endif
#include <unistd.h>
#ifndef HAVE_UNISTD_H
-extern POINTER_TYPE *sbrk ();
+extern void *sbrk ();
#endif
#include <fcntl.h>
@@ -298,7 +306,7 @@ enum mem_type
MEM_TYPE_VECTORLIKE
};
-static POINTER_TYPE *lisp_malloc (size_t, enum mem_type);
+static void *lisp_malloc (size_t, enum mem_type);
#if GC_MARK_STACK || defined GC_MALLOC_CHECK
@@ -380,7 +388,7 @@ static struct mem_node mem_z;
#define MEM_NIL &mem_z
static struct Lisp_Vector *allocate_vectorlike (ptrdiff_t);
-static void lisp_free (POINTER_TYPE *);
+static void lisp_free (void *);
static void mark_stack (void);
static int live_vector_p (struct mem_node *, void *);
static int live_buffer_p (struct mem_node *, void *);
@@ -391,11 +399,8 @@ static int live_float_p (struct mem_node *, void *);
static int live_misc_p (struct mem_node *, void *);
static void mark_maybe_object (Lisp_Object);
static void mark_memory (void *, void *);
+#if GC_MARK_STACK || defined GC_MALLOC_CHECK
static void mem_init (void);
-#if (defined GC_MALLOC_CHECK \
- ? !defined SYSTEM_MALLOC && !defined SYNC_INPUT \
- : GC_MARK_STACK)
-# define NEED_MEM_INSERT
static struct mem_node *mem_insert (void *, void *, enum mem_type);
static void mem_insert_fixup (struct mem_node *);
#endif
@@ -430,15 +435,15 @@ static Lisp_Object *staticvec[NSTATICS] = {&Vpurify_flag};
static int staticidx = 0;
-static POINTER_TYPE *pure_alloc (size_t, int);
+static void *pure_alloc (size_t, int);
/* Value is SZ rounded up to the next multiple of ALIGNMENT.
ALIGNMENT must be a power of 2. */
#define ALIGN(ptr, ALIGNMENT) \
- ((POINTER_TYPE *) ((((uintptr_t) (ptr)) + (ALIGNMENT) - 1) \
- & ~((ALIGNMENT) - 1)))
+ ((void *) (((uintptr_t) (ptr) + (ALIGNMENT) - 1) \
+ & ~ ((ALIGNMENT) - 1)))
@@ -599,7 +604,7 @@ static ptrdiff_t check_depth;
/* Like malloc, but wraps allocated block with header and trailer. */
-static POINTER_TYPE *
+static void *
overrun_check_malloc (size_t size)
{
register unsigned char *val;
@@ -617,15 +622,15 @@ overrun_check_malloc (size_t size)
XMALLOC_OVERRUN_CHECK_SIZE);
}
--check_depth;
- return (POINTER_TYPE *)val;
+ return val;
}
/* Like realloc, but checks old block for overrun, and wraps new block
with header and trailer. */
-static POINTER_TYPE *
-overrun_check_realloc (POINTER_TYPE *block, size_t size)
+static void *
+overrun_check_realloc (void *block, size_t size)
{
register unsigned char *val = (unsigned char *) block;
int overhead = ++check_depth == 1 ? XMALLOC_OVERRUN_CHECK_OVERHEAD : 0;
@@ -647,7 +652,7 @@ overrun_check_realloc (POINTER_TYPE *block, size_t size)
memset (val, 0, XMALLOC_OVERRUN_CHECK_SIZE + XMALLOC_OVERRUN_SIZE_SIZE);
}
- val = (unsigned char *) realloc ((POINTER_TYPE *)val, size + overhead);
+ val = realloc (val, size + overhead);
if (val && check_depth == 1)
{
@@ -658,13 +663,13 @@ overrun_check_realloc (POINTER_TYPE *block, size_t size)
XMALLOC_OVERRUN_CHECK_SIZE);
}
--check_depth;
- return (POINTER_TYPE *)val;
+ return val;
}
/* Like free, but checks block for overrun. */
static void
-overrun_check_free (POINTER_TYPE *block)
+overrun_check_free (void *block)
{
unsigned char *val = (unsigned char *) block;
@@ -713,13 +718,13 @@ overrun_check_free (POINTER_TYPE *block)
/* Like malloc but check for no memory and block interrupt input.. */
-POINTER_TYPE *
+void *
xmalloc (size_t size)
{
- register POINTER_TYPE *val;
+ void *val;
MALLOC_BLOCK_INPUT;
- val = (POINTER_TYPE *) malloc (size);
+ val = malloc (size);
MALLOC_UNBLOCK_INPUT;
if (!val && size)
@@ -730,18 +735,18 @@ xmalloc (size_t size)
/* Like realloc but check for no memory and block interrupt input.. */
-POINTER_TYPE *
-xrealloc (POINTER_TYPE *block, size_t size)
+void *
+xrealloc (void *block, size_t size)
{
- register POINTER_TYPE *val;
+ void *val;
MALLOC_BLOCK_INPUT;
/* We must call malloc explicitly when BLOCK is 0, since some
reallocs don't do this. */
if (! block)
- val = (POINTER_TYPE *) malloc (size);
+ val = malloc (size);
else
- val = (POINTER_TYPE *) realloc (block, size);
+ val = realloc (block, size);
MALLOC_UNBLOCK_INPUT;
if (!val && size)
@@ -753,7 +758,7 @@ xrealloc (POINTER_TYPE *block, size_t size)
/* Like free but block interrupt input. */
void
-xfree (POINTER_TYPE *block)
+xfree (void *block)
{
if (!block)
return;
@@ -888,7 +893,7 @@ safe_alloca_unwind (Lisp_Object arg)
static void *lisp_malloc_loser;
#endif
-static POINTER_TYPE *
+static void *
lisp_malloc (size_t nbytes, enum mem_type type)
{
register void *val;
@@ -933,7 +938,7 @@ lisp_malloc (size_t nbytes, enum mem_type type)
call to lisp_malloc. */
static void
-lisp_free (POINTER_TYPE *block)
+lisp_free (void *block)
{
MALLOC_BLOCK_INPUT;
free (block);
@@ -1029,7 +1034,7 @@ static struct ablock *free_ablock;
/* Allocate an aligned block of nbytes.
Alignment is on a multiple of BLOCK_ALIGN and `nbytes' has to be
smaller or equal to BLOCK_BYTES. */
-static POINTER_TYPE *
+static void *
lisp_align_malloc (size_t nbytes, enum mem_type type)
{
void *base, *val;
@@ -1136,7 +1141,7 @@ lisp_align_malloc (size_t nbytes, enum mem_type type)
}
static void
-lisp_align_free (POINTER_TYPE *block)
+lisp_align_free (void *block)
{
struct ablock *ablock = block;
struct ablocks *abase = ABLOCK_ABASE (ablock);
@@ -1309,7 +1314,7 @@ emacs_blocked_malloc (size_t size, const void *ptr)
{
fprintf (stderr, "Malloc returned %p which is already in use\n",
value);
- fprintf (stderr, "Region in use is %p...%p, %u bytes, type %d\n",
+ fprintf (stderr, "Region in use is %p...%p, %td bytes, type %d\n",
m->start, m->end, (char *) m->end - (char *) m->start,
m->type);
abort ();
@@ -3579,8 +3584,6 @@ mem_find (void *start)
}
-#ifdef NEED_MEM_INSERT
-
/* Insert a new node into the tree for a block of memory with start
address START, end address END, and type TYPE. Value is a
pointer to the node that was inserted. */
@@ -3728,8 +3731,6 @@ mem_insert_fixup (struct mem_node *x)
mem_root->color = MEM_BLACK;
}
-#endif /* NEED_MEM_INSERT */
-
/* (x) (y)
/ \ / \
@@ -4297,8 +4298,8 @@ mark_maybe_pointer (void *p)
wider than a pointer might allocate a Lisp_Object in non-adjacent halves.
If USE_LSB_TAG, the bottom half is not a valid pointer, but it should
suffice to widen it to to a Lisp_Object and check it that way. */
-#if defined USE_LSB_TAG || UINTPTR_MAX >> VALBITS != 0
-# if !defined USE_LSB_TAG && UINTPTR_MAX >> VALBITS >> GCTYPEBITS != 0
+#if defined USE_LSB_TAG || VAL_MAX < UINTPTR_MAX
+# if !defined USE_LSB_TAG && VAL_MAX < UINTPTR_MAX >> GCTYPEBITS
/* If tag bits straddle pointer-word boundaries, neither mark_maybe_pointer
nor mark_maybe_object can follow the pointers. This should not occur on
any practical porting target. */
@@ -4722,10 +4723,10 @@ valid_lisp_object_p (Lisp_Object obj)
pointer to it. TYPE is the Lisp type for which the memory is
allocated. TYPE < 0 means it's not used for a Lisp object. */
-static POINTER_TYPE *
+static void *
pure_alloc (size_t size, int type)
{
- POINTER_TYPE *result;
+ void *result;
#ifdef USE_LSB_TAG
size_t alignment = (1 << GCTYPEBITS);
#else
@@ -5838,7 +5839,7 @@ mark_buffer (Lisp_Object buf)
}
/* Mark the Lisp pointers in the terminal objects.
- Called by the Fgarbage_collector. */
+ Called by Fgarbage_collect. */
static void
mark_terminals (void)
diff --git a/src/buffer.c b/src/buffer.c
index d3d5bd268a2..dbaa9f0cc82 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -392,7 +392,6 @@ even if it is dead. The return value is never nil. */)
BVAR (b, mark) = Fmake_marker ();
BUF_MARKERS (b) = NULL;
- BVAR (b, name) = name;
/* Put this in the alist of all live buffers. */
XSETBUFFER (buffer, b);
@@ -612,7 +611,6 @@ CLONE nil means the indirect buffer's state is reset to default values. */)
Vbuffer_alist = nconc2 (Vbuffer_alist, Fcons (Fcons (name, buf), Qnil));
BVAR (b, mark) = Fmake_marker ();
- BVAR (b, name) = name;
/* The multibyte status belongs to the base buffer. */
BVAR (b, enable_multibyte_characters) = BVAR (b->base_buffer, enable_multibyte_characters);
@@ -2052,10 +2050,10 @@ DEFUN ("buffer-swap-text", Fbuffer_swap_text, Sbuffer_swap_text,
eassert (current_buffer->text == &current_buffer->own_text);
eassert (other_buffer->text == &other_buffer->own_text);
#ifdef REL_ALLOC
- r_alloc_reset_variable ((POINTER_TYPE **) &current_buffer->own_text.beg,
- (POINTER_TYPE **) &other_buffer->own_text.beg);
- r_alloc_reset_variable ((POINTER_TYPE **) &other_buffer->own_text.beg,
- (POINTER_TYPE **) &current_buffer->own_text.beg);
+ r_alloc_reset_variable ((void **) &current_buffer->own_text.beg,
+ (void **) &other_buffer->own_text.beg);
+ r_alloc_reset_variable ((void **) &other_buffer->own_text.beg,
+ (void **) &current_buffer->own_text.beg);
#endif /* REL_ALLOC */
swapfield (pt, ptrdiff_t);
@@ -4384,7 +4382,7 @@ struct mmap_region
/* Pointer to the location holding the address of the memory
allocated with the mmap'd block. The variable actually points
after this structure. */
- POINTER_TYPE **var;
+ void **var;
/* Next and previous in list of all mmap'd regions. */
struct mmap_region *next, *prev;
@@ -4431,7 +4429,7 @@ static int mmap_initialized_p;
to the start of the user-visible part of the region. */
#define MMAP_USER_AREA(P) \
- ((POINTER_TYPE *) ((char *) (P) + MMAP_REGION_STRUCT_SIZE))
+ ((void *) ((char *) (P) + MMAP_REGION_STRUCT_SIZE))
#define MEM_ALIGN sizeof (double)
@@ -4480,7 +4478,7 @@ mmap_init (void)
is at END - 1. */
static struct mmap_region *
-mmap_find (POINTER_TYPE *start, POINTER_TYPE *end)
+mmap_find (void *start, void *end)
{
struct mmap_region *r;
char *s = (char *) start, *e = (char *) end;
@@ -4518,7 +4516,7 @@ mmap_free_1 (struct mmap_region *r)
else
mmap_regions = r->next;
- if (munmap ((POINTER_TYPE *) r, r->nbytes_mapped) == -1)
+ if (munmap (r, r->nbytes_mapped) == -1)
{
fprintf (stderr, "munmap: %s\n", emacs_strerror (errno));
return 0;
@@ -4560,13 +4558,13 @@ mmap_enlarge (struct mmap_region *r, int npages)
I'm not sure this is worth doing, let's see. */
if (!MMAP_ALLOCATED_P (region_end, region_end + nbytes))
{
- POINTER_TYPE *p;
+ void *p;
p = mmap (region_end, nbytes, PROT_READ | PROT_WRITE,
MAP_ANON | MAP_PRIVATE | MAP_FIXED, mmap_fd, 0);
if (p == MAP_FAILED)
; /* fprintf (stderr, "mmap: %s\n", emacs_strerror (errno)); */
- else if (p != (POINTER_TYPE *) region_end)
+ else if (p != region_end)
{
/* Kernels are free to choose a different address. In
that case, unmap what we've mapped above; we have
@@ -4628,8 +4626,8 @@ mmap_set_vars (int restore_p)
If we can't allocate the necessary memory, set *VAR to null, and
return null. */
-static POINTER_TYPE *
-mmap_alloc (POINTER_TYPE **var, size_t nbytes)
+static void *
+mmap_alloc (void **var, size_t nbytes)
{
void *p;
size_t map;
@@ -4670,7 +4668,7 @@ mmap_alloc (POINTER_TYPE **var, size_t nbytes)
PTR. Store 0 in *PTR to show there's no block allocated. */
static void
-mmap_free (POINTER_TYPE **var)
+mmap_free (void **var)
{
mmap_init ();
@@ -4687,10 +4685,10 @@ mmap_free (POINTER_TYPE **var)
and return this value. If more memory cannot be allocated, then
leave *VAR unchanged, and return null. */
-static POINTER_TYPE *
-mmap_realloc (POINTER_TYPE **var, size_t nbytes)
+static void *
+mmap_realloc (void **var, size_t nbytes)
{
- POINTER_TYPE *result;
+ void *result;
mmap_init ();
@@ -4709,7 +4707,7 @@ mmap_realloc (POINTER_TYPE **var, size_t nbytes)
if (room < nbytes)
{
/* Must enlarge. */
- POINTER_TYPE *old_ptr = *var;
+ void *old_ptr = *var;
/* Try to map additional pages at the end of the region.
If that fails, allocate a new region, copy data
@@ -4771,13 +4769,13 @@ mmap_realloc (POINTER_TYPE **var, size_t nbytes)
static void
alloc_buffer_text (struct buffer *b, ptrdiff_t nbytes)
{
- POINTER_TYPE *p;
+ void *p;
BLOCK_INPUT;
#if defined USE_MMAP_FOR_BUFFERS
- p = mmap_alloc ((POINTER_TYPE **) &b->text->beg, nbytes);
+ p = mmap_alloc ((void **) &b->text->beg, nbytes);
#elif defined REL_ALLOC
- p = r_alloc ((POINTER_TYPE **) &b->text->beg, nbytes);
+ p = r_alloc ((void **) &b->text->beg, nbytes);
#else
p = xmalloc (nbytes);
#endif
@@ -4798,14 +4796,14 @@ alloc_buffer_text (struct buffer *b, ptrdiff_t nbytes)
void
enlarge_buffer_text (struct buffer *b, ptrdiff_t delta)
{
- POINTER_TYPE *p;
+ void *p;
ptrdiff_t nbytes = (BUF_Z_BYTE (b) - BUF_BEG_BYTE (b) + BUF_GAP_SIZE (b) + 1
+ delta);
BLOCK_INPUT;
#if defined USE_MMAP_FOR_BUFFERS
- p = mmap_realloc ((POINTER_TYPE **) &b->text->beg, nbytes);
+ p = mmap_realloc ((void **) &b->text->beg, nbytes);
#elif defined REL_ALLOC
- p = r_re_alloc ((POINTER_TYPE **) &b->text->beg, nbytes);
+ p = r_re_alloc ((void **) &b->text->beg, nbytes);
#else
p = xrealloc (b->text->beg, nbytes);
#endif
@@ -4829,9 +4827,9 @@ free_buffer_text (struct buffer *b)
BLOCK_INPUT;
#if defined USE_MMAP_FOR_BUFFERS
- mmap_free ((POINTER_TYPE **) &b->text->beg);
+ mmap_free ((void **) &b->text->beg);
#elif defined REL_ALLOC
- r_alloc_free ((POINTER_TYPE **) &b->text->beg);
+ r_alloc_free ((void **) &b->text->beg);
#else
xfree (b->text->beg);
#endif
diff --git a/src/character.h b/src/character.h
index 8a0f2d4c3f6..a64b48d896c 100644
--- a/src/character.h
+++ b/src/character.h
@@ -434,7 +434,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
unsigned char *chp = BYTE_POS_ADDR (BYTEIDX); \
int chlen; \
\
- OUTPUT= STRING_CHAR_AND_LENGTH (chp, chlen); \
+ OUTPUT = STRING_CHAR_AND_LENGTH (chp, chlen); \
BYTEIDX += chlen; \
} \
else \
diff --git a/src/data.c b/src/data.c
index 7c0d1830344..11660a2483d 100644
--- a/src/data.c
+++ b/src/data.c
@@ -51,7 +51,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
Lisp_Object Qnil, Qt, Qquote, Qlambda, Qunbound;
static Lisp_Object Qsubr;
Lisp_Object Qerror_conditions, Qerror_message, Qtop_level;
-Lisp_Object Qerror, Qquit, Qargs_out_of_range;
+Lisp_Object Qerror, Quser_error, Qquit, Qargs_out_of_range;
static Lisp_Object Qwrong_type_argument;
Lisp_Object Qvoid_variable, Qvoid_function;
static Lisp_Object Qcyclic_function_indirection;
@@ -2938,6 +2938,7 @@ syms_of_data (void)
DEFSYM (Qtop_level, "top-level");
DEFSYM (Qerror, "error");
+ DEFSYM (Quser_error, "user-error");
DEFSYM (Qquit, "quit");
DEFSYM (Qwrong_type_argument, "wrong-type-argument");
DEFSYM (Qargs_out_of_range, "args-out-of-range");
@@ -3005,102 +3006,42 @@ syms_of_data (void)
Fput (Qerror, Qerror_message,
make_pure_c_string ("error"));
- Fput (Qquit, Qerror_conditions,
- pure_cons (Qquit, Qnil));
- Fput (Qquit, Qerror_message,
- make_pure_c_string ("Quit"));
-
- Fput (Qwrong_type_argument, Qerror_conditions,
- pure_cons (Qwrong_type_argument, error_tail));
- Fput (Qwrong_type_argument, Qerror_message,
- make_pure_c_string ("Wrong type argument"));
-
- Fput (Qargs_out_of_range, Qerror_conditions,
- pure_cons (Qargs_out_of_range, error_tail));
- Fput (Qargs_out_of_range, Qerror_message,
- make_pure_c_string ("Args out of range"));
-
- Fput (Qvoid_function, Qerror_conditions,
- pure_cons (Qvoid_function, error_tail));
- Fput (Qvoid_function, Qerror_message,
- make_pure_c_string ("Symbol's function definition is void"));
-
- Fput (Qcyclic_function_indirection, Qerror_conditions,
- pure_cons (Qcyclic_function_indirection, error_tail));
- Fput (Qcyclic_function_indirection, Qerror_message,
- make_pure_c_string ("Symbol's chain of function indirections contains a loop"));
-
- Fput (Qcyclic_variable_indirection, Qerror_conditions,
- pure_cons (Qcyclic_variable_indirection, error_tail));
- Fput (Qcyclic_variable_indirection, Qerror_message,
- make_pure_c_string ("Symbol's chain of variable indirections contains a loop"));
-
+#define PUT_ERROR(sym, tail, msg) \
+ Fput (sym, Qerror_conditions, pure_cons (sym, tail)); \
+ Fput (sym, Qerror_message, make_pure_c_string (msg))
+
+ PUT_ERROR (Qquit, Qnil, "Quit");
+
+ PUT_ERROR (Quser_error, error_tail, "");
+ PUT_ERROR (Qwrong_type_argument, error_tail, "Wrong type argument");
+ PUT_ERROR (Qargs_out_of_range, error_tail, "Args out of range");
+ PUT_ERROR (Qvoid_function, error_tail,
+ "Symbol's function definition is void");
+ PUT_ERROR (Qcyclic_function_indirection, error_tail,
+ "Symbol's chain of function indirections contains a loop");
+ PUT_ERROR (Qcyclic_variable_indirection, error_tail,
+ "Symbol's chain of variable indirections contains a loop");
DEFSYM (Qcircular_list, "circular-list");
- Fput (Qcircular_list, Qerror_conditions,
- pure_cons (Qcircular_list, error_tail));
- Fput (Qcircular_list, Qerror_message,
- make_pure_c_string ("List contains a loop"));
-
- Fput (Qvoid_variable, Qerror_conditions,
- pure_cons (Qvoid_variable, error_tail));
- Fput (Qvoid_variable, Qerror_message,
- make_pure_c_string ("Symbol's value as variable is void"));
-
- Fput (Qsetting_constant, Qerror_conditions,
- pure_cons (Qsetting_constant, error_tail));
- Fput (Qsetting_constant, Qerror_message,
- make_pure_c_string ("Attempt to set a constant symbol"));
-
- Fput (Qinvalid_read_syntax, Qerror_conditions,
- pure_cons (Qinvalid_read_syntax, error_tail));
- Fput (Qinvalid_read_syntax, Qerror_message,
- make_pure_c_string ("Invalid read syntax"));
-
- Fput (Qinvalid_function, Qerror_conditions,
- pure_cons (Qinvalid_function, error_tail));
- Fput (Qinvalid_function, Qerror_message,
- make_pure_c_string ("Invalid function"));
-
- Fput (Qwrong_number_of_arguments, Qerror_conditions,
- pure_cons (Qwrong_number_of_arguments, error_tail));
- Fput (Qwrong_number_of_arguments, Qerror_message,
- make_pure_c_string ("Wrong number of arguments"));
-
- Fput (Qno_catch, Qerror_conditions,
- pure_cons (Qno_catch, error_tail));
- Fput (Qno_catch, Qerror_message,
- make_pure_c_string ("No catch for tag"));
-
- Fput (Qend_of_file, Qerror_conditions,
- pure_cons (Qend_of_file, error_tail));
- Fput (Qend_of_file, Qerror_message,
- make_pure_c_string ("End of file during parsing"));
+ PUT_ERROR (Qcircular_list, error_tail, "List contains a loop");
+ PUT_ERROR (Qvoid_variable, error_tail, "Symbol's value as variable is void");
+ PUT_ERROR (Qsetting_constant, error_tail,
+ "Attempt to set a constant symbol");
+ PUT_ERROR (Qinvalid_read_syntax, error_tail, "Invalid read syntax");
+ PUT_ERROR (Qinvalid_function, error_tail, "Invalid function");
+ PUT_ERROR (Qwrong_number_of_arguments, error_tail,
+ "Wrong number of arguments");
+ PUT_ERROR (Qno_catch, error_tail, "No catch for tag");
+ PUT_ERROR (Qend_of_file, error_tail, "End of file during parsing");
arith_tail = pure_cons (Qarith_error, error_tail);
- Fput (Qarith_error, Qerror_conditions,
- arith_tail);
- Fput (Qarith_error, Qerror_message,
- make_pure_c_string ("Arithmetic error"));
-
- Fput (Qbeginning_of_buffer, Qerror_conditions,
- pure_cons (Qbeginning_of_buffer, error_tail));
- Fput (Qbeginning_of_buffer, Qerror_message,
- make_pure_c_string ("Beginning of buffer"));
-
- Fput (Qend_of_buffer, Qerror_conditions,
- pure_cons (Qend_of_buffer, error_tail));
- Fput (Qend_of_buffer, Qerror_message,
- make_pure_c_string ("End of buffer"));
-
- Fput (Qbuffer_read_only, Qerror_conditions,
- pure_cons (Qbuffer_read_only, error_tail));
- Fput (Qbuffer_read_only, Qerror_message,
- make_pure_c_string ("Buffer is read-only"));
-
- Fput (Qtext_read_only, Qerror_conditions,
- pure_cons (Qtext_read_only, error_tail));
- Fput (Qtext_read_only, Qerror_message,
- make_pure_c_string ("Text is read-only"));
+ Fput (Qarith_error, Qerror_conditions, arith_tail);
+ Fput (Qarith_error, Qerror_message, make_pure_c_string ("Arithmetic error"));
+
+ PUT_ERROR (Qbeginning_of_buffer, error_tail, "Beginning of buffer");
+ PUT_ERROR (Qend_of_buffer, error_tail, "End of buffer");
+ PUT_ERROR (Qbuffer_read_only, error_tail, "Buffer is read-only");
+ PUT_ERROR (Qtext_read_only, pure_cons (Qbuffer_read_only, error_tail),
+ "Text is read-only");
DEFSYM (Qrange_error, "range-error");
DEFSYM (Qdomain_error, "domain-error");
@@ -3108,30 +3049,17 @@ syms_of_data (void)
DEFSYM (Qoverflow_error, "overflow-error");
DEFSYM (Qunderflow_error, "underflow-error");
- Fput (Qdomain_error, Qerror_conditions,
- pure_cons (Qdomain_error, arith_tail));
- Fput (Qdomain_error, Qerror_message,
- make_pure_c_string ("Arithmetic domain error"));
-
- Fput (Qrange_error, Qerror_conditions,
- pure_cons (Qrange_error, arith_tail));
- Fput (Qrange_error, Qerror_message,
- make_pure_c_string ("Arithmetic range error"));
-
- Fput (Qsingularity_error, Qerror_conditions,
- pure_cons (Qsingularity_error, Fcons (Qdomain_error, arith_tail)));
- Fput (Qsingularity_error, Qerror_message,
- make_pure_c_string ("Arithmetic singularity error"));
-
- Fput (Qoverflow_error, Qerror_conditions,
- pure_cons (Qoverflow_error, Fcons (Qdomain_error, arith_tail)));
- Fput (Qoverflow_error, Qerror_message,
- make_pure_c_string ("Arithmetic overflow error"));
-
- Fput (Qunderflow_error, Qerror_conditions,
- pure_cons (Qunderflow_error, Fcons (Qdomain_error, arith_tail)));
- Fput (Qunderflow_error, Qerror_message,
- make_pure_c_string ("Arithmetic underflow error"));
+ PUT_ERROR (Qdomain_error, arith_tail, "Arithmetic domain error");
+
+ PUT_ERROR (Qrange_error, arith_tail, "Arithmetic range error");
+
+ PUT_ERROR (Qsingularity_error, Fcons (Qdomain_error, arith_tail),
+ "Arithmetic singularity error");
+
+ PUT_ERROR (Qoverflow_error, Fcons (Qdomain_error, arith_tail),
+ "Arithmetic overflow error");
+ PUT_ERROR (Qunderflow_error, Fcons (Qdomain_error, arith_tail),
+ "Arithmetic underflow error");
staticpro (&Qnil);
staticpro (&Qt);
diff --git a/src/dbusbind.c b/src/dbusbind.c
index c4e57dad98a..2ed7369c9dc 100644
--- a/src/dbusbind.c
+++ b/src/dbusbind.c
@@ -28,19 +28,15 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#include "keyboard.h"
#include "process.h"
+#ifndef DBUS_NUM_MESSAGE_TYPES
+#define DBUS_NUM_MESSAGE_TYPES 5
+#endif
+
/* Subroutines. */
static Lisp_Object Qdbus_init_bus;
-static Lisp_Object Qdbus_close_bus;
static Lisp_Object Qdbus_get_unique_name;
-static Lisp_Object Qdbus_call_method;
-static Lisp_Object Qdbus_call_method_asynchronously;
-static Lisp_Object Qdbus_method_return_internal;
-static Lisp_Object Qdbus_method_error_internal;
-static Lisp_Object Qdbus_send_signal;
-static Lisp_Object Qdbus_register_service;
-static Lisp_Object Qdbus_register_signal;
-static Lisp_Object Qdbus_register_method;
+static Lisp_Object Qdbus_message_internal;
/* D-Bus error symbol. */
static Lisp_Object Qdbus_error;
@@ -51,17 +47,6 @@ static Lisp_Object QCdbus_system_bus, QCdbus_session_bus;
/* Lisp symbol for method call timeout. */
static Lisp_Object QCdbus_timeout;
-/* Lisp symbols for name request flags. */
-static Lisp_Object QCdbus_request_name_allow_replacement;
-static Lisp_Object QCdbus_request_name_replace_existing;
-static Lisp_Object QCdbus_request_name_do_not_queue;
-
-/* Lisp symbols for name request replies. */
-static Lisp_Object QCdbus_request_name_reply_primary_owner;
-static Lisp_Object QCdbus_request_name_reply_in_queue;
-static Lisp_Object QCdbus_request_name_reply_exists;
-static Lisp_Object QCdbus_request_name_reply_already_owner;
-
/* Lisp symbols of D-Bus types. */
static Lisp_Object QCdbus_type_byte, QCdbus_type_boolean;
static Lisp_Object QCdbus_type_int16, QCdbus_type_uint16;
@@ -75,6 +60,15 @@ static Lisp_Object QCdbus_type_unix_fd;
static Lisp_Object QCdbus_type_array, QCdbus_type_variant;
static Lisp_Object QCdbus_type_struct, QCdbus_type_dict_entry;
+/* Lisp symbols of objects in `dbus-registered-objects-table'. */
+static Lisp_Object QCdbus_registered_serial, QCdbus_registered_method;
+static Lisp_Object QCdbus_registered_signal;
+
+/* Alist of D-Bus buses we are polling for messages.
+ The key is the symbol or string of the bus, and the value is the
+ connection address. */
+static Lisp_Object xd_registered_buses;
+
/* Whether we are reading a D-Bus event. */
static int xd_in_read_queued_messages = 0;
@@ -120,14 +114,15 @@ static int xd_in_read_queued_messages = 0;
} while (0)
/* Macros for debugging. In order to enable them, build with
- "MYCPPFLAGS='-DDBUS_DEBUG -Wall' make". */
+ "env MYCPPFLAGS='-DDBUS_DEBUG -Wall' make". */
#ifdef DBUS_DEBUG
-#define XD_DEBUG_MESSAGE(...) \
- do { \
- char s[1024]; \
- snprintf (s, sizeof s, __VA_ARGS__); \
- printf ("%s: %s\n", __func__, s); \
- message ("%s: %s", __func__, s); \
+#define XD_DEBUG_MESSAGE(...) \
+ do { \
+ char s[1024]; \
+ snprintf (s, sizeof s, __VA_ARGS__); \
+ if (!noninteractive) \
+ printf ("%s: %s\n", __func__, s); \
+ message ("%s: %s", __func__, s); \
} while (0)
#define XD_DEBUG_VALID_LISP_OBJECT_P(object) \
do { \
@@ -144,7 +139,7 @@ static int xd_in_read_queued_messages = 0;
if (!NILP (Vdbus_debug)) \
{ \
char s[1024]; \
- snprintf (s, 1023, __VA_ARGS__); \
+ snprintf (s, sizeof s, __VA_ARGS__); \
message ("%s: %s", __func__, s); \
} \
} while (0)
@@ -241,23 +236,115 @@ xd_symbol_to_dbus_type (Lisp_Object object)
#define XD_NEXT_VALUE(object) \
((XD_DBUS_TYPE_P (CAR_SAFE (object))) ? CDR_SAFE (object) : object)
+/* Transform the message type to its string representation for debug
+ messages. */
+#define XD_MESSAGE_TYPE_TO_STRING(mtype) \
+ ((mtype == DBUS_MESSAGE_TYPE_INVALID) \
+ ? "DBUS_MESSAGE_TYPE_INVALID" \
+ : (mtype == DBUS_MESSAGE_TYPE_METHOD_CALL) \
+ ? "DBUS_MESSAGE_TYPE_METHOD_CALL" \
+ : (mtype == DBUS_MESSAGE_TYPE_METHOD_RETURN) \
+ ? "DBUS_MESSAGE_TYPE_METHOD_RETURN" \
+ : (mtype == DBUS_MESSAGE_TYPE_ERROR) \
+ ? "DBUS_MESSAGE_TYPE_ERROR" \
+ : "DBUS_MESSAGE_TYPE_SIGNAL")
+
+/* Transform the object to its string representation for debug
+ messages. */
+#define XD_OBJECT_TO_STRING(object) \
+ SDATA (format2 ("%s", object, Qnil))
+
/* Check whether X is a valid dbus serial number. If valid, set
SERIAL to its value. Otherwise, signal an error. */
-#define CHECK_DBUS_SERIAL_GET_SERIAL(x, serial) \
- do \
- { \
- dbus_uint32_t DBUS_SERIAL_MAX = -1; \
- if (NATNUMP (x) && XINT (x) <= DBUS_SERIAL_MAX) \
- serial = XINT (x); \
- else if (MOST_POSITIVE_FIXNUM < DBUS_SERIAL_MAX \
- && FLOATP (x) \
- && 0 <= XFLOAT_DATA (x) \
- && XFLOAT_DATA (x) <= DBUS_SERIAL_MAX) \
- serial = XFLOAT_DATA (x); \
- else \
- XD_SIGNAL2 (build_string ("Invalid dbus serial"), x); \
- } \
- while (0)
+#define XD_CHECK_DBUS_SERIAL(x, serial) \
+ do { \
+ dbus_uint32_t DBUS_SERIAL_MAX = -1; \
+ if (NATNUMP (x) && XINT (x) <= DBUS_SERIAL_MAX) \
+ serial = XINT (x); \
+ else if (MOST_POSITIVE_FIXNUM < DBUS_SERIAL_MAX \
+ && FLOATP (x) \
+ && 0 <= XFLOAT_DATA (x) \
+ && XFLOAT_DATA (x) <= DBUS_SERIAL_MAX) \
+ serial = XFLOAT_DATA (x); \
+ else \
+ XD_SIGNAL2 (build_string ("Invalid dbus serial"), x); \
+ } while (0)
+
+#define XD_DBUS_VALIDATE_BUS_ADDRESS(bus) \
+ do { \
+ if (STRINGP (bus)) \
+ { \
+ DBusAddressEntry **entries; \
+ int len; \
+ DBusError derror; \
+ dbus_error_init (&derror); \
+ if (!dbus_parse_address (SSDATA (bus), &entries, &len, &derror)) \
+ XD_ERROR (derror); \
+ /* Cleanup. */ \
+ dbus_error_free (&derror); \
+ dbus_address_entries_free (entries); \
+ } \
+ \
+ else \
+ { \
+ CHECK_SYMBOL (bus); \
+ if (!(EQ (bus, QCdbus_system_bus) || EQ (bus, QCdbus_session_bus))) \
+ XD_SIGNAL2 (build_string ("Wrong bus name"), bus); \
+ /* We do not want to have an autolaunch for the session bus. */ \
+ if (EQ (bus, QCdbus_session_bus) \
+ && getenv ("DBUS_SESSION_BUS_ADDRESS") == NULL) \
+ XD_SIGNAL2 (build_string ("No connection to bus"), bus); \
+ } \
+ } while (0)
+
+#if (HAVE_DBUS_VALIDATE_BUS_NAME || HAVE_DBUS_VALIDATE_PATH \
+ || XD_DBUS_VALIDATE_OBJECT || HAVE_DBUS_VALIDATE_MEMBER)
+#define XD_DBUS_VALIDATE_OBJECT(object, func) \
+ do { \
+ if (!NILP (object)) \
+ { \
+ DBusError derror; \
+ CHECK_STRING (object); \
+ dbus_error_init (&derror); \
+ if (!func (SSDATA (object), &derror)) \
+ XD_ERROR (derror); \
+ /* Cleanup. */ \
+ dbus_error_free (&derror); \
+ } \
+ } while (0)
+#endif
+
+#if HAVE_DBUS_VALIDATE_BUS_NAME
+#define XD_DBUS_VALIDATE_BUS_NAME(bus_name) \
+ XD_DBUS_VALIDATE_OBJECT(bus_name, dbus_validate_bus_name);
+#else
+#define XD_DBUS_VALIDATE_BUS_NAME(bus_name) \
+ if (!NILP (bus_name)) CHECK_STRING (bus_name);
+#endif
+
+#if HAVE_DBUS_VALIDATE_PATH
+#define XD_DBUS_VALIDATE_PATH(path) \
+ XD_DBUS_VALIDATE_OBJECT(path, dbus_validate_path);
+#else
+#define XD_DBUS_VALIDATE_PATH(path) \
+ if (!NILP (path)) CHECK_STRING (path);
+#endif
+
+#if HAVE_DBUS_VALIDATE_INTERFACE
+#define XD_DBUS_VALIDATE_INTERFACE(interface) \
+ XD_DBUS_VALIDATE_OBJECT(interface, dbus_validate_interface);
+#else
+#define XD_DBUS_VALIDATE_INTERFACE(interface) \
+ if (!NILP (interface)) CHECK_STRING (interface);
+#endif
+
+#if HAVE_DBUS_VALIDATE_MEMBER
+#define XD_DBUS_VALIDATE_MEMBER(member) \
+ XD_DBUS_VALIDATE_OBJECT(member, dbus_validate_member);
+#else
+#define XD_DBUS_VALIDATE_MEMBER(member) \
+ if (!NILP (member)) CHECK_STRING (member);
+#endif
/* Append to SIGNATURE a copy of X, making sure SIGNATURE does
not become too long. */
@@ -293,11 +380,6 @@ xd_signature (char *signature, unsigned int dtype, unsigned int parent_type, Lis
{
case DBUS_TYPE_BYTE:
case DBUS_TYPE_UINT16:
- case DBUS_TYPE_UINT32:
- case DBUS_TYPE_UINT64:
-#ifdef DBUS_TYPE_UNIX_FD
- case DBUS_TYPE_UNIX_FD:
-#endif
CHECK_NATNUM (object);
sprintf (signature, "%c", dtype);
break;
@@ -309,14 +391,19 @@ xd_signature (char *signature, unsigned int dtype, unsigned int parent_type, Lis
break;
case DBUS_TYPE_INT16:
- case DBUS_TYPE_INT32:
- case DBUS_TYPE_INT64:
CHECK_NUMBER (object);
sprintf (signature, "%c", dtype);
break;
+ case DBUS_TYPE_UINT32:
+ case DBUS_TYPE_UINT64:
+#ifdef DBUS_TYPE_UNIX_FD
+ case DBUS_TYPE_UNIX_FD:
+#endif
+ case DBUS_TYPE_INT32:
+ case DBUS_TYPE_INT64:
case DBUS_TYPE_DOUBLE:
- CHECK_FLOAT (object);
+ CHECK_NUMBER_OR_FLOAT (object);
sprintf (signature, "%c", dtype);
break;
@@ -352,8 +439,8 @@ xd_signature (char *signature, unsigned int dtype, unsigned int parent_type, Lis
}
/* If the element type is DBUS_TYPE_SIGNATURE, and this is the
- only element, the value of this element is used as he array's
- element signature. */
+ only element, the value of this element is used as the
+ array's element signature. */
if ((subtype == DBUS_TYPE_SIGNATURE)
&& STRINGP (CAR_SAFE (XD_NEXT_VALUE (elt)))
&& NILP (CDR_SAFE (XD_NEXT_VALUE (elt))))
@@ -451,6 +538,54 @@ xd_signature (char *signature, unsigned int dtype, unsigned int parent_type, Lis
XD_DEBUG_MESSAGE ("%s", signature);
}
+/* Convert X to a signed integer with bounds LO and HI. */
+static intmax_t
+extract_signed (Lisp_Object x, intmax_t lo, intmax_t hi)
+{
+ CHECK_NUMBER_OR_FLOAT (x);
+ if (INTEGERP (x))
+ {
+ if (lo <= XINT (x) && XINT (x) <= hi)
+ return XINT (x);
+ }
+ else
+ {
+ double d = XFLOAT_DATA (x);
+ if (lo <= d && d <= hi)
+ {
+ intmax_t n = d;
+ if (n == d)
+ return n;
+ }
+ }
+ args_out_of_range_3 (x,
+ make_fixnum_or_float (lo),
+ make_fixnum_or_float (hi));
+}
+
+/* Convert X to an unsigned integer with bounds 0 and HI. */
+static uintmax_t
+extract_unsigned (Lisp_Object x, uintmax_t hi)
+{
+ CHECK_NUMBER_OR_FLOAT (x);
+ if (INTEGERP (x))
+ {
+ if (0 <= XINT (x) && XINT (x) <= hi)
+ return XINT (x);
+ }
+ else
+ {
+ double d = XFLOAT_DATA (x);
+ if (0 <= d && d <= hi)
+ {
+ uintmax_t n = d;
+ if (n == d)
+ return n;
+ }
+ }
+ args_out_of_range_2 (x, make_fixnum_or_float (hi));
+}
+
/* Append C value, extracted from Lisp OBJECT, to iteration ITER.
DTYPE must be a valid DBusType. It is used to convert Lisp
objects, being arguments of `dbus-call-method' or
@@ -469,7 +604,7 @@ xd_append_arg (unsigned int dtype, Lisp_Object object, DBusMessageIter *iter)
CHECK_NATNUM (object);
{
unsigned char val = XFASTINT (object) & 0xFF;
- XD_DEBUG_MESSAGE ("%c %d", dtype, val);
+ XD_DEBUG_MESSAGE ("%c %u", dtype, val);
if (!dbus_message_iter_append_basic (iter, dtype, &val))
XD_SIGNAL2 (build_string ("Unable to append argument"), object);
return;
@@ -488,7 +623,8 @@ xd_append_arg (unsigned int dtype, Lisp_Object object, DBusMessageIter *iter)
CHECK_TYPE_RANGED_INTEGER (dbus_int16_t, object);
{
dbus_int16_t val = XINT (object);
- XD_DEBUG_MESSAGE ("%c %d", dtype, (int) val);
+ int pval = val;
+ XD_DEBUG_MESSAGE ("%c %d", dtype, pval);
if (!dbus_message_iter_append_basic (iter, dtype, &val))
XD_SIGNAL2 (build_string ("Unable to append argument"), object);
return;
@@ -498,17 +634,20 @@ xd_append_arg (unsigned int dtype, Lisp_Object object, DBusMessageIter *iter)
CHECK_TYPE_RANGED_INTEGER (dbus_uint16_t, object);
{
dbus_uint16_t val = XFASTINT (object);
- XD_DEBUG_MESSAGE ("%c %u", dtype, (unsigned int) val);
+ unsigned int pval = val;
+ XD_DEBUG_MESSAGE ("%c %u", dtype, pval);
if (!dbus_message_iter_append_basic (iter, dtype, &val))
XD_SIGNAL2 (build_string ("Unable to append argument"), object);
return;
}
case DBUS_TYPE_INT32:
- CHECK_TYPE_RANGED_INTEGER (dbus_int32_t, object);
{
- dbus_int32_t val = XINT (object);
- XD_DEBUG_MESSAGE ("%c %d", dtype, val);
+ dbus_int32_t val = extract_signed (object,
+ TYPE_MINIMUM (dbus_int32_t),
+ TYPE_MAXIMUM (dbus_int32_t));
+ int pval = val;
+ XD_DEBUG_MESSAGE ("%c %d", dtype, pval);
if (!dbus_message_iter_append_basic (iter, dtype, &val))
XD_SIGNAL2 (build_string ("Unable to append argument"), object);
return;
@@ -518,39 +657,43 @@ xd_append_arg (unsigned int dtype, Lisp_Object object, DBusMessageIter *iter)
#ifdef DBUS_TYPE_UNIX_FD
case DBUS_TYPE_UNIX_FD:
#endif
- CHECK_TYPE_RANGED_INTEGER (dbus_uint32_t, object);
{
- dbus_uint32_t val = XFASTINT (object);
- XD_DEBUG_MESSAGE ("%c %u", dtype, val);
+ dbus_uint32_t val = extract_unsigned (object,
+ TYPE_MAXIMUM (dbus_uint32_t));
+ unsigned int pval = val;
+ XD_DEBUG_MESSAGE ("%c %u", dtype, pval);
if (!dbus_message_iter_append_basic (iter, dtype, &val))
XD_SIGNAL2 (build_string ("Unable to append argument"), object);
return;
}
case DBUS_TYPE_INT64:
- CHECK_NUMBER (object);
+ CHECK_TYPE_RANGED_INTEGER_OR_FLOAT (dbus_int64_t, object);
{
- dbus_int64_t val = XINT (object);
- XD_DEBUG_MESSAGE ("%c %d", dtype, (int) val);
+ dbus_int64_t val = extract_signed (object,
+ TYPE_MINIMUM (dbus_int64_t),
+ TYPE_MAXIMUM (dbus_int64_t));
+ printmax_t pval = val;
+ XD_DEBUG_MESSAGE ("%c %"pMd, dtype, pval);
if (!dbus_message_iter_append_basic (iter, dtype, &val))
XD_SIGNAL2 (build_string ("Unable to append argument"), object);
return;
}
case DBUS_TYPE_UINT64:
- CHECK_TYPE_RANGED_INTEGER (dbus_uint64_t, object);
{
- dbus_uint64_t val = XFASTINT (object);
- XD_DEBUG_MESSAGE ("%c %"pI"d", dtype, XFASTINT (object));
+ dbus_uint64_t val = extract_unsigned (object,
+ TYPE_MAXIMUM (dbus_uint64_t));
+ uprintmax_t pval = val;
+ XD_DEBUG_MESSAGE ("%c %"pMu, dtype, pval);
if (!dbus_message_iter_append_basic (iter, dtype, &val))
XD_SIGNAL2 (build_string ("Unable to append argument"), object);
return;
}
case DBUS_TYPE_DOUBLE:
- CHECK_FLOAT (object);
{
- double val = XFLOAT_DATA (object);
+ double val = extract_float (object);
XD_DEBUG_MESSAGE ("%c %f", dtype, val);
if (!dbus_message_iter_append_basic (iter, dtype, &val))
XD_SIGNAL2 (build_string ("Unable to append argument"), object);
@@ -614,7 +757,7 @@ xd_append_arg (unsigned int dtype, Lisp_Object object, DBusMessageIter *iter)
dtype, CAR_SAFE (XD_NEXT_VALUE (object)));
XD_DEBUG_MESSAGE ("%c %s %s", dtype, signature,
- SDATA (format2 ("%s", object, Qnil)));
+ XD_OBJECT_TO_STRING (object));
if (!dbus_message_iter_open_container (iter, dtype,
signature, &subiter))
XD_SIGNAL3 (build_string ("Cannot open container"),
@@ -627,7 +770,7 @@ xd_append_arg (unsigned int dtype, Lisp_Object object, DBusMessageIter *iter)
dtype, CAR_SAFE (XD_NEXT_VALUE (object)));
XD_DEBUG_MESSAGE ("%c %s %s", dtype, signature,
- SDATA (format2 ("%s", object, Qnil)));
+ XD_OBJECT_TO_STRING (object));
if (!dbus_message_iter_open_container (iter, dtype,
signature, &subiter))
XD_SIGNAL3 (build_string ("Cannot open container"),
@@ -637,8 +780,7 @@ xd_append_arg (unsigned int dtype, Lisp_Object object, DBusMessageIter *iter)
case DBUS_TYPE_STRUCT:
case DBUS_TYPE_DICT_ENTRY:
/* These containers do not require a signature. */
- XD_DEBUG_MESSAGE ("%c %s", dtype,
- SDATA (format2 ("%s", object, Qnil)));
+ XD_DEBUG_MESSAGE ("%c %s", dtype, XD_OBJECT_TO_STRING (object));
if (!dbus_message_iter_open_container (iter, dtype, NULL, &subiter))
XD_SIGNAL2 (build_string ("Cannot open container"),
make_number (dtype));
@@ -678,7 +820,7 @@ xd_retrieve_arg (unsigned int dtype, DBusMessageIter *iter)
unsigned int val;
dbus_message_iter_get_basic (iter, &val);
val = val & 0xFF;
- XD_DEBUG_MESSAGE ("%c %d", dtype, val);
+ XD_DEBUG_MESSAGE ("%c %u", dtype, val);
return make_number (val);
}
@@ -693,24 +835,30 @@ xd_retrieve_arg (unsigned int dtype, DBusMessageIter *iter)
case DBUS_TYPE_INT16:
{
dbus_int16_t val;
+ int pval;
dbus_message_iter_get_basic (iter, &val);
- XD_DEBUG_MESSAGE ("%c %d", dtype, val);
+ pval = val;
+ XD_DEBUG_MESSAGE ("%c %d", dtype, pval);
return make_number (val);
}
case DBUS_TYPE_UINT16:
{
dbus_uint16_t val;
+ int pval;
dbus_message_iter_get_basic (iter, &val);
- XD_DEBUG_MESSAGE ("%c %d", dtype, val);
+ pval = val;
+ XD_DEBUG_MESSAGE ("%c %d", dtype, pval);
return make_number (val);
}
case DBUS_TYPE_INT32:
{
dbus_int32_t val;
+ int pval;
dbus_message_iter_get_basic (iter, &val);
- XD_DEBUG_MESSAGE ("%c %d", dtype, val);
+ pval = val;
+ XD_DEBUG_MESSAGE ("%c %d", dtype, pval);
return make_fixnum_or_float (val);
}
@@ -720,24 +868,30 @@ xd_retrieve_arg (unsigned int dtype, DBusMessageIter *iter)
#endif
{
dbus_uint32_t val;
+ unsigned int pval = val;
dbus_message_iter_get_basic (iter, &val);
- XD_DEBUG_MESSAGE ("%c %d", dtype, val);
+ pval = val;
+ XD_DEBUG_MESSAGE ("%c %u", dtype, pval);
return make_fixnum_or_float (val);
}
case DBUS_TYPE_INT64:
{
dbus_int64_t val;
+ printmax_t pval;
dbus_message_iter_get_basic (iter, &val);
- XD_DEBUG_MESSAGE ("%c %d", dtype, (int) val);
+ pval = val;
+ XD_DEBUG_MESSAGE ("%c %"pMd, dtype, pval);
return make_fixnum_or_float (val);
}
case DBUS_TYPE_UINT64:
{
dbus_uint64_t val;
+ uprintmax_t pval;
dbus_message_iter_get_basic (iter, &val);
- XD_DEBUG_MESSAGE ("%c %d", dtype, (int) val);
+ pval = val;
+ XD_DEBUG_MESSAGE ("%c %"pMd, dtype, pval);
return make_fixnum_or_float (val);
}
@@ -777,7 +931,7 @@ xd_retrieve_arg (unsigned int dtype, DBusMessageIter *iter)
result = Fcons (xd_retrieve_arg (subtype, &subiter), result);
dbus_message_iter_next (&subiter);
}
- XD_DEBUG_MESSAGE ("%c %s", dtype, SDATA (format2 ("%s", result, Qnil)));
+ XD_DEBUG_MESSAGE ("%c %s", dtype, XD_OBJECT_TO_STRING (result));
RETURN_UNGCPRO (Fnreverse (result));
}
@@ -787,85 +941,37 @@ xd_retrieve_arg (unsigned int dtype, DBusMessageIter *iter)
}
}
-/* Initialize D-Bus connection. BUS is either a Lisp symbol, :system
- or :session, or a string denoting the bus address. It tells which
- D-Bus to initialize. If RAISE_ERROR is non-zero, signal an error
- when the connection cannot be initialized. */
+/* Return the number of references of the shared CONNECTION. */
+static int
+xd_get_connection_references (DBusConnection *connection)
+{
+ ptrdiff_t *refcount;
+
+ /* We cannot access the DBusConnection structure, it is not public.
+ But we know, that the reference counter is the first field in
+ that structure. */
+ refcount = (void *) &connection;
+ refcount = (void *) *refcount;
+ return *refcount;
+}
+
+/* Return D-Bus connection address. BUS is either a Lisp symbol,
+ :system or :session, or a string denoting the bus address. */
static DBusConnection *
-xd_initialize (Lisp_Object bus, int raise_error)
+xd_get_connection_address (Lisp_Object bus)
{
DBusConnection *connection;
- DBusError derror;
-
- /* Parameter check. */
- if (!STRINGP (bus))
- {
- CHECK_SYMBOL (bus);
- if (!(EQ (bus, QCdbus_system_bus) || EQ (bus, QCdbus_session_bus)))
- {
- if (raise_error)
- XD_SIGNAL2 (build_string ("Wrong bus name"), bus);
- else
- return NULL;
- }
+ Lisp_Object val;
- /* We do not want to have an autolaunch for the session bus. */
- if (EQ (bus, QCdbus_session_bus)
- && getenv ("DBUS_SESSION_BUS_ADDRESS") == NULL)
- {
- if (raise_error)
- XD_SIGNAL2 (build_string ("No connection to bus"), bus);
- else
- return NULL;
- }
- }
-
- /* Open a connection to the bus. */
- dbus_error_init (&derror);
-
- if (STRINGP (bus))
- connection = dbus_connection_open (SSDATA (bus), &derror);
+ val = CDR_SAFE (Fassoc (bus, xd_registered_buses));
+ if (NILP (val))
+ XD_SIGNAL2 (build_string ("No connection to bus"), bus);
else
- if (EQ (bus, QCdbus_system_bus))
- connection = dbus_bus_get (DBUS_BUS_SYSTEM, &derror);
- else
- connection = dbus_bus_get (DBUS_BUS_SESSION, &derror);
-
- if (dbus_error_is_set (&derror))
- {
- if (raise_error)
- XD_ERROR (derror);
- else
- connection = NULL;
- }
+ connection = (DBusConnection *) (intptr_t) XFASTINT (val);
- /* If it is not the system or session bus, we must register
- ourselves. Otherwise, we have called dbus_bus_get, which has
- configured us to exit if the connection closes - we undo this
- setting. */
- if (connection != NULL)
- {
- if (STRINGP (bus))
- dbus_bus_register (connection, &derror);
- else
- dbus_connection_set_exit_on_disconnect (connection, FALSE);
- }
-
- if (dbus_error_is_set (&derror))
- {
- if (raise_error)
- XD_ERROR (derror);
- else
- connection = NULL;
- }
-
- if (connection == NULL && raise_error)
+ if (!dbus_connection_get_is_connected (connection))
XD_SIGNAL2 (build_string ("No connection to bus"), bus);
- /* Cleanup. */
- dbus_error_free (&derror);
-
- /* Return the result. */
return connection;
}
@@ -896,8 +1002,8 @@ xd_add_watch (DBusWatch *watch, void *data)
int fd = xd_find_watch_fd (watch);
XD_DEBUG_MESSAGE ("fd %d, write %d, enabled %d",
- fd, flags & DBUS_WATCH_WRITABLE,
- dbus_watch_get_enabled (watch));
+ fd, flags & DBUS_WATCH_WRITABLE,
+ dbus_watch_get_enabled (watch));
if (fd == -1)
return FALSE;
@@ -929,8 +1035,8 @@ xd_remove_watch (DBusWatch *watch, void *data)
/* Unset session environment. */
if (XSYMBOL (QCdbus_session_bus) == data)
{
- XD_DEBUG_MESSAGE ("unsetenv DBUS_SESSION_BUS_ADDRESS");
- unsetenv ("DBUS_SESSION_BUS_ADDRESS");
+ // XD_DEBUG_MESSAGE ("unsetenv DBUS_SESSION_BUS_ADDRESS");
+ // unsetenv ("DBUS_SESSION_BUS_ADDRESS");
}
if (flags & DBUS_WATCH_WRITABLE)
@@ -949,23 +1055,111 @@ xd_toggle_watch (DBusWatch *watch, void *data)
xd_remove_watch (watch, data);
}
-DEFUN ("dbus-init-bus", Fdbus_init_bus, Sdbus_init_bus, 1, 1, 0,
- doc: /* Initialize connection to D-Bus BUS. */)
- (Lisp_Object bus)
+/* Close connection to D-Bus BUS. */
+static void
+xd_close_bus (Lisp_Object bus)
+{
+ DBusConnection *connection;
+ Lisp_Object val;
+
+ /* Check whether we are connected. */
+ val = Fassoc (bus, xd_registered_buses);
+ if (NILP (val))
+ return;
+
+ /* Retrieve bus address. */
+ connection = xd_get_connection_address (bus);
+
+ /* Close connection, if there isn't another shared application. */
+ if (xd_get_connection_references (connection) == 1)
+ {
+ XD_DEBUG_MESSAGE ("Close connection to bus %s",
+ XD_OBJECT_TO_STRING (bus));
+ dbus_connection_close (connection);
+ }
+
+ /* Decrement reference count. */
+ dbus_connection_unref (connection);
+
+ /* Remove bus from list of registered buses. */
+ xd_registered_buses = Fdelete (val, xd_registered_buses);
+
+ /* Return. */
+ return;
+}
+
+DEFUN ("dbus-init-bus", Fdbus_init_bus, Sdbus_init_bus, 1, 2, 0,
+ doc: /* Establish the connection to D-Bus BUS.
+
+BUS can be either the symbol `:system' or the symbol `:session', or it
+can be a string denoting the address of the corresponding bus. For
+the system and session buses, this function is called when loading
+`dbus.el', there is no need to call it again.
+
+The function returns a number, which counts the connections this Emacs
+session has established to the BUS under the same unique name (see
+`dbus-get-unique-name'). It depends on the libraries Emacs is linked
+with, and on the environment Emacs is running. For example, if Emacs
+is linked with the gtk toolkit, and it runs in a GTK-aware environment
+like Gnome, another connection might already be established.
+
+When PRIVATE is non-nil, a new connection is established instead of
+reusing an existing one. It results in a new unique name at the bus.
+This can be used, if it is necessary to distinguish from another
+connection used in the same Emacs process, like the one established by
+GTK+. It should be used with care for at least the `:system' and
+`:session' buses, because other Emacs Lisp packages might already use
+this connection to those buses. */)
+ (Lisp_Object bus, Lisp_Object private)
{
DBusConnection *connection;
- void *busp;
+ DBusError derror;
+ Lisp_Object val;
+ int refcount;
/* Check parameter. */
- if (SYMBOLP (bus))
- busp = XSYMBOL (bus);
- else if (STRINGP (bus))
- busp = XSTRING (bus);
+ XD_DBUS_VALIDATE_BUS_ADDRESS (bus);
+
+ /* Close bus if it is already open. */
+ xd_close_bus (bus);
+
+ /* Initialize. */
+ dbus_error_init (&derror);
+
+ /* Open the connection. */
+ if (STRINGP (bus))
+ if (NILP (private))
+ connection = dbus_connection_open (SSDATA (bus), &derror);
+ else
+ connection = dbus_connection_open_private (SSDATA (bus), &derror);
+
+ else
+ if (NILP (private))
+ connection = dbus_bus_get (EQ (bus, QCdbus_system_bus)
+ ? DBUS_BUS_SYSTEM : DBUS_BUS_SESSION,
+ &derror);
+ else
+ connection = dbus_bus_get_private (EQ (bus, QCdbus_system_bus)
+ ? DBUS_BUS_SYSTEM : DBUS_BUS_SESSION,
+ &derror);
+
+ if (dbus_error_is_set (&derror))
+ XD_ERROR (derror);
+
+ if (connection == NULL)
+ XD_SIGNAL2 (build_string ("No connection to bus"), bus);
+
+ /* If it is not the system or session bus, we must register
+ ourselves. Otherwise, we have called dbus_bus_get, which has
+ configured us to exit if the connection closes - we undo this
+ setting. */
+ if (STRINGP (bus))
+ dbus_bus_register (connection, &derror);
else
- wrong_type_argument (intern ("D-Bus"), bus);
+ dbus_connection_set_exit_on_disconnect (connection, FALSE);
- /* Open a connection to the bus. */
- connection = xd_initialize (bus, TRUE);
+ if (dbus_error_is_set (&derror))
+ XD_ERROR (derror);
/* Add the watch functions. We pass also the bus as data, in order
to distinguish between the buses in xd_remove_watch. */
@@ -973,36 +1167,27 @@ DEFUN ("dbus-init-bus", Fdbus_init_bus, Sdbus_init_bus, 1, 1, 0,
xd_add_watch,
xd_remove_watch,
xd_toggle_watch,
- busp, NULL))
+ SYMBOLP (bus)
+ ? (void *) XSYMBOL (bus)
+ : (void *) XSTRING (bus),
+ NULL))
XD_SIGNAL1 (build_string ("Cannot add watch functions"));
/* Add bus to list of registered buses. */
- Vdbus_registered_buses = Fcons (bus, Vdbus_registered_buses);
+ XSETFASTINT (val, (intptr_t) connection);
+ xd_registered_buses = Fcons (Fcons (bus, val), xd_registered_buses);
/* We do not want to abort. */
putenv ((char *) "DBUS_FATAL_WARNINGS=0");
- /* Return. */
- return Qnil;
-}
-
-DEFUN ("dbus-close-bus", Fdbus_close_bus, Sdbus_close_bus, 1, 1, 0,
- doc: /* Close connection to D-Bus BUS. */)
- (Lisp_Object bus)
-{
- DBusConnection *connection;
-
- /* Open a connection to the bus. */
- connection = xd_initialize (bus, TRUE);
-
- /* Decrement reference count to the bus. */
- dbus_connection_unref (connection);
-
- /* Remove bus from list of registered buses. */
- Vdbus_registered_buses = Fdelete (bus, Vdbus_registered_buses);
+ /* Cleanup. */
+ dbus_error_free (&derror);
- /* Return. */
- return Qnil;
+ /* Return reference counter. */
+ refcount = xd_get_connection_references (connection);
+ XD_DEBUG_MESSAGE ("Bus %s, Reference counter %d",
+ XD_OBJECT_TO_STRING (bus), refcount);
+ return make_number (refcount);
}
DEFUN ("dbus-get-unique-name", Fdbus_get_unique_name, Sdbus_get_unique_name,
@@ -1013,8 +1198,11 @@ DEFUN ("dbus-get-unique-name", Fdbus_get_unique_name, Sdbus_get_unique_name,
DBusConnection *connection;
const char *name;
- /* Open a connection to the bus. */
- connection = xd_initialize (bus, TRUE);
+ /* Check parameter. */
+ XD_DBUS_VALIDATE_BUS_ADDRESS (bus);
+
+ /* Retrieve bus address. */
+ connection = xd_get_connection_address (bus);
/* Request the name. */
name = dbus_bus_get_unique_name (connection);
@@ -1025,341 +1213,243 @@ DEFUN ("dbus-get-unique-name", Fdbus_get_unique_name, Sdbus_get_unique_name,
return build_string (name);
}
-DEFUN ("dbus-call-method", Fdbus_call_method, Sdbus_call_method, 5, MANY, 0,
- doc: /* Call METHOD on the D-Bus BUS.
-
-BUS is either a Lisp symbol, `:system' or `:session', or a string
-denoting the bus address.
-
-SERVICE is the D-Bus service name to be used. PATH is the D-Bus
-object path SERVICE is registered at. INTERFACE is an interface
-offered by SERVICE. It must provide METHOD.
-
-If the parameter `:timeout' is given, the following integer TIMEOUT
-specifies the maximum number of milliseconds the method call must
-return. The default value is 25,000. If the method call doesn't
-return in time, a D-Bus error is raised.
-
-All other arguments ARGS are passed to METHOD as arguments. They are
-converted into D-Bus types via the following rules:
-
- t and nil => DBUS_TYPE_BOOLEAN
- number => DBUS_TYPE_UINT32
- integer => DBUS_TYPE_INT32
- float => DBUS_TYPE_DOUBLE
- string => DBUS_TYPE_STRING
- list => DBUS_TYPE_ARRAY
-
-All arguments can be preceded by a type symbol. For details about
-type symbols, see Info node `(dbus)Type Conversion'.
-
-`dbus-call-method' returns the resulting values of METHOD as a list of
-Lisp objects. The type conversion happens the other direction as for
-input arguments. It follows the mapping rules:
-
- DBUS_TYPE_BOOLEAN => t or nil
- DBUS_TYPE_BYTE => number
- DBUS_TYPE_UINT16 => number
- DBUS_TYPE_INT16 => integer
- DBUS_TYPE_UINT32 => number or float
- DBUS_TYPE_UNIX_FD => number or float
- DBUS_TYPE_INT32 => integer or float
- DBUS_TYPE_UINT64 => number or float
- DBUS_TYPE_INT64 => integer or float
- DBUS_TYPE_DOUBLE => float
- DBUS_TYPE_STRING => string
- DBUS_TYPE_OBJECT_PATH => string
- DBUS_TYPE_SIGNATURE => string
- DBUS_TYPE_ARRAY => list
- DBUS_TYPE_VARIANT => list
- DBUS_TYPE_STRUCT => list
- DBUS_TYPE_DICT_ENTRY => list
-
-Example:
-
-\(dbus-call-method
- :session "org.gnome.seahorse" "/org/gnome/seahorse/keys/openpgp"
- "org.gnome.seahorse.Keys" "GetKeyField"
- "openpgp:657984B8C7A966DD" "simple-name")
-
- => (t ("Philip R. Zimmermann"))
-
-If the result of the METHOD call is just one value, the converted Lisp
-object is returned instead of a list containing this single Lisp object.
-
-\(dbus-call-method
- :system "org.freedesktop.Hal" "/org/freedesktop/Hal/devices/computer"
- "org.freedesktop.Hal.Device" "GetPropertyString"
- "system.kernel.machine")
-
- => "i686"
-
-usage: (dbus-call-method BUS SERVICE PATH INTERFACE METHOD &optional :timeout TIMEOUT &rest ARGS) */)
+DEFUN ("dbus-message-internal", Fdbus_message_internal, Sdbus_message_internal,
+ 4, MANY, 0,
+ doc: /* Send a D-Bus message.
+This is an internal function, it shall not be used outside dbus.el.
+
+The following usages are expected:
+
+`dbus-call-method', `dbus-call-method-asynchronously':
+ \(dbus-message-internal
+ dbus-message-type-method-call BUS SERVICE PATH INTERFACE METHOD HANDLER
+ &optional :timeout TIMEOUT &rest ARGS)
+
+`dbus-send-signal':
+ \(dbus-message-internal
+ dbus-message-type-signal BUS SERVICE PATH INTERFACE SIGNAL &rest ARGS)
+
+`dbus-method-return-internal':
+ \(dbus-message-internal
+ dbus-message-type-method-return BUS SERVICE SERIAL &rest ARGS)
+
+`dbus-method-error-internal':
+ \(dbus-message-internal
+ dbus-message-type-error BUS SERVICE SERIAL &rest ARGS)
+
+usage: (dbus-message-internal &rest REST) */)
(ptrdiff_t nargs, Lisp_Object *args)
{
- Lisp_Object bus, service, path, interface, method;
+ Lisp_Object message_type, bus, service, handler;
+ Lisp_Object path = Qnil;
+ Lisp_Object interface = Qnil;
+ Lisp_Object member = Qnil;
Lisp_Object result;
- struct gcpro gcpro1, gcpro2, gcpro3, gcpro4, gcpro5;
+ struct gcpro gcpro1, gcpro2, gcpro3, gcpro4, gcpro5, gcpro6;
DBusConnection *connection;
DBusMessage *dmessage;
- DBusMessage *reply;
DBusMessageIter iter;
- DBusError derror;
unsigned int dtype;
+ unsigned int mtype;
+ dbus_uint32_t serial = 0;
+ unsigned int ui_serial;
int timeout = -1;
- ptrdiff_t i = 5;
+ ptrdiff_t count;
char signature[DBUS_MAXIMUM_SIGNATURE_LENGTH];
+ /* Initialize parameters. */
+ message_type = args[0];
+ bus = args[1];
+ service = args[2];
+ handler = Qnil;
+
+ CHECK_NATNUM (message_type);
+ mtype = XFASTINT (message_type);
+ if ((mtype <= DBUS_MESSAGE_TYPE_INVALID) || (mtype >= DBUS_NUM_MESSAGE_TYPES))
+ XD_SIGNAL2 (build_string ("Invalid message type"), message_type);
+
+ if ((mtype == DBUS_MESSAGE_TYPE_METHOD_CALL)
+ || (mtype == DBUS_MESSAGE_TYPE_SIGNAL))
+ {
+ path = args[3];
+ interface = args[4];
+ member = args[5];
+ if (mtype == DBUS_MESSAGE_TYPE_METHOD_CALL)
+ handler = args[6];
+ count = (mtype == DBUS_MESSAGE_TYPE_METHOD_CALL) ? 7 : 6;
+ }
+ else /* DBUS_MESSAGE_TYPE_METHOD_RETURN, DBUS_MESSAGE_TYPE_ERROR */
+ {
+ XD_CHECK_DBUS_SERIAL (args[3], serial);
+ count = 4;
+ }
+
/* Check parameters. */
- bus = args[0];
- service = args[1];
- path = args[2];
- interface = args[3];
- method = args[4];
-
- CHECK_STRING (service);
- CHECK_STRING (path);
- CHECK_STRING (interface);
- CHECK_STRING (method);
- GCPRO5 (bus, service, path, interface, method);
-
- XD_DEBUG_MESSAGE ("%s %s %s %s",
- SDATA (service),
- SDATA (path),
- SDATA (interface),
- SDATA (method));
-
- /* Open a connection to the bus. */
- connection = xd_initialize (bus, TRUE);
-
- /* Create the message. */
- dmessage = dbus_message_new_method_call (SSDATA (service),
- SSDATA (path),
- SSDATA (interface),
- SSDATA (method));
- UNGCPRO;
- if (dmessage == NULL)
- XD_SIGNAL1 (build_string ("Unable to create a new message"));
+ XD_DBUS_VALIDATE_BUS_ADDRESS (bus);
+ XD_DBUS_VALIDATE_BUS_NAME (service);
+ if (nargs < count)
+ xsignal2 (Qwrong_number_of_arguments,
+ Qdbus_message_internal,
+ make_number (nargs));
+
+ if ((mtype == DBUS_MESSAGE_TYPE_METHOD_CALL)
+ || (mtype == DBUS_MESSAGE_TYPE_SIGNAL))
+ {
+ XD_DBUS_VALIDATE_PATH (path);
+ XD_DBUS_VALIDATE_INTERFACE (interface);
+ XD_DBUS_VALIDATE_MEMBER (member);
+ if (!NILP (handler) && (!FUNCTIONP (handler)))
+ wrong_type_argument (Qinvalid_function, handler);
+ }
- /* Check for timeout parameter. */
- if ((i+2 <= nargs) && (EQ ((args[i]), QCdbus_timeout)))
+ /* Protect Lisp variables. */
+ GCPRO6 (bus, service, path, interface, member, handler);
+
+ /* Trace parameters. */
+ switch (mtype)
{
- CHECK_NATNUM (args[i+1]);
- timeout = min (XFASTINT (args[i+1]), INT_MAX);
- i = i+2;
+ case DBUS_MESSAGE_TYPE_METHOD_CALL:
+ XD_DEBUG_MESSAGE ("%s %s %s %s %s %s %s",
+ XD_MESSAGE_TYPE_TO_STRING (mtype),
+ XD_OBJECT_TO_STRING (bus),
+ XD_OBJECT_TO_STRING (service),
+ XD_OBJECT_TO_STRING (path),
+ XD_OBJECT_TO_STRING (interface),
+ XD_OBJECT_TO_STRING (member),
+ XD_OBJECT_TO_STRING (handler));
+ break;
+ case DBUS_MESSAGE_TYPE_SIGNAL:
+ XD_DEBUG_MESSAGE ("%s %s %s %s %s %s",
+ XD_MESSAGE_TYPE_TO_STRING (mtype),
+ XD_OBJECT_TO_STRING (bus),
+ XD_OBJECT_TO_STRING (service),
+ XD_OBJECT_TO_STRING (path),
+ XD_OBJECT_TO_STRING (interface),
+ XD_OBJECT_TO_STRING (member));
+ break;
+ default: /* DBUS_MESSAGE_TYPE_METHOD_RETURN, DBUS_MESSAGE_TYPE_ERROR */
+ ui_serial = serial;
+ XD_DEBUG_MESSAGE ("%s %s %s %u",
+ XD_MESSAGE_TYPE_TO_STRING (mtype),
+ XD_OBJECT_TO_STRING (bus),
+ XD_OBJECT_TO_STRING (service),
+ ui_serial);
}
- /* Initialize parameter list of message. */
- dbus_message_iter_init_append (dmessage, &iter);
+ /* Retrieve bus address. */
+ connection = xd_get_connection_address (bus);
- /* Append parameters to the message. */
- for (; i < nargs; ++i)
+ /* Create the D-Bus message. */
+ dmessage = dbus_message_new (mtype);
+ if (dmessage == NULL)
{
- dtype = XD_OBJECT_TO_DBUS_TYPE (args[i]);
- if (XD_DBUS_TYPE_P (args[i]))
+ UNGCPRO;
+ XD_SIGNAL1 (build_string ("Unable to create a new message"));
+ }
+
+ if (STRINGP (service))
+ {
+ if (mtype != DBUS_MESSAGE_TYPE_SIGNAL)
+ /* Set destination. */
{
- XD_DEBUG_VALID_LISP_OBJECT_P (args[i]);
- XD_DEBUG_VALID_LISP_OBJECT_P (args[i+1]);
- XD_DEBUG_MESSAGE ("Parameter%"pD"d %s %s", i - 4,
- SDATA (format2 ("%s", args[i], Qnil)),
- SDATA (format2 ("%s", args[i+1], Qnil)));
- ++i;
+ if (!dbus_message_set_destination (dmessage, SSDATA (service)))
+ {
+ UNGCPRO;
+ XD_SIGNAL2 (build_string ("Unable to set the destination"),
+ service);
+ }
}
+
else
+ /* Set destination for unicast signals. */
{
- XD_DEBUG_VALID_LISP_OBJECT_P (args[i]);
- XD_DEBUG_MESSAGE ("Parameter%"pD"d %s", i - 4,
- SDATA (format2 ("%s", args[i], Qnil)));
- }
+ Lisp_Object uname;
- /* Check for valid signature. We use DBUS_TYPE_INVALID as
- indication that there is no parent type. */
- xd_signature (signature, dtype, DBUS_TYPE_INVALID, args[i]);
+ /* If it is the same unique name as we are registered at the
+ bus or an unknown name, we regard it as broadcast message
+ due to backward compatibility. */
+ if (dbus_bus_name_has_owner (connection, SSDATA (service), NULL))
+ uname = call2 (intern ("dbus-get-name-owner"), bus, service);
+ else
+ uname = Qnil;
- xd_append_arg (dtype, args[i], &iter);
+ if (STRINGP (uname)
+ && (strcmp (dbus_bus_get_unique_name (connection), SSDATA (uname))
+ != 0)
+ && (!dbus_message_set_destination (dmessage, SSDATA (service))))
+ {
+ UNGCPRO;
+ XD_SIGNAL2 (build_string ("Unable to set signal destination"),
+ service);
+ }
+ }
}
- /* Send the message. */
- dbus_error_init (&derror);
- reply = dbus_connection_send_with_reply_and_block (connection,
- dmessage,
- timeout,
- &derror);
-
- if (dbus_error_is_set (&derror))
- XD_ERROR (derror);
-
- if (reply == NULL)
- XD_SIGNAL1 (build_string ("No reply"));
-
- XD_DEBUG_MESSAGE ("Message sent");
-
- /* Collect the results. */
- result = Qnil;
- GCPRO1 (result);
-
- if (dbus_message_iter_init (reply, &iter))
+ /* Set message parameters. */
+ if ((mtype == DBUS_MESSAGE_TYPE_METHOD_CALL)
+ || (mtype == DBUS_MESSAGE_TYPE_SIGNAL))
{
- /* Loop over the parameters of the D-Bus reply message. Construct a
- Lisp list, which is returned by `dbus-call-method'. */
- while ((dtype = dbus_message_iter_get_arg_type (&iter))
- != DBUS_TYPE_INVALID)
+ if ((!dbus_message_set_path (dmessage, SSDATA (path)))
+ || (!dbus_message_set_interface (dmessage, SSDATA (interface)))
+ || (!dbus_message_set_member (dmessage, SSDATA (member))))
{
- result = Fcons (xd_retrieve_arg (dtype, &iter), result);
- dbus_message_iter_next (&iter);
+ UNGCPRO;
+ XD_SIGNAL1 (build_string ("Unable to set the message parameter"));
}
}
- else
- {
- /* No arguments: just return nil. */
- }
-
- /* Cleanup. */
- dbus_error_free (&derror);
- dbus_message_unref (dmessage);
- dbus_message_unref (reply);
-
- /* Return the result. If there is only one single Lisp object,
- return it as-it-is, otherwise return the reversed list. */
- if (XFASTINT (Flength (result)) == 1)
- RETURN_UNGCPRO (CAR_SAFE (result));
- else
- RETURN_UNGCPRO (Fnreverse (result));
-}
-
-DEFUN ("dbus-call-method-asynchronously", Fdbus_call_method_asynchronously,
- Sdbus_call_method_asynchronously, 6, MANY, 0,
- doc: /* Call METHOD on the D-Bus BUS asynchronously.
-
-BUS is either a Lisp symbol, `:system' or `:session', or a string
-denoting the bus address.
-
-SERVICE is the D-Bus service name to be used. PATH is the D-Bus
-object path SERVICE is registered at. INTERFACE is an interface
-offered by SERVICE. It must provide METHOD.
-
-HANDLER is a Lisp function, which is called when the corresponding
-return message has arrived. If HANDLER is nil, no return message will
-be expected.
-
-If the parameter `:timeout' is given, the following integer TIMEOUT
-specifies the maximum number of milliseconds the method call must
-return. The default value is 25,000. If the method call doesn't
-return in time, a D-Bus error is raised.
-
-All other arguments ARGS are passed to METHOD as arguments. They are
-converted into D-Bus types via the following rules:
-
- t and nil => DBUS_TYPE_BOOLEAN
- number => DBUS_TYPE_UINT32
- integer => DBUS_TYPE_INT32
- float => DBUS_TYPE_DOUBLE
- string => DBUS_TYPE_STRING
- list => DBUS_TYPE_ARRAY
-
-All arguments can be preceded by a type symbol. For details about
-type symbols, see Info node `(dbus)Type Conversion'.
-Unless HANDLER is nil, the function returns a key into the hash table
-`dbus-registered-objects-table'. The corresponding entry in the hash
-table is removed, when the return message has been arrived, and
-HANDLER is called.
-
-Example:
-
-\(dbus-call-method-asynchronously
- :system "org.freedesktop.Hal" "/org/freedesktop/Hal/devices/computer"
- "org.freedesktop.Hal.Device" "GetPropertyString" 'message
- "system.kernel.machine")
-
- => (:system 2)
-
- -| i686
-
-usage: (dbus-call-method-asynchronously BUS SERVICE PATH INTERFACE METHOD HANDLER &optional :timeout TIMEOUT &rest ARGS) */)
- (ptrdiff_t nargs, Lisp_Object *args)
-{
- Lisp_Object bus, service, path, interface, method, handler;
- Lisp_Object result;
- struct gcpro gcpro1, gcpro2, gcpro3, gcpro4, gcpro5, gcpro6;
- DBusConnection *connection;
- DBusMessage *dmessage;
- DBusMessageIter iter;
- unsigned int dtype;
- dbus_uint32_t serial;
- int timeout = -1;
- ptrdiff_t i = 6;
- char signature[DBUS_MAXIMUM_SIGNATURE_LENGTH];
+ else /* DBUS_MESSAGE_TYPE_METHOD_RETURN, DBUS_MESSAGE_TYPE_ERROR */
+ {
+ if (!dbus_message_set_reply_serial (dmessage, serial))
+ {
+ UNGCPRO;
+ XD_SIGNAL1 (build_string ("Unable to create a return message"));
+ }
- /* Check parameters. */
- bus = args[0];
- service = args[1];
- path = args[2];
- interface = args[3];
- method = args[4];
- handler = args[5];
-
- CHECK_STRING (service);
- CHECK_STRING (path);
- CHECK_STRING (interface);
- CHECK_STRING (method);
- if (!NILP (handler) && !FUNCTIONP (handler))
- wrong_type_argument (Qinvalid_function, handler);
- GCPRO6 (bus, service, path, interface, method, handler);
-
- XD_DEBUG_MESSAGE ("%s %s %s %s",
- SDATA (service),
- SDATA (path),
- SDATA (interface),
- SDATA (method));
-
- /* Open a connection to the bus. */
- connection = xd_initialize (bus, TRUE);
-
- /* Create the message. */
- dmessage = dbus_message_new_method_call (SSDATA (service),
- SSDATA (path),
- SSDATA (interface),
- SSDATA (method));
- if (dmessage == NULL)
- XD_SIGNAL1 (build_string ("Unable to create a new message"));
+ if ((mtype == DBUS_MESSAGE_TYPE_ERROR)
+ && (!dbus_message_set_error_name (dmessage, DBUS_ERROR_FAILED)))
+ {
+ UNGCPRO;
+ XD_SIGNAL1 (build_string ("Unable to create a error message"));
+ }
+ }
/* Check for timeout parameter. */
- if ((i+2 <= nargs) && (EQ ((args[i]), QCdbus_timeout)))
+ if ((count+2 <= nargs) && (EQ ((args[count]), QCdbus_timeout)))
{
- CHECK_NATNUM (args[i+1]);
- timeout = min (XFASTINT (args[i+1]), INT_MAX);
- i = i+2;
+ CHECK_NATNUM (args[count+1]);
+ timeout = min (XFASTINT (args[count+1]), INT_MAX);
+ count = count+2;
}
/* Initialize parameter list of message. */
dbus_message_iter_init_append (dmessage, &iter);
/* Append parameters to the message. */
- for (; i < nargs; ++i)
+ for (; count < nargs; ++count)
{
- dtype = XD_OBJECT_TO_DBUS_TYPE (args[i]);
- if (XD_DBUS_TYPE_P (args[i]))
+ dtype = XD_OBJECT_TO_DBUS_TYPE (args[count]);
+ if (XD_DBUS_TYPE_P (args[count]))
{
- XD_DEBUG_VALID_LISP_OBJECT_P (args[i]);
- XD_DEBUG_VALID_LISP_OBJECT_P (args[i+1]);
- XD_DEBUG_MESSAGE ("Parameter%"pD"d %s %s", i - 4,
- SDATA (format2 ("%s", args[i], Qnil)),
- SDATA (format2 ("%s", args[i+1], Qnil)));
- ++i;
+ XD_DEBUG_VALID_LISP_OBJECT_P (args[count]);
+ XD_DEBUG_VALID_LISP_OBJECT_P (args[count+1]);
+ XD_DEBUG_MESSAGE ("Parameter%"pD"d %s %s", count - 4,
+ XD_OBJECT_TO_STRING (args[count]),
+ XD_OBJECT_TO_STRING (args[count+1]));
+ ++count;
}
else
{
- XD_DEBUG_VALID_LISP_OBJECT_P (args[i]);
- XD_DEBUG_MESSAGE ("Parameter%"pD"d %s", i - 4,
- SDATA (format2 ("%s", args[i], Qnil)));
+ XD_DEBUG_VALID_LISP_OBJECT_P (args[count]);
+ XD_DEBUG_MESSAGE ("Parameter%"pD"d %s", count - 4,
+ XD_OBJECT_TO_STRING (args[count]));
}
/* Check for valid signature. We use DBUS_TYPE_INVALID as
indication that there is no parent type. */
- xd_signature (signature, dtype, DBUS_TYPE_INVALID, args[i]);
+ xd_signature (signature, dtype, DBUS_TYPE_INVALID, args[count]);
- xd_append_arg (dtype, args[i], &iter);
+ xd_append_arg (dtype, args[count], &iter);
}
if (!NILP (handler))
@@ -1368,11 +1458,15 @@ usage: (dbus-call-method-asynchronously BUS SERVICE PATH INTERFACE METHOD HANDLE
message queue. */
if (!dbus_connection_send_with_reply (connection, dmessage,
NULL, timeout))
- XD_SIGNAL1 (build_string ("Cannot send message"));
+ {
+ UNGCPRO;
+ XD_SIGNAL1 (build_string ("Cannot send message"));
+ }
/* The result is the key in Vdbus_registered_objects_table. */
serial = dbus_message_get_serial (dmessage);
- result = list2 (bus, make_fixnum_or_float (serial));
+ result = list3 (QCdbus_registered_serial,
+ bus, make_fixnum_or_float (serial));
/* Create a hash table entry. */
Fputhash (result, handler, Vdbus_registered_objects_table);
@@ -1382,12 +1476,15 @@ usage: (dbus-call-method-asynchronously BUS SERVICE PATH INTERFACE METHOD HANDLE
/* Send the message. The message is just added to the outgoing
message queue. */
if (!dbus_connection_send (connection, dmessage, NULL))
- XD_SIGNAL1 (build_string ("Cannot send message"));
+ {
+ UNGCPRO;
+ XD_SIGNAL1 (build_string ("Cannot send message"));
+ }
result = Qnil;
}
- XD_DEBUG_MESSAGE ("Message sent");
+ XD_DEBUG_MESSAGE ("Message sent: %s", XD_OBJECT_TO_STRING (result));
/* Cleanup. */
dbus_message_unref (dmessage);
@@ -1396,300 +1493,6 @@ usage: (dbus-call-method-asynchronously BUS SERVICE PATH INTERFACE METHOD HANDLE
RETURN_UNGCPRO (result);
}
-DEFUN ("dbus-method-return-internal", Fdbus_method_return_internal,
- Sdbus_method_return_internal,
- 3, MANY, 0,
- doc: /* Return for message SERIAL on the D-Bus BUS.
-This is an internal function, it shall not be used outside dbus.el.
-
-usage: (dbus-method-return-internal BUS SERIAL SERVICE &rest ARGS) */)
- (ptrdiff_t nargs, Lisp_Object *args)
-{
- Lisp_Object bus, service;
- struct gcpro gcpro1, gcpro2;
- DBusConnection *connection;
- DBusMessage *dmessage;
- DBusMessageIter iter;
- dbus_uint32_t serial;
- unsigned int ui_serial, dtype;
- ptrdiff_t i;
- char signature[DBUS_MAXIMUM_SIGNATURE_LENGTH];
-
- /* Check parameters. */
- bus = args[0];
- service = args[2];
-
- CHECK_DBUS_SERIAL_GET_SERIAL (args[1], serial);
- CHECK_STRING (service);
- GCPRO2 (bus, service);
-
- ui_serial = serial;
- XD_DEBUG_MESSAGE ("%u %s ", ui_serial, SSDATA (service));
-
- /* Open a connection to the bus. */
- connection = xd_initialize (bus, TRUE);
-
- /* Create the message. */
- dmessage = dbus_message_new (DBUS_MESSAGE_TYPE_METHOD_RETURN);
- if ((dmessage == NULL)
- || (!dbus_message_set_reply_serial (dmessage, serial))
- || (!dbus_message_set_destination (dmessage, SSDATA (service))))
- {
- UNGCPRO;
- XD_SIGNAL1 (build_string ("Unable to create a return message"));
- }
-
- UNGCPRO;
-
- /* Initialize parameter list of message. */
- dbus_message_iter_init_append (dmessage, &iter);
-
- /* Append parameters to the message. */
- for (i = 3; i < nargs; ++i)
- {
- dtype = XD_OBJECT_TO_DBUS_TYPE (args[i]);
- if (XD_DBUS_TYPE_P (args[i]))
- {
- XD_DEBUG_VALID_LISP_OBJECT_P (args[i]);
- XD_DEBUG_VALID_LISP_OBJECT_P (args[i+1]);
- XD_DEBUG_MESSAGE ("Parameter%"pD"d %s %s", i - 2,
- SDATA (format2 ("%s", args[i], Qnil)),
- SDATA (format2 ("%s", args[i+1], Qnil)));
- ++i;
- }
- else
- {
- XD_DEBUG_VALID_LISP_OBJECT_P (args[i]);
- XD_DEBUG_MESSAGE ("Parameter%"pD"d %s", i - 2,
- SDATA (format2 ("%s", args[i], Qnil)));
- }
-
- /* Check for valid signature. We use DBUS_TYPE_INVALID as
- indication that there is no parent type. */
- xd_signature (signature, dtype, DBUS_TYPE_INVALID, args[i]);
-
- xd_append_arg (dtype, args[i], &iter);
- }
-
- /* Send the message. The message is just added to the outgoing
- message queue. */
- if (!dbus_connection_send (connection, dmessage, NULL))
- XD_SIGNAL1 (build_string ("Cannot send message"));
-
- XD_DEBUG_MESSAGE ("Message sent");
-
- /* Cleanup. */
- dbus_message_unref (dmessage);
-
- /* Return. */
- return Qt;
-}
-
-DEFUN ("dbus-method-error-internal", Fdbus_method_error_internal,
- Sdbus_method_error_internal,
- 3, MANY, 0,
- doc: /* Return error message for message SERIAL on the D-Bus BUS.
-This is an internal function, it shall not be used outside dbus.el.
-
-usage: (dbus-method-error-internal BUS SERIAL SERVICE &rest ARGS) */)
- (ptrdiff_t nargs, Lisp_Object *args)
-{
- Lisp_Object bus, service;
- struct gcpro gcpro1, gcpro2;
- DBusConnection *connection;
- DBusMessage *dmessage;
- DBusMessageIter iter;
- dbus_uint32_t serial;
- unsigned int ui_serial, dtype;
- ptrdiff_t i;
- char signature[DBUS_MAXIMUM_SIGNATURE_LENGTH];
-
- /* Check parameters. */
- bus = args[0];
- service = args[2];
-
- CHECK_DBUS_SERIAL_GET_SERIAL (args[1], serial);
- CHECK_STRING (service);
- GCPRO2 (bus, service);
-
- ui_serial = serial;
- XD_DEBUG_MESSAGE ("%u %s ", ui_serial, SSDATA (service));
-
- /* Open a connection to the bus. */
- connection = xd_initialize (bus, TRUE);
-
- /* Create the message. */
- dmessage = dbus_message_new (DBUS_MESSAGE_TYPE_ERROR);
- if ((dmessage == NULL)
- || (!dbus_message_set_error_name (dmessage, DBUS_ERROR_FAILED))
- || (!dbus_message_set_reply_serial (dmessage, serial))
- || (!dbus_message_set_destination (dmessage, SSDATA (service))))
- {
- UNGCPRO;
- XD_SIGNAL1 (build_string ("Unable to create a error message"));
- }
-
- UNGCPRO;
-
- /* Initialize parameter list of message. */
- dbus_message_iter_init_append (dmessage, &iter);
-
- /* Append parameters to the message. */
- for (i = 3; i < nargs; ++i)
- {
- dtype = XD_OBJECT_TO_DBUS_TYPE (args[i]);
- if (XD_DBUS_TYPE_P (args[i]))
- {
- XD_DEBUG_VALID_LISP_OBJECT_P (args[i]);
- XD_DEBUG_VALID_LISP_OBJECT_P (args[i+1]);
- XD_DEBUG_MESSAGE ("Parameter%"pD"d %s %s", i - 2,
- SDATA (format2 ("%s", args[i], Qnil)),
- SDATA (format2 ("%s", args[i+1], Qnil)));
- ++i;
- }
- else
- {
- XD_DEBUG_VALID_LISP_OBJECT_P (args[i]);
- XD_DEBUG_MESSAGE ("Parameter%"pD"d %s", i - 2,
- SDATA (format2 ("%s", args[i], Qnil)));
- }
-
- /* Check for valid signature. We use DBUS_TYPE_INVALID as
- indication that there is no parent type. */
- xd_signature (signature, dtype, DBUS_TYPE_INVALID, args[i]);
-
- xd_append_arg (dtype, args[i], &iter);
- }
-
- /* Send the message. The message is just added to the outgoing
- message queue. */
- if (!dbus_connection_send (connection, dmessage, NULL))
- XD_SIGNAL1 (build_string ("Cannot send message"));
-
- XD_DEBUG_MESSAGE ("Message sent");
-
- /* Cleanup. */
- dbus_message_unref (dmessage);
-
- /* Return. */
- return Qt;
-}
-
-DEFUN ("dbus-send-signal", Fdbus_send_signal, Sdbus_send_signal, 5, MANY, 0,
- doc: /* Send signal SIGNAL on the D-Bus BUS.
-
-BUS is either a Lisp symbol, `:system' or `:session', or a string
-denoting the bus address.
-
-SERVICE is the D-Bus service name SIGNAL is sent from. PATH is the
-D-Bus object path SERVICE is registered at. INTERFACE is an interface
-offered by SERVICE. It must provide signal SIGNAL.
-
-All other arguments ARGS are passed to SIGNAL as arguments. They are
-converted into D-Bus types via the following rules:
-
- t and nil => DBUS_TYPE_BOOLEAN
- number => DBUS_TYPE_UINT32
- integer => DBUS_TYPE_INT32
- float => DBUS_TYPE_DOUBLE
- string => DBUS_TYPE_STRING
- list => DBUS_TYPE_ARRAY
-
-All arguments can be preceded by a type symbol. For details about
-type symbols, see Info node `(dbus)Type Conversion'.
-
-Example:
-
-\(dbus-send-signal
- :session "org.gnu.Emacs" "/org/gnu/Emacs"
- "org.gnu.Emacs.FileManager" "FileModified" "/home/albinus/.emacs")
-
-usage: (dbus-send-signal BUS SERVICE PATH INTERFACE SIGNAL &rest ARGS) */)
- (ptrdiff_t nargs, Lisp_Object *args)
-{
- Lisp_Object bus, service, path, interface, signal;
- struct gcpro gcpro1, gcpro2, gcpro3, gcpro4, gcpro5;
- DBusConnection *connection;
- DBusMessage *dmessage;
- DBusMessageIter iter;
- unsigned int dtype;
- ptrdiff_t i;
- char signature[DBUS_MAXIMUM_SIGNATURE_LENGTH];
-
- /* Check parameters. */
- bus = args[0];
- service = args[1];
- path = args[2];
- interface = args[3];
- signal = args[4];
-
- CHECK_STRING (service);
- CHECK_STRING (path);
- CHECK_STRING (interface);
- CHECK_STRING (signal);
- GCPRO5 (bus, service, path, interface, signal);
-
- XD_DEBUG_MESSAGE ("%s %s %s %s",
- SDATA (service),
- SDATA (path),
- SDATA (interface),
- SDATA (signal));
-
- /* Open a connection to the bus. */
- connection = xd_initialize (bus, TRUE);
-
- /* Create the message. */
- dmessage = dbus_message_new_signal (SSDATA (path),
- SSDATA (interface),
- SSDATA (signal));
- UNGCPRO;
- if (dmessage == NULL)
- XD_SIGNAL1 (build_string ("Unable to create a new message"));
-
- /* Initialize parameter list of message. */
- dbus_message_iter_init_append (dmessage, &iter);
-
- /* Append parameters to the message. */
- for (i = 5; i < nargs; ++i)
- {
- dtype = XD_OBJECT_TO_DBUS_TYPE (args[i]);
- if (XD_DBUS_TYPE_P (args[i]))
- {
- XD_DEBUG_VALID_LISP_OBJECT_P (args[i]);
- XD_DEBUG_VALID_LISP_OBJECT_P (args[i+1]);
- XD_DEBUG_MESSAGE ("Parameter%"pD"d %s %s", i - 4,
- SDATA (format2 ("%s", args[i], Qnil)),
- SDATA (format2 ("%s", args[i+1], Qnil)));
- ++i;
- }
- else
- {
- XD_DEBUG_VALID_LISP_OBJECT_P (args[i]);
- XD_DEBUG_MESSAGE ("Parameter%"pD"d %s", i - 4,
- SDATA (format2 ("%s", args[i], Qnil)));
- }
-
- /* Check for valid signature. We use DBUS_TYPE_INVALID as
- indication that there is no parent type. */
- xd_signature (signature, dtype, DBUS_TYPE_INVALID, args[i]);
-
- xd_append_arg (dtype, args[i], &iter);
- }
-
- /* Send the message. The message is just added to the outgoing
- message queue. */
- if (!dbus_connection_send (connection, dmessage, NULL))
- XD_SIGNAL1 (build_string ("Cannot send message"));
-
- XD_DEBUG_MESSAGE ("Signal sent");
-
- /* Cleanup. */
- dbus_message_unref (dmessage);
-
- /* Return. */
- return Qt;
-}
-
/* Read one queued incoming message of the D-Bus BUS.
BUS is either a Lisp symbol, :system or :session, or a string denoting
the bus address. */
@@ -1702,7 +1505,7 @@ xd_read_message_1 (DBusConnection *connection, Lisp_Object bus)
DBusMessage *dmessage;
DBusMessageIter iter;
unsigned int dtype;
- int mtype;
+ unsigned int mtype;
dbus_uint32_t serial;
unsigned int ui_serial;
const char *uname, *path, *interface, *member;
@@ -1744,23 +1547,19 @@ xd_read_message_1 (DBusConnection *connection, Lisp_Object bus)
member = dbus_message_get_member (dmessage);
XD_DEBUG_MESSAGE ("Event received: %s %u %s %s %s %s %s",
- (mtype == DBUS_MESSAGE_TYPE_INVALID)
- ? "DBUS_MESSAGE_TYPE_INVALID"
- : (mtype == DBUS_MESSAGE_TYPE_METHOD_CALL)
- ? "DBUS_MESSAGE_TYPE_METHOD_CALL"
- : (mtype == DBUS_MESSAGE_TYPE_METHOD_RETURN)
- ? "DBUS_MESSAGE_TYPE_METHOD_RETURN"
- : (mtype == DBUS_MESSAGE_TYPE_ERROR)
- ? "DBUS_MESSAGE_TYPE_ERROR"
- : "DBUS_MESSAGE_TYPE_SIGNAL",
+ XD_MESSAGE_TYPE_TO_STRING (mtype),
ui_serial, uname, path, interface, member,
- SDATA (format2 ("%s", args, Qnil)));
+ XD_OBJECT_TO_STRING (args));
+
+ if (mtype == DBUS_MESSAGE_TYPE_INVALID)
+ goto cleanup;
- if ((mtype == DBUS_MESSAGE_TYPE_METHOD_RETURN)
- || (mtype == DBUS_MESSAGE_TYPE_ERROR))
+ else if ((mtype == DBUS_MESSAGE_TYPE_METHOD_RETURN)
+ || (mtype == DBUS_MESSAGE_TYPE_ERROR))
{
/* Search for a registered function of the message. */
- key = list2 (bus, make_fixnum_or_float (serial));
+ key = list3 (QCdbus_registered_serial, bus,
+ make_fixnum_or_float (serial));
value = Fgethash (key, Vdbus_registered_objects_table, Qnil);
/* There shall be exactly one entry. Construct an event. */
@@ -1777,7 +1576,7 @@ xd_read_message_1 (DBusConnection *connection, Lisp_Object bus)
event.arg = Fcons (value, args);
}
- else /* (mtype != DBUS_MESSAGE_TYPE_METHOD_RETURN) */
+ else /* DBUS_MESSAGE_TYPE_METHOD_CALL, DBUS_MESSAGE_TYPE_SIGNAL. */
{
/* Vdbus_registered_objects_table requires non-nil interface and
member. */
@@ -1785,7 +1584,10 @@ xd_read_message_1 (DBusConnection *connection, Lisp_Object bus)
goto cleanup;
/* Search for a registered function of the message. */
- key = list3 (bus, build_string (interface), build_string (member));
+ key = list4 ((mtype == DBUS_MESSAGE_TYPE_METHOD_CALL)
+ ? QCdbus_registered_method
+ : QCdbus_registered_signal,
+ bus, build_string (interface), build_string (member));
value = Fgethash (key, Vdbus_registered_objects_table, Qnil);
/* Loop over the registered functions. Construct an event. */
@@ -1835,8 +1637,7 @@ xd_read_message_1 (DBusConnection *connection, Lisp_Object bus)
/* Store it into the input event queue. */
kbd_buffer_store_event (&event);
- XD_DEBUG_MESSAGE ("Event stored: %s",
- SDATA (format2 ("%s", event.arg, Qnil)));
+ XD_DEBUG_MESSAGE ("Event stored: %s", XD_OBJECT_TO_STRING (event.arg));
/* Cleanup. */
cleanup:
@@ -1851,8 +1652,8 @@ xd_read_message_1 (DBusConnection *connection, Lisp_Object bus)
static Lisp_Object
xd_read_message (Lisp_Object bus)
{
- /* Open a connection to the bus. */
- DBusConnection *connection = xd_initialize (bus, TRUE);
+ /* Retrieve bus address. */
+ DBusConnection *connection = xd_get_connection_address (bus);
/* Non blocking read of the next available message. */
dbus_connection_read_write (connection, 0);
@@ -1867,16 +1668,18 @@ xd_read_message (Lisp_Object bus)
static void
xd_read_queued_messages (int fd, void *data, int for_read)
{
- Lisp_Object busp = Vdbus_registered_buses;
+ Lisp_Object busp = xd_registered_buses;
Lisp_Object bus = Qnil;
+ Lisp_Object key;
/* Find bus related to fd. */
if (data != NULL)
while (!NILP (busp))
{
- if ((SYMBOLP (CAR_SAFE (busp)) && XSYMBOL (CAR_SAFE (busp)) == data)
- || (STRINGP (CAR_SAFE (busp)) && XSTRING (CAR_SAFE (busp)) == data))
- bus = CAR_SAFE (busp);
+ key = CAR_SAFE (CAR_SAFE (busp));
+ if ((SYMBOLP (key) && XSYMBOL (key) == data)
+ || (STRINGP (key) && XSTRING (key) == data))
+ bus = key;
busp = CDR_SAFE (busp);
}
@@ -1889,327 +1692,6 @@ xd_read_queued_messages (int fd, void *data, int for_read)
xd_in_read_queued_messages = 0;
}
-DEFUN ("dbus-register-service", Fdbus_register_service, Sdbus_register_service,
- 2, MANY, 0,
- doc: /* Register known name SERVICE on the D-Bus BUS.
-
-BUS is either a Lisp symbol, `:system' or `:session', or a string
-denoting the bus address.
-
-SERVICE is the D-Bus service name that should be registered. It must
-be a known name.
-
-FLAGS are keywords, which control how the service name is registered.
-The following keywords are recognized:
-
-`:allow-replacement': Allow another service to become the primary
-owner if requested.
-
-`:replace-existing': Request to replace the current primary owner.
-
-`:do-not-queue': If we can not become the primary owner do not place
-us in the queue.
-
-The function returns a keyword, indicating the result of the
-operation. One of the following keywords is returned:
-
-`:primary-owner': Service has become the primary owner of the
-requested name.
-
-`:in-queue': Service could not become the primary owner and has been
-placed in the queue.
-
-`:exists': Service is already in the queue.
-
-`:already-owner': Service is already the primary owner.
-
-Example:
-
-\(dbus-register-service :session dbus-service-emacs)
-
- => :primary-owner.
-
-\(dbus-register-service
- :session "org.freedesktop.TextEditor"
- dbus-service-allow-replacement dbus-service-replace-existing)
-
- => :already-owner.
-
-usage: (dbus-register-service BUS SERVICE &rest FLAGS) */)
- (ptrdiff_t nargs, Lisp_Object *args)
-{
- Lisp_Object bus, service;
- DBusConnection *connection;
- ptrdiff_t i;
- unsigned int value;
- unsigned int flags = 0;
- int result;
- DBusError derror;
-
- bus = args[0];
- service = args[1];
-
- /* Check parameters. */
- CHECK_STRING (service);
-
- /* Process flags. */
- for (i = 2; i < nargs; ++i) {
- value = ((EQ (args[i], QCdbus_request_name_replace_existing))
- ? DBUS_NAME_FLAG_REPLACE_EXISTING
- : (EQ (args[i], QCdbus_request_name_allow_replacement))
- ? DBUS_NAME_FLAG_ALLOW_REPLACEMENT
- : (EQ (args[i], QCdbus_request_name_do_not_queue))
- ? DBUS_NAME_FLAG_DO_NOT_QUEUE
- : -1);
- if (value == -1)
- XD_SIGNAL2 (build_string ("Unrecognized name request flag"), args[i]);
- flags |= value;
- }
-
- /* Open a connection to the bus. */
- connection = xd_initialize (bus, TRUE);
-
- /* Request the known name from the bus. */
- dbus_error_init (&derror);
- result = dbus_bus_request_name (connection, SSDATA (service), flags,
- &derror);
- if (dbus_error_is_set (&derror))
- XD_ERROR (derror);
-
- /* Cleanup. */
- dbus_error_free (&derror);
-
- /* Return object. */
- switch (result)
- {
- case DBUS_REQUEST_NAME_REPLY_PRIMARY_OWNER:
- return QCdbus_request_name_reply_primary_owner;
- case DBUS_REQUEST_NAME_REPLY_IN_QUEUE:
- return QCdbus_request_name_reply_in_queue;
- case DBUS_REQUEST_NAME_REPLY_EXISTS:
- return QCdbus_request_name_reply_exists;
- case DBUS_REQUEST_NAME_REPLY_ALREADY_OWNER:
- return QCdbus_request_name_reply_already_owner;
- default:
- /* This should not happen. */
- XD_SIGNAL2 (build_string ("Could not register service"), service);
- }
-}
-
-DEFUN ("dbus-register-signal", Fdbus_register_signal, Sdbus_register_signal,
- 6, MANY, 0,
- doc: /* Register for signal SIGNAL on the D-Bus BUS.
-
-BUS is either a Lisp symbol, `:system' or `:session', or a string
-denoting the bus address.
-
-SERVICE is the D-Bus service name used by the sending D-Bus object.
-It can be either a known name or the unique name of the D-Bus object
-sending the signal. When SERVICE is nil, related signals from all
-D-Bus objects shall be accepted.
-
-PATH is the D-Bus object path SERVICE is registered. It can also be
-nil if the path name of incoming signals shall not be checked.
-
-INTERFACE is an interface offered by SERVICE. It must provide SIGNAL.
-HANDLER is a Lisp function to be called when the signal is received.
-It must accept as arguments the values SIGNAL is sending.
-
-All other arguments ARGS, if specified, must be strings. They stand
-for the respective arguments of the signal in their order, and are
-used for filtering as well. A nil argument might be used to preserve
-the order.
-
-INTERFACE, SIGNAL and HANDLER must not be nil. Example:
-
-\(defun my-signal-handler (device)
- (message "Device %s added" device))
-
-\(dbus-register-signal
- :system "org.freedesktop.Hal" "/org/freedesktop/Hal/Manager"
- "org.freedesktop.Hal.Manager" "DeviceAdded" 'my-signal-handler)
-
- => ((:system "org.freedesktop.Hal.Manager" "DeviceAdded")
- ("org.freedesktop.Hal" "/org/freedesktop/Hal/Manager" my-signal-handler))
-
-`dbus-register-signal' returns an object, which can be used in
-`dbus-unregister-object' for removing the registration.
-
-usage: (dbus-register-signal BUS SERVICE PATH INTERFACE SIGNAL HANDLER &rest ARGS) */)
- (ptrdiff_t nargs, Lisp_Object *args)
-{
- Lisp_Object bus, service, path, interface, signal, handler;
- struct gcpro gcpro1, gcpro2, gcpro3, gcpro4, gcpro5, gcpro6;
- Lisp_Object uname, key, key1, value;
- DBusConnection *connection;
- ptrdiff_t i;
- char rule[DBUS_MAXIMUM_MATCH_RULE_LENGTH];
- int rulelen;
- DBusError derror;
-
- /* Check parameters. */
- bus = args[0];
- service = args[1];
- path = args[2];
- interface = args[3];
- signal = args[4];
- handler = args[5];
-
- if (!NILP (service)) CHECK_STRING (service);
- if (!NILP (path)) CHECK_STRING (path);
- CHECK_STRING (interface);
- CHECK_STRING (signal);
- if (!FUNCTIONP (handler))
- wrong_type_argument (Qinvalid_function, handler);
- GCPRO6 (bus, service, path, interface, signal, handler);
-
- /* Retrieve unique name of service. If service is a known name, we
- will register for the corresponding unique name, if any. Signals
- are sent always with the unique name as sender. Note: the unique
- name of "org.freedesktop.DBus" is that string itself. */
- if ((STRINGP (service))
- && (SBYTES (service) > 0)
- && (strcmp (SSDATA (service), DBUS_SERVICE_DBUS) != 0)
- && (strncmp (SSDATA (service), ":", 1) != 0))
- uname = call2 (intern ("dbus-get-name-owner"), bus, service);
- else
- uname = service;
-
- /* Create a matching rule if the unique name exists (when no
- wildcard). */
- if (NILP (uname) || (SBYTES (uname) > 0))
- {
- /* Open a connection to the bus. */
- connection = xd_initialize (bus, TRUE);
-
- /* Create a rule to receive related signals. */
- rulelen = snprintf (rule, sizeof rule,
- "type='signal',interface='%s',member='%s'",
- SDATA (interface),
- SDATA (signal));
- if (! (0 <= rulelen && rulelen < sizeof rule))
- string_overflow ();
-
- /* Add unique name and path to the rule if they are non-nil. */
- if (!NILP (uname))
- {
- int len = snprintf (rule + rulelen, sizeof rule - rulelen,
- ",sender='%s'", SDATA (uname));
- if (! (0 <= len && len < sizeof rule - rulelen))
- string_overflow ();
- rulelen += len;
- }
-
- if (!NILP (path))
- {
- int len = snprintf (rule + rulelen, sizeof rule - rulelen,
- ",path='%s'", SDATA (path));
- if (! (0 <= len && len < sizeof rule - rulelen))
- string_overflow ();
- rulelen += len;
- }
-
- /* Add arguments to the rule if they are non-nil. */
- for (i = 6; i < nargs; ++i)
- if (!NILP (args[i]))
- {
- int len;
- CHECK_STRING (args[i]);
- len = snprintf (rule + rulelen, sizeof rule - rulelen,
- ",arg%"pD"d='%s'", i - 6, SDATA (args[i]));
- if (! (0 <= len && len < sizeof rule - rulelen))
- string_overflow ();
- rulelen += len;
- }
-
- /* Add the rule to the bus. */
- dbus_error_init (&derror);
- dbus_bus_add_match (connection, rule, &derror);
- if (dbus_error_is_set (&derror))
- {
- UNGCPRO;
- XD_ERROR (derror);
- }
-
- /* Cleanup. */
- dbus_error_free (&derror);
-
- XD_DEBUG_MESSAGE ("Matching rule \"%s\" created", rule);
- }
-
- /* Create a hash table entry. */
- key = list3 (bus, interface, signal);
- key1 = list5 (uname, service, path, handler, build_string (rule));
- value = Fgethash (key, Vdbus_registered_objects_table, Qnil);
-
- if (NILP (Fmember (key1, value)))
- Fputhash (key, Fcons (key1, value), Vdbus_registered_objects_table);
-
- /* Return object. */
- RETURN_UNGCPRO (list2 (key, list3 (service, path, handler)));
-}
-
-DEFUN ("dbus-register-method", Fdbus_register_method, Sdbus_register_method,
- 6, 7, 0,
- doc: /* Register for method METHOD on the D-Bus BUS.
-
-BUS is either a Lisp symbol, `:system' or `:session', or a string
-denoting the bus address.
-
-SERVICE is the D-Bus service name of the D-Bus object METHOD is
-registered for. It must be a known name (See discussion of
-DONT-REGISTER-SERVICE below).
-
-PATH is the D-Bus object path SERVICE is registered (See discussion of
-DONT-REGISTER-SERVICE below). INTERFACE is the interface offered by
-SERVICE. It must provide METHOD.
-
-HANDLER is a Lisp function to be called when a method call is
-received. It must accept the input arguments of METHOD. The return
-value of HANDLER is used for composing the returning D-Bus message.
-In case HANDLER shall return a reply message with an empty argument
-list, HANDLER must return the symbol `:ignore'.
-
-When DONT-REGISTER-SERVICE is non-nil, the known name SERVICE is not
-registered. This means that other D-Bus clients have no way of
-noticing the newly registered method. When interfaces are constructed
-incrementally by adding single methods or properties at a time,
-DONT-REGISTER-SERVICE can be used to prevent other clients from
-discovering the still incomplete interface.*/)
- (Lisp_Object bus, Lisp_Object service, Lisp_Object path,
- Lisp_Object interface, Lisp_Object method, Lisp_Object handler,
- Lisp_Object dont_register_service)
-{
- Lisp_Object key, key1, value;
- Lisp_Object args[2] = { bus, service };
-
- /* Check parameters. */
- CHECK_STRING (service);
- CHECK_STRING (path);
- CHECK_STRING (interface);
- CHECK_STRING (method);
- if (!FUNCTIONP (handler))
- wrong_type_argument (Qinvalid_function, handler);
- /* TODO: We must check for a valid service name, otherwise there is
- a segmentation fault. */
-
- /* Request the name. */
- if (NILP (dont_register_service))
- Fdbus_register_service (2, args);
-
- /* Create a hash table entry. We use nil for the unique name,
- because the method might be called from anybody. */
- key = list3 (bus, interface, method);
- key1 = list4 (Qnil, service, path, handler);
- value = Fgethash (key, Vdbus_registered_objects_table, Qnil);
-
- if (NILP (Fmember (key1, value)))
- Fputhash (key, Fcons (key1, value), Vdbus_registered_objects_table);
-
- /* Return object. */
- return list2 (key, list3 (service, path, handler));
-}
-
void
syms_of_dbusbind (void)
@@ -2218,35 +1700,11 @@ syms_of_dbusbind (void)
DEFSYM (Qdbus_init_bus, "dbus-init-bus");
defsubr (&Sdbus_init_bus);
- DEFSYM (Qdbus_close_bus, "dbus-close-bus");
- defsubr (&Sdbus_close_bus);
-
DEFSYM (Qdbus_get_unique_name, "dbus-get-unique-name");
defsubr (&Sdbus_get_unique_name);
- DEFSYM (Qdbus_call_method, "dbus-call-method");
- defsubr (&Sdbus_call_method);
-
- DEFSYM (Qdbus_call_method_asynchronously, "dbus-call-method-asynchronously");
- defsubr (&Sdbus_call_method_asynchronously);
-
- DEFSYM (Qdbus_method_return_internal, "dbus-method-return-internal");
- defsubr (&Sdbus_method_return_internal);
-
- DEFSYM (Qdbus_method_error_internal, "dbus-method-error-internal");
- defsubr (&Sdbus_method_error_internal);
-
- DEFSYM (Qdbus_send_signal, "dbus-send-signal");
- defsubr (&Sdbus_send_signal);
-
- DEFSYM (Qdbus_register_service, "dbus-register-service");
- defsubr (&Sdbus_register_service);
-
- DEFSYM (Qdbus_register_signal, "dbus-register-signal");
- defsubr (&Sdbus_register_signal);
-
- DEFSYM (Qdbus_register_method, "dbus-register-method");
- defsubr (&Sdbus_register_method);
+ DEFSYM (Qdbus_message_internal, "dbus-message-internal");
+ defsubr (&Sdbus_message_internal);
DEFSYM (Qdbus_error, "dbus-error");
Fput (Qdbus_error, Qerror_conditions,
@@ -2256,13 +1714,6 @@ syms_of_dbusbind (void)
DEFSYM (QCdbus_system_bus, ":system");
DEFSYM (QCdbus_session_bus, ":session");
- DEFSYM (QCdbus_request_name_allow_replacement, ":allow-replacement");
- DEFSYM (QCdbus_request_name_replace_existing, ":replace-existing");
- DEFSYM (QCdbus_request_name_do_not_queue, ":do-not-queue");
- DEFSYM (QCdbus_request_name_reply_primary_owner, ":primary-owner");
- DEFSYM (QCdbus_request_name_reply_exists, ":exists");
- DEFSYM (QCdbus_request_name_reply_in_queue, ":in-queue");
- DEFSYM (QCdbus_request_name_reply_already_owner, ":already-owner");
DEFSYM (QCdbus_timeout, ":timeout");
DEFSYM (QCdbus_type_byte, ":byte");
DEFSYM (QCdbus_type_boolean, ":boolean");
@@ -2276,20 +1727,66 @@ syms_of_dbusbind (void)
DEFSYM (QCdbus_type_string, ":string");
DEFSYM (QCdbus_type_object_path, ":object-path");
DEFSYM (QCdbus_type_signature, ":signature");
-
#ifdef DBUS_TYPE_UNIX_FD
DEFSYM (QCdbus_type_unix_fd, ":unix-fd");
#endif
-
DEFSYM (QCdbus_type_array, ":array");
DEFSYM (QCdbus_type_variant, ":variant");
DEFSYM (QCdbus_type_struct, ":struct");
DEFSYM (QCdbus_type_dict_entry, ":dict-entry");
+ DEFSYM (QCdbus_registered_serial, ":serial");
+ DEFSYM (QCdbus_registered_method, ":method");
+ DEFSYM (QCdbus_registered_signal, ":signal");
+
+ DEFVAR_LISP ("dbus-compiled-version",
+ Vdbus_compiled_version,
+ doc: /* The version of D-Bus Emacs is compiled against. */);
+#ifdef DBUS_VERSION_STRING
+ Vdbus_compiled_version = make_pure_c_string (DBUS_VERSION_STRING);
+#else
+ Vdbus_compiled_version = Qnil;
+#endif
+
+ DEFVAR_LISP ("dbus-runtime-version",
+ Vdbus_runtime_version,
+ doc: /* The version of D-Bus Emacs runs with. */);
+ {
+#ifdef DBUS_VERSION
+ int major, minor, micro;
+ char s[1024];
+ dbus_get_version (&major, &minor, &micro);
+ snprintf (s, sizeof s, "%d.%d.%d", major, minor, micro);
+ Vdbus_runtime_version = make_string (s, strlen (s));
+#else
+ Vdbus_runtime_version = Qnil;
+#endif
+ }
+
+ DEFVAR_LISP ("dbus-message-type-invalid",
+ Vdbus_message_type_invalid,
+ doc: /* This value is never a valid message type. */);
+ Vdbus_message_type_invalid = make_number (DBUS_MESSAGE_TYPE_INVALID);
- DEFVAR_LISP ("dbus-registered-buses",
- Vdbus_registered_buses,
- doc: /* List of D-Bus buses we are polling for messages. */);
- Vdbus_registered_buses = Qnil;
+ DEFVAR_LISP ("dbus-message-type-method-call",
+ Vdbus_message_type_method_call,
+ doc: /* Message type of a method call message. */);
+ Vdbus_message_type_method_call = make_number (DBUS_MESSAGE_TYPE_METHOD_CALL);
+
+ DEFVAR_LISP ("dbus-message-type-method-return",
+ Vdbus_message_type_method_return,
+ doc: /* Message type of a method return message. */);
+ Vdbus_message_type_method_return
+ = make_number (DBUS_MESSAGE_TYPE_METHOD_RETURN);
+
+ DEFVAR_LISP ("dbus-message-type-error",
+ Vdbus_message_type_error,
+ doc: /* Message type of an error reply message. */);
+ Vdbus_message_type_error = make_number (DBUS_MESSAGE_TYPE_ERROR);
+
+ DEFVAR_LISP ("dbus-message-type-signal",
+ Vdbus_message_type_signal,
+ doc: /* Message type of a signal message. */);
+ Vdbus_message_type_signal = make_number (DBUS_MESSAGE_TYPE_SIGNAL);
DEFVAR_LISP ("dbus-registered-objects-table",
Vdbus_registered_objects_table,
@@ -2299,27 +1796,28 @@ There are two different uses of the hash table: for accessing
registered interfaces properties, targeted by signals or method calls,
and for calling handlers in case of non-blocking method call returns.
-In the first case, the key in the hash table is the list (BUS
-INTERFACE MEMBER). BUS is either a Lisp symbol, `:system' or
+In the first case, the key in the hash table is the list (TYPE BUS
+INTERFACE MEMBER). TYPE is one of the Lisp symbols `:method',
+`:signal' or `:property'. BUS is either a Lisp symbol, `:system' or
`:session', or a string denoting the bus address. INTERFACE is a
string which denotes a D-Bus interface, and MEMBER, also a string, is
either a method, a signal or a property INTERFACE is offering. All
arguments but BUS must not be nil.
-The value in the hash table is a list of quadruple lists
-\((UNAME SERVICE PATH OBJECT) (UNAME SERVICE PATH OBJECT) ...).
-SERVICE is the service name as registered, UNAME is the corresponding
-unique name. In case of registered methods and properties, UNAME is
-nil. PATH is the object path of the sending object. All of them can
-be nil, which means a wildcard then. OBJECT is either the handler to
-be called when a D-Bus message, which matches the key criteria,
-arrives (methods and signals), or a cons cell containing the value of
-the property.
+The value in the hash table is a list of quadruple lists \((UNAME
+SERVICE PATH OBJECT [RULE]) ...). SERVICE is the service name as
+registered, UNAME is the corresponding unique name. In case of
+registered methods and properties, UNAME is nil. PATH is the object
+path of the sending object. All of them can be nil, which means a
+wildcard then. OBJECT is either the handler to be called when a D-Bus
+message, which matches the key criteria, arrives (TYPE `:method' and
+`:signal'), or a cons cell containing the value of the property (TYPE
+`:property').
-For signals, there is also a fifth element RULE, which keeps the match
-string the signal is registered with.
+For entries of type `:signal', there is also a fifth element RULE,
+which keeps the match string the signal is registered with.
-In the second case, the key in the hash table is the list (BUS
+In the second case, the key in the hash table is the list (:serial BUS
SERIAL). BUS is either a Lisp symbol, `:system' or `:session', or a
string denoting the bus address. SERIAL is the serial number of the
non-blocking method call, a reply is expected. Both arguments must
@@ -2343,6 +1841,10 @@ be called when the D-Bus reply message arrives. */);
Vdbus_debug = Qnil;
#endif
+ /* Initialize internal objects. */
+ xd_registered_buses = Qnil;
+ staticpro (&xd_registered_buses);
+
Fprovide (intern_c_string ("dbusbind"), Qnil);
}
diff --git a/src/dispextern.h b/src/dispextern.h
index 93611403649..979ade70bfc 100644
--- a/src/dispextern.h
+++ b/src/dispextern.h
@@ -3243,7 +3243,6 @@ extern Window tip_window;
EXFUN (Fx_hide_tip, 0);
extern void start_hourglass (void);
extern void cancel_hourglass (void);
-extern int hourglass_started (void);
extern int hourglass_shown_p;
struct atimer; /* Defined in atimer.h. */
/* If non-null, an asynchronous timer that, when it expires, displays
diff --git a/src/dispnew.c b/src/dispnew.c
index 41e6e5b8df6..d8808de3caa 100644
--- a/src/dispnew.c
+++ b/src/dispnew.c
@@ -1,5 +1,6 @@
/* Updating of data structures for redisplay.
- Copyright (C) 1985-1988, 1993-1995, 1997-2012 Free Software Foundation, Inc.
+
+Copyright (C) 1985-1988, 1993-1995, 1997-2012 Free Software Foundation, Inc.
This file is part of GNU Emacs.
@@ -87,7 +88,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#endif
#endif /* not __GNU_LIBRARY__ */
-#if defined (HAVE_TERM_H) && defined (GNU_LINUX) && defined (HAVE_LIBNCURSES)
+#if defined (HAVE_TERM_H) && defined (GNU_LINUX)
#include <term.h> /* for tgetent */
#endif
@@ -1085,12 +1086,16 @@ swap_glyph_pointers (struct glyph_row *a, struct glyph_row *b)
for (i = 0; i < LAST_AREA + 1; ++i)
{
struct glyph *temp = a->glyphs[i];
- short used_tem = a->used[i];
a->glyphs[i] = b->glyphs[i];
b->glyphs[i] = temp;
- a->used[i] = b->used[i];
- b->used[i] = used_tem;
+ if (i < LAST_AREA)
+ {
+ short used_tem = a->used[i];
+
+ a->used[i] = b->used[i];
+ b->used[i] = used_tem;
+ }
}
a->hash = b->hash;
b->hash = hash_tem;
@@ -1105,7 +1110,7 @@ static inline void
copy_row_except_pointers (struct glyph_row *to, struct glyph_row *from)
{
struct glyph *pointers[1 + LAST_AREA];
- short used[1 + LAST_AREA];
+ short used[LAST_AREA];
unsigned hashval;
/* Save glyph pointers of TO. */
@@ -6308,7 +6313,7 @@ init_display (void)
#ifdef HAVE_X11
Vwindow_system_version = make_number (11);
#endif
-#if defined (GNU_LINUX) && defined (HAVE_LIBNCURSES)
+#ifdef GNU_LINUX
/* In some versions of ncurses,
tputs crashes if we have not called tgetent.
So call tgetent. */
diff --git a/src/editfns.c b/src/editfns.c
index 7e7f82c5992..6d59b89513c 100644
--- a/src/editfns.c
+++ b/src/editfns.c
@@ -59,10 +59,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#include "window.h"
#include "blockinput.h"
-#ifndef NULL
-#define NULL 0
-#endif
-
#ifndef USER_FULL_NAME
#define USER_FULL_NAME pw->pw_gecos
#endif
@@ -73,20 +69,13 @@ extern char **environ;
#define TM_YEAR_BASE 1900
-/* Nonzero if TM_YEAR is a struct tm's tm_year value that causes
- asctime to have well-defined behavior. */
-#ifndef TM_YEAR_IN_ASCTIME_RANGE
-# define TM_YEAR_IN_ASCTIME_RANGE(tm_year) \
- (1000 - TM_YEAR_BASE <= (tm_year) && (tm_year) <= 9999 - TM_YEAR_BASE)
-#endif
-
#ifdef WINDOWSNT
extern Lisp_Object w32_get_internal_run_time (void);
#endif
static void time_overflow (void) NO_RETURN;
static Lisp_Object format_time_string (char const *, ptrdiff_t, Lisp_Object,
- int, time_t *, struct tm **);
+ int, time_t *, struct tm *);
static int tm_diff (struct tm *, struct tm *);
static void update_buffer_properties (ptrdiff_t, ptrdiff_t);
@@ -1691,7 +1680,7 @@ usage: (format-time-string FORMAT-STRING &optional TIME UNIVERSAL) */)
(Lisp_Object format_string, Lisp_Object timeval, Lisp_Object universal)
{
time_t t;
- struct tm *tm;
+ struct tm tm;
CHECK_STRING (format_string);
format_string = code_convert_string_norecord (format_string,
@@ -1702,53 +1691,54 @@ usage: (format-time-string FORMAT-STRING &optional TIME UNIVERSAL) */)
static Lisp_Object
format_time_string (char const *format, ptrdiff_t formatlen,
- Lisp_Object timeval, int ut, time_t *tval, struct tm **tmp)
+ Lisp_Object timeval, int ut, time_t *tval, struct tm *tmp)
{
- ptrdiff_t size;
+ char buffer[4000];
+ char *buf = buffer;
+ size_t size = sizeof buffer;
+ size_t len;
+ Lisp_Object bufstring;
int usec;
int ns;
struct tm *tm;
+ USE_SAFE_ALLOCA;
if (! lisp_time_argument (timeval, tval, &usec))
error ("Invalid time specification");
ns = usec * 1000;
- /* This is probably enough. */
- size = formatlen;
- if (size <= (STRING_BYTES_BOUND - 50) / 6)
- size = size * 6 + 50;
-
- BLOCK_INPUT;
- tm = ut ? gmtime (tval) : localtime (tval);
- UNBLOCK_INPUT;
- if (! tm)
- time_overflow ();
- *tmp = tm;
-
- synchronize_system_time_locale ();
-
while (1)
{
- char *buf = (char *) alloca (size + 1);
- size_t result;
+ BLOCK_INPUT;
+
+ synchronize_system_time_locale ();
+
+ tm = ut ? gmtime (tval) : localtime (tval);
+ if (! tm)
+ {
+ UNBLOCK_INPUT;
+ time_overflow ();
+ }
+ *tmp = *tm;
buf[0] = '\1';
- BLOCK_INPUT;
- result = emacs_nmemftime (buf, size, format, formatlen, tm, ut, ns);
- UNBLOCK_INPUT;
- if ((result > 0 && result < size) || (result == 0 && buf[0] == '\0'))
- return code_convert_string_norecord (make_unibyte_string (buf, result),
- Vlocale_coding_system, 0);
+ len = emacs_nmemftime (buf, size, format, formatlen, tm, ut, ns);
+ if ((0 < len && len < size) || (len == 0 && buf[0] == '\0'))
+ break;
- /* If buffer was too small, make it bigger and try again. */
- BLOCK_INPUT;
- result = emacs_nmemftime (NULL, (size_t) -1, format, formatlen,
- tm, ut, ns);
+ /* Buffer was too small, so make it bigger and try again. */
+ len = emacs_nmemftime (NULL, SIZE_MAX, format, formatlen, tm, ut, ns);
UNBLOCK_INPUT;
- if (STRING_BYTES_BOUND <= result)
+ if (STRING_BYTES_BOUND <= len)
string_overflow ();
- size = result + 1;
+ size = len + 1;
+ SAFE_ALLOCA (buf, char *, size);
}
+
+ UNBLOCK_INPUT;
+ bufstring = make_unibyte_string (buf, len);
+ SAFE_FREE ();
+ return code_convert_string_norecord (bufstring, Vlocale_coding_system, 0);
}
DEFUN ("decode-time", Fdecode_time, Sdecode_time, 0, 1, 0,
@@ -1778,31 +1768,32 @@ DOW and ZONE.) */)
BLOCK_INPUT;
decoded_time = localtime (&time_spec);
+ /* Make a copy, in case a signal handler modifies TZ or the struct. */
+ if (decoded_time)
+ save_tm = *decoded_time;
UNBLOCK_INPUT;
if (! (decoded_time
- && MOST_NEGATIVE_FIXNUM - TM_YEAR_BASE <= decoded_time->tm_year
- && decoded_time->tm_year <= MOST_POSITIVE_FIXNUM - TM_YEAR_BASE))
+ && MOST_NEGATIVE_FIXNUM - TM_YEAR_BASE <= save_tm.tm_year
+ && save_tm.tm_year <= MOST_POSITIVE_FIXNUM - TM_YEAR_BASE))
time_overflow ();
- XSETFASTINT (list_args[0], decoded_time->tm_sec);
- XSETFASTINT (list_args[1], decoded_time->tm_min);
- XSETFASTINT (list_args[2], decoded_time->tm_hour);
- XSETFASTINT (list_args[3], decoded_time->tm_mday);
- XSETFASTINT (list_args[4], decoded_time->tm_mon + 1);
+ XSETFASTINT (list_args[0], save_tm.tm_sec);
+ XSETFASTINT (list_args[1], save_tm.tm_min);
+ XSETFASTINT (list_args[2], save_tm.tm_hour);
+ XSETFASTINT (list_args[3], save_tm.tm_mday);
+ XSETFASTINT (list_args[4], save_tm.tm_mon + 1);
/* On 64-bit machines an int is narrower than EMACS_INT, thus the
cast below avoids overflow in int arithmetics. */
- XSETINT (list_args[5], TM_YEAR_BASE + (EMACS_INT) decoded_time->tm_year);
- XSETFASTINT (list_args[6], decoded_time->tm_wday);
- list_args[7] = (decoded_time->tm_isdst)? Qt : Qnil;
+ XSETINT (list_args[5], TM_YEAR_BASE + (EMACS_INT) save_tm.tm_year);
+ XSETFASTINT (list_args[6], save_tm.tm_wday);
+ list_args[7] = save_tm.tm_isdst ? Qt : Qnil;
- /* Make a copy, in case gmtime modifies the struct. */
- save_tm = *decoded_time;
BLOCK_INPUT;
decoded_time = gmtime (&time_spec);
- UNBLOCK_INPUT;
if (decoded_time == 0)
list_args[8] = Qnil;
else
XSETINT (list_args[8], tm_diff (&save_tm, decoded_time));
+ UNBLOCK_INPUT;
return Flist (9, list_args);
}
@@ -1887,21 +1878,23 @@ usage: (encode-time SECOND MINUTE HOUR DAY MONTH YEAR &optional ZONE) */)
else
error ("Invalid time zone specification");
+ BLOCK_INPUT;
+
/* Set TZ before calling mktime; merely adjusting mktime's returned
value doesn't suffice, since that would mishandle leap seconds. */
set_time_zone_rule (tzstring);
- BLOCK_INPUT;
value = mktime (&tm);
- UNBLOCK_INPUT;
/* Restore TZ to previous value. */
newenv = environ;
environ = oldenv;
- xfree (newenv);
#ifdef LOCALTIME_CACHE
tzset ();
#endif
+ UNBLOCK_INPUT;
+
+ xfree (newenv);
}
if (value == (time_t) -1)
@@ -1928,24 +1921,37 @@ but this is considered obsolete. */)
{
time_t value;
struct tm *tm;
- register char *tem;
+ char buf[sizeof "Mon Apr 30 12:49:17 " + INT_STRLEN_BOUND (int) + 1];
+ int len IF_LINT (= 0);
if (! lisp_time_argument (specified_time, &value, NULL))
error ("Invalid time specification");
- /* Convert to a string, checking for out-of-range time stamps.
- Don't use 'ctime', as that might dump core if VALUE is out of
- range. */
+ /* Convert to a string in ctime format, except without the trailing
+ newline, and without the 4-digit year limit. Don't use asctime
+ or ctime, as they might dump core if the year is outside the
+ range -999 .. 9999. */
BLOCK_INPUT;
tm = localtime (&value);
+ if (tm)
+ {
+ static char const wday_name[][4] =
+ { "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" };
+ static char const mon_name[][4] =
+ { "Jan", "Feb", "Mar", "Apr", "May", "Jun",
+ "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" };
+ printmax_t year_base = TM_YEAR_BASE;
+
+ len = sprintf (buf, "%s %s%3d %02d:%02d:%02d %"pMd,
+ wday_name[tm->tm_wday], mon_name[tm->tm_mon], tm->tm_mday,
+ tm->tm_hour, tm->tm_min, tm->tm_sec,
+ tm->tm_year + year_base);
+ }
UNBLOCK_INPUT;
- if (! (tm && TM_YEAR_IN_ASCTIME_RANGE (tm->tm_year) && (tem = asctime (tm))))
+ if (! tm)
time_overflow ();
- /* Remove the trailing newline. */
- tem[strlen (tem) - 1] = '\0';
-
- return build_string (tem);
+ return make_unibyte_string (buf, len);
}
/* Yield A - B, measured in seconds.
@@ -1989,22 +1995,22 @@ the data it can't find. */)
(Lisp_Object specified_time)
{
time_t value;
+ int offset;
struct tm *t;
struct tm localtm;
- struct tm *localt;
Lisp_Object zone_offset, zone_name;
zone_offset = Qnil;
zone_name = format_time_string ("%Z", sizeof "%Z" - 1, specified_time,
- 0, &value, &localt);
- localtm = *localt;
+ 0, &value, &localtm);
BLOCK_INPUT;
t = gmtime (&value);
+ if (t)
+ offset = tm_diff (&localtm, t);
UNBLOCK_INPUT;
if (t)
{
- int offset = tm_diff (&localtm, t);
zone_offset = make_number (offset);
if (SCHARS (zone_name) == 0)
{
@@ -2042,9 +2048,16 @@ only the former. */)
(Lisp_Object tz)
{
const char *tzstring;
+ char **old_environbuf;
+
+ if (! (NILP (tz) || EQ (tz, Qt)))
+ CHECK_STRING (tz);
+
+ BLOCK_INPUT;
/* When called for the first time, save the original TZ. */
- if (!environbuf)
+ old_environbuf = environbuf;
+ if (!old_environbuf)
initial_tz = (char *) getenv ("TZ");
if (NILP (tz))
@@ -2052,15 +2065,14 @@ only the former. */)
else if (EQ (tz, Qt))
tzstring = "UTC0";
else
- {
- CHECK_STRING (tz);
- tzstring = SSDATA (tz);
- }
+ tzstring = SSDATA (tz);
set_time_zone_rule (tzstring);
- xfree (environbuf);
environbuf = environ;
+ UNBLOCK_INPUT;
+
+ xfree (old_environbuf);
return Qnil;
}
diff --git a/src/emacsgtkfixed.c b/src/emacsgtkfixed.c
index fba672ff74d..1a62b59b7af 100644
--- a/src/emacsgtkfixed.c
+++ b/src/emacsgtkfixed.c
@@ -28,6 +28,27 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#include "frame.h"
#include "xterm.h"
+#define EMACS_TYPE_FIXED emacs_fixed_get_type ()
+#define EMACS_FIXED(obj) \
+ G_TYPE_CHECK_INSTANCE_CAST (obj, EMACS_TYPE_FIXED, EmacsFixed)
+
+typedef struct _EmacsFixed EmacsFixed;
+typedef struct _EmacsFixedPrivate EmacsFixedPrivate;
+typedef struct _EmacsFixedClass EmacsFixedClass;
+
+struct _EmacsFixed
+{
+ GtkFixed container;
+
+ /*< private >*/
+ EmacsFixedPrivate *priv;
+};
+
+struct _EmacsFixedClass
+{
+ GtkFixedClass parent_class;
+};
+
struct _EmacsFixedPrivate
{
struct frame *f;
@@ -40,28 +61,21 @@ static void emacs_fixed_get_preferred_width (GtkWidget *widget,
static void emacs_fixed_get_preferred_height (GtkWidget *widget,
gint *minimum,
gint *natural);
+static GType emacs_fixed_get_type (void);
G_DEFINE_TYPE (EmacsFixed, emacs_fixed, GTK_TYPE_FIXED)
static void
emacs_fixed_class_init (EmacsFixedClass *klass)
{
GtkWidgetClass *widget_class;
- GtkFixedClass *fixed_class;
widget_class = (GtkWidgetClass*) klass;
- fixed_class = (GtkFixedClass*) klass;
widget_class->get_preferred_width = emacs_fixed_get_preferred_width;
widget_class->get_preferred_height = emacs_fixed_get_preferred_height;
g_type_class_add_private (klass, sizeof (EmacsFixedPrivate));
}
-static GType
-emacs_fixed_child_type (GtkFixed *container)
-{
- return GTK_TYPE_WIDGET;
-}
-
static void
emacs_fixed_init (EmacsFixed *fixed)
{
diff --git a/src/emacsgtkfixed.h b/src/emacsgtkfixed.h
index 90fb37e521b..3fa294aa41e 100644
--- a/src/emacsgtkfixed.h
+++ b/src/emacsgtkfixed.h
@@ -27,33 +27,7 @@ G_BEGIN_DECLS
struct frame;
-#define EMACS_TYPE_FIXED (emacs_fixed_get_type ())
-#define EMACS_FIXED(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EMACS_TYPE_FIXED, EmacsFixed))
-#define EMACS_FIXED_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), EMACS_TYPE_FIXED, EmacsFixedClass))
-#define EMACS_IS_FIXED(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EMACS_TYPE_FIXED))
-#define EMACS_IS_FIXED_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), EMACS_TYPE_FIXED))
-#define EMACS_FIXED_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), EMACS_TYPE_FIXED, EmacsFixedClass))
-
-typedef struct _EmacsFixed EmacsFixed;
-typedef struct _EmacsFixedPrivate EmacsFixedPrivate;
-typedef struct _EmacsFixedClass EmacsFixedClass;
-
-struct _EmacsFixed
-{
- GtkFixed container;
-
- /*< private >*/
- EmacsFixedPrivate *priv;
-};
-
-
-struct _EmacsFixedClass
-{
- GtkFixedClass parent_class;
-};
-
extern GtkWidget *emacs_fixed_new (struct frame *f);
-extern GType emacs_fixed_get_type (void);
G_END_DECLS
diff --git a/src/eval.c b/src/eval.c
index d266d995c4b..e44b7e32915 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -2020,7 +2020,7 @@ this does nothing and returns nil. */)
We used to use 0 here, but that leads to accidental sharing in
purecopy's hash-consing, so we use a (hopefully) unique integer
instead. */
- docstring = make_number (XPNTR (function));
+ docstring = make_number (XUNTAG (function, Lisp_Symbol));
return Ffset (function,
Fpurecopy (list5 (Qautoload, file, docstring,
interactive, type)));
diff --git a/src/fileio.c b/src/fileio.c
index c5442d560fd..c6e2eea5089 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -1,6 +1,6 @@
/* File IO for GNU Emacs.
-Copyright (C) 1985-1988, 1993-2012 Free Software Foundation, Inc.
+Copyright (C) 1985-1988, 1993-2012 Free Software Foundation, Inc.
This file is part of GNU Emacs.
@@ -87,17 +87,17 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#define FILE_SYSTEM_CASE(filename) (filename)
#endif
-/* Nonzero during writing of auto-save files */
+/* Nonzero during writing of auto-save files. */
static int auto_saving;
-/* Nonzero umask during creation of auto-save directories */
+/* Nonzero umask during creation of auto-save directories. */
static int auto_saving_dir_umask;
/* Set by auto_save_1 to mode of original file so Fwrite_region will create
- a new file with the same mode as the original */
+ a new file with the same mode as the original. */
static int auto_save_mode_bits;
-/* Set by auto_save_1 if an error occurred during the last auto-save. */
+/* Set by auto_save_1 if an error occurred during the last auto-save. */
static int auto_save_error_occurred;
/* The symbol bound to coding-system-for-read when
@@ -111,7 +111,7 @@ static Lisp_Object Qauto_save_coding;
which gives a list of operations it handles.. */
static Lisp_Object Qoperations;
-/* Lisp functions for translating file formats */
+/* Lisp functions for translating file formats. */
static Lisp_Object Qformat_decode, Qformat_annotate_function;
/* Lisp function for setting buffer-file-coding-system and the
@@ -877,7 +877,7 @@ filesystem tree, not (expand-file-name ".." dirname). */)
}
}
- /* Make a local copy of nm[] to protect it from GC in DECODE_FILE below. */
+ /* Make a local copy of nm[] to protect it from GC in DECODE_FILE below. */
nm = (char *) alloca (SBYTES (name) + 1);
memcpy (nm, SSDATA (name), SBYTES (name) + 1);
@@ -905,7 +905,7 @@ filesystem tree, not (expand-file-name ".." dirname). */)
if (drive && IS_DIRECTORY_SEP (nm[0]) && IS_DIRECTORY_SEP (nm[1]))
nm++;
- /* Discard any previous drive specifier if nm is now in UNC format. */
+ /* Discard any previous drive specifier if nm is now in UNC format. */
if (IS_DIRECTORY_SEP (nm[0]) && IS_DIRECTORY_SEP (nm[1]))
{
drive = 0;
@@ -970,7 +970,7 @@ filesystem tree, not (expand-file-name ".." dirname). */)
}
else
#endif
- /* drive must be set, so this is okay */
+ /* Drive must be set, so this is okay. */
if (strcmp (nm - 2, SSDATA (name)) != 0)
{
char temp[] = " :";
@@ -1016,7 +1016,7 @@ filesystem tree, not (expand-file-name ".." dirname). */)
if (!(newdir = egetenv ("HOME")))
newdir = "";
nm++;
- /* egetenv may return a unibyte string, which will bite us since
+ /* `egetenv' may return a unibyte string, which will bite us since
we expect the directory to be multibyte. */
tem = build_string (newdir);
if (!STRING_MULTIBYTE (tem))
@@ -1058,7 +1058,7 @@ filesystem tree, not (expand-file-name ".." dirname). */)
use the drive's current directory as the prefix if needed. */
if (!newdir && drive)
{
- /* Get default directory if needed to make nm absolute. */
+ /* Get default directory if needed to make nm absolute. */
char *adir = NULL;
if (!IS_DIRECTORY_SEP (nm[0]))
{
@@ -1068,7 +1068,7 @@ filesystem tree, not (expand-file-name ".." dirname). */)
}
if (!adir)
{
- /* Either nm starts with /, or drive isn't mounted. */
+ /* Either nm starts with /, or drive isn't mounted. */
adir = alloca (4);
adir[0] = DRIVE_LETTER (drive);
adir[1] = ':';
@@ -1080,11 +1080,11 @@ filesystem tree, not (expand-file-name ".." dirname). */)
#endif /* DOS_NT */
/* Finally, if no prefix has been specified and nm is not absolute,
- then it must be expanded relative to default_directory. */
+ then it must be expanded relative to default_directory. */
if (1
#ifndef DOS_NT
- /* /... alone is not absolute on DOS and Windows. */
+ /* /... alone is not absolute on DOS and Windows. */
&& !IS_DIRECTORY_SEP (nm[0])
#endif
#ifdef WINDOWSNT
@@ -1106,7 +1106,7 @@ filesystem tree, not (expand-file-name ".." dirname). */)
#ifdef DOS_NT
if (newdir)
{
- /* First ensure newdir is an absolute name. */
+ /* First ensure newdir is an absolute name. */
if (
/* Detect MSDOS file names with drive specifiers. */
! (IS_DRIVE (newdir[0])
@@ -1121,7 +1121,7 @@ filesystem tree, not (expand-file-name ".." dirname). */)
Because of the admonition against calling expand-file-name
when we have pointers into lisp strings, we accomplish this
indirectly by prepending newdir to nm if necessary, and using
- cwd (or the wd of newdir's drive) as the new newdir. */
+ cwd (or the wd of newdir's drive) as the new newdir. */
char *adir;
if (IS_DRIVE (newdir[0]) && IS_DEVICE_SEP (newdir[1]))
{
@@ -1146,7 +1146,7 @@ filesystem tree, not (expand-file-name ".." dirname). */)
newdir = adir;
}
- /* Strip off drive name from prefix, if present. */
+ /* Strip off drive name from prefix, if present. */
if (IS_DRIVE (newdir[0]) && IS_DEVICE_SEP (newdir[1]))
{
drive = newdir[0];
@@ -1196,7 +1196,7 @@ filesystem tree, not (expand-file-name ".." dirname). */)
else
tlen = 0;
- /* Now concatenate the directory and name to new space in the stack frame */
+ /* Now concatenate the directory and name to new space in the stack frame. */
tlen += strlen (nm) + 1;
#ifdef DOS_NT
/* Reserve space for drive specifier and escape prefix, since either
@@ -1292,7 +1292,7 @@ filesystem tree, not (expand-file-name ".." dirname). */)
}
#ifdef DOS_NT
- /* At last, set drive name. */
+ /* At last, set drive name. */
#ifdef WINDOWSNT
/* Except for network file name. */
if (!(IS_DIRECTORY_SEP (target[0]) && IS_DIRECTORY_SEP (target[1])))
@@ -1320,7 +1320,7 @@ filesystem tree, not (expand-file-name ".." dirname). */)
and perhaps call the corresponding file handler. This is needed
for filenames such as "/foo/../user@host:/bar/../baz". Expanding
the ".." component gives us "/user@host:/bar/../baz" which needs
- to be expanded again. */
+ to be expanded again. */
handler = Ffind_file_name_handler (result, Qexpand_file_name);
if (!NILP (handler))
{
@@ -1396,7 +1396,7 @@ See also the function `substitute-in-file-name'.")
}
}
- /* Now determine directory to start with and put it in NEWDIR */
+ /* Now determine directory to start with and put it in NEWDIR. */
newdir = 0;
@@ -1409,17 +1409,17 @@ See also the function `substitute-in-file-name'.")
}
else /* ~user/filename */
{
- /* Get past ~ to user */
+ /* Get past ~ to user. */
unsigned char *user = nm + 1;
- /* Find end of name. */
+ /* Find end of name. */
unsigned char *ptr = (unsigned char *) strchr (user, '/');
ptrdiff_t len = ptr ? ptr - user : strlen (user);
- /* Copy the user name into temp storage. */
+ /* Copy the user name into temp storage. */
o = (unsigned char *) alloca (len + 1);
memcpy (o, user, len);
o[len] = 0;
- /* Look up the user name. */
+ /* Look up the user name. */
BLOCK_INPUT;
pw = (struct passwd *) getpwnam (o + 1);
UNBLOCK_INPUT;
@@ -1440,7 +1440,7 @@ See also the function `substitute-in-file-name'.")
newdir = SDATA (defalt);
}
- /* Now concatenate the directory and name to new space in the stack frame */
+ /* Now concatenate the directory and name to new space in the stack frame. */
tlen = (newdir ? strlen (newdir) + 1 : 0) + strlen (nm) + 1;
target = (unsigned char *) alloca (tlen);
@@ -1456,7 +1456,7 @@ See also the function `substitute-in-file-name'.")
strcat (target, nm);
- /* Now canonicalize by removing /. and /foo/.. if they appear */
+ /* Now canonicalize by removing /. and /foo/.. if they appear. */
p = target;
o = target;
@@ -1528,7 +1528,7 @@ search_embedded_absfilename (char *nm, char *endp)
)
{
for (s = p; *s && (!IS_DIRECTORY_SEP (*s)); s++);
- if (p[0] == '~' && s > p + 1) /* we've got "/~something/" */
+ if (p[0] == '~' && s > p + 1) /* We've got "/~something/". */
{
char *o = alloca (s - p + 1);
struct passwd *pw;
@@ -1612,7 +1612,7 @@ those `/' is discarded. */)
(make_specified_string (p, -1, endp - p, multibyte));
/* See if any variables are substituted into the string
- and find the total length of their values in `total' */
+ and find the total length of their values in `total'. */
for (p = nm; p != endp;)
if (*p != '$')
@@ -1624,7 +1624,7 @@ those `/' is discarded. */)
goto badsubst;
else if (*p == '$')
{
- /* "$$" means a single "$" */
+ /* "$$" means a single "$". */
p++;
total -= 1;
substituted = 1;
@@ -1644,7 +1644,7 @@ those `/' is discarded. */)
s = p;
}
- /* Copy out the variable name */
+ /* Copy out the variable name. */
target = (char *) alloca (s - o + 1);
strncpy (target, o, s - o);
target[s - o] = 0;
@@ -1652,7 +1652,7 @@ those `/' is discarded. */)
strupr (target); /* $home == $HOME etc. */
#endif /* DOS_NT */
- /* Get variable value */
+ /* Get variable value. */
o = egetenv (target);
if (o)
{
@@ -1674,12 +1674,12 @@ those `/' is discarded. */)
if (!substituted)
return filename;
- /* If substitution required, recopy the string and do it */
- /* Make space in stack frame for the new copy */
+ /* If substitution required, recopy the string and do it. */
+ /* Make space in stack frame for the new copy. */
xnm = (char *) alloca (SBYTES (filename) + total + 1);
x = xnm;
- /* Copy the rest of the name through, replacing $ constructs with values */
+ /* Copy the rest of the name through, replacing $ constructs with values. */
for (p = nm; *p;)
if (*p != '$')
*x++ = *p++;
@@ -1707,7 +1707,7 @@ those `/' is discarded. */)
s = p;
}
- /* Copy out the variable name */
+ /* Copy out the variable name. */
target = (char *) alloca (s - o + 1);
strncpy (target, o, s - o);
target[s - o] = 0;
@@ -1715,7 +1715,7 @@ those `/' is discarded. */)
strupr (target); /* $home == $HOME etc. */
#endif /* DOS_NT */
- /* Get variable value */
+ /* Get variable value. */
o = egetenv (target);
if (!o)
{
@@ -1777,7 +1777,7 @@ expand_and_dir_to_file (Lisp_Object filename, Lisp_Object defdir)
stat behaves differently depending! */
if (SCHARS (absname) > 1
&& IS_DIRECTORY_SEP (SREF (absname, SBYTES (absname) - 1))
- && !IS_DEVICE_SEP (SREF (absname, SBYTES (absname)-2)))
+ && !IS_DEVICE_SEP (SREF (absname, SBYTES (absname) - 2)))
/* We cannot take shortcuts; they might be wrong for magic file names. */
absname = Fdirectory_file_name (absname);
return absname;
@@ -1805,7 +1805,7 @@ barf_or_query_if_file_exists (Lisp_Object absname, const char *querystring,
encoded_filename = ENCODE_FILE (absname);
- /* stat is a good way to tell whether the file exists,
+ /* `stat' is a good way to tell whether the file exists,
regardless of what access permissions it has. */
if (lstat (SSDATA (encoded_filename), &statbuf) >= 0)
{
@@ -2044,9 +2044,10 @@ on the system, we copy the SELinux context of FILE to NEWNAME. */)
#if HAVE_LIBSELINUX
if (conlength > 0)
{
- /* Set the modified context back to the file. */
+ /* Set the modified context back to the file. */
fail = fsetfilecon (ofd, con);
- if (fail)
+ /* See http://debbugs.gnu.org/11245 for ENOTSUP. */
+ if (fail && errno != ENOTSUP)
report_file_error ("Doing fsetfilecon", Fcons (newname, Qnil));
freecon (con);
@@ -2917,10 +2918,11 @@ compiled with SELinux support. */)
error ("Doing context_range_set");
}
- /* Set the modified context back to the file. */
+ /* Set the modified context back to the file. */
fail = lsetfilecon (SSDATA (encoded_absname),
context_str (parsed_con));
- if (fail)
+ /* See http://debbugs.gnu.org/11245 for ENOTSUP. */
+ if (fail && errno != ENOTSUP)
report_file_error ("Doing lsetfilecon", Fcons (absname, Qnil));
context_free (parsed_con);
diff --git a/src/filelock.c b/src/filelock.c
index 2613eec4aca..d8914c73328 100644
--- a/src/filelock.c
+++ b/src/filelock.c
@@ -550,6 +550,10 @@ lock_file (Lisp_Object fn)
struct gcpro gcpro1;
USE_SAFE_ALLOCA;
+ /* Don't do locking if the user has opted out. */
+ if (! create_lockfiles)
+ return;
+
/* Don't do locking while dumping Emacs.
Uncompressing wtmp files uses call-process, which does not work
in an uninitialized Emacs. */
@@ -722,6 +726,10 @@ syms_of_filelock (void)
doc: /* The directory for writing temporary files. */);
Vtemporary_file_directory = Qnil;
+ DEFVAR_BOOL ("create-lockfiles", create_lockfiles,
+ doc: /* Non-nil means use lockfiles to avoid editing collisions. */);
+ create_lockfiles = 1;
+
#ifdef CLASH_DETECTION
defsubr (&Sunlock_buffer);
defsubr (&Slock_buffer);
diff --git a/src/fns.c b/src/fns.c
index 6c7c1b21045..676e53ccbd8 100644
--- a/src/fns.c
+++ b/src/fns.c
@@ -42,10 +42,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#endif
#endif /* HAVE_MENUS */
-#ifndef NULL
-#define NULL ((POINTER_TYPE *)0)
-#endif
-
Lisp_Object Qstring_lessp;
static Lisp_Object Qprovide, Qrequire;
static Lisp_Object Qyes_or_no_p_history;
diff --git a/src/font.h b/src/font.h
index 89f6b29ca9d..b058be67aa3 100644
--- a/src/font.h
+++ b/src/font.h
@@ -469,11 +469,12 @@ struct font_bitmap
} while (0)
#define XFONT_SPEC(p) \
- (eassert (FONT_SPEC_P(p)), (struct font_spec *) XPNTR (p))
+ (eassert (FONT_SPEC_P (p)), (struct font_spec *) XUNTAG (p, Lisp_Vectorlike))
#define XFONT_ENTITY(p) \
- (eassert (FONT_ENTITY_P(p)), (struct font_entity *) XPNTR (p))
+ (eassert (FONT_ENTITY_P (p)), \
+ (struct font_entity *) XUNTAG (p, Lisp_Vectorlike))
#define XFONT_OBJECT(p) \
- (eassert (FONT_OBJECT_P(p)), (struct font *) XPNTR (p))
+ (eassert (FONT_OBJECT_P (p)), (struct font *) XUNTAG (p, Lisp_Vectorlike))
#define XSETFONT(a, b) (XSETPSEUDOVECTOR (a, b, PVEC_FONT))
/* Number of pt per inch (from the TeXbook). */
diff --git a/src/frame.h b/src/frame.h
index e058a101462..1a8bff7c3e7 100644
--- a/src/frame.h
+++ b/src/frame.h
@@ -501,7 +501,8 @@ struct frame
typedef struct frame *FRAME_PTR;
-#define XFRAME(p) (eassert (FRAMEP(p)),(struct frame *) XPNTR (p))
+#define XFRAME(p) \
+ (eassert (FRAMEP (p)), (struct frame *) XUNTAG (p, Lisp_Vectorlike))
#define XSETFRAME(a, b) (XSETPSEUDOVECTOR (a, b, PVEC_FRAME))
/* Given a window, return its frame as a Lisp_Object. */
diff --git a/src/gmalloc.c b/src/gmalloc.c
index 7b5e6df009b..0df050e127a 100644
--- a/src/gmalloc.c
+++ b/src/gmalloc.c
@@ -1,9 +1,3 @@
-/* This file is no longer automatically generated from libc. */
-
-#define _MALLOC_INTERNAL
-
-/* The malloc headers and source files from the C library follow here. */
-
/* Declarations for `malloc' and friends.
Copyright (C) 1990, 1991, 1992, 1993, 1995, 1996, 1999, 2002, 2003, 2004,
2005, 2006, 2007 Free Software Foundation, Inc.
@@ -27,12 +21,6 @@ Fifth Floor, Boston, MA 02110-1301, USA.
The author may be reached (Email) at the address mike@ai.mit.edu,
or (US mail) as Mike Haertel c/o Free Software Foundation. */
-#ifndef _MALLOC_H
-
-#define _MALLOC_H 1
-
-#ifdef _MALLOC_INTERNAL
-
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
@@ -41,62 +29,44 @@ Fifth Floor, Boston, MA 02110-1301, USA.
#define USE_PTHREAD
#endif
-#undef PP
-#define PP(args) args
-#undef __ptr_t
-#define __ptr_t void *
-
#include <string.h>
#include <limits.h>
+#include <stdint.h>
#include <unistd.h>
#ifdef USE_PTHREAD
#include <pthread.h>
#endif
-#endif /* _MALLOC_INTERNAL. */
-
-
#ifdef __cplusplus
extern "C"
{
#endif
#include <stddef.h>
-#define __malloc_size_t size_t
-#define __malloc_ptrdiff_t ptrdiff_t
/* Allocate SIZE bytes of memory. */
-extern __ptr_t malloc PP ((__malloc_size_t __size));
+extern void *malloc (size_t size);
/* Re-allocate the previously allocated block
- in __ptr_t, making the new block SIZE bytes long. */
-extern __ptr_t realloc PP ((__ptr_t __ptr, __malloc_size_t __size));
+ in ptr, making the new block SIZE bytes long. */
+extern void *realloc (void *ptr, size_t size);
/* Allocate NMEMB elements of SIZE bytes each, all initialized to 0. */
-extern __ptr_t calloc PP ((__malloc_size_t __nmemb, __malloc_size_t __size));
+extern void *calloc (size_t nmemb, size_t size);
/* Free a block allocated by `malloc', `realloc' or `calloc'. */
-extern void free PP ((__ptr_t __ptr));
+extern void free (void *ptr);
/* Allocate SIZE bytes allocated to ALIGNMENT bytes. */
-#if !defined (_MALLOC_INTERNAL) || defined (MSDOS) /* Avoid conflict. */
-extern __ptr_t memalign PP ((__malloc_size_t __alignment,
- __malloc_size_t __size));
-extern int posix_memalign PP ((__ptr_t *, __malloc_size_t,
- __malloc_size_t size));
-#endif
-
-/* Allocate SIZE bytes on a page boundary. */
-#if ! (defined (_MALLOC_INTERNAL) && defined (GMALLOC_INHIBIT_VALLOC))
-extern __ptr_t valloc PP ((__malloc_size_t __size));
+#ifdef MSDOS
+extern void *memalign (size_t, size_t);
+extern int posix_memalign (void **, size_t, size_t);
#endif
#ifdef USE_PTHREAD
/* Set up mutexes and make malloc etc. thread-safe. */
-extern void malloc_enable_thread PP ((void));
+extern void malloc_enable_thread (void);
#endif
-#ifdef _MALLOC_INTERNAL
-
/* The allocator divides the heap into blocks of fixed size; large
requests receive one or more whole blocks, and small requests
receive a fragment of a block. Fragment sizes are powers of two,
@@ -128,22 +98,22 @@ typedef union
{
struct
{
- __malloc_size_t nfree; /* Free frags in a fragmented block. */
- __malloc_size_t first; /* First free fragment of the block. */
+ size_t nfree; /* Free frags in a fragmented block. */
+ size_t first; /* First free fragment of the block. */
} frag;
/* For a large object, in its first block, this has the number
of blocks in the object. In the other blocks, this has a
negative number which says how far back the first block is. */
- __malloc_ptrdiff_t size;
+ ptrdiff_t size;
} info;
} busy;
/* Heap information for a free block
(that may be the first of a free cluster). */
struct
{
- __malloc_size_t size; /* Size (in blocks) of a free cluster. */
- __malloc_size_t next; /* Index of next free cluster. */
- __malloc_size_t prev; /* Index of previous free cluster. */
+ size_t size; /* Size (in blocks) of a free cluster. */
+ size_t next; /* Index of next free cluster. */
+ size_t prev; /* Index of previous free cluster. */
} free;
} malloc_info;
@@ -155,13 +125,13 @@ extern malloc_info *_heapinfo;
/* Address to block number and vice versa. */
#define BLOCK(A) (((char *) (A) - _heapbase) / BLOCKSIZE + 1)
-#define ADDRESS(B) ((__ptr_t) (((B) - 1) * BLOCKSIZE + _heapbase))
+#define ADDRESS(B) ((void *) (((B) - 1) * BLOCKSIZE + _heapbase))
/* Current search index for the heap table. */
-extern __malloc_size_t _heapindex;
+extern size_t _heapindex;
/* Limit of valid info table indices. */
-extern __malloc_size_t _heaplimit;
+extern size_t _heaplimit;
/* Doubly linked lists of free fragments. */
struct list
@@ -177,26 +147,26 @@ extern struct list _fraghead[];
struct alignlist
{
struct alignlist *next;
- __ptr_t aligned; /* The address that memaligned returned. */
- __ptr_t exact; /* The address that malloc returned. */
+ void *aligned; /* The address that memaligned returned. */
+ void *exact; /* The address that malloc returned. */
};
extern struct alignlist *_aligned_blocks;
/* Instrumentation. */
-extern __malloc_size_t _chunks_used;
-extern __malloc_size_t _bytes_used;
-extern __malloc_size_t _chunks_free;
-extern __malloc_size_t _bytes_free;
+extern size_t _chunks_used;
+extern size_t _bytes_used;
+extern size_t _chunks_free;
+extern size_t _bytes_free;
/* Internal versions of `malloc', `realloc', and `free'
used when these functions need to call each other.
They are the same but don't call the hooks. */
-extern __ptr_t _malloc_internal PP ((__malloc_size_t __size));
-extern __ptr_t _realloc_internal PP ((__ptr_t __ptr, __malloc_size_t __size));
-extern void _free_internal PP ((__ptr_t __ptr));
-extern __ptr_t _malloc_internal_nolock PP ((__malloc_size_t __size));
-extern __ptr_t _realloc_internal_nolock PP ((__ptr_t __ptr, __malloc_size_t __size));
-extern void _free_internal_nolock PP ((__ptr_t __ptr));
+extern void *_malloc_internal (size_t);
+extern void *_realloc_internal (void *, size_t);
+extern void _free_internal (void *);
+extern void *_malloc_internal_nolock (size_t);
+extern void *_realloc_internal_nolock (void *, size_t);
+extern void _free_internal_nolock (void *);
#ifdef USE_PTHREAD
extern pthread_mutex_t _malloc_mutex, _aligned_blocks_mutex;
@@ -228,39 +198,36 @@ extern int _malloc_thread_enabled_p;
#define UNLOCK_ALIGNED_BLOCKS()
#endif
-#endif /* _MALLOC_INTERNAL. */
-
/* Given an address in the middle of a malloc'd object,
return the address of the beginning of the object. */
-extern __ptr_t malloc_find_object_address PP ((__ptr_t __ptr));
+extern void *malloc_find_object_address (void *ptr);
/* Underlying allocation function; successive calls should
return contiguous pieces of memory. */
-extern __ptr_t (*__morecore) PP ((__malloc_ptrdiff_t __size));
+extern void *(*__morecore) (ptrdiff_t size);
/* Default value of `__morecore'. */
-extern __ptr_t __default_morecore PP ((__malloc_ptrdiff_t __size));
+extern void *__default_morecore (ptrdiff_t size);
/* If not NULL, this function is called after each time
`__morecore' is called to increase the data size. */
-extern void (*__after_morecore_hook) PP ((void));
+extern void (*__after_morecore_hook) (void);
/* Number of extra blocks to get each time we ask for more core.
This reduces the frequency of calling `(*__morecore)'. */
-extern __malloc_size_t __malloc_extra_blocks;
+extern size_t __malloc_extra_blocks;
/* Nonzero if `malloc' has been called and done its initialization. */
extern int __malloc_initialized;
/* Function called to initialize malloc data structures. */
-extern int __malloc_initialize PP ((void));
+extern int __malloc_initialize (void);
/* Hooks for debugging versions. */
-extern void (*__malloc_initialize_hook) PP ((void));
-extern void (*__free_hook) PP ((__ptr_t __ptr));
-extern __ptr_t (*__malloc_hook) PP ((__malloc_size_t __size));
-extern __ptr_t (*__realloc_hook) PP ((__ptr_t __ptr, __malloc_size_t __size));
-extern __ptr_t (*__memalign_hook) PP ((__malloc_size_t __size,
- __malloc_size_t __alignment));
+extern void (*__malloc_initialize_hook) (void);
+extern void (*__free_hook) (void *ptr);
+extern void *(*__malloc_hook) (size_t size);
+extern void *(*__realloc_hook) (void *ptr, size_t size);
+extern void *(*__memalign_hook) (size_t size, size_t alignment);
/* Return values for `mprobe': these are the kinds of inconsistencies that
`mcheck' enables detection of. */
@@ -277,52 +244,37 @@ enum mcheck_status
before `malloc' is ever called. ABORTFUNC is called with an error code
(see enum above) when an inconsistency is detected. If ABORTFUNC is
null, the standard function prints on stderr and then calls `abort'. */
-extern int mcheck PP ((void (*__abortfunc) PP ((enum mcheck_status))));
+extern int mcheck (void (*abortfunc) (enum mcheck_status));
/* Check for aberrations in a particular malloc'd block. You must have
called `mcheck' already. These are the same checks that `mcheck' does
when you free or reallocate a block. */
-extern enum mcheck_status mprobe PP ((__ptr_t __ptr));
+extern enum mcheck_status mprobe (void *ptr);
/* Activate a standard collection of tracing hooks. */
-extern void mtrace PP ((void));
-extern void muntrace PP ((void));
+extern void mtrace (void);
+extern void muntrace (void);
/* Statistics available to the user. */
struct mstats
{
- __malloc_size_t bytes_total; /* Total size of the heap. */
- __malloc_size_t chunks_used; /* Chunks allocated by the user. */
- __malloc_size_t bytes_used; /* Byte total of user-allocated chunks. */
- __malloc_size_t chunks_free; /* Chunks in the free list. */
- __malloc_size_t bytes_free; /* Byte total of chunks in the free list. */
+ size_t bytes_total; /* Total size of the heap. */
+ size_t chunks_used; /* Chunks allocated by the user. */
+ size_t bytes_used; /* Byte total of user-allocated chunks. */
+ size_t chunks_free; /* Chunks in the free list. */
+ size_t bytes_free; /* Byte total of chunks in the free list. */
};
/* Pick up the current statistics. */
-extern struct mstats mstats PP ((void));
+extern struct mstats mstats (void);
/* Call WARNFUN with a warning message when memory usage is high. */
-extern void memory_warnings PP ((__ptr_t __start,
- void (*__warnfun) PP ((const char *))));
-
-
-/* Relocating allocator. */
-
-/* Allocate SIZE bytes, and store the address in *HANDLEPTR. */
-extern __ptr_t r_alloc PP ((__ptr_t *__handleptr, __malloc_size_t __size));
-
-/* Free the storage allocated in HANDLEPTR. */
-extern void r_alloc_free PP ((__ptr_t *__handleptr));
-
-/* Adjust the block at HANDLEPTR to be SIZE bytes long. */
-extern __ptr_t r_re_alloc PP ((__ptr_t *__handleptr, __malloc_size_t __size));
-
+extern void memory_warnings (void *start, void (*warnfun) (const char *));
#ifdef __cplusplus
}
#endif
-#endif /* malloc.h */
/* Memory allocator `malloc'.
Copyright 1990, 1991, 1992, 1993, 1994, 1995 Free Software Foundation, Inc.
Written May 1989 by Mike Haertel.
@@ -345,10 +297,6 @@ Fifth Floor, Boston, MA 02110-1301, USA.
The author may be reached (Email) at the address mike@ai.mit.edu,
or (US mail) as Mike Haertel c/o Free Software Foundation. */
-#ifndef _MALLOC_INTERNAL
-#define _MALLOC_INTERNAL
-#include <malloc.h>
-#endif
#include <errno.h>
/* On Cygwin there are two heaps. temacs uses the static heap
@@ -362,15 +310,15 @@ Fifth Floor, Boston, MA 02110-1301, USA.
this is changed in the future, we'll have to similarly deal with
reinitializing ralloc. */
#ifdef CYGWIN
-extern __ptr_t bss_sbrk PP ((ptrdiff_t __size));
+extern void *bss_sbrk (ptrdiff_t size);
extern int bss_sbrk_did_unexec;
char *bss_sbrk_heapbase; /* _heapbase for static heap */
malloc_info *bss_sbrk_heapinfo; /* _heapinfo for static heap */
#endif
-__ptr_t (*__morecore) PP ((__malloc_ptrdiff_t __size)) = __default_morecore;
+void *(*__morecore) (ptrdiff_t size) = __default_morecore;
/* Debugging hook for `malloc'. */
-__ptr_t (*__malloc_hook) PP ((__malloc_size_t __size));
+void *(*__malloc_hook) (size_t size);
/* Pointer to the base of the first block. */
char *_heapbase;
@@ -379,30 +327,30 @@ char *_heapbase;
malloc_info *_heapinfo;
/* Number of info entries. */
-static __malloc_size_t heapsize;
+static size_t heapsize;
/* Search index in the info table. */
-__malloc_size_t _heapindex;
+size_t _heapindex;
/* Limit of valid info table indices. */
-__malloc_size_t _heaplimit;
+size_t _heaplimit;
/* Free lists for each fragment size. */
struct list _fraghead[BLOCKLOG];
/* Instrumentation. */
-__malloc_size_t _chunks_used;
-__malloc_size_t _bytes_used;
-__malloc_size_t _chunks_free;
-__malloc_size_t _bytes_free;
+size_t _chunks_used;
+size_t _bytes_used;
+size_t _chunks_free;
+size_t _bytes_free;
/* Are you experienced? */
int __malloc_initialized;
-__malloc_size_t __malloc_extra_blocks;
+size_t __malloc_extra_blocks;
-void (*__malloc_initialize_hook) PP ((void));
-void (*__after_morecore_hook) PP ((void));
+void (*__malloc_initialize_hook) (void);
+void (*__after_morecore_hook) (void);
#if defined GC_MALLOC_CHECK && defined GC_PROTECT_MALLOC_STATE
@@ -419,12 +367,11 @@ void (*__after_morecore_hook) PP ((void));
#include <sys/mman.h>
static int state_protected_p;
-static __malloc_size_t last_state_size;
+static size_t last_state_size;
static malloc_info *last_heapinfo;
void
-protect_malloc_state (protect_p)
- int protect_p;
+protect_malloc_state (int protect_p)
{
/* If _heapinfo has been relocated, make sure its old location
isn't left read-only; it will be reused by malloc. */
@@ -453,29 +400,25 @@ protect_malloc_state (protect_p)
/* Aligned allocation. */
-static __ptr_t align PP ((__malloc_size_t));
-static __ptr_t
-align (size)
- __malloc_size_t size;
+static void *
+align (size_t size)
{
- __ptr_t result;
- unsigned long int adj;
+ void *result;
+ ptrdiff_t adj;
/* align accepts an unsigned argument, but __morecore accepts a
- signed one. This could lead to trouble if SIZE overflows a
- signed int type accepted by __morecore. We just punt in that
+ signed one. This could lead to trouble if SIZE overflows the
+ ptrdiff_t type accepted by __morecore. We just punt in that
case, since they are requesting a ludicrous amount anyway. */
- if ((__malloc_ptrdiff_t)size < 0)
+ if (PTRDIFF_MAX < size)
result = 0;
else
result = (*__morecore) (size);
- adj = (unsigned long int) ((unsigned long int) ((char *) result -
- (char *) NULL)) % BLOCKSIZE;
+ adj = (uintptr_t) result % BLOCKSIZE;
if (adj != 0)
{
- __ptr_t new;
adj = BLOCKSIZE - adj;
- new = (*__morecore) (adj);
+ (*__morecore) (adj);
result = (char *) result + adj;
}
@@ -488,14 +431,11 @@ align (size)
/* Get SIZE bytes, if we can get them starting at END.
Return the address of the space we got.
If we cannot get space at END, fail and return 0. */
-static __ptr_t get_contiguous_space PP ((__malloc_ptrdiff_t, __ptr_t));
-static __ptr_t
-get_contiguous_space (size, position)
- __malloc_ptrdiff_t size;
- __ptr_t position;
+static void *
+get_contiguous_space (ptrdiff_t size, void *position)
{
- __ptr_t before;
- __ptr_t after;
+ void *before;
+ void *after;
before = (*__morecore) (0);
/* If we can tell in advance that the break is at the wrong place,
@@ -525,7 +465,7 @@ get_contiguous_space (size, position)
static inline void
register_heapinfo (void)
{
- __malloc_size_t block, blocks;
+ size_t block, blocks;
block = BLOCK (_heapinfo);
blocks = BLOCKIFY (heapsize * sizeof (malloc_info));
@@ -548,21 +488,21 @@ pthread_mutex_t _aligned_blocks_mutex = PTHREAD_MUTEX_INITIALIZER;
int _malloc_thread_enabled_p;
static void
-malloc_atfork_handler_prepare ()
+malloc_atfork_handler_prepare (void)
{
LOCK ();
LOCK_ALIGNED_BLOCKS ();
}
static void
-malloc_atfork_handler_parent ()
+malloc_atfork_handler_parent (void)
{
UNLOCK_ALIGNED_BLOCKS ();
UNLOCK ();
}
static void
-malloc_atfork_handler_child ()
+malloc_atfork_handler_child (void)
{
UNLOCK_ALIGNED_BLOCKS ();
UNLOCK ();
@@ -570,7 +510,7 @@ malloc_atfork_handler_child ()
/* Set up mutexes and make malloc etc. thread-safe. */
void
-malloc_enable_thread ()
+malloc_enable_thread (void)
{
if (_malloc_thread_enabled_p)
return;
@@ -589,7 +529,7 @@ malloc_enable_thread ()
#endif
static void
-malloc_initialize_1 ()
+malloc_initialize_1 (void)
{
#ifdef GC_MCHECK
mcheck (NULL);
@@ -609,7 +549,7 @@ malloc_initialize_1 ()
(*__malloc_initialize_hook) ();
heapsize = HEAP / BLOCKSIZE;
- _heapinfo = (malloc_info *) align (heapsize * sizeof (malloc_info));
+ _heapinfo = align (heapsize * sizeof (malloc_info));
if (_heapinfo == NULL)
return;
memset (_heapinfo, 0, heapsize * sizeof (malloc_info));
@@ -630,7 +570,7 @@ malloc_initialize_1 ()
main will call malloc which calls this function. That is before any threads
or signal handlers has been set up, so we don't need thread protection. */
int
-__malloc_initialize ()
+__malloc_initialize (void)
{
if (__malloc_initialized)
return 0;
@@ -644,14 +584,12 @@ static int morecore_recursing;
/* Get neatly aligned memory, initializing or
growing the heap info table as necessary. */
-static __ptr_t morecore_nolock PP ((__malloc_size_t));
-static __ptr_t
-morecore_nolock (size)
- __malloc_size_t size;
+static void *
+morecore_nolock (size_t size)
{
- __ptr_t result;
+ void *result;
malloc_info *newinfo, *oldinfo;
- __malloc_size_t newsize;
+ size_t newsize;
if (morecore_recursing)
/* Avoid recursion. The caller will know how to handle a null return. */
@@ -664,7 +602,7 @@ morecore_nolock (size)
PROTECT_MALLOC_STATE (0);
/* Check if we need to grow the info table. */
- if ((__malloc_size_t) BLOCK ((char *) result + size) > heapsize)
+ if ((size_t) BLOCK ((char *) result + size) > heapsize)
{
/* Calculate the new _heapinfo table size. We do not account for the
added blocks in the table itself, as we hope to place them in
@@ -673,7 +611,7 @@ morecore_nolock (size)
newsize = heapsize;
do
newsize *= 2;
- while ((__malloc_size_t) BLOCK ((char *) result + size) > newsize);
+ while ((size_t) BLOCK ((char *) result + size) > newsize);
/* We must not reuse existing core for the new info table when called
from realloc in the case of growing a large block, because the
@@ -689,8 +627,8 @@ morecore_nolock (size)
`morecore_recursing' flag and return null. */
int save = errno; /* Don't want to clobber errno with ENOMEM. */
morecore_recursing = 1;
- newinfo = (malloc_info *) _realloc_internal_nolock
- (_heapinfo, newsize * sizeof (malloc_info));
+ newinfo = _realloc_internal_nolock (_heapinfo,
+ newsize * sizeof (malloc_info));
morecore_recursing = 0;
if (newinfo == NULL)
errno = save;
@@ -710,7 +648,7 @@ morecore_nolock (size)
/* Allocate new space for the malloc info table. */
while (1)
{
- newinfo = (malloc_info *) align (newsize * sizeof (malloc_info));
+ newinfo = align (newsize * sizeof (malloc_info));
/* Did it fail? */
if (newinfo == NULL)
@@ -721,8 +659,8 @@ morecore_nolock (size)
/* Is it big enough to record status for its own space?
If so, we win. */
- if ((__malloc_size_t) BLOCK ((char *) newinfo
- + newsize * sizeof (malloc_info))
+ if ((size_t) BLOCK ((char *) newinfo
+ + newsize * sizeof (malloc_info))
< newsize)
break;
@@ -759,13 +697,12 @@ morecore_nolock (size)
}
/* Allocate memory from the heap. */
-__ptr_t
-_malloc_internal_nolock (size)
- __malloc_size_t size;
+void *
+_malloc_internal_nolock (size_t size)
{
- __ptr_t result;
- __malloc_size_t block, blocks, lastblocks, start;
- register __malloc_size_t i;
+ void *result;
+ size_t block, blocks, lastblocks, start;
+ register size_t i;
struct list *next;
/* ANSI C allows `malloc (0)' to either return NULL, or to return a
@@ -790,7 +727,7 @@ _malloc_internal_nolock (size)
{
/* Small allocation to receive a fragment of a block.
Determine the logarithm to base two of the fragment size. */
- register __malloc_size_t log = 1;
+ register size_t log = 1;
--size;
while ((size /= 2) != 0)
++log;
@@ -803,15 +740,14 @@ _malloc_internal_nolock (size)
/* There are free fragments of this size.
Pop a fragment out of the fragment list and return it.
Update the block's nfree and first counters. */
- result = (__ptr_t) next;
+ result = next;
next->prev->next = next->next;
if (next->next != NULL)
next->next->prev = next->prev;
block = BLOCK (result);
if (--_heapinfo[block].busy.info.frag.nfree != 0)
- _heapinfo[block].busy.info.frag.first = (unsigned long int)
- ((unsigned long int) ((char *) next->next - (char *) NULL)
- % BLOCKSIZE) >> log;
+ _heapinfo[block].busy.info.frag.first =
+ (uintptr_t) next->next % BLOCKSIZE >> log;
/* Update the statistics. */
++_chunks_used;
@@ -843,7 +779,7 @@ _malloc_internal_nolock (size)
next->prev = &_fraghead[log];
_fraghead[log].next = next;
- for (i = 2; i < (__malloc_size_t) (BLOCKSIZE >> log); ++i)
+ for (i = 2; i < (size_t) (BLOCKSIZE >> log); ++i)
{
next = (struct list *) ((char *) result + (i << log));
next->next = _fraghead[log].next;
@@ -877,7 +813,7 @@ _malloc_internal_nolock (size)
if (block == start)
{
/* Need to get more from the system. Get a little extra. */
- __malloc_size_t wantblocks = blocks + __malloc_extra_blocks;
+ size_t wantblocks = blocks + __malloc_extra_blocks;
block = _heapinfo[0].free.prev;
lastblocks = _heapinfo[block].free.size;
/* Check to see if the new core will be contiguous with the
@@ -959,11 +895,10 @@ _malloc_internal_nolock (size)
return result;
}
-__ptr_t
-_malloc_internal (size)
- __malloc_size_t size;
+void *
+_malloc_internal (size_t size)
{
- __ptr_t result;
+ void *result;
LOCK ();
result = _malloc_internal_nolock (size);
@@ -972,11 +907,10 @@ _malloc_internal (size)
return result;
}
-__ptr_t
-malloc (size)
- __malloc_size_t size;
+void *
+malloc (size_t size)
{
- __ptr_t (*hook) (__malloc_size_t);
+ void *(*hook) (size_t);
if (!__malloc_initialized && !__malloc_initialize ())
return NULL;
@@ -998,24 +932,24 @@ malloc (size)
/* On some ANSI C systems, some libc functions call _malloc, _free
and _realloc. Make them use the GNU functions. */
-__ptr_t
-_malloc (size)
- __malloc_size_t size;
+extern void *_malloc (size_t);
+extern void _free (void *);
+extern void *_realloc (void *, size_t);
+
+void *
+_malloc (size_t size)
{
return malloc (size);
}
void
-_free (ptr)
- __ptr_t ptr;
+_free (void *ptr)
{
free (ptr);
}
-__ptr_t
-_realloc (ptr, size)
- __ptr_t ptr;
- __malloc_size_t size;
+void *
+_realloc (void *ptr, size_t size)
{
return realloc (ptr, size);
}
@@ -1043,14 +977,9 @@ Fifth Floor, Boston, MA 02110-1301, USA.
The author may be reached (Email) at the address mike@ai.mit.edu,
or (US mail) as Mike Haertel c/o Free Software Foundation. */
-#ifndef _MALLOC_INTERNAL
-#define _MALLOC_INTERNAL
-#include <malloc.h>
-#endif
-
/* Debugging hook for free. */
-void (*__free_hook) PP ((__ptr_t __ptr));
+void (*__free_hook) (void *__ptr);
/* List of blocks allocated by memalign. */
struct alignlist *_aligned_blocks = NULL;
@@ -1058,15 +987,14 @@ struct alignlist *_aligned_blocks = NULL;
/* Return memory to the heap.
Like `_free_internal' but don't lock mutex. */
void
-_free_internal_nolock (ptr)
- __ptr_t ptr;
+_free_internal_nolock (void *ptr)
{
int type;
- __malloc_size_t block, blocks;
- register __malloc_size_t i;
+ size_t block, blocks;
+ register size_t i;
struct list *prev, *next;
- __ptr_t curbrk;
- const __malloc_size_t lesscore_threshold
+ void *curbrk;
+ const size_t lesscore_threshold
/* Threshold of free space at which we will return some to the system. */
= FINAL_FREE_BLOCKS + 2 * __malloc_extra_blocks;
@@ -1076,7 +1004,7 @@ _free_internal_nolock (ptr)
return;
#ifdef CYGWIN
- if (ptr < _heapbase)
+ if ((char *) ptr < _heapbase)
/* We're being asked to free something in the static heap. */
return;
#endif
@@ -1162,12 +1090,12 @@ _free_internal_nolock (ptr)
It's possible that moving _heapinfo will allow us to
return some space to the system. */
- __malloc_size_t info_block = BLOCK (_heapinfo);
- __malloc_size_t info_blocks = _heapinfo[info_block].busy.info.size;
- __malloc_size_t prev_block = _heapinfo[block].free.prev;
- __malloc_size_t prev_blocks = _heapinfo[prev_block].free.size;
- __malloc_size_t next_block = _heapinfo[block].free.next;
- __malloc_size_t next_blocks = _heapinfo[next_block].free.size;
+ size_t info_block = BLOCK (_heapinfo);
+ size_t info_blocks = _heapinfo[info_block].busy.info.size;
+ size_t prev_block = _heapinfo[block].free.prev;
+ size_t prev_blocks = _heapinfo[prev_block].free.size;
+ size_t next_block = _heapinfo[block].free.next;
+ size_t next_blocks = _heapinfo[next_block].free.size;
if (/* Win if this block being freed is last in core, the info table
is just before it, the previous free block is just before the
@@ -1190,7 +1118,7 @@ _free_internal_nolock (ptr)
)
{
malloc_info *newinfo;
- __malloc_size_t oldlimit = _heaplimit;
+ size_t oldlimit = _heaplimit;
/* Free the old info table, clearing _heaplimit to avoid
recursion into this code. We don't want to return the
@@ -1205,8 +1133,7 @@ _free_internal_nolock (ptr)
_heapindex = 0;
/* Allocate new space for the info table and move its data. */
- newinfo = (malloc_info *) _malloc_internal_nolock (info_blocks
- * BLOCKSIZE);
+ newinfo = _malloc_internal_nolock (info_blocks * BLOCKSIZE);
PROTECT_MALLOC_STATE (0);
memmove (newinfo, _heapinfo, info_blocks * BLOCKSIZE);
_heapinfo = newinfo;
@@ -1222,7 +1149,7 @@ _free_internal_nolock (ptr)
/* Now see if we can return stuff to the system. */
if (block + blocks == _heaplimit && blocks >= lesscore_threshold)
{
- register __malloc_size_t bytes = blocks * BLOCKSIZE;
+ register size_t bytes = blocks * BLOCKSIZE;
_heaplimit -= blocks;
(*__morecore) (-bytes);
_heapinfo[_heapinfo[block].free.prev].free.next
@@ -1255,7 +1182,7 @@ _free_internal_nolock (ptr)
/* If all fragments of this block are free, remove them
from the fragment list and free the whole block. */
next = prev;
- for (i = 1; i < (__malloc_size_t) (BLOCKSIZE >> type); ++i)
+ for (i = 1; i < (size_t) (BLOCKSIZE >> type); ++i)
next = next->next;
prev->prev->next = next;
if (next != NULL)
@@ -1280,7 +1207,7 @@ _free_internal_nolock (ptr)
/* If some fragments of this block are free, link this
fragment into the fragment list after the first free
fragment of this block. */
- next = (struct list *) ptr;
+ next = ptr;
next->next = prev->next;
next->prev = prev;
prev->next = next;
@@ -1293,11 +1220,10 @@ _free_internal_nolock (ptr)
/* No fragments of this block are free, so link this
fragment into the fragment list and announce that
it is the first free fragment of this block. */
- prev = (struct list *) ptr;
+ prev = ptr;
_heapinfo[block].busy.info.frag.nfree = 1;
- _heapinfo[block].busy.info.frag.first = (unsigned long int)
- ((unsigned long int) ((char *) ptr - (char *) NULL)
- % BLOCKSIZE >> type);
+ _heapinfo[block].busy.info.frag.first =
+ (uintptr_t) ptr % BLOCKSIZE >> type;
prev->next = _fraghead[type].next;
prev->prev = &_fraghead[type];
prev->prev->next = prev;
@@ -1313,8 +1239,7 @@ _free_internal_nolock (ptr)
/* Return memory to the heap.
Like `free' but don't call a __free_hook if there is one. */
void
-_free_internal (ptr)
- __ptr_t ptr;
+_free_internal (void *ptr)
{
LOCK ();
_free_internal_nolock (ptr);
@@ -1324,10 +1249,9 @@ _free_internal (ptr)
/* Return memory to the heap. */
void
-free (ptr)
- __ptr_t ptr;
+free (void *ptr)
{
- void (*hook) (__ptr_t) = __free_hook;
+ void (*hook) (void *) = __free_hook;
if (hook != NULL)
(*hook) (ptr);
@@ -1340,8 +1264,7 @@ free (ptr)
weak_alias (free, cfree)
#else
void
-cfree (ptr)
- __ptr_t ptr;
+cfree (void *ptr)
{
free (ptr);
}
@@ -1368,32 +1291,24 @@ Fifth Floor, Boston, MA 02110-1301, USA.
The author may be reached (Email) at the address mike@ai.mit.edu,
or (US mail) as Mike Haertel c/o Free Software Foundation. */
-#ifndef _MALLOC_INTERNAL
-#define _MALLOC_INTERNAL
-#include <malloc.h>
-#endif
-
-
#define min(A, B) ((A) < (B) ? (A) : (B))
/* On Cygwin the dumped emacs may try to realloc storage allocated in
the static heap. We just malloc space in the new heap and copy the
data. */
#ifdef CYGWIN
-__ptr_t
-special_realloc (ptr, size)
- __ptr_t ptr;
- __malloc_size_t size;
+void *
+special_realloc (void *ptr, size_t size)
{
- __ptr_t result;
+ void *result;
int type;
- __malloc_size_t block, oldsize;
+ size_t block, oldsize;
block = ((char *) ptr - bss_sbrk_heapbase) / BLOCKSIZE + 1;
type = bss_sbrk_heapinfo[block].busy.type;
oldsize =
type == 0 ? bss_sbrk_heapinfo[block].busy.info.size * BLOCKSIZE
- : (__malloc_size_t) 1 << type;
+ : (size_t) 1 << type;
result = _malloc_internal_nolock (size);
if (result != NULL)
memcpy (result, ptr, min (oldsize, size));
@@ -1402,7 +1317,7 @@ special_realloc (ptr, size)
#endif
/* Debugging hook for realloc. */
-__ptr_t (*__realloc_hook) PP ((__ptr_t __ptr, __malloc_size_t __size));
+void *(*__realloc_hook) (void *ptr, size_t size);
/* Resize the given region to the new size, returning a pointer
to the (possibly moved) region. This is optimized for speed;
@@ -1410,14 +1325,12 @@ __ptr_t (*__realloc_hook) PP ((__ptr_t __ptr, __malloc_size_t __size));
achieved by unconditionally allocating and copying to a
new region. This module has incestuous knowledge of the
internals of both free and malloc. */
-__ptr_t
-_realloc_internal_nolock (ptr, size)
- __ptr_t ptr;
- __malloc_size_t size;
+void *
+_realloc_internal_nolock (void *ptr, size_t size)
{
- __ptr_t result;
+ void *result;
int type;
- __malloc_size_t block, blocks, oldlimit;
+ size_t block, blocks, oldlimit;
if (size == 0)
{
@@ -1428,7 +1341,7 @@ _realloc_internal_nolock (ptr, size)
return _malloc_internal_nolock (size);
#ifdef CYGWIN
- if (ptr < _heapbase)
+ if ((char *) ptr < _heapbase)
/* ptr points into the static heap */
return special_realloc (ptr, size);
#endif
@@ -1497,7 +1410,7 @@ _realloc_internal_nolock (ptr, size)
(void) _malloc_internal_nolock (blocks * BLOCKSIZE);
else
{
- __ptr_t previous
+ void *previous
= _malloc_internal_nolock ((block - _heapindex) * BLOCKSIZE);
(void) _malloc_internal_nolock (blocks * BLOCKSIZE);
_free_internal_nolock (previous);
@@ -1512,8 +1425,8 @@ _realloc_internal_nolock (ptr, size)
default:
/* Old size is a fragment; type is logarithm
to base two of the fragment size. */
- if (size > (__malloc_size_t) (1 << (type - 1)) &&
- size <= (__malloc_size_t) (1 << type))
+ if (size > (size_t) (1 << (type - 1)) &&
+ size <= (size_t) (1 << type))
/* The new size is the same kind of fragment. */
result = ptr;
else
@@ -1523,7 +1436,7 @@ _realloc_internal_nolock (ptr, size)
result = _malloc_internal_nolock (size);
if (result == NULL)
goto out;
- memcpy (result, ptr, min (size, (__malloc_size_t) 1 << type));
+ memcpy (result, ptr, min (size, (size_t) 1 << type));
_free_internal_nolock (ptr);
}
break;
@@ -1534,12 +1447,10 @@ _realloc_internal_nolock (ptr, size)
return result;
}
-__ptr_t
-_realloc_internal (ptr, size)
- __ptr_t ptr;
- __malloc_size_t size;
+void *
+_realloc_internal (void *ptr, size_t size)
{
- __ptr_t result;
+ void *result;
LOCK ();
result = _realloc_internal_nolock (ptr, size);
@@ -1548,12 +1459,10 @@ _realloc_internal (ptr, size)
return result;
}
-__ptr_t
-realloc (ptr, size)
- __ptr_t ptr;
- __malloc_size_t size;
+void *
+realloc (void *ptr, size_t size)
{
- __ptr_t (*hook) (__ptr_t, __malloc_size_t);
+ void *(*hook) (void *, size_t);
if (!__malloc_initialized && !__malloc_initialize ())
return NULL;
@@ -1581,19 +1490,12 @@ Fifth Floor, Boston, MA 02110-1301, USA.
The author may be reached (Email) at the address mike@ai.mit.edu,
or (US mail) as Mike Haertel c/o Free Software Foundation. */
-#ifndef _MALLOC_INTERNAL
-#define _MALLOC_INTERNAL
-#include <malloc.h>
-#endif
-
/* Allocate an array of NMEMB elements each SIZE bytes long.
The entire array is initialized to zeros. */
-__ptr_t
-calloc (nmemb, size)
- register __malloc_size_t nmemb;
- register __malloc_size_t size;
+void *
+calloc (register size_t nmemb, register size_t size)
{
- register __ptr_t result = malloc (nmemb * size);
+ register void *result = malloc (nmemb * size);
if (result != NULL)
(void) memset (result, 0, nmemb * size);
@@ -1618,11 +1520,6 @@ along with the GNU C Library; see the file COPYING. If not, write to
the Free Software Foundation, 51 Franklin Street, Fifth Floor, Boston,
MA 02110-1301, USA. */
-#ifndef _MALLOC_INTERNAL
-#define _MALLOC_INTERNAL
-#include <malloc.h>
-#endif
-
/* uClibc defines __GNU_LIBRARY__, but it is not completely
compatible. */
#if !defined (__GNU_LIBRARY__) || defined (__UCLIBC__)
@@ -1631,30 +1528,24 @@ MA 02110-1301, USA. */
/* It is best not to declare this and cast its result on foreign operating
systems with potentially hostile include files. */
-#include <stddef.h>
-extern __ptr_t __sbrk PP ((ptrdiff_t increment));
+extern void *__sbrk (ptrdiff_t increment);
#endif /* __GNU_LIBRARY__ && ! defined (__UCLIBC__) */
-#ifndef NULL
-#define NULL 0
-#endif
-
/* Allocate INCREMENT more bytes of data space,
and return the start of data space, or NULL on errors.
If INCREMENT is negative, shrink data space. */
-__ptr_t
-__default_morecore (increment)
- __malloc_ptrdiff_t increment;
+void *
+__default_morecore (ptrdiff_t increment)
{
- __ptr_t result;
+ void *result;
#if defined (CYGWIN)
if (!bss_sbrk_did_unexec)
{
return bss_sbrk (increment);
}
#endif
- result = (__ptr_t) __sbrk (increment);
- if (result == (__ptr_t) -1)
+ result = (void *) __sbrk (increment);
+ if (result == (void *) -1)
return NULL;
return result;
}
@@ -1675,22 +1566,14 @@ License along with this library; see the file COPYING. If
not, write to the Free Software Foundation, Inc., 51 Franklin Street,
Fifth Floor, Boston, MA 02110-1301, USA. */
-#ifndef _MALLOC_INTERNAL
-#define _MALLOC_INTERNAL
-#include <malloc.h>
-#endif
-
-__ptr_t (*__memalign_hook) PP ((__malloc_size_t __size,
- __malloc_size_t __alignment));
+void *(*__memalign_hook) (size_t size, size_t alignment);
-__ptr_t
-memalign (alignment, size)
- __malloc_size_t alignment;
- __malloc_size_t size;
+void *
+memalign (size_t alignment, size_t size)
{
- __ptr_t result;
- unsigned long int adj, lastadj;
- __ptr_t (*hook) (__malloc_size_t, __malloc_size_t) = __memalign_hook;
+ void *result;
+ size_t adj, lastadj;
+ void *(*hook) (size_t, size_t) = __memalign_hook;
if (hook)
return (*hook) (alignment, size);
@@ -1703,7 +1586,7 @@ memalign (alignment, size)
/* Figure out how much we will need to pad this particular block
to achieve the required alignment. */
- adj = (unsigned long int) ((char *) result - (char *) NULL) % alignment;
+ adj = (uintptr_t) result % alignment;
do
{
@@ -1714,7 +1597,7 @@ memalign (alignment, size)
return NULL;
lastadj = adj;
- adj = (unsigned long int) ((char *) result - (char *) NULL) % alignment;
+ adj = (uintptr_t) result % alignment;
/* It's conceivable we might have been so unlucky as to get a
different block with weaker alignment. If so, this block is too
short to contain SIZE after alignment correction. So we must
@@ -1735,7 +1618,7 @@ memalign (alignment, size)
break;
if (l == NULL)
{
- l = (struct alignlist *) malloc (sizeof (struct alignlist));
+ l = malloc (sizeof (struct alignlist));
if (l != NULL)
{
l->next = _aligned_blocks;
@@ -1767,15 +1650,12 @@ memalign (alignment, size)
#endif
int
-posix_memalign (memptr, alignment, size)
- __ptr_t *memptr;
- __malloc_size_t alignment;
- __malloc_size_t size;
+posix_memalign (void **memptr, size_t alignment, size_t size)
{
- __ptr_t mem;
+ void *mem;
if (alignment == 0
- || alignment % sizeof (__ptr_t) != 0
+ || alignment % sizeof (void *) != 0
|| (alignment & (alignment - 1)) != 0)
return EINVAL;
@@ -1809,43 +1689,27 @@ Fifth Floor, Boston, MA 02110-1301, USA.
The author may be reached (Email) at the address mike@ai.mit.edu,
or (US mail) as Mike Haertel c/o Free Software Foundation. */
-#if defined (_MALLOC_INTERNAL) && defined (GMALLOC_INHIBIT_VALLOC)
-
/* Emacs defines GMALLOC_INHIBIT_VALLOC to avoid this definition
on MSDOS, where it conflicts with a system header file. */
-#define ELIDE_VALLOC
+#ifndef GMALLOC_INHIBIT_VALLOC
-#endif
-
-#ifndef ELIDE_VALLOC
-
-#if defined (__GNU_LIBRARY__) || defined (_LIBC)
-#include <stddef.h>
-#include <sys/cdefs.h>
-#if defined (__GLIBC__) && __GLIBC__ >= 2
-/* __getpagesize is already declared in <unistd.h> with return type int */
-#else
-extern size_t __getpagesize PP ((void));
-#endif
-#else
-#include "getpagesize.h"
-#define __getpagesize() getpagesize ()
-#endif
+/* Allocate SIZE bytes on a page boundary. */
+extern void *valloc (size_t);
-#ifndef _MALLOC_INTERNAL
-#define _MALLOC_INTERNAL
-#include <malloc.h>
+#if defined _SC_PAGESIZE || !defined HAVE_GETPAGESIZE
+# include "getpagesize.h"
+#elif !defined getpagesize
+extern int getpagesize (void);
#endif
-static __malloc_size_t pagesize;
+static size_t pagesize;
-__ptr_t
-valloc (size)
- __malloc_size_t size;
+void *
+valloc (size_t size)
{
if (pagesize == 0)
- pagesize = __getpagesize ();
+ pagesize = getpagesize ();
return memalign (pagesize, size);
}
@@ -1876,41 +1740,31 @@ Fifth Floor, Boston, MA 02110-1301, USA.
The author may be reached (Email) at the address mike@ai.mit.edu,
or (US mail) as Mike Haertel c/o Free Software Foundation. */
-#ifdef emacs
-#include <stdio.h>
-#else
-#ifndef _MALLOC_INTERNAL
-#define _MALLOC_INTERNAL
-#include <malloc.h>
#include <stdio.h>
-#endif
-#endif
/* Old hook values. */
-static void (*old_free_hook) (__ptr_t ptr);
-static __ptr_t (*old_malloc_hook) (__malloc_size_t size);
-static __ptr_t (*old_realloc_hook) (__ptr_t ptr, __malloc_size_t size);
+static void (*old_free_hook) (void *ptr);
+static void *(*old_malloc_hook) (size_t size);
+static void *(*old_realloc_hook) (void *ptr, size_t size);
/* Function to call when something awful happens. */
static void (*abortfunc) (enum mcheck_status);
/* Arbitrary magical numbers. */
-#define MAGICWORD 0xfedabeeb
-#define MAGICFREE 0xd8675309
+#define MAGICWORD (SIZE_MAX / 11 ^ SIZE_MAX / 13 << 3)
+#define MAGICFREE (SIZE_MAX / 17 ^ SIZE_MAX / 19 << 4)
#define MAGICBYTE ((char) 0xd7)
#define MALLOCFLOOD ((char) 0x93)
#define FREEFLOOD ((char) 0x95)
struct hdr
{
- __malloc_size_t size; /* Exact size requested by user. */
- unsigned long int magic; /* Magic number to check header integrity. */
+ size_t size; /* Exact size requested by user. */
+ size_t magic; /* Magic number to check header integrity. */
};
-static enum mcheck_status checkhdr (const struct hdr *);
static enum mcheck_status
-checkhdr (hdr)
- const struct hdr *hdr;
+checkhdr (const struct hdr *hdr)
{
enum mcheck_status status;
switch (hdr->magic)
@@ -1933,10 +1787,8 @@ checkhdr (hdr)
return status;
}
-static void freehook (__ptr_t);
static void
-freehook (ptr)
- __ptr_t ptr;
+freehook (void *ptr)
{
struct hdr *hdr;
@@ -1955,15 +1807,13 @@ freehook (ptr)
__free_hook = freehook;
}
-static __ptr_t mallochook (__malloc_size_t);
-static __ptr_t
-mallochook (size)
- __malloc_size_t size;
+static void *
+mallochook (size_t size)
{
struct hdr *hdr;
__malloc_hook = old_malloc_hook;
- hdr = (struct hdr *) malloc (sizeof (struct hdr) + size + 1);
+ hdr = malloc (sizeof (struct hdr) + size + 1);
__malloc_hook = mallochook;
if (hdr == NULL)
return NULL;
@@ -1971,18 +1821,15 @@ mallochook (size)
hdr->size = size;
hdr->magic = MAGICWORD;
((char *) &hdr[1])[size] = MAGICBYTE;
- memset ((__ptr_t) (hdr + 1), MALLOCFLOOD, size);
- return (__ptr_t) (hdr + 1);
+ memset (hdr + 1, MALLOCFLOOD, size);
+ return hdr + 1;
}
-static __ptr_t reallochook (__ptr_t, __malloc_size_t);
-static __ptr_t
-reallochook (ptr, size)
- __ptr_t ptr;
- __malloc_size_t size;
+static void *
+reallochook (void *ptr, size_t size)
{
struct hdr *hdr = NULL;
- __malloc_size_t osize = 0;
+ size_t osize = 0;
if (ptr)
{
@@ -1997,7 +1844,7 @@ reallochook (ptr, size)
__free_hook = old_free_hook;
__malloc_hook = old_malloc_hook;
__realloc_hook = old_realloc_hook;
- hdr = (struct hdr *) realloc ((__ptr_t) hdr, sizeof (struct hdr) + size + 1);
+ hdr = realloc (hdr, sizeof (struct hdr) + size + 1);
__free_hook = freehook;
__malloc_hook = mallochook;
__realloc_hook = reallochook;
@@ -2009,12 +1856,11 @@ reallochook (ptr, size)
((char *) &hdr[1])[size] = MAGICBYTE;
if (size > osize)
memset ((char *) (hdr + 1) + osize, MALLOCFLOOD, size - osize);
- return (__ptr_t) (hdr + 1);
+ return hdr + 1;
}
static void
-mabort (status)
- enum mcheck_status status;
+mabort (enum mcheck_status status)
{
const char *msg;
switch (status)
@@ -2047,8 +1893,7 @@ mabort (status)
static int mcheck_used = 0;
int
-mcheck (func)
- void (*func) (enum mcheck_status);
+mcheck (void (*func) (enum mcheck_status))
{
abortfunc = (func != NULL) ? func : &mabort;
@@ -2068,7 +1913,7 @@ mcheck (func)
}
enum mcheck_status
-mprobe (__ptr_t ptr)
+mprobe (void *ptr)
{
return mcheck_used ? checkhdr (ptr) : MCHECK_DISABLED;
}
diff --git a/src/gnutls.c b/src/gnutls.c
index 8dbf01cedc9..c5e21cc8777 100644
--- a/src/gnutls.c
+++ b/src/gnutls.c
@@ -200,8 +200,12 @@ init_gnutls_functions (Lisp_Object libraries)
max_log_level = global_gnutls_log_level;
- GNUTLS_LOG2 (1, max_log_level, "GnuTLS library loaded:",
- SDATA (Fget (Qgnutls_dll, QCloaded_from)));
+ {
+ Lisp_Object name = CAR_SAFE (Fget (Qgnutls_dll, QCloaded_from));
+ GNUTLS_LOG2 (1, max_log_level, "GnuTLS library loaded:",
+ STRINGP (name) ? (const char *) SDATA (name) : "unknown");
+ }
+
return 1;
}
@@ -419,7 +423,7 @@ emacs_gnutls_read (struct Lisp_Process *proc, char *buf, ptrdiff_t nbyte)
{
proc->gnutls_handshakes_tried++;
emacs_gnutls_handshake (proc);
- GNUTLS_LOG2i (5, log_level, "Retried handshake",
+ GNUTLS_LOG2i (5, log_level, "Retried handshake",
proc->gnutls_handshakes_tried);
return -1;
}
diff --git a/src/gtkutil.c b/src/gtkutil.c
index d39a0eedf41..4cf421b6616 100644
--- a/src/gtkutil.c
+++ b/src/gtkutil.c
@@ -1090,7 +1090,9 @@ xg_create_frame_widgets (FRAME_PTR f)
GtkWidget *wtop;
GtkWidget *wvbox, *whbox;
GtkWidget *wfixed;
+#ifndef HAVE_GTK3
GtkRcStyle *style;
+#endif
char *title = 0;
BLOCK_INPUT;
diff --git a/src/insdel.c b/src/insdel.c
index 748e2d54109..148ba221940 100644
--- a/src/insdel.c
+++ b/src/insdel.c
@@ -31,10 +31,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#include "blockinput.h"
#include "region-cache.h"
-#ifndef NULL
-#define NULL 0
-#endif
-
static void insert_from_string_1 (Lisp_Object string,
ptrdiff_t pos, ptrdiff_t pos_byte,
ptrdiff_t nchars, ptrdiff_t nbytes,
diff --git a/src/intervals.c b/src/intervals.c
index e6c1b4d60d2..0b332caf897 100644
--- a/src/intervals.c
+++ b/src/intervals.c
@@ -1000,6 +1000,7 @@ adjust_intervals_for_insertion (INTERVAL tree,
Lisp_Object pleft, pright;
struct interval newi;
+ RESET_INTERVAL (&newi);
pleft = NULL_INTERVAL_P (prev) ? Qnil : prev->plist;
pright = NULL_INTERVAL_P (i) ? Qnil : i->plist;
newi.plist = merge_properties_sticky (pleft, pright);
diff --git a/src/keyboard.c b/src/keyboard.c
index 79d9e7a18e8..339cf2a7e9e 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -1198,6 +1198,12 @@ This also exits all active minibuffers. */)
Fthrow (Qtop_level, Qnil);
}
+static void user_error (const char*) NO_RETURN;
+static void user_error (const char *msg)
+{
+ xsignal1 (Quser_error, build_string (msg));
+}
+
static Lisp_Object Fexit_recursive_edit (void) NO_RETURN;
DEFUN ("exit-recursive-edit", Fexit_recursive_edit, Sexit_recursive_edit, 0, 0, "",
doc: /* Exit from the innermost recursive edit or minibuffer. */)
@@ -1206,7 +1212,7 @@ DEFUN ("exit-recursive-edit", Fexit_recursive_edit, Sexit_recursive_edit, 0, 0,
if (command_loop_level > 0 || minibuf_level > 0)
Fthrow (Qexit, Qnil);
- error ("No recursive edit is in progress");
+ user_error ("No recursive edit is in progress");
}
static Lisp_Object Fabort_recursive_edit (void) NO_RETURN;
@@ -1217,7 +1223,7 @@ DEFUN ("abort-recursive-edit", Fabort_recursive_edit, Sabort_recursive_edit, 0,
if (command_loop_level > 0 || minibuf_level > 0)
Fthrow (Qexit, Qt);
- error ("No recursive edit is in progress");
+ user_error ("No recursive edit is in progress");
}
#if defined (HAVE_MOUSE) || defined (HAVE_GPM)
@@ -2983,11 +2989,16 @@ read_char (int commandflag, ptrdiff_t nmaps, Lisp_Object *maps,
own stuff with the echo area. */
if (!CONSP (c)
|| (!(EQ (Qhelp_echo, XCAR (c)))
- && !(EQ (Qswitch_frame, XCAR (c)))))
+ && !(EQ (Qswitch_frame, XCAR (c)))
+ /* Don't wipe echo area for select window events: These might
+ get delayed via `mouse-autoselect-window' (Bug#11304). */
+ && !(EQ (Qselect_window, XCAR (c)))))
{
if (!NILP (echo_area_buffer[0]))
- safe_run_hooks (Qecho_area_clear_hook);
- clear_message (1, 0);
+ {
+ safe_run_hooks (Qecho_area_clear_hook);
+ clear_message (1, 0);
+ }
}
reread_for_input_method:
@@ -3775,7 +3786,6 @@ kbd_buffer_get_event (KBOARD **kbp,
int *used_mouse_menu,
struct timeval *end_time)
{
- register int c;
Lisp_Object obj;
#ifdef subprocesses
@@ -3792,16 +3802,18 @@ kbd_buffer_get_event (KBOARD **kbp,
}
#endif /* subprocesses */
+#ifndef HAVE_DBUS /* We want to read D-Bus events in batch mode. */
if (noninteractive
/* In case we are running as a daemon, only do this before
detaching from the terminal. */
|| (IS_DAEMON && daemon_pipe[1] >= 0))
{
- c = getchar ();
+ int c = getchar ();
XSETINT (obj, c);
*kbp = current_kboard;
return obj;
}
+#endif /* ! HAVE_DBUS */
/* Wait until there is input available. */
for (;;)
@@ -7173,6 +7185,7 @@ tty_read_avail_input (struct terminal *terminal,
return nread;
}
+#if defined SYNC_INPUT || defined SIGIO
static void
handle_async_input (void)
{
@@ -7199,6 +7212,7 @@ handle_async_input (void)
--handling_signal;
#endif
}
+#endif /* SYNC_INPUT || SIGIO */
#ifdef SYNC_INPUT
void
@@ -10341,146 +10355,6 @@ a special event, so ignore the prefix argument and don't clear it. */)
-DEFUN ("execute-extended-command", Fexecute_extended_command, Sexecute_extended_command,
- 1, 1, "P",
- doc: /* Read function name, then read its arguments and call it.
-
-To pass a numeric argument to the command you are invoking with, specify
-the numeric argument to this command.
-
-Noninteractively, the argument PREFIXARG is the prefix argument to
-give to the command you invoke, if it asks for an argument. */)
- (Lisp_Object prefixarg)
-{
- Lisp_Object function;
- ptrdiff_t saved_last_point_position;
- Lisp_Object saved_keys, saved_last_point_position_buffer;
- Lisp_Object bindings, value;
- struct gcpro gcpro1, gcpro2, gcpro3;
-#ifdef HAVE_WINDOW_SYSTEM
- /* The call to Fcompleting_read will start and cancel the hourglass,
- but if the hourglass was already scheduled, this means that no
- hourglass will be shown for the actual M-x command itself.
- So we restart it if it is already scheduled. Note that checking
- hourglass_shown_p is not enough, normally the hourglass is not shown,
- just scheduled to be shown. */
- int hstarted = hourglass_started ();
-#endif
-
- saved_keys = Fvector (this_command_key_count,
- XVECTOR (this_command_keys)->contents);
- saved_last_point_position_buffer = last_point_position_buffer;
- saved_last_point_position = last_point_position;
- GCPRO3 (saved_keys, prefixarg, saved_last_point_position_buffer);
-
- function = call0 (intern ("read-extended-command"));
-
-#ifdef HAVE_WINDOW_SYSTEM
- if (hstarted) start_hourglass ();
-#endif
-
- if (STRINGP (function) && SCHARS (function) == 0)
- error ("No command name given");
-
- /* Set this_command_keys to the concatenation of saved_keys and
- function, followed by a RET. */
- {
- Lisp_Object *keys;
- int i;
-
- this_command_key_count = 0;
- this_command_key_count_reset = 0;
- this_single_command_key_start = 0;
-
- keys = XVECTOR (saved_keys)->contents;
- for (i = 0; i < ASIZE (saved_keys); i++)
- add_command_key (keys[i]);
-
- for (i = 0; i < SCHARS (function); i++)
- add_command_key (Faref (function, make_number (i)));
-
- add_command_key (make_number ('\015'));
- }
-
- last_point_position = saved_last_point_position;
- last_point_position_buffer = saved_last_point_position_buffer;
-
- UNGCPRO;
-
- function = Fintern (function, Qnil);
- KVAR (current_kboard, Vprefix_arg) = prefixarg;
- Vthis_command = function;
- real_this_command = function;
-
- /* If enabled, show which key runs this command. */
- if (!NILP (Vsuggest_key_bindings)
- && NILP (Vexecuting_kbd_macro)
- && SYMBOLP (function))
- bindings = Fwhere_is_internal (function, Voverriding_local_map,
- Qt, Qnil, Qnil);
- else
- bindings = Qnil;
-
- value = Qnil;
- GCPRO3 (bindings, value, function);
- value = Fcommand_execute (function, Qt, Qnil, Qnil);
-
- /* If the command has a key binding, print it now. */
- if (!NILP (bindings)
- && ! (VECTORP (bindings) && EQ (Faref (bindings, make_number (0)),
- Qmouse_movement)))
- {
- /* But first wait, and skip the message if there is input. */
- Lisp_Object waited;
-
- /* If this command displayed something in the echo area;
- wait a few seconds, then display our suggestion message. */
- if (NILP (echo_area_buffer[0]))
- waited = sit_for (make_number (0), 0, 2);
- else if (NUMBERP (Vsuggest_key_bindings))
- waited = sit_for (Vsuggest_key_bindings, 0, 2);
- else
- waited = sit_for (make_number (2), 0, 2);
-
- if (!NILP (waited) && ! CONSP (Vunread_command_events))
- {
- Lisp_Object binding;
- char *newmessage;
- int message_p = push_message ();
- ptrdiff_t count = SPECPDL_INDEX ();
- ptrdiff_t newmessage_len, newmessage_alloc;
- USE_SAFE_ALLOCA;
-
- record_unwind_protect (pop_message_unwind, Qnil);
- binding = Fkey_description (bindings, Qnil);
- newmessage_alloc =
- (sizeof "You can run the command `' with "
- + SBYTES (SYMBOL_NAME (function)) + SBYTES (binding));
- SAFE_ALLOCA (newmessage, char *, newmessage_alloc);
- newmessage_len =
- esprintf (newmessage, "You can run the command `%s' with %s",
- SDATA (SYMBOL_NAME (function)),
- SDATA (binding));
- message2 (newmessage,
- newmessage_len,
- STRING_MULTIBYTE (binding));
- if (NUMBERP (Vsuggest_key_bindings))
- waited = sit_for (Vsuggest_key_bindings, 0, 2);
- else
- waited = sit_for (make_number (2), 0, 2);
-
- if (!NILP (waited) && message_p)
- restore_message ();
-
- SAFE_FREE ();
- unbind_to (count, Qnil);
- }
- }
-
- RETURN_UNGCPRO (value);
-}
-
-
/* Return nonzero if input events are pending. */
int
@@ -11791,7 +11665,6 @@ syms_of_keyboard (void)
defsubr (&Sset_quit_char);
defsubr (&Sset_input_mode);
defsubr (&Scurrent_input_mode);
- defsubr (&Sexecute_extended_command);
defsubr (&Sposn_at_point);
defsubr (&Sposn_at_x_y);
@@ -12195,12 +12068,6 @@ If this variable is non-nil, `delayed-warnings-hook' will be run
immediately after running `post-command-hook'. */);
Vdelayed_warnings_list = Qnil;
- DEFVAR_LISP ("suggest-key-bindings", Vsuggest_key_bindings,
- doc: /* Non-nil means show the equivalent key-binding when M-x command has one.
-The value can be a length of time to show the message for.
-If the value is non-nil and not a number, we wait 2 seconds. */);
- Vsuggest_key_bindings = Qt;
-
DEFVAR_LISP ("timer-list", Vtimer_list,
doc: /* List of active absolute time timers in order of increasing time. */);
Vtimer_list = Qnil;
@@ -12396,7 +12263,7 @@ keys_of_keyboard (void)
}
/* Mark the pointers in the kboard objects.
- Called by the Fgarbage_collector. */
+ Called by Fgarbage_collect. */
void
mark_kboards (void)
{
diff --git a/src/keymap.c b/src/keymap.c
index e8f2f88bb26..2a03dda5a5e 100644
--- a/src/keymap.c
+++ b/src/keymap.c
@@ -2571,7 +2571,8 @@ where_is_internal (Lisp_Object definition, Lisp_Object keymaps,
DEFUN ("where-is-internal", Fwhere_is_internal, Swhere_is_internal, 1, 5, 0,
doc: /* Return list of keys that invoke DEFINITION.
If KEYMAP is a keymap, search only KEYMAP and the global keymap.
-If KEYMAP is nil, search all the currently active keymaps.
+If KEYMAP is nil, search all the currently active keymaps, except
+ for `overriding-local-map' (which is ignored).
If KEYMAP is a list of keymaps, search only those keymaps.
If optional 3rd arg FIRSTONLY is non-nil, return the first key sequence found,
@@ -2586,9 +2587,17 @@ If optional 4th arg NOINDIRECT is non-nil, don't follow indirections
to other keymaps or slots. This makes it possible to search for an
indirect definition itself.
-If optional 5th arg NO-REMAP is non-nil, don't search for key sequences
-that invoke a command which is remapped to DEFINITION, but include the
-remapped command in the returned list. */)
+The optional 5th arg NO-REMAP alters how command remapping is handled:
+
+- If another command OTHER-COMMAND is remapped to DEFINITION, normally
+ search for the bindings of OTHER-COMMAND and include them in the
+ returned list. But if NO-REMAP is non-nil, include the vector
+ [remap OTHER-COMMAND] in the returned list instead, without
+ searching for those other bindings.
+
+- If DEFINITION is remapped to OTHER-COMMAND, normally return the
+ bindings for OTHER-COMMAND. But if NO-REMAP is non-nil, return the
+ bindings for DEFINITION instead, ignoring its remapping. */)
(Lisp_Object definition, Lisp_Object keymap, Lisp_Object firstonly, Lisp_Object noindirect, Lisp_Object no_remap)
{
/* The keymaps in which to search. */
diff --git a/src/lisp.h b/src/lisp.h
index 66e449b0039..551c15473a7 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -41,25 +41,36 @@ extern void check_cons_list (void);
Build with CFLAGS='-DWIDE_EMACS_INT' to try them out. */
/* #undef WIDE_EMACS_INT */
-/* These are default choices for the types to use. */
+/* EMACS_INT - signed integer wide enough to hold an Emacs value
+ EMACS_INT_MAX - maximum value of EMACS_INT; can be used in #if
+ pI - printf length modifier for EMACS_INT
+ EMACS_UINT - unsigned variant of EMACS_INT */
#ifndef EMACS_INT
-# if BITS_PER_LONG < BITS_PER_LONG_LONG && defined WIDE_EMACS_INT
+# if LONG_MAX < LLONG_MAX && defined WIDE_EMACS_INT
# define EMACS_INT long long
-# define BITS_PER_EMACS_INT BITS_PER_LONG_LONG
+# define EMACS_INT_MAX LLONG_MAX
# define pI "ll"
-# elif BITS_PER_INT < BITS_PER_LONG
+# elif INT_MAX < LONG_MAX
# define EMACS_INT long
-# define BITS_PER_EMACS_INT BITS_PER_LONG
+# define EMACS_INT_MAX LONG_MAX
# define pI "l"
# else
# define EMACS_INT int
-# define BITS_PER_EMACS_INT BITS_PER_INT
+# define EMACS_INT_MAX INT_MAX
# define pI ""
# endif
#endif
-#ifndef EMACS_UINT
-# define EMACS_UINT unsigned EMACS_INT
-#endif
+#define EMACS_UINT unsigned EMACS_INT
+
+/* Number of bits in some machine integer types. */
+enum
+ {
+ BITS_PER_CHAR = CHAR_BIT,
+ BITS_PER_SHORT = CHAR_BIT * sizeof (short),
+ BITS_PER_INT = CHAR_BIT * sizeof (int),
+ BITS_PER_LONG = CHAR_BIT * sizeof (long int),
+ BITS_PER_EMACS_INT = CHAR_BIT * sizeof (EMACS_INT)
+ };
/* printmax_t and uprintmax_t are types for printing large integers.
These are the widest integers that are supported for printing.
@@ -164,13 +175,13 @@ extern int suppress_checking EXTERNALLY_VISIBLE;
variable VAR of type TYPE with the added requirement that it be
TYPEBITS-aligned. */
-#ifndef GCTYPEBITS
#define GCTYPEBITS 3
-#endif
-
-#ifndef VALBITS
#define VALBITS (BITS_PER_EMACS_INT - GCTYPEBITS)
-#endif
+
+/* The maximum value that can be stored in a EMACS_INT, assuming all
+ bits other than the type bits contribute to a nonnegative signed value.
+ This can be used in #if, e.g., '#if VAL_MAX < UINTPTR_MAX' below. */
+#define VAL_MAX (EMACS_INT_MAX >> (GCTYPEBITS - 1))
#ifndef NO_DECL_ALIGN
# ifndef DECL_ALIGN
@@ -195,12 +206,12 @@ extern int suppress_checking EXTERNALLY_VISIBLE;
|| defined DARWIN_OS || defined __sun)
/* We also need to be able to specify mult-of-8 alignment on static vars. */
# if defined DECL_ALIGN
-/* On hosts where VALBITS is greater than the pointer width in bits,
+/* On hosts where pointers-as-ints do not exceed VAL_MAX,
USE_LSB_TAG is:
a. unnecessary, because the top bits of an EMACS_INT are unused, and
b. slower, because it typically requires extra masking.
So, define USE_LSB_TAG only on hosts where it might be useful. */
-# if UINTPTR_MAX >> VALBITS != 0
+# if VAL_MAX < UINTPTR_MAX
# define USE_LSB_TAG
# endif
# endif
@@ -474,10 +485,11 @@ enum pvec_type
(var) = (type) | (intptr_t) (ptr))
#define XPNTR(a) ((intptr_t) ((a) & ~TYPEMASK))
+#define XUNTAG(a, type) ((intptr_t) ((a) - (type)))
#else /* not USE_LSB_TAG */
-#define VALMASK ((((EMACS_INT) 1) << VALBITS) - 1)
+#define VALMASK VAL_MAX
/* One need to override this if there must be high bits set in data space
(doing the result of the below & ((1 << (GCTYPE + 1)) - 1) would work
@@ -580,6 +592,13 @@ extern Lisp_Object make_number (EMACS_INT);
# define XSETFASTINT(a, b) (XSETINT (a, b))
#endif
+/* Extract the pointer value of the Lisp object A, under the
+ assumption that A's type is TYPE. This is a fallback
+ implementation if nothing faster is available. */
+#ifndef XUNTAG
+# define XUNTAG(a, type) XPNTR (a)
+#endif
+
#define EQ(x, y) (XHASH (x) == XHASH (y))
/* Number of bits in a fixnum, including the sign bit. */
@@ -612,15 +631,20 @@ clip_to_bounds (ptrdiff_t lower, EMACS_INT num, ptrdiff_t upper)
/* Extract a value or address from a Lisp_Object. */
-#define XCONS(a) (eassert (CONSP (a)), (struct Lisp_Cons *) XPNTR (a))
-#define XVECTOR(a) (eassert (VECTORLIKEP (a)), (struct Lisp_Vector *) XPNTR (a))
-#define XSTRING(a) (eassert (STRINGP (a)), (struct Lisp_String *) XPNTR (a))
-#define XSYMBOL(a) (eassert (SYMBOLP (a)), (struct Lisp_Symbol *) XPNTR (a))
-#define XFLOAT(a) (eassert (FLOATP (a)), (struct Lisp_Float *) XPNTR (a))
+#define XCONS(a) (eassert (CONSP (a)), \
+ (struct Lisp_Cons *) XUNTAG (a, Lisp_Cons))
+#define XVECTOR(a) (eassert (VECTORLIKEP (a)), \
+ (struct Lisp_Vector *) XUNTAG (a, Lisp_Vectorlike))
+#define XSTRING(a) (eassert (STRINGP (a)), \
+ (struct Lisp_String *) XUNTAG (a, Lisp_String))
+#define XSYMBOL(a) (eassert (SYMBOLP (a)), \
+ (struct Lisp_Symbol *) XUNTAG (a, Lisp_Symbol))
+#define XFLOAT(a) (eassert (FLOATP (a)), \
+ (struct Lisp_Float *) XUNTAG (a, Lisp_Float))
/* Misc types. */
-#define XMISC(a) ((union Lisp_Misc *) XPNTR (a))
+#define XMISC(a) ((union Lisp_Misc *) XUNTAG (a, Lisp_Misc))
#define XMISCANY(a) (eassert (MISCP (a)), &(XMISC (a)->u_any))
#define XMISCTYPE(a) (XMISCANY (a)->type)
#define XMARKER(a) (eassert (MARKERP (a)), &(XMISC (a)->u_marker))
@@ -640,14 +664,24 @@ clip_to_bounds (ptrdiff_t lower, EMACS_INT num, ptrdiff_t upper)
/* Pseudovector types. */
-#define XPROCESS(a) (eassert (PROCESSP (a)), (struct Lisp_Process *) XPNTR (a))
-#define XWINDOW(a) (eassert (WINDOWP (a)), (struct window *) XPNTR (a))
-#define XTERMINAL(a) (eassert (TERMINALP (a)), (struct terminal *) XPNTR (a))
-#define XSUBR(a) (eassert (SUBRP (a)), (struct Lisp_Subr *) XPNTR (a))
-#define XBUFFER(a) (eassert (BUFFERP (a)), (struct buffer *) XPNTR (a))
-#define XCHAR_TABLE(a) (eassert (CHAR_TABLE_P (a)), (struct Lisp_Char_Table *) XPNTR (a))
-#define XSUB_CHAR_TABLE(a) (eassert (SUB_CHAR_TABLE_P (a)), (struct Lisp_Sub_Char_Table *) XPNTR (a))
-#define XBOOL_VECTOR(a) (eassert (BOOL_VECTOR_P (a)), (struct Lisp_Bool_Vector *) XPNTR (a))
+#define XPROCESS(a) (eassert (PROCESSP (a)), \
+ (struct Lisp_Process *) XUNTAG (a, Lisp_Vectorlike))
+#define XWINDOW(a) (eassert (WINDOWP (a)), \
+ (struct window *) XUNTAG (a, Lisp_Vectorlike))
+#define XTERMINAL(a) (eassert (TERMINALP (a)), \
+ (struct terminal *) XUNTAG (a, Lisp_Vectorlike))
+#define XSUBR(a) (eassert (SUBRP (a)), \
+ (struct Lisp_Subr *) XUNTAG (a, Lisp_Vectorlike))
+#define XBUFFER(a) (eassert (BUFFERP (a)), \
+ (struct buffer *) XUNTAG (a, Lisp_Vectorlike))
+#define XCHAR_TABLE(a) (eassert (CHAR_TABLE_P (a)), \
+ (struct Lisp_Char_Table *) XUNTAG (a, Lisp_Vectorlike))
+#define XSUB_CHAR_TABLE(a) (eassert (SUB_CHAR_TABLE_P (a)), \
+ ((struct Lisp_Sub_Char_Table *) \
+ XUNTAG (a, Lisp_Vectorlike)))
+#define XBOOL_VECTOR(a) (eassert (BOOL_VECTOR_P (a)), \
+ ((struct Lisp_Bool_Vector *) \
+ XUNTAG (a, Lisp_Vectorlike)))
/* Construct a Lisp_Object from a value or address. */
@@ -674,7 +708,9 @@ clip_to_bounds (ptrdiff_t lower, EMACS_INT num, ptrdiff_t upper)
/* The cast to struct vectorlike_header * avoids aliasing issues. */
#define XSETPSEUDOVECTOR(a, b, code) \
XSETTYPED_PSEUDOVECTOR(a, b, \
- ((struct vectorlike_header *) XPNTR (a))->size, \
+ (((struct vectorlike_header *) \
+ XUNTAG (a, Lisp_Vectorlike)) \
+ ->size), \
code)
#define XSETTYPED_PSEUDOVECTOR(a, b, size, code) \
(XSETVECTOR (a, b), \
@@ -1282,7 +1318,7 @@ struct Lisp_Hash_Table
#define XHASH_TABLE(OBJ) \
- ((struct Lisp_Hash_Table *) XPNTR (OBJ))
+ ((struct Lisp_Hash_Table *) XUNTAG (OBJ, Lisp_Vectorlike))
#define XSET_HASH_TABLE(VAR, PTR) \
(XSETPSEUDOVECTOR (VAR, PTR, PVEC_HASH_TABLE))
@@ -1748,7 +1784,7 @@ typedef struct {
code is CODE. */
#define TYPED_PSEUDOVECTORP(x, t, code) \
(VECTORLIKEP (x) \
- && (((((struct t *) XPNTR (x))->size \
+ && (((((struct t *) XUNTAG (x, Lisp_Vectorlike))->size \
& (PSEUDOVECTOR_FLAG | (code)))) \
== (PSEUDOVECTOR_FLAG | (code))))
@@ -2409,7 +2445,7 @@ extern Lisp_Object Qerror, Qquit, Qargs_out_of_range;
extern Lisp_Object Qvoid_variable, Qvoid_function;
extern Lisp_Object Qinvalid_read_syntax;
extern Lisp_Object Qinvalid_function, Qwrong_number_of_arguments, Qno_catch;
-extern Lisp_Object Qend_of_file, Qarith_error, Qmark_inactive;
+extern Lisp_Object Quser_error, Qend_of_file, Qarith_error, Qmark_inactive;
extern Lisp_Object Qbeginning_of_buffer, Qend_of_buffer, Qbuffer_read_only;
extern Lisp_Object Qtext_read_only;
extern Lisp_Object Qinteractive_form;
@@ -2788,7 +2824,7 @@ extern int pos_visible_p (struct window *, ptrdiff_t, int *,
extern void syms_of_xsettings (void);
/* Defined in vm-limit.c. */
-extern void memory_warnings (POINTER_TYPE *, void (*warnfun) (const char *));
+extern void memory_warnings (void *, void (*warnfun) (const char *));
/* Defined in alloc.c */
extern void check_pure_size (void);
@@ -3604,9 +3640,9 @@ extern int initialized;
extern int immediate_quit; /* Nonzero means ^G can quit instantly */
-extern POINTER_TYPE *xmalloc (size_t);
-extern POINTER_TYPE *xrealloc (POINTER_TYPE *, size_t);
-extern void xfree (POINTER_TYPE *);
+extern void *xmalloc (size_t);
+extern void *xrealloc (void *, size_t);
+extern void xfree (void *);
extern void *xnmalloc (ptrdiff_t, ptrdiff_t);
extern void *xnrealloc (void *, ptrdiff_t, ptrdiff_t);
extern void *xpalloc (void *, ptrdiff_t *, ptrdiff_t, ptrdiff_t, ptrdiff_t);
diff --git a/src/lisp.mk b/src/lisp.mk
index 4895ca40959..4608cc3f687 100644
--- a/src/lisp.mk
+++ b/src/lisp.mk
@@ -128,7 +128,9 @@ lisp = \
$(lispsource)/emacs-lisp/lisp-mode.elc \
$(lispsource)/textmodes/text-mode.elc \
$(lispsource)/textmodes/fill.elc \
+ $(lispsource)/newcomment.elc \
$(lispsource)/replace.elc \
+ $(lispsource)/emacs-lisp/tabulated-list.elc \
$(lispsource)/buff-menu.elc \
$(lispsource)/fringe.elc \
$(lispsource)/emacs-lisp/regexp-opt.elc \
diff --git a/src/lread.c b/src/lread.c
index a2a18921bdc..a7ceec3bb4a 100644
--- a/src/lread.c
+++ b/src/lread.c
@@ -24,7 +24,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#include <sys/stat.h>
#include <sys/file.h>
#include <errno.h>
-#include <limits.h> /* for CHAR_BIT */
+#include <limits.h> /* For CHAR_BIT. */
#include <setjmp.h>
#include "lisp.h"
#include "intervals.h"
@@ -3996,10 +3996,12 @@ init_obarray (void)
/* XSYMBOL (Qnil)->function = Qunbound; */
SET_SYMBOL_VAL (XSYMBOL (Qnil), Qnil);
XSYMBOL (Qnil)->constant = 1;
+ XSYMBOL (Qnil)->declared_special = 1;
XSYMBOL (Qnil)->plist = Qnil;
Qt = intern_c_string ("t");
SET_SYMBOL_VAL (XSYMBOL (Qt), Qt);
+ XSYMBOL (Qnil)->declared_special = 1;
XSYMBOL (Qt)->constant = 1;
/* Qt is correct even if CANNOT_DUMP. loadup.el will set to nil at end. */
diff --git a/src/m/README b/src/m/README
deleted file mode 100644
index ad91167648e..00000000000
--- a/src/m/README
+++ /dev/null
@@ -1,7 +0,0 @@
-This directory contains C header files containing machine-specific
-definitions. Each file describes a particular machine. The emacs
-configuration script edits ../config.h to include the appropriate one of
-these files, and then each emacs source file includes config.h.
-
-template.h is a generic template for machine descriptions; it
-describes the parameters a machine file can specify.
diff --git a/src/m/alpha.h b/src/m/alpha.h
deleted file mode 100644
index 2a97a3d5b0c..00000000000
--- a/src/m/alpha.h
+++ /dev/null
@@ -1,53 +0,0 @@
-/* Machine description file for the alpha chip.
-
-Copyright (C) 1994, 1997, 1999, 2001-2012 Free Software Foundation, Inc.
-
-Author: Rainer Schoepf
-(according to authors.el)
-
-This file is part of GNU Emacs.
-
-GNU Emacs 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, either version 3 of the License, or
-(at your option) any later version.
-
-GNU Emacs 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 GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
-
-#ifndef _LP64
-#define _LP64 /* This doesn't appear to be necessary on OSF 4/5 -- fx. */
-#endif
-
-/* Now define a symbol for the cpu type, if your compiler
- does not define it automatically. */
-/* __alpha defined automatically */
-
-
-#ifdef __ELF__
-
-#if !defined (GNU_LINUX) && !defined (__NetBSD__)
-#define DATA_START 0x140000000
-#endif
-
-#else /* not __ELF__ */
-
-/* Describe layout of the address space in an executing process. */
-#define DATA_START 0x140000000
-
-#endif /* __ELF__ */
-
-/* On the Alpha it's best to avoid including TERMIO since struct
- termio and struct termios are mutually incompatible. */
-#define NO_TERMIO
-
-/* Many Alpha implementations (e.g. gas 2.8) can't handle DBL_MIN:
- they generate code that uses a signaling NaN instead of DBL_MIN.
- Define DBL_MIN_REPLACEMENT to be the next value larger than DBL_MIN:
- this avoids the assembler bug. */
-#define DBL_MIN_REPLACEMENT 2.2250738585072019e-308
diff --git a/src/m/amdx86-64.h b/src/m/amdx86-64.h
deleted file mode 100644
index f0482c733f9..00000000000
--- a/src/m/amdx86-64.h
+++ /dev/null
@@ -1,35 +0,0 @@
-/* machine description file for AMD x86-64.
-
-Copyright (C) 2002-2012 Free Software Foundation, Inc.
-
-This file is part of GNU Emacs.
-
-GNU Emacs 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, either version 3 of the License, or
-(at your option) any later version.
-
-GNU Emacs 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 GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
-
-#define BITS_PER_LONG 64
-#define BITS_PER_EMACS_INT 64
-
-/* Now define a symbol for the cpu type, if your compiler
- does not define it automatically:
- Ones defined so far include vax, m68000, ns16000, pyramid,
- orion, tahoe, APOLLO and many others */
-/* __x86_64 defined automatically. */
-
-/* Define the type to use. */
-#define EMACS_INT long
-#define pI "l"
-#define EMACS_UINT unsigned long
-
-/* Define XPNTR to avoid or'ing with DATA_SEG_BITS */
-#undef DATA_SEG_BITS
diff --git a/src/m/ia64.h b/src/m/ia64.h
deleted file mode 100644
index 47df94cedd0..00000000000
--- a/src/m/ia64.h
+++ /dev/null
@@ -1,32 +0,0 @@
-/* machine description file for the IA-64 architecture.
-
-Copyright (C) 2000-2012 Free Software Foundation, Inc.
-
- Contributed by David Mosberger <davidm@hpl.hp.com>
-
-This file is part of GNU Emacs.
-
-GNU Emacs 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, either version 3 of the License, or
-(at your option) any later version.
-
-GNU Emacs 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 GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
-
-#define BITS_PER_LONG 64
-#define BITS_PER_EMACS_INT 64
-
-/* Now define a symbol for the cpu type, if your compiler
- does not define it automatically. */
-/* __ia64__ defined automatically */
-
-/* Define the type to use. */
-#define EMACS_INT long
-#define pI "l"
-#define EMACS_UINT unsigned long
diff --git a/src/m/ibmrs6000.h b/src/m/ibmrs6000.h
deleted file mode 100644
index 9798ad2d3d7..00000000000
--- a/src/m/ibmrs6000.h
+++ /dev/null
@@ -1,46 +0,0 @@
-/* R2 AIX machine/system dependent defines
-
-Copyright (C) 1988, 2001-2012 Free Software Foundation, Inc.
-
-This file is part of GNU Emacs.
-
-GNU Emacs 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, either version 3 of the License, or
-(at your option) any later version.
-
-GNU Emacs 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 GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
-
-
-/* The data segment in this machine always starts at address 0x20000000.
- An address of data cannot be stored correctly in a Lisp object;
- we always lose the high bits. We must tell XPNTR to add them back. */
-#define DATA_START 0x20000000
-#define DATA_SEG_BITS 0x20000000
-
-#ifndef NLIST_STRUCT
-/* AIX supposedly doesn't use this interface, but on the RS/6000
- it apparently does. */
-#define NLIST_STRUCT
-#endif
-
-#undef ADDR_CORRECT
-#define ADDR_CORRECT(x) ((int)(x))
-
-/*** BUILD 9008 - FIONREAD problem still exists in X-Windows. ***/
-#define BROKEN_FIONREAD
-/* As we define BROKEN_FIONREAD, SIGIO will be undefined in systty.h.
- But, on AIX, SIGAIO, SIGPTY, and SIGPOLL are defined as SIGIO,
- which causes compilation error at init_signals in sysdep.c. So, we
- define these macros so that syssignal.h detects them and undefine
- SIGAIO, SIGPTY and SIGPOLL. */
-#define BROKEN_SIGAIO
-#define BROKEN_SIGPTY
-#define BROKEN_SIGPOLL
-
diff --git a/src/m/ibms390x.h b/src/m/ibms390x.h
deleted file mode 100644
index aa652a8206a..00000000000
--- a/src/m/ibms390x.h
+++ /dev/null
@@ -1,32 +0,0 @@
-/* Machine description file for IBM S390 in 64-bit mode
-
-Copyright (C) 2002-2012 Free Software Foundation, Inc.
-
-This file is part of GNU Emacs.
-
-GNU Emacs 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, either version 3 of the License, or
-(at your option) any later version.
-
-GNU Emacs 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 GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
-
-#define BITS_PER_LONG 64
-#define BITS_PER_EMACS_INT 64
-
-/* Define the type to use. */
-#define EMACS_INT long
-#define pI "l"
-#define EMACS_UINT unsigned long
-
-/* On the 64 bit architecture, we can use 60 bits for addresses */
-#define VALBITS 60
-
-/* Define XPNTR to avoid or'ing with DATA_SEG_BITS */
-#define XPNTR(a) XUINT (a)
diff --git a/src/m/intel386.h b/src/m/intel386.h
deleted file mode 100644
index 78a43e92c21..00000000000
--- a/src/m/intel386.h
+++ /dev/null
@@ -1,29 +0,0 @@
-/* Machine description file for intel 386.
-
-Copyright (C) 1987, 2001-2012 Free Software Foundation, Inc.
-
-This file is part of GNU Emacs.
-
-GNU Emacs 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, either version 3 of the License, or
-(at your option) any later version.
-
-GNU Emacs 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 GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
-
-
-#ifdef WINDOWSNT
-#define DATA_START get_data_start ()
-#endif
-
-#ifdef GNU_LINUX
-/* libc-linux/sysdeps/linux/i386/ulimit.c says that due to shared library, */
-/* we cannot get the maximum address for brk */
-#define ULIMIT_BREAK_VALUE (32*1024*1024)
-#endif
diff --git a/src/m/m68k.h b/src/m/m68k.h
deleted file mode 100644
index 120a2bad293..00000000000
--- a/src/m/m68k.h
+++ /dev/null
@@ -1,32 +0,0 @@
-/* Machine description file for generic Motorola 68k.
-
-Copyright (C) 1985, 1995, 2001-2012 Free Software Foundation, Inc.
-
-This file is part of GNU Emacs.
-
-GNU Emacs 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, either version 3 of the License, or
-(at your option) any later version.
-
-GNU Emacs 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 GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
-
-/* Now define a symbol for the cpu type, if your compiler
- does not define it automatically. */
-#ifndef m68k
-#define m68k
-#endif
-
-#ifdef GNU_LINUX
-#ifdef __ELF__
-#define DATA_SEG_BITS 0x80000000
-#endif
-
-#endif
-
diff --git a/src/m/macppc.h b/src/m/macppc.h
deleted file mode 100644
index 0303ead25d6..00000000000
--- a/src/m/macppc.h
+++ /dev/null
@@ -1,24 +0,0 @@
-/* machine description file For the powerpc Macintosh.
-
-Copyright (C) 1994, 2001-2012 Free Software Foundation, Inc.
-
-This file is part of GNU Emacs.
-
-GNU Emacs 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, either version 3 of the License, or
-(at your option) any later version.
-
-GNU Emacs 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 GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
-
-#ifdef _ARCH_PPC64
-#ifndef _LP64
-#define _LP64
-#endif
-#endif
diff --git a/src/m/sparc.h b/src/m/sparc.h
deleted file mode 100644
index 27b6070ba87..00000000000
--- a/src/m/sparc.h
+++ /dev/null
@@ -1,30 +0,0 @@
-/* machine description file for Sun 4 SPARC.
-
-Copyright (C) 1987, 2001-2012 Free Software Foundation, Inc.
-
-This file is part of GNU Emacs.
-
-GNU Emacs 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, either version 3 of the License, or
-(at your option) any later version.
-
-GNU Emacs 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 GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
-
-/* __sparc__ is defined by the compiler by default. */
-
-#ifdef __arch64__ /* GCC, 64-bit ABI. */
-
-#define BITS_PER_LONG 64
-
-#ifndef _LP64
-#define _LP64 /* Done on Alpha -- not sure if it should be here. -- fx */
-#endif
-
-#endif /* __arch64__ */
diff --git a/src/m/template.h b/src/m/template.h
deleted file mode 100644
index 5f1a46c86e1..00000000000
--- a/src/m/template.h
+++ /dev/null
@@ -1,34 +0,0 @@
-/* machine description file template.
-
-Copyright (C) 1985-1986, 2001-2012 Free Software Foundation, Inc.
-
-This file is part of GNU Emacs.
-
-GNU Emacs 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, either version 3 of the License, or
-(at your option) any later version.
-
-GNU Emacs 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 GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
-
-/* Now define a symbol for the cpu type, if your compiler
- does not define it automatically.
- Ones defined so far include m68k and many others */
-
-/* After adding support for a new machine, modify the large case
- statement in configure.in to recognize reasonable
- configuration names, and add a description of the system to
- `etc/MACHINES'.
-
- Check for any tests of $machine in configure.in, and add an entry
- for the new machine if needed.
-
- If you've just fixed a problem in an existing configuration file,
- you should also check `etc/MACHINES' to make sure its descriptions
- of known problems in that configuration should be updated. */
diff --git a/src/m/vax.h b/src/m/vax.h
deleted file mode 100644
index e4bed4090b9..00000000000
--- a/src/m/vax.h
+++ /dev/null
@@ -1,23 +0,0 @@
-/* machine description file for vax.
-
-Copyright (C) 1985-1986, 2001-2012 Free Software Foundation, Inc.
-
-This file is part of GNU Emacs.
-
-GNU Emacs 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, either version 3 of the License, or
-(at your option) any later version.
-
-GNU Emacs 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 GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
-
-
-/* #define vax -- appears to be done automatically */
-
-#define HAVE_FTIME
diff --git a/src/makefile.w32-in b/src/makefile.w32-in
index 303445bc2d6..99b1241eab0 100644
--- a/src/makefile.w32-in
+++ b/src/makefile.w32-in
@@ -343,7 +343,7 @@ cleanall: clean
##
## This works only with GNU Make.
-TAGS: $(OBJ0) $(OBJ1) $(OBJ2) $(CURDIR)/m/intel386.h $(CURDIR)/s/ms-w32.h
+TAGS: $(OBJ0) $(OBJ1) $(OBJ2) $(CURDIR)/s/ms-w32.h
$(MAKE) $(MFLAGS) TAGS-$(MAKETYPE)
TAGS-LISP: $(OBJ0) $(OBJ1) $(OBJ2)
@@ -357,7 +357,7 @@ TAGS-gmake:
$(OBJ1_c)
../lib-src/$(BLD)/etags.exe -a --regex=@../nt/emacs-src.tags \
$(OBJ2_c) \
- $(CURDIR)/*.h $(CURDIR)/m/intel386.h $(CURDIR)/s/ms-w32.h
+ $(CURDIR)/*.h $(CURDIR)/s/ms-w32.h
TAGS-nmake:
echo This target is not supported with NMake
@@ -407,7 +407,6 @@ CODING_H = $(SRC)/coding.h \
MS_W32_H = $(SRC)/s/ms-w32.h \
$(NT_INC)/sys/stat.h
CONFIG_H = $(SRC)/config.h \
- $(SRC)/m/intel386.h \
$(MS_W32_H)
DIR_H = $(NT_INC)/sys/dir.h \
$(SRC)/ndir.h
@@ -930,7 +929,7 @@ $(BLD)/fringe.$(O) : \
$(BLD)/gmalloc.$(O) : \
$(SRC)/gmalloc.c \
- $(SRC)/getpagesize.h \
+ $(NT_INC)/stdint.h \
$(NT_INC)/unistd.h \
$(CONFIG_H)
@@ -1514,6 +1513,7 @@ $(BLD)/w32menu.$(O) : \
$(SRC)/w32menu.c \
$(SRC)/buffer.h \
$(SRC)/keymap.h \
+ $(SRC)/w32heap.h \
$(BLOCKINPUT_H) \
$(CHARSET_H) \
$(CODING_H) \
diff --git a/src/mem-limits.h b/src/mem-limits.h
index 244592a9768..1fd53b472f3 100644
--- a/src/mem-limits.h
+++ b/src/mem-limits.h
@@ -34,7 +34,7 @@ extern int etext;
#endif
extern char *start_of_data (void);
-#if defined USE_LSB_TAG || UINTPTR_MAX >> VALBITS == 0
+#if defined USE_LSB_TAG || UINTPTR_MAX <= VAL_MAX
#define EXCEEDS_LISP_PTR(ptr) 0
#elif defined DATA_SEG_BITS
#define EXCEEDS_LISP_PTR(ptr) \
diff --git a/src/ns.mk b/src/ns.mk
index d3b5afeb99e..77fbf5845d9 100644
--- a/src/ns.mk
+++ b/src/ns.mk
@@ -1,6 +1,6 @@
### autodeps.mk --- src/Makefile fragment for GNU Emacs
-## Copyright (C) 2008-2012 Free Software Foundation, Inc.
+## Copyright (C) 2008-2012 Free Software Foundation, Inc.
## This file is part of GNU Emacs.
@@ -27,13 +27,13 @@
${ns_appdir}: ${ns_appsrc}
rm -fr ${ns_appdir}
- mkdir -p ${ns_appdir}
+ ${MKDIR_P} ${ns_appdir}
( cd ${ns_appsrc} ; tar cfh - . ) | ( cd ${ns_appdir} ; umask 022; tar xf - )
-${ns_appbindir}Emacs: emacs${EXEEXT}
- mkdir -p ${ns_appbindir}
- cp -f emacs${EXEEXT} ${ns_appbindir}Emacs
+${ns_appbindir}/Emacs: emacs${EXEEXT}
+ ${MKDIR_P} ${ns_appbindir}
+ cp -f emacs${EXEEXT} ${ns_appbindir}/Emacs
-ns-app: ${ns_appdir} ${ns_appbindir}Emacs
+ns-app: ${ns_appdir} ${ns_appbindir}/Emacs
### ns.mk ends here
diff --git a/src/nsterm.m b/src/nsterm.m
index 7cbaf991311..4b8b2bb4820 100644
--- a/src/nsterm.m
+++ b/src/nsterm.m
@@ -338,11 +338,18 @@ ns_init_paths (void)
/*NSLog (@"loadPath: '%@'\n", resourcePaths); */
}
+ /* Normally, Emacs does not add its own bin/ directory to the PATH.
+ However, a self-contained NS build has a different layout, with
+ bin/ and libexec/ subdirectories in the directory that contains
+ Emacs.app itself.
+ We put libexec first, because init_callproc_1 uses the first
+ element to initialize exec-directory. An alternative would be
+ for init_callproc to check for invocation-directory/libexec. */
if (!getenv ("EMACSPATH"))
{
NSArray *paths = [binDir stringsByAppendingPaths:
- [NSArray arrayWithObjects: @"bin",
- @"lib-exec", nil]];
+ [NSArray arrayWithObjects: @"libexec",
+ @"bin", nil]];
NSEnumerator *pathEnum = [paths objectEnumerator];
resourcePaths = @"";
while (resourcePath = [pathEnum nextObject])
diff --git a/src/print.c b/src/print.c
index bfe3287b92c..2912396bd33 100644
--- a/src/print.c
+++ b/src/print.c
@@ -854,7 +854,6 @@ print_error_message (Lisp_Object data, Lisp_Object stream, const char *context,
{
Lisp_Object errname, errmsg, file_error, tail;
struct gcpro gcpro1;
- int i;
if (context != 0)
write_string_1 (context, -1, stream);
@@ -885,9 +884,8 @@ print_error_message (Lisp_Object data, Lisp_Object stream, const char *context,
}
else
{
- Lisp_Object error_conditions;
+ Lisp_Object error_conditions = Fget (errname, Qerror_conditions);
errmsg = Fget (errname, Qerror_message);
- error_conditions = Fget (errname, Qerror_conditions);
file_error = Fmemq (Qfile_error, error_conditions);
}
@@ -901,22 +899,30 @@ print_error_message (Lisp_Object data, Lisp_Object stream, const char *context,
if (!NILP (file_error) && CONSP (tail))
errmsg = XCAR (tail), tail = XCDR (tail);
- if (STRINGP (errmsg))
- Fprinc (errmsg, stream);
- else
- write_string_1 ("peculiar error", -1, stream);
+ {
+ const char *sep = ": ";
- for (i = 0; CONSP (tail); tail = XCDR (tail), i = 1)
- {
- Lisp_Object obj;
+ if (!STRINGP (errmsg))
+ write_string_1 ("peculiar error", -1, stream);
+ else if (SCHARS (errmsg))
+ Fprinc (errmsg, stream);
+ else
+ sep = NULL;
- write_string_1 (i ? ", " : ": ", 2, stream);
- obj = XCAR (tail);
- if (!NILP (file_error) || EQ (errname, Qend_of_file))
- Fprinc (obj, stream);
- else
- Fprin1 (obj, stream);
- }
+ for (; CONSP (tail); tail = XCDR (tail), sep = ", ")
+ {
+ Lisp_Object obj;
+
+ if (sep)
+ write_string_1 (sep, 2, stream);
+ obj = XCAR (tail);
+ if (!NILP (file_error)
+ || EQ (errname, Qend_of_file) || EQ (errname, Quser_error))
+ Fprinc (obj, stream);
+ else
+ Fprin1 (obj, stream);
+ }
+ }
UNGCPRO;
}
diff --git a/src/puresize.h b/src/puresize.h
index bca36b2a562..bee82d1e783 100644
--- a/src/puresize.h
+++ b/src/puresize.h
@@ -45,7 +45,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
/* Increase BASE_PURESIZE by a ratio depending on the machine's word size. */
#ifndef PURESIZE_RATIO
-#if BITS_PER_EMACS_INT > 32
+#if EMACS_INT_MAX >> 31 != 0
#if PTRDIFF_MAX >> 31 != 0
#define PURESIZE_RATIO 10/6 /* Don't surround with `()'. */
#else
diff --git a/src/ralloc.c b/src/ralloc.c
index 4bb2f240438..d736e279520 100644
--- a/src/ralloc.c
+++ b/src/ralloc.c
@@ -31,9 +31,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#include <unistd.h>
-typedef POINTER_TYPE *POINTER;
-typedef size_t SIZE;
-
#ifdef DOUG_LEA_MALLOC
#define M_TOP_PAD -2
extern int mallopt (int, int);
@@ -47,9 +44,6 @@ extern size_t __malloc_extra_blocks;
#include <stddef.h>
-typedef size_t SIZE;
-typedef void *POINTER;
-
#include <unistd.h>
#include <malloc.h>
@@ -58,6 +52,8 @@ typedef void *POINTER;
#include "getpagesize.h"
+typedef size_t SIZE;
+typedef void *POINTER;
#define NIL ((POINTER) 0)
/* A flag to indicate whether we have initialized ralloc yet. For
diff --git a/src/regex.c b/src/regex.c
index d16a5148054..f9a12a3c2dc 100644
--- a/src/regex.c
+++ b/src/regex.c
@@ -434,17 +434,7 @@ init_syntax_once (void)
#endif /* not emacs */
-/* We remove any previous definition of `SIGN_EXTEND_CHAR',
- since ours (we hope) works properly with all combinations of
- machines, compilers, `char' and `unsigned char' argument types.
- (Per Bothner suggested the basic approach.) */
-#undef SIGN_EXTEND_CHAR
-#if __STDC__
-# define SIGN_EXTEND_CHAR(c) ((signed char) (c))
-#else /* not __STDC__ */
-/* As in Harbison and Steele. */
-# define SIGN_EXTEND_CHAR(c) ((((unsigned char) (c)) ^ 128) - 128)
-#endif
+#define SIGN_EXTEND_CHAR(c) ((signed char) (c))
/* Should we use malloc or alloca? If REGEX_MALLOC is not defined, we
use `alloca' instead of `malloc'. This is because using malloc in
@@ -553,12 +543,12 @@ typedef char boolean;
#define false 0
#define true 1
-static regoff_t re_match_2_internal _RE_ARGS ((struct re_pattern_buffer *bufp,
- re_char *string1, size_t size1,
- re_char *string2, size_t size2,
- ssize_t pos,
- struct re_registers *regs,
- ssize_t stop));
+static regoff_t re_match_2_internal (struct re_pattern_buffer *bufp,
+ re_char *string1, size_t size1,
+ re_char *string2, size_t size2,
+ ssize_t pos,
+ struct re_registers *regs,
+ ssize_t stop);
/* These are the command codes that appear in compiled regular
expressions. Some opcodes are followed by argument bytes. A
@@ -735,11 +725,8 @@ typedef enum
} while (0)
#ifdef DEBUG
-static void extract_number _RE_ARGS ((int *dest, re_char *source));
static void
-extract_number (dest, source)
- int *dest;
- re_char *source;
+extract_number (int *dest, re_char *source)
{
int temp = SIGN_EXTEND_CHAR (*(source + 1));
*dest = *source & 0377;
@@ -763,12 +750,8 @@ extract_number (dest, source)
} while (0)
#ifdef DEBUG
-static void extract_number_and_incr _RE_ARGS ((int *destination,
- re_char **source));
static void
-extract_number_and_incr (destination, source)
- int *destination;
- re_char **source;
+extract_number_and_incr (int *destination, re_char **source)
{
extract_number (destination, *source);
*source += 2;
@@ -1672,25 +1655,22 @@ do { \
/* Subroutine declarations and macros for regex_compile. */
-static reg_errcode_t regex_compile _RE_ARGS ((re_char *pattern, size_t size,
- reg_syntax_t syntax,
- struct re_pattern_buffer *bufp));
-static void store_op1 _RE_ARGS ((re_opcode_t op, unsigned char *loc, int arg));
-static void store_op2 _RE_ARGS ((re_opcode_t op, unsigned char *loc,
- int arg1, int arg2));
-static void insert_op1 _RE_ARGS ((re_opcode_t op, unsigned char *loc,
- int arg, unsigned char *end));
-static void insert_op2 _RE_ARGS ((re_opcode_t op, unsigned char *loc,
- int arg1, int arg2, unsigned char *end));
-static boolean at_begline_loc_p _RE_ARGS ((re_char *pattern,
- re_char *p,
- reg_syntax_t syntax));
-static boolean at_endline_loc_p _RE_ARGS ((re_char *p,
- re_char *pend,
- reg_syntax_t syntax));
-static re_char *skip_one_char _RE_ARGS ((re_char *p));
-static int analyse_first _RE_ARGS ((re_char *p, re_char *pend,
- char *fastmap, const int multibyte));
+static reg_errcode_t regex_compile (re_char *pattern, size_t size,
+ reg_syntax_t syntax,
+ struct re_pattern_buffer *bufp);
+static void store_op1 (re_opcode_t op, unsigned char *loc, int arg);
+static void store_op2 (re_opcode_t op, unsigned char *loc, int arg1, int arg2);
+static void insert_op1 (re_opcode_t op, unsigned char *loc,
+ int arg, unsigned char *end);
+static void insert_op2 (re_opcode_t op, unsigned char *loc,
+ int arg1, int arg2, unsigned char *end);
+static boolean at_begline_loc_p (re_char *pattern, re_char *p,
+ reg_syntax_t syntax);
+static boolean at_endline_loc_p (re_char *p, re_char *pend,
+ reg_syntax_t syntax);
+static re_char *skip_one_char (re_char *p);
+static int analyse_first (re_char *p, re_char *pend,
+ char *fastmap, const int multibyte);
/* Fetch the next character in the uncompiled pattern, with no
translation. */
@@ -2442,9 +2422,8 @@ regex_grow_registers (int num_regs)
#endif /* not MATCH_MAY_ALLOCATE */
-static boolean group_in_compile_stack _RE_ARGS ((compile_stack_type
- compile_stack,
- regnum_t regnum));
+static boolean group_in_compile_stack (compile_stack_type compile_stack,
+ regnum_t regnum);
/* `regex_compile' compiles PATTERN (of length SIZE) according to SYNTAX.
Returns one of error codes defined in `regex.h', or zero for success.
@@ -4554,10 +4533,10 @@ WEAK_ALIAS (__re_search_2, re_search_2)
/* Declarations and macros for re_match_2. */
-static int bcmp_translate _RE_ARGS ((re_char *s1, re_char *s2,
- register ssize_t len,
- RE_TRANSLATE_TYPE translate,
- const int multibyte));
+static int bcmp_translate (re_char *s1, re_char *s2,
+ register ssize_t len,
+ RE_TRANSLATE_TYPE translate,
+ const int multibyte);
/* This converts PTR, a pointer into one of the search strings `string1'
and `string2' into an offset from the beginning of that string. */
diff --git a/src/regex.h b/src/regex.h
index 643d0b7b5ab..e0ede012b20 100644
--- a/src/regex.h
+++ b/src/regex.h
@@ -451,38 +451,21 @@ typedef struct
/* Declarations for routines. */
-/* To avoid duplicating every routine declaration -- once with a
- prototype (if we are ANSI), and once without (if we aren't) -- we
- use the following macro to declare argument types. This
- unfortunately clutters up the declarations a bit, but I think it's
- worth it. */
-
-#if defined __STDC__ || defined PROTOTYPES
-
-# define _RE_ARGS(args) args
-
-#else /* not __STDC__ || PROTOTYPES */
-
-# define _RE_ARGS(args) ()
-
-#endif /* not __STDC__ || PROTOTYPES */
-
/* Sets the current default syntax to SYNTAX, and return the old syntax.
You can also simply assign to the `re_syntax_options' variable. */
-extern reg_syntax_t re_set_syntax _RE_ARGS ((reg_syntax_t syntax));
+extern reg_syntax_t re_set_syntax (reg_syntax_t __syntax);
/* Compile the regular expression PATTERN, with length LENGTH
and syntax given by the global `re_syntax_options', into the buffer
BUFFER. Return NULL if successful, and an error string if not. */
-extern const char *re_compile_pattern
- _RE_ARGS ((const char *pattern, size_t length,
- struct re_pattern_buffer *buffer));
+extern const char *re_compile_pattern (const char *__pattern, size_t __length,
+ struct re_pattern_buffer *__buffer);
/* Compile a fastmap for the compiled pattern in BUFFER; used to
accelerate searches. Return 0 if successful and -2 if was an
internal error. */
-extern int re_compile_fastmap _RE_ARGS ((struct re_pattern_buffer *buffer));
+extern int re_compile_fastmap (struct re_pattern_buffer *__buffer);
/* Search in the string STRING (with length LENGTH) for the pattern
@@ -490,33 +473,35 @@ extern int re_compile_fastmap _RE_ARGS ((struct re_pattern_buffer *buffer));
characters. Return the starting position of the match, -1 for no
match, or -2 for an internal error. Also return register
information in REGS (if REGS and BUFFER->no_sub are nonzero). */
-extern regoff_t re_search
- _RE_ARGS ((struct re_pattern_buffer *buffer, const char *string,
- size_t length, ssize_t start, ssize_t range,
- struct re_registers *regs));
+extern regoff_t re_search (struct re_pattern_buffer *__buffer,
+ const char *__string, size_t __length,
+ ssize_t __start, ssize_t __range,
+ struct re_registers *__regs);
/* Like `re_search', but search in the concatenation of STRING1 and
STRING2. Also, stop searching at index START + STOP. */
-extern regoff_t re_search_2
- _RE_ARGS ((struct re_pattern_buffer *buffer, const char *string1,
- size_t length1, const char *string2, size_t length2,
- ssize_t start, ssize_t range, struct re_registers *regs,
- ssize_t stop));
+extern regoff_t re_search_2 (struct re_pattern_buffer *__buffer,
+ const char *__string1, size_t __length1,
+ const char *__string2, size_t __length2,
+ ssize_t __start, ssize_t __range,
+ struct re_registers *__regs,
+ ssize_t __stop);
/* Like `re_search', but return how many characters in STRING the regexp
in BUFFER matched, starting at position START. */
-extern regoff_t re_match
- _RE_ARGS ((struct re_pattern_buffer *buffer, const char *string,
- size_t length, ssize_t start, struct re_registers *regs));
+extern regoff_t re_match (struct re_pattern_buffer *__buffer,
+ const char *__string, size_t __length,
+ ssize_t __start, struct re_registers *__regs);
/* Relates to `re_match' as `re_search_2' relates to `re_search'. */
-extern regoff_t re_match_2
- _RE_ARGS ((struct re_pattern_buffer *buffer, const char *string1,
- size_t length1, const char *string2, size_t length2,
- ssize_t start, struct re_registers *regs, ssize_t stop));
+extern regoff_t re_match_2 (struct re_pattern_buffer *__buffer,
+ const char *__string1, size_t __length1,
+ const char *__string2, size_t __length2,
+ ssize_t __start, struct re_registers *__regs,
+ ssize_t __stop);
/* Set REGS to hold NUM_REGS registers, storing them in STARTS and
@@ -531,15 +516,16 @@ extern regoff_t re_match_2
Unless this function is called, the first search or match using
PATTERN_BUFFER will allocate its own register data, without
freeing the old data. */
-extern void re_set_registers
- _RE_ARGS ((struct re_pattern_buffer *buffer, struct re_registers *regs,
- unsigned num_regs, regoff_t *starts, regoff_t *ends));
+extern void re_set_registers (struct re_pattern_buffer *__buffer,
+ struct re_registers *__regs,
+ unsigned __num_regs,
+ regoff_t *__starts, regoff_t *__ends);
#if defined _REGEX_RE_COMP || defined _LIBC
# ifndef _CRAY
/* 4.2 bsd compatibility. */
-extern char *re_comp _RE_ARGS ((const char *));
-extern int re_exec _RE_ARGS ((const char *));
+extern char *re_comp (const char *);
+extern int re_exec (const char *);
# endif
#endif
@@ -562,20 +548,19 @@ extern int re_exec _RE_ARGS ((const char *));
#endif
/* POSIX compatibility. */
-extern reg_errcode_t regcomp _RE_ARGS ((regex_t *__restrict __preg,
- const char *__restrict __pattern,
- int __cflags));
+extern reg_errcode_t regcomp (regex_t *__restrict __preg,
+ const char *__restrict __pattern,
+ int __cflags);
-extern reg_errcode_t regexec _RE_ARGS ((const regex_t *__restrict __preg,
- const char *__restrict __string,
- size_t __nmatch,
- regmatch_t __pmatch[__restrict_arr],
- int __eflags));
+extern reg_errcode_t regexec (const regex_t *__restrict __preg,
+ const char *__restrict __string, size_t __nmatch,
+ regmatch_t __pmatch[__restrict_arr],
+ int __eflags);
-extern size_t regerror _RE_ARGS ((int __errcode, const regex_t *__preg,
- char *__errbuf, size_t __errbuf_size));
+extern size_t regerror (int __errcode, const regex_t * __preg,
+ char *__errbuf, size_t __errbuf_size);
-extern void regfree _RE_ARGS ((regex_t *__preg));
+extern void regfree (regex_t *__preg);
#ifdef __cplusplus
diff --git a/src/s/aix4-2.h b/src/s/aix4-2.h
index 354ffda0988..cacfdc7ed63 100644
--- a/src/s/aix4-2.h
+++ b/src/s/aix4-2.h
@@ -76,6 +76,17 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
to avoid a crash just use the Emacs implementation for that function. */
#define BROKEN_GET_CURRENT_DIR_NAME 1
+/*** BUILD 9008 - FIONREAD problem still exists in X-Windows. ***/
+#define BROKEN_FIONREAD
+/* As we define BROKEN_FIONREAD, SIGIO will be undefined in systty.h.
+ But, on AIX, SIGAIO, SIGPTY, and SIGPOLL are defined as SIGIO,
+ which causes compilation error at init_signals in sysdep.c. So, we
+ define these macros so that syssignal.h detects them and undefine
+ SIGAIO, SIGPTY and SIGPOLL. */
+#define BROKEN_SIGAIO
+#define BROKEN_SIGPTY
+#define BROKEN_SIGPOLL
+
/* Conservative garbage collection has not been tested, so for now
play it safe and stick with the old-fashioned way of marking. */
#define GC_MARK_STACK GC_USE_GCPROS_AS_BEFORE
diff --git a/src/s/gnu-linux.h b/src/s/gnu-linux.h
index d04ea33068a..409d0205520 100644
--- a/src/s/gnu-linux.h
+++ b/src/s/gnu-linux.h
@@ -157,3 +157,9 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#else
#define GC_MARK_STACK GC_USE_GCPROS_AS_BEFORE
#endif
+
+#ifdef __i386__
+/* libc-linux/sysdeps/linux/i386/ulimit.c says that due to shared library, */
+/* we cannot get the maximum address for brk */
+# define ULIMIT_BREAK_VALUE (32*1024*1024)
+#endif
diff --git a/src/s/gnu.h b/src/s/gnu.h
index a09e0e824c9..cd72164a520 100644
--- a/src/s/gnu.h
+++ b/src/s/gnu.h
@@ -24,8 +24,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#undef SYSTEM_TYPE
#define SYSTEM_TYPE "gnu"
-#undef NLIST_STRUCT
-
#define SIGNALS_VIA_CHARACTERS
/* libc defines data_start. */
diff --git a/src/s/irix6-5.h b/src/s/irix6-5.h
index e5d90c1bd5d..e5479c3b8d3 100644
--- a/src/s/irix6-5.h
+++ b/src/s/irix6-5.h
@@ -85,10 +85,6 @@ char *_getpty();
#define NARROWPROTO 1
-#if _MIPS_SZLONG == 64 /* -mabi=64 (gcc) or -64 (MIPSpro) */
-#define _LP64 /* lisp.h takes care of the rest */
-#endif /* _MIPS_SZLONG */
-
#undef SA_RESTART
#undef TIOCSIGSEND /* defined in usg5-4-common.h */
diff --git a/src/s/ms-w32.h b/src/s/ms-w32.h
index e89ecb05931..f88128b27aa 100644
--- a/src/s/ms-w32.h
+++ b/src/s/ms-w32.h
@@ -122,7 +122,6 @@ struct sigaction {
#define HAVE_GETTIMEOFDAY 1
#define HAVE_GETHOSTNAME 1
-#undef HAVE_GETDOMAINNAME
#define HAVE_DUP2 1
#define HAVE_RENAME 1
#define HAVE_CLOSEDIR 1
@@ -147,7 +146,6 @@ struct sigaction {
#define HAVE_FMOD 1
#undef HAVE_RINT
#undef HAVE_CBRT
-#define HAVE_FTIME 1
#undef HAVE_RES_INIT /* For -lresolv on Suns. */
#undef HAVE_SETSID
#undef HAVE_FPATHCONF
@@ -383,6 +381,8 @@ extern int getloadavg (double *, int);
/* We need a little extra space, see ../../lisp/loadup.el. */
#define SYSTEM_PURESIZE_EXTRA 50000
+#define DATA_START get_data_start ()
+
/* For unexec to work on Alpha systems, we need to put Emacs'
initialized data into a separate section from the CRT initialized
data (because the Alpha linker freely reorders data variables, even
diff --git a/src/search.c b/src/search.c
index 503720b70ab..a9542a2ed97 100644
--- a/src/search.c
+++ b/src/search.c
@@ -2079,112 +2079,6 @@ set_search_regs (ptrdiff_t beg_byte, ptrdiff_t nbytes)
XSETBUFFER (last_thing_searched, current_buffer);
}
-DEFUN ("word-search-regexp", Fword_search_regexp, Sword_search_regexp, 1, 2, 0,
- doc: /* Return a regexp which matches words, ignoring punctuation.
-Given STRING, a string of words separated by word delimiters,
-compute a regexp that matches those exact words separated by
-arbitrary punctuation. If LAX is non-nil, the end of the string
-need not match a word boundary unless it ends in whitespace.
-
-Used in `word-search-forward', `word-search-backward',
-`word-search-forward-lax', `word-search-backward-lax'. */)
- (Lisp_Object string, Lisp_Object lax)
-{
- register unsigned char *o;
- register ptrdiff_t i, i_byte, len, punct_count = 0, word_count = 0;
- Lisp_Object val;
- int prev_c = 0;
- EMACS_INT adjust;
- int whitespace_at_end;
-
- CHECK_STRING (string);
- len = SCHARS (string);
-
- for (i = 0, i_byte = 0; i < len; )
- {
- int c;
-
- FETCH_STRING_CHAR_AS_MULTIBYTE_ADVANCE (c, string, i, i_byte);
-
- if (SYNTAX (c) != Sword)
- {
- punct_count++;
- if (SYNTAX (prev_c) == Sword)
- word_count++;
- }
-
- prev_c = c;
- }
-
- if (SYNTAX (prev_c) == Sword)
- {
- word_count++;
- whitespace_at_end = 0;
- }
- else
- {
- whitespace_at_end = 1;
- if (!word_count)
- return empty_unibyte_string;
- }
-
- adjust = word_count - 1;
- if (TYPE_MAXIMUM (EMACS_INT) / 5 < adjust)
- memory_full (SIZE_MAX);
- adjust = - punct_count + 5 * adjust
- + ((!NILP (lax) && !whitespace_at_end) ? 2 : 4);
- if (STRING_MULTIBYTE (string))
- {
- if (INT_ADD_OVERFLOW (SBYTES (string), adjust))
- memory_full (SIZE_MAX);
- val = make_uninit_multibyte_string (len + adjust,
- SBYTES (string) + adjust);
- }
- else
- {
- if (INT_ADD_OVERFLOW (len, adjust))
- memory_full (SIZE_MAX);
- val = make_uninit_string (len + adjust);
- }
-
- o = SDATA (val);
- *o++ = '\\';
- *o++ = 'b';
- prev_c = 0;
-
- for (i = 0, i_byte = 0; i < len; )
- {
- int c;
- ptrdiff_t i_byte_orig = i_byte;
-
- FETCH_STRING_CHAR_AS_MULTIBYTE_ADVANCE (c, string, i, i_byte);
-
- if (SYNTAX (c) == Sword)
- {
- memcpy (o, SDATA (string) + i_byte_orig, i_byte - i_byte_orig);
- o += i_byte - i_byte_orig;
- }
- else if (SYNTAX (prev_c) == Sword && --word_count)
- {
- *o++ = '\\';
- *o++ = 'W';
- *o++ = '\\';
- *o++ = 'W';
- *o++ = '*';
- }
-
- prev_c = c;
- }
-
- if (NILP (lax) || whitespace_at_end)
- {
- *o++ = '\\';
- *o++ = 'b';
- }
-
- return val;
-}
-
DEFUN ("search-backward", Fsearch_backward, Ssearch_backward, 1, 4,
"MSearch backward: ",
doc: /* Search backward from point for STRING.
@@ -2227,86 +2121,6 @@ See also the functions `match-beginning', `match-end' and `replace-match'. */)
return search_command (string, bound, noerror, count, 1, 0, 0);
}
-DEFUN ("word-search-backward", Fword_search_backward, Sword_search_backward, 1, 4,
- "sWord search backward: ",
- doc: /* Search backward from point for STRING, ignoring differences in punctuation.
-Set point to the beginning of the occurrence found, and return point.
-An optional second argument bounds the search; it is a buffer position.
-The match found must not extend before that position.
-Optional third argument, if t, means if fail just return nil (no error).
- If not nil and not t, move to limit of search and return nil.
-Optional fourth argument is repeat count--search for successive occurrences.
-
-Relies on the function `word-search-regexp' to convert a sequence
-of words in STRING to a regexp used to search words without regard
-to punctuation. */)
- (Lisp_Object string, Lisp_Object bound, Lisp_Object noerror, Lisp_Object count)
-{
- return search_command (Fword_search_regexp (string, Qnil), bound, noerror, count, -1, 1, 0);
-}
-
-DEFUN ("word-search-forward", Fword_search_forward, Sword_search_forward, 1, 4,
- "sWord search: ",
- doc: /* Search forward from point for STRING, ignoring differences in punctuation.
-Set point to the end of the occurrence found, and return point.
-An optional second argument bounds the search; it is a buffer position.
-The match found must not extend after that position.
-Optional third argument, if t, means if fail just return nil (no error).
- If not nil and not t, move to limit of search and return nil.
-Optional fourth argument is repeat count--search for successive occurrences.
-
-Relies on the function `word-search-regexp' to convert a sequence
-of words in STRING to a regexp used to search words without regard
-to punctuation. */)
- (Lisp_Object string, Lisp_Object bound, Lisp_Object noerror, Lisp_Object count)
-{
- return search_command (Fword_search_regexp (string, Qnil), bound, noerror, count, 1, 1, 0);
-}
-
-DEFUN ("word-search-backward-lax", Fword_search_backward_lax, Sword_search_backward_lax, 1, 4,
- "sWord search backward: ",
- doc: /* Search backward from point for STRING, ignoring differences in punctuation.
-Set point to the beginning of the occurrence found, and return point.
-
-Unlike `word-search-backward', the end of STRING need not match a word
-boundary, unless STRING ends in whitespace.
-
-An optional second argument bounds the search; it is a buffer position.
-The match found must not extend before that position.
-Optional third argument, if t, means if fail just return nil (no error).
- If not nil and not t, move to limit of search and return nil.
-Optional fourth argument is repeat count--search for successive occurrences.
-
-Relies on the function `word-search-regexp' to convert a sequence
-of words in STRING to a regexp used to search words without regard
-to punctuation. */)
- (Lisp_Object string, Lisp_Object bound, Lisp_Object noerror, Lisp_Object count)
-{
- return search_command (Fword_search_regexp (string, Qt), bound, noerror, count, -1, 1, 0);
-}
-
-DEFUN ("word-search-forward-lax", Fword_search_forward_lax, Sword_search_forward_lax, 1, 4,
- "sWord search: ",
- doc: /* Search forward from point for STRING, ignoring differences in punctuation.
-Set point to the end of the occurrence found, and return point.
-
-Unlike `word-search-forward', the end of STRING need not match a word
-boundary, unless STRING ends in whitespace.
-
-An optional second argument bounds the search; it is a buffer position.
-The match found must not extend after that position.
-Optional third argument, if t, means if fail just return nil (no error).
- If not nil and not t, move to limit of search and return nil.
-Optional fourth argument is repeat count--search for successive occurrences.
-
-Relies on the function `word-search-regexp' to convert a sequence
-of words in STRING to a regexp used to search words without regard
-to punctuation. */)
- (Lisp_Object string, Lisp_Object bound, Lisp_Object noerror, Lisp_Object count)
-{
- return search_command (Fword_search_regexp (string, Qt), bound, noerror, count, 1, 1, 0);
-}
-
DEFUN ("re-search-backward", Fre_search_backward, Sre_search_backward, 1, 4,
"sRE search backward: ",
doc: /* Search backward from point for match for regular expression REGEXP.
@@ -3277,11 +3091,6 @@ is to bind it with `let' around a small expression. */);
defsubr (&Sposix_string_match);
defsubr (&Ssearch_forward);
defsubr (&Ssearch_backward);
- defsubr (&Sword_search_regexp);
- defsubr (&Sword_search_forward);
- defsubr (&Sword_search_backward);
- defsubr (&Sword_search_forward_lax);
- defsubr (&Sword_search_backward_lax);
defsubr (&Sre_search_forward);
defsubr (&Sre_search_backward);
defsubr (&Sposix_search_forward);
diff --git a/src/sound.c b/src/sound.c
index bd34628767b..143653e48e4 100644
--- a/src/sound.c
+++ b/src/sound.c
@@ -124,9 +124,6 @@ static int parse_sound (Lisp_Object, Lisp_Object *);
#ifndef DEFAULT_SOUND_DEVICE
#define DEFAULT_SOUND_DEVICE "/dev/dsp"
#endif
-#ifndef DEFAULT_ALSA_SOUND_DEVICE
-#define DEFAULT_ALSA_SOUND_DEVICE "default"
-#endif
/* Structure forward declarations. */
@@ -908,6 +905,10 @@ vox_write (struct sound_device *sd, const char *buffer, ptrdiff_t nbytes)
/* This driver is available on GNU/Linux. */
+#ifndef DEFAULT_ALSA_SOUND_DEVICE
+#define DEFAULT_ALSA_SOUND_DEVICE "default"
+#endif
+
static void
alsa_sound_perror (const char *msg, int err)
{
diff --git a/src/sysdep.c b/src/sysdep.c
index 9d09d1d2c67..a82f802a785 100644
--- a/src/sysdep.c
+++ b/src/sysdep.c
@@ -52,9 +52,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#define read sys_read
#define write sys_write
#include <windows.h>
-#ifndef NULL
-#define NULL 0
-#endif
#endif /* not WINDOWSNT */
#include <sys/types.h>
diff --git a/src/syssignal.h b/src/syssignal.h
index 86135d71215..a2522f24429 100644
--- a/src/syssignal.h
+++ b/src/syssignal.h
@@ -1,5 +1,6 @@
/* syssignal.h - System-dependent definitions for signals.
- Copyright (C) 1993, 1999, 2001-2012 Free Software Foundation, Inc.
+
+Copyright (C) 1993, 1999, 2001-2012 Free Software Foundation, Inc.
This file is part of GNU Emacs.
@@ -82,24 +83,18 @@ void croak (char *) NO_RETURN;
#define sigfree() sigsetmask (SIGEMPTYMASK)
-#if defined (SIGINFO) && defined (BROKEN_SIGINFO)
-#undef SIGINFO
-#endif
#if defined (SIGIO) && defined (BROKEN_SIGIO)
# undef SIGIO
#endif
+/* Last user: m/ibmrs6000.h */
#if defined (SIGPOLL) && defined (BROKEN_SIGPOLL)
#undef SIGPOLL
#endif
-#if defined (SIGTSTP) && defined (BROKEN_SIGTSTP)
-#undef SIGTSTP
-#endif
-#if defined (SIGURG) && defined (BROKEN_SIGURG)
-#undef SIGURG
-#endif
+/* Last user: m/ibmrs6000.h */
#if defined (SIGAIO) && defined (BROKEN_SIGAIO)
#undef SIGAIO
#endif
+/* Last user: m/ibmrs6000.h */
#if defined (SIGPTY) && defined (BROKEN_SIGPTY)
#undef SIGPTY
#endif
diff --git a/src/term.c b/src/term.c
index 09888bc6dda..3d7a677374c 100644
--- a/src/term.c
+++ b/src/term.c
@@ -3599,7 +3599,7 @@ delete_tty (struct terminal *terminal)
/* Mark the pointers in the tty_display_info objects.
- Called by the Fgarbage_collector. */
+ Called by Fgarbage_collect. */
void
mark_ttys (void)
diff --git a/src/termcap.c b/src/termcap.c
index 10c195eebe2..61f9d9a31ea 100644
--- a/src/termcap.c
+++ b/src/termcap.c
@@ -30,10 +30,6 @@ Boston, MA 02110-1301, USA. */
#include "msdos.h"
#endif
-#ifndef NULL
-#define NULL (char *) 0
-#endif
-
/* BUFSIZE is the initial size allocated for the buffer
for reading the termcap file.
It is not a limit.
@@ -661,10 +657,6 @@ gobble_line (int fd, register struct termcap_buffer *bufp, char *append_end)
#ifdef TEST
-#ifdef NULL
-#undef NULL
-#endif
-
#include <stdio.h>
static void
diff --git a/src/textprop.c b/src/textprop.c
index f9339c66893..83d07c56f28 100644
--- a/src/textprop.c
+++ b/src/textprop.c
@@ -23,10 +23,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#include "buffer.h"
#include "window.h"
-#ifndef NULL
-#define NULL (void *)0
-#endif
-
/* Test for membership, allowing for t (actually any non-cons) to mean the
universal set. */
diff --git a/src/tparam.c b/src/tparam.c
index ac21667d65b..4d26ef524fb 100644
--- a/src/tparam.c
+++ b/src/tparam.c
@@ -22,10 +22,6 @@ Boston, MA 02110-1301, USA. */
#include <setjmp.h>
#include "lisp.h" /* for xmalloc */
#include "tparam.h"
-
-#ifndef NULL
-#define NULL (char *) 0
-#endif
/* Assuming STRING is the value of a termcap string entry
containing `%' constructs to expand parameters,
diff --git a/src/undo.c b/src/undo.c
index 929955ffcf5..9b763984d7f 100644
--- a/src/undo.c
+++ b/src/undo.c
@@ -436,6 +436,13 @@ truncate_undo_list (struct buffer *b)
unbind_to (count, Qnil);
}
+
+static void user_error (const char*) NO_RETURN;
+static void user_error (const char *msg)
+{
+ xsignal1 (Quser_error, build_string (msg));
+}
+
DEFUN ("primitive-undo", Fprimitive_undo, Sprimitive_undo, 2, 2, 0,
doc: /* Undo N records from the front of the list LIST.
@@ -528,7 +535,7 @@ Return what remains of the list. */)
end = Fcdr (cdr);
if (XINT (beg) < BEGV || XINT (end) > ZV)
- error ("Changes to be undone are outside visible portion of buffer");
+ user_error ("Changes to be undone are outside visible portion of buffer");
Fput_text_property (beg, end, prop, val, Qnil);
}
else if (INTEGERP (car) && INTEGERP (cdr))
@@ -537,7 +544,7 @@ Return what remains of the list. */)
if (XINT (car) < BEGV
|| XINT (cdr) > ZV)
- error ("Changes to be undone are outside visible portion of buffer");
+ user_error ("Changes to be undone are outside visible portion of buffer");
/* Set point first thing, so that undoing this undo
does not send point back to where it is now. */
Fgoto_char (car);
@@ -588,14 +595,14 @@ Return what remains of the list. */)
if (pos < 0)
{
if (-pos < BEGV || -pos > ZV)
- error ("Changes to be undone are outside visible portion of buffer");
+ user_error ("Changes to be undone are outside visible portion of buffer");
SET_PT (-pos);
Finsert (1, &membuf);
}
else
{
if (pos < BEGV || pos > ZV)
- error ("Changes to be undone are outside visible portion of buffer");
+ user_error ("Changes to be undone are outside visible portion of buffer");
SET_PT (pos);
/* Now that we record marker adjustments
diff --git a/src/unexaix.c b/src/unexaix.c
index 1bf65b68518..29fa0fd6287 100644
--- a/src/unexaix.c
+++ b/src/unexaix.c
@@ -78,13 +78,13 @@ static long data_scnptr;
static long load_scnptr;
static long orig_load_scnptr;
static long orig_data_scnptr;
-static int unrelocate_symbols (int, int, char *, char *);
+static int unrelocate_symbols (int, int, const char *, const char *);
#ifndef MAX_SECTIONS
#define MAX_SECTIONS 10
#endif
-static int adjust_lnnoptrs (int, int, char *);
+static int adjust_lnnoptrs (int, int, const char *);
static int pagemask;
@@ -92,7 +92,7 @@ static int pagemask;
#include "lisp.h"
static void
-report_error (char *file, int fd)
+report_error (const char *file, int fd)
{
if (fd)
close (fd);
@@ -104,16 +104,16 @@ report_error (char *file, int fd)
#define ERROR2(msg,x,y) report_error_1 (new, msg, x, y); return -1
static void
-report_error_1 (int fd, char *msg, int a1, int a2)
+report_error_1 (int fd, const char *msg, int a1, int a2)
{
close (fd);
error (msg, a1, a2);
}
-static int make_hdr (int, int, unsigned, unsigned, unsigned, char *, char *);
-static void mark_x (char *);
+static int make_hdr (int, int, const char *, const char *);
+static void mark_x (const char *);
static int copy_text_and_data (int);
-static int copy_sym (int, int, char *, char *);
+static int copy_sym (int, int, const char *, const char *);
static void write_segment (int, char *, char *);
/* ****************************************************************
@@ -159,7 +159,7 @@ unexec (const char *new_name, const char *a_name)
*/
static int
make_hdr (int new, int a_out,
- char *a_name, char *new_name)
+ const char *a_name, const char *new_name)
{
int scns;
unsigned int bss_start;
@@ -429,7 +429,7 @@ write_segment (int new, char *ptr, char *end)
* Copy the relocation information and symbol table from the a.out to the new
*/
static int
-copy_sym (int new, int a_out, char *a_name, char *new_name)
+copy_sym (int new, int a_out, const char *a_name, const char *new_name)
{
char page[UnexBlockSz];
int n;
@@ -465,7 +465,7 @@ copy_sym (int new, int a_out, char *a_name, char *new_name)
* After successfully building the new a.out, mark it executable
*/
static void
-mark_x (char *name)
+mark_x (const char *name)
{
struct stat sbuf;
int um;
@@ -483,7 +483,7 @@ mark_x (char *name)
}
static int
-adjust_lnnoptrs (int writedesc, int readdesc, char *new_name)
+adjust_lnnoptrs (int writedesc, int readdesc, const char *new_name)
{
int nsyms;
int naux;
@@ -530,7 +530,8 @@ adjust_lnnoptrs (int writedesc, int readdesc, char *new_name)
}
static int
-unrelocate_symbols (int new, int a_out, char *a_name, char *new_name)
+unrelocate_symbols (int new, int a_out,
+ const char *a_name, const char *new_name)
{
int i;
LDHDR ldhdr;
diff --git a/src/unexelf.c b/src/unexelf.c
index ac9c9e75764..f35b53aeab3 100644
--- a/src/unexelf.c
+++ b/src/unexelf.c
@@ -506,11 +506,7 @@ typedef struct {
#endif
#ifndef ElfW
-# ifdef __STDC__
-# define ElfBitsW(bits, type) Elf##bits##_##type
-# else
-# define ElfBitsW(bits, type) Elf/**/bits/**/_/**/type
-# endif
+# define ElfBitsW(bits, type) Elf##bits##_##type
# ifdef _LP64
# define ELFSIZE 64
# else
diff --git a/src/vm-limit.c b/src/vm-limit.c
index 94725044048..c313a900f2c 100644
--- a/src/vm-limit.c
+++ b/src/vm-limit.c
@@ -31,7 +31,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
enum warnlevel { not_warned, warned_75, warned_85, warned_95 };
static enum warnlevel warnlevel;
-typedef POINTER_TYPE *POINTER;
+typedef void *POINTER;
/* Function to call to issue a warning;
0 means don't issue them. */
diff --git a/src/w32fns.c b/src/w32fns.c
index 3a6929844de..d7114f19b90 100644
--- a/src/w32fns.c
+++ b/src/w32fns.c
@@ -4003,7 +4003,7 @@ unwind_create_frame (Lisp_Object frame)
#if GLYPH_DEBUG
/* Check that reference counts are indeed correct. */
xassert (dpyinfo->reference_count == dpyinfo_refcount);
- xassert (dpyinfo->image_cache->refcount == image_cache_refcount);
+ xassert (dpyinfo->terminal->image_cache->refcount == image_cache_refcount);
#endif
return Qt;
}
@@ -5016,16 +5016,6 @@ no value of TYPE (always string in the MS Windows case). */)
cursor. Duplicated from xdisp.c, but cannot use the version there
due to lack of atimers on w32. */
#define DEFAULT_HOURGLASS_DELAY 1
-/* Return non-zero if hourglass timer has been started or hourglass is
- shown. */
-/* PENDING: if W32 can use atimers (atimer.[hc]) then the common impl in
- xdisp.c could be used. */
-
-int
-hourglass_started (void)
-{
- return hourglass_shown_p || hourglass_timer;
-}
/* Cancel a currently active hourglass timer, and start a new one. */
@@ -5246,7 +5236,7 @@ x_create_tip_frame (struct w32_display_info *dpyinfo,
#if GLYPH_DEBUG
image_cache_refcount =
- FRAME_IMAGE_CACHE ? FRAME_IMAGE_CACHE (f)->refcount : 0;
+ FRAME_IMAGE_CACHE (f) ? FRAME_IMAGE_CACHE (f)->refcount : 0;
dpyinfo_refcount = dpyinfo->reference_count;
#endif /* GLYPH_DEBUG */
FRAME_KBOARD (f) = kb;
diff --git a/src/w32font.c b/src/w32font.c
index dab9f4c61b4..8badace9635 100644
--- a/src/w32font.c
+++ b/src/w32font.c
@@ -2045,8 +2045,11 @@ fill_in_logfont (FRAME_PTR f, LOGFONT *logfont, Lisp_Object font_spec)
/* Font families are interned, but allow for strings also in case of
user input. */
else if (SYMBOLP (tmp))
- strncpy (logfont->lfFaceName,
- SDATA (ENCODE_SYSTEM (SYMBOL_NAME (tmp))), LF_FACESIZE);
+ {
+ strncpy (logfont->lfFaceName,
+ SDATA (ENCODE_SYSTEM (SYMBOL_NAME (tmp))), LF_FACESIZE);
+ logfont->lfFaceName[LF_FACESIZE-1] = '\0';
+ }
}
tmp = AREF (font_spec, FONT_ADSTYLE_INDEX);
diff --git a/src/w32menu.c b/src/w32menu.c
index dd741a01b5b..2bc4c208956 100644
--- a/src/w32menu.c
+++ b/src/w32menu.c
@@ -48,6 +48,8 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#include "dispextern.h"
+#include "w32heap.h" /* for osinfo_cache */
+
#undef HAVE_DIALOGS /* TODO: Implement native dialogs. */
#ifndef TRUE
@@ -1498,8 +1500,11 @@ add_menu_item (HMENU menu, widget_value *wv, HMENU item)
AppendMenu (menu, fuFlags,
item != NULL ? (UINT) item: (UINT) wv->call_data,
out_string);
- /* Don't use Unicode menus in future. */
- unicode_append_menu = NULL;
+ /* Don't use Unicode menus in future, unless this is Windows
+ NT or later, where a failure of AppendMenuW does NOT mean
+ Unicode menus are unsupported. */
+ if (osinfo_cache.dwPlatformId != VER_PLATFORM_WIN32_NT)
+ unicode_append_menu = NULL;
}
if (unicode_append_menu && (fuFlags & MF_OWNERDRAW))
diff --git a/src/w32proc.c b/src/w32proc.c
index 28591f90128..5bdeba25958 100644
--- a/src/w32proc.c
+++ b/src/w32proc.c
@@ -141,7 +141,25 @@ new_child (void)
cp->char_consumed = CreateEvent (NULL, FALSE, FALSE, NULL);
if (cp->char_consumed)
{
- cp->thrd = CreateThread (NULL, 1024, reader_thread, cp, 0, &id);
+ /* The 0x00010000 flag is STACK_SIZE_PARAM_IS_A_RESERVATION.
+ It means that the 64K stack we are requesting in the 2nd
+ argument is how much memory should be reserved for the
+ stack. If we don't use this flag, the memory requested
+ by the 2nd argument is the amount actually _committed_,
+ but Windows reserves 8MB of memory for each thread's
+ stack. (The 8MB figure comes from the -stack
+ command-line argument we pass to the linker when building
+ Emacs, but that's because we need a large stack for
+ Emacs's main thread.) Since we request 2GB of reserved
+ memory at startup (see w32heap.c), which is close to the
+ maximum memory available for a 32-bit process on Windows,
+ the 8MB reservation for each thread causes failures in
+ starting subprocesses, because we create a thread running
+ reader_thread for each subprocess. As 8MB of stack is
+ way too much for reader_thread, forcing Windows to
+ reserve less wins the day. */
+ cp->thrd = CreateThread (NULL, 64 * 1024, reader_thread, cp,
+ 0x00010000, &id);
if (cp->thrd)
return cp;
}
diff --git a/src/w32term.c b/src/w32term.c
index 18a3753f9e9..2ccd7574332 100644
--- a/src/w32term.c
+++ b/src/w32term.c
@@ -231,6 +231,10 @@ static void my_set_focus (struct frame *, HWND);
static void my_set_foreground_window (HWND);
static void my_destroy_window (struct frame *, HWND);
+#if GLYPH_DEBUG
+static void x_check_font (struct frame *, struct font *);
+#endif
+
static Lisp_Object Qvendor_specific_keysyms;
@@ -5906,6 +5910,27 @@ x_wm_set_icon_position (struct frame *f, int icon_x, int icon_y)
/***********************************************************************
+ Fonts
+ ***********************************************************************/
+
+#if GLYPH_DEBUG
+
+/* Check that FONT is valid on frame F. It is if it can be found in F's
+ font table. */
+
+static void
+x_check_font (struct frame *f, struct font *font)
+{
+ xassert (font != NULL && ! NILP (font->props[FONT_TYPE_INDEX]));
+ if (font->driver->check)
+ xassert (font->driver->check (f, font) == 0);
+}
+
+#endif /* GLYPH_DEBUG != 0 */
+
+
+
+/***********************************************************************
Initialization
***********************************************************************/
diff --git a/src/window.c b/src/window.c
index 19f27ec5320..37bcf64181a 100644
--- a/src/window.c
+++ b/src/window.c
@@ -4223,6 +4223,11 @@ window_scroll_pixel_based (Lisp_Object window, int n, int whole, int noerror)
void *itdata = NULL;
SET_TEXT_POS_FROM_MARKER (start, w->start);
+ /* Scrolling a minibuffer window via scroll bar when the echo area
+ shows long text sometimes resets the minibuffer contents behind
+ our backs. */
+ if (CHARPOS (start) > ZV)
+ SET_TEXT_POS (start, BEGV, BEGV_BYTE);
/* If PT is not visible in WINDOW, move back one half of
the screen. Allow PT to be partially visible, otherwise
diff --git a/src/window.h b/src/window.h
index ea127ca95a8..1524805579f 100644
--- a/src/window.h
+++ b/src/window.h
@@ -852,11 +852,6 @@ extern EMACS_INT minibuf_level;
extern int update_mode_lines;
-/* Nonzero if BEGV - BEG or Z - ZV of current buffer has changed since
- last redisplay that finished. */
-
-extern int clip_changed;
-
/* Nonzero if window sizes or contents have changed since last
redisplay that finished */
diff --git a/src/xdisp.c b/src/xdisp.c
index 43b92bcf536..0a25eab1cbc 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -383,11 +383,21 @@ static Lisp_Object Qline_height;
#define IT_OVERFLOW_NEWLINE_INTO_FRINGE(it) 0
#endif /* HAVE_WINDOW_SYSTEM */
-/* Test if the display element loaded in IT is a space or tab
- character. This is used to determine word wrapping. */
-
-#define IT_DISPLAYING_WHITESPACE(it) \
- (it->what == IT_CHARACTER && (it->c == ' ' || it->c == '\t'))
+/* Test if the display element loaded in IT, or the underlying buffer
+ or string character, is a space or a TAB character. This is used
+ to determine where word wrapping can occur. */
+
+#define IT_DISPLAYING_WHITESPACE(it) \
+ ((it->what == IT_CHARACTER && (it->c == ' ' || it->c == '\t')) \
+ || ((STRINGP (it->string) \
+ && (SREF (it->string, IT_STRING_BYTEPOS (*it)) == ' ' \
+ || SREF (it->string, IT_STRING_BYTEPOS (*it)) == '\t')) \
+ || (it->s \
+ && (it->s[IT_BYTEPOS (*it)] == ' ' \
+ || it->s[IT_BYTEPOS (*it)] == '\t')) \
+ || (IT_BYTEPOS (*it) < ZV_BYTE \
+ && (*BYTE_POS_ADDR (IT_BYTEPOS (*it)) == ' ' \
+ || *BYTE_POS_ADDR (IT_BYTEPOS (*it)) == '\t')))) \
/* Name of the face used to highlight trailing whitespace. */
@@ -839,6 +849,7 @@ static int try_cursor_movement (Lisp_Object, struct text_pos, int *);
static int trailing_whitespace_p (ptrdiff_t);
static intmax_t message_log_check_duplicate (ptrdiff_t, ptrdiff_t);
static void push_it (struct it *, struct text_pos *);
+static void iterate_out_of_display_property (struct it *);
static void pop_it (struct it *);
static void sync_frame_with_window_matrix_rows (struct window *);
static void select_frame_for_redisplay (Lisp_Object);
@@ -1265,6 +1276,11 @@ pos_visible_p (struct window *w, ptrdiff_t charpos, int *x, int *y,
}
SET_TEXT_POS_FROM_MARKER (top, w->start);
+ /* Scrolling a minibuffer window via scroll bar when the echo area
+ shows long text sometimes resets the minibuffer contents behind
+ our backs. */
+ if (CHARPOS (top) > ZV)
+ SET_TEXT_POS (top, BEGV, BEGV_BYTE);
/* Compute exact mode line heights. */
if (WINDOW_WANTS_MODELINE_P (w))
@@ -1298,8 +1314,8 @@ pos_visible_p (struct window *w, ptrdiff_t charpos, int *x, int *y,
glyph. */
int top_x = it.current_x;
int top_y = it.current_y;
- enum it_method it_method = it.method;
/* Calling line_bottom_y may change it.method, it.position, etc. */
+ enum it_method it_method = it.method;
int bottom_y = (last_height = 0, line_bottom_y (&it));
int window_top_y = WINDOW_HEADER_LINE_HEIGHT (w);
@@ -1307,6 +1323,31 @@ pos_visible_p (struct window *w, ptrdiff_t charpos, int *x, int *y,
visible_p = bottom_y > window_top_y;
else if (top_y < it.last_visible_y)
visible_p = 1;
+ if (bottom_y >= it.last_visible_y
+ && it.bidi_p && it.bidi_it.scan_dir == -1
+ && IT_CHARPOS (it) < charpos)
+ {
+ /* When the last line of the window is scanned backwards
+ under bidi iteration, we could be duped into thinking
+ that we have passed CHARPOS, when in fact move_it_to
+ simply stopped short of CHARPOS because it reached
+ last_visible_y. To see if that's what happened, we call
+ move_it_to again with a slightly larger vertical limit,
+ and see if it actually moved vertically; if it did, we
+ didn't really reach CHARPOS, which is beyond window end. */
+ struct it save_it = it;
+ /* Why 10? because we don't know how many canonical lines
+ will the height of the next line(s) be. So we guess. */
+ int ten_more_lines =
+ 10 * FRAME_LINE_HEIGHT (XFRAME (WINDOW_FRAME (w)));
+
+ move_it_to (&it, charpos, -1, bottom_y + ten_more_lines, -1,
+ MOVE_TO_POS | MOVE_TO_Y);
+ if (it.current_y > top_y)
+ visible_p = 0;
+
+ it = save_it;
+ }
if (visible_p)
{
if (it_method == GET_FROM_DISPLAY_VECTOR)
@@ -1370,6 +1411,7 @@ pos_visible_p (struct window *w, ptrdiff_t charpos, int *x, int *y,
Lisp_Object startpos, endpos;
EMACS_INT start, end;
struct it it3;
+ int it3_moved;
/* Find the first and the last buffer positions
covered by the display string. */
@@ -1426,6 +1468,15 @@ pos_visible_p (struct window *w, ptrdiff_t charpos, int *x, int *y,
begins. */
start_display (&it3, w, top);
move_it_to (&it3, -1, 0, top_y, -1, MOVE_TO_X | MOVE_TO_Y);
+ /* If it3_moved stays zero after the 'while' loop
+ below, that means we already were at a newline
+ before the loop (e.g., the display string begins
+ with a newline), so we don't need to (and cannot)
+ inspect the glyphs of it3.glyph_row, because
+ PRODUCE_GLYPHS will not produce anything for a
+ newline, and thus it3.glyph_row stays at its
+ stale content it got at top of the window. */
+ it3_moved = 0;
/* Finally, advance the iterator until we hit the
first display element whose character position is
CHARPOS, or until the first newline from the
@@ -1437,6 +1488,7 @@ pos_visible_p (struct window *w, ptrdiff_t charpos, int *x, int *y,
if (IT_CHARPOS (it3) == charpos
|| ITERATOR_AT_END_OF_LINE_P (&it3))
break;
+ it3_moved = 1;
set_iterator_to_next (&it3, 0);
}
top_x = it3.current_x - it3.pixel_width;
@@ -1447,7 +1499,8 @@ pos_visible_p (struct window *w, ptrdiff_t charpos, int *x, int *y,
display string, move back over the glyphs
produced from the string, until we find the
rightmost glyph not from the string. */
- if (IT_CHARPOS (it3) != charpos && EQ (it3.object, string))
+ if (it3_moved
+ && IT_CHARPOS (it3) != charpos && EQ (it3.object, string))
{
struct glyph *g = it3.glyph_row->glyphs[TEXT_AREA]
+ it3.glyph_row->used[TEXT_AREA];
@@ -3111,7 +3164,15 @@ handle_stop (struct it *it)
overlays even if the actual buffer text is replaced. */
if (!handle_overlay_change_p
|| it->sp > 1
- || !get_overlay_strings_1 (it, 0, 0))
+ /* Don't call get_overlay_strings_1 if we already
+ have overlay strings loaded, because doing so
+ will load them again and push the iterator state
+ onto the stack one more time, which is not
+ expected by the rest of the code that processes
+ overlay strings. */
+ || (it->n_overlay_strings <= 0
+ ? !get_overlay_strings_1 (it, 0, 0)
+ : 0))
{
if (it->ellipsis_p)
setup_for_ellipsis (it, 0);
@@ -4667,10 +4728,22 @@ handle_single_display_spec (struct it *it, Lisp_Object spec, Lisp_Object object,
if (!FRAME_WINDOW_P (it->f))
/* If we return here, POSITION has been advanced
across the text with this property. */
- return 0;
+ {
+ /* Synchronize the bidi iterator with POSITION. This is
+ needed because we are not going to push the iterator
+ on behalf of this display property, so there will be
+ no pop_it call to do this synchronization for us. */
+ if (it->bidi_p)
+ {
+ it->position = *position;
+ iterate_out_of_display_property (it);
+ *position = it->position;
+ }
+ return 1;
+ }
}
else if (!frame_window_p)
- return 0;
+ return 1;
#ifdef HAVE_WINDOW_SYSTEM
value = XCAR (XCDR (spec));
@@ -4678,7 +4751,15 @@ handle_single_display_spec (struct it *it, Lisp_Object spec, Lisp_Object object,
|| !(fringe_bitmap = lookup_fringe_bitmap (value)))
/* If we return here, POSITION has been advanced
across the text with this property. */
- return 0;
+ {
+ if (it && it->bidi_p)
+ {
+ it->position = *position;
+ iterate_out_of_display_property (it);
+ *position = it->position;
+ }
+ return 1;
+ }
if (it)
{
@@ -5602,7 +5683,7 @@ push_it (struct it *it, struct text_pos *position)
static void
iterate_out_of_display_property (struct it *it)
{
- int buffer_p = BUFFERP (it->object);
+ int buffer_p = !STRINGP (it->string);
ptrdiff_t eob = (buffer_p ? ZV : it->end_charpos);
ptrdiff_t bob = (buffer_p ? BEGV : 0);
@@ -6769,6 +6850,16 @@ get_next_display_element (struct it *it)
&& FACE_FROM_ID (it->f, face_id)->box == FACE_NO_BOX);
}
}
+ /* If we reached the end of the object we've been iterating (e.g., a
+ display string or an overlay string), and there's something on
+ IT->stack, proceed with what's on the stack. It doesn't make
+ sense to return zero if there's unprocessed stuff on the stack,
+ because otherwise that stuff will never be displayed. */
+ if (!success_p && it->sp > 0)
+ {
+ set_iterator_to_next (it, 0);
+ success_p = get_next_display_element (it);
+ }
/* Value is 0 if end of buffer or string reached. */
return success_p;
@@ -6950,7 +7041,7 @@ set_iterator_to_next (struct it *it, int reseat_p)
display vector entry (these entries may contain faces). */
it->face_id = it->saved_face_id;
- if (it->dpvec + it->current.dpvec_index == it->dpend)
+ if (it->dpvec + it->current.dpvec_index >= it->dpend)
{
int recheck_faces = it->ellipsis_p;
@@ -6988,6 +7079,26 @@ set_iterator_to_next (struct it *it, int reseat_p)
case GET_FROM_STRING:
/* Current display element is a character from a Lisp string. */
xassert (it->s == NULL && STRINGP (it->string));
+ /* Don't advance past string end. These conditions are true
+ when set_iterator_to_next is called at the end of
+ get_next_display_element, in which case the Lisp string is
+ already exhausted, and all we want is pop the iterator
+ stack. */
+ if (it->current.overlay_string_index >= 0)
+ {
+ /* This is an overlay string, so there's no padding with
+ spaces, and the number of characters in the string is
+ where the string ends. */
+ if (IT_STRING_CHARPOS (*it) >= SCHARS (it->string))
+ goto consider_string_end;
+ }
+ else
+ {
+ /* Not an overlay string. There could be padding, so test
+ against it->end_charpos . */
+ if (IT_STRING_CHARPOS (*it) >= it->end_charpos)
+ goto consider_string_end;
+ }
if (it->cmp_it.id >= 0)
{
int i;
@@ -12707,6 +12818,9 @@ redisplay_internal (void)
frames. Zero means, only selected_window is considered. */
int consider_all_windows_p;
+ /* Non-zero means redisplay has to redisplay the miniwindow */
+ int update_miniwindow_p = 0;
+
TRACE ((stderr, "redisplay_internal %d\n", redisplaying_p));
/* No redisplay if running in batch mode or frame is not yet fully
@@ -12893,6 +13007,10 @@ redisplay_internal (void)
&& !MINI_WINDOW_P (XWINDOW (selected_window))))
{
int window_height_changed_p = echo_area_display (0);
+
+ if (message_cleared_p)
+ update_miniwindow_p = 1;
+
must_finish = 1;
/* If we don't display the current message, don't clear the
@@ -12929,7 +13047,7 @@ redisplay_internal (void)
/* FIXME: this causes all frames to be updated, which seems unnecessary
since only the current frame needs to be considered. This function needs
to be rewritten with two variables, consider_all_windows and
- consider_all_frames. */
+ consider_all_frames. */
consider_all_windows_p = 1;
++windows_or_buffers_changed;
++update_mode_lines;
@@ -13115,7 +13233,8 @@ redisplay_internal (void)
then we can't just move the cursor. */
else if (! (!NILP (Vtransient_mark_mode)
&& !NILP (BVAR (current_buffer, mark_active)))
- && (EQ (selected_window, BVAR (current_buffer, last_selected_window))
+ && (EQ (selected_window,
+ BVAR (current_buffer, last_selected_window))
|| highlight_nonselected_windows)
&& NILP (w->region_showing)
&& NILP (Vshow_trailing_whitespace)
@@ -13268,7 +13387,7 @@ redisplay_internal (void)
}
else if (FRAME_VISIBLE_P (sf) && !FRAME_OBSCURED_P (sf))
{
- Lisp_Object mini_window;
+ Lisp_Object mini_window = FRAME_MINIBUF_WINDOW (sf);
struct frame *mini_frame;
displayed_buffer = XBUFFER (XWINDOW (selected_window)->buffer);
@@ -13277,6 +13396,10 @@ redisplay_internal (void)
internal_condition_case_1 (redisplay_window_1, selected_window,
list_of_error,
redisplay_window_error);
+ if (update_miniwindow_p)
+ internal_condition_case_1 (redisplay_window_1, mini_window,
+ list_of_error,
+ redisplay_window_error);
/* Compare desired and current matrices, perform output. */
@@ -28850,14 +28973,6 @@ init_xdisp (void)
/* Platform-independent portion of hourglass implementation. */
-/* Return non-zero if hourglass timer has been started or hourglass is
- shown. */
-int
-hourglass_started (void)
-{
- return hourglass_shown_p || hourglass_atimer != NULL;
-}
-
/* Cancel a currently active hourglass timer, and start a new one. */
void
start_hourglass (void)
diff --git a/src/xfns.c b/src/xfns.c
index 2d2ab46fb36..767507805fb 100644
--- a/src/xfns.c
+++ b/src/xfns.c
@@ -136,7 +136,7 @@ char *gray_bitmap_bits = gray_bits;
/* Nonzero if using X. */
-static int x_in_use;
+int x_in_use;
static Lisp_Object Qnone;
static Lisp_Object Qsuppress_icon;
@@ -2439,7 +2439,6 @@ x_window (struct frame *f, long window_prompting, int minibuffer_only)
/* Do some needed geometry management. */
{
- ptrdiff_t len;
char *tem, shell_position[sizeof "=x++" + 4 * INT_STRLEN_BOUND (int)];
Arg gal[10];
int gac = 0;
@@ -2508,13 +2507,11 @@ x_window (struct frame *f, long window_prompting, int minibuffer_only)
}
}
- len = strlen (shell_position) + 1;
/* We don't free this because we don't know whether
it is safe to free it while the frame exists.
It isn't worth the trouble of arranging to free it
when the frame is deleted. */
- tem = (char *) xmalloc (len);
- strncpy (tem, shell_position, len);
+ tem = (char *) xstrdup (shell_position);
XtSetArg (gal[gac], XtNgeometry, tem); gac++;
XtSetValues (shell_widget, gal, gac);
}
diff --git a/src/xgselect.c b/src/xgselect.c
index 80dbfc32aee..9d6a3ba774a 100644
--- a/src/xgselect.c
+++ b/src/xgselect.c
@@ -27,28 +27,33 @@ along with GNU Emacs. If not, see <http§://www.gnu.org/licenses/>. */
#include <glib.h>
#include <errno.h>
#include <setjmp.h>
+#include "xterm.h"
static GPollFD *gfds;
static ptrdiff_t gfds_size;
int
-xg_select (int max_fds, SELECT_TYPE *rfds, SELECT_TYPE *wfds, SELECT_TYPE *efds,
+xg_select (int fds_lim, SELECT_TYPE *rfds, SELECT_TYPE *wfds, SELECT_TYPE *efds,
EMACS_TIME *timeout)
{
SELECT_TYPE all_rfds, all_wfds;
EMACS_TIME tmo, *tmop = timeout;
- GMainContext *context = g_main_context_default ();
+ GMainContext *context;
int have_wfds = wfds != NULL;
- int n_gfds = 0, our_tmo = 0, retval = 0, our_fds = 0;
+ int n_gfds = 0, our_tmo = 0, retval = 0, our_fds = 0, max_fds = fds_lim - 1;
int i, nfds, tmo_in_millisec;
+ if (!x_in_use)
+ return select (fds_lim, rfds, wfds, efds, timeout);
+
if (rfds) memcpy (&all_rfds, rfds, sizeof (all_rfds));
else FD_ZERO (&all_rfds);
if (wfds) memcpy (&all_wfds, wfds, sizeof (all_rfds));
else FD_ZERO (&all_wfds);
/* Update event sources in GLib. */
+ context = g_main_context_default ();
g_main_context_pending (context);
do {
@@ -97,14 +102,14 @@ xg_select (int max_fds, SELECT_TYPE *rfds, SELECT_TYPE *wfds, SELECT_TYPE *efds,
if (our_tmo) tmop = &tmo;
}
- nfds = select (max_fds+1, &all_rfds, have_wfds ? &all_wfds : NULL,
- efds, tmop);
+ fds_lim = max_fds + 1;
+ nfds = select (fds_lim, &all_rfds, have_wfds ? &all_wfds : NULL, efds, tmop);
if (nfds < 0)
retval = nfds;
else if (nfds > 0)
{
- for (i = 0; i < max_fds+1; ++i)
+ for (i = 0; i < fds_lim; ++i)
{
if (FD_ISSET (i, &all_rfds))
{
diff --git a/src/xselect.c b/src/xselect.c
index 290f4d7eb4d..48baeb32581 100644
--- a/src/xselect.c
+++ b/src/xselect.c
@@ -930,6 +930,7 @@ x_convert_selection (struct input_event *event, Lisp_Object selection_symbol,
/* Otherwise, record the converted selection to binary. */
cs = xmalloc (sizeof (struct selection_data));
+ cs->data = NULL;
cs->nofree = 1;
cs->property = property;
cs->wait_object = NULL;
diff --git a/src/xterm.c b/src/xterm.c
index 1a5bc913f60..0ebaf87c252 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -256,11 +256,7 @@ static Time last_user_time;
/* Incremented by XTread_socket whenever it really tries to read
events. */
-#ifdef __STDC__
static int volatile input_signal_count;
-#else
-static int input_signal_count;
-#endif
/* Used locally within XTread_socket. */
@@ -10146,7 +10142,7 @@ x_term_init (Lisp_Object display_name, char *xrm_option, char *resource_name)
/* Set the name of the terminal. */
terminal->name = (char *) xmalloc (SBYTES (display_name) + 1);
- strncpy (terminal->name, SSDATA (display_name), SBYTES (display_name));
+ memcpy (terminal->name, SSDATA (display_name), SBYTES (display_name));
terminal->name[SBYTES (display_name)] = 0;
#if 0
diff --git a/src/xterm.h b/src/xterm.h
index b498261a805..8919b648371 100644
--- a/src/xterm.h
+++ b/src/xterm.h
@@ -1031,6 +1031,7 @@ extern void x_clipboard_manager_save_all (void);
extern struct x_display_info * check_x_display_info (Lisp_Object);
extern Lisp_Object x_get_focus_frame (struct frame *);
+extern int x_in_use;
#ifdef USE_GTK
extern int xg_set_icon (struct frame *, Lisp_Object);
diff --git a/test/ChangeLog b/test/ChangeLog
index 66f8592c79c..ba6162ca241 100644
--- a/test/ChangeLog
+++ b/test/ChangeLog
@@ -1,3 +1,22 @@
+2012-05-21 Glenn Morris <rgm@gnu.org>
+
+ * automated/Makefile.in (setwins): Scrap superfluous subshell.
+
+2012-05-15 Teodor Zlatanov <tzz@lifelogs.com>
+
+ * automated/url-util-tests.el: New file to test
+ lisp/url/url-util.el. Only `url-build-query-string' and
+ `url-parse-query-string' are tested right now (Bug#8706).
+
+2012-04-28 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * indent/shell.sh:
+ * indent/shell.rc: Ad some test cases.
+
+2012-04-24 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * indent/ruby.rb: New file, to test new syntax-propertize code.
+
2012-04-11 Glenn Morris <rgm@gnu.org>
* automated/vc-bzr.el (vc-bzr-test-faulty-bzr-autoloads): New test.
diff --git a/test/automated/Makefile.in b/test/automated/Makefile.in
index c07d5a1897d..4f2e8a59e49 100644
--- a/test/automated/Makefile.in
+++ b/test/automated/Makefile.in
@@ -48,7 +48,7 @@ BYTE_COMPILE_EXTRA_FLAGS =
emacs = EMACSLOADPATH=$(lispsrc):$(test) LC_ALL=C $(EMACS) $(EMACSOPT)
# Common command to find subdirectories
-setwins=subdirs=`(find . -type d -print)`; \
+setwins=subdirs=`find . -type d -print`; \
for file in $$subdirs; do \
case $$file in */.* | */.*/* | */=* ) ;; \
*) wins="$$wins $$file" ;; \
diff --git a/test/automated/compile-tests.el b/test/automated/compile-tests.el
index ad36c4296b4..ecd0e8856f7 100644
--- a/test/automated/compile-tests.el
+++ b/test/automated/compile-tests.el
@@ -199,6 +199,8 @@
;; maven
("FooBar.java:[111,53] no interface expected here"
1 53 111 "FooBar.java")
+ (" [ERROR] /Users/cinsk/hello.java:[651,96] ';' expected"
+ 15 96 651 "/Users/cinsk/hello.java") ;Bug#11517.
;; mips-1 mips-2
("TrimMask (255) in solomon.c may be indistinguishable from TrimMasks (93) in solomo.c due to truncation"
11 nil 255 "solomon.c")
diff --git a/test/automated/url-util-tests.el b/test/automated/url-util-tests.el
new file mode 100644
index 00000000000..65eb37ce926
--- /dev/null
+++ b/test/automated/url-util-tests.el
@@ -0,0 +1,51 @@
+;;; url-util-tests.el --- Test suite for url-util.
+
+;; Copyright (C) 2012 Free Software Foundation, Inc.
+
+;; Author: Teodor Zlatanov <tzz@lifelogs.com>
+;; Keywords: data
+
+;; This file is part of GNU Emacs.
+
+;; GNU Emacs 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, either version 3 of the License, or
+;; (at your option) any later version.
+
+;; GNU Emacs 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 GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
+
+;;; Code:
+
+(require 'ert)
+(require 'url-util)
+
+(ert-deftest url-util-tests ()
+ (let ((tests
+ '(("key1=val1&key2=val2&key3=val1&key3=val2&key4&key5"
+ ((key1 val1) (key2 "val2") (key3 val1 val2) (key4) (key5 "")))
+ ("key1=val1;key2=val2;key3=val1;key3=val2;key4;key5"
+ ((key1 "val1") (key2 val2) (key3 val1 val2) ("key4") (key5 "")) t)
+ ("key1=val1;key2=val2;key3=val1;key3=val2;key4=;key5="
+ ((key1 val1) (key2 val2) ("key3" val1 val2) (key4) (key5 "")) t t)))
+ test)
+ (while tests
+ (setq test (car tests)
+ tests (cdr tests))
+ (should (equal (apply 'url-build-query-string (cdr test)) (car test)))))
+ (should (equal (url-parse-query-string
+ "key1=val1&key2=val2&key3=val1&key3=val2&key4=&key5")
+ '(("key5" "")
+ ("key4" "")
+ ("key3" "val2" "val1")
+ ("key2" "val2")
+ ("key1" "val1")))))
+
+(provide 'url-util-tests)
+
+;;; url-util-tests.el ends here
diff --git a/test/indent/ruby.rb b/test/indent/ruby.rb
new file mode 100644
index 00000000000..c4a747a1c78
--- /dev/null
+++ b/test/indent/ruby.rb
@@ -0,0 +1,19 @@
+# Don't mis-match "sub" at the end of words.
+a = asub / aslb + bsub / bslb;
+
+b = %Q{This is a "string"}
+c = %w(foo
+ bar
+ baz)
+d = %!hello!
+
+# A "do" after a slash means that slash is not a division, but it doesn't imply
+# it's a regexp-ender, since it can be a regexp-starter instead!
+x = toto / foo; if /do bar/ then
+ toto = 1
+ end
+
+# Some Cucumber code:
+Given /toto/ do
+ print "hello"
+end
diff --git a/test/indent/shell.rc b/test/indent/shell.rc
index 841223555b9..e5c63e335b9 100755
--- a/test/indent/shell.rc
+++ b/test/indent/shell.rc
@@ -1,7 +1,10 @@
#!/bin/rc
if (foo) {
- echo 1
+ echo 1 \
+ toto \
+ tutu
+ titi
}
if not {
echo 2
@@ -23,6 +26,10 @@ switch ($a) {
for (i in a b c)
echo "$i" # KNOWN INDENT BUG
echo titi
+ if (foo)
+ echo 3 # KNOWN INDENT BUG
+ if not
+ echo 4 # KNOWN INDENT BUG
case *
echo other
diff --git a/test/indent/shell.sh b/test/indent/shell.sh
index 89f47d0bfe3..26a01dc3bda 100755
--- a/test/indent/shell.sh
+++ b/test/indent/shell.sh
@@ -13,6 +13,7 @@ foo () {
case toto
in a) hello # KNOWN INDENT BUG
;; b) hi # KNOWN INDENT BUG
+ ;; c) hi # KNOWN INDENT BUG
esac
case $toto in
@@ -34,7 +35,8 @@ foo () {
sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
;;
esac |
- cat # KNOWN INDENT BUG
+ grep '.' | # KNOWN INDENT BUG
+ sed 1d
case toto in
-exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
diff --git a/vpath.sed b/vpath.sed
deleted file mode 100644
index a792eb0e913..00000000000
--- a/vpath.sed
+++ /dev/null
@@ -1,8 +0,0 @@
-/^VPATH *=/c\
-# This works only in GNU make. Using the patterns avoids\
-# object files being found by VPATH, and thus permits building\
-# when $srcdir is configured itself.\
-vpath %.c $(srcdir)\
-vpath %.h $(srcdir)\
-\
-